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
mport System.Environment | |
import System.Directory | |
import Control.Monad | |
import Data.List | |
import Control.Applicative | |
import qualified Data.ByteString.Char8 as L | |
import qualified Data.ByteString as B | |
import System.IO | |
import System.IO.Error |
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
perl -00 -i.bak -pe 's/\s+//g; s/\}/\}\n/g ' test_data.css |
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/perl | |
use Carp qw(croak); | |
use 5.010; | |
use Test::Simple tests => 6; | |
use strict; | |
use warnings; | |
sub to_roman { |
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/perl | |
use strict; | |
use warnings; | |
my$k='my@a=((-4 | |
,26,10,-4,-104,- | |
56,-61,-79,-94,- | |
127,-152,-162,- | |
268,-245,-250,- | |
264,-298,-403,- | |
361,-399,-429,- |
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
#prints values from 1 to 10 inclusively | |
1: v : < | |
5 | |
2 | |
* | |
` | |
@ _ :.:1+ ^ |
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
CREATE OR REPLACE FUNCTION th.prc_th_rate_titles_create() | |
RETURNS integer AS | |
$BODY$ | |
DECLARE | |
p_title VARCHAR := ''; | |
p_sql VARCHAR := ''; | |
p_item RECORD; | |
total_rows INTEGER := 0; | |
BEGIN | |
p_sql := 'SELECT id, comment, title FROM th.th_rates'; |
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
<html> | |
<head> | |
<title>change color using embedded javascript</title> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" > | |
<style> | |
table .c { color: red } | |
.a.c {color: green} | |
</style> |
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
<html> | |
<head> | |
<title>getElementById example#3</title> | |
<style> | |
table .c { color: red } | |
.a.c {color: green} | |
</style> | |
<script type="text/javascript" src="http://www.google.com/jsapi"></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
1) SELECT * FROM category c WHERE c.parent_category_id IS NULL AND name LIKE 'авто%'; | |
2) SELECT * FROM category c1 WHERE (SELECT COUNT(c2.id) FROM category c2 WHERE c2.parent_category_id = c1.id | |
AND c2.id NOT IN (SELECT parent_category_id FROM category c3 WHERE parent_category_id IS NOT NULL) | |
) BETWEEN 1 AND 3; | |
3) | |
SELECT * FROM category с1 LEFT JOIN category с2 ON с1.id = с2.parent_category_id WHERE с2.id IS NULL | |
or: | |
SELECT * FROM category AS c1 WHERE NOT EXISTS (SELECT id FROM category AS c2 WHERE c1.id = c2.parent_category_id); |
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
<html> | |
<head> | |
<title>getElementById example</title> | |
<style> | |
table .c { color: red } | |
.a.c {color: green} | |
</style> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> |
NewerOlder