References to objects and variables and their values.
When does declaring a primitive type, variable or object as another objectm primitive type, or variable assign the variable THAT VALUE, and when does it just make it another reference to that object. And when it DOES just refer to that object, how do I set it to the value instead of just a reference?
I can elaborate if necessary. I hope I was clear enough
KeganO wrote:
Yes, that's very clear. So all I want to know now is, if I had in my code something like
Point a = new Point(1, 1);
then say 50 lines later, I want to create a new point object, with the same VALUE as a but does not refer to the same object. How would I do that?That depends on the class. Look at Point's docs. If it implements Cloneable, you can call clone(). If it has a constructor that takes a reference to a point as an argument (copy constructor), you can use that. Otherwise you'll have to extract the two values and call new Point(oldPointX, oldPointY).
Some classes you might not be able to do it at all.
There's no guaranteed way to do it provided by the language though. It all depends on whether the class is implemented to provide it.
>
Also, what are the code tags?When you put code into a forum message, in order to preserve formatting, you put it between [code] and [/code].
[code]
for (int i = 0; i < 10; i++) {
if (something) {
doStuff(i);
[/code]
becomes
for (int i = 0; i < 10; i++) {
if (something) {
doStuff(i);
}
Similar Messages
-
Characterstics and their values
how can i assign class and their characterstics and their values using Material_maintain_dark.
Hi,
you can't.
To create classification , use the Bapi BAPI_OBJCL_CREATE in a second step
Regards
DAvid -
Command to provide list of all objects and their scripts from database
Hi,
How do i get the list of all objects and their scripts/source from database?
I guess using dbms_metadata package or Toad tool we can achieve the above task
But i do not know the steps to get the objects and their scripts.
Im using oracle database 11g R2 11.2.0.2
Kindly ge me the advice
Thanks in AdvanceHow do i get the list of all objects and their scripts/source from database?
I guess using dbms_metadata package or Toad tool we can achieve the above task
But i do not know the steps to get the objects and their scripts.
Im using oracle database 11g R2 11.2.0.2If you want the all the metadata of whole database, then it is quiet difficult to get from DBMS_METADATA, as it is very complex because you need to gather for each object of each schema in whole database and to spool.
http://www.orafaq.com/node/57
I want to know, what is the use of entire database metadata, Certainly need of objects of metadata.
or if you want to whole database, then i suggest you go for export full backup and import as impdp sqlfile option, -
Animation: how can I move objects (and their transform keyframes)?
Hi,
I have created a project with a group of layers which all move (have transform keyframes set up).
Now I want to move the group, but when I do this and then run the animation, the position of all the transform keyframes I have set up remain in the same place.
Is there some way to move a group of objects and the location of their transform keyframes at the same time, or will I have to go through each keyframe and move them individually?
Thanks!
Jack> PLEASEEE HELPP
You need to get some understanding of HTML and CSS to know
why building a
web page is not like using a page layout program or even a
word processor.
Unfortunately that will require some effort on your part.
You cannot just place things on the page in HTML - you need
to build an HTML
infrastructure to hold the elements you want to appear on the
page, and to
hold them in the location where you want them to appear. As a
simple
example, consider a 1 row by 2 column table, where each
column is set to 50%
width, and the table itself is 800px wide. An image placed
into the second
column will be located exactly 400px from the left margin of
the page
(assuming a) the image is less than 400px wide, b) the table
has zero
borders, cellspacing and cellpadding, and c) there is nothing
wider than
400px in the first column.
Make sense?
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"afsheenm" <[email protected]> wrote in
message
news:fftbo8$cok$[email protected]..
> hi, its my first time making the website so i have no
clue about anything.
> how
> can i move text box? i mean i wrote something and want
to move its
> position
> like up or down, how can i move it? also tables??????
sometimes i can move
> them
> , by chance but i have no clue how i did it? PLEASEEE
HELPP.
> -
Listing objects and their instance names (of closed source SWF)
I have an API for a flash player that I want to use, but it is closed source. I know I could try a decompiler but I need to see what it loads and what it's doing at runtime.
I'd like to see the objects (and all their info) that it loads and has on stage along with thier instance names. I'd like to see what this SWF has/does so I can write my AS3 code accordingly... maybe add some additional event listeners.
Is there any was to go about doing this? I know there's some AS3 commands to get this information but I dont know what they are. If you all could give me some hints at which commands would be useful that would be great."I need to see what it loads"
You can use Fiddles, Charles or Firebug to monitor traffic (what it loads).
As for the rest of your question - good luck. Although it is possible to decompile swf of course, reverse engineering is an extremely complex time consuming task. In the majority of cases it is easier and faster to replicate functionality from scratch than to try to understand SWF's logic.
Unless you know packages structure - there is no native way to figure out/access application domain. -
Gettting columns_names and their values
Hi,
I need to write a query that takes all the columns of a table and store them on a collection of column_name, Column_value. The table name and the Where Clause may vary so i need to use dynamic sql.
My query will look like this;
SELECT *
FROM xxx_table
WHERE xx_column = ?? AND yy_Column = ?? .... --Conditions are dynamic and available only the time of execution. After executing this statement i need to know colunmn_names and the values which returned from above query.
As far as i know * statement tells oracle that get all columns of that table from user_tab_columns table ordered by their column_id. So may achieve my goal like this;
DECLARE
Key_Val_Arr IS TYPE OF VARCHAR2(50) INDEXED BY VARCHAR2;
my_table_row_type xxx_table%rowtype;
SELECT * INTO my_table_row_type
FROM xxx_table
WHERE ......;
For rec IN (SELECT column_name, column_id FROM user_tab_columns WHERE table_name = 'XXX_TABLE' )
LOOP
Key_Val_Arr (rec.column_name ) = my_table_row_type(column_id); --Or something like that. Syntax may be incorrect, but please consider the idea
END LOOP;
END;Any suggestions will help
Thanks in advance
Edited by: 991792 on Mar 5, 2013 3:44 AM991792 wrote:
Hi,
I need to write a query that takes all the columns of a table and store them on a collection of column_name, Column_value.Why would you want to do that? That's not a good way to store data, and makes it a nightmare to access later.
The table name and the Where Clause may vary so i need to use dynamic sql.
My query will look like this;
SELECT *
FROM xxx_table
WHERE xx_column = ?? AND yy_Column = ?? .... --Conditions are dynamic and available only the time of execution.
After executing this statement i need to know colunmn_names and the values which returned from above query.
As far as i know * statement tells oracle that get all columns of that table from user_tab_columns table ordered by their column_id. So may achieve my goal like this;
DECLARE
Key_Val_Arr IS TYPE OF VARCHAR2(50) INDEXED BY VARCHAR2;
my_table_row_type xxx_table%rowtype;
SELECT * INTO my_table_row_type
FROM xxx_table
WHERE ......;
For rec IN (SELECT column_name, column_id FROM user_tab_columns WHERE table_name = 'XXX_TABLE' )
LOOP
Key_Val_Arr (rec.column_name ) = my_table_row_type(column_id); --Or something like that. Syntax may be incorrect, but please consider the idea
END LOOP;
END;Ok, you're right that you would need dynamic SQL for your dynamic conditions in your query, but if you also don't know the column names at design time, and it's important to find those out, then you'll need to get into the detail using the DBMS_SQL package. An example of using that, to take a query and output the columns and data as CSV (from my standard library of examples...)...
As sys user:
CREATE OR REPLACE DIRECTORY TEST_DIR AS '\tmp\myfiles'
GRANT READ, WRITE ON DIRECTORY TEST_DIR TO myuser
/As myuser:
CREATE OR REPLACE PROCEDURE run_query(p_sql IN VARCHAR2
,p_dir IN VARCHAR2
,p_header_file IN VARCHAR2
,p_data_file IN VARCHAR2 := NULL) IS
v_finaltxt VARCHAR2(4000);
v_v_val VARCHAR2(4000);
v_n_val NUMBER;
v_d_val DATE;
v_ret NUMBER;
c NUMBER;
d NUMBER;
col_cnt INTEGER;
f BOOLEAN;
rec_tab DBMS_SQL.DESC_TAB;
col_num NUMBER;
v_fh UTL_FILE.FILE_TYPE;
v_samefile BOOLEAN := (NVL(p_data_file,p_header_file) = p_header_file);
BEGIN
c := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
d := DBMS_SQL.EXECUTE(c);
DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
FOR j in 1..col_cnt
LOOP
CASE rec_tab(j).col_type
WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);
WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);
ELSE
DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
END CASE;
END LOOP;
-- This part outputs the HEADER
v_fh := UTL_FILE.FOPEN(upper(p_dir),p_header_file,'w',32767);
FOR j in 1..col_cnt
LOOP
v_finaltxt := ltrim(v_finaltxt||','||lower(rec_tab(j).col_name),',');
END LOOP;
-- DBMS_OUTPUT.PUT_LINE(v_finaltxt);
UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
IF NOT v_samefile THEN
UTL_FILE.FCLOSE(v_fh);
END IF;
-- This part outputs the DATA
IF NOT v_samefile THEN
v_fh := UTL_FILE.FOPEN(upper(p_dir),p_data_file,'w',32767);
END IF;
LOOP
v_ret := DBMS_SQL.FETCH_ROWS(c);
EXIT WHEN v_ret = 0;
v_finaltxt := NULL;
FOR j in 1..col_cnt
LOOP
CASE rec_tab(j).col_type
WHEN 1 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
WHEN 2 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
v_finaltxt := ltrim(v_finaltxt||','||v_n_val,',');
WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
v_finaltxt := ltrim(v_finaltxt||','||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'),',');
ELSE
DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
END CASE;
END LOOP;
-- DBMS_OUTPUT.PUT_LINE(v_finaltxt);
UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
END LOOP;
UTL_FILE.FCLOSE(v_fh);
DBMS_SQL.CLOSE_CURSOR(c);
END;This allows for the header row and the data to be written to seperate files if required.
e.g.
SQL> exec run_query('select * from emp','TEST_DIR','output.txt');
PL/SQL procedure successfully completed.Output.txt file contains:
empno,ename,job,mgr,hiredate,sal,comm,deptno
7369,"SMITH","CLERK",7902,17/12/1980 00:00:00,800,,20
7499,"ALLEN","SALESMAN",7698,20/02/1981 00:00:00,1600,300,30
7521,"WARD","SALESMAN",7698,22/02/1981 00:00:00,1250,500,30
7566,"JONES","MANAGER",7839,02/04/1981 00:00:00,2975,,20
7654,"MARTIN","SALESMAN",7698,28/09/1981 00:00:00,1250,1400,30
7698,"BLAKE","MANAGER",7839,01/05/1981 00:00:00,2850,,30
7782,"CLARK","MANAGER",7839,09/06/1981 00:00:00,2450,,10
7788,"SCOTT","ANALYST",7566,19/04/1987 00:00:00,3000,,20
7839,"KING","PRESIDENT",,17/11/1981 00:00:00,5000,,10
7844,"TURNER","SALESMAN",7698,08/09/1981 00:00:00,1500,0,30
7876,"ADAMS","CLERK",7788,23/05/1987 00:00:00,1100,,20
7900,"JAMES","CLERK",7698,03/12/1981 00:00:00,950,,30
7902,"FORD","ANALYST",7566,03/12/1981 00:00:00,3000,,20
7934,"MILLER","CLERK",7782,23/01/1982 00:00:00,1300,,10The procedure allows for the header and data to go to seperate files if required. Just specifying the "header" filename will put the header and data in the one file.
Adapt to output different datatypes and styles are required.
As you can see, you can get details of the column names, datatypes and fetch the data explicitly by column position rather than name. -
Loading 3D objects and their animations
Hi all:
I want to load some 3D objects (humanoid) with different animations(walk, jump...) which depend on the situation in the game. Objects and animations are made with 3dStudio max 5.0.
I have found a lot of documents and loaders for several types of objects 3D (particullary .3DS, .wrl ), but I have some problems:
* With an 3D object .3ds, I can load and show an humanoid with textures, but I don't know how load and attach an animation (.bvh, .cvm or .bip). I haven't got any documents about this.
* I have tried to load a vrml97 file with Xj3D, but it seems that the vrml97 produced by 3dStudio can't be loaded by the Xj3D, whereas with the other vrml97 files there is no problem. But a solution with vrml is not very good because objects and animations are not separated.
Can anyone help me?
Thanks,
Tamica.I remember reading somewhere that some dude successfully loaded up neverwinter nights models in a java3D canvas, and one of them had active fire animation.
So loading an animation should be feasible :) -
Help with Classes, Objects and their relationship.
Alright, I've got this assignment from a computer science class that won't stop annoying me and I need some help. This is the complete assignment: http://zebra0.com/Tarraga/CS103/Project4.php
What I'm having issues with is the course specifications. It says:
? Create a course class. It will contain the course name, 5 Student objects, the number of Students, etc. It will contain an addStudent(), printRoll() and average() methods. You may add methods as needed. The average method computes the average of all students test score averages.
I'm not sure what my instructor means by 5 student objects. I'm assuming that addStudent() would create a new student() object (from the class which I've already created here: http://zebra0.com/Tarraga/CS103/studentP4.php) and printRoll() will print the existing objects, average() I think I know.
So...wth am I supposed to create 5 student objects for? Or what are they referring to? I'd assume that the student objects are created only when the user inputs the student data, not internally.
My question is what I'm assuming to be extremely newb-ish, and to be honest I am a complete newbie, but if anyone can help please do so.
Edit: Another question I had regarded my student class would be, do I need to write getters/setters for every value in there? My instructor wouldn't stop raving about how we need getters/setters, but at this point I'm not exactly sure what they do.to didittoday:
You could say that, yes. But honestly...I've been paying plenty of attention. What I've learned so far about an object in Java is the following:
An object in programming is like an object in real life. It makes up the program. Just like a wheel is part(object) of a card, an object is part of the program.
That's what my teacher has taught me, with pictures even. I've written about two GUI and one non GUI projects so far that I had to look to the book to actually finish. And that's her general answer to all our questions, "read the book!" She doesn't ever take time from showing us her precious powerpoints to actually teach us. And not once has she actually given us examples of coding. She instead directs us to the programs in our book which may or may not be of relevance.
And all the tutors who could actually help me aren't on campus. If you'd like to redirect me to a link that may hold useful (and RELEVANT) information, please do so.
Also: I do understand that a student object would hold student information (I.E.:
public student (String firstname, String lastname, double score1, double score2, double score3, double score4)but I don't understand why 5 student objects should be created in the other class...is it that they have to be initialized and then once the user inputs the information, they are updated? I'm grasping at straws here.
Edited by: Valkyrio on Mar 5, 2008 3:28 PM -
API to get system objects and their propeties at EP6?
Thank you.
Hi Detlev,
Thank you very much for quick and precise reply!
I have also added a following piece of code to receive
a name-value pairs of all the system and it works.
Attributes attr = so.getAttributes();
NamingEnumeration ids = attr.getIDs();
while (ids.hasMoreElements()) {
Object nextIDObj = ids.nextElement();
String idName = nextIDObj.toString();
response.write(idName + " = " + attr.get(idName).get() + "<BR>");
Thanks again,
Yuri
P.S. Where from comes your knowledge about these APIs?
I didn't find ANY documentation about!... -
Call Standard Text by report replacing the variables with their values
Hi,
I have a requirement to call a standard text from a report.
Following is the text present in standard text.
&PTXT1-ENAME& will attend for interview
on &MEMOACT-PLDAT& at &MEMOACT-PLTIM&.
I am doing it by using READ_TEXT. But READ_TEXT reads the entire text as it is.
Is there any way I could retrieve the standard texts with &PTXT1-ENAME& replaced by the value of PTXT1-ENAME in report. And similarly &MEMOACT-PLDAT& replcaed with its actual value.
Any pointers in this regard would be helpful.
Points will be awarded.
Regards,
Mayank AgarwalHi,
In the Text
&PTXT1-ENAME& will attend for interview
on &MEMOACT-PLDAT& at &MEMOACT-PLTIM&.
do not use the * as a paragrapgh , use /: as the paragraph
Regards
Sudheer -
Table of Authority Object and value Per User
Hi
I have created a Z authority object, is there a table that can show me all the users that have this authority object and its value
Thanks AmiHi,
thanks for your answer. I know the parameter: FOR USER user. But i don't whant to check
the authority, i want to know in my example which value has the user in fields ACTVT and STATM.
Thanks.
regards, Dieter -
Help required: Classes and class values for Func Loc
Dear All,
I have a requirement to get the classes and values associated with a functional location.
Any idea how to get this data, as in IL03.
Thanks,
nsp.Hello nsp,
You can try to check out the Function module ALM_ME_TOB_CLASSES to see how they fetched class, characteristics and their values.
You can keep a break-point in this module and run MAM30_031_GETDETAIL and check how we can pass the appropriate values.
However, above FMs are available from PI 2004.1 SP 14 of release 4.6c, 4.7 and 5.0.
If you are in ERP 6.0, the FM's are available.
Hope this helps
Best Regards,
Subhakanth -
Regarding Business Objects and Methods
Hi ,
I need to create LSMW with BAPO for to create PO.
Where shoud I found Business Objects and their method.
Could you please suggest abt this.
Regards,
Sai.sai,
"BAPI_PO_CREATE " ( OR ) "BAPI_PO_CREATE1 "
Goto SE37>Enter above bapi name>select where used list>it will show list>
select prog RBUS2012
or directly se38>RBUS2012>Press F7 or Display.
Pls. reward if useful -
I am accessing Lite using Java using the JAC API's: POLConnection, POLClass etc.
The program is temporarily and eratically loosing references to objects and then find them again.
The program logs on and looks up the objects it needs, checking the refernces have been found and are not null. A button initiates a query to uses these objects to retrieve data. It eratically raise a null pointer exception, the connection or class reference is null. By pressing the button again the query works ok, even though the connection and class objects have not been reset, they are suddenly no longer null.
Help.May I be so bold to make a suggestion here?
In future questions like this should be posted in a more appropriate forum. Like here http://forum.java.sun.com/forum.jspa?forumID=37
This could be of more help to you because there are in fact users like this guy http://forum.java.sun.com/profile.jspa?userID=658641 who actually work for Sun on the VM and answer questions in there.
So you could get a real answer rather than a bunch of guessing or idiotic contributions from Questie and the like. -
After serialize a object what will be the value of reference and primitive
After serialize a particular object what will the value its object references and primitives ???
please go through the following scenario
import java.io.*;
class Dog implements Serializable{
String dogString = "haiHai";
int dogSize = 555;
public String toString(){
return "This is Object Man";
class MyTestSerial
Dog d = new Dog();
MyTestSerial(){
try{
System.out.println("Before Serialization Dog object is : " +d);
System.out.println("Before Serialization d.dogSize : " +d.dogSize);
FileOutputStream fis = new FileOutputStream("MyTest.ser");
ObjectOutputStream obs = new ObjectOutputStream(fis);
obs.writeObject(d);
obs.writeInt(d.dogSize);
obs.writeObject(d.dogString);
System.out.println("After Serialization Dog object is : " +d);
System.out.println("Before Serialization d.dogSize : " +d.dogSize);
}catch(Exception e){
System.out.println(e);
public static void main(String[] args) { MyTestSerial t = new MyTestSerial(); }
In the above MyTestSerial class am serializing Dog object. After executing this obs.writeObject(d); the dog object will serialize without any problem.
Now, once i try to print the dog object and dogString it should print the null value right ??
and its primitive dogSize in the Dog class also print the value zero right??
But am not getting those results. What mistake am doing here???
Generally What will happen when we serialize a object or primitive value. After this what is the value of these types??
Can any one a give the solution???
Regards
Dhinesh Kumar RSerializing merely copies the object data to the stream, the content is unaffected.
Maybe you are looking for
-
How do I password protect a pdf file - getting error messages?
I'm trying to protect a pdf file (i.e. a tax return printed to PDF) with password to open and password to modify. However I'm getting an error message in a pop up window saying..."The file may be read-only, or another user may have it open. Please sa
-
How to set thumbnailUrl and/or thumbnailLocation?
Hi... I have now been struggling how to set the URL or location for the thumbnail, when packaging a book... PS. The thumbnail is already uploaded to a location I know the path to: This is my XML request (bolded text are examples): [thumbnailLocation
-
Complete flex 3 to 4 migration guide?
I have a moderately large AIR project developed in flex 3. I tried to migrate to flash builder 4 (import the project folder) and got tons of errors. Besides, it seems fb4 doesn't recognize my project is an AIR project. I wonder if the flex team can p
-
Wrong platform selected. Want to change order. How?
Just upgraded my Elemtents 10 to version 13. Accidentally chosen Windows instead of Mac platform. Now I'd like to change my ordered platform. Need help from support team!
-
I have finished editing my slideshow in iPhoto. It will not export as a movie file. Any ideas?