[IDCS2 Win]How to Convert a PMString to uchar?
Hi <br /><br />I have got the Swatch Names in PMString as below: <br /><br />PMString swatchName= Utils<ISwatchUtils>()->GetSwatchName(db, uid); <br />CAlert::InformationAlert(swatchName.GrabCString()); <br /><br />Now i have to write this in a txt file.I found that i have to use <br />"IPMStream" to do this.I tried using the function below: <br /><br />virtual int32 XferByte (uchar *buf, int32 num)=0 <br /><br />The problem is the Swatch name's are in "PMString" but i have to pass <br />"uchar" in XferByte as the first parameter. Plz tell "How to Convert PMString to uchar"? <br />Any Code Snippets Plz. <br /><br />Thanks in advance
If you want to read/write a PMString then it could be done this way:
MyPMString.ReadWrite(stream);
If you really need a C string then you can grab one doing something like this:
MyPMString.GrabCString();
All this is documented in SDK I think.
Best regards
Patrick Perroud
Similar Messages
-
IDCS2, WIN: How to export a document to SVG file?
I did not find any code snippet, Do you know how to do it?
Thanks.I write some code about it, but <br /> InterfacePtr<IOutputPages> piOutputPages(pExportCmd, UseDefaultIID());<br />get a null pointer, Do you guys know what is the problem?<br /><br />Thanks in advance.<br /><br />ErrorCode ExportToSVG(const UIDRef& docRef, const PMString& filePath)<br />{<br /> ErrorCode status = kFailure;<br /> do {<br /> InterfacePtr<IDocument> piDoc(docRef, UseDefaultIID());<br /> if(!piDoc) <br /> {<br /> ASSERT(piDoc);<br /> break;<br /> }<br /> <br /> // Get a pointer to the document database<br /> IDataBase *piDataBase = ::GetDataBase(piDoc);<br /><br /> // Create a PDF Export Command<br /> InterfacePtr<ICommand> pExportCmd(CmdUtils::CreateCommand(kSVGExportCommandBoss));<br /><br /> // outputFile is the file to which the PDF will be exported - You have to set its value<br />#ifdef DEBUG<br /> const char* p = filePath.GrabCString();<br />#endif<br /> IDFile outputFile(filePath);<br /> CreateFolderIfNeeded(filePath);<br /><br /> // Specify the output file<br /> InterfacePtr<ISysFileData> piFileData(pExportCmd, UseDefaultIID());<br /> piFileData->Set(outputFile);<br /><br /> // Get the pages to be exported and set them on the command's output pages interface<br /> InterfacePtr<IPageList> piPageList(piDoc, UseDefaultIID());<br /> int32 nPages = piPageList->GetPageCount();<br /> UIDList pageUIDList(piDataBase);<br /> for(int32 i=0; i<nPages; i++)<br /> {<br /> UID uidPage = piPageList->GetNthPageUID(i);<br /> pageUIDList.Append(uidPage);<br /> }<br /> // fixme, got a null piOutputPages<br /> InterfacePtr<IOutputPages> piOutputPages(pExportCmd, UseDefaultIID());<br /> piOutputPages->InitializeFrom(pageUIDList, kFalse);<br /><br /> // Process the command<br /> status = CmdUtils::ProcessCommand(pExportCmd);<br /><br /> } while(0);<br /><br /> return status;<br />}
-
IDCS2 Win: How to iterate all items in a group item?
I want to access each item in a page group item, How to do that? Any guide or code snippet will help. Thanks in advance.
Haikunyou can use InterfacePtr<IHierarchy> hier(group, UseDefaultIID()); <br /><br />and then hier->GetChildCount() & hier->GetChildUID(n) or hier->QueryChild(n) to visit all its direct children. Hier->GetDescendents gets a list of all items in the group (including items in a group that are in the group).<br /><br />Ian
-
[IDCS2 Win]How to get Interface for ISwatchesUIDData?
Hi All,
Please tell me how to get the Interface for ISwatchesUIDData.
Also please tell how to make use of GetItemList() method.
I need to get a count of all swatches that are selected in the Swatches Pallette.
Is this the Correct class &method that i have to use for my requirement?
Help needed very urgent.
Thanks
myRiazHi Jaepil,<br /><br />Thanks a lot for your tremedous help!<br /><br />Im right now trying out [Option B]that you have suggested.<br />Please have a look at the code snippet that i have tried out.<br />When i compile this snippet i get my plugin Built but when i open the Indesign & run my plugin i get the following error"Indesign.exe has encountered a proble and needs to close" & Indesign Quits Suddenly.<br />Some where im going wrong,but dont know where.Plz help me out.<br />Here is the code:<br /><br />InterfacePtr<IApplication> app(gSession->QueryApplication());<br />InterfacePtr<IPaletteMgr> paletteMgr(app->QueryPaletteManager());<br />InterfacePtr<IPanelMgr> panelMgr(paletteMgr, UseDefaultIID());<br />InterfacePtr<IControlView>swatchPanelView(panelMgr->GetVisiblePanel(kSwatchesPanelWidge tID ));<br /> <br />InterfacePtr<ISwatchesUIDData> SwatchUID<br />(swatchPanelView,IID_ISWATCHESUIDLIST); //Here i got an error that IID_ISWATCHESUIDLIST is not declared.So i declared it myself as PMIID IID_ISWATCHESUIDLIST; is this correct?(Problem in this line only i guess!!!)<br /> <br />const UIDList &select=SwatchUID->GetItemList(); <br />sprintf(buf,"%d",select.Length());<br />CAlert::WarningAlert(buf);<br /><br />Plz tell where am i going wrong .WAITING 4 UR REPLY.<br /><br />Thanks<br />myRiaz
-
How to convert from bool to PMString Using InDesign SDK
Hi,
Do anyone know how to convert a datatype of boolean to PMString in indesign SDK.
with thanks,
SheelaI asked for the convertion of datatype. For eg: bool to String
I rectified my problem in converting an integer to String using SDK. -
How to convert files into pdf forms? (claiming winning forms)?
How to convert into forms into pdf files?
Please refer : http://www.adobe.com/content/dam/Adobe/en/products/acrobat/pdfs/adobe-acrobat-xi-convert-f orms-into-fillable-pdf-tutorial_ue.pdf
-
How to convert FLV and F4V files to other media formats
How to convert FLV and F4V files to other media formats
Nowadays, every one can download their favorite videos from video sharing websites like YouTube, Hulu, MySpace, Google Video, metacafe, Yahoo! Video, Reuters.com and so on at will. However, these video files we got are usually in the format of FLV, or F4V, which are not workable by most portable devices, or some video players and video editors on our PC. With the intention of solving these problems, this guide will show you how to convert FLV and F4V files to other video and audio formats in detail.
1. Download, install and run Pavtube FLV Converter
As soon as you run this program, the following wine red interface will show up:
2. Add files, set output format and destination folder
Input FLV and F4V files to this program by clicking on “Add” button, and select a format as the output format in the drop-down list of “Format”, meanwhile, you can press the output folder to specify the destination folder or just use the path set by default. Moreover, “merge into one file” enables you to combine multiple FLV and F4V files to be as a single file, if you have this needs, just tick it.
3. Set advanced settings
Click “Settings” button, the following interface will pop up. You can change the parameters like screen size, bit rate, frame rate, sample rate, etc. on it to optimize the output quality or compress file size.
4. Convert
After all settings are done, you can press “Convert” button to start transferring, and then the following window will show you the conversion info in detail. According to the info you can manage your time and disk space properly.
Pavtube FLV Converter can definitely complete the conversion at a swift speed with excellent quality; also it adopts an advanced audio-video sync technology, so that audio and video match very well in the resulted files. Therefore you need not worry about these issues.
Useful tips:
Free online FLV downloader:
www.convertdirect.com
http://vixy.net/
http://www.videoconverterdownload.com/online-free-flv-converter.html
http://www.flv2mp3.com/
http://www.mediaconverter.org/
http://2conv.com/
http://online.movavi.com/
http://www.youconvertit.com/
http://www.playtube.com/
http://www.convert.net/Flip4Mac
-
Hi!
I have this problem, that I don't know how to convert my recorded Wave into FLAC format. Is there any way I can do it easily?
Solved!
Go to Solution.I'm trying to use the System Exec, but i get a quite annoying error:
C:\Programs is not recognized as an internal or external command, operable program or batch file.
While I try to use command:
C:\Users\xxxxx\Documents\LabView Projects\flac.exe -f abc.wav
I also got this VorbisEnc.dll for FLAC encoding, but I have no idea how to use the .NET connectivity tools to use it (or maybe else - I don't know what arguments should I pass to the dll to get the conversion). Anyone has some experience with stuff like this?
http://speedy.sh/2ywwY/VorbisEnc.dll
The flac.exe was downloaded from here:
http://sourceforge.net/projects/flac/files/flac-win/flac-1.2.1-win/
Thank You for help in advance! -
How to convert from integer to string
import javax.swing.*;
import java.awt.*;
public class Hw extends JFrame{
JButton[] buttons = new JButton[26];
public Hw(){
getContentPane().setLayout(new GridLayout(2,13));
JButton []buttons=new JButton[26];
for(int i=65; i<90;i++)
buttons=new JButton(i+" ");
getContentPane().add(buttons[i]);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
pack();
public static void main(String[] args) {
Hw win = new Hw();
win.setVisible(true);
win.setLocation(50, 100);
I have 26 buttons and each buttons will contain a character like A,B,C,D,...
but i dont know how to convert it from integer to stringimport javax.swing.*;
import java.awt.*;
public class Hw extends JFrame{
JButton[] buttons = new JButton[26];
public Hw(){
getContentPane().setLayout(new GridLayout(2,13));
JButton []buttons=new JButton[26];
for(int i=0; i<buttons.length;i++)
buttons=new JButton(""+('A'+i));
getContentPane().add(buttons[i]);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
pack();
public static void main(String[] args) {
Hw win = new Hw();
win.setVisible(true);
win.setTitle("Hangman Game");
tjacobs01 , thnx for urgent reply, but i didnt apply your algorithm inside of the my program, if its possible can u compile the program with your codes..
its a little complex for me i didnt understand anythind :S -
How to Convert your DVD to any format at your will...
Long time ago, I hope I could take part in some classes to strengthen my health and my good figure. But due to my special job as a salesman, I don't have enough time to do that. So I bought one DVD of yoga, I hope I could do that through watching DVD. So I put DVD into my computer to be ready to practice, unfortunately all my players can't read them. I feel so upset. I tried to look for nearly all the ways I knew to deal with it, but nothing had happened. One of my friends introduce AiseesoftDVD Riper to me. I tried it, yes, it works. Now I could play yoga anytime and anywhere when I am free. It is benifit both for my health and my figure, I love this feelings. Now I hope I could help you through my experiences.
This guide aims to show you how to convert DVD to different video format both for windows/mac users.
Part 1: How to Convert DVD on Windows with AiseesoftBest DVD Ripper
Step 1: Load DVD
Put your DVD to your DVD Drive and click "Load DVD" button to add your DVD
Step 2: Choose Profile
Choose your output video profile from a drop-down list.
Step 3: Start Conversion win
Part 2: How to Convert DVD on Mac with AiseesoftDVD Ripper for Mac
Step 1: Load DVD
Click the "Load DVD" button, find the DVD folder of the movie you want to add from your DVD-ROM, and Click "Open".
Step 2: Choose output profile and settings
Selecting output format is really easy, you can chose your output format according to your devices players and the default setting works great.
For a veteran of digital player, you could customize your own settings by clicking "Settings" button to chose your own video resolution, frame rate, bit rate, encoder, etc.
Step 3: Start Conversion
What amazing softwares! I hope it is helped for all of you.Hi,
source structure---------------------->target structure
x--------------------------------------->y
sample------------------------------->root1
a(1)------------------------------------->attribute1
b(2)------------------------------------->attribute2
c(3)------------------------------------->attribute3
sample1(123)------------------------->element1
a(1)-------------------------------->attribute1.1
b(2)-------------------------------->attribute1.2
c(3)-------------------------------->attribute1.3
Everything specified under target are elements. -
Hi all, I am new in java card development.
This is my environment setting:
@echo off
set JC_HOME=C:\JavaCard\java_card_kit-2_2
set JAVA_HOME=C:\j2sdk14103
set PATH=.;%JC_HOME%\bin;%PATH%
I have created the Wallet applet according to 'Zhiqun Chen" text book and named it WalletApp.java.
I have compiled this file to a class file.
This is where is I saved my file
C:\JavaCard\java_card_kit-2_2\samples\src\com\sun\javacard\samples\WalletApp\WalletApp.java.
But I don't really understand how to convert the class file.
May I know what is this for?
-out EXP JCA CAP
-exportpath
-applet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1:0x1
com.sun.javacard.samples.HelloWorld.HelloWorld
com.sun.javacard.samples.HelloWorld
0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1 1.0
must save this in what file?
I tried to type in the command line below (and the result):
C:\JavaCard\java_card_kit-2_2\samples>converter -config scr\com\sun\javacard\sap
les\Wallet\Wallet.opt
error: file scr\com\sun\javacard\saples\Wallet\Wallet.opt could not be found
Usage: converter <options> package_name package_aid major_version.minor_ver
sion
OR
converter -config <filename>
use file for all options and parameters to converter
Where options include:
-classdir <the root directory of the class hierarchy>
set the root directory where the Converter
will look for classes
-i support the 32-bit integer type
-exportpath <list of directories>
list the root directories where the Converter
will look for export files
-exportmap use the token mapping from the pre-defined export
file of the package being converted. The converter
will look for the export file in the exportpath
-applet <AID class_name>
set the applet AID and the class that defines the
install method for the applet
-d <the root directory for output>
-out [CAP] [EXP] [JCA]
tell the Converter to output the CAP file,
and/or the JCA file, and/or the export file
-V, -version print the Converter version string
-v, -verbose enable verbose output
-help print out this message
-nowarn instruct the Converter to not report warning messages
-mask indicate this package is for mask, so restrictions on
native methods are relaxed
-debug enable generation of debugging information
-nobanner suppress all standard output messages
-noverify turn off verification. Verification is default
*********************************************************May I know What is the correct command line to convert the class file and what must I do to before converting the class file?
I saw some article saying we must use JDK1.3, is it a must?
Your solution is highly appreciated.
Thank you!Hi Ricardo,
I saved the file below as WalletApp.opt in the directory of scr\com\sun\javacard\samples\WalletApp
-out EXP JCA CAP
-exportpath c:\javacard\java_card_kit-2_2\api_export_files
-applet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x2:0x1 WalletApp.WalletApp
WalletApp 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x2 1.0
But I still have the problem below:
C:\JavaCard\java_card_kit-2_2\samples>converter -config scr\com\sun\javacard\sam
ples\WalletApp\WalletApp.opt
error: file scr\com\sun\javacard\samples\WalletApp\WalletApp.opt could not be fo
und
Usage: converter <options> package_name package_aid major_version.minor_ver
sion
OR
converter -config <filename>
May I know What's wrong with my command or file?
Where can I download JDK because what I can find is J2SDK.
Thank you! -
How to convert string to 16 characters.
My external unique id is too long, more then 30 characters.
How to convert it to 30 characters using sql?You should find another extranal system id in order to mantain uniqueness, but you could also use the name field (that supports 50 characters), but it deppends of which entity you are using.
Which is the entity? and...if the only way to insert data is by web services the you could use more than one field to verify uniqueness since you can query more than one field at the time.
Hope it helps
Kim. -
How to convert Web app into a channel?
To whom it may concern,
Does anyone know how to convert a Web app into a channel inside the Portal server 6.0?
I developed the web app and tried to create a provider and a channel for it, but the Portal server did not recognize the WEB-INF folder and give me errors saying that it couldn't locate the class files.
I also have a problem with URL inside my jsp page (channel).
For example, I have two jsp pages:
/etc/opt/SUNWps/desktop/default/MyCustomProvider/test1.jsp
/etc/opt/SUNWps/desktop/default/MyCustomProvider/test2.jsp
and when I try to put a link from test1.jsp to test2.jsp using
... and make a channel based on test1.jsp. The channel will display the link as "http://mydomain/portal/test2.jsp" and result in "Error: page not found". I want the link to point to
/etc/opt/SUNWps/desktop/default/MyCustomProvider/test2.jsp
To summarize my questions,
1) Where should the web app be located in the Portal server?
2) How to make a link inside one jsp page (channel) to point to another page inside the same folder?
Thank you in advanceHello Karthik,
I just tried to solve my problem with your suggestions, unfortunately, my JSP channel still doesn't work :(
The portal server keeps reporting "Server Error..." when I tried to add query at the end of the href.
Do you still have any other suggestions?
Thank you -
Video Format Total Solution: How to Convert and Edit Video on Windows/Mac
More and More video formats are coming out with different video encoders and it makes our spare time more and more colorful. However, it is not to say that there is no problems. Actually, different video formats make it difficult to share video with others, even your own camcorder and iPod. Is there an easy way to convert videos effectively. Yes, there is.
In this article, I will show you guys how to convert videos on windows and mac.
Part 1. How to Convert and Edit Videos on Windows
For Windows users, you need a Video Converter(http://www.aiseesoft.com/total-video-converter.html) to do that for you.
Here I use Aiseesoft Total Video Converter(http://www.aiseesoft.com/total-video-converter.html)
Step 1: Download and install Aiseesoft Total Video Converter
After you download it to your computer, double click it and it is really easy to install.
You just need to click “next” and it will complete it in seconds. It will automatically run after installation.
http://www.aiseesoft.com/images/guide/total-video-converter/screen.jpg
Step 2: Load Video
Click “Add File” to find the video that you want to convert and click “open”. It will be loaded automatically.
Step 3: Select the target to decode
In the “Profile” drop download list you can find your target according the usage of your output video, such as if you want to put the video on your iPod touch, you can select the “iPod” in the first list and “iPod touch 2 MPEG-4 640*480(*.mp4)” in the second list.
Step 4: Set Advanced Parameters
After you select the right output profile, you can click “setting” button to set your advanced parameters. You can adjust video and audio settings separately. In video section, you can change “video encoder”, “resolution”, “frame rate”, “video bitrate”In audio section, you can change “audio encoder”, “sample rate”, “channel”, “audio bitrate”If you want to save this profile and settings and use it next time you can click “save as” button to give a name to it. And the next time you want to use it you can find it in the profile list named “user defined”.
Step 5: Choose a Destination
To browse and find a output folder for your output files or just the default one.
Finally, Click “Convert” button to begin your conversion, here in the converting
interface you can choose “shut down the computer when conversion complete” or “open output folder when conversion complete” or you just do not choose neither one.
Tips: How to Edit the Output Video
This video converter is also a video editor, you can use it to edit your output video as follows:
http://www.aiseesoft.com/images/guide/total-video-converter/effect.jpg
1. Effect:
You are allowed to adjust the “Brightness”, “Contrast”, “Saturation” and you can choose the “deinterlacing” to make the video more enjoyable.
2. Trim:
In “Trim” section you can pick up any part of the video to convert.
There are two ways to select the part of the video you want. One is set the start and end time in the box. The other one is to drag the start and end button in the processing bar.
3. Crop:
This function allows you to choose a certain play area to convert. That means you can choose a part of the screen you like to convert. For example, you just like the tv in the middle of the screen, then you can drag the frame around the preview window to select the tv and the output preview will show you the output video.In this section you can also choose the “zoom mode”, such as “keep original”, “full screen”, “16:9”, “4:3”.
4. Watermark
In the section, you can add a watermark on the output video to show people something, such as your name, website, studio name or other things. The watermark could be words and picture. You can adjust the transparent of the watermark easily to make it more beautiful.
Part 2. How to Convert Video on Mac
This time you need a Video Converter for Mac(http://www.aiseesoft.com/video-converter-for-mac.html)
Step 1: Add File
Click “Add File” button to load the video you want to converter
http://www.aiseesoft.com/images/guide/mac-video-converter/steps.jpg
Step 2: Choose profile and adjust settings
You can find your output video format from a drop-list called “Profile”You can also adjust the specific settings of the output video, such as “Resolution”, “Bitrate”, “Encoder” and so on.@ Tamwini
Your only goal is to sell software.
‡Thank you for hitting the Blue/Green Star button‡
N8-00 RM 596 V:111.030.0609; E71-1(05) RM 346 V: 500.21.009 -
How to convert data from a report in PDF which are specified on multiple lines ?
It often occurs that in a report one detail entry is folded onto two subsequent lines.
e.g.
No.
Container Lt Ht Tp F/E Dam Weight Temp Bi Im First Seal No. Cell Booking ref.
In Arr id A Tml PoL PD PoD C T L R F B
1 XXXU123456-7 20 ST I F 24.000 SLX11 1 25A CVA12345
How does the conversion to Excel is going to handle this ?
I need the second line of data in my excel sheet.
YES 9/10 14:15 BEANR REFCTHello Jay,
Don't use SSIS to convert. Use SSIS to FTP the files out.
How you convert to PDF: the format is owned by Adobe so there might be royalties involved, but there are paid and free (OSS) libraries to doing so. Just search online.
Arthur
MyBlog
Twitter
Maybe you are looking for
-
I am trying to set up a different itunes account from my kids so I don't have to share contacts, calendar, etc. but I still want to maintain access to all the music I have purchased. Is this possible?
-
ClassNotFound in case of class from jar in lib folder
Hello, I get an application that I have to deploy on Weblogic AS. It is big ear with couple of wars inside. Let's say it is bigApp.ear. It is deployed and state is Active. When go to browser and try to run an application I get an error. In logs I fou
-
Camera Raw Camera Calibration Tab and 5D Mark III
I don't think that many people do this in camera raw, but it was kind of an important step in my workflow with the Canon 7D before and is just not working the same way with the 5D Mark III now. In the Camera Calibration Tab (Third from the right side
-
I want to do an SQL query which uses a parameter. This is the query: Find the books which contains the string "strTitle". I do this (it does not work): String strSQL="SELECT * FROM Books WHERE Title LIKE %'"+strTitle+"'% "; I know it is not correct,
-
HOW TO INSTALL A HP STORAGEWORKS 1/8 G2 TAPE AUTOLOADER ULTRIUM 920.
I HAVE A SUN FIRE V250 MACHINE WITH SOLARIS 8 AND I JUST BOUGHT A HP STORAGEWORKS 1/8 TAPE AUTOLOADER ULTRIUM 920 DEVICE (SCSI). THE SUN FIRE V250 HAS A QLOGIC: QLQ10162, I INSTALLED THE CARD DRIVER AND THE OPERATING SYSTEM CAN SEE THE TAPE DEVICE CO