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 a = [{ | |
id: 1 | |
}, { | |
id: 2 | |
}]; | |
var b = [{ | |
id: 1 | |
}, { | |
id: 2 |
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
gulp.task("webpack-dev-server", function() { | |
// modify some webpack config options | |
var myConfig = Object.create(webpackConfig); | |
// Start a webpack-dev-server | |
new WebpackDevServer(webpack(myConfig),{ | |
contentBase: 'build', | |
inline:true | |
}) | |
.listen(8080, "localhost", function(err) { |
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 function __construct(App $app, $api_key = null) | |
{ | |
$this->app = $app; | |
$this->api_key = $api_key; | |
} |
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
using System; | |
using System.Collections.Generic; | |
using System.Data; | |
using System.Data.Entity; | |
using System.Data.Entity.Infrastructure; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Http; | |
using System.Web.Http; | |
using System.Web.Http.Description; |
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
import { connect } from 'react-redux' | |
import { toggleChoice } from '../actions/index' | |
import ChoiceSet from '../components/ChoiceSet'; | |
const getChoices = (choices, choiceType) => { | |
return choices.filter(t => t.choiceType == choiceType) | |
}; | |
const mapStateToProps = (state) => { | |
return { |
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
import React from 'react'; | |
import ReactDOM from 'react-dom' | |
import Todo from 'Todo'; | |
export const TodoList = ({todos, onTodoClick}) => ( | |
<ul> | |
{todos.map(todo => <Todo key={todo.id} {...todo} onClick={() => onTodoClick(todo.id)} />)} | |
</ul> | |
); |
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
[ | |
'a.b.c' | |
'a.b.d', | |
'a.q.z', | |
] | |
To something like... | |
[ | |
'a' => [ |
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
Object { | |
1: Object, | |
3: Object, | |
5: Object, | |
9: Object | |
} |
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
<?php | |
public function createObjectWithRelations($data){ | |
$parent->create($data['parent']); | |
foreach($data['children' as $children){ | |
$item = Mage::getModel('namespace/item'); | |
$item->setData('stuff'); | |
$item->parent_id = $parent->id | |
$item->save() | |
} |
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
<block type="ext/adminhtml_ext_view_tabs" name="ext_tabs"> | |
<block type="ext/adminhtml_ext_view_tab_info" name="ext_tab_info" template="ext/view/tab/info.phtml"> | |
<block type="ext/adminhtml_ext_view_info" name="ext_info" template="ext/view/info.phtml"/> | |
</block> | |
</block> |