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
; Program koji ne radi nista | |
; C Ekvivalent: | |
; void main(){} | |
; Potrebno je samo pravilno izaci iz programa | |
; sa EXIT_SUCCESS (=0) | |
; Ovo ce raditi | |
; Ali nije korektno xD |
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
<?php | |
include 'medoo.php'; | |
class ActiveModel { | |
public static $table_columns = array(); | |
public function __construct( $parameters = null ) { | |
$class_name = get_class($this); | |
$table_name = strtolower($class_name) . 's'; |
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
<?php | |
/** | |
* Generates signature for provided query string. | |
* | |
* Signature is generated as the md5 of query string | |
* concatanted with length of query string. | |
* If signature generator function is passed then signauture will be | |
* generated using that function. | |
* Use http_build_query function to build query string. |
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
unsigned char* encrypt(char* data, size_t* len, int key) | |
{ | |
size_t i = 0; | |
*len = strlen(data); | |
unsigned char* encrypted_data = new unsigned char [ *len + 1 ]; | |
for(i = 0; i<*len; i++) { | |
encrypted_data[i] = ((unsigned char) data[i]) ^ key; | |
} |
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
function completeHandler(jqXHR, testStatus) { | |
console.log("Complete Handler"); | |
} | |
function errorHandler(jqXHR, textStatus, errorThrown) { | |
console.log(jqXHR, textStatus, errorThrown) | |
console.log("Error Handler"); | |
} | |
function successHandler(data, textStatus, jqXHR) { |
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
unsigned char* hex2bin(const char* hexstr, size_t* size) | |
{ | |
size_t hexstrLen = strlen(hexstr); | |
size_t bytesLen = hexstrLen / 2; | |
unsigned char* bytes = (unsigned char*) malloc(bytesLen); | |
int count = 0; | |
const char* pos = hexstr; |
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
var LfsrCipher = function(s, p) { | |
this.key = s; | |
this.p = p; | |
this.generate = function(i) { | |
var t = 0; | |
for(var j=0; j<=p.length-1; j++) | |
t += p[j] * s[i+j]; | |
t = t % 2; |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Upload Photos</title> | |
<link rel="stylesheet" type="text/css" href="bower_components/bootstrap/dist/css/bootstrap.min.css"/> | |
<style type="text/css"> | |
.fileUpload { | |
position: relative; |
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
<VirtualHost *:80> | |
ServerAdmin webmaster@localhost | |
ServerName [SERVER_NAME] | |
ServerAlias [SERVER_ALIAS] | |
DocumentRoot [SERVER_DOCUMENT_ROOT] | |
<Directory /> | |
AllowOverride All | |
</Directory> | |
<Directory [SERVER_DOCUMENT_ROOT]> | |
Options Indexes FollowSymLinks MultiViews |
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
# Install Postgresql | |
sudo apt-get install -y postgresql postgresql-contrib | |
# Create a database and a user to access it | |
# this will prompt you for a database password | |
sudo -u postgres createuser -P USER_NAME_HERE | |
sudo -u postgres createdb -O USER_NAME_HERE DATABASE_NAME_HERE | |
# Test connecting to Postgresql | |
psql -h localhost -U USER_NAME_HERE DATABASE_NAME_HERE |
OlderNewer