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 signupMailchimp() { | |
var d = "FIRSTNAME={0}&LASTNAME={1}&EMAIL={2}".format | |
( | |
encodeURIComponent($("#FirstName").val()), | |
encodeURIComponent($("#LastName").val()), | |
encodeURIComponent($("#Email").val()) | |
); | |
if ($("form.login").valid()) { |
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 from "react"; | |
import { render } from "react-dom"; | |
const ParentComponent = React.createClass({ | |
getDefaultProps: function() { | |
console.log("ParentComponent - getDefaultProps"); | |
}, | |
getInitialState: function() { | |
console.log("ParentComponent - getInitialState"); | |
return { text: "" }; |
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
//http://stackoverflow.com/questions/13210663/how-to-order-knockout-bindings | |
ko.bindingHandlers.chosen = { | |
init: function(element, valueAccessor, allBindingsAccessor, viewModel) { | |
var allBindings = allBindingsAccessor(); | |
var options = {default: 'Select one...'}; | |
$.extend(options, allBindings.chosen) | |
$(element).attr('data-placeholder', options.default); |
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
// Some common and useful extensions for vanilla.js, knockout.js and jquery.js. | |
if(ko && ko.extenders) { | |
ko.extenders.roundToDotQuater = function (target) { | |
if (mogy.options.roundDecimalsToQuaters) { | |
var result = ko.pureComputed({ | |
read: target, | |
write: function (newValue) { | |
target((Math.round(Math.round10(newValue, 2) * 4) / 4).toFixed(2)); | |
} |
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
// requires knockout.js and jquery.js | |
// limits the numeric observable to the provided min and max range args | |
ko.extenders["limitedNumeric"] = (target: Ko.Observable<any>, args: any) => { | |
let settings: any = { | |
minValue: 1, | |
maxValue: null | |
}; | |
$.extend(settings, args); |
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 DeliminatorSeparatedPropertyNamesContractResolver : DefaultContractResolver | |
{ | |
private readonly string _separator; | |
protected DeliminatorSeparatedPropertyNamesContractResolver(char separator) : base(true) | |
{ | |
_separator = separator.ToString(); | |
} | |
protected override string ResolvePropertyName(string propertyName) |
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
document.querySelectorAll("span.coreSpriteHeartOpen").forEach(function(h, i){ | |
setTimeout(function(){h.click()}, (i*1000)+Math.random()*4000) | |
}); |
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
# ER-REACT101 - DEMO SETUP GUIDE | |
There are two main parts in this demo setup, those are: | |
1. **setting up the project and build system** | |
2. **actually writing react** | |
## 1. The Setup | |
1. npm init | |
- in project root you will get a `package.json` file |
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
reg add "HKLM\Software\Microsoft\Fusion" /v EnableLog /t REG_DWORD /d 0 /f |
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
/* based on the docs at: https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide */ | |
/* | |
* LICENSE: MIT | |
* AUTOHR: [email protected] | |
*/ | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; |
OlderNewer