64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for panagosa

First of all i'd like to say hello to everybody. I've been working upon a script and i seem to be facing a problem with a mysql_query. Here it goes: I have 2 tables on my data base and there are some html forms through which tha data is entered …

Member Avatar for MindSter
0
133
Member Avatar for felix001

Im pretty new to python so im still finding my feet.. Ive written a small ftp program that downloads a file but its quite basic in that it gets the last element from the list and then downloads it. What is the easiest way to add some logic so it …

Member Avatar for felix001
0
162
Member Avatar for mangopearapples

How can I get a single line of text of a textarea? So like if I had "Hello Mellow Yellow" Then line 1 would be Hello and line 2 would be Mellow ect. How can I get that? Something like: [CODE] JTextArea area = new JTextArea(); System.out.print(area.getLineOfText());[/CODE] Thanks.

Member Avatar for mangopearapples
0
2K
Member Avatar for Neversleepin

Hi, I’m trying to code a small program which allows us to select multiple files from a folder and save the content of all files previously selected in one file. The code is very well without GUI (in console). But now I want to do the same with a GUI. …

Member Avatar for Neversleepin
0
2K
Member Avatar for HDRG

What do these errors mean? im new to java.. Exception in thread "main" java.lang.NullPointerException at java.awt.Container.addImpl<Container.java:1041> at java.awt.Container.add<Container.java:365> at OptionWindow.<init><OptionWindow.java:63> at OptionWindow.main<OptionWindow.java:182> please help

Member Avatar for HDRG
0
195
Member Avatar for soapyillusion

Hello all, Just took a JavaScript class, where they didn't teach us anything about slide shows. Now I have a client and I promised them a slide show on their website. I made an external Js file, and Firefox debugger keeps on giving me this error: document[place].src is undefined. Here's …

Member Avatar for soapyillusion
0
102
Member Avatar for DarkLightning7

I am building a text only hangman game and I have gotten it to the final stages as far as I know I only have one problem I can't figure out why my char comparison values are always returning false even though I know that the characters are the same. …

Member Avatar for JamesCherrill
0
260
Member Avatar for thebluestar

I don't know how to use the onmouseover event the text , then display the image. For example, I have a <p onmousever="">CHECK</p>, then when I move the mouse over the text, the image will display. Please help me!

Member Avatar for AMADH
0
3K
Member Avatar for Josef01

does anyone has a sample code or it it possible to fix error in this code I appreciate any advice the error i get : There was an error parsing the query. [ Token line number = 1,Token line offset = 13,Token in error = user ] cmd.ExecuteNonQuery() [code] Imports …

Member Avatar for Josef01
0
705
Member Avatar for Violet_82

Hi there, it's been awhile :$ I have just completed a small easy exercise which was to create an Account class, providing a constructor to receive the initial account balance, add some money to the initial balance and withdraw some money (providing that the amount of money to withdraw is …

Member Avatar for Violet_82
0
173
Member Avatar for ShadyTyrant

How can I get my editor to expand both horizontal and vertical? I have a simple test application that uses a subclass of a StyledTextCtrl. I create my editor object in a subclass of wx.Frame. [CODE=python] def CreateEditor(self): myEditor = editor.SyntaxControl(self) # subclass of StyledTextCtrl sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(myEditor, 0, …

Member Avatar for ShadyTyrant
0
473
Member Avatar for Frederick2

Hello Vivayan! Its taken me this long to understand your sophisticated program you gave me using STL (Standard Template Library) iterators, container classes, algorithms, and the works! I’m truly grateful for the time you took to develop this program for me, and it inspired me so much I’ve decided to …

Member Avatar for Frederick2
0
181
Member Avatar for walerhola

