Quantcast
Channel: User Michael Madsen - Stack Overflow
Browsing all 37 articles
Browse latest View live

Comment by Michael Madsen on Undefined reference to `sin' when passing...

@rullof: Look carefully at the compiler selection: You're compiling the one with double as C++ code. Your failing example is compiling as C code - and this is enough to change things. If you compile...

View Article



Comment by Michael Madsen on Tic Tac Toe Computer Player (not AI)

Relevant xkcd: xkcd.com/832

View Article

Comment by Michael Madsen on How to increment variable under DOS?

I'm pretty sure plain DOS can't do this. Write an actual program instead (there are plenty of languages to choose from, e.g. Turbo Pascal or C, maybe even QBasic).

View Article

Comment by Michael Madsen on Segfault with pointer to char inside struct,...

@vinnylinux: You should still use memset since you don't know what might be in that piece of memory. Alternatively, you could use calloc instead of malloc to have it cleared during allocation.

View Article

Comment by Michael Madsen on Acronym, do you use them? And Why?

@magallanes: ...Annoying Acronym Abuse Addicts Anonymous?

View Article


Comment by Michael Madsen on Fatal error:Call to undefined function

There's nothing to fetch on non-SELECT queries. What do you expect the database to give you?

View Article

Comment by Michael Madsen on CSS transform: translate() not working in...

From the caniuse page you linked to, under "Known issues": IE doesn't support CSS transforms on SVG elements (version 11 or prior). I don't think you can do much unless you move the transformations...

View Article

Comment by Michael Madsen on Hiding Tkinter root window while showing modal...

@NorthCat By making the dialog modal, the calling class will wait for the dialog to be closed before moving to the next line of code. If I use a regular window, then it will continue execution of the...

View Article


Comment by Michael Madsen on Hiding Tkinter root window while showing modal...

Your answer made me realize that the problem is actually only the call to transient; the other two lines are fine. I never thought to remove transient, because that's part of what makes it a dialog and...

View Article


Comment by Michael Madsen on ANSI vs SHIFT JIS vs UTF-8 in c#

@user145610 When writing data, an encoding is a function which takes a character and converts it to a specific sequence of byte values. When reading data, it works in reverse: it takes a sequence of...

View Article

Comment by Michael Madsen on Last inserted id from specific table

@StefanoMessina That will only be the case if the table is empty. If there are any rows, it will return the one with the largest ID, regardless of gaps. What you want to do in that case depends...

View Article

Answer by Michael Madsen for Is write / Save / :w the same in gVim

"Save" is the standard term for "write everything to disk", and that's what plain :w does.However, :w also has a number of additional arguments which can make it do other things, such as append part of...

View Article

Answer by Michael Madsen for Is there any Windows 8 speech to text and text...

Windows has full API support for both speech synthesis and recognition.However, note that Windows itself only supports speech recognition for a few languages. I do not know if it is easily possible to...

View Article


Answer by Michael Madsen for generic form of std::istream::read?

One option would be to simply wrap the stream. Something along these lines (not tested):class ObjectStream{ std::istream& _is; public: ObjectStream(std::istream& _is) : _is(is) {}; template...

View Article

Answer by Michael Madsen for In VB.Net, What is this called -->�

This is the Unicode Replacement Character, which is inserted instead of invalid Unicode characters. It has no special VB.NET name.The most common cause is using an incorrect encoding when reading a...

View Article


Answer by Michael Madsen for MYSQL installer for Windows 7 64 bit OS?

From that very page: Note: MySQL Installer is 32 bit, but will install both 32 bit and 64 bit binaries.The different sizes is because the smaller one is a web installer, which doesn't download the...

View Article

Answer by Michael Madsen for My chip8 implementation according to...

Chip-8 registers only contain a single 8-bit byte. A single byte can only hold values between 0 and 255 inclusive.If an operation gives you a value which is outside the range of an 8-bit byte, you need...

View Article


Answer by Michael Madsen for How does CHIP 8 graphics rendered on screen?

First of all, note that the pixels are bitpacked - each byte will contain 8 pixels of sprite data. In other words, the byte 0xAA is a single-pixel tall sprite with the first, third, fifth and seventh...

View Article

Answer by Michael Madsen for Strange C# Syntax bug - one line is not...

The thing that looks like a minus sign (–) is actually an en dash - it should be a plain hyphen.

View Article

Answer by Michael Madsen for Python py2exe window showing (tkinter)

An alternative to dll_excludes and manual copying is to patch py2exe to know these files have to be placed directly in the dist directory.Inside build_exe.py, there's a class called py2exe, which...

View Article
Browsing all 37 articles
Browse latest View live




Latest Images