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
| function karuzeluj(){ | |
| $('.carusel hgroup.selected').animate({opacity:0, left:'-100px'},500,function(){ | |
| $(this).removeClass('selected'); | |
| var $nxt = ($(this).next().length) ? $(this).next() : $(this).siblings(':first'); | |
| $nxt.animate({opacity:1,left:'200px'},700) | |
| .addClass('selected'); | |
| }); | |
| } |
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
| /* | |
| * By default JS returns invalid modulo values for negative numbers, | |
| * below line fixes this, by overriding default js mod function | |
| */ | |
| Number.prototype.mod=function(n){return((this%n)+n)%n;} |
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
| (function($) { | |
| /** | |
| * IMPORTANTE! | |
| * if you call methods via methods._methodName(); entire context is LOST, | |
| * therefore you cannot reference to your object as `this`, so a good way | |
| * to fix it is to call them like that: | |
| * methods._private.call($(this)); // which will keep object as `this` | |
| **/ | |
| // this object is available only inside of this function | |
| var methods = { |
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
| -- tabela | |
| CREATE TABLE winners( | |
| id BIGINT UNSIGNED AUTO_INCREMENT NOT NULL, | |
| cid BIGINT UNSIGNED NOT NULL, -- Contest ID - id konkursu | |
| eid BIGINT UNSIGNED NOT NULL, -- Entry ID - id wpisu w tym konkursie | |
| place INT NOT NULL, -- którym miejscem został oznaczony przez moderatora | |
| uts DECIMAL(17,3) NOT NULL, | |
| PRIMARY KEY(id) | |
| ); |
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 lightbulb = { | |
| state: false, | |
| turn: function( state ){ | |
| if( typeof(state)=="boolean" ) this.state = state; | |
| else if( typeof(state)=="string" ) this.state = (state=="on") ? true : false; | |
| } | |
| }; |
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
| -- will work only if theres a key or unique of any kind | |
| INSERT INTO tabela ( name, content ) | |
| VALUES | |
| ('jakasNazwa', 'Jakaś Wartość'), | |
| ('jakasNazwa2', 'Jakaś Wartość 2') | |
| ON DUPLICATE KEY | |
| UPDATE content = VALUES( content ); |
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 context, | |
| colors = ["red", "green", "blue", "yellow"], | |
| viewport = { | |
| width: 500, | |
| height: 500, | |
| x: 0, | |
| y: 0 | |
| }, | |
| bigBlackThing = { | |
| width: 160, |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:layout_width="fill_parent" | |
| android:layout_height="fill_parent" | |
| android:orientation="horizontal" | |
| android:baselineAligned="false" | |
| android:background="@drawable/background"> | |
| <RelativeLayout | |
| android:layout_height="fill_parent" |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources> | |
| <dimen name="square">37dp</dimen> | |
| <dimen name="spacing">12dp</dimen> | |
| </resources> |
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
| some.listener(function(description){ | |
| cookie.async.accessor({params:object}, function( cookie ) { | |
| // tu dostaję wartość cookie | |
| }); | |
| // a tu musze ją zwrócić | |
| return cookie_value; | |
| }); |