Convert from list to string
hi All;
i've got a list which is come from pdf bookmark
List mylist = SimpleBookmark.getBookmark(reader);now i want to know the length of the list
so i need to convert it to string..
how can i convert from list to string...
anybody can help me?
Thx after all
hi cotton m, yea i am new to java..
so i'm posting on the "NEW TO JAVA" forum
my problem is, i just need to assure what i'm doing is correct
i've finish my project anyway..
cotton.m
u never been in my position?when u are still learning the language, ure not good at it..
and try to get help from any body that WILLING to help you?
u are pro's @ java meh?that's good.. u should help people with your knowledge
not insult them..
no flame...
Similar Messages
-
Hi, may i know how to convert from int to String??
For instance, i've>>
int i = 0;
i++;
String temp = i.toString();
[Need to convert the int to String here. Am i doing the convertion correctly?? Pls correct me. Thanks!]Hi, may i know how to convert from int to String??
For instance, i've>>
int i = 0;
i++;
String temp = i.toString();
[Need to convert the int to String here. Am i doing
the convertion correctly?? Pls correct me. Thanks!]String temp = "" + i; -
How to convert from military time (string) to regular time?
How to convert from military time (string) to regular time?
First of all I need to let you know I'm very new to Crystal Reports, so I apologize and will need detailed instructions if possible.
I have created a Crystal Report pulling information from the received time field. On the report, the time is showing in military time (ex. 16:00:00).
How can I convert this time to normal time (ex. 4:00:00)
Since the field is a 'String' field and not a 'Time' field, I do not have the option of changing it under the field properties.
I hope someone can help with this.
Thank you in advance.As my fields were date only and not datetime, I ended up using the following,
If IsDate({CallLog.EmailRecdDate}) Then
CDate({CallLog.EmailRecdDate})
Else
CDate(0,0,0)
You answer lead me in the right direction.
I'm still having an issue with the 'Else' statment returning 12:00:00 because of the CDate(0,0,0), but I'm not sure what else I can use to return a blank space on the report. Any ideas?
Thanks again! -
Hi iam new to java can u tell me how to convert from hashmap to string
how to convert from hashmap to string
Hi,
This is not pure Java forum. Its more on JDBC and data connectivity to Orcle db from Java API.
This link may answer your question:
http://stackoverflow.com/questions/960807/hashmapkey-string-value-arraylist-returns-an-object-instead-of-arraylist
Twinkle -
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 -
my question is: How to transform a list of characters of values of time that have format HH:MMS to a list or adjustment of numerical values, to be able to use them in a code of LabVIEW?
The numeric data are going to be used to plot them in a graph XY and to manipulate them.If it's 24-hour format than a Scan From String function with %d:%d:%d as the format string will give you hours, minutes, seconds as numerics. You could then convert to seconds as shown in the attachment.
Attachments:
time_string_to_seconds.jpg 9 KB -
How to get value from list of string
Hi All,
I have list of values (11,16,18) I need to get 16 i.e mid value . This string can go long .. How Will I do this . Is ther any function in Oracle 10g which supports this .
Any assistance will help
Thanks in advance .
SachinOr...
SQL> ed
Wrote file afiedt.buf
1 With T
2 AS
3 (SELECT '11,16,18,50,60,70' str FROM DUAL UNION ALL
4 SELECT '11,16,18,50,60,70,90,40,30' str FROM DUAL UNION ALL
5 SELECT '11,16,18' str FROM DUAL
6 )
7 --
8 select regexp_substr(str, '[^,]+', 1, lvl)
9 from t, (select level lvl from dual connect by rownum <= (select max(length(regexp_replace(str,'[^,]')))+1 from t))
10 where regexp_substr(str, '[^,]+', 1, lvl) is not null
11* order by t.str, lvl
SQL> /
REGEXP_SUBSTR(STR,'[^,]+',
11
16
18
11
16
18
50
60
70
11
16
18
50
60
70
90
40
30
18 rows selected.
SQL>(assumes there are no empty values in the strings) -
Conversion failed when converting from a character string to uniqueidentifier
how to convert the charter string to uniqueidentifier in sql server
I tried for all the articals in the net can some one give me the better soluction for this.. i will use the cast and convert function but i didnt get the soluction over here.
can you please give me the answer for this query........
i have table called user1 contains column col1,
col1
d65cafc-1435-45d3-acce-dc464f02c4b1The first part is to short, it must be 8 signs, you have only 7; I added a zero and it works =>
DECLARE @id varchar(60);
SET @id = 'd65cafc0-1435-45d3-acce-dc464f02c4b1'
SELECT CONVERT(uniqueidentifier, @id)
Olaf Helper
[ Blog] [ Xing] [ MVP] -
How to convert from int to string
Can anyone help me on how to convert int to string?
Thanks,
Qint i = 3
String S = i + ""
i will be promoted to String automatically when the above expression is evaluated -
Hi,
How can I convert from an int to char?The challange is to convert from int to String without using any API or automatic conversionWoah, what a challenge ! Why ?
Anyway, what about a recursive call and switch statement. Something likepublic String intToString(int n) {
if(n<0) {
return "-"+intToString(-n);
if(n<10) {
return getStringDigit(n);
else {
return intToString(n/10) + getStringDigit(n%10);
private String getStringDigit(int n) {
switch(n) {
case 0:
return "0";
// etc.
} -
Calling a Web Service in a SSRS Report - Error Converting String to Generic List of Strings
Hello,
I am using SSRS version 2005 and am trying to call a web service to retrieve data for a SSRS report. I've looked on Google and MSDN for the past 2 days and have exhausted all options. Here are the details...
The web service method I am calling accepts 4 parameters...
Parameter 1 = Generic list of strings
Parameter 2 = DateTime
Parameter 3 = Int
Parameter 4 = Int
I have created a function (on the CODE tab in report properties) in my report that gets passed a comma delimited string and returns a Generic List of Strings that I use to format Parameter 1. The code for the function is as follows:
Public Function GetIDs(ByVal IDList as String) As List(Of String)
Dim stringArray() = IDList.Split(",")
Dim genericList As New List(Of String)(stringArray)
Return genericList
End Function
I am passing a string to the function that looks something like this:
"1,2,3,4"
When I try to PREVIEW the report, I get an error that reads:
"There is an error on line 0 of custom code: [BC30002] Type 'List' is not defined"
I've tried changing the function declaration to pass back a string array:
Public Function GetIDs(ByVal IDList as String) As String()
Return IDList.Split(","c)
End Function
This returned the error (from the web service):
"Error in line 5 position 22. Expecting state 'Element'.. Encountered 'Text' with name ", namespace"
I have also tried changing the function declaration to pass back an array:
Public Function GetIDs(ByVal IDList as String) As ARRAY
This also produced the error:
"Error in line 5 position 22. Expecting state 'Element'.. Encountered 'Text' with name ", namespace"
I know that this particular web service method DOES work because it is coded to accept nulls in the first parameter. So... when I call the method with nulls, it returns a recordset of ALL data (this works fine). Only when I pass a string to the function (which "filters" the recordset by the ID list), does the error occur.
Is SRSS limited with respect to VB.NET code so that the List(Of String) statement is not recognized? Has anyone done this before and if so, how did you convert a comma delimited string to a Generic List of Strings within a function in the SSRS report?
Any info would be greatly appreciated.
Thanks!
BobHi Bob,
By default, in custom code, in order to use a variable or function that is not in the "System" namespace, we need to provide the full name.
In this case, the full name of the "List" is "System.Collections.Generic.List"
So, to solve the issue, please use the following code:
Public Function GetIDs(ByVal IDList as String) As System.Collections.Generic.List(Of String)
Dim stringArray() = IDList.Split(",")
Dim genericList As New System.Collections.Generic.List(Of String)(stringArray)
Return genericList
End Function
If you have any more questions, please feel free to ask.
Thanks,
Jin Chen
Jin Chen - MSFT -
Need to convert Date from calendar to String in the format dd-mom-yyyy
Need to convert Date from calendar to String in the format dd-mom-yyyy+..
This is absolutely necessary... any help plz..
Rgds
ArwinderLook up the SimpleDateFormat class: http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
Arwinder wrote:
This is absolutely necessary... any help plz..For you maybe, not others. Please refrain from trying to urge others to answer your queries. They'll do it at their own pace ( if at all ).
People on the forum help others voluntarily, it's not their job.
Help them help you.
Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
(Yes I know it's on JavaRanch but I think it applies everywhere)
---------------------------------------------------------------- -
Hi all,
Greetings for the day
I am created a new CSS in Robohelp 9. I have also created a new template in Word 2010. The style sets for different information elements like (Heading, bullets, body text, ) are more or less same between the CSS and the new templates. I am also able to map the .css styles to Word template when I am converting from RH to Word as I am getting the necessary option in the drop-down list.
However, when the output is generated, the bullet, the numbered list and the body text is not converting at all. The body text works sometimes. However, the numbered list and bullet list is coming out as images.
If anybody knows the solution, I can share the .css and Word template.
Thanks in advance.
Regards,
Parag DebCreate a new project with two or three topics containing lists of both types. Generate a printed output that shows the problem. Then zip it up and send it to me. See the Contact page on my site for instructions.
See www.grainge.org for RoboHelp and Authoring tips
@petergrainge -
Move data from multiple Tables to a Single Table & Convert the list to ALV.
Hi,
My aim is to get the list of Materials with their descriptions, with MRP Controller, with Unrestriced Qty. & the Reorder Qty. So, I have to fetch the data from different tables. But finally I am not able to copy or move the fetched data from multiple tables into the single final table.
Also tell me how to convert this list into ALV.
Below is the program code.
*& Report Y_REORDER_REPORT
REPORT Y_REORDER_REPORT.
tables : marc,makt, mard.
DATA: Begin of i_final occurs 0,
matnr type marc-matnr,
maktx type makt-maktx,
DISPO type marc-DISPO,
MINBE type marc-MINBE,
LABST type mard-LABST,
end of i_final.
DATA: Begin of i_marc occurs 0,
matnr type marc-matnr,
DISPO type marc-DISPO,
MINBE type marc-MINBE,
end of i_marc.
DATA: Begin of i_makt occurs 0,
matnr type makt-matnr,
maktx type makt-maktx,
end of i_makt.
DATA: Begin of i_mard occurs 0,
matnr type mard-matnr,
LABST type mard-LABST,
LGORT TYPE MARD-LGORT,
end of i_mard.
SELECT matnr
dispo
minbe from marc
into corresponding fields of table i_marc
where dispo EQ 'STR'.
SORT I_MARC by MATNR.
WRITE: /10 'Material',
75 'MRP',
80 'Reorder Qty.'.
LOOP at i_marc.
Write: /10 i_marc-matnr,
75 i_marc-dispo,
80 i_marc-minbe.
ENDLOOP.
write: /.
SELECT matnr
MAKTX from makt
into corresponding fields of table i_makt
for all entries in i_marc
where matnr = i_marc-matnr.
LOOP at i_makt.
Write: /10 i_makt-matnr,
30 i_makt-maktx.
ENDLOOP.
SELECT matnr
LGORT
LABST from mard
into corresponding fields of table i_mard
for all entries in i_marc
where matnr = i_marc-matnr.
LOOP at i_mard.
Write: /10 i_mard-matnr,
30 I_MARD-LGORT,
40 i_mard-labst.
ENDLOOP.
move i_mard-matnr to i_final-matnr.
move i_marc-dispo to i_final-dispo.
move i_marc-minbe to i_final-minbe.
move i_makt-maktx to i_final-maktx.
move i_mard-labst to i_final-labst.
WRITE: /10 'Material',
30 'Material Desc.',
75 'MRP',
80 'Reorder Qty.',
105 'Current Stock'.
LOOP at i_final.
Write: /10 i_final-matnr,
30 i_final-maktx,
75 i_final-dispo,
80 i_final-minbe,
105 i_final-labst.
ENDLOOP.
*LOOP at i_mard.
*Write: /10 i_mard-matnr,
30 i_makt-maktx,
75 i_marc-dispo,
80 i_marc-minbe,
105 i_mard-labst.
*ENDLOOP.
Regards,
VishalChange like this,
SELECT matnr
lgort
labst FROM mard
INTO CORRESPONDING FIELDS OF TABLE i_mard
FOR ALL ENTRIES IN i_marc
WHERE matnr = i_marc-matnr.
LOOP AT i_mard.
WRITE: /10 i_mard-matnr,
30 i_mard-lgort,
40 i_mard-labst.
ENDLOOP.
LOOP AT i_marc.
READ TABLE i_mard WITH KEY matnr = i_marc-matnr.
READ TABLE i_makt WITH KEY matnr = i_marc-matnr.
MOVE i_mard-matnr TO i_final-matnr.
MOVE i_marc-dispo TO i_final-dispo.
MOVE i_marc-minbe TO i_final-minbe.
MOVE i_makt-maktx TO i_final-maktx.
MOVE i_mard-labst TO i_final-labst.
APPEND i_final.
ENDLOOP.
WRITE: /10 'Material',
30 'Material Desc.',
75 'MRP',
80 'Reorder Qty.',
105 'Current Stock'. -
CRADSDatabase ERROR (5211): There is an error converting Unicode string to or from code page string
Device Blackberry Z10
Sw release 10.2.1.2977
OS Version 10.2.1.3247
The problem is known by Blackberry but they didn't make a little effort to solve this problem and they wonder why nobody buy Blackberry. I come from Android platform and I regret buying Blackberry: call problems(I sent it to service because the people that I was talking with couldn't hear me), jack problems (the headphones does not work; I will send it again to service). This synchronisation problem is "the drop that fills the glass". Please don't buy Blackberry any more.
http://btsc.webapps.blackberry.com/btsc/viewdocument.do?noCount=true&externalId=KB33098&sliceId=2&di...This is a Windows registry issue, if you search the Web using these keywords:
"how to fix craddatabase error 5211" you will find a registry editor that syas it can fix this issue.
Maybe you are looking for
-
Windows 8 compatibility and WAAS Mobile.
Hi, everyone, I have undertaken the possibly mad quest of getting WAAS Mobile working on Windows 8. I am currently receiving the error "TDI driver failed to initialize." Does anyone have any insight into that issue? Thanks, Tom
-
How to get better browsing on iMac G3
Hi everybody, I bought a fantastic iMac Bondi Blue. It's a perfect machine, and it seems to work perfectly. The only problems are that Ethernet connection is slow, even with DSL (there's a sort of "lag" of a couple of seconds for every page), and the
-
Can there be two control file auto file backups one to disk and one to tape ? Thanks,
-
What is the reason for query take more time to execute
Hi, What is the reason for the query take more time inside procedure. but if i execute that query alone then it excute within a minutes. query includes update and insert.
-
Ftp get results in zero bytes payload and no exception every now and then
hi *, i just wanted to ask if some of you have also seen the problem that every now and then a file retrieved by retrieveFile via batchftp otd results in zero bytes instead of its original file size without any exceptions. it happens every 2-3 weeks