System directories
Method | Result |
---|---|
Environment.getDataDirectory() | /data |
Environment.getDownloadCacheDirectory() | /cache |
Environment.getRootDirectory() | /system |
External storage directories
var http = require('http'), | |
fileSystem = require('fs'), | |
path = require('path') | |
util = require('util'); | |
http.createServer(function(request, response) { | |
var filePath = 'path_to_file.mp3'; | |
var stat = fileSystem.statSync(filePath); | |
response.writeHead(200, { |
<? | |
if ($_REQUEST['action']=="add"){ | |
$userfile = $HTTP_POST_FILES['photo']['tmp_name']; | |
$userfile_name = $HTTP_POST_FILES['photo']['name']; | |
$userfile_size = $HTTP_POST_FILES['photo']['size']; | |
$userfile_type = $HTTP_POST_FILES['photo']['type']; | |
///////////////////////// | |
//GET-DECLARE DIMENSIONS // |
System directories
Method | Result |
---|---|
Environment.getDataDirectory() | /data |
Environment.getDownloadCacheDirectory() | /cache |
Environment.getRootDirectory() | /system |
External storage directories
///////////////////////////// | |
// NodeJS Server | |
///////////////////////////// | |
var express = require('express'); | |
var app = express(); | |
var http = require('http').Server(app); | |
var io = require('socket.io')(http); | |
var ss = require('socket.io-stream'); | |
var path = require('path'); |
class Gmail { | |
private $mail; | |
private $email; | |
private $pass; | |
public function __construct($email, $pass){ | |
$this->email = $email; | |
$this->pass = $pass; | |
} |
package com.ogaclejapan.myapplication; | |
import com.ogaclejapan.smarttablayout.SmartTabLayout; | |
import com.ogaclejapan.smarttablayout.utils.v4.FragmentPagerItem; | |
import com.ogaclejapan.smarttablayout.utils.v4.FragmentPagerItemAdapter; | |
import com.ogaclejapan.smarttablayout.utils.v4.FragmentPagerItems; | |
import android.os.Bundle; | |
import android.support.v4.view.ViewPager; | |
import android.support.v7.app.ActionBarActivity; |
/* | |
* rem.js | |
* v0.1.1 | |
* fixed 2015-3-12 | |
*/ | |
(function (win){ | |
var doc = win.document, | |
html = doc.documentElement, | |
option = html.getAttribute('data-use-rem'); | |
<?php | |
/* | |
* Mysql database class - only one connection alowed | |
*/ | |
<?php | |
class DB { | |
private $connection; | |
private static $_instance; |
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" | |
android:roundIcon="@mipmap/ic_launcher_round" | |
android:supportsRtl="true" | |
android:theme="@style/AppTheme" | |
android:networkSecurityConfig="@xml/network_security_config"> |
Create new keystore.jks file with comand line (not android studio build menu)
Linux: keytool -genkeypair -alias upload -keyalg RSA -keysize 2048 -validity 9125 -keystore keystore.jks
Windows: "C:\Program Files\Android\Android Studio\jre\bin\keytool.exe" -genkeypair -alias upload -keyalg RSA -keysize 2048 -validity 9125 -keystore "C:\keystore_new.jks"
Generate a .pem file from new keystore