How to pass a String and make it as Color Object
I need to set a background color dynamically...but the value that i pass is in string format. How can i convert the string into Color format so that i can use the method setBackground(Color.blue) method. How to pass the string into the 'Color.blue' ?
Let param="red"
Class cls = Class.forName("java.awt.Color");
java.lang.reflect.Field fld = cls.getDeclaredField(param);
Color clr = (Color)fld.get(null);
You can use this 'clr' variable as you wish.
null
Similar Messages
-
When I try to restore my iPod, it stops restoring at the same place and doesn't work. How do I fix this and make it completely restore itself?
Did you make sure that your security software allows iTunes to contact Apple during the restore process? http://support.apple.com/kb/TS3125
-
How to pass user name and password in openConnection method ?
Hi, Exports,
I am trying to post data from applet to another application which is
protected by network password.
How to pass user name and password when I use openConnection method? In java
doc, this method looks like do not accept these two parameters.
Thanks
----- my code in applet ---------
URL url = new URL("http://127.0.0.1/xml/index.cfm");
URLConnection connection = url.openConnection();
connection.setDoInput(true);
connection.setDoOutput(true);
connection.setUseCaches(false);
connection.setAllowUserInteraction(false);
DataOutputStream dos = new DataOutputStream(connection.getOutputStream());
dos.writeBytes("POST " + path + " HTTP/1.0\r\n");
dos.writeBytes("Referer: http://127.0.0.1/XML/index.cfm\r\n");
dos.writeBytes("Content-Type:
multipart/form-data;boundary=---------------------------7d0b414b04\r\n");
dos.writeBytes("Host: "+host+":"+port+"\r\n");
dos.writeBytes("Content-Length:" + buff.length()+"\r\n");
dos.writeBytes("Connection: Keep-Alive\r\n\n");
dos.writeBytes("-----------------------------7d0b414b04\r\nContent-Dispositi
on: form-data;name=\"xmlDoc\"\r\n\r\n");
dos.writeBytes(buff.toString());
dos.writeBytes("\r\n-----------------------------7d0b414b04--\r\n");
dos.close();
you need to negotiate Authentication in ur applet code...
For example:
If u r using Form based auth u need to send Post a request with j_user_name &
j_password to the action j_security_check. and when server returns back the
cookie
u need to hold it and pass that cookie to the each and every request made to the
protected application.
Basically u need to imitate the browser.
regards
aseem
David wrote:
> Hi, Exports,
>
> I am trying to post data from applet to another application which is
> protected by network password.
> How to pass user name and password when I use openConnection method? In java
> doc, this method looks like do not accept these two parameters.
>
> Thanks
>
> ----- my code in applet ---------
> URL url = new URL("http://127.0.0.1/xml/index.cfm");
> URLConnection connection = url.openConnection();
> connection.setDoInput(true);
> connection.setDoOutput(true);
> connection.setUseCaches(false);
> connection.setAllowUserInteraction(false);
> DataOutputStream dos = new DataOutputStream(connection.getOutputStream());
> dos.writeBytes("POST " + path + " HTTP/1.0\r\n");
> dos.writeBytes("Referer: http://127.0.0.1/XML/index.cfm\r\n");
> dos.writeBytes("Content-Type:
> multipart/form-data;boundary=---------------------------7d0b414b04\r\n");
> dos.writeBytes("Host: "+host+":"+port+"\r\n");
> dos.writeBytes("Content-Length:" + buff.length()+"\r\n");
> dos.writeBytes("Connection: Keep-Alive\r\n\n");
> dos.writeBytes("-----------------------------7d0b414b04\r\nContent-Dispositi
> on: form-data;name=\"xmlDoc\"\r\n\r\n");
> dos.writeBytes(buff.toString());
> dos.writeBytes("\r\n-----------------------------7d0b414b04--\r\n");
> dos.close();
>
> ------------------------------------------
-
How do I remove background and make it transparent?
How do I remove background and make it transparent?
The tutorial below shows you how to remove the background around a figure.
For more simple images, you might try this tutorial, instead:
I hope these help, and please let us know if you have any trouble with the steps! -
How to Break this String and put into a Table
Hi all,
Currently i working on the Reading of Csv file.THe Csv file wil be stored as BLOB in one table.
The Format of the Csv file is
EMPCODE :DATEOFBIRTH
312089 ,12/01/1984
321456 ,03/05/1980
120212 ,04/08/1987
312456 ,23/12/1977
311110 ,12/04/1998
323232 ,20/06/1990
UPLOAD_BLOB
column Datatype
UploadId Number
File_details BLOB
And i reading the BLOB in one procedure and i m getting the String as like this ---->
"312089 ,12/01/1984
321456 ,03/05/1980
120212 ,04/08/1987
312456 ,23/12/1977
311110 ,12/04/1998
323232 ,20/06/1990"
I am Dont know how to Parse this String and put in table
While 1<STRING.LENGTH
LOOP
EMPCODE=SUBSTRING();
DATEOFBIRTH=SUBSTRING();
INSERT INTO TABLE VALID_EMPCODE(EMPCODE,DATEOFBIRTH)VALUES(......);END LOOP
VALID_EMPCODE
EMPCODE VARCHAR2(30)
DATEOFBIRTH VARCHAR2(15)
Can any one tell me how to parse this whole string and break themDuplicate post
How to Break this String and put into a Table -
<blockquote>Locking duplicate thread.<br>
Please continue here: [[/questions/893967]]</blockquote>
The new firefox opens my homepage IN ADDITION to the firefox startup page EVERY TIME I open firefox. How can I stop this and make it so ONLY my homepage shows?See these articles for some suggestions:
* https://support.mozilla.com/kb/Firefox+has+just+updated+tab+shows+each+time+you+start+Firefox
* https://support.mozilla.com/kb/How+to+set+the+home+page - Firefox supports multiple home pages separated by '|' symbols
* http://kb.mozillazine.org/Preferences_not_saved -
How do I rearrange apps and make folders using a Focus 40 braille display
I am using a Focus 40 braille display with an iPad2. What are the commands/how do I rearrange apps and make folders when accessing in this manner? Thanks in advance.
Assuming you sync with iTunes then there will be a backup maintained by iTunes. Just sync the iPhone with iTunes to transfer everything from the backup to the phone.
Also see iPhone- Transferring information from your current iPhone to a new iPhone -
How could i parse string and link its model with my files in eclipse project?
How could i parse string and link its model with my files in eclipse project?, as i read that we dont have to use standalone mode while working with eclipse projects.
Example of what i want to do:
I have file1.dsl in my project which contains some statements but the declaration of these statements are not in another file, i need to put them only in my codeHi Stefan,
I have eclipse project contains 2 files, file1.dsl and file2.dsl, you can see the contents of the files below.
file1.dsl contains some statements as shown below and file2.dsl contains the declarations of the variables. (like in C++ or Java we have declarations and usage)
At this step file1.dsl and file2.dsl will be parsed successfully without any errors.
Lets imagine that we will delete this project and will create another one and the new project will contain only file1.dsl (which contains the usage)
At this step this file (file1.dsl) will contains some errors after parsing it, because we are using variables without declarations.
So what i need is to parse the content of file2.dsl directly without adding this file to the project.
I need to add the content of file2.dsl directly as a string in the code and parse it. just like that ( "int a;int b;" )
And link file1.dsl with the model generated after parsing my string
file1.dsl
a++;
b++;
file2.dsl
int a;
int b;
Thanks -
Hey,
Got a new Iphone, my icloud doesn´t work. How can I delete it and make a new one? The email address is wrong so I can´t varify it.
Can´t download apps, because it´s wrong. What can I do? Please help!Welcome to the Apple Community.
You can delete your account at settings > iCloud, scroll down and tap delete account. You can then enter details of any new account you create.
Note. The purchase of apps are done through an iTunes store account not your iCloud account. If you are having issues downloading apps, it isn't related to your iCloud account. -
How do you import jpegs and make a flip book with CC Id?
How do you import jpegs and make a flip book with CC Id?
You actually don't need to make a flipbook yourself. There are paid and free, ready-to-use flipbooks in Flash or HTML5 available which you just need to configure and then put all images into a specific folder and the flipbook runs them.
-
Mac 10.6.7: I have scanned our clubs logo which is green on a white background. Is there a program on my Mac which will allow me to select the green color and make it any color I wish?
Hi,
Without knowing what is on your Mac it is a little difficult to say.
Photoshop Elements will do it (Use the Magic Wand to select the area then Paint it).
GraphicConvertor comes bundled on some Macs and can do it.
10:29 PM Friday; May 27, 2011
Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
G4/1GhzDual MDD (Leopard 10.5.8)
MacBookPro 2Gb( 10.6.7)
Mac OS X (10.6.7),
"Limit the Logs to the Bits above Binary Images." No, Seriously -
How to pass a string varaible to an internal table field
Hi Experts,
I am reading notes/text entries by calling read_text and then passing them in a variable. I want to display the notes. But even after declaring the variable as LINE2048, it is displaying only 255characters as output length.
My code:
TYPES: BEGIN OF TYP_FINAL,
PARTNER_NO TYPE BU_PARTNER, "Partner No.
OBJECT_ID TYPE CRMT_OBJECT_ID_DB, "Object ID
PROCESS_TYPE TYPE CRMT_PROCESS_TYPE, "Activity Type
ACTUAL_NOTE TYPE LINE2048, "Actual Notes
END OF TYP_FINAL.
data : T_FINAL TYPE STANDARD TABLE OF TYP_FINAL,
WA_FINAL TYPE TYP_FINAL.
data: v_actualnote TYPE LINE2048.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = C_0002
LANGUAGE = sy-langu
NAME = l_name1
OBJECT = C_BUT000
TABLES
LINES = t_line
EXCEPTIONS
ID = 1
LANGUAGE = 2
IF SY-SUBRC = 0.
clear: v_accountnote.
LOOP AT T_LINE INTO WA_LINE.
CONCATENATE v_accountnote wa_line INTO v_accountnote SEPARATED BY space.
clear: wa_line.
ENDLOOP.
wa_final-account_note = v_accountnote.
clear: v_accountnote.
ENDIF.
So, if I make the v_actualnote as string and pass it to a string variable, that should work.
But the system is not allowing me to declare a string varaible inside the internal table.
Please let me know how to display more than 255 characters in v_accountnote .
Regards,
Sangeeta.you are passng that as a string = '5,6' does not exist
try this : http://www.mssqltips.com/sqlservertip/1771/splitting-delimited-strings-using-xml-in-sql-server/
declare @table table(sno int)
insert into @table values(5),(6)
DECLARE @xml as xml,@txtSchedule as varchar(100),@delimiter as varchar(10)
SET @txtSchedule='5,6'
SET @xml = cast(('<X>'+replace(@txtSchedule,',','</X><X>')+'</X>') as xml)
select * from @table WHERE sno IN ( select N.value('.', 'varchar(10)') as value FROM @xml.nodes('X') as T(N))
Hope it Helps!! -
How to pass a string longer than 30 to an Export Parameter in a PI sheet ?
Hi All,
I'm trying to set up a process instruction in a PI sheet that calls a URL web page.
I found the function module CALL_BROWSER and tested it in SE37 and it works fine.
I created a process instruction to call this function module and pass parameters to it.
Everything works if the URL is short. For example:
0010 PPPI_BUTTON_TEXT Show URL
0020 PPPI_FUNCTION_NAME CALL_BROWSER
0030 PPPI_FUNCTION_DURING_DISPLAY allowed
0040 PPPI_EXPORT_PARAMETER URL
0075 PPPI_STRING_CONSTANT http://www.google.com
This is where I ran into a roadblock.
The characteristic PPPI_STRING_CONSTANT is only 30 characters long.
I can't figure out how to pass an export parameter longer than 30 characters.
I have also tried loading up multiple PPPI_VARIABLE(s) with the idea of some how combining them into a single long string that I can pass, but no luck figuring out how.
Any help would be greatly appreciated
Kind Regards
MichaelThanks Dario, this is good information, but it does not directly solve my problem.
I think I have figured out an approach, but was hopeing someone else had a standard solution.
If I don't here something soon, I will try the following:
Create a new function moduel as a shell or wrapper that calls the standard FM RUN_Browser.
My shell will have 5 input parameters URLP1 thru URLP5.
I can then pass a long URL to my shell in 5 parts.
Inside my shell, the 5 parts will be joined up into 1 long string and passed on to the URL parameter in RUN_Browser.
If anyone has a better idea, please let me know.
Kind Regards
Mike Rupp -
How do pass the UserID and Password in the SOAP header for web services
I am encountering issues trying to pass the userid and password in the SOAP header when consuming a 3rd party web service. Rostewitz posted something similiar but I don't know how to type iv_xml. Any help would be greatly appreciated.
Thank you,
jpinaIt helps to post a link to a thread when you refer to it. If you are trying to implement that solution though, you can look at the parameter of the corresponding method being called. The parameter has type 'SIMPLE' which means that it is compatible with all of the predefined elementary ABAP types. In this case, you should use 'STRING'.
-
ISQL*PLUS dynamic reports - how to pass connect string in the URL
When we run dynamic reports thru ISQL*PLUS, does anyone know how
to pass the connect string info in the URL
The following is the code from ISQL*PLUS users guide but it
dosen't show how to pass the connect string
when I tried to pass hr/your_secret_password@dbserver for userid
I got an error msg
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<HTML>
<HEAD>
<TITLE>iSQL*Plus Dynamic Report</TITLE>
</HEAD>
<BODY>
<H1>iSQL*Plus Report</H1>
<H2>Query by Employee ID</H2>
<FORM METHOD=get ACTION="http://host.domain/isqlplus">
<INPUT TYPE="hidden" NAME="userid"
VALUE="hr/your_secret_password">
<INPUT TYPE="hidden" NAME="script"
VALUE="http://host.domain/employee_id.sql">
Enter employee identification number: <INPUT TYPE="text"
NAME="eid" SIZE="10">
<INPUT TYPE="submit" VALUE="Run Report">
</FORM>
</BODY>
</HTML>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks
JayThe form you use should work when your change
"hr/your_secret_password" to a valid username, password
and connect identifier like "hr/hr@MYDB". Don't forget to
configure MYDB in your tnsnames.ora file on the machine that has
the iSQL*Plus server.
What was the error you got?
The full URL syntax did seem to go missing from the 9.0.1 doc.
See below for the full syntax. This should be appearing in a
forthcoming FAQ.
- CJ
What syntax can I use to run an iSQL*Plus Dynamic Report?
You can run a dynamic report by entering the report URI in the
location field of your browser, or by making the report server a
link or the action for an HTML form. The iSQL*Plus 9i Release 1
documentation has examples of these.
The general syntax for running a dynamic report is:
{uri}?[userid=logon&]script=location[¶m...]
where uri
Represents the Uniform Resource Identifier (URI)
of the iSQL*Plus Server, for example:
http://host.domain/isqlplus
where logon
Represents the log in to the database to which you
want to connect:
{username[/password][@connect_identifier]}
where location
Represents the URI of the script you want to run.
The syntax is:
http://[host.domain/script_name]
The host serving the script does not have to be
the same as the machine running the iSQL*Plus server.
where param
Specifies the named parameters for the script you
want to run.
Named parameters consist of varname=value pairs.
iSQL*Plus will define the variable varname to equal value prior
to executing the script e.g.
...script=http://server/s1.sql&var1=hello&var2=world
This is equivalent to the SQL*Plus commands:
SQL> define var1=hello
SQL> define var2=world
SQL> @http://server/s1.sql
iSQL*Plus, SQL*Plus and SQL keywords are reserved
and must not be used as the variable names (varname). Note also,
that since variables are delimited by the ampersand character,
there is no requirement to enclose space delimited values with
quotes. However, to embed the ampersand character itself in the
value, it will be necessary to use quotes.
For compatibility with older scripts using the &1
variable syntax, varname may be replaced with the equivalent
variable position as in:
...script=http://server/s1.sql&1=hello&2=world
Note the & is the URL parameter separator and not
related to the script's substitution variable syntax.
Commands and script parameters may be given in any
order in the dynamic report URI. However, please note that if any
parameters begin with reserved keywords such as "script" or
"userid" then it may be interpreted as a command rather than a
literal parameter.
Maybe you are looking for
-
SOLVED: It seems that my monitor shows no green screen when it is ready. Instead it shows the last image rendered. In my case it was this color stripes. Also, I upgraded to kernel 3.2.1-2, and using the include module udlfb and xf86-video-fbdev from
-
Please, I'm begging of fellow man, women and children to help me figure this out! What Happened: I had my Internet and everything working before I went to work at 3 PM. My girlfriend got home around 4 PM and all of a sudden the my Internet w
-
Hi, I have an old Pavilion that I'm "restoring". There's no audio. The audio properties page shows the audio slider grayed out. Device Manager is happy...the thing just won't make a sound. I've removed the Realtek AC'97 driver and reinstalled the o
-
I know how to apply changes to child pages of "a" Template after updating that Template. However, when I make changes to multiple Templates of my site, is there a way to apply those changes to child pages of all those (updated/modified) Templates at
-
Creating placeholders on supporting document tab
When writing specifications, we have several documents that are required to be uploaded to the supporting documents tab. Is there a way to create a "placeholder" for the supporting docs and save it without having to upload the actual document?