199,114 Archived Topics
Remove Filter ![]() | |
I have a main function and I want to call another function inside my main, but it gives me an error like this: error C2601: 'ComputeCentroid' : local function definitions are illegal I know that this is an error because the '{' for my main is still not closed before … | |
First of all, I'm 17 learning C++ on my own! I've been enjoying Daniweb. and I did like to thank the community for that! Thank you all! Here goes my Problem... I have a small program that calculates time between two instances and it worked fine... so I decided to … | |
Hello, I use Visual Basic 5 PRO and would like to know how to grab an image from a weblink which has been copied to the Windows Clipboard from google images and then display the image as a thumbnail into a image control on my form. For example, I search … | |
ok, so i want a program that just says back to the user their input. the users input will be more then one word, so there will be whitespace. when i use string as a class for the input, then it only gives back the FIRST word of the input.... … | |
Hi everyone, I'm new to this site and hope you might be able to help me out? So I've been given an assignment to produce this output [CODE]% ./hw4b foo here foo and foo there % ./hw4b ABC123 here ABC123 and ABC123 there % ./hw4b 'where is' here where is … | |
Problem: it print "null" in front of every line for example input this is sparta output [COLOR="Green"]null[/COLOR]histay isay partasay [CODE]import java.util.*; public class PigLatin { String[] piggieLatin; String[] sentence; public PigLatin(String[] random) { sentence = random; piggieLatin = new String[sentence.length]; } //repalce everything beside a~z with space public String punctuationFree(String … | |
I was doing some work in python and I typed in ^ instead off ** without thinking and found some confusion as to what ^ does I did a bit of testing to find: 10^2 = 8 0^2 = 2 -5^2 = -7 11^2 = 9 9^2 = 11 -10^2 … | |
i hve create 1 listview & checkbox inside listview...how to print check item in listview.. | |
Hello, Before I begin, I have had a quick look around for a solution to this problem however time is not something I have lots of right this moment so I am going to post this and hope that by the time I return to complete my work there is … | |
Hi Guys Could you please let me know what SQL query I can run to get the parent of a specified table? I already used this code which is providing a list of child tables [CODE] SELECT object_name(parent_object_id)As 'Childs List' FROM sys.foreign_keys WHERE object_name(referenced_object_id) ='Stores' [/CODE] How can I run … | |
"Cross-thread operation not valid: Control 'DataGridView1' accessed from a thread other than the thread it was created on." I've been avoiding multithreading because of this since I started with vb.net a couple of weeks ago but it looks like I have to start using it now. I simply don't understand … | |
I'm attempting to create a one line Caesar cipher decryption program in python and i'm afraid i've come to the end of my knowledge and well past it. this is the closest working code i've got: [code]def test3(): print("The decrypted text is: "+"".join(map(lambda x: chr(ord(x)+y),x)))[/code] as you can see it … | |
I am trying to create a view and by linking two tables together, VLP_QC_Results_Batch1000 and VLP_Stock_QC1000. (see below pics) The issue I have is in the VLP_QC_Results_Batch1000 has the testNo within a field called TestNoName and is separated by a “-“ I need to link these so that we can … | |
I have created a simple web service based off one of the project templates in the Microsoft WCF Starter Kit 2 for .NET 3.5. I have successfully implemented a GET method. However I am having trouble get a POST method to work. [CODE] [WebHelp(Comment = "Sample description for DoWork")] [WebInvoke(UriTemplate … | |
Hi everyone, I'm trying to make the autocomplete work on a list of items entered into a textbox separated by semicolons. I have a list of authors the user can choose from and it autocompletes as they type the name no problem, but what I'd like to do is after … | |
Hello. I don't know if somebody has asked this before, but is there any python equivalent to the Java .jar files? I have read about py2exe, freeze, and module distribution, but it's not what I'm looking for. I need a file that can contain everything in my program (and modules … | |
i has create system registration that use vb.net 2008 & accessdatabase (oledb connection) i set ID as primary key,when i insert new ID but if ID already in database i will get error cz data duplicates..so anyone know any code that will promp mesej like this "Data already in data … | |
below is my code to use chekc boxes to update my status field to either a 1 or 2, but altohught it doesnt show any errors, it wont update HELP PLZ </style> </head> <body> <table width="744" height="536" border="1"> <tr> <td height="63" colspan="4" bgcolor="#8BCB6A"><p><img src="CO-OP title.gif" width="407" height="64" /> <?php $connection=mysql_connect('localhost','but09081489',''); … | |
![]() | So I've made a Task Scheduling application (for learning purposes). The program currently saves all the data in simple text form. I use Regex to split the data up and assign it to the appropriate variables. I don't really like this way of doing things as it seems messy and … |
[CODE]<?PHP // Original PHP code by Chirp Internet: [url]www.chirp.com.au[/url] // Please acknowledge use of this code by including this header. function getImages($dir) { global $imagetypes; // array to hold return value What does retval mean? $retval = array(); // add trailing slash if missing if(substr($dir, -1) != "/") $dir .= … ![]() | |
Ok, so my program complies (not that that means much, haha), but at least I can now SEE that something in my loops isn't right. I need to take my 2-dim array file input of 4 students with 3 quizzes, which looks like this: (the asterisks are whitespace) 10**10**10 *2***0***1 … | |
how can i draw a free-shape (it means no particular shape or sides) and fill it in with the colors chosen from colordialog? e.g. im gonna draw a rounded rectangle and i want to fill its insides with color red. answers will be appreciated :) | |
Hey Everybody, I keep getting these warnings when I compile my program: 19: warning: extra tokens at end of #ifndef directive 19: warning: missing whitespace after the macro name both apply to the same line number, which has nothing to do with the ifndef statement. I tried looking for an … | |
Does anyone know how to programically create an html document for an Access WebBrowser control? For instance, in Access 2010, to browse to a webpage, say [url]http://www.daniweb.com[/url], then assuming you have a WebBrowser control named "webBrowser", then you would use the following: [CODE]Me.webBrowser.Object.Navigate "http://www.daniweb.com"[/CODE] Now say, you want to dynamically … | |
Hello, I need to perform a binary search on an array of objects but to do so I need to have them sorted. I've been looking online and no one really has a good explanation of how to conduct a quick sort on an array of objects. If you can … | |
Hi I am using the following code to convert html to pdf. But the resulting pdf page shows blank. Please help me...its very urgent.. [CODE]require('pdf/html2fpdf.php'); $str =stripslashes('<div style="width:580px;" align="left">'.$pdfmessage."</div>"); $html=str_replace(" ","",$str); $pdf=new HTML2FPDF(); $pdf->AddPage(); $pdf->SetLeftMargin(25); $pdf->SetFontSize(12); $pdf->WriteHTML($html); $pdf->Output($invno.'.pdf','F');[/CODE] | |
Hi All! I have made a small cms using php and mysql - I havent tried to export a databae to a webserver before, so I need a little help/confirmation. When I click export in phpmyadmin, and chooses type to be SQL, and saves it with the allready chosen/marked boxes, … | |
Hiiiiiiiii I want to develope project on INSTITUTE MANAGEMENT SYSTEM in dbms..... please help me that wat sort of tables,attributes and their relations can be added in database........ How to write SRS specification for same.......??? | |
i hve build 1 system inventory using vb.net 2008...can i run execute file from browser...maybe like in asp.net.. | |
i have an array like this: [B]String[][] data= {"s", "w","s", "y", "r", "r", "y", "p"};[/B] i wanna do some action if there was no similar array element before that particular element, for example, do something if [B]data[0]=="s"[/B], then do something if [B]data[1] == "w"[/B], but skip when [B]data[2]=="s"[/B], because [B]"s"[/B] … | |
So I have an array [CODE]String[] directions = {"n", "e", "s", "w"}; Random dirPick = new Random(); int rNum = dirPick.nextInt(4); String direction = directions[rNum];[/CODE] Now say that one of these doesn't exist and if it picks it I need to take it out of being able to be picked. … | |
Hi I need some help. I`m looking for a routine or code that will help me in reading a text file into a database. This is how the text file look. Gen 1:1 IN THE beginning God (prepared, formed, fashioned, and) created the heavens and the earth. Gen 1:2 The … | |
Hello im a newbie having problems. I have got two arraylist with values in them. I want to subtract each value from the oposite value in the second array list to get a new list C which i am going to plot on a graph. For example ArrayLists A,B A … | |
Hello all, I am currently in the process of learning C++ for a work term position I am on. After hitting a wall trying to teach myself from books I decided it might be easier to translate some old Java programs from school into C++ to get a better understanding … | |
Hello everyone, i'm having some problem with the following code: [URL="http://pastebin.com/KTKaVje8"]CODE[/URL] inputSouce is an abstract class and the rest are derived from it. The definitions for these are elsewhere. Now, [CODE]inputSource *irSources[4]; irSources[0] = new irSource(); [/CODE] This is giving me errors. i'm using VS2008. [B]error C2466: cannot allocate an … | |
anyone help with this? I have a unique id on each line of sql, i want to be able to update a row from a table i tested and tested this but unable to get this working. does anyone know how i am able to do this? [CODE] Dim PINV … | |
I am doing an equation and the outcome is 45.454545454545454545. I would like to get rid of the 45454545 after the decimal point. and have 45% [CODE] $final=5/11*100; [/CODE] | |
I was wondering if it's possible for me to create a Digital Sound Processing (DSP) program using Python. Basically, I don't know anything about how I would do this and I would like somebody to point me in the right direction. I don't want somebody to write code, but I … | |
This is homework. I have the code written, though. The thing works. Mostly. The assignment is to write a program that reads a list of integers from a file, prints the maximum value in the list to the console, removes the maximum value from the list, and stores the (smaller) … | |
hey what program when given 3 numbers outputs true if the numbers form a pythagorean triplet | |
Hi. I'm new to python, and also have a poor english so...excuse me!:icon_question: Ok, I want to generate a dictionary like this one: [CODE]di={'word1':['tra1','A brief definition.'],'word2':['tra2','Another definition.']} [/CODE] from a txt file containing the word, its translation (tra#) and a definition of the word: [ICODE]word1 trad1 'A brief definition.' word2 … | |
afternoon everyone, I am new to using MSSQL and need help with SUBSTRING function. i have a strings like below s2-Total Solids - Std Method V1E-RVT4/2.5@20degC Initial V1Y-LVT2/60@20deg Initial A2-Alkalinity - ISO Method(%) I would like to only get the data before the first "-" IE s2 V1E V1Y A2 … | |
I am doing a sales report for a clothing manufacturer that calculates its total sales for the week.Sales values are inputed seperatly for each clothing item, but the amount of sales for each of the five weekdays should be inputed all at once.The app should calculate the total amount of … | |
hi, my problem is that i have written script which read a file , take line by line split it and then store it into dictionary. and i am writing the values of dictionary on other file, the problem is that at the end of file , it doesnt print … | |
Dear All, Data comes to my serial port every 6 seconds. My application is capturing the data @ 1 data/6 seconds initially, properly and converting it into graphs. But as the time proceeds the capture rate becomes @ 2 data/12 seconds and again after some time @3 data/18 seconds. At … | |
All, I am using VB.NET in VS10. After I add items to a list box I'd like it to scroll down so that the most recent items are visible. I tried this with no luck: [CODE]StatusListBox.SelectedItem = StatusListBox.Items.Count - 1[/CODE] Can anyone tell me how to make the box always … | |
![]() | hi i was wondering if (and how) you can create nested methods in c#. c# seems to do it with size and other things. something.Size returns a value but also something.Size.X returns a value. how can i do something like this myself? Thanks Ollie ![]() |
Hey, I was wondering how to have Fscanf loop and do multiple calculations for 4 different employee numbers with 4 different hours and 4 different pay rates. [CODE] #include <stdio.h> double pay_calc (double hours_worked, double pay_rate) { double tax,gross_pay,net_pay; gross_pay = hours_worked * pay_rate; if (hours_worked > 40) gross_pay = … | |
Sorry if the title is a bit off, I couldn't think of what to call it. I've created projects in VS, and they all run perfectly fine. However, I now just want to create the source files then compile via the command line. I've done this rather easily, but now … | |
please help me here the error is : conversion from string "~/ShowImage.ash?ID" to type 'Double' is not valid My code: [ICODE]Partial Class Create_staff Inherits System.Web.UI.Page Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpload.Click Dim connection As SqlConnection = Nothing Try Dim img As FileUpload = CType(imgUpload, … |
The End.