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)
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 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.
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.
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
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?
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
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
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 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 ;)
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
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
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 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'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?
(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.
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.
I built a little installer, which installs to program files. I run the installer and all is good, run the installed .exe and it just disappears. I guess at giving the EXE admin launch rights in Vista and it runs. But why is this needed? This can't be normal can it?
I am trying to make a program that generates bids automatically, then pack them into a vector and send them to the auctioneer.The simulator class, the simulator can then pass the bids to the auctioneer.How do I implement this communication.I thinking of sending the all vector conatiner of bids to the simulator.Can anyone demostrate a better way of sening vector objects from one class to another.
Is it possible to use P4Python (the perforce python api) with IronPython? I'd like to use the python api because it seems much faster than using p4.net implementionat of a Perforce API but when I try to import p4 into IronPython I receive the following error.
IronPython 2.6.1 (2.6.10920.0) on .NET
4.0.30128.1 Type "help", "copyright", "credits" or "license" for more
information.
import P4 Traceback (most recent call last): File "", line 1,
in File "C:\Program
Files\IronPython 2.6 for .NET
4.0\lib\site-packages\P4.py", l ine 210, in ImportError: No
module named P4API
I have a custom struct :
struct A
{
public int y;
}
a custom class with empty constuctor:
class B
{
public A a;
public B()
{
}
}
and here is the main:
static void Main(string[] args)
{
B b = new B();
b.a.y = 5;//No runtime errors!
Console.WriteLine(b.a.y);
}
When I run the above program, it does not give me any errors, although I did not initialize struct A in class B constructor..'a=new A();'
I have an ASP.NET web service that I can access via a windows program but now I want to secure the web service. I can secure the web service using forms authentication. How do you access the secured web service from a windows forms application?