sudo freebsd-update fetch install
sudo pkg install nginx
public static Observable<Response> getData() { | |
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build(); | |
StrictMode.setThreadPolicy(policy); | |
final OkHttpClient client = new OkHttpClient(); | |
final Request request = new Request.Builder() | |
.url("https://github.com/ar-android/panfic/raw/master/Panfic/gen/com/ocit/data.json") | |
.get() | |
.addHeader("cache-control", "no-cache") |
private void setCurrency(final EditText edt) { | |
edt.addTextChangedListener(new TextWatcher() { | |
private String current = ""; | |
@Override | |
public void onTextChanged(CharSequence s, int start, int before, | |
int count) { | |
} |
public Bitmap getThumbnail(Uri uri) throws FileNotFoundException, IOException { | |
InputStream input = this.getContentResolver().openInputStream(uri); | |
BitmapFactory.Options onlyBoundsOptions = new BitmapFactory.Options(); | |
onlyBoundsOptions.inJustDecodeBounds = true; | |
onlyBoundsOptions.inDither=true;//optional | |
onlyBoundsOptions.inPreferredConfig=Bitmap.Config.ARGB_8888;//optional | |
BitmapFactory.decodeStream(input, null, onlyBoundsOptions); | |
input.close(); |
package engine; | |
import org.lwjgl.glfw.GLFWErrorCallback; | |
import org.lwjgl.glfw.GLFWVidMode; | |
import org.lwjgl.opengl.GL; | |
import static org.lwjgl.glfw.GLFW.*; | |
import static org.lwjgl.opengl.GL11.GL_TRUE; | |
import static org.lwjgl.opengl.GL11.glClearColor; | |
import static org.lwjgl.system.MemoryUtil.NULL; |
// Java | |
recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() { | |
@Override | |
public void onScrolled(RecyclerView recyclerView, int dx, int dy) { | |
super.onScrolled(recyclerView, dx, dy); | |
if (dy > 0 && fab.getVisibility() == View.VISIBLE) { | |
fab.hide(); | |
} else if (dy < 0 && fab.getVisibility() != View.VISIBLE) { | |
fab.show(); |
<?php | |
class Download { | |
public function download($url, $name, $extensions){ | |
$path = __DIR__.'/download/' . $name . $extensions; | |
$file_path = fopen($path,'w'); | |
$client = new \GuzzleHttp\Client(); | |
$response = $client->get($url, ['save_to' => $file_path]); | |
return ['response_code'=>$response->getStatusCode(), 'name' => $name]; | |
} |
server { | |
listen 80; | |
server_name localhost; | |
root /Users/YOUR_USERNAME/Sites; | |
access_log /Library/Logs/default.access.log main; | |
location / { | |
include /usr/local/etc/nginx/conf.d/php-fpm; | |
} |
/** | |
* for send object between fragment, activity, service... | |
* REMEMBER: dispose if not in use to avoid leak memory | |
*/ | |
public class RxBus<T> { | |
private static final String PREFIX = "$^%)@"; | |
private static RxBus instance; | |
private PublishSubject<BusMessage<T>> subject = PublishSubject.create(); |
Kumpulan Alat Perang untuk para pemain Youtube gratis. Mari berusaha untuk mengurangi penggunaan produk bajakan semaksimal mungkin!
Kumpulan alat & bahan yang dieksekusi lewat desktop.
GIMP2 - https://gimp.org Untuk editing gambar, cover channel, foto profil, thumbnail & background cover (pengganti photoshop)
Inkspace - https://inkscape.org