workaround

Java Runtime Exec on Windows Fails with Unicode in Arguments

I want to launch a browser and load a web page using Java's Runtime exec. The exact call looks like this: String[] explorer = {"C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE", "-noframemerging", "C:\\ ... path containing unicode chars ... \\Main.html"}; Runtime.getRuntime().exec(explorer); In my case, the path contains ...

Workaround for css3 multi-column image bug in webkit?

There's a known bug in webkit, where it cut's up images that happen to span multiple columns. Firefox gets it right and I don't give a rats ass about IE as doesn't know how to render multiple columns at all and degrades gracefully to one big column instead. Does anyone know of any decent workarounds for this issue that doesn't involve b...

Is there a .Net 1.1 compatible String.GetHashCode implemented in .Net 2.0 code?

I have an existing app in which I made the mistake of using String.GetHashCode and persisting it to disk. Now that I'm upgrading the app to .Net 2.0 I find that that decision has come back to bite me in the butt. I'm interested to know if anyone knows about a .Net 2.0 implementation of a .Net 1.1 compatible string hashing algorithm. O...

Java workaround for BigInteger

I was working on a scenario wherein i had to implement BODMAS in Java and the operands could have as many as 1000 digits. So i chose to implement it in the following manner - I converted the infix expression (expression on which BODMAS was to be implemented) to postfix And then i evaluated the postfix expression by parsing every BigInt...

log in with browser and then ruby/mechanize takes it over?

is that even possible? what I need to pass to mechanize? With what url I can start then? I cannot manage (so far) to log into one website using mechanize so I was thinking if I can do this little workaround. I believe I can capture all cookies and everything else and then pass it to ruby/mechanize to do the rest ... screenshots below a...

Is there a workaround to Safari's/Opera's bug that you can't tab through hyperlinks?

In IE, Firefox, Chrome and most Windows-based interfaces that I've used, the Tab key can be used to navigate from one form field or hyperlink to the next (e.g. "actionable" items) (note: I have not tested on other Operating Systems) However Safari and Opera skip all hyperlinks in a web page when tabbing. IMHO its a usability bug but I ...

Workaround for the Mono PrivateFontCollection.AddFontFile bug

When I call the PrivateFontCollection.AddFontFile method in Mono.net It always returns a standard font-family. This bug has already been reported on several websites, but as far as I know without a way to solve it. The bug itself isn't fixed in the Mono-libraries yet. Is there any workaround for it? EDIT: As a reaction on henchman's ans...

Is it possible using JPA to stream results from javax.persistence.Query.getResultList() ?

Hello, I'm new to JPA and I'd like to know if it is possible to stream data from a result set, I mean I do not want to wait that the query is performed to start dealing with first results, for instance in the case of a batch. Is there any possibility using the JPA API or any community adopted workaround ? Eventually using a feature of ...

How to workaround gcc-3.4 bug (or maybe this is not a bug)?

Hello, Question Following code fails with a error message : t.cpp: In function `void test()': t.cpp:35: error: expected primary-expression before '>' token t.cpp:35: error: expected primary-expression before ')' token Now I don't see any issues with the code and it compiles with gcc-4.x and MSVC 2005 but not with gcc-3.4 (which is s...

Looking for workaround for IE8 opacity bug

One of my css styles has a black background color and a filter with an opacity. This is supposed to be translucent and almost always is. There is one exception to this. IE8 doesn't play nice with a lot of Microsoft's other products, and update panels in .NET seem to be one of them. If I have an updatepanel that sends a javascript aler...

Same-origin policy workaround using document.domain in Javascript

I am running into same-origin policy issues in Javascript. I've read about a workaround for this using the document.domain variable, but I cannot get the workaround to work. The workaround is that you are supposed to be able to set document.domain to 'example.com' so that if you run code from foo.example.com it can load data via XHR fr...

How do I clone over HTTP a repository that has no info/refs?

Given a repository served over HTTP whose owner forgot to chmod +x hooks/post-update, is there a workaround for cloning it? I tried running wget --mirror url, but rather than fetching the subtree only, it tried to mirror the entire site—which I assume happened due to the parent-directory links in the autogenerated index.html resources. ...

Changing the working directory for a process remotely

I've got an application that has a bug right now, but we're unable to update the end-user to get the fix out. What a possible workaround would be is to change the working directory to the application's install directory, but from what I can tell, there's no way to do that outside of the program itself. Is there some sort of Windows API c...

Need help with this SQL

Hi guys, I am very very new to mysql. I am trying to execute the following query. update share set holder = 22 where SHARE_ID IN (select SHARE_ID from SHARE WHERE holder=1 LIMIT 10) When I try to execute the above query I am getting this error #1235 - This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery' ...

FInding the hard disk storage capacity programmatically

How do I find out the storage capacity of my harddisk without using the OS functions like dir or ls? ...

Delegates and ParamArray - Workaround Suggestions?

Some predefined methods contain a ParamArray in their signature. Delegates, however, cannot contain a ParamArray in their signature. Question: Assume you wish to create a delegation mechanism for a specific method which requires a ParamArray. How would you work around this constraint? EDIT: just to make clear, assume you cannot change ...

Workaround for missing group_concat on MySQL 3.23

I developed a script on MySQL 5.1, not realising the client is stuck with MySQL 3.23. It makes significant use of GROUP_CONCAT() and particularly GROUP_CONCAT(DISTINCT), to reduce a column of values down to a succinct, comma-separated list. So, are there any workarounds? The best I can think of is doing a separate query to just get the ...

IE7 textbox onfocus problem

Because IE won't do document.getElementById(ID).setAttribute('type','password') I've re-engineered the way the password field woirks on this site: http://devdae.dialanexchange.com/Default.aspx so it works in accordance with this idea: http://www.folksonomy.org/2009/01/12/changing-input-type-from-text-to-password-in-internet-explorer-...

Chrome and Safari strange behaviour in Javascript

Hi, i've written this peace of code: var a=function(){ }; a.name="test"; a.prop="test2"; Now if i debug the code with the console: console.log(a.name); console.log(a.prop); In Firefox i get a.name="test" and a.prop="test2", while in Safari and Chrome i get a.prop="test2" but a.name="". It seems that there's no way to assign a "na...

MediaWiki: workaround for watchlist restricted to 7 days?

I'm running MediaWiki 1.13.2. When I go to my watchlist, I'm limited to only viewing the last 7 days (though MediaWiki should permit me to view the last 30 days). I've tried: Clicking the all button Changing the URL Changing the settings under MY PREFERENCES->WATCHLIST. When I save (e.g. 30 days) it resets back to 7 days! Googling fo...