This file contains hidden or 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
| import urllib.request | |
| counter = 0 | |
| while True: | |
| counter+=1 | |
| URL = "http://www.arso.gov.si/vreme/napovedi%20in%20podatki/radar_anim.gif" | |
| urllib.request.retrieve(URL, "radars/radar_anim_%02d.gif" % counter) | |
| time.sleep(3000) | |
This file contains hidden or 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
| import urllib.request | |
| import os | |
| import time | |
| try: | |
| os.mkdir('radar') | |
| except WindowsError: | |
| print("ok.") | |
| while True: |
This file contains hidden or 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 | |
| var namesMap := map[string]string{"Hello": "World","foo":"bar"} |
This file contains hidden or 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
| var commands = map[string]func() { | |
| "hello": hello, | |
| } | |
| func hello() string { | |
| return "Hello World" | |
| } |
This file contains hidden or 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 | |
| func command(msg string) func() string { | |
| return commandsMap[cmd] | |
| } | |
| var commandsMap = map[string]func() string{ | |
| "hello": hello, | |
| } |
This file contains hidden or 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 | |
| type Bot struct { | |
| User string `json:"user"` | |
| Nick string `json:"nick"` | |
| Server string `json:"server"` | |
| Port string `json:"port"` | |
| Channels []string `json:"channels"` |
This file contains hidden or 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
| C:\Users\Anthony\Documents\Projects\JackdawApp>rake db:migrate | |
| == 20150216042249 AddDeviseToUsers: migrating ================================= | |
| -- change_table(:users) | |
| rake aborted! | |
| An error has occurred, this and all later migrations canceled: | |
| SQLite3::SQLException: no such table: users: ALTER TABLE "users" ADD "nick" varc | |
| har DEFAULT '' NOT NULL | |
| Tasks: TOP => db:migrate |
This file contains hidden or 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
| new_user_session GET /users/sign_in(.:format) devise/sessions#n | |
| ew | |
| user_session POST /users/sign_in(.:format) devise/sessions#c | |
| reate | |
| destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#d | |
| estroy | |
| user_password POST /users/password(.:format) devise/passwords# | |
| create | |
| new_user_password GET /users/password/new(.:format) devise/passwords# | |
| new |
This file contains hidden or 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
| $(document).ready(function() { | |
| $(".thumbnail").draggable(); | |
| $("#trash").droppable({ | |
| drop: function(event, ui) { | |
| alert(ui.data("image-id")); | |
| /*$.ajax({ | |
| type: "POST", | |
| url: "<%= link_to image_path | |
| }) */ |
This file contains hidden or 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
| $(document).ready(function() { | |
| $(".thumbnail").draggable(); | |
| $("#trash").droppable({ | |
| drop: function(event, ui) { | |
| var id = ui.draggable.attr('id'); | |
| $.ajax({ | |
| type: "post", | |
| data: {"_method": "delete"}, | |
| url: "/images/" + id, |