199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for dineshswamy

I dont understand why we are using super.paint() in this code. help me to figure out why? [CODE] public class SetJTextFieldBackgroundImage extends JTextField { public SetJTextFieldBackgroundImage() { JFrame frame=new JFrame("Set JTextField background image"); frame.add(this); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(300,65); frame.setLocationRelativeTo(null); frame.setResizable(false); frame.setVisible(true); } public void paint(Graphics g) { setOpaque(false); //Image that will be …

Member Avatar for JamesCherrill
0
1K
Member Avatar for M.S.

I tried many times but no luck. I want to parse a text file with a vcard format (from my phone contacts). the text file looks like this: BEGIN:VCARD VERSION:2.1 REV:20110913T095232Z UID:aac119d5fe3bc9dc-00e17913379d6cc8-3 N;X-EPOCCNTMODELLABEL1=First name:;[B]Maj[/B];;; TEL;VOICE:[B]09120000000[/B] X-CLASS:private END:VCARD BEGIN:VCARD VERSION:2.1 REV:20110228T083215Z UID:aac119d5fe3bc9dc-00e17b0693898c98-4 N;X-EPOCCNTMODELLABEL1=First name:;[B]Ali jahan[/B];;; TEL;VOICE:[B]09120000001[/B] X-CLASS:private END:VCARD BEGIN:VCARD VERSION:2.1 REV:20110228T083510Z …

Member Avatar for snippsat
0
2K
Member Avatar for akpaga22

Hi friends I am learning C# language online and came across this question Code Exercise: Cola Machine Please use the language of your choice to model a simple cola machine. Within the cola machine, please create classes for the Drinks, Inventory and Bank. The Inventory should hold multiple types of …

Member Avatar for AlexanderBell
0
197
Member Avatar for Goldfinch

Hi, I'm trying to understand a java concept, I'm trying to get a piece of code to work without changing the main method. [CODE=java] public class TestProg2{ public static void main(String args[]){ String filler1="Rank"; String filler2="Suit"; Card card = new Card(); System.out.println(card); } } class Card{ public String Card(){ String …

Member Avatar for DavidKroukamp
0
134
Member Avatar for Dumb Fish

hi, i need to ask how to generate the negative answer? i have one formula. But always give me positive answer.. For exmaple: [B]AllocatDiff2 = 100 * -0.05;[/B] hope somebody can help me ...ASAP!! Thanks ...

Member Avatar for thines01
0
166
Member Avatar for liphoso

I have a table in my database and i would like to bring up all the details where the datafield "votes" is the largest. i cannot get the fuctionality i desire. i would like a user to make a choice from the selection then have all the datafield where "votes" …

Member Avatar for smantscheff
0
162
Member Avatar for ThaiAmL

Writing an abstract class for homework - here's what I have so far: [CODE]public abstract class Pet { String petName; double foodAmount; double foodSupply; int days; public Pet(String petName, double foodSupply) { //constructor to be used by sub-classes this.petName = petName; this.foodSupply = foodSupply; } public Pet() {//default constructor } …

Member Avatar for stultuske
0
768
Member Avatar for PF2G

Hi, I'm doing a table that list courses that are in BD, but i'm having some problem, can someone help me? [CODE]<?PHP include 'topo.php'; include 'db_connect.php'; $sql = "SELECT * FROM cursos"; $query = mysql_query($sql,$connect); ?> <table> <?PHP while ($row = mysql_fetch_array($query)) { ?> <tr> <td> <div id="navigation-block"> <ul id="sliding-navigation"> …

Member Avatar for pzuurveen
0
121
Member Avatar for Danny159

Hey, I am a programmer in PHP Procedural and have just applied for a new job to further my career as a PHP Programmer, however they said it's advised to learn PHP OOP... so I have been watching some tutorials about PHP OOP and it just looks like OOP is …

Member Avatar for diafol
0
218
Member Avatar for IanArcher

I have a drop down menu on a remote page whose source i can only view/copy but cannot edit it , so i am attempting to reconstruct the page from the source code of the currently existing one. I want to select all options from the menu when so i …

Member Avatar for diafol
0
149
Member Avatar for hust921

Hey i know this is a stupid question, but i have no idia how to google it. I have copied this code directly from a book: Btw, my main() method is empty. [CODE] package benytterning; public class Terning { public int værdi; public Terning() { kast(); } public void kast() …

Member Avatar for zeroliken
0
136
Member Avatar for 3nrichedd

I am working on this assignment in my java class, and am running into a few problems. Basically there are 2 classes and a main/client program that tests the classes. there is 1 superclass and a subclass that extends the superclass.. I have 2 constructors in my superclass but when …

Member Avatar for hiddepolen
0
255
Member Avatar for smarty_t2

Hi, I wrote a small application in c# using .NET framework 4.0 next, I used the deploy feature while publishing the application but when click on the install button in the deploy webpage i get an error. The details include this: "Your Web browser settings do not allow you to …

Member Avatar for smarty_t2
0
157
Member Avatar for eagles39

I have a final coming up and the professor has hinted in class that there would be a question on how to make the primitive min operation in Big-O(1). I know that its capable of and how it works in Big-O(log n). I have idea that it will involve the …

Member Avatar for Rashakil Fol
0
150
Member Avatar for aquamarine_kath

Hi Guys. I'm having an error "Error No. 2003. Can't connect to MySQL server on 'localhost' (10061)". I am using windows XP in my laptop. Before, I have no problem in using MySQL. I also tried to connect using MySQL Administrator, but I got the same error. Sometimes I can …

Member Avatar for sbhavin
0
2K
Member Avatar for Cameronsmith63

So i have a datagrid and I have a databindingsource control for my text file. Works like a bomb, but then i added a toolstripmenu so that i can right click on the datagrid, a menu pops up and i can delete the row of data from the text file …

Member Avatar for Cameronsmith63
0
2K
Member Avatar for pimzy

Hi, I am working on a project to manage information of our faculty from ASP.net in C#. There are profiles for lecturer,student and department head. When Admin set privileges to do tasks Eg:edit student details, this should be appear only in the lecturer profile as a links to edit those …

Member Avatar for pimzy
0
144
Member Avatar for HasNor

Hi all, i have a problem when my system is not workable if running on the server, but at local host it run as usual without error.. when i want to insert the data it show "Data Not Inserted". Why it happen?

Member Avatar for HasNor
0
98
Member Avatar for Commando112

Hi, what is the best replacement for session_is_registered? Here is my code Main Page [CODE=PHP]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <? session_start(); if(!session_is_registered(myusername)){ header("location:index.php"); } ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>C&amp;C-Relived Control Panel</title> </head> <body> <span>Login Successful</span> <form name="form1" method="post" action="logout.php"> <input type="submit" name="Submit" …

Member Avatar for edwinhermann
0
102
Member Avatar for rotemorb

Hello I'm a computer engineer. I would like to enter into the world of android programming. I wish to buy a book in Amazon, but i'm in a bit of a dilema between: Beginning Android 4 (Beginning Apress): [URL="http://www.amazon.com/Beginning-Android-4-Apress/dp/1430239840/ref=sr_1_1?s=books&ie=UTF8&qid=1328103564&sr=1-1"]http://www.amazon.com/Beginning-Android-4-Apress/dp/1430239840/ref=sr_1_1?s=books&ie=UTF8&qid=1328103564&sr=1-1[/URL] And Beginning Android 4 for games: [URL="http://www.amazon.com/Beginning-Android-Games-Development-Apress/dp/1430239875/ref=sr_1_2?s=books&ie=UTF8&qid=1328103848&sr=1-2"]http://www.amazon.com/Beginning-Android-Games-Development-Apress/dp/1430239875/ref=sr_1_2?s=books&ie=UTF8&qid=1328103848&sr=1-2[/URL] Which of these two …

Member Avatar for peter_budo
0
173
Member Avatar for ahoysailor

Hey, I'm trying to search a List for a substring, but even if it does exist the result is coming out as negative (not present) using the BinarySearch. The idea is that once the file has been loaded into the list I search to see if substrings exist (i.e. IDS_STRING1 …

Member Avatar for ahoysailor
0
211
Member Avatar for jemz

Hi, Is it possible to download the javascript API documentation,and to use it without internet connection?.can you help me please where to download the api and how to use this without using internet.just like in java api i downloaded it and use it without the internet connection. Thank you in …

Member Avatar for jemz
0
137
Member Avatar for tendaimare

guys I have a program that i am working on and I want to know how to change the background color of a sstab control to white i am using vb6 here is the program: [CODE] 'Put the code in form1 Option Explicit ' ********************************************************************************* ' API Declarations... ' ********************************************************************************* …

0
252
Member Avatar for AquaNut

Hi Coders, Once again I feel I need your help/assistance. I have been trawling the net and forums for a simple way of automatically updating a newer version of my application from a network share. Everything I have read pertains to an update from a web site. This is possibly …

Member Avatar for AquaNut
0
694
Member Avatar for serkan sendur
Member Avatar for poojavb

Hello All, Actually I am facing issue in creating an ASP.net application. I have created a project in VB.net but now my seniors are saying that the code should be in ASP.net and it is taking hell lot of time for code conversion, designing and all other stuff. Actually I …

Member Avatar for poojavb
0
368
Member Avatar for monica86

I am very new to this and the computer programming world in general, and I'm having a problem with my program and I think I'm just making one little mistake, but I can't figure out what it is! I'm using class GetStats to be the main for my other class …

Member Avatar for stultuske
0
7K
Member Avatar for apeiron27

ok i'm not sure if i can use regex to do this it'd be great if you can give some suggestions! i have a list of pure numbers in one hand and another list of also numbers but with dashes. it's like this: list1 = [245366556346,4534525326562,56345254234237... list2 = [75465-54224-4,3-55-342526,.... as …

Member Avatar for Gribouillis
0
107
Member Avatar for needforkevin

hello all! i am working on a bank account type program where the user can add accounts delete accounts make deposits and so on. i have most of the code working but i am getting an error and i cant figure out whats wrong. if someone could steer me in …

Member Avatar for ravenous
0
174
Member Avatar for bhagawatshinde

Hi guys, I am trouble to find out the solution can anybody help me, I am developing an windows application in 2.0 framework in vs2005 and making exe but on some operating system (Windows7 service pack1 64 bit Home premium, windows xp service pack 3) it throws an error while …

Member Avatar for skatamatic
0
102
Member Avatar for revjim44

I'm trying to write C# code for a code-behind page in an ASP.project. I'm to the point where if any of the fields are blank, the code returns the page with the missing fields highlighted in yellow, and if all the fields are filled, then the page saves session state …

Member Avatar for mani-hellboy
0
260
Member Avatar for Alex_2011

Hi, I am totally lost and I went through a lot of sites about searching within an array, but I could not find any clues. I created the following array : Private LetterArray() As String = {"A", "B", "C"} and I don't know how to get the target letter from …

Member Avatar for Alex_2011
0
365
Member Avatar for codechrysalis

ok so im working on a application that displays the charges along with displaying the zip code. I seem to have a IO exception error for the console.clear() line. Is there anything else I need in order to display the charges along with zip code? Im thinking a nested if …

Member Avatar for skatamatic
0
168
Member Avatar for huskeraider

Greetings, I found the equivalent of this in Java but not Python. What i'm trying to figure out is how to reverse and print each of 5 lines in a text file backwards. I am able to take this: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod …

Member Avatar for Thisisnotanid
0
790
Member Avatar for poojavb

Hello All, Actually I am facing issue in creating an ASP.net application. I have created a project in VB.net but now my seniors are saying that the code should be in ASP.net and it is taking hell lot of time for code conversion, designing and all other stuff. Actually I …

Member Avatar for poojavb
0
221
Member Avatar for EBS.VivekGupta

Hi, I am working on a Windows application project for 2 months. Today i found that my most of the control events are not firing.. Till yesterday night all the forms were fine but i wonder what happened today. Can anyone pls help me out..

Member Avatar for skatamatic
0
526
Member Avatar for bhagyap

Hi.. I am working on an project(asp.net C#) where i need to implement search within the website where i would like too retrieve the search results based on their links.. Can anyone help me??

Member Avatar for mani-hellboy
0
177
Member Avatar for DJSAN10

I am reading Kernighan and Ritchie, and honestly, I am not able to understand anything in the following sentence I encountered while reading: [B]Any integer is converted to a given unsigned type by finding the smallest non-negative value that is congruent to that integer, modulo one more than the largest …

Member Avatar for DJSAN10
0
143
Member Avatar for yatin chauhan

#region Get Cart if (Session["MyCart"] != null) { if (Session["MyCart"].GetType().Name.StartsWith("List")) { cart = (List<Cart>)Session["MyCart"]; } } city.ShippingCharges = Common.ConvertToDecimal(ordersAddress.ShippingCity); liCity = (from sc in liCity where sc.ShippingCharges.Equals(city.ShippingCharges)select sc).ToList(); //liCity = (from sc in liCity where sc.Name.Equals(ordersAddress.ShippingCity) && sc.StateID.Equals(ordersAddress.ShippingStateID) select sc).ToList(); int TotalItem = 0; foreach (Cart c in cart) { …

Member Avatar for mani-hellboy
0
224
Member Avatar for Shillz

m receiving the following error while publishing my site on iis. Please help. I have also attached the screenshot Server ErrorInternet Information Services 7.5 Error Summary HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid. Detailed …

Member Avatar for Shillz
0
617
Member Avatar for arold10

I am writing this program about Gas mileage, In the program I am assigning a value that is -1 as a sentinel value, that's why I use the While loop. The problem is I can input [B]gallon[/B] variable, but the miles variable keep repeating over and over again. My question …

Member Avatar for zeroliken
0
155
Member Avatar for Mxous

I need to write a code that takes a percentage and converts it into a letter grade. The problem is that I'm not allowed to use if statements. 85-100 -> A 75-84 -> B 65-74 -> C 55-64 -> D 0-54 -> F One attempt I made was changing the …

Member Avatar for Mxous
0
138
Member Avatar for applebule5

I am trying to set up a database with Students, Courses and grades. This is the main bulk of my code, I am stuck with the error below, could anybody help me? [CODE] Imports System.Data.OleDb Imports ADODB Public Class Form_Main Dim cn As OleDbConnection Dim StudentUpdateCommand As New OleDbCommand Dim …

Member Avatar for hericles
0
168
Member Avatar for MBPB

Hi all. I am learning Java, and having a problem with a sentinel loop to fill an array. I want the loop to terminate when -1 is added, OR when the array is filled. [CODE] int i = 0; int counter = 0; int[] array = new int[40]; System.out.print("Enter values …

Member Avatar for DavidKroukamp
0
3K
Member Avatar for scheppy

Ok, so I have my code for the timer [CODE] computer = new Timer (4000, this); computer.start (); [/CODE] The timer starts at the end of a method, and is supposed to start another method via actionlistener after 4 seconds, the problem is, after 4 seconds, the timer gives a …

Member Avatar for DavidKroukamp
0
192
Member Avatar for Julia25

i have two html one which works in all browser and the other is for ie ex 1.html (not ie) and 2.html (ie) i added this in 1.html [CODE]!--[if IE]><meta http-equiv="refresh" content="0;URL=2.html/"><![endif]-->[/CODE] which works my question is if the visitor visit the same page (2.html) and using different browser i …

Member Avatar for Julia25
0
155
Member Avatar for yeeitsneo

hi! uhm. can anyone please help me out with this program im creating. its a automaton simulator. im having a problem with my way of presenting the simulation. my automaton accepts strings (0 and 1). the user then inputs any string from 0 and 1 ( eg. 000111 , 0101010 …

Member Avatar for Sam367
0
165
Member Avatar for miss_lovely

Write a class that accepts a user's hourly rate of pay and number of hours worked. Display the user's gross pay, the withholding tax (15% of gross pay) and the net pay, (gross pay - withholding) I have my code below, but I'm lost. I dont know what I'm doing …

Member Avatar for DavidKroukamp
0
2K
Member Avatar for HardToHandle

Hello guys, So my task is the following: Draw a pine tree based on user inputted height. How tall should the tree be?: 6 /\ / \ / \ / \ / \ / \ ------------ || || || I had problems moving the cursor from the left to right …

Member Avatar for HardToHandle
0
521
Member Avatar for Desi991

// secondstohhmms.cpp : Defines the entry point for the application. // [CODE]#include <iostream> using namespace std; #include "StdAfx.h" void main() { int time,hour,min,sec; cout<<"Enter time in seconds :"; cin>>time; hour=time/3600; time=time%3600; min=time/60; time=time%60; sec=time; cout<<"\n\nThe time is : "<<hour<<"::"<<min<<"::"<<sec; } [/CODE] Errors: >c:\users\desi9991\documents\visual studio 2010\projects\secondstohhmms\secondstohhmms\secondstohhmms.cpp(4): warning C4627: '#include <iostream>': skipped …

Member Avatar for thines01
0
238

The End.