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
kilkist = gets.chomp.to_i | |
soldatu=gets.chomp.split(" ").map! {|el| el=el.to_i} | |
posMensh=soldatu.index[soldatu.min] | |
posBilsh=soldatu.index[soldatu.max] | |
sec=0 |
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
require "opencv" | |
include OpenCV | |
WINDOW_NAME = "Difference visualization" | |
# read videostream from camera | |
camera = OpenCV::CvCapture.open(0) | |
# open simple window wedget | |
# can show (CvMat/IplImage) | |
window = OpenCV::GUI::Window.new(WINDOW_NAME) |
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
require 'nokogiri' | |
require 'open-uri' | |
base_url = "http://cms.indygov.org/MyAssessedValue/Result.aspx?Parcel=" | |
neccessary_ids = ["#ctl00_header_txtParcel", "#ctl00_header_txtPropertyLocation", "#ctl00_header_txtTotalAssessed2011"] | |
input_file_name = '2008 Unsold Tax Sale Properties as of 08-24-2010.txt' | |
output_file_name = input_file_name.split('.')[0] + "_detail" | |
if File.exist?(input_file_name) |
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/env ruby | |
# -*- coding: utf-8 -*- | |
# Author: seniorihor (12.03.2012) | |
class MyArray | |
def initialize(arr) | |
@array = arr.clone() | |
@max_positive = 0 | |
@max_minimum = 0 | |
end |
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/env ruby | |
# -*- coding: utf-8 -*- | |
# Aurhor: seniorihor and vertoldo (12.03.2012) | |
class General | |
def initialize(quantity, numbers) | |
@quantity = quantity | |
@numbers = numbers | |
@posMensh=0 | |
@posBilsh=0 |
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
package org.uzhnu.homework.stack; | |
public class Driver { | |
/** | |
* @param args | |
*/ | |
public static void main(String[] args) { | |
// init empty stack | |
Stack st = new Stack(); |
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
package org.uzhnu.homework.stack; | |
public class Stack { | |
private String [] strArray; //new arr | |
private int currEl; //pointer to Stack top | |
private static int defaultSize=10; | |
Stack(){ | |
this.strArray = new String[defaultSize]; |
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
mojeePole = [#a b c d e f g h i k | |
[0, 0, 0, 0, 0, 0, 0, 0, 0 ,0],#1 | |
[0, 0, 0, 1, 0, 0, 0, 0, 0 ,0],#2 | |
[0, 0, 0, 1, 0, 0, 0, 0, 0 ,0],#3 | |
[0, 0, 0, 1, 0, 0, 0, 0, 0 ,0],#4 | |
[0, 0, 0, 0, 0, 0, 0, 0, 0 ,0],#5 | |
[0, 0, 0, 0, 0, 0, 0, 0, 0 ,0],#6 | |
[0, 0, 0, 0, 0, 0, 0, 0, 0 ,0],#7 | |
[0, 0, 0, 0, 0, 0, 0, 0, 0 ,0],#8 | |
[0, 0, 0, 0, 0, 0, 0, 0, 0 ,0],#9 |
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
#!/bin/bash | |
FIND=$(find $1 -type f -mtime 0) #знаходимо файли у директорії,яка передається як парметр, які не змінювалися останні 24 год,пошук здійснюємо рекурсивно і результат занесемо у FIND | |
echo $FIND # виводимо список на екран | |
tar -cf archive.tar $FIND #архівуємо файли у тар-архів | |
gzip -c archive.tar > archive.tar.gz #архівуємо створений архів у gz |
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
#!/bin/bash #вказуємо шлях інтерпретатора | |
searchF(){ #функція для перевірки наявності всіх установлених програмок | |
echo -e "Searching for unrar, unzip and tar installed in your system" | |
if [ -x "/usr/bin/unrar" ] #перевірки чи установлений unrar | |
then | |
echo -e "\tUnrar detected!" | |
else | |
echo -e "\tUnrar wasn't detected :(" | |
fi |
NewerOlder