write a program to find the sum of the logarithms of all the primes from 2 to some number n, and print out the sum of the logs of the primes, the number n, and the ratio of these two quantities in python
Is ResultSet Thread safe?
My question arises because in this i have used a different statement for each query i have delsared a ResultSet as an local variable but it gives me a error of Operation not allowed after ResultSet is closed. But my statements are working as i'm using the statements in insert and delete query.I have commented the ResultSet part and have not got the error !!
The source code of my program can be referd to , in my earlier Question .
Hello,
So when your using ASP.NET Wizards to create a login, it uses a set of auto generated tables using the aspnet_regsql.exe tool...
When you create a user using the wizard it generates a very long userID
"a40cf936-1596-4560-a26c-450792e2c8c0" I want to add users using another program that connects to this database... but how does visual studio auto-generate this ID. I want to auto-generate it as well
Any ideas? Thanks in advance.
-Scott
My Python program does a series of things and prints some diagnostic output. I would also like to have a progress counter like this:
Percentage done: 25%
where the number increases "in place". If I use only string statements I can write separate numbers, but that would clutter the screen. Is there some way to achieve this, for example using some escape char for backspace in order to clear a number and write the next one?
Thanks
hi guys , when every one of us program in java he would need a library (some jars) to complete his work .
so when this programmer find some libraries he need . how he can find the best of these libs ?
thanks.
I'm getting the following line in the disassembly from objdump -d of an x86 linux program...
4000b0: ba 0e 00 00 00 mov $0xe,%edx
I'm trying to understand how the machine code "ba 0e 00 00 00" maps to "mov $0xe,%edx"
In the manual move immediate 32-bit is:
B8 + rd ... MOV r32, imm32
ie "B8" not "BA"
In fact none of the MOV opcodes are "BA".
If someone could break down "ba 0e 00 00 00" and explain bit-wise how to get to "mov $0xe,%edx" it would be most helpful.
I have been in an assumption that multithreading gives a lot of flexibility and power to make efficient programs. But I am wrong. Multithreading is sometimes not desirable as it will create serious impact on the way the actual program behaves.
My question?
I am not sure of when to use and when not to use multithreads in applications.
Please update this thread and give your opinions on multithreading and suggestions on its usage scenarios.
Hi i want to know what programs installed on my system, i use MsiEnumProducts and MsiGetProductInfo functions, but not all application what i can see in "Add/Remove Program" i get by this functions.
I'm writing a program that should display the amount of unread sms, mms, phone calls and emails. It was quite easy to find how to query for sms and phone calls (I used the search on this page) but I have not been able to find out how to query for emails.
Is there anyway to find out how many unread emails the user got in their phone?
Hi guys, any solution to this problem - given a list of numbers [1,2,3,4,5] write a Prolog program to sum up all the odd-positioned in this list ?
odd([1,2,3,4,5],Sum)
Sum = 9. (1+3+5)
My understanding is that by default gprof takes into account CPU time. Is there a way to get it to profile based on wall-clock time?
My program does a lot of disk i/o, so the CPU time it uses only represents a fraction of the actual execution time. I need to know which portions of the disk i/o take up the most time.
Hello
This is not homework, I need this for my program :)
I ask this question, because I searched for this in Google about 1 hour, and I don't find anything ready to run. I know that is trivial question, but if you will help me, you will make my day :)
Question:
How to copy text in string (from for example 8 letter to 12 letter) and send to other string?
I have string:
string s = "RunnersAreTheBestLovers";
and I want text from 8 letter to 17 letter in next string
Alice90
Hi all:
I'm looking for an accurate way to measure memory usage of a C# program under Windows operating system. I'm using Visual Studio for programming my code and I want to know its time consuming for performance. Really, I tried to use the Task Manager, but I do not get an accurate measurment.
Please, if any one know an accurate way to measure the memory consumption, please help me and thanks alot
Where do I find the lib files for linking my program when using some Boost libraries?
Decided to try its threading functionality but I am getting
Error 6 fatal error LNK1104: cannot
open file
'libboost_thread-vc90-mt-gd-1_42.lib' InterviewPractice
after I include
Error 6 fatal error LNK1104: cannot
open file
'libboost_thread-vc90-mt-gd-1_42.lib' InterviewPractice
I can't find where to get the .lib files for proper linking on the boost website?
Any tips? :)
Hello everyone,
Is there a possibility to take a picture using phone's camera without user interaction?
I'd like to write a short app that only takes sequence of pictures and the user should be able to set number of pictures, location, quality and time between shots. After starting the app should take pictures without further interaction. This program should for examlple take a sequence of 250 pictures of moving clouds so I could make a ten second movie from those pics.
Greeting
and sorry for my english ;)
I'm writing a program in C# that will save lots of data points and then later make a graph. What is the best way to save these points?
Can I just use a really long array or should I use a text file or excel file or something like that?
Hi,
I used to see that a program could embed a calendar right into the desktop, and the calendar is interactive, all 'show desktop' operations including will not hide it.
I wonder how I can achieve that? Thank you.
Hi,
I would like to create a program wich communicates between pc and an android mobile connected to USB via tcp/ip. Is this possible? How can I get the IP-address to a connected mobile from PC or the other way around?
Any help appreciated
i have write bellow at this link http://stackoverflow.com/questions/2896811/question-about-siftdown-operation-on-heap code above ritten is pseudo code and i am interested if according to pseudo code my program is correct?
(SquashFS is a compressed filesystem - http://en.wikipedia.org/wiki/SquashFS)
I'm looking for a way to read a SquashFS filesystem from a program. So far, I've know about the in-kernel drivers for it, but I'm sure that a userspace library for it must exist somewhere. Any language would be fine, but C is preferred.
Just mounting the filesystem and using it that way is technically possible, but I'd rather avoid that route because the application I'm looking at would involve working with at least a few dozen archives at any given time.
Hi,
I am so tired to every day at 8:00 am open Skype program to my job. I need a little script to set the hour to open and the hour to close. Sorry for my worst english.
Thanks
I am writing a program that will need to measure time in minutes.
To be exact, it will wait 10 minutes, execute some code, wait 2 minutes, execute more code and repeat this 5 times (anyone guess what I'm trying to do?) and I am wondering how to do the breaks.
Thanks in advance!
Oh, and by the way, I'm on Mac.
I have a hexadecimal string "41464353". I want to convert it into bytes. I know the value of this hex string in byte will be "65706783". I want this as answer. Please give me a program for this in Java.
Okay I use this script here to make a backup of my database:
mysqldump -u root -h localhost -pPASSWORD forums | gzip -9 > backup-$(date +%Y-%m-%d).sql.gz
This is used in a cron daily.
But I need to download this remotely or through a ftp program every day as well so I have a physical copy of it on my home hard drive, is this possible? I know it is, can anyone tell me a quick way to do it?