Tutorial by Examples: c

iOS 10 Now Requires User Permission to Access Media Library, Photos, Camera and other Hardware like these. The solution for this is to add their keys into info.plist with description for user that how we are using their data , iOS already required permissions to access microphone, camera, and m...
From Xcode menu open: Product > Scheme > Edit Scheme. On your Environment Variables set OS_ACTIVITY_MODE = disable
SELECT item.item_id, uses.category, /* nonstandard */ COUNT(*) number_of_uses FROM item JOIN uses ON item.item_id, uses.item_id GROUP BY item.item_id will show the rows in a table called item, and show the count of related rows in a table called uses. It will also show the va...
#include <gtk/gtk.h>//jjk.c static void destroy(GtkWidget *widget, gpointer data) { gtk_main_quit(); } int main(int argc, char *argv[]) { gtk_init(&argc, &argv); GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), "Window&quot...
Sometimes a query looks like this, with a * in the SELECT clause. SELECT item.*, /* nonstandard */ COUNT(*) number_of_uses FROM item JOIN uses ON item.item_id, uses.item_id GROUP BY item.item_id Such a query needs to be refactored to comply with the ONLY_FULL_GROUP_BY sta...
A typical use case for RxJS is creating HTTP requests and caching their results for some period of time. Also, we always want to run only one request at a time and share its response. For example the following code caches 1 item for max. 1000ms: var updateRequest = Observable.defer(() => makeMo...
A very easy way to connect to an ORACLE database is by using oracledb module. This module handles the connection between your Node.js app and Oracle server. You can install it like any other module: npm install oracledb Now you have to create an ORACLE connection, which you can later query. co...
Use may now use the connExecute-Function for executing a query. You have the option to get the query result as an object or array. The result ist printed to console.log. function connExecute(err, connection) { if (err) { console.error(err.message); return; } sql = ...
To simplify your querying from ORACLE-DB, you may want to call your query like this: const oracle = require('./oracle.js'); const sql = "select 'test' as c1, 'oracle' as c2 from dual"; oracle.queryObject(sql, {}, {}) .then(function(result) { console.log(result.rows[0]['C...
It is sometimes easiest to just declare a global of type any, especially in simple projects. If jQuery didn't have type declarations (it does), you could put declare var $: any; Now any use of $ will be typed any.
Create a new HTML tag named <hello-world> that will display "Hello, World!": <script> //define a class extending HTMLElement class HelloWorld extends HTMLElement { connectedCallback () { this.innerHTML = 'Hello, World!' } } //register the new custom elem...
In lua, the logical operators and and or returns one of the operands as the result instead of a boolean result. As a consequence, this mechanism can be exploited to emulate the behavior of the ternary operator despite lua not having a 'real' ternary operator in the language. Syntax condition and...
String and character literals provide an escape mechanism that allows express character codes that would otherwise not be allowed in the literal. An escape sequence consists of a backslash character (\) followed by one ore more other characters. The same sequences are valid in both character an st...
Location is a service that applications can use to interact with a browser's URL. Depending on which LocationStrategy is used, Location will either persist to the URL's path or the URL's hash segment. Location is responsible for normalizing the URL against the application's base href. import {Comp...
The async pipe subscribes to an Observable or Promise and returns the latest value it has emitted. When a new value is emitted, the async pipe marks the component to be checked for changes. When the component gets destroyed, the async pipe unsubscribes automatically to avoid potential memory leaks. ...
Read the documentation in this order to easily learn postscript: Paul Bourke's excellent tutorial: http://paulbourke.net/dataformats/postscript/ Blue Book, first half, the original official tutorial: http://www-cdf.fnal.gov/offline/PostScript/BLUEBOOK.PDF Green Book, how to use posts...
import React, { Component } from 'react'; import { Modal, Text, View, Button, StyleSheet, } from 'react-native'; const styles = StyleSheet.create({ mainContainer: { marginTop: 22, }, modalContainer: { marginTop: 22, }, }); class Example extends Component...
#import <Foundation/Foundation.h> int main() { NSLog(@"File :%s\n", __FILE__ ); NSLog(@"Date :%s\n", __DATE__ ); NSLog(@"Time :%s\n", __TIME__ ); NSLog(@"Line :%d\n", __LINE__ ); NSLog(@"ANSI :%d\n", __STDC__ ); ...
You use it the same way you would use NSMutableDictionary. The difference is that when NSCache detects excessive memory pressure (i.e. it's caching too many values) it will release some of those values to make room. If you can recreate those values at runtime (by downloading from the Internet, by d...
Given data Const c a = Const c we have data Free (Const c) a = Pure a | Free (Const c) which is isomorphic to data Either c a = Right a | Left c

Page 662 of 826