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
// | |
// GIFLoader.h | |
// AnimatedGifExample | |
// | |
// Created by Andrei on 10/15/12. | |
// Copyright (c) 2012 Whatevra. All rights reserved. | |
// | |
#import <Foundation/Foundation.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
The MIT License (MIT) | |
Copyright (c) 2015 Salvador Guerrero | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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
- (UIImage *)compressImage:(UIImage *)image{ | |
float actualHeight = image.size.height; | |
float actualWidth = image.size.width; | |
float maxHeight = 600.0; | |
float maxWidth = 800.0; | |
float imgRatio = actualWidth/actualHeight; | |
float maxRatio = maxWidth/maxHeight; | |
float compressionQuality = 0.5;//50 percent compression | |
if (actualHeight > maxHeight || actualWidth > maxWidth) { |
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
// | |
// List.h | |
// Data Structures | |
// | |
// Created by Salvador Guerrero on 3/15/16. | |
// Copyright © 2016 ByteApps. All rights reserved. | |
// | |
/* | |
* Singly-linked list |
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
// | |
// Stack.h | |
// Data Structures | |
// | |
// Created by Salvador Guerrero on 3/15/16. | |
// Copyright © 2016 ByteApps. All rights reserved. | |
// | |
/* | |
* Stack using singly-linked list |
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
// | |
// Queue.h | |
// Data Structures | |
// | |
// Created by Salvador Guerrero on 3/15/16. | |
// Copyright © 2016 ByteApps. All rights reserved. | |
// | |
/* | |
* Queue using singly-linked list |
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
// | |
// BinaryTree.h | |
// Data Structures | |
// | |
// Created by Salvador Guerrero on 3/16/16. | |
// Copyright © 2016 ByteApps. All rights reserved. | |
// | |
/* | |
* Binary Tree |
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
#!/bin/bash | |
# The first folder moves only 253 files, but that's ok for my use =) | |
folder_count=1 | |
file_count=1 | |
pushd /Volumes/NO\ NAME/ | |
mkdir ${folder_count} | |
for f in *.mp3; do |
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
import httplib | |
import socket | |
import StringIO | |
# generic | |
SSDP_ALL = 'ssdp:all' | |
UPNP_ROOT = 'upnp:rootdevice' | |
# devices | |
DIAL = 'urn:dial-multiscreen-org:service:dial:1' |
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
# Configuration for iPhone OS, making static libs | |
# this will generate both iPhone (arm) and iPhoneSimulator (i386) libs | |
include Makefile.srcs | |
CFLAGS = -std=c99 -g -O2 -Wall -Wmissing-prototypes -ffast-math -fno-strict-aliasing -D__ANSI__ -emit-llvm -Wno-c++11-narrowing -Wno-implicit-function-declaration | |
CXXFLAGS = -std=gnu++14 -stdlib=libc++ -D__ANSI__ -emit-llvm -Wno-c++11-narrowing -Wno-implicit-function-declaration -fvisibility-inlines-hidden | |
IPHONEOS_DEPLOYMENT_TARGET = 9.3 | |
MACOSX_DEPLOYMENT_TARGET = 10.7 |
OlderNewer