This file contains hidden or 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
// Pass the callback to the modified Client Start method | |
public void Initialize(SWIGTYPE_p_f_p_void_p_q_const__char_p_q_const__char_p_short_int_int_int_int__void receivedAudio) { | |
if (_initialized) | |
return; | |
VxClient.Instance.Start(receivedAudio); | |
_initialized = true; | |
} |
This file contains hidden or 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
// so user can allow app to use location | |
func openMyAppLocationSettings() { | |
if let bundleId = Bundle.main.bundleIdentifier, | |
let url = URL(string: "\(UIApplication.openSettingsURLString)&path=LOCATION/\(bundleId)") | |
{ | |
UIApplication.shared.open(url, options: [:], completionHandler: nil) | |
} | |
} |
This file contains hidden or 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
// add this import | |
using System.Net.Http; | |
public class Requests { | |
// Doing a GET request | |
void GetRequest() { | |
// create an http client | |
var client = new HttpClient(); |
This file contains hidden or 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
[SEVERE] Fri Aug 10 22:52:58 CEST 2018: EXCEPTION: SEVEREjava.util.ConcurrentModificationException | |
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:909) | |
at java.util.ArrayList$Itr.next(ArrayList.java:859) | |
at lamerton.troy.quester.Main.onStop(Main.java:152) | |
at org.rspeer.script.LoopTask.setStopping(zf:75) | |
at org.rspeer.script.Script.setStopping(in:188) | |
at org.rspeer.script.5.IIIIiiiiIiiii(th:189) | |
at org.rspeer.script.5.iiiIIiiiiiiII(th:154) | |
at org.rspeer.ui.component.9.IIIIiiiiIiiii(hj:132) | |
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) |
This file contains hidden or 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
@Override | |
public int loop() { | |
if (this.stoppingCompleter) { | |
this.releaseQuestCompleter(0); | |
this.stoppingCompleter = false; | |
Log.severe("The quest completer stopped itself because it cannot continue"); | |
Time.sleep(1000); | |
return 0; | |
} |
This file contains hidden or 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
# Romeo & Juliet | |
--- | |
steps: | |
- Walk: Romeo | |
- Talk: Romeo, 3, 1, 3 | |
- Walk: Varrock west | |
- Walk: Juliet | |
- Climb: up | |
- Talk: Juliet, 3 | |
- Climb: down |
This file contains hidden or 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 class Helpers { | |
public static boolean isInCutscene() { | |
return Scene.isDynamic() || Game.getClient().isCameraLocked(); | |
} | |
} |
This file contains hidden or 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
// toggle the show/hide for file diffs in github pull requests | |
// this script hides all files with 'zipkey-icons' in the name | |
// and the language files | |
var fileDiffs = document.querySelectorAll('.file-header.js-file-header'); | |
for (const fileDiff of fileDiffs) { | |
const text = fileDiff.innerText; | |
if (text.includes('zipkey-icons') || text.includes('/languages')) { | |
const hideButton = fileDiff.querySelector('.btn-octicon.js-details-target[aria-expanded="true"]'); | |
hideButton && hideButton.click() |
This file contains hidden or 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
[ | |
{ | |
"name": "Aruba", | |
"callingCode": "297", | |
"translations": { | |
"de": "Aruba", | |
"jp": "アルバ" | |
}, | |
"code": "AW" | |
}, |
This file contains hidden or 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
// short-hand functions | |
const pythag = (a, b) => Math.sqrt(a * a + b * b); | |
console.log(pythag(3, 4)); | |
// es6 classes | |
class Dog { | |
constructor(anyType = 'nothing', cute = false) { | |
this.talkThis = anyType; | |
this.cute = cute; | |
this.speak = this.speak.bind(this); |