|
hi,
can anyone please write a tutorial on the basics of fonts and how they are used and created if i have to write my own font editor or creator or something.
please help asap.
PS: any links to the information i requested will be highlt appreciated.
regards
|
|
|
|
|
All,
I am looking for a code which retrieves a HTML source for a given website. I got few but none of the code really works for all websites. Some has security issues, some has timeout issues, some has redirect issues, some has session management issues. I am looking for the code which works for all kinds of websites.
given a website say www.xyz.com/default.aspx I want to retrieve the HTML source(same as when this page get rendered). I want to achieve this without any UI.
If somebody post an article it would be very helpful for everyone.
Thanks,
Anand
|
|
|
|
|
Do you mean something like this?
BOOL GetWebsiteHTML(LPCSTR cpCmd, CString *pContent)
{
BOOL bRetval = FALSE;
char caBuf[8196];
if (!cpCmd || *cpCmd == 0)
return FALSE;
HINTERNET hIC = InternetOpen("{YourAppNameHere}",INTERNET_OPEN_TYPE_PRECONFIG,NULL,NULL,0);
if (hIC)
{
DWORD dwTimeout = 10000;
InternetSetOption(hIC,INTERNET_OPTION_CONNECT_TIMEOUT,(LPVOID)&dwTimeout,(DWORD)sizeof(dwTimeout));
HINTERNET hURL = InternetOpenUrl(hIC,cpCmd,NULL,0,INTERNET_FLAG_RELOAD,0);
if (hURL)
{
DWORD dwBytesRead = 0;
BOOL bRetval = TRUE;
while (bRetval)
{
caBuf[0] = 0;
bRetval = InternetReadFile(hURL,caBuf,sizeof(caBuf)-1,&dwBytesRead);
if (bRetval)
{
if (dwBytesRead == 0)
{
bRetval = TRUE;
break;
}
caBuf[dwBytesRead] = 0;
*pContent += CString(caBuf);
}
}
InternetCloseHandle(hURL);
}
else
{
*pContent = CString("Unable To Open URL! [") + cpCmd + CString("]");
}
InternetCloseHandle(hIC);
}
else
{
*pContent = "Unable To Connect To Internet!";
}
return bRetval;
}
onwards and upwards...
|
|
|
|
|
|
hello everyone ,
i am a final yr student and my project is product design management(cyber review).
implementing a integrated appln(chatting,3d manipulations, 3d marker) that can be viewed in the browser(publish it in the internet)
so that i am in need of ur help , i don't know how to start with.
1. we have decided to move with java technologies
2. using vrml plugins (cortona).
i got to make the 3d marker, do u guys have any idea about these?? (making integration 3D MARKERwith vrml plugin )
* i am so immature in making projects so please guide me as much as u can
RaJ
|
|
|
|
|
It would help me a lot if I could see a project example with all the UML diagrams.
It doesn't matter on what domain or area, just an example (case study) modeled with UML.
Could you, please, give a suggestion where I could find such an example.
Thank you,
Cristina
|
|
|
|
|
|
Hello
Does anyone know how to take handler of dual monitors and setting resolution seperately?
I have been searchin on internet for while and i'd like to have source useable in VC++.
Thank you.
|
|
|
|
|
Hello everyone ,
I want to create an ActiveX in VC++ that
is Based on a dialog so when we insert that
dialog it shows that dialog instead of activeX.
Any ideas,
Best Regards.
Thanks.
|
|
|
|
|
To paraphrase an old saying - the only good ActiveX is a dead ActiveX.
|
|
|
|
|
In the article titled "Gregorian Date To ISO Date Converter"
By Siva Ram Mateti (at http://www.thecodeproject.com/csharp/GregToISO.asp ), there is what looks like a bug. It seems to appear more than once.
The comment is
// Increase of Dayof Year Number by 1, if year is leapyear and month is february
and the code seems designed to do that. Shouldn't the code be changed to check if the month is AFTER February, rather than that the month IS February?
I don't have C++ on my box, and even if I did, I'm not good at it, so you might want to check the code with some actual dates from a wall calendar.
|
|
|
|
|
|
There are four guys trying to get home at night and in order to do so, they MUST cross a bridge. It's very dark and there is only one torch available. The bridge can ONLY support "TWO" person at a time. Now, a bomb has been set on the bridge which will explode in 18 mins. Due to the fact that each person's travelling speeds are different, therefore some will obviously take longer to cross than others.
The time that each person takes are as followed:
A = 1 min
B = 2 min
C = 5 min
D = 10 min
Torch = 1 Qty
Here's how it works: If D & A goes first, it'll require 10 mins for them to cross the bridge together. By the time A gets back with the torch to B&C...11 mins will be passed already.
The total time required is : 17 mins
the solution to it is:
A and B first - 2 minutes (max 2 )
A runs back with torch = 3 minutes
C and D Next = 13 minutes ( max 10 )
B comes back with the torch = 15 minutes ( max 5 )
A and B again = 17 minutes
Can anyone tell me the code to this problem in turbo c or vc urgent please please. many many thanks in advance.
|
|
|
|
|
hi,
did you try it youself fist? Is there any problem you encountered? I think nobody here will solve your homework... we will help you with particular problem, bt not with whole solution.
best regards,
David 'DNH' Nohejl
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|
|
Hi,
did anybody have comments on code generators for n-tier apps, like Deklarit, TierDeveloper, VBExpress, CodeSmith, Neo .....
Thanks for answers
|
|
|
|
|
does anyone know how to password-protect a folder in Window XP without using any 3rd party software.... also not the one provided by the zip file....
what i mean is using some shell or some self written program that is portable coz i plan to password-protect the folders in the removable drives... some 3rd party software is not portable and has to install the software on every computer if i want to open the folder on my removable drives...
thanks...
|
|
|
|
|
Folder and files can be pass word protected or encrypted only when you have NTFS (New Technology File System) formatting of your HDD. You can not do normally unider the FAT 32 file system in a Windows machine.
|
|
|
|
|
s buddy , but how to PASSWORD protect a folder in ntfs, can u plz tell that.
RaJ
|
|
|
|
|
Hi,
I am accessing Active Directory using LDAP.
When new user created and I try to connect through my web application I have to force him to change his password at first logon. This is set by admin and I am trapping it using active directory service Class and APIs.
But when I try to change this user's password, I am getting an exception in following code...
(results = mySearcher.FindAll() throws an exception when must change at first logon flag is true)
Can any body help me..mail me at dharmesh@freewavetech.com
MSN : dharmesh_gandhi@hotmail.com
-----Code ---------------------------------------
entry = New System.DirectoryServices.DirectoryEntry(strLDAP, strLogin, strOldPass)
mySearcher = New System.DirectoryServices.DirectorySearcher(entry)
mySearcher.Filter = "(&(objectClass=user)(samaccountname=" & strLogin & "))"
results = mySearcher.FindAll()
userEntry = results.Item(0).GetDirectoryEntry()
userEntry.Invoke("ChangePassword", New Object() {strOldPass, strNewPass})
userEntry.CommitChanges()
-----End of Code ---------------------------------------
Dharmesh.
|
|
|
|
|
After many tens of hours of searching Google, scanning programming groups, etc, I am almost about to give up. The only thing I have found is that there are (or at least has been) others struggling to find the answer to the same question as me, which makes me think that this is in fact something that is impossible, or at least difficult-, to do on Win32. So let me make some noice here and check if there are any kernel-mode expert that can help me out...
I am about to implement a C++ application (Larsen Commander - http://home.online.no/~leifel/lcmd/index.html) where I need to check (or get notified) when a thread or a process is waiting for data to be available at the read-end of my pipe. I am unable to find out how to do this using the standard Win32 SDK documentation. Anyone that can help?
My application acts as a GUI command line shell in this regard. It has a console monitor and a command line where the user can launch internal and extarnal commands in the same way as with CMD.EXE. Larsen Commander launches command line programs as child processes, and redirects the child's STDIN, STDOUT and STDERR streams in standard documented ways. Everything works just great, except when it comes to one thing: When the child process attempts to read data from its STDIN it enters a wait-state because its STDIN-stream is empty. What I want to do in my application then is to show the command line in a special color mode, so the user can type some text of which to write to the pipe that feeds the childs STDIN. However, I find no way to check if there is someone at the read-end of the pipe waiting for data.
Luckily (for my application and its users on Windows) most command line programs will never attempt to read anything from its STDIN, but some programs do. One example is UNZIP.EXE, which needs to get confirmations from the user (STDIN) e.g. before overwriting a file on the file system. UNZIP.EXE does this by reading from its STDIN.
To be clear: The only information I need in order for this to work is a way to check if there is someone waiting for data at the read-end of my pipe.
I am currently using an anonymous pipe created with Win32::CreatePipe(), but if I need to, and if it is possible, I can of course rewrite this to use a named pipe created with Win32:CreateNamedPipe(), or anything else. The best would be a way that is possible to work on all flavours of Win32, but it is also acceptible for me to use a technique only available on Win2000/XP.
Remember: My application is a GUI application. Thus, I cannot use any console-based technique for this, as far as I can see.
What I have tried are (code fragments only):
1) Using Win32::WaitForSingleObject() on the pipe file handle(s).
------------------------------------------------------------------
// This doesn't seem to work (res will never be WAIT_TIMEOUT):
HANDLE childStdInWriteSide = ...;
HANDLE childStdInReadSide = ...;
DWORD res = Win32::WaitForSingleObject(childStdInWriteSide, 0);
if (res == WAIT_TIMEOUT) // If child wait for data at read-end?
return true; // We never reach here!
else
return false;
// This doesn't work either (gives error "invalid handle"):
HANDLE childStdInWriteSide = ...;
HANDLE childStdInReadSide = ...;
DWORD res = Win32::WaitForSingleObject(childStdInReadSide, 0);
if (res == WAIT_TIMEOUT) // If child wait for data at read-end?
return true; // We never reach here!
else
return false;
2) Using Win32::NtQuerySystemInformation() to check the
state of the child process thread(s).
--------------------------------------------------------
// This doesn't work (child process thread wait state
// seems to be unstable).
LPVOID infoBuff = ...;
NtQuerySystemInformation(NT_PROCESSTHREAD_INFO, infoBuff, ...);
PSYSTEM_PROCESSES p = (PSYSTEM_PROCESSES) infoBuff;
for (;;)
{
if (p->ProcessId == myChildProcessInfo.dwProcessId)
{
// We have found the information for the child process of ours.
int threadCount = p->ThreadCount;
for (int i=0; i<threadCount; i++)
{
SYSTEM_THREADS* t = &p->Threads[i];
if (t->State == StateWait &&
(t->WaitReason == Executive ||
t->WaitReason == WrLpcReply))
{
// This happens also when the thread is not actually
// waiting on its STDIN, so I can't trust this.
return true;
}
}
// No need to test the remaining processes.
break;
}
if (p->NextEntryDelta <= 0)
break;
p = (PSYSTEM_PROCESSES)((char*) p + p->NextEntryDelta);
}
return false;
Thank you for reading all down to here. If you know I way to help me out of this problem I will be very, very happy.
What about having a registration code of Larsen Commander for free? - To the person that first provides a solution that actually works!
--
Leif Erik Larsen
Author of Larsen Commander
Download for Windows and OS/2 available at
http://home.online.no/~leifel/lcmd/index.html
|
|
|
|
|
Hello Leif;
Years of programming multi-threaded code have made me very sensitive to two particular values for timeouts in the WaitFor... functions. Those two values are 0 and INIFNITE.
I noticed that you used 0 in two of your test cases, and this is what MSDN says about 0:
If dwMilliseconds is zero, the function tests the object's state and returns immediately.
Now, I am not sure WHAT to expect if you are only testing for the object's state as opposed to, for example, putting in even a 1 millisecond wait and then looking for WAIT_TIMEOUT.
Typically, even if I want an 'immediate' timeout on a wait, I usually make it about 20 to 50 milliseconds for anything remotely related to USER interaction. If I get timeout, I assume nothing has happend or is really waiting and proceed with the processing.
I have never written code that uses either 0 or INIFNITE and I process the WAIT_TIMEOUT and WAIT_FAILED all the time. The code seems to work fine that way.
|
|
|
|
|
Giving a zero-timeout is well documented. It is used when you just want to check if the object is signaled or not.
Anyway, my code was just (a very stripped-) sample to show how I already has attempted to solve my problem. But I have given up this on Windows. It seems to be "impossible", so I have to rethink my application somewhat. Maybe providing the output console of each child in separate tabs, for instance.
--
Leif Erik Larsen
Author of Larsen Commander
Download for Windows and OS/2 available at
http://home.online.no/~leifel/lcmd/index.html
|
|
|
|
|
I'm trying to build a telnet login server which emulates the Win2k server, cept I'm making it a little more secure. I'm having a little trouble making the password obfusticate. I would prefer it to do what my RedHat login does, and not show what I'm typing in at the prompt, but I would settle for the *** that the Win2k server shows up... anyway, I'm the DragonLord, and I need some help... Cheers gentlemen (and rare ladies)
I wonder what happens if you open the fridge door before the light comes on?
|
|
|
|
|
Where can we download flash templates for free?
|
|
|
|
|
I am working on an object-oriented alternative library to C++ called the Object Oriented Template Library. It is designed to present a more abstract set of collections and primitives. A detailed description and preliminary documentation is available at http://www.cdiggins.com/ootl.html[^]. Let me know if you would be interested in seeing end up on codeproject.com once it matures somewhat.
Thanks all!
Christopher Diggins
http://www.heron-language.com
|
|
|
|
|