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
# Critter.pm | |
# | |
package Critter; | |
use strict; | |
use warnings; | |
use v5.14; | |
sub new { | |
my ( $cls, $name, $age ) = @_; |
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
use v5.20; | |
use feature 'signatures'; | |
no warnings 'experimental::signatures'; | |
sub plus($x, $y) { | |
$x + $y | |
} | |
say plus(2,3); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>index</title> | |
</head> | |
<body> | |
<p></p> | |
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> |
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
@mixin abs-pos($top:auto,$left:auto,$bottom:auto,$right:auto) { | |
position:absolute; | |
top: #{$top}px; | |
bottom:$bottom; | |
left:$left; | |
right:$right; | |
} | |
.test { | |
@include abs-pos($top:10,$left:10); |
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
#------------------------------------------------- | |
# | |
# Project created by QtCreator 2014-08-26T10:07:27 | |
# | |
#------------------------------------------------- | |
QT += core gui | |
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets |
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
use strict; | |
use warnings; | |
use v5.18; | |
my %anagrams; | |
sub anagram { | |
my ( $word ) = @_; | |
my @letters = sort split //, $word; | |
$anagrams{"@letters"}; | |
} |
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
package Critter; | |
use strict; | |
use warnings; | |
use v5.18; | |
# Critter | |
our $VERSION = '1.00'; | |
# | |
# Inheritance | |
# our @ISA = qw/Animal/; |
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
myapp/ | |
├── lib | |
│ ├── File | |
│ │ └── Slurp.pm | |
│ ├── MyModule.pm | |
│ └── Try | |
│ └── Tiny.pm | |
└── run.pl | |
3 directories, 4 files |
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
#include "mainwindow.h" | |
#include <QApplication> | |
#include <QtWidgets> | |
void createFirstRow(QVBoxLayout *top) | |
{ | |
QGroupBox *box = new QGroupBox(); | |
QPushButton *b1 = new QPushButton("One", box); | |
QPushButton *b2 = new QPushButton("Two", box); | |
QPushButton *b3 = new QPushButton("Three", box); |
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
#!/usr/bin/env perl | |
use Mojolicious::Lite; | |
use Mojo::Util qw/b64_encode b64_decode/; | |
use DBI; | |
my $database = 'tinyurl.db'; | |
my $data_source = "dbi:SQLite:dbname=$database"; | |
my $dbh = DBI->connect( | |
$data_source, |
OlderNewer