Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
static BOOL isRunningTests(void) __attribute__((const)); | |
- (BOOL)application:(UIApplication *)application | |
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
if (isRunningTests()) { | |
return YES; | |
} | |
// |
# Usage: | |
# 1. Drop this file into lib/capistrano/submodule_strategy.rb | |
# 2. Add the following to your Capfile: | |
# require 'capistrano/git' | |
# require './lib/capistrano/submodule_strategy' | |
# 3. Add the following to your config/deploy.rb | |
# set :git_strategy, SubmoduleStrategy | |
module SubmoduleStrategy | |
# do all the things a normal capistrano git session would do |
//First of all you need to modify your Mapbox SDK with the this commit: | |
//https://github.com/MrZoidberg/mapbox-ios-sdk/commit/2865d642f163b15f939a906337de4f53bd17a7b6 | |
//Otherwise you will have random crashes during background rendering of maps | |
//We need semaphore to limit the number of concurrent threads | |
//Place it one per view | |
dispatch_semaphore_t _concurrencyLimitingSemaphore = dispatch_semaphore_create(3); | |
//Also we need cache to store snapshots of the map | |
NSCache *_imageCache = [NSCache new]; |
The process starts by creating the CSR and the private key:
openssl req -nodes -newkey rsa:2048 -nodes -keyout dotmarks.net.key -out dotmarks.net.csr -subj "/C=GB/ST=London/L=London/O=dotmarks/OU=IT/CN=dotmarks.net"
Generates
RecyclerView
does not have an OnItemClickListener like it's predecessor, ListView
. However, detecting item clicks is pretty simple.
Set an OnClickListener
in your ViewHolder
creation:
private class MyAdapter extends RecyclerView.Adapter<MyAdapter.ViewHolder> {
public static class ViewHolder extends RecyclerView.ViewHolder
Not all random values are created equal - for security-related code, you need a specific kind of random value.
A summary of this article, if you don't want to read the entire thing:
Math.random()
. There are extremely few cases where Math.random()
is the right answer. Don't use it, unless you've read this entire article, and determined that it's necessary for your case.crypto.getRandomBytes
directly. While it's a CSPRNG, it's easy to bias the result when 'transforming' it, such that the output becomes more predictable.uuid
, specifically the uuid.v4()
method. Avoid node-uuid
- it's not the same package, and doesn't produce reliably secure random values.random-number-csprng
.You should seriously consider reading the entire article, though - it's
package com.lalamove.core.view; | |
import android.content.Context; | |
import android.support.annotation.Nullable; | |
import android.support.v7.widget.RecyclerView; | |
import android.util.AttributeSet; | |
import android.view.inputmethod.InputMethodManager; | |
/** | |
* Implementation of {@link RecyclerView} that will dismiss keyboard when scrolling. |
const path = require('path') | |
const sharedBlacklist = [] | |
const platformBlacklists = { | |
ios: [ | |
'.web.js', | |
'.macos.js', | |
/node_modules\/react-native-web\/.*/, | |
/node_modules\/react-native-windows\/.*/, |
diff --git a/build.gradle b/build.gradle | |
index 29290bc..fb8d9b4 100644 | |
--- a/build.gradle | |
+++ b/build.gradle | |
@@ -1,6 +1,19 @@ | |
buildscript { | |
- ext.kotlin_version = '1.2.31' | |
- ext.arch_components_version = '1.1.1' | |
+ ext { | |
+ gradlePluginVersion = '3.0.1' |