This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Sample | |
{ | |
private volatile int counter; | |
public void IncrementUnlocked() => this.counter = this.counter + 1; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Sample | |
{ | |
ReadWriteLockSlim rwLock; | |
int counter; | |
public void IncrementTwice() | |
{ | |
rwLock.EnterWriteLock(); | |
try |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Sample | |
{ | |
object mutex = new object(); | |
int counter; | |
public void IncrementTwice() | |
{ | |
lock (mutex) | |
{ |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name betteR20-5etools | |
// @namespace https://5e.tools/ | |
// @license MIT (https://opensource.org/licenses/MIT) | |
// @version 1.21.0 | |
// @updateURL https://get.5e.tools/script/betteR20-5etools.user.js | |
// @downloadURL https://get.5e.tools/script/betteR20-5etools.user.js | |
// @description Enhance your Roll20 experience | |
// @author 5egmegaanon/astranauta/MrLabRat/TheGiddyLimit/DBAWiseMan/BDeveau/Remuz/Callador Julaan/Erogroth/Stormy/FlayedOne/Cucucc/Cee/oldewyrm/darthbeep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) Strange Loop Games. All rights reserved. | |
// See LICENSE file in the project root for full license information. | |
namespace Eco.Simulation.RouteProbing | |
{ | |
using System.Collections; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using Eco.Shared.Math; | |
using Eco.Shared.Serialization; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void Benchmark() | |
{ | |
var iterations = 1000; | |
var size = 100000; | |
for (var i = 0; i < size; i++) | |
{ | |
concurrent.Add(i.ToString(), i); | |
simple.Add(i.ToString(), i); | |
threadSafe.Add(i.ToString(), i); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Accessibility, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a:C:\Program Files\Unity\Hub\Editor\2018.3.8f1\Editor\Data\MonoBleedingEdge\lib\mono\unityjit\Accessibility.dll | |
Anonymously Hosted DynamicMethods Assembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null:<Dynamic> | |
Eco.Client, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null:W:\projects\Eco\Client\Library\ScriptAssemblies\Eco.Client.dll | |
Eco.Client.IntegrationTests, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null:W:\projects\Eco\Client\Library\ScriptAssemblies\Eco.Client.IntegrationTests.dll | |
Eco.Client.Tests, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null:W:\projects\Eco\Client\Library\ScriptAssemblies\Eco.Client.Tests.dll | |
Eco.LocalizationTools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null:W:\projects\Eco\Client\Assets\Plugins\Eco.LocalizationTools.dll | |
Eco.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null:W:\projects\Eco\Client\Assets\Plugins\Eco.Shared.dll | |
Editor.Eco, Version=0.0.0.0, Cul |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void Main (string[] args) | |
{ | |
var iterations = 1000; | |
var size = 100000; | |
for (var i = 0; i < size; i++) | |
{ | |
concurrent.Add(i.ToString(), i); | |
simple.Add(i.ToString(), i); | |
threadSafe.Add(i.ToString(), i); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package education | |
import java.util.* | |
import kotlin.test.assertEquals | |
import kotlin.test.assertFalse | |
import kotlin.test.assertTrue | |
/** | |
* Date: 1/13/2019 | |
* Time: 20:49 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.* | |
/** | |
* Date: 11/18/2018 | |
* Time: 09:26 | |
*/ | |
fun printArray(a: LongArray) { | |
var i = 0 | |
while (i < a.size) { | |
print(a[i++]) |
NewerOlder