[ Launch: stack-test ] 30db1d9ead9ce857d698 by nodecarter
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
found = [] | |
names.uniq.each do |name| | |
letters = 'RAMMUBPRLDAM'.chars | |
matched = name.chars.inject(true) do |acc, c| | |
ind = letters.find_index(c.upcase) | |
letters.delete_at(ind) if ind | |
acc && !ind.nil? | |
end | |
found << name if matched |
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
["us", "ada", "Ada", "AL", "", "32.1052778", "-86.2763889\n"] | |
["us", "ada", "Ada", "AR", "", "35.1069444", "-92.8733333\n"] | |
["us", "ada", "Ada", "KS", "", "39.1513889", "-97.8888889\n"] | |
["us", "ada", "Ada", "LA", "", "32.5458333", "-93.1402778\n"] | |
["us", "ada", "Ada", "MI", "", "42.9541667", "-85.4888889\n"] | |
["us", "ada", "Ada", "MN", "", "47.2997222", "-96.5150000\n"] | |
["us", "ada", "Ada", "OH", "", "40.7694444", "-83.8227778\n"] | |
["us", "ada", "Ada", "OK", "16144", "34.7744444", "-96.6780556\n"] | |
["us", "ada", "Ada", "VA", "", "38.8369444", "-77.9186111\n"] | |
["us", "ada", "Ada", "WV", "", "37.2947222", "-81.1469444\n"] |
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
World cities from 3173958: | |
Found: 1812 | |
pal,daba,marbad,ramla,aba,abdul,abpar,abparu,abpuda,abul,ada,adam,adu,ala,aladu,alam,alar,alma,almar,alur,amar,ambar,amru,amruda,amrud,amurd,arab,aral,aram,ardar,arma,armard,armul,audam,aulad,aupar,badal,badalu,badamu,badar,bad,badu,badur,bala,bara,baram,bar,barla,barma,barpal,baru,baur,budalam,bum,burma,dabar,dab,dala,dalbar,dalu,dama,dambar,dam,dara,darra,daru,duab,dula,dul,dumba,dum,dumlam,ladu,lambar,lam,laram,lar,laru,lmara,ludam,lura,madar,madr,madu,mala,maldar,malu,maluma,mama,mamura,marab,mara,marmul,maru,maura,mumam,muma,mum,murad,murdar,pada,pala,palau,pam,parad,para,parau,parum,pular,pumba,rabadu,ruabad,rudbar,rud,rum,uba,ulama,ular,umara,umar,ur,alarup,arap,arda,badra,bram,brar,bual,burra,daul,luar,luma,lum,maba,mura,murra,palumbar,rada,rad,rrapa,rrap,ulma,ura,amamlu,arpa,arum,dalar,darb,pamb,labra,amba,aula,bau,bua,buala,buda,bula,damba,lamba,lau,lua,luamba,lumar,lumba,malau,malua,mamba,mambua,mamdumba,mapa,maua,mbala,mpala,muala,muamba,mulamba,mumba,mumblam |
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
$ gem install rmagick -v '2.12.2' [ruby-1.9.3-p551] | |
Building native extensions. This could take a while... | |
ERROR: Error installing rmagick: | |
ERROR: Failed to build gem native extension. | |
/Users/nodecarter/.rvm/rubies/ruby-1.9.3-p551/bin/ruby -r ./siteconf20160205-17372-lm8cre.rb extconf.rb | |
checking for Ruby version >= 1.8.5... yes | |
extconf.rb:107: Use RbConfig instead of obsolete and deprecated Config. | |
checking for gcc-4.9... yes | |
checking for Magick-config... yes |
[ Launch: grouped manipulation X ] 6838d184febf640fedb9 by nodecarter[ Launch: grouped manipulation ] 1ceb133640c560003200 by enjalot
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
#!/bin/bash | |
# remove old containers | |
docker rm -f redmine | |
docker rm -f mysql | |
# run mysql container | |
docker run --name=mysql -d -e 'DB_NAME=db' -e 'DB_USER=user' -e 'DB_PASS=pass' sameersbn/mysql:latest | |
sleep 2 |
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
#!/bin/bash | |
apt-get update | |
apt-get install -y libxml2-dev libxslt-dev libpq-dev libmysqlclient-dev libmagick++-dev |
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
require 'active_support/concern' | |
module LazyHelpers | |
extend ActiveSupport::Concern | |
included do | |
before_filter :include_lazy_helpers | |
end | |
module ClassMethods |
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
program Numbers; | |
var | |
a: Array[1..5] of Byte; | |
s: String; | |
i: Integer; | |
begin | |
WriteLn('Введите 5 чисел'); | |
for i := 1 to 5 do ReadLn(a[i]); |
NewerOlder