This file contains 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
["~\n`","!\n1","@\n2","#\n3","$\n4","%\n5","^\n6","&\n7","*\n8","(\n9",")\n0","_\n-","+\n=","\\","`"], | |
[{w:1.5},"Tab","Q","W","E","R","T","Y","U","I","O","P","{\n[","}\n]",{w:1.5},"Baksp"], | |
[{w:1.75},"Caps Lock","A","S","D","F","G","H","J","K","L",":\n;","\"\n'",{w:2.25},"Enter"], | |
[{w:2.25},"Shift","Z","X","C","V","B","N","M","<\n,",">\n.","?\n/",{w:1.75},"Shift","Fn"], | |
[{w:1.5},"Ctrl",{x:1,w:1.5},"Alt",{a:7,w:7},"",{a:4,w:1.5},"Alt",{x:1,w:1.5},"Ctrl"] |
This file contains 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
const moment = require("moment"); | |
const crypto = require('crypto') | |
const RAW_DATA = [{"d":"2020.04.11","v":[2,5,14,28,31,32,20]},{"d":"2020.04.12","v":[2,5,14,28,31,32,20]}] | |
const DEFAULT_DATE_FORMAT = "YYYY.MM.DD" | |
const DEFAULT_REPEAT = 100 | |
function calcPowerpack(start, end) { | |
let start_date = moment(start, DEFAULT_DATE_FORMAT).startOf('day'), |
This file contains 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
//three six nine. 369 game | |
fn main() { | |
for n in 1..100 { | |
let mut cur_num: u32 = n; | |
let mut clap_cnt: u32 = 0; | |
while cur_num > 0 { | |
let cur_x:u32 = cur_num % 10; | |
clap_cnt += match cur_x { |
This file contains 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
<?php | |
$myArray = array(1,0,2,3,0,4,5,99,6,7,8,9,0); | |
$except = array(0); | |
$value = min(array_values(array_diff($myArray, $except))); | |
// $value == 1 |
This file contains 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
Map<String, ArrayList<File>> fileMaps = new HashMap<>(); | |
for (QueryParam queryParam : queryParams) { | |
if(queryParam == null) continue; | |
String type = queryParam.type; | |
if (type.equalsIgnoreCase("string")) { | |
requestParams.add(queryParam.key, queryParam.val); | |
} else if (type.equalsIgnoreCase("file")) { | |
try { | |
if(!fileMaps.containsKey(queryParam.key)){ |
This file contains 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 createImageFile($source_file, $target_file, $resize_width = 0, $resize_height = 0, $target_type = '', $thumbnail_type = 'crop') | |
{ | |
// check params | |
if (($source_file = FileHandler::exists($source_file)) === FALSE) | |
{ | |
return; | |
} | |
$target_file = FileHandler::getRealPath($target_file); | |
if(!$resize_width) |
This file contains 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
public class IndexedFragmentPagerAdapter extends FragmentPagerAdapter { | |
public SparseArray<Fragment> fragments = new SparseArray<>(); | |
public IndexedFragmentPagerAdapter(FragmentManager fm) { | |
super(fm); | |
} | |
@Override | |
public Fragment getItem(int position) { | |
return null; |