Skip to content

Instantly share code, notes, and snippets.

View codeOfRobin's full-sized avatar

Robin codeOfRobin

View GitHub Profile
class DismissSegue: UIStoryboardSegue
{
override func perform()
{
let sourceController = self.sourceViewController
sourceController.dismissViewControllerAnimated(true, completion: {
})
}
class Minion
{
let name: String?
let image: UIImage?
let favoriteActivity: String?
init(name: String?, favoriteActivity: String?)
{
self.name = name
self.image = UIImage(named: name!)
The marketing mix is traditionally known as consisting of the Four Ps (4Ps) of marketing — **price, product, promotion, and place** (or distribution)—a classification suggested by McCarthy (1960).
Yet the marketing mix may certainly have elements beyond the 4Ps when one considers that the marketing of an offering may be influenced by other vitally important elements. Some marketers, therefore, refer to the marketing mix by the Five Ps, where ‘people’ is added as another key element.
Some literature points to a sixth P - people.
WHY THE FUCK ARE THEY ALWAYS ADDING SO MANY Ps?
In the extended Marketing Mix (also called the service marketing mix), we add people, process and physical evidence.
Various other stupid acronyms like the 30Rs and 4Cs were introduced.
enum Icon: String
{
case ClearDay = "clear-day"
case ClearNight = "clear-night"
case Rain = "rain"
case Snow = "snow"
case Sleet = "sleet"
case Wind = "wind"
case Fog = "fog"
case Cloudy = "cloudy"
Sample Input file:
#3 //number of entity
Product //entity name
#4 //number of attributes
Id,ProductName,BrandName,TaxId //attribute list
#4 //number of tuples
1,Laptop,Samsung,1 //first tuple
2,Mouse,Dell,1
3,Mobile,Apple,1
import json
x = {}
x["key1"] = "value"
x["key2"] = "value2"
x["path"] = "field path"
files = []
for i in range(1,6):
currentFile = {}
currentFile["fileName"] = "Document"+str(i)+".png"
noOfParams = 10
noOfOutputs = 4
m=10
n=10
inputs = zeros(m,n,noOfParams)
inputNames = {'EPI';'E';'warpLinearDensity';'C1'; 'warpYarnDensity';'PPI';'N';'weftLinearDensity';'c2';'weftYarnDensity'}
for k = 1:noOfParams
currentFile = inputNames{k}
inputs(:,:,k) = importdata(strcat(currentFile, '.csv'))
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), { () -> Void in
let img = getImageWithColor(colorToSet, CGSizeMake(100, 100))
dispatch_async(dispatch_get_main_queue(), { () -> Void in
self.navigationController?.navigationBar.setBackgroundImage(img,forBarMetrics: .Default)
self.pageIndicatorContainer.backgroundColor = colorToSet
})
})
brew install opencv3 --with-python3
echo /usr/local/opt/opencv3/lib/python3.4/site-packages >> /usr/local/lib/python3.4/site-packages/opencv3.pth
mkdir -p /Users/<insert your username here>/Library/Python/3.4/lib/python/site-packages
echo 'import site; site.addsitedir("/usr/local/lib/python3.4/site-packages")' >> /Users/<insert your username here>/Library/Python/3.4/lib/python/site-packages/homebrew.pth
int const max_BINARY_value = 2147483647;
cv::Mat src_gray=[self cvMatFromUIImage:img.image];
cv::Mat dst;
dst=src_gray;
cv::cvtColor(src_gray, dst, cv::COLOR_RGB2GRAY);
cv::Mat canny_output;
std::vector<std::vector<cv::Point> > contours;
std::vector<cv::Vec4i> hierarchy;
cv::RNG rng(12345);