- Upvotes Received
- 2
- Posts with Upvotes
- 1
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
26 Posted Topics
What is the mistake in this code, I am able to print the total digits of the input number, but when I try to print the *actual number* from the scanner it always prints zero(0). For example the user enters **123456** as the input, and my program is correctly returning … | |
Hi guys why am I getting the error identifier expected at the package statement ? Here is my code. package com.example.abstract; public abstract class Car{ private double price; private String color; private String year; private String model; abstract double accelerate(); abstract double horsePower(); public void setPrice(double price){ this.price = price; … | |
Hi guys , Assume the following is my program, is there a way to see how the memory is being allocated by the java program ? How do I use jconsole to find out where in main memory that Integer i = 10 is being saved? public class IntegerCmp{ public … | |
How do I display the individual integers from the scanner input stream for example if the user enters 500 I would like to display it as 5, 0, 0. Here is the code guys import java.util.Scanner; public class Digit { public static void main(String[] args) { int number, i = … | |
Re: I wanted to get the input from the user and then use this to translate the words from English to German for example if an user types "a" the exact german meaning of a is "ein" simillarly if the user types "an" the exact German meaning is "eine". So let … | |
Hi all Please find the telegram android application's source code https://github.com/DrKLO/Telegram/ This is a working android application, and I want to use this application as a messenger in my web application, so with this same set of code can I be able to create a web application. Thanks Varun Krishna. … | |
Re: Hello I don't know whether you have started/completed this work all by yourself. If you don't know how to start with I will give you few hints, based on that try to do it. 1. In order to get the number from the user try `java.util.Scanner` and store it in … | |
Hello all I am using Generics in Java to perform some arithmetic operations, but I am getting some error **The operator + is undefined for the argument type(s) T, T** here is my code package com.genericsexample; public class GenericsArithmetic<T> { private T number1, number2,sum,product,difference; public void AddNumbers(T number1, T number2){ … | |
Hi all I wish to start learning Spring 3 mvc how do I get it started with either Gradle/maven in Spring Tool Suite (STS). What is the easiest way to learn Spring 3 mvc. I know that there are many tutorials out there, but I could not find the right … | |
I am using PrintWriter to write the input from the standard input to a file, here I am trying to create an ascii table in the text file, but there is no proper alignment of the table in the text file. Here is my code guys. package code.practise.MyIdeas; import java.io.FileNotFoundException; … | |
Hi all Here is my snippet for(int i = 1;;i++){ System.out.println("Please enter the name:"); name = input.nextLine(); System.out.println("Please enter the email:"); email = input.nextLine(); if(!email.matches(EMAIL_PATTERN)){ System.out.println("Please enter a valid email.\nThe details are not saved please start from the beginning."); i--; // break; continue; } else { printwriter.println("|"+i+")\t|"+name+"\t|"+email+"\t|"); printwriter.println("+-----\t+-----\t+-----\t+"); } if(i>=1){ … | |
Hi all I have a simple login form with Username and password as fields when the user clicks the login I wish to check the xml whether the username and password is present in the xml. How do I do this, could someone please give me some ideas ? My … | |
Hi all I have a textarea I would like to validate the same for empty spaces and on no input. Please find my jsfiddle [here](http://jsfiddle.net/Varun_Krishna/jJh8q/). How do I validate for empty spaces in the text area? what am I missing in my fiddle? Thanks Varun Krishna. P | |
Hi all I have a json format which has two objects Created_date and Reply_date. Created_date has a date on which a message is created and the Reply_date tells when the user has replied to that messge. So I am getting the Created_date as follows var createDate = new Date(Created_date); var … | |
Hi all I am writing a java program to display the dob of sportsperson, now I have use the java.util.Date to display the date on to the consloe. But since it is deprecated I wish to use some other method to get and display the date from the user. Here … | |
Hi everyone I need a suggestion on detecting the faults/bugs in a java program. To say I should check whether my program is faultless. Thanks, Varun Krishna. P | |
Hello everyone I have created a java program using jsch0.1.50.jar to remove the directories in the sftp server. But I could not remove the folder "03-03-2014" as it contains a subfolder named "1837hrs" when I try to run the program I am getting the following error: > 4: The directory … | |
I am learning JSP, and have developed a books application, which displays the book-id,title,author and price. There are seperate text box for each of the field, whenever the user fills the form and hits submit button the value must be inserted into my database. If I try to submit it … | |
Hi everyone I am learning python, I came across a sample program which checks whether the given number is prime number or is not a prime number using **for loop** and **range()** function. I can't understand that program, can someone please help me understand it? Here is the program and … | |
I am learning C# there I came across two programs they both, get the users' input at the run time. The first program is using **int.Parse()** method to convert the string to int and the second program is using the **Convert.ToInt32()** to do the same task. Now my question is … | |
I had created a dropdownlist box as follows. The contents of default.aspx is listed below <asp:DropDownList runat="server" ID="day" CssClass="dobselect"> <asp:ListItem Value="0" Text="DAY"></asp:ListItem> </asp:DropDownList> <asp:DropDownList runat="server" ID="month" CssClass="dobselect"> <asp:ListItem Value="0" Text="MONTH"></asp:ListItem> </asp:DropDownList> <asp:DropDownList ID="year" CssClass="dobselect" runat="server"> <asp:ListItem Value="0" Text="YEAR"></asp:ListItem> </asp:DropDownList> Then in the default.cs.aspx I had added the following code to … | |
def word_Rep(text,Dic_Word): rc = re.compile('|'.join(map(re.escape, Dic_Word))) def translate(match): return Dic_Word[match.group()] return rc.sub(translate, text) Dic_Word= { #A Words 'a':'ein', 'an':'eine', 'able':'KOmmen', 'about':'gegen', 'above':'Uber', 'absence':'Abwesenheit', 'absent':'abwesend', 'accent':'Betonung', 'accept':'akzeptieren', 'according':'nach', 'acquainted':'kennen', 'across':'uber' } Text_Trans= raw_input("[*]ENTER THE TEXT TO TRANSLATE:") Trans=word_Rep(Text_Trans,Dic_Word) print Trans please refer the above code. What happens here is that ,if … | |
Here I am using askopenfile to upload a (text)file, I also wanted to display the file name next to the upload button and then I want to read its contents and convert it to another language. Say for example if the document is in English I want to convert it … | |
When I was going through a program of my friends, suddenly I came across a strange for loop, I was wondering about the for loop since then, the loop looked like this for(1=0,ii=result.length;i<ii;i++) Is this for loop a valid for loop? Can any one please help me? | |
Is the following Code correct, for calculating Decimal to Triskaidecimal and Triskaidecimal to Decimal, I hope this code is not right import java.util.Scanner; public class converter { /* 1) Decimal To Triskaidecimal 2) Triskaidecimal To Decimal 3)Exit. */ public static void main(String ar[]) { int a, b; String s; System.out.println("Please … | |
I am currently working on a translator which translates one document from English to German, I had created it as a GUI application using Tkinter and python 2.7, Here I am facing some problems like 1. Assume that if a person uploads a document 'samp.txt' in the using the upload … |
The End.