1,857 Posted Topics

Member Avatar for shanki himanshu

Just took a look at the challenge. There's a lot more involved than just the median. you're combining and sorting 2 arrays first.

Member Avatar for shanki himanshu
0
379
Member Avatar for IsaacMessi10

Changing the [drawmode](http://msdn.microsoft.com/en-us/library/system.windows.forms.tabcontrol.drawmode.aspx) to ownerdrawfixed allows you to draw whatever you like on the tabs.

Member Avatar for tinstaafl
0
582
Member Avatar for IsaacMessi10

> I want to replace a button with another yet different button (eg. Maximise with RestoreDown) What exactly do you mean by this?

Member Avatar for tinstaafl
0
214
Member Avatar for fakhruddin.fiqri
Member Avatar for s11086050
Re: c++

A fairly simple homework assignment. Hope you enjoy learning how to code it.

Member Avatar for tinstaafl
0
103
Member Avatar for LeNenne

To extract just the month and day, with the month in long format you could use something like this: Dim mydate As Date mydate = Now Dim datestring As String datestring = Format(mydate, "mmmm d") Today, datestring would be "April 21". To keep the month short use,`datestring = Format(mydate, "mm …

Member Avatar for LeNenne
0
176
Member Avatar for virusisfound

Something like this will work: Dim input As Integer = Val(TextBox1.Text) Dim output As New List(Of String) If input > 0 Then For i = 1 To input - 1 For j = 1 To input - 1 If i + j = input Then output.Add(i.ToString.Trim + "," + j.ToString.Trim) …

Member Avatar for virusisfound
0
432
Member Avatar for ppstyle

You can copy and paste this code into the form class but outside of any sub or function. To call it you could try something like this: Dim HDoc as New HtmlDocument Hdoc.Write(FromRtf(RichTextBox1))

Member Avatar for ppstyle
0
322
Member Avatar for ירון
Member Avatar for tinstaafl
0
63
Member Avatar for dusto

adding this statement,`myRecord = myFile.ReadLine`, before the Do loop should do the trick.

Member Avatar for dusto
0
2K
Member Avatar for SpectateSwamp

Haven't used vb5 since forever, but here's a [link to the media control](http://msdn.microsoft.com/en-us/library/aa733658%28v=VS.60%29.aspx) for vb6. If your vb5 can't use it, a very serious upgrade is needed.

Member Avatar for tinstaafl
0
200
Member Avatar for CHOCHOCHO
Member Avatar for tinstaafl
0
163
Member Avatar for GaryWazHere

What exactly is it doing wrong? Are you drawing the whole maze all at once? Do you have a screen shot, or detailed description, of how you want it to look?

Member Avatar for tinstaafl
0
492
Member Avatar for ppstyle

The simplest is probably to load the project in the HTMLEditorControl folder by itself, then build it. The result should be a .dll in the debug or release folder. this can now be added through the choose item option in the toolbox context menu. Just browse to the folder with …

Member Avatar for tinstaafl
0
1K
Member Avatar for somjit{}

You appear to have several subfolders with the same name. Make sure, in the project properties that it's pointing ot the right folder.

Member Avatar for somjit{}
0
100
Member Avatar for Mrewan79

A couple of things, first the function isn't declared properly. A function declaration has to include a return type and a variable to hold the info being passed to it, `Function DisplayStaff(Staff() as Salestaff) As String`. Second to put the properties of the structure into a string you have to …

Member Avatar for tinstaafl
0
159
Member Avatar for superstar515
Member Avatar for SLMQC

There are several options here. One option would be to use a masked text box. It is much easier to use than it sounds and the validation is done for you right in the text box. There is even a member that will validate according to a specific type of …

Member Avatar for SLMQC
0
269
Member Avatar for san.ssj

When you copied the code you missed the Module statement. That's why you got the error `Error 6 'End Module' must be preceded by a matching 'Module'.`

Member Avatar for san.ssj
0
120
Member Avatar for Hazuan Nazri

Here's a link with documentation on the [Adventnet SNMP Api](http://info.ee.surrey.ac.uk/Personal/G.Pavlou/Teaching/NSM/help/introduction.html). that might help

Member Avatar for Hazuan Nazri
0
2K
Member Avatar for Papa_Don
Member Avatar for Papa_Don
0
221
Member Avatar for cattcita
Member Avatar for shrina

> how to [read from txt file](http://www.cplusplus.com/doc/tutorial/files/) to [array](http://www.cplusplus.com/doc/tutorial/arrays/) & how to omit heading in the txt file and store it to array There's a couple of articles to get you started. Once you actually have some code you need help with let us know.

Member Avatar for tinstaafl
0
254
Member Avatar for amvx86

Here's an [MSDN article](http://msdn.microsoft.com/en-us/library/vstudio/x61a1z4s%28v=vs.100%29.aspx) on accessing the registry with vb 2010

Member Avatar for amvx86
0
2K
Member Avatar for sem.sabiduria

[Click Here](https://www.google.ca/search?q=cltmng.exe&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a#client=firefox-a&hl=en&rls=org.mozilla:en-US%3Aofficial&sclient=psy-ab&q=ftp+server+source+code+vb6&oq=ftp+server+source+code+vb6&gs_l=serp.12...0.0.12.20095.0.0.0.0.0.0.0.0..0.0...0.0...1c..9.serp.UPk0-yPOaV4&pbx=1&bav=on.2,or.r_cp.r_qf.&fp=7e4f97433872f87&biw=1280&bih=861)

Member Avatar for tinstaafl
-1
167
Member Avatar for Sammys.Man

This will change the text of a textbox with the text of the selection in combobox. Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged TextBox1.Text = ComboBox1.Items(ComboBox1.SelectedIndex) End Sub If you want to have different actions based on the selection a Select block would do the …

Member Avatar for TnTinMN
0
1K
Member Avatar for Mr.M

You might find this code helpful. It will take whatever text is typed in any textbox and if it equals the text in any of the labels it will strikeout the text in that label: Public Class Form1 Dim AllTextBoxes As New List(Of TextBox) Dim AllLabels As New List(Of Label) …

Member Avatar for Mr.M
0
247
Member Avatar for VictorK19
Member Avatar for ralph.d.abernathy.1

I'm wondering if precision could be your problem. I believe double is precise to only about 15 places. The [apfloat library](http://www.apfloat.org/apfloat/) might work better.

Member Avatar for ralph.d.abernathy.1
0
421
Member Avatar for Marvels

You could try the publish option then run the setup.exe to install the app. It should run then.

Member Avatar for ddanbe
0
211
Member Avatar for Papa_Don

If you create a Public Module, any routines or variables declared as public, inside the module, can be accessed from anywhere in your project.

Member Avatar for tinstaafl
0
285
Member Avatar for tdee

Sounds like an interesting homework assignment. When you've actually got code that needs fixing, show the code, describe the problem and/or any build errors, and people will be more than ready to help. Also since you'll be using C++ your posts will more properly belong there.

Member Avatar for tinstaafl
0
185
Member Avatar for dusto

I think your problem might be here: For intCount = 8 To CInt(inputFile.Peek = -1) strWeather = inputFile.ReadLine() Next The limit is less than the start. the statement inside won't run, therefore strweather never gets assigned. Not sure what you expect to happen with that but `inputFile.Peek = -1` is …

Member Avatar for tinstaafl
0
177
Member Avatar for Griff0527

You might something like this useful: #include<iostream> #include<iterator> #include<fstream> #include<vector> #include<ctime> using namespace std; int main() { int j=0, key=0; std::vector<int> a; int start_s=clock(); //start timer ifstream readFile; readFile.open("inputData.txt");//open file if (readFile.is_open()) { while (!readFile.eof()) { readFile >> key; if ( a.size() == 0) { a.push_back(key); } else if(a.size() == …

Member Avatar for Griff0527
0
534
Member Avatar for Catchamouse

Since you're programming for windows, if you use VC++ and the CLR for .net, you can use the console class and it's built in methods for changing the foreground and background of the text. There's a pretty good sample [here](http://msdn.microsoft.com/en-us/library/system.consolecolor%28v=vs.100%29?cs-save-lang=1&cs-lang=cpp#code-snippet-1). The code also shows how to use an enumerator to …

Member Avatar for Ancient Dragon
0
206
Member Avatar for yudi2020

How are you building the .dll? How are you testing it to know that it even works?

Member Avatar for tinstaafl
0
138
Member Avatar for joramkaku

Something like this should load a file directly: Private Sub LoadDictionary() Dim fn As String = Application.StartupPath & "\DATA\words.txt" Dim line As String Dim fr As IO.StreamReader = New IO.StreamReader(fn) While fr.Peek >= 0 line = fr.ReadLine() Dim a() As String = Split(line, "|") Dict.Add(a(0), a(1)) End While End Sub …

Member Avatar for tinstaafl
0
322
Member Avatar for korathualex

When you add the items to the listview set the Name property of the item to equal the Text. This way you can use the ContainsKey method to check if it exists.

Member Avatar for tinstaafl
0
239
Member Avatar for iEpic

Found several things wrong. The algorithm for the text offset should be (overall length`(69)` - string length`(str.length()`) / 2 + screen offset`(5)`. When you were calling placeCursor, you were sending one for the column instead of the variable l. Lastly `cout << str;` needed a `<< endl`. Here's the code …

Member Avatar for tinstaafl
0
140
Member Avatar for grgrl

Something like this might help. You might be able to notice, how much easier it is to read with all the dim statements together. This allows you to concentrate on the logic of your code much more easily. Private Sub ComboboxStudentCao(ByVal _filepath2 As String, ByVal _filapeat1 As String, ByRef cbx …

Member Avatar for Reverend Jim
0
190
Member Avatar for ahmed.m.alshammari

for loop [example](http://www.daniweb.com/software-development/cpp/threads/436390/for-loop-question)

Member Avatar for <M/>
0
97
Member Avatar for samuel terngu

In the datetimepicker's properties set the customformat to dd/MM/yyyy, then change the format property to custom. Now when you assign the value to the listview use the datetimepicker.text, and it will have the correct format.

Member Avatar for tinstaafl
0
1K
Member Avatar for MasterHacker110

Rather than a while loop a foreach might work better. Something like this: using System.IO; public Boolean CheckLogin(String accNumber, String pin) { String checkAccNumber; String checkPin; String[] splitedLine; foreach (string line in File.ReadAllLines(FILE)) { splitedLine = line.Split(' '); checkAccNumber = splitedLine[0]; checkPin = splitedLine[1]; if ((checkAccNumber == accNumber) && (checkPin …

Member Avatar for MasterHacker110
0
342
Member Avatar for Kirielson

Something like this should work: #include <iostream> using namespace std; void Pause() { cin.ignore(); cin.get(); } struct test { char sequence[9]; int occurance; double prob; }; int compare (const void * x, const void * y) { const test * dx = (const test *) x; const test * dy …

Member Avatar for deceptikon
0
703
Member Avatar for <M/>

I hate the words stupid and ugly, two words designed to put someone down, should never used.

Member Avatar for <M/>
0
475
Member Avatar for mustafaali382

Here's simple and easy. Read this [post](http://www.daniweb.com/software-development/cpp/threads/447412/forming-an-x-in-c) about printing out an 'X'. To print a diamond print out the inverted 'V'first.

Member Avatar for tinstaafl
-1
129
Member Avatar for manoj_582033

Split your project into 2 separate projects or right click on the forms you don't want and choose exclude from project once you have a setup done copy it to a different folder then change which forms are in the project and build the setup again. Personally I'd choose using …

Member Avatar for tinstaafl
0
95
Member Avatar for Tinnin

It looks to me like you'll have to look for the field with the date then change the output format. Since the row is coming from a table the index of the field you want should be constant. By changing the for each to a for loop, it might be …

Member Avatar for tinstaafl
0
1K
Member Avatar for MasterHacker110

Here's one way to change a specific value in an .xml document. Load the file into an XDocument variable, then find the appropriate element with a foreach loop and make an XElement variable equal that element. When you change an attribute in the XElement it is reflected in the XDocument. …

Member Avatar for tinstaafl
0
2K
Member Avatar for ben.nahalewski

With the [Process Class](http://msdn.microsoft.com/en-us/library/vstudio/system.diagnostics.process(v=vs.100).aspx). You can run 'cmd' with the .bat file as a parameter. Also, you can redirect the standard input of 'cmd', with the process class, then read the the .bat file line by a line and send each line to 'cmd'. Alternatively, it looks like everything your …

Member Avatar for tinstaafl
0
209

The End.