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
SELECT users.*, COUNT(*) AS c | |
FROM users, work, userwork | |
WHERE userwork.wid = work.id AND userwork.uid = users.id | |
AND work.name IN ('%IMPLODED ARRAY%') | |
GROUP BY users.id | |
HAVING c = %COUNT OF %IMPLODED ARRAY%% |
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 | |
$db = new mysqli("localhost", "root", "", "test"); | |
$db->query("INSERT INTO messages (text, time) VALUES ('".$_POST["text"]."', '".time()."');"); |
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
#include <stdio.h> | |
int main () { | |
int num1, num2, cur_num1, cur_num2, temp=1, res=0; | |
scanf("%d %d",&num1, &num2); | |
while (num1 % 10 != 0) { | |
cur_num1 = num1 % 10; | |
cur_num2 = num2 % 10; | |
if (cur_num1 % 2 != 0 | cur_num1 != cur_num2) { | |
res += cur_num1 * temp; |
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
public class merge_arrays { | |
public static final int CNT_ELEMENTS = 10000000; | |
public static int[] left(int[] array) { | |
int midpoint = array.length / 2; | |
int left[] = new int [midpoint]; | |
for (int i=0;i<midpoint;i++) | |
left[i] = array[i]; | |
return left; | |
} |
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
#include <stdio.h> | |
#include <limits.h> | |
int * arr_read(int &n) { | |
printf("Введите n="); | |
scanf("%d",&n); | |
int * arr = new int[n]; | |
for (int i = 0; i < n; ++i) { | |
printf("a[%d]=", i); | |
scanf("%d", &arr[i]); |
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
while ((p=strchr(p,'+'))) { | |
char * substr = p; | |
char * minus = strchr(p, '-'); | |
if (minus == 0) break; | |
while ((substr=strchr(substr,'B'))) { | |
if (substr < minus) { | |
c++; | |
substr++; | |
} else { | |
break; |
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
#include <stdio.h> | |
#include <string.h> | |
#include <conio.h> | |
struct drugstore { | |
char name[20]; | |
char manufacturer[20]; | |
unsigned long cost; | |
char type[20]; | |
char indications[50]; |
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
AnsiString search_path = ExtractFileDir(Application->ExeName)+"\\dlls\\"; //файлы будут искаться в папке dlls рядом с программой | |
... | |
ListBox1->Items->Clear(); //очищаем лист бокс | |
WIN32_FIND_DATA w32; //Создаем структура для хранения результатов поиска | |
HANDLE file = FindFirstFile((search_path+"*.dll").c_str(), &w32); //ищем первый файл с расширением dll, результат пишем в созданную структуру | |
bool is_finded = true; // помечаем что файл найден | |
while (is_finded) { //пока файл найден | |
if(!(w32.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { //если это не папка, а файл | |
ListBox1->Items->Add(w32.cFileName); //добавляем имя в список | |
} |
This file has been truncated, but you can view the full file.
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
-- phpMyAdmin SQL Dump | |
-- version 3.5.1 | |
-- http://www.phpmyadmin.net | |
-- | |
-- Хост: 127.0.0.1 | |
-- Время создания: Мар 22 2014 г., 13:38 | |
-- Версия сервера: 5.5.25 | |
-- Версия PHP: 5.3.13 | |
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; |
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
searchd | |
{ | |
listen = 1337:mysql41 | |
pid_file = /var/run/searchd.pid | |
log = /var/log/sphinxsearch/log.txt | |
query_log = /var/log/sphinxsearch/query_log.txt | |
} | |
source users | |
{ |
OlderNewer