This file contains hidden or 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 replaceWordChars(text) { | |
var s = text; | |
if(s != null && s.length > 0) { | |
// smart single quotes and apostrophe | |
s = s.replace(/[\u2018\u2019\u201A]/g, "\'"); | |
// smart double quotes | |
s = s.replace(/[\u201C\u201D\u201E]/g, "\""); | |
// ellipsis | |
s = s.replace(/\u2026/g, "..."); | |
// dashes |
This file contains hidden or 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
<body> | |
<h1>X2JS Demo</h1> | |
<button id="convertToJsonBtn">XML => JSON</button> | |
<button id="convertToXmlBtn">JSON => XML</button> | |
<div> | |
<h4>XML:</h4> | |
<textarea id="xmlArea" cols="55" rows="15"></textarea> | |
</div> |
This file contains hidden or 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
{ | |
"_id" : 137, | |
"name" : "Tamika Schildgen", | |
"scores" : [ | |
{ | |
"type" : "exam", | |
"score" : 4.433956226109692 | |
}, | |
{ |
This file contains hidden or 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"> | |
<title>jQuery UI Autocomplete - Combobox</title> | |
<link rel="stylesheet" href="https:///code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> | |
<script src="https://code.jquery.com/jquery-1.10.2.js"></script> | |
<script src="https:///code.jquery.com/ui/1.11.4/jquery-ui.js"></script> | |
<style> |
This file contains hidden or 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 = Ember.Application.create(); | |
app.ApplicationController = Ember.Controller.extend({ | |
modals: Ember.inject.service(), | |
// init: function() { | |
// console.log(this.get('modals')); | |
// }, | |
actions: { | |
openModal: function(name) { | |
this.get('modals').open(name); |
This file contains hidden or 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 filterSpecialChar(text) { | |
var patt = /[^a-zA-Z0-9{}.,\?'"\[\]\(\)\-\\\/:&;\*@\s]+/; | |
if(patt.test(text)) | |
return false; | |
else | |
return true; | |
} |
This file contains hidden or 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 http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<title> - jsFiddle demo</title> | |
</head> | |
<body> | |
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.min.js"></script> | |
<script type="text/javascript" src="https://cdn.jsdelivr.net/webshim/1.14.5/polyfiller.js"></script> | |
<script> |
This file contains hidden or 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
WebRequest request = WebRequest.Create(connectURL); | |
//request.Headers.Add(HttpRequestHeader.ContentType, "application/json"); | |
request.Method = "GET"; | |
WebResponse response = request.GetResponse(); | |
Console.WriteLine(((HttpWebResponse)response).StatusDescription); | |
// Get the stream containing content returned by the server. | |
Stream dataStream = response.GetResponseStream(); | |
// Open the stream using a StreamReader for easy access. | |
StreamReader reader = new StreamReader(dataStream); | |
// Read the content. |
This file contains hidden or 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 void Multi_Save_Test() | |
{ | |
//http://stackoverflow.com/questions/28007087/how-to-write-to-excel-many-times-using-one-object-of-epplus-in-c-sharp | |
var existingFile = new FileInfo(@"c:\temp\temp.xlsx"); | |
if (existingFile.Exists) | |
existingFile.Delete(); | |
//Use memstream and create the package but WITHOUT the FI so it is a memory stream as well | |
//Avoid using and call manual dispose | |
var holdingstream = new MemoryStream(); |
This file contains hidden or 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
package model; | |
import java.util.Hashtable; | |
import javax.naming.Context; | |
import javax.naming.NamingException; | |
import javax.naming.directory.Attribute; | |
import javax.naming.directory.Attributes; | |
import javax.naming.directory.BasicAttribute; | |
import javax.naming.directory.BasicAttributes; |
OlderNewer