The bit of code below is giving me the error: Cannot read from a closed TextReader. [CODE]public static int maxUsers(int logMinute) { StreamReader maxNum = new StreamReader(@"C:\Users\jplishka\Desktop\LoginSorted.csv"); string sortedstrline = ""; string sortedUser = null; string sortedComputer = null; string sortedDate = null; string sortedInTimeSec = null; string sortedOutTimeSec = …

Member Avatar for Mitja Bonca
0
5K
Member Avatar for ilikepaste

import urllib.request page = urllib.request.urlopen("http://www.randompickupline.com/") text = page.read().decode("utf8") where = text.find('<p id="pickupline">') start_of_line = where + 18 end_of_line = start_of_line + 150 line = (text[start_of_line:end_of_line]) print (line) This is a basic html import for a text based game I'm writing for fun, and I'm making a dynamic string. However, the …

Member Avatar for ilikepaste
0
203
Member Avatar for rssk

hi all.......... 1)~ # free cat /proc/meminfo total used free shared buffers Mem: 62192 32080 30112 0 0 Swap: 0 0 0 Total: 62192 32080 30112 2)~ # free cat /proc/meminfo total used free shared buffers Mem: 62192 32440 29752 0 0 Swap: 0 0 0 Total: 62192 32440 29752 …

Member Avatar for rssk
0
120
Member Avatar for panagosa

First of all i'd like to say hello to everybody. I've been working upon a script and i seem to be facing a problem with a mysql_query. Here it goes: I have 2 tables on my data base and there are some html forms through which tha data is entered …

Member Avatar for panagosa
0
127
Member Avatar for HeartBalloon

[QUOTE]You said the function returns just a single character yet you are trying to return a character array. You can't have it both ways. What you should have done is [icode]char* getEmpName()const[/icode] -- notice there is a * after char to indicate it will return an array of characters.[/QUOTE] Hi, …

Member Avatar for HeartBalloon
0
382
Member Avatar for bensewards

