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 <unistd.h> | |
#include <string.h> | |
#include <time.h> | |
#include <stdlib.h> | |
const char* RESET = "\x1B[0m"; | |
const char *COLORS[] = { "\x1B[31m", "\x1B[32m", "\x1B[33m", "\x1B[34m", "\x1B[35m", "\x1B[36m" }; | |
int main() { |
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
/* | |
* Feladat: | |
* Irjon C programot az otoslotto nyeroszamainak veletlenszeru eloallitasara! | |
* Ugyeljen, hogy ne ismetlodjenek a szamok! | |
* | |
* Megoldas: | |
* Legeneralunk a "szamok" tombbe egy szamsort 1-90-ig (lehetseges nyeroszamok), | |
* Ezekbol kihuzunk egy szamot, amit beirunk a "nyeroszamok" tombbe, | |
* A kihuzott szamot a "szamok" tombben kicsereljuk az utolso elemmel, | |
* Legkozelebb a "szamok" tomb elsotol utolso elotti elemeig valasztunk nyeroszamot, |
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
$('#nextmonth').on('click', fuction(e)) { | |
$.get('/rota_days/show.json?mon=12').success(function(data) { | |
rota_days = data | |
for ( i = 0; i < rota_days.length; i++) | |
{ | |
rota_day = rota_days[0]; | |
/* doing stuffs with rota_day */ | |
} |
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
module ApplicationHelper | |
def b(value, options = {}) | |
options = { | |
:true => :positive, | |
:false => :negative, | |
:scope => [:boolean], | |
:locale => I18n.locale, # <- It makes easy to avoid conditional run | |
}.merge options | |
# avoid passing nil, or some desctructive value |
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/ruby | |
require 'rubygems' | |
require 'haml' | |
class ErbEngine < Haml::Engine | |
def push_script(text, opts = {} ) | |
push_text "<%= #{text.strip} %>" | |
end | |