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
from FunctionCall call, FunctionCall lock | |
where | |
// Assert that `lock` is your lock function. | |
lock.getTarget().getName() = "lock_function" and | |
// Assert that `call` is your target function. | |
call.getTarget().getName() = "yrp" and | |
// Assert that there is not a predecesor to `call` that is a call to the lock function. | |
not call.getAPredecessor+() = lock |
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
sudo -i | |
# Add aliases to the versioned binaries. | |
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 100 | |
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 100 | |
update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-10 100 | |
update-alternatives --install /usr/bin/lldb lldb /usr/bin/lldb-10 100 | |
update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-10 100 | |
# Add links for cc and c++ |
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
type HistoryBuffer () = | |
let elements = ResizeArray<string>() | |
let mutable current = 0 | |
member this.AddElement element = | |
elements.Add element | |
current <- elements.Count - 1 | |
member this.NextElement() = | |
if elements.Count <> 0 then |
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
class SomeClass | |
{ | |
public: | |
void *field; | |
~SomeClass() | |
{ | |
if (field) | |
{ | |
free(field); |
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
from git import * | |
import time | |
import sys | |
import re | |
import urllib2 | |
from multiprocessing import Pool | |
import multiprocessing | |
import cgi | |
WEBKIT_REPO = "/home/agustin/workspace/WebKit" |
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
#!/bin/bash | |
LATENCY=1 | |
NAME=`basename ${BASH_SOURCE[0]}` | |
red='\033[0;31m' | |
green='\033[0;32m' | |
nocolor='\033[00m' | |
if [[ "$1" = "" || "$2" = "" || "$3" = "" ]]; then |
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
open List | |
open String | |
(* Give a string return a dictionary of the words and the amount of times they are used *) | |
let add_word_count table word = | |
let count = match Hashtbl.find_opt table word with | |
| None -> 0 | |
| Some x -> x + 1 | |
in | |
Hashtbl.replace table word count |
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
open String | |
open List | |
(* Give a string return a dictionary of the words and the amount of times they are used *) | |
let word_frequency string = | |
let words = String.split_on_char ' ' string in | |
words | |
let _ = | |
List.iter print_endline (word_frequency "HOLA PEPE") |
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
open String | |
open List | |
(* Give a string return a dictionary of the words and the amount of times they are used *) | |
let word_frequency string = | |
String.split_on_char ' ' string | |
List.map print_endline (word_frequency "HOLA PEPE") |
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
-------------------------------------------------------------------------------- | |
0 | integer n = UInt(Rn); -> [] [] | |
0 | BranchType branch_type; -> [] [] | |
0 | integer m = UInt(Rm); -> [] [] | |
0 | boolean pac = (A == '1'); -> [] [] | |
0 | boolean use_key_a = (M == '0'); -> [] [] | |
0 | boolean source_is_sp = ((Z == '1') && (m == 31)); -> [] [] | |
0 | if !pac && m != 0 then -> ['if'] [0] | |
4 | UnallocatedEncoding(); -> |
NewerOlder