Tutorial by Examples: c

Storyboard: Initial viewController: an empty viewController with a button to present the GameViewController GameViewController: the typical GameViewController of the "Hello World" Sprite-kit template. Goal: I want to present the first viewController from my SKScene game with the corre...
validate Validates whether the project is correct and all the required information are available for the build. initialize Initializes the build environment, e.g. sets properties or creates directories. generate-sources Generates source code to be processed in the 'compile' phase. proces...
Parsing input is best achieved through larger parser functions that are composed of smaller, single purpose ones. Let's say we wished to parse the following text which represents working hours: Monday: 0800 1600. We could split these into two "tokens": the day name -- "Monday&q...
To create a TCP connection in Qt, we will use QTcpSocket. First, we need to connect with connectToHost. So for example, to connect to a local tcp serveur: _socket.connectToHost(QHostAddress("127.0.0.1"), 4242); Then, if we need to read datas from the server, we need to connect the signal...
Create a TCP server in Qt is also very easy, indeed, the class QTcpServer already provide all we need to do the server. First, we need to listen to any ip, a random port and do something when a client is connected. like that: _server.listen(QHostAddress::Any, 4242); connect(&_server, SIGNAL...
One of the best Linux distributions currently for Raspberry Pi (from now on, "RPi") is Arch Linux. This web shows the installation for: RPi2. ARMv7 architecture (32 bits). RPi3. There are two options: ARMv7 architecture (32 bits) or AArch architecture (64 bits). This t...
You can configure your Linux (or macOS) system in order to tie in an identifier <hostname> to some other system's IP address in your network. You can configure it: Systemwide. You should modify the /etc/hosts file. You just have to add to that file a new line containing: the remote sys...
This example will show how get started with Inverion of Control using Autofac with a relatively simple project, closely following the official getting started docs. Create a console application from File -> New -> Project -> Console Application Install Autofac for this project. Yo...
Inspect ssl certificate openssl x509 -in server.crt -noout -text Generate server key openssl genrsa -out server.key 2048 Generate csr openssl req -out server.csr -key server.key -new
PowerShell looks for modules in the directories listed in the $Env:PSModulepath. A module called foo, in a folder called foo will be found with Import-Module foo In that folder, PowerShell will look for a module manifest (foo.psd1), a module file (foo.psm1), a DLL (foo.dll).
Suppose you want to see if a certain set of sales prices makes sense for a store. The items originally cost $5, so you don't want to accept the sale if the sales price is less for any of them, but you do want to know what the new price is otherwise. Calculating one price is easy: you calculate the...
You can detect when your app is launched from an external URL. componentDidMount() { const url = Linking.getInitialURL() .then((url) => { if (url) { console.log('Initial url is: ' + url) } }).catch(err => console.error('An error occurred ', err)) } To enable this...
You can set flash data in controller just using this syntax $this->session->set_flashdata('message', 'Message you want to set'); Here 'message' is identifier for access data in view. You can Set more than one message by just changing identifier. for ex $this->session->set_flashdata...
If you have multiple asynchronous tasks that needs to occur one after the other, you will need to chain together their promise objects. Here is a simple example: function First() { console.log("Calling Function First"); return $.get("/ajax/GetFunction/First"); } fu...
/// <summary> /// Simple Get method /// </summary> /// <returns> Json formated data </returns> public string GetJsonData1() { IOperations _Obj = ClsOperations.GetOperations(); string url = "http://1.2.3.4:1234/Services/rest/Call...
/// <summary> /// Post Method with input parameter /// </summary> /// <returns> Json formated data </returns> public string GetJsonData2() { IOperations _Obj = ClsOperations.GetOperations(); string url = "http://1.2.3.4:...
/// <summary> /// Post Method with Input/ data to post in JSON format /// </summary> /// <returns> Json formated data </returns> public string GetJsonData3() { IOperations _Obj = ClsOperations.GetOperations(); string url = "htt...
/// <summary> /// Post Method with Input/ data to post in JSON format Or you can send dictionary as shown in previous methods /// </summary> /// <returns> Json formated data </returns> public void GetJsonData4() { IOperations _Obj = ClsOpera...
/// <summary> /// Post Method with Input/ data to post in JSON format Or you can send dictionary as shown in previous methods /// </summary> /// <returns> Json formated data </returns> public DataTable GetJsonData6() { ...
/* By Default if you send only url then automatically it will recognize as GET Method and if service having parameters with, Then automatically will convert to POST Method. But I observed some of the services having only URL but are POST Type. For the purpose you can forcefully make the method as yo...

Page 753 of 826