-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I am using lxml with
tree.write(xmlFileOut, pretty_print = True, xml_declaration = True, encoding='UTF-8'
to write out my opened and edited xml file, but I absolutely need to have the xml declaration as
<?xml version=“1.0” encoding=“UTF-8”?>
and NOT
<?xml version='1.0' encoding='UTF-8'…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I've found what I think may be a bug with Ivar and Objective-C runtime. I'm using XCode 3.2.1 and associated libraries, developing a 64 bit app on X86_64 (MacBook Pro).
Where I would expect the type encoding for the following "longVal" to be 'l', the Ivar encoding is showing a 'q' (which is a 'long…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm trying to send a http request using WS.url() with a action receive a custom class parameter like
public static void add(@Valid MyPage info) {...}
There is a Map in MyPage
@Required
public Map<String, String> content = new HashMap<String, String>();
But When I try to send a request…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I am writing a program that a part renders a bitmap font in CP437.
In a function that renders the text with I want to be able to check whether a char is available in CP437 before the encoding conversion, like:
public static void DrawCharacter(this Graphics g, char c)
{
if (char_exist_in_encoding(Encoding…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I try to detect which character encoding is used in my file.
I try with this code to get the standard encoding
public static Encoding GetFileEncoding(string srcFile)
{
// *** Use Default of Encoding.Default (Ansi CodePage)
Encoding enc = Encoding.Default;
// *** Detect byte…
>>> More
-
as seen on Programmers
- Search for 'Programmers'
I have always been skeptical of rewriting working code - porting code is no exception to this. However, with the advent of TDD and automated testing it is much more reasonable to rewrite and refactor code.
Does anyone know if there is a TDD tool that can be used for porting old code? Ideally you…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
This is very basic question from programming point of view but as I am in learning phase, I thought I would better ask this question rather than having a misunderstanding or narrow knowledge about the topic.
So do excuse me if somehow I mess it up.
Question:
Let's say I have class A,B,C and D…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Is there an accepted general term that subsumes the concepts of variables, class instances and arrays? Basically "any typed thing that needs memory". In C++, such a thing is called an object, but I'm looking for a more language-agnostic term.
§ 1.8 The C++ object model
1 The constructs in…
>>> More
-
as seen on Programmers
- Search for 'Programmers'
A lot of the code I've been working on recently, both professionally (read: at work) and in other spheres (read: at home, for friends/family/etc, or NOT FOR WORK), has been worked on, redesigned and re-implemented several times - where possible/required. This has been in an effort to make things smaller…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi there:
I might be doing a coding competition soon, I was wondering if anyone made one and what where the guidelines/ process.
I'd like to make the competition appealing to all devs, and I m trying to come up with ideas as to how.
the scenario is: There is an event running and we(of the coding…
>>> More