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 lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> | |
</head> | |
<body> |
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
class PagesControler(Controller): | |
# Some code here | |
def get_route(self, page_entity): | |
if page_entity.parent: | |
# return page1/page2/page3 | |
return "/".join([page_entity.parent.get_route(), page_entity.slug]) | |
else: | |
# return page1 |
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
C:\Dev\Projects> hg clone "C:\Users\username\My Dropbox\project-name" project-name |
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
$ hg push | |
$ hg pull |
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
[paths] | |
default = /home/username/Dropbox/Hg/project-name/ |
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
~$ cd ~/Dropbox | |
~/Dropbox$ hg clone ~/project-name ~/Dropbox/Hg/project-name --noupdate |
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-name$ hg init | |
~/project-name$ hg addremove | |
~/project-name$ hg commit -m "Initial commit." |
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
--5. Кто из клиентов с годовым доходом более 10 миллионов долларов отправлял грузы весом менее 100 фунта или отправлял грузы в Балтимор? | |
select distinct k.naimenovanie | |
from dbo.klient k, dbo.perevozka p | |
where k.kod_klienta = p.kod_klienta and | |
k.godovoi_dohod > 10000000 and | |
(p.ves < 100 or p.punkt_naznachenija = 'Балтимор') |
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
<EntityType Name="BookAuthors"> | |
<Key> | |
<PropertyRef Name="BookId" /> | |
<PropertyRef Name="AuthorId" /> | |
</Key> | |
<!-- Закомментированные стоки - как было, незакомментированные - как стало. --> | |
<!--<Property Name="BookId" Type="int" Nullable="false" StoreGeneratedPattern="Identity" /> | |
<Property Name="AuthorId" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />--> | |
<Property Name="BookId" Type="int" Nullable="false" /> | |
<Property Name="AuthorId" Type="int" Nullable="false" /> |
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
// | |
// POST: /Book/Create | |
[HttpPost] | |
public ActionResult Create([Bind(Exclude = "Id")] Book bookToCreate, int[] authorIds) | |
{ | |
if (!ModelState.IsValid) | |
{ | |
return View(); | |
} |