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
set @num := 0, @type := ''; | |
select type, variety, price | |
from ( | |
select type, variety, price, | |
@num := if(@type = type, @num + 1, 1) as row_number, | |
@type := type as dummy | |
from fruits | |
order by type, price | |
) as x where x.row_number <= 2; |
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/python | |
import sys | |
from simpledbf import Dbf5 | |
filename = sys.argv[1] | |
dbf = Dbf5(filename, codec='cp866') | |
dbf.to_textsql(filename.replace('DBF', 'sql'), filename.replace('DBF','csv')) |
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
parameters: | |
pagemap: | |
home: | |
title: 'Главная' | |
nav: false | |
route: 'home' | |
childs: | |
login: | |
title: 'Логин' | |
nav: 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
<?php | |
namespace App\Services; | |
use Symfony\Component\DependencyInjection\ContainerBuilder; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
use WhiteOctober\BreadcrumbsBundle\Model\Breadcrumbs; | |
use Symfony\Component\HttpFoundation\RequestStack; | |
use Symfony\Component\Routing\Generator\UrlGeneratorInterface; | |
use Symfony\Component\Routing\RouterInterface; | |
use Symfony\Component\Security\Core\Security; |
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
global !p | |
import os | |
def readconf(): | |
conf = dict(phpversion='7', package = '', author = '', license = '', link = '') | |
pwd = os.getcwd() | |
if os.path.isfile(pwd + '/.usrc') != True: | |
return dict() | |
conff = open(pwd + '/.usrc', 'r') | |
data = conff.read().split('\n') | |
for i in range(0, len(data)): |
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
# remove current vim | |
sudo zypper rm vim vim-runtime vim-gnome vim-tiny vim-gui-common | |
# removes current link for vim | |
sudo rm -rf /usr/local/share/vim /usr/bin/vim | |
sudo zypper addrepo https://download.opensuse.org/repositories/home:ochaton/openSUSE_Tumbleweed/home:ochaton.repo | |
sudo zypper refresh | |
# installs everything needed to make/configure/build Vim |