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
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
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
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
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
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
public interface A{ | |
public boolean method(Base B); | |
} | |
public class Parent{ | |
} | |
public class Child extends Parent{ |
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 | |
use MyModel; | |
class ExampleClass { | |
public static function sumMyData(){ | |
$sum = 0; | |
$myIdsArray = []; | |
$myIdsArray = MyModel::getMyListOfIdsFromDb(); | |
$collection = MyModel::getCollection($myIdsArray); | |
foreach($object in $collection){ | |
$sum = sum + $object->value; |
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 | |
class Mage_Core_Model_Layout_Update { | |
public function fetchDbLayoutUpdates($handle) | |
{ | |
$_profilerKey = 'layout/db_update: '.$handle; | |
Varien_Profiler::start($_profilerKey); | |
$updateStr = $this->_getUpdateString($handle); | |
if (!$updateStr) { | |
return false; | |
} |
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 | |
class Mage_Widget_Helper_Data extends Mage_Core_Helper_Abstract | |
{ | |
/** | |
* Further refine escaped HTML. | |
*/ | |
public function escapeHtml($data, $allowedTags = null) | |
{ | |
$parent = parent::escapeHtml($data, $allowedTags); |