Skip to content

Instantly share code, notes, and snippets.

@Zemaaan
Zemaaan / queen.py
Last active February 24, 2018 18:07
# _*_ coding:utf-8 _*_
# version 0.3.1 Red Queen system
from urllib import request
import json
import webbrowser
import forecastio
from time import ctime
import wikipedia
import subprocess
from urllib import request
from urllib.error import URLError
import json
import tkinter
import time
from PIL import ImageTk, Image
def queen():
# god_mode_suspended = True
try:
import Tkinter as tkinter # for Python 2
except ImportError:
import tkinter # for Python 3
def on_click_1():
print("First handler fired")
def on_click_2():
print("Second handler fired")
// ConsoleApplication1.cpp : Defines the entry point for the console application.
// Treba upisati dan i mjesec rodenja
// i ime osobe
// upis se vrsi tako dugo dok se ne upise dan = 0 i mjesec = 0
// edit: dodani brojac
#include "stdafx.h";
#include <iostream>;
using namespace std;
#include "stdafx.h"
#include <iostream>
#include <string>;
using namespace std;
int main()
{
string rijec;
int brojac_a = 0;
int brojac_b = 0;
// ConsoleApplication1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <string>;
using namespace std;
int main()
{
@Zemaaan
Zemaaan / main.cpp
Last active May 2, 2018 10:38
Programiranje vjezbe 2.5.2018 - 1. zadatak
// ConsoleApplication1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;
// funkcija koja ime onoliko puta koliki je broj slova.
//void ispis_imena(string ime) {
// for (int pozicija = 0; pozicija < ime.length(); pozicija++)
@Zemaaan
Zemaaan / main.cpp
Created May 2, 2018 10:37
Programiranje vjezbe 2.5.2018 - 2. zadatak
// ConsoleApplication1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;
void usporedba_duzina(string ime1, string ime2) {
if (ime1.length() > ime2.length()) { cout << "Prvo ime je duze od drugog." << endl; }
else if (ime2.length() > ime1.length()) { cout << "Drugo ime je duze od prvog." << endl ; }
@Zemaaan
Zemaaan / main.cpp
Created May 2, 2018 10:49
Programiranje vjezbe 2.5.2018 - 3. zadatak
// ConsoleApplication1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;
bool sadrzi_slovo(string rijec, char slovo) {
for (int pozicija = 0; pozicija < rijec.length(); pozicija++) {
if (rijec[pozicija] == slovo) {
@Zemaaan
Zemaaan / main.cpp
Created May 2, 2018 11:13
Programiranje vjezbe 2.5.2018 - 4. zadatak
// ConsoleApplication1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;
void ispis_duzega_imena_x_puta(string ime1, string ime2) {
if (ime1.length() < ime2.length()) {
cout << "-------------------------" << endl;