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
use v5.14; | |
use Data::Printer; | |
my @letters = ('a'..'f'); | |
my @numbers = (0..7); | |
my %contacts = ( Mike => 7, Jim => 5 ); | |
my @data = (\@letters, \@numbers, \%contacts); | |
p @data; |
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
use v5.14; | |
use autodie; | |
# DIE | |
open my $f, '<', 'invalid.txt'; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link href="bootstrap/css/bootstrap.css" rel="stylesheet" /> | |
<link href="bootstrap/css/bootstrap-responsive.css" rel="stylesheet" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Bootstrap Example</title> | |
<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
function Foo() { | |
} | |
var p = { | |
name: 'Mike', | |
job: 'Musician' | |
}; | |
Foo.prototype = p; |
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
use v5.14; | |
use List::Util qw/sum/; | |
sub add_to_hash { | |
my ( $hash_ref, $key, $value ) = @_; | |
$hash_ref->{$key} = $value; | |
} |
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 'Qt' | |
require './demo1_ui.rb' | |
a = Qt::Application.new(ARGV) | |
u = Ui_Form.new | |
w = Qt::Widget.new | |
u.setupUi(w) | |
w.show | |
u.btn1.connect( SIGNAL :clicked ) { |
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<title>Wow CSS3</title> | |
<script src="http://code.jquery.com/jquery-1.8.0.min.js"></script> | |
<meta name="viewport" content="initial-scale=1,user-scalable=0,maximum-scale=1,minimum-scale=1" /> | |
<style> | |
div.right { | |
width:200px; |
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
global.views.AppView = Backbone.View.extend({ | |
el: $('body'), | |
events: { | |
"click .add-btn": "add_task" | |
}, | |
add_task: function() { | |
var task_description = this.$el.find('input').val(); | |
var tm = new global.models.Task({ text: task_description }); |
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
/** | |
משחקון מצא את היוצא דופן לסמארטפון | |
במשחק מוצגים על המסך 4 עצמים, והמשתמש צריך לבחור את היוצא דופן. | |
בנוסף, על המסך מוצג גם לוח תוצאות. | |
הקוד מתאר גישה מונחית עצמים לבעייה. אנו מגדירים אובייקט לכל אחד מהאלמנטים הפעילים שצריכים להופיע על המסך: | |
דמות שצריך ללחוץ עליה כדי לנצח | |
3 דמויות שלחיצה עליהן גורמת להפסד | |
פאנל של תוצאות |
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
/** | |
* Created with JetBrains WebStorm. | |
* User: ynonperek | |
* Date: 8/21/12 | |
* Time: 9:36 AM | |
* To change this template use File | Settings | File Templates. | |
*/ | |
(function() { | |
var Score = function() { | |
this.value = 0; |