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
#include <QtNetwork> | |
#include <QtGui> | |
#include "server.h" | |
#include <QObject> | |
#include <QMessageBox> | |
Server::Server(QMainWindow *window) | |
{ | |
tcpServer = new QTcpServer(); |
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 'Qt4' | |
require 'qtwebkit' | |
app = Qt::Application.new(ARGV) | |
web_view = Qt::WebView.new | |
web_view.load(Qt::Url.new('http://nightly.webkit.org')) | |
web_view.show() | |
web_view.page.linkDelegationPolicy = 2 | |
web_view.connect(SIGNAL "linkClicked(const QUrl)") { |url| |
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
#Pajton: | |
import threading | |
from time import sleep | |
class watek(threading.Thread): | |
def __init__(self): | |
while(not sleep(3)): | |
print 'foobar' | |
watek() |
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
$ ruby client.rb | |
/home/dennis/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/thread.rb:185:in `sleep': deadlock detected (fatal) | |
from /home/dennis/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/thread.rb:185:in `block in pop' | |
from <internal:prelude>:10:in `synchronize' | |
from /home/dennis/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/thread.rb:180:in `pop' | |
from /home/dennis/.rvm/gems/ruby-1.9.2-p180/gems/emdrb-0.4.4/lib/emdrb/emdrb.rb:894:in `method_missing' | |
from client.rb:52:in `block in initialize_ui' | |
from /home/dennis/.rvm/gems/ruby-1.9.2-p180/gems/qtbindings-4.6.3.2/lib/Qt/qtruby4.rb:2427:in `call' | |
from /home/dennis/.rvm/gems/ruby-1.9.2-p180/gems/qtbindings-4.6.3.2/lib/Qt/qtruby4.rb:2427:in `invoke' | |
from client.rb:73:in `qt_metacall' |
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 'eventmachine' | |
require 'Qt4' | |
require 'emdrb' | |
require './client_ui' | |
$time_remaining ||= Time.new(0,1,1,1) | |
$time_used ||= Time.new(0) | |
class ClientController | |
def initialize |
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
Failures: | |
1) Signed in user should sign in successfully | |
Failure/Error: current_path.should eq('/profile') | |
expected "/profile" | |
got "/users/sign_in" | |
(compared using ==) | |
# ./spec/requests/user_home_spec.rb:18:in `block (2 levels) in <top (required)>' |
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 'spec_helper' | |
describe 'Signed in' do | |
before(:each) do | |
user = Factory(:user) | |
visit new_user_session_path | |
fill_in 'Email', with: user.email | |
fill_in 'Password', with: user.password | |
click_button 'Sign in' |
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
filename=$(basename $0) | |
APP=${filename#thin-} | |
CONFIG="/etc/thin/$APP.yml" | |
ARGS="--daemonize --config=/etc/thin/$APP.yml" | |
RVM_ENV="ruby-1.8.7-p352@redmine" | |
source "/usr/local/rvm/environments/$RVM_ENV" | |
COMMAND="sudo -Eu $APP $(which thin)" | |
case "$1" in | |
start) |
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 'spec_helper' | |
describe ProfileController do | |
include Devise::TestHelpers | |
before(:each) do | |
@user = Factory.create(:user) | |
sign_in @user | |
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
development: | |
adapter: postgresql | |
database: emotio-dev | |
pool: 5 | |
timeout: 5000 | |
# Warning: The database defined as "test" will be erased and | |
# re-generated from your development database when you run "rake". | |
# Do not set this db to the same as development or production. | |
test: |