Hot answers tagged

22

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


20

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


17

Oh, hilarious! Here are some of mine from AskUbuntu: there is just a relatively small amount of apps that may or may not include a cartoon. 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] Type=Application Name=...


16

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


15

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


15

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


14

Here are some of the best snippets I've seen so far. From Stack Overflow, You should be downloaded. Me.load. the given URL actually points to a coincidence. Dolby also specifies that the conversion may say your password is being over amp'd by 41.4%. The server/client then downloads the author. leave out advanced features like this until you find your ...


10

Some of my own "quotes" from Stack Overflow: I know, there is no way to explain the way Python treats variables and parameters. This will remove all characters on Earth. I modified the function and now it's just "Hello World!". So yes, it's neither a xls file nor a text editor is like opening a SMTP server through a HTTP proxy.


10

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


10

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


9

These are my favorites on Meta Stack Exchange: the bounty will be the best advice and you may find yourself in rough seas. Not? Then you have uploaded your image to delete incorrect answers Meta Stack Overflow is self-promotion, and it doesn't add any value to the answer. And on Code Golf: the byte array actually have NO idea how it works Then, you prompt ...


5

I am trying to use the Search option to get the list of results from SO. I have tried using pagesize=50 and I still get large number of titles returned. Is there another option to limit that search? Sorry if I am posting this the wrong way or in the wrong area but I am new to Stack Overflow and to programming as well :) This is the part of the code I am ...


5

Total results vary with page size The idea of producing a transparent iterator (getting the next page as needed) is cool, but it just isn't working; the page size affects the total number of results returned (apparently to a multiple of the page size)...:-( My code needs to look at all Qs asked for a given tag in a given month: def qstats(site, tag, month,...


4

Here are some from my answers on SuperUser: Remedies Here are some actual reasons why an application developer felt that Dalvik was released (or maybe the race condition still exists, and you're just really!) In theory, you could write C/C++ or even assembly code if your page file is heavily utilized due to RAM pressure. The default behavior of Windows is ...


4

status-completedI asked this as a question, but apparently the convention is to report bugs/feature requests in the announcement thread. It appears, that the MathJax extension mhchem is currently not enabled in the StackPrinter app. This is rather inconvenient for most of the chemistry.se questions and answers. It would therefore be nice if this feature ...


4

The \r\n issue was solved when I changed to a POST request. But, since I was retagging questions (didn't really need to change the body, just resend it), I ended up using the body_markdown, encoded with HTMLParser.HTMLParser().unescape() body_markdown = str(HTMLParser.HTMLParser().unescape(question_data['items'][0]['body_markdown'])) And then sending it ...


3

Great design and great idea. I don't know whether many people still look at this, but I discovered it today and if it was advertized and used more. Some suggestions for Stackathlons: Quantitive Finance and Economics. This one has suprisingly few, while the disciplines are quite closely related. I tried to add another one, but then it gives probably zero ...


3

These all come from my mechanics.stackexchange profile. There's a post here: whatconsumer.co.uk whose top post seems to be burning an over-rich fuel mixture. Hmm, I wonder what they're running their servers on. Use a sponge with some water in it to disconnect the battery, it doesn't harm on the engine or the transmission Well, I hope not! Great question!...


3

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


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


3

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


2

Here is a small script (stackprinter) which uses Stack Printer from the command-line: #!/bin/sh type wkhtmltopdf || { echo >&2 "wkhtmltopdf command is required. Aborting."; exit 1; } : ${1?"Usage: $0 (url)"} URL=$1 && shift HOST=$(echo $URL | egrep -o "([.[:alnum:]]*?)\.(com|net|org)" | head -c-5) QID=$(echo $URL | grep -o "\d.*/" | head -c-2)...


2

The API was working but now I receive an error when I try to run the demo examples. Sample error dump: /usr/bin/python2.7 /home/donbeo/PycharmProjects/stack_overflow/experience.py StackOverflow user 41981's experience: Traceback (most recent call last): File "/home/donbeo/PycharmProjects/stack_overflow/experience.py", line 13, in <module> user = ...


2

import stackexchange so = stackexchange.Site(stackexchange.StackOverflow) comment = so.comment(valid_comment_id) the above code returns the following error in init.py: --->166 self.post_type = PostType.from_string(json.post_type) 167 168 def _get_post(self): AttributeError: DictObject instance has no attribute '...


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

Step 1: I would like to retrieve all the related tags of a particular tag using your package, much like what is accomplished here. Step 2: I would like to find the intersection between two lists of related tags. RELATED: https://stackoverflow.com/q/19898666/307454


2

This isn't really a place to code-review your script, even if it uses the API. Here is were you would publish your script1. However, after a quick glance at the code, I don't see any glaring problems. But, if you start making lots, or rapid, calls you will need to check and respect the backoff value and the quota_remaining value. The API documentation is ...


1

supportstatus-resolved I've been searching for a Stack Exchange offline version, for research purposes at my University, then I found this. I have been trying to figure out how to exactly run the software program on my Mac OS X Yosemite. I have downloaded the entire data dump and everything that it requires: Python, version 2.7.12 Java, version 1.8....


1

Question: How do you request all Tags? Retrieving a list of tags on a given Stack Exchange site with Stack.PY is relatively straightforward: from stackpy import Site sa = Site('stackapps') for t in sa.tags: print t However, this will only fetch the first 30 tags. The tricky part is fetching more than one page. You can fetch any particular page by ...


1

FWIW, this library has undergone a major overhaul and now lives as a much happier Pythonic module (went from ~450 LOC to 66) and can be found at https://github.com/demianbrecht/sanction.


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