This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
libsrcml_convenience.cpp | |
Demonstrates basic use of libsrcml convenience function srcml() | |
for converting to and from the srcML format | |
Error handling removed for clarity | |
*/ | |
#include <srcml.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
libsrcml_create.cpp | |
Demonstrates use of libsrcml functions for writing | |
a srcML file | |
Error handling removed for clarity | |
*/ | |
#include <srcml.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
libsrcml_extract.cpp | |
Demonstrates use of libsrcml functions for reading | |
a srcML file | |
Error handling removed for clarity | |
*/ | |
#include <srcml.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Load given URL into web view */ | |
/* Note: For http:, need to setup App Transport Settings to allow: | |
Key: App Transport Security Settings | |
Subkey: Allow Arbitrary Loads to YES | |
Produces: | |
<key>NSAppTransportSecurity</key> | |
<dict> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git rev-list HEAD | tail -n 1 | xargs -I% git log --date=iso % | grep "Date:" | cut -d":" -f2- | cut -c4- | cut -d"+" -f1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ls . | xargs -I^ bash -c 'echo -n ^; echo -en "\t"; cd ^; git rev-list HEAD | tail -n 1 | xargs -I% git log --date=iso % | grep "Date:" | cut -d":" -f2- | cut -c4- | cut -d"+" -f1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Save password in KeyChain | |
TODO: import Security | |
*/ | |
// initial password to store | |
let passwordStr = "0123456789" | |
print("String Data: \(passwordStr)") | |
// encoded password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Update password in KeyChain | |
TODO: import Security | |
*/ | |
// string password | |
let passwordStr = "9876543210" | |
print("String Data: \(passwordStr)") | |
// encoded password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Read password from KeyChain | |
TODO: import Security | |
*/ | |
// setup the keychain request | |
let getPasswordQuery = [ | |
// NOTE: Pick the correct type of data | |
kSecClass : kSecClassGenericPassword, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add tap and gesture | |
self.view.addGestureRecognizer(UITapGestureRecognizer() { | |
print("UITapGestureRecognizer") | |
}) | |
// add pinch gesture | |
self.view.addGestureRecognizer(UIPinchGestureRecognizer() { | |
print("UIPinchGestureRecognizer") | |
}) |
OlderNewer