Tutorial by Examples

Dim aList as New List(Of String) aList.Add("Hello, World") aList.Add("Test") Dim output As String = aList(0) output: Hello, World If you do not know the index of the item or only know part of the string then use the Find or FindAll method Dim aList as New List(Of S...
In this example, we simply create and show a push button in a window frame on the desktop. The push button will have the label Hello world! This represents the simplest possible Qt program. First of all we need a project file: helloworld.pro QT += core gui greaterThan(QT_MAJOR_VERSION, ...
Let's say you have two commits d9e1db9 and 5651067 and want to see what happened between them. d9e1db9 is the oldest ancestor and 5651067 is the final descendant in the chain of commits. gitk --ancestry-path d9e1db9 5651067
If you have the version tag v2.3 you can display all commits since that tag. gitk v2.3..
Java provides a conditional-and and a conditional-or operator, that both take one or two operands of type boolean and produce a boolean result. These are: && - the conditional-AND operator, || - the conditional-OR operators. The evaluation of <left-expr> && <righ...
On linux: If you don't have pip installed, install it first: curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py" sudo python get-pip.py Then install awscli: sudo pip install awscli On Windows: Download the latest installers from here
Now you have aws cli installed, you'll have to configure it access your AWS resources. You can have multiple profiles like test, dev, prod, etc profiles. So let's assume you want to configure it for your test environment. aws configure --profile=test It will ask for following information: AWS A...
The best part about aws cli is that you can embed the commands into a script and can trigger them based on some criteria. Like auto deployment on production (in Elastic Beanstalk), no need to go to AWS Console to select and deploy. You'll get all the available commands by running: # This will give...
In-place editing, while common, is a non-standard feature. A viable alternative would be to use an intermediate file to either store the original, or the output. sed 'sed commands' > file.out && mv file.out file # or mv file file.orig && sed 'sed commands' file.orig > file ...
Write formatted data to string int sprintf ( char * str, const char * format, ... ); use sprintf function to write float data to string. #include <stdio.h> int main () { char buffer [50]; double PI = 3.1415926; sprintf (buffer, "PI = %.7f", PI); printf ("%s\n&...
Update your project with git pull origin master Update s.version inside MyRepo.podspec Check local errors with pod lib lint MyRepo.podspec git add . & git commit -m "Update pods version" git push origin master Make a new release pod trunk push MyRepo.podspec Source
Take a close look at these two property files which are seemingly completely identical: except they are really not identical: (screenshots are from Notepad++) Since trailing whitespace is preserved the value of lastName would be "Smith" in the first case and "Smith " in th...
Consider the Node class having 3 members data, left child pointer and right child pointer like below. public class Node { public int data; public Node left; public Node right; public Node(int data){ this.data = data; } } We can traverse the tree construct...
In order to use icon fonts, just follow the steps below: Add the font file to your project You may create your font icon file from online websites such as icomoon, where you can upload SVG files of the required icons and then download the created icon font. Then, place the .ttf font file into ...
You will need to set your base URL in application/config/config.php If it is not set, then CodeIgniter will try to guess the protocol and path to your installation, but due to the security concerns the hostname will be set to $_SERVER['SERVER_ADDR'] if available, or localhost otherwise. The auto...
First you have to set up a new Scrapy project. Enter a directory where you’d like to store your code and run: scrapy startproject projectName To scrape we need a spider. Spiders define how a certain site will be scraped. Here’s the code for a spider that follows the links to the top voted questi...
About Akavache Akavache is an incredibly useful library providing reach functionality of caching your data. Akavache provides a key-value storage interface and works on the top of SQLite3. You do not need to keep your schema synced as it's actually No-SQL solution which makes it perfect for most of...
CAShapeLayer *mask = [[CAShapeLayer alloc] init]; mask.frame = CGRectMake(50, 50, 100, 100); CGFloat width = 100; CGFloat height = 100; CGMutablePathRef path = CGPathCreateMutable(); CGPathMoveToPoint(path, nil, 30, 30); CGPathAddLineToPoint(path, nil, width, 30); CGPathAddLine...
CAShapeLayer *circle = [CAShapeLayer layer]; [circle setPath:[[UIBezierPath bezierPathWithOvalInRect:CGRectMake(100, 100, 150, 150)] CGPath]]; [circle setStrokeColor:[[UIColor blueColor] CGColor]]; [circle setFillColor:[[UIColor clearColor] CGColor]]; [[self....

Page 483 of 1336