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 | |
/** | |
* CSV_parser | |
* | |
* @package | |
* @author Dave's Simple Project | |
* @copyright MESMERiZE | |
* @version 2012 | |
* @access public | |
*/ |
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> | |
<meta charset="utf-8"> | |
<title>Untitled Document</title> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(e) { | |
$('#1,#2,#3,#4,#5,#6,#7,#8,#9,#0').click(function(){ | |
var v = $(this).val(); |
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
@using System.Collections | |
@{ | |
if(IsPost) | |
{ | |
if(Request.Files.Count > 0) | |
{ | |
string[] allowed = {".jpg",".png",".gif"}; | |
var uploaded = Request.Files[0]; | |
var extension = System.IO.Path.GetExtension(uploaded.FileName); |
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
using System; | |
using System.Web; | |
namespace CMSApplication | |
{ | |
public class FlashMessage : System.Web.UI.Page | |
{ | |
public void put(string key,string message = "") | |
{ | |
Session[key] = message; |
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 React, { Component } from 'react'; | |
class Pagination extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
currentPage: 1, | |
items: [] | |
} | |
this.goTo = this.goTo.bind(this); |
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
sudo apt-get install npm | |
sudo apt-get install git | |
sudo apt-get install nodejs | |
sudo apt-get install mysql-server | |
sudo apt-get install nginx | |
sudo apt-get install php5-fpm | |
sudo apt-get install php5-curl php5-mcrypt php5-mysql php5-cli | |
sudo php5endmod mycrypt | |
sudo npm install -g gulp | |
sudo npm install -g bower |
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 RestrictSpaceSpecial(e) { | |
var exp = String.fromCharCode(window.event.keyCode) | |
//Below line will have the special characters that is not allowed you can add if you want more for some characters you need to add escape sequence | |
var r = new RegExp(/^[a-zA-Z0-9-_]+$/); | |
if (exp.match(r)) { | |
return true; | |
} else { | |
window.event.keyCode = 0 | |
return false; | |
} |
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
# nginx does not allow add_headers inside if unless its location | |
set $cors "true"; | |
# Nginx doesn't support nested If statements. This is where things get slightly nasty. | |
# Determine the HTTP request method used | |
if ($request_method = 'OPTIONS') { | |
set $cors "${cors}options"; | |
} | |
if ($request_method = 'GET') { |
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
angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers']) | |
.run(function(DB) { | |
DB.init(); | |
}); |
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 EventSystem = (function() { | |
var self = this; | |
self.queue = {}; | |
return { | |
publish: function (event, data) { | |
var queue = self.queue[event]; | |
if (typeof queue === 'undefined') { |
OlderNewer