So I've just jailbroken my Kindle, and want to run Ruby on it. This is what I have right now on my Kindle:
Make sure you've also enabled usbnetwork
so that you can SSH to your kindle via USB.
import java.io.BufferedReader; | |
import java.util.Scanner; | |
import javax.swing.JOptionPane; | |
interface Dialog { | |
void say(String message); | |
String ask(String question); | |
} |
สมมติว่าเรามีอาร์เรย์อยู่ เราสามารถแทรกข้อมูลที่ตำแหน่งใดก็ได้ใน Array โดยใช้เมธอด Array#insert
แบบนี้
arr = [6, 7, 2, 3]
arr.insert(0, "first")
#=> ["first", 6, 7, 2, 3]
arr.insert(3, "second")
### | |
# DO YOU HEAR THE PEOPLE SING? (Uplifting Mix) | |
# version 1.3 (clearer kick sound) | |
# | |
# Converted from CoffeeScript | |
# Source: https://gist.github.com/11080149 | |
# Usage: coffee -bcp file.coffee | |
# | |
# Original from Les Miserables |
/** | |
* INFINITELY DESCENDING CHORD PROGRESSION (v1.1) | |
* | |
* Enjoy this chord progression that loops forever.... | |
* By Thai Pangsakulyanont (https://github.com/dtinth) | |
* | |
* https://gist.github.com/dtinth/11371713 | |
*/ | |
var step = 0.1 |
มีวิธีทำหลายภาษา
access_token = "..." | |
j = JSON.parse(`curl "https://graph.facebook.com/PeaceandOrderMaintainingCommand/feed?access_token=#{access_token}&limit=1000"`); nil | |
-> times { times.length * 60 / (times.max - times.min) }[j['data'].map { |c| Time.parse(c['created_time']) }] | |
# => 20.285306704707562 |
โจทย์ : http://expert-programming-tutor.com/tutorial/hyperhackathon.php
ป.ล. ไม่ได้ไปแข่ง
require 'prime'; Prime.find { |c| c > 1000000 } #=> 1000003
{ | |
"name": "Default color scheme for terminal prompts", | |
"groups": { | |
"background:divider": { "fg": "gray5", "bg": "gray0" }, | |
"session": { "fg": "black", "bg": "gray10", "attr": ["bold"] }, | |
"date": { "fg": "gray6", "bg": "gray1" }, | |
"time": { "fg": "gray10", "bg": "gray2", "attr": ["bold"] }, | |
"time:divider": { "fg": "gray5", "bg": "gray2" }, | |
"email_alert": { "fg": "white", "bg": "brightred", "attr": ["bold"] }, | |
"email_alert_gradient": { "fg": "white", "bg": "yellow_orange_red", "attr": ["bold"] }, |