Skip to content

Instantly share code, notes, and snippets.

@nwingt
nwingt / news.py
Last active August 17, 2016 05:45
def _save_game_record_in_table(table_name, game_record_id, user_id, score = 0, difficulty = 0):
container = SkygearContainer(api_key=MASTER_KEY, user_id=user_id)
container.send_action('record:save', {
'database_id': '_public',
'records': [{
'_id': table_name + '/' + str(game_record_id),
'_access': [],
'user_id': {
'$id': 'user/' + user_id,
{
"api_key": "changeme",
"access_token": "088df9fe-3e11-4247-a88c-4af154046a33",
"args": [
{
"id": "38392c6a-7698-43f2-aa5b-9acf60e9cd1eass1",
"questions": [
{
"id": "bec004fb-c88f-48d9-b8f4-2ec120dd4794",
"answers": [

功能說明書

顯示背景

設定場景的背景圖片和效果

Markdown Less Pretty
Still renders nicely
1 2 3

功能說明書

顯示背景

設定場景的背景圖片和效果

參數 說明
調色 可選擇顏色,以增加背景圖片調色功能。
調色強度 數值範圍 0 - 255,數值越大,調色效果越明顯,必填。如果不需調色,可輸入數值 0。
切換時間 切換背景圖片的時間。單位為微妙,數值越大,切換時間越長,必填。
@nwingt
nwingt / sort_character_fgimages.md
Last active May 11, 2017 07:30
oice_SQL_snippet

Sort Character FG Images

Replace the {CHARACTER_ID} by the character id you want to order

SELECT A.id, 
       A.`name_en`
FROM   `asset` AS A 
       JOIN `character_fgimages` CA 
         ON CA.`asset_id` = A.`id` 
WHERE CA.`character_id` = {CHARACTER_ID} 
@nwingt
nwingt / example.js
Created June 9, 2017 03:17
Popup Issue
var popupWindow = window.open("http://www.nlcitychurch.org.hk");
popupWindow.onunload = function () {
console.log("do something when the pop up closes");
}
$base-width: 320;
@function px-vw($value) {
@return $value / $base-width * 100vw;
}
.like-button {
font-size: px-vw(16);
}

Keybase proof

I hereby claim:

  • I am nwingt on github.
  • I am nwingt (https://keybase.io/nwingt) on keybase.
  • I have a public key ASBfYgY74f7HSM96VH_T025-dVXPiHde--4Fv2nTrGSe6Ao

To claim this, I am signing this object: