About combing two array into one
Hi all,
I post a questiona bout converting an array of integer into char (byte) array and I got a solution already http://forums.ni.com/t5/LabVIEW/how-to-display-char-code-properly/m-p/2596087#M780368
However, I enouther another problem while dealing with an array of U16 type. I would like to extract the high and low byte from numbers (U16) stored in array. I extract the high and low byte for each U16 number and convert them as char, concatenate them to a string. Repeat this process for each element in the array so to get a big string with each element is a char for high and low byte. My code is enclosed as follows
It works fine but I am concerning the speed. Is that any other way to do it fast and don't use loop (in real case, I will deal with pretty big array many times, efficiency is a problem). Note that the high and low bytes array extracted from the original array with the module Split number.vi, but how can I combine these two array in one code with data arranged as high-low-high-low ... ? Thanks.
Solved!
Go to Solution.
PKIM wrote:
However, I enouther another problem while dealing with an array of U16 type. I would like to extract the high and low byte from numbers (U16) stored in array. I extract the high and low byte for each U16 number and convert them as char, concatenate them to a string. Repeat this process for each element in the array so to get a big string with each element is a char for high and low byte. My code is enclosed as follows
It works fine but I am concerning the speed. Is that any other way to do it fast and don't use loop (in real case, I will deal with pretty big array many times, efficiency is a problem). Note that the high and low bytes array extracted from the original array with the module Split number.vi, but how can I combine these two array in one code with data arranged as high-low-high-low ... ? Thanks.
You need to be more clear.
Looking at the code, you are dealing with I16, not U16. Also your index array primitives could be replaced by autoindexing. Your use of the feedback node only makes sense if you want to append strings forever with stale data, thus growing data structures without limits. If you only want to convert the current data, remove the feedback mode and use a "concatenate strings" with a single input. A for loop is one of the most efficient data structures and using it is not a problem. One way or another the code needs top oerate on all data.
All that said, I agree with Tim that most likely all you need to do is insert a typecast after the "to I16" and eliminate all other code.
LabVIEW Champion . Do more with less code and in less time .
Similar Messages
-
How do I combine two arrays into one?
I am trying to combine two byte arrays into one. What function do I use that will put in the information in the same order just combined?
battler. wrote:
Julien,
Used LV for years. Never knew that (concatenate inputs). Wouldn't believe the lengths ive used to get around it. Thanks
Same here! I actually learned about it taking a sample test for the CLAD.
Richard -
HT4759 How do I combine two accounts into one
How can I combine two accounts into one account
If you are talking about iCloud accounts, you can't.
Or you could tell us what type of accounts these are? -
My girlfriend and I both have iTunes account with our own music libraries and we want to combine our two libraries into one icloude accounts so can both then access our one shared libary at anytime in the cloud. How do we do this?
No it is not possible. Content purchased from the iTunes Store is permanently tied to the account from which it was originally purchased, and Apple does not provide a way to change it.
-
HT1449 how do you move all music from two computers into one itunes account?
How do you move all music from two computers into one itunes account?
An "iTunes account" is an online account you use for buying music, like a bank account. An iTunes collection is the media you see when you open iTunes. Which do you mean?
If it is two computers, it would also help to know where these are located. Are they on the same local network? If they are, try Home Sharing (and you have control of both and you aren't just trying to get music fro your computer to your friend's computer in another state). If they are not, you'll have to use an external hard drive or flash drive.
Is this on a PC? Your computer information says Windows but you posted this in the iTunes for Mac forum. -
I opened an itunes account then forgot my password. I opened a new account now I would like to combine my two accounts into one but I still can't remember my password and now I have a new email account. Help!
You can't combine accounts but help here Apple ID FAQ's for resetting your Apple ID password.
-
How do I combine two regents into one in Logic Pro Arrange?
how do I combine two regents into one in Logic Pro Arrange?
Thanks for your input kcstudio. I would still be left with 2 regions although one after the other, on one track.
I am trying to save steps of the way I am combining the info of 2 seperate regions into one: bouncing the 2 tracks then re-importing that audio back into the project. It would save a lot of time if you could just drag one region on top of the other
W.W. -
List aggregate two rows into one
query :
select kod_negeri.NAMA kod_negeri_nama,
hakmilik.id_hakmilik,
MOHON.PENYERAH_NAMA,
MOHON.PENYERAH_ALAMAT1, MOHON.PENYERAH_ALAMAT2, MOHON.PENYERAH_ALAMAT3,
MOHON.PENYERAH_ALAMAT4, MOHON.PENYERAH_POSKOD, MOHON.PENYERAH_KOD_NEGERI,
MOHON.PENYERAH_NO_RUJ, MOHON.ID_MOHON, HAKMILIK.KOD_HAKMILIK, HAKMILIK.NO_HAKMILIK,
KOD_LOT.NAMA, HAKMILIK.NO_LOT, KOD_BPM.NAMA, KOD_DAERAH.NAMA,
LELONG.TMPT, LELONG.DIMASUK, PGUNA.NAMA,
PIHAK.ALAMAT1, pihak.NAMA ven,
PIHAK.ALAMAT2, PIHAK.ALAMAT3, PIHAK.ALAMAT4, PIHAK.POSKOD,
mohon.id_mohon ,
pguna.NAMA pguna_nama,
pguna.JAWATAN,
kod_daerah.NAMA kod_daerah_nama,
to_char(enkuiri.TRH_enkuiri,'DD')||' '|| to_char(enkuiri.TRH_enkuiri,'MONTH','nls_date_language=malay') ||' '||TO_CHAR (enkuiri.TRH_enkuiri, 'YYYY') trh_enkuiri,
to_char(lelong.TRH_lelong,'DD')||' '|| to_char(lelong.trh_lelong,'MONTH','nls_date_language=malay') ||' '||TO_CHAR (lelong.TRH_lelong, 'YYYY') trh_le,
to_char(lelong.trh_lelong, 'Day') day,
to_char(lelong.TRH_lelong,'HH12:MI ') hour,
DECODE(SUBSTR(to_char(lelong.TRH_lelong,'HH12:MI AM'),-2,2),'AM','Petang','pagi') noon,
enkuiri.cara_lelong,
lelong.TMPT,
lelong.HARGA_RIZAB,
enkuiri.harga_rizab,
initcap(pihak.NAMA) pihak_nama,
initcap(lelong.EJA_RIZAB) er,
'RM'||enkuiri.TUNGGAK_AMAUN,
lelong.DEPOSIT,
convert_number_words(lelong.DEPOSIT) as converted_form,
to_char(lelong.TRH_AKHIR_BYR,'DD')||' '|| to_char(lelong.TRH_AKHIR_BYR,'MONTH','nls_date_language=malay') ||' '||TO_CHAR (lelong.TRH_AKHIR_BYR, 'YYYY') TRH_AKHIR_BYR,
to_char(sysdate,'DD') ||' '|| to_char(sysdate,'MONTH','nls_date_language=malay') ||' '||to_char(sysdate,'yyyy') sysd,
kod_bpm.NAMA kod_bpm_nama,
kod_lot.NAMA kod_lot_nama,
hakmilik.NO_LOT,
hakmilik.KOD_HAKMILIK,
hakmilik.NO_HAKMILIK
from
mohon ,
mohon_hakmilik ,
lelong ,
pguna ,
pihak ,
kod_daerah ,
enkuiri ,
kod_bpm ,
hakmilik ,
kod_lot ,
kod_negeri,
mohon_fasa ,
kod_hakmilik
WHERE mohon.id_mohon = mohon_hakmilik.id_mohon and
mohon_hakmilik.id_hakmilik = hakmilik.id_hakmilik and
hakmilik.kod_hakmilik = kod_hakmilik.kod(+) and
hakmilik.kod_lot = kod_lot.kod(+) and
hakmilik.kod_bpm = kod_bpm.kod(+) and
hakmilik.kod_daerah = kod_daerah.kod(+) and
mohon.id_mohon = enkuiri.id_mohon and
lelong.id_pihak = pihak.id_pihak and
lelong.id_mh = mohon_hakmilik.id_mh and
pihak.kod_negeri = kod_negeri.kod(+) and
mohon.id_mohon = mohon_fasa.id_mohon and
mohon_fasa.id_aliran ='semakan' and
mohon_fasa.id_pguna = pguna.id_pguna and
mohon.id_mohon = :p_id_mohon
and enkuiri.KOD_STS='AK'
and mohon.id_mohon ='0405AUC2010007436'KOD_NEGERI_NAMA,ID_HAKMILIK,PENYERAH_NAMA,PENYERAH_ALAMAT1,PENYERAH_ALAMAT2,PENYERAH_ALAMAT3,PENYERAH_ALAMAT4,PENYERAH_POSKOD,PENYERAH_KOD_NEGERI,PENYERAH_NO_RUJ,ID_MOHON,KOD_HAKMILIK,NO_HAKMILIK,NAMA,NO_LOT,NAMA_1,NAMA_2,TMPT,DIMASUK,NAMA_3,ALAMAT1,VEN,ALAMAT2,ALAMAT3,ALAMAT4,POSKOD,ID_MOHON_1,PGUNA_NAMA,JAWATAN,KOD_DAERAH_NAMA,TRH_ENKUIRI,TRH_LE,DAY,HOUR,NOON,CARA_LELONG,TMPT_1,HARGA_RIZAB,HARGA_RIZAB_1,PIHAK_NAMA,ER,'RM'||ENKUIRI.TUNGGAK_AMAUN,DEPOSIT,CONVERTED_FORM,TRH_AKHIR_BYR,SYSD,KOD_BPM_NAMA,KOD_LOT_NAMA,NO_LOT_1,KOD_HAKMILIK_1,NO_HAKMILIK_1
Johor,050503PM00000151,HAMZAH DAUD DAROS & SITI NOR,NO 12 1ST FLOOR & 2ND FLOOR,JLN SRI RAHANG,TMN SRI RAHANG,SEREMBAN,58000,05,12345,0405AUC2010007436,PM,151,Lot,6309,Mukim Lenggeng,Seremban,PTG MELAKA,pptlelong1,Puan Nur Faizati,ASDFSAF,AHMAD,DSFDS,FDSFSDF,DSFSDF,12345,0405AUC2010007436,Puan Nur Faizati,Penolong Pegawai Tanah Lelong (PTD),Seremban,08 DISEMBER 2010,27 JANUARI 2011,Thursday ,02:00 ,pagi,A,PTG MELAKA,,,Ahmad,,RM234,,,24 MEI 2011,10 FEBRUARI 2011,Mukim Lenggeng,Lot,6309,PM,151
,050540HSD00022923,HAMZAH DAUD DAROS & SITI NOR,NO 12 1ST FLOOR & 2ND FLOOR,JLN SRI RAHANG,TMN SRI RAHANG,SEREMBAN,58000,05,12345,0405AUC2010007436,HSD,22923,Lot,0009838,Mukim Jimah,Seremban,PTG MELAKA,pptlelong1,Puan Nur Faizati,no2,Ali Bin Abudillah,jalan 3,taman permata,lorong mentari,32333,0405AUC2010007436,Puan Nur Faizati,Penolong Pegawai Tanah Lelong (PTD),Seremban,08 DISEMBER 2010,27 JANUARI 2011,Thursday ,02:00 ,pagi,A,PTG MELAKA,,,Ali Bin Abudillah,,RM234,,,24 MEI 2011,10 FEBRUARI 2011,Mukim Jimah,Lot,0009838,HSD,22923
KOD_NEGERI_NAMA,ID_HAKMILIK,PENYERAH_NAMA,PENYERAH_ALAMAT1,PENYERAH_ALAMAT2,PENYERAH_ALAMAT3,PENYERAH_ALAMAT4,PENYERAH_POSKOD,PENYERAH_KOD_NEGERI,PENYERAH_NO_RUJ,ID_MOHON,KOD_HAKMILIK,NO_HAKMILIK,NAMA,NO_LOT,NAMA_1,NAMA_2,TMPT,DIMASUK,NAMA_3,ALAMAT1,VEN,ALAMAT2,ALAMAT3,ALAMAT4,POSKOD,ID_MOHON_1,PGUNA_NAMA,JAWATAN,KOD_DAERAH_NAMA,TRH_ENKUIRI,TRH_LE,DAY,HOUR,NOON,CARA_LELONG,TMPT_1,HARGA_RIZAB,HARGA_RIZAB_1,PIHAK_NAMA,ER,'RM'||ENKUIRI.TUNGGAK_AMAUN,DEPOSIT,CONVERTED_FORM,TRH_AKHIR_BYR,SYSD,KOD_BPM_NAMA,KOD_LOT_NAMA,NO_LOT_1,KOD_HAKMILIK_1,NO_HAKMILIK_1
Johor,050503PM00000151,HAMZAH DAUD DAROS & SITI NOR,NO 12 1ST FLOOR & 2ND FLOOR,JLN SRI RAHANG,TMN SRI RAHANG,SEREMBAN,58000,05,12345,0405AUC2010007436,PM and HSD,151 and 22923,Lot,6309,Mukim Lenggeng,Seremban,PTG MELAKA,pptlelong1,Puan Nur Faizati,ASDFSAF,AHMAD,DSFDS,FDSFSDF,DSFSDF,12345,0405AUC2010007436,Puan Nur Faizati,Penolong Pegawai Tanah Lelong (PTD),Seremban,08 DISEMBER 2010,27 JANUARI 2011,Thursday ,02:00 ,pagi,A,PTG MELAKA,,,Ahmad,,RM234,,,24 MEI 2011,10 FEBRUARI 2011,Mukim Lenggeng,Lot,6309,PM,151
that means i need to list aggregate the two rows into one how to make the changes for the above query in order to do so .
Edited by: user9093689 on Feb 9, 2011 10:03 PMuser9093689 wrote:
now need to bother abt this that line converts date into malay language
to_char(enkuiri.TRH_enkuiri,'DD')||' '|| to_char(enkuiri.TRH_enkuiri,'MONTH','nls_date_language=malay') ||' '||TO_CHAR (enkuiri.TRH_enkuiri, 'YYYY') trh_enkuiri,iam retriving two rows of output, wat i need is to display one row and the second row values which are not similar should be added to the first row
for example for column
kod_hakmilik two rows values are
PM
HSD
but they should be display as
PM and HSD
finally my aim is to retrieve only one row as output.
i dont how exactly the term listaggr . how ever it may be whether using groupby or any other but the output should be as aboveWhat version of Oracle are you on?
Look up the LISTAGG() function in the documentation for your version (assuming it is there) and see if it can do what you want -
Combining two messages into one
Hello,
I have a mapping issue, I have a business process in which I have to combine two messages into one.
To do so, I have defined a message mapping in which there are two source message types, and one target message type.
When testing the message mapping in the IR, it works fine, but when I define and test an interface mapping with that same message mapping, I receive this error message:
"Cannot produce target element /ns0:Messages/ns0Message1/MY_IDOC_TYPE/MY_SEGMENT. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd."
What am I doing wrong ?
How am I supposed to combine two messages into one ?
Thanks,
Elad.Hi Elad,
Just see if you have included both you source message interfaces and one target nessage interface correctly in while doing your interface mapping.....
The most common mistake made when we do scenarios which include combination of two source message types into one target type are:
- we forget to include both the source message interfaces.
- or we interchange between one of the source message interface with the target.
Just see if either of the 2 is aplicable in your case and just activate all components as and when you create them..
Regards,
abhy -
Is it possible to paste two images into one layer?
I'm having some issues pasting two images into one layer. Every time I paste the second image, it automatically creates a new layer...is there anyway to prevent that from happening? I'm making an animation on photoshop and I want there to be more than image in some of the frames. Please let me know if you have any suggestions! Thanks!
You can merge the two layers together once they're position. Select the top layer and choose merge down or select both and choose merge layers (from the layers menu).
http://help.adobe.com/en_US/Photoshop/11.0/WSfd1234e1c4b69f30ea53e41001031ab64-78b2a.html -
Collapsing two tables into one table or one queue
When you have data that exists in 2 tables A and B and B is essentially a child of A if you want to process these records such that you see all A's before their assoociated B how can you use either Streams or AQ to collapse these two tables into one? The data exists at it's source in database tables it will be replicated to another location and at that location I want to keep the data as it exists at the source but also process it in the ordered fashion I described above. My thinking is to publish the data to one queue but the challenge is to ensure that all A's are put on the queue before their B is. I don't just want a priority queue whereby all A's are processed before B's because if that happens B's will never be processed. but I simply want to avoid reading a B off the queue before I've read it's A.
No version number and no clarity of what you are trying to accomplish.
Without knowing that the problem is a nail ... I'd hardly be recommending using a hammer. -
Join the two JInternalFrame into one
hi everybody,
What can I do to join two JInternalFrame into one, like I have 2 floating panel then I join it into 1 by using JTappedPane. That you can drag to spit it out or join together !
thanks,
QuinI think you mean saving two images side-by-side into one image. You won't be able to this with a native iphone app, but you may find a third party app on the AppStore to do this. Try this http://itunes.apple.com/us/app/two-faces-photo-sharing/id406310161?mt=8 if you want more help, email me at [email protected]
-
How to Combine two queries into One
Hi Gurus,
SQL> select * from v$version;
BANNER
Oracle Database 10g Release 10.2.0.4.0 - 64bit Production
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
SQL>
I have following two queries. How I can convert these two queries into one with the same result ?
Q1
SELECT id,vdate,vendorname,venddate,vid
FROM VENDOR
WHERE processid=32
AND venddate is null
AND vid in(select vid from view_vid where type='PDX')
AND (id,vdate) not in (select id,vdate from vkfl_is where task_id=55)
AND (id,vdate) in (select id,vidate from market_data where marketed_date is null)
AND id not in (select id from location)
Q2
SELECT id,vdate,vendorname,venddate,vid
FROM VENDOR
WHERE processid=20
AND venddate is null
AND vid in(select vid from view_vid where type='PBX')
AND (id,vdate) not in (select id,vdate from vkfl_is where task_id=40)
AND (id,vdate) in (select id,vidate from market_data where region_date is null)
AND id not in (select id from location)
I can UNION these two queries, but, is there any way I can write a single query with which gives me same result as above two queries?
Any help would be highly appreciated
Thanks in advanceHi,
You can do something like this, which will be more efficient than a UNION:
SELECT id, vdate, vendorname, venddate, vid
FROM vendor
WHERE ( ( -- Conditions that apply only to q1
processid = 32
AND vid IN (SELECT vid FROM view_vid WHERE type = 'PDX')
AND (id,vdate) NOT IN ( SELECT id, vdate
FROM vkfl_is
WHERE task_id = 55
AND (id,vdate) IN ( SELECT id, vidate
FROM market_data
WHERE marketed_date IS NULL
OR ( -- Conditions that apply only to q2
processid = 20
AND vid IN (SELECT vid FROM view_vid WHERE type = 'PBX')
AND (id,vdate) NOT IN ( SELECT id, vdate
FROM vkfl_is
WHERE task_id = 40
AND (id,vdate) IN ( SELECT id, vidate
FROM market_data
WHERE region_date IS NULL
-- The remaining conditions apply to both q1 and q2
AND venddate IS NULL
AND id NOT IN (SELECT id FROM location)
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
Explain, using specific examples, how you get those results from that data.
See the forum FAQ: https://forums.oracle.com/message/9362002 -
Is it possible to merge two cubes into one , if so how ??
Hi
Can u please check how we merge two cubes with 1st with 8 dimension ,
and in other 7 dimensions, both has the same dimension.
but in these cube when they r doing the demand planning, they r doing on different levels.
We have one option of merging the cubes but planning across the two cubes
or
same cube with alternate hierarchy.
what all things i have take in to consider while doing this.
Please reply -
HI,
Would you help me to write aquery such that merges two data into one,
for example,
Take a table Student
Its content are
Roll no Name
1 Rahul
2 Shyam
We reqiure a query such that we get out put as
Rahul;Shyamhttp://www.oracle-base.com/articles/10g/StringAggregationTechniques.php
Maybe you are looking for
-
Mini display port not working?
I am trying to connect my late 2009 iMac to an extenal monitor. Been to store twice now and both adapters are not fitting??? Am I missing something here... Thanks
-
When I double click on the Firefox icon, a box pops up heading Javascript Application and inside is the error message as detailed above. The box offers only one option "OK" and once I click on that the program works well. I access emails online and w
-
Play itunes videos on a Large Second Monitor
Hi Folks, Ultimately, my goal is to have a late model Mac Book Pro, connected to a least a 24 in. secondary monitor or High end Larger tv 32-50 inches or so connected through a HDMI cable. Then I would like to run iTunes - in which the APP will show
-
My c876 router logs the following errors: *Apr 14 10:24:46.943: esw_dtc_ltc4258_reg_write: no acknowlege from POE *Apr 14 10:24:46.943: esw_mrvl_pdc_hardware_config failed on slot 0/0 *Apr 14 10:24:48.451: esw_dtc_ltc4258_reg_write: no acknowlege fro
-
Iphotos-Calendar - can I change to days to Sunday to Monday
When creating iphoto calender can you change the days to Sunday to Saturday Not Monday to sunday