Tag Info

Hot answers tagged

86

This is just plain awesome! I could go on with this all day. Here are some of "my" quotes (from Meta): Now go and spread the hyperlink You could provide your community with Gravatar and Stack Overflow. the <center> cannot receive answers. New users are strongly discouraged from scanning an analog source. For one unit translates to another. I want to ...


13

As requested, here are some good ones I got on Stack Overflow from my posts: Turns out that the problem was that hair-pulling just because I was using Doxygen comments in your source code, you can easily generate documentation in Python. In the application. This is where failures and diagnostic information should totally drop that and try jQuery. Python is ...


9

Addons Stackprinter allows you to print directly from Stack Exchange sites using Greasemonkey script or an handy bookmarklet. Greasemonkey script adds a Printer-Friendly button to the question you are browsing (Firefox and Chrome both supported). Bookmarklet is useful if Greasemonkey is not an option and has the same effect of Printer-Friendly button, ...


8

You can get around the json/simplejson easily in your wrapper. Just change your import line from import urllib2, json, httplib, datetime, operator to import urllib2, httplib, datetime, operator try: import json except ImportError: import simplejson as json That way you can just use json in the rest of your code, but client pythons will load ...


8

Some funny ones from Stack Overflow: a good IDE can then write a Java file that a common cause of segfaults is harder to monitor/troubleshoot Use Java's resource loader to load the image file between processes by passing around the code from the SVN repo. This setup also helps out API consumers, and is a code smell in the Sun/Oracle JRE Sounds like I ...


8

It would be much more convenient if you implemented automatic posting using a blogging API. It looks like most popular blog engines support the new blogger API (Wordpress, Blogger(duh), Drupal, MoveableType, etc...) WordPress Docs Drupal Docs


7

This example uses C operators, but they are also used for WinNT/2000/XP/Vista/7 Additionally, new ImageIcon("image.png").getImage() can be used to load a C++ header file with functions that it is not. However, the value returned by Distance() will be truncated to an ImageIcon(byte[]) constructor, and compare the number to the minimum and maximum values for ...


7

Mine: The fix is a programming language: CSS becomes a fully bloated format with stuff I wrote in a recent project because realplayer uses DoPlay() instead of Play(). Instead, I've experimented until I've come up what to fix. At least it's better than hammering F5. You should warn the user before he begins using the system. I'm very happy to confirm the ...


6

I am using Py-StackExchange in our Stack2Blog application. How do I retrieve a list of answers of a specific user using this wrapper? After retrieving a user object, the .answers member variable returns an empty list while I know the user does have posts.


5

I think Py-StackExchange is your best bet; there's an API V2.0 branch that seems to be active.


4

In .NET 2.0, and you'll benefit a file is changed, that's not possible to do this using JavaScript and a font that isn't fixed-width... it doesn't have special rules in terms of what expressions you can pass the result to setTimeout, you want to get only the minutes and constrain the generic type to those types that implement IComparable, then use a switch ...


3

Edit: My problem below has been "solved", and it's a problem with the fact that I'm getting back gzip-compressed data from stackapps. See the SO Answer. I'm still unsure why this happens only on my computer (possible reason: routers in my network adding content-headers), but I'm guessing this should be fixed in the wrapper itself. Come to think of it, the ...


3

I realize this is rather old, but I thought someone might get a laugh out of some of these: Ask Ubuntu: A Happier Update The problem now seems to lie with the new kernel. You should (according to what I find) be considered closed, methinks. Was there any special reason you wanted to use this site? Hahaha. the meaning is the opposite. What is ...


3

This thing is so hilarious. I love it. Here are some generations from AskUbuntu: Open the Software Sources application. Go to the Additional Drivers tab. Choose the closed source driver for your hard-drive, the chance of possibility you need it for some reason, but it's not that easy to install instead of Windows (WARNING: THE LATTER WILL DELETE ALL YOUR ...


3

Example of Explicit Authentication: Explicit authentication is relatively straightforward with Stack.PY. Assuming you have already registered your application, the instructions look something like this: Visit your application's page to obtain the following information: key client ID client secret Provide Stack.PY with the above information: from ...


2

Possible bug in the latest build? Found this (excellent) library via a Bryce Boe post and dropped in Py-Stackoverflow via easy_install. Running the script triggered the following, however: sog@bishop:~/Dropbox/Code/StackOverflow$ ./minestack.py Traceback (most recent call last): File "./minestack.py", line 3, in <module> from stackexchange ...


2

Explanation of the uppercase and lowercase letters (specifically [, \, ], ^, _, `). innerHTML is not a regex like this: \D(\d{4}\s\d{3}\s\d{3})\D \D will be automatically escaped for you. You use this method, the text will be 2 as well. If you use this is the case, try a regex for this: String yourString = "<210>; On to say that $result is false ...


2

Arqade has a lot of potential for this, here are some of mine: Dead is especially fun to use. The process requires a lot of Monuments after you buy EotN for the player who got the final hit, and only if it was gathered from rather than destroying it, so it needs to be done at time of activation. For example, I currently have a streetpass team that is ...


2

Downgrade isn't necessary for your problem. Just switch to Ubuntu Classic from the /app folders: [Icon Theme] Name=Faenza Humanity Inherits=ubuntu-mono-dark,humanity,hicolor Comment=Custom Faenza + Humanity Theme for Jorge Castro Directories=apps/16,apps/22,apps/24,apps/32,apps/48,apps/scalable [apps/16] Size=16 Context=Apps Type=fixed [apps/22] Size=22 ...


2

OK, I'm probably missing the obvious, but how do I get the body of an answer? For example, in your code snippet: >>> so = stackexchange.Site('api.stackoverflow.com') >>> me = so.user(41981) >>> me.answers.fetch() >>> me.answers[0].body Traceback (most recent call last): File "<pyshell#45>", line 1, in ...


2

Product design question: Would you like an answer's comments to also appear within the blog post's draft? Would you like these comments replicated as comments of the blog post? Or are they best left unused in the blog post as they have no place there? Let me know your preferences.


2

No, you can't do it because py-stackexchange is a library based on SE API that does not provide that kind of search. You should use Google API search instead.


2

Well, my bad - I forgot to set the Content-Type header. Fixed code snippet: def oauth_explicit_two(client_id, client_secret, code, redirect_uri): params = {'client_id': client_id, 'client_secret': client_secret, 'code': code, 'redirect_uri': redirect_uri} headers = {'Content-Type': 'application/x-www-form-urlencoded'} # <--- ...


1

Two of the demo scripts currently do not work because there is no 'answers' field in the json :( It might be an ugly workaround, but for now this diff does the trick: badp@delta:~/Py-StackExchange$ git diff 0a5c60f71310757a4c1de6547cf113c7d6834e85 diff --git a/stackexchange.py b/stackexchange.py index 959cf3e..4a17b10 100644 --- a/stackexchange.py +++ ...


1

Using the most recent version of the library as of yesterday. I needed to get some information on users answers and the question itself. However this didn't work. Every time I tried to access another page of answers I got () answers = me.answers.fetch() answerDetails = [] while True: for answer in answers: answerDetails.append({ ...


1

Trying to run this on openSUSE 11.2, getting an error message: sathya@shaman:~/Download/stacktracker> python StackTracker.py Traceback (most recent call last): File "StackTracker.py", line 1, in <module> from PyQt4 import QtCore, QtGui, QtWebKit, QtNetwork RuntimeError: the sip module implements API v6.0 but the PyQt4.QtCore module requires ...


1

Hi, I've got some problem using ST under Ubuntu 10.04. This is what I get when I launch >> python StackTracker.py: This is the window while I enter the URL: And this is the window after the URL to be tracked is submitted: Any thought and/or advice for the troubleshoot? EDIT: Version 0.4 works! YAY!!!


1

I am running py-stackexchange v1.1-4 and I'm hitting a strange issue after not touching this library for perhaps eight months or so... My queries used to be relatively fast... I could get results in 30 seconds. Now my queries literally take hours with the same code... example query: def filtered_question_dict(sesite, mytags, pagesize=100, ...


1

Based on the demo *recent_questions.py* example, I am using the following code to retrieve the 10 most recent questions at the command line: so = stackexchange.Site(stackexchange.StackOverflow) questions = so.recent_questions(pagesize=10) for q in questions: print "question retrieved:", q.title.encode('ascii', 'ignore'), "\t", q.id ... As you can ...


1

I was willing yo use your lib to do some statistics on the questions from SO (just for fun, nothing really serious, though it can become serious if I like the results :P). For this I'd have to get the data from I whole bunch of questions. As an example, I tried to get all questions from roughly 1 month (2e6 seconds). I tried this: import time from numpy ...



Only top voted, non community-wiki answers of a minimum length are eligible