Author(s): Austin Clements, Rick Hudson
Last updated: 2016-10-18
Discussion at https://golang.org/issue/17503.
| typedef struct _object { | |
| _PyObject_HEAD_EXTRA | |
| Py_ssize_t ob_refcnt; | |
| int color; /* the color of local mark-scan where 0 black, 1 red 2 green */ | |
| struct _typeobject *ob_type; | |
| } PyObject; | |
| #define _Py_CHECK_REFCNT(OP) \ |
| #!/bin/bash | |
| #Autor: Emiliano Carlos de Moraes Firmino | |
| #Comentario: igual a usar "sar -A 1", mas sem a interface de rede | |
| # que não abre no kSar | |
| #Script Variables | |
| output_file="sar_data.txt" #arquivo de saída | |
| interval=1 #taxa de amostragem em segundos | |
| #Inicia rodada de testes |
Author(s): Austin Clements, Rick Hudson
Last updated: 2016-10-18
Discussion at https://golang.org/issue/17503.
| -module(equi). | |
| -export([start/1]). | |
| -spec start([any()]) -> integer(). | |
| start(Array) -> | |
| check_equi([], Array, 0). | |
| -spec check_equi([any()], [any()], non_neg_integer()) -> integer(). | |
| check_equi(_, [], _) -> -1; | |
| check_equi(PreList, [Head|Tail], EquIndice) -> |
| -module(solution). | |
| -export([start/2]). | |
| -spec start([any()],[any()]) -> 'ok'. | |
| start(A, B) -> | |
| interval(A, B, []). | |
| -spec interval([any()],[any()],[[any(),...]]) -> 'ok'. | |
| interval([], [], Intv) -> | |
| [[_|_]|Tail] = Intv, |
| class List extends Object { | |
| List() { super(); } | |
| List append(List l) { | |
| return this; // dummy | |
| } | |
| } | |
| class Nil extends List { | |
| Nil() { super (); } | |
| <link rel="stylesheet" type="text/css" href="/static/css/portal/style.css"> | |
| <!-- <script type="text/javascript" src="/static/js/ckeditor/jquery.min.js"></script> | |
| <script type="text/javascript" src="/static/ckeditor/ckeditor/ckeditor.js"></script> | |
| <script type="text/javascript" src="/static/ckeditor/ckeditor-init.js"></script> | |
| --> | |
| <link rel="stylesheet" type="text/css"href="/static/datatable/jquery.dataTables.min.css"/> | |
| <script src="/static/datatable/jquery-1.11.3.min.js"></script> | |
| <script type="text/javascript" charset="utf-8" src="/static/datatable/jquery.dataTables.min.js"></script> | |
| (forms (form class_methods . oo_methods) (form (rule_clauses (rule_clause (tokAtom main) (clause_args (argument_list ( ))) (clause_guard ->) (rule_body <missing ':-'> (lc_exprs (lc_expr (expr (expr_100 (expr_150 (expr_160 (expr_200 (expr_300 (expr_400 (expr_500 (expr_600 expr_700)))))))))))))) <missing '.'>) (form (rule_clauses (rule_clause (tokAtom io) (clause_args (argument_list :)) clause_guard (rule_body <missing ':-'> (lc_exprs (lc_expr (expr (expr_100 (expr_150 (expr_160 (expr_200 (expr_300 (expr_400 (expr_500 (expr_600 expr_700)))))))))))))) <missing '.'>) (form (rule_clauses (rule_clause (tokAtom format) (clause_args (argument_list ( (exprs (expr (expr_100 (expr_150 (expr_160 (expr_200 (expr_300 (expr_400 (expr_500 (expr_600 (expr_700 (expr_800 (expr_900 (expr_max (atomic (tokAtom 'Hello World!')))))))))))))))) ))) clause_guard (rule_body <missing ':-'> (lc_exprs lc_expr)))) .) <EOF>) |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <sys/types.h> | |
| #include <sys/stat.h> | |
| #include <fcntl.h> | |
| #include <errno.h> | |
| #include <inttypes.h> | |
| #include <unistd.h> | |
| #include <math.h> | |
| #include <string.h> |
| /* Read the RAPL registers on a sandybridge-ep machine */ | |
| /* Code based on Intel RAPL driver by Zhang Rui <rui.zhang@intel.com> */ | |
| /* */ | |
| /* The /dev/cpu/??/msr driver must be enabled and permissions set */ | |
| /* to allow read access for this to work. */ | |
| /* */ | |
| /* Code to properly get this info from Linux through a real device */ | |
| /* driver and the perf tool should be available as of Linux 3.14 */ | |
| /* Compile with: gcc -O2 -Wall -o rapl-read rapl-read.c -lm */ | |
| /* */ |