powercfg -h off
- disable indexation
disk->options->allow the index file...
- disable Superfetch in control services
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
'use strict' | |
const super_cast = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']; | |
const convert = (arr_char) => { | |
let real_num = 0; | |
for (let i = 0; i < arr_char.length; ++i) { | |
real_num = real_num + Math.pow(10, i) * super_cast.indexOf(arr_char[i]); | |
}; | |
return real_num; | |
} |
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 <iostream> | |
#include <regex> | |
using namespace std; | |
int main() | |
{ | |
regex sentense_regex("[^!?.]+"); | |
string all_str; | |
string cmp_str; |
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 <pthread.h> | |
void *ping_task(char *arg) | |
{ | |
printf("ping %s", arg); | |
usleep(1); | |
return (NULL); |
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
// ==================== easy error {{{ | |
type EasyAPIError struct { | |
Errors []ErrorDetail `json:"errors"` | |
} | |
// ErrorDetail represents an individual item in an EasyAPIError. | |
type ErrorDetail struct { | |
Message string `json:"message"` | |
Code int `json:"code"` | |
} |
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
// #################### http error {{{ | |
// ApiHttpError something | |
type ApiHttpError struct { | |
Code int `json:"errorCode"` | |
HttpCode int `json:"-"` | |
Message string `json:"errorMsg"` | |
Info string `json:"errorInfo"` | |
} |
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
'use strict'; | |
function merge_arguments() { | |
let obj = {}, | |
i = 0, | |
len = arguments.length, | |
key; | |
for (; i < len; i++) { | |
for (key in arguments[i]) { | |
if (arguments[i].hasOwnProperty(key)) { |
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
" You can edit this file by hand. | |
" The " character at the beginning of a line comments out the line. | |
" Blank lines are ignored. | |
" The Default color scheme is used for any directory that does not have | |
" a specified scheme and for parts of user interface like menus. A | |
" color scheme set for a base directory will also | |
" be used for the sub directories. | |
" The standard ncurses colors are: |
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
package main | |
import ( | |
"fmt" | |
"os" | |
"github.com/gin-gonic/contrib/static" | |
"github.com/gin-gonic/gin" | |
) |
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
function obj_to_param(obj) { | |
return Object.keys(obj).map(function(key) { | |
return key + '=' + obj[key]; | |
}).join('&'); | |
} | |
function somef(obj) { | |
fetch(`${URL}/api/get/some?${obj_to_param(obj)}`) | |
.then((res) => res.json()) | |
.then((json) => console.log('some: ', json.body)) |