How I can manipulate certain strings. This program here is supposed to randomly scramble any word/sentence input. However, I notice that even the empty spaces get moved; is there any way to stop that from happening? I would want the empty spaces to stay in their input positions.
Now, I have an assignment in which I am to accept arguments from the command line and copy them into a cstring and display said cstring unmolested. Then I should store it into another cstring but ignore all punctuation, spaces and capital letters. Like this:
./a5 Marge lets Norah see Sharon's telegram As is: Marge lets Norah see Sharon's telegram ---->: margeletsnorahseesharonstelegram <----: margeletsnorahseesharonstelegram Sequence entered is a palindrome =======================================================
Finally I am to chaeck to see if it is a palindrome. Most of it works and if no spaces are entered nor punctuation it works. However, punctuation causes it to malfunction.
char *FormSeqProc (int argc, char *argv[], char seqAsIs[]) { int len = 0, n = 0; for (int p = 1; p < argc; ++p) { len += strlen(argv[p]);
My program had a requirement to ignore an input beginning with a # sign. The input is entered by user from keyboard. I wanted to know how to use cin.ignore to achieve this.
My random number generator isn't working properly. It seems to be ignoring my conditions when it compiles and I enter the input. The program is supposed to accomplish the following.
1. Let the user input how many digits he or she would like to have in the random numbers.
2. Let the user type in how many of the numbers that he or she wants.
3. It will then generate the numbers.
4. It will display the minimum or maximum number it can be with the number of digits the user entered. And display the number of numbers that the user wanted. It also is supposed to check and output only up to the max of that digit range.
so if someone entered they wanted a digit of 1(1-9) but said they wanted 300 numbers it would only output 9
Example: the user says that she would like 3 digits to be in the numbers generated. So it will output numbers between 100 and 999. then the user says that they would like only 3 random numbers. So it will output three random numbers in between 100 and 999. Also all of the numbers need to be unique so they can't output more then one of the same number.
I am not sure why but it ignores my conditions. Ill type that I want 7 but it just outputs a bunch of random numbers. it dosen't stay in the ranges.
So I have to make a program that allows the user to enter both positive and negative numbers and the program is suppose to calculate the sum of only the positive values while ignoring the negative values. Also it is to be a sentinel-controlled loop with a number ending the set of values.
I am making a web browser and I have successfully made it so it shows the actual html but I want to know how to run the html within the program. I am using mac so it can't be the #include "windows.h" stuff and preferably I would like it to be cross-platform.
I have written a text based web browser from scratch. Meaning that I'm not using libcurl in any way to retrieve the web pages.Now I'd like to add HTTPS functionality to it, but I can't seem to find a guide like Beej's Guide to Network Programming related to HTTPS.
This is my very first attempt at running a wpf browser app... I've create the project and i can see controls when i add them to the entry page, here's the default for the page
and i can see a nice bright green square with an orange outline. But when i debug, a new tab opens up in my browser and i can't see a single thing,it's just a white screen.
I have been working on my own custom web browser. If i insert a web browser in my tab control and name it i can easily just go webbrowser1.Navigate() in my button click to use the webbrowser methods.
I made a method CreateTab and it automatically adds a web browser to my tab along with a default web page. My problem is selecting this webbrowser in other button clicks so i can call Home, Back, forward, etc.
Here is me method for creating a tab.
private void CreateTabItem() { //create a new tab TabItem item = new TabItem(); item.Header = "Fitness" + i ; WebBrowser browser = new WebBrowser(); //browser.Name = "Website";
there is a way to iterate through the controls on a webpage. For instance, I tried EnumChildWindows using the parent window of the browser, but I haven't had any luck - it returns nothing. s where I can start researching how to find the child controls?
I would like to know how to make Lynx follow meta refresh links automatically, At the moment it just provides a "clickable" link you can accept the refresh. I would like this to be automatic.
--- Initial problem ---
We have a DB Backup script written in PHP/HTML and uses the page refresh to loop the backup (every 2 minutes). Using a full fledged browser is not really an option on our machine as the resources are very tight. So we tried Lynx and it has the perfect footprint but the only problem is it doesn't refresh the page.
I'm thinking I just need some way to force Lynx to reload the page after the time has elapsed. Maybe create a new function that starts a timer and hold the url until the timer ends then force Lynx to visit that url. Im a PHP Procedural kinda guy and I cant think how to set this timer event safely without corrupting or crashing the program or creating memory leaks.
(source code im using: [URL])
This is the function that handles meta refresh.
Code: /* * Given a refresh-URL content string, parses the delay time and the URL * string. Ignore the remainder of the content. */ void LYParseRefreshURL(char *content, char **p_seconds, char **p_address)
I'm trying to build an app, but i don't know which is the best language choice. For starters, the app should be able to:
1. run from context menu 2. when selecting some text from a web browser (ff, ie), that text is captured (preferably not in clipboard) and sent as argument to the program via context menu and the program starts executing...
I was looking around on the internet and i noticed you could change internet explorer's emulation mode from Desktop to Windows Phone, i was wondering can the same thing be achieved in the C# webbrowser as i know it heavily rely's on IE. I know you can change the standards on the browser through the IE versions but is changing it to Windows Phone Brwoser possible, if so how can i change it?
I have an C++ application which uses Microsoft Web browser ActiveX control to launch any URL within the application. The browser is embedded in C++ form and It's working fine with all the feature Microsoft has exposed through Interface(IID_IWebBrowser2).But while any url that is using session cookie has been launched, even after closing the browser the session cookies are not getting deleted. For example if user login info is stored as session cookies,the url is using the cookies and getting launched without asking for user log in info.
But if I close the browser, and again relaunch , the cookies should be deleted and the url will not find the cookies to be used for log in . That is not happening here. Although this is session cookies , it's not getting deleted and being used by embedded browser. However, if the url is launched in IE, it is behaving as expected.
So, Do I need to delete the cookies explicitly? If Yes, How to do that?