Help Required in writing a small program
Create ajava program to manage vehicles.the class vehicle must have five attributes
maybe he cant figure out what five attributes a
vehicle class can have :-)boolean hasSpinnningRims;boolean isPimped;int noOf Wheels;
public final int LEFT_IN_MANCHESTER = 0;
public final int LEFT_IN_BRADFORD= 1;
public final int DELL_BOY = 3;
Similar Messages
-
Help required in writing an sql to fetch the the difference of the data.
Hi Gurus,
Could some one help me in writing an sql to pull data the difference between two same structured tables from two different database and to store that data in an temperory table.
many many thanks in advanceLets say you have two db SOURCE and DEST
SOURCE is the DB that you have Logged in into. Now you do the following.
1. Createa DBLink to DEST database.
2. Check if the DBLink works properly.
3. Then execute the following sql.
select <column_list> from <table_name>
minus
select <column_list> from <table_name>@<dblink>
union all
select <column_list> from <table_name>@<dblink>
minus
select <column_list> from <table_name> -
hi i have to wrtie 2 classes, relating to stocks and shares, they only have to be fairly basic, one class is the Share class, and the 2nd class is the Portfolio class. i have written th share class, but now going onto the portfolio one i am a bit stuck.
i have created the basic structure with the attributes needed, but then i need to perform 1operation on the data
1) load data from a file ( by repeatadly calling readData on Share objects)
so what i need to know is the code i need to write in order to load data into this portfolio class, from the share class? does anyone have an ideas?well ok i have been given 2 classes one called infile one called outfile, but then it says the basic methods that need to be performed on a portfolio object are
load data from a file( by repeatadly calling readData on Share objects)
this is all i have been provided with, so i have to beable to do the bit in the brackets -
Help required in writing And Reading Xml From Database
Hi
i m new to java.
i m facing problem while writing Xml file from Mysql Database in java i m using the WebRowSet
and also for Reading WebRowSet
after reading the Xml i have to save this in Database
(required source code)
is there any one to help me in this way
regards
aamirshadab_think_globally wrote:
{noformat}*hi everybody,
please send me a ajax with jsp application
suppose i enter a word in text area ajax will populate/suggest all string from database ,who started
from that entering character(s).like a google string search.
please send full source code
*{noformat}how about you do it yourself? -
Help needed in writing a small piece of ABAP Code
Subject : look up in an ODS and update in a characteristic routine (BI 7.0)
Hi ,
My requirement is : I have data coming from both legacy as well as SAP Systems. The user wants both legacy as well as SAP fields data in their reports.
I have a Standard DSO ( say DSO1) with all the legacy fields with direct mappings from Legacy sytem along with couple of SAP fields which are not mapped as of now.
I have few more DSO's which have just the legacy field and corresponding SAP field data.
like DSO 2 with ZCOMPCODE and 0COMPCODE data.
All i have to do is write a Routine for unmapped 0COMPCODE field in DSO1 that pulls up corrersponding 0COMPCODE values for ZCOMPCODE from DSO 2 .
*Could someone please help me with the Coding part of the Routine.*
Greatly appreciate your help.CREATE OR REPLACE FUNCTION fucntion_name(latA IN NUMBER, longA IN NUMBER, latB IN NUMBER, longB IN NUMBER) RETURN NUMBER
IS
pi CONSTANT NUMBER:=3.14159;
theta NUMBER;
distX NUMBER;
distY NUMBER;
distZ NUMBER;
distP NUMBER;
BEGIN
theta :=longA - longB;
distX :=sin( latA * PI /180) * sin ( latB * PI /180) + cos ( latA * PI/180) * cos ( latB * PI/180) * cos ( theta * PI / 180);
distY :=acos(distX); --this is arc cosine
distZ :=distY * 180/PI; --PI refers to the mathematical PI
distP :=distZ * 60 * 1.1515; --this value should be returned. Of course the intermediate variable names don't matter.
RETURN distP;
END;Edited by: Ora on May 3, 2011 11:46 PM -
Help required in writing PCR's
Hi All,
Update on this is highly appreciable and points will be rewarded.
Thanks & Regards,
surya
Hi All,
To calculate OT as per the Client requirement two PCR's needs to be wriiten.
1. OT should not be paid if it is less than 30 mins.
2. OT should be calculated as follows:
(basic2/26/8no. of hours).
Your help in this regard is highly appreciable.
Thanks & Regards,
Surya
Edited by: Surya Prakash Kanuru on Sep 15, 2008 9:55 AMHi,
No need to write to 2 PCR ,with one pcr itself it can be calculated . Here maintain overtime hrs in 15 infotype ,such that overtime hrs will be stored in a wage type say 9ovt .
Pcr can be build in this way
90vt
num = 90vt(where overtime hrs will be transfered to num)
num?0.5
< ( if the hrs is 30 mins )
your logic
= (30 mins )
logic calc
> (30 min)
amt = 1001 (basic wage type)
amt = 1001 div 2
some calc
div ana (for dividing with the no of hrs and passing the overtime value to the amt)
addwt *
Hope it helps u
Regards,
Prince Elvis -
Hi SDNers,
I have a requirement to write UDF, can anybody help me in acheiving the code.
Requirement:-
If I am getting 5 as my input to UDF, I need to generate five 001's to my output of UDF.
I tried to loop the input and used result.addValue("001"); but not working.
Please help in getting java logic for this udf.
Thanks
Jayaram.GHi Luis,
Thanks for your quick response.
I am using context in my udf.
My code is like this.
for(int i=0;i<var1.length;i++)
result.addValue("001");
As I am getting 5 as input and I am using Var1.length, the udf is generating only one 001. But I need five 001.
Regards,
Jayaram.G -
Help required in writing an sql querry
Hi guys,
Could any one hlep me out in writing an sql querry for the below requirement.
the requirement is: for a perticular ID if we have different names then we need to get it out as multiple else the name itselef. I have given the sample input and the expected output.
ID Name
1 A
1 B
2 F
2 F
3 C
4 D
4 E
Out put should look like
ID Name
1 Multiple
2 F
3 C
4 Multiple
Thanks in advance
Shylender.
Edited by: 959345 on Nov 22, 2012 10:13 PMMay be this:
WITH t AS
(SELECT 1 id, 'A' str FROM DUAL
UNION ALL
SELECT 1, 'B' FROM DUAL
UNION ALL
SELECT 2, 'F' FROM DUAL
UNION ALL
SELECT 2, 'F' FROM DUAL
UNION ALL
SELECT 3, 'C' FROM DUAL
UNION ALL
SELECT 4, 'D' FROM DUAL
UNION ALL
SELECT 4, 'E' FROM DUAL),
t1 AS
(SELECT id,
CASE
WHEN COUNT (DISTINCT str) OVER (PARTITION BY id) > 1 THEN
'MULTIPLE'
ELSE
str
END
str
FROM t)
SELECT id, str
FROM t1
GROUP BY id, str
ORDER BY 1;Cheers,
Manik. -
Help required in writing a query
hi
Consider a table (ShogenValue) with following data:
Model_Id header_id Serial_no shogen_no si_val
4329 1 40001 A0001 1
4329 1 40001 B0001 2
4329 1 50300 B0001 3
4329 1 40001 C0001 4
4329 1 50300 C0001 5
4329 1 60001 C0001 6
Select
si_val
From
ShogenValue
Where
model_id = 4329
And
header_id = 1
And
serial_no = '60001'
Is it possible to write a modified version of above query which will bring the following result:
Model_Id header_id Serial_no shogen_no si_val
4329 1 40001 A0001 1
4329 1 50300 B0001 3
4329 1 60001 C0001 6
Meaning if a record exists for a particular shogen_no (Shogen_no C0001 has value corrosponding to '60001' in above query), pick it up, if it
does not exist (Shogen_no B0001 does not have value corrosponding to '60001' in above case) then pick a record with one level less serial number ('50300' in above case) and so on.
Thanx
Regards
Omer ImtiazThis should help, although it will probably not perform. Try it and see what the plan for it is.
SELECT
FROM
shogenvalue sv,
(SELECT
max(serial_no) serial_no_max,
shogen_no
FROM
shogenvalue
WHERE
model_id = 4329
AND header_id = 1
AND serial_no <= '60001'
GROUP BY
shogen_no
) svm
WHERE
sv.serial_no = svm.serial_no_max
AND sv.shogen_no = svm.shogen_no
;HTH,
Lennert -
Help required in writing the query
I have the following level accounts
10000
11000
11100
11101
11200
11201
12000
12100
12101
12102
12103
20000
21000
21100
21101
22000
22101
21200
21201
I have to take the amount of the child account and sum it to the parent account as below:
11100 = 11101 + 11102 - 11103+.........
11000 = 11100 + 11200 + 11300+.........
10000 = 11000 + 12000 + 13000+.........
21100 = 21101 + 21102 - 21103+.........
21000 = 21100 + 21200 + 21300+.........
20000 = 21000 + 22000 + 23000+.........
Please help...
Thanks in advance.SQL> with t as (
2 select 10000 ACCOUNT, NULL BEG_BAL, NULL END_BAL from dual union all
3 select 11000,NULL,NULL from dual union all
4 select 11100,NULL,NULL from dual union all
5 select 11101,1750.00,4150.00 from dual union all
6 select 11102,1550.00,3150.00 from dual union all
7 select 11103,1650.00,3200.00 from dual union all
8 select 11200,NULL,NULL from dual union all
9 select 11201,800.00,1250.00 from dual union all
10 select 11202,1550.00,3150.00 from dual union all
11 select 12000,NULL,NULL from dual union all
12 select 12100,NULL,NULL from dual union all
13 select 12101,1200.00,5000.00 from dual union all
14 select 12102,1500.00,3000.00 from dual union all
15 select 12103,1550.00,2750.00 from dual union all
16 select 20000,NULL,NULL from dual union all
17 select 21000,NULL,NULL from dual union all
18 select 21100,NULL,NULL from dual union all
19 select 21101,2000.00,6500.00 from dual union all
20 select 21102,1500.00,3500.00 from dual union all
21 select 21103,1750.00,3550.00 from dual union all
22 select 22000,NULL,NULL from dual union all
23 select 22100,NULL,NULL from dual union all
24 select 22101,1550.00,3550.00 from dual union all
25 select 22102,2550.00,5550.00 from dual union all
26 select 21200,NULL,NULL from dual union all
27 select 21201,2550.00,6500.00 from dual union all
28 select 21202,3550.00,7500.00 from dual
29 )
30 select account,
31 beg_bal,
32 end_bal,
33 sum(beg_bal) over(order by account range between current row and grouping_window follow
ing) group_beg_bal,
34 sum(end_bal) over(order by account range between current row and grouping_window follow
ing) group_end_bal
35 from (
36 select t.*,
37 case
38 when account / 10000 = trunc(account / 10000) then 9999
39 when account / 1000 = trunc(account / 1000) then 999
40 when account / 100 = trunc(account / 100) then 99
41 when account / 10 = trunc(account / 10) then 9
42 else 0
43 end grouping_window
44 from t
45 )
46 order by account
47 /
ACCOUNT BEG_BAL END_BAL GROUP_BEG_BAL GROUP_END_BAL
10000 11550 25650
11000 7300 14900
11100 4950 10500
11101 1750 4150 1750 4150
11102 1550 3150 1550 3150
11103 1650 3200 1650 3200
11200 2350 4400
11201 800 1250 800 1250
11202 1550 3150 1550 3150
12000 4250 10750
12100 4250 10750
ACCOUNT BEG_BAL END_BAL GROUP_BEG_BAL GROUP_END_BAL
12101 1200 5000 1200 5000
12102 1500 3000 1500 3000
12103 1550 2750 1550 2750
20000 15450 36650
21000 11350 27550
21100 5250 13550
21101 2000 6500 2000 6500
21102 1500 3500 1500 3500
21103 1750 3550 1750 3550
21200 6100 14000
21201 2550 6500 2550 6500
ACCOUNT BEG_BAL END_BAL GROUP_BEG_BAL GROUP_END_BAL
21202 3550 7500 3550 7500
22000 4100 9100
22100 4100 9100
22101 1550 3550 1550 3550
22102 2550 5550 2550 5550
27 rows selected.
SQL> SY. -
Need help writing small program!
Hi. I'm learning Java programming, and I need help writing a small program. Please someone help me.
Directions:
Create a program called CerealCompare using an if-then-else structure that obtains the price and number of ounces in a box for two boxes of cereal. The program should then output which box costs less per ounce.class CerealCompare {
public static void main(String[] args) {
// your code goes here
}Hope that helps.
P.S. Java does not have an if-then-else statement. -
How would I set this small program to activate every 120 seconds?
I have this small program that writes the value 0 to a file, but I want it to only activate every 120 seconds, so it doesn't take up a bunch of system resources by constantly running. Can I make it pause for 120 seconds, or set a timer for it, in such a way that it won't make my PC run slow? Here's my code. Thanks if you can help.
import java.util.*;
import java.io.*;
import java.io.File;
public class Purge extends Random implements Serializable {
public Purge () {
writePrimDoubles();
public static void main (String [] args) {
Purge test = new Purge();
public void writePrimDoubles() {
DataOutputStream outStream;
long timerStart;
long timerEnd;
long size;
int a = 1;
try {
while (a==1) {
outStream = new DataOutputStream
(new FileOutputStream("packetlog.txt"));
timerStart = System.currentTimeMillis();
outStream.writeBytes("0");
timerEnd = System.currentTimeMillis();
outStream.close();
catch(IOException e) {
System.out.println("Error writing to file");
}java.util.Timer, I think may do the trick.
-
Every one..help required ..
hello every one i need help on urgent basis.
can someone tell me how to store images and a few video clips and then retrieve them in plsql.?
i have to make a small program in plsql in which i can store images and video clips and then retrieve them.
plz help me..
waiting for replies from all the users plz
regards
niakwell i m not asking u or any one to do the project
for me ..So where is problem in doing your research then?
all i asked was for help.You've received some replies that should get you started on the topic.
and i dont think
u people should have segregations that students
seeking help for their projects must not be helped..We obviously seem to have different views on the term "help". I do get the impression that you only seem to be helped, if (some) work is done for you, like researching and writing code. My definition (in this area) is: lead the person to the information and give some advice, but don't do the whole work, otherwise nothing is learned from that case, except for "how to be an efficient free loader". And we both don't want that to happen, right?
besides its a forum and everyone should be helped
here.. You've been given some hints and advise. Not satisfied with that? Maybe you are in the wrong forum, this one is on voluntary basis, nobody is obliged to help, most people do in the way as they see fit.
if i wouldnt have told u that its my project then u
wouldnt have know it..My answer then wouldn't have been any different. Start reading documention, read through this forum's threads, use other sources and get your project on the road. How do you thing any of use has to cope with his/her obligations? By letting someone else doing the job?
and u wouldnt have been bully ..If I wanted to bully you, I'd just wrote: Please go away, you're obviously in the wrong forum. I think, you're disappointed because you haven't received the whole code including installation procedure and documentation. Well, some people here could give you that, but they usually charge a fee for that. If it's just sample code and concepts you want, learn how to use search engines and read the (in my opinion) excellent documentation. You claim you're a student, so what is this task different from all the other classes you have to attend?
i dont need help from such bossy and rude people like
u..Believe what you want, it's your choice.
u dont wana help then dont.. but u dont have any
right to be bossy ..Tell what, since this is an open forum, I think I'll write comments as I see fit, if you can't live with that, the web is quite a vast area, you should be able to find a place, where those "bossy and rude people" like me won't show up.
dont think that each post here is for u to answer..I'm certainly not under this impression.
first get proper manners then think of ur self of
something..Well, you could be right, maybe I do have a problem in that area - on the other hand, maybe I'm just talking to someone that is dishing out unfounded accusations because he/she can't come up with any valid argument against my suggestions.
as knowledge is useless if u dont have any manners
which u dont have..I would take your critique a bit more seriously if it didn't came from a person who showed that his/her strategy to solve a critical position is to ask other people doing the work including research. But what do I know ...
C. -
help needed for writing query
i have the following tables(with data) as mentioned below
FK*-foregin key (SUBJECTS)
FK**-foregin key (COMBINATION)
1)SUBJECTS(table name)
SUB_ID(NUMBER) SUB_CODE(VARCHAR2) SUB_NAME (VARCHAR2)
2 02 Computer Science
3 03 Physics
4 04 Chemistry
5 05 Mathematics
7 07 Commerce
8 08 Computer Applications
9 09 Biology
2)COMBINATION
COMB_ID(NUMBER) COMB_NAME(VARCHAR2) SUB_ID1(NUMBER(FK*)) SUB_ID2(NUMBER(FK*)) SUB_ID3(NUMBER(FK*)) SUBJ_ID4(NUMBER(FK*))
383 S1 9 4 2 3
384 S2 4 2 5 3
---------I actually designed the ABOVE table also like this
3) a)COMBINATION
COMB_ID(NUMBER) COMB_NAME(VARCHAR2)
383 S1
384 S2
b)COMBINATION_DET
COMBDET_ID(NUMBER) COMB_ID(FK**) SUB_ID(FK*)
1 383 9
2 383 4
3 383 2
4 383 3
5 384 4
6 384 2
7 384 5
8 384 3
Business rule: a combination consists of a maximum of 4 subjects (must contain)
and the user is less relevant to a COMB_NAME(name of combinations) but user need
the subjects contained in combinations
i need the following output
COMB_ID COMB_NAME SUBJECT1 SUBJECT2 SUBJECT3 SUBJECT4
383 S1 Biology Chemistry Computer Science Physics
384 S2 Chemistry Computer Science Mathematics Physics
or even this is enough(what i actually needed)
COMB_ID subjects
383 Biology,Chemistry,Computer Science,Physics
384 Chemistry,Computer Science,Mathematics,Physics
you can use any of the COMBINATION table(either (2) or (3))
and i want to know
1)which design is good in this case
(i think SUB_ID1,SUB_ID2,SUB_ID3,SUB_ID4 is not a
good method to link with same table but if 4 subjects only(and must) comes
detail table is not neccessary )
now i am achieving the result by program-coding in C# after getting the rows from oracle
i am using oracle 9i (also ODP.NET)
i want to know how can i get the result in the stored procedure itsef.
2)how it could be designed in any other way.
any help/suggestion is welcome
thanks for your time --PradeeshWell I forgot the table-alias, here now with:
SELECT C.COMB_ID
, C.COMB_NAME
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID1) AS SUBJECT_NAME1
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID2) AS SUBJECT_NAME2
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID3) AS SUBJECT_NAME3
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID4) AS SUBJECT_NAME4
FROM COMBINATION C;
As you need exactly 4 subjects, the columns-solution is just fine I would say. -
Urgent help required: Query regarding LC Variables
Hi All
Sometime earlier I was working on a performance issue raised by a customer. It was shell script that was taking almost 8-9 hrs to complete. During my research I came across a fact that there were some variables which were not set, the LC variables were impacting the sort funnel operations because of which the script was taking a long time to execute.
I asked them to export the following commands, after which the program went on smoothly and finished in a couple of mins:
export LC_COLLATE=en_US.ISO8859-1
export LC_MESSAGES=C
export LC_MONETARY=en_US.ISO8859-1
export LC_MONETARY=en_US.ISO8859-1
export HZ=100
export LC_CTYPE=en_US.ISO8859-1
export LANG=en_US.UTF-8
Later I did recover that setting the LC_COLLATE to C, is not helping and the program was again taking a lot of time. Few questions that I want to ask are:
1. Can someone please tell me, what each of these variable mean and how these values make a difference.
2. When I exported LC_COLLATE=en_US.ISO8859-1, it worked fine, but when i tried with the defalut value LC_COLLATE=C, then why the program didnt work.
As this issue is still going on, hence I would request All to provide their valuable inputs and let me know as much as possible.
Appreciate your help in this regard.
Thanks
Amit
Hi All
A new development in this regard. The customer has send us a screen shot in which they were trying to export the locale variable using the commands which I have pasted above. I can see in the screen shot that while exporting LC_COLLATE and LC_TYPE, they get a message that ""ksh: export: couldn't set locale correctly"".
Request everyone to please give their inputs as it's a bit urgent.
Thanks for all the help in advance.
Thanks
Amit
Some help required please...
Edited by: amitsinhaengg on Jul 22, 2009 2:03 AM
Edited by: amitsinhaengg on Jul 22, 2009 2:06 AMLC_CTYPE
Controls the behavior of character handling functions.
LC_TIME
Specifies date and time formats, including month names, days of the week, and common full and abbreviated representations.
LC_MONETARY
Specifies monetary formats, including the currency symbol for the locale, thousands separator, sign position, the number of fractional digits, and so forth.
LC_NUMERIC
Specifies the decimal delimiter (or radix character), the thousands separator, and the grouping.
LC_COLLATE
Specifies a collation order and regular expression definition for the locale.
LC_MESSAGES
Specifies the language in which the localized messages are written, and affirmative and negative responses of the locale (yes and no strings and expressions).
You can use command
# locale -k LC_CTYPE
to see more detail about each type.
Maybe you are looking for
-
New Development on my iphone from yelling!
Okay so I posted a little bit ago the post on my iphone having to yell to callers can hear me. It seems that when I plug in my headphones people can hear me thru the headphones mic and when I unplug it callers tell me they hear a squealing noise and
-
Actions in Photoshop 12, why are they so stupid?
So, I updated from 8.0 to 12. (I know, quite a jump at once, and the only reason I did is that I have a Mark III and 8.0 doesn't read the RAW from it.) I had the actions set up in 8.0 so that I could run it as "effects" and just hit the "apply" butt
-
ARD 2.2 and MacBook Pro
I am sorry if this has already been answered earlier. I just bought a MacBook Pro and needed to install ARD on it. The only version I own is 2.2. After I installed it and tried to launch, I received a message that said I needed to update the software
-
Cannot make changes without clearing cache
I am having a problem when making changes of any sort to any page. In order for my change to show up, I have to clear entire web cache through webcache admin page. For instance, I tried to delete a group from access privelge list from one of my tabs
-
Using the NI tkds 30xx library, but there is a problem with acquiring waveforms
When I try to use the Initiate Acquisition function that is part of this library, I get the following error message: "the given session or object reference is invalid." The name of the device (created by the "initialize" function) seems to be correct