#There are some useful Shell Script.
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
# GDC Vault videos can't be watched on mobile devices and this is a very sad thing indeed! | |
# (Note: this has changed for GDC2013, which lets you watch raw MP4 streams. Kudos!) | |
# This script is designed to circumvent this by downloading the lecture and slideshow | |
# videos which can then be re-encoded into whatever format you wish. Obviously, you | |
# won't be able to do this without access to the Vault. This is strictly for the | |
# convenience of legitimate Vault users! | |
# Note: this code is rather flimsy and was written as fast as possible for my own personal use. | |
# The code only works for the most recent GDC Vault videos, since they all use the same player | |
# format. If the XML format used to run the player is changed (as it has in the past), the code |
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
/** | |
問題:假設記憶遊戲使用12張牌,6對(112233445566) | |
規則為每次翻兩張,相同就保留,不同就蓋回背面 | |
給六次機會,請問用程式算翻出6對~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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
- Linux Cross Reference
- 搜尋kernel API
##I/O Device Driver
- Character Driver
- Block Driver
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
@ECHO OFF | |
:sku_selection | |
Set PROJECT= | |
ECHO Which PROJECT do you want to sign? | |
ECHO 1. D17 | |
ECHO 2. D15 | |
ECHO 3. E15 | |
Set /p PROJECT=Please type the number: |
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
#include <PegaCommonHeaders.h> | |
#define ACPI_TIMER_ADDRESS (PM_BASE_ADDR+0x08) | |
#define BITS_IN_ACPI_TIMER 24 // The current bits in ACPI Timer - Porting need | |
VOID SB_ACPIDelay(UINTN MicroSeconds) | |
{ | |
UINTN TicksNeeded; | |
UINT32 TimerValue, NewTimerValue; | |
UINTN OverFlow; |
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
// import_json_appsscript.js | |
// https://gist.github.com/allenyllee/c764c86ed722417948fc256b7a5077c4 | |
// | |
// Changelog: | |
// (Oct. 16 2019) tag: allenyllee-20191016 | |
// 1. Fixed google script error: urlfetchapp - service invoked too many times https://stackoverflow.com/questions/10598179/google-apps-script-urlfetchapp-service-invoked-too-many-times | |
// (Jul. 16 2018) tag: allenyllee-20180716 | |
// 1. Fixed the issue "If you try to query /arrayA[k]/arrayB[n]/arrayC[m]/.../member, you will always get /arrayA[k]/arrayB[k]/arrayC[k]/.../member." | |
// (Nov. 30 2017) tag: allenyllee-20171130 | |
// 1. Add the ability to query array elements by using xpath like "/array[n]/member" where "n" is array index |
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
#! /usr/bin/env python | |
class Point(object): | |
def __init__(self, _x, _y, _order = None): self.x, self.y, self.order = _x, _y, _order | |
def calc(self, top, bottom, other_x): | |
l = (top * inverse_mod(bottom)) % p | |
x3 = (l * l - self.x - other_x) % p | |
return Point(x3, (l * (self.x - x3) - self.y) % p) |
OlderNewer