Instead of the verbose setOnClickListener:
RxView.clicks(submitButton).subscribe(o -> log("submit button clicked!"));Observable
.just(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)| <!-- put this to IDEA keymaps config folder. For v13 it is <userdir>\.IntelliJIdea13\config\keymaps\ --> | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <keymap version="1" name="Mac OS X 10.5+ Windows Ctrl" parent="Mac OS X 10.5+"> | |
| <action id="$Copy"> | |
| <keyboard-shortcut first-keystroke="meta C" /> | |
| <keyboard-shortcut first-keystroke="meta INSERT" /> | |
| <keyboard-shortcut first-keystroke="control C" /> | |
| <keyboard-shortcut first-keystroke="control INSERT" /> | |
| </action> | |
| <action id="$Cut"> |
| @Dao | |
| abstract class BaseDao<T> { | |
| @Insert(onConflict = OnConflictStrategy.IGNORE) | |
| abstract fun insert(obj: T): Long | |
| @Insert(onConflict = OnConflictStrategy.IGNORE) | |
| abstract fun insert(obj: List<T>): List<Long> | |
| @Update | |
| abstract fun update(obj: T) |
| {"lastModified":1512705802483,"labels":[{"id":1510762778349,"name":"slides","repos":[2553927]},{"id":1510762785575,"name":"tool","repos":[2553927,108359461,102151460]},{"id":1510763489339,"name":"gfw","repos":[14971308,4086616]},{"id":1510763613176,"name":"iOS","repos":[2626208]},{"id":1510763800892,"name":"android","repos":[12924500,15653276,21787149,26710221,17197323,14393731,5279091,91065402,103920670,106181098,23092563,24186761,97011177,54115435,95357887,9234481]},{"id":1510764657487,"name":"C++","repos":[8730628]},{"id":1510764666333,"name":"book","repos":[8730628,11600244]},{"id":1510765324959,"name":"node.js","repos":[51840802,103633984]},{"id":1510765338471,"name":"font end","repos":[51840802,108373398,106344904,72493907,38460192,9185792,2096579]},{"id":1510765382754,"name":"wxxcx","repos":[108373398]},{"id":1510765445933,"name":"kotlin","repos":[24186761,75286010]}]} |
| #!/usr/bin/env bash | |
| # 用 repo 的 "remote.origin.url" 来匹配user配置 | |
| git_remotes[0]="github" | |
| git_remotes[1]="gitlab" | |
| # user info配置 | |
| local_id_0[0]="github user" | |
| local_id_0[1]="github email" | |
| // jQuery plugin to prevent double click | |
| jQuery.fn.preventDoubleClick = function() { | |
| $(this).on('click', function(e){ | |
| var $el = $(this); | |
| if($el.data('clicked')){ | |
| // Previously clicked, stop actions | |
| e.preventDefault(); | |
| e.stopPropagation(); | |
| }else{ | |
| // Mark to ignore next click |
| @Query("SELECT * FROM hamster WHERE name LIKE '%' || :arg0 || '%'") | |
| fun loadHamsters(search: String?): Flowable<List<Hamster>> |
| public void setMaxLengthFilter(EditText editText, int maxLength) { | |
| InputFilter curFilters[]; | |
| InputFilter.LengthFilter lengthFilter; | |
| int i; | |
| lengthFilter = new InputFilter.LengthFilter(maxLength); | |
| curFilters = editText.getFilters(); | |
| if (curFilters != null) { | |
| for (i = 0; i < curFilters.length; i++) { | |
| if (curFilters[i] instanceof InputFilter.LengthFilter) { | |
| curFilters[i] = lengthFilter; |
| import Foundation | |
| import objc | |
| import AppKit | |
| import sys | |
| NSUserNotification = objc.lookUpClass('NSUserNotification') | |
| NSUserNotificationCenter = objc.lookUpClass('NSUserNotificationCenter') | |
| def notify(title, subtitle, info_text, delay=0, sound=False, userInfo={}): | |
| notification = NSUserNotification.alloc().init() |
| /** | |
| * Copyright 2016 Harish Sridharan | |
| * <p/> | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * <p/> | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * <p/> | |
| * Unless required by applicable law or agreed to in writing, software |