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 'sinatra' | |
get '/hi' do | |
"hello world!" | |
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
class ExampleController < ApplicationController | |
rescue_from Exception, :with => :render_custom | |
def render_custom(exception) | |
if Exceptional::Remote.error(Exceptional::ExceptionData.new(exception, "Test Exception")) | |
Rails.logger.info "Exceptional: #{exception.class} has been reported to Exceptional" | |
else | |
Rails.logger.error "Exceptional: Problem sending exception. Check your API key." | |
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
### Brojčano na ekranu ispišite koliko godina ima sekundi. | |
### Koliko imate godina ako ste stari 8286 dana? |
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
### Ispišite svoje ime i prezime unatrag | |
### Ispišite trece slovo svog imena velikim slovom |
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"> | |
//<![CDATA[ | |
(function(){ | |
var notifierJsScheme = (("https:" == document.location.protocol) ? "https://" : "http://"); | |
document.write(unescape("%3Cscript src='" + notifierJsScheme + "airbrake.io/javascripts/notifier.js' type='text/javascript'%3E%3C/script%3E")); | |
})(); | |
//]]> | |
</script><script src="http://airbrake.io/javascripts/notifier.js" type="text/javascript"></script> |
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
### Napišite program koji ce ispisivati string od 10 slova i 5 znamenki | |
### i to svaki put u drukcijem rasporedu | |
### Napišite program koji ce ispisati brojeve od 1 do 10, svaki u svom redu | |
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
### Ispišite sve brojeve od 1 do 100, svaki u svom redu | |
### Ispišite brojeve od 17 do 32 u jednom redu, odvojite ih zarezom | |
### Ispišite random brojeve od 50 do 110 u jednom redu, odvojite ih zarezom |
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
### a) Ispišite sve brojeve od 1 do 1000 koji su djeljivi sa 13 ili 7 | |
### b) Napravite novi rječnik koji će sadržavati dva ključa. | |
### Ključevi: 15, 7 | |
### | |
### Pod ključem "15" u ovom hashu moraju biti svi brojevi | |
### od 1 do 1000 djeljivi sa 15 | |
### Pod ključem "7" u ovom hashu moraju biti svi brojevi | |
### od 1 do 1000 djeljivi sa 7 |
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
### Napišite metodu koja prima string i vraća broj pojavljivanja slova a u tom stringu | |
### Napišite metodu koja prima string a ispisuje ga unazad |
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
### 1. Create user class by implementing | |
### a. properties | |
### i. user_id | |
### ii. username | |
### iii. password | |
### iv. email | |
### b. methods | |
### i. greet (learn user to say "Hi! My name is <name>, nice to meet you." | |
### |