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
select concat('public ',tps.dest,' ',column_name,'{get;set;}') as code | |
from information_schema.columns c | |
join( | |
select 'char' as orign ,'string' as dest union all | |
select 'varchar' ,'string' union all | |
select 'longtext' ,'string' union all | |
select 'datetime' ,'DateTime' union all | |
select 'text' ,'string' union all | |
select 'bit' ,'int' union all | |
select 'bigint' ,'int' union all |
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
/*eslint strict:0*/ | |
/*global CasperError, console, phantom, require*/ | |
var casper = require("casper").create({ | |
verbose: true | |
}); | |
// The base links array | |
var links = [ | |
"http://google.com/", |
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.Web.Mvc; | |
namespace White.Label.Ordering.Infrastructure.Attributes | |
{ | |
public abstract class ModelStateTempDataTransfer : ActionFilterAttribute | |
{ | |
protected static readonly string Key = typeof(ModelStateTempDataTransfer).FullName; | |
} | |
public class ImportModelStateFromTempData : ModelStateTempDataTransfer |
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
/* Contains general scripts that may be used in any page. | |
* If this file starts to get large it can be split into page-specific files. */ | |
/* The following code is the Garber-Irish implementation, a way to run relevant JavaScript on page-load | |
* based on the MVC action that produced the page. It's an unobtrusive approach, which means that the | |
* code to call the relevant JavaScript functions is all here instead of being hardcoded into the HTML. | |
* All this code needs from the page is data-controller and data-action attributes on the body tag. | |
* Since JavaScript is case-sensitive, the controller and action names we use here must be an exact match. | |
* http://viget.com/inspire/extending-paul-irishs-comprehensive-dom-ready-execution */ |
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
declare @TableName sysname = 'TableName' | |
declare @Result varchar(max) = 'public class ' + @TableName + ' | |
{' | |
select @Result = @Result + ' | |
public ' + ColumnType + NullableSign + ' ' + ColumnName + ' { get; set; }' | |
from | |
( | |
select | |
replace(col.name, ' ', '_') ColumnName, |
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 LinkInputs = React.createClass({ | |
getInitialState: function() { | |
return {input: 0.2}; | |
}, | |
handleChange: function(event) { | |
console.log('changed parent'); | |
this.setState({ input : event.target.value }) | |
}, |
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 Hello = React.createClass({ | |
mixins: [React.addons.LinkedStateMixin], | |
getInitialState: function() { | |
return {input: 0.2}; | |
}, | |
render: function() { | |
var total = this.state.input1 + this.state.input2; | |
return ( | |
<div>{total}<br/> |
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
module.exports = function (grunt) { | |
grunt.initConfig({ | |
react: { | |
//event sub/pub test | |
single_file_output: { | |
files: { | |
'mvc/scripts/pages/event.counter.js': 'mvc/scripts/src/jsx/Event.System.Counter.jsx', |
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 MyParentChange = React.createClass({ | |
getInitialState: function() { | |
return { | |
data: [], value: {}, showOutput: false | |
} | |
}, | |
componentDidMount: function() { | |
$.get(this.props.source, function(result) { |
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 MachineInfo = React.createClass({ | |
getInitialState: function() { | |
return { | |
data: [] | |
}; | |
}, | |
componentDidMount: function() { | |
$.get(this.props.source, function(result) { |