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
| #!/bin/bash | |
| for i in {1..10} | |
| do | |
| make reverse_bits swap_bits count_bits parity | |
| done |
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
| Test CountBits PASSED (10001/10001) [ 2 us] | |
| Test CountBits PASSED (10001/10001) [ 2 us] | |
| Test CountBits PASSED (10001/10001) [ 3 us] | |
| Test CountBits PASSED (10001/10001) [ 3 us] | |
| Test CountBits PASSED (10001/10001) [ 3 us] | |
| Test CountBits PASSED (10001/10001) [ 3 us] | |
| Test CountBits PASSED (10001/10001) [ 4 us] | |
| Test CountBits PASSED (10001/10001) [ 4 us] | |
| Test CountBits PASSED (10001/10001) [ 8 us] | |
| Test Parity_divide_and_conquer_generic<unsigned long long> PASSED (10000/10000) [ 2 us] |
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
| import Html exposing (Html, div, text) | |
| import Svg exposing (svg, circle, line) | |
| import Svg.Attributes exposing (..) | |
| import Time exposing (Time, second, hour) | |
| main = | |
| Html.program | |
| { init = init | |
| , update = update |
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
| //HTML | |
| //<div id="container"/> | |
| //CSS | |
| //table,td {border: 1px solid black;} | |
| JAVASCRIPT | |
| function createHLayout() { | |
| var row = $('<tr/>') |
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
| #!/usr/bin/python3 | |
| import sys | |
| import os | |
| import argparse | |
| from os import path | |
| from pprint import pprint | |
| from tempfile import TemporaryDirectory |
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
| import std.stdio; | |
| import std.string; | |
| import deimos.clang.index; | |
| //Purpose: analyse a C/C++ file supplied through the command line using libclang | |
| //How to compile:- | |
| //dmd -c -gc testclang.d | |
| //g++ -g -I../llvm/tools/clang/include -L../llvm/build/Debug+Asserts/lib -o testclang testclang.o -lclang -lphobos2 -lrt | |
| //Note: libclang.so must be in the search path for this to work. |
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
| #include <clang-c/Index.h> | |
| //Purpose: analyse a C/C++ file supplied through the command line using libclang | |
| int main(int argc, char *argv[]) | |
| { | |
| CXIndex index = clang_createIndex(0, 0); | |
| CXTranslationUnit tu = clang_parseTranslationUnit(index, NULL, | |
| argv, argc, NULL, 0, CXTranslationUnit_None); |