Skip to content

Instantly share code, notes, and snippets.

<?php
$res_pass = mysql_query("START TRANSACTION",$userconnect);
$res_correct = mysql_query($correct,$userconnect);
$correctanswer = array();
while ($row = mysql_fetch_row($res_correct)) {
$correctanswer[] = $row; // Заполняем массив правильных ответов
}
$saved = json_encode($correctanswer);
$res_pass = mysql_query("ROLLBACK",$userconnect); //Откат на точку возврата
$res_answer = mysql_query($useranswer,$userconnect);
tetris.c: In function ‘pdots’:
tetris.c:223: warning: incompatible implicit declaration of built-in function ‘abort’
tetris.c:275: warning: incompatible implicit declaration of built-in function ‘abort’
tetris.c: In function ‘draw’:
tetris.c:283: warning: incompatible implicit declaration of built-in function ‘abort’
tetris.c:292: warning: incompatible implicit declaration of built-in function ‘abort’
tetris.c: In function ‘move’:
tetris.c:300: warning: incompatible implicit declaration of built-in function ‘abort’
tetris.c:338: warning: incompatible implicit declaration of built-in function ‘abort’
tetris.c: In function ‘showtop’:
package sef.module7.activity;
import java.util.Calendar;
/**
* Represents an implementation of the Currency interface. The
* equality test for this currency implementation requires that the
* value and the name of the denomination must be true in order to
* be considered equal.
*
public void testAccountExceptionDiffCaseFailed() {
try {
Account a = new Account("Hacker");
fail(a.getName() + " isn't legal name");
} catch (AccountException e) {
assertEquals(e.getMessage(),
AccountException.NAME_TOO_SIMPLE);
}
}
# This is special script to detect jpg files' exif content. Usage 'script.rb filename.jpg'
require 'rubygems'
require 'exifr'
image_file = ARGV.first
exif_info = nil
exif_info = EXIFR::JPEG.new(image_file)
if exif_info.exif? then
@vestel
vestel / .vimrc
Last active September 25, 2015 13:34
.vimrc
set nocompatible
" Recently accessed projects menu (project plugin)
set viminfo^=!
set ruler showcmd number nowrap " Ruler, linenumbers , wrapping off
set ts=4 sts=4 et sw=4 smarttab " Defauls: 4 spaces as tab, autoindent, smarttabs
set ignorecase smartcase hlsearch incsearch " Search settings
*.swp
*.pyc
*.pyo
*.py~
#include <stdio.h>
#include <string.h>
#include <openssl/md5.h>
//char SAMPLE[33]="66d9978935150b34b9dc0741bc642be2\0";
/* This is md5 hash for my task. For a testing purpose
* in single-threaded code, I've used a md5 hash for
* word "TEST" to determine end of processing.
*/
@vestel
vestel / gist:1024571
Created June 14, 2011 09:22
Letter (fix)
Dear Sir/Madam!
# Обязательно пустая строка после приветствия.
# Если посылать в Ригу, можешь сразу посылать на Madam
My name is Olga Zdanchuk. From a recruiters web-site workingday.lv, I learned that you are searching for a Python developer.
I am interested in this position and I believe that my education and background are appropriate for this role.
I got Bachelor degree in Computer Science at Transport and Telecommunication Institute, in 2009.
After that I have been studying for 2 years in University of Latvia.
Now I am Master in Computer Science and will get my diploma on June, 30th.
@vestel
vestel / test.py
Created January 31, 2012 15:37
Inheritance and MRO
from __future__ import generators
class A(object):
""" Normal class """
def su(self):
self.su_result = []
self.su_result.append("A:Start")
mro = list(self.__class__.__mro__)[:-1]
mro.reverse()
for i in mro: