In Ember, the application's state manager handles routing. Let's take a look at a simple example:
App.stateManager = Ember.StateManager.create({
start: Ember.State.extend({
index: Ember.State.extend({
route: "/",| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| <?php | |
| // ... | |
| class AbstractInvoiceLineType extends AbstractType | |
| { | |
| public function buildForm(FormBuilderInterface $builder, array $options) | |
| { | |
| // ... |
| <?php | |
| namespace Ormigo\Bundle\OrmigoBundle; | |
| use Symfony\Component\HttpKernel\Bundle\Bundle; | |
| use Symfony\Component\DependencyInjection\ContainerBuilder; | |
| use Ormigo\Bundle\OrmigoBundle\DependencyInjection\Compiler\RegisterStreamsPass; | |
| /** |
| find . -type f -name "*.html.twig" | xargs perl -pi -e "s/>([^\s<{>].*?)</>{{ '\1'|trans }}</g" |
| #!/usr/bin/env sh | |
| # File extension to check for changes | |
| OBSERVE='dist' | |
| # check if user configured mergetool | |
| mergetool=`git config --get merge.tool` | |
| if [[ -n "$mergetool" ]]; then | |
| PROG=$mergetool | |
| else |
| #!/bin/bash | |
| for cfg in `git config -f .gitmodules -l` | |
| do | |
| url=`echo $cfg | awk -F"submodule.*.url=" '{print $2}'`; | |
| if [ -n "$url" ]; then | |
| echo "git submodule add $url $path"; | |
| git submodule add $url $path; |
| <?php | |
| /** | |
| * Offers a way to save files as a cleaned, unique version of the original filename. | |
| * | |
| * Use this as the 'validated_file_class' option on sfValidatorFile. | |
| * | |
| * Bad characters are replaced by the replaceCharacter string. Unique filenames | |
| * are created by appending an increasing -# to the end of the basename | |
| * of the uploaded file. |