Hello, I would like to ask, is there any way to determine file size before uploading with javascript? thanks
It is never late to learn
Hello, I would like to ask, is there any way to determine file size before uploading with javascript? thanks
It is never late to learn
Hi, i have a problem, i have a div popup window, but it is not working as i thought, it is behind menu container, is there any way to make div popup on front, not behind? thanks
It is never late to learn
what i mean by valid is when i open the link with media player, it should work, i did not find another word for it. maybe better word for it is "Active".
It is never late to learn
Hello, Is there any easy way to check streaming media(valid, invalid) in csharp? for example: i have a mms stream, mms://192.10.0.11/radio, i want to check if the stream is valid or not in c#. thanks.
It is never late to learn
modified on Tuesday, December 28, 2010 10:06 AM
Hello? Is there any way to convert:
char* to const char*
const char* to char*
string to const string
const string to string
thanks in advance
It is never late to learn
Hello, I was trying to connect to remote MS SQL 2005, I can connect to server with microsoft client application, but when i try to connect with source code in visual c++, it returns: named pipes provider: could not connect, i dont know why? here is my connection string:
Driver={SQL Native Client};Server=TestServer;Database=test;Uid=xIB;Pwd=xIB;MARS_Connection=yes;
anybody has any idea to solve the problem? thanks in advance
Actually, I am using GNU c compiler for UNIX, it seems chdir and SetCurrentDirectory for windows only, is there any other way for UNIX?
It is never late to learn
chdir is c/c++ function? or shell function? can i use it like
system("chdir c:/work/test");
It is never late to learn
Hello everybody, I am trying to change working directory in c++, For example: My programs is in c://work, I run the program from there, but during running this program, I have to change working directory, do something there.I tried to do it like this:
system("cd c:/work/test");
but it does not change working directory Is there a way to change current working directory in c/c++? Thanks in advance
It is never late to learn
Thanks for reply. What i mean by slow was that when u want get file from ftp server and save it to your localhost or such operations works very slow, and i think it is from why i use "system" function in c, if i use other low level OS function, it could be faster such as Curl or something else.
It is never late to learn
Hello, I have finished writing ftp client in c/c++ using system funtion to get/put ftp commands for example:
int FTPGet(char *asFtpSite, char *asFtpUser, char *asFtpPasswd, char* asRemoteDir,
char *asRemoteFile, char *asLocalFile, char *asLogFile)
{
char lsFtpCommand[4096];
sprintf(lsFtpCommand,
"export LANG=en_US\n"
"ftp -i -v -n >%s <<EOJ\n"
"open %s\n"
"user %s %s\n"
"ascii\n"
"cd %s\n"
"get %s %s\n"
"bye\n"
"EOJ\n",
asLogFile,
asFtpSite,asFtpUser,asFtpPasswd,
asRemoteDir,
asRemoteFile,asLocalFile);
system(lsFtpCommand);
return 0;
}
It works fine, but very slow, I found out it is why because i use "system" function, What i want to ask from u, Is there any other method to make it faster? I am told that there is a ftp library for C, which is cURL, somebody has ever tried it? or Is There any other ftp library which works faster? My platform is IBM AIX unix. Thanks in advance
It is never late to learn
I took such a large memory on purpose to test bad allocation exception, i figure out how to do that,here is my final code, this works,
# include # include # include #include struct tree_node
{
std::list<tree_node*> leaf;
char data;
short IsEndPoint;
};
void MyHandler()
{
std::cout << "MyHandler Called... " << std::endl;
throw std::bad_alloc();
}
int main()
{
std::set_new_handler( MyHandler );
char\* ch;
try
{
for( unsigned long Idx( 0 ); Idx < 0xffffffff; ++Idx )
{
new tree\_node\[10000\];
printf("id: %d \\r",Idx);
}
}
catch( const std::bad\_alloc& e )
{
std::cout << e.what() << std::endl;
}
std::cin.get();
return 0;
}
It is never late to learn
Thanks for reply, I run this code under Visual c++ 2005, it does not throw any exception, it crashes computer, do u know why it crashes computer? Thanks
It is never late to learn
how could you catch exception memory is full? is there any way in c++ for windows? not for linux, it must be same in linux
It is never late to learn
Hello guru developers, I have a project which i have to use a lot of memory allocation, the project works fine except when there are a lot of data the process is killed by Linux, i don't know why? For example this example: it should exit when there is no free memory, but it is killed after some time when i run this program, Does anyone has any idea how to solve this problem in Linux? thanks in advance
#include
#include
#include
#include
#include
#include
using namespace std;
struct tree_node
{
list<tree_node*> leaf;
char data;
short IsEndPoint;
};
int main()
{
try
{
for (int i = 0 ; i < 9999000; i++ )
{
tree\_node\* t = new tree\_node\[1000\];
printf("id: %d \\r ", i);
}
}
catch(...)
{
cout<<"test"<< endl;
exit(0);
}
cin.get();
return 0;
}
It is never late to learn
Hello everybody, Does anyone know how to catch out of memory allocation in C/C++? Thanks in advance
It is never late to learn
Thanks for reply: What is direct Api?
It is never late to learn
Hello all, What is the fastest way to get an url's source code? I tried to use CHttpFile class, but it is very slow, is there any way to get faster url's sourse code? thanks for advance
It is never late to learn
Hello, Thanks for your reply I made a release mode, but it does work as debug mode, that is one thing. Another thing, do u think that Installing vcredist_x86.exe on the target machine, to run my application? Thanks
It is never late to learn
I use Visual Studio 2005, those dlls should be like these: MFC80D.DLL MFCN80D.DLL MFCO80D.DLL MSVCRTD.DLL But, still not clear, Why should use always copy the dlls into system, my program is like 0.4 mb, the dlls are about 10 mb For the simple project, why should i hold the dlls
It is never late to learn