How to access oracle in javabeans and display the result in jsp

In my project ,i use the javabean to access the database and do the calculations and i display the result in the jsp page,,,
any body can help me with your precious codes
kodi...

any body can help me with your precious codesStepped in the wrong place, try reading something on JDBC.

Similar Messages

  • How to Read the one Source Column data and Display the Results

    Hi All,
         I have one PR_ProjectType Column in my Mastertable,Based on that Column we need to reed the column data and Display the Results
    Ex:
    Pr_ProjectType
    AD,AM
    AD
    AM
    AD,AM,TS,CS.OT,TS
    AD,AM          
    like that data will come now we need 1. Ad,AM then same we need 2. AD also same we need 3. AM also we need
    4.AD,AM,TS,CS.OT,TS in this string we need AD,AM  only.
    this logic we need we have thousand of data in the table.Please help this is urgent issue
    vasu

    Hi Vasu,
    Based on your description, you want to eliminate the substrings (eliminated by comma) that are not AD or AM in each value of the column. Personally, I don’t think this can be done by just using an expression in the Derived Column. To achieve your goal, here
    are two approaches for your reference:
    Method 1: On the query level. Replace the target substrings with different integer characters, and create a function to eliminate non-numeric characters, then replace the integer characters with the corresponding substrings. The statements
    for the custom function is as follows:
    CREATE FUNCTION dbo.udf_GetNumeric
    (@strAlphaNumeric VARCHAR(256))
    RETURNS VARCHAR(256)
    AS
    BEGIN
    DECLARE @intAlpha INT
    SET @intAlpha = PATINDEX('%[^0-9]%', @strAlphaNumeric)
    BEGIN
    WHILE @intAlpha > 0
    BEGIN
    SET @strAlphaNumeric = STUFF(@strAlphaNumeric, @intAlpha, 1, '' )
    SET @intAlpha = PATINDEX('%[^0-9]%', @strAlphaNumeric )
    END
    END
    RETURN ISNULL(@strAlphaNumeric,0)
    END
    GO
    The SQL commands used in the OLE DB Source is like:
    SELECT
    ID, REPLACE(REPLACE(REPLACE(REPLACE(dbo.udf_GetNumeric(REPLACE(REPLACE(REPLACE(REPLACE([ProjectType],'AD,',1),'AM,',2),'AD',3),'AM',4)),4,'AM'),3,'AD'),2,'AM,'),1,'AD,')
    FROM MyTable
    Method 2: Using a Script Component. Add a Derived Column Transform to replace the target substrings as method 1, use Regex in script to remove all non-numeric characters from the string, add another Derived Column to replace the integer
    characters to the corresponding substring. The script is as follows:
    using System.Text.RegularExpressions;
    Row.OutProjectType= Regex.Replace(Row.ProjectType, "[^.0-9]", "");
    References:
    http://blog.sqlauthority.com/2008/10/14/sql-server-get-numeric-value-from-alpha-numeric-string-udf-for-get-numeric-numbers-only/ 
    http://labs.kaliko.com/2009/09/c-remove-all-non-numeric-characters.html 
    Regards,
    Mike Yin
    TechNet Community Support

  • Convert this query to ABAP and display the results

    Hi Everyone,
    I have a sql query in native sql (oracle). I want execute it in ABAP editor and display the results.
    I need to get this to an internal table and display the results. How do i write the script any help will be great use to me.
    Here is the query:
    <i> select (select decode(extent_management,'LOCAL','*',' ') ||
                   decode(segment_space_management,'AUTO','a ','m ')
              from dba_tablespaces where tablespace_name = b.tablespace_name) || nvl(b.tablespace_name,
                 nvl(a.tablespace_name,'UNKOWN')) name,
           kbytes_alloc kbytes,
           kbytes_alloc-nvl(kbytes_free,0) used,
           nvl(kbytes_free,0) free,
           ((kbytes_alloc-nvl(kbytes_free,0))/
                              kbytes_alloc)*100 pct_used,
           nvl(largest,0) largest,
           nvl(kbytes_max,kbytes_alloc) Max_Size,
           decode( kbytes_max, 0, 0, (kbytes_alloc/kbytes_max)*100) pct_max_used from ( select sum(bytes)/1024 Kbytes_free,
                  max(bytes)/1024 largest,
                  tablespace_name
           from  sys.dba_free_space
           group by tablespace_name ) a,
         ( select sum(bytes)/1024 Kbytes_alloc,
                  sum(maxbytes)/1024 Kbytes_max,
                  tablespace_name
           from sys.dba_data_files
           group by tablespace_name
           union all
          select sum(bytes)/1024 Kbytes_alloc,
                  sum(maxbytes)/1024 Kbytes_max,
                  tablespace_name
           from sys.dba_temp_files
           group by tablespace_name )b
    where a.tablespace_name = b.tablespace_name order by 1;
    </i>
    Thanks,
    Prashant.

    Hi Prashant,
    Native SQL commands in ABAP are placed between EXEC SQL and ENDEXEC. You can place all your statements in between these EXEC SQL and ENDEXEC in a report.
    EXEC SQL [PERFORMING <form>].
      <Native SQL statement>
    ENDEXEC.
    Check this link to know about Native SQL
    http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3b8b358411d1829f0000e829fbfe/frameset.htm
    Thanks,
    Vinay

  • How to execute a string formula and assign the result to a number field

    How to execute a string formula and assign the result to a number field
    Hi,
    we have a function that returns a string like this:
    '(45+22)*78/23'
    After we should calculate this string and assign the value to a numeric block field
    Example:
    k number(16,3);
    k:=fun1('(45+22)*78/23'); where fun1 execute and translate to number the string.
    Does exist a function like fun1 ??
    How can we do ?
    Regards

    Hello,
    this is the code that does the job:
    SQL> set serveroutput on
    SQL> DECLARE
    2 ch VARCHAR2(20) :='22+10' ;
    3 i NUMBER ;
    4 BEGIN
    5 EXECUTE IMMEDIATE 'select ' || ch || ' from dual' INTO i;
    6 dbms_output.put_line ('i = ' || TO_CHAR(i));
    7 END ;
    8 /
    i = 32
    Procédure PL/SQL terminée avec succès.
    SQL>
    just you have to do is to create a small stored function that take the string to calculate and return the number result
    Francois

  • Remote Call to Blazeds and displaying the result set in grid

    Hi,
    I want to call a remote method using Flex application from Blazeds and display the values in DataGrid. Can anyone help in this ?
    -- I am using AMFChannel
    -- The method to be called is PolicyApnVO.getPoliciesApn()
    -- Please advice any correction if required
    Here is the mxml code :
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                    creationComplete="initApp()" viewSourceURL="srcview/index.html">
        <!--
        Simple client to demonstrate runtime configuration of destinations.
        The "runtime-employee" destination is configured in
        EmployeeRuntimeRemotingDestination.java.
        -->
        <mx:Script>
            <![CDATA[
                import mx.messaging.ChannelSet;
                import mx.messaging.channels.AMFChannel;
                import mx.rpc.remoting.mxml.RemoteObject;
                [Bindable]
                public var srv:RemoteObject;
                public function initApp():void
                    var channel:AMFChannel = new AMFChannel("my-amf", "http://192.168.102.208:8400/policyAnalytics/messagebroker/amf");
                    var channelSet:ChannelSet = new ChannelSet();
                    channelSet.addChannel(channel);
                    srv = new RemoteObject();
                    srv.destination="runtime-policy";   
                    srv.channelSet = channelSet;
                    srv.PolicyApnVO.getPoliciesApn();
            ]]>
        </mx:Script>
        <mx:Panel title="Policy Details" width="100%" height="100%">
            <mx:DataGrid width="100%" height="100%" dataProvider="{srv.PolicyApnVO.getPoliciesApn.lastResult.data.result}"
                         showDataTips="true">
                <mx:columns>
                    <mx:DataGridColumn headerText="APN Id" dataField="apnId"/>
                    <mx:DataGridColumn headerText="APN Name" dataField="apnName"/>
                    <mx:DataGridColumn headerText="Policy ID" dataField="policyId"/>
                    <mx:DataGridColumn headerText="Policy Name" dataField="policyName"/>
                </mx:columns>
            </mx:DataGrid>
        </mx:Panel>
    </mx:Application>

    There may be other ways to do this but here's what I would do:
    1) add a results method to the remote object:
    src.result="onResult(event.result)";
    2) add the callback method: private function onResult(event : * = null)
    :void{
                                                         if(event is
    ArrayCollection)
                                                                myData =
    ArrayCollection(event);
    3) add the variable: private var myData:ArrayCollection;
    4) make the dataProvider for the grid use the my data :
    dataProvider=""
    You can probably avoid all this by adjusting your dataProvider. I am just
    not sure what it would be without experimenting. But definitely not what
    you have. Maybe just {svc.result}.

  • How to accessing files in os and display as tree

    i have worked lot to access the files in os and display them as tree structure but could not suceed can any one help me

    * Light Development Java Library
    * Copyright (C) 2003, 2004 Ulrich Hilger
    * This program is free software; you can redistribute it and/or
    * modify it under the terms of the GNU General Public License
    * as published by the Free Software Foundation; either version 2
    * of the License, or (at your option) any later version.
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    * GNU General Public License for more details.
    * You should have received a copy of the GNU General Public License
    * along with this program; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    package com.lightdev.lib.ui;
    import javax.swing.JTree;
    import javax.swing.tree.TreePath;
    import java.io.File;
    public class JFileTree extends JTree {
      public JFileTree(File root) {
        super();
        FileTreeModel model = new FileTreeModel(root);
        this.setModel(model);
      public JFileTree() {
        this(new File(System.getProperty("user.home")));
      private String parsePath(TreePath treePath) {
        int pathSize = treePath.getPathCount();
        String path = null;
        for (int i = 0; i < pathSize; i++) {
          if (path == null) {
            path = treePath.getPathComponent(i).toString();
          else {
            path += File.separatorChar + treePath.getPathComponent(i).toString();
        return path;
      public String[] getSelectedUrls() {
        int treepathAmount = getSelectionCount();
        TreePath[] treePaths = getSelectionPaths();
        String[] stringSet = new String[treepathAmount];
        if (treepathAmount != 0) {
          for (int i = 0; i < treepathAmount; i++) {
            stringSet[i] = parsePath(treePaths);
    return stringSet;
    return null;
    * Light Development Java Library
    * Copyright (C) 2003, 2004 Ulrich Hilger
    * This program is free software; you can redistribute it and/or
    * modify it under the terms of the GNU General Public License
    * as published by the Free Software Foundation; either version 2
    * of the License, or (at your option) any later version.
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    * GNU General Public License for more details.
    * You should have received a copy of the GNU General Public License
    * along with this program; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    package com.lightdev.lib.ui;
    import javax.swing.tree.TreeModel;
    import javax.swing.tree.TreePath;
    import javax.swing.event.TreeModelListener;
    import java.io.File;
    import com.lightdev.lib.io.CustomFile;
    public class FileTreeModel implements TreeModel {
      public FileTreeModel(File root) {
        this.root = root;
      public Object getRoot() {
        return root;
      public boolean isLeaf(Object node) {
        return ( (File) node).isFile();
      public int getChildCount(Object parent) {
        File[] children = ( (File) parent).listFiles();
        if (children == null)return 0;
        return children.length;
      public Object getChild(Object parent, int index) {
        File[] children = ( (File) parent).listFiles();
        if ( (children == null) || (index >= children.length)) {
          return null;
        return new CustomFile( (File) parent, children[index].getName());
      public int getIndexOfChild(Object parent, Object child) {
        File[] children = ( (File) parent).listFiles();
        if (children == null)return -1;
        String childname = ( (File) child).getName();
        for (int i = 0; i < children.length; i++) {
          if (childname.equals(children)) {
    return i;
    return -1;
    * this tree model is not intended to be editable which is why
    * this method is not implemented
    * @param path TreePath
    * @param newvalue Object
    public void valueForPathChanged(TreePath path, Object newvalue) {}
    * this tree model is not editable and does not fire events which is why
    * this method is not implemented
    * @param l TreeModelListener
    public void addTreeModelListener(TreeModelListener l) {
    * this tree model is not editable and does not fire events which is why
    * this method is not implemented
    * @param l TreeModelListener
    public void removeTreeModelListener(TreeModelListener l) {}
    * reference to this tree model's root node (a File)
    protected File root;

  • How to join two lists and display the results in datasheet view.?

    hello,
    i have two lists that i would like to join, i know a method that has been described  in the link below
    http://www.codeproject.com/Articles/194252/How-to-Link-Two-Lists-and-Create-a-Combined-Ciew-i
    however, here the data view is only limited to 30 rows and my resultant list is huge. I would like to know if there is a possibility to view the resultant list in a data sheet view ?

    I don't believe you can use the OOTB Datasheet view when joining lists. However, you should be able to increase your limit from 30 items to as many as you need (that doesn't trip the threshold set in Central Admin).
    Dimitri Ayrapetov (MCSE: SharePoint)

  • How to search XML data from a HTTPMultiService and display the result on the Spark List

    Hello all,
    I am totally new to Flash Builder and Actionscript and hope someone might be able to help me out. I basically create a mobile app with a single view. The view has a TextInput as a search box and a search button. I conntected a Data/Service using a local XML file and bind the Data to a Spark List. Innitally the List will show nothing until the user enter the search term and hit the button. The List suppose to show the XML data that match the search term.
    Now is my problem. I cannot make the List to show the data that match the search text. The List just shows ALL the data.
    Here are my MXML code:
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:shopping="services.shopping.*"
            title="Search">
        <fx:Script>
            <![CDATA[
                import mx.events.FlexEvent;
                protected function button1_clickHandler(event:MouseEvent):void
                    navigator.popView();
                protected function list_creationCompleteHandler(event:FlexEvent):void
                    getDataResult.token = shopping.getData();
                protected function seach_clickHandler(event:MouseEvent):void
                    getDataResult.token = shopping.getSearchData(searchTxt.text);
            ]]>
        </fx:Script>
        <fx:Declarations>
            <s:CallResponder id="getDataResult"/>
            <shopping:Shopping id="shopping"/>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <s:actionContent>
            <s:Button height="79" label="Back" click="button1_clickHandler(event)"/>
        </s:actionContent>
        <s:List id="list" left="0" right="0" top="111" bottom="0"
                creationComplete="list_creationCompleteHandler(event)" labelField="english">
            <s:AsyncListView list="{getDataResult.lastResult}"/>
        </s:List>
        <s:TextInput id="searchTxt" x="80" y="34" width="250" height="49" enabled="true"
                     prompt="search..."/>
        <s:Button id="search" x="338" y="35" width="72" height="49" label="s"
                  click="seach_clickHandler(event)"/>
    </s:View>
    Here is the _Super_Shopping.as file:
    * This is a generated class and is not intended for modification.  To customize behavior
    * of this service wrapper you may modify the generated sub-class of this class - Shopping.as.
    package services.shopping
    import com.adobe.fiber.core.model_internal;
    import com.adobe.fiber.services.wrapper.HTTPServiceWrapper;
    import com.adobe.serializers.xml.XMLSerializationFilter;
    import mx.rpc.AbstractOperation;
    import mx.rpc.AsyncToken;
    import mx.rpc.http.HTTPMultiService;
    import mx.rpc.http.Operation;
    import valueObjects.Shop;
    [ExcludeClass]
    internal class _Super_Shopping extends com.adobe.fiber.services.wrapper.HTTPServiceWrapper
        private static var serializer0:XMLSerializationFilter = new XMLSerializationFilter();
        // Constructor
        public function _Super_Shopping()
            // initialize service control
            _serviceControl = new mx.rpc.http.HTTPMultiService();
             var operations:Array = new Array();
             var operation:mx.rpc.http.Operation;
             var argsArray:Array;
             operation = new mx.rpc.http.Operation(null, "getData");
             operation.url = "assets/data/shopping.xml";
             operation.method = "GET";
             operation.serializationFilter = serializer0;
             operation.properties = new Object();
             operation.properties["xPath"] = "/::shop";
             operation.resultElementType = valueObjects.Shop;
             operations.push(operation);
             operation = new mx.rpc.http.Operation(null, "getSearchData");
             operation.url = "assets/data/shopping.xml";
             operation.method = "GET";
             operation.resultFormat = "text";
             argsArray = new Array("item");
             operation.argumentNames = argsArray;
             operation.properties = new Object();
             operation.properties["xPath"] = "/::shop";
             operation.resultElementType = valueObjects.Shop;
             operations.push(operation);
             _serviceControl.operationList = operations;
             preInitializeService();
             model_internal::initialize();
        //init initialization routine here, child class to override
        protected function preInitializeService():void
          * This method is a generated wrapper used to call the 'getData' operation. It returns an mx.rpc.AsyncToken whose
          * result property will be populated with the result of the operation when the server response is received.
          * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value.
          * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
          * @see mx.rpc.AsyncToken
          * @see mx.rpc.CallResponder
          * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
        public function getData() : mx.rpc.AsyncToken
            var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("getData");
            var _internal_token:mx.rpc.AsyncToken = _internal_operation.send() ;
            return _internal_token;
        public function getSearchData(item:String) : mx.rpc.AsyncToken
            var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("getSearchData");
            var _internal_token:mx.rpc.AsyncToken = _internal_operation.send(item);
            return _internal_token;
    The getSearchData() supposed to return XML data that match the search text, but it doesn't. Can anyoen help?
    Thank you!

    Hi,
    are you able to change dynamically the  operation.url = "assets/data/shopping.xml";?
    i need to do that based on the users input.
    Thanks in advance,

  • Call a JSP from applet and display the results in the browser

    Hello All,
    I have written an applet which performs some functionality at the clinets browser. When the applets method finishes exectution, I would like to call
    a jsp. The results of the JSP should be displayed like a normal page in the browser.
    I tried creating a HttpURLConnection and calling the jsp but two things happened
    1. The jsp call failed because the applet doesn't have a valid session id.
    2. even if I disable the valid user check at the jsp, the results of the jsp are returned as a set of bytes to the applet. They are not displayed in the browser window.
    Then I tried applet.getAppletContext().showDocument()... However with this api I cannot do a POST operation on the JSP with some input data because this takes only a URL as an input parameter.
    Please help me in this problem and I will be very gratefull to you.
    1. applet uses the same session id as the browser so that when applet makes a request to the jsp it does not get user invalid exception.
    2. the results of the jsp are displayed on the browser and not given to the applet.
    Thank you so much for your help.
    regards,
    Abhishek.

    I hope this can help you
    I made a package calls fun
    and a clsss calls JspTestingFun
    package fun;
    public class JspTestingFun{
      private String sample = "welcome to jsp";
      //Access sample property
      public String getSample() {
        return sample;
      //Access sample property
      public void setSample(String newValue) {
        if (newValue!=null) {
          sample = newValue;
    }then I make a jsp file
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %>
    <%@ page import =  "fun.JspTestingFun"%>
    <html>
    <head>
    <title>
    jspTest
    </title>
    </head>
    <jsp:useBean id="mytest" scope="session" class="fun.JspTestingFun" />
    <jsp:setProperty name="mytest" property="*" />
    <body bgcolor="#ffffff">
    <%
    mytest.getSample();
    %>
    <h1>
    Just for testing
    </h1>
    <form method="post">
    <br>Enter anything   :  <input name="sample"><br>
    <br><br>
    <input type="submit" name="Submit" value="Submit">
    <input type="reset" value="Reset">
    <br>
    this what we get<jsp:getProperty name="mytest" property="sample" />
    </form>
    </body>
    </html> 

  • Is it possible to read and write to a file at the same time and display the results in a RichTextBox?

    Hi All,
    I have a purpose in winforms to have a "notepad like" editor that saves what ever i type to a file on the hard drive and reads from based. 
    So what i have is a tab with a richtextbox docked to fill. I would like to have that richtextbox read from a file on the hard drive, then save the changes i type when i either click off the tab or live if possible.
    I wills state that i am fairly new to the c# game and if this is possible and someone could post an example that would be awesome and totally appreciated.
    Thanks,
    jAC

    For those that are looking for the solution I went with here are the details
    Reading the file:
    // Wish List Section
    wishListRichTextBox.ResetText();
    string wlFolder = Application.StartupPath + "\\wishLists\\";
    string wlPath = wlFolder + selectedProduct + ".rtf";
    // Read from the text file and out put the results
    try
    { // create directory if it does not exist
    if (!Directory.Exists(wlFolder))
    Directory.CreateDirectory(wlFolder);
    } // create file if it does not exist
    if (!File.Exists(wlPath))
    File.Create(wlPath).Dispose();
    var iStream = new FileStream(wlPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
    var sr = new System.IO.StreamReader(iStream);
    var readData = sr.ReadToEnd();
    wishListRichTextBox.Text = readData;
    sr.Close();
    // If the read fails then output the error message in the same section
    catch (Exception ex)
    wishListRichTextBox.Text = "Error: " + ex.Message;
    Writing the file:
    private void wishlistTabChanged(object sender, EventArgs e)
    if(menuTabControl.SelectedTab != wishListTab){
    if (productComboBox.SelectedIndex >= 0)
    try
    string wlFolder = Application.StartupPath + "\\wishLists\\";
    string wlPath = wlFolder + productComboBox.SelectedItem + ".rtf";
    var oStream = new FileStream(wlPath, FileMode.Open, FileAccess.Write, FileShare.Read);
    oStream.SetLength(0);
    var sw = new System.IO.StreamWriter(oStream);
    sw.WriteLine(wishListRichTextBox.Text);
    sw.Close();
    catch (Exception ex)
    MessageBox.Show("Wish list for " + productComboBox.Text + " save failed. \n\nError: " +
    ex, "Wish List Save Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
    I mainly used Ammar.Zaied thought
    process on this. Thanks to everyone though, as you all pointed me in the right direction

  • How to Compare 2 CSV file and store the result to 3rd csv file using PowerShell script?

    I want to do the below task using powershell script only.
    I have 2 csv files and I want to compare those two files and I want to store the comparision result to 3rd csv file. Please look at the follwingsnap:
    This image is csv file only. 
    Could you please any one help me.
    Thanks in advance.
    By
    A Path finder 
    JoSwa
    If a post answers your question, please click &quot;Mark As Answer&quot; on that post and &quot;Mark as Helpful&quot;
    Best Online Journal

    Not certain this is what you're after, but this :
    #import the contents of both csv files
    $dbexcel=import-csv c:\dbexcel.csv
    $liveexcel=import-csv C:\liveexcel.csv
    #prepare the output csv and create the headers
    $outputexcel="c:\outputexcel.csv"
    $outputline="Name,Connection Status,Version,DbExcel,LiveExcel"
    $outputline | out-file $outputexcel
    #Loop through each record based on the number of records (assuming equal number in both files)
    for ($i=0; $i -le $dbexcel.Length-1;$i++)
    # Assign the yes / null values to equal the word equivalent
    if ($dbexcel.isavail[$i] -eq "yes") {$dbavail="Available"} else {$dbavail="Unavailable"}
    if ($liveexcel.isavail[$i] -eq "yes") {$liveavail="Available"} else {$liveavail="Unavailable"}
    #create the live of csv content from the two input csv files
    $outputline=$dbexcel.name[$i] + "," + $liveexcel.'connection status'[$i] + "," + $dbexcel.version[$i] + "," + $dbavail + "," + $liveavail
    #output that line to the csv file
    $outputline | out-file $outputexcel -Append
    should do what you're looking for, or give you enough to edit it to your exact need.
    I've assumed that the dbexcel.csv and liveexcel.csv files live in the root of c:\ for this, that they include the header information, and that the outputexcel.csv file will be saved to the same place (including headers).

  • How can I connect multiple devices to Mac mini display port? I need to connect a Canon 5D to my Mac and display the result on a VGA video projector. I am using mini hdmi to mini display for the camera. Can I connect the VGA to any other port?

    Hi there I am connecting a Canon 5D to my laptop trying to use it as a webcam trough camtwist.
    At the same time I need to output the streaming to a videoprojector.
    The cam is connected to the mini display port do there is no port available for the VGA cable anymore.
    Do I need to use a different port for the projector? Should I buy a video card?
    Can't connect the camera via USB as that is too slow and it will freeze.
    Many thanks for all your help
    Best
    Faeve

    You might do better on a forum other than this one, which is "Using iPhone"

  • I would like to read a file and display the results in a table containing both strings and numbers?

    Hi,
    I just need a simple way of doing this as at the moment, i read one line at the time containing strings and numbers, whenever i convert this line to an array i loose the strings, if i want to display it, it displays as a group of lines while i would like to display it as a table with column headers. The file is an .xls worksheet.
    Any suggestions?
    Thanks
    Me

    Hi,
    Look at attach vi.
    If this is not what you need please clarify.
    With ActiveX you can Open Excel, interact with it (read and write values to cells...
    But if you can read it this way, I think it's easier.
    Hope this helps,
    Paulo
    Attachments:
    XL.zip ‏24 KB

  • Running Interactive commands in java and displaying the output.

    Hi All,
    I'm running a sample code to execute a user defined command (cmd1) and display the results. The output of the command when executed in command prompt is
    (1) Executing the command cmd1
    (2) Do you want to continue(Y/N)_ <waits for user input>
    (3) Based on user input
    (Y) Displays the results
    (N) Interrupted
    But i'm facing problem when i execute the below code. When the results are being displayed instead of displaying line(1) and (2) and then waiting for the input- the code waits for the input and then only displays the results.
    O/p
    inside output
    inside input
    y (------ gets the input and then only displays the results).
    Executing the command cmd1
    Do you want to continue(Y/N)
    results
    Please help out how to resolve this issue.
    Thanks.
    Sample Code for reference.
    import java.util.*;
    import java.io.*;
    public class SampleCheck {
         public static void main(String[] args) throws Exception {
              (new SampleCheck()).test();
         void test() throws Exception {
              Process proc = Runtime.getRuntime().exec("cmd1");
              // any error from the process?
              StreamHandlerErr errorStream = new StreamHandlerErr(proc
                        .getErrorStream(), System.err);
              // any output from the process?
              StreamHandlerOutput outputStream = new StreamHandlerOutput(proc
                        .getInputStream(), null);
              // any input to the process?
              // FileInputStream fin = new FileInputStream(new File("textfile1.txt"));
              StreamHandlerInput inputStream = new StreamHandlerInput(System.in, proc
                        .getOutputStream());
              // start the stream threads
              // errorStream.start();
              outputStream.start();
              inputStream.start();
              // wait till it returns
              int exitVal = proc.waitFor();
              System.exit(exitVal);
         class StreamHandlerInput extends Thread {
              InputStream is;
              OutputStream os;
              StreamHandlerInput(InputStream is, OutputStream os) {
                   this.is = is;
                   this.os = os;
              public void run() {
                   System.out.println("inside input");
                   try {
                        int c;
                        while ((c = is.read()) != -1) {
                             os.write(c);
                             System.out.println("c= " + c);
                             os.flush();
                   } catch (IOException e) {
                   System.out.println("End of Run Method..Input");
         class StreamHandlerOutput extends Thread {
              InputStream is;
              OutputStream os;
              File f=new File("jbsrt_output.txt");
              StreamHandlerOutput(InputStream is, OutputStream os) {
                   this.is = is;
                   this.os = os;
              public void run() {
                   System.out.println("inside output");
                   try {
                        int c;
                        FileOutputStream fs=new FileOutputStream(f);
                        /*PrintStream ps =new PrintStream(;
                        ps.print(arg0)
                        ps.close();*/
                        InputStreamReader ir = new InputStreamReader(is);
                        //System.out.println(ir.read());
                        BufferedReader br = new BufferedReader(ir);
                        String line = null;
                        while((line=br.readLine())!=null)
                             System.out.println(line);
                   } catch (Exception e) {
                   System.out.println("End of Run Method..Output");
         class StreamHandlerErr extends Thread {
              InputStream is;
              OutputStream os;
              StreamHandlerErr(InputStream is, OutputStream os) {
                   this.is = is;
                   this.os = os;
              public void run() {
                   System.out.println("inside Err");
                   try {
                        int c;
                        while ((c = is.read()) != -1) {
                             os.write(c);
                             os.flush();
                   } catch (IOException e) {
                   System.out.println("End of Run Method..Err");
    }

    Console input is line buffered. This means you only get the first character a line after the newline has been inputed.
    The same thing happen if you just type on the console.
    I am not aware of any simple way around this.
    IDEs get around this by changing the application run so that the input/output is captured as it happens and sent over a socket connection.

  • How to communicate between Flex and JSP and show the result in an Iframe

    Hi all
    I am trying to send some data from flex to one HTTPService and trying to show the same response jsp in an Iframe. But unfortunately i am unable to get the responce Jsp's url to set as a source for iframe.
    let me explain you clearly...I have a mxml where i am having a text box and a button in the left panel and in the right panel i am having an Iframe to display jsp. So once user enters some value in the text box and clicks button then HTTPservice's send method will be called with text box's content as an arguement. So i can fetch that value from request object in jsp and display the value in jsp. So the problem here is i want display that result jsp in my Iframe. I know that , we need that result jsp URL to display in Iframe . But as i am sending POST request to HTTPservice, i am not able to get the result jsp's URL in flex side.
    So i need help desperately from great minds.So anyone of you can give me some suggestions!!!!
    Regards

    Hi all can some one please give a solution ...Any suggestions would be greatly appreciated

Maybe you are looking for

  • Strange thin line of 'noise' across all video playback

    Hey, another problem I'm currently having... for no reason my mac has started displaying a flashing line of what I can only describe as 'noise', it's very thin only a few pixels high but as wide as the video playback. This happens in FCP on my viewer

  • Voice sounds to "recorded over" song?

    I'm recording my vocals over an audio track but the issue I'm having is that my voice doesn't sound like it's a part of the song. This is really hard to explain. Basically you can tell I recorded my  vocals over the audio track. It doesn't really sou

  • Splitting and renaming clips in FCE4

    How can I split a clip up into smaller clips and rename then? Whenever I try to copy or duplicate them I get the same copy for all. I was trying to change the name as well and it seems I can't make them independent of each other. Does anyone know how

  • COMPUTERS WONT AUTOMATICALLY PICK UP TC NETWORK

    Hi there.. There's always something that doesn't go according to plan! I have just upgraded our network to a TC500GB. All our macs can see the TC network and I have also added them all as clients to bypass the WPA security. I have listed the TC netwo

  • FlashBuilder 4.0.1 "Workspace in Use" after CF Data Wizard

    I have FB 4.0.1 installed on a Windows 7 Pro machine, along with WAMP Server/MySQL and CF 9 Developer Edition. I can start FB OK and I have the workspace set to C:\Users\MyLogin\Adobe Flash Builder (the default). If I try to create a project I have n