It looks like Google has removed the discussions search filter for some browsers (currently using Chrome Version 32.0.1700.76 m).
Hoping this is a bug and not another part of the “simplicity” trend they’re on at the moment.
Solution #1: Append &tbm paramter to url
A temporary fix is to add “&tbm=dsc” to the end of the search url. SilentEcho has added this script to automate it if you’re going to be using it a fair bit: http://userscripts.org/scripts/reviews/293082
Solution #2: Change Use Agent String
You can also use a user agent string of a browser that it still works for (I’ve heard Opera but haven’t verified).
Solution #3: Sign Out of Google Account
This didn’t work for me, however quite a few people are saying it does the job for them.
I used this directive to add a random background to each of my wrapper divs:
To use it in your app simply define a list of classes in your controller:
app.controller("MyCtrl", function MyCtrl($scope) {
/* A random class is picked from this list */
$scope.classes = [
//"bg-buildings",
"red",
"blue",
"yellow",
"green",
"orange",
"black",
"purple"
];
});
Then add the directive to your page (can be an existing element):
A random class will then be selected from the list and appended to the elements current list of classes (if any).
The easiest way to see how it’s done is probably just to check out the fiddle above, but there’s a code dump below if you need it:
The Random Class Directive
app.directive("ngRandomClass", function () {
return {
restrict: 'EA',
replace: false,
scope: {
ngClasses: "="
},
link: function (scope, elem, attr) {
//Add random background class to selected element
elem.addClass(scope.ngClasses[Math.floor(Math.random() * (scope.ngClasses.length))]);
}
}
});
/*
http://www.whatibroke.com/?p=899
Adds a random class to element
Usage: add ng-random-class to element
*/
var app = angular.module('myApp', []);
app.controller("MyCtrl", function MyCtrl($scope) {
/* A random class is picked from this list */
$scope.classes = [
//"bg-buildings",
"red",
"blue",
"yellow",
"green",
"orange",
"black",
"purple"
];
});
A quick issue I ran into today, my generated migrations weren’t detecting any of the models I’d added – only changes to existing models. Unfortunately the solution was so obvious that it didn’t even come up on Google.
I had forgotten to add the table to the DBContext file… Once this was done it all worked fine.
Just a dummy implementation of a Parallel Payment and an accompanying IPN Handler using the C#/.NET SDK. Feel free to use it however you like.
//Handles PayPal IPN
public String IPN()
{
//Post back to either sandbox or live
string strSandbox = "https://www.sandbox.paypal.com/cgi-bin/webscr";
//string strLive = "https://www.paypal.com/cgi-bin/webscr";
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(strSandbox);
////Set values for the request back
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
byte[] param = Request.BinaryRead(Request.ContentLength);
string strRequest = Encoding.ASCII.GetString(param);
strRequest += "&cmd=_notify-validate";
req.ContentLength = strRequest.Length;
//Send the request to PayPal and get the response
StreamWriter streamOut = new StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII);
streamOut.Write(strRequest);
streamOut.Close();
StreamReader streamIn = new StreamReader(req.GetResponse().GetResponseStream());
string strResponse = streamIn.ReadToEnd();
streamIn.Close();
if (strResponse == "VERIFIED")
{
//check the payment_status is Completed
//check that txn_id has not been previously processed
//check that receiver_email is your Primary PayPal email
//check that payment_amount/payment_currency are correct
//process payment
}
else if (strResponse == "INVALID")
{
//log for manual investigation
}
else
{
//log response/ipn data for manual investigation
}
return "";
}
//Pay for an order
public void Pay(int OrderId)
{
RequestEnvelope envelopeRequest = new RequestEnvelope();
envelopeRequest.errorLanguage = "en_US";
PaySample paySample = new PaySample();
List listReceiver = new List();
// Amount to be credited to the receiver's account
Receiver receiverA = new Receiver(Convert.ToDecimal("4.00"));
// A receiver's email address
receiverA.email = "test_buyer1@learnerlessons.com.au";
listReceiver.Add(receiverA);
// Amount to be credited to the receiver's account
Receiver receiverB = new Receiver(Convert.ToDecimal("2.00"));
// A receiver's email address
receiverB.email = "test_buyer2@learnerlessons.com.au";
listReceiver.Add(receiverB);
ReceiverList receiverList = new ReceiverList(listReceiver);
PayRequest requestPay = new PayRequest(envelopeRequest, "PAY", "http://localhost:53034/orders/cancel", "AUD", receiverList, "http://localhost:53034/orders/return");
requestPay.reverseAllParallelPaymentsOnError = true;
requestPay.ipnNotificationUrl = "http://123.123.123.123/Orders/IPN";
//Send request to paypal, retrieve payKey
PayResponse payResponse = paySample.PayAPIOperations(requestPay);
Response.Redirect("https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_ap-payment&paykey=" + payResponse.payKey);
}
I’ve been mucking around with the C# SDK for PayPal Adaptive Payments. Unfortunately the docs aren’t too great and the samples are a little confusing until you get your head around them.
One of the main issues I’ve had is working out how to configure payment request settings i.e. reverseAllparallelPaymentsOnError.