64,152 Solved Topics
Remove Filter ![]() | |
I am making a program where i have to write a recursive function that reverses a string. I am a new programmer and need help. The function should return a String and take only one argument, also a String. [CODE]import java.io.*; public class RecursiveFunction { public static void main(String [] … | |
Just wondering is there any way to modify Classpath in your program and force them to include a new directory in classpath ?? | |
so i need to have a script that takes input from a command and parses it for some info im still pretty new to perl, but from what i understand, to do something like that youd have something like: [CODE] while ($line = <STDIN>) { blah blah blah } [/CODE] … | |
Hi all, I got a problem with part of my application, it's an exception I've never seen before. Overload resolution failed because no accessible 'New' can be called without a narrowing conversion: 'Public Sub New(original As System.Drawing.Image)': Argument matching parameter 'original' narrows from 'Object' to 'System.Drawing.Image'. 'Public Sub New(stream As … | |
im not able to figure out the meaning of this piece of code: [code] public int void countTokens(String s) { StringTokenizer st= new StringTokenizer(); return st.countTokens(); } [/code] | |
how do i determine the winner in a game rock paper scissor ? i have 10 rounds and the one who has 7wins shall be declared as the winner but how am i supposed to do that ? great help is highly appeciated :) | |
Hello, I have to make a small game in C++ as a school project. Now, although I've made many 2D games before I'm very new to C++, and I ran into a few problems. One: I need dynamic key input. I now use getch() and it makes the program wait … | |
I am a beginner in openCV and C++ as well.I am stuck in a particular place while trying to implement face recognition in open cv. I have the stored training images in a folder called data the images of first person is stored like 1_john1.pgm 2nd image of first person … | |
I've been coding in c++ for a while now, and I use string variables quite a lot. One day, I stumbled upon a char* which can also be used to "store" a string of characters, and it's been bothering me ever since that I don't really know what a string … | |
set path=%path%;C:\python27 where does this code go? please explain in detail? | |
Hi guys, A good day to you all! I am trying to bulid a simple data base but two errors at compile time apparently are holding me back from running my program. I have tried to figure them out but my efforts are are proving worthless and that's why am … | |
Hi Im a beginner in programming C# while watching this tutorial on C# (writing a console application) the guy skipped over a couple segments in between parts of code. Where he was doing "if" statements of " if (input3 == "n" (vertical lines here) input3 == "n"). Im wondering how … | |
here why should we have to write [B]c=1[/B] ?? i couldn't understand the logic of writing c=1 :s... please just explain the logic [CODE]void main(void) { int a,b,c=1; a=5; for ( b=a; b>0; b--) { c*=b; } printf ("The Factorial of %d is %d\n",a,c); getch(); }[/CODE] | |
I want to define a vector of TextBox (or any compnents) in VC++ project (windows form). I wrote : [code] std:vector <TextBox^> txt_box; // //then I push the elements back in the vector using txt_box.push_back (textbox1) // //... // for all the text_boxs in my form [/code] but this code … | |
Hi, This piece of code works in chrome & IE but not Firefox, can anyone see why? [CODE]function openimage(a, b, c, d) { var b = document.getElementById('photo' + a).value; var c = document.getElementById('album' + a).value; var d = document.getElementById('clicks' + a).value; if (d = 1) { jQuery.facebox({ ajax: 'profile/previewphoto.inc.php?photo=' + … | |
Hi, I have made a script to search my database. But when I execute it, it shows only one result. I even checked the database but there were many entries like this. here's the code... [CODE]<?php // Made by Shahbaz Singh July 2011. All Rights Reserved. Webdhaba.in $q = $_GET["q"]; … | |
[CODE]from gasp import * begin_graphics() Circle((200, 200), 60) Line((100, 400), (580, 200)) Box((400, 350), 120, 100) update_when('key_pressed') end_graphics() [/CODE] | |
[CODE] insert into AUDIT_TABLE( "TIMESTAMP", AUDITCATEGORY, USERID, AUDIT_XML, "AUDITID", "SOURCE", "ROLE", EVENT_ID, EVENT_DATA, TYPE_OF_APPLICATION) select CURRENT_TIMESTAMP, AUDITCATEGORY, USERID, AUDIT_XML, (SELECT MAX(AUDITID)+1 FROM AUDIT_TABLE), dummyNumber||i, "ROLE", EVENT_ID, EVENT_DATA, TYPE_OF_APPLICATION from AUDIT_TABLE where "SOURCE"='1312171509321'; [/CODE] Hi, Above is a part of my stored procedure , I'm trying to create test data for … | |
How to check browsers javascript and cookies are enabled or not? And How to redirect on error page for each condition separately ? | |
I've found a simple timer program and it seems to work (for the most part). The problem is that certain cout functions aren't showing up. The timer originally didn't include milliseconds in the code, so I added them myself (which could be the problem) based on the code for the … | |
As far as I can tell, this is safe. It prints "Should Get Here" and nothing else, as expected and desired. In real life, CantGetHere is a function that actually IS called and does some arithmetic. To avoid a seg fault in line 14, I have a NULL pointer check … | |
Hi I have 3 image placeholders taken from a recordset. If the image URL is in the database table column then the image shows as you would expect. However if no image exists I want to force the code to pick up a blank image from location: propertyimages/dot.gif Current code … | |
Hello everyone: The problems is the following. I'm creating an specific program to upload to FTP on C#. That works perfectly. My problem is that i want to give the user the ability to change folders but so far I don't seem to find anything over the internet. Can someone … | |
1. In a for or while loop, if the condition is breached in the middle of the brackets {}, will the code immediately stop the loop, or wait until it gets to the bottom of the brackets {} ? 2. If a function is called in my code, does the … | |
So I'm plugging away at my database design and get to a point where I need to work on the UX (or UI for you old[er] peeps). I have a guide from Microsoft that I refer to very often called the UX Guide. I have all of my forms setup … | |
Recently I have been trying to get my head around the PackBits compression algorithm and I'm having problems. I understand that the packets consist of a one byte header followed by the given data and if the value of the header byte is positive, it is followed by the same … | |
I am making what I call a PM (Preventive Maintenance) Kit list. My users will use this list to generate a printable sheet to tell me what they used out of there kit. The list includes pricing per part and I would like the list to calculate the costing as … | |
I am trying to write a sample program that can call use the main method of "SequenceFilesFromDirectory", which aims to convert a set of files into sequence file format. [CODE]public class TestSequenceFileConverter { public static void main(String args[]){ String inputDir = "inputDir"; String outputDir = "outoutDir"; SequenceFilesFromDirectory.main(new String[] {"--input", inputDir.toString(), … | |
I'm working on some C# code. It's not as readable as it could be because of the formatting used. Is anyone aware of any good code beautifiers that work well and adheres to industry standards? Interested in free ones too - if available | |
Hello everyone first of all thanks to daniweb and all users to help me lots of time. now come to problem i am learning java from last one month today i wrote a program to swap two objects it is running but not performing desired task. all instance fields are … | |
Hi Everyone I want every single operation carried out on my application from signing in to signing out written to a text file and the operations would have a timestamp for each corresponding operation. How do i go about this, i have no single idea at all. Thanks | |
Hello everyone. I just started on 'converting' my multiplayer text RPG into a graphical form. What I am trying to do is this: Create a title window, basicly just a JPanel with one image filling the space. To this JPanel I add a MouseListener. When a user clicks the window … | |
I have a similar issue (somewhat) -- VB6 and Access97 My code in Option Explicit is [CODE]Dim dbs2 As Database[/CODE] In the Private Sub Form_Load(), I have [CODE]Set dbs2 = OpenDatabase("C:\Program Files\members\members.mdb",True,False)[/CODE] The Run Time Error I get is: Couldn't find file 'C:\Program Files\Members\Members.mdb'. In the Debug: When the cursor … | |
hi, I am facing parser error while embedding php tag in text box value. print "<tr><td><font color=\"#0080FF\" face=\"sans-serif\" size=\"2\"><b>emp :$nbsp</b><input type='text' name='txt1' size='10' style=text-transform:uppercase maxlength='7' [B]value="<?php echo $_POST[txt1];?> >[/B]</font></td></tr>"; please help me out. | |
[code = c][/code] I am trying to write a program that takes a 10 digit phone number and inserts hyphens between the 3rd and 4th digit and the 6th and 7th digit eg. Enter phone number: 5553459875 Your number is 555-345-9876 I've decided that reading the number as an integer … | |
Hi I am trying to write something that compiles and runs correctly on both Linux and Windows. I am running bash in Ubuntu on Linux, and I try to set environment variables in the makefile just before the compile lines. I then write something in the code like [CODE] int … | |
I am having issues finding a way to have the below program search for any given string of "query" in the keys of the dictionary AB and return the value, or the key and value. Thus far I just done what I have preset in the dictionary; Ashley and Joshua, … | |
Hello every single one :) I want to introduce you how to enable Javascript in web browsers where it's disabled.. This is only a try I'm going to make... And I want someone to kindly correct me if I'm wrong, or to say I'm right if I'm so. To enable … | |
I need help with managing my forms. below is a sample code for one of my button that opens a new form on button click. But today while I was testing the application, I found out that everytime I have button click, I get a new instance of the same … | |
hi guys , I rented a gps from the airport and it had no problem giving me the directions , while using it , I kept wondering how it picks the routes , and can python be used to program these devices and how ? a short code would be … | |
Hi friends If we will override nonstatic methods or if we will overload non static methods means shall we say it is the run time polymorphism? Is that so how to give example for compile time polymorphism in java? If i will override static method means, friends are saying it … | |
Hello Is there a tutorial or example which could enable me develop a flipbook similar to the one shown on this link: [url]http://www.20thingsilearned.com/en-US/home[/url] ? I've tried google, but not found anything similar, except that link itself | |
Hey everyone, my if-statements are working as expected. Actually, they are not working at all. The syntax is right but they are never run. The program terminates before it runs them. [code] public static void main (String args[]){ Scanner input = new Scanner(System.in); Display fName = new Display(); // creating … | |
Hello, I´m currently developing an application which sends data to my Windows server. I already wrote the following code (server-side) [CODE]namespace server { public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); Server s = new Server(3000); s.ExceptionReceived += new Server.ExceptionReceivedHandler(s_ExceptionReceived); } void s_ExceptionReceived(exception e) { MessageBox.Show(string.Format("DateTime: {0} … | |
Hi all, I want to understand the purpose of .resx file. i konw that Designer.cs is the class for the form. i read that .resx stores resources. 1. But what kind of resorces? 2. where is it used in the form? 3 when i opend it shows only "String1". Why? … | |
I'm working on a project where I would like to compare collections of words, but I have additional constraints I need to account for. The collections are like a set in that order doesn't matter for the comparison. However, in my problem equal elements are significant. E.g. the collection of … | |
I was asked a question a few days ago that I cannot easily answer. "Why don't we put all of our small application databases into a single database?" Well, There's nothing really stopping us. All of our small apps were developed in house so we don't have any problems with … | |
[CODE] Public Sub imageload(ByVal index As Integer, ByRef imagedescription() As String) Dim da As New OleDbDataAdapter("Select Foto From Images where Photoindex = " & index & ";", Form1.baglanti) Dim dt As New DataTable Dim ms As New MemoryStream da.Fill(dt) If dt.Rows.Count > 0 Then Dim arrimage() As Byte = dt.Rows(0).Item(0) … | |
here is the test.html [CODE]<html> <body> <form action="test1.php" method=post> Name :<input name= "name" type="text"> </body> </html>[/CODE] And here it is the test1.php [CODE]<?php $name= $_POST['name']; echo $name; ?>[/CODE] But it doesnt display the name .Can anyone help me ?? | |
how to handle the database when multiusers are inserting data at same time flow 1.First user click on save button 2.sp_1 will be execute which is used to insert the data in table1 3.primary key value will be retrive from sp_1 to aspx.cs form. 4 sp_2 will be execute next. … |
The End.