Tutorial by Examples: c

DELIMITER $$ CREATE DEFINER=`db_username`@`hostname_or_IP` FUNCTION `function_name`(optional_param data_type(length_if_applicable)) RETURNS data_type BEGIN /* SQL Statements goes here */ END$$ DELIMITER ; The RETURNS data_type is any MySQL datatype.
NumericUpDown is control that looks like TextBox. This control allow user to display/select number from a range. Up and Down arrows are updating the textbox value. Control look like; In Form_Load range can be set. private void Form3_Load(object sender, EventArgs e) { numericUpDown...
Creating a socket that uses the TCP (Transmission Control Protocol) $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); Make sure the socket is successfully created. The onSocketFailure function comes from Handling socket errors example in this topic. if(!is_resource($socket)) onSocketFailu...
Socket creation Create a socket that uses the TCP. It is the same as creating a client socket. $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); Socket binding Bind connections from a given network (parameter 2) for a specific port (parameter 3) to the socket. The second parameter is us...
socket_last_error can be used to get the error ID of the last error from the sockets extension. socket_strerror can be used to convert the ID to human-readable strings. function onSocketFailure(string $message, $socket = null) { if(is_resource($socket)) { $message .= ": " ....
A UDP (user datagram protocol) server, unlike TCP, is not stream-based. It is packet-based, i.e. a client sends data in units called "packets" to the server, and the client identifies clients by their address. There is no builtin function that relates different packets sent from the same c...
The C extension is an optional feature of Twig that offers some performance improvements of template rendering. The source code for the extension is located in the Twig source code directory at ext/twig. It compiles like any other PHP extentension: cd ext/twig phpize ./configure make make insta...
CSS Here are the minimum CSS rules that Google advises you to use, in a separate CSS file, or within an HTML style tag, e.g. <style type="text/css">...</style>. html, body { height: 100%; margin: 0; padding: 0; } #map { height: 400px; } HTML Goo...
This example illustrates how to read various-type struct entries from MATLAB, and pass it to C equivalent type variables. While it is possible and easy to figure out from the example how to load fields by numbers, it is here achieved via comparing the field names to strings. Thus the struct fields ...
Import Element Tree module import xml.etree.ElementTree as ET Element() function is used to create XML elements p=ET.Element('parent') SubElement() function used to create sub-elements to a give element c = ET.SubElement(p, 'child1') dump() function is used to dump xml elements. ET.dump...
The default user interfaces for WPF controls are typically constructed from other controls and shapes. For example, a Button is composed of both ButtonChrome and ContentPresenter controls. The ButtonChrome provides the standard button appearance, while the ContentPresenter displays the button's cont...
using System.Windows; namespace SDKSample { public partial class ControlTemplateButtonWindow : Window { public ControlTemplateButtonWindow() { InitializeComponent(); } void button_Click(obje...
Python xlrd library is to extract data from Microsoft Excel (tm) spreadsheet files. Installation:- pip install xlrd Or you can use setup.py file from pypi https://pypi.python.org/pypi/xlrd Reading an excel sheet:- Import xlrd module and open excel file using open_workbook() method. import x...
Actions are located in /usr/local/etc/scanbd/scanbd.conf. I have 4 buttons that are scan, copy, email and file. The default config file doesn't include all actions per default, you will probably have to add the block manually. You can have less or more buttons depending of your scanner model. ...
// register activation hook register_activation_hook( __FILE__, 'example_activation' ); // function for activation hook function example_activation() { // check if scheduled hook exists if ( !wp_next_scheduled( 'my_event' )) { // Schedules a hook // time() - the f...
For the current shell, this takes you to the previous directory that you were in, no matter where it was. cd - Doing it multiple times effectively "toggles" you being in the current directory or the previous one.
The default directory is the home directory ($HOME, typically /home/username), so cd without any directory takes you there cd Or you could be more explicit: cd $HOME A shortcut for the home directory is ~, so that could be used as well. cd ~
To change to an absolutely specified directory, use the entire name, starting with a backslash \, thus: cd /home/username/project/abc If you want to change to a directory near your current on, you can specify a relative location. For example, if you are already in /home/username/project, you can...
CakePHP 3.x has the ability to bake controllers, models, views and other framework defined objects. Note : If you have had some experience with the Laravel framework, the artisan component is similar to bake. The bake application is located in bin folder; the following are some of the availabl...
You can easily create tables for Your database or drop them if You want. If You wish to do that, You should learn how to write Migrations for desired database. Migrations files must be located in config/Migrations folder. File names can be in next formats: YYYYMMDDHHIISS_(Create|Alter|Delete)Ad...

Page 574 of 826