- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 10
- Posts with Upvotes
- 8
- Upvoting Members
- 8
- Downvotes Received
- 8
- Posts with Downvotes
- 7
- Downvoting Members
- 7
82 Posted Topics
I'm using selenium with firefox to load a webpage. The page uses ajax to load new content on clicking the Display More Results button. However when I try to find this button and simulate a click, it gives the following Stacktrace error. Can anyone tell me what I'm doing wrong … | |
Re: This example will count all files in C directory. You can change this to any directory you want. This should work for all types of files : Dim fileCount, filesWorkedOn as Integer filesWorkedOn = 0 Dim di As New DirectoryInfo("c:\") ' Get a reference to each file in that directory.. … | |
Don't know which forum to ask this question on but...here it goes... I have a website [mridulahuja.com](http://www.mridulahuja.com) which opens on all other networks but it won't open over WiFi at my place, whether I try opening it on PC or mobile. I can't even access it from Filezilla for making … | |
Don't know which forum to ask this question on but...here it goes... I have a website [mridulahuja.com](http://www.mridulahuja.com) which opens on all other networks but it won't open over WiFi at my place, whether I try opening it on PC or mobile. I can't even access it from Filezilla for making … | |
I have a website with the url to be entered in TextBox2 . I want to extract names, email ID and mobile numbers of people from the website. The url in TextBox2 contains the names and the email IDs, however the mobile numbers are present on another webpage (profile page) … | |
Re: leonardo123, firstly your question is in C not C++, so can we know why is it being asked in C++ forum ? Secondly, we're not here to do your homework. Show us your effort and we'll help you out. | |
Re: You'll need to **add a reference** to the `System.Windows.Forms` namespace (*Project menu->Add reference...*), then you'll be able to show a MessageBox from your console application. Add this to the very top of your code: `Imports System.Windows.Forms` You should now be able to use MessageBox.Show() | |
Re: @basit 3, what you are trying to do is unclear. Can you put up the complete code ? | |
Re: Check [this](http://www.e-iceblue.com/Knowledgebase/Spire.Doc/Program-Guide/How-to-Convert-HTML-to-Word.html) out | |
Re: The main difference between a vector and an array, in a C++ sense, is that **vectors do automatic dynamic memory management, whereas arrays are fixed**. You should always prefer using std::vector<T> since the destruction will be automatic once the vector goes out scope and the allocated memory will be placed … | |
Re: We will need to see your attempt as Daniweb is not a homework website. However, my reply in [this](https://www.daniweb.com/software-development/cpp/threads/398286/c-help-putting-password-change-password-and-delete#post1707814) might give you a hint :) You will have to change '?' to '*' | |
Re: If Click-Once is not allowing admin previleges, give this a try. Instead of changing the manifest to run app as admin, add this to the code itself. Private Sub RestartElevated() Dim startInfo As New ProcessStartInfo() startInfo.UseShellExecute = True startInfo.WorkingDirectory = Environment.CurrentDirectory startInfo.FileName = Application.ExecutablePath startInfo.Verb = "runas" Try Dim p … | |
Re: Here is your codes with comments at each step #include<iostream> using namespace std; int main() { FILE *fp; // this ia a file pointer used to make changes to the file fp=fopen("e:\\myfiles\\sample.txt","w"); // here, you are giving the pointer your file location //Check permission if you can write a file … | |
Re: One way of getting around your problem is to make a single background image for your footer consisting of all the 3 images u want to use. Then you can use this code to display your image in the footer background div { width: 100%; height: 400px; background-image: url(your_background_image.jpg); background-size: … | |
I came across this code of [firefly algorithm](http://en.wikipedia.org/wiki/Firefly_algorithm) and need to use it in my major. If any of you could explain the working of the functions, it would be of great help to me. Thanks in advance. #include<iostream> #include<stdio.h> #include<stdlib.h> #include<math.h> #include<time.h> #include<string.h> #include<memory.h> #defineDUMP 1 #defineMAX_FFA 1000 #defineMAX_D … | |
Re: The line `cout << 1 + ( rand () % 20) <<endl;` will give an output like : <random_number_1> <random_number_2> <random_number_3> . . which is already vertical. If you by chance want the output to be in a single line, replace this line with `cout << 1 + ( rand … | |
Re: I agree with Teme64 Here is a small sample Try statement1 statement2 Catch [ exception [ As type ] ] [ When expression ] ' or simply catch (for all statement1 statement2 [Catch ... ] ' you can have diff. catches for diff. exceptions Finally 'this is optional statement1 statement2 … | |
Re: `Ctrl+Alt+Del` is a system event and cannot be blocked (though it could be blocked in Vista by modifying the registry). This event is handled in [msgina.dll](https://msdn.microsoft.com/en-us/library/windows/desktop/aa375457%28v=vs.85%29.aspx). To disable Ctrl-Alt-Del, you need to write your own msgina.dll. The idea is to pass everything through to msgina.dll except for when Ctrl-Alt-Del is … | |
Re: Sample code to print k'th row of an array arr with n elements in each row for(i=0;i<n;i++) cout<<arr[k-1][i]; k-1 cuz the first index is 0 | |
Re: Try this out Get an original copy of the previous Access DB that has not been attempted to be open with a newer version. Open a blank Access copy of the newer version From the newer version, go to Import Objects. Go through all the tabs and import all objects … | |
Re: This should work fine Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click welcom.Show() End Sub When you name your form "welcom.vb", it generates a class `welcom`. To access this form you will have to use `welcom` rather than `form`. The second method will work fine too … | |
Re: are you trying to make a *keylogger* or something ?? | |
Re: You can copy a file like this FILE *source, *target; char ch; source = fopen("source_file", "r"); target = fopen("target_file", "w"); while( ( ch = fgetc(source) ) != EOF ) fputc(ch, target); fclose(source); fclose(target); For copying a folder, [get a list of all files in the source folder](http://forums.codeguru.com/showthread.php?507714-list-all-files-in-a-directory-c) and copy each … | |
Re: Try inserting the following code in your <head> </head> tag: <meta http-equiv="refresh" content="0; url=http://www.example.com/"> "content" specifies how many seconds elapse before you are forwarded | |
Re: Input for character can be taken using char oper; cin >> oper; // operation to perform Comparing operator to char entered if (oper == '+') <add numbers> else if (oper == '-') <subtract numbers> . . . end if Basically switch(ch) { case 1 : <action1> case 2 : <action2> … | |
Re: GCC is a driver program and performs its job by invoking a sequence of other programs for compiling, assembling and linking. GCC interprets its command-line parameters to deduce which programs it should invoke, and which command-line options it ought to place on their command lines. This behavior is controlled by … | |
Re: Memory is assigned in both situations. In `float A[10]` , we are declaring a float array. In `float * A = new float[10]` , we are declaring a float array with a pointer A pointing to it. Suppose you use `float A[10]` in a function void fun() { float A[10]; … | |
Re: sheenalsingh, show us your attempt and ask us the problems you are facing. We'll help you out. Sorry, but as per the rules, we can't code it for you. You can get help here [string comparision in c++](http://www.cplusplus.com/reference/cstring/strcmp) | |
Re: This is not possible in a normal input box. You need to make your own inputbox. Make a **.bas module** with the following code Option Explicit Private Type LOGBRUSH lbStyle As Long lbColor As Long lbHatch As Long End Type Private Type CWPSTRUCT lParam As Long wParam As Long message … | |
I have come acrross many websites (like compilr, codesheff, hackerrank) which provide us the facility of compiling source codes of various languages online ? I would really like to know how these websites work. Also if it is possible to implement this on my own website. Thanx in advance :) | |
Re: try ruuning application as admin and see if the problem persists here's the code for the manifest file for admin privileges <?xml version="1.0" encoding="utf-8"?> <asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <assemblyIdentity version="1.0.0.0" name="MyApplication.app" /> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> <security> <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3"> <!-- UAC Manifest Options If you want to change the Windows … | |
This is the code i'm using to view the modules being used by a process . string Selected_Process = listBox1.SelectedItem.ToString().Replace(".exe",""); Process[] ObjModulesList = Process.GetProcessesByName(Selected_Process); ProcessModuleCollection ObjModules = ObjModulesList[0].Modules; listViewModules.Items.Clear(); foreach (ProcessModule objModule in ObjModules) { item1 = new ListViewItem(objModule.ModuleName); item1.ImageIndex = 1; item1.SubItems.Add(objModule.FileName); item1.SubItems.Add(objModule.FileVersionInfo.CompanyName); item1.SubItems.Add(objModule.FileVersionInfo.FileVersion.ToString()); item1.SubItems.Add(objModule.FileVersionInfo.FileDescription.ToString()); listViewModules.Items.AddRange(new ListViewItem[] { item1 … | |
Re: #include <stdio.h> main() { int n, sum = 0, remainder; printf("Enter an integer\n"); scanf("%d",&n); while(n != 0) { remainder = n % 10; sum = sum + remainder; n = n / 10; } printf("Sum of digits of entered number = %d\n",sum); return 0; } | |
Came across a code that's working but cannot figure out why #include<stdio.h> #include<stdarg.h> void fun(char *msg, ...); int main() { fun("ABCDEFG", 1, 4, 7, 11, 0); return 0; } void fun(char *msg, ...) { va_list ptr; int num; va_start(ptr, msg); num = va_arg(ptr, int); num = va_arg(ptr, int); printf("%d", num); … | |
I made a program in C# and added it to startup(by modifying registry) . When I run msconfig , the program shows under Startup tab , but it doesn't start when I log on. It requires Admin previlages and uses some unmanaged DLL's Can someone temme what might be the … | |
Re: This should work static void Main(string[] args) { string myName = ""; int[] integers = new int[5]; int Sum = 0; int temp; Console.WriteLine("What is your name?"); myName = Console.ReadLine(); for (int i = 0; i < integers.Length; i++) { while (Sum>10 || Sum<50) { Console.WriteLine("Please enter {0} integers between … | |
Re: You probably need to create an ODBC connection first and then use the DB classes to connect to that connection. Turbo C compiler was probably 16 bit. So, it won't be able to connect to a 32-bit ODBC Connection. Switch to a better C++ compiler . It might help . | |
I came across a program [SelfNote](http://selfnote.pen.io/) which stores all the text we write and the password in itself.No other file is created (the EXE changes its size as we change it's contents) . It is a standalone exe with all the content within it. How can an exe modify itself … | |
Re: You can use `getchar()` It will wait for a to be pressed for terminating the program . | |
Re: the correct syntax of cin is cin>>variable_name also take a look at the variable naming convention in c++ http://mathbits.com/MathBits/CompSci/DataBasics/naming.htm you can't directly assign a value in cin statement to take user input dim num as int; cin>>num; to assign values directly dim num as int; num = 4; | |
Re: For Chrome First: get Chrome_WidgetWin_1 class handle CHHwnd = FindWindowEx(0, 0, "Chrome_WidgetWin_1", vbNullString) get it's child's handle CHWorker = FindWindowEx(CHHwnd, 0, "Chrome_OmniboxView", vbNullString) then get the URL text: CHTextLenght = SendMessage(CHWorker, WM_GETTEXTLENGTH, CInt(0), CInt(0)) + 1 ' Get Length Of Text CHtxtBuff = Space(CHTextLenght) CHURL = SendMessage(CHWorker, WM_GETTEXT, CHTextLenght, CHtxtBuff) … | |
Re: This should work Dim i As Integer For i = 1 To 5 Combobox1.AddItem(i) Next | |
Re: code to add the wait time to current time Dim fields() As String Dim hours As Long Dim minutes As Long Dim seconds As Long fields = Split(txtDuration.Text, ":") hours = fields(0) minutes = fields(1) seconds = fields(2) m_StopTime = Now m_StopTime = DateAdd("h", hours, m_StopTime) m_StopTime = DateAdd("n", minutes, … | |
Re: you can even count the no. of items expiring and display them in the alert box at one go...... | |
Re: For automatic searching,you can put the entire searching code in the `TextChanged` event of the textbox. Private Sub TextBox_TextChanged(sender As Object, _ e As EventArgs) Handles TextBox.TextChanged For i As Integer = 0 To DataGridView1.Rows.Count - 2 For j As Integer = 0 To Me.DataGridView1.Rows(i).Cells.Count - 2 If DataGridView1.Item(j, i).Value.ToString().Contains(ComboBox1.Text) … | |
Re: Drop Internet Transfer Control on the form (VB6: how to add Inet component?). Then use its `execute` method. This example shows hoe to upload a file `C:\Test.txt` to the server. Option Explicit Private Declare Sub Sleep Lib "kernel32.dll" _ (ByVal dwMilliseconds As Long) Private Function UploadFile(ByVal sURL As String _ … | |
Re: use Print Format$(your_date, "dd/mm/yyyy") where **your_date** is the date in any format | |
Re: Go to Projects --> Components --> Microsoft Windows Common Controls-2 6.0(SP6) http://msdn.microsoft.com/en-us/library/aa231249(v=vs.60).aspx | |
Re: Insert 3 Command Buttons on your form , namely **Command1** , **Command2** , **Command3** Private Sub Form_Load() Command2.Enabled = False Command3.Enabled = False End Sub Private Sub Command1_Click() Command2.Enabled = True Command3.Enabled = True End Sub | |
Re: this is how we write to a file #include <iostream> #include <fstream> using namespace std; int main () { int What_to_write; fstream myfile; myfile.open ("filename.txt"); myfile << What_to_write; myfile.close(); } |
The End.