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)
| |
-- | |
-- 表的结构 `area` | |
-- | |
DROP TABLE IF EXISTS `area`; | |
CREATE TABLE IF NOT EXISTS `area` ( | |
`id` int(11) NOT NULL auto_increment, | |
`areaID` int(11) NOT NULL, | |
`area` varchar(20) character set gbk NOT NULL, |
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end | |
import android.app.Activity; | |
import android.app.Fragment; | |
import android.app.FragmentManager; | |
#parse("File Header.java") | |
public class ${NAME} extends Fragment { | |
private static final String FRAG_TAG = ${NAME}.class.getCanonicalName(); |
/** | |
* 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 |
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() |
// 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 |
<!-- 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"> |