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 static List<string> GetAlphabet() | |
| { | |
| List<string> alphabet = new List<string>(); | |
| for (int intCount = 65; intCount <= 90; intCount++) | |
| alphabet.Add(((char)intCount).ToString()); | |
| return alphabet; | |
| } |
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
| #Einfach am Anfang eines Controllers hinzufügen und | |
| #dann kann auf die Methoden nur Zugriffen werden, wenn | |
| #man eingeloggt sind, funktioniert natürlich auch mit :only & :except | |
| before_filter :authenticate_user! | |
| #Gibt zurück ob jemand eingeloggt ist | |
| user_signed_in? | |
| #Gibt den aktuellen eingeloggten Benutzer zurück | |
| current_user |
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
| new_user_session GET /users/sign_in(.:format) {:action=>"new", :controller=>"devise/sessions"} | |
| user_session POST /users/sign_in(.:format) {:action=>"create", :controller=>"devise/sessions"} | |
| destroy_user_session GET /users/sign_out(.:format) {:action=>"destroy", :controller=>"devise/sessions"} | |
| user_password POST /users/password(.:format) {:action=>"create", :controller=>"devise/passwords"} | |
| new_user_password GET /users/password/new(.:format) {:action=>"new", :controller=>"devise/passwords"} | |
| edit_user_password GET /users/password/edit(.:format) {:action=>"edit", :controller=>"devise/passwords"} | |
| PUT /users/password(.:format) {:action=>"update", :controller=>"devise/passwords"} | |
| user_registration POST /users(.:format) {:action=>"create", :controller=>"devise/registrations"} | |
| new_user_registration GET /users/sign_up(.:format) {:action=>"new", :controller=>"devise/registrations"} | |
| edit_us |
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
| //View erstellen | |
| UIView *bgColorView = [[UIView alloc] init]; | |
| //View anpassen, wie er aussehen soll | |
| [bgColorView setBackgroundColor:[UIColor orangeColor]]; | |
| //Den View als SelectBackgroundView der Cell setzten | |
| [cell setSelectedBackgroundView:bgColorView]; | |
| //View wieder freigeben |
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
| //View erstellen | |
| UIView view = new UIView(); | |
| //View anpassen, wie er aussehen soll | |
| view.BackgroundColor = UIColor.Orange; | |
| //Den View als SelectBackgroundView der Cell setzten | |
| cell.SelectedBackgroundView = view; |
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 (StreamWriter writer = new StreamWriter("Meine Txt.txt")) | |
| { | |
| writer.Write("Etwas schreiben "); | |
| writer.WriteLine("Etwas in einer neuen Zeile schreiben"); | |
| writer.WriteLine("Noch etwas in einer neuen Zeile schreiben"); | |
| } |
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
| Factory.sequence :email do |n| | |
| "email#{n}@factory.com" | |
| end | |
| Factory.define :user do |a| | |
| a.email { Factory.next(:email)} | |
| a.password "1234567890" | |
| 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
| Failure/Error: @account = Factory(:account) | |
| ActiveRecord::RecordInvalid: | |
| Validation failed: Name already used, Name already used |
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
| before(:each) do | |
| Account.destroy_all | |
| @account = Factory(:account) | |
| end |