Tutorial by Examples: am

The camera primitive determines what the user sees. We can change the viewport by modifying the camera entity’s position and rotation. Note that by default, the camera origin will be at 0 1.6 0 in desktop mode and 0 0 0 in VR mode. Read about the camera.userHeight property. <a-scene> <...
To position the camera, set the position on a wrapper . Don’t set the position directly on the camera primitive because controls will quickly override the set position: <a-entity position="0 0 5"> <a-camera></a-camera> </a-entity>
If you have: val r = Random(233) infix inline operator fun Int.rem(block: () -> Unit) { if (r.nextInt(100) < this) block() } You can write the following DSL-like code: 20 % { println("The possibility you see this message is 20%") }
Let's assume we have a search results page that displays a user's search query back to them. The code below is an example of how this could be done in PHP: Results for "<?php echo $_GET['query'] ?>" For this to work, you would access the page with a URL like: https://yoursite.te...
In this example, a sine curve and a cosine curve are plotted in the same figure by superimposing the plots on top of each other. # Plotting tutorials in Python # Adding Multiple plots by superimposition # Good for plots sharing similar x, y limits # Using single plot command and legend import...
Similar to the previous example, here, a sine and a cosine curve are plotted on the same figure using separate plot commands. This is more Pythonic and can be used to get separate handles for each plot. # Plotting tutorials in Python # Adding Multiple plots by superimposition # Good for plots sha...
#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 define the layer parameters in the prototxt by using param_str. Once you've done it, here is an example on how you access these paremeters inside the layer class: def setup(self, bottom, top): params = eval(self.param_str) param1 = params["param1"] param2 = params.g...
{$DEFINE MyRuntimeCheck} // Comment out this directive when the check is no-longer required! // You can also put MyRuntimeCheck in the project defines instead. function MyRuntimeCheck: Boolean; {$IFNDEF MyRuntimeCheck} inline; {$ENDIF} begin result := TRU...
This example is a sample page that shows how to use Dojo to display a "Hello world" text inside <h1> tag. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Dojo sample</title> <script src="//ajax.go...
If you have: operator fun <R> String.invoke(block: () -> R) = { try { block.invoke() } catch (e: AssertException) { System.err.println("$this\n${e.message}") } } You can write the following DSL-like code: "it should return 2" { parse("1 + 1").bu...
Suppose you are creating a function that requires no arguments when it is called and you are faced with the dilemma of how you should define the parameter list in the function prototype and the function definition. You have the choice of keeping the parameter list empty for both prototype and d...
Array ( [0] => Array ( [id] => 13 [category_id] => 7 [name] => Leaving Of Liverpool [description] => Leaving Of Liverpool [price] => 1.00 [virtual] => 1 [active] =...
plugin.tx_news { settings { link { skipControllerAndAction = 1 } } } [globalVar = GP:tx_news_pi1|news > 0] config.defaultGetVars { tx_news_pi1 { controller=News action=detail } } [global] ...
REPORT z_template. CLASS lcl_program DEFINITION ABSTRACT FINAL. PUBLIC SECTION. CLASS-METHODS start_of_selection. CLASS-METHODS initialization. CLASS-METHODS end_of_selection. ENDCLASS. CLASS lcl_program IMPLEMENTATION. METHOD initialization. ENDMETHOD. ...
public final class Color { final private int red; final private int green; final private int blue; private void check(int red, int green, int blue) { if (red < 0 || red > 255 || green < 0 || green > 255 || blue < 0 || blue > 255) { throw ...
In this case class Point is mutable and some user can modify state of object of this class. class Point { private int x, y; public Point(int x, int y) { this.x = x; this.y = y; } public int getX() { return x; } public void setX(int ...
Since BackAndroid is deprecated. Use BackHandler instead of BackAndroid. import { BackHandler } from 'react-native'; {...} ComponentWillMount(){ BackHandler.addEventListener('hardwareBackPress',()=>{ if (!this.onMainScreen()) { this.goBack(); return true; ...
<?php include "vendor/autoload.php"; $app = new \Slim\App(); $app->get('/hello', function () { echo "Hello, world"; }); $app->run();
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...

Page 123 of 129