==Here we go again== How does it works?
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> | |
<script type="text/javascript"> | |
function shuffle(v){ | |
for(var j, x, i = v.length; i; j = parseInt(Math.random() * i), x = v[--i], v[i] = v[j], v[j] = x); | |
return v; | |
}; | |
var resp = null; |
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
Решил сегодня прогуляться по не сильно богатому району. И вообще меня очень впечатлило. Главная улица выглядела довольно серо, маленькие магазинчики, но зато их много - кучу дешевых ресторанчиков, перехмахерских. Но главная улица довольно неприятно выглядела. Я так себе всегда представлял трущобы. Но тут меня почему-то понесло во внутрь квартала. Впервые увидел в Канаде поезд переезжающий дорогу. Большой такой :) | |
Но вообще не о том хотел написать. Хотел рассказать о том как там все выглядело, внутри квартала - маленькие домики. Большинство из них довольно старые, покосившиеся. Впечатляло, то что все газоны подстрижены, мусора вообще нету, да и явно видно что люди стараются жить опрятно. Взяла радость за страну, всегда хотелось видеть, что аккуратность, это не следствия материального богатства. Если нету денег на большой красивый дом, или на ремонт старого, это вовсе не повод жить в грязном неопрятном доме. Ничего не стоит постричь травку, прибрать мусор и навести порядок вобще. Да и уважать порядок тоже. Ну в |
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
from scene import * | |
from random import choice, randrange | |
import sound | |
TILE_SIZE=64 #size of tile | |
SDX=4 #selection frame size | |
M=3 #match 3(?) game | |
NOS = (-1, -1) #constant to indicate clear selection | |
FALL_S=0.2 #speed of fall per each tile | |
FALL_T=0 #constant fall tile |
View this code at http://livecoding.io/4056243
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
#!/bin/bash | |
VMNAME=$1 | |
IPVMA=`VBoxManage guestproperty get $VMNAME /VirtualBox/GuestInfo/Net/0/V4/IP | awk '{ print $2 }'` | |
if [[ "$IPVMA" = "value" ]]; then | |
echo -n Starting up new instance.. | |
VBoxManage startvm $VMNAME --type headless > /dev/null | |
else | |
echo -n Connecting to running VM.. | |
fi | |
while [ "$IPVMA" = "value" ]; do |
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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<addon id="xbmc-vk.svoka.com" name="VK-xbmc" version="0.8.1" provider-name="shchvova"> | |
<requires> | |
<import addon="xbmc.python" version="2.0"/> | |
</requires> | |
<extension point="xbmc.python.pluginsource" provides="image, audio, video" library="default.py"> | |
<provides>image video audio</provides> | |
</extension> | |
<extension point="xbmc.addon.metadata"> |
Вот хочу я написать страничку, которая будет показывать случайное число. Казалось бы, простое решение в Python
import random
print random.randint(1,6)
Но мне ведь хочется страничку в вебе. Ну, чо, давайте, я знаю что есть фласк. Открываем его квик, и пишем себе свое супер приложение
from flask import Flask
import random
app = Flask(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
#!/usr/bin/env python | |
import sys | |
if __name__ == '__main__': | |
with open(sys.argv[1]) as f: | |
lines = f.readlines() | |
lines = map(str.strip, lines) #stripping endlines | |
lines = filter(bool, lines) #stripping empty lines | |
lines = filter(lambda l: ':' in l, lines) #filter out strings without : | |
lines = map(lambda l: l.split(':', 1), lines) |
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
cmake_minimum_required(VERSION 2.8.4) | |
project(clue) | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | |
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin/") | |
include("lua.cmake") | |
set(SOURCE_FILES main.cpp) | |
add_executable(clue ${SOURCE_FILES}) |
OlderNewer