The paradigm separates the domain model (data) from use cases (context) and roles that objects play (interaction). DCI is complementary to model–view–controller (MVC). MVC as a pattern language is still used to separate the data and its processing from presentation.
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
Show hidden characters
{ | |
"cmd": ["bash", "-c", "clang -lobjc -framework Cocoa -framework Carbon -o /tmp/sublime-objc-output $file"], | |
"file_regex": "^(.*?):([0-9]+):([0-9]+): (.*)", | |
"selector": "source.objc", | |
"variants": [ | |
{ | |
"name": "Run", | |
"cmd": ["bash", "-c", "clang -lobjc -framework Cocoa -framework Carbon -o /tmp/sublime-objc-output $file && /tmp/sublime-objc-output"] | |
} | |
] |
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
moduleKeywords = ['included', 'extended', 'prototype'] | |
class Class | |
# Rename an instance method | |
# | |
# ``` coffeescript | |
# class User | |
# @alias "methods", "instance_methods" | |
# | |
# ``` |
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
class AppDelegate | |
def applicationDidFinishLaunching(a_notification) | |
foo = FooBar.new | |
# call Objective-C method from MacRuby which calls a MacRuby method. | |
foo.getBarFromRuby | |
# call a second Objective-C method from MacRuby which calls a MacRuby | |
# method returning a Hash | |
foo.getBarContentFromRuby |
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
def settings_save_clicked(sender) | |
settings = Setting.current | |
attributes = { | |
"api_endpoint" => "#{api_endpoint_field.stringValue}", | |
"user_name" => "#{user_name_field.stringValue}", | |
"api_key" => "#{api_key_field.stringValue}" | |
} | |
MultiJSON.dump(attributes) | |
end |
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
# first, login with psql | |
psql -U USERNAME -d databasename | |
# set output for all queries | |
\o FILENAME.sql | |
# run this query | |
select 'drop table ' || tablename || ' cascade;' from pg_tables; | |
# logout from psql |
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
lsbom -f -l -s -pf $HOME/Library/Receipts/APPPKGNAME.pkg.bom |
Nutzbar wie folgt:
response.should have_status "Found" # 302
response.should have_status "Bad Gateway" # 502
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
Feature: Adding a post to my timeline | |
In order to tell my friends what I currently do | |
As registered user | |
I want to add a post | |
Background: Existing user is logged in | |
Given my username is "dsci",my password is "123456" and my email is "[email protected]" | |
When I visit the ritter start page | |
Then I should see the login form | |
When I fill in "email" with "dsci" |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. | |
# Every Vagrant virtual environment requires a box to build off of. | |
config.vm.box = "centos-6" |