Skip to content

Instantly share code, notes, and snippets.

View kodi's full-sized avatar

Dragan Bajcic kodi

View GitHub Profile
100 Signs that I May Be Writing Spaghetti Code
-----------------------------------------------------------------------
100. I have no idea where this constant is defined.
99. I have echo stmts littered throughout my code.
98. There is an error but it isn't handled, and I can't find it to figure out what's wrong.
<?php
echo '
<form class="cmxform" id="form1" name="form1" method="post" action="photoUploadedDatabase">
<ol>
<li>
<img class="uploadedImage" src="' . SMALL_IMAGE . $imageName . '" alt="Uploaded photo" />
</li>
<li>
<label for="pictureTitle">Picture title</label>
<input type="text" name="pictureTitle" id="pictureTitle" value="" />
function index(){
$this->_switchHome();
}
function _indexAdmin(){
#show view
$this->view->show("home-admin");
1)tabela tipovi-karakteristika
id |ime
---------------------------
1 |proizvodjac
2 |rezolucija
3 |color spaces
2)tabekla karakteristike
<html>
<head>
<style type="text/css">
table{
border-collapse:collapse;
}
table td{
border:solid 1px #cacaca;
}
@kodi
kodi / gist:187651
Created September 15, 2009 21:15
usage of timeout in Object Oriented Javascript
<html>
<head>
<script type="text/javascript">
var Counter=function(){
//public properties
this.counter=1;
this.resultDiv=document.getElementById('result');
//methods
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>fields test</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js"></script>
<script type="text/javascript">
Event.observe(window, 'load', function() {
Event.observe(window,'click',function(){
if($('date2').value==''){
<?php
Class Osoba{
public $ime;
function podesiIme($ime){
$this->ime=$ime;
}
function pozdrav(){
<?php
/*
* simple mysql database class
CREATE TABLE IF NOT EXISTS `kategorije` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`name` varchar(128) collate latin1_general_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=3 ;
<div id="keywords">
<div class="kw" name="solarijum"></div>
<div class="kw" name="solarijumi"></div>
<div class="kw" name="oprema za frizerske salone"></div>
<div class="kw" name="frizerska oprema"></div>
<div class="kw" name="oprema za kozmeticke salone"></div>
<div class="kw" name="megasun solarijumi"></div>
<div class="kw" name="mega sun solarijumi"></div>
<div class="kw" name="uwe solarijumi"></div>
<div class="kw" name="novi solarijumi"></div>