Hey guys, This is only my second thread on DaniWeb and I am a beginner programmer. My code looks like this: (really easy to understand and shouldn't need any further explanation besides the fact that I need help understanding why when i give an answer related to the 'else' loop, …

Member Avatar for Fbody
0
605
Member Avatar for pritaeas

SetAutoSubClass() has been deprecated in newer versions of Delphi. Can anyone tell me what to replace it with ? I cannot find it in the Delphi 2009 OLH, nor in the VCL source (Forms).

Member Avatar for pritaeas
0
142
Member Avatar for tendaimare

this code works well but somehow it is giving me a warning saying: "Variable 'str1' is used before it has been assigned a value. A null reference exception could result at runtime."How can i remove the warning. [CODE] Public Shared Function getAllColumnNames(ByVal tblname As String) As String() Dim com As …

Member Avatar for Luc001
0
341
Member Avatar for jsefraijeen

Define a method hypotenuse that calculates the length of the hypotenuse of a right triangle when the lengths of the other two sides are given. (Use the sample data in the table below) The method should take two arguments of type double and return the hypotenuse as a double. Incorporate …

Member Avatar for bibiki
0
3K
Member Avatar for kkjay

I need to know how to link (via a regular href anchor on a different page) to content that is inside a tab that is not the default tab. Can this be done? My code will explain hopefully what I require: My Code: The following is my profile_edit.php page: ----------------------------------------- …

Member Avatar for Airshow
0
307
Member Avatar for NewOrder

1) why cant my static function see the class variables and a non-static method can: example: [CODE] class Chess { int columnStart; int rowStart; int columnEnd; int rowEnd; public static void Main(string[] args) { int[] locationMap = new locationMap[4]; columnStart = locationMap[0]; rowStart = locationMap[1]; columnEnd = locationMap[2]; rowEnd = …

Member Avatar for tripleD
0
172
Member Avatar for mrhankey

Hi, I have tried to Google this but cant find anything. I want to use a select AS statement to select multiple columns. i.e. [CODE]Select unitno country price AS propertyref[/CODE] is this possible using multiple columns AS one reference? many thanks

Member Avatar for mrhankey
0
2K
Member Avatar for dre-logics

I have an application X version 1.0 in Visual Basic 2008 and forwarded through setup installed on a user's PC. In this application was in these settings: Imports System Imports MySql.Data.MySqlClient Now you have a link to webshop and uses HttpWebRequest. There fore I added the following settings : Imports …

Member Avatar for Teme64
0
113
Member Avatar for sketchiii

Hello fellow c programmers( I made a "hello world" program so I'm a c programmer too :) ). Anyway I want to know if there is anyway to make a Dev C program perform an action if it is a certain day such as printing the schedule for the day …

Member Avatar for MosaicFuneral
0
392
Member Avatar for tendaimare

i recently posted a code that i had that i needed assistance for and it was solved it was for displaying all tables in a database.but now i have this code for showing all column names in a table i was in the process of turning it from oledb to …

Member Avatar for tendaimare
0
159
Member Avatar for PM312

i have created a user control for text box to enter date. I have saved time and effots to type for each text (date) box code to check date validity and key typed. but i have lost text and locked property of text box as it is not available on …

Member Avatar for AndreRet
0
130
Member Avatar for tendaimare

i have corrected my conn string i am now using sql connection but now when i run the code it gives me he error Object reference not set to an instance of an object. [CODE] 'I put this code in the load event ListBox1.Items.Add(CType(GetTables().ToString, String)) [/CODE] [CODE] Public Shared Function …

Member Avatar for tendaimare
0
1K
Member Avatar for pseudorandom21

Hi, I am in need of a good reference for C++/CLI. Right now I need to know how to exit the main loop of a form, such as if the user clicked the 'X' at the top right. Nevermind, the function Close() is what I needed.

Member Avatar for jonsca
0
312
Member Avatar for insanely_sane

Ok.. so uptil now I've been using the DOS compiler and IDE for C++, version 3.0 by borland...(which is like ancient history).. But now I think it's about time to upgrade :P So since I have been away from C++ for a loooooong time, I need to start from scratch. …

Member Avatar for mike_2000_17
0
194
Member Avatar for smcr01

I got this program that supposed to display a diamond but I only got the top part of diamond to work. As for bottom part I am not sure what calculation I could use. Any hint would be appreciated! Thanks This is the part: [CODE]//Bottom Part for ( row = …

Member Avatar for masijade
0
134
Member Avatar for phpDave

Hi, My script works but not the way I would like it to. [CODE]$file = $_FILES['content']['tmp_name']; if (!isset($file)) echo "please select an image."; else { $content = addslashes (file_get_contents ($_FILES['content']['tmp_name'])); $content_name = addslashes ($_FILES['content']['name']); $content_size = getimagesize ($_FILES['content'] ['tmp_name']); $user = $row_Recordset1['user_id']; if (!$content_size) echo "Thats not an image"; else …

Member Avatar for kkjay
0
127
Member Avatar for caut_baia

Hello everybody.Say i have a template declaration of a class: [code] template <DWORD Style=BS_DEFPUSHBUTTON, LPSTR Type="button"> class WndObj { WndObj (); }; [/code] Now in the cpp file the definition should look something like this: [code] template <DWORD,LPSTR>WndObj<>::WndObj () {} //so i can go ahead and typedef WndObj<> Button; [/code] …

Member Avatar for mike_2000_17
0
109
Member Avatar for alonewolf23

using textpad w/ jdk When trying to use single print line: System.out.println("\n" + var1,"\n" + var2); I get error: symbol : method println(java.lang.String,java.lang.String) location: class java.io.PrintStream System.out.println("\n" + var1,"\n" + var2); I understand that \n is new line, and My instructor told me to just use + "Integer name" for …

Member Avatar for alonewolf23
0
19K
Member Avatar for Thropian

I'm looking for a way to get the first letter of of a string. I already know about the .startswith() but that is for "if" statements I want something like [CODE]print text.startswith() # to give me the left most symbol[/CODE]

Member Avatar for Thropian
0
282
Member Avatar for vedro-compota

Hello) Explain to me please - that's what does this error mean - [CODE] static void SearchPathBetweenCities(out string ReturnValue, CITY StartPoint, int n2 ) { // ReturnValue += "\n"; n2 += 2; // if (StartPoint.roadmass!=null) {} }[/CODE] error - [QUOTE]Error 2 The out parameter 'ReturnValue' must be assigned to before …

Member Avatar for saravind84
0
199
Member Avatar for lyrico

Hi again to all, Can anyone know how to do this? [code] <?php // let say the time now is 06:00 PM $time = Date('h:i A'); $time1 = strftime('$time'); // I know it is wrong coz the output of this code is $time only. I just include this for you …

Member Avatar for lyrico
0
114
Member Avatar for MasterGberry

I know that arrays have to be given a size when using them, so I tried to, but this piece of code doesn't seem to want to be accepted by the compiler. data is a std::vector<char> so i tried using the .size() function to use the size of the vector …

Member Avatar for MasterGberry
0
127
Member Avatar for PhysicsExpert

[CODE]Table table; table.UpdateSeats(false, false, false, false, false, false); std::list<bool>::iterator Test = table.GetSeats(); std::cout << "The current status of seats: "; for (int i = 0; i < 6; ++i) { std::cout << " " << *Test; ++Test; std::cout << std::endl; }[/CODE] No compiler errors or warnings, just a Debug Assertion …

Member Avatar for PhysicsExpert
0
814
Member Avatar for dotancohen

Hi all, first post. I am a C# novice, but I have some experience in other C-derived languages. I am trying to close a Windows Form and open another. This is the code that I am trying to use: [code=c#] FormChat fm = new FormChat(client, username); fm.Show(); fm.Activate(); this.Close(); [/code] …

Member Avatar for dotancohen
0
189
Member Avatar for plasticfood

[CODE] vowels = wordcount.vowelNum(); //counts the vowels consonants = wordcount.consNum(); //counts the consonants, this is not working properly. [/CODE] the consNum() method: [CODE] int length = word.length(); for(int i = 0; i < length; i++){ if(word.charAt(i) == 'a' || word.charAt(i) == 'u'|| word.charAt(i) == 'i'|| word.charAt(i) == 'e'|| word.charAt(i) == …

Member Avatar for plasticfood
0
102
Member Avatar for Mr_PoP

TIMERS.h: [CODE]#include "includes.h" class servtime { public: int sec() { int sec; time_t rawtime; tm * timeinfo; time(&rawtime); timeinfo=localtime(&rawtime); sec=timeinfo->tm_sec; return sec; } int mint() { int min; time_t rawtime; tm * timeinfo; time(&rawtime); timeinfo=localtime(&rawtime); min=timeinfo->tm_min; return min; } int hour() { int hour; time_t rawtime; tm * timeinfo; time(&rawtime); …

Member Avatar for Mr_PoP
0
355
Member Avatar for The 7331 Geek

Hello everyone. I am working on a simple program called "Who's Connected?" where it runs a command (netstat -aon) and then displays the results in a multi-lined textbox. However, when I press the button that will run the command, it tells me that it can't convert the string to an …

Member Avatar for The 7331 Geek
0
3K
Member Avatar for alexchen

I need to calculate the area of a triangle using this formula. What is wrong with my code? error C2063: 'p' : not a function [CODE]#include <stdio.h> void Area(int a, int b, int c) { int p = a * b * c; int area = (p(p - a)(p - …

Member Avatar for alexchen
0
115
Member Avatar for SpecialForce

Hello, I am trying to upload a file via ftp using the library curl. Of course I looked [URL="http://curl.haxx.se/libcurl/c/example.html"]here[/URL] but the exemples don't say how to do this using usarname and password. Aslo the code is in C and if I compile it in C++ I am getting: [CODE]error C2664: …

Member Avatar for SpecialForce
0
2K
Member Avatar for scottdurica

Hi all, Im trying to create and write to a file to create a "list" type document that I can convert to .pdf and print out later on. Below is an example of what I'm doing. [I]out[/I] is my file and list in a string array that holds the answers …

Member Avatar for scottdurica
0
207
Member Avatar for p0l4rb34r

I have posted in some other forums and im sorry for people who have already seen something like this from me, but i was hoping if i could get some different views and opinions. I have probably very bsic computer knowledge and no programming knowledge, however, i have recently took …

Member Avatar for asterix15
0
175
Member Avatar for PM312

i am using font style [B]Bookman Old Style [/B]and size 12 for my Project but the default font type is Ms Sans Serif and size is 8. Can default size be set to Bookman Old Style and font size 12. Thanks

Member Avatar for PM312
0
134
Member Avatar for robertw

Hi Guys, I have a predicament here which I think is really easy if you get it right. I just cant wrap my brain around it for the moment (probably been staring at the screen too long) I have two table (financial data) Table 1 looks as follows id account …

Member Avatar for smantscheff
0
130

The End.