This file contains hidden or 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> | |
| #define TEST_MAX_SUM_OF_INC_SUBSEC_(a, ok) \ | |
| errors += test_( (a), sizeof((a)) / sizeof((a)[0]), (ok) ) | |
| static long max_sum_of_inc_subseq_( const int *array, size_t size ) | |
| { | |
| long sum_max = 0; | |
| if( array ) { |
This file contains hidden or 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 | |
| NAME=$(git branch | grep '' | sed 's/ //') | |
| MSG=$(head -n 1 "$1"); | |
| if [[ ! "$MSG" =~ "$NAME" ]]; then | |
| echo "$NAME"' '"$(cat $1)" > "$1" | |
| DESCRIPTION=$(git config branch."$NAME".description) | |
| if [ -n "$DESCRIPTION" ]; then | |
| echo "" >> "$1" |
This file contains hidden or 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/perl | |
| # ------------------------------------------------------------------------ | |
| # Тестовое задание. Mojolicious: | |
| # Напишите веб-приложение при запросе GET /user/info с "Accept: application/json" | |
| # отдающее json в формате { ip : "IP address", os : "Operation system", browser : "Browser name" } | |
| # Без "Accept: application/json" отдающее html в формате: | |
| # IP: IP address | |
| # OS: Operation system | |
| # Browser: Browser name |
This file contains hidden or 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/perl | |
| =pod | |
| Есть таблица mysql, которая описывает древовидную структуру: | |
| CREATE TABLE `tree` ( | |
| `id` int(10) unsigned NOT NULL auto_increment, | |
| `parent_id` int(10) unsigned NOT NULL default '0' COMMENT 'указывает на родителя', | |
| PRIMARY KEY (`id`) | |
| ) |
This file contains hidden or 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 "queue.h" | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <pthread.h> | |
| #define THREADS 3 | |
| /** | |
| * Task queue. |
OlderNewer