Tagged Questions
4
votes
2answers
130 views
Simple Activity Monitor - For Educational Purposes only.
This Soapi.JS script, if abused is likely to provoke frowns from those whom you would like to see smiles.
Note: the dataset is only valid if the entire user base is pulled, and on just about any ...
2
votes
4answers
130 views
How to order /sites result in a user friendly way to use it in our apps.
Since ordering of /sites is not guaranteed, how do i effectively order sites in a user-friendly way?
General requirements:
Trilogy must stay on the top of the list
...
9
votes
3answers
157 views
Should we adjust the format of the dev-tip questions early on?
Update:
I've 'averaged' the few answers and comments and included the respective result below each question (all results are executed accordingly for some time already in most dev-tip posts). The ...
3
votes
3answers
378 views
How to format an url-friendly slug for question urls
I would like to construct a slug starting from the question title.
It would be useful to apps that want to show the original link to the question in a human readable way.
On StackPrinter i have this ...
2
votes
8answers
515 views
How to format reputation numbers similar to Stack Exchange sites.
UPDATE
For JavaScript, see CMS's implementation below. It is much more elegant than the one i provide in the body of this Q.
// formats a number similar to the way stack exchange sites
...
8
votes
7answers
830 views
How to format time since xxx e.g. “4 minutes ago” similar to Stack Exchange sites
function timeSince(date) {
var seconds = Math.floor((new Date() - date) / 1000);
var interval = Math.floor(seconds / 31536000);
if (interval > 1) {
return interval + " ...
5
votes
0answers
352 views
How to use min/max with sort
While some sort values make inference of the expected min/max values less than ambiguous, others do not.
Pending formal documentation, I hope this can serve as an informal reference.
Aggregated sort ...
2
votes
0answers
283 views
How to retrieve paged API results in C# and Silverlight
In this tip we are going to leverage the SimpleRequestFactory and gather a multipage response.
Lets pull the first 5 pages of 100 users on stackapps.com.
NOTE: for Silverlight, substitute ...
4
votes
0answers
3k views
How to call the API via JSONP in Plain Old JavaScript
This tips demonstrates how to call the API in JavaScript without the need of jQuery or other frameworks.
In a lot of cases you will find that the JSONP implementations provided in various frameworks ...
3
votes
0answers
632 views
Dev-Tip: How to call the API in C# and Silverlight
This tip shows a simple and reliable way to create HttpWebRequest that are configured to properly query the api.
With the exception of the AutomaticDecompression assignment, this code can be used in ...