Skip to content

Instantly share code, notes, and snippets.

@klemenzarn
klemenzarn / druga.sh
Created April 6, 2013 17:29
druga naloga za ocene
#!/bin/bash
function procentiOcena(){
if [[ $1 < 100 && $1 > 90 ]]; then
echo 10
elif [[ $1 < 90 && $1 > 80 ]]; then
echo 9
elif [[ $1 < 80 && $1 > 70 ]]; then
echo 8
elif [[ $1 < 70 && $1 > 60 ]]; then
/* execute multi query */
if (mysqli_multi_query($link, $query)) {
do {
/* store first result set */
if ($result = mysqli_store_result($link)) {
while ($row = mysqli_fetch_row($result)) {
printf("%s\n", $row[0]);
}
mysqli_free_result($result);
}
<?php
function Sestej($a, $b){
return $a+$b;
}
$server = new SoapServer(null,array('uri' => "urn://tyler/res"));
$server->addFunction('Sestej');
$server->handle();
//klic .net servica
$client = new SoapClient("http://localhost:54149/Service.asmx?wsdl");
$args=new stdClass();
$args->iskalni_vzorec=$niz;
$result = $client->getSeznamDatotek($args);
echo $result->getSeznamDatotekResult;
@klemenzarn
klemenzarn / gist:5227293
Created March 23, 2013 10:49
klic procedure
SqlCommand command = new SqlCommand("isci", con);
command.CommandType = CommandType.StoredProcedure;
command.Parameters.Add("@iskalnivzorec", SqlDbType.NVarChar);
command.Parameters["@iskalnivzorec"].Value = iskalni_vzorec;
//php klic servisa
$client = new SoapClient(null, array('location' => "http://localhost/vaja2/service.php",'uri' => "http://test-uri/"));
$output = $client->getSeznam($niz);
echo $output;
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int stElementov = 0;
int vrednosti = 0;
void napolniPolje(int polje[], int stElementov, int vrednosti){
@klemenzarn
klemenzarn / 4 vaja SP
Created March 20, 2013 14:13
kak delaš pa to...
sql stavki v bazi
-stored procedures -add new procedure
alter procedure dbo.blogvrnil(@A int, @B nvarchar(255), @c datetime)
AS
begin
insert into blog (naziv,opis,id) values (@A, @B,@C)