199,114 Archived Topics
Remove Filter ![]() | |
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 … | |
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 … | |
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 … | |
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 … | |
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 ... | |
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" … | |
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 } … | |
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"> … | |
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 … ![]() | |
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 … ![]() | |
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() … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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? | |
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&C-Relived Control Panel</title> </head> <body> <span>Login Successful</span> <form name="form1" method="post" action="logout.php"> <input type="submit" name="Submit" … | |
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 … | |
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 … | |
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 … | |
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... ' ********************************************************************************* … | |
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 … | |
Query your datatable like sql's "select distinct" statement | |
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 … | |
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 … | |
![]() | 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 … |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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.. | |
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?? | |
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 … | |
#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) { … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
// 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 … |
The End.