Say a User has many Posts.
App.User = DS.Model.extend({
posts: DS.hasMany('post', {async: true})
});
App.Post = DS.Model.extend({
user: DS.belongsTo('user', {async: true})
DEPS: libsmt, smt | |
COMPILE:""" | |
# Input LIBSMT_PATH, SMT_PATH | |
compile | |
""" | |
KEEP:""" | |
# Input KEEP_PATH | |
cp * $KEEP_PATH | |
""" | |
EXPOSE:""" |
import Control.Monad.Trans (lift) | |
import Control.Monad.Trans.Maybe (MaybeT, runMaybeT) | |
monadicAdd :: Monad m => m Int -> m Int -> m Int | |
monadicAdd l r = do | |
l_ <- l | |
r_ <- r | |
return (l_ + r_) | |
printWithTransformerMonad :: MaybeT IO Int -> MaybeT IO Int |
class Foo | |
@@foo = :foo | |
end | |
class Example | |
@@foo = :example | |
Foo.define_singleton_method :foo do | |
@@foo | |
end |
Say a User has many Posts.
App.User = DS.Model.extend({
posts: DS.hasMany('post', {async: true})
});
App.Post = DS.Model.extend({
user: DS.belongsTo('user', {async: true})
<?php // Namespace DB; | |
use Illuminate\Database\Capsule\Manager as Capsule; | |
class Connection { | |
public function __construct() | |
{ | |
$this->capsule = new Capsule; | |
// Same as database configuration file of Laravel. |
#!/usr/bin/env php | |
<?php | |
$default_message = "A minor change to code, in order to test it."; // Your default message goes here!<<<<<<<<<<<<<<<<<<<<< | |
// HELP | |
if( array_get($argv, 1) == 'help' || array_get($argv, 1) == '-h' || array_get($argv, 1) == '--help'){ | |
echo PHP_EOL; | |
echo "************************************" . PHP_EOL; |
// Dependencies: | |
#include <iostream.h> | |
#include <conio.h> | |
#include <stdlib.h> | |
int main(){ | |
// Init program | |
clrscr(); | |
// Vars: |