text
stringlengths
27
775k
import Vue from "vue"; import { library } from "@fortawesome/fontawesome-svg-core"; import { faAngleDoubleLeft, faAngleDoubleRight, faAngleDown, faAngleLeft, faAngleRight, faBars, faChevronDown, faChevronLeft, faChevronRight, faChevronUp, faEye, faQuestionCircle, faLanguage, faTimes, faTimesCircle, faUserCircle } from "@fortawesome/free-solid-svg-icons"; library.add( faAngleDoubleLeft, faAngleDoubleRight, faAngleDown, faAngleLeft, faAngleRight, faBars, faChevronDown, faChevronLeft, faChevronRight, faChevronUp, faEye, faQuestionCircle, faLanguage, faTimes, faTimesCircle, faUserCircle ); import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; Vue.component("fa-icon", FontAwesomeIcon);
import { ConsoleSink, ConsoleSinkOptions, LogEvent } from "serilogger"; /** * ProxyInterface für die Console zum ausgeben von Nachrichten */ export interface ConsoleProxy { // #region error /** * Outputs an error message. You may use string substitution and additional arguments with this method * * @param message The message to display in the console. * * %o or %O > * Outputs a JavaScript object. Clicking the object name opens more information about it in the inspector. * * %d or %i > * Outputs an integer. Number formatting is supported, for example console.log("Foo %.2d", 1.1) will * output the number as two significant figures with a leading 0: Foo 01 * * %s > * Outputs a string. * * %f > * Outputs a floating-point value. Formatting is supported, for example console.log("Foo %.2f", 1.1) will * output the number to 2 decimal places: Foo 1.10 * * %c > * Sets a style for the folowing text. For example console.log("%cThis Text is Red", * "Backgroundcolor: Red, Color: Black") will output black text with red background * * @param properties A list of JavaScript objects to output. The string representations * of each of these objects are appended together in the order listed and output. Please * be warned that if you log objects in the latest versions of Chrome and Firefox what * you get logged on the console is a reference to the object, which is not necessarily * the 'value' of the object at the moment in time you call console.log(), but it is * the value of the object at the moment you open the console. */ error(message?: any, ...properties: any[]): any; // #endregion // #region warn /** * Outputs a warning message. You may use string substitution and additional arguments with this method. * * @param message The message to display in the console. * * %o or %O > * Outputs a JavaScript object. Clicking the object name opens more information about it in the inspector. * * %d or %i > * Outputs an integer. Number formatting is supported, for example console.log("Foo %.2d", 1.1) will * output the number as two significant figures with a leading 0: Foo 01 * * %s > * Outputs a string. * * %f > * Outputs a floating-point value. Formatting is supported, for example console.log("Foo %.2f", 1.1) will * output the number to 2 decimal places: Foo 1.10 * * %c > * Sets a style for the folowing text. For example console.log("%cThis Text is Red", * "Backgroundcolor: Red, Color: Black") will output black text with red background * * @param properties A list of JavaScript objects to output. The string representations * of each of these objects are appended together in the order listed and output. Please * be warned that if you log objects in the latest versions of Chrome and Firefox what * you get logged on the console is a reference to the object, which is not necessarily * the 'value' of the object at the moment in time you call console.log(), but it is * the value of the object at the moment you open the console. */ warn(message?: any, ...properties: any[]): any; // #endregion // #region info /** * Informative logging of information. You may use string substitution and additional arguments with this method. * * @param message The message to display in the console. * * %o or %O > * Outputs a JavaScript object. Clicking the object name opens more information about it in the inspector. * * %d or %i > * Outputs an integer. Number formatting is supported, for example console.log("Foo %.2d", 1.1) will * output the number as two significant figures with a leading 0: Foo 01 * * %s > * Outputs a string. * * %f > * Outputs a floating-point value. Formatting is supported, for example console.log("Foo %.2f", 1.1) will * output the number to 2 decimal places: Foo 1.10 * * %c > * Sets a style for the folowing text. For example console.log("%cThis Text is Red", * "Backgroundcolor: Red, Color: Black") will output black text with red background * * @param properties A list of JavaScript objects to output. The string representations * of each of these objects are appended together in the order listed and output. Please * be warned that if you log objects in the latest versions of Chrome and Firefox what * you get logged on the console is a reference to the object, which is not necessarily * the 'value' of the object at the moment in time you call console.log(), but it is * the value of the object at the moment you open the console. */ info(message?: any, ...properties: any[]): any; // #endregion // #region debug /** * Outputs a message to the console with the log level debug * * @param message The message to display in the console. * * %o or %O > * Outputs a JavaScript object. Clicking the object name opens more information about it in the inspector. * * %d or %i > * Outputs an integer. Number formatting is supported, for example console.log("Foo %.2d", 1.1) will * output the number as two significant figures with a leading 0: Foo 01 * * %s > * Outputs a string. * * %f > * Outputs a floating-point value. Formatting is supported, for example console.log("Foo %.2f", 1.1) will * output the number to 2 decimal places: Foo 1.10 * * %c > * Sets a style for the folowing text. For example console.log("%cThis Text is Red", * "Backgroundcolor: Red, Color: Black") will output black text with red background * * @param properties A list of JavaScript objects to output. The string representations * of each of these objects are appended together in the order listed and output. Please * be warned that if you log objects in the latest versions of Chrome and Firefox what * you get logged on the console is a reference to the object, which is not necessarily * the 'value' of the object at the moment in time you call console.log(), but it is * the value of the object at the moment you open the console. */ debug(message?: any, ...properties: any[]): any; // #endregion // #region log /** * The method outputs a message to the web console * * @param message The message to display in the console. * * %o or %O > * Outputs a JavaScript object. Clicking the object name opens more information about it in the inspector. * * %d or %i > * Outputs an integer. Number formatting is supported, for example console.log("Foo %.2d", 1.1) will * output the number as two significant figures with a leading 0: Foo 01 * * %s > * Outputs a string. * * %f > * Outputs a floating-point value. Formatting is supported, for example console.log("Foo %.2f", 1.1) will * output the number to 2 decimal places: Foo 1.10 * * %c > * Sets a style for the folowing text. For example console.log("%cThis Text is Red", * "Backgroundcolor: Red, Color: Black") will output black text with red background * * @param properties A list of JavaScript objects to output. The string representations * of each of these objects are appended together in the order listed and output. Please * be warned that if you log objects in the latest versions of Chrome and Firefox what * you get logged on the console is a reference to the object, which is not necessarily * the 'value' of the object at the moment in time you call console.log(), but it is * the value of the object at the moment you open the console. */ log(message?: any, ...properties: any[]): any; // #endregion } export interface ColoredConsoleSinkOptions extends ConsoleSinkOptions { sinkColors?: ColoredConsoleSinkColors; } export const defaultConsoleSinkColors: ColoredConsoleSinkColors = { "Fatal": { levelBackgroundColor: "#EE0000", parameterBackgroundColor: "#EE0000" }, "Error": { levelBackgroundColor: "#770000", parameterBackgroundColor: "#770000" }, "Warning": { levelBackgroundColor: "#666600", parameterBackgroundColor: "#666600" }, "Information": { levelBackgroundColor: "#007700", parameterBackgroundColor: "#007700" }, "Debug": { levelBackgroundColor: "#008888", parameterBackgroundColor: "#007777" }, "Verbose": { levelBackgroundColor: "#000088", parameterBackgroundColor: "#000077" }, "Log": { levelBackgroundColor: "#660066", parameterBackgroundColor: "#660066" } }; export interface ConsoleSinkColors { levelForegroundColor?: string; levelBackgroundColor: string; backgroundColor?: string; foregroundColor?: string; parameterBackgroundColor: string; parameterForegroundColor?: string; } export interface ColoredConsoleSinkColors { [logLevel: string]: ConsoleSinkColors } export class BrowserColoredConsoleSink extends ConsoleSink { // #region fields protected sinkColors: ColoredConsoleSinkColors; // #endregion // #region ctor public constructor(options?: ColoredConsoleSinkOptions) { super(options); let optionsSinkColors = {}; if (typeof options === "object") { if (typeof options.sinkColors === "object") { optionsSinkColors = options.sinkColors; } } this.sinkColors = Object.assign(optionsSinkColors, defaultConsoleSinkColors); } // #endregion // #region writeToConsole protected writeToConsole( logMethod: (message?: any, ...properties: any[]) => void, prefix: string, event: LogEvent) { let output: string = ""; let consoleParameters: Array<any> = new Array<any>(); let sinkColorsForThisLevel = this.sinkColors[prefix]; if (this.options.includeTimestamps) { output += event.timestamp + " "; } if (this.options.removeLogLevelPrefix == false) { output += `[%c${prefix}%c] `; let parameterText: string = ""; if (typeof sinkColorsForThisLevel.levelBackgroundColor === "string") { parameterText += `Background: ${sinkColorsForThisLevel.levelBackgroundColor};`; } if (typeof sinkColorsForThisLevel.levelForegroundColor === "string") { parameterText += `Color: ${sinkColorsForThisLevel.levelForegroundColor};`; } consoleParameters.push(parameterText); consoleParameters.push(""); } let parameterPattern = new RegExp("{.+?}"); output += event.messageTemplate.raw; let tokens = new Array<string>(); let match: RegExpMatchArray; for (const key in event.properties) { let replaceText: string = "%c"; let parameterText: string = ""; if (typeof sinkColorsForThisLevel.parameterBackgroundColor === "string") { parameterText += `Background: ${sinkColorsForThisLevel.parameterBackgroundColor};`; } if (typeof sinkColorsForThisLevel.parameterForegroundColor === "string") { parameterText += `Color: ${sinkColorsForThisLevel.parameterForegroundColor};`; } consoleParameters.push(parameterText); switch (typeof event.properties[key]) { case "string": replaceText += "%s"; break; case "number": if (event.properties[key] % 1 > 0) { replaceText += "%f"; } else { replaceText += "%i"; } break; case "object": replaceText += "%o"; break; default: replaceText += "%s"; break; } consoleParameters.push(event.properties[key]); replaceText += "%c"; consoleParameters.push(""); output = output.replace(`{${key}}`, replaceText); } if (typeof event.error !== "undefined") { output += " Error: %o"; consoleParameters.push(event.error); } logMethod(output, ...consoleParameters); } // #endregion }
package spark.storage import java.nio.ByteBuffer import akka.actor._ import org.scalatest.FunSuite import org.scalatest.BeforeAndAfter import org.scalatest.PrivateMethodTester import org.scalatest.concurrent.Eventually._ import org.scalatest.concurrent.Timeouts._ import org.scalatest.matchers.ShouldMatchers._ import org.scalatest.time.SpanSugar._ import spark.JavaSerializer import spark.KryoSerializer import spark.SizeEstimator import spark.Utils import spark.util.AkkaUtils import spark.util.ByteBufferInputStream class BlockManagerSuite extends FunSuite with BeforeAndAfter with PrivateMethodTester { var store: BlockManager = null var store2: BlockManager = null var actorSystem: ActorSystem = null var master: BlockManagerMaster = null var oldArch: String = null var oldOops: String = null var oldHeartBeat: String = null // Reuse a serializer across tests to avoid creating a new thread-local buffer on each test System.setProperty("spark.kryoserializer.buffer.mb", "1") val serializer = new KryoSerializer before { val (actorSystem, boundPort) = AkkaUtils.createActorSystem("test", "localhost", 0) this.actorSystem = actorSystem System.setProperty("spark.driver.port", boundPort.toString) System.setProperty("spark.hostPort", "localhost:" + boundPort) master = new BlockManagerMaster( actorSystem.actorOf(Props(new spark.storage.BlockManagerMasterActor(true)))) // Set the arch to 64-bit and compressedOops to true to get a deterministic test-case oldArch = System.setProperty("os.arch", "amd64") oldOops = System.setProperty("spark.test.useCompressedOops", "true") oldHeartBeat = System.setProperty("spark.storage.disableBlockManagerHeartBeat", "true") val initialize = PrivateMethod[Unit]('initialize) SizeEstimator invokePrivate initialize() // Set some value ... System.setProperty("spark.hostPort", spark.Utils.localHostName() + ":" + 1111) } after { System.clearProperty("spark.driver.port") System.clearProperty("spark.hostPort") if (store != null) { store.stop() store = null } if (store2 != null) { store2.stop() store2 = null } actorSystem.shutdown() actorSystem.awaitTermination() actorSystem = null master = null if (oldArch != null) { System.setProperty("os.arch", oldArch) } else { System.clearProperty("os.arch") } if (oldOops != null) { System.setProperty("spark.test.useCompressedOops", oldOops) } else { System.clearProperty("spark.test.useCompressedOops") } } test("StorageLevel object caching") { val level1 = StorageLevel(false, false, false, 3) val level2 = StorageLevel(false, false, false, 3) // this should return the same object as level1 val level3 = StorageLevel(false, false, false, 2) // this should return a different object assert(level2 === level1, "level2 is not same as level1") assert(level2.eq(level1), "level2 is not the same object as level1") assert(level3 != level1, "level3 is same as level1") val bytes1 = spark.Utils.serialize(level1) val level1_ = spark.Utils.deserialize[StorageLevel](bytes1) val bytes2 = spark.Utils.serialize(level2) val level2_ = spark.Utils.deserialize[StorageLevel](bytes2) assert(level1_ === level1, "Deserialized level1 not same as original level1") assert(level1_.eq(level1), "Deserialized level1 not the same object as original level2") assert(level2_ === level2, "Deserialized level2 not same as original level2") assert(level2_.eq(level1), "Deserialized level2 not the same object as original level1") } test("BlockManagerId object caching") { val id1 = BlockManagerId("e1", "XXX", 1) val id2 = BlockManagerId("e1", "XXX", 1) // this should return the same object as id1 val id3 = BlockManagerId("e1", "XXX", 2) // this should return a different object assert(id2 === id1, "id2 is not same as id1") assert(id2.eq(id1), "id2 is not the same object as id1") assert(id3 != id1, "id3 is same as id1") val bytes1 = spark.Utils.serialize(id1) val id1_ = spark.Utils.deserialize[BlockManagerId](bytes1) val bytes2 = spark.Utils.serialize(id2) val id2_ = spark.Utils.deserialize[BlockManagerId](bytes2) assert(id1_ === id1, "Deserialized id1 is not same as original id1") assert(id1_.eq(id1), "Deserialized id1 is not the same object as original id1") assert(id2_ === id2, "Deserialized id2 is not same as original id2") assert(id2_.eq(id1), "Deserialized id2 is not the same object as original id1") } test("master + 1 manager interaction") { store = new BlockManager("<driver>", actorSystem, master, serializer, 2000) val a1 = new Array[Byte](400) val a2 = new Array[Byte](400) val a3 = new Array[Byte](400) // Putting a1, a2 and a3 in memory and telling master only about a1 and a2 store.putSingle("a1", a1, StorageLevel.MEMORY_ONLY) store.putSingle("a2", a2, StorageLevel.MEMORY_ONLY) store.putSingle("a3", a3, StorageLevel.MEMORY_ONLY, false) // Checking whether blocks are in memory assert(store.getSingle("a1") != None, "a1 was not in store") assert(store.getSingle("a2") != None, "a2 was not in store") assert(store.getSingle("a3") != None, "a3 was not in store") // Checking whether master knows about the blocks or not assert(master.getLocations("a1").size > 0, "master was not told about a1") assert(master.getLocations("a2").size > 0, "master was not told about a2") assert(master.getLocations("a3").size === 0, "master was told about a3") // Drop a1 and a2 from memory; this should be reported back to the master store.dropFromMemory("a1", null) store.dropFromMemory("a2", null) assert(store.getSingle("a1") === None, "a1 not removed from store") assert(store.getSingle("a2") === None, "a2 not removed from store") assert(master.getLocations("a1").size === 0, "master did not remove a1") assert(master.getLocations("a2").size === 0, "master did not remove a2") } test("master + 2 managers interaction") { store = new BlockManager("exec1", actorSystem, master, serializer, 2000) store2 = new BlockManager("exec2", actorSystem, master, new KryoSerializer, 2000) val peers = master.getPeers(store.blockManagerId, 1) assert(peers.size === 1, "master did not return the other manager as a peer") assert(peers.head === store2.blockManagerId, "peer returned by master is not the other manager") val a1 = new Array[Byte](400) val a2 = new Array[Byte](400) store.putSingle("a1", a1, StorageLevel.MEMORY_ONLY_2) store2.putSingle("a2", a2, StorageLevel.MEMORY_ONLY_2) assert(master.getLocations("a1").size === 2, "master did not report 2 locations for a1") assert(master.getLocations("a2").size === 2, "master did not report 2 locations for a2") } test("removing block") { store = new BlockManager("<driver>", actorSystem, master, serializer, 2000) val a1 = new Array[Byte](400) val a2 = new Array[Byte](400) val a3 = new Array[Byte](400) // Putting a1, a2 and a3 in memory and telling master only about a1 and a2 store.putSingle("a1-to-remove", a1, StorageLevel.MEMORY_ONLY) store.putSingle("a2-to-remove", a2, StorageLevel.MEMORY_ONLY) store.putSingle("a3-to-remove", a3, StorageLevel.MEMORY_ONLY, false) // Checking whether blocks are in memory and memory size val memStatus = master.getMemoryStatus.head._2 assert(memStatus._1 == 2000L, "total memory " + memStatus._1 + " should equal 2000") assert(memStatus._2 <= 1200L, "remaining memory " + memStatus._2 + " should <= 1200") assert(store.getSingle("a1-to-remove") != None, "a1 was not in store") assert(store.getSingle("a2-to-remove") != None, "a2 was not in store") assert(store.getSingle("a3-to-remove") != None, "a3 was not in store") // Checking whether master knows about the blocks or not assert(master.getLocations("a1-to-remove").size > 0, "master was not told about a1") assert(master.getLocations("a2-to-remove").size > 0, "master was not told about a2") assert(master.getLocations("a3-to-remove").size === 0, "master was told about a3") // Remove a1 and a2 and a3. Should be no-op for a3. master.removeBlock("a1-to-remove") master.removeBlock("a2-to-remove") master.removeBlock("a3-to-remove") eventually(timeout(1000 milliseconds), interval(10 milliseconds)) { store.getSingle("a1-to-remove") should be (None) master.getLocations("a1-to-remove") should have size 0 } eventually(timeout(1000 milliseconds), interval(10 milliseconds)) { store.getSingle("a2-to-remove") should be (None) master.getLocations("a2-to-remove") should have size 0 } eventually(timeout(1000 milliseconds), interval(10 milliseconds)) { store.getSingle("a3-to-remove") should not be (None) master.getLocations("a3-to-remove") should have size 0 } eventually(timeout(1000 milliseconds), interval(10 milliseconds)) { val memStatus = master.getMemoryStatus.head._2 memStatus._1 should equal (2000L) memStatus._2 should equal (2000L) } } test("removing rdd") { store = new BlockManager("<driver>", actorSystem, master, serializer, 2000) val a1 = new Array[Byte](400) val a2 = new Array[Byte](400) val a3 = new Array[Byte](400) // Putting a1, a2 and a3 in memory. store.putSingle("rdd_0_0", a1, StorageLevel.MEMORY_ONLY) store.putSingle("rdd_0_1", a2, StorageLevel.MEMORY_ONLY) store.putSingle("nonrddblock", a3, StorageLevel.MEMORY_ONLY) master.removeRdd(0) eventually(timeout(1000 milliseconds), interval(10 milliseconds)) { store.getSingle("rdd_0_0") should be (None) master.getLocations("rdd_0_0") should have size 0 } eventually(timeout(1000 milliseconds), interval(10 milliseconds)) { store.getSingle("rdd_0_1") should be (None) master.getLocations("rdd_0_1") should have size 0 } eventually(timeout(1000 milliseconds), interval(10 milliseconds)) { store.getSingle("nonrddblock") should not be (None) master.getLocations("nonrddblock") should have size (1) } } test("reregistration on heart beat") { val heartBeat = PrivateMethod[Unit]('heartBeat) store = new BlockManager("<driver>", actorSystem, master, serializer, 2000) val a1 = new Array[Byte](400) store.putSingle("a1", a1, StorageLevel.MEMORY_ONLY) assert(store.getSingle("a1") != None, "a1 was not in store") assert(master.getLocations("a1").size > 0, "master was not told about a1") master.removeExecutor(store.blockManagerId.executorId) assert(master.getLocations("a1").size == 0, "a1 was not removed from master") store invokePrivate heartBeat() assert(master.getLocations("a1").size > 0, "a1 was not reregistered with master") } test("reregistration on block update") { store = new BlockManager("<driver>", actorSystem, master, serializer, 2000) val a1 = new Array[Byte](400) val a2 = new Array[Byte](400) store.putSingle("a1", a1, StorageLevel.MEMORY_ONLY) assert(master.getLocations("a1").size > 0, "master was not told about a1") master.removeExecutor(store.blockManagerId.executorId) assert(master.getLocations("a1").size == 0, "a1 was not removed from master") store.putSingle("a2", a1, StorageLevel.MEMORY_ONLY) store.waitForAsyncReregister() assert(master.getLocations("a1").size > 0, "a1 was not reregistered with master") assert(master.getLocations("a2").size > 0, "master was not told about a2") } test("reregistration doesn't dead lock") { val heartBeat = PrivateMethod[Unit]('heartBeat) store = new BlockManager("<driver>", actorSystem, master, serializer, 2000) val a1 = new Array[Byte](400) val a2 = List(new Array[Byte](400)) // try many times to trigger any deadlocks for (i <- 1 to 100) { master.removeExecutor(store.blockManagerId.executorId) val t1 = new Thread { override def run() { store.put("a2", a2.iterator, StorageLevel.MEMORY_ONLY, true) } } val t2 = new Thread { override def run() { store.putSingle("a1", a1, StorageLevel.MEMORY_ONLY) } } val t3 = new Thread { override def run() { store invokePrivate heartBeat() } } t1.start() t2.start() t3.start() t1.join() t2.join() t3.join() store.dropFromMemory("a1", null) store.dropFromMemory("a2", null) store.waitForAsyncReregister() } } test("in-memory LRU storage") { store = new BlockManager("<driver>", actorSystem, master, serializer, 1200) val a1 = new Array[Byte](400) val a2 = new Array[Byte](400) val a3 = new Array[Byte](400) store.putSingle("a1", a1, StorageLevel.MEMORY_ONLY) store.putSingle("a2", a2, StorageLevel.MEMORY_ONLY) store.putSingle("a3", a3, StorageLevel.MEMORY_ONLY) assert(store.getSingle("a2") != None, "a2 was not in store") assert(store.getSingle("a3") != None, "a3 was not in store") assert(store.getSingle("a1") === None, "a1 was in store") assert(store.getSingle("a2") != None, "a2 was not in store") // At this point a2 was gotten last, so LRU will getSingle rid of a3 store.putSingle("a1", a1, StorageLevel.MEMORY_ONLY) assert(store.getSingle("a1") != None, "a1 was not in store") assert(store.getSingle("a2") != None, "a2 was not in store") assert(store.getSingle("a3") === None, "a3 was in store") } test("in-memory LRU storage with serialization") { store = new BlockManager("<driver>", actorSystem, master, serializer, 1200) val a1 = new Array[Byte](400) val a2 = new Array[Byte](400) val a3 = new Array[Byte](400) store.putSingle("a1", a1, StorageLevel.MEMORY_ONLY_SER) store.putSingle("a2", a2, StorageLevel.MEMORY_ONLY_SER) store.putSingle("a3", a3, StorageLevel.MEMORY_ONLY_SER) assert(store.getSingle("a2") != None, "a2 was not in store") assert(store.getSingle("a3") != None, "a3 was not in store") assert(store.getSingle("a1") === None, "a1 was in store") assert(store.getSingle("a2") != None, "a2 was not in store") // At this point a2 was gotten last, so LRU will getSingle rid of a3 store.putSingle("a1", a1, StorageLevel.MEMORY_ONLY_SER) assert(store.getSingle("a1") != None, "a1 was not in store") assert(store.getSingle("a2") != None, "a2 was not in store") assert(store.getSingle("a3") === None, "a3 was in store") } test("in-memory LRU for partitions of same RDD") { store = new BlockManager("<driver>", actorSystem, master, serializer, 1200) val a1 = new Array[Byte](400) val a2 = new Array[Byte](400) val a3 = new Array[Byte](400) store.putSingle("rdd_0_1", a1, StorageLevel.MEMORY_ONLY) store.putSingle("rdd_0_2", a2, StorageLevel.MEMORY_ONLY) store.putSingle("rdd_0_3", a3, StorageLevel.MEMORY_ONLY) // Even though we accessed rdd_0_3 last, it should not have replaced partitions 1 and 2 // from the same RDD assert(store.getSingle("rdd_0_3") === None, "rdd_0_3 was in store") assert(store.getSingle("rdd_0_2") != None, "rdd_0_2 was not in store") assert(store.getSingle("rdd_0_1") != None, "rdd_0_1 was not in store") // Check that rdd_0_3 doesn't replace them even after further accesses assert(store.getSingle("rdd_0_3") === None, "rdd_0_3 was in store") assert(store.getSingle("rdd_0_3") === None, "rdd_0_3 was in store") assert(store.getSingle("rdd_0_3") === None, "rdd_0_3 was in store") } test("in-memory LRU for partitions of multiple RDDs") { store = new BlockManager("<driver>", actorSystem, master, serializer, 1200) store.putSingle("rdd_0_1", new Array[Byte](400), StorageLevel.MEMORY_ONLY) store.putSingle("rdd_0_2", new Array[Byte](400), StorageLevel.MEMORY_ONLY) store.putSingle("rdd_1_1", new Array[Byte](400), StorageLevel.MEMORY_ONLY) // At this point rdd_1_1 should've replaced rdd_0_1 assert(store.memoryStore.contains("rdd_1_1"), "rdd_1_1 was not in store") assert(!store.memoryStore.contains("rdd_0_1"), "rdd_0_1 was in store") assert(store.memoryStore.contains("rdd_0_2"), "rdd_0_2 was not in store") // Do a get() on rdd_0_2 so that it is the most recently used item assert(store.getSingle("rdd_0_2") != None, "rdd_0_2 was not in store") // Put in more partitions from RDD 0; they should replace rdd_1_1 store.putSingle("rdd_0_3", new Array[Byte](400), StorageLevel.MEMORY_ONLY) store.putSingle("rdd_0_4", new Array[Byte](400), StorageLevel.MEMORY_ONLY) // Now rdd_1_1 should be dropped to add rdd_0_3, but then rdd_0_2 should *not* be dropped // when we try to add rdd_0_4. assert(!store.memoryStore.contains("rdd_1_1"), "rdd_1_1 was in store") assert(!store.memoryStore.contains("rdd_0_1"), "rdd_0_1 was in store") assert(!store.memoryStore.contains("rdd_0_4"), "rdd_0_4 was in store") assert(store.memoryStore.contains("rdd_0_2"), "rdd_0_2 was not in store") assert(store.memoryStore.contains("rdd_0_3"), "rdd_0_3 was not in store") } test("on-disk storage") { store = new BlockManager("<driver>", actorSystem, master, serializer, 1200) val a1 = new Array[Byte](400) val a2 = new Array[Byte](400) val a3 = new Array[Byte](400) store.putSingle("a1", a1, StorageLevel.DISK_ONLY) store.putSingle("a2", a2, StorageLevel.DISK_ONLY) store.putSingle("a3", a3, StorageLevel.DISK_ONLY) assert(store.getSingle("a2") != None, "a2 was in store") assert(store.getSingle("a3") != None, "a3 was in store") assert(store.getSingle("a1") != None, "a1 was in store") } test("disk and memory storage") { store = new BlockManager("<driver>", actorSystem, master, serializer, 1200) val a1 = new Array[Byte](400) val a2 = new Array[Byte](400) val a3 = new Array[Byte](400) store.putSingle("a1", a1, StorageLevel.MEMORY_AND_DISK) store.putSingle("a2", a2, StorageLevel.MEMORY_AND_DISK) store.putSingle("a3", a3, StorageLevel.MEMORY_AND_DISK) assert(store.getSingle("a2") != None, "a2 was not in store") assert(store.getSingle("a3") != None, "a3 was not in store") assert(store.memoryStore.getValues("a1") == None, "a1 was in memory store") assert(store.getSingle("a1") != None, "a1 was not in store") assert(store.memoryStore.getValues("a1") != None, "a1 was not in memory store") } test("disk and memory storage with getLocalBytes") { store = new BlockManager("<driver>", actorSystem, master, serializer, 1200) val a1 = new Array[Byte](400) val a2 = new Array[Byte](400) val a3 = new Array[Byte](400) store.putSingle("a1", a1, StorageLevel.MEMORY_AND_DISK) store.putSingle("a2", a2, StorageLevel.MEMORY_AND_DISK) store.putSingle("a3", a3, StorageLevel.MEMORY_AND_DISK) assert(store.getLocalBytes("a2") != None, "a2 was not in store") assert(store.getLocalBytes("a3") != None, "a3 was not in store") assert(store.memoryStore.getValues("a1") == None, "a1 was in memory store") assert(store.getLocalBytes("a1") != None, "a1 was not in store") assert(store.memoryStore.getValues("a1") != None, "a1 was not in memory store") } test("disk and memory storage with serialization") { store = new BlockManager("<driver>", actorSystem, master, serializer, 1200) val a1 = new Array[Byte](400) val a2 = new Array[Byte](400) val a3 = new Array[Byte](400) store.putSingle("a1", a1, StorageLevel.MEMORY_AND_DISK_SER) store.putSingle("a2", a2, StorageLevel.MEMORY_AND_DISK_SER) store.putSingle("a3", a3, StorageLevel.MEMORY_AND_DISK_SER) assert(store.getSingle("a2") != None, "a2 was not in store") assert(store.getSingle("a3") != None, "a3 was not in store") assert(store.memoryStore.getValues("a1") == None, "a1 was in memory store") assert(store.getSingle("a1") != None, "a1 was not in store") assert(store.memoryStore.getValues("a1") != None, "a1 was not in memory store") } test("disk and memory storage with serialization and getLocalBytes") { store = new BlockManager("<driver>", actorSystem, master, serializer, 1200) val a1 = new Array[Byte](400) val a2 = new Array[Byte](400) val a3 = new Array[Byte](400) store.putSingle("a1", a1, StorageLevel.MEMORY_AND_DISK_SER) store.putSingle("a2", a2, StorageLevel.MEMORY_AND_DISK_SER) store.putSingle("a3", a3, StorageLevel.MEMORY_AND_DISK_SER) assert(store.getLocalBytes("a2") != None, "a2 was not in store") assert(store.getLocalBytes("a3") != None, "a3 was not in store") assert(store.memoryStore.getValues("a1") == None, "a1 was in memory store") assert(store.getLocalBytes("a1") != None, "a1 was not in store") assert(store.memoryStore.getValues("a1") != None, "a1 was not in memory store") } test("LRU with mixed storage levels") { store = new BlockManager("<driver>", actorSystem, master, serializer, 1200) val a1 = new Array[Byte](400) val a2 = new Array[Byte](400) val a3 = new Array[Byte](400) val a4 = new Array[Byte](400) // First store a1 and a2, both in memory, and a3, on disk only store.putSingle("a1", a1, StorageLevel.MEMORY_ONLY_SER) store.putSingle("a2", a2, StorageLevel.MEMORY_ONLY_SER) store.putSingle("a3", a3, StorageLevel.DISK_ONLY) // At this point LRU should not kick in because a3 is only on disk assert(store.getSingle("a1") != None, "a2 was not in store") assert(store.getSingle("a2") != None, "a3 was not in store") assert(store.getSingle("a3") != None, "a1 was not in store") assert(store.getSingle("a1") != None, "a2 was not in store") assert(store.getSingle("a2") != None, "a3 was not in store") assert(store.getSingle("a3") != None, "a1 was not in store") // Now let's add in a4, which uses both disk and memory; a1 should drop out store.putSingle("a4", a4, StorageLevel.MEMORY_AND_DISK_SER) assert(store.getSingle("a1") == None, "a1 was in store") assert(store.getSingle("a2") != None, "a2 was not in store") assert(store.getSingle("a3") != None, "a3 was not in store") assert(store.getSingle("a4") != None, "a4 was not in store") } test("in-memory LRU with streams") { store = new BlockManager("<driver>", actorSystem, master, serializer, 1200) val list1 = List(new Array[Byte](200), new Array[Byte](200)) val list2 = List(new Array[Byte](200), new Array[Byte](200)) val list3 = List(new Array[Byte](200), new Array[Byte](200)) store.put("list1", list1.iterator, StorageLevel.MEMORY_ONLY, true) store.put("list2", list2.iterator, StorageLevel.MEMORY_ONLY, true) store.put("list3", list3.iterator, StorageLevel.MEMORY_ONLY, true) assert(store.get("list2") != None, "list2 was not in store") assert(store.get("list2").get.size == 2) assert(store.get("list3") != None, "list3 was not in store") assert(store.get("list3").get.size == 2) assert(store.get("list1") === None, "list1 was in store") assert(store.get("list2") != None, "list2 was not in store") assert(store.get("list2").get.size == 2) // At this point list2 was gotten last, so LRU will getSingle rid of list3 store.put("list1", list1.iterator, StorageLevel.MEMORY_ONLY, true) assert(store.get("list1") != None, "list1 was not in store") assert(store.get("list1").get.size == 2) assert(store.get("list2") != None, "list2 was not in store") assert(store.get("list2").get.size == 2) assert(store.get("list3") === None, "list1 was in store") } test("LRU with mixed storage levels and streams") { store = new BlockManager("<driver>", actorSystem, master, serializer, 1200) val list1 = List(new Array[Byte](200), new Array[Byte](200)) val list2 = List(new Array[Byte](200), new Array[Byte](200)) val list3 = List(new Array[Byte](200), new Array[Byte](200)) val list4 = List(new Array[Byte](200), new Array[Byte](200)) // First store list1 and list2, both in memory, and list3, on disk only store.put("list1", list1.iterator, StorageLevel.MEMORY_ONLY_SER, true) store.put("list2", list2.iterator, StorageLevel.MEMORY_ONLY_SER, true) store.put("list3", list3.iterator, StorageLevel.DISK_ONLY, true) // At this point LRU should not kick in because list3 is only on disk assert(store.get("list1") != None, "list2 was not in store") assert(store.get("list1").get.size === 2) assert(store.get("list2") != None, "list3 was not in store") assert(store.get("list2").get.size === 2) assert(store.get("list3") != None, "list1 was not in store") assert(store.get("list3").get.size === 2) assert(store.get("list1") != None, "list2 was not in store") assert(store.get("list1").get.size === 2) assert(store.get("list2") != None, "list3 was not in store") assert(store.get("list2").get.size === 2) assert(store.get("list3") != None, "list1 was not in store") assert(store.get("list3").get.size === 2) // Now let's add in list4, which uses both disk and memory; list1 should drop out store.put("list4", list4.iterator, StorageLevel.MEMORY_AND_DISK_SER, true) assert(store.get("list1") === None, "list1 was in store") assert(store.get("list2") != None, "list3 was not in store") assert(store.get("list2").get.size === 2) assert(store.get("list3") != None, "list1 was not in store") assert(store.get("list3").get.size === 2) assert(store.get("list4") != None, "list4 was not in store") assert(store.get("list4").get.size === 2) } test("negative byte values in ByteBufferInputStream") { val buffer = ByteBuffer.wrap(Array[Int](254, 255, 0, 1, 2).map(_.toByte).toArray) val stream = new ByteBufferInputStream(buffer) val temp = new Array[Byte](10) assert(stream.read() === 254, "unexpected byte read") assert(stream.read() === 255, "unexpected byte read") assert(stream.read() === 0, "unexpected byte read") assert(stream.read(temp, 0, temp.length) === 2, "unexpected number of bytes read") assert(stream.read() === -1, "end of stream not signalled") assert(stream.read(temp, 0, temp.length) === -1, "end of stream not signalled") } test("overly large block") { store = new BlockManager("<driver>", actorSystem, master, serializer, 500) store.putSingle("a1", new Array[Byte](1000), StorageLevel.MEMORY_ONLY) assert(store.getSingle("a1") === None, "a1 was in store") store.putSingle("a2", new Array[Byte](1000), StorageLevel.MEMORY_AND_DISK) assert(store.memoryStore.getValues("a2") === None, "a2 was in memory store") assert(store.getSingle("a2") != None, "a2 was not in store") } test("block compression") { try { System.setProperty("spark.shuffle.compress", "true") store = new BlockManager("exec1", actorSystem, master, serializer, 2000) store.putSingle("shuffle_0_0_0", new Array[Byte](1000), StorageLevel.MEMORY_ONLY_SER) assert(store.memoryStore.getSize("shuffle_0_0_0") <= 100, "shuffle_0_0_0 was not compressed") store.stop() store = null System.setProperty("spark.shuffle.compress", "false") store = new BlockManager("exec2", actorSystem, master, serializer, 2000) store.putSingle("shuffle_0_0_0", new Array[Byte](1000), StorageLevel.MEMORY_ONLY_SER) assert(store.memoryStore.getSize("shuffle_0_0_0") >= 1000, "shuffle_0_0_0 was compressed") store.stop() store = null System.setProperty("spark.broadcast.compress", "true") store = new BlockManager("exec3", actorSystem, master, serializer, 2000) store.putSingle("broadcast_0", new Array[Byte](1000), StorageLevel.MEMORY_ONLY_SER) assert(store.memoryStore.getSize("broadcast_0") <= 100, "broadcast_0 was not compressed") store.stop() store = null System.setProperty("spark.broadcast.compress", "false") store = new BlockManager("exec4", actorSystem, master, serializer, 2000) store.putSingle("broadcast_0", new Array[Byte](1000), StorageLevel.MEMORY_ONLY_SER) assert(store.memoryStore.getSize("broadcast_0") >= 1000, "broadcast_0 was compressed") store.stop() store = null System.setProperty("spark.rdd.compress", "true") store = new BlockManager("exec5", actorSystem, master, serializer, 2000) store.putSingle("rdd_0_0", new Array[Byte](1000), StorageLevel.MEMORY_ONLY_SER) assert(store.memoryStore.getSize("rdd_0_0") <= 100, "rdd_0_0 was not compressed") store.stop() store = null System.setProperty("spark.rdd.compress", "false") store = new BlockManager("exec6", actorSystem, master, serializer, 2000) store.putSingle("rdd_0_0", new Array[Byte](1000), StorageLevel.MEMORY_ONLY_SER) assert(store.memoryStore.getSize("rdd_0_0") >= 1000, "rdd_0_0 was compressed") store.stop() store = null // Check that any other block types are also kept uncompressed store = new BlockManager("exec7", actorSystem, master, serializer, 2000) store.putSingle("other_block", new Array[Byte](1000), StorageLevel.MEMORY_ONLY) assert(store.memoryStore.getSize("other_block") >= 1000, "other_block was compressed") store.stop() store = null } finally { System.clearProperty("spark.shuffle.compress") System.clearProperty("spark.broadcast.compress") System.clearProperty("spark.rdd.compress") } } test("block store put failure") { // Use Java serializer so we can create an unserializable error. store = new BlockManager("<driver>", actorSystem, master, new JavaSerializer, 1200) // The put should fail since a1 is not serializable. class UnserializableClass val a1 = new UnserializableClass intercept[java.io.NotSerializableException] { store.putSingle("a1", a1, StorageLevel.DISK_ONLY) } // Make sure get a1 doesn't hang and returns None. failAfter(1 second) { assert(store.getSingle("a1") == None, "a1 should not be in store") } } }
// import { execSync } from 'child_process'; import chalk from 'chalk'; import * as utils from './utils'; const log = (...info: any[]) => utils.log(chalk.blueBright(...info)); export const build = (_: string) => { log('Building DigitalOcean snapshot...'); };
<? $arraysubmenu[0][Judul]="Tambah IK"; $arraysubmenu[1][Judul]="Update/Cari IK"; $arraysubmenu[0][href]="index.php?pilihan=ltambah"; $arraysubmenu[1][href]="index.php?pilihan=llihat"; $arraysubmenu[0][t]="C"; $arraysubmenu[1][t]="C"; createsubmenu("Instruksi Kerja",$arraysubmenu); ?>
use super::super::tree; use super::super::common::index_readed; use std::fs::File; pub struct CommitObject { commit_hash:String, pub index: Vec<index_readed::IndexReaded>, pub tree_dir: Vec<String>, } impl CommitObject { pub fn new() -> Self { Self { commit_hash: "".to_string(), index: Vec::new(), tree_dir: Vec::new(), } } pub fn commit_file(&mut self) -> Result<(), String> { match index_readed::read_index() { Ok(index) => { self.index = index; } Err(s) => { return Err(s); } } self.extraction_dir(); let mut tree_root = self.generate_tree(); let mut tree_main = tree::tree_git_object::CommitGet::new(); match tree_main.tree_main() { Ok(_) => {} Err(e) => { return Err(e); } } self.comparsion_tree(&mut tree_root, &mut tree_main.tree); match self.create_tree_file(&mut tree_main.tree) { Ok(hash) => match self.create_commit_file(&hash) { Ok(()) => { self.commit_hash = hash; self.clear_index(); return Ok(()); } Err(e) => { return Err(e); } }, Err(e) => { return Err(e); } } } fn clear_index(&self) { let index_path = "./.smallgit/index"; File::create(index_path).unwrap(); } pub fn get_hash(self) -> String{ self.commit_hash } }
module.exports = map // map := (Continuable<A>, (A) => B) => Continuable<B> function map(source, lambda) { return function continuable(callback) { source(function continuation(err, value) { if (err) { return callback(err) } callback(null, lambda(value)) }) } }
<?hh <<__EntryPoint>> function main_1778() { $im = imagecreatetruecolor(120, 20); $text_color = imagecolorallocate($im, 233, 14, 91); imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color); ob_start(); imagepng($im); $md5 = md5(ob_get_clean()); imagedestroy($im); echo "md5: $md5\n"; }
# A Complete example ``` import 'package:button3d/button3d.dart'; import 'package:flutter/material.dart'; var button1 = Button3d( style: Button3dStyle.BLUE, onPressed: () {}, child: Text("Add"), ); var button2 = Button3d( style: Button3dStyle( topColor: Colors.lightGreen, backColor: Colors.deepOrange, borderRadius: BorderRadius.zero ), onPressed: () {}, child: Text("Add"), ); ```
package com.testerum.common_rdbms.util import java.sql.ResultSet fun ResultSet.readListOfString(): List<String> { val result = mutableListOf<String>() while (next()) { result.add(getString(1)) } close() return result }
# eslint-config-blued-typescript 主要文档目录:[eslint-config-blued](https://www.npmjs.com/package/eslint-config-blued) 基于React进行的规则增强,只需将上述文档中`blued`修改为`blued-typescript`即可。 > 包含安装步骤以及`extends`的设置 ```bash npx install-peerdeps --dev eslint-config-blued-typescript ``` ```yml extends: blued-typescript ``` ## 注意事项 如果同时使用`react`和`typeScript`,必须要保证在`extends`中`typescript`在`react`的下边: _因为parser是会覆盖的,而不是共存,ts-parser相对于typescript比babel的支持度更高一些_ ```yaml exnteds: - blued-react - blued-typescript/react # 指定React版本,会完全继承Typescript的所有规则,并覆盖一些React规则 ```
/* * 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.aliyuncs.linkedmall.model.v20180116; import com.aliyuncs.RpcAcsRequest; import com.aliyuncs.http.MethodType; import com.aliyuncs.linkedmall.Endpoint; /** * @author auto create * @version */ public class GetWithholdSignPageUrlRequest extends RpcAcsRequest<GetWithholdSignPageUrlResponse> { private String extInfo; private String merchantServiceName; private String deviceType; private String outRequestNo; private String externalAgreementNo; private String merchantId; private String identityParameters; private String notifyUrl; private String returnUrl; private String merchantServiceDescription; public GetWithholdSignPageUrlRequest() { super("linkedmall", "2018-01-16", "GetWithholdSignPageUrl", "linkedmall"); setMethod(MethodType.POST); try { com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); } catch (Exception e) {} } public String getExtInfo() { return this.extInfo; } public void setExtInfo(String extInfo) { this.extInfo = extInfo; if(extInfo != null){ putBodyParameter("ExtInfo", extInfo); } } public String getMerchantServiceName() { return this.merchantServiceName; } public void setMerchantServiceName(String merchantServiceName) { this.merchantServiceName = merchantServiceName; if(merchantServiceName != null){ putBodyParameter("MerchantServiceName", merchantServiceName); } } public String getDeviceType() { return this.deviceType; } public void setDeviceType(String deviceType) { this.deviceType = deviceType; if(deviceType != null){ putBodyParameter("DeviceType", deviceType); } } public String getOutRequestNo() { return this.outRequestNo; } public void setOutRequestNo(String outRequestNo) { this.outRequestNo = outRequestNo; if(outRequestNo != null){ putBodyParameter("OutRequestNo", outRequestNo); } } public String getExternalAgreementNo() { return this.externalAgreementNo; } public void setExternalAgreementNo(String externalAgreementNo) { this.externalAgreementNo = externalAgreementNo; if(externalAgreementNo != null){ putBodyParameter("ExternalAgreementNo", externalAgreementNo); } } public String getMerchantId() { return this.merchantId; } public void setMerchantId(String merchantId) { this.merchantId = merchantId; if(merchantId != null){ putBodyParameter("MerchantId", merchantId); } } public String getIdentityParameters() { return this.identityParameters; } public void setIdentityParameters(String identityParameters) { this.identityParameters = identityParameters; if(identityParameters != null){ putBodyParameter("IdentityParameters", identityParameters); } } public String getNotifyUrl() { return this.notifyUrl; } public void setNotifyUrl(String notifyUrl) { this.notifyUrl = notifyUrl; if(notifyUrl != null){ putBodyParameter("NotifyUrl", notifyUrl); } } public String getReturnUrl() { return this.returnUrl; } public void setReturnUrl(String returnUrl) { this.returnUrl = returnUrl; if(returnUrl != null){ putBodyParameter("ReturnUrl", returnUrl); } } public String getMerchantServiceDescription() { return this.merchantServiceDescription; } public void setMerchantServiceDescription(String merchantServiceDescription) { this.merchantServiceDescription = merchantServiceDescription; if(merchantServiceDescription != null){ putBodyParameter("MerchantServiceDescription", merchantServiceDescription); } } @Override public Class<GetWithholdSignPageUrlResponse> getResponseClass() { return GetWithholdSignPageUrlResponse.class; } }
using System.Threading.Tasks; using Akka.Cluster; using Master.Seed.Node.Commands; using Microsoft.Extensions.Hosting; using Petabridge.Cmd.Cluster; using Petabridge.Cmd.Host; using ServiceHost.Client.Shared; using Tauron.Application.AkkaNode.Bootstrap; using Tauron.Application.AkkaNode.Bootstrap.Console; using Tauron.Application.Master.Commands.KillSwitch; using Tauron.Application.Master.Commands.ServiceRegistry; namespace Master.Seed.Node { internal class Program { private static async Task Main(string[] args) { //Beacon? beacon = null; await Bootstrap.StartNode( args, KillRecpientType.Seed, IpcApplicationType.Client, ab => ab.ConfigureAkkaSystem( (context, system) => { var cluster = Cluster.Get(system); cluster.RegisterOnMemberUp( () => { ServiceRegistry.Start( system, new RegisterService( context.HostingEnvironment.ApplicationName, cluster.SelfUniqueAddress, ServiceTypes.SeedNode)); }); var cmd = PetabridgeCmd.Get(system); cmd.RegisterCommandPalette(ClusterCommands.Instance); cmd.RegisterCommandPalette(MasterCommand.New); cmd.Start(); })) .Build().RunAsync(); } } }
<?php /** * Install Skin class. * * @since 1.9.10 * * @package OMAPI * @author Justin Sternberg */ // Exit if accessed directly. if ( ! defined( 'ABSPATH' ) ) { exit; } /** * WordPress class extended for on-the-fly addon installations. */ class OMAPI_InstallSkin extends WP_Upgrader_Skin { /** * Empty out the header of its HTML content and only check to see if it has * been performed or not. * * @since 1.9.10 */ public function header() {} /** * Empty out the footer of its HTML contents. * * @since 1.9.10 */ public function footer() {} /** * Instead of outputting HTML for errors, json_encode the errors and send them * back to the Ajax script for processing. * * @since 1.9.10 * * @param array $errors Array of errors with the install process. */ public function error( $errors ) { if ( ! empty( $errors ) ) { wp_send_json_error( $errors ); } } /** * Empty out the feedback method to prevent outputting HTML strings as the install * is progressing. * * @since 1.9.10 * * @param string $string The feedback string. */ public function feedback( $string, ...$args ) {} /** * Empty out JavaScript output that calls function to decrement the update counts. * * @since 1.9.10 * * @param string $type Type of update count to decrement. */ public function decrement_update_count( $type ) {} }
# frozen_string_literal: true module Thredded class MessageboardsController < Thredded::ApplicationController before_action :thredded_require_login!, only: [:new, :create, :edit, :update] after_action :verify_authorized, except: %i(index) after_action :verify_policy_scoped, except: %i(new create edit update) def index @groups = policy_scope(Messageboard.all) .preload(:group, last_topic: [:last_user]).group_by(&:group) .map { |(group, messageboards)| MessageboardGroupView.new(group, messageboards) } end def new @messageboard = Messageboard.new @messageboard_group = MessageboardGroup.all authorize_creating @messageboard end def create @messageboard = Messageboard.new(messageboard_params) authorize_creating @messageboard if @messageboard.save Topic.transaction do @topic = Topic.create!(topic_params) @post = Post.create!(post_params) end redirect_to root_path else render :new end end def edit @messageboard = Messageboard.friendly.find(params[:id]) authorize @messageboard, :update? end def update @messageboard = Messageboard.friendly.find(params[:id]) authorize @messageboard, :update? if @messageboard.update(messageboard_params) redirect_to messageboard_topics_path(@messageboard), notice: I18n.t('thredded.messageboard.updated_notice') else render :edit end end private def messageboard_params params .require(:messageboard) .permit(:name, :description, :messageboard_group_id) end def topic_params { messageboard: @messageboard, user: thredded_current_user, last_user: thredded_current_user, title: "Welcome to your messageboard's very first thread", } end def post_params { messageboard: @messageboard, postable: @topic, content: "There's not a whole lot here for now.", ip: request.ip, user: thredded_current_user, } end end end
package main import ( "database/sql" "strings" ) type inserter struct { tx *sql.Tx query *sql.Stmt params []interface{} } func (c *db) prepare(columns []string) (ins *inserter, err error) { query := `insert into drive_stats (` query += strings.Join(columns, ", ") query += `) values (` query += strings.Join(c.positions[1:len(columns)+1], ", ") query += `)` params := make([]interface{}, len(columns)) tx, err := c.db.Begin() if err != nil { return ins, debugErr(err) } prepared, err := tx.Prepare(query) if err == nil { ins = &inserter{tx: tx, query: prepared, params: params} } return ins, debugErr(err) } func (ins *inserter) putRow(values []string) (err error) { for i := range values { values[i] = strings.TrimSpace(values[i]) if values[i] != "" { ins.params[i] = values[i] } else { ins.params[i] = nil } } _, err = ins.query.Exec(ins.params...) return debugErr(err) } func (ins *inserter) commit() (err error) { err = ins.query.Close() if err != nil { _ = ins.tx.Rollback() return debugErr(err) } return debugErr(ins.tx.Commit()) } func (ins *inserter) rollback() error { _ = ins.query.Close() return debugErr(ins.tx.Rollback()) }
package net.bdew.compacter.blocks.cobbler import net.bdew.compacter.registries.Blocks import net.bdew.lib.block.HasTE import net.minecraft.block.Block class BlockCobbler extends Block(Blocks.machineProps) with HasTE[TileCobbler]
import { Injectable } from '@angular/core'; import { HttpInterceptor, HttpRequest, HttpResponse, HttpHandler, HttpEvent, HttpErrorResponse, HttpParams, HttpParameterCodec } from '@angular/common/http'; import { Observable, throwError, from, forkJoin, of, iif, Subject, BehaviorSubject } from 'rxjs'; import { catchError, mergeMap, concatMap, filter, take, tap } from 'rxjs/operators'; import { JwtHelperService } from '../services/jwt-helper.service'; import * as moment from 'moment'; import { TokenService } from '../services/token.service'; import { RouterAuthService } from '../services/router-auth.service'; import { DeviceService } from '../services/device.service'; @Injectable() export class HttpConfigInterceptor implements HttpInterceptor { private accessTokenCallInProgress = false; private accessTokenSubject = new BehaviorSubject<string>(null); constructor( private jwtHelperService: JwtHelperService, private tokenService: TokenService, private routerAuthService: RouterAuthService, private deviceService: DeviceService ) { } secureUrl(url) { if ( url.indexOf('.fyle.in') >= 0 || url.indexOf('localhost') >= 0 || url.indexOf('.fylehq.com') >= 0 || url.indexOf('.fyle.tech') >= 0 || url.indexOf('.fylehq.ninja') >= 0) { if ( url.indexOf('/api/auth/') >= 0 || url.indexOf('routerapi/auth/') >= 0) { return false; } return true; } return false; } expiringSoon(accessToken: string): boolean { try { const expiryDate = moment(this.jwtHelperService.getExpirationDate(accessToken)); const now = moment(new Date()); const differenceSeconds = expiryDate.diff(now, 'second'); const maxRefreshDifferenceSeconds = 2 * 60; return differenceSeconds < maxRefreshDifferenceSeconds; } catch (err) { return true; } } refreshAccessToken() { return from(this.tokenService.getRefreshToken()).pipe( concatMap( refreshToken => this.routerAuthService.fetchAccessToken(refreshToken) ), concatMap( authResponse => this.routerAuthService.newAccessToken(authResponse.access_token) ), concatMap(() => from(this.tokenService.getAccessToken())) ); } /** * This method get current accessToken from Storage, check if this token is expiring or not. * If the token is expiring it will get another accessToken from API and return the new accessToken * If multiple API call initiated then `this.accessTokenCallInProgress` will block multiple access_token call * Reference: https://stackoverflow.com/a/57638101 */ getAccessToken(): Observable<string> { return from(this.tokenService.getAccessToken()).pipe( concatMap(accessToken => { if (this.expiringSoon(accessToken)) { if (!this.accessTokenCallInProgress) { this.accessTokenCallInProgress = true; this.accessTokenSubject.next(null); return this.refreshAccessToken().pipe( concatMap((newAccessToken) => { this.accessTokenCallInProgress = false; this.accessTokenSubject.next(newAccessToken); return of(newAccessToken); }) ); } else { return this.accessTokenSubject.pipe( filter(result => result !== null), take(1), concatMap(() => { return from(this.tokenService.getAccessToken()) }) ); } } else { return of(accessToken); } }) ); } intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> { return forkJoin({ token: iif(() => this.secureUrl(request.url), this.getAccessToken(), of(null)), deviceInfo: from(this.deviceService.getDeviceInfo()) }).pipe( concatMap(({token, deviceInfo}) => { if (token && this.secureUrl(request.url)) { request = request.clone({ headers: request.headers.set('Authorization', 'Bearer ' + token) }); const params = new HttpParams({encoder: new CustomEncoder(), fromString: request.params.toString()}); request = request.clone({params}); } const appVersion = deviceInfo.appVersion || '0.0.0'; const osVersion = deviceInfo.osVersion; const operatingSystem = deviceInfo.operatingSystem; const mobileModifiedappVersion = `fyle-mobile::${appVersion}::${operatingSystem}::${osVersion}`; request = request.clone({ headers: request.headers.set('X-App-Version', mobileModifiedappVersion) }); return next.handle(request).pipe( catchError((error) => { if (error instanceof HttpErrorResponse && this.expiringSoon(token)) { return from(this.refreshAccessToken()).pipe( mergeMap((newToken) => { request = request.clone({ headers: request.headers.set('Authorization', 'Bearer ' + newToken) }); return next.handle(request); }) ); } return throwError(error); }) ); }) ); } } class CustomEncoder implements HttpParameterCodec { encodeKey(key: string): string { return encodeURIComponent(key); } encodeValue(value: string): string { return encodeURIComponent(value); } decodeKey(key: string): string { return decodeURIComponent(key); } decodeValue(value: string): string { return decodeURIComponent(value); } }
[[src]](https://github.com/ghc/ghc/tree/master/compiler/utils/Bag.hs) (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Bag: an unordered collection with duplicates Satisfy predictate Don't Left Right Standard definition foldBag t u e EmptyBag = e foldBag t u e (UnitBag x) = u x foldBag t u e (TwoBags b1 b2) = (foldBag t u e b1) `t` (foldBag t u e b2) foldBag t u e (ListBag xs) = foldr (t.u) e xs
import { Dimensions, StyleSheet } from 'react-native'; import { Colors, Fonts, Sizes } from '../../environment/theme'; const { width, height } = Dimensions.get('window'); export default StyleSheet.create({ modal: { justifyContent: 'center', alignItems: 'center', width, height, margin: 0, padding: 0, }, container: { maxWidth: width * 0.8, backgroundColor: Colors.white, borderRadius: Sizes.smartVerticalScale(7.5), }, details: { paddingVertical: Sizes.smartVerticalScale(25), paddingHorizontal: Sizes.smartHorizontalScale(20), }, title: { ...Fonts.centuryGothic, fontSize: Sizes.smartVerticalScale(16), marginBottom: Sizes.smartVerticalScale(7.5), textAlign: 'center', }, description: { ...Fonts.centuryGothic, fontSize: Sizes.smartVerticalScale(13), color: Colors.dustyGray, textAlign: 'center', }, button: { justifyContent: 'center', alignItems: 'center', paddingVertical: Sizes.smartVerticalScale(12.5), borderTopWidth: StyleSheet.hairlineWidth, borderColor: Colors.silverSand, }, normal: { ...Fonts.centuryGothic, }, danger: { color: Colors.ceriseRed, }, });
module ExprExpander where import Types import qualified Data.List.NonEmpty as NE import Data.Foldable (foldl', toList) both :: (a -> b) -> (a, a) -> (b, b) both f (q, w) = (f q, f w) expandSyntax :: LispSyntax -> LispAst expandSyntax (ConstS t) = Const (primitiveSyntaxToAst t) expandSyntax (VarS s) = Var s -- trivial expandSyntax (AppS op args) = App (expandSyntax op) (expandSyntax <$> args) expandSyntax (SfSyntax (DefineS s ls)) = Define s (expandSyntax ls) expandSyntax (SfSyntax (AssignS s ls)) = Assign s (expandSyntax ls) expandSyntax (SfSyntax (BeginS ls)) = Begin (expandSyntax <$> ls) expandSyntax (SfSyntax (LambdaS bindings body)) = Lambda bindings (expandSyntax <$> body) expandSyntax (SfSyntax (IfS c th els)) = If (expandSyntax c) (expandSyntax th) (expandSyntax els) -- desugaring expandSyntax (SfSyntax (CondS l mbElse)) = let expandedL = both expandSyntax <$> l (lastCond, lastThen) NE.:| lst = NE.reverse expandedL lastIf = If lastCond lastThen (maybe (Const UnitAst) expandSyntax mbElse) in foldl' (\els (cond, res) -> If cond res els) lastIf lst expandSyntax (SfSyntax (DefineProcS name bindings body)) = Define name (Lambda bindings (expandSyntax <$> body)) expandSyntax (SfSyntax (LetS argPairs body)) = App (Lambda (toList $ fst <$> argPairs) (expandSyntax <$> body)) (toList $ snd . fmap expandSyntax <$> argPairs) expandSyntax (SfSyntax (LetAsteriskS argPairs body)) = let (lastBind, lastArg) NE.:| lst = NE.reverse (fmap (fmap expandSyntax) argPairs) lastL = App (Lambda [lastBind] (expandSyntax <$> body)) [lastArg] desugared = foldl' (\nextLambda (bind, arg) -> App (Lambda [bind] (nextLambda NE.:| [])) [arg]) lastL lst in desugared expandSyntax (SfSyntax (NamedLetS name argPairs body)) = let eBody = expandSyntax <$> body bindings = toList $ fst <$> argPairs args = snd . fmap expandSyntax <$> argPairs self = Lambda bindings eBody letc = App (Lambda (toList $ fst <$> argPairs) eBody) (toList $ snd . fmap expandSyntax <$> argPairs) in App (Lambda [] (Define name self NE.:| [letc])) [] expandSyntax (SfSyntax (OrS args)) = let lastCond NE.:| lst = NE.reverse (expandSyntax <$> args) in foldl' (\els cd -> If cd (Const (BlAst True)) els) lastCond lst expandSyntax (SfSyntax (AndS args)) = let lastCond NE.:| lst = NE.reverse (expandSyntax <$> args) in foldl' (\els cd -> If cd els (Const (BlAst False))) lastCond lst -- and [a, b, c] -> lambda a -> if (a) then a else b
--- layout: issue title: "Zend_Controller_Router_Route_Chain does not make routes available" id: ZF-10234 --- ZF-10234: Zend\_Controller\_Router\_Route\_Chain does not make routes available ------------------------------------------------------------------------------- Issue Type: Improvement Created: 2010-07-27T06:15:46.000+0000 Last Updated: 2012-05-29T18:07:53.000+0000 Status: Open Fix version(s): Reporter: Maurice Bonemeijer (sugoi) Assignee: Ben Scholzen (dasprid) Tags: - Zend\_Controller\_Router Related issues: - [ZF-11975](/issues/browse/ZF-11975) Attachments: ### Description Currently there's no way to get routes out of Zend\_Controller\_Router\_Route\_Chain. Once they're in, they're not coming out. In my case I need to determine the route defaults. (so I can inject them in my Zend\_Navigation pages - to workaround the issue that Zend\_Navigation needs route defaults to determine active page) ### Comments Posted by Ben Scholzen (dasprid) on 2010-07-27T06:20:45.000+0000 You may probably want to create abstract routes (see documentation) to access them. Anyway, I'm not touching the old router anymore in regards of improvements, as all or most of the issues will be resolved with the new router in ZF 2.0. Posted by Maurice Bonemeijer (sugoi) on 2010-07-27T06:35:46.000+0000 Cheers for the quick reply. Can't get custom chain routes to work though. Either the Router throws up when I specify a custom chain class, or it goes ahead and uses the original one anyway (since the Zend chain route classname is hardcoded in Zend\_Controller\_Router\_Route\_Abstract) I don't exactly get what you mean by creating abstract routes, can't seem to find anything about it in the docs.
using System.Collections.Immutable; namespace Deltics.VersionInfo { public class VarFileInfo : FileInfo { public Var Value { get; internal set; } } }
<?php /** * The plugin bootstrap file * * This file is read by WordPress to generate the plugin information in the plugin * admin area. This file also includes all of the dependencies used by the plugin, * registers the activation and deactivation functions, and defines a function * that starts the plugin. * * @link https://ghulamustafa.com * @since 1.0.0 * @package Thawani_Payment_Gateway * * @wordpress-plugin * Plugin Name: Thawani Payment Gateway * Plugin URI: https://thawani.om * Description: This is a short description of what the plugin does. It's displayed in the WordPress admin area. * Version: 1.0.0 * Author: Ghulam Mustafa * Author URI: https://ghulamustafa.com * License: GPL-2.0+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt * Text Domain: thawani-payment-gateway * Domain Path: /languages */ if ( ! defined('WPINC')) { die; // if accessed directly } // check woocommerce activation $active_plugins = apply_filters( 'active_plugins', get_option( 'active_plugins' ) ); if ( ! in_array( 'woocommerce/woocommerce.php', $active_plugins ) ) { return; } // plugin directory define( 'WOO_CUSTOM_PAYMENT_DIR', plugin_dir_path( __FILE__ )); // Include our Gateway Class and register Payment Gateway with WooCommerce add_action( 'plugins_loaded', 'thawani_payment_gateway_init', 0 ); function thawani_payment_gateway_init() { // load text domain load_plugin_textdomain( 'thawani_payment_gateway', FALSE, WOO_CUSTOM_PAYMENT_DIR . '/languages/' ); // Lets add it too WooCommerce add_filter( 'woocommerce_payment_gateways', 'thawani_payment_gateway' ); function thawani_payment_gateway( $methods ) { $methods[] = 'thawani_payment_gateway'; return $methods; } // include extended gateway class include_once( 'woo_thawani_payment_gateway.php' ); }
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Text; using System.Threading.Tasks; namespace Microsoft.VisualStudio.Web.CodeGeneration.Templating { public abstract class RazorTemplateBase { private TextWriter Output { get; set; } public dynamic Model { get; set; } public abstract Task ExecuteAsync(); public async Task<string> ExecuteTemplate() { StringBuilder output = new StringBuilder(); using (var writer = new StringWriter(output)) { Output = writer; await ExecuteAsync(); } return output.ToString(); } public void WriteLiteral(object value) { WriteLiteralTo(Output, value); } public virtual void WriteLiteralTo(TextWriter writer, object text) { if (writer == null) { throw new ArgumentNullException(nameof(writer)); } if (text != null) { writer.Write(text.ToString()); } } public virtual void Write(object value) { WriteTo(Output, value); } public virtual void WriteTo(TextWriter writer, object content) { if (writer == null) { throw new ArgumentNullException(nameof(writer)); } if (content != null) { writer.Write(content.ToString()); } } public void BeginContext(int position, int length, bool x) { // Do Nothing. } public void EndContext() { // Do Nothing. } private List<string> AttributeValues { get; set; } protected void WriteAttributeValue(string thingy, int startPostion, object value, int endValue, int dealyo, bool yesno) { if (AttributeValues == null) { AttributeValues = new List<string>(); } AttributeValues.Add(value.ToString()); } private string AttributeEnding { get; set; } // Copied from: https://github.com/aspnet/AspNetCore/blob/master/src/Shared/RazorViews/BaseView.cs protected void BeginWriteAttribute(string name, string begining, int startPosition, string ending, int endPosition, int thingy) { Debug.Assert(string.IsNullOrEmpty(AttributeEnding)); Output.Write(begining); AttributeEnding = ending; } protected void EndWriteAttribute() { Debug.Assert(!string.IsNullOrEmpty(AttributeEnding)); if (AttributeValues != null) { var attributes = string.Join(" ", AttributeValues); Output.Write(attributes); } AttributeValues = null; Output.Write(AttributeEnding); AttributeEnding = null; } } }
using System.Collections.Generic; using System.IO; using System.Net; using System.Text; using Wox.Plugin; using Wox.Plugins.Common; namespace Wox.Plugins.KeePass.Parsers { public interface IOpenKeePassParser : IParser { } public class OpenKeePassParser : IOpenKeePassParser { private const string logPath = @"C:\Projects\log.txt"; private readonly IFileService _fileService; private readonly IStorage _storage; private string _password; public OpenKeePassParser(IStorage storage, IFileService fileService) { _fileService = fileService; _storage = storage; _password = new string(new char[0]); } private bool PasswordIsSet => _password.Length > 0; public bool TryParse(string query, out List<Result> results) { results = new List<Result>(); var isValid = _storage.KeePassPathIsConfigured && (PasswordIsSet || query.NotEmpty()); if (!isValid) { return false; } var result = query.IsEmpty() ? CreateResultFromSavedPassword() : CreateResultFromTypedPassword(query); results.Add(result); return true; } private Result CreateResultFromSavedPassword() { return new Result { Title = GetTitle(), Action = context => { OpenKeePass(); return true; } }; } private string GetTitle() { return $"Open '{Path.GetFileName(_storage.KeePath.KeePassFilePath)}' with given password"; } private Result CreateResultFromTypedPassword(string query) { var sb = new StringBuilder(query); return new Result { Title = GetTitle(), SubTitle = sb.ToString().GetHashCode().ToString(), Action = context => { _password = sb.ToString(); OpenKeePass(); return true; } }; } private void OpenKeePass() { var password = GetPassword(); var formattableString = $@"""{_storage.KeePath.KeePassFilePath}"" -pw:{password}"; _fileService.Start(_storage.KeePath.ApplicationPath, formattableString); } private string GetPassword() { return _password; return new NetworkCredential(string.Empty, _password).Password; } } }
#!/usr/bin/bash python3 -m pip install ./dist/*.whl --force-reinstall
#!/usr/bin/env node const fetch = require('node-fetch'); if (process.argv.length !== 3) { throw new Error(`Usage: ${process.argv[1]} «count»`); } const countString = process.argv[2]; const count = countString|0; if (`${count}` !== countString) { throw new Error(`Unable to parse “${countString}” as number.`); } (async () => { for (let i = 0; i < count; i++) { const result = await fetch('https://www.drawnames.com/SEO/DoDemoDraw', { body: '', method: 'POST', }); const o = await result.json(); const draw = o.draw; if (!draw) { throw new Error(`Unexpected JSON format: `, o); } const encounteredKeys = new Set(); let cycleCount = 0; for (let key of Object.keys(draw)) { if (encounteredKeys.has(key)) { continue; } cycleCount++; while (!encounteredKeys.has(key)) { if (!Object.hasOwnProperty.call(draw, key)) { throw new Error(`Unable to find key “${key}”`); } encounteredKeys.add(key); const nextKey = draw[key]; const nextKeyType = typeof nextKey; if (nextKeyType !== 'string') { throw new Error(`Key “${key}” is type ${nextKeyType} when expecting string.`); } key = nextKey; } } if (cycleCount !== 1) { console.log(`Found cycle count of ${cycleCount}: `, draw); } } })();
<?php namespace App\Classes; class ParserFactory { public static function getParser($url) { if (strpos($url, '/223/purchase/public/purchase/info/common-info') !== false) { return new PublicPurchase($url); } elseif (strpos($url, 'info/lot-list') !== false) { return new PublicPurchasePrice($url); } elseif (strpos($url, 'info/journal') !== false) { return new PublicPurchaseJournal($url); } elseif (strpos($url, '/ea44/view/supplier-results') !== false) { return new Ea44Winner($url); } elseif (strpos($url, 'www.sberbank-ast') !== false) { return new SberGos($url); } elseif (strpos($url, 'utp.sberbank-ast') !== false) { return new SberUtp($url); } elseif (strpos($url, 'rts-tender.ru') !== false) { return new RtsMarket($url); } elseif (strpos($url, 'lsr.ru') !== false) { return new LrsMarket($url); } elseif (strpos($url, 'otc.ru') !== false) { return new OtcMarket($url); } elseif (strpos($url, 'agregatoreat.ru') !== false) { return new AgregatorEat($url); } elseif (strpos($url, 'tektorg.ru') !== false) { return new Tektorg($url); } elseif (strpos($url, 'roseltorg.ru') !== false) { return new Roseltorg($url); } elseif (strpos($url, 'zakazrf.ru') !== false) { return new ZakazRf($url); } elseif (strpos($url, 'b2b-center.ru') !== false) { return new B2b($url); } else { return new Ea44Parser($url); } /* if (strpos($url, '/ea44') !== false) { return new Ea44Parser($url); } elseif (strpos($url, '223/purchase') !== false) { return new PublicPurchase($url); } throw new \RuntimeException('Не удалось создать парсер под URL ' . $url);*/ } }
/* * Copyright (c) 2021, Firely (info@fire.ly) and contributors * See the file CONTRIBUTORS for details. * * This file is licensed under the BSD 3-Clause license * available at https://raw.githubusercontent.com/FirelyTeam/firely-net-sdk/master/LICENSE */ using Hl7.Fhir.ElementModel; using Hl7.Fhir.Model; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Hl7.Fhir.Support.Tests.Serialization { [TestClass] public class CommonTypeParsingTest { [TestMethod] public void CanConvertPocoToTypedElement() { Coding c = new Coding("http://nu.nl", "bla"); var te = TypedSerialization.ToTypedElement(c); Assert.AreEqual("Coding", te.InstanceType); Coding c2 = TypedSerialization.ToPoco<Coding>(te); Assert.AreEqual(c.Code, c2.Code); Assert.AreEqual(c.System, c2.System); } [TestMethod] public void CanConvertPocoToSourceNode() { Coding c = new Coding("http://nu.nl", "bla"); var sn = TypedSerialization.ToSourceNode(c, "kode"); Assert.AreEqual("kode", sn.Name); Coding c2 = TypedSerialization.ToPoco<Coding>(sn); Assert.AreEqual(c.Code, c2.Code); Assert.AreEqual(c.System, c2.System); } } }
import { LOCATION_CHANGE } from 'connected-react-router' import { getPageTitleFromRoute } from 'utils/routes' export type State = { pageTitles: Array<string> } const initState = { pageTitles: [] } export const reducer = (state: State = initState, action: any) => { if (action.type === LOCATION_CHANGE) { const title = getPageTitleFromRoute(action.payload.location.pathname) if (title && action.payload.action === 'POP') { const len = state.pageTitles.length if (len === 0) { state.pageTitles = [...state.pageTitles, title] } else { state.pageTitles = state.pageTitles.filter((_, idx) => idx !== len - 1) } } else if (title && action.payload.action === 'PUSH') { state.pageTitles = [...state.pageTitles, title] } else if (title && action.payload.action === 'REPLACE') { state.pageTitles = [...state.pageTitles] state.pageTitles[state.pageTitles.length - 1] = title } } return state } export default reducer
namespace PathfinderMG.Core.Source.ScenarioCore.Pathfinders { interface IPathfinder { } }
-- Copyright (c) YugaByte, Inc. alter table kms_config add column name varchar(100); update kms_config set name = CONCAT(key_provider, ' KMS Configuration');
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Runtime.InteropServices; using System.Windows.Forms; /// <summary> /// CREDITS: https://github.com/lolp1/GetD3DHookOffset /// </summary> namespace GameSharp.Internal.Direct3D { public abstract class D3DDevice : IDisposable { private readonly string _d3DDllName; private readonly List<IntPtr> _loadedLibraries = new List<IntPtr>(); protected readonly IntPtr D3DDevicePtr; protected readonly Process TargetProcess; private bool _disposed; private IntPtr _myD3DDll; private IntPtr _theirD3DDll; protected D3DDevice(Process targetProcess, string d3DDllName) { TargetProcess = targetProcess; _d3DDllName = d3DDllName; Form = new Form(); LoadDll(); // ReSharper disable once VirtualMemberCallInConstructor InitD3D(out D3DDevicePtr); } protected Form Form { get; } public abstract int EndSceneVtableIndex { get; } public abstract int PresentVtableIndex { get; } public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } protected abstract void InitD3D(out IntPtr d3DDevicePtr); protected abstract void CleanD3D(); private void LoadDll() { _myD3DDll = LoadLibrary(_d3DDllName); if (_myD3DDll == IntPtr.Zero) { throw new Exception($"Could not load {_d3DDllName}"); } _theirD3DDll = TargetProcess.Modules.Cast<ProcessModule>().First(m => m.ModuleName == _d3DDllName).BaseAddress; } protected IntPtr LoadLibrary(string library) { // Attempt to grab the module handle if its loaded already. IntPtr ret = NativeMethods.GetModuleHandle(library); if (ret == IntPtr.Zero) { // Load the lib manually if its not, storing it in a list so we can free it later. ret = NativeMethods.LoadLibrary(library); _loadedLibraries.Add(ret); } return ret; } protected unsafe IntPtr GetVTableFuncAddress(IntPtr obj, int funcIndex) { IntPtr pointer = *(IntPtr*)(void*)obj; return *(IntPtr*)(void*)(pointer + funcIndex * IntPtr.Size); } public unsafe IntPtr GetDeviceVTableFuncAbsoluteAddress(int funcIndex) { //Expect the unexpected IntPtr pointer = *(IntPtr*)(void*)D3DDevicePtr; pointer = *(IntPtr*)(void*)(pointer + funcIndex * IntPtr.Size); IntPtr offset = new IntPtr(pointer.ToInt64() - _myD3DDll.ToInt64()); return new IntPtr(_theirD3DDll.ToInt64() + offset.ToInt64()); } private void Dispose(bool disposing) { if (!_disposed) { if (disposing) { CleanD3D(); Form?.Dispose(); foreach (IntPtr loadedLibrary in _loadedLibraries) { NativeMethods.FreeLibrary(loadedLibrary); } } _disposed = true; } } ~D3DDevice() { Dispose(false); } internal static class NativeMethods { [DllImport("kernel32.dll", CharSet = CharSet.Auto)] public static extern IntPtr GetModuleHandle(string lpModuleName); [DllImport("kernel32", SetLastError = true, CharSet = CharSet.Unicode)] public static extern IntPtr LoadLibrary(string lpFileName); [DllImport("kernel32.dll", SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool FreeLibrary(IntPtr hModule); } [UnmanagedFunctionPointer(CallingConvention.StdCall)] protected delegate void VTableFuncDelegate(IntPtr instance); } }
using MediatR; using System.Threading; using System.Threading.Tasks; using Tufan.Authority.Domain.Model.Request; using Tufan.Authority.Domain.Services; namespace Tufan.Authority.Application.Session.Query { public class GetSessionQuery : SessionRequest, IRequest<string> { } public class GetSessionQueryHandler : IRequestHandler<GetSessionQuery, string> { private readonly SessionService _sessionService; public GetSessionQueryHandler(SessionService sessionService) { _sessionService = sessionService; } public Task<string> Handle(GetSessionQuery request, CancellationToken cancellationToken) { return _sessionService.GetSession(request); } } }
#include <Arduino.h> #include "main_config.h" #include "quickjs.h" #ifdef _UNIT_SONICIO_ENABLE_ #include "module_unit_sonicio.h" #include "SONIC_IO.h" static SONIC_IO sensor; static JSValue unit_sonicio_begin(JSContext *ctx, JSValueConst jsThis, int argc, JSValueConst *argv) { uint32_t trig, echo; JS_ToUint32(ctx, &trig, argv[0]); JS_ToUint32(ctx, &echo, argv[1]); sensor.begin(trig, echo); return JS_UNDEFINED; } static JSValue unit_sonicio_getDuration(JSContext *ctx, JSValueConst jsThis, int argc, JSValueConst *argv) { float duration = sensor.getDuration(); return JS_NewFloat64(ctx, duration); } static JSValue unit_sonicio_getDistance(JSContext *ctx, JSValueConst jsThis, int argc, JSValueConst *argv) { float distance = sensor.getDistance(); return JS_NewFloat64(ctx, distance); } static const JSCFunctionListEntry unit_sonicio_funcs[] = { JSCFunctionListEntry{ "begin", 0, JS_DEF_CFUNC, 0, { func : {2, JS_CFUNC_generic, unit_sonicio_begin} }}, JSCFunctionListEntry{ "getDuration", 0, JS_DEF_CFUNC, 0, { func : {0, JS_CFUNC_generic, unit_sonicio_getDuration} }}, JSCFunctionListEntry{ "getDistance", 0, JS_DEF_CFUNC, 0, { func : {0, JS_CFUNC_generic, unit_sonicio_getDistance} }}, }; JSModuleDef *addModule_unit_sonicio(JSContext *ctx, JSValue global) { JSModuleDef *mod; mod = JS_NewCModule(ctx, "UnitSonicIo", [](JSContext *ctx, JSModuleDef *m) { return JS_SetModuleExportList( ctx, m, unit_sonicio_funcs, sizeof(unit_sonicio_funcs) / sizeof(JSCFunctionListEntry)); }); if (mod){ JS_AddModuleExportList( ctx, mod, unit_sonicio_funcs, sizeof(unit_sonicio_funcs) / sizeof(JSCFunctionListEntry)); } return mod; } JsModuleEntry unit_sonicio_module = { NULL, addModule_unit_sonicio, NULL, NULL }; #endif
require File.join(File.dirname(__FILE__), 'spec_helper') describe RDF::Node do before :each do @new = Proc.new { |*args| RDF::Node.new(*args) } end it "should be instantiable" do lambda { @new.call }.should_not raise_error end it "== a node with the same identifier" do @new.call("a").should == @new.call("a") end it "is unlabled given an empty ID" do @new.call("").to_s.should_not == "_:" end it "not eql? a node with the same identifier" do @new.call("a").should_not be_eql(@new.call("a")) end end
export declare function getPointsConfidence(heatmapScores: any, heatMapCoords: any): Float32Array; export declare function getOffsetVectors(heatMapCoordsBuffer: any, offsetsBuffer: any): any; export declare function getOffsetPoints(heatMapCoordsBuffer: any, outputStride: any, offsetsBuffer: any): any; export declare function argmax2d(inputs: any): any;
#include "gtest/gtest.h" #include "Lithe/LitheCore.h" #include "SphericalTestAtlas.hpp" #include <vector> using namespace std; using namespace lithe; // The fixture for testing class Block. class SphericalAtlasTest : public ::testing::Test { protected: // You can do set-up work for each test here. SphericalAtlasTest(); // You can do clean-up work that doesn't throw exceptions here. virtual ~SphericalAtlasTest(); // If the constructor and destructor are not enough for setting up // and cleaning up each test, you can define the following methods: // Code here will be called immediately after the constructor (right // before each test). virtual void SetUp(); // Code here will be called immediately after each test (right // before the destructor). virtual void TearDown(); SphericalTestAtlas default_atlas; SphericalTestAtlas custom_atlas; // for testing conversion from XYZ to UV in default_atlas // Used in SphericalAtlas_x_y_z vector<vector<float>> uv = { { 1.0/3, 0.61 }, { 1.0/6, 0.61 }, { -1.0/3, 0.61 }, { -1.0/6, 0.61 }, { 1.0/3, -0.61 }, { 1.0/6, -0.61 }, { -1.0/3, -0.61 }, { -1.0/6, -0.61 }, }; vector<vector<float>> xyz = { {0.28750262602163934, 0.4979691555789532, 0.8181497174250234}, {0.49796915557895327, 0.28750262602163923, 0.8181497174250234}, {0.28750262602163934, -0.4979691555789532, 0.8181497174250234}, {0.49796915557895327, -0.28750262602163923, 0.8181497174250234}, {0.28750262602163934, 0.4979691555789532, -0.8181497174250234}, {0.49796915557895327, 0.28750262602163923, -0.8181497174250234}, {0.28750262602163934, -0.4979691555789532, -0.8181497174250234}, {0.49796915557895327, -0.28750262602163923, -0.8181497174250234} }; vector<vector<float>> uv_antipodal = { {0, 0.9}, {0.23, 0.4}, {-0.54, -0.2}, {-0.2, 0.9} }; vector<vector<float>> uv_antipodal_reflected = { {-1, -0.9}, {-0.77, -0.4}, {+0.46, +0.2}, {0.8, -0.9} }; };
# Helloworld project spring boot 프로젝트로 간단한 샘플들을 정의한다. ##주소 샘플 1. Spring boot web project 1. ApiController 1. Thymeleaf 1. Exception 1. Validation 1. JPA 1. Gradle 1. FTP deploy
package com.neokii.ntune import org.json.JSONObject class LqrTuneActivity: BaseTuneActivity() { override fun getRemoteConfFile(): String { return "/data/ntune/lat_lqr.json" } override fun getItemList(json: JSONObject): ArrayList<TuneItemInfo> { return ArrayList<TuneItemInfo>().apply { add(TuneItemInfo("scale", json.getDouble("scale").toFloat(), 500.0f, 5000.0f, 50.0f, 1)) add(TuneItemInfo("ki", json.getDouble("ki").toFloat(), 0.0f, 0.2f, 0.01f, 3)) //add(TuneItemInfo("k_1", json.getDouble("k_1").toFloat(), -150.0f, -50.0f, 5.0f, 1)) //add(TuneItemInfo("k_2", json.getDouble("k_2").toFloat(), 400.0f, 500.0f, 5.0f, 1)) //add(TuneItemInfo("l_1", json.getDouble("l_1").toFloat(), 0.1f, 0.5f, 0.01f, 3)) //add(TuneItemInfo("l_2", json.getDouble("l_2").toFloat(), 0.1f, 0.5f, 0.01f, 3)) add(TuneItemInfo("dcGain", json.getDouble("dcGain").toFloat(), 0.0020f, 0.0040f, 0.0001f, 6)) add(TuneItemInfo("steerLimitTimer", json.getDouble("steerLimitTimer").toFloat(), 0.5f, 3.0f, 0.05f, 3)) add(TuneItemInfo("steerMax", json.getDouble("steerMax").toFloat(), 0.5f, 3.0f, 0.05f, 3)) } } }
using System; using System.Collections.Generic; using Application.Common.Models; using FluentValidation; namespace Application.Tasks.Dtos { public class UpdateTaskDto : Dto { public string Name { get; set; } public string Note { get; set; } public bool IsDone { get; set; } public DateTime DueDate { get; set; } public string ApplicantId { get; set; } public List<string> UsersIds { get; set; } public bool IsReviewed { get; set; } } public class UpdateTaskDtoValidator : AbstractValidator<UpdateTaskDto> { public UpdateTaskDtoValidator() { RuleFor(a => a.Name).NotNull().NotEmpty(); RuleFor(a => a.DueDate).NotNull().NotEmpty(); RuleFor(a => a.ApplicantId).NotNull().NotEmpty(); } } }
<!DOCTYPE html> <html lang="hu"> <head> <title>Tanárok modosítása</title> <meta charset="utf-8"> <link href="{{ asset('/css/adminStyle.css') }}" rel="stylesheet"> <script src="http://code.jquery.com/jquery-1.4.3.min.js"></script> </head> <body> <div id="table"> <div id="top"> <h2>Tanár módosítása</h2> @if ($message = Session::get('siker')) <div class="alert alert-success" role="alert"> {{ Session::get('siker') }} </div> @endif @if ($message = Session::get('hiba')) <div class="alert alert-danger" role="alert"> {{ Session::get('hiba') }} </div> @endif </div> </div> <div id="tanarAdatok"> <form action="addTanar" method="post"> <input type="hidden" name="_token" value="{!! csrf_token() !!}"> <div class="labelDiv"> <label>Név</label> <input type="text" id="nev" name="nev" value=""/> </div> <div class="labelDiv"> <label>Tanszék</label> <select name="tanszek" id="selectTanszek"> <option value="0" disabled selected>Válasszon tanszéket</option> @foreach($tanszekek as $tanszek) <option value={{$tanszek->id}} >{{$tanszek->nev}}</option> @endforeach </select> </div> <div class="labelDiv"> <label>Fokozat</label> <select name="fokozat" id="selectFokozat"> <option value="0" disabled selected>Válasszon fokozatot</option> @foreach($fokozatok as $fokozat) <option value={{$fokozat->id}} >{{$fokozat->fokozat}}</option> @endforeach </select> </div> <div class="labelDiv"> <label>Email</label> <input type="text" id="email" name="email" value=""/> </div> <div class="labelDiv"> <label>Funkció</label> <select name="funkcio" id="selectFunkcio"> @foreach($funkcio as $key => $value) <option value={{$value}} >{{$key}}</option> @endforeach </select> </div> <button type="submit" id="mentes">Hozzáad</button> </form> </div> </body>
import { Titles } from '../titles'; const titles = new Titles({ staging: true, }); describe('Class(Titles)', () => { describe('func(get)', () => { it('should return a given title', async () => { const title = await titles.get(144); expect(title.ID).toEqual(144); expect(title.IsPrefix).toEqual(false); expect(title.NameMasculine).toEqual('The Heart of the Party'); expect(title.NameFeminine).toEqual('The Heart of the Party'); }); }); });
import Vue from 'vue' import VueI18n from 'vue-i18n'; Vue.use(VueI18n) import { languages } from './i18n/index.js'; import { defaultLocale } from './i18n/index.js'; // Expected value= Object { en:en, es:es } const messages = Object.assign(languages); // I18n object var i18n = new VueI18n({ locale: defaultLocale, fallbackLocale: 'de', messages }) export default i18n
import React, {useMemo, useState} from "react"; import {Trans} from "@lingui/macro"; import {IBaseProps} from "../../interfaces/props"; import {Box} from "@chakra-ui/layout"; import { IconButton, Menu, MenuButton, MenuItemOption, MenuList, MenuOptionGroup } from "@chakra-ui/react"; import {SettingsIcon} from "@chakra-ui/icons"; import {useRecoilState} from "recoil"; import {languageState} from "../../hooks/Atoms"; import {generatorState} from "../../hooks/Atoms"; const WalletGeneratorSetting:React.FC<IBaseProps> = (iprops:IBaseProps)=>{ const [lang, ] = useRecoilState(languageState) const [groupTitle, setGroupTitle] = useState<string>("Generate By") const [, setGenerator] = useRecoilState(generatorState) useMemo(()=>{ if(lang==='zh-CN'){ setGroupTitle("生成方式") } if(lang==='en-US'){ setGroupTitle("Generate By") } },[lang]) return( <> <Box width="10px" /> <Box> <Menu autoSelect={false} closeOnSelect={true} > <MenuButton as={IconButton} aria-label='Options' icon={<SettingsIcon color={"gray"} />} variant='outline' colorScheme={"blackAlpha.100"} bg={"#2b2d32"} borderRadius='md' borderWidth='0px' _hover={{ bg: '#2b2d32' }} _expanded={{ bg: '#2b2d32' }} _focus={{ boxShadow: 'outline', bg:"#2b2d32" }} /> <MenuList maxWidth='100px' bgColor={"#2b2d32"} borderColor={"black"}> <MenuOptionGroup defaultValue='puzzle' title={groupTitle} type='radio'> <MenuItemOption _hover={{ bg: 'blackAlpha.500'}} value='entropy' onClick={()=>setGenerator('entropy')} > <Trans> VaultName&Password </Trans> </MenuItemOption> <MenuItemOption _hover={{ bg: 'blackAlpha.500'}} value='puzzle' onClick={()=>setGenerator('puzzle')} > <Trans> Random Puzzle</Trans> </MenuItemOption> </MenuOptionGroup> </MenuList> </Menu> </Box> </> ); } export {WalletGeneratorSetting};
const _binary_koan$elm_spruce$Native_Spruce = function() { const { nativeBinding, rawSpawn, andThen, succeed } = _elm_lang$core$Native_Scheduler const http = require("http") const parseUrl = require("url").parse function buildServer(settings) { function encodeRequest(request, callback) { const { url, method, httpVersion, headers, trailers } = request const parsedUrl = parseUrl(url, true) let body = "" request.on("data", buf => body += buf.toString()) request.on("end", () => { callback(JSON.stringify({ url: parsedUrl, method, httpVersion, headers, trailers, body })) }) //TODO do we care about error/abort events? Or is not handling the request the right thing to do? } function handleResponse(response, encodedResponse) { const value = JSON.parse(encodedResponse) response.writeHead(value.statusCode, value.headers) response.write(value.body) response.addTrailers(value.trailers) response.end() return succeed(null) } return http.createServer((request, response) => { encodeRequest(request, encoded => { rawSpawn(A2( andThen, handleResponse.bind(null, response), settings.onRequest(encoded) )) }) }) } function createServer(settings) { return nativeBinding(callback => { callback(succeed(buildServer(settings))) }) } function listen(address, settings) { return nativeBinding(function(callback) { const server = buildServer(settings) const [hostname, port] = address.split(":") server.listen(port, () => { console.log(`Listening on port ${port}`) callback(succeed(null)) }) }) } return { listen: F2(listen), createServer: createServer } }()
@model SpartanTrainingRoom.Models.Course @{ ViewData["Title"] = "Video"; } <div class="main-container"> <h1>Course: C#</h1> <div class="video-container"> <video width="850" height="500" src="~/video/CSharpVariable.mp4" controls="controls"> Your browser does not support the video tag </video> </div> <h3>C# - Variables</h3> <p>The variable in C# is nothing but a name given to a data value.</p> <button class="btn btn-primary next-button" onclick="location.href='/Home/Questions1'">Next</button> </div> <style> body { background: linear-gradient( to right, #ffffff, #e33661); } .main-container { padding-left: 17.5%; } .next-button { background-color: #E33661; margin-left: 58%; width: 10%; } .next-button:hover { background-color: #e86183; } </style>
import moment from 'moment'; import { Moment } from 'moment'; import { vektetSjanse } from '../utils/mock-utils'; import { Sivilstand, SivilstandTyper } from '../../models/person/person'; const ugift = (fraOgMed: string) => { return { kodeRef: SivilstandTyper.Ugift, beskrivelse: 'Ugift', fraOgMed }; }; const gift = (fraOgMed: string) => { return { kodeRef: SivilstandTyper.Gift, beskrivelse: 'Gift', fraOgMed }; }; const skilt = (fraOgMed: string) => { return { kodeRef: SivilstandTyper.Skilt, beskrivelse: 'Skilt', fraOgMed }; }; const samboer = (fraOgMed: string) => { return { kodeRef: SivilstandTyper.Samboer, beskrivelse: 'Samboer', fraOgMed }; }; const enke = (fraOgMed: string) => { return { kodeRef: SivilstandTyper.Enke, beskrivelse: 'Enke', fraOgMed }; }; export function getSivilstand(fødselsdato: Moment, faker: Faker.FakerStatic): Sivilstand { const alder = moment().diff(fødselsdato, 'years'); const fraOgMed = getSistOppdatert(alder, faker); if (alder < 18) { return ugift(fraOgMed); } return getTilfeldigSilvstand(fraOgMed, faker); } function getTilfeldigSilvstand(fraOgMed: string, faker: Faker.FakerStatic) { if (vektetSjanse(faker, 0.2)) { return gift(fraOgMed); } else if (vektetSjanse(faker, 0.2)) { return skilt(fraOgMed); } else if (vektetSjanse(faker, 0.2)) { return ugift(fraOgMed); } else if (vektetSjanse(faker, 0.2)) { return samboer(fraOgMed); } else { return enke(fraOgMed); } } function getSistOppdatert(alder: number, faker: Faker.FakerStatic) { const maxYearsAgo = alder - 18; return moment(faker.date.past(maxYearsAgo)).format('YYYY-MM-DD'); }
class DefaultUIobject #data struct attr_accessor :enabled attr_reader :label def initialize drawable, label, update_func = nil, enabled = true @drawobj, @label, @update_callback, @enabled = drawable, label, update_func, enabled end def update param width = param[0] height = param[1] @update_callback.call @drawobj, width, height if @update_callback != nil end def draw_on window window.draw @drawobj end end
const TmSignature = artifacts.require("TMSignatureMock"); contract("TmSignature", () => { beforeEach(async () => { this.contract = await TmSignature.new(); }); context("recoverSigner", () => { it("should verify signature correctly", async () => { const appHash = "0x8D1897D04B6B4746021EAF4BF80F0FF9E5A4DDDD451A2FA814DA1C21380D69F8"; ( await this.contract.recoverSigner( [ "0x81AC28C67F636974BDC70D1A694BA050652FBAA9AA83A1F8B7B10F84C6BC9171", "0x5D022B62644E496504FC6AF1DD138544CD311F26A979DF4B4DAF92E60CA0F762", 28, "0x6E080211400200000000000022480A20", "0x12240A206C5235F345A661B3136AB762F761045D297D582440751DEA68DBD6083403A31D10012A0C08AA9C85F50510D581FBA001320962616E64636861696E", ], appHash, ) ) .toString() .should.eq("0x652D89a66Eb4eA55366c45b1f9ACfc8e2179E1c5"); ( await this.contract.recoverSigner( [ "0xF4ABDF0CB47604292B9B0D9636692A0D5379B646EA3246180004BFEAD2D7CA8A", "0x1AF744F61921AA03D5327333F654747C928CDD1D324A27FF79181AC8E1F6841E", 27, "0x6E080211400200000000000022480A20", "0x12240A206C5235F345A661B3136AB762F761045D297D582440751DEA68DBD6083403A31D10012A0C08AA9C85F50510FA86D8A701320962616E64636861696E", ], appHash, ) ) .toString() .should.eq("0xaAA22E077492CbaD414098EBD98AA8dc1C7AE8D9"); ( await this.contract.recoverSigner( [ "0x4258784CC9659EEC320EA86AB7DD1C41C7BF8E9F22035B9E50FA8B527A6079BE", "0x35C1D785DA88F2D0D563E3AA64B15B96E7C53D025E85895D37F25D99AD11CA14", 27, "0x6E080211400200000000000022480A20", "0x12240A206C5235F345A661B3136AB762F761045D297D582440751DEA68DBD6083403A31D10012A0C08AA9C85F5051089FE8FA601320962616E64636861696E", ], appHash, ) ) .toString() .should.eq("0xB956589b6fC5523eeD0d9eEcfF06262Ce84ff260"); }); }); });
using UnityEngine; /// <summary> /// -Base class for all characters. /// -Data structure /// </summary> public class BaseCharacter : MonoBehaviour { private string _characterName; private float _health; private float _walkSpeed; private float _runSpeed; private float _jumpSpeed; private float _jumpForce; /// <summary> /// Property used to get / set character name provided by user. /// </summary> public string name { get { return _characterName; } set { _characterName = value; } } /// <summary> /// Property used to get / set current health value of character. /// </summary> public float health { get { return _health; } set { _health = value; } } /// <summary> /// Property used to get / set current walk speed value of character. /// </summary> public float walkSpeed { get { return _walkSpeed; } set { _walkSpeed = value; } } /// <summary> /// Property used to get / set current run speed value of character. /// </summary> public float runSpeed { get { return _runSpeed; } set { _runSpeed = value; } } /// <summary> /// Property used to get / set current jump speed value of character. /// </summary> public float jumpSpeed { get { return _jumpSpeed; } set { _jumpSpeed = value; } } /// <summary> /// Property used to get / set current jump force value of character. /// </summary> public float jumpForce { get { return _jumpForce; } set { _jumpForce = value; } } /// <summary> /// Property used to get if character is selected or not. /// </summary> public bool isSelected { get { return this.enabled; } } }
export { SmallHeader as default } from "../../components/Header.js"
package p; public class FindLoopInLinkedList { public LinkedListLoop a; public int loopLength; public void createLoop(){ a = new LinkedListLoop(); a.addAtEnd(10); a.addAtEnd(20); a.addAtEnd(30); a.addAtEnd(40); a.addAtEnd(50); a.addAtEnd(60); a.insertLoop(2); a.displayLoop(); } public void findLoop(){ Node ptrOne =a.head; Node ptrTwo =a.head.next.next; while(ptrOne!=null){ if(ptrOne!=ptrTwo){ ptrOne = ptrOne.next; ptrTwo = ptrTwo.next.next; } else{ System.out.println(""); System.out.println("Loop Found--starts at " + ptrOne.data); findLoopLength(ptrOne, ptrTwo); breakLoop(ptrOne, ptrTwo); break; } } } public void findLoopLength(Node one, Node two){ one = one.next; loopLength = 1; while(one!=two){ one = one.next; loopLength++; } System.out.println("Loop length is " + loopLength); } public void breakLoop(Node one, Node two){ one = one.next; while(one.next!=two){ one = one.next; } one.next = null; System.out.println("Loop breaks"); a.display(); } public static void main (String[] args) throws java.lang.Exception { FindLoopInLinkedList i = new FindLoopInLinkedList(); i.createLoop(); i.findLoop(); } } class Node{ public int data; public Node next; public Node(int data){ this.data = data; this.next = null; } } class LinkedListLoop{ public Node head; public LinkedListLoop(){ head=null; } public void addAtEnd(int data){ Node n = new Node(data); if (head==null){ n.next = head; head = n; } else{ Node currNode = head; while(currNode.next!=null){ //System.out.print("---->" + currNode.data); currNode = currNode.next; } currNode.next = n; } } public void insertLoop(int index){ Node endNode = head; while(endNode.next!=null){ //System.out.print("---->" + currNode.data); endNode = endNode.next; } Node indexNode = head; while(index!=0){ indexNode = indexNode.next; index--; } endNode.next = indexNode; } public void displayLoop(){ System.out.println(""); Node currNode = head; int cnt = 15; while(cnt!=0){ System.out.print("->" + currNode.data); currNode=currNode.next; cnt--; } } public void display(){ System.out.println(""); Node currNode = head; while(currNode!=null){ System.out.print("->" + currNode.data); currNode=currNode.next; } } }
#if __WASM__ using System; using System.Collections.Generic; using System.Linq; using System.Text; using Windows.Foundation; using Windows.UI.Xaml.Media; namespace Windows.UI.Xaml.Controls { internal partial class PopupRoot : Panel { public PopupRoot() { Background = new SolidColorBrush(Colors.Transparent); UpdateIsHitTestVisible(); PointerReleased += PopupRoot_PointerReleased; } protected override void OnChildrenChanged() { base.OnChildrenChanged(); UpdateIsHitTestVisible(); } // This is a workaround because PopupRoot otherwise blocks touches. private void UpdateIsHitTestVisible() { IsHitTestVisible = Children.Any(); } private void PopupRoot_PointerReleased(object sender, Input.PointerRoutedEventArgs e) { Children.Select(GetPopup) .Where(p => p.IsLightDismissEnabled) .ToList() .ForEach(p => p.IsOpen = false); } protected override Size ArrangeOverride(Size finalSize) { foreach (var child in Children) { var desiredSize = child.DesiredSize; var popup = GetPopup(child); var popupLocation = popup.TransformToVisual(this) as TranslateTransform; var location = new Point( popupLocation.X + popup.HorizontalOffset, popupLocation.Y + popup.VerticalOffset ); child.Arrange(new Rect(location, desiredSize)); } return finalSize; } #region Popup public static Popup GetPopup(DependencyObject obj) { return (Popup)obj.GetValue(PopupProperty); } public static void SetPopup(DependencyObject obj, Popup value) { obj.SetValue(PopupProperty, value); } public static readonly DependencyProperty PopupProperty = DependencyProperty.RegisterAttached("Popup", typeof(Popup), typeof(PopupRoot), new PropertyMetadata(null)); #endregion } } #endif
package kpn.database.base import kpn.core.metrics.AnalysisActionDoc import kpn.core.metrics.ApiActionDoc import kpn.core.metrics.LogActionDoc import kpn.core.metrics.ReplicationActionDoc import kpn.core.metrics.SystemStatusDoc import kpn.core.metrics.UpdateActionDoc trait MetricsDatabase { def api: DatabaseCollection[ApiActionDoc] def log: DatabaseCollection[LogActionDoc] def replication: DatabaseCollection[ReplicationActionDoc] def update: DatabaseCollection[UpdateActionDoc] def analysis: DatabaseCollection[AnalysisActionDoc] def system: DatabaseCollection[SystemStatusDoc] }
/// <reference path='fourslash.ts' /> // @allowJs: true // @Filename: /a.js ////module.exports = 0; /////*1*/export type /*2*/N = number; // @Filename: /b.js ////type T = import("./a")./*3*/N; verify.baselineFindAllReferences('1', '2', '3');
; ModuleID = 'streamcluster_header.cu' source_filename = "streamcluster_header.cu" target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64" target triple = "nvptx64-nvidia-cuda" !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!1086, !1087, !1088} !llvm.ident = !{!1089} !nvvm.internalize.after.link = !{} !nvvmir.version = !{!1090} !nvvm.annotations = !{!1091, !1092, !1091, !1093, !1093, !1093, !1093, !1094, !1094, !1093} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 4.0.0 (http://llvm.org/git/clang.git 2debfe67236df81b4b386304d4aecd9fe20fc156) (http://llvm.org/git/llvm.git 9aa8644318b899329caf41dc98a12db04dee5855)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, imports: !3) !1 = !DIFile(filename: "streamcluster_header.cu", directory: "/home/taylor/git/coalescingsa-llvm/test/rodinia_3.1/cuda/streamcluster") !2 = !{} !3 = !{!4, !11, !16, !18, !20, !22, !24, !28, !30, !32, !34, !36, !38, !40, !42, !44, !46, !48, !50, !52, !54, !56, !60, !62, !64, !66, !71, !76, !78, !80, !85, !89, !91, !93, !95, !97, !99, !101, !103, !105, !110, !114, !116, !118, !122, !124, !126, !128, !130, !132, !136, !138, !140, !145, !153, !157, !159, !161, !165, !167, !169, !173, !175, !177, !181, !183, !185, !187, !189, !191, !193, !195, !197, !199, !204, !206, !208, !212, !214, !216, !218, !220, !222, !224, !226, !230, !234, !236, !238, !243, !245, !247, !249, !251, !253, !255, !259, !265, !269, !273, !278, !280, !284, !288, !302, !306, !310, !314, !318, !323, !325, !329, !333, !337, !345, !349, !353, !357, !361, !366, !372, !376, !380, !382, !390, !394, !402, !404, !406, !410, !414, !418, !423, !427, !432, !433, !434, !435, !438, !439, !440, !441, !442, !443, !444, !447, !449, !451, !453, !455, !457, !459, !461, !464, !466, !468, !470, !472, !474, !476, !478, !480, !482, !484, !486, !488, !490, !492, !494, !496, !498, !500, !502, !504, !506, !508, !510, !512, !514, !516, !518, !520, !522, !524, !526, !528, !532, !533, !535, !537, !539, !541, !543, !545, !547, !549, !551, !553, !555, !557, !559, !561, !576, !578, !582, !591, !596, !600, !604, !608, !612, !614, !616, !620, !626, !630, !636, !642, !644, !648, !652, !656, !660, !667, !669, !673, !677, !681, !683, !687, !691, !695, !697, !699, !703, !711, !715, !719, !723, !725, !731, !733, !739, !743, !747, !751, !755, !759, !763, !765, !767, !771, !775, !779, !781, !785, !789, !791, !793, !797, !801, !805, !809, !810, !811, !812, !816, !819, !823, !828, !831, !833, !835, !837, !839, !841, !843, !845, !847, !849, !851, !853, !855, !857, !859, !866, !868, !869, !871, !873, !875, !877, !881, !883, !885, !887, !889, !891, !893, !895, !897, !901, !905, !907, !911, !915, !917, !922, !927, !931, !933, !935, !937, !939, !946, !950, !954, !958, !962, !966, !971, !975, !977, !981, !987, !991, !996, !998, !1000, !1004, !1008, !1012, !1014, !1016, !1018, !1020, !1024, !1026, !1028, !1032, !1036, !1040, !1044, !1048, !1050, !1052, !1056, !1060, !1064, !1068, !1070, !1072, !1076, !1080, !1081, !1082, !1083, !1084, !1085} !4 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !7, line: 189) !5 = !DINamespace(name: "std", scope: null, file: !6, line: 188) !6 = !DIFile(filename: "/usr/local/bin/../lib/clang/4.0.0/include/__clang_cuda_math_forward_declares.h", directory: "/home/taylor/git/coalescingsa-llvm/test/rodinia_3.1/cuda/streamcluster") !7 = !DISubprogram(name: "abs", linkageName: "_ZL3absx", scope: !6, file: !6, line: 44, type: !8, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !8 = !DISubroutineType(types: !9) !9 = !{!10, !10} !10 = !DIBasicType(name: "long long int", size: 64, align: 64, encoding: DW_ATE_signed) !11 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !12, line: 190) !12 = !DISubprogram(name: "acos", linkageName: "_ZL4acosf", scope: !6, file: !6, line: 46, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !13 = !DISubroutineType(types: !14) !14 = !{!15, !15} !15 = !DIBasicType(name: "float", size: 32, align: 32, encoding: DW_ATE_float) !16 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !17, line: 191) !17 = !DISubprogram(name: "acosh", linkageName: "_ZL5acoshf", scope: !6, file: !6, line: 48, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !18 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !19, line: 192) !19 = !DISubprogram(name: "asin", linkageName: "_ZL4asinf", scope: !6, file: !6, line: 50, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !20 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !21, line: 193) !21 = !DISubprogram(name: "asinh", linkageName: "_ZL5asinhf", scope: !6, file: !6, line: 52, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !22 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !23, line: 194) !23 = !DISubprogram(name: "atan", linkageName: "_ZL4atanf", scope: !6, file: !6, line: 56, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !24 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !25, line: 195) !25 = !DISubprogram(name: "atan2", linkageName: "_ZL5atan2ff", scope: !6, file: !6, line: 54, type: !26, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !26 = !DISubroutineType(types: !27) !27 = !{!15, !15, !15} !28 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !29, line: 196) !29 = !DISubprogram(name: "atanh", linkageName: "_ZL5atanhf", scope: !6, file: !6, line: 58, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !30 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !31, line: 197) !31 = !DISubprogram(name: "cbrt", linkageName: "_ZL4cbrtf", scope: !6, file: !6, line: 60, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !32 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !33, line: 198) !33 = !DISubprogram(name: "ceil", linkageName: "_ZL4ceilf", scope: !6, file: !6, line: 62, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !34 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !35, line: 199) !35 = !DISubprogram(name: "copysign", linkageName: "_ZL8copysignff", scope: !6, file: !6, line: 64, type: !26, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !36 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !37, line: 200) !37 = !DISubprogram(name: "cos", linkageName: "_ZL3cosf", scope: !6, file: !6, line: 66, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !38 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !39, line: 201) !39 = !DISubprogram(name: "cosh", linkageName: "_ZL4coshf", scope: !6, file: !6, line: 68, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !40 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !41, line: 202) !41 = !DISubprogram(name: "erf", linkageName: "_ZL3erff", scope: !6, file: !6, line: 72, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !42 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !43, line: 203) !43 = !DISubprogram(name: "erfc", linkageName: "_ZL4erfcf", scope: !6, file: !6, line: 70, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !44 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !45, line: 204) !45 = !DISubprogram(name: "exp", linkageName: "_ZL3expf", scope: !6, file: !6, line: 76, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !46 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !47, line: 205) !47 = !DISubprogram(name: "exp2", linkageName: "_ZL4exp2f", scope: !6, file: !6, line: 74, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !48 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !49, line: 206) !49 = !DISubprogram(name: "expm1", linkageName: "_ZL5expm1f", scope: !6, file: !6, line: 78, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !50 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !51, line: 207) !51 = !DISubprogram(name: "fabs", linkageName: "_ZL4fabsf", scope: !6, file: !6, line: 80, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !52 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !53, line: 208) !53 = !DISubprogram(name: "fdim", linkageName: "_ZL4fdimff", scope: !6, file: !6, line: 82, type: !26, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !54 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !55, line: 209) !55 = !DISubprogram(name: "floor", linkageName: "_ZL5floorf", scope: !6, file: !6, line: 84, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !56 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !57, line: 210) !57 = !DISubprogram(name: "fma", linkageName: "_ZL3fmafff", scope: !6, file: !6, line: 86, type: !58, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !58 = !DISubroutineType(types: !59) !59 = !{!15, !15, !15, !15} !60 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !61, line: 211) !61 = !DISubprogram(name: "fmax", linkageName: "_ZL4fmaxff", scope: !6, file: !6, line: 88, type: !26, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !62 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !63, line: 212) !63 = !DISubprogram(name: "fmin", linkageName: "_ZL4fminff", scope: !6, file: !6, line: 90, type: !26, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !64 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !65, line: 213) !65 = !DISubprogram(name: "fmod", linkageName: "_ZL4fmodff", scope: !6, file: !6, line: 92, type: !26, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !66 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !67, line: 214) !67 = !DISubprogram(name: "fpclassify", linkageName: "_ZL10fpclassifyf", scope: !6, file: !6, line: 94, type: !68, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !68 = !DISubroutineType(types: !69) !69 = !{!70, !15} !70 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !71 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !72, line: 215) !72 = !DISubprogram(name: "frexp", linkageName: "_ZL5frexpfPi", scope: !6, file: !6, line: 96, type: !73, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !73 = !DISubroutineType(types: !74) !74 = !{!15, !15, !75} !75 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !70, size: 64, align: 64) !76 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !77, line: 216) !77 = !DISubprogram(name: "hypot", linkageName: "_ZL5hypotff", scope: !6, file: !6, line: 98, type: !26, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !78 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !79, line: 217) !79 = !DISubprogram(name: "ilogb", linkageName: "_ZL5ilogbf", scope: !6, file: !6, line: 100, type: !68, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !80 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !81, line: 218) !81 = !DISubprogram(name: "isfinite", linkageName: "_ZL8isfinitef", scope: !6, file: !6, line: 102, type: !82, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !82 = !DISubroutineType(types: !83) !83 = !{!84, !15} !84 = !DIBasicType(name: "bool", size: 8, align: 8, encoding: DW_ATE_boolean) !85 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !86, line: 219) !86 = !DISubprogram(name: "isgreater", linkageName: "_ZL9isgreaterff", scope: !6, file: !6, line: 106, type: !87, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !87 = !DISubroutineType(types: !88) !88 = !{!84, !15, !15} !89 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !90, line: 220) !90 = !DISubprogram(name: "isgreaterequal", linkageName: "_ZL14isgreaterequalff", scope: !6, file: !6, line: 105, type: !87, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !91 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !92, line: 221) !92 = !DISubprogram(name: "isinf", linkageName: "_ZL5isinff", scope: !6, file: !6, line: 108, type: !82, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !93 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !94, line: 222) !94 = !DISubprogram(name: "isless", linkageName: "_ZL6islessff", scope: !6, file: !6, line: 112, type: !87, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !95 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !96, line: 223) !96 = !DISubprogram(name: "islessequal", linkageName: "_ZL11islessequalff", scope: !6, file: !6, line: 111, type: !87, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !97 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !98, line: 224) !98 = !DISubprogram(name: "islessgreater", linkageName: "_ZL13islessgreaterff", scope: !6, file: !6, line: 114, type: !87, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !99 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !100, line: 225) !100 = !DISubprogram(name: "isnan", linkageName: "_ZL5isnanf", scope: !6, file: !6, line: 116, type: !82, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !101 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !102, line: 226) !102 = !DISubprogram(name: "isnormal", linkageName: "_ZL8isnormalf", scope: !6, file: !6, line: 118, type: !82, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !103 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !104, line: 227) !104 = !DISubprogram(name: "isunordered", linkageName: "_ZL11isunorderedff", scope: !6, file: !6, line: 120, type: !87, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !105 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !106, line: 228) !106 = !DISubprogram(name: "labs", linkageName: "_ZL4labsl", scope: !6, file: !6, line: 121, type: !107, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !107 = !DISubroutineType(types: !108) !108 = !{!109, !109} !109 = !DIBasicType(name: "long int", size: 64, align: 64, encoding: DW_ATE_signed) !110 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !111, line: 229) !111 = !DISubprogram(name: "ldexp", linkageName: "_ZL5ldexpfi", scope: !6, file: !6, line: 123, type: !112, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !112 = !DISubroutineType(types: !113) !113 = !{!15, !15, !70} !114 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !115, line: 230) !115 = !DISubprogram(name: "lgamma", linkageName: "_ZL6lgammaf", scope: !6, file: !6, line: 125, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !116 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !117, line: 231) !117 = !DISubprogram(name: "llabs", linkageName: "_ZL5llabsx", scope: !6, file: !6, line: 126, type: !8, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !118 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !119, line: 232) !119 = !DISubprogram(name: "llrint", linkageName: "_ZL6llrintf", scope: !6, file: !6, line: 128, type: !120, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !120 = !DISubroutineType(types: !121) !121 = !{!10, !15} !122 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !123, line: 233) !123 = !DISubprogram(name: "log", linkageName: "_ZL3logf", scope: !6, file: !6, line: 138, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !124 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !125, line: 234) !125 = !DISubprogram(name: "log10", linkageName: "_ZL5log10f", scope: !6, file: !6, line: 130, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !126 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !127, line: 235) !127 = !DISubprogram(name: "log1p", linkageName: "_ZL5log1pf", scope: !6, file: !6, line: 132, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !128 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !129, line: 236) !129 = !DISubprogram(name: "log2", linkageName: "_ZL4log2f", scope: !6, file: !6, line: 134, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !130 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !131, line: 237) !131 = !DISubprogram(name: "logb", linkageName: "_ZL4logbf", scope: !6, file: !6, line: 136, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !132 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !133, line: 238) !133 = !DISubprogram(name: "lrint", linkageName: "_ZL5lrintf", scope: !6, file: !6, line: 140, type: !134, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !134 = !DISubroutineType(types: !135) !135 = !{!109, !15} !136 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !137, line: 239) !137 = !DISubprogram(name: "lround", linkageName: "_ZL6lroundf", scope: !6, file: !6, line: 142, type: !134, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !138 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !139, line: 240) !139 = !DISubprogram(name: "llround", linkageName: "_ZL7llroundf", scope: !6, file: !6, line: 143, type: !120, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !140 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !141, line: 241) !141 = !DISubprogram(name: "modf", linkageName: "_ZL4modffPf", scope: !6, file: !6, line: 145, type: !142, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !142 = !DISubroutineType(types: !143) !143 = !{!15, !15, !144} !144 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !15, size: 64, align: 64) !145 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !146, line: 242) !146 = !DISubprogram(name: "nan", linkageName: "_ZL3nanPKc", scope: !6, file: !6, line: 146, type: !147, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !147 = !DISubroutineType(types: !148) !148 = !{!149, !150} !149 = !DIBasicType(name: "double", size: 64, align: 64, encoding: DW_ATE_float) !150 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !151, size: 64, align: 64) !151 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !152) !152 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char) !153 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !154, line: 243) !154 = !DISubprogram(name: "nanf", linkageName: "_ZL4nanfPKc", scope: !6, file: !6, line: 147, type: !155, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !155 = !DISubroutineType(types: !156) !156 = !{!15, !150} !157 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !158, line: 244) !158 = !DISubprogram(name: "nearbyint", linkageName: "_ZL9nearbyintf", scope: !6, file: !6, line: 149, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !159 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !160, line: 245) !160 = !DISubprogram(name: "nextafter", linkageName: "_ZL9nextafterff", scope: !6, file: !6, line: 151, type: !26, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !161 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !162, line: 246) !162 = !DISubprogram(name: "nexttoward", linkageName: "_ZL10nexttowardfd", scope: !6, file: !6, line: 153, type: !163, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !163 = !DISubroutineType(types: !164) !164 = !{!15, !15, !149} !165 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !166, line: 247) !166 = !DISubprogram(name: "pow", linkageName: "_ZL3powfi", scope: !6, file: !6, line: 158, type: !112, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !167 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !168, line: 248) !168 = !DISubprogram(name: "remainder", linkageName: "_ZL9remainderff", scope: !6, file: !6, line: 160, type: !26, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !169 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !170, line: 249) !170 = !DISubprogram(name: "remquo", linkageName: "_ZL6remquoffPi", scope: !6, file: !6, line: 162, type: !171, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !171 = !DISubroutineType(types: !172) !172 = !{!15, !15, !15, !75} !173 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !174, line: 250) !174 = !DISubprogram(name: "rint", linkageName: "_ZL4rintf", scope: !6, file: !6, line: 164, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !175 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !176, line: 251) !176 = !DISubprogram(name: "round", linkageName: "_ZL5roundf", scope: !6, file: !6, line: 166, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !177 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !178, line: 252) !178 = !DISubprogram(name: "scalbln", linkageName: "_ZL7scalblnfl", scope: !6, file: !6, line: 168, type: !179, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !179 = !DISubroutineType(types: !180) !180 = !{!15, !15, !109} !181 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !182, line: 253) !182 = !DISubprogram(name: "scalbn", linkageName: "_ZL6scalbnfi", scope: !6, file: !6, line: 170, type: !112, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !183 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !184, line: 254) !184 = !DISubprogram(name: "signbit", linkageName: "_ZL7signbitf", scope: !6, file: !6, line: 172, type: !82, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !185 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !186, line: 255) !186 = !DISubprogram(name: "sin", linkageName: "_ZL3sinf", scope: !6, file: !6, line: 174, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !187 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !188, line: 256) !188 = !DISubprogram(name: "sinh", linkageName: "_ZL4sinhf", scope: !6, file: !6, line: 176, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !189 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !190, line: 257) !190 = !DISubprogram(name: "sqrt", linkageName: "_ZL4sqrtf", scope: !6, file: !6, line: 178, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !191 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !192, line: 258) !192 = !DISubprogram(name: "tan", linkageName: "_ZL3tanf", scope: !6, file: !6, line: 180, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !193 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !194, line: 259) !194 = !DISubprogram(name: "tanh", linkageName: "_ZL4tanhf", scope: !6, file: !6, line: 182, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !195 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !196, line: 260) !196 = !DISubprogram(name: "tgamma", linkageName: "_ZL6tgammaf", scope: !6, file: !6, line: 184, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !197 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !198, line: 261) !198 = !DISubprogram(name: "trunc", linkageName: "_ZL5truncf", scope: !6, file: !6, line: 186, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !199 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !200, line: 102) !200 = !DISubprogram(name: "acos", scope: !201, file: !201, line: 54, type: !202, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !201 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/mathcalls.h", directory: "/home/taylor/git/coalescingsa-llvm/test/rodinia_3.1/cuda/streamcluster") !202 = !DISubroutineType(types: !203) !203 = !{!149, !149} !204 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !205, line: 121) !205 = !DISubprogram(name: "asin", scope: !201, file: !201, line: 56, type: !202, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !206 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !207, line: 140) !207 = !DISubprogram(name: "atan", scope: !201, file: !201, line: 58, type: !202, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !208 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !209, line: 159) !209 = !DISubprogram(name: "atan2", scope: !201, file: !201, line: 60, type: !210, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !210 = !DISubroutineType(types: !211) !211 = !{!149, !149, !149} !212 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !213, line: 180) !213 = !DISubprogram(name: "ceil", scope: !201, file: !201, line: 178, type: !202, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !214 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !215, line: 199) !215 = !DISubprogram(name: "cos", scope: !201, file: !201, line: 63, type: !202, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !216 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !217, line: 218) !217 = !DISubprogram(name: "cosh", scope: !201, file: !201, line: 72, type: !202, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !218 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !219, line: 237) !219 = !DISubprogram(name: "exp", scope: !201, file: !201, line: 100, type: !202, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !220 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !221, line: 256) !221 = !DISubprogram(name: "fabs", scope: !201, file: !201, line: 181, type: !202, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !222 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !223, line: 275) !223 = !DISubprogram(name: "floor", scope: !201, file: !201, line: 184, type: !202, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !224 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !225, line: 294) !225 = !DISubprogram(name: "fmod", scope: !201, file: !201, line: 187, type: !210, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !226 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !227, line: 315) !227 = !DISubprogram(name: "frexp", scope: !201, file: !201, line: 103, type: !228, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !228 = !DISubroutineType(types: !229) !229 = !{!149, !149, !75} !230 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !231, line: 334) !231 = !DISubprogram(name: "ldexp", scope: !201, file: !201, line: 106, type: !232, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !232 = !DISubroutineType(types: !233) !233 = !{!149, !149, !70} !234 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !235, line: 353) !235 = !DISubprogram(name: "log", scope: !201, file: !201, line: 109, type: !202, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !236 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !237, line: 372) !237 = !DISubprogram(name: "log10", scope: !201, file: !201, line: 112, type: !202, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !238 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !239, line: 391) !239 = !DISubprogram(name: "modf", scope: !201, file: !201, line: 115, type: !240, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !240 = !DISubroutineType(types: !241) !241 = !{!149, !149, !242} !242 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !149, size: 64, align: 64) !243 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !244, line: 403) !244 = !DISubprogram(name: "pow", scope: !201, file: !201, line: 153, type: !210, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !245 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !246, line: 440) !246 = !DISubprogram(name: "sin", scope: !201, file: !201, line: 65, type: !202, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !247 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !248, line: 459) !248 = !DISubprogram(name: "sinh", scope: !201, file: !201, line: 74, type: !202, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !249 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !250, line: 478) !250 = !DISubprogram(name: "sqrt", scope: !201, file: !201, line: 156, type: !202, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !251 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !252, line: 497) !252 = !DISubprogram(name: "tan", scope: !201, file: !201, line: 67, type: !202, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !253 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !254, line: 516) !254 = !DISubprogram(name: "tanh", scope: !201, file: !201, line: 76, type: !202, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !255 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !256, line: 118) !256 = !DIDerivedType(tag: DW_TAG_typedef, name: "div_t", file: !257, line: 101, baseType: !258) !257 = !DIFile(filename: "/usr/include/stdlib.h", directory: "/home/taylor/git/coalescingsa-llvm/test/rodinia_3.1/cuda/streamcluster") !258 = !DICompositeType(tag: DW_TAG_structure_type, file: !257, line: 97, size: 64, align: 32, flags: DIFlagFwdDecl, identifier: "_ZTS5div_t") !259 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !260, line: 119) !260 = !DIDerivedType(tag: DW_TAG_typedef, name: "ldiv_t", file: !257, line: 109, baseType: !261) !261 = distinct !DICompositeType(tag: DW_TAG_structure_type, file: !257, line: 105, size: 128, align: 64, elements: !262, identifier: "_ZTS6ldiv_t") !262 = !{!263, !264} !263 = !DIDerivedType(tag: DW_TAG_member, name: "quot", scope: !261, file: !257, line: 107, baseType: !109, size: 64, align: 64) !264 = !DIDerivedType(tag: DW_TAG_member, name: "rem", scope: !261, file: !257, line: 108, baseType: !109, size: 64, align: 64, offset: 64) !265 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !266, line: 121) !266 = !DISubprogram(name: "abort", scope: !257, file: !257, line: 515, type: !267, isLocal: false, isDefinition: false, flags: DIFlagPrototyped | DIFlagNoReturn, isOptimized: false) !267 = !DISubroutineType(types: !268) !268 = !{null} !269 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !270, line: 122) !270 = !DISubprogram(name: "abs", scope: !257, file: !257, line: 774, type: !271, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !271 = !DISubroutineType(types: !272) !272 = !{!70, !70} !273 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !274, line: 123) !274 = !DISubprogram(name: "atexit", scope: !257, file: !257, line: 519, type: !275, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !275 = !DISubroutineType(types: !276) !276 = !{!70, !277} !277 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !267, size: 64, align: 64) !278 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !279, line: 129) !279 = !DISubprogram(name: "atof", scope: !257, file: !257, line: 144, type: !147, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !280 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !281, line: 130) !281 = !DISubprogram(name: "atoi", scope: !257, file: !257, line: 147, type: !282, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !282 = !DISubroutineType(types: !283) !283 = !{!70, !150} !284 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !285, line: 131) !285 = !DISubprogram(name: "atol", scope: !257, file: !257, line: 150, type: !286, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !286 = !DISubroutineType(types: !287) !287 = !{!109, !150} !288 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !289, line: 132) !289 = !DISubprogram(name: "bsearch", scope: !257, file: !257, line: 754, type: !290, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !290 = !DISubroutineType(types: !291) !291 = !{!292, !293, !293, !295, !295, !298} !292 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64, align: 64) !293 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !294, size: 64, align: 64) !294 = !DIDerivedType(tag: DW_TAG_const_type, baseType: null) !295 = !DIDerivedType(tag: DW_TAG_typedef, name: "size_t", file: !296, line: 62, baseType: !297) !296 = !DIFile(filename: "/usr/local/bin/../lib/clang/4.0.0/include/stddef.h", directory: "/home/taylor/git/coalescingsa-llvm/test/rodinia_3.1/cuda/streamcluster") !297 = !DIBasicType(name: "long unsigned int", size: 64, align: 64, encoding: DW_ATE_unsigned) !298 = !DIDerivedType(tag: DW_TAG_typedef, name: "__compar_fn_t", file: !257, line: 741, baseType: !299) !299 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !300, size: 64, align: 64) !300 = !DISubroutineType(types: !301) !301 = !{!70, !293, !293} !302 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !303, line: 133) !303 = !DISubprogram(name: "calloc", scope: !257, file: !257, line: 468, type: !304, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !304 = !DISubroutineType(types: !305) !305 = !{!292, !295, !295} !306 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !307, line: 134) !307 = !DISubprogram(name: "div", scope: !257, file: !257, line: 788, type: !308, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !308 = !DISubroutineType(types: !309) !309 = !{!256, !70, !70} !310 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !311, line: 135) !311 = !DISubprogram(name: "exit", scope: !257, file: !257, line: 543, type: !312, isLocal: false, isDefinition: false, flags: DIFlagPrototyped | DIFlagNoReturn, isOptimized: false) !312 = !DISubroutineType(types: !313) !313 = !{null, !70} !314 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !315, line: 136) !315 = !DISubprogram(name: "free", scope: !257, file: !257, line: 483, type: !316, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !316 = !DISubroutineType(types: !317) !317 = !{null, !292} !318 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !319, line: 137) !319 = !DISubprogram(name: "getenv", scope: !257, file: !257, line: 564, type: !320, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !320 = !DISubroutineType(types: !321) !321 = !{!322, !150} !322 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !152, size: 64, align: 64) !323 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !324, line: 138) !324 = !DISubprogram(name: "labs", scope: !257, file: !257, line: 775, type: !107, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !325 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !326, line: 139) !326 = !DISubprogram(name: "ldiv", scope: !257, file: !257, line: 790, type: !327, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !327 = !DISubroutineType(types: !328) !328 = !{!260, !109, !109} !329 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !330, line: 140) !330 = !DISubprogram(name: "malloc", scope: !257, file: !257, line: 466, type: !331, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !331 = !DISubroutineType(types: !332) !332 = !{!292, !295} !333 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !334, line: 142) !334 = !DISubprogram(name: "mblen", scope: !257, file: !257, line: 862, type: !335, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !335 = !DISubroutineType(types: !336) !336 = !{!70, !150, !295} !337 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !338, line: 143) !338 = !DISubprogram(name: "mbstowcs", scope: !257, file: !257, line: 873, type: !339, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !339 = !DISubroutineType(types: !340) !340 = !{!295, !341, !344, !295} !341 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !342) !342 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !343, size: 64, align: 64) !343 = !DIBasicType(name: "wchar_t", size: 32, align: 32, encoding: DW_ATE_signed) !344 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !150) !345 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !346, line: 144) !346 = !DISubprogram(name: "mbtowc", scope: !257, file: !257, line: 865, type: !347, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !347 = !DISubroutineType(types: !348) !348 = !{!70, !341, !344, !295} !349 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !350, line: 146) !350 = !DISubprogram(name: "qsort", scope: !257, file: !257, line: 764, type: !351, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !351 = !DISubroutineType(types: !352) !352 = !{null, !292, !295, !295, !298} !353 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !354, line: 152) !354 = !DISubprogram(name: "rand", scope: !257, file: !257, line: 374, type: !355, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !355 = !DISubroutineType(types: !356) !356 = !{!70} !357 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !358, line: 153) !358 = !DISubprogram(name: "realloc", scope: !257, file: !257, line: 480, type: !359, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !359 = !DISubroutineType(types: !360) !360 = !{!292, !292, !295} !361 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !362, line: 154) !362 = !DISubprogram(name: "srand", scope: !257, file: !257, line: 376, type: !363, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !363 = !DISubroutineType(types: !364) !364 = !{null, !365} !365 = !DIBasicType(name: "unsigned int", size: 32, align: 32, encoding: DW_ATE_unsigned) !366 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !367, line: 155) !367 = !DISubprogram(name: "strtod", scope: !257, file: !257, line: 164, type: !368, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !368 = !DISubroutineType(types: !369) !369 = !{!149, !344, !370} !370 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !371) !371 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !322, size: 64, align: 64) !372 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !373, line: 156) !373 = !DISubprogram(name: "strtol", scope: !257, file: !257, line: 183, type: !374, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !374 = !DISubroutineType(types: !375) !375 = !{!109, !344, !370, !70} !376 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !377, line: 157) !377 = !DISubprogram(name: "strtoul", scope: !257, file: !257, line: 187, type: !378, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !378 = !DISubroutineType(types: !379) !379 = !{!297, !344, !370, !70} !380 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !381, line: 158) !381 = !DISubprogram(name: "system", scope: !257, file: !257, line: 716, type: !282, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !382 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !383, line: 160) !383 = !DISubprogram(name: "wcstombs", scope: !257, file: !257, line: 876, type: !384, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !384 = !DISubroutineType(types: !385) !385 = !{!295, !386, !387, !295} !386 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !322) !387 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !388) !388 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !389, size: 64, align: 64) !389 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !343) !390 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !391, line: 161) !391 = !DISubprogram(name: "wctomb", scope: !257, file: !257, line: 869, type: !392, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !392 = !DISubroutineType(types: !393) !393 = !{!70, !322, !343} !394 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !395, entity: !397, line: 214) !395 = !DINamespace(name: "__gnu_cxx", scope: null, file: !396, line: 220) !396 = !DIFile(filename: "/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/x86_64-linux-gnu/c++/5.4.0/bits/c++config.h", directory: "/home/taylor/git/coalescingsa-llvm/test/rodinia_3.1/cuda/streamcluster") !397 = !DIDerivedType(tag: DW_TAG_typedef, name: "lldiv_t", file: !257, line: 121, baseType: !398) !398 = distinct !DICompositeType(tag: DW_TAG_structure_type, file: !257, line: 117, size: 128, align: 64, elements: !399, identifier: "_ZTS7lldiv_t") !399 = !{!400, !401} !400 = !DIDerivedType(tag: DW_TAG_member, name: "quot", scope: !398, file: !257, line: 119, baseType: !10, size: 64, align: 64) !401 = !DIDerivedType(tag: DW_TAG_member, name: "rem", scope: !398, file: !257, line: 120, baseType: !10, size: 64, align: 64, offset: 64) !402 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !395, entity: !403, line: 220) !403 = !DISubprogram(name: "_Exit", scope: !257, file: !257, line: 557, type: !312, isLocal: false, isDefinition: false, flags: DIFlagPrototyped | DIFlagNoReturn, isOptimized: false) !404 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !395, entity: !405, line: 224) !405 = !DISubprogram(name: "llabs", scope: !257, file: !257, line: 779, type: !8, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !406 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !395, entity: !407, line: 230) !407 = !DISubprogram(name: "lldiv", scope: !257, file: !257, line: 796, type: !408, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !408 = !DISubroutineType(types: !409) !409 = !{!397, !10, !10} !410 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !395, entity: !411, line: 241) !411 = !DISubprogram(name: "atoll", scope: !257, file: !257, line: 157, type: !412, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !412 = !DISubroutineType(types: !413) !413 = !{!10, !150} !414 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !395, entity: !415, line: 242) !415 = !DISubprogram(name: "strtoll", scope: !257, file: !257, line: 209, type: !416, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !416 = !DISubroutineType(types: !417) !417 = !{!10, !344, !370, !70} !418 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !395, entity: !419, line: 243) !419 = !DISubprogram(name: "strtoull", scope: !257, file: !257, line: 214, type: !420, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !420 = !DISubroutineType(types: !421) !421 = !{!422, !344, !370, !70} !422 = !DIBasicType(name: "long long unsigned int", size: 64, align: 64, encoding: DW_ATE_unsigned) !423 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !395, entity: !424, line: 245) !424 = !DISubprogram(name: "strtof", scope: !257, file: !257, line: 172, type: !425, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !425 = !DISubroutineType(types: !426) !426 = !{!15, !344, !370} !427 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !395, entity: !428, line: 246) !428 = !DISubprogram(name: "strtold", scope: !257, file: !257, line: 175, type: !429, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !429 = !DISubroutineType(types: !430) !430 = !{!431, !344, !370} !431 = !DIBasicType(name: "long double", size: 64, align: 64, encoding: DW_ATE_float) !432 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !397, line: 254) !433 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !403, line: 256) !434 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !405, line: 258) !435 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !436, line: 259) !436 = !DISubprogram(name: "div", linkageName: "_ZN9__gnu_cxx3divExx", scope: !395, file: !437, line: 227, type: !408, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !437 = !DIFile(filename: "/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/cstdlib", directory: "/home/taylor/git/coalescingsa-llvm/test/rodinia_3.1/cuda/streamcluster") !438 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !407, line: 260) !439 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !411, line: 262) !440 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !424, line: 263) !441 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !415, line: 264) !442 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !419, line: 265) !443 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !428, line: 266) !444 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !445, line: 397) !445 = !DISubprogram(name: "acosf", linkageName: "_ZL5acosff", scope: !446, file: !446, line: 1342, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !446 = !DIFile(filename: "/usr/local/cuda/include/math_functions.hpp", directory: "/home/taylor/git/coalescingsa-llvm/test/rodinia_3.1/cuda/streamcluster") !447 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !448, line: 398) !448 = !DISubprogram(name: "acoshf", linkageName: "_ZL6acoshff", scope: !446, file: !446, line: 1370, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !449 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !450, line: 399) !450 = !DISubprogram(name: "asinf", linkageName: "_ZL5asinff", scope: !446, file: !446, line: 1337, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !451 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !452, line: 400) !452 = !DISubprogram(name: "asinhf", linkageName: "_ZL6asinhff", scope: !446, file: !446, line: 1375, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !453 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !454, line: 401) !454 = !DISubprogram(name: "atan2f", linkageName: "_ZL6atan2fff", scope: !446, file: !446, line: 1327, type: !26, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !455 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !456, line: 402) !456 = !DISubprogram(name: "atanf", linkageName: "_ZL5atanff", scope: !446, file: !446, line: 1332, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !457 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !458, line: 403) !458 = !DISubprogram(name: "atanhf", linkageName: "_ZL6atanhff", scope: !446, file: !446, line: 1380, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !459 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !460, line: 404) !460 = !DISubprogram(name: "cbrtf", linkageName: "_ZL5cbrtff", scope: !446, file: !446, line: 1430, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !461 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !462, line: 405) !462 = !DISubprogram(name: "ceilf", linkageName: "_ZL5ceilff", scope: !463, file: !463, line: 667, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !463 = !DIFile(filename: "/usr/local/cuda/include/device_functions.hpp", directory: "/home/taylor/git/coalescingsa-llvm/test/rodinia_3.1/cuda/streamcluster") !464 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !465, line: 406) !465 = !DISubprogram(name: "copysignf", linkageName: "_ZL9copysignfff", scope: !446, file: !446, line: 1189, type: !26, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !466 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !467, line: 407) !467 = !DISubprogram(name: "cosf", linkageName: "_ZL4cosff", scope: !446, file: !446, line: 1243, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !468 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !469, line: 408) !469 = !DISubprogram(name: "coshf", linkageName: "_ZL5coshff", scope: !446, file: !446, line: 1312, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !470 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !471, line: 409) !471 = !DISubprogram(name: "erfcf", linkageName: "_ZL5erfcff", scope: !446, file: !446, line: 1490, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !472 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !473, line: 410) !473 = !DISubprogram(name: "erff", linkageName: "_ZL4erfff", scope: !446, file: !446, line: 1480, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !474 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !475, line: 411) !475 = !DISubprogram(name: "exp2f", linkageName: "_ZL5exp2ff", scope: !463, file: !463, line: 657, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !476 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !477, line: 412) !477 = !DISubprogram(name: "expf", linkageName: "_ZL4expff", scope: !446, file: !446, line: 1294, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !478 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !479, line: 413) !479 = !DISubprogram(name: "expm1f", linkageName: "_ZL6expm1ff", scope: !446, file: !446, line: 1385, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !480 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !481, line: 414) !481 = !DISubprogram(name: "fabsf", linkageName: "_ZL5fabsff", scope: !463, file: !463, line: 607, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !482 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !483, line: 415) !483 = !DISubprogram(name: "fdimf", linkageName: "_ZL5fdimfff", scope: !446, file: !446, line: 1616, type: !26, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !484 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !485, line: 416) !485 = !DISubprogram(name: "floorf", linkageName: "_ZL6floorff", scope: !463, file: !463, line: 597, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !486 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !487, line: 417) !487 = !DISubprogram(name: "fmaf", linkageName: "_ZL4fmaffff", scope: !446, file: !446, line: 1568, type: !58, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !488 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !489, line: 418) !489 = !DISubprogram(name: "fmaxf", linkageName: "_ZL5fmaxfff", scope: !463, file: !463, line: 622, type: !26, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !490 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !491, line: 419) !491 = !DISubprogram(name: "fminf", linkageName: "_ZL5fminfff", scope: !463, file: !463, line: 617, type: !26, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !492 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !493, line: 420) !493 = !DISubprogram(name: "fmodf", linkageName: "_ZL5fmodfff", scope: !446, file: !446, line: 1553, type: !26, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !494 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !495, line: 421) !495 = !DISubprogram(name: "frexpf", linkageName: "_ZL6frexpffPi", scope: !446, file: !446, line: 1543, type: !73, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !496 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !497, line: 422) !497 = !DISubprogram(name: "hypotf", linkageName: "_ZL6hypotfff", scope: !446, file: !446, line: 1390, type: !26, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !498 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !499, line: 423) !499 = !DISubprogram(name: "ilogbf", linkageName: "_ZL6ilogbff", scope: !446, file: !446, line: 1621, type: !68, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !500 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !501, line: 424) !501 = !DISubprogram(name: "ldexpf", linkageName: "_ZL6ldexpffi", scope: !446, file: !446, line: 1520, type: !112, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !502 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !503, line: 425) !503 = !DISubprogram(name: "lgammaf", linkageName: "_ZL7lgammaff", scope: !446, file: !446, line: 1515, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !504 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !505, line: 426) !505 = !DISubprogram(name: "llrintf", linkageName: "_ZL7llrintff", scope: !446, file: !446, line: 1149, type: !120, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !506 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !507, line: 427) !507 = !DISubprogram(name: "llroundf", linkageName: "_ZL8llroundff", scope: !446, file: !446, line: 1602, type: !120, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !508 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !509, line: 428) !509 = !DISubprogram(name: "log10f", linkageName: "_ZL6log10ff", scope: !446, file: !446, line: 1356, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !510 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !511, line: 429) !511 = !DISubprogram(name: "log1pf", linkageName: "_ZL6log1pff", scope: !446, file: !446, line: 1365, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !512 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !513, line: 430) !513 = !DISubprogram(name: "log2f", linkageName: "_ZL5log2ff", scope: !446, file: !446, line: 1285, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !514 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !515, line: 431) !515 = !DISubprogram(name: "logbf", linkageName: "_ZL5logbff", scope: !446, file: !446, line: 1626, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !516 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !517, line: 432) !517 = !DISubprogram(name: "logf", linkageName: "_ZL4logff", scope: !446, file: !446, line: 1347, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !518 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !519, line: 433) !519 = !DISubprogram(name: "lrintf", linkageName: "_ZL6lrintff", scope: !446, file: !446, line: 1140, type: !134, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !520 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !521, line: 434) !521 = !DISubprogram(name: "lroundf", linkageName: "_ZL7lroundff", scope: !446, file: !446, line: 1607, type: !134, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !522 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !523, line: 435) !523 = !DISubprogram(name: "modff", linkageName: "_ZL5modfffPf", scope: !446, file: !446, line: 1548, type: !142, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !524 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !525, line: 436) !525 = !DISubprogram(name: "nearbyintf", linkageName: "_ZL10nearbyintff", scope: !446, file: !446, line: 1154, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !526 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !527, line: 437) !527 = !DISubprogram(name: "nextafterf", linkageName: "_ZL10nextafterfff", scope: !446, file: !446, line: 1218, type: !26, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !528 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !529, line: 438) !529 = !DISubprogram(name: "nexttowardf", scope: !201, file: !201, line: 294, type: !530, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !530 = !DISubroutineType(types: !531) !531 = !{!15, !15, !431} !532 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !529, line: 439) !533 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !534, line: 440) !534 = !DISubprogram(name: "powf", linkageName: "_ZL4powfff", scope: !446, file: !446, line: 1583, type: !26, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !535 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !536, line: 441) !536 = !DISubprogram(name: "remainderf", linkageName: "_ZL10remainderfff", scope: !446, file: !446, line: 1558, type: !26, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !537 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !538, line: 442) !538 = !DISubprogram(name: "remquof", linkageName: "_ZL7remquofffPi", scope: !446, file: !446, line: 1563, type: !171, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !539 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !540, line: 443) !540 = !DISubprogram(name: "rintf", linkageName: "_ZL5rintff", scope: !446, file: !446, line: 1135, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !541 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !542, line: 444) !542 = !DISubprogram(name: "roundf", linkageName: "_ZL6roundff", scope: !446, file: !446, line: 1597, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !543 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !544, line: 445) !544 = !DISubprogram(name: "scalblnf", linkageName: "_ZL8scalblnffl", scope: !446, file: !446, line: 1530, type: !179, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !545 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !546, line: 446) !546 = !DISubprogram(name: "scalbnf", linkageName: "_ZL7scalbnffi", scope: !446, file: !446, line: 1525, type: !112, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !547 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !548, line: 447) !548 = !DISubprogram(name: "sinf", linkageName: "_ZL4sinff", scope: !446, file: !446, line: 1234, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !549 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !550, line: 448) !550 = !DISubprogram(name: "sinhf", linkageName: "_ZL5sinhff", scope: !446, file: !446, line: 1317, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !551 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !552, line: 449) !552 = !DISubprogram(name: "sqrtf", linkageName: "_ZL5sqrtff", scope: !463, file: !463, line: 907, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !553 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !554, line: 450) !554 = !DISubprogram(name: "tanf", linkageName: "_ZL4tanff", scope: !446, file: !446, line: 1276, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !555 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !556, line: 451) !556 = !DISubprogram(name: "tanhf", linkageName: "_ZL5tanhff", scope: !446, file: !446, line: 1322, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !557 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !558, line: 452) !558 = !DISubprogram(name: "tgammaf", linkageName: "_ZL7tgammaff", scope: !446, file: !446, line: 1592, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !559 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !560, line: 453) !560 = !DISubprogram(name: "truncf", linkageName: "_ZL6truncff", scope: !463, file: !463, line: 662, type: !13, isLocal: true, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !561 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !562, line: 64) !562 = !DIDerivedType(tag: DW_TAG_typedef, name: "mbstate_t", file: !563, line: 106, baseType: !564) !563 = !DIFile(filename: "/usr/include/wchar.h", directory: "/home/taylor/git/coalescingsa-llvm/test/rodinia_3.1/cuda/streamcluster") !564 = !DIDerivedType(tag: DW_TAG_typedef, name: "__mbstate_t", file: !563, line: 94, baseType: !565) !565 = distinct !DICompositeType(tag: DW_TAG_structure_type, file: !563, line: 82, size: 64, align: 32, elements: !566, identifier: "_ZTS11__mbstate_t") !566 = !{!567, !568} !567 = !DIDerivedType(tag: DW_TAG_member, name: "__count", scope: !565, file: !563, line: 84, baseType: !70, size: 32, align: 32) !568 = !DIDerivedType(tag: DW_TAG_member, name: "__value", scope: !565, file: !563, line: 93, baseType: !569, size: 32, align: 32, offset: 32) !569 = distinct !DICompositeType(tag: DW_TAG_union_type, scope: !565, file: !563, line: 85, size: 32, align: 32, elements: !570, identifier: "_ZTSN11__mbstate_tUt_E") !570 = !{!571, !572} !571 = !DIDerivedType(tag: DW_TAG_member, name: "__wch", scope: !569, file: !563, line: 88, baseType: !365, size: 32, align: 32) !572 = !DIDerivedType(tag: DW_TAG_member, name: "__wchb", scope: !569, file: !563, line: 92, baseType: !573, size: 32, align: 8) !573 = !DICompositeType(tag: DW_TAG_array_type, baseType: !152, size: 32, align: 8, elements: !574) !574 = !{!575} !575 = !DISubrange(count: 4) !576 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !577, line: 139) !577 = !DIDerivedType(tag: DW_TAG_typedef, name: "wint_t", file: !296, line: 132, baseType: !365) !578 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !579, line: 141) !579 = !DISubprogram(name: "btowc", scope: !563, file: !563, line: 356, type: !580, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !580 = !DISubroutineType(types: !581) !581 = !{!577, !70} !582 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !583, line: 142) !583 = !DISubprogram(name: "fgetwc", scope: !563, file: !563, line: 748, type: !584, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !584 = !DISubroutineType(types: !585) !585 = !{!577, !586} !586 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !587, size: 64, align: 64) !587 = !DIDerivedType(tag: DW_TAG_typedef, name: "__FILE", file: !588, line: 64, baseType: !589) !588 = !DIFile(filename: "/usr/include/stdio.h", directory: "/home/taylor/git/coalescingsa-llvm/test/rodinia_3.1/cuda/streamcluster") !589 = !DICompositeType(tag: DW_TAG_structure_type, name: "_IO_FILE", file: !590, line: 241, size: 1728, align: 64, flags: DIFlagFwdDecl, identifier: "_ZTS8_IO_FILE") !590 = !DIFile(filename: "/usr/include/libio.h", directory: "/home/taylor/git/coalescingsa-llvm/test/rodinia_3.1/cuda/streamcluster") !591 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !592, line: 143) !592 = !DISubprogram(name: "fgetws", scope: !563, file: !563, line: 777, type: !593, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !593 = !DISubroutineType(types: !594) !594 = !{!342, !341, !70, !595} !595 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !586) !596 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !597, line: 144) !597 = !DISubprogram(name: "fputwc", scope: !563, file: !563, line: 762, type: !598, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !598 = !DISubroutineType(types: !599) !599 = !{!577, !343, !586} !600 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !601, line: 145) !601 = !DISubprogram(name: "fputws", scope: !563, file: !563, line: 784, type: !602, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !602 = !DISubroutineType(types: !603) !603 = !{!70, !387, !595} !604 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !605, line: 146) !605 = !DISubprogram(name: "fwide", scope: !563, file: !563, line: 590, type: !606, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !606 = !DISubroutineType(types: !607) !607 = !{!70, !586, !70} !608 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !609, line: 147) !609 = !DISubprogram(name: "fwprintf", scope: !563, file: !563, line: 597, type: !610, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !610 = !DISubroutineType(types: !611) !611 = !{!70, !595, !387, null} !612 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !613, line: 148) !613 = !DISubprogram(name: "fwscanf", scope: !563, file: !563, line: 638, type: !610, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !614 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !615, line: 149) !615 = !DISubprogram(name: "getwc", scope: !563, file: !563, line: 749, type: !584, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !616 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !617, line: 150) !617 = !DISubprogram(name: "getwchar", scope: !563, file: !563, line: 755, type: !618, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !618 = !DISubroutineType(types: !619) !619 = !{!577} !620 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !621, line: 151) !621 = !DISubprogram(name: "mbrlen", scope: !563, file: !563, line: 379, type: !622, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !622 = !DISubroutineType(types: !623) !623 = !{!295, !344, !295, !624} !624 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !625) !625 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !562, size: 64, align: 64) !626 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !627, line: 152) !627 = !DISubprogram(name: "mbrtowc", scope: !563, file: !563, line: 368, type: !628, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !628 = !DISubroutineType(types: !629) !629 = !{!295, !341, !344, !295, !624} !630 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !631, line: 153) !631 = !DISubprogram(name: "mbsinit", scope: !563, file: !563, line: 364, type: !632, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !632 = !DISubroutineType(types: !633) !633 = !{!70, !634} !634 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !635, size: 64, align: 64) !635 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !562) !636 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !637, line: 154) !637 = !DISubprogram(name: "mbsrtowcs", scope: !563, file: !563, line: 411, type: !638, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !638 = !DISubroutineType(types: !639) !639 = !{!295, !341, !640, !295, !624} !640 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !641) !641 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !150, size: 64, align: 64) !642 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !643, line: 155) !643 = !DISubprogram(name: "putwc", scope: !563, file: !563, line: 763, type: !598, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !644 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !645, line: 156) !645 = !DISubprogram(name: "putwchar", scope: !563, file: !563, line: 769, type: !646, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !646 = !DISubroutineType(types: !647) !647 = !{!577, !343} !648 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !649, line: 158) !649 = !DISubprogram(name: "swprintf", scope: !563, file: !563, line: 607, type: !650, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !650 = !DISubroutineType(types: !651) !651 = !{!70, !341, !295, !387, null} !652 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !653, line: 160) !653 = !DISubprogram(name: "swscanf", scope: !563, file: !563, line: 648, type: !654, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !654 = !DISubroutineType(types: !655) !655 = !{!70, !387, !387, null} !656 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !657, line: 161) !657 = !DISubprogram(name: "ungetwc", scope: !563, file: !563, line: 792, type: !658, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !658 = !DISubroutineType(types: !659) !659 = !{!577, !577, !586} !660 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !661, line: 162) !661 = !DISubprogram(name: "vfwprintf", scope: !563, file: !563, line: 615, type: !662, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !662 = !DISubroutineType(types: !663) !663 = !{!70, !595, !387, !664} !664 = !DIDerivedType(tag: DW_TAG_typedef, name: "__gnuc_va_list", file: !665, line: 50, baseType: !666) !665 = !DIFile(filename: "/usr/local/bin/../lib/clang/4.0.0/include/stdarg.h", directory: "/home/taylor/git/coalescingsa-llvm/test/rodinia_3.1/cuda/streamcluster") !666 = !DIDerivedType(tag: DW_TAG_typedef, name: "__builtin_va_list", file: !1, baseType: !322) !667 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !668, line: 164) !668 = !DISubprogram(name: "vfwscanf", scope: !563, file: !563, line: 692, type: !662, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !669 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !670, line: 167) !670 = !DISubprogram(name: "vswprintf", scope: !563, file: !563, line: 628, type: !671, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !671 = !DISubroutineType(types: !672) !672 = !{!70, !341, !295, !387, !664} !673 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !674, line: 170) !674 = !DISubprogram(name: "vswscanf", scope: !563, file: !563, line: 704, type: !675, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !675 = !DISubroutineType(types: !676) !676 = !{!70, !387, !387, !664} !677 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !678, line: 172) !678 = !DISubprogram(name: "vwprintf", scope: !563, file: !563, line: 623, type: !679, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !679 = !DISubroutineType(types: !680) !680 = !{!70, !387, !664} !681 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !682, line: 174) !682 = !DISubprogram(name: "vwscanf", scope: !563, file: !563, line: 700, type: !679, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !683 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !684, line: 176) !684 = !DISubprogram(name: "wcrtomb", scope: !563, file: !563, line: 373, type: !685, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !685 = !DISubroutineType(types: !686) !686 = !{!295, !386, !343, !624} !687 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !688, line: 177) !688 = !DISubprogram(name: "wcscat", scope: !563, file: !563, line: 157, type: !689, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !689 = !DISubroutineType(types: !690) !690 = !{!342, !341, !387} !691 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !692, line: 178) !692 = !DISubprogram(name: "wcscmp", scope: !563, file: !563, line: 166, type: !693, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !693 = !DISubroutineType(types: !694) !694 = !{!70, !388, !388} !695 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !696, line: 179) !696 = !DISubprogram(name: "wcscoll", scope: !563, file: !563, line: 195, type: !693, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !697 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !698, line: 180) !698 = !DISubprogram(name: "wcscpy", scope: !563, file: !563, line: 147, type: !689, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !699 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !700, line: 181) !700 = !DISubprogram(name: "wcscspn", scope: !563, file: !563, line: 255, type: !701, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !701 = !DISubroutineType(types: !702) !702 = !{!295, !388, !388} !703 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !704, line: 182) !704 = !DISubprogram(name: "wcsftime", scope: !563, file: !563, line: 858, type: !705, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !705 = !DISubroutineType(types: !706) !706 = !{!295, !341, !295, !387, !707} !707 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !708) !708 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !709, size: 64, align: 64) !709 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !710) !710 = !DICompositeType(tag: DW_TAG_structure_type, name: "tm", file: !563, line: 137, flags: DIFlagFwdDecl, identifier: "_ZTS2tm") !711 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !712, line: 183) !712 = !DISubprogram(name: "wcslen", scope: !563, file: !563, line: 290, type: !713, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !713 = !DISubroutineType(types: !714) !714 = !{!295, !388} !715 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !716, line: 184) !716 = !DISubprogram(name: "wcsncat", scope: !563, file: !563, line: 161, type: !717, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !717 = !DISubroutineType(types: !718) !718 = !{!342, !341, !387, !295} !719 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !720, line: 185) !720 = !DISubprogram(name: "wcsncmp", scope: !563, file: !563, line: 169, type: !721, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !721 = !DISubroutineType(types: !722) !722 = !{!70, !388, !388, !295} !723 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !724, line: 186) !724 = !DISubprogram(name: "wcsncpy", scope: !563, file: !563, line: 152, type: !717, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !725 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !726, line: 187) !726 = !DISubprogram(name: "wcsrtombs", scope: !563, file: !563, line: 417, type: !727, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !727 = !DISubroutineType(types: !728) !728 = !{!295, !386, !729, !295, !624} !729 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !730) !730 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !388, size: 64, align: 64) !731 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !732, line: 188) !732 = !DISubprogram(name: "wcsspn", scope: !563, file: !563, line: 259, type: !701, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !733 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !734, line: 189) !734 = !DISubprogram(name: "wcstod", scope: !563, file: !563, line: 453, type: !735, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !735 = !DISubroutineType(types: !736) !736 = !{!149, !387, !737} !737 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !738) !738 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !342, size: 64, align: 64) !739 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !740, line: 191) !740 = !DISubprogram(name: "wcstof", scope: !563, file: !563, line: 460, type: !741, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !741 = !DISubroutineType(types: !742) !742 = !{!15, !387, !737} !743 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !744, line: 193) !744 = !DISubprogram(name: "wcstok", scope: !563, file: !563, line: 285, type: !745, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !745 = !DISubroutineType(types: !746) !746 = !{!342, !341, !387, !737} !747 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !748, line: 194) !748 = !DISubprogram(name: "wcstol", scope: !563, file: !563, line: 471, type: !749, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !749 = !DISubroutineType(types: !750) !750 = !{!109, !387, !737, !70} !751 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !752, line: 195) !752 = !DISubprogram(name: "wcstoul", scope: !563, file: !563, line: 476, type: !753, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !753 = !DISubroutineType(types: !754) !754 = !{!297, !387, !737, !70} !755 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !756, line: 196) !756 = !DISubprogram(name: "wcsxfrm", scope: !563, file: !563, line: 199, type: !757, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !757 = !DISubroutineType(types: !758) !758 = !{!295, !341, !387, !295} !759 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !760, line: 197) !760 = !DISubprogram(name: "wctob", scope: !563, file: !563, line: 360, type: !761, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !761 = !DISubroutineType(types: !762) !762 = !{!70, !577} !763 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !764, line: 198) !764 = !DISubprogram(name: "wmemcmp", scope: !563, file: !563, line: 328, type: !721, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !765 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !766, line: 199) !766 = !DISubprogram(name: "wmemcpy", scope: !563, file: !563, line: 332, type: !717, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !767 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !768, line: 200) !768 = !DISubprogram(name: "wmemmove", scope: !563, file: !563, line: 337, type: !769, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !769 = !DISubroutineType(types: !770) !770 = !{!342, !342, !388, !295} !771 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !772, line: 201) !772 = !DISubprogram(name: "wmemset", scope: !563, file: !563, line: 341, type: !773, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !773 = !DISubroutineType(types: !774) !774 = !{!342, !342, !343, !295} !775 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !776, line: 202) !776 = !DISubprogram(name: "wprintf", scope: !563, file: !563, line: 604, type: !777, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !777 = !DISubroutineType(types: !778) !778 = !{!70, !387, null} !779 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !780, line: 203) !780 = !DISubprogram(name: "wscanf", scope: !563, file: !563, line: 645, type: !777, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !781 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !782, line: 204) !782 = !DISubprogram(name: "wcschr", scope: !563, file: !563, line: 230, type: !783, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !783 = !DISubroutineType(types: !784) !784 = !{!342, !388, !343} !785 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !786, line: 205) !786 = !DISubprogram(name: "wcspbrk", scope: !563, file: !563, line: 269, type: !787, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !787 = !DISubroutineType(types: !788) !788 = !{!342, !388, !388} !789 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !790, line: 206) !790 = !DISubprogram(name: "wcsrchr", scope: !563, file: !563, line: 240, type: !783, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !791 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !792, line: 207) !792 = !DISubprogram(name: "wcsstr", scope: !563, file: !563, line: 280, type: !787, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !793 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !794, line: 208) !794 = !DISubprogram(name: "wmemchr", scope: !563, file: !563, line: 323, type: !795, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !795 = !DISubroutineType(types: !796) !796 = !{!342, !388, !343, !295} !797 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !395, entity: !798, line: 248) !798 = !DISubprogram(name: "wcstold", scope: !563, file: !563, line: 462, type: !799, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !799 = !DISubroutineType(types: !800) !800 = !{!431, !387, !737} !801 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !395, entity: !802, line: 257) !802 = !DISubprogram(name: "wcstoll", scope: !563, file: !563, line: 486, type: !803, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !803 = !DISubroutineType(types: !804) !804 = !{!10, !387, !737, !70} !805 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !395, entity: !806, line: 258) !806 = !DISubprogram(name: "wcstoull", scope: !563, file: !563, line: 493, type: !807, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !807 = !DISubroutineType(types: !808) !808 = !{!422, !387, !737, !70} !809 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !798, line: 264) !810 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !802, line: 265) !811 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !806, line: 266) !812 = !DIImportedEntity(tag: DW_TAG_imported_module, scope: !813, entity: !815, line: 56) !813 = !DINamespace(name: "__gnu_debug", scope: null, file: !814, line: 54) !814 = !DIFile(filename: "/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/debug/debug.h", directory: "/home/taylor/git/coalescingsa-llvm/test/rodinia_3.1/cuda/streamcluster") !815 = !DINamespace(name: "__debug", scope: !5, file: !814, line: 48) !816 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !817, line: 53) !817 = !DICompositeType(tag: DW_TAG_structure_type, name: "lconv", file: !818, line: 53, size: 768, align: 64, flags: DIFlagFwdDecl, identifier: "_ZTS5lconv") !818 = !DIFile(filename: "/usr/include/locale.h", directory: "/home/taylor/git/coalescingsa-llvm/test/rodinia_3.1/cuda/streamcluster") !819 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !820, line: 54) !820 = !DISubprogram(name: "setlocale", scope: !818, file: !818, line: 124, type: !821, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !821 = !DISubroutineType(types: !822) !822 = !{!322, !70, !150} !823 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !824, line: 55) !824 = !DISubprogram(name: "localeconv", scope: !818, file: !818, line: 127, type: !825, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !825 = !DISubroutineType(types: !826) !826 = !{!827} !827 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !817, size: 64, align: 64) !828 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !829, line: 64) !829 = !DISubprogram(name: "isalnum", scope: !830, file: !830, line: 110, type: !271, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !830 = !DIFile(filename: "/usr/include/ctype.h", directory: "/home/taylor/git/coalescingsa-llvm/test/rodinia_3.1/cuda/streamcluster") !831 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !832, line: 65) !832 = !DISubprogram(name: "isalpha", scope: !830, file: !830, line: 111, type: !271, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !833 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !834, line: 66) !834 = !DISubprogram(name: "iscntrl", scope: !830, file: !830, line: 112, type: !271, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !835 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !836, line: 67) !836 = !DISubprogram(name: "isdigit", scope: !830, file: !830, line: 113, type: !271, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !837 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !838, line: 68) !838 = !DISubprogram(name: "isgraph", scope: !830, file: !830, line: 115, type: !271, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !839 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !840, line: 69) !840 = !DISubprogram(name: "islower", scope: !830, file: !830, line: 114, type: !271, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !841 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !842, line: 70) !842 = !DISubprogram(name: "isprint", scope: !830, file: !830, line: 116, type: !271, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !843 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !844, line: 71) !844 = !DISubprogram(name: "ispunct", scope: !830, file: !830, line: 117, type: !271, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !845 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !846, line: 72) !846 = !DISubprogram(name: "isspace", scope: !830, file: !830, line: 118, type: !271, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !847 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !848, line: 73) !848 = !DISubprogram(name: "isupper", scope: !830, file: !830, line: 119, type: !271, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !849 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !850, line: 74) !850 = !DISubprogram(name: "isxdigit", scope: !830, file: !830, line: 120, type: !271, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !851 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !852, line: 75) !852 = !DISubprogram(name: "tolower", scope: !830, file: !830, line: 124, type: !271, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !853 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !854, line: 76) !854 = !DISubprogram(name: "toupper", scope: !830, file: !830, line: 127, type: !271, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !855 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !395, entity: !856, line: 44) !856 = !DIDerivedType(tag: DW_TAG_typedef, name: "size_t", scope: !5, file: !396, line: 196, baseType: !297) !857 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !395, entity: !858, line: 45) !858 = !DIDerivedType(tag: DW_TAG_typedef, name: "ptrdiff_t", scope: !5, file: !396, line: 197, baseType: !109) !859 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !860, line: 82) !860 = !DIDerivedType(tag: DW_TAG_typedef, name: "wctrans_t", file: !861, line: 186, baseType: !862) !861 = !DIFile(filename: "/usr/include/wctype.h", directory: "/home/taylor/git/coalescingsa-llvm/test/rodinia_3.1/cuda/streamcluster") !862 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !863, size: 64, align: 64) !863 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !864) !864 = !DIDerivedType(tag: DW_TAG_typedef, name: "__int32_t", file: !865, line: 40, baseType: !70) !865 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/types.h", directory: "/home/taylor/git/coalescingsa-llvm/test/rodinia_3.1/cuda/streamcluster") !866 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !867, line: 83) !867 = !DIDerivedType(tag: DW_TAG_typedef, name: "wctype_t", file: !861, line: 52, baseType: !297) !868 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !577, line: 84) !869 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !870, line: 86) !870 = !DISubprogram(name: "iswalnum", scope: !861, file: !861, line: 111, type: !761, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !871 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !872, line: 87) !872 = !DISubprogram(name: "iswalpha", scope: !861, file: !861, line: 117, type: !761, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !873 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !874, line: 89) !874 = !DISubprogram(name: "iswblank", scope: !861, file: !861, line: 162, type: !761, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !875 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !876, line: 91) !876 = !DISubprogram(name: "iswcntrl", scope: !861, file: !861, line: 120, type: !761, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !877 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !878, line: 92) !878 = !DISubprogram(name: "iswctype", scope: !861, file: !861, line: 175, type: !879, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !879 = !DISubroutineType(types: !880) !880 = !{!70, !577, !867} !881 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !882, line: 93) !882 = !DISubprogram(name: "iswdigit", scope: !861, file: !861, line: 124, type: !761, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !883 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !884, line: 94) !884 = !DISubprogram(name: "iswgraph", scope: !861, file: !861, line: 128, type: !761, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !885 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !886, line: 95) !886 = !DISubprogram(name: "iswlower", scope: !861, file: !861, line: 133, type: !761, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !887 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !888, line: 96) !888 = !DISubprogram(name: "iswprint", scope: !861, file: !861, line: 136, type: !761, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !889 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !890, line: 97) !890 = !DISubprogram(name: "iswpunct", scope: !861, file: !861, line: 141, type: !761, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !891 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !892, line: 98) !892 = !DISubprogram(name: "iswspace", scope: !861, file: !861, line: 146, type: !761, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !893 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !894, line: 99) !894 = !DISubprogram(name: "iswupper", scope: !861, file: !861, line: 151, type: !761, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !895 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !896, line: 100) !896 = !DISubprogram(name: "iswxdigit", scope: !861, file: !861, line: 156, type: !761, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !897 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !898, line: 101) !898 = !DISubprogram(name: "towctrans", scope: !861, file: !861, line: 221, type: !899, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !899 = !DISubroutineType(types: !900) !900 = !{!577, !577, !860} !901 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !902, line: 102) !902 = !DISubprogram(name: "towlower", scope: !861, file: !861, line: 194, type: !903, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !903 = !DISubroutineType(types: !904) !904 = !{!577, !577} !905 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !906, line: 103) !906 = !DISubprogram(name: "towupper", scope: !861, file: !861, line: 197, type: !903, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !907 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !908, line: 104) !908 = !DISubprogram(name: "wctrans", scope: !861, file: !861, line: 218, type: !909, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !909 = !DISubroutineType(types: !910) !910 = !{!860, !150} !911 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !912, line: 105) !912 = !DISubprogram(name: "wctype", scope: !861, file: !861, line: 171, type: !913, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !913 = !DISubroutineType(types: !914) !914 = !{!867, !150} !915 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !916, line: 98) !916 = !DIDerivedType(tag: DW_TAG_typedef, name: "FILE", file: !588, line: 48, baseType: !589) !917 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !918, line: 99) !918 = !DIDerivedType(tag: DW_TAG_typedef, name: "fpos_t", file: !588, line: 110, baseType: !919) !919 = !DIDerivedType(tag: DW_TAG_typedef, name: "_G_fpos_t", file: !920, line: 25, baseType: !921) !920 = !DIFile(filename: "/usr/include/_G_config.h", directory: "/home/taylor/git/coalescingsa-llvm/test/rodinia_3.1/cuda/streamcluster") !921 = !DICompositeType(tag: DW_TAG_structure_type, file: !920, line: 21, size: 128, align: 64, flags: DIFlagFwdDecl, identifier: "_ZTS9_G_fpos_t") !922 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !923, line: 101) !923 = !DISubprogram(name: "clearerr", scope: !588, file: !588, line: 826, type: !924, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !924 = !DISubroutineType(types: !925) !925 = !{null, !926} !926 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !916, size: 64, align: 64) !927 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !928, line: 102) !928 = !DISubprogram(name: "fclose", scope: !588, file: !588, line: 237, type: !929, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !929 = !DISubroutineType(types: !930) !930 = !{!70, !926} !931 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !932, line: 103) !932 = !DISubprogram(name: "feof", scope: !588, file: !588, line: 828, type: !929, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !933 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !934, line: 104) !934 = !DISubprogram(name: "ferror", scope: !588, file: !588, line: 830, type: !929, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !935 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !936, line: 105) !936 = !DISubprogram(name: "fflush", scope: !588, file: !588, line: 242, type: !929, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !937 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !938, line: 106) !938 = !DISubprogram(name: "fgetc", scope: !588, file: !588, line: 531, type: !929, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !939 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !940, line: 107) !940 = !DISubprogram(name: "fgetpos", scope: !588, file: !588, line: 798, type: !941, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !941 = !DISubroutineType(types: !942) !942 = !{!70, !943, !944} !943 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !926) !944 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !945) !945 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !918, size: 64, align: 64) !946 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !947, line: 108) !947 = !DISubprogram(name: "fgets", scope: !588, file: !588, line: 622, type: !948, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !948 = !DISubroutineType(types: !949) !949 = !{!322, !386, !70, !943} !950 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !951, line: 109) !951 = !DISubprogram(name: "fopen", scope: !588, file: !588, line: 272, type: !952, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !952 = !DISubroutineType(types: !953) !953 = !{!926, !344, !344} !954 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !955, line: 110) !955 = !DISubprogram(name: "fprintf", scope: !588, file: !588, line: 356, type: !956, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !956 = !DISubroutineType(types: !957) !957 = !{!70, !943, !344, null} !958 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !959, line: 111) !959 = !DISubprogram(name: "fputc", scope: !588, file: !588, line: 573, type: !960, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !960 = !DISubroutineType(types: !961) !961 = !{!70, !70, !926} !962 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !963, line: 112) !963 = !DISubprogram(name: "fputs", scope: !588, file: !588, line: 689, type: !964, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !964 = !DISubroutineType(types: !965) !965 = !{!70, !344, !943} !966 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !967, line: 113) !967 = !DISubprogram(name: "fread", scope: !588, file: !588, line: 709, type: !968, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !968 = !DISubroutineType(types: !969) !969 = !{!295, !970, !295, !295, !943} !970 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !292) !971 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !972, line: 114) !972 = !DISubprogram(name: "freopen", scope: !588, file: !588, line: 278, type: !973, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !973 = !DISubroutineType(types: !974) !974 = !{!926, !344, !344, !943} !975 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !976, line: 115) !976 = !DISubprogram(name: "fscanf", scope: !588, file: !588, line: 425, type: !956, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !977 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !978, line: 116) !978 = !DISubprogram(name: "fseek", scope: !588, file: !588, line: 749, type: !979, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !979 = !DISubroutineType(types: !980) !980 = !{!70, !926, !109, !70} !981 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !982, line: 117) !982 = !DISubprogram(name: "fsetpos", scope: !588, file: !588, line: 803, type: !983, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !983 = !DISubroutineType(types: !984) !984 = !{!70, !926, !985} !985 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !986, size: 64, align: 64) !986 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !918) !987 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !988, line: 118) !988 = !DISubprogram(name: "ftell", scope: !588, file: !588, line: 754, type: !989, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !989 = !DISubroutineType(types: !990) !990 = !{!109, !926} !991 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !992, line: 119) !992 = !DISubprogram(name: "fwrite", scope: !588, file: !588, line: 715, type: !993, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !993 = !DISubroutineType(types: !994) !994 = !{!295, !995, !295, !295, !943} !995 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !293) !996 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !997, line: 120) !997 = !DISubprogram(name: "getc", scope: !588, file: !588, line: 532, type: !929, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !998 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !999, line: 121) !999 = !DISubprogram(name: "getchar", scope: !588, file: !588, line: 538, type: !355, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1000 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1001, line: 124) !1001 = !DISubprogram(name: "gets", scope: !588, file: !588, line: 638, type: !1002, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1002 = !DISubroutineType(types: !1003) !1003 = !{!322, !322} !1004 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1005, line: 126) !1005 = !DISubprogram(name: "perror", scope: !588, file: !588, line: 846, type: !1006, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1006 = !DISubroutineType(types: !1007) !1007 = !{null, !150} !1008 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1009, line: 127) !1009 = !DISubprogram(name: "printf", scope: !588, file: !588, line: 362, type: !1010, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1010 = !DISubroutineType(types: !1011) !1011 = !{!70, !344, null} !1012 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1013, line: 128) !1013 = !DISubprogram(name: "putc", scope: !588, file: !588, line: 574, type: !960, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1014 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1015, line: 129) !1015 = !DISubprogram(name: "putchar", scope: !588, file: !588, line: 580, type: !271, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1016 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1017, line: 130) !1017 = !DISubprogram(name: "puts", scope: !588, file: !588, line: 695, type: !282, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1018 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1019, line: 131) !1019 = !DISubprogram(name: "remove", scope: !588, file: !588, line: 178, type: !282, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1020 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1021, line: 132) !1021 = !DISubprogram(name: "rename", scope: !588, file: !588, line: 180, type: !1022, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1022 = !DISubroutineType(types: !1023) !1023 = !{!70, !150, !150} !1024 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1025, line: 133) !1025 = !DISubprogram(name: "rewind", scope: !588, file: !588, line: 759, type: !924, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1026 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1027, line: 134) !1027 = !DISubprogram(name: "scanf", scope: !588, file: !588, line: 431, type: !1010, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1028 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1029, line: 135) !1029 = !DISubprogram(name: "setbuf", scope: !588, file: !588, line: 332, type: !1030, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1030 = !DISubroutineType(types: !1031) !1031 = !{null, !943, !386} !1032 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1033, line: 136) !1033 = !DISubprogram(name: "setvbuf", scope: !588, file: !588, line: 336, type: !1034, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1034 = !DISubroutineType(types: !1035) !1035 = !{!70, !943, !386, !70, !295} !1036 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1037, line: 137) !1037 = !DISubprogram(name: "sprintf", scope: !588, file: !588, line: 364, type: !1038, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1038 = !DISubroutineType(types: !1039) !1039 = !{!70, !386, !344, null} !1040 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1041, line: 138) !1041 = !DISubprogram(name: "sscanf", scope: !588, file: !588, line: 433, type: !1042, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1042 = !DISubroutineType(types: !1043) !1043 = !{!70, !344, !344, null} !1044 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1045, line: 139) !1045 = !DISubprogram(name: "tmpfile", scope: !588, file: !588, line: 195, type: !1046, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1046 = !DISubroutineType(types: !1047) !1047 = !{!926} !1048 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1049, line: 141) !1049 = !DISubprogram(name: "tmpnam", scope: !588, file: !588, line: 209, type: !1002, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1050 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1051, line: 143) !1051 = !DISubprogram(name: "ungetc", scope: !588, file: !588, line: 702, type: !960, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1052 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1053, line: 144) !1053 = !DISubprogram(name: "vfprintf", scope: !588, file: !588, line: 371, type: !1054, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1054 = !DISubroutineType(types: !1055) !1055 = !{!70, !943, !344, !664} !1056 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1057, line: 145) !1057 = !DISubprogram(name: "vprintf", scope: !588, file: !588, line: 377, type: !1058, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1058 = !DISubroutineType(types: !1059) !1059 = !{!70, !344, !664} !1060 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1061, line: 146) !1061 = !DISubprogram(name: "vsprintf", scope: !588, file: !588, line: 379, type: !1062, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1062 = !DISubroutineType(types: !1063) !1063 = !{!70, !386, !344, !664} !1064 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !395, entity: !1065, line: 175) !1065 = !DISubprogram(name: "snprintf", scope: !588, file: !588, line: 386, type: !1066, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1066 = !DISubroutineType(types: !1067) !1067 = !{!70, !386, !295, !344, null} !1068 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !395, entity: !1069, line: 176) !1069 = !DISubprogram(name: "vfscanf", scope: !588, file: !588, line: 471, type: !1054, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1070 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !395, entity: !1071, line: 177) !1071 = !DISubprogram(name: "vscanf", scope: !588, file: !588, line: 479, type: !1058, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1072 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !395, entity: !1073, line: 178) !1073 = !DISubprogram(name: "vsnprintf", scope: !588, file: !588, line: 390, type: !1074, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1074 = !DISubroutineType(types: !1075) !1075 = !{!70, !386, !295, !344, !664} !1076 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !395, entity: !1077, line: 179) !1077 = !DISubprogram(name: "vsscanf", scope: !588, file: !588, line: 483, type: !1078, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false) !1078 = !DISubroutineType(types: !1079) !1079 = !{!70, !344, !344, !664} !1080 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1065, line: 185) !1081 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1069, line: 186) !1082 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1071, line: 187) !1083 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1073, line: 188) !1084 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1077, line: 189) !1085 = !DIImportedEntity(tag: DW_TAG_imported_module, scope: !0, entity: !5, line: 35) !1086 = !{i32 2, !"Dwarf Version", i32 4} !1087 = !{i32 2, !"Debug Info Version", i32 3} !1088 = !{i32 4, !"nvvm-reflect-ftz", i32 0} !1089 = !{!"clang version 4.0.0 (http://llvm.org/git/clang.git 2debfe67236df81b4b386304d4aecd9fe20fc156) (http://llvm.org/git/llvm.git 9aa8644318b899329caf41dc98a12db04dee5855)"} !1090 = !{i32 1, i32 2} !1091 = !{null, !"align", i32 8} !1092 = !{null, !"align", i32 8, !"align", i32 65544, !"align", i32 131080} !1093 = !{null, !"align", i32 16} !1094 = !{null, !"align", i32 16, !"align", i32 65552, !"align", i32 131088}
import isPowerOfTwo from "../isPowerOfTwo"; describe("isPowerOfTwo", () => { it("should check if the number is made by multiplying twos", () => { expect(isPowerOfTwo(-1)).toBe(false); expect(isPowerOfTwo(0)).toBe(false); expect(isPowerOfTwo(1)).toBe(true); expect(isPowerOfTwo(2)).toBe(true); expect(isPowerOfTwo(3)).toBe(false); expect(isPowerOfTwo(4)).toBe(true); expect(isPowerOfTwo(5)).toBe(false); expect(isPowerOfTwo(6)).toBe(false); expect(isPowerOfTwo(7)).toBe(false); expect(isPowerOfTwo(8)).toBe(true); expect(isPowerOfTwo(10)).toBe(false); expect(isPowerOfTwo(12)).toBe(false); expect(isPowerOfTwo(16)).toBe(true); expect(isPowerOfTwo(31)).toBe(false); expect(isPowerOfTwo(64)).toBe(true); expect(isPowerOfTwo(1024)).toBe(true); expect(isPowerOfTwo(1023)).toBe(false); }); });
UPDATE test SET name = ? WHERE id = ?) CREATE TABLE interleaved_inserts ( id INTEGER PRIMARY KEY, name STRING NOT NULL ) CREATE TABLE testing (id INTEGER PRIMARY KEY, name STRING NOT NULL) SELECT id, name, name FROM test'; SELECT COUNT(*) FROM test')->fetchColumn()); SELECT * FROM test')); CREATE TABLE test ( id INTEGER PRIMARY KEY, name STRING NOT NULL ) SELECT id, name, name FROM test' . PHP_EOL; UPDATE test SET name = :name WHERE id = :id INSERT INTO interleaved_inserts VALUES (null, %s) SELECT * FROM testing'));
//! This module defines the ScanModule, a trait that all scan modules must implement in order //! to be run by ArmorLib. The `ScanModule` trait is available in the root namespace as //! `armorlib::ScanModule`. use errors::ArmorlibError; use scan_object::ScanObject; use finding::Finding; /// A trait that defines the necessary functions for `ScanModule`s to implement. To contribute a /// new scan module, it will also need to be included in `mod.rs` inside the `scan_modules` /// directory. A scan module is a modular component that finds vulnerabilities to privacy and /// security inside `ScanObject`s. The `ScanModule` is the core component of ArmorLib. pub trait ScanModule { /// Scan the given `scan_object` and return either a vector of `Finding`s or, in case of an /// error, an `ArmorlibError`. fn scan(&self, scan_object: &ScanObject) -> Result<Vec<Finding>, ArmorlibError>; /// Return a `Vec` of `&'static str`s indicating the preprocessors that the scan module relies /// on for running. These names should match the name provided by the processor in its `name()` /// function. fn required_preprocessors(&self) -> Vec<&'static str>; /// Returns a tuple containing the name and description of the scan module. fn info(&self) -> (&'static str, &'static str); /// Returns a `&'static str` of the name of the scan module. This information is drawn from /// the information provided by `info()` in its default implementation. fn name(&self) -> &'static str { return self.info().0; } /// Returns a `&'static str` of the description of the scan module. This information is drawn /// from the information provided by `info()` in its default implementation. fn description(&self) -> &'static str { return self.info().1; } /// Returns an `Option<Vec<&'static str>>` of the filetypes that the scan module is subscribed /// to. If a scan module subscribes to a filetype, it will only be run if the data is detected /// to be of any of the subscribed filetypes. If a scan module's `subscribed_filetypes()` /// function returns `None` (default), it will be run for every filetype. /// /// These filetypes must match those defined in `preprocessors/filetype`. fn subscribed_filetypes(&self) -> Option<Vec<&'static str>> { return None; } }
using System; using System.Collections.Generic; using System.Globalization; using System.Text.RegularExpressions; using Newtonsoft.Json; using RippleDotNetCore.Rippled.Helper; namespace RippleDotNetCore.Rippled.Json { public static class Extensions { public static string ToLower(this Enum value) { return value.ToString().ToLower(); } public static string ToJson(this object obj) { var settings = new JsonSerializerSettings { ContractResolver = new SnakeCasePropertyNamesContractResolver(), NullValueHandling = NullValueHandling.Ignore, Converters = new List<JsonConverter>() { new NumericToStringConverter() } }; return JsonConvert.SerializeObject(obj, Formatting.Indented, settings); } public static string ToSnakeCase(this Enum value) { return Regex.Replace(value.ToString(), @"(\w)([A-Z])", "$1_$2").ToLower(); } public static string ToPascalCase(this string value) { return TextHelper.ToTitleCase(value.Replace("_", " ")) .Replace(" ", ""); } } }
package com.wei.android.lib.fingerprintidentify.demo; import android.os.Build; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.TextView; import com.wei.android.lib.fingerprintidentify.FingerprintIdentify; import com.wei.android.lib.fingerprintidentify.base.BaseFingerprint; public class MainActivity extends AppCompatActivity { private TextView mTvTips; private boolean mIsCalledStartIdentify = false; private FingerprintIdentify mFingerprintIdentify; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mTvTips = (TextView) findViewById(R.id.mTvTips); } @Override protected void onResume() { super.onResume(); if (mIsCalledStartIdentify) { mTvTips.append("\nresume identify if needed"); mFingerprintIdentify.resumeIdentify(); return; } mIsCalledStartIdentify = true; mFingerprintIdentify = new FingerprintIdentify(this, new BaseFingerprint .FingerprintIdentifyExceptionListener() { @Override public void onCatchException(Throwable exception) { mTvTips.append("\n" + exception.getLocalizedMessage()); } }); mTvTips.append("手机品牌:" + Build.BRAND); mTvTips.append("\ncreate fingerprintIdentify"); mTvTips.append("\n硬件支持: " + mFingerprintIdentify.isHardwareEnable()); mTvTips.append("\n注册指纹: " + mFingerprintIdentify.isRegisteredFingerprint()); mTvTips.append("\n指纹可用: " + mFingerprintIdentify.isFingerprintEnable()); if (!mFingerprintIdentify.isFingerprintEnable()) { mTvTips.append("\n你的手机不支持此App指纹识别 →_→"); return; } mTvTips.append("\n开始识别\n把你的手指放在传感器"); mFingerprintIdentify.resumeIdentify(); mFingerprintIdentify.startIdentify(3, new BaseFingerprint.FingerprintIdentifyListener() { @Override public void onSucceed() { mTvTips.append("\n识别正确,重启APP再次验证"); } @Override public void onNotMatch(int availableTimes) { mTvTips.append("\n不匹配, 还有" + availableTimes + " 次机会"); } @Override public void onFailed() { mTvTips.append("\n识别失败,重启APP进行重试"); } }); } @Override protected void onPause() { super.onPause(); mTvTips.append("\nrelease"); mFingerprintIdentify.cancelIdentify(); } public void release(View view) { mTvTips.append("\n放弃指纹识别,重启APP再次验证"); mFingerprintIdentify.cancelIdentify(); } }
/*************************************************** This is a library for the MCP23017 i2c port expander These displays use I2C to communicate, 2 pins are required to interface Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit! Written by Limor Fried/Ladyada for Adafruit Industries. BSD license, all text above must be included in any redistribution ****************************************************/ #pragma once #define MCP23017_BASE_ADDRESS 0x20 // registers #define MCP23017_IODIRA 0x00 #define MCP23017_IPOLA 0x02 #define MCP23017_GPINTENA 0x04 #define MCP23017_DEFVALA 0x06 #define MCP23017_INTCONA 0x08 #define MCP23017_IOCONA 0x0A #define MCP23017_GPPUA 0x0C #define MCP23017_INTFA 0x0E #define MCP23017_INTCAPA 0x10 #define MCP23017_GPIOA 0x12 #define MCP23017_OLATA 0x14 #define MCP23017_IODIRB 0x01 #define MCP23017_IPOLB 0x03 #define MCP23017_GPINTENB 0x05 #define MCP23017_DEFVALB 0x07 #define MCP23017_INTCONB 0x09 #define MCP23017_IOCONB 0x0B #define MCP23017_GPPUB 0x0D #define MCP23017_INTFB 0x0F #define MCP23017_INTCAPB 0x11 #define MCP23017_GPIOB 0x13 #define MCP23017_OLATB 0x15 #define MCP23017_INT_ERR 255
About ----- [![Build Status](https://travis-ci.org/hyperion-rt/hyperion.svg)](https://travis-ci.org/hyperion-rt/hyperion?branch=master) [![CircleCI](https://circleci.com/gh/hyperion-rt/hyperion/tree/master.svg?style=svg)](https://circleci.com/gh/hyperion-rt/hyperion/tree/master) [![Documentation Status](https://readthedocs.org/projects/hyperion/badge/?version=stable)](http://docs.hyperion-rt.org/en/stable/?badge=stable) Hyperion is a 3D Monte-Carlo radiation transfer code - see http://www.hyperion-rt.org for more details. Downloading ----------- Stable releases can be found at: https://pypi.python.org/pypi/Hyperion/ To download from the git repository, use: git clone https://github.com/hyperion-rt/hyperion.git cd hyperion git submodule init git submodule update Documentation ------------- To build the HTML documentation: cd docs make html The documentation will then be available at `docs/build/html`. Note that <a href="http://sphinx-doc.org/">Sphinx</a> is required to build the documentation Updating -------- To update your clone of the git repository, use: git pull git submodule update
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. namespace Microsoft.AspNetCore.Http.Metadata { /// <summary> /// Defines a contract for outline the response type returned from an endpoint. /// </summary> public interface IProducesResponseTypeMetadata { /// <summary> /// Gets the optimistic return type of the action. /// </summary> Type? Type { get; } /// <summary> /// Gets the HTTP status code of the response. /// </summary> int StatusCode { get; } /// <summary> /// Gets the content types supported by the metadata. /// </summary> IEnumerable<string> ContentTypes { get; } } }
import '../../../general/TileType.dart'; import '../MoveFinder.dart'; import '../random/RandomAI.dart'; import 'dart:math'; import 'package:tuple/tuple.dart'; import '../../../general/Move.dart'; import '../../../general/Intelligence.dart'; import '../ArtificialIntelligence.dart'; import '../../board/Hexxagon.dart'; class FlatMonteCarloAI extends ArtificialIntelligence { @override String get name => "Flat MonteCarlo"; @override int get strength => 1; /// The time budget for each calculation. int _timeBudget; /// Create a new FlatMonteCarloAI with the given time budget. FlatMonteCarloAI(this._timeBudget); @override void moveAI(Hexxagon hexxagon, MoveCallback moveCallback) { Random rng = new Random(); // Get all Moves with score pairs and set the initial win-lost-score to 0. List<Tuple2<int, Move>> possibleMoves = MoveFinder.getAllMovesOptimiseAll(hexxagon) .map((move) => new Tuple2(0, move)) .toList(growable: true); // Execute the loop while we have not exited our time budget. DateTime start = new DateTime.now(); int rounds = 0; while (new DateTime.now().difference(start).inMilliseconds < _timeBudget) { // For each possible move, play a random party and update its score. for (int i = 0; i < possibleMoves.length; i++) { // Play a random party. Tuple2<int, Move> t = possibleMoves[i]; Hexxagon clone = new Hexxagon.clone(hexxagon); clone.move(t.item2); Move move; while ((move = RandomAI.getRandomMove(clone, rng)) != null) { clone.move(move); } // Update its score. TileType betterPlayer = clone.betterPlayer; if (betterPlayer == hexxagon.currentPlayer) { possibleMoves[i] = new Tuple2(t.item1 + 1, t.item2); } else if (betterPlayer == hexxagon.notCurrentPlayer) { possibleMoves[i] = new Tuple2(t.item1 - 1, t.item2); } } rounds++; } print("AI: $rounds rounds"); // Get the best move according to the win-lost-score. Move move = possibleMoves .reduce((t1, t2) => t1.item1 >= t2.item1 ? t1 : t2) .item2; moveCallback(move); } }
package ch_test import ( "github.com/dollarkillerx/easyutils/clog" "runtime" "strconv" "sync" "testing" "time" ) func TestCh(t *testing.T) { // 生成测试数据 a := []int{} for i:=0;i<100;i++ { a = append(a,i) } sy1 := sync.WaitGroup{} // go 打印测试数据 chi := make(chan int,10) chi <- 1 for _,i := range a { sy1.Add(1) go func(i int) { defer func() { <- chi sy1.Done() }() clog.Println(strconv.Itoa(runtime.NumGoroutine())) time.Sleep(time.Second) }(i) } sy1.Wait() clog.Println(strconv.Itoa(runtime.NumGoroutine())) }
<?php namespace App\Services; use App\Repositories\VoteRepository; use Illuminate\Http\Request; class VoteService { private $voteRepository; /** * Construct repository * * @param \App\Repositories\voteRepository $voteRepository */ public function __construct( VoteRepository $voteRepository ) { $this->voteRepository = $voteRepository; } /** * Calls repository for vote table * * @return void */ public function formatVoteList() { return $this->voteRepository->getVoteList(); } /** * Calls repository for dashboard table * * @return void */ public function formatResultsList() { return $this->voteRepository->getResultsList(); } /** * Calls repository for vote submit * * @param \Illuminate\Http\Request $request * @return void */ public function submitProcessing(Request $request) { $count = 0; foreach ($request->all() as $req) { foreach ($req as $el) { if ($el === true) { ++$count; } } } $value = 12/$count; $this->voteRepository->submit($request, $value); } }
<?php /** * This file is part of the Krystal Framework * * Copyright (c) No Global State Lab * * For the full copyright and license information, please view * the license file that was distributed with this source code. */ namespace Krystal\Application\Component; use Krystal\Authentication\AuthManager as Component; use Krystal\Authentication\Cookie\ReAuth; use Krystal\Authentication\HashProvider; use Krystal\InstanceManager\DependencyInjectionContainerInterface; use Krystal\Application\InputInterface; final class AuthManager implements ComponentInterface { /** * {@inheritDoc} */ public function getInstance(DependencyInjectionContainerInterface $container, array $config, InputInterface $input) { $cookieBag = $container->get('request')->getCookieBag(); $sessionBag = $container->get('sessionBag'); $hashProvider = new HashProvider(); $reAuth = new ReAuth($cookieBag, $hashProvider); return new Component($sessionBag, $reAuth, $hashProvider); } /** * {@inheritDoc} */ public function getName() { return 'authManager'; } }
//------------------------------------------------------------------------------ // <copyright file="TempFiles.cs" company="Microsoft"> // // <OWNER>Microsoft</OWNER> // Copyright (c) Microsoft Corporation. All rights reserved. // </copyright> //------------------------------------------------------------------------------ namespace System.CodeDom.Compiler { using System; using System.Collections; using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; using System.Text; using Microsoft.Win32; using Microsoft.Win32.SafeHandles; using System.Security; using System.Security.Permissions; using System.Security.Principal; using System.Threading.Tasks; using System.ComponentModel; using System.Security.Cryptography; using System.Globalization; using System.Runtime.Versioning; /// <devdoc> /// <para>Represents a collection of temporary file names that are all based on a /// single base filename located in a temporary directory.</para> /// </devdoc> [PermissionSet(SecurityAction.LinkDemand, Name="FullTrust")] [PermissionSet(SecurityAction.InheritanceDemand, Name="FullTrust")] [Serializable] public class TempFileCollection : ICollection, IDisposable { string basePath; string tempDir; bool keepFiles; Hashtable files; [NonSerialized] private WindowsIdentity currentIdentity = null; [NonSerialized] private string highIntegrityDirectory = null; /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public TempFileCollection() : this(null, false) { } /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public TempFileCollection(string tempDir) : this(tempDir, false) { } /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> #if !FEATURE_PAL [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Assert, ControlPrincipal = true)] #endif public TempFileCollection(string tempDir, bool keepFiles) { this.keepFiles = keepFiles; this.tempDir = tempDir; #if !FEATURE_CASE_SENSITIVE_FILESYSTEM files = new Hashtable(StringComparer.OrdinalIgnoreCase); #else files = new Hashtable(); #endif #if !FEATURE_PAL WindowsImpersonationContext impersonation = Executor.RevertImpersonation(); try { currentIdentity = WindowsIdentity.GetCurrent(); } finally { Executor.ReImpersonate(impersonation); } #endif } /// <internalonly/> /// <devdoc> /// <para> To allow it's stuff to be cleaned up</para> /// </devdoc> void IDisposable.Dispose() { Dispose(true); GC.SuppressFinalize(this); } protected virtual void Dispose(bool disposing) { // It is safe to call Delete from here even if Dispose is called from Finalizer // because the graph of objects is guaranteed to be there and // neither Hashtable nor String have a finalizer of their own that could // be called before TempFileCollection Finalizer Delete(); DeleteHighIntegrityDirectory(); } /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> ~TempFileCollection() { Dispose(false); } /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public string AddExtension(string fileExtension) { return AddExtension(fileExtension, keepFiles); } /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public string AddExtension(string fileExtension, bool keepFile) { if (fileExtension == null || fileExtension.Length == 0) throw new ArgumentException(SR.GetString(SR.InvalidNullEmptyArgument, "fileExtension"), "fileExtension"); // fileExtension not specified string fileName = BasePath + "." + fileExtension; AddFile(fileName, keepFile); return fileName; } /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public void AddFile(string fileName, bool keepFile) { if (fileName == null || fileName.Length == 0) throw new ArgumentException(SR.GetString(SR.InvalidNullEmptyArgument, "fileName"), "fileName"); // fileName not specified if (files[fileName] != null) throw new ArgumentException(SR.GetString(SR.DuplicateFileName, fileName), "fileName"); // duplicate fileName files.Add(fileName, (object)keepFile); } /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public IEnumerator GetEnumerator() { return files.Keys.GetEnumerator(); } /// <internalonly/> IEnumerator IEnumerable.GetEnumerator() { return files.Keys.GetEnumerator(); } /// <internalonly/> void ICollection.CopyTo(Array array, int start) { files.Keys.CopyTo(array, start); } /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public void CopyTo(string[] fileNames, int start) { files.Keys.CopyTo(fileNames, start); } /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public int Count { get { return files.Count; } } /// <internalonly/> int ICollection.Count { get { return files.Count; } } /// <internalonly/> object ICollection.SyncRoot { get { return null; } } /// <internalonly/> bool ICollection.IsSynchronized { get { return false; } } /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public string TempDir { get { return tempDir == null ? string.Empty : tempDir; } } /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public string BasePath { get { EnsureTempNameCreated(); return basePath; } } [ResourceExposure(ResourceScope.None)] [ResourceConsumption(ResourceScope.Machine, ResourceScope.Machine)] void EnsureTempNameCreated() { if (basePath == null) { string tempFileName = null; FileStream tempFileStream; bool uniqueFile = false; int retryCount = 5000; do { try { basePath = GetTempFileName(TempDir); string full = Path.GetFullPath(basePath); new FileIOPermission(FileIOPermissionAccess.AllAccess, full).Demand(); // make sure the filename is unique. tempFileName = basePath + ".tmp"; using (tempFileStream = new FileStream(tempFileName, FileMode.CreateNew, FileAccess.Write)) { } uniqueFile = true; } catch (IOException e) { retryCount--; uint HR_ERROR_FILE_EXISTS = unchecked(((uint)0x80070000) | NativeMethods.ERROR_FILE_EXISTS); if (retryCount == 0 || Marshal.GetHRForException(e) != HR_ERROR_FILE_EXISTS) throw; uniqueFile = false; } }while (!uniqueFile); files.Add(tempFileName, keepFiles); } } /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public bool KeepFiles { get { return keepFiles; } set { keepFiles = value; } } bool KeepFile(string fileName) { object keep = files[fileName]; if (keep == null) return false; return (bool)keep; } /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> [ResourceExposure(ResourceScope.None)] [ResourceConsumption(ResourceScope.Machine, ResourceScope.Machine)] public void Delete() { if (files != null && files.Count > 0) { string[] fileNames = new string[files.Count]; files.Keys.CopyTo(fileNames, 0); foreach (string fileName in fileNames) { if (!KeepFile(fileName)) { Delete(fileName); files.Remove(fileName); } } } } private void DeleteHighIntegrityDirectory() { try { if (currentIdentity != null && Directory.Exists(highIntegrityDirectory)) { // Remove the no delete policy from the directory. RemoveAceOnTempDirectory(highIntegrityDirectory, currentIdentity.User.ToString()); if (Directory.GetFiles(highIntegrityDirectory).Length == 0) { // Delete the high integrity directory if all files are deleted. Directory.Delete(highIntegrityDirectory, true); } } } catch { } // Ignore all errors. } // This function deletes files after reverting impersonation. [ResourceExposure(ResourceScope.None)] [ResourceConsumption(ResourceScope.Process, ResourceScope.Process)] internal void SafeDelete() { #if !FEATURE_PAL WindowsImpersonationContext impersonation = Executor.RevertImpersonation(); #endif try{ Delete(); } finally { #if !FEATURE_PAL Executor.ReImpersonate(impersonation); #endif } } [ResourceExposure(ResourceScope.Machine)] [ResourceConsumption(ResourceScope.Machine)] void Delete(string fileName) { try { File.Delete(fileName); } catch { // Ignore all exceptions } } [ResourceExposure(ResourceScope.Machine)] [ResourceConsumption(ResourceScope.Machine)] string GetTempFileName(string tempDir) { string fileName; string randomFileName = Path.GetFileNameWithoutExtension(Path.GetRandomFileName()); if (String.IsNullOrEmpty(tempDir)) { tempDir = Path.GetTempPath(); if (!LocalAppContextSwitches.DisableTempFileCollectionDirectoryFeature && currentIdentity != null && new WindowsPrincipal(currentIdentity).IsInRole(WindowsBuiltInRole.Administrator)) { tempDir = Path.Combine(tempDir, randomFileName); // Create high integrity dir and set no delete policy for all files under the directory. // In case of failure, throw exception. CreateTempDirectoryWithAce(tempDir, currentIdentity.User.ToString()); highIntegrityDirectory = tempDir; } } if (tempDir.EndsWith("\\", StringComparison.Ordinal)) fileName = tempDir + randomFileName; else fileName = tempDir + "\\" + randomFileName; return fileName; } private static void CreateTempDirectoryWithAce(string directory, string identity) { // Dacl Sddl string: // D: Dacl type // D; Deny access // OI; Object inherit ace // SD; Standard delete function // wIdentity.User Sid of the given user. // A; Allow access // OICI; Object inherit, container inherit // FA File access // BA Built-in administrators // S: Sacl type // ML;; Mandatory Label // NW;;; No write policy // HI High integrity processes only string sddl = "D:(D;OI;SD;;;" + identity + ")(A;OICI;FA;;;BA)S:(ML;OI;NW;;;HI)"; SafeLocalMemHandle acl = null; SafeLocalMemHandle.ConvertStringSecurityDescriptorToSecurityDescriptor(sddl, NativeMethods.SDDL_REVISION_1, out acl, IntPtr.Zero); // Create the directory with the acl NativeMethods.CreateDirectory(directory, acl); } private static void RemoveAceOnTempDirectory(string directory, string identity) { string sddl = "D:(A;OICI;FA;;;" + identity + ")(A;OICI;FA;;;BA)"; SafeLocalMemHandle acl = null; SafeLocalMemHandle.ConvertStringSecurityDescriptorToSecurityDescriptor(sddl, NativeMethods.SDDL_REVISION_1, out acl, IntPtr.Zero); NativeMethods.SetNamedSecurityInfo(directory, acl); } } }
using SkiaSharp; using System; using System.Collections.Generic; using System.Text; namespace Mageki.Drawables { public class MenuButton : IButton { const float backgroundSizeRatio = 1.6f; private Button button = new Button(); MenuBackground background = new MenuBackground(); public bool Visible { get; set; } = true; public SKPoint Center { get => button.Center; set { button.Center = value; background.Center = value; } } public float Width { get => button.Width; set { button.Width = value; background.Width = value * backgroundSizeRatio; } } public float Height { get => button.Height; set { button.Height = value; background.Height = value * backgroundSizeRatio; } } public Side Side { get => background.Side; set { background.Side = value; if (Side == Side.Left) button.Color = ButtonColors.Red; else if (Side == Side.Right) button.Color = ButtonColors.Yellow; } } public bool IsHold { get => button.IsHold; set => button.IsHold = value; } public ButtonColors Color { get => button.Color; set => button.Color = value; } public SKColor BorderColor { set => button.BorderColor = value; } public SKRect BorderRect => button.BorderRect; public void Draw(SKCanvas canvas) { if (!Visible) return; background.Draw(canvas); button.Draw(canvas); } } }
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! # This file is machine-generated by mktables from the Unicode # database, Version 6.1.0. Any changes made here will be lost! # !!!!!!! INTERNAL PERL USE ONLY !!!!!!! # This file is for internal use by core Perl only. The format and even the # name or existence of this file are subject to change without notice. Don't # use it directly. return <<'END'; 0316 0319 031C 0320 0323 0326 0329 0333 0339 033C 0347 0349 034D 034E 0353 0356 0359 035A 0591 0596 059B 05A2 05A7 05AA 05C5 0655 0656 065C 065F 06E3 06EA 06ED 0731 0734 0737 0739 073B 073C 073E 0742 0744 0746 0748 07F2 0859 085B 08E6 08E9 08ED 08EF 08F6 08F9 08FA 0952 0F18 0F19 0F35 0F37 0FC6 108D 193B 1A18 1A7F 1B6C 1CD5 1CD9 1CDC 1CDF 1CED 1DC2 1DCA 1DCF 1DFD 1DFF 20E8 20EC 20EF A92B A92D AAB4 101FD 10A0D 10A3A 1D17B 1D182 1D18A 1D18B END
import * as React from 'react' import { Fragment } from 'react' import { Switch, Route } from 'react-router-dom' import { ThemeProvider } from '@material-ui/styles' import routes from 'app/routes' import Appbar from 'app/components/Appbar' import Home from './Home/Home' import theme from 'app/styles/theme' const Root: React.FC<{}> = () => ( <Fragment> <ThemeProvider theme={theme}> <Appbar /> <Switch> <Route path={routes.ROOT} component={Home} /> </Switch> </ThemeProvider> </Fragment> ) export default Root
<?php /** * Copyright 2018 SURFnet B.V. * * 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. */ namespace Dev; use League\Csv\Reader; use League\Csv\Writer; use Psr\Log\AbstractLogger; use Symfony\Component\HttpKernel\Kernel; final class FileLogger extends AbstractLogger { private $kernel; public function __construct(Kernel $kernel) { $this->kernel = $kernel; } public function log($level, $message, array $context = array()) { if ($level === 'debug') { return; } $file = fopen($this->getCSVFile(), 'ab+'); $csv = Writer::createFromStream($file); $csv->setDelimiter(';'); $csv->insertOne(array($level, $message, json_encode($context))); fclose($file); } public function cleanLogs() { $logs = $this->getLogs(); $filename = $this->getCSVFile(); if (is_file($filename)) { unlink($filename); } return $logs; } public function getLogs() { $filename = $this->getCSVFile(); if (!is_file($filename)) { return []; } $csv = Reader::createFromStream(fopen($this->getCSVFile(), 'rb')); $csv->setDelimiter(';'); $csv = $csv->fetchAll(); return array_map(function ($line) { $line[2] = json_decode($line[2], true); return $line; }, $csv); } /** * * @return string */ protected function getCSVFile() { $root = $this->kernel->getProjectDir(); return implode(DIRECTORY_SEPARATOR, [$root, 'var', 'log', 'test.csv']); } }
let abc = undefined; const def = null; function getData(): string | undefined { return ''; } const data = getData(); if (data) { const someOtherData = data; } let input: unknown; input = 'someInput'; let someSensitiveValue: string; if (typeof input === 'string') { someSensitiveValue = input; } function doTasks(tasks: number): void | never { if (tasks > 3) { throw new Error('Too many tasks!'); } } const stuff = doTasks(2);
Any contribution you make to this repository will be under the [Apache 2 Licence](https://www.apache.org/licenses/LICENSE-2.0) as dictated by Section 5 of that licence: ``` 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. ``` Contributors must sign-off on each commit by adding a `Signed-off-by: ...` line to commit messages to certify that they have the right to submit the code they are contributing to the project according to the [Developer Certificate of Origin (DCO)](https://developercertificate.org). Test suites should look to: * generate every possible error in the *C* code or place a comment in *the C* code as to why it can't be generated ("inconceivable!") These are generally in `tests/test-X-error.idio` files. * probe boundary cases These are generally in `tests/test-X.idio` files. * give decent code coverage Code coverage doesn't guarantee the code works it just means that at least something caused the code to be exercised (and it didn't generate an error). Documentation might be more widespread: * functions defined in both *C* and *Idio* support a *docstring* These should be reStructuredText in the style of https://readthedocs.org. * variables (and more awkward functions) can be documented in the `doc/ref` hierarchy * examples might want to go in the [Idio User Guide](https://github.com/idio-lang/guide) * complex contributions might want to be added to [DIPS](https://github.com/idio-lang/DIPS)
#include <vector> #include <map> #include <algorithm> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; class Solution { public: map<int, vector<pair<int, int>>> S; void dfs(TreeNode* root, int u, int v) { if (root == NULL) { return; } S[v].push_back({ u, root->val }); dfs(root->left, u + 1, v - 1); dfs(root->right, u + 1, v + 1); } vector<vector<int>> verticalTraversal(TreeNode* root) { dfs(root, 0, 0); vector<vector<int>> answer; for (auto[x, y] : S) { sort(y.begin(), y.end()); vector<int> v; for (auto a : y) { v.push_back(a.second); } answer.push_back(v); } return answer; } };
import 'package:flutter_test/flutter_test.dart'; import 'package:happy_holidays/api/holiday_api.dart'; import 'package:happy_holidays/api/holiday_api_client.dart'; import 'package:happy_holidays/model/national_holiday.dart'; import 'package:http/http.dart' as http; import 'package:mockito/mockito.dart'; class MockApi extends Mock implements HolidayApi {} void main() { group('$HolidayApiClient', () { MockApi mockApi; HolidayApiClient sut; setUp(() { mockApi = MockApi(); sut = HolidayApiClient(holidayApi: mockApi); }); group('GIVEN api returns succesful response', () { test('It converts json body into list of national holidays', () async { final successfulResponse = http.Response( '[{"date": "2019-09-10", "localName": "test holiday local", "name": "test holiday"}]', 200); when(mockApi.nextPublicHolidaysWorldwide()) .thenAnswer((_) => Future<http.Response>.value(successfulResponse)); expect(await sut.nextPublicHolidaysWorldwide(), <NationalHoliday>[ NationalHoliday( name: 'test holiday', date: DateTime(2019, 9, 10), ), ]); }); test('It creates empty list in case json body is empty', () async { final successfulResponse = http.Response('[{}]', 200); when(mockApi.nextPublicHolidaysWorldwide()) .thenAnswer((_) => Future<http.Response>.value(successfulResponse)); expect(await sut.nextPublicHolidaysWorldwide(), <NationalHoliday>[]); }); }); group('GIVEN api returns unsucessful response', () { final successfulResponse = http.Response('error message', 400); setUp(() { when(mockApi.nextPublicHolidaysWorldwide()) .thenAnswer((_) => Future<http.Response>.value(successfulResponse)); }); test('It throws error', () { expect( sut.nextPublicHolidaysWorldwide(), throwsA(equals( 'Request failed: statuscode = 400 body = error message'))); }); }); }); }
using Equinor.ProCoSys.IPO.Domain; using Microsoft.Extensions.Configuration; namespace Equinor.ProCoSys.IPO.WebApi.Misc { public class PlantProvider : IPlantProvider, IPlantSetter { private readonly IConfiguration _configuration; public PlantProvider(IConfiguration configuration) => _configuration = configuration; public string Plant { get; private set; } public bool IsOptimisticConcurrenyEnabled_HACK => _configuration.GetValue("IsOptimisticConcurrenyEnabled", false); public void SetPlant(string plant) => Plant = plant; } }
module Zen ## # Module for generating HTML diffs using Diff::LCS and a custom callback # class. See {Zen::HTMLDiff.diff} and {Zen::HTMLDiff::Callback} for more # information on the usage and the returned HTML. # # @since 2012-05-02 # module HTMLDiff ## # Gets the difference between the two given strings and returns a string # containing these differences formatted using HTML. # # @example # old = 'hello world' # new = 'Hello, world!' # diff = Zen::HTMLDiff.diff(old, new) # # puts diff # => "<div class=\"diff\">...</div>" # # @since 2012-05-02 # @param [String] old The old version of the string. # @param [String] new The new version of the string. # @return [String] # def self.diff(old, new) callback = Callback.new old = old.join("\n") if old.is_a?(Array) new = new.join("\n") if new.is_a?(Array) Diff::LCS.traverse_sequences( old.to_s.split(/\r\n|\n/), new.to_s.split(/\r\n|\n/), callback ) return callback.to_s end ## # Callback class for Diff::LCS that is used to format a diff using HTML. An # example of the resulting markup is the following: # # <div class="diff"> # <table> # <tbody> # <tr> # <td class="line">1</td> # <td class="line"></td> # <td class="line del">-Hello world</td> # </tr> # <tr> # <td class="line"></td> # <td class="line">1</td> # <td class="line ins">+Hello World</td> # </tr> # </tbody> # </table> # </div> # # Example usage: # # old = '...' # new = '...' # callback Zen::HTMLDiff::Callback.new # # Diff::LCS.traverse_sequence(old, new, callback) # # puts callback # => "<div class=...>" # # @since 2012-05-02 # class Callback ## # Creates a new instance of the callback class. # # @since 2012-05-02 # def initialize @output = '' end ## # Called when there's a line in A but not in B. # # @since 2012-05-02 # @param [Diff::LCS::ContextChange] change # def discard_a(change) @output << %Q{ <tr> <td class="line_number">#{change.old_position + 1}</td> <td class="line_number"></td> <td class="line del">-#{change.old_element}</td> </tr> } end ## # Called when there's a line in B but not in A. # # @since 2012-05-02 # @param [Diff::LCS::ContextChange] change # def discard_b(change) @output << %Q{ <tr> <td class="line_number"></td> <td class="line_number">#{change.new_position + 1}</td> <td class="line ins">+#{change.new_element}</td> </tr> } end ## # Called when both lines are identical. # # @since 2012-05-02 # @param [Diff::LCS::ContextChange] change # def match(change) @output << %Q{ <tr> <td class="line_number">#{change.old_position + 1}</td> <td class="line_number">#{change.new_position + 1}</td> <td class="line"> #{change.old_element}</td> </tr> } end ## # Returns the full HTML for the diff. # # @since 2012-05-02 # @return [String] # def to_s return %Q{ <div class="diff"> <table class="no_sort"> <tbody> #{@output} </tbody> </table> </div> } end end # Callback end # HTMLDiff end # Zen
package typingsSlinky.amazonConnectStreams.connect import org.scalablytyped.runtime.StObject import scala.scalajs.js import scala.scalajs.js.`|` import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess} @js.native sealed trait AgentErrorStates extends StObject @JSGlobal("connect.AgentErrorStates") @js.native object AgentErrorStates extends StObject { @js.native sealed trait AGENT_HUNG_UP extends AgentErrorStates @js.native sealed trait BAD_ADDRESS_AGENT extends AgentErrorStates @js.native sealed trait BAD_ADDRESS_CUSTOMER extends AgentErrorStates @js.native sealed trait DEFAULT extends AgentErrorStates @js.native sealed trait ERROR extends AgentErrorStates @js.native sealed trait FAILED_CONNECT_AGENT extends AgentErrorStates @js.native sealed trait FAILED_CONNECT_CUSTOMER extends AgentErrorStates @js.native sealed trait LINE_ENGAGED_AGENT extends AgentErrorStates @js.native sealed trait LINE_ENGAGED_CUSTOMER extends AgentErrorStates @js.native sealed trait MISSED_CALL_AGENT extends AgentErrorStates @js.native sealed trait MISSED_CALL_CUSTOMER extends AgentErrorStates @js.native sealed trait MULTIPLE_CCP_WINDOWS extends AgentErrorStates @js.native sealed trait REALTIME_COMMUNICATION_ERROR extends AgentErrorStates }
require 'gdsii/group' require 'gdsii/property' module Gdsii # # Generic class to be inherited by various GDSII elements (i.e. things that # can be added to a Structure). # class Element < Group # No BNF for generic Element; refer to actual Element itself (i.e. # Boundary, Path, etc.) # # Generic element constructor. Not intended to be called directly but # rather inherited and called through sub-classes such as Gdsii::Boundary. # def initialize() super() @records[GRT_ENDEL] = Record.new(GRT_ENDEL) @records[Properties] = @properties = Properties.new end # # Shortcut for Properties#add. For example, instead of: # # bnd.properties.add Property(1, 'testprop') # # It could be simply: # # bnd.add Property(1, 'testprop') # def add(*args); properties.add(*args); end # # Shortcut for Properties#remove. For example, instead of: # # bnd.properties.remove {|p| p.attr == 1} # # It could be simply: # # bnd.remove {|p| p.attr == 1} # def remove(*args); properties.remove(*args); end # # Access the Properties object for this element # def properties(); @properties; end class << self alias :read_el :read end def Element.read(file, *args) rec = Record.peek(file) case rec.type when GRT_BOUNDARY : Boundary.read_el(file, *args) when GRT_TEXT : Text.read_el(file, *args) when GRT_PATH : Path.read_el(file, *args) when GRT_SREF : SRef.read_el(file, *args) when GRT_AREF : ARef.read_el(file, *args) when GRT_BOX : Box.read_el(file, *args) when GRT_NODE : Node.read_el(file, *args) else # end of the element, increment the counter and move on nil end end # # After a Structure header has been read (see Structure#read_each_header) # then elements may be processed as a file is read using Element#read_each. # See Structure#read_each_header for an example. # # Compare this with Structure#seek_next which also advances the file handle # to the next structure but does not yield any elements (if only a file # pointer advancement is needed and elements can be ignored). # def Element.read_each(file) while (group = Element.read(file)) do yield group end # rip out ENDEL - TODO: make sure that it's ENDEL Record.read(file) end # # Returns true if this is a Boundary element # def is_boundary?; self.class == Boundary; end # # Returns true if this is a Path element # def is_path?; self.class == Path; end # # Returns true if this is a Text element # def is_text?; self.class == Text; end # # Returns true if this is a SRef element # def is_sref?; self.class == SRef; end # # Returns true if this is a ARef element # def is_aref?; self.class == ARef; end # # Returns true if this is a Box element # def is_box?; self.class == Box; end # # Returns true if this is a Node element # def is_node?; self.class == Node; end end ############################################################################ # # Class to hold a collection of Element objects. This is used in the # Structure class BNF. # # Elements include: Boundary, Path, SRef, ARef, Text, Node, Box # class Elements < Group include Access::EnumerableGroup # # Elements BNF description: # # <structure> ::= {<element>}* # <element> ::= {<boundary> | <path> | <sref> | <aref> | # <text> | <node> | <box>} {<property>}* ENDEL # self.bnf_spec = BnfSpec.new( BnfItem.new(Element, true, true) ) # # Create an Elements object. # def initialize(elements=[]) super() @records[Element] = @list = elements end ####################### ## PROTECTED METHODS ## ####################### protected # Used by Access::EnumerableGroup to validate addition def validate_addition(object) unless object.kind_of?(Element) raise TypeError, "Invalid addition: #{object.class}; expecting Gdsii::Element" end end end end
export let CONFIG = {} as any; export let firebase; export const Bootstrap = (config, _firebase) => { CONFIG = config; firebase = _firebase firebase.initializeApp(config.firebaseConfig); }; export const setConfig = (config) => { CONFIG = config; };
import React, { memo } from "react"; import styled from "styled-components"; import { Text, Icon } from "@gnosis.pm/safe-react-components"; import { Accordion, AccordionSummary, AccordionDetails, withStyles, } from "@material-ui/core"; import { theme } from "theme"; import { Link } from "components/basic/inputs/Link"; import howItWorks from "./howItWorks.json"; const Wrapper = styled.div` width: 340px; height: 140px; border-radius: 6px; background-color: ${theme.colors.backgroundSideBar}; & > div:first-child { padding: 15px 16px; & > :first-child { margin-bottom: 10px; } } display: flex; flex-direction: column; // 'How it works' list. // TODO: Maybe move this out? ol { padding: 0; list-style: none; counter-reset: sidebar-counter; font-family: ${theme.fonts.fontFamily}; font-size: ${theme.text.size.lg.fontSize}; line-height: ${theme.text.size.lg.lineHeight}; color: ${theme.colors.text}; li { counter-increment: sidebar-counter; &:not(:last-child) { margin-bottom: 5px; } &::before { content: counter(sidebar-counter) "."; font-weight: bolder; padding-right: 0.5em; } } } `; const StyledAccordion = withStyles({ root: { // Remove borders border: "none", boxShadow: "none", // Remove separator "&:before": { display: "none", }, // Fix Summary height, no moving around margin: "0", "&$expanded": { margin: "0", }, }, expanded: {}, })(Accordion); const StyledAccordionSummary = withStyles({ root: { backgroundColor: theme.colors.backgroundBadgeGray, border: "none", minHeight: "46px", // Also preventing Summary from expanding "&$expanded": { minHeight: "46px", }, }, // And this one also preventing Summary from expanding content: { "&$expanded": { margin: "12px 0", }, }, // As well as this expanded: {}, })(AccordionSummary); const StyledAccordionDetails = withStyles({ root: { backgroundColor: theme.colors.backgroundSideBar, }, })(AccordionDetails); export const SideBar = memo(function SideBar(): JSX.Element { return ( <Wrapper> <div> <Text size="xl" strong> Support </Text> <Text size="lg" as="span"> 👉 Check out the{" "} <Link textSize="lg" color="primary" href="https://docs.gnosis.io/protocol/docs/intro-cmm/" > GP CMM intro article </Link> </Text> <Text size="lg"> 👉{" "} <Link textSize="lg" color="primary" href="https://chat.gnosis.io/ "> Join Discord </Link> </Text> </div> <StyledAccordion square defaultExpanded> <StyledAccordionSummary expandIcon={<Icon type="circleDropdown" size="md" />} > <Text size="xl" strong> How it works </Text> </StyledAccordionSummary> <StyledAccordionDetails> <ol> {howItWorks.map((item: string, id: number) => ( <li key={id}>{item}</li> ))} </ol> </StyledAccordionDetails> </StyledAccordion> </Wrapper> ); });
import { Client, UserinfoResponse } from 'openid-client'; import { logInfo } from '@navikt/familie-logging'; import azure from './azure'; export default async (passport: any): Promise<Client> => { logInfo('Konfigurerer passport'); const azureAuthClient: Client = await azure.hentClient(); const azureOidcStrategy = azure.strategy(azureAuthClient); passport.serializeUser( (user: UserinfoResponse, done: (err: any, user?: UserinfoResponse) => void) => done(undefined, user), ); passport.deserializeUser( (user: UserinfoResponse, done: (err: any, user?: UserinfoResponse) => void) => done(undefined, user), ); passport.use('azureOidc', azureOidcStrategy); return azureAuthClient; };
#!/bin/sh # This script ensures that ep-lite is automatically restarting after # an error happens # Handling Errors # 0 silent # 1 email ERROR_HANDLING=0 # Your email address which should receive the error messages EMAIL_ADDRESS="no-reply@example.com" # Sets the minimum amount of time between the sending of error emails. # This ensures you do not get spammed during an endless reboot loop # It's the time in seconds TIME_BETWEEN_EMAILS=600 # 10 minutes # DON'T EDIT AFTER THIS LINE pecho() { printf %s\\n "$*"; } log() { pecho "$@"; } error() { log "ERROR: $@" >&2; } fatal() { error "$@"; exit 1; } LAST_EMAIL_SEND=0 # Move to the folder where ep-lite is installed cd "$(dirname "$0")"/.. # Check if a logfile parameter is set LOG="$1" [ -n "${LOG}" ] || fatal "Set a logfile as the first parameter" shift while true; do # Try to touch the file if it doesn't exist [ -f "${LOG}" ] || touch "${LOG}" || fatal "Logfile '${LOG}' is not writeable" # Check if the file is writeable [ -w "${LOG}" ] || fatal "Logfile '${LOG}' is not writeable" # Start the application bin/run.sh "$@" >>${LOG} 2>>${LOG} TIME_FMT=$(date +%Y-%m-%dT%H:%M:%S%z) # Send email if [ "$ERROR_HANDLING" = 1 ]; then TIME_NOW=$(date +%s) TIME_SINCE_LAST_SEND=$(($TIME_NOW - $LAST_EMAIL_SEND)) if [ "$TIME_SINCE_LAST_SEND" -gt "$TIME_BETWEEN_EMAILS" ]; then { cat <<EOF Server was restarted at: ${TIME_FMT} The last 50 lines of the log before the server exited: EOF tail -n 50 "${LOG}" } | mail -s "Etherpad restarted" "$EMAIL_ADDRESS" LAST_EMAIL_SEND=$TIME_NOW fi fi pecho "RESTART! ${TIME_FMT}" >>${LOG} # Sleep 10 seconds before restart sleep 10 done
require 'rails_helper' RSpec.describe 'Annotation display', type: :feature do let(:exhibit) { FactoryBot.create(:exhibit) } let(:related_annotations) do FactoryBot.create(:annotation, canvas: 'https://digi.vatlib.it/iiif/MSS_Urb.lat.491/canvas/p0012', data: { resource: [{ '@type' => 'oa:Something', 'chars' => 'some data' }] }.to_json) FactoryBot.create(:annotation, canvas: 'https://digi.vatlib.it/iiif/MSS_Urb.lat.491/canvas/p0012', data: { resource: [{ '@type' => 'oa:Tag', 'chars' => 'tags are ignored' }] }.to_json) end it 'has a viewer' do visit spotlight.exhibit_solr_document_path(exhibit, 'ad73da4e-0072-4b07-a12c-a8d10ac2a9ab') expect(page).to have_css 'iframe[src*=mirador]' expect(page).to have_css 'iframe[src*=canvas]' end it 'has some metadata' do visit spotlight.exhibit_solr_document_path(exhibit, 'ad73da4e-0072-4b07-a12c-a8d10ac2a9ab') expect(page).to have_css 'dt', text: 'Annotation text' expect(page).to have_css 'dd', text: /particolare dell'esercito/ end it 'has related annotations' do related_annotations visit spotlight.exhibit_solr_document_path(exhibit, 'ad73da4e-0072-4b07-a12c-a8d10ac2a9ab') expect(page).to have_css 'li', text: 'some data' expect(page).not_to have_css 'li', text: 'tags are ignored' end end
import { Express } from "express"; import { IBearerStrategyOption } from "passport-azure-ad"; import { PeerList } from "webrtc-signal-http"; import { Publisher } from "webrtc-signal-http-publisher"; export interface ISignalerOpts { port?: number; trustProxy?: boolean; loggingEnabled: boolean; authEnabled?: boolean; authB2cTenantId?: string; authB2cAppId?: string; authB2cPolicyName?: string; authAppId?: string; authTenantId?: string; heartbeatMs?: number; heartbeatEnabled?: boolean; heartbeatGcMs?: boolean; capacityEnabled?: boolean; recognitionEnabled?: boolean; enableCors?: boolean; publishState?: boolean; } export interface IPeerBearerStrategyOpts extends IBearerStrategyOption { passReqToCallback: boolean; } export interface IExpressApp extends Express { peerList: PeerList; _publisher?: typeof Publisher; } export function optIsFalsey(opt: string | boolean) { return !opt || opt === "false" || ( typeof(opt) === "string" && opt.toLowerCase() === "false"); }
package net.imknown.android.forefrontinfo.ui.base import android.content.res.AssetManager import android.util.Log import kotlinx.serialization.decodeFromString import kotlinx.serialization.json.Json import net.imknown.android.forefrontinfo.R import net.imknown.android.forefrontinfo.base.MyApplication import net.imknown.android.forefrontinfo.ui.home.model.Lld import java.io.BufferedReader import java.io.File import java.io.FileWriter object JsonIo { const val LLD_JSON_NAME = "lld.json" val savedLldJsonFile by lazy { File(MyApplication.getDownloadDir(), LLD_JSON_NAME) } private fun deleteDirtyDirectory() { if (!savedLldJsonFile.deleteRecursively()) { Log.e(javaClass.simpleName, "Delete dirty directory failed.") } else { Log.i(javaClass.simpleName, "Dirty directory deleted.") } } fun copyJsonIfNeeded() { var shouldCopy = false if (savedLldJsonFile.exists()) { if (savedLldJsonFile.isDirectory) { deleteDirtyDirectory() shouldCopy = true } else { val savedLldVersion = try { savedLldJsonFile.fromJson<Lld>().version } catch (e: Exception) { val message = MyApplication.getMyString(R.string.lld_json_parse_failed, e.message) Log.e(javaClass.simpleName, message, e) null } if (savedLldVersion == null) { shouldCopy = true } else { val assetLldVersion = getAssetLldVersion(MyApplication.instance.assets) if (assetLldVersion != null && savedLldVersion < assetLldVersion) { shouldCopy = true } } } } else { shouldCopy = true } if (!shouldCopy) { return } copyAssetsFileToContextFilesDir( MyApplication.instance.assets, savedLldJsonFile, LLD_JSON_NAME ) } /** * https://discuss.kotlinlang.org/t/copy-file-from-res/7068/10 */ private fun copyAssetsFileToContextFilesDir( assets: AssetManager, savedFile: File, assetName: String ) { assets.open(assetName).use { inStream -> savedFile.parentFile?.mkdirs() savedFile.outputStream().use { outStream -> outStream.let { inStream.copyTo(it) } } } } fun saveLldJsonFile(lldString: String) { if (savedLldJsonFile.exists() && savedLldJsonFile.isDirectory) { deleteDirtyDirectory() } FileWriter(savedLldJsonFile).use { it.write(lldString) } } fun getAssetLld(assets: AssetManager): Lld? = try { assets.open(LLD_JSON_NAME) .bufferedReader() .use(BufferedReader::readText) .fromJson() } catch (e: Exception) { e.printStackTrace() null } fun getAssetLldVersion(assets: AssetManager): String? = getAssetLld(assets)?.version } val json by lazy { Json { ignoreUnknownKeys = true } } @Throws inline fun <reified T : Any> File.fromJson(): T = readText().fromJson() @Throws inline fun <reified T : Any> String.fromJson(): T = json.decodeFromString(this)
--DROP FUNCTION cartesian; /** * This function computes the x,y,z co-ordinates on the cartesian unit sphere * for a given ra, decl. * ra and decl are both in degrees. */ CREATE FUNCTION cartesian(ira DOUBLE PRECISION, idecl DOUBLE PRECISION) RETURNS TABLE (x DOUBLE PRECISION, y DOUBLE PRECISION, z DOUBLE PRECISION) {% ifdb postgresql %} AS $$ SELECT COS(RADIANS($2)) * COS(RADIANS($1)) AS x ,COS(RADIANS($2)) * SIN(RADIANS($1)) AS y ,SIN(RADIANS($2)) AS z; ; $$ LANGUAGE SQL; {% endifdb %}
<?php declare(strict_types=1); namespace Zing\QueryBuilder\Tests; use Zing\QueryBuilder\QueryBuilder; use Zing\QueryBuilder\Tests\Models\Order; /** * @internal */ final class CustomBuilderTest extends TestCase { public function testScope(): void { self::assertSame( Order::query()->whereNumberLike('test')->toSql(), QueryBuilder::fromBuilder(Order::class, request())->whereNumberLike('test')->toSql() ); } }
/** * @file DiceRoller.cpp * @brief The Dice Roller is taking a rule from the user, and execute * this rule, by setting up dice, and rolling them all. * @author Samuel RRJ Masuy * @version 1.0 * @date 2016-10-18 */ #include <regex> #include <stdio.h> #include "DiceRoller.h" #include "DiceExceptions.h" DiceRoller::DiceRoller() { } DiceRoller::~DiceRoller() { } /** * @brief Roll a series of dice. * * @param rules: string: a pattern that match the following `xdy[+z]`. * Where x is the number of times the dice has to be rolled, d is a constant, * y is the kind of dice (number of sides on dice). And z is a modifier to * applied, once all dice are rolled. * * @return Final result. */ int DiceRoller::roll(const std::string &rules) { this->setRules(rules); int result = 0; for (auto const& dice : this->dices) { result += dice->roll(); } return this->modifier_func(result, this->modifier); } /** * @brief Set rules of the game. * * @param rules: string: a pattern that match the following `xdy[+z]`. * Where x is the number of times the dice has to be rolled, d is a constant, * y is the kind of dice (number of sides on dice). And z is a modifier to * applied, once all dice are rolled. * * @throws InvalidNumberOfLoops, InvalidNumberOfSides */ void DiceRoller::setRules(const std::string &rules) { std::smatch match = this->matchQueryString(rules); // match[0] refers to the full match. int loops = stoi(match[1]); // stoi, is to convert a string to an integer. int sides = stoi(match[2]); std::string sign = match[3]; this->modifier = stoi(match[4]); if (!this->validate_sides(sides)) { // make sure the number of sides is valid. throw InvalidNumberOfSides(); } if (loops <= 0) { throw InvalidNumberOfLoops(); } this->setDices(sides, loops); this->setModifierFunction(sign); } /** * @brief Match query string versus a Regex. (see rules below). * * @param rules: string: a pattern that match the following `xdy[+z]`. * Where x is the number of times the dice has to be rolled, d is a constant, * y is the kind of dice (number of sides on dice). And z is a modifier to * applied, once all dice are rolled. * * @throws InvalidQuerySring * * @return an array of match that the regex found. */ std::smatch DiceRoller::matchQueryString(const std::string& query) { std::regex rgx("^(-?\\d+)d(\\d+)\\[([\\+\\|-])(\\d+)\\]$"); std::smatch match; if (!std::regex_search(query, match, rgx)) { // no match were found. throw InvalidQuerySring(); } return match; } /** * @brief Validate the number of sides of the dice. * The number of sides in d20 games, is either 4, 6, 8, 10, 12, 20 or 100. * * @param sides: int: given sides * * @return number of sides matches one of the dice found in d20 game. */ int DiceRoller::validate_sides(int sides) { return (sides == 4 || sides == 6 || sides == 8 || sides == 10 || sides == 12 || sides == 20 || sides == 100); } /** * @brief Initialize Vector of Dice. * * @param sides The number of side of the dice. * @param loops The number of dice to be made. */ void DiceRoller::setDices(int sides, int loops) { for (int i = 0; i < loops; i++) { Dice* dice = new Dice(sides); this->dices.push_back(dice); } } /** * @brief Assign modifier function, it can either be an adder, or substracter. * * @param sign refers to the modifier sign. */ void DiceRoller::setModifierFunction(const std::string sign) { if (sign == "+") { this->modifier_func = &add; } else { this->modifier_func = &substract; } } /** * @brief Add two numbers. * * @param r * @param n * * @return r + n */ int add(int r, int n) { return r + n; } /** * @brief Substract a number from another. * * @param r * @param n * * @return r - n */ int substract(int r, int n) { return r - n; }
// imports const path = require('path'); const DPNSDocument = require('./dpnsDocument.model.js'); const debug = require('debug')('server:debug'); /** * DashUser class - represents a registered Dash Platform Username * @class DashUser * @property {string} id Unique id fopr the user record - the id of the DPNS document which registered the name * @property {string} name The registered username * @property {string} identityId identityId associated with the username * @property {Object} identity full identity object of the identityId * @property {string} publicKey private Key Associated wwith the user identity * @property {string} privateKey private Key Associated wwith the user identity */ module.exports = class DashUser { /** * * @constructs DashUser */ constructor() { debug(`Creating new user`); } /** * Finds the registered username on the network * @static DashUser#find * @param nameToFind */ static async find(nameToFind, connection) { debug(`Searching for username: ${nameToFind}`); debug(`passed in connection ${connection}`); try { const client = connection.client; debug(`client: ${client}`); debug(`Client is ready...`); debug(`Find user DPNS Docuemnt Id`); const foundUsers = await DPNSDocument.find( connection, 'dpnsContract.domain', { where: [ ['normalizedParentDomainName', '==', 'dash'], ['normalizedLabel', '==', nameToFind.toLowerCase()], ], startAt: 1, }, ); debug(`Found document(s): ${JSON.stringify(foundUsers)}`); /* if (foundUsers.error) { return { error: true, message: foundUsers.message }; } */ if (!foundUsers.success) { return { success: false, message: 'Name not found' }; } else if ((foundUsers.data.length = 1)) { let doc = new DPNSDocument(); Object.assign(doc, foundUsers.data[0]); debug(`DPNSDocument: ${JSON.stringify(doc)}`); debug(`Document Id : ${doc.id}`); const docData = doc.data.data; debug(`Document DATA : ${JSON.stringify(docData)}`); debug( `User IdentityId (from DPNS docuemnt): ${docData.records.dashIdentity}`, ); let foundUser = new this(); foundUser.name = nameToFind; foundUser.id = doc.id; foundUser.identityId = docData.records.dashIdentity; debug(`Fetching Identity record for id ${foundUser.identityId}`); foundUser.identity = await client.platform.identities.get( foundUser.identityId, ); debug(`Found identity ${JSON.stringify(foundUser.identity)}`); foundUser.publicKey = foundUser.identity.publicKeys[0].data; debug( `returning user instance: ${JSON.stringify(foundUser)}`, ); return { success: true, data: foundUser }; } else { //should never happen! /* return { error: true, message: 'More than one name record found', }; */ throw new Error('More than one name record found') } } catch (e) { debug(`find name error: ${e}`); //return { error: true, message: e }; throw new Error(e.message) } } get id() { return this._id; } /** * @param {string} newId */ set id(newId) { if (newId) { this._id = newId; } } get name() { return this._name; } /** * @param {string} newName */ set name(newName) { if (newName) { this._name = newName; } } get identityId() { return this._identityId; } /** * @param {string} newIdentityId */ set identityId(newIdentityId) { if (newIdentityId) { this._identityId = newIdentityId; } } get identity() { return this._identity; } /** * @param {Object} newIdentityId */ set identity(newIdentity) { if (newIdentity) { this._identity = newIdentity; } } get publicKey() { return this._publicKey; } /** * @param {string} newPublicKey */ set publicKey(newPublicKey) { if (newPublicKey) { this._publicKey = newPublicKey; } } get privateKey() { return this._privateKey; } /** * @param {string} newPrivateKey */ set privateKey(newPrivateKey) { if (newPrivateKey) { this._privateKey = newPrivateKey; } } /** * Returns the DashUser instance as JSON string format //// * @method DashUser#toJSON * @return {JSON} */ toJSON() { let obj = { name: this._name, id: this._id, identityId: this._identityId, identity: this._identity, publicKey: this._publicKey }; if(typeof this._privateKey != typeof undefined) obj.privateKey = this._privateKey; return JSON.stringify(obj); } };
--- title: 【スマートヘルスケア協会】薬局でHPV自己チェック‐「健康応援スポット」認証へ description: 1月30日付薬事日報に当協会の記事が掲載されました。メールマガジンでもお伝えさせていただいた自己チェックサービス提供施設管理者研修に関わる内容です。ぜひご一読ください。 date: 2019-01-31T06:15:53.059Z categories: topic images: - caption: ■薬事日報(紙面)※株式会社薬事日報社の掲載許諾済み url: /img/190130記事トップ_hpv_薬事日報_大.jpg --- 1月30日付薬事日報に当協会の記事が掲載されました。メールマガジンでもお伝えさせていただいた自己チェックサービス提供施設管理者研修に関わる内容です。ぜひご一読ください。 ■薬事日報(Web) 記事(抜粋)https://www.yakuji.co.jp/entry69786.html 記事(全文)https://yakunet.yakuji.co.jp/index.php?PAGE=YR_DETAIL&TARGET_ID=112218  ※全文をご覧いただくには有料登録が必要です ■薬事日報(紙面)※株式会社薬事日報社の掲載許諾済み 紙面) http://bit.ly/2DHxqhQ
# day8 ## 关于init函数,下面说法正确的是() ```text A. 一个包中,可以包含多个 init 函数; B. 程序编译时,先执行依赖包的 init 函数,再执行 main 包内的 init 函数; C. main 包中,不能有 init 函数; D. init 函数可以被其他函数调用; ``` ## 下面这段代码输出什么以及原因 ```text A. nil B. not nil C. compilation error ``` ```golang func hello() []string { return nil } func main() { h := hello if h == nil { fmt.Println("nil") } else { fmt.Println("not nil") } } ``` ## 下面这段代码能否编译通过?如果可以,输出什么 ```golang func GetValue() int { return 1 } func main() { i := GetValue() switch i.(type) { case int: println("int") case string: println("string") case interface{}: println("interface") default: println("unknown") } } ```
--- layout: page permalink: /2021/kolokwium/2/ --- ## 2021 Kolokwium 2 ### Zadanie 1 <div> <p> Dla \(n \geq 4\) znajdź liczbę etykietowanych drzew \(n\)-wierzchołkowych, w których \(\{ 1,2,3 \}\) jest zbiorem niezależnym. </p> <p> <style> .inline-image { height: 20pt; vertical-align: text-bottom } </style> <em>Wskazówka:</em> Udowodnij, że liczba drzew \(n\)-wierzchołkowych, które zawierają drzewo <img class="inline-image" src="/images/2021_2nd_test_1.png"> jako podgraf, jest równa \(3n^{n-4}\). </p> </div> --- ### Zadanie 2 <div> Znajdź wielomian chromatyczny grafu. <p style="margin-top: 12px; text-align:center"> <img src="/images/2021_2nd_test_2.png" style="width: 100%; max-width: 2in"> </p> </div> --- ### Zadanie 3 <div> Niech \(p,q,r>2\) będą różnymi liczbami pierwszymi. Udowodnij, że: \[ \forall x\quad x^{(pqr-pq-pr-qr+p+q+r+3)/4}\equiv x\pmod{pqr} \] </div> ---
# frozen_string_literal: true RSpec.shared_context 'file upload requests helpers' do def capybara_url(path) "http://#{Capybara.current_session.server.host}:#{Capybara.current_session.server.port}#{path}" end end
package me.anno.io.serialization /** * use this to mark a property for serialization * it needs to be ISerializable * * public properties are serializable by default * */ annotation class SerializedProperty(val name: String = "", val forceSaving: Boolean = false)
<?php declare(strict_types=1); namespace App\Services; use App\Models\ReservationMenu; abstract class ReservationService { protected ReservationMenu $reservationMenuRepository; protected const CATEGORY = [ 'ボディトリートメント', 'フェイシャル', 'その他メニュー(リラク)', '足裏・リフレクソロジー', 'ヘッド', 'ボディケア' ]; public function __construct(ReservationMenu $reservationMenuRepository) { $this->reservationMenuRepository = $reservationMenuRepository; } /** * カテゴリ名を取得する * @return array */ public function getCategory(): array { return self::CATEGORY; } /** * 単体id存在確認 * @return bool */ public function checkId(int $id): bool { return $this->reservationMenuRepository->where('id', $id)->exists(); } /** * 複数id存在確認 * @return bool */ public function checkIds(array $ids): bool { $ids = array_map('intval', $ids); return $this->reservationMenuRepository->whereIn('id', $ids)->exists(); } }