This file contains hidden or 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
| mysql> SELECT id FROM ca_object_representations WHERE id >= FLOOR((SELECT MAX(id) FROM ca_object_representations) * RAND()) LIMIT 15; | |
| +-------+ | |
| | id | | |
| +-------+ | |
| | 94989 | | |
| | 94990 | | |
| | 94993 | | |
| | 94994 | | |
| | 94995 | | |
| | 94998 | |
This file contains hidden or 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
| [retro@retro sqlite3-test]❤ valgrind ./test.o | |
| ==16303== Memcheck, a memory error detector | |
| ==16303== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al. | |
| ==16303== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info | |
| ==16303== Command: ./test.o | |
| ==16303== | |
| date('now') | |
| 2013-06-18 [82/1940] | |
| ==16303== | |
| ==16303== HEAP SUMMARY: |
This file contains hidden or 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
| context "Multiple results sets" do | |
| before(:each) do | |
| @multi_client = Mysql2::Client.new(DatabaseCredentials['root'].merge(:flags => Mysql2::Client::MULTI_STATEMENTS)) | |
| end | |
| it "should raise an exception when one of multiple statements fails" do | |
| @multi_client.query("SELECT 1 as 'set_1'; SELECT * FROM invalid_table_name;") | |
| lambda { | |
| @multi_client.next_result | |
| }.should raise_error(Mysql2::Error) |
This file contains hidden or 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
| int main(void) | |
| { | |
| int x; | |
| for (x = 1; x < 10; x++) { | |
| if ((x % 2) != 0) continue; | |
| printf("Sude cislo: %i\n", x); | |
| } | |
| # nebo |
This file contains hidden or 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
| undefined method `cislo' for nil:NilClass | |
| /var/www/nginx/ruby/game/app/models/global.rb:32:in `vrat' | |
| /var/www/nginx/ruby/game/app/models/constant.rb:126:in `vytvor_resource_pop' | |
| /var/www/nginx/ruby/game/app/models/field.rb:34:in `vytvor_resource' | |
| /home/retro/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:438:in `_run__1085181300469502030__save__4306712081692210686__callbacks' | |
| /home/retro/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in `__run_callback' | |
| /home/retro/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:385:in `_run_save_callbacks' | |
| /home/retro/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:in `run_callbacks' | |
| /home/retro/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/callbacks.rb:264:in `create_or_update' | |
| /home/retro/.rbenv/v |
This file contains hidden or 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
| # with loaded Active Support | |
| def test_equal_date_time_and_time_to_f_conversion | |
| dt = DateTime.parse("2012-06-17 18:42:15.123Z") | |
| t = Time.parse("2012-06-17 18:42:15.123Z") | |
| assert_equal t.to_f, dt.to_f | |
| end | |
| # 1) Failure: | |
| # MyTestTest#test_equal_date_time_and_time_to_f_conversion |
This file contains hidden or 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 'bundler/setup' | |
| require 'mongoid' | |
| require 'mongoid/paranoia' | |
| require 'benchmark' | |
| Mongoid.configure do |config| | |
| config.connect_to('my_little_test') | |
| end |
This file contains hidden or 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
| // Android performance | |
| var ua = navigator.userAgent.toLowerCase(); | |
| var isAndroid = ua.indexOf("android") > -1; //&& ua.indexOf("mobile"); | |
| if(isAndroid) { | |
| document.write('<style>* { text-shadow: none !important; box-shadow: none !important; -moz-box-shadow: none !important; -webkit-box-shadow: none !important; }</style>'); | |
| } |
This file contains hidden or 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
| > [email protected] pretest e:\Soft\broccoli | |
| > jshint lib test | |
| > [email protected] test e:\Soft\broccoli | |
| > tap --timeout 2 ./test/*_test.js | |
| not ok ./test/builder_test.js ......................... 28/32 | |
| Command: "C:\Program Files (x86)\nodejs\node.exe builder_test.js" | |
| TAP version 13 |
This file contains hidden or 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 Refinery | |
| class Version | |
| @major = 3 | |
| @minor = 0 | |
| @tiny = 0 | |
| @build = nil | |
| class << self | |
| attr_reader :major, :minor, :tiny, :build |