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
#!/bin/sh | |
__git_ps1() { | |
branch=$(git symbolic-ref HEAD --short 2>/dev/null); | |
modified=$([[ -n $branch ]] && [[ -n $(git diff --shortstat) ]] && echo '(^)'); | |
staged=$([[ -n $branch ]] && [[ -n $(git diff --shortstat --cached) ]] && echo '(+)'); | |
markers="$modified$staged"; | |
[[ -n $branch ]] && echo " [$branch$([[ -n $markers ]] && echo " $markers")]"; | |
} |
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
$('#langSelect').change(function(){ | |
var lang = $(this).val(); | |
$('[class*=lang-]').hide(); | |
$('.lang-' + lang).show(); | |
document.cookie = "language=" + lang; | |
}); | |
var allCookies = document.cookie.split('; '); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>AJAX Example</title> | |
<style> | |
.error { | |
border-color: red; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Web Forms Validation Example</title> | |
<style> | |
.error { | |
border: 1px red solid; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Web Forms Example</title> | |
<style> | |
.error { | |
border-color: red; | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="author" content="Evgenia Manolova"> | |
<title>Lesson 12 examples</title> | |
<link href='https://fonts.googleapis.com/css?family=Lato:400,700' rel='stylesheet' type='text/css'> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="author" content="Evgenia Manolova"> | |
<title>Lesson 12 examples</title> | |
<link href='https://fonts.googleapis.com/css?family=Lato:400,700' rel='stylesheet' type='text/css'> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="author" content="Evgenia Manolova"> | |
<title>Lesson 13 examples</title> | |
<link href='https://fonts.googleapis.com/css?family=Lato:400,700' rel='stylesheet' type='text/css'> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="author" content="Evgenia Manolova"> | |
<title>Lesson 13 examples</title> | |
<link href='https://fonts.googleapis.com/css?family=Lato:400,700' rel='stylesheet' type='text/css'> |
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
function calcAge(string) { // "2001-11-02" | |
var age = 0; | |
var birthdate = new Date(string); | |
var today = new Date(); | |
age = today.getFullYear() - birthdate.getFullYear(); | |
var monthDelta = birthdate.getMonth() - today.getMonth(); | |
var dateDelta = birthdate.getDate() - today.getDate(); |