run postgresql with systemctl
sudo pacman -S postgresql
find version & build from source
| var groupBy = function(data, key) { // `data` is an array of objects, `key` is the key (or property accessor) to group by | |
| // reduce runs this anonymous function on each element of `data` (the `item` parameter, | |
| // returning the `storage` parameter at the end | |
| return data.reduce(function(storage, item) { | |
| // get the first instance of the key by which we're grouping | |
| var group = item[key]; | |
| // set `storage` for this instance of group to the outer scope (if not empty) or initialize it | |
| storage[group] = storage[group] || []; | |
| #!/usr/local/bin/python3 | |
| ''' | |
| Convert a pkl file into json file | |
| ''' | |
| import sys | |
| import os | |
| import _pickle as pickle | |
| import json | |
| String[] countries = new String[]{"Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falklan |
| /** | |
| The following can replace the file in the Field Arrays example | |
| (https://github.com/erikras/redux-form/tree/master/examples/fieldArrays) to demonstrate this functionality. | |
| **/ | |
| import React from 'react' | |
| import { connect } from 'react-redux' | |
| import { Field, FieldArray, reduxForm, formValueSelector } from 'redux-form' | |
| import validate from './validate' |
| 'use strict'; | |
| import PushNotification from "react-native-push-notification"; | |
| let _pushNotificationToken = null; | |
| const _pushNotificationListeners = []; | |
| function init() { | |
| console.log("PushNotification init"); |
| { | |
| "ab":{ | |
| "name":"Abkhaz", | |
| "nativeName":"аҧсуа" | |
| }, | |
| "aa":{ | |
| "name":"Afar", | |
| "nativeName":"Afaraf" | |
| }, | |
| "af":{ |
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| { | |
| "AN":"Andaman and Nicobar Islands", | |
| "AP":"Andhra Pradesh", | |
| "AR":"Arunachal Pradesh", | |
| "AS":"Assam", | |
| "BR":"Bihar", | |
| "CG":"Chandigarh", | |
| "CH":"Chhattisgarh", | |
| "DN":"Dadra and Nagar Haveli", |
| var AWS = require('aws-sdk'), | |
| fs = require('fs'); | |
| // For dev purposes only | |
| AWS.config.update({ accessKeyId: '...', secretAccessKey: '...' }); | |
| // Read in the file, convert it to base64, store to S3 | |
| fs.readFile('del.txt', function (err, data) { | |
| if (err) { throw err; } |