Skip to content

Instantly share code, notes, and snippets.

@thetekst
thetekst / gist:1302184
Created October 20, 2011 20:07
AlligatorTest
package ru.thetekst.crocodile;
public class TestCrocodile {
public static void main(String[] args) throws InterruptedException {
Crocodile crocodile = new Crocodile();
System.out.println(crocodile.getState());
do{
Thread.sleep(1000);
System.out.println(crocodile.getState());
@thetekst
thetekst / gist:1523820
Created December 27, 2011 14:32
Shift operators (-r -c -e -d -a)
//Shift operators (-r -c -e -d -a)
#include <stdio.h>
int main(void) {
unsigned char used=0;
unsigned char bRead=1;
unsigned char bCreate=1;
@thetekst
thetekst / gist:1559564
Created January 4, 2012 10:58
TimerOnC
/*
Algorithm
Просим ввести число мин в переменную minutes
запускаем функцию таймера.
сравниваем ее в цикле с переменной minutes: minutes<=timer
Если условие истинно, то повторяем цикл while()
Если условие ложно: выводим сообщение и обнуляем minutes
*/
@thetekst
thetekst / gist:2774504
Created May 23, 2012 10:38
TimerMeter
public class TimeMeter {
public TimeMeter(Date sec) {
System.out.println("Вы ввели .. секунд. Задание будет готово в .. .. ..");
}
public TimeMeter(Date min, Data sec) {
}
@thetekst
thetekst / gist:2777267
Created May 23, 2012 19:32
InnerClassTest
//InnerClassTest.java
import javax.swing.*;
public class InnerClassTest
{
public static void main(String[] args)
{
TalkingClock clock = new TalkingClock(1000, true);
// TalkingClock.setBeep(false);
@thetekst
thetekst / gist:2880302
Created June 6, 2012 06:41
vertical-align
<td style="vertical-align: top;" class="uni_tab" bgcolor="E2F5F0" valign="top" rowspan="9">
@thetekst
thetekst / gist:3018221
Created June 29, 2012 14:17
Input int, char, getchar()
//Input int
#include <stdio.h>
int main(int argc, char const *argv[])
{
int dec;
printf("Input: ");
scanf("%d", &dec);
printf("%d", dec);
@thetekst
thetekst / gist:3024557
Created June 30, 2012 16:35
MyTime Sound on C
#include <stdio.h>
#include <windows.h> // Для Sleep()
#include <stdlib.h> // Для кириллицы
#include <signal.h> // Библиотека для звуковых сигналов
#include <windows.h> // WinApi header file
void mySound(void); // Прототип функции
int main(int argc, char const *argv[])
{
@thetekst
thetekst / gist:3247450
Created August 3, 2012 12:57
Converter(F/C)
Converter.java->
public class Converter {
public String convertTemp(int temperature, char convertTo){
int result = 0;
char value;
if(convertTo == 'F'){
@thetekst
thetekst / gist:3801218
Created September 28, 2012 17:45
reset.css
@charset "utf-8";
/* CSS Document */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,