Tutorial by Examples: ed

We will add a file on Google Drive. We will use the createFile() method of a Drive object to create file programmatically on Google Drive. In this example we are adding a new text file in the user’s root folder. When a file is added, we need to specify the initial set of metadata, file contents, and...
Tastypie is a reusable app (that is, it relies only on its own code and focuses on providing just a REST-style API) and is suitable for providing an API to any application without having to modify the sources of that app. Not everyone’s needs are the same, so Tastypie goes out of its way to provide...
app.store.ts import {InjectionToken} from '@angular/core'; import {createStore, Store, compose, StoreEnhancer} from 'redux'; import {AppState, default as reducer} from "../app.reducer"; export const AppStore = new InjectionToken('App.store'); const devtools: ...
animated_android_dialog_box.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:padding="16dp"> &...
function REReplaceCallback(re,str,callback) { /* Thanks to Ben Nadel "Learning ColdFusion 8: REMatch() For Regular Expression Matching" from 2007-06-13 https://www.bennadel.com/blog/769-learning-coldfusion-8-rematch-for-regular-expression-matching.h...
store the cookie with three parts. function onLogin($user) { $token = GenerateRandomToken(); // generate a token, should be 128 - 256 bit storeTokenForUser($user, $token); $cookie = $user . ':' . $token; $mac = hash_hmac('sha256', $cookie, SECRET_KEY); $cookie .= ':' . $mac...
A comment starts with a forward slash followed immediately by an asterisk (/*), and ends as soon as an asterisk immediately followed by a forward slash (*/) is encountered. Everything in between these character combinations is a comment and is treated as a blank (basically ignored) by the compiler. ...
C99 C99 introduced the use of C++-style single-line comments. This type of comment starts with two forward slashes and runs to the end of a line: // this is a comment This type of comment does not allow multi-line comments, though it is possible to make a comment block by adding several single ...
If yoi have nested array, the following can be done new Vue({ el: '#app', data:{ myArr : [ ['apple', 'banana'], ['grapes', 'orange'] ] }, methods:{ changeArrayItem: function(){ this.$set(this.myArr[1], 1, 'strawbe...
To list all the packages installed in ubuntu, type below command $ apt list --installed Output will show all the installed packages. Listing... Done accountsservice/trusty-updates,now 0.6.35-0ubuntu7.3 i386 [installed] acl/trusty,now 2.2.52-1 i386 [installed,automatic] acpid/trusty,...
Some of the log4net appenders are buffered appenders. These appenders will only log when a certain amount of messages are logged. Some samples are the SmtpAppender, RemotingAppender or the AdoNetAppender. These appenders have a setting BufferSize: <bufferSize value="100" /> This ...
If you do not see any logging, you can check if Configure() is called in your application. The easiest way is to add it as an attribute to your assembly: [assembly: log4net.Config.XmlConfigurator(Watch = true)] Then you do not have to add log4net.Config.XmlConfigurator.Configure() anywhere in y...
PagedData is an object, returned by the Search.runPaged(options) method. It works exactly as the UI searches do. PagedData object contains 2 important properties, that you can see on the right side of results header in search results page in Netsuite UI: count (the total number of the results) p...
For really huge search results, you can use dedicated Map/Reduce script. It is much more inconvenient, but sometimes unavoidable. And sometimes could be very handy. The trick here is, that in Get Input Data stage, you can provide to the NS engine not the actual data (i.e. script result), but just t...
PROGRAM zprogram MESSAGE-ID za. ... MESSAGE i000 WITH TEXT-i00. A message will display the text stored in the text symbol i00 to the user. Since the message type is i (as seen in i000), after the user exits the dialog box, program flow will continue from the point of the MESSAGE call. Although...
PROGRAM zprogram. ... MESSAGE i050(sabapdemos). It may be inconvenient to define a message class for the entire program, so it is possible to define the message class that the message comes from in the MESSAGE statement itself. This example will display message 050 from the message class sabapd...
There is a limitation in Acumatica's SOAP Contract-Based API allowing to download attachments only for a top-level entity. Any attempt to use the GetFiles() method to get the attachments of a detail entity will, unfortunately, result in the error "Entity without screen binding cannot be used as...
A bracket is considered to be any one of the following characters: (, ), {, }, [, or ]. Two brackets are considered to be a matched pair if the an opening bracket (i.e., (, [, or {) occurs to the left of a closing bracket (i.e., ), ], or }) of the exact same type. There are three types of matched p...
The same URl for different http methods acts differently. Below is a table depicting the same. HTTP VERBURLDESCRIPTIONGET/api/studentsReturns all studentsGET/api/students/5Returns details of Student Id =5POST/api/studentsAdd a new studentPUT/api/students/5Update student with Id=5DELETE/api/students...
<?php // if device exists, update timestamp $stmt = $mysqli->prepare("UPDATE new_devices SET nd_timestamp=? WHERE nd_deviceid=?"); $stmt->bind_param('ss', $now, $device); $stmt->execute(); //echo "Affected Rows: ".$stmt->affected_rows; // T...

Page 141 of 145