This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import math | |
def solution(): | |
l_range = xrange | |
l_int = int | |
l_str = str | |
for index,line in enumerate(open(sys.argv[1])): | |
if index != 0: | |
if len(line) == 3: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class News < ActiveRecord::Base | |
include Translation::Google | |
attr_accessible :date, :description, :link, :title, :language | |
has_many :translations | |
def after_save | |
Translation.create({news_id: self.id, description:translate(self.description, self.language, "ja"), title: translate(self.title, self.language, "ja"), language: "ja" }) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
// fibonacci is a function that returns | |
// a function that returns an int. | |
func fibonacci() func() int { | |
n := []int{0,1} | |
return func() int { | |
value := n[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir newproject | |
cd newproject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "私の初めてのレポジトリを作成してみた!" > README.md | |
git add README.md | |
git commit -m "私の初めてのコミット" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"io/ioutil" | |
"strings" | |
"strconv" | |
"./stack" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
type myStruct struct { | |
RandomString string | |
RandomNumber int | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in $(grep -e "\./g[(cc|libc)].*txz$" ../FILELIST.TXT | awk '{print $9}'); do wget http://connie.slackware.com/~alien/multilib/current/$i; done | |
for i in $(grep -e "slackware64-compat32/.*txz$" ../FILELIST.TXT | awk '{print $9}'); do wget http://connie.slackware.com/~alien/multilib/current/$i; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pcm.btheadset { | |
type plug | |
slave { | |
pcm { | |
type bluetooth | |
device DEVICE_MAC_ADDRESS | |
profile "auto" | |
} | |
} | |
hint { |