I saw JavaScript code which begins with with. That's a bit confusing. What does it do and how can it be used correctly?
with (sObj) return options[selectedIndex].value;
Hi,
What is the difference between sizeof(3.0) and sizeof(3.0f)
I was expecting both of them to give the same result (sizeof float)..but its different.
In 32 bit machine,gcc compiler,
sizeof(3.0f) =4
sizeof(3.0) = 8
Why so?
Possible Duplicate:
How to get the Nth digit of an integer with bit-wise operations?
I spent more than one day trying to solve this problem but I couldn't find a solution.
I have a function named get_nth_digit(int x, int pos);.
int x is a number given by the user, int pos is the number that represents the position of the digit in the number x the user wants to get.
How can I do this? Can anyone help?
Just wondering if there is any easy way to start a debugging session that lauches the server and the client by simply pressing F5.
As it stands I have to F5 to debug the server, then find the client project and right click-Debug, which is a bit fiddly.
Any tips to get this to work more smoothly?
I'm doing an educational project in which 1) I record voice commands on a separate device and after appropriate processing etc... 2) I send 16-bit samples encapsulated in UDP packets over Ethernet to the PC.
After receiving the packets and "extracting" data (samples) from them, I need to assemble the samples to a WAV file.
Any example code? Any suggestions?
Hi,
I am interested in getting the profiling of some number crunching program. I compiled it with -g and -pg options and linked it and got it gmon.out. After reading the info (plain text) it looks a bit ugly. I wonder if there are some open source tools for getting a graphical representation of the 10 functions where the program spends the most of the time as well as a flux diagram.
Thanks
I tried to program a little Application
in C++, but i just keep getting Compile Error like this
(GGC)
initializer element is not a constant
Here's the Code:
http://bit.ly/aHH81e
lg
The title is a bit difficult to put together for this question.
Say I have two models, Foo and Bar. Foo has many Bar's. Bar belongs to one Foo. How do I use Foo.find to find all of the Foos that currently have zero Bars? In SQL this would translate into something like:
SELECT * from foo where id NOT IN (select foo_id from bar);
Hello all,
I am having an issue with an actionscript event that I am firing every time a flex componenet resizes. In the event, I am altering the height of the component (adding a bit of a buffer), which causes the event to loop in upon itself and continually add height to the component.
Is there an elegant way to have this event only fire once?
I've been trying to take apart this app which creates a search tree based on keywords, but I'm afraid its a bit too complex for me. Would anyone mind explaining it?
The format is off, so here's a pastebin (is pastie.org down?) version of it.
Any help is appreciated.
I have a div (.header) contained within other divs. When my page loads, momentarily just that one .header div "flashes" white as the page is loading, especially in in Firefox, but a little bit in IE8 too. I can't find what kind of CSS or lack thereof is causing this - there's no images or background color associated with that div. There is a logo.png within the .header. Thoughts?
http://dev.bwmsnow.co.nz/
Is there a common way to show a big image and enable the user to zoom in and out and pan the image?
Until now I found two ways:
overwriting ImageView, that seems a little bit too much for such a common problem.
using a webview but with less control over the overall layout etc.
I have one form opening a second form which is meant to look like it's replaced the first form but it opens a bit to the right and down which ruins the effect.
If there a way to make it open wherever the first form may be?
I am using visual studio, in C++
Ok this situation is a bit difficult. But I am trying to embed a Java Jar into a C# form. Not as a new window or new process.
The Jar will be a game that uses the LWJGL library.
The C# Form will be a "wrapper" for it with tools and more.
Anyone have any ideas? Is this even possible?
Hi,
I want to develop an application in which i doesn't any idea about how to create my app with which controller class i should i have gave?
My application first screen contain TabBarController and i have also inserting UINavigationController.
On above scenario i little bit confused which type of controller(confusion in TabBarController, NavigationBarController or simple ViewController ya windows based appliaction) should i take.
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.
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
I understand why data need to be aligned (and all the efforts made to accomplish it like padding) so we can reduce the number of memory accesses but this assumes that processor just can fetch addresses multiples of 4(supposing we are using a 32-bit architecture).
And because of that assumption we need to align memory and my question is why we can just access addresses multiple of 4(efficiency, hardware restriction, another one)? Which is the advantages of doing this? Why cannot we access all the addresses available?
hugs
I am just getting started with the Android SDK and I had a quick question. I am trying to set up a ListView with a rectangle of color on the left and then a bit of text for each row. I also want to make it so I can click each entry in the list and open a new activity to display some information (similar to the contact list). Anyone have any examples to help me out?
I am trying to write a script that I can give to user to have it automatically zip certain files of theirs and then load them onto an ftp site.
Anyone know where I could find information on writing a batch file for auto-zipping files using only what is available to a user running windows? I have been looking for quite a bit but I am struggling.
Thanks.
I think I'm being a bit silly here, but I keep getting errors complaining about the SERVER_NAME key missing from the env hash, and I can't find any substantial documentation on Rack::SendFile..
so- how do I serve up files?
I do not understand what is meant by the terms "compile time" and "run time" (or "runtime").
I'm also a bit confused about what "value type" and "reference type" mean, and how they relate to the 'times mentioned above.
Would someone please explain these things?
I have very little programming knowledge; only a fair bit in Visual Basic.
How do I take a value from a text field, then do some simple math such as divide the value by two, then display it back to the user in the same field?
In Visual Basic you could just do txtBoxOne.text = txtBoxOne.text / 2
I understand this question is more than one question and is very basic stuff, but I need to get my head out of Visual Basic and into where I should be :)
I have a practical exam in web technologies so html, css, javascript and (possibly) php. I'm still learning and just wondered if you guys had any advice. HTML im fine with, css sometimes takes me time to get right and javascript and php get a bit messy! It's open book, so what would you suggest taking with me?
Hello, some one know how can I manipulate on some configuration over all projects in solution?
For example, I create new configuration "Releas64" that means: "No debug, 64 bit, all files goes to c:\binaries", but I need to go over all 30 projects in our solution for to set those settings for every project.
Is there some tool?
Thank you for ahead.