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 | |
IFS=$'\n' | |
for i in $(find . -name *.pdf); do | |
pdftotext "$i" - 2>/dev/null | sed -e s/-//g | grep -i "$1" > /dev/null | |
if [ $? -eq 0 ]; then | |
evince "$i" -l "$1" | |
fi | |
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
module GamesHelper | |
def parse_log_file(file) | |
output = '' | |
decision = false | |
options = [] | |
choice = [] | |
choice_counter = 0 | |
ln = 0 | |
lifecount = {'1' => 20, '2' => 20} | |
text= File.open(file).read |
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
CRASH REPORT FOR MAGARENA THREAD Thread[pool-50-thread-3,5,main] | |
CREATED ON 2015/03/19 07:09:43 | |
MAGARENA VERSION 1.60, JRE 1.7.0_75, OS Linux_3.2.0-77-generic amd64 | |
Turn : 14 Phase : SecondMain Step : ActivePlayer Player : Player2 Score : -12380 | |
0] Player : Player1 Life : 3 Delayed : Total=0 | |
- Hand : Village Survivors | |
- Hand : Plains | |
- Hand : Indestructibility | |
- Hand : Deathless Angel |
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
Exception from controller.runGame: ERROR! Root has no children but there are 8 choices | |
java.lang.AssertionError: ERROR! Root has no children but there are 8 choices | |
at magic.ai.MCTSAI.findNextEventChoiceResults(MCTSAI.java:160) | |
at magic.headless.HeadlessGameController.getAIChoiceResults(HeadlessGameController.java:50) | |
at magic.headless.HeadlessGameController.runGame(HeadlessGameController.java:33) | |
at magic.FiremindQueueWorker.runDuel(FiremindQueueWorker.java:179) | |
at magic.FiremindQueueWorker.main(FiremindQueueWorker.java:109) | |
CRASH REPORT FOR MAGARENA THREAD Thread[main,1,main] | |
CREATED ON 2015/02/26 21:05:48 |
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
module Netzke::Basepack::Grid::DefaultFilterable | |
extend ActiveSupport::Concern | |
included do | |
js_configure do |c| | |
c.initComponent = ActiveSupport::JSON::Variable.new("function(){ | |
this.callParent(); | |
this.filters.createFilters(); | |
}") | |
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
:%s/old\/path\/\(.*.jpg\)/\=join(['new\/path\/',submatch(1)],'')/g |
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 Integer | |
def factorial_iterative | |
f = 1; for i in 1..self; f *= i; end; f | |
end | |
alias :factorial :factorial_iterative | |
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
PROBS = { | |
:a=>8.167, | |
:b=>1.492, | |
:c=>2.780, | |
:d=>4.253, | |
:e=>12.702, | |
:f=>2.288, | |
:g=>2.022, | |
:h=>6.094, | |
:i=>6.973, |
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
main_panel_config(:xtype => 'tabpanel') | |
js_method :process_history, <<-JS | |
function(token){ | |
if (token){ | |
tab_id = token+"_tab"; | |
if (!this.mainPanel.getComponent(tab_id)){ | |
comp = this.mainPanel.add({layout: 'fit', id: tab_id, closable: true}); | |
this.loadNetzkeComponent({name: token, container: comp, callback: function(c){ | |
comp.setTitle(c.title); |
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 MymodelFilter < Netzke::Basepack::FormPanel | |
def configuration | |
super.merge( | |
:items => get_groups | |
) | |
end | |
private | |
def get_groups |
NewerOlder