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 i=0; float x = 1.0f |
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
| QX11EmbedContainer container(0); | |
| container.setMinimumSize(800,600); | |
| container.show(); | |
| QProcess proc(&container); | |
| QString p = "/usr/bin/xterm"; | |
| QStringList arguments; | |
| arguments << "-into" << QString::number(container.winId()); | |
| proc.start(p,arguments); |
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
| QX11EmbedWidget widget; | |
| widget.embedInto(0x500000b); | |
| widget.show(); |
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
| :⌉ | |
| =⌉ | |
| ¦-) as opposed to | | |
| ☺ | |
| ☹ | |
| ☻ | |
| ⍣ | |
| ⍤ | |
| ⍥ om nom nom | |
| ⍨ |
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
| // Scoped Pointer | |
| #include <stdio.h> | |
| template<typename T> | |
| class scoped_pointer | |
| { | |
| public: | |
| scoped_pointer(T *pPointer=new T) : mPointer(pPointer) {} | |
| virtual ~scoped_pointer() | |
| { |
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 'rubygems' | |
| require 'sequel' | |
| require 'fileutils' | |
| # NOTE: This converter requires Sequel and the MySQL gems. | |
| # The MySQL gem can be difficult to install on OS X. Once you have MySQL | |
| # installed, running the following commands should work: | |
| # $ sudo gem install sequel | |
| # $ sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config |
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 'masquerade' | |
| run Sinatra::Application |
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 'rubygems' | |
| require 'sinatra' | |
| set :public, Proc.new { File.join(root, '_site') } | |
| # Basic Auth | |
| use Rack::Auth::Basic do |username, password| | |
| [username, password] == ['admin', 'admin'] | |
| 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
| #Newbie programmer | |
| def factorial(x): | |
| if x == 0: | |
| return 1 | |
| else: | |
| return x * factorial(x - 1) | |
| print factorial(6) | |
| #First year programmer, studied Pascal |