Skip to content

Instantly share code, notes, and snippets.

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
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
class SomeClass
{
public:
void *field;
~SomeClass()
{
if (field)
{
free(field);
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"
#!/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
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
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")
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")
--------------------------------------------------------------------------------
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(); ->