Skip to content

Instantly share code, notes, and snippets.

View kdstarter's full-sized avatar
🏠
Working from home

kdstarter

🏠
Working from home
  • Shanghai China
View GitHub Profile
@kdstarter
kdstarter / BaseModel_ORM_prototype.php
Created December 5, 2019 06:51
BaseModel ORM prototype for php
<?php
class BaseModel
{
protected $tableName = '';
private $columnNames = []; // ['id' => 'int', ...]
private $attrNames = [];
// private $attrValues = []; // ['id' => 1, ...]
private $attrFuncNames = [];
@kdstarter
kdstarter / hangman_client.rb
Created February 25, 2016 03:16
A ruby client for Hangman Game.
require 'rest-client'
require 'json'
class HangmanClient
attr_reader :playerId, :sessionId, :number_of_words, :max_guess_count, :current_word, :result
def initialize(serverUri, playerId)
@serverUri = serverUri
@playerId = playerId