How can i use class reference from an array effeciently?
Hi,
I made some test here with getting a class reference from an array and using the reference's methods or variables.
Basically arrayEx is a container of type Array and it contains the Person's class instance in it. Num is a number extracted from the Person's instance
Example #1----Strongly typed
Var reference:Person;
Var num:int;
//Assignation
reference=arrayEx[0];-----IT IS SLOW HERE
//Use
num=reference.number --- IT IS FAST HERE
Example #2---Not typed
Var reference:*;
Var num:int;
//Assignation
reference=arrayEx[0]; ---- IT IS FAST HERE
//Use
num=reference.number ---IT IS SLOW HERE
No matter what i change in both code like casting Person on arrayEx, i cant seem to make them work both fast at the same time
If someone knows how, please tell me,
Dominik
Hi,
I made some test here with getting a class reference from an array and using the reference's methods or variables.
Basically arrayEx is a container of type Array and it contains the Person's class instance in it. Num is a number extracted from the Person's instance
Example #1----Strongly typed
Var reference:Person;
Var num:int;
//Assignation
reference=arrayEx[0];-----IT IS SLOW HERE
//Use
num=reference.number --- IT IS FAST HERE
Example #2---Not typed
Var reference:*;
Var num:int;
//Assignation
reference=arrayEx[0]; ---- IT IS FAST HERE
//Use
num=reference.number ---IT IS SLOW HERE
No matter what i change in both code like casting Person on arrayEx, i cant seem to make them work both fast at the same time
If someone knows how, please tell me,
Dominik
Similar Messages
-
How can I use LDAP searching from OSX Lion Server to Mozilla Thunderbird?
How can I use LDAP searching from OSX Lion Server to Mozilla Thunderbird? We have a super awesome contacts server that works great for our Mac users. About 30% of our company are on PCs, and I would like to use the Mozilla Thunderbird mail client for them. I see that in Thunderbird I can set up LDAP searching, and would like to have this feature point to our contacts server. I've tried several different settings, and looked all over the web, but could not find the proper way to configure this. Does anyone know if this can be done, or if not, would have a better suggestion? Thank you for your time!!
try double clicking keychain acces should launch and ask if you want to install login, system, System roots
A dialog box will launch asking where to install the cert since your configuring a vpn I would put the certificate it in system. -
I can not find my playlists on apple tv. How can I use my playlists from itunes on apple tv ?
Hey luisathome,
Thanks for the question. The following resource outlines how to setup Home Sharing between your Apple TV and computer:
iTunes 11 for Mac: Play items in your iTunes library using Apple TV (2nd generation or later)
http://support.apple.com/kb/PH12153
Thanks,
Matt M. -
How can I use a pic from iPhoto as a background for a page, How can I use a pic as a background for a page
cd,
Insert the picture and position it as you desire
Make sure the picture is set to Floating in the Wrap Inspector
Arrange > Send Objects to Background
Regards, -
How can i use migration assistant from a Power PC G4 powerbook?
How can i use migration assistant from a Power PC G4 laptop that can't run 10.5 to a new mini running Lion? Mini's MA says I have to upgrade the laptop's MA but the upgrade requires 10.5 as a minimum
help,please
janThat is correct. You'll need either an ethernet cable or a firwire cable and a firewire to thunderbolt adapter to connect the two macs together. Here's info on Migration/Setup assistant
http://support.apple.com/kb/HT4889?viewlocale=en_US&locale=en_US -
HT5467 how can i use location services from my pc to find my lost ipod?
how can i use location services from my pc to find my lost ipod?
Find My iPod
http://www.apple.com/sg/icloud/features/find-my-iphone.html -
How can I use my camera from sony xperia z2 on my laptop
How can I use my camera from sony xperia z 2 on my laptop? Please help me Thanks!
You need an app, something like this
https://play.google.com/store/apps/details?id=com.busywww.cameraremote&hl=en -
How can I use the photos from iphoto to display in contacts?
Contacts has a space for a photo. At one time I knew how to populate this space with photos from iPhoto. Currently my choices are to use an icon or take a pic with the camera.
How can I add the photos from iPhoto to the choices for populating the "Contacts" image space for individual cards?See this Discussion...
https://discussions.apple.com/message/19082703#19082703 -
How can I use the speakers from my old iMac (with miniRCA? plug) on a new iMac
How can I use the speakers (M-Audio) from my old 24" iMac on a new 27" iMac? There is no jack on the new iMac - is there an adapter that will use the mini-RCA (?) plug from my old speakers to connect them to a new iMac? Thanks ...
Thanks again!
Hmmm ... I wonder. The input jack for external speakers quit working on my old iMac (it made lotsa static noise for a while when I moved the plug or computer, then quit working completely; I figure something inside the computer got loose or crapped out - and I'm too cheap/lazy to take it the 20 miles to the nearest shop that might fix it). When I plug the speakers into the headphone jack on the old iMac, I get very low volume or just one channel.
I don't have the new iMac yet, but I was hoping to use these old speakers instead of buying new ones. I will certainly try your solution - what do I have to lose? If they don't work, then I get new ones - or try something else.
Many thanks for your time! -
How can I use a photo from my files as a screen saver?
I have an LG monitor about 10" high and 16" wide. How can I send a photo from my Adobe files to my desktop as a screen saver. Because of the odd dimensions of this monitor, the one I have as a screensaver now does not show the entire photo. I need instructions how to choose one of my photos, send it to the monitor as a screen saver, and make it the correct size to show the entire photo.
You'll need to download the song from your cd to your my music folder, then open Itunes files add files or folder to the library then you find your song from your my music folder. Then you will have to create the ringtone:
http://http://www.ehow.com/how_2160460_custom-iphone-ringtones-free.html
follow the instruction to create then sync the ringtones. -
How can i use JWSDP1.6 from Ant tool to convert .wsdl file into Java class
Hi All,
i m very new in the development field.plese help me...
i have a .wsdl file and i have to make some modification in the file and return this file with build file used in Ant tool.
means my requirement is to conver the .wsdl file into java class,modify it and convert back to wsdl file.how can i do it using JWSDP1.6 and Ant tool.
thanks in advance...
Vikram Singhlemilanais wrote:
hello!
I have developpe an animation with flash. before give it to othe person in order to use it, i would like to secure it by integrated a security module inside the software.Secure it from what? Being played? Copied? Deleted? Modified?
Because, i am a java developper, i have choose Netbeans 6.1 to secure it.That has to be the most random thing I've read in some time.
do you know how can i do to integrate my animation .swf inside my java class?Java can't play SWF files and Flash can't handle Java classes, so what you're suggesting here doesn't make a lot of sense. -
How can I use JVM instructions from Java classes?
Hello,
I want to use JVM instructions in my Java classes. How can I achieve this?
Should I include a library to my project or something else?What on earth are you talking about?
-
HT2509 How can I use Favorite fonts from Font Book when using e-mail?
How can I add fonts from Font Bood to e-mail fonts?
You dont use Font Book to change fonts in Mail.
open Mail > open a new message > Show Fonts
click in the text message pane
click on the font, size and colour you want to use
type your text -
Can't use parameter reference from DLL C on pl/sql
hi all, I have dll(newStr.dll) write by c language with a function name is "strNew", following code in c and pl/sql:
char* strNew(char *& str){
if (str != NULL){
str = strdup("");
str = strcat(str,"String is not null.");
}else{
str = strdup("");
str = strcat(str,"String is null.");
return str;
On PL/SQL I call the dll(newStr.dll), following code on pl/sql:
1) Create library:
CREATE OR REPLACE LIBRARY TestDLL AS 'D:\newStr.dll';
2) Create package:
CREATE OR REPLACE
PACKAGE TEST_DLL AS
FUNCTION strNew(str IN OUT varchar2) RETURN VARCHAR2;
END TEST_DLL
CREATE OR REPLACE
PACKAGE BODY TEST_DLL AS
FUNCTION strNew(str IN OUT VARCHAR2)
RETURN VARCHAR2 AS
EXTERNAL LIBRARY TestDLL
NAME "strNew"
LANGUAGE C
CALLING STANDARD PASCAL
PARAMETERS(str BY REFERENCE STRING, return STRING);
END TEST_DLL
3) Create Procedure:
CREATE OR REPLACE
PROCEDURE TESTPRO AS
newStrIn varchar2(40) :='test';
newStrOut varchar2(256);
BEGIN
newStrOut := TEST.strNew(newStrIn);
DBMS_OUTPUT.PUT_LINE('newStrOut = ' || newStrOut );
DBMS_OUTPUT.PUT_LINE('newStrIn = ' || newStrIn );
END TESTPRO;
4) Run procedure the result following:
newStrOut = String is not null.(it correct)
newStrIn= 8!(it wrong, the newStrIn='String is not null' is correct))
I not found root cause why in pl/sql, I can't get the variable reference from dll c.
Please help me.
Quan.For compatibility purposes you would probably be better using 10g development rather than 9i if you are going to use a 10g database. I'm not familiar with the latest versions in terms of Oracle Forms, cos I stopped developing in Forms back on version 8.
Essentially there are different components you can download and install.
Database - This sets up a database server and allows you to create databases to store your data in.
Client - This installs the necessary client software to allow you to connect to a database on a database server. It includes client software such as SQL*Plus and the drivers needed to make the connections.
Developer - This is a client side development environment for developing forms and reports. It requires the Client software in order to be able to connect to the database.
By the sounds of it you have downloaded and installed the last two, but without the first one you don't have a database to connect to. -
How can we use Prompt text from Field comment in database
After migrate database from 4 to 9, I'm getting the problem. The problem is Prompt text in Form don't appear. So, how can we get the Prompt text by using the comment of the field in database which it related with that database text. Thank you.
Hello,
The table name is indicated in the query data source name property of the block
Get_Block_Property( 'bloc_name', QUERY_DATA_SOURCE_NAME ) ;
The column name is indicated in the column name item property
Get_Item_Property( 'blk.item_name', COLUMN_NAME ) ;
Comment is stored in the user_col_comments view
Here is the code that retrieves coments for all based items of the current block:
Declare
LC$Table Varchar2(30);
LC$Column Varchar2(30);
LC$Item Varchar2(61);
LC$Comment USER_COL_COMMENTS.COMMENTS%Type ;
Begin
LC$Table := Get_Block_Property( :system.current_block, QUERY_DATA_SOURCE_NAME ) ;
-- For each item of the block --
LC$Item := Get_Block_Property( :system.current_block, FIRST_ITEM ) ;
Loop
LC$Column := Get_Item_Property( LC$Item, COLUMN_NAME ) ;
If LC$Column is not null Then
Begin
Select
COMMENTS
Into
LC$Comment
From
USER_COL_COMMENTS
Where
TABLE_NAME = LC$Table
And
COLUMN_NAME = LC$Column
-- set the prompt --
Set_Item_Property( LC$Item, PROMPT_TEXT, LC$Comment ) ;
Exception
When no_data_found Then
Null;
End;
End if ;
LC$Item := Get_Item_Property( LC$Item, NEXTITEM ) ;
Exit When LC$Item is null ;
End loop;
End;Francois
Maybe you are looking for
-
Problems with SMTP port forwarding on ASA 5505
Cannot telnet to port 25 to test for SMTP traffic. Packet trace indicates that the packet is dropped by the implicit rule, but I have tried an access rule specifically for SMTP, and the trace appears to skip the rule and drop the packet when it hits
-
Offsetting Weeks to check for sick days
Hi, this is all a bit new to me so please forgive any naivety (or simplicity) of this request I've got the number of absent days by week per line in a DSO, For each instance of a sickday in a week I'd like to be able to see if that is equal to the nu
-
Dear all, Iam new to SRM.pls explain brief about SRM. I have installed ECC 6.0 ABAP STACK only hp-ux,db2 9.1. pls tell me 1.whether we need to install abap+java stack in srm or only java is enough. 2.pls tell me brief explanation about how to go abou
-
Drag highlighted files in Finder?
After highlighting several files in Finder for dragging to another folder, the highlighting disappears when I click on the group to drag it. I can drag files one at a time, but that's impractical. How can I get the highlighting to remain so I can dra
-
Unhappy service, Formal Complaint - how ?
I took out a phone line service with Broadband sometime ago, The broadband was next to useless... When the engineer came to install the line he stated "it will be useless, too far away from exchange" Well is that what most engineers state ? ... so we