$ ./cek_ekstensi.rb hello.rb.doc mini.docx max.dot hello.rb
file: hello.rb.doc adalah file Ms. Word
file: mini.docx adalah file Ms. Word
// ==UserScript== | |
// @name gist: replace title with filename | |
// @namespace http://d.hatena.ne.jp/youpy/ | |
// @include http://gist.github.com/* | |
// @include https://gist.github.com/* | |
// @exclude http://gist.github.com/gists | |
// @exclude https://gist.github.com/gists | |
// @require https://gist.github.com/3242.txt | |
// ==/UserScript== |
require 'digest/md5' | |
def gfm(text) | |
# Extract pre blocks | |
extractions = {} | |
text.gsub!(%r{<pre>.*?</pre>}m) do |match| | |
md5 = Digest::MD5.hexdigest(match) | |
extractions[md5] = match | |
"{gfm-extraction-#{md5}}" | |
end |
class LC | |
def initialize | |
@res = {1=>1,2=>3,3=>6,4=>6,5=>7,6=>9,7=>13,8=>18,9=>24} | |
@co = {1=>1,2=>2,3=>3,4=>0,5=>1,6=>2,7=> 4,8=> 5,9=> 6} | |
end | |
def lc(n) | |
@res[n] ||= co(n) + lc(n-1) | |
end |
Teman-teman yang sekarang jadi mahasiswa tingkat akhir, pasti pernah mengalami stres karena skripsi. Kalau tidak, beruntunglah kalian. Tapi kalau iya, tips berikut ini mungkin akan manjur untuk mengobati stres dan beberapa masalah lain yang muncul akibat proses pembuatan skripsi teman-teman. Bukan hal yang baru tentunya, tapi ide ini cukup menarik dan menyenangkan untuk dicoba.
Dan jangan salah, untuk mereka yang masih belum jadi mahasiswa tingkat akhir, jangan pindah channel dulu. Gak ada salahnya mempersiapkan segala sesuatu dari awal. Toh nanti hal yang sama juga akan kalian hadapi.
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; |
<!doctype html> | |
<html> | |
<head> | |
<title>Trying</title> | |
</head> | |
<body> | |
Hello World! | |
</body> | |
</html> |
- Date: 6/29/2012
- Level: Easy
Write a program that takes a filename and a parameter n and prints the n most common words in the file, and the count of their occurrences, in descending order.
Request: Please take your time in browsing [/r/dailyprogrammer_ideas][1] and helping in the correcting and giving suggestions to the problems given by other users. It will really help us in giving quality challenges!
Windows Registry Editor Version 5.00 | |
[-HKEY_CLASSES_ROOT\.lnk] | |
[HKEY_CLASSES_ROOT\.lnk] | |
@="lnkfile" | |
[HKEY_CLASSES_ROOT\.lnk\ShellEx] | |
[HKEY_CLASSES_ROOT\.lnk\ShellEx\{000214EE-0000-0000-C000-000000000046}] |