# normal(explicitly specified start AND end)
curl -v -X GET -H "range: bytes=1-8" http://localhost:8080/bbb/test
# specified ONLY start(end will be specified at the end of file)
curl -v -X GET -H "range: bytes=10-" http://localhost:8080/bbb/test
# specified ONLY one negative value(last N bytes of file will be retrieved)
curl -v -X GET -H "range: bytes=-11" http://localhost:8080/bbb/test
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 <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
typedef enum node_type | |
{ | |
number, operation | |
} NType; | |
typedef enum op_type |
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
/** | |
* Learning Abstraction With C | |
* | |
* make with: cc iteratordemo.c -o iteratordemo -g | |
* | |
* works as ./iteratordemo, doesnt work as: | |
* $ valgrind --leak-check=full ./iteratordemo | |
*/ | |
#include <stdio.h> |
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
diff --git a/index.html b/index.html | |
index 6582498..12f71ac 100644 | |
--- a/index.html | |
+++ b/index.html | |
@@ -98,6 +98,7 @@ comments: false | |
<div> | |
<!-- Tab panes --> | |
<div class="tab-content"> | |
+ {% increment issue_number %} | |
{% for tab in site.data.data.tabs %} |
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
typedef int boolean_t; | |
boolean_t (*status_checker_function)(void); | |
int change_bulb_required_engineers_recur(status_checker_function); | |
int change_bulb_required_engineers_recur(status_checker_function testbulb) | |
{ | |
return _change_bulb_required_engineers_recur(testbulb, 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
import random | |
NOUNS = [ "wings", "flowers", "Uggs", "bees", "tomatoes", "carrots", "teeth" ] | |
VERBS = [ "shoot", "fall", "walk", "jump", "butcher", "swim", "sleep", "dive" ] | |
ADJECTIVES = [ "ugly", "blue", "tart", "smelly", "yellow", "fleshy" ] | |
ADVERBS = [ "anxiously", "willfully", "angrily", "happily", "grossly", "hungrily"] | |
def makeSentence(): | |
a = random.choice(ADJECTIVES) | |
n = random.choice(NOUNS) |
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
/** | |
* Usage: | |
* wget this file into `./log_cleaner/script.js`, next to data.txt | |
* `cd ./log_cleaner` | |
* `node script.js` | |
*/ | |
var fs = require('fs'); | |
var Buffer = require('buffer').Buffer; | |
var bufferSize = 300; |
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 | |
alias wanip='dig +short myip.opendns.com @resolver1.opendns.com' | |
project_name=$1 | |
bare_rep_dir="/home/`whoami`/bare-git/${project_name}" # bare repo directory | |
work_rep_dir="/home/`whoami`/my-apps/${project_name}" # working dir w/files | |
if [[ -d $bare_rep_dir && \ | |
! -L $bare_rep_dir ]] ; then | |
echo "Already exists in $bare_rep_dir" |
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
from collections import OrderedDict as o_dict | |
from fpdf import FPDF | |
from fpdf.util import textstring | |
def create_dictionary_string(dict_): | |
"""format ordered dictionary as PDF dictionary""" | |
return ''.join([ | |
'<<', | |
'\n'.join([' '.join(f) for f in dict_.items()]), |
To be able to configure an option to be able to filter rows without content inside of them. This is useful in tandem with the other search features present in this software when dealing with incomplete data.
In the function which filters an individual column, I have implemented logic which runs a truth test on the cell value instead of checking against regex. With additional knowledge as to the inner workings of this library, this value could be configurable via an API, perhaps at initialization.