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
public interface IValidate | |
{ | |
IList<string> Errors { get; } | |
} | |
partial class Book : IValidate | |
{ | |
public IList<string> Errors | |
{ | |
get |
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
public interface IValidate | |
{ | |
IList<string> Errors { get; } | |
} | |
partial class Book : IValidate | |
{ | |
public IList<string> Errors | |
{ | |
get |
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
n.times do |i| | |
puts i | |
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
import urllib2, sys, re | |
from urllib import urlencode | |
params = [('pol', 2), ('spol', 2), ('foto', 1), ('a', 'search')] | |
expr = re.compile('page.*"') | |
for s in urllib2.urlopen('http://loveplanet.ru/a-search', urlencode(params)): | |
#if expr.match(s): | |
print s |
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
//было | |
//index.html | |
function getUserInfo(id) { | |
$.post(<%= Html.Url("User", "Info") %>, id, ...); | |
} | |
... | |
u1 = getUserInfo(1); | |
u2 = getUserInfo(2); |
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
from urllib2 import urlopen | |
import HTMLParser | |
class MyParser(HTMLParser.HTMLParser): | |
def handle_starttag(self, tag, attrs): | |
pass | |
def handle_data(self, data): | |
print 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
<html> | |
<body> | |
<script type="text/javascript" src="jquery-1.5.js"></script> | |
<script type="text/javascript"> | |
function zhopa() { | |
alert('zhopa'); | |
} | |
</script> | |
<script type="text/javascript"> | |
$(function() { |
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
set :application, "OohForYou" | |
set :repository, "/Users/synapse/projects/OohForYou" | |
set :scm, :mercurial | |
set :deploy_to, '/u/domains/ooh4you.net' | |
set :deploy_via, :copy | |
role :web, "89.185.229.183" # Your HTTP server, Apache/etc | |
role :app, "89.185.229.183" | |
role :db, "89.185.229.183", :primary => true |
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
<html> | |
<body> | |
<script type="text/javascript" src="jquery-1.5.js"></script> | |
<script type="text/javascript" src="js/jquery-ui-1.8.10.custom.min.js" ></script> | |
<script type="text/javascript"> | |
$(function() { | |
var f = 'zhopa'; | |
var g = function() { alert('Nothing to do'); }; | |
$('#btn1').click(function() { | |
f = function() { alert('Job done'); }; |
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
Array.prototype.map2 = function(f) { | |
return fold([], SynLib.append.combine(f)); | |
} | |
Function.prototype.combine = function(g) { | |
return function() { this(g(arguments)) }; | |
} | |
var SynLib = { | |
append: function(array, x) { |
OlderNewer