When I try to compile my program the compiler complains about this line in a .h file that I #included.
ostream & Print (ostream & stream);
How can this be fixed?
I have a C++ program that takes user input for fopen in order to initiate a file write. Could someone help me find a function which will return a FILE* and use the Windows specific version of mkdir in order to create the folder structure for fopen to never fail to open a new file in the specified location because one of the folders does not exist. Thanks a bunch!
i've written a program in Jython 2.5.1 which works fine on my Windows 7 machine, but on a japanese machine it throws an Exception saying "unknown encoding 'ms932'"
i found that codecs.java is the only module printing the unknown encoding 'xyz' message
this file loads aliases.py which does contain
# cp932 codec
'932' : 'cp932',
'ms932' : 'cp932',
'mskanji' : 'cp932',
'ms_kanji' : 'cp932',
The file cp932.py contains
import _codecs_jp, codecs
But.. _codecs_jp does not exist as is also discussed in this page
Does anyone have a clue where to go from here ?
http://web.archiveorange.com/archive/v/8tc1Zc2rV3qiUcy9zPlA
I know I learnt this on the SCJP syllabus, but it escapes me.
What's the term for a set of objects that refer to each other but are no longer accessible from your program (and are thus eligible for garbage collection)?
I am working on a small GUI application written in Scala. There are a few settings that the user will set in the GUI and I want them to persist between program executions. Basically I want a scala.collections.mutable.Map that automatically persists to a file when modified.
This seems like it must be a common problem, but I have been unable to find a lightweight solution. How is this problem typically solved?
Java's jar file format builds off of the zip file format, and supports compression of the class files inside it. When and how does the JVM decide which class files to uncompress and pull out of the jars on its classpath? Is the process dynamic and done at runtime as classes are needed, or are they all uncompressed up front before the program actually runs?
Hi,
can any one please send me the project(in android) where there is only client program which can connect to server and read the response from the server.send to my mail id [email protected]
Thanks and Regards,
Pushpa
My multithreaded Java program crashes because it runs out of heap space and I don't think it should. Assuming the culprit is unintentional object retention, what's a good free tool to investigate what objects are being unintentionally retained?
My IDE is Eclipse.
Hi. I'm working on a program idea which needs to respond when a particular Function key is pressed on the keyboard(like F10).
(A) is that possible?
(B) what language should i use (i'll be getting the development outsourced, so its not a problem)
(c) any sample code which shows how it works?
Looking at the information under the heading "Precision can be omitted or be any of:".
The example: printf("%.*s", 3, "abcdef"); works, outputting:abc (truncating the rest of the string.)
Now, I would like to have a string with multiple parameters formatted (truncated):
printf("%.*s", "%.*s", 3, 3, "abcdef", "xyz123");
but the program crashes.
What is the correct syntax?
Thank You.
i can get file name via below codes. How can i send this file to remote computer. this remote computer ip: 192.168.2.105 also i can use 51124 port
class Program
{
static void Main(string[] args)
{
string[] dosyalarinYollari = System.IO.Directory.GetFiles(@"z:\20071008\1.2.392.200036.9116.2.6.1.48.1215563310.1191800303.305777\", "*.dcm", System.IO.SearchOption.AllDirectories);
foreach (string s in dosyalarinYollari)
{
Console.Write(s+"\n"); // i need to send tihs s file to remote machine
}
Console.ReadKey();
}
}
I am having a problem figuring how to check a string for the same characters in a row then count that same character in a row then printing it out then giving the location of the last occorance of that character count then printing it out then moving to the next character in the string that is different then the previous character and the program is case sensitive.
So the input could be: aaaaAAAbbbddccc
How would I compress this string to: a4A3b3d2c3 ? and then decompress it?
I have a php file with an xml header and xml code, named test.php.
How do I load this file as an xml?
The following doesn't work:
$xml = simplexml_load_file('test.php');
echo $xml;
I just get a white page.
The test file is saved as php, as it's dynamic. It's loading data from the tradedoubler api.
The xml looks something like this:
<voucherList>
<voucher>
<id>115</id>
<programId>111</programId>
<programName>Program 111</programName>
<code>AF30C5</code>
<updateDate>1332422674941</updateDate>
<startDate>1332370800000</startDate>
<endDate>1363906800000</endDate>
<title>Voucher number one</title>
<shortDescription>Short description of the voucher.</shortDescription>
<description>This is a long version of the voucher description.</description>
<voucherTypeId>1</voucherTypeId>
<defaultTrackUri>http://clk.tradedoubler.com/click?a(222)p(111)ttid(13)</defaultTrackUri>
<siteSpecific>True</siteSpecific>
</voucher>
<voucher>
<id>116</id>
<programId>111</programId>
<programName>Program 111</programName>
<code>F90Z4F</code>
<updateDate>1332423212631</updateDate>
<startDate>1332370800000</startDate>
<endDate>1363906800000</endDate>
<title>The second voucher</title>
<shortDescription>Short description of the voucher.</shortDescription>
<description>This is a long version of the voucher description.</description>
<voucherTypeId>1</voucherTypeId>
<defaultTrackUri>http://clk.tradedoubler.com/click?a(222)p(111)ttid(13)url(http://www.example.com/product?id=123)</defaultTrackUri>
<siteSpecific>False</siteSpecific>
<landingUrl>http://www.example.com/product?id=123</landingUrl>
</voucher>
</voucherList>
When I type in the foll. code, I get the output as 1073741823.
#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector <int> v;
cout<<v.max_size();
return 0;
}
However when I try to resize the vector to 1,000,000,000, by v.resize(1000000000); the program stops executing. How can I enable the program to allocate the required memory, when it seems that it should be able to?
I am using MinGW in Windows 7. I have 2 GB RAM. Should it not be possible?
In case it is not possible, can't I declare it as an array of integers and get away? BUt even that doesn't work.
Another thing is that, suppose I would use a file(which can easily handle so much data ).
How can I let it read and write and the same time.
Using fstream file("file.txt', ios::out | ios::in ); doesn't create a file, in the first place. But supposing the file exists, I am unable to use to do reading and writing simultaneously.
WHat I mean is this :
Let the contents of the file be 111111
Then if I run : -
#include <fstream>
#include <iostream>
using namespace std;
int main()
{
fstream file("file.txt",ios:in|ios::out);
char x;
while( file>>x)
{
file<<'0';
}
return 0;
}
Shouldn't the file's contents now be 101010 ? Read one character and then overwrite the next one with 0 ? Or incase the entire contents were read at once into some buffer, should there not be atleast one 0 in the file ? 1111110 ?
But the contents remain unaltered. Please explain.
Thank you.
I delete my java program from java project in eclipse. The extension was .java and I don't know how to get back? I try (getdataback for NTFS) but I didn't get back my *.java file. Some solution?
Hello!
I am currently on a project which has been buggy for a long while, now I suspect, among other things, that there is pointer errors in the code.
The program is written in native C++ using COM and uses out-of-process COM servers.
Can anybody give me some tips as how one would go about finding these errors?
Is there specific things to keep in mind, ways to do it, etc...
Consider this code:
const char* someFun() {
// ... some stuff
return "Some text!!"
}
int main()
{
{ // Block: A
const char* retStr = someFun();
// use retStr
}
}
My question is in the function sumFun() where is "some Text!!", stored (i think may be in some static area in ROM) and what will be its scope?
Will the memory pointed by retStr be occupied throughout the program or be released once the block A exits?
--
Thanks
I developed a flex ria application.The client cannot able to run the program if he/she copy the installation files from the original system to some other system.How can i do that??
And how can i create a trial version of the application?
I need help with sending a formatted text to a printer using Ruby on Ruby on Rails OR sending a pdf file to a printer from Ruby program. I can write the code to create a pdf file from Rails app but don't know how to print that pdf file to a default printer. I am trying to write a small ticketing application with Ruby on Rails.
Please help.
Shreyans
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
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 .
I have been looking it up and I just cant seem to wrap myself around the onCreate and Bundles. I understand that the onCreate is called when the program starts but its how the Bundles get passed around and how they are pertinent. Can anyone try to put this into plain english because I cant seem to find it well described.
Thanks
I'm writing a program which needs to traverse a set of directories. Tried to use the following code:
file.eachDirMatch(/.*[^.svn]/){
//some code here
}
But that ended up match none of my directories. I realize this boils down figuring out the right regex hang head in shame but even after revisiting some Java Regular Expression documentation I thought this should work.