132,726 Archived Topics
Remove Filter ![]() | |
I am new to Java and really lost. Can someone help me out? I am not sure what is wrong here. import java.io.*; import java.util.Scanner; //For the scanner public class practice { public static void main(String[] args) throws Exception{ } BufferedReader in= new BufferedReader(new InputStreamReader(System.in)); String str; { //Create a … Software Development java | |
Good day! How to copy a file from one location to another.ex c:\ to c:\copied in silent mode.When i load the form it will copy the file automatically. Ex. name.xls - the name of the file to copy. Pls help. Thank you for giving time! Software Development visual-basic | |
Hi there, I'm new to the site and new to learning C++. The program I am writing is for a C++ college class, and I'm just having a little trouble on if I am formatting the if statements I am using correctly. I'll give a breakdown of the assignment. I … Software Development c++ | |
hello, everyone... I got an issue here, my db that bind at my applet doesn't load at the web browser but it run very well at appletviewer. here the error : [code] Java Plug-in 1.6.0_13 Using JRE version 1.6.0_13 Java HotSpot(TM) Client VM User home directory = C:\Documents and Settings\Admin … Software Development client-server java java-netbeans queue web-browser web-server | |
Hey guys, How would I go about sorting an Array of Strings, using either a selection sort or a insertion sort? I have written an insertion sort, but i only works for integers. How can i modify it to work with strings. [CODE]Public Sub InsertionSort(ByVal numitems As Integer) Dim currentitem, … Software Development visual-basic | |
Bellow is the code for a button where i am trying to execute an email valiadator before and email is sent. The if statement works great until i enter the msgmail code in it. then i get an invalid expression error. Can someone please help me with this?? thanks [code] … Software Development regex | |
Hi to all, Programmers. :icon_smile: [B]i require a general syntax for checking if the [COLOR="Red"]SQL table[/COLOR] is empty or Contains records.[/B] if the table is empty i'm suppose to add initial counter (like 0001) and if table already contain records then i'm suppose to increment the counter by ONE. The … Software Development vb.net | |
I'm not at all sure where to put this question. It's been a long tine since I messed with basic, and I'm not a programmer of any kind. I got interested in a method for calculating the Golden mean, and I'm hoping some kind soul will point me in the … Software Development qbasic visual-basic | |
hi I want to make a custom message box alert just like VB6 built-in "VBOKCancel"....In that custom message box alert, i want the functionality of "VBOKCancel" as well as an additional button and check boxes.....much appreciated if anybody helps me out. Thanx Software Development visual-basic | |
[CODE] Dim DesinNum As DataColumn = New DataColumn With DesinNum .ColumnName = "DEsign#" .Expression = "ISNULL(usrini,'')+design+typcde" End With With Design_dt.Columns .Add(DesinNum) End With[/CODE] These are the results I'm getting usrini="J", Design=123,typcde=cst expression=j123cst usrini="J", Design=123,typcde="" expression="" I have this code to add a new colum in the datagrid. It seams to … Software Development vb.net | |
I am a brand new programmer attempting to teach myself C++. I understand that it is a rather complex language to begin with but I also understand it to be the most useful in the long run and one of the best building blocks for learning other languages. With that … Software Development c++ | |
Here are my 3 files interface file #ifndef INTERFACE_H_INCLUDED #define INTERFACE_H_INCLUDED #include <time.h> class timer { public: void start(); void end(); int elapsed(); int subtract(); int add(); int output(unsigned int seconds); private: bool running; int begin; int finish; }; #endif // INTERFACE_H_INCLUDED implementation file using namespace std; #include "Interface.h" #include … Software Development c++ | |
I'm have a small confusion, and i need a little clarification; when you make something on the heap, like this: [code=C++]int *somePointer = NULL; somePointer = new int;[/code] an int is created on the heap right? This would be the equivalent of doing something like...: [code=C++]int x;[/code] ...directly on the … Software Development c++ | |
Hey, Im using readprocessmemory to get information on a game, but for some reason it skips two bytes.. part of my structure is similar to [code=cplusplus] WORD a; DWORD b; DWORD c; DWORD d; [/code] and i read the following memory into it: 00 00 FF FF FF FF 02 … Software Development c++ | |
All, i have a pretty simple task but for some reason i cannot for the life of me figure out how to do it in Python. I have a matrix of numbers, this matrix has a variable number of rows depending on the dataset but always 30 columns. first things … Software Development dataset python visual-basic | |
[CODE] //#include<iostream> class std { public: int i; }; int main() { std A; //float f=0.0f; } [/CODE] error: ‘struct std’ redeclared as different kind of symbol error: previous declaration of ‘namespace std { }’ on compiling , above error comes. we are not including any header file.....then how compiler … Software Development c++ | |
The following snippet throws an Exception in printin part.... [ICODE] ArrayList<ArrayList<Integer>> a = new ArrayList<ArrayList<Integer>>(5); for(int i = 0 ; i < a.size() ; i++){ a.set(i, new ArrayList<Integer>(10)); } System.out.println(a.get(a.size()-1).get(9));//exception thrown [/ICODE] can anyone explain why... thanks in advance... Software Development java | |
Hello, My program runs and I have successfully written my Find and Display functions for my vector and have gotten them to work. However, my Remove and Search functions are not working; to be more specific, they are able to search for a value, but no value is found. Any … Software Development c++ | |
import java.util.Scanner; public class stack { /** * @param args */ public static void main(String[] args) { int result ; int output ; Scanner num = new Scanner(System.in); int input = num.nextInt(); for(int j = 0;j<input;j++) { int output1 = 0; output = num.nextInt(); for(int i = 0;i<output;i++) { if(output … Software Development java | |
I'm following a tutorial on Win32, and as I compile the examples, I'm also kinda messing with the code to experiment with different concepts. Here is a little ditty i worked with: main.cpp [code=C]#include <windows.h> #include <iostream> #include "prototypes.h" #include "defines.h" LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); void AddMenus(HWND); int … Software Development c++ | |
Hi, Guys can any1 help me I'm quite a noob in Assembly language and I have an important school work to be done. And I dont even know how to start. This is what I need: An assembly program for 8086/8088 that opens a given .txt file and counts up … Software Development assembly | |
Hi, I have 15 textboxes that I created. Now, I want to assign a value to each of these texboxes. I want to do somethign like this. [CODE] for(int i = 0; i < 15; i++) { //example: texbox0.Text = 0; (textbox.Name+i.tostring).Text = i.tostring(); } [/CODE] Thank you for your … Software Development | |
I have this code being called by a QMainWindow: [code=c++] centralWidget()->currentWidget()->addSubWindow(new SubWindow()); [/code] the centralWidget is a QTabWidget the currentWidget is a QMdiWindow and I get the error: [icode] error: 'class QWidget' has no member named 'currentWidget' [/icode] please help | |
Hello, I am writing an application which uses the trig functions of the math module in python but for some reason, the float values that some of the calculations return are obviously incorrect. for example [code=python]math.cos(90*math.pi/180)[/code] returns 6.1230317691118863e-17 rather than 0. Does anyone know of a way which I cant … Software Development python | |
Here's the code i'm running. I know it's not the connection because it connects fine, it just doesn't like the transaction. Thank you to any who help. [code=c#] OracleTransaction txn = conn.BeginTransaction(); try { // Set the connection property of the command object OracleCommand cmd = conn.CreateCommand(); cmd.Connection = conn; … Software Development | |
So I have been playing with classes, seeing that they are more efficient than globals, and I wrote this hopefully simple test program to see if I properly reverse engineered tetlaw's simple rpg. For the life of me I cannot figure out what is wrong with it. If an expert … Software Development python | |
The code found below takes command lines arguiments and displays. I want to modify this code in anyway that it would take 2 set of command line arguiments and produces 2 outputs. (That means , Open 2 command prompts and run the code) ex: first cmd prmpt -> java CmdLnArgmntExp … Software Development java | |
[quote]I've written below simple code.Actually need to do that the value which is given by an user that will use as macro and macro value will automatically initialyzed to all needed place.Not to given every time.[/quote][CODE]#include<iostream> #include "conio.h" #define AB def() int main(int argc, char* argv) { int a=3,b=2; int … | |
Hello! I have program that consists of multiple forms. Each of the forms share a common variable which I stored in the main form. But to access the variable from another form, I have to type something quite long like this: MainForm.CommonVar.Function(arg1, arg2, arg3, arg8) I use this many times … Software Development vb.net | |
I have a problem with syntax in C#. I need to make my own treeview control in which I just need to add one property to nodes. For an example, if I have list of files listed in my tree, I want to keep filesize somewhere that is related to … Software Development | |
Hi I have Microsoft Visual C++ 2008 Express Edition and I downloaded fltk from fltk.org. When I tried compiling it, i got many of these errors: LINK : fatal error LNK1181: cannot open input file 'fltk.lib' How do i compile FLTK now? Please help Software Development c++ | |
I want to show contextMenu on Menu Item Right click..But probs is dat when i right click on menu Item,Context Menu is popping up..But menu disapper..I want that menu should not be disappered... See in Attachment [code] Private Sub MenuAddToFavorites_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MenuAddToFavorites.MouseDown If … Software Development vb.net | |
package casesar02; import java.util.Scanner; public class casesar02 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int key = 4; // scan.nextLine(); String str = scan.nextLine(); String encrypted = encrypt(str, key); System.out.println(encrypted); } public static String encrypt(String str, int key) { String encrypted = ""; for (int … Software Development java | |
My apologies my c++ abilities are poor (self taught) I have a text file that needs editing the first 10 lines of the file needs replacing but the other 1,000,000 + lines don't I need the information in the first 10 lines to know what to edit them to i … Software Development c++ | |
Hello, I was doing a test Win32 Project. I am using the standard rename() function under cstdio. My program was not working. So, while tracing, I got the return value of rename function as [B]-1[/B]. I have not seen anywhere, rename(0 function returning -1. Could anyone tell me what's wrong. … Software Development c++ | |
hey i just started python.. i know this is a useless stupid program but i still cant get it right..:( here i want the user to enter date in dd/mm/yyyy fashion and return the date in words. eg. 12/12/1912= 12th December,1912 but it doesnt work.. it only works for 29 … Software Development python | |
hi my program is supposd to deleted repeated (identical) array elements within an array. Although its not working but I can figure out why? Also is there a more advanced way of doing this; checking for repetitions in an array? I am not sure but maybe using stringstream? I am … Software Development c++ | |
Let's say a user of my application opens two or more MDIChildFrames. How can I get access to any one of the child frames? If I keep track of the names of the child frames in a list is there a way to use the name to call upon a … Software Development python | |
So, hello, guys. I'm new to this forums and this problem has been bugging me lately. I'm making a Windows Forms app in C#: So I have a form with two buttons, one of them is a "New" button (private void botonNuevo_Click(object sender, EventArgs e)). This new button creates a … Software Development | |
I work in Visual C++ ,Win32 aplication and I want to play more sounds together and I don't know how. I used PlaySound() but this function play only one sound at a time. If you have some solutions post them here please. Thank you!! Software Development c++ | |
I've been trying to do a really easy game here, the thing is that the when a player reaches 0, it just keep going to -5 and such like. WHat's wrong? [code=c++] #include <iostream> #include <cstdio> #include <cstdlib> using namespace std; int main () { srand(time(0)); int player1 = 100; … Software Development c++ | |
I am just learning C# how to clear a cmd line after wrong entry like wrong user name or password in C sharp? my codes here, have a look thanks ---------------------------------------- [code=csharp] using System; using System.Collections.Generic; using System.Text; namespace DisplayLogin { class Program { static void Main() { Console.WriteLine("________________________________________________"); Console.WriteLine(""); … Software Development c# | |
I was wondering if anyone could give me the code for email validation on a textbox named, txtEmail. I have used a validator but there is a problem with IIS7 and this so i need to code it behind the text box. I would like to inform the user that … Software Development email | |
Hey everyone, well I wrote this program because I haven't seen anyone do it yet (it has always been random numbers, not sentences.) Also I just wanted to see if I could do it :). Im posting this not because I need it fixed, although I'll tweak it if I … Software Development c++ | |
Hi all, I have set up a project in Eclipse 3.1 and am using java 5.0 compiler. Here's my folder structure in Eclipse [code] DFS\RemoteClient\TestClient.java DFS is the project in Eclipse [/code] and this is how it looks my java class [code] package RemoteClient; import java.util.*; // other imports public … Software Development java | |
When I run this code: [CODE]sql = "SELECT Name FROM nameDatabase" self.cursor.execute(sql) list=self.cursor.fetchall() print list[/CODE] I get: >>> [(u'Joe',), (u'Katie',), (u'Bob',), (u'Ian',)] However, if I try to make a SingleChoiceDialog with wxpython it does not like that list. Is there any way to get those values in a so it … | |
Hi. I'm trying to write a program that, when ran, opens an undecorated JFrame, and shows a list of icons that when clicked on, run a program, or open a folder. I'm having trouble getting the actual Icon Image. When I try, it gives me one of the default Java … Software Development image java java-swing | |
Hi. I am creating own compiler/linker. What is the most standard and recommended way to use binary libraries? (such as user.obj,gdi.obj) Is it better take them from Windows directly, from some version of Visual Studio, or exist special SDK distributions? Thanks. Software Development c++ visual-studio | |
Hi Folks, I have two questions: 1). How to escape CDATA in your xslt script? [code] <xsl:template match="/"> <![CDATA[ <xsl:apply-templates select="node()"/> ]]> </xsl:template> [/code] In the above code, the template inside CDATA does not get executed. What I actually want is the result from this template (<xsl:apply-templates select="node()"/>) to be … Software Development xml | |
I tried the first post on wxpython by fuse. The code is as follows # import wx # # always add this line, or your code won't compile - the wx module contains the GUI code you'll use # """The start of our wxPython GUI tutorial""" # # app = … |
The End.