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
| // takes the form field value and returns true on valid number | |
| function valid_credit_card(value) { | |
| // accept only digits, dashes or spaces | |
| if (/[^0-9-\s]+/.test(value)) return false; | |
| // The Luhn Algorithm. It's so pretty. | |
| var nCheck = 0, nDigit = 0, bEven = false; | |
| value = value.replace(/\D/g, ""); | |
| for (var n = value.length - 1; n >= 0; n--) { |
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
| <?php | |
| namespace App\Transformers; | |
| use Illuminate\Support\Collection; | |
| class SampleTransformer extends Transformer | |
| { |
This file has been truncated, but you can view the full file.
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
| --------- beginning of system | |
| 02-24 21:47:47.219 2917 3176 D MountService: Setting up emulation state, initlocked=false | |
| 02-24 21:47:47.219 2917 3176 D CryptdConnector: SND -> {2 cryptfs unlock_user_key 0 0 ! !} | |
| 02-24 21:47:47.220 233 238 D vold : e4crypt_unlock_user_key 0 serial=0 token_present=0 | |
| 02-24 21:47:47.221 2917 3178 D CryptdConnector: RCV <- {200 2 Command succeeded} | |
| 02-24 21:47:47.221 2917 3176 D MountService: Thinking about reset, mSystemReady=true, mDaemonConnected=true | |
| 02-24 21:47:47.222 2917 3176 D VoldConnector: SND -> {3 volume reset} | |
| 02-24 21:47:47.222 2917 2959 I ActivityManager: Force stopping com.android.providers.media appid=10010 user=-1: vold reset | |
| 02-24 21:47:47.224 2917 3177 D VoldConnector: RCV <- {651 emulated 7} |
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 __future__ import print_function | |
| import numpy as np | |
| # create an empty matrix | |
| # @param iteration: length of an array | |
| # @return matrix | |
| def generateEmptyMatrix(iteration): | |
| print("matrix: ") | |
| matrix = np.array([[0 for x in range(iteration)] for y in range(iteration)]) | |
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
| <?php | |
| require('vendor/autoload.php'); | |
| require('include/header.php'); | |
| use Capstone\Model\Item; | |
| $viewPageMode = 0; /* 0 = summary mode, 1 = stock card mode */ | |
| $withdrawSearch = null; | |
| /** |
This file has been truncated, but you can view the full file.
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
| [ | |
| { | |
| "Code": "010000000", | |
| "Name": "REGION I (ILOCOS REGION)", | |
| "Inter-Level": "Reg", | |
| "City Class": "", | |
| "Income Classification": "", | |
| "Urban / Rural (based on 2010 CPH)": "", | |
| "POPULATION (2015 POPCEN)": "5,026,128" | |
| }, |
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
| /// NOTE: This snippet requires babel preset stage-2 or greater. | |
| class BetterSwitch { | |
| cases = {}; | |
| constructor(defaultCaseRoutine = undefined) { | |
| if (defaultCaseRoutine) { | |
| this.cases.default = defaultCaseRoutine | |
| } | |
| } | |
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 noop(...params: any[]) { } | |
| export class BetterSwitch { | |
| private cases: any = {}; | |
| constructor(defaultCaseRoutine: any = noop) { | |
| this.cases.default = defaultCaseRoutine | |
| } | |
| /** |
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 { DynamoDB } from "aws-sdk" | |
| type DynamoDocType = DynamoDB.DocumentClient.DocumentClientOptions | DynamoDB.Types.ClientConfiguration | |
| /** | |
| * Promised enabled DocumentClient | |
| * @class DocumentClient | |
| */ | |
| export class DocumentClient { | |
| private documentInstance: DynamoDB.DocumentClient |
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
| Array.prototype.limit = function (limit) { | |
| this.limit = limit; | |
| return this; | |
| } | |
| Array.prototype.full = function() { | |
| if (!this.limit) { | |
| this.limit = 1000000; | |
| } |
OlderNewer