🌅 How to convert SVG to PNG with JavaScript [video version available]
This article describes how to convert SVG to PNG with frontend JavaScript. The related resources are as follows.
Android Emulator (ARM64) on EC2 - 2022 | |
--------------------------------------- | |
1. Launch EC2 ARM based Instance (a1.metal / a1.2xlarge): (16 Gb RAM, 32Gb Disk), Ubuntu Server 22.04 LTS (HVM) ARM x64 | |
2. sudo apt update && sudo apt upgrade | |
3. sudo apt install default-jdk python3-pip repo python-is-python3 unzip libpcre2-dev adb | |
4. wget https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip | |
5. unzip commandlinetools-linux-8512546_latest.zip -d android-sdk | |
6. sudo mv android-sdk /opt/ | |
7. mkdir /opt/android-sdk/cmdline-tools/latest | |
8. mv /opt/android-sdk/cmdline-tools/* /opt/android-sdk/cmdline-tools/latest (ignore the error) |
My answer to: https://www.reddit.com/r/Clojure/comments/pcwypb/us_engineers_love_to_say_the_right_tool_for_the/ which asked to know when and at what is Clojure "the right tool for the job"?
My take is that in general, the right tool for the job actually doesn't matter that much when it comes to programming language.
There are only a few cases where the options of tools that can do a sufficiently good job at the task become limited.
That's why they are called: General-purpose programming languages, because they can be used generally for most use cases without issues.
Let's look at some of the dimensions that make a difference and what I think of Clojure for them:
Using the REST API to upload a file to WordPress is
quite simple. All you need is to send the file in a
POST
-Request to the wp/v2/media
route.
There are two ways of sending a file. The first method simply sends the file in the body of the request. The following PHP script shows the basic principle:
private static OkHttpClient getUnsafeOkHttpClient() { | |
try { | |
// Create a trust manager that does not validate certificate chains | |
final TrustManager[] trustAllCerts = new TrustManager[]{ | |
new X509TrustManager() { | |
@Override | |
public void checkClientTrusted(java.security.cert.X509Certificate[] chain, | |
String authType) throws CertificateException { | |
} |
import com.sun.mail.imap.IMAPMessage; | |
import java.util.Properties; | |
import javax.mail.Address; | |
import javax.mail.BodyPart; | |
import javax.mail.Flags; | |
import javax.mail.Folder; | |
import javax.mail.Message; | |
import javax.mail.Session; | |
import javax.mail.Store; | |
import javax.mail.internet.MimeMultipart; |
<?php | |
// your main aplication config file | |
// app/config/application.php | |
$config = [ | |
'application' => [ | |
'cacheDir' => __DIR__ . '/../../cache/', | |
'appDir' => __DIR__ . '/../', | |
'baseUri' => '/', | |
'basePath' => '/', | |
'publicUrl' => 'http://www.your_domain.com', |
DROP TABLE IF EXISTS time_dimension; | |
CREATE TABLE time_dimension ( | |
id INTEGER PRIMARY KEY, -- year*10000+month*100+day | |
db_date DATE NOT NULL, | |
year INTEGER NOT NULL, | |
month INTEGER NOT NULL, -- 1 to 12 | |
day INTEGER NOT NULL, -- 1 to 31 | |
quarter INTEGER NOT NULL, -- 1 to 4 | |
week INTEGER NOT NULL, -- 1 to 52/53 | |
day_name VARCHAR(9) NOT NULL, -- 'Monday', 'Tuesday'... |
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |