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
int get_min_range(int array[], int firstSubscript, int lastSubscript) | |
{ | |
int smallestValue = array[firstSubscript]; | |
int smalledIndex = firstSubscript; | |
for (int i = firstSubscript; i <= lastSubscript; i++) | |
{ | |
if (array[firstSubscript] < smallestValue) | |
{ | |
smallestValue = array[firstSubscript]; | |
smalledIndex = firstSubscript; |
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
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
cout << "Hello World" << endl; | |
return 0; | |
} |
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
# xcode-build-bump.sh | |
# @desc Auto-increment the build number every time the project is run. | |
# @usage | |
# 1. Select: your Target in Xcode | |
# 2. Select: Build Phases Tab | |
# 3. Select: Add Build Phase -> Add Run Script | |
# 4. Paste code below in to new "Run Script" section | |
# 5. Drag the "Run Script" below "Link Binaries With Libraries" | |
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0) |
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
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { | |
// Override point for customization after application launch. | |
window = UIWindow(frame: UIScreen.main.bounds) | |
window?.makeKeyAndVisible() | |
window?.rootViewController = UINavigationController(rootViewController: ViewController()) | |
return true |
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
def count_values(dict): | |
values_count = {} | |
for key in dict: | |
values_count[dict[key]] = dict[key] | |
return len(values_count) | |
dict = {'red':1, 'green':1, 'blue':2} | |
print "Unique Values in Dictionary : %d" % count_values(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
class Solution { | |
func minCostToMoveChips(_ position: [Int]) -> Int { | |
var even = 0 | |
var odd = 0 | |
for item in position { | |
if item % 2 == 0 { even = even + 1 } | |
if item % 2 == 1 { odd = odd + 1 } |