I hereby claim:
- I am sheva29 on github.
- I am sheva29 (https://keybase.io/sheva29) on keybase.
- I have a public key ASAb6X9ExGvIkoMJlXB8Vj_wkfQAfAdK0aCPPj0hR-YQFAo
To claim this, I am signing this object:
//testApp reference from another class: | |
//from a .cpp file, for example, "particle.cpp" you can do two things: | |
//a) include "testApp.h" (so you know what's inside the testApp) | |
//b) cast the ofGetAppPtr as a testApp ptr | |
//This is will be the .cpp of the class particle |
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --allow-file-access-from-files |
//GET request | |
//-------------------------------------------------------------- | |
void ofApp::getRequestToURL(){ | |
//This is what we will be posting to the | |
string getRequest = "http://localhost:8000/api/recommendations/?ids="; | |
//we pass the IDs to our string for the GET post | |
for ( int i = 0; i < suggestedProducts.size(); i++){ | |
//This template allows to compare pairs, and return them in ascending order. | |
template <class T1, class T2, class Pred = std::less<T2> > | |
struct sort_pair_second { | |
bool operator()(const std::pair<T1,T2>&left, const std::pair<T1,T2>&right) { | |
Pred p; | |
return p(right.second, left.second); | |
} | |
}; | |
//Implementation example |
// in terminal in the desired folder location run... | |
python -m SimpleHTTPServer 8000 | |
// in the browser go to the port number the server was started | |
http://localhost:8000 |
/* when trying to console.log in Angular */ | |
JSON.stringify($scope, function(key, value) { | |
if (typeof value === 'object' && value !== null) { | |
if (cache.indexOf(value) !== -1) { | |
// Circular reference found, discard key | |
return; | |
} | |
// Store value in our collection | |
cache.push(value); |
/* | |
Custom Regular Expressions | |
To test Regex go here: http://www.regextester.com/ | |
*/ | |
/* 1. Looking for specific Regex with negative look up*/ | |
^((?!For example: Make a left at the blue sign and park by the red door).)*$ | |
/* 2. Setting a maximun Character count*/ | |
^.{1,70}$ |
I hereby claim:
To claim this, I am signing this object:
/****** Script for SelectTopNRows command from SSMS ******/ | |
SET IDENTITY_INSERT [WindstreamPLUT].[dbo].[ProductDependent] ON | |
INSERT INTO [WindstreamPLUT].[dbo].[ProductDependent] (ProductDependentID, ParentProductID, DependentProductID, RelationshipCd, DefaultFlg, CreateUTCDt, UpdateUTCDt, ParentProductQuantity) | |
VALUES ('84214', '20442', '20587', 'M', '1', '2017-04-21 19:40:25.237', '2017-04-21 19:41:25.237', NULL) |
private static T ConvertType<T>(object instance) | |
{ | |
if (instance == null) | |
{ | |
throw new ArgumentNullException("instance"); | |
} | |
var typeSource = instance.GetType(); | |
var typeDestination = typeof(T); |