Сниппеты
Вот некоторые заготовки кода для Haxe :
- _flash_benchmarks
- [flash] Only Once EventListener
- Using Lambda for array map() and filter()
- Array: Sort an array of strings
- Color Converter
- commaFormat
- conditional if shorthand, check if argument is null
- Countdown max...min IntIter
- Embedding data using metadata
- Database: Insert a blob
- deepTrace
- Email Validation (cross platform)
- fast_fourier_transform
- Using the built-in Flash trace method
- generic factory method
- Get Target
- Getting Started With Sqlite
- groupByHash
- Hello World
- commaFormat#2, hiscore
- infinitegrid
- Complex Initialization of static properties
- Equation of a straight line
- memoize
- method_missing (like in ruby), catch all for methods
- Minimax Algorithm for Games
- Newton's Method
- Newton's Square Root Method
- numericbase
- Point Manipulation
- Quicksort
- Safe remove
- selective_trace
- Size with a Hash
- How big is my StringBuf?
- Iterating over Floats with a specific step
- StopWatch
- stringWithFormat
- SWFProfiler
- URI Parser
- [flash] Elegant Way to use Weak Listeners
- Write text file with BOM
Чтобы создать новый сниппет, перейдите на страницу /doc/snip/название
и нажмите Create Page
, чтобы создать новый сниппет. Вам может понадобиться сначала зарегистрировать Wiki-аккаунт. Для подсветки синтаксиса, поместите ваш код между <code haxe
> and </code>
. Сниппеты должны быть очень маленькими и краткими. Неплохо было бы внизу добавить объяснение, что ваш код делает.
version #10123, modified 2011-02-08 13:52:02 by Scythian