Tutorial by Examples: c

CKContainer.defaultContainer().accountStatusWithCompletionHandler { accountStatus, error in if accountStatus == .NoAccount { let alert = UIAlertController(title: "Sign in to iCloud", message: "Sign in to your iCloud account to write records. On the Home screen, l...
The standard Java toolchain (and 3rd-party tools designed to interoperate with them) have specific rules for mapping the names of classes to the pathnames of files and other resources that represent them. The mappings are as follows For classes in the default package, the pathnames are simple fi...
A model for a new table can be created by running the following commend from the terminal root location: phalcon model <table-name> Let us take the Model Users. SELECT There are two default functions to do select operation in phalcon, find() and findFirst() findFirst() is used to get th...
C-Style casting can be considered 'Best effort' casting and is named so as it is the only cast which could be used in C. The syntax for this cast is (NewType)variable. Whenever this cast is used, it uses one of the following c++ casts (in order): const_cast<NewType>(variable) static_cast&...
identification division. program-id. altering. date-written. 2015-10-28/06:36-0400. remarks. Demonstrate ALTER. procedure division. main section. *> And now for some altering. contrived. ALTER story TO PROCEED TO beginning GO TO story . *> Jump to a part of the story...
https://godzillai5.wordpress.com/2016/08/20/db2-for-i-in-the-cloud-connecting-to-pub400-via-jdbc-in-netbeans/
https://godzillai5.wordpress.com/2016/08/21/jdbc-jt400-setting-to-get-crud-and-show-sql-features-added-in-netbeans-with-ibm-db2-for-i/
To enable Cross-Origin Resource Sharing (CORS) in Apache you'll need to set at least one HTTP header which changes it (the default behaviour is to block CORS). In the following example, we're going to be setting this HTTP header inside .htaccess, but it can also be set in your site your-site.conf fi...
#include <string.h> #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <unistd.h> #include <dirent.h> #include <ctype.h> int main(int argc, char **argv) { const char *dname = (argc > 1 ? argv[1] : "."); DI...
#define _XOPEN_SOURCE 500 #include <stdlib.h> /* for exit() */ #include <stdio.h> /* for remove() */ #include <ftw.h> /* for nftw() */ int unlink_cb( const char *fpath, const struct stat *sb, int typeflag, struct FTW *ftwbuf) { return remove(fpath); } in...
You can customize your Layout of Views by click-dragging the Tab of any View to one of several locations. Dropping a Tab in the Tab Area of an existing window will add the Tab beside any existing Tabs. Alternatively, dropping a Tab in any Dock Zone will add the View in a new window. Tabs can also...
menu.xml - (res -> menu) <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" tools:context=".HomeActivity"> <item...
TextViewPlus.java: public class TextViewPlus extends TextView { private static final String TAG = "TextView"; public TextViewPlus(Context context) { super(context); } public TextViewPlus(Context context, AttributeSet attrs) { super(context, attrs)...
CustomProgressBarActivity.java: public class CustomProgressBarActivity extends AppCompatActivity { private TextView txtProgress; private ProgressBar progressBar; private int pStatus = 0; private Handler handler = new Handler(); @Override protected void onCreate(Bun...
Get Compressed Bitmap from Singleton class: ImageView imageView = (ImageView)findViewById(R.id.imageView); Bitmap bitmap = ImageUtils.getInstant().getCompressedBitmap("Your_Image_Path_Here"); imageView.setImageBitmap(bitmap); ImageUtils.java: public class ImageUtils { public ...
There is a signal WINCH ( WINdowCHange), which is fired when one resizes a terminal window. declare -x rows cols update_size(){ rows=$(tput lines) # get actual lines of term cols=$(tput cols) # get actual columns of term echo DEBUG terminal window has no $rows lines and is $cols chara...
Using a pipe makes the output of a command be the input of the next one. ls -1 | grep -c ".conf" In this case the ouput of the ls command is used as the input of the grep command. The result will be the number of files that include ".conf" in their name. This can be used to ...
MainActivity.java: public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } } activity_main.xml: <?xml version="1...
tf.exe get /all /recursive /force /overwrite $/ Gets all files and directories, and will replace any files that are not currently checked out in the workspace (including files that have been edited).
This will get all the orders for all customers: SELECT c.CustomerName, o.OrderID FROM Customers AS c INNER JOIN Orders AS o ON c.CustomerID = o.CustomerID ORDER BY c.CustomerName, o.OrderID; This will count the number of orders for each customer: SELECT c.CustomerName, C...

Page 482 of 826