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
$.fn.myNewPlugin = function() { | |
return this.each(function() { | |
}) | |
} |
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
#loader { | |
background: none repeat scroll 0 0 #ffffff; | |
bottom: 0; | |
height: 100%; | |
left: 0; | |
position: fixed; | |
right: 0; | |
top: 0; | |
width: 100%; | |
z-index: 9999; |
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 if ( have_posts() ) : query_posts('p=1'); | |
while (have_posts()) : the_post(); ?> | |
<?php the_title(); ?> | |
<?php the_content(); ?> | |
<?php the_post_thumbnail(array(100, 100)); ?> | |
<?php endwhile; endif; wp_reset_query(); ?> |
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
class Singletone { | |
private uniqueInstance: Singletone; | |
name = "vasya"; | |
private constructor() {} | |
public static getInstance() { | |
if (this.uniqueInstance === undefined) { | |
this.uniqueInstance = new Singletone(); | |
} | |
return this.uniqueInstance; |
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
abstract class Pizza { | |
name: string; | |
dough: Dough; | |
sauce: Sauce; | |
veggies: Veggies; | |
cheese: Cheese; | |
pepperoni: Pepperoni; | |
clams: Clams; | |
toppings: string[] = ["Extra Mozzarella"]; |
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
class Pizza { | |
bake() {} | |
prepare() {} | |
box() {} | |
cut() {} | |
} | |
class CheesePizza extends Pizza {} | |
class PepperoniPizza extends Pizza {} |
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
interface QuackBehavior { | |
quack(): void; | |
} | |
interface FlyBehavior { | |
fly(): void; | |
} | |
class Quack implements QuackBehavior { | |
quack(): void { |
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
abstract class Beverage { | |
description: string = "Unknown beverage"; | |
getDescription() { | |
return this.description; | |
} | |
cost(): number { | |
return 0; | |
} |
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
interface Command { | |
execute(): void; | |
undo(): void; | |
} | |
class Light { | |
room: string; | |
constructor(room: string) { | |
this.room = room; |
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
interface Duck { | |
quack(): void; | |
fly(): void; | |
} | |
interface Turkey { | |
gobble(): void; | |
fly(): void; | |
} |
OlderNewer