Tutorial by Examples: ect

<?php $con = mysqli_connect("localhost", "root", "", "database"); ?>
scons describes running phases itself. Running it over an empty SConstruct yields this: $ scons scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... scons: `.' is up to date. scons: done building targets. To suppress phase messages, add -Q op...
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.
Each fundamental opencl type has a vector version. You can use the vector type by appending the number of desired components after the type. Supported number of components are 2,3,4,8 and 16. OpenCL 1.0 does not offer three components. You can initialize any vector using two ways: Provide a sing...
Lets look at a gamma correction kernel __constant sampler_t sampler = CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_CLAMP_TO_EDGE | CLK_FILTER_LINEAR; __kernel void Gamma(__read_only image2d_t input, __write_only image2d_t output, __c...
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": ...
Seismic is an Android device shake detection library by Square. To use it just start listening to the shake events emitted by it. @Override protected void onCreate(Bundle savedInstanceState) { sm = (SensorManager) getSystemService(SENSOR_SERVICE); sd = new ShakeDetector(() -> { /* rea...
You can use get_results to get multiple rows from database. global $wpdb; $userTable =$wpdb->prefix."users"; $selectUser = $wpdb->get_results("SELECT * FROM $userTable"); This will show all users list in array.
Gui, +AlwaysOnTop +Disabled -SysMenu +Owner ; +Owner avoids a taskbar button. Gui, Add, Text,, Some text to display. Gui, Show, NoActivate, Title of Window ; NoActivate avoids deactivating the currently active window.
Most Singleton examples use MonoBehaviour as the base class. The main disadvantage is that this Singleton class only lives during run time. This has some drawbacks: There is no way of directly editing the singleton fields other than changing the code. No way to store a reference to other assets...
Small object optimization is a technique which is used within low level data structures, for instance the std::string (Sometimes referred to as Short/Small String Optimization). It's meant to use stack space as a buffer instead of some allocated memory in case the content is small enough to fit with...
1.1.2 (This content is only relavant for versions 1.1.2 and up) From versions 1.1.2 and up, you can set the delay to select a new chip before refocusing on the input. Use the md-chip-append-delay attribute to set it (in milliseconds): Example: <md-chips md-chip-append-delay="500" n...
VsCode is unable to create the ionic project because it is a code editor.So you can create your ionic project by CLI or cmd. create your project by below command $ ionic start appName blank Above command use to create blank template ionic application. Ionic2 provide three type of templates blank...
> Run and Debug in Chrome To run the ionic project use below command in terminal or cmd or CLI $ ionic serve For debugging the ionic project ,Firstly you should add extension (Debugger for chrome) and then configure launch.json file like this. { "version": "0...
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; ...
npm init This will initialize a new NPM project for you - just press enter until it stops asking you questions. Now you'll notice that you have a new file called package.json. This file will, among other things, keep track of which packages or modules you've installed in your project.
This is how you can react to exceptions which have not been catched, similar to the system's standard "Application XYZ has crashed" import android.app.Application; import android.util.Log; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.text....
A simple OGL 4.0 GLSL shader program that shows the use of a model, view, and projection matrix The program is executed with a phyton script. To run the script, PyOpenGL and NumPy must be installed. Projection matrix: The projection matrix describes the mapping of a pinhole camera from 3D poi...
The example below is taken from the full docs, available here (GitHub) or here (NPM). Installation npm install --save activedirectory Usage // Initialize var ActiveDirectory = require('activedirectory'); var config = { url: 'ldap://dc.domain.com', baseDN: 'dc=domain,dc=com' }; va...
Create a Cloud SQL instance $dsn = "/cloudsql/PROJECT:REGION:INSTANCE;dbname=DATABASE"; $user = "USER"; $password = "PASSWORD"; $db = new PDO($dsn, $user, $password); //Whatever is your favorite MySQL connection method The important part here is /cloudsql/PRO...

Page 96 of 99