This file contains 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
// Replaces division operations in closure function with a MATISSE primitive that performs integer division | |
sequencedef closure_idivide | |
select function{"closure"} end | |
apply | |
call replace_operator("/", "N", "2", "matisse_idivide"); | |
// Implicit update here | |
call replace_operator("/", "ii", "2", "matisse_idivide"); | |
end | |
end |
This file contains 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
Text: aã~ | |
Keys pressed: `a`, `~`, `a`, `~`, space | |
PreviewTextInputStart: a | |
TextInputStart: a | |
PreviewTextInput: a | |
TextInput: a | |
PreviewTextInputStart: ~ | |
TextInputStart: ~ | |
PreviewTextInputUpdate: ã |
This file contains 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
Text: aã~ | |
Keys pressed: `a`, `~`, `a`, `~`, space | |
PreviewTextInputStart: a | |
TextInputStart: a | |
PreviewTextInput: a | |
PreviewTextInputStart: ~ | |
TextInputStart: ~ | |
PreviewTextInputUpdate: ã | |
TextInputUpdate: ã |
This file contains 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
package helloworld | |
import scala.collection.immutable.LinearSeq | |
import scala.annotation.tailrec | |
import scala.util.Random | |
import scala.collection.mutable.MutableList | |
import scala.collection.immutable.Queue | |
object HelloWorld { | |
This file contains 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
Tanto a resposta do Gabriel Santos como a do mgibsonbr estão erradas (embora funcionem bem nalguns casos limitados que acabam por ser os mais comuns). | |
**Porque motivo estão errados?** | |
Unicode. Nos tempos ancestrais (ASCII), cada caracter ocupava um espaço constante, mas isso já não é verdade. | |
O JavaScript usa o sistema UTF-16, em que aquilo a que a maioria das pessoas associa a caracter é dividido em "code points", que por sua vez são divididos em "code units". | |
Um caracter pode ter um ou mais code point e cada code point pode ter um ou dois code units. O primeiro é o code point "principal" e os seguintes (opcionais) são modificadores que acrescentam algo ao caracter (exemplo: acentos). | |
Quando um code point ocupa dois code units em UTF-16, diz-se que o primeiro é o "High Surrogate" (ou lead surrogate) e o segundo é o "Low Surrogate" (ou trail surrogate). |
This file contains 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 ObservableDataPropertyAttribute : Attribute | |
{ | |
} | |
class DependsOnAttribute : Attribute | |
{ | |
public string Dependency { get; private set; } | |
public DependsOnAttribute(string dependency) | |
{ |
This file contains 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
//Without events | |
class Person { | |
public string Name { get; set; } | |
} | |
//With events | |
class Person : INotifyPropertyChanged { | |
public event PropertyChangedEventHandler PropertyChanged; | |
string name; |
This file contains 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
Starting new resolver for foo.ContinueWith (precedent => { | |
Console.WriteLine (precedent.IsFaulted); | |
}) | |
ResolveResult is [CSharpInvocationResolveResult [Method System.Threading.Tasks.Task.ContinueWith(continuationAction:System.Action`2[[System.Threading.Tasks.Task],[System.Object]], state:System.Object):System.Threading.Tasks.Task]] |