Seperate elements

I have a file containing chemical compounds. E.G
Ag Silver
Al Aluminium
Au Gold
C Carbon
Ca Calcium
Cl Chlorine
Cu Copper
Co Cobalt
I want to write a program which will seperate user input into individual chemical element, which can then in turn be compared to chemical data in the file.
User input puts an compound they want to test, then my program searches the file for this compound. If found,it should print it out the elements in that compound including it's english name.
I.E
Cl contains the elements "c" and "l" name= Chlorine
I am able to read the file but do nothing else.
import java.io.*;
public class FileIODemo2
public static void main(String[]args)
String line; // will be used to read line at a time
try
File inFile = new File("Chemical Data.dat"); //create file object linked to actual file
FileReader reader = new FileReader(inFile); //create input stream
BufferedReader buff = new BufferedReader(reader);
line = buff.readLine();     //read 1st line
     while(line!=null);                    //null returned when no more to be read
System.out.println(line);
line = buff.readLine(); //get next
catch(IOException e)
System.out.println("Error has occured:" +e);
I'm quite new to java programming, help would be much appreciated.

Use property-files, you will have to adjust your file a little for this.
Instead of:
Ag Silver
Al Aluminium
it should be:
Ag=Silver
Al=Aluminium
Next you read this file into a Properties-object:Properties props = new Properties ();
props.load (new FileInputStream ("Chemical Data.dat"));Then you can use this to retrieve items like this:String element = props.getProperty("Al");
//==> element = Aluminiumgreetz,
Stijn

