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 Cocoa | |
import Foundation | |
func isPrime(n: Int) -> Bool { | |
if n < 2 { | |
return false // are not primes | |
} | |
let limit = Int(sqrt(Float(n))) | |
if limit < 2 { | |
return true // 2, 3 are primes |
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
<code_scheme name="TYPO3"> | |
<option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="0" /> | |
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" /> | |
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" /> | |
<PHPCodeStyleSettings> | |
<option name="COMMA_AFTER_LAST_ARRAY_ELEMENT" value="true" /> | |
<option name="PHPDOC_BLANK_LINE_BEFORE_TAGS" value="true" /> | |
<option name="LOWER_CASE_BOOLEAN_CONST" value="true" /> | |
<option name="LOWER_CASE_NULL_CONST" value="true" /> | |
<option name="KEEP_RPAREN_AND_LBRACE_ON_ONE_LINE" value="true" /> |
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
private void OnDay_Load(object sender, EventArgs e) | |
{ | |
Beverage coffee = new Beverage(Sweetener.Sugar, Beverage.Milk); | |
coffee.Cream = true; | |
Cup mug = new Cup(); | |
mug.Fill(coffee); | |
Me.Consume(mug); | |
mug.Dispose(); | |
} |