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
let AnimationWrapper = React.createClass({ | |
render() { | |
console.log(this.props.childClassName + ' render'); | |
return this.props.children; | |
}, | |
componentWillAppear (callback) { | |
console.log(this.props.childClassName + ' willappear'); | |
callback(); |
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
//Relative path to CMBase.php. This example assumes the file is in the same folder | |
require_once('CMBase.php'); | |
//Your API Key. Go to http://www.campaignmonitor.com/api/required/ to see where to find this and other required keys | |
$api_key = '9fd115edeef04b86080a2838baa28a89'; | |
$client_id = null; | |
$campaign_id = null; | |
$list_id = '95b3a886fca5e7572963bf2c69d4ad1f'; | |
$cm = new CampaignMonitor($api_key, $client_id, $campaign_id, $list_id); |
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
/** | |
* Add basic filtering to Ext.tree.Panel. Add as a mixin: | |
* mixins: { | |
* treeFilter: 'MyApp.lib.TreeFilter' | |
* } | |
*/ | |
Ext.define('MyApp.lib.TreeFilter', { | |
filterByText: function(text) { | |
this.filterBy(text, '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
import gdata.apps.service | |
service = gdata.apps.service.AppsService(email="admin@mydomain", domain="mydomain.com", password="password") | |
service.ProgrammaticLogin() | |
names = {'from':'to'} | |
for current, change_to in names.iteritems(): | |
user_entry = service.RetrieveUser(current) |
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
- filtered_sets = filter_sets(sets, set_idxs) unless set_idxs.empty? | |
+ filtered_sets = sets.values_at(*set_idxs) unless set_idxs.empty? | |
- def filter_sets(sets, set_idxs) | |
- filtered_sets = [] | |
- | |
- sets.each_with_index do |set, index| | |
- if set_idxs.include?(index) | |
- log("Adding setidx #{index} with #{set.data_points.length} items to filtered_sets") | |
- filtered_sets << set |
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
class ActiveRecord::Base | |
def self.incorporates(association_id, options = {}) | |
has_one(association_id) | |
id = association_id.to_s | |
klass = id.camelize.constantize | |
obj = klass.new | |
obj.attributes.each do |att| | |
send :define_method, "#{att}=" do |value| | |
assoc = send("#{association_id.to_s}") | |
unless assoc |
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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<title>untitled</title> | |
<script type="text/javascript" charset="utf-8" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> | |
<script type="text/javascript" charset="utf-8"> |
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
// Sqlite Test Base for Fluent NH - needs AddDefaultMappings extension method to NH.Cfg.Configuration | |
using System; | |
using FluentNHibernate.Cfg; | |
using FluentNHibernate.Cfg.Db; | |
using Luxington.EstimateAggregator.Core.NHibernate; | |
using NHibernate; | |
using NHibernate.Cfg; | |
using NHibernate.Tool.hbm2ddl; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" > | |
<session-factory name="NHibernate.Test"> | |
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> | |
<property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property> | |
<property name="connection.connection_string"> | |
Database=test;Data Source=someip;User Id=blah;Password=blah | |
</property> | |
<property name="dialect">NHibernate.Dialect.MySQLDialect</property> | |
</session-factory> |
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
<?xml version="1.0" ?> | |
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" > | |
<session-factory> | |
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> | |
<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property> | |
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property> | |
<property name="connection.connection_string">Server=(local);Initial Catalog=dbname;User Id=user;Password=********</property> | |
</session-factory> | |
</hibernate-configuration> |
NewerOlder