Quick question how to wrie entire array in one go without loop
I have the following loop, which goes around store array and write each element to file one at a time, i have been told that i can do this an easy way by writting the entire array at once. Can anybody tell me how to do this?
int storeSize = store.getCount();
for (int i = 0; i<storeSize;i++)
output.writeObject(store.elementAt(i));
i believe the method is
Arrays.fill(
read the api of the Arrays classPerhaps you should read the API, too, before
offering advice.eerm, i dont need to read the api because i know this method exists:
static void fill(Object[] a, Object val)
Assigns the specified Object reference to
each element of the specified array of Objects.I'm sorry, you're absolutely right. Original poster, stop serializing objects
to that ObjectOutputStream, and instead fill an array with multiple
references to the same value. Whew, that was a close one, eh mates?
Similar Messages
-
Quick question: how can I save my project and posted in Facebook?
Quick question how can I save my project and posted in Facebook?
By using File>Save As or File>Save for Web. You can choose jpg or png.
-
My wife and I have made many purchases over several years on seperate accounts, how could we join them into one account, without losing everything? We both use Iphone 5's and share an Imac at home.
Purchases using one Apple ID cannot be merged or transferred to another Apple ID. Purchases are forever tied to that Apple ID used. You have to decide which Apple you want to use for purchases and stick to that Apple ID so that you can share: Settings > iTunes & App Stores > Apple ID : > use the same Apple ID here to share purchases.
-
How do i sync multiple iphones, one computer without getting other iphone info
how do i sync multiple iphones with one computer without getting other iphone's info.
When I sync my iPhone, after I do a backup, then sync, I end up getting my kids phone numbers, wife's numbers, etc.
How do I create my own account to manage?Settings
iTUnes and app store
turn off automatic downloads for apps
Then what you buy on one device only goes onto another if you want it to -
HOW DO YOU" DELETE BOOKMARKS" AT ONE TIME WITHOUT DELETING ALL.
== Issue
==
I have a problem with my bookmarks, cookies, history or settings
== Description
==
How do you" delete bookmarks" at one time, but not all of them. For instance highlight the ones you don't want. But with Fx that doesn't work. I love Fx and tell everyone I know about you and have for years. Please help !!!!!
== Troubleshooting information
==
How do you" delete bookmarks" at one time, but not all of them. For instance highlight the ones you don't want. But with Fx that doesn't work. I love Fx and tell everyone I know about you and have for years. Please help !!!!!
== Firefox version
==
3.6.3
== Operating system
==
Windows XP
== User Agent
==
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
== Plugins installed
==
*-Shockwave Flash 10.0 r32
*Default Plug-in
*Adobe PDF Plug-In For Firefox and Netscape "9.3.2"
*NPRuntime Script Plug-in Library for Java(TM) Deploy
*Google Update
*Java(TM) Platform SE binary
*Next Generation Java Plug-in 1.6.0_20 for Mozilla browsers
*Npdsplay dll
*DRM Store Netscape Plugin
*DRM Netscape Network ObjectPlease take a look at knowledge base article [[Deleting Bookmarks]] on how to delete one or more bookmarks at once.
-
Quick question: How to get the scrolled page number using af:table
Hi,
When using range paging on scrolled table, how to get the current scrolled page number(1,2,3...), for example when moving the table vertical scroll bar forward or backward, is there any method in ViewObjectImpl class that I can use to get such information? I have seen the method scrollToRangePage(int i), but when scrolled ("Fetching data..."), it doesn't not get into this method. So it is wrong usage for this method, right?
ThanksDidn't you just ask that question in this thread?: How to catch the page number when using scroll table in ADF 11g?
A bit of patience might be in order.
CM. -
Quick Question - how often does a device check-in to see if it needs an iOS update?
simple question which i cant get an answer from Apple or the Normal discussion forums, so thought i woudl try the developer forums.
how often does a device check-in to see if it needs an iOS update?
and if its perodically (something like 7 days) would that explain why on two devices - one would show as the latest update being 7.0.4 and one shows 7.0.6?How ddid you ask Apple?
This information is probably simply not disclosed. -
Quick question: how to stop catalog opening in new tab in browser?
hi,
when i click a catalog from a list on the main page it opens the linked template for my catalog products but does so in a new browser tab?
how do i get the catalog products page to open in the current tab?
thanks in advance.
smJust updating this thread with the solution in this case.
Solution: Go into your template and remove the reference "_blank" which is causing this to open in a new tab.
- http://screencast.com/t/sqy18afr
Kind regards,
-Sidney -
Quick question - how to use flat files OWB 10gR2
Sorry, really dumb question here. I'm using the OWB client on my windows machine, but the database is on a separate UNIX box.
The data file I'm trying to access is in
/usr/local/test
and the DBA's have created a directory object ("TEST") inside the database with read privs on that /usr/local/test directory.
Given all that, exactly what do I need to do to:
a) create the file location in OWB
b) "see" the flat file in it
When I try to set the directory up, it seems like the client is looking at my local drive instead of connecting to the Unix box?
Thx,
ScottIndeed... if you use the Import metadata wizard, it will look for the flat files on your local machine, but this is only for you to define the layout of this file... when you actually read this file (in a process flow for example) the flat file must be on the server where your OWB repository is installed... notice that this is not necessarily the same server where your database is running.
-
I don't want to create this exact design but this is what I am looking to do. I want to cut and design acrylic and i was told to use photoshop or acrylic but I am not exactly sure how to do this. If you would like to help, We could just use the simple word: "bunny". How do I create that black outline as well?
(photo credit: google)Illustrator is probably the better program to do something like that in. However I don't have Illustrator and Photoshop has layers, text tools, fonts, layer styles and shape layers. CS6 even let you convert text into shape layers. So something like that would not be that difficult to create in Photoshop. You may want to look at Linked Letters [Logo or Monogram ]which was done before CS6 at that time Text Layers could not be converted to shape layers.
Acrylic http://www.youtube.com/watch?v=l76Jvi3tbXY -
OBPM Studio newbie 101 question - how do I manipulate arrays ?
Hi :-)
I've RTFM'd but couldn't find the answer so here goes.
I'm using Java syntax and would like to manipulate my array like so:
String[] foo = new String [ 100 ];
Unfortunately the above gets flagged as an error and I have no clue why. If I separate the above into two statements then I get the following results:
String [] foo; <-- ok
foo = new String [ 100 ] <-- error
Using a static array e.g. String[] foo = { "foo" } is not an option for me because the array size can be variable.
I must be missing something fundamental here ... appreciate your guidance pls. :-) Thanks
PS: Somehow the left and right square brackets are stripped out from my postHi,
I would like to comment something.
When you create a String array, behind the scenes, bpm is using a list. That's why you can not specify the array size.
You can add elements in the following way:
String[] arr;
arr[] = "Fisrt element";
arr[] = "Second element element";
display(arr.toString());
Hope this helps,
Ariel -
Quick question: How to make a JAR file
Well I have jdk1.5.0_02/bin/jar.exe file into my file with all of my classes which work using my schools java editing program. I'm trying to get it to run and I have my manifest.txt with "Main-Class: Driver" in it. Driver is my class with "public static void main(String args[])" in it and I have the cariage return in the manifest.txt file. Thanks for the help.
Well I have jdk1.5.0_02/bin/jar.exe file into my file
with all of my classes which work using my schools
java editing program. I'm trying to get it to run and
I have my manifest.txt with "Main-Class: Driver" in
it. Driver is my class with "public static void
main(String args[])" in it and I have the cariage
return in the manifest.txt file. Thanks for the help.What is the problem? You told us what your are trying to do, not what is happening. If you get an error, you better post it. You could also post the command you are using. -
i have a new iphone 5c and i cant get past the security questions. i made my apple account a while ago with an old email. i created a new apple id with my new email but i dont use it. How do i terminate the account with my new email so i can replace my old email? If i reset my security questions will it delete all my stuff?
You can't delete an iTunes account, but you should be able to change the email address that is on it e.g. by tapping on it in Settings > iTunes & App Store on your phone and logging into it, via the Store > View Account menu option on your computer's iTunes, or via http://appleid.apple.com - you should then be able to put it on your old account.
For your security questions on your old account, if you have a rescue email address (which is not the same thing as an alternate email address) on that account then the steps half-way down this page will give you a reset link on your account : http://support.apple.com/kb/HT5312
If you don't have a rescue email address or don't have access to that email account (you won't be able to add one or change it until you can answer your questions) then you will need to contact iTunes Support / Apple in your country to get the questions reset.
Contacting Apple about account security : http://support.apple.com/kb/HT5699
When they've been reset you can then use the steps half-way down the HT5312 link above to add or update your rescue email address for potential future use
Resetting an account's security questions shouldn't affect any of the purchases that you've made on the account. -
How To Pass an Array from One Frame in a Sequence to a ptr in the next Frame
I have an array (generated from the "Replace Array Subset" VI) that I
wish to pass to the next sequence in a frame.
In this second frame, however, the VI that this data will go into
expects it as a pointer to a buffer.
Of course in C, the array name is the pointer to the array itself, but
apparently this is not the case in Labview..
because if I wire the output array to the edge of the frame (Blue
solid blox - "Tunneling'?), and then try to connect
that blue box in the second frame, to the VI expecting a pointer and
the wire connection gets broken, and the blue
solid box goes empty.
How Can I do this??You are not being quite clear. If the next frame expects a pointer to a buffer, it cannot be a vi. Labview has no pointer types. You must be referring to a Call Library Node which is set up to call a DLL function. If this is the case, you need to configure the Call Library Node to accept an array of the data type. Then you can wire the array into the call library node.
Is this the case, Call Library Node?
- tbob
Inventor of the WORM Global -
How to move entire library from one computer to another w/ external hd
I want to move all of my music to a new mac I purchased without losing my ratings, playlists and playcounts. All of my music is on an external harddrive. Do I just plug the external harddrive into my new mac and then just drag the entire music folder from the external into itunes? It seems to me like doing this will result in losing all of my playlists ratings and playcounts. Does anyone know if I can remedy this by exporting the xml from my old mac and then dropping that in itunes on my new mac and also changing the location of my music folder in the preferences pane of itunes on my new mac? Thanks for any help or suggestions.
If you have any problems with the library in the new account you might have to download and run BatChmod on the library to reset the ownership and permissions to the new account owner for all of the files in the library. User the settings shown in the screenshot below:
Click to view full size
For Owner use the owner name for that account. If the account uses a different Group then use it also. You can find the group name by seleting a file in your other account and typing Control+i to bring up the Info window. The ownership and group will be shown near the bottom.
OT
Maybe you are looking for
-
My ipod touch and also ipad is not coming up or showing when connecting to my computer and hence cannot sync it. The last available sync was about a week ago. Any ideas on what is not happening?
-
Slow wifi on iphone 5 ios 6.1.4
hello there i have an iphone 5 which running IOS 6.1.4 and im facnig a real slow wifi over all wifi networks !! i tried other deviscess like samsung mobiles and laptops and the speed is great !! the problem is only on the iphone !! and i dont want to
-
hi, my emac is not reading blank cd-r's...it is reading previously burned cd's but when I insert a new blank cd to burn I get a 'medium write error' message...I have tried various brands [maxell, sony, imation, tdk]...does anyone know what could be t
-
How to get rid of CR/LF in FTP?!
Hi, i am writing file to FTP. When the receiving system wants to read data, the read a square in case of a normal CR/LF. My content conversion looks like: DELRecordSet.fieldFixedLengths DELDetailsStruct.fieldSeparator ; DELDetailsStruct.endSeparator
-
Enter G/L document error-urgent
Dear expert, When user enter document in FB50 for G/L account xxx, there was a message :"an entry in field order is not permitted for account xxxx.". In which tcode I could check for what kind of orders permitted to that account? And how to correct t