Text Size
Saturday, April 25, 2015

IOS and LAMP Web Developer Blog by Mike Zriel

Swift

Swift

Last Updated on Tuesday, 07 April 2015 12:32

For loops in swift

BY: Mike Zriel

The two main ways to loop in swift are below:

for var i = 0; i < 5; i++ {

   println(i);

}
Output:
0 
1
2
3
4

and to enumerate an Array for example:

var myArray:Array = [2,4,6,7];

for (index, i ) in enumerate(myArray) {

   println("\(index): \(x)");

}
Output:
0: 2
1: 4
2: 6
3: 7
 
IOS Xcode

IOS Xcode

Last Updated on Tuesday, 17 March 2015 15:19

How to compare a string in iOS

BY: Mike Zriel

How to do a case insensitive string comparison on iOS


NSString *exampleString = "Zriel";
if( [exampleString caseInsensitiveCompare:@"zriel"] == NSOrderedSame) {
   NSLog("Found!");
} else {
  NSLog("not found");
}
 
IOS Xcode

IOS Xcode

How to test web services apis

BY: Mike Zriel

This awesome tool allows you to test your web services, not only is it from Google it is also free:

Postman helps you be more efficient while working with APIs. Postman is a scratch-your-own-itch project. The need for it arose while one of the developers was creating an API for his project. After looking around for a number of tools, nothing felt just right. The primary features added initially were a history of sent requests and collections.

Chrome Postman

Enjoy!

 
Linux

Linux

Last Updated on Wednesday, 28 January 2015 11:54

linux how to search text in files in current directory

BY: Mike Zriel

How to search for text in files in current directory.

find . -type f -exec grep -H "text to search" {} \;

find . -type f -exec grep -H "search this text" {} \;

 
Copyright © 2015 by Mike Zriel - Zriel.com