I have this loop
for (it= someCollection.iterator; it.hasNext(); )
{
//some code here
}
I changed it to:
for (it= someCollection.iterator;; )
{
if (!it.hasNext())
break;
//some code here
}
The second code ran a little bit faster in unit tests in junit on eclipse.
Is the second loop faster? I'm asking because the times given by Junit are not too exact, but they give an approximate value
If I made a homepage with an embedded .swf which had buttons that linked to other html pages on my website using the getUrl() function, would those links be spiderable by google? Or should I also put in text links outside of the .swf (which would ruin the design a bit)?
I know a lot of people will argue I shouldn't have flash as the main content on the homepage (and their comments are appreciated), but bear in mind, that's not my question.
have the tweetmeme button on my site (http://SweatingTheBigStuff.com) and I want to add a facebook button BELOW it.
Right now the tweetmeme settings show:
float: right; margin-left: 10px;
What's the best Facebook plugin for this and what settings do I need?
I think the Simple Facebook Share Button should be good but I'm not sure the bit of code I should put to move it below the tweetmeme button.
Question:
I want to loop over all open tabs in Internet Exporer (for all open IE windows) and save the URL in a text file. How can I do that ? I have windows 7 32 bit and IE 8.
Code for Firefox/Google chrome would also be welcome.
There are links to some papers on D* here, but they're a bit too mathematical for me. Is there any information on D*/D* Lite more geared towards beginners?
Hi all!
(Objective C)
Just using simple AudioServicesPlaySystemSoundID and its counterparts, but I can't find in the documentation if there is already a way to find the length of an audio file.
I know there is AudioServicesGetPropertyInfo, but that seems to return a byte-buffer - do audio files embed their length in themselves and I can just extract it with this?
Or is there perhaps a formula based on bit-rate * fileSize to convert to length-of-time?
mIL3S
www.milkdrinkingcow.com
If I obfuscated python code, would it provide the same level of 'security' as c#/java obfuscating?
i.e it makes things a little hard, but really you can still reverse engineer if you really wanted to, its just a bit cryptic.
As more presentational html properties get deprecated the natural response for me was to make single property CSS classes such as .text-align-left{text-align:left}. My question is, is this preferred versus inline styles?
Stackoverflow actually uses quite a bit of inline styles.
PS: I know this isn't really a coding question and it is likely to incite debate but stackoverflow is the largest stack exchange for code and this question does have some use for future individuals.
Is there a way to check in VS how much time did I spend on particular project? It's just I feel that I'm not working fast enough and seeing the actual time I spent would probably kick me in my ass and maybe I would speed up a bit.
Thanks.
I've got a Registry class and there are a few Registry values that I want to access from within that Registry class. (There is a bit of a calculation with these values so I thought I'd just put all that code right in the Registry Class itself).
So we might have something within our RegistryRoutine.cls like:
Function GetMyValue() as integer
Dim R as new RegistryRoutine
<calculations>
GetMyValue=R.GetRegisetryValue (HKEY, key, value, etc.)
End Function
Question for indie Mac developers out there:
How do I implement a 30-day time trial in a non-evil fashion? Putting a counter in the prefs is not an option, since wiping prefs once a month is not a problem for an average user. Putting the counter in a hidden file somewhere sounds a bit dodgy - as a user I hate when apps sprinkle my hard drive with random files. Any ideas?
hi,
I have a sequence of couples of elements. (.div1, .div2) I'm using position:relative attribute on .div2 to move it a bit on top and right with respect to div1.
However .div1 elements have different content and heights, so the relative positioning of .div2 is not consistent (they sometimes are too high, sometimes too low).
.div2 {
position:relative;
left:200px;
top:-300;
}
thanks
Hi all,
I am a new silverlight user and struggle a bit with the coding.
Could anyone please help me.
What I am trying to do is create a list of checkboxes in a stackpanel on my application at runtime.
The amount of checkboxes is determined by the amount of classnames in my sql database.
I am using vb
I hear about it a bit in tutorials that I watch, that certain things won't work if javascript is disabled. Occasionally I see workarounds.
The question is, are these relevent? I can't imagine anyone not having a javascript enabled browser nowadays, except the most ancient of phones, and chances are your page won't render on them properly anyway.
Do people still bother to write backup code for javascript being disabled?
Google didn't turn up anything that seemed relevant.
I have a bunch of existing, working C++ code, and I'd like to use python to crawl through it and figure out relationships between classes, etc.
EDIT: Just wanted to point out: I don't think I need or want to parse every bit of C++; I just need something smart enough to pick up on class, function and member variable declarations, and to skip over function definitions.
Hi,
I'm having a bit of a strange problem with an application using the Files.probeContentType(path)-method to test for file type: On both my Ubuntu and Fedora systems, it works fine, but when moved to a RedHat Enterprise server (2.6.18-194.el5 #1 x86_64 x86_64 x86_64 GNU/Linux), it only returns null. I'm using java 7 early access (1.7.0-ea-b84). I have to use this version due to functionality that isn't included in 1.6.
Does anyone have an idea of what might be the problem here?
Hello,
There is a website (very simple) which will be updated soon and I'd like to receive an alert at the moment it changes (like a sound, a popup,...)
I guess I should send request every x minutes and compare the result with what's now but I don't know how to do that.
I don't really care about the language used, I know java, python, php, a bit of c and bash (I'm on linux)...
Thank you
hello.
Is there significant cpu/memory overhead associated with using automatic arrays with g++/Intel on 64-bit x86 linux platform?
int function(int N) {
double array[N];
overhead compared to allocating array before hand (assuming function is called multiple times)
overhead compared to using new
overhead compared to using malloc
range of N maybe from 1kb to 16kb roughly, stack overrun is not a problem
Thank you
Hello All,
I have a following ArrayList,
[Title,Data1,Data2,Data3]
[A,2,3,4]
[B,3,5,7]
And I would like to convert this one like this,
[Title,A,B]
[Data1,2,3]
[Data2,3,5]
[Data3,4,7]
I'm bit confused with the approach. Any hint would be much appreciated.
Thanks.
Hi everyone!
When changing the orientation of the iPad, my app rotates its view very fast. It is difficult to perceive the transition between both orientations. I would like to increase a little bit the duration of this transition.
Does anyone know how to increase the duration of this transition?
Thanks!
Hello All,
it's just my curiosity to know that why phpmyadmin behavior in different manner when we modify query a bit( putting extra space) then headers of query results, sometime comes in Button format( on hover it say sort, but sorting not working at all) and sometimes in blue link
is there any difference for this or it just causing by some othe reason?
i m attaching both images.
Button headers
Link headers
I'll need to show "loading..." while my widgetapp get update, it will update from the activity.
I need this because the update need a litle bit time while the widgetapp show an error to loading it self.
Thanks