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
| @char_pool = [] | |
| 10.times do |i| | |
| if i != 5 | |
| @char_pool << "R#{i}" | |
| @char_pool << "B#{i}" | |
| else | |
| @char_pool << "G5" | |
| @char_pool << "G5" | |
| end |
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
| javascript:(function(){ | |
| function deepCompare(){var n,e,t,r;function o(n,e){var a;if(isNaN(n)&&isNaN(e)&&"number"==typeof n&&"number"==typeof e)return!0;if(n===e)return!0;if("function"==typeof n&&"function"==typeof e||n instanceof Date&&e instanceof Date||n instanceof RegExp&&e instanceof RegExp||n instanceof String&&e instanceof String||n instanceof Number&&e instanceof Number)return n.toString()===e.toString();if(!(n instanceof Object&&e instanceof Object))return!1;if(n.isPrototypeOf(e)||e.isPrototypeOf(n))return!1;if(n.constructor!==e.constructor)return!1;if(n.prototype!==e.prototype)return!1;if(t.indexOf(n)>-1||r.indexOf(e)>-1)return!1;for(a in e){if(e.hasOwnProperty(a)!==n.hasOwnProperty(a))return!1;if(typeof e[a]!=typeof n[a])return!1}for(a in n){if(e.hasOwnProperty(a)!==n.hasOwnProperty(a))return!1;if(typeof e[a]!=typeof n[a])return!1;switch(typeof n[a]){case"object":case"function":if(t.push(n),r.push(e),!o(n[a],e[a]))return!1;t.pop(),r.pop();break;default:if(n[a]!==e[a])return!1}}return!0}if(argument |
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 deepCompare() { | |
| var i, l, leftChain, rightChain; | |
| function compare2Objects(x, y) { | |
| var p; | |
| // remember that NaN === NaN returns false | |
| // and isNaN(undefined) returns true | |
| if (isNaN(x) && isNaN(y) && typeof x === 'number' && typeof y === 'number') { | |
| return true; |
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
| javascript:(function(){ | |
| function deepCompare(){var n,e,t,r;function o(n,e){var a;if(isNaN(n)&&isNaN(e)&&"number"==typeof n&&"number"==typeof e)return!0;if(n===e)return!0;if("function"==typeof n&&"function"==typeof e||n instanceof Date&&e instanceof Date||n instanceof RegExp&&e instanceof RegExp||n instanceof String&&e instanceof String||n instanceof Number&&e instanceof Number)return n.toString()===e.toString();if(!(n instanceof Object&&e instanceof Object))return!1;if(n.isPrototypeOf(e)||e.isPrototypeOf(n))return!1;if(n.constructor!==e.constructor)return!1;if(n.prototype!==e.prototype)return!1;if(t.indexOf(n)>-1||r.indexOf(e)>-1)return!1;for(a in e){if(e.hasOwnProperty(a)!==n.hasOwnProperty(a))return!1;if(typeof e[a]!=typeof n[a])return!1}for(a in n){if(e.hasOwnProperty(a)!==n.hasOwnProperty(a))return!1;if(typeof e[a]!=typeof n[a])return!1;switch(typeof n[a]){case"object":case"function":if(t.push(n),r.push(e),!o(n[a],e[a]))return!1;t.pop(),r.pop();break;default:if(n[a]!==e[a])return!1}}return!0}if(argument |
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
| class Solution { | |
| public: | |
| int minDominoRotations(vector<int>& A, vector<int>& B) { | |
| int count[7] = {0}; | |
| for(int i =0;i < size(A);i++){ | |
| if(A[i] == B[i]){ | |
| count[A[i]]++; | |
| } | |
| else{ | |
| count[A[i]]++; |
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
| class Solution { | |
| public: | |
| TreeNode* bstFromPreorder(vector<int>& preorder, int& index, int parentIndex) { | |
| if(index >= preorder.size() || (parentIndex >= 0 && preorder[index] >= preorder[parentIndex])){ | |
| return nullptr; | |
| } | |
| else{ | |
| TreeNode* root = new TreeNode(preorder[index]); | |
| int thisIndex = index; | |
| index++; |
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 java.io.BufferedReader; | |
| import java.io.FileNotFoundException; | |
| import java.io.FileReader; | |
| import java.io.IOException; | |
| import java.util.*; | |
| public class 方劑單味藥組合 | |
| { | |
| private static Set<Set<String>> getPowerSet(List<String> 藥物集合) | |
| { |
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
| sudo ./certbot-auto certonly --manual -d "*.example.com" -d "example.com" --agree-tos --manual-public-ip-logging-ok --preferred-challenges dns-01 --server https://acme-v02.api.letsencrypt.org/directory |
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
| class Scene_Load | |
| #-------------------------------------------------------------------------- | |
| # ● 讀檔成功處理 | |
| #-------------------------------------------------------------------------- | |
| alias lctseng_fix_sv_on_load_success on_load_success | |
| def on_load_success | |
| lctseng_fix_sv_on_load_success | |
| $sv_camera = Battle_Camera.new | |
| end | |
| end |
NewerOlder