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 main | |
import "fmt" | |
type Coord struct { | |
Row int | |
Col int | |
} | |
type Cell struct { |
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
<div id="slot-creation-modal" class="modal"> | |
<%= form_with model: Slot.new, html: { class: 'new-slot' } do |f| %> | |
<div class="modal-content"> | |
<h4>Create a new slot</h4> | |
<div class="row"> | |
<div class="input-field col s12"> | |
<i class="material-icons prefix">date_range</i> | |
<%= f.text_field :scheduled_at_date, class: 'datepicker', placeholder: 'Scheduled date' %> | |
</div> |
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
def initial_letter(rules) | |
lefts = [] | |
rights = [] | |
rules.each do |rule| | |
left, right = rule.chars | |
lefts << left | |
rights << right | |
end | |
lefts.each do |chr| |
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
def deep_search(key, params, found = nil) | |
return params.fetch(key) if params.has_key?(key) | |
params.each_pair do |_, v| | |
next unless v.is_a? ActionController::Parameters | |
found = deep_search(key, v) | |
end | |
found | |
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
def flatten(arr, level = 1) | |
r = arr.each_with_object([]) do |item, result| | |
if item.is_a?(Array) | |
item.each { |i| result << i } | |
else | |
result << item | |
end | |
end | |
return flatten(r, level - 1) if level.positive? | |
r |
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
# frozen_string_literal: true | |
source "https://rubygems.org" | |
# gem "rails" | |
gem 'thor' |
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
vagrantfile: | |
target: local | |
vm: | |
provider: | |
local: | |
box: puphpet/ubuntu1404-x64 | |
box_url: puphpet/ubuntu1404-x64 | |
box_version: '0' | |
chosen_virtualizer: virtualbox | |
virtualizers: |
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
/* | |
* wap | |
* kalendari per 1 muaj | |
* perdoruesi jep vitin dhe muajin | |
*/ | |
#include <stdio.h> | |
int main(int argc,char **argv) { | |
char* s_muaji[] = {"Janar","Shkurt","Mars","Prill","Maj","Qershor","Korrik","Gusht","Shtator","Tetor","Nentor","Dhjetor"}; |
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
/* | |
Name: CALCULATOR v1.0 | |
Author: Aldo Ziflaj | |
Date: 01-01-13 12:01 | |
Description: A simple calculator that can add, subtract multiply, divide, | |
raise to n-th integer power and calculate the factorial | |
*/ | |
#include <iostream> | |
#include <cstdio> |
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 <stdlib.h> | |
#include <string.h> | |
#include <conio.h> | |
#define MAX 100 | |
struct PERSON { | |
char fName[20]; /* emri i nje personi ne librin e adresave */ | |
char lName[20]; /* mbiemri i nje personi ne librin e adresave */ | |
char id[20]; /* ID i nje personi ne librin e adresave */ |
NewerOlder