This is the reference point. All the other options are based off this.
|-- app
| |-- controllers
| | |-- admin
public class Main extends Activity implements OnColorChangedListener { | |
private ColorPicker picker; | |
private SVBar svBar; | |
private OpacityBar opacityBar; | |
private Button button; | |
private TextView text; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>HMAC-SHA256 Example</title> | |
</head> | |
<body> | |
<script src="http://crypto.stanford.edu/sjcl/sjcl.js"></script> | |
<script> | |
var sharedSecret, query, signature, hmac, xhr; |
package com.example.android.view; | |
import android.graphics.Canvas; | |
import android.graphics.ColorFilter; | |
import android.graphics.Paint; | |
import android.graphics.Rect; | |
import android.graphics.RectF; | |
import android.graphics.drawable.Drawable; | |
import android.util.DisplayMetrics; |
While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.
Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.
public class RealPathUtil { | |
public static String getRealPath(Context context, Uri fileUri) { | |
String realPath; | |
// SDK < API11 | |
if (Build.VERSION.SDK_INT < 11) { | |
realPath = RealPathUtil.getRealPathFromURI_BelowAPI11(context, fileUri); | |
} | |
// SDK >= 11 && SDK < 19 | |
else if (Build.VERSION.SDK_INT < 19) { |
var express = require('express'); | |
var app = express(); | |
var options = {transport: ['websocket']}; | |
var io = require('socket.io')(options).listen(app.listen(process.env.PORT || 3000)); | |
app.get('/', function(req, res){ | |
res.sendfile('index.html'); | |
}); |
#!/usr/bin/env python3 | |
""" | |
License: MIT License | |
Copyright (c) 2023 Miel Donkers | |
Very simple HTTP server in python for logging requests | |
Usage:: | |
./server.py [<port>] | |
""" | |
from http.server import BaseHTTPRequestHandler, HTTPServer |