Skip to content

Instantly share code, notes, and snippets.

View gaga5lala's full-sized avatar
🐈

Gaga Pan gaga5lala

🐈
  • Taiwan
View GitHub Profile
@gaga5lala
gaga5lala / nsysu_enroll
Last active August 29, 2015 14:06
中山大學網路註冊問卷(題型:四選一)
var inputs = document.getElementsByTagName("input")
var chk_input =0
for (var i = 0; i < inputs.length; i++) {
switch (inputs[i].type) {
case "checkbox":
if (!inputs[i].checked && chk_input %4 ==0) {
inputs[i].checked = true;
}
chk_input +=1
$sql = "SELECT * FROM `member` as m LEFT JOIN `play` as r on m.mId = r.mId where m.mDoctor = ?";
$sth=$dbh->prepare($sql);
$sth->execute(array($mId));
while ($result = $sth->fetch(PDO::FETCH_OBJ)) {
print_r($result);
}
-----
@gaga5lala
gaga5lala / file
Last active August 29, 2015 14:12
COIMOTION LIST
-blocks
--modules
---list
----list.js(需要嗎)
--views
---list
----list.html
----listCtrl.js
<a href="#myModal" role="button" class="btn" data-toggle="modal">執行範例對話視窗</a>
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">對話視窗標題</h3>
</div>
<div class="modal-body">
<p>一個好的本體…</p>
</div>
@gaga5lala
gaga5lala / graduate01.js
Created June 28, 2015 08:29
NSYSU 課程組離校問卷
// year + department
// X1032 + B402
var department = 'X1032B402';
var start = 101;
var end = 2000;
var className;
var row;
module Ex25
# This function will break up words for us.
def Ex25.break_words(stuff)
words = stuff.split(' ')
return words
end
# Sorts the words.
def Ex25.sort_words(words)
@gaga5lala
gaga5lala / ex25_ans.rb
Last active October 31, 2015 16:11
Learn Ruby The Hard Way http://lrthw.github.io/ex26/
module Ex25
# This function will break up words for us.
def Ex25.break_words(stuff)
words = stuff.split(' ')
return words
end
# Sorts the words.
def Ex25.sort_words(words)
@gaga5lala
gaga5lala / how_to_concerns.md
Created February 14, 2016 16:44 — forked from jhjguxin/how_to_concerns.md
how to concerns with rails 3
@gaga5lala
gaga5lala / myToReadBookLists.md
Created July 13, 2016 13:59 — forked from chusiang/myToReadBookLists.md
凍仁的讀書清單
@gaga5lala
gaga5lala / application_controller.rb
Created July 13, 2016 14:01 — forked from joe11051105/application_controller.rb
Get a list of all the filters on a given Rails 3 controller.
# Add these methods to your ApplicationController. Then, any controller
# that inherits from it will have these methods and can programmatically
# determine what filters it has set.
class ApplicationController < ActionController::Base
def self.filters(kind = nil)
all_filters = _process_action_callbacks
all_filters = all_filters.select{|f| f.kind == kind} if kind
all_filters.map(&:filter)
end