Skip to content

Instantly share code, notes, and snippets.

View thenixan's full-sized avatar
🐢
On vacation

Ilya Nixan thenixan

🐢
On vacation
View GitHub Profile
public int random() {
// We've rolled the dice
return 4;
}
xmlns:WP7=”clr-namespace:Main.WP7;assembly=Main.WP7″
public class Attribute {
private final String mAttributeName;
private final Method mSetter;
public Attribute(String attributeName, Method setter) {
mAttributeName = attributeName;
mSetter = setter;
}
Attribute attribute = new Attribute("name", Torrent.class.getMethod("setName", String.class));
@thenixan
thenixan / fields.xml
Created March 6, 2014 07:07
Field XML structure
<elements id="2">
<enumerationField name="account_type" title="Тип счета">
<values>
<value title="Номер счета" value="1" />
<value title="Номер карты" value="2" />
</values>
<dependancy>
<targets>
<target name="account_type" regularExpression="^1$" />
</targets>
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="org.nixan.sandboxapp.MainActivity">
<EditText
package org.nixan.sandboxapp
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import android.widget.Button
import android.widget.EditText
import android.widget.Toast
import ru.nixan.regexpformatter.RegExpFormatter
class MainActivity : AppCompatActivity() {
...
dependencies {
compile 'com.github.thenixan:android-regexp-formatter:v0.0.+'
}
...
...
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
...
(0..10)
.asSequence()
.map {
println(it)
it
}
.filter { it % 2 == 0 }
.map { it + 10 }
.forEach { println(it) }