Getting the name of an instance
Hi,i`m having problems saving the name of an instance to a String variable.
For example if i`ve written the following code:
String s;
A b = new A( );
i`d like somehow the name of the instance(character b) to be stored to the String variable s.If anyone knows any method or way to do this please help,thanks.
The variable is just a reference to the object. The object has no idea which variables you put it into.
To give an object a name I pass a String to it and implement a getName() method.
However it sounds like what you are trying to do might be done by a debugger. Are you trying to see what the values of your data are when it is running? If so use a debugger. The one which comes with NetBeans and Eclipse is free.
Similar Messages
-
How to get the name of tag or variable
Hi everyone,
I am a newbie, I have problem on getting the name or tag of the variable from OLE for Processing Control(OPC) server, could anyone tell me how I can get the name of tag or variable from writting vb codes or please direct me to any helpful information. Here are
my codes,
Dim ItemsDef(NBR_ITEMS) As String
Dim DeviceAddress As String
Dim IndItem As Long
DeviceAddress = "MBT:152.160.178.60"
'Preparing the Handles for "AddItems"
For IndItem = 1 To NBR_ITEMS
ItemsDef(IndItem) = DeviceAddress & "!40000" & Format(IndItem) '40000 is the memory location of variable in the OPC, how can I get the variable name, what is the code or syntax?
Next
blah...
Thank you,
CalvinHi Calvin,
If you are looking for general information and examples about OPC, then we have lots of places for you to browse!
Here is a small list, and you can probably find other links within these documents:
**If you have Measurement Studio from National Instruments, then you can look at the "Measurement Studio Reference" help file. Search for OPC and in the overview you will find the methods for accessing the items on an OPC server.
**Elsewhere in the help file, you can find a link to this Application Note on our developer zone
http://zone.ni.com/devzone/devzoneweb.nsf/opendoc?openagent&F4921B34CA8F4A9786256874005BE3F7&cat=7CDA3E51FEFC4AA2862568B80071A1E2
**One more resource is http://www.ni.com/opc
**Probably the most useful will be the examples yo
u can find on our web site. You can go to http://www.ni.com/support and in Option 3 search the Example Code database for "opc".
In the first example program (Controlling OPC Servers with the OPC Automation API in Visual Basic) that you should get when searching for "opc" in the example programs database, look for the line with this code: "browser.GetItemID(leaf)". There you can see the way the program creates an OPCBrowser from the server instance, and then gets the servers available items for use by the client. This sounds like the specific information you are looking for with the variable name.
If you aren't able to find out your answer here or in the various help resources, then please feel free to contact us at National Instruments at http://www.ni.com/ask
Regards,
John N
Applications Engineer
National Instruments -
How to get the name of a (custom) component
Hi,
I would like to know whether there is a way to get the name Xcelsius uses for instance in the Object Browser. Getting the components "name" property doesnt return this information.
Thanks in advance.String myFileName = request.getRequestURL().substring(request.getRequestURL().lastIndexOf("/")+1);
or with javascript
<H1><script>document.write(document.location.href.substring(document.location.href.lastIndexOf("/")+1))</script></H1>
bye! :) -
Get the name of a particular tag in XML
Hi,
Is there a way in OSB such that I can get the name of a particular XML tag for example if I want to assign the name of tag transactionType from the below mentioned XML to a variable, can i do it using some XQuery function??
<?xml version="1.0" encoding="UTF-8"?>
<tns:sandstonetns xmlns:tns="http://sandstone.response.transactionHistory.app.nab.cz.fc.ofss.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://sandstone.response.transactionHistory.app.nab.cz.fc.ofss.com Sandstone_Data_Transaction_History_Response.xsd ">
<tns:listOfTransactions>
<tns:transactions>
<tns:clients>
<tns:clientID>tns:clientID</tns:clientID>
</tns:clients>
<tns:timestamp>2001-12-31T12:00:00</tns:timestamp>
<tns:sequenceNumber>tns:sequenceNumber</tns:sequenceNumber>
<tns:description>tns:description</tns:description>
<tns:amount>0</tns:amount>
<tns:accountNumber>tns:accountNumber</tns:accountNumber>
<tns:debitOrCreditFlag>tns:debitOrCreditFlag</tns:debitOrCreditFlag>
*<tns:transactionType>Any</tns:transactionType>*
</tns:transactions>
</tns:listOfTransactions>
<tns:returnResponse>
<tns:returnCode>0</tns:returnCode>
<tns:returnDescription>tns:returnDescription</tns:returnDescription>
</tns:returnResponse>
</tns:sandstonetns>
Edited by: rahulc on Jan 19, 2011 4:43 AMYou may use fn:local-name() -
http://www.xqueryfunctions.com/xq/fn_local-name.html
Regards,
Anuj -
Cisco Unity 7: Voice mail cann't get the name or Number phone of the caller
Hi,
I have installed Cisco Unity Messaging Unified version 7 and integrated with Exchange 2010.
I have two scenario, and I want to know if are normal or not:
1. If the 2 IP phones are subscribed with Cisco Unity: the first IP phone call the other IP phone and let a voice mail. When the second IP phone check his message vocal it can get the name of the caller or his number phone (the message is: You have One message from XXXX) and he get e-mail as objet: Voice Mail from XXXX.
2. If one IP phone is not subscriber with cisco unity call other Ip phone subscribed with cisco unity and let him a voice mail. The second IP phone when check his message vocal it can’t get the name of the caller or his number phone: The message is: You have one voice mail xxxx; without indicate from!! and he get a e-mail as object: Voice mail from Unknown.
Please, I want to know if the second scenario is normal ? if not, who to resolve this problem? I want that he indicate the number of caller same he isn't subscriber with cisco unity?
Thanks a lot,
Best regards,
Omar YUNSISo for the 2nd scenerio you would want to check what your Message Subjects were set to. For Unity 7 open Web SA, click Configuration and then Message Subjects. Make sure that the Outside Caller Message has %CALLERID% in it somewhere. The value %CALLERNAME% will return unknown if we do not receive a name from the PSTN.
Try setting the Outside Caller Message to:
%U% %P% Voice Message from %CALLERID%
and that should get you your desired results.
The default Message subject is:
%U% %P% Voice Message from %CALLERNAME% (%CALLERID%). So with that it would say Voice Message fom Unknown (xxxx) if it was not able to determine the name of the user which is usually normal from a PSTN call.
Just to note, the From address is always going to say from Unity Messaging System, it will only be the subject that has the extension in it.
Bryan -
How to get the name and value of an attribute on a node/element that is not a child
Hello,
Can someone shed some wisdom on how I can compare 2 xml nodes for differences.
My main challenge is I need to use the attributes/values of 'ProductDescription' and 'Features' as 'key' to identify the same node in
another doc with the same layout, but different content.
I am having trouble getting the name of the attribute on the node, 'ProductDescription' and 'Features'. I can only seem to get the node names, but not the attributes on the node. I need the name, because it can be different from doc to doc, so
I can't hardcode this.
Can someone please help with how to retrieve an attribute name/value on a node that is not a child. Here's an example of what
my xml looks like:
DECLARE
@myDoc1 xml
,@mydoc2 xml
DECLARE
@ProdID int
SET @myDoc1 ='<ProductDescription ProductID="1" ProductName="Road Bike">
<Features featureID = "1" featureName = "body">
<Warranty>1 year parts and labor</Warranty>
<Maintenance>3 year parts and labor extended maintenance is available</Maintenance>
</Features>
<features featureID = "2" featureName = "seat">
<Warranty>1 year parts and labor</Warranty>
<Maintenance>2 year parts and labor extended maintenance is available</Maintenance>
</Features>
</ProductDescription>
SET @myDoc2 ='<ProductDescription ProductID="1" ProductName="Road Bike">
<Features featureID = "1" featureName = "body">
<Warranty>2 year parts and labor</Warranty>
<Maintenance>3 year parts and labor extended maintenance is available</Maintenance>
</Features>
<features featureID = "2" featureName = "wheel">
<Warranty>1 year parts and labor</Warranty>
<Maintenance>2 year parts and labor extended maintenance is available</Maintenance>
</Features>
</ProductDescription>
I need to compare the attributes of 'ProductDescription' and 'Features' from @mydoc1 against @mydoc2 to see if they are the same based on those 2 nodes first. If they are, then i want to show the difference in the child elements.
This will eventually be an outer join to give me the differences betw the 2 docs based on those key values (node attributes).
I used node('//*') for the path, and value('local-name(../.)', 'varchar(50)') as element
,value('.[not(@xsi:nil = "true")]','VARCHAR(255)') AS new_value
...etc...
but that only gives me the node names, and the child elements. It does not give me back the attribute names and values from the node itself.
Thanks in advance for your help.
ceeAre you looking for something like this:
DECLARE @myDoc1 xml
SET @myDoc1 ='<ProductDescription ProductID="1" ProductName="Road Bike">
<Features featureID = "1" featureName = "body">
<Warranty>1 year parts and labor</Warranty>
<Maintenance>3 year parts and labor extended maintenance is available</Maintenance>
</Features>
<Features featureID = "2" featureName = "seat">
<Warranty>1 year parts and labor</Warranty>
<Maintenance>2 year parts and labor extended maintenance is available</Maintenance>
</Features>
</ProductDescription>'
SELECT T.c.value('local-name(.)', 'nvarchar(50)') AS name,
T.c.value('.', 'nvarchar(50)') AS value
FROM @myDoc1.nodes('ProductDescription/@*') AS T(c)
Erland Sommarskog, SQL Server MVP, [email protected] -
after I burn the files to dvd and load to view the name does not appear. How do I get the name listed to appear on the burn disk instead of the file number?
Naming the Photo - or giving it a title - is not the same as naming file.
How are you burning to dvd? With iPhoto? If so then the Title will be available in any app that understands basic metadata.
If you want the title available in the Finder - which does not understand photo metadata - then you'll need to export the file
File -> Export
In the resulting dialogue you'll see a heading for 'File Name'. Choose 'Use Title' from the drop down.
Regards
TD -
Need of a Webservice to get the name of the file in a Folder
Hi All,
I am in need of a Web service which should get the name of the file in a folder.
Note : Folder is created in the MOSS server.
Thanks.Just to add, Mac in intergrated into AD and all I need is help in creating the script
Thanks -
How do I get the names of tracks I type in Adobe Audition 3 to copy to the Sony CD-RW CRX217E in myD
How do I get the names of tracks I type in Adobe Audition 3 to copy to the Sony CD-RW CRX217E in my Dell Precision Workstation 670?
I have recorded 10 tracks of voice with music using Adobe Audition 3 and Sony CD-RW CRX217E with no problem.
The problem is, however, that the names I type in Audition 3 for each of the tracks and artist do not copy to the CD I have recorded. This means that when I play the tracks on any playback equipment that shows the names of the tracks and artists, etc. all that appears on the screen is the track number, such as Track 1, Track 2, etc.
I am using a Dell Precision Workstation 670
Inter®Xeon
CPU3.2GHz
3.19GHz,2.00GB RAM
SYSTEM
Professional x64 Edition
V2003
SP 2, v.4354
Thank you
NoProWell, there is one possibility, but I can't absolutely confirm this. I had a look at the specification for the drive on the Dell website:
http://support.dell.com/support/edocs/storage/P89087/en/index.htm
and nowhere does it say that the drive supports CD-Text, I'm afraid. Even though all drives can in theory write this, a lot have the header hard-coded, and simply can't. Yours may be one of them, but I think you'll have to ask Dell to confirm this. -
How to get the name of the current tab.
Hi Experts,
I have two tabs in my tab strip and a button common to both the tabs.Can you please let me know how to get the name of the current tab in the event method of the push button.
Thanks in advance.
Regards,
Arun1.Declare an Action for OnSelect event of Tabstrip. This event is triggered whenever any change in tab occurs.
2. Declare an Import Parameter in this method
Tab type String.
3. This parameter has value of the selected TAB.
4. You can set this value in some Attribute in Attribute Tab in this event only (OnSelect):
wd_this->Att = Tab.
Att is the attribute created by you in Attributes Tab of View. ( of type String)
5. Now the selected Tab ID is stored in this Attribute Att.
6. In the Onaction of Button , retrieve the selected tab value from this attribute using :
Data : lv type string.
lv = wd_this->Att
Now lv has your selected TAB ID.
I hope it would help you.
Edited by: Saurav Mago on Oct 13, 2009 2:22 PM -
How to get the name of current monitor?
I have a script which is used to get some application data. The script take parameters such as "LOB" so it can query data for different department. When it found something, it raise an event in event log.
Therefore this script is used by several different monitors. Each monitor calls the script by passing different parameters. To better understand the event was created by which monitor, I want the script can get the name of monitor which calling it and they
list it in the event log too.
Currently, I am passing $MPElement$ as one script parameter so I can get the monitor's GUID. Then get the name by running powershell command. Is there an easier way to get the monitor name? Thanks!The best way to do this is to put the monitor name as a property bag in the script and pass that to your event details. Otherwise, we're looking at querying the database each time the monitor generates an event, and this is overhead that is really not
necessary. The other option, which is just even worse in terms of performance, is to use powershell to query the SDK for the monitor name. Both of these options are not going to be a good solution, because now you need to implement action accounts that can
either query the database or the sdk.
Jonathan Almquist | SCOMskills, LLC (http://scomskills.com) -
How to get the name of the attachment in Sender Mail Adaper?
hi mates,
I've scenario a where in I need to pick up a mail with an attachment and change its extension and send it to target system using file adapter.
I'm able to pick up the mail with attachment using sender mail adapter but not able to get the name of the attachment so that I can use it in mapping or on the adapter configuration. How do I read the name of the attachment and manupulate it?
I looked at the thread sender mail adapter - attachment name But the solution is not described. I think Stefan is talking about the SP!2 for PI 7.0. I'm on XI 3.0 what is the equivalent SP for that, SP20? Stefan, can you please throw me more light on it?
I appreciate your valuable inputs
thx in adv
praveenThanks Aamir.
Earlier I replied to that thread asking for more details...but did not see the response...
anyways, thanks for your quick help..
but I wonder abt the PI SP12/ XI SP20 pre-requisite. We can have adapter modules on SPs lower than PI SP12/XI SP20 as well, can we not?
thanks
praveen -
Which Table i will Get the Name of Receipt Recipient in FBCJ
Hi Experts
Which Table i will Get the Name of Receipt Recipient in FBCJ
Transaction Code : FBCJ
Technical name : Name of Receipt Recipient
Field Name : BP_NAME
But it is not stored in TCJ_POSITIONS table
Regards
JagadishHi,
Please check in TCJ_DOCUMENTS table, field name BP_NAME.
Regards
Radhika -
9I: How can get the names of all objects in a package header? [RESOLVED]
Is there a way to get the names fo all objects (function, procedures) from package header
select * from user_objects only gives the the header name, I need the object in the header.
John
Message was edited by:
johnminkjanHere is an example with dbms_output package!
SQL> select owner, object_name,procedure_name from all_procedures
2 where object_name='DBMS_OUTPUT';
OWNER OBJECT_NAME PROCEDURE_NAME
SYS DBMS_OUTPUT GET_LINES
SYS DBMS_OUTPUT GET_LINE
SYS DBMS_OUTPUT NEW_LINE
SYS DBMS_OUTPUT PUT_LINE
SYS DBMS_OUTPUT PUT_LINE
SYS DBMS_OUTPUT PUT
SYS DBMS_OUTPUT PUT
SYS DBMS_OUTPUT DISABLE
SYS DBMS_OUTPUT ENABLE
9 rows selected.
"or"
SQL> desc dbms_output -
Can we get the name of fmx file at runtime
Hi all,
can we get the name of fmx file which is doing some DML operation on a specific table Can we back track which fmx module has done DML on a specific table. The reason I need this because I've 7 different fmx files which are doing some DML operation on a specific table and these fmx files were used by different users. Not necessarily 1:1 For eg. one user can do DML through 3 different fmx files. So in such case if I want to want to know from which fmx file this DML has take place .How can I achieve that. I know I can get the oracle username through v$session but it will not suffice my needs. I need the name of fmx file also.
I'm using:
Forms [32 Bit] Version 10.1.2.0.2 (Production)
Oracle Database 10g Release 10.2.0.1.0 - Production
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
Any help?
Warm Regards
PercyPercy,
For that you can set the Module Field in the V$session in each form by,
DBMS_APPLICATION_INFO.SET_MODULE(MODULE_NAME => :SYSTEM.CURRENT_FORM, ACTION_NAME => USER);Write this in each form, and then you will get the form name in the V$SESSION's module field with form name.
Hope this helps.
Regards,
Manu.
Maybe you are looking for
-
PDF's viewable in Reader but not in Pro
I have a user, that in the beginning, everytime he opened an email with a PDF attachment, it would open in Internet Explorer. We found where that was resolved, but then the PDF started opening in Adobe Reader. He has Adobe Professional 8 installed. I
-
Everything synced but the notepad? Any ideas?
-
Finding Duplicate Entries in a table
I have a table with the following fields in Oracle 10g. TABLE_1 account_no | tracking_id | trans_amount Each account_no can have multiple tracking Id's. How do i query out the duplicate entries of account_no where tracking lies between 1 and 1000 ? M
-
In process Inspection scenario
Hi, the scenario is that, user would like to split a production order into two (i.e, Split order) so that the prod. order quantity can be split into two or required quantity and then following operations would proceed. So that half the Qty can be com
-
I have built a website with five pages. Is there a way to add different music loops to each page and have it start when the page opens?