| // Follow the instructions here: http://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/ | |
| // | |
| // That'll get you 80% of the way there. Unfortunately, you'll run into CORS and MIMETYPE errors, so make the following changes. | |
| // ============================================================ | |
| // Your clientside script should actually look like this (jquery example): | |
| // ============================================================ | |
| var data = {email: "email@address.com"} |
Of course the Web Audio API is meant for synthesizing and processing audio data. It is tailored for that use case. But at least in our digital world audio data is just a series of numbers, which are typically somewhere between +1 and -1. So why can't we use the Web Audio API for general computations?
Almost a year ago I had the pleasure to give a talk at the Web Audio Conference in Atlanta. The conference featured a lot of great talks, which I really appreciated as an attendee. However, as a speaker it was tough to reduce my own talk until it was short enough to fit into the schedule. I had the feeling that I had to rush through my slides. Since then I planned to write down my findings in a more detailed way, but I never got around to it. Luckily I was asked to repeat my talk at our local Web Audio Meetup here in
| const x = 'abc'; // Coerces to true in a boolean context | |
| const y = null; // Coerces to false in a boolean context | |
| // "!" Creates a boolean context and returns the opposite. | |
| const a = !x; // Value a is opposite of x, false. | |
| const b = !y; // Value a is opposite of y, true. | |
| if (a) { | |
| // NOT executed. | |
| } | |
| if (b) { | |
| // Executed. |
| <?php | |
| $host = 'localhost'; | |
| $user = 'root'; | |
| $password = '123456'; | |
| $dbname = 'pdoposts'; | |
| // Set DSN | |
| $dsn = 'mysql:host='. $host .';dbname='. $dbname; | |
| // Create a PDO instance |
| <?php | |
| /* | |
| * PDO DATABASE CLASS | |
| * Connects Database Using PDO | |
| * Creates Prepeared Statements | |
| * Binds params to values | |
| * Returns rows and results | |
| */ | |
| class Database { | |
| private $host = DB_HOST; |
| /** | |
| * WPGulp Configuration File | |
| * | |
| * 1. Edit the variables as per your project requirements. | |
| * 2. In paths you can add <<glob or array of globs>>. | |
| * | |
| * @package WPGulp | |
| */ | |
| module.exports = { |
Uploading data using Axios and Mongoose can be hard at first. But when you really understand what you are doing you will be glad you are not reaching out to the API each time someone loads your webpage.
- Make sure you have nodejs and NPM installed, NPM comes with nodejs
-
npm install axios mongoose
| function uploadPdfOcr() { | |
| authorize(); | |
| var key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; // <-- developer key | |
| var file = UrlFetchApp.fetch("http://somewhere.com/path/file.pdf").getBlob(); | |
| var metadata = { title: file.getName() } | |
| var params = {method:"post", | |
| oAuthServiceName: "drive", | |
| oAuthUseToken: "always", | |
| contentType: "application/pdf", | |
| contentLength: file.getBytes().length, |
