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
begin | |
@page = Page.find_by_permalink(params[:id]) | |
rescue ActiveRecord::RecordNotFound | |
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
@page = Page.find_by_permalink!(params[:id]) |
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 "rubygems" | |
require "net/http" | |
require "open-uri" | |
require "cgi" | |
require "json" | |
def detect_language(content) | |
base_url = 'http://www.google.com/uds/GlangDetect?v=1.0&q=' | |
url = base_url + CGI.escape(content) | |
response = Net::HTTP.get_response(URI.parse(url)) |
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 <iostream.h> // załadowanie bilbiotek odpowiedzialnej za wyświetlanie tekstu | |
#include <stdio.h> // załadowanie bilbiotek odpowiedzialnej za wyświetlanie tekstu | |
#include <string.h>// załadowanie bilbiotek odpowiedzialnej za manipulacje ciągami tekstu | |
int main() { // głowna funkcja programu. Kod znajdujący się w niej odpalany jest na samym początku | |
char napis[255]; // delkaracja tablicy o nazwie napis o długości 255 i typie char(znak) | |
cout << "bla bla bla" << endl; //wyświetlanie tekstu na ekranie | |
gets(napis);// pobranie tekstu od użytkownika i przypisanie go do tablicy napis | |
int ilosc=strlen(napis); // pobranie długości napisu i przypisanie go do zmiennej ilosc |
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
.... | |
int nOpcja; //deklaracja zmiennej liczbowej o nazwie nOpcja | |
// Następnie jest kod odpowiedzialny za wyświetlenie dostępnych opcji w programie | |
std::cin >> nOpcja; //Wczytanie klawisza wcisnietego przez uzytkownika i przypisanie go do zmiennej nOpcja | |
switch(nOpcja) { // Rozpoczęcie warunku switch | |
case 1: | |
//jeżeli nOpcja jest równa 1 wtedy wyświetlamy wynik dodawania zmiennej fLiczba1 i fLiczba2 |
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
set $subdomain ""; | |
if ($host ~* "^([A-Za-z0-9-]+)\.sklep\.local$") { | |
set $subdomain $1; | |
root /Users/MacBury/Sites/Rails/cart-on-rails/public/store_assets/$subdomain; | |
} | |
if (!-f $request_filename) { | |
proxy_pass http://127.0.0.1:3000; | |
break; |
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
{ | |
id: 1, | |
name: "Event title", | |
venue: "VenueNameLinkToUs", | |
category: "Fashion/Art", | |
age: { | |
all_ages: false, | |
from: 18, | |
to: 24 | |
}, |
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 prepareFBTime(time) | |
local_offset = Time.new.utc_offset | |
date = Time.at(time.to_i).in_time_zone('America/Los_Angeles') | |
Time.at(date.to_i - date.utc_offset * 2 + local_offset) | |
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
header: &header | |
background: "6C5B52" | |
background_image: "none" | |
color: "fff" | |
tab: | |
up: | |
color: "342B27" | |
background: "453C38" | |
down: | |
color: "342B27" |
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
<script type="text/javascript" charset="utf-8"> | |
LocalHipster.Widget({ | |
type: "happyhour", | |
venue: 63, | |
width: 320, | |
height: 400, | |
theme: { | |
name: "base", | |
custom: { | |
header: { |
OlderNewer