How to create PNG file from byte array of RGB value?
Hi
Here is my problem.
I have drawn some sketchs (through code in runtime) on canvas. I have grabbed the RGB information for the drwan image and converted to byte array.
I have to pass this byte array to server and generate a png file and save.
Please help.
{color:#ff0000}Cross posted{color}
http://forum.java.sun.com/thread.jspa?threadID=5218093
{color:#000080}Cross posting is rude.
db{color}
Similar Messages
-
How to create xml file from Oracle and sending the same xml file to an url
How to create xml file from Oracle and sending the same xml file to an url
SQL/XML (XMLElement, XMLForest, XMLAgg, etc) and UTL_HTTP.
Whether that works for you with the version of Oracle you have, your requirements, and needs is another story. A little detail goes a long way. -
How to create dll file from c code to use in compactrio 9004 RT controller
Hi.
I am using Compactrio 9004 Real time controller and i am new to this. I have a C code and i want to use this with the RT controller.I red that that can be done by creating a dll file and can be called in labview.Can any body expalin how to create a DLL from the c code and be used with this RT controlelr?
Regards,
Vishnuvishnu123 wrote:
Hi,
Earlier in this forum itself in cRIO 900x controllers will run Pharlap and run C/C++ code compiled into .dll files.Can you please tell how to transfer the created DLL to RT controller memory throght FTP?
Thanks and regards,
Vishnu
There is another KB article about this for Pharlap based controllers. And you are right the earlier CompactRIO controllers were Pharlap based. Basically for a deployed application to work, you need to put the DLL through FTP in "/ni-rt/system". If you deploy it directly from the project everything will be loaded into memory through the project environment itself including directly dependable DLLs, (but of course won't survive a power cycle).
I hope you are aware that while Windows DLLs can work on Pharlap OS they by no means will do so always. The Pharlap OS has not a fully featured Windows API. Also you need to be careful which version of Visual C you are going to use depending on the Pharlap OS version, since the VC runtime DLLs already present on the controller will need to be the same as the ones your Visual C environment likes to link in. Recent Pharlap OS versions use the msvcr71.dll. It's very possible that those runtime libraries can't just simply be copied from a normal Windows installation but might have been recompiled by NI specifically for their controller targets.
So to avoid problems it's a good idea to make sure your DLL uses the same runtime library DLL or make your DLL to include the static MS runtime.
Rolf Kalbermatter
Message Edited by rolfk on 02-05-2008 09:51 AM
Message Edited by rolfk on 02-05-2008 09:53 AM
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
How to create xml file from original
I have this complicated xml and I want to search through it and make a new xml with only element I find that match. what is the best way to do this? the file
is about 6mb and I want to read the whole file easily..should i load to database table and create a file from table? I have found issues reading the file..
- <ArrayOfJobClass xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <JobClass>
- <Triggers>
- <TriggerClass>
<ExpireActionType>Delete</ExpireActionType>
<ExpireType>DateTime</ExpireType>
<TriggerType>TimeType</TriggerType>
- <TTime>
<TimeTriggerType>Custom</TimeTriggerType>
<IntervalType>Daily</IntervalType>
<SpecificType>Days</SpecificType>
<FirstLastType>First</FirstLastType>
<IntervalValue>1</IntervalValue>
<FirstLastWeekDay>Monday</FirstLastWeekDay>
<InitDate>2009-05-04T14:17:05.40625-07:00</InitDate>
- <IntervalDays>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>You can load it in the database in an XMLType table (Object-Relational or Binary XML storage), use XQuery on the XML content and then write back the result to a file.
Or, you might just use an external processor (XSLT or XQuery).
If you want to stay in the Oracle world, you can use :
- For XSLT : $ORACLE_HOME/bin/oraxsl (it's a wrapper for the java XSLT engine)
- For XQuery : the java XQuery API
Personally, I sometimes use the Saxon XSLT and XQuery processor, quite efficient.
Here's a simplistic example with oraxsl utility :
emp.xml
<?xml version="1.0" encoding="UTF-8"?>
<emps>
<emp id="7369">
<name>SMITH</name>
<job>CLERK</job>
<salary>800</salary>
</emp>
<emp id="7499">
<name>ALLEN</name>
<job>SALESMAN</job>
<salary>1600</salary>
</emp>
<emp id="7521">
<name>WARD</name>
<job>SALESMAN</job>
<salary>1250</salary>
</emp>
<emp id="7566">
<name>JONES</name>
<job>MANAGER</job>
<salary>2975</salary>
</emp>
<emp id="7654">
<name>MARTIN</name>
<job>SALESMAN</job>
<salary>1250</salary>
</emp>
</emps>
emp.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"/>
<xsl:template match="text()"/>
<xsl:template match="emps/emp[job='SALESMAN']">
<xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet>Applying the transformation to search and extract all "salesmen" :
D:\ORACLE\test>%ORACLE_HOME%\bin\oraxsl emp.xml emp.xsl result.xml
D:\ORACLE\test>type result.xml
<?xml version = '1.0' encoding = 'UTF-8'?>
<emp id="7499">
<name>ALLEN</name>
<job>SALESMAN</job>
<salary>1600</salary>
</emp><emp id="7521">
<name>WARD</name>
<job>SALESMAN</job>
<salary>1250</salary>
</emp><emp id="7654">
<name>MARTIN</name>
<job>SALESMAN</job>
<salary>1250</salary>
</emp> -
HOW TO CREATE PDF FILES FROM AUTOCAD 12
I'M USING ACROBAT X TO CREATE PDF FILES FROM AUTOCAD 12 DRAWINGS. THE PROGRAM RANDOMLY LEAVES OUT TEXT AND IMAGES. IT ALSO STRUGGLES WITH TIFF, JPEG AND PDF IMAGE FILES EMBEDDED WITHIN THE AUTOCAD DRAWING. THIS HAS BEEN AN ONGOING PROBLEM WITH ACROBAT. I WAS HOPING THE UPGRADE TO X WOULD ELIMINATE THE PROBLEM BUT IT HAS NOT.
Hi Joao,
Verify these links hope it may helps...
http://www.devx.com/xml/Article/16430/1954
http://technopaper.blogspot.com/2008/06/using-xsl-fo-to-create-pdf-files.html
http://www.ibm.com/developerworks/xml/library/x-xslfo/
http://www.antennahouse.com/XSLsample/XSLsample.htm
Regards,
Anil. -
How to create xml file from relational tables in 10gR2
Hi,
I am very new to XML and was wondering how to create an XML file from querying relational tables. Some child tables may contain multiple rows that need to be returned in certain instances. Other queries will just be single or multiple rows from one or more tables. I would like to use the latest feathers in 10gR2. Thanks for any help you can provide.
Thanks,
LeeHere is the first row of data created from our person table - it used the column names as the tag names:
<?xml version="1.0"?>
<ROWSET>
<ROW>
<MP_ID_SEQ>289</MP_ID_SEQ>
<MP_NAME>LOBERG,JUDITH LEE</MP_NAME>
<MP_SEX>F</MP_SEX>
<MP_RACE>I</MP_RACE>
<MP_DOB>19500709</MP_DOB>
<MP_HT>504</MP_HT>
<MP_WT>170</MP_WT>
<MP_EYE_CLR>BLU</MP_EYE_CLR>
<MP_HAIR_CLR>BRO</MP_HAIR_CLR>
<MP_SKN>RUD</MP_SKN>
<MP_SMT>POCKMARKS</MP_SMT>
<MP_SOC>517607968</MP_SOC>
<MP_OLN>517607968</MP_OLN>
<MP_OLS>MT</MP_OLS>
<MP_OLY>2007</MP_OLY>
<MP_CAUT_MED>70</MP_CAUT_MED>
<MP_VISION_SCRIPT>C0RRECTIVE LENSES</MP_VISION_SCRIPT>
<MP_DNA_AVAIL>N</MP_DNA_AVAIL>
<CREATED_BY>MMPS</CREATED_BY>
<DTM_CREATED>31-AUG-06</DTM_CREATED>
<MI_INC_ID_SEQ>288</MI_INC_ID_SEQ>
<MP_ALERT>N</MP_ALERT>
</ROW> -
How to create PDF file from MX7600 scanner in Windows 8.1
I just changed to a new desktop PC that is running Windows 8.1. I downloaded the drivers from the Canon website for Windows 8.1, and I can not find the function to create a PDF file of the scanned document, like I could in Windows 7. How can I created a PDF file in the new driver software?
Solved!
Go to Solution.Hi alove5230,
Ini addition to the drivers, you will need to download the MP Navigator software for the printer to create PDF files. Please click here to go to the Drivers and Software page for the PIXMA MX7600. Once on the initial download page for your printer, please do the following:
1. Verify that the operating system detected in the "OPERATING SYSTEM" drop-down menu is correct, and if it is not, please click the drop-down menu to select your operating system.
2. Next, please click on the red arrow next to the "SOFTWARE" section and click on the MP NAVIGATOR file. When you do, a red DOWNLOAD button will appear. Please click on the checkbox below the DOWNLOAD button, then click the red DOWNLOAD button to begin the download. The time for the download process may vary depending on the speed of your Internet connection and the size of the file being downloaded.
Once the file is downloaded, please double-click on it to install the program on your computer.
Hope this helps!
This didn't answer your question or issue? Please call or email us at one of the methods on the Contact Us page for further assistance.
Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well. -
How to create jar files from my code?
Hi, I�m a rookie programmer and i need to create jar files in my application code. Which classes do i need to use?
Can anybody give me an example?
Thanx in advanceThanx Uwe. You�re right, i�m only trying to create jar
files (and extract files from a jar file) I will try
what you told me. Anyway, I have some doubts about how
to use those classes.Can you give me any example?
Thanx again!To create jar files use the class JarOutputStream.
Add a ZipEntry for each entry in the jar file.
To read jar files use the class JarInputStream and get all JarEntry.
It should be straight forward.
Uwe -
How to create MUSE file from existing MUSE site?
Hi-
A customer has a site that was created with MUSE and she wants some edits made to it.
I have installed MUSE and can access the server via FTP. I've downloaded the site's html files and assets, but these are useless in MUSE.
How do I create or get the whole site's MUSE file from the server so I can make the edits and put back on her server?
Thanks for any guidance here.Hello,
You would need the .muse file (source file of website). And you can get it only from the person who created it.
It must b saved on their local machine. This file is not uploaded on the server via FTP. And you cannot use the .html and other output files as the changes need to be made in that .muse file.
Regards,
Sachin -
Make sound file from byte array?
Ok say I have a program that gets a byte array from a sound file and then randomly removes some of the samples from the array, so that instead of having a value the bytes are just zeroes. I then want to play my new byte array. Here is the code I try to use but when I use it nothing happens.
AudioFormat = ((AudioInputStream) AudioSystem.getAudioInputStream(**The Original Sound File**)).getFormat();
int numBytesRead = 0;
DataLine.Info dataLineInfo = new DataLine.Info(SourceDataLine.class, audioFormat);
SourceDataLine sourceDataLineTemp = (SourceDataLine)AudioSystem.getLine(dataLineInfo);
sourceDataLineTemp.write(audioArray, 0, audioArray.length);(Try..catch removed for clarity.)
Also, is it possible to convert a byte array to a .wav sound file?Im pretty sure if you just write that byte array to disk and open it as a wav file that will do the trick, because thats all a wav file is anyways, a stream of bytes representing audio
-
How to create/delete files from filesystem using PL/SQL ? UTL_FILE?
Greetings,
I will start by explaining what i intend to do.
I have an application made in APEX. This application will have among other purposes the managment of pdf files which will reside in the filesystem.
I have questioned the person in charge to keep the pdf files in the database and not in the filesystem but without success.
So the pdf files reside in the filesystem and there is a record in a database table about them. A table keeps all info about the pdf, their location , size and name, creation date etc.
The APEX application will have a mecanism to allow the deletion of the pdf files if an administrator decides.
So it should be possible for an administrator to schedule the deletion of all pdf files whoe creation date is older than 2008 for example
So, how can i achieve that?
After some research i foudn about the UTL_FILE package which seems to have it takes to perform the task in issue.
My idea was to have a script in the operating system which runs nightly and reads a file containing all file names of the pdf to be erased.
The file which contains the names of the pdfs to be erased will be generated by the database a few minutes before.
If there are no pds files to be erased than the file containing the names will simply be empty
Are there any other viable solutions out there?
And as for opening/creating the file withn the pdf names, i use:
UTL_FILE.FOPEN (
location IN VARCHAR2,
filename IN VARCHAR2,
open_mode IN VARCHAR2,
max_linesize IN BINARY_INTEGER)
RETURN file_type;
And as for writing lines (a pdf name per line ), i use;
UTL_FILE.PUT_LINE (
file IN FILE_TYPE,
buffer IN VARCHAR2,
autoflush IN BOOLEAN DEFAULT FALSE);
is there a better solution?
thanks all.
-> My Homepage <-
Edited by: Igor Carrasco on Apr 14, 2009 3:11 PM
Edited by: Igor Carrasco on Apr 14, 2009 3:12 PMGreetings,
I have read that link above, some questions still though.
I will provide some more information.
-First the database is in a windows server.
The windows server has a virtual drive mounted as z:\ <-- this points to a directory in virtual machine, i can manually access/create/delete files manually,i tested.
-Second utl_file_dir is defined as * , in t that enough to cover mounted drives? ( i can't change the init.ora and reboot the db right now :( gotta wait.. )
Do i explicitly have to define utfl_file_dir = z: ?
-Third haven't had the chance to test it on linux or any other operating system, assuming a virtual unit is mounted successfully and that the issues above are solved i should be able to operate on any mounted drive whatever the os, right?
Best regards -
How to create PDF files from word with non-selectable content
Hi folks,
I am creating a PDF from a newsletter in Word (using print to Adobe PDF).
I have checked the options available in the printer, but there are none that seem to allow this.
I want to prevent the recipent from being able to click on obvious graphic objects e.g. signatures, within the newsletter and copy them to clipboard. I appreciate you can do this still with a screen capture, but I want to make it difficult.
Is this possible?
TIAThat looks like it should work, but it doesn't.
I opened the PDF I had created from Word in Acrobat (X Pro). Went to File > Properties. Selected "Change Settings". I then enabled "Restrict editing...", set a password, set "Printing Allowed" to "none", "Changes Allowed" to "none", and ensured that "Enable copying of text..." was disabled.
I saved the PDF file, closed Acrobat, opened the PDF in Reader, and I was still able to select text and graphical objects.
I reopened the PDF in Acrobat, and the document summart still shows everything as allowed. When I click on "show details" (from File > Properties) it shows the correct settings.
Any ideas? -
How to create UTL file from on Unix server
Hi,
I have created a stored procedure in Oracle (8.0.6) which will create a flat file using UTL_File. The oracle server is running on unix system.
When I am executing the PL/SQL procedure from Unix's Sql Plus, it is creating the file properly. When I try to execute the same from a windows client using SQL Plus / PLSQL Developer, It is not creating the file.
Any input is worh.
also, pls find below the code I am using.
P_Dir = ' /apps/ullcis/dev/data'
P_File = 'test.log'
dbms_output.put_line('In Create Log File ');
l_file_handle := UTL_FILE.FOPEN(P_Dir,P_File, 'w');
dbms_output.put_line('Opened in Write');
UTL_FILE.PUT_LINE (l_file_handle,'sample text');
UTL_File.fflush(l_file_handle);
UTL_FILE.FCLOSE (l_file_handle);
Regards
SamI'm writing to unix file path not onto the windows client.And i have permission in that unix direcotry to create a file.The above code does well if invoked from sql prompt of unix but it does not create file, if i invoke from sqlplus in windows client. Any help ...?
Thanks -
How to create .csv file from ABAP report
Hi
We have a requirement to generate .csv file from abap report.
Currently user saves data from abap report to spreadsheet(.xls format) in desktop. Then opens excel file and save as .csv format. Need option to save directly in .csv format instead of .xls format.
Please let me know, if there is any standard function module available to create .csv file.
Regards
UmaI tried with your code it's going to dump
REPORT ZTEMP101 message-id 00.
tables: lfa1.
types: begin of t_lfa1,
lifnr like lfa1-lifnr,
name1 like lfa1-name1,
end of t_lfa1.
data: i_lfa1 type standard table of t_lfa1,
wa_lfa1 type t_lfa1.
types truxs_t_text_data(4096) type c occurs 0.
data: csv_converted_table type table of TRUXS_T_TEXT_DATA.
select-options: s_lifnr for lfa1-lifnr.
select lifnr name1 from lfa1 into table i_lfa1
where lifnr in s_lifnr.
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
I_FIELD_SEPERATOR = ';'
I_LINE_HEADER =
I_FILENAME =
I_APPL_KEEP = ' '
TABLES
I_TAB_SAP_DATA = I_LFA1
CHANGING
I_TAB_CONVERTED_DATA = csv_converted_table
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = ' '
CODEPAGE = ' '
FILENAME =
'C:\Documents and Settings\ps12\Desktop\Test folder\exl.cvs'
FILETYPE = 'DAT'
MODE = ' '
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
COL_SELECT = ' '
COL_SELECTMASK = ' '
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = csv_converted_table
FIELDNAMES =
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
my version is 4.6c -
How to Create PDF files from XSL-Fo
Hi all,
I have in my KM content many XML files, and I want to export the content to PDF.
Hi have the XSLT file, but some one could help me how to integrate this with FOP?
Thank youHi Joao,
Verify these links hope it may helps...
http://www.devx.com/xml/Article/16430/1954
http://technopaper.blogspot.com/2008/06/using-xsl-fo-to-create-pdf-files.html
http://www.ibm.com/developerworks/xml/library/x-xslfo/
http://www.antennahouse.com/XSLsample/XSLsample.htm
Regards,
Anil.
Maybe you are looking for
-
My Iphone 5C won't sync for the backup since I did the last software update to my phone. It fails in step 3 of the sync. The error message says it can't find SyncUILorelocalized.dll
-
Network Home Folders - Sometimes
Is there a way to have network home folders sometimes? Here is the situation. (all servers and clients are at 10.3.9, but could be upgraded to 10.4.x) In a school there is a 29 unit eMac lab and an iBook cart. The students each have a home folder on
-
Can anyone explain the mechanism of data transfer from r3 to bw?
Hi all the bw expert, i have one question on the mechanism of data transfer from r3 to bi 7.0. the followings is my concerns: scenario: The total numer of data is 1000 rows and these rows are seperated into 10 data package , each package contains 100
-
How to migrate Mac Pro to MacBook Pro?
After cloning my Mac Pro Boot Camp XP2 to my MacBook Pro via Netrestore I realized I'm not sure how to deal with the hardware differences. XP boots fine on the MacBook Pro but has no trackpad, and no USB mouse support. I tried to reinstall "Boot camp
-
Hi all, I have SAPquery in which i need to use one varible in header and footer text so as get that variable value in output dynamically. can we write any varibels other than &%NAME &%DATE &%TIME &%PAGE in header and footer . please give me