Similar Messages

  • Write seperate elements to each individual channel tdms

    Hi
    I have MC which is pumping data from five sensors , each sensor outputs a high bit and low bit. I have created a VI that reads in the data and converts the string to an unsigned byte array. My problem is that I am having trouble adding each individual element of the array in to its own channel in a TDMS file . Currently all data is being written to the same channel.

    Hi,
    Attached the modified vi snippet.
    I normally write data to tdms files using for loops
    Let us know if it helps.

  • Grouping elements on a slide

    I am using Captivate v4.
    Is it possible to select different elements placed onto a slide and create a "group" - as is possible in PowerPoint ?
    For example - I have created an magnified view of an area visible on the slide itself. I have placed around the magnified view a highlight box and lines that direct the user to the location of the smaller item on the main image on the slide. In total I have 5 elements that make up my "magnified" view and it would be good to turn the whole magnified view into a group so their timings etc could be done just once, not for each seperate element that make up the magnified view.
    Here's hoping.....
    Noel

    Sorry.  This is not something that Captivate can do as yet.
    You'll be happy to know that others feel as you do that this would be a useful addition to the feature set.
    Feel free to log and enhancement request for it.

  • Segment has no subnode of type element/composite/technical node

    Hi all,
    I have created a DME tree format. but not able to activate it because has following errors:
    1). Node HEADER A: segment has no subnode of type element/composite/technical node
    Message no. DMEE_ABA338
    the node HEADER A is of kind Segment. and i dont want to create any seperate element/composite/technical node under it.
    it has 5 segments already in below level, and those segments has elements.
    How to correct this error.
    Thanks,
    Vidya

    Hi Vidya
    What is the solution that you got
    Regards
    Sangarsh

  • How to insert brackets into an XML element value?

    If I have a <file> </file> element in an XML file and I want to insert a filename of the form PED<yyMMdd>232, how do I insert the < and > brackets as an element value inside the <file> tag?
    I use JCreator to edit the xml file and it treats <yyMMdd> as a seperate element instead of being part of the filename.
    Edited by: Weng on Mar 27, 2008 10:06 AM

    You have to escape those characters, like this:
    PED&lt;yyMMdd&gt;232

  • How to retrive more than one row value from table

    hi,
      I had create one table if i entered value in more than one row, the second row override the first row value and while printing it in flat file i am getting the second value entered twice.
      i created one context for each column.
        plz provide me a solution..........
           very urgent..........
            Regards,
            Kiruthika

    Hi,
    Create seperate element for each row and then set values.
    for(int i=0;i<4;i++)
    IPrivate<view name>.I<node name>Element element = wdContext.node<node name>().create<node name>Element();
    wdContext.node<node name>().addElement(element);
    element.set<Att>();
    to retrive:
    int s=wdContext.node<node name>.size();
    for(int j=0;j<s;J++){
    wdcontext.node<nodename>.getnodeelementAt(j).getAttribute();
    Check this link about tables
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/bad3e990-0201-0010-3985-fa0936d901b4
    Regards,
    Vijayakhanna Raman

  • My feedback thread

    I started working on my personal portfolio website today with Reflow, so this thread is dedicated to everything that I find unintuitive in Reflow or feature requests I would like to see implemented.
    Font Aliasing is really bad.
    I miss a zoom tool!
    Shortcuts to change leading, tracking, etc. just like in InDesign would be much appreciated!
    Being able to scale elements by dragging with the selection tool would be nice - maybe use a dedicated scale tool.
    Re-Arranging the DOM in the inspector would be great. Currently there is no way to re-arrange it?
    Elements align differently if you have images embedded. I tried positioning menu buttons with a pixel margin-left. But with images included they had the marging always aligned relative to the image(s) - why? This made the menu scale totally wrong on a rescale of the viewport, because some of the menu button margins are aligned relative to some image, that doesn't relate to the menu at all.
    Ability to choose all fonts on your system.
    Ability to choose all fonts from Typekit (you are allowed to use with your Adobe account).
    Select multiple elements and change their units from % to px or any other unit. Currently you have to select each element seperately - takes a lot of time just for four elements.
    Guidelines and Smart Guides.
    Dragging with shift should lock horizontally and vertically.
    Enable copy & paste.
    Automatically switch to styling (Tab) when selecting text (not the box itself). Obviously I want to edit text properties when I select it.
    Selecting multiple elements and dragging them only moves one element. Should drag all of them. Only workaround at the moment is by grouping them together.
    Grouping has no visual indicator that elements are grouped.
    Double-click on a group to get the seperate elements like in InDesign would be nice.
    In the media query bar show the exact pixel width. You can't be 100% sure if you are at 950 or 952 or 951. Also, a numerical input field would be appreciated. I know you can drag around the corresponding media query, but you have to be very precise to match the right width.
    Ctrl drag over a input to use a slider, just like in Photoshop. Changing values takes too much time for fast design prototyping.
    Ability to insert media query dependent line breaks. That is very important, because Reflow is intended to design the responsive web. Although not everyone takes the effort for every project to assign different line breaks for every media query, some do for very important projects - like in my case the portfolio, which just has very few text, which is why optimization with line breaks is possible.
    Match height/width always takes the biggest width. It should take either the first selected one's, the last selected one's, or an active one like in Illustrator.
    The ability to scale elements proportionally would be nice. For example, I have a row of four navigation buttons. As soon as I reach a too small media query I want to scale them proportionally. I assign a percent width so they scale to fit as much as possible, but their height stays the same. Having an option to scale the height in proportion would be nice. I know you can almost 100% simulate this with paddings on your text and setting your outer element to height:auto; but it's not a 100% match of proportional scaling.
    Scaling with the alt key should scale around the center point.

    Thank you very much for your feedback. Will comment inline.
    Font Aliasing is really bad. We leverage Chrome itself for the application design surface so all fonts should identical to Chrome on your desktop.
    I miss a zoom tool!  Bottom right corner (canvas zoom) not sufficient?
    Shortcuts to change leading, tracking, etc. just like in InDesign would be much appreciated! (Backlog item pending).
    Being able to scale elements by dragging with the selection tool would be nice - maybe use a dedicated scale tool.  (Will consider the idea thanks.).
    Re-Arranging the DOM in the inspector would be great. Currently there is no way to re-arrange it? (Backlog item pending but for in-flow items dragging will re-order dom siblings).
    Elements align differently if you have images embedded. I tried positioning menu buttons with a pixel margin-left. But with images included they had the marging always aligned relative to the image(s) - why? This made the menu scale totally wrong on a rescale of the viewport, because some of the menu button margins are aligned relative to some image, that doesn't relate to the menu at all. (Possibly dom order issue?  Can you file an issue on Edge Reflow github?)
    Ability to choose all fonts on your system. (Conscious decision, as we only allow fonts compatible with web).
    Ability to choose all fonts from Typekit (you are allowed to use with your Adobe account). (Backlog item pending).
    Select multiple elements and change their units from % to px or any other unit. Currently you have to select each element seperately - takes a lot of time just for four elements. (Will file a bug.).
    Guidelines and Smart Guides. (Backlog item pending).
    Dragging with shift should lock horizontally and vertically. (Backlog item pending).
    Enable copy & paste. (Backlog item pending).
    Automatically switch to styling (Tab) when selecting text (not the box itself). Obviously I want to edit text properties when I select it.
    Selecting multiple elements and dragging them only moves one element. Should drag all of them. Only workaround at the moment is by grouping them together. (Backlog item pending).
    Grouping has no visual indicator that elements are grouped. (Backlog item pending).
    Double-click on a group to get the seperate elements like in InDesign would be nice. (Backlog item pending).
    In the media query bar show the exact pixel width. You can't be 100% sure if you are at 950 or 952 or 951. Also, a numerical input field would be appreciated. I know you can drag around the corresponding media query, but you have to be very precise to match the right width. (Bug already filed).
    Ctrl drag over a input to use a slider, just like in Photoshop. Changing values takes too much time for fast design prototyping. (Backlog item pending).
    Ability to insert media query dependent line breaks. That is very important, because Reflow is intended to design the responsive web. Although not everyone takes the effort for every project to assign different line breaks for every media query, some do for very important projects - like in my case the portfolio, which just has very few text, which is why optimization with line breaks is possible. (Can you be more specific, this something that can be done with pure CSS)?
    Match height/width always takes the biggest width. It should take either the first selected one's, the last selected one's, or an active one like in Illustrator. (Will open issue though I believe we followed Illustrator here, possibly not).
    The ability to scale elements proportionally would be nice. For example, I have a row of four navigation buttons. As soon as I reach a too small media query I want to scale them proportionally. I assign a percent width so they scale to fit as much as possible, but their height stays the same. Having an option to scale the height in proportion would be nice. I know you can almost 100% simulate this with paddings on your text and setting your outer element to height:auto; but it's not a 100% match of proportional scaling.  (Backlog item pending)
    Scaling with the alt key should scale around the center point. (Backlog item pending)

  • Problems viewing site in Internet Explorer

    Hi
    I have created this site in muse works fine in all browsers except IE
    http://www.bryanandemmaswedding.com/
    Some screenshots below of the problems in IE the text doesnt appear at all and everything comes in as seperate elements

    > Appreciat a fast help
    No help will be forthcoming until we can see the page in
    action,
    Link please
    Also, a more descriptive, specific explanation will help.
    Walt
    "fsurrey" <[email protected]> wrote in
    message
    news:ggva09$bmc$[email protected]..
    > Hi there,
    >
    > I have a very urgent problem as I am running out of time
    and need any help
    > please,
    >
    > I have a web site that I have just designed in
    Dreamweaver, everything is
    > totally perfect when I view it in Firefox, but when I
    view it in Internet
    > Explorer the trouble begins and without any reasonable
    explanation, mainly
    > I
    > have an image which is a background image of a table
    cell it is exactly
    > the
    > same table and image as I have used the same layout for
    all my pages, but
    > in
    > some pages it appear clearly and in others in does not ?
    >
    > I am really scared as I have a deadline with no clue how
    to solve this
    > Appreciat a fast help
    > Thanks
    >

  • Format Text in properties File

    I have a large amount of text for an element in the properties file that I'd like to format. I'm retrieving this value and displaying it in the tip of a panelLabelAndMessage ADF component. For example, in the properties file I have the following:
    displayparagraph=This is the first paragraph.This is a second paragraph I'd like on a new line.
    I'd like this text to be broken apart onto new lines when it displays in the tip element, like this:
    This is the first paragraph.
    This is the second paragraph I'd like on a new line.
    I'm not sure how to go about doing this or if it's even possible. I've tried placing \n, \\n, \r, \r\n, etc...inbetween the "." and "This" but this doesn't appear to work.
    I'd also like to a portion of that same message be underlined as a link...not sure if that is possible either.
    I have to keep the text in the properties file for translation purposes and I can't really break up the sentences into seperate elements to ensure that translations doesn't lose the meaning of the tip.

    Hi,
    If you set the escape property to false on your output components you can put HTML code in your properties file for the components that you want to format differently.
    Not all components can do this but the key ones like OutputText do.
    regards,
    Brenden

  • Table in tree Structure

    Hi all,
    I need table to be displayed as tree element. Since table cannot be there as tree node element type, I created Tree and table as seperate elements and made initial visbility of table as NONE. And on action load children I changed the Visibility of the table as Visible. But again clicking on the opened arrow of the tree my table visibilty has to be changed to None. But when I click on the opened arrow it doesnt come to the Load children event.
    So how to change the Visibility of the tree???
    Regards,
    Purushothaman.

    Hi,
    May be this could be useful https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/webcontent/uuid/38650ecd-0401-0010-10a0-f9d8fd37edee [original link is broken]
    Best regards, Maksim Rashchynski.

  • Need output format for trigger  program

    Hello everyone ;
    https://forums.oracle.com/message/11078921#11078921
    Above link is reference . It's also my own thread related to   this discussion.
    SQL> desc user_login
    Name                                                              Null?    Type
    USERNAME                                                                VARCHAR2(30)
    ISDBA                                                                          VARCHAR2(20)
    LOGIN_DATE                                                              DATE
    LOGIN_TIME                                                               VARCHAR2(15)
    LOGOUT_TIME                                                          VARCHAR2(15)
    EXTERNAL_NAME                                                     VARCHAR2(30)
    AUTHENTICATION_TYPE                                          VARCHAR2(30)
    HOST                                                                          VARCHAR2(20)
    Program for tracing user logon/logoff  details
    SQL> create or replace  trigger  tri_logon
    AFTER LOGON ON DATABASE
    BEGIN
    INSERT  INTO  user_login (username, isdba, external_name,
    authentication_type, HOST,  login_date , login_time)
    SELECT SYS_CONTEXT ('USERENV', 'SESSION_USER'),
    SYS_CONTEXT ('USERENV', 'ISDBA'),
      SYS_CONTEXT ('USERENV', 'EXTERNAL_NAME'),
      SYS_CONTEXT ('USERENV', 'AUTHENTICATION_TYPE'),
      SYS_CONTEXT ('USERENV', 'host'),
      SYSDATE, TO_CHAR (SYSDATE, 'HH24:MI:SS') FROM DUAL;
       END;
    Trigger  created.
    SQL> create or replace trigger tri_audit1
    2 BEFORE LOGOFf on database
    3   BEGIN
    4 insert into user_login (username, logout_time)
    5 (select user, TO_CHAR(SYSDATE, 'HH24:MM:SS') from dual);
    6 end;
    6 /
    Trigger  created.
    I got following output . Here i cannot insert logout_time on logout_time column.
    logout_time is dispalyed seperately please see last two output values  (CST01 ,  02:06:16)   and  user_name also displayed twice.  (don't  need )
    USERNAME   ISDBA   LOGIN_DAT   LOGIN_TIME   LOGOUT_TIME   EXTERNAL_NAME AUTHENTICATION_TYPE  HOST
    CST01           FALSE     21-JUN-13          02:06:11                                            oracle                            DATABASE                            linuxserver     CST01    02:06:16
    I want output following  below  format
    Expecting output  logout time  on  LOGOUT_TIME column  and   user_name  should be displayed once.
    USERNAME ISDBA LOGIN_DAT LOGIN_TIME   LOGOUT_TIME   EXTERNAL_NAME  AUTHENTICATION_TYPE HOST
    CST01      FALSE       20-JUN-13       13:06:34                                            oracle                       DATABASE                   LINUXSERVER
    thanks in advance ..

    8f953842-815b-4d8c-833d-f2a3dd51e602 wrote:
    Hello everyone ;
    https://forums.oracle.com/message/11078921#11078921
    Above link is reference . It's also my own thread related to   this discussion.
    SQL> desc user_login
    Name                                                              Null?    Type
    USERNAME                                                                VARCHAR2(30)
    ISDBA                                                                          VARCHAR2(20)
    LOGIN_DATE                                                              DATE
    LOGIN_TIME                                                               VARCHAR2(15)
    LOGOUT_TIME                                                          VARCHAR2(15)
    EXTERNAL_NAME                                                     VARCHAR2(30)
    AUTHENTICATION_TYPE                                          VARCHAR2(30)
    HOST                                                                          VARCHAR2(20)
    In addition to the myriad of other issues pointed out in this and your other -- essentially duplicate -- thread, why do you have separate columns for login_date and login_time?  A DATE datatype (which you have correctly defined for LOGIN_DATE carries both date and time elements.  You only need one column -- LOGIN_TIME -- populated with SYSDATE when the user logs in.  And LOGOUT_TIME should also be a DATE, populated with SYSDATE.  This alone points to several design flaws.
    1) DATE and TIME are not seperate elements.  In this application, the concept of 'time' has no meaning apart from the date, and a DATE data type, by definition, stores both date and time.
    2) keeping either date OR time in a varchar is asking for trouble.  Comparisons and math simply do not work as you expect.
    3) You don't have a date for LOGOUT, but suppose the user logs on at 2330 on Tuesday, and logs out at 0030 on Wednesday..
    Properly, you should only have two columns for this .. LOGON_TIME, defined as a DATE, and LOGOUT_TIME, defined as a date.
    Or possibly separate rows, one for LOGON and one for LOGOUT, both with a sessid to join them.
    Or better, and as I mentioned earlier, don't reinvent what AUDIT already does.  How much time have you spent on this (how much of your employers MONEY has been spent) when you could have solved the whole thing in 5 minutes with AUDIT?
    Program for tracing user logon/logoff  details
    SQL> create or replace  trigger  tri_logon
    AFTER LOGON ON DATABASE
    BEGIN
    INSERT  INTO  user_login (username, isdba, external_name,
    authentication_type, HOST,  login_date , login_time)
    SELECT SYS_CONTEXT ('USERENV', 'SESSION_USER'),
    SYS_CONTEXT ('USERENV', 'ISDBA'),
      SYS_CONTEXT ('USERENV', 'EXTERNAL_NAME'),
      SYS_CONTEXT ('USERENV', 'AUTHENTICATION_TYPE'),
      SYS_CONTEXT ('USERENV', 'host'),
      SYSDATE, TO_CHAR (SYSDATE, 'HH24:MI:SS') FROM DUAL;
       END;
    Trigger  created.
    SQL> create or replace trigger tri_audit1
    2 BEFORE LOGOFf on database
    3   BEGIN
    4 insert into user_login (username, logout_time)
    5 (select user, TO_CHAR(SYSDATE, 'HH24:MM:SS') from dual);
    6 end;
    6 /
    Trigger  created.
    I got following output . Here i cannot insert logout_time on logout_time column.
    logout_time is dispalyed seperately please see last two output values  (CST01 ,  02:06:16)   and  user_name also displayed twice.  (don't  need )
    USERNAME   ISDBA   LOGIN_DAT   LOGIN_TIME   LOGOUT_TIME   EXTERNAL_NAME AUTHENTICATION_TYPE  HOST
    CST01           FALSE     21-JUN-13          02:06:11                                            oracle                            DATABASE                            linuxserver     CST01    02:06:16
    I want output following  below  format
    Expecting output  logout time  on  LOGOUT_TIME column  and   user_name  should be displayed once.
    USERNAME ISDBA LOGIN_DAT LOGIN_TIME   LOGOUT_TIME   EXTERNAL_NAME  AUTHENTICATION_TYPE HOST
    CST01      FALSE       20-JUN-13       13:06:34                                            oracle                       DATABASE                   LINUXSERVER
    thanks in advance ..

  • Override Use of Protect-Endprotect Function when editing Standard Sapscript

    Hi abapers,
    I have made a copy of a standard form (F150_DUNN_01) and edited it according to the customers needs.  One problem I have encountered is the use of seperate elements, As you can see in the standard form, the table is output as one element and the total appears afterwards in another element.  As I am not editing the print control program I have added texts, etc. after the totals line but inside elements which I know are always output.  I have recently noticed that some of the elements are protected using the 'CONTROL_FORM' function in the print control program.
    This leads me to the problem, when I have between 10-15 records in the table the following elements (540 - 592) are printed on the following page.  I have read about the protect-endprotect statements but in my case it would be between 2 elements.
    I would like the totals line to appear along with the table and the rest can go on the next page.   Is it possible to use this method without editing the print control prorgam to call elements without protection?  Elements 581 - 592 are currently protected using the 'CONTROL_FORM' function in the print program.
    Here is a snippet of the MAIN window with some PROTECT statements used but not working as expected.
    /:           PROTECT
    /E           530
    T3            <BU>INV.NUM</>,,<BU>DATE</>,,<BU>INV.Amount</>,,<BU>DUE DATE</>,,
    =           <BU>NOTE</>
    T3                                                                                  
    /E           531
    /:           DEFINE &TDLINE& = ''
    /:           PERFORM GET_TEXT IN PROGRAM ZFII_F150_ROUTINE
    /:           USING &T001-SPRAS&
    /:           USING &MHND-BELNR&
    /:           USING &MHND-BUKRS&
    /:           USING &MHND-GJAHR&
    /:           CHANGING &TDLINE&
    /:           ENDPERFORM
    T3            &MHND-BELNR&,,&MHND-BLDAT&,,&MHND-WRSHB(C)&,,&MHND-FAEDT& ,,&TDLINE&
    /E           540
    /E           550
    AS           Inicio:      &T040A-TEXT1&
    /E           551
    AS           Fin:          &T040A-TEXT1&
    /E           570
    T3           Gtos.reclam.,,&F150D-WAERF&,,&F150D-MHNGF(C)&
    /E           581
    T3           ,,,,&ULINE(15)&
    T3           ,,&F150D-WAERF&,,&F150D-SUFPF(C)&
    /E           582
    T3           ,,&F150D-WAERF&,,&F150D-SUFPF(C)&
    /:           ENDPROTECT
    /E           591
    AS                                                                                  
    /:           CASE &MHNK-MAHNS&
    /:           WHEN '1'
    /:           INCLUDE ZFI_DUNN_MAIN5911 OBJECT TEXT ID ST LANGUAGE &T001-SPRAS&
    /:           WHEN '2'
    /:           INCLUDE ZFI_DUNN_MAIN5912 OBJECT TEXT ID ST LANGUAGE &T001-SPRAS&
    /:           WHEN '3'
    /:           INCLUDE ZFI_DUNN_MAIN5913 OBJECT TEXT ID ST LANGUAGE &T001-SPRAS&
    /:           ENDCASE
    T6                                                                                  
    /E           592
    T6                              ,,&F150D-WAERF&,,&F150D-SALFW(C)&
    Regards,
    Simon
    Edited by: Simon Kerr on Oct 4, 2010 12:14 PM

    Hi Vijay,
    Thanks for reply but it isn't work.
    I think there is no documentaion available in any languagein the SAP.
    So If possible give me any other reference by which I can search documentation.
    Or just check it at your end if available send it to me.
    Please try once again.
    I wnat documentation for function modules in the Function Group MBWL & J1IEXGM.
    both are used for MIGO.
    Thanks and Regards
    Dhanu

  • Dynamic news page linked from XML

    Basically I'm able to bring HTML into my flash dynamic text
    fields, that's fine.
    But what I WANT to do is have an XML file load all the
    seperate elements into differently formatted video clips.
    I want it displayed HEADER, then DATE then CONTENT, with a
    limit on articles (say 15 a page) in a scrolling content area. I've
    not really played with this side of ActionSCript too much.
    At the moment I have the skeleton of the idea set up, but I'm
    starting to become concerned that I'm on the wrong path... I'm
    kinda stuck about what to do to seperate the elements so that they
    display under each other (obviously each news article will have a
    variable length). An example of this idea can be seen on the NEWS
    page at
    http://www.wolfmother.com.
    This is where I'm at atm, anyone wanna nudge me in the right
    direction?

    Yes actually you can dynamically type variables in Flash /
    Flex using something similar to this.
    var myDynamicObject:* = whatEverObjectIFeelLikePuttingHere;
    Perhaps what might help to accomplish your goal is to use
    reflection inside of Flex. It is possible to use (although somewhat
    irritating) reflection in Flex using a form similar to this.
    var content:Class = getClassFromPath(objectClassPath);
    newComponent = new content();
    addChild(newComponent);
    The only problem is that the compiler will scrub any
    variables/classes that are not currently being referenced, at least
    once, somewhere in the application. So somewhere in your
    application you must have a reference for the class, even if it set
    to null, so that the class will not be removed from the project.
    It's also possible that the describeType function might be of
    some use.
    Here are two references that describe each.
    http://www.cflex.net/showfiledetails.cfm?ChannelID=1&Object=File&objectID=580
    http://weblogs.thekeunster.com/?p=10
    Utilizing these features it's possible to do quite a bit to
    reshape your application based on data stored outside your
    application or on parameters only known at runtime.

  • From JTextField into string array

    hello,
    Me and my friend are currently doing a cryptography project for UNI. We are required to read in a word from the JTextField into an array. the problem is the whole word seems to be going into the array as one element. Is there any way to read in each letter in the word into a seperate element of the array??

    Well you can always read the value in the textfield, convert it to a character array and then as you transfer each character to your string array you add a blank string to it, so then it becomes a string.
    Example:
    String sentence = "hello, I am a really loooooooooong string";
    String[] stringArray = new String[sentence.length()];
    char[] charArray = sentence.toCharArray();
    for (int count = 0; count < sentence.length(); count++)
         stringArray[count] = charArray[count] + "";I hope this helps.

  • Any new ideas or suggestions for flattening layer effects without changing appearance

    Hello all,
    I've been doing a lot of looking around for ideas on how to make my work flow more simple. I regularly run into an issue with layer effects when they are flattened and have been unable to find any good solutions but was wondering if any new developments have come up with the newer versions of Photoshop that I am somehow overlooking?
    My main issue is that when I flatten layers in sections or groups (i.e. flatten only 2 or more layers together in a larger composition but not the entire compostion), layer effects with blending modes often flatten strangely. I particularly notice this with drop shadows as I often use a color other than black, usually a very dark shade of the color that is applied to the element the shadow is overlapping. To me it gives it a much more realistic and natural look. When I flatten a layer I notice that it appears the multiply mode is stripped from drop shadow FX unless they are flattened with the nackground element, so if I used a dark blue for example, once flattened the shadow is now a distinct blue shade that appears to be in normal blending mode. I can set that drop shadow layer to multiply to restore it but then I have to keep the drop shadow element on it's own layer seperate from the body of the other flattened content otherwise it inherits the multipoy mode as well of course, which still leaves me with an unwanted layer to deal with.
    My curreny solutions range from hiding all other layers and merging visible, which works from some things but not the aforementioned drop shadow issue, I will also keep things that just don't co-operate on their own seperate layer, like the drop shadow and just leave them be if I can. In cases where that isn't an option I will even hide all other layers and comp the portion of the PSD  that needs flattened to a seperate TIFF or PNG and import back into the PSD. Sometimes this will work around the issue and make everything interact as desired. It's a lenghty affair though that involves mental acrobatics every time to devise a suitable workaround that I can use for my purposes.
    The reason I need to do this often is because I work for a web development company as the designer. Once the design is done sometimes I will do the slicing and prepping for web (not an issue when I do this because I can leave everything as a PSD). When other team members like the web developer need access to the graphics files though, they use Fireworks which means I need a layered PNG so they can slice as needed with the software they are familiar with while maintining transparency where needed.
    I know some will say just to use Fireworks then but that isn't a desireable solution to me because I find Fireworks very limiting on the advanced Fx and graphic manipulation. I agree that Fireworks can be very capable and can do very nice things when you're thinking of the design of the entire site in general, but it usually can't do the advanced fx and manipulation I like to use for the "eye candy" portions of the site, especially when you are using mutiple Fx on a layer with their own blending modes. I find it more of a hassle to build a general site in Fireworks and import elements from Phoroshop. Keeping track of proper sizing and constantly loading placeholder background images to photoshop for reference isn't for me!
    I have a pretty decent understanding of how the layer flattening works and how the blending modes function (like the fact you can't have mutiple blending modes on a single layer, thus many of the issues with layer Fx blending modes). I am using CS5.5 Design premium and am hoping there have been some advances in working with this type of thing. I know that if I could flatten the drop shadow layer with the layer it overlaps that would solve the issue nicely but this is seldom possible on websites where you have fluid areas that need to change size and the image element with the drop shadow may not always be in the same place on the site background.
    It would be awesome if, since you have the ability to apply blending modes to individual layer effects, if Photoshop could have a setting to somehow flatten the layer effects and layer in it's own self containted process and then place the flattened layer within the the PSD as if you imported a transparent image like a TIFF or PNG. This is basically what I do on the extreme side of tihngs manually when needed. It would be great if there was a way to automate that type of functionality.
    Does anyone know of any new or good method to deal with this type of thing? Sorry about the long post, I was trying to be as detailed as possible as I know it's sometimes easy to misunderstand what someone is asking with this type of question. Thanks to everyone for taking the time to read/respond!

    Hi Noel,
    Thanks for the reply. The reason I need to do things this way is because of the workflow at my company. I need to be able to convert my photoshop PSD files in Fireworks and have the layers behave predictably. Trying to open a PSD file as is in Fireworks, while keeping the layer flexibility intact usually creates all kinds of chaos, ranging from Fireworks flat out ignoring some layer effects to drastically changing them. I assume because Fireworks way of intrepreting some setting numerically is different than Photoshop and because Fireworks doesn't even have some of the effect properties at all.
    The web developers need to have layered PNG files so they can slice re-slice and move elements around as needed white they develop a website. They need to maintain transparency on the seperate elements of the website mockup so that they can reuse and move elements around as needed. At times I end up doing the CSS layout on a site and in those cases it doesn't matter becuase I can work straight from the PSD and export elements straight to PNG files etc as needed. It's when I need to provide the development team with a Fireworks PNG version of the website mockup that I have these issues.
    For example and to clarify, I may have a website interface designed that has several fancy buttons or a header element with drop shadows on them or that overlap a background element in some way. If I am doing the coding on the site I can simply hide all other layers than the releveant ones, flatten visible to maintain transparency, save for web etc and I have the element complete with a nice drop shadow ready to drop into the code. If the developers are doing the slicing and layout though, they don't know how to use Photoshop (and aren't going to be learning anytime soon) but they do use Fireworks... so they want the site in fireworks, complete with the ability to hide background elements or other parts of the site that may be in the way of making the proper PNG for that button or other element that maintains transparency AND keeps the drop shadow, the proper color and transparency as well.
    What typically happens if I don't flatten each element of the site design before importing into Fireworks is that it will look very different in Fireworks, but being web developers (lol!) they don't notice or maybe even care that something looks weird or appears to be missing a shadow or other effect. Then once the site goes live, the client DOES notice it and I end up scrambling to fix the issue. That usually means going back to the PSD in a rush and trying to flatten all the elements anyway to convert to a nice Fireworks PNG so they can recapture their slices, or taking the slice they used on the website and pasting it into the PSD original so I can make a direct match and converting the element myself after the fact.
    In order to avoid these work flow issues and embarrassments I have taken to flattening each individual element (i.e. a button and all of it's effects) of website GUI to ensure Fireworks can't fiddle with it on import. I can then give the web developers a PNG they can slice easily but with all the important elements still completely seperate from one another. If they hide the layer that is the shopping cart button for example, they are going to be hiding the button and it's drop shadow or glow or any other effects. That way it can't be messed up by Fireworks or a developer. With buttons in particular I can't just include a portion of the background where the drop shadow would be becuase that button could end up anywhere on the site in the end. One of the features our business offers clients is a fair amount of flexibility on the CMS side of things to move elements around and create new sections of the site so I need to keep most elements as felxible as possible, preferrably without giving up quality of the artwork.
    I feel like I have a fairly solid understanding of why the layer effects act the way they do and how they interact, even if I don't understand fully the math that makes them do what they do. I guess I was hoping that the increasing power in the CS suites, especially in 5 and 5.5 might have made some new work around possible, or that they might have added some feature buried in the menus somewhere because it's not that practicle for many users. I have several ways to work around these issues now, but they are manual and cumbersome, I was hoping there might have been an action script or feature to automate some of this.
    I think a really cool thing to be able to do would be to be able to select some layers and have Photoshop copy them and paste them into a new document with their layer styles and all intact, flatten that document with transparency intact and then put the new flattened file back into the original document in the same location on the artboard as a new layer. This is essentially what I do when I hide all the other layers, merge visible and save as a TIFF or PNG and then copy that new file back into my full PSD document. I still experience some color shifting this way but usually not as drastic as when I try to merge directly in the full PSD. OR if that can't work, even better would be to somehow have the effects be able to "float" with the actual photoshop layer, almost like sub layers of that layer, so that each one could have it's own blending mode (and individual masks for each... that would be awesome!) and you could flatten them together somehow when needed and maintain color tones etc. Don't know if this could work though since I don't know what the limitations of the math process that combines the layers are. I would imagine some of it it would be possible, if not worth their time, since smart objects open in their own document window when you edit. I would imagine that some code work on the back end might be able to be applied using a similar method to give extra flexbility of some layer effects in Photoshop. I would love it, I know that!
    Hopefully there is at least as faster way if not an ideal work around. It defintely adds to the development cycle of a website to have to go through this step. It's also at a point in the development cycle where the site has been approved and there can be added pressure about why they development team still has to wait on a design that has already been OK'd and should be ready to slice. I have gained understanding with my boss about this and it's worked out OK for the most part, but it would certainly make him happier if I could eliminate that extra step, or reduce the time needed. On a complicated website I might lose half a day of work or more sorting out the various site elements and figuring out how much I can flatten and how and what order to break effects off their layers to maintain appearance. I have tried Fireworks several times as a native solution, but ultimately I feel very restricted by Fireworks and often can't do what I had in mind, although it has gotten better. Also on a psychological level, Fireworks "working with basic shapes" method of desigining a website tends to steer me down that mental path for some reason and I always end up with sites that look much less fluid and organi, much more boxy than when I design in Photoshop. One of our companies selling points is that we design sites that break away from the boxy and simpler web 2.0 look so Fireworks is not really a consideration for me at this point. Thanks again for the help and any respones!

Maybe you are looking for

  • How do I combine two pdf documents into one using preview?

    If I remember correctly I have done this in the past but now I can't remember how to do it. Message was edited by: admiral_koa i finally found some other questions like mine which got answered. So I'm closing this out.

  • Camileo HD video format

    Hi, I bought a camileo hd camcorder and I have problems with the video format saved by the camera. It's supposed to be an .avi file but on my macbook intel I can't properly play those videos. Quicktime would play only the audio while VLC would only p

  • Making "Sleep" the default in shutdown Dialog Box

    Hi, Since I rarely shut down my computer, I'd like to make "Sleep" the default (highlighted blue button) instead of "Shut Down" when I press the round button to the right of the keyboard of my MacBook Pro. Is there a way to do this? Thanks, Mark

  • Settlement rule while creating service order

    Hi Gurus, 1. can someone help me in knowing what should be passed as receivers key while updating settlement rule if i am using Sales Order for settlement ; sales order, sales order item, object number of item or something else because i tried to pas

  • Import directly to device

    Is it possible to import CDs directly to my device, avoiding placing them on my computers hard disk? It's kind of annoying to import the CDs to my iTunes library, add them to my device, delete from library, get error messages next time I sync my devi