install termux from F-Droid.
apt update
function convertMiliseconds(miliseconds, format) { | |
var days, hours, minutes, seconds, total_hours, total_minutes, total_seconds; | |
total_seconds = parseInt(Math.floor(miliseconds / 1000)); | |
total_minutes = parseInt(Math.floor(total_seconds / 60)); | |
total_hours = parseInt(Math.floor(total_minutes / 60)); | |
days = parseInt(Math.floor(total_hours / 24)); | |
seconds = parseInt(total_seconds % 60); | |
minutes = parseInt(total_minutes % 60); |
/*! | |
* Bootswatch v4.3.1 | |
* Homepage: https://bootswatch.com | |
* Copyright 2012-2019 Thomas Park | |
* Licensed under MIT | |
* Based on Bootstrap | |
*//*! | |
* Bootstrap v4.3.1 (https://getbootstrap.com/) | |
* Copyright 2011-2019 The Bootstrap Authors | |
* Copyright 2011-2019 Twitter, Inc. |
ssss |
/** | |
* covert canvas to image | |
* and save the image file | |
*/ | |
var Canvas2Image = function() { | |
// check if support sth. | |
var $support = function() { | |
var canvas = document.createElement('canvas'), |
<?php | |
file_put_contents( 'progress.txt', '' ); | |
$targetFile = fopen( 'testfile.iso', 'w' ); | |
$ch = curl_init( 'http://ftp.free.org/mirrors/releases.ubuntu-fr.org/11.04/ubuntu-11.04-desktop-i386-fr.iso' ); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt( $ch, CURLOPT_NOPROGRESS, false ); | |
curl_setopt( $ch, CURLOPT_PROGRESSFUNCTION, 'progressCallback' ); | |
curl_setopt( $ch, CURLOPT_FILE, $targetFile ); |
<?php | |
//output buffer | |
ob_start(); | |
//create javascript progress bar | |
echo '<html><head> | |
<script type="text/javascript"> | |
function updateProgress(percentage) { | |
document.getElementById(\'progress\').value = percentage; | |
} |
<?php | |
set_time_limit(0); | |
ignore_user_abort(true); | |
$url = "http://web.shit/backup.zip"; | |
$ch = curl_init($url); | |
$to_file = 'web.zip'; | |
$opt = array(); | |
if(is_file($to_file)) | |
{ |
package com.amitaymolko.network; | |
import java.util.HashMap; | |
/** | |
* Created by amitaymolko on 2/16/16. | |
*/ | |
public class HttpRequest { |