Tutorial by Examples: ee

Prepare helloworld.go (find below) package main import "fmt" func main(){ fmt.Println("hello world") } Run GOOS=linux GOARCH=arm go build helloworld.go Copy generated helloworld (arm executable) file to your target machine.
To add visual feedback to the cursor to show when the cursor is clicking or fusing, we can use the animation system. When the cursor intersects the entity, it will emit an event, and the animation system will pick up event with the begin attribute: <a-entity cursor="fuse: true; fuseTimeout:...
A convenient way to package your application is to write the scripts in your packages.json file and run them with the npm run command { "name": "AppName", "productName": "AppName", "version": "0.1.1", "main": ...
ImageMagick includes a number of command-line utilities for manipulating images. Here we will use compare command-line tool. compare tool is very useful. Suppose you want to test (e.g. layout, color, icons etc.) the difference between your expected design UI HTML file with actual result of JSP...
#include <threads.h> #include <stdio.h> int run(void *arg) { printf("Hello world of C11 threads."); return 0; } int main(int argc, const char *argv[]) { thrd_t thread; int result; thrd_create(&thread, run, NULL); thrd_join(&...
You can use TO_CHAR( date_value, 'D' ) to get the day-of-week. However, this is dependent on the NLS_TERRITORY session parameter: ALTER SESSION SET NLS_TERRITORY = 'AMERICA'; -- First day of week is Sunday SELECT TO_CHAR( DATE '1970-01-01', 'D' ) FROM DUAL; Outputs 5 ALTER SESSION SET ...
BottomSheet DialogFragment opens up in STATE_COLLAPSED by default. Which can be forced to open to STATE_EXPANDEDand take up the full device screen with help of the following code template. @NonNull @Override public Dialog onCreateDialog(Bundle savedInstanceState) { BottomSheetDialog dialog = ...
require 'date' date1 = Date.parse "01/06/2016" date2 = Date.parse "05/06/2016" p "Period #{date1.strftime("%d/%m/%Y")} to #{date2.strftime("%d/%m/%Y")}" (date1..date2).each do |date| p date.strftime("%d/%m/%Y") end # "...
Parent element html <child-component [isSelected]="inputPropValue"></child-component> Parent element ts export class AppComponent { inputPropValue: true } Child component ts: export class ChildComponent { @Input() inputPropValue = false; } Child compone...
I wrote a simple C code foo.c int main() { int i = 0; int j = 0; for (i = 0; i < 5; i++) { j = i + 1; } return 0; } When compiled with -O0 i.e. by disabling all compiler optimizations $ gcc -o foo.S foo.c -O0 -S I got this: .file "foo.c&...
The window resize events can fire in response to the movement of the user's input device. When you resize a canvas it is automatically cleared and you are forced to re-render the content. For animations you do this every frame via the main loop function called by requestAnimationFrame which does its...
By default tee command overwrites the file. You can instruct tee to append to the file using the –a option as shown below. $ ls | tee –a file
Option Explicit 'GetSystemMetrics32 info: http://msdn.microsoft.com/en-us/library/ms724385(VS.85).aspx #If Win64 Then Private Declare PtrSafe Function GetSystemMetrics32 Lib "User32" Alias "GetSystemMetrics" (ByVal nIndex As Long) As Long #ElseIf Win32 Then Private...
To specify Contact and Address info for an Employee, you should always invoke Select() method on the Contact and Address data views prior to assigning any field values. It is also recommended to assign the result of Select() method to the Contact and Address data views' Current property to guarantee...
This widget is used to display items with hierarchy. For instance, windows explorer can be reproduced in this way. Some nice tables can be also done using treeview widget. Create the widget tree=ttk.Treeview(master) Definition of the columns You can define how many columns, their width and min...
import asyncio async def hello_world(): print('Hello World') loop = asyncio.get_event_loop() loop.run_until_complete(hello_world()) loop.close()
By taking Treeview: Basic example, it can be shown how to customize a basic treeview. In this case, we create a style "mystyle.Treeview" with the following code (see the comments to understand what each line does): style = ttk.Style() style.configure("mystyle.Treeview", highli...
The following route has a simple goal : First, it checks if and ImportDocumentProcess object is present in the database and adds it as an exchange header Then, it adds an ImportDocumentTraitement (Which is linked to the previous ImportDocumentProcess) in the database Here is the code of this ...
<?xml version="1.0"?> <openerp> <data noupdate="1"> <function model="*model_name*" name="_configure_sales"/> </data> </openerp> This simple xml file is calls _configure_sales function from model_name ...
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...

Page 52 of 54