Skip to content

Instantly share code, notes, and snippets.

View appikonda's full-sized avatar

Sandeep Appikonda appikonda

View GitHub Profile
// convert integer to string; 10 -> "10"
var foo = 10;
undefined
foo.toString();
"10"
// convert string to integer; "10" -> 10
var swing = "10";
@appikonda
appikonda / functions.js
Last active August 29, 2015 14:04
Assignment2.js
// Make this work!
// DO NOT DEFINE ARGUMENTS!!11one
function students() {
console.log("First student name: ");
console.log("Second student name: ");
console.log("Third student name: ");
console.log("Fourth student name: ");
console.log("Number of students: ");
}
@appikonda
appikonda / Assignment3.js
Last active August 29, 2015 14:04
Type identification and action
function typer(val) {
// Implement me!
if(typeof(val) === "number" || typeof(val) === "string"){
return val;
}
else if(typeof(val) === "function" )
{
return val();
}
else if(typeof(val) === "object"){
@appikonda
appikonda / function_def.md
Created July 17, 2014 04:57
Difference between two types of function definition
  • When do you use a variable assignment definition and when would you use a regular definition?
  • What's the difference
@appikonda
appikonda / syllabus.md
Created July 18, 2014 04:51
JavaScript
  • where/how/what?
  • variables
  • types in js
  • conditionals
  • loops
  • operator precedence
  • functions
  • Type Conversion
  • return values
  • type of function?!
@appikonda
appikonda / change_text
Last active August 29, 2015 14:14
Mohnish Assignment #5
<html>
<head>
<titl>Assignment #5</titl>
</head>
<body>
<div>Input#1: <input type="text" id="one" value="" oninput="swapInput1()" /></div>
<div>Input#2: <input type="text" id="two" value="" oninput="swapInput2()" /></div>
<script>
@appikonda
appikonda / red_box
Last active August 29, 2015 14:14
assignment5
<html>
<head>
<titl>Assignment #5</titl>
</head>
<style>
.move-me {
height: 200px;
width: 200px;
position: absolute;
background-color: #ff0000;
@appikonda
appikonda / git
Last active February 23, 2016 19:30
git commands
git pull origin master
//create new branch
git checkout -b branch name
//fix the bug new branch
// to compare the files
git diff
git diff <branch_name> -- /path/to/file/in/repo
@appikonda
appikonda / calendar
Created April 13, 2015 21:36
Bootstrap date/time
<div class="form-group">
<label for="datetimepicker" class="col-sm-3 control-label">Date/Time
:</label>
<div class="col-sm-6">
<input type="text" size="30" maxlength="50" name="datetimepicker"
id="datetimepicker" required="required" class="form-control">
</div>
</div>
@appikonda
appikonda / macha
Created May 19, 2015 18:11
HQL to SQL
select * from clientAccessLevel as CAL
inner join client as client
on CAL.client_id = client.id
inner join domain as domain
on CAL.domain_id = domain.id
inner join AccessLevelReference as accessLevelReference
on VAL.accessLevelReferenceId= accessLevelReference.Id
where client.isDelete = false
and domain.id = ?
and accessLevelReference.accessLevel != "give the constant"