The design of this has some issues. It requires calling YUI use for each public / private method. Nonethless, this is how you setup a javascript module using module pattern and YUI namepsace.
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
public class Person { | |
private String name; | |
private String age; | |
private String gender; | |
Person(String Name, String Age, String Gender) { | |
this.age = Age; | |
this.gender = Gender; | |
this.name = Name; | |
} |
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
@import java.util; | |
@import org.openqa.selenium.By; | |
@import org.openqa.selenium.WebDriver; | |
@import org.openqa.selenium.Keys; | |
driver.findElement(By.xpath("//select[@id='categoryId']")).sendKeys("Foo"); | |
// For more info Please find the below code | |
WebElement droplist = driver.findElement(By.xpath("//select[@id='categoryId']")); |
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 ( $_SERVER['REMOTE_ADDR'] === '127.0.0.1' ){ | |
add_action( 'wp_enqueue_scripts', 'enqueue_livereload' ); | |
} | |
function enqueue_livereload(){ | |
wp_enqueue_script( 'livereload', site_url().'/livereload.js', '', NULL ); | |
} |
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 app = angular.module("app", ["ngAnimate"]); | |
app.controller("AppCtrl", function() { | |
this.toggle = true; | |
}); | |
app.animation(".toggle", function () { | |
return { | |
leave: function (element, done) { | |
element.text("leave"); |
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
<div id="consolelog" style="font-family: 'Courier New', Courier, monospace; font-size: 12px; margin: 40px 30px 0px; background-color: white; border: 2px solid black; padding: 10px;"></div> | |
<input type="text" id="consoleinput" style="margin: 0px 30px; width: 400px;" onkeypress="return evalConsoleInput(event, this.value);" /> | |
<script type="text/javascript"> | |
var appendConsole = function(message, type) { | |
var color = "black"; | |
if (type === "error") { | |
color = "red"; | |
} else if (type === "debug") { |
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
// 2.1.3 - Chars | |
char c2 = '122'; // Does this compile? What does this become? | |
char c2 = '\u0122'; // Does this compile; if so what is the value |
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
javascript:(function(){if((/android/gi).test(navigator.appVersion)){console={"_log":[],"log":function(){var%20arr=[];for(var%20i=0;i<arguments.length;i++){arr.push(arguments[i]);}this._log.push(arr.join(",%20"));},"trace":function(){var%20stack;try{throw%20new%20Error();}catch(ex){stack=ex.stack;}console.log("console.trace()\n"+stack.split("\n").slice(2).join("%20%20\n"));},"dir":function(obj){console.log("Content%20of%20"+obj);for(var%20key%20in%20obj){var%20value=typeof%20obj[key]==="function"?"function":obj[key];console.log("%20-\""+key+"\"%20->%20\""+value+"\"");}},"show":function(){alert(this._log.join("\n"));this._log=[];}};window.onerror=function(msg,url,line){console.log("ERROR:%20\""+msg+"\"%20at%20\""+"\",%20line%20"+line);}window.addEventListener("touchstart",function(e){if(e.touches.length===3){console.show();}});}})(); |
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
data:text/html, <html contenteditable> |
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 gulp = require("gulp"); | |
var path = require("path"); | |
var server = { | |
port: 4000, | |
livereloadPort: 35729, | |
basePath: path.join(__dirname, "www"), | |
_lr: null, | |
start: function () { | |
var express = require('express'); |
OlderNewer