Tag Info

Hot answers tagged

100

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 ...


15

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 ...


10

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 ...


9

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 ...


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, ...


9

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 ...


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

# Heap of (non-prime, prime factor) tuples. Todel = [ (4, 2) ] n = 3 while True: if all(candidate in text for text in commands[:]: if "rm " in cmd: commands.remove(cmd) Just compile and disassemble your architecture on your specific build of dis by calling dis.dis(f1), here is the Windows API you might want to give defaults for instance ...


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 ...


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.


6

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 ...


5

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


5

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 ...


4

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 ...


4

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

For some answers, the answer doesn't make a lot of sense without the question, so having the option to include a part of the question would be great (at least displaying the text in the page so the poster can select what's relevant).


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

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 ...


3

Oh, hilarious! Here are some of mine from AskUbuntu: Unfortunately, most versions get a big change that there is a hidden recovery partition somewhere. From my experience it shouldn't be aware that it is a pretty advanced tool. You always trust Amazon. (Yeah sure..) Ok, In the window that pops up, copy and paste the following: [Desktop Entry] ...


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

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

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

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

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

The token does not appear because of the way urllib2 handles the redirect. I am not familiar with the details so I won't elaborate here. The solution is to catch the 302 before the urllib2 handles the redirect. This can be done by sub-classing the urllib2.HTTPRedirectHandler to get the redirect with its hashtag and token. Here is a short example of ...


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'} # <--- ...


2

Example - Downloading a question with its body from stackpy import Site site = Site('stackoverflow') question = site.questions(1732348).filter('withbody')[0] print '--- %s ---' % question.title print question.body


2

Stack.PY George Edison has announced Stack.PY, with support for 2.1.


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

When I try running the code with python 3.4 I always get this error: AttributeError: 'HTTPMessage' object has no attribute 'getheader' Here is the full traceback. I'd be very happy if any of you could tell me what the problem is. Is it the fact that I'm using python3? I converted the example files using 2to3 and it seems to me that it should work fine... ...



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