create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
private class PathFileObserver extends FileObserver{ | |
static final String TAG="FILEOBSERVER"; | |
/** | |
* should be end with File.separator | |
*/ | |
String rootPath; | |
static final int mask = (FileObserver.CREATE | | |
FileObserver.DELETE | | |
FileObserver.DELETE_SELF | | |
FileObserver.MODIFY | |
import android.content.Context; | |
import android.support.v7.widget.Toolbar; | |
import android.text.TextUtils; | |
import android.util.AttributeSet; | |
import android.widget.TextView; | |
import java.lang.reflect.Field; | |
public class MarqueeToolbar extends Toolbar { |
<?php | |
include("/var/www/vhosts/xxxxxcom/httpdocs/PHPUtils/dbConfig.php"); | |
include("/var/www/vhosts/xxxxxcom/httpdocs/PHPUtils/DButils.php"); | |
// verifies receipt from iOS in-app purchase | |
// returns: | |
// 0 - if params missing | |
// 1 - if receipt is valid | |
// 2 - if invalid receipt, or invalid response from verification server | |
// or bundle/in-app IDs are incorrect |
Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.
You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.
/** | |
* Custom Scroll listener for RecyclerView. | |
* Based on implementation https://gist.github.com/ssinss/e06f12ef66c51252563e | |
*/ | |
public abstract class EndlessRecyclerOnScrollListener extends RecyclerView.OnScrollListener { | |
public static String TAG = "EndlessScrollListener"; | |
private int previousTotal = 0; // The total number of items in the dataset after the last load | |
private boolean loading = true; // True if we are still waiting for the last set of data to load. | |
private int visibleThreshold = 5; // The minimum amount of items to have below your current scroll position before loading more. |
System directories
Method | Result |
---|---|
Environment.getDataDirectory() | /data |
Environment.getDownloadCacheDirectory() | /cache |
Environment.getRootDirectory() | /system |
External storage directories
/* | |
* Copyright (c) 2017 Emil Davtyan | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining | |
* a copy of this software and associated documentation files (the | |
* "Software"), to deal in the Software without restriction, including | |
* without limitation the rights to use, copy, modify, merge, publish, | |
* distribute, sublicense, and/or sell copies of the Software, and to | |
* permit persons to whom the Software is furnished to do so, subject to | |
* the following conditions: |
/* | |
* Copyright 2014 Chris Banes | |
* | |
* 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 | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
# make sure to replace `<hash>` with your gist's hash
git clone https://gist.github.com/<hash>.git # with https
git clone git@gist.github.com:<hash>.git # or with ssh