Tutorial by Examples: c

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...
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....
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.view layer] addSublayer:circl...
Imagine you are on the master branch and something is not working as expected (a regression was introduced), but you don't know where. All you know is, that is was working in the last release (which was e.g., tagged or you know the commit hash, lets take old-rel here). Git has help for you, finding...
In your Storyboard, add a UITableView object on your UIViewController and let it cover the entire view. Setup the UITableviewDataSource and UITableviewDelegate connections. Objective-C In your .h file NSMutableArray *arrayForBool; NSMutableArray *sectionTitleArray; In your .m file - (void)vi...
We can directly copy data from a source to a data sink using a loop. In this example, we are reading data from an InputStream and at the same time, writing to an OutputStream. Once we are done reading and writing, we have to close the resource. public void copy(InputStream source, OutputStream dest...

Page 299 of 826