Help with cfgrid / component

Hey everyone...
I'm working on the following piece code
<cfinvoke
component="elements.assets.cf.components.Reports"
    method="pKreport"
    returnvariable="qryKres">
</cfinvoke>
<cfform name="Kform">
    <cfgrid name="pKreport"
        bindonload="true"
        sort="yes"
        highlighthref="yes"
        griddataalign="left"
        gridlines="yes"
        selectmode="row"
        insertbutton="Add" 
        deletebutton="Delete"
        enabled="yes"
        visible="yes"
        format="html"
        preservepageonsort="false"
        striperows="yes"
        selectonload="false"
        autowidth="false"
        pagesize="100"
bind="cfc:elements.assets.cf.components.Reports.pKreport({cfgridpage},{cfgridpagesize},{cf gridsortcolumn},{cfgridsortdirection})">
        <cfgridcolumn name="buildingName"
            header="Building Name"
            headeralign="left"
            dataalign="left"   
            select="no"
            display="yes"
            headerbold="yes" />
        <cfgridcolumn name="allocatedSF"
            header="Allocated SF"
            headeralign="left"
            dataalign="left"   
            select="no"
            display="yes"
            headerbold="yes" />
        <cfgridcolumn name="capacity"
            header="Capacity"
            headeralign="left"
            dataalign="left"   
            select="no"
            display="yes"
            headerbold="yes" />
        <cfgridcolumn name="occupancy"
            header="Occupancy"
            headeralign="left"
            dataalign="left"   
            select="no"
            display="yes"
            headerbold="yes" />
        <cfgridcolumn name="vacancy"
            header="Vacancy"
            headeralign="left"
            dataalign="left"   
            select="no"
            display="yes"
            headerbold="yes" />
    </cfgrid>
</cfform>
But I keep getting the following error - and I'm not sure why...
The specified  CFC elements.assets.cf.components.Reports could not be found.
The path to the CFC must be  specified as a full path, or as a relative path from the current template,  without the use of mappings.
I'm using the same component in both the cfinvoke & cfgrid -- it works fine with the cfinvoke...

Yes the two code blocks are on the same page...
Can you help?

Similar Messages

  • Need help with CF component call, please

    Hi!
    I've been working with component lately but still learning. In one of my logic I need to use an existing component and I'm not sure how to correctly call the function and get the return result from that.
    Can anyone help me please?
    Basically I created a component:
    <cfcomponent displayname="X">
         <CFFUNCTION name="GetNames">
           <fargument name="1" type="String" required="TRUE">
           <cfargument name="2" type="String" required="TRUE">
           <!---- I do my work here ---->
            within my logic, I need to call an existing function located at
            in a different component And I  need to use the result returned by this function.
            (see below)
            I'm not sure how to correctly call that function from here
            Can I simply do:
            <cfinvoke component="the location of Y component" method="Compare" MyVar = "MyNames" Returnresult="Z">
            <CFIF #Z# NEQ 0>
                <!---  DO something --->
           <CFELSE>
              <!--- do something else --->
           </CFIF>
         </CFFUNCTION>
    </cfcomponent>
    This is the existing componen that I need to use. It's located at the same directory:
    <cfcomponent displayname="Y">
    <!--- assuming this is the function that I need to call --->
         <CFFUNCTION name="Compare" hint="verify names">
           <cfargument name="MyVar" type="String" required="TRUE">
          <cfscript>
                some logic here
                 return return_struct;
         </cfscript>
         </CFFUNCTION>
    </cfcomponent> 
    Please advice, thank you!

    I hopo the following example will be helpful for. Please let me know if you have any questions.
    childComponent.cfc:
    <cfcomponent displayname="childComponent">
        <cffunction name="childComponentFunction" access="remote" returntype="string">
            <cfargument name="myArgument" type="string" required="yes">
            <cfset var finalString="">
            <cfinvoke component="baseComponent" method="baseComponentFunction" returnvariable="finalString">
                <cfinvokeargument name="stringArgumentToReturn" value="#arguments.myArgument#">
            </cfinvoke>
            <cfreturn finalString>
        </cffunction>
    </cfcomponent>
    baseComponent.cfc:
    <cfcomponent displayname="baseComponent">
        <cffunction name="baseComponentFunction" access="public" returntype="string">
            <cfargument name="stringArgumentToReturn" required="yes" type="string">
            <cfreturn arguments.stringArgumentToReturn>
        </cffunction>
    </cfcomponent>
    FYI - There several other methods through which we can call functions of different functions.

  • Help with "Unresolved Component" warning

    I know this was asked recently, but I think the poster had different set of circumstances, because the advice offered in that thread didn't lead me to a solution. Or else I'm incompetent! Hopefully someone can help me with the issue I'm having.
    Here's the scenario:
    I get a "Unresolved Component" warning for syntax like this: "createObject('component', 'ss_components.application_methods')"
    - 'ss_components' is a mapping on the CF Server, and the application works fine when tested
    - My CFBuilder Project folder is located in a different place than the wwwroot. Wwwroot is where all the CF scripts/application files are. Within the CFBuilder project, i have a Linked Folder to the wwwroot folder.
    I have the following settings in CFBuilder. Some of these settings are the way they are because I was trying various things out to try and fix this 'Unresolved' problem.:
    -Preferences>ColdFusion>Server Settings> (all checked)
    -Preferences>ColdFusion>Startup> Index all CFCs... (unchecked)
    -Properties>ColdFusion Project>(I have my linked folder here, when I created it, I unchecked the 'Use Link Folder to Resolve CFCs)
    -Local Server Settings: blank entry for "Document Root"
    I'm aware of the inheretence for finding components and I don't fully understand it since I'm new to CFBuilder, but all I know is that the first place CFBuilder looks for components is Mappings defined by CFServer....  I only want it to look there, since that's the only way I ever refer to components
    - Running CF Builder 2, trial on my dev machine which has:
         CF9 installed
         IIS7.5
         RDS Enabled (and works because i can browse the db in CFBuilder)
         CFBuilder was installed as an Eclipse plugin, not standalone.
    Please if anyone can help me with this, i would really appreciate it. I've been trying to fix this all day! :-S
    Thanks
    Dan

    I'm having the same problem.  If I look in the Services Browser, the component shows up correctly, but in CFB2, I get the Unresolved Component message.  Here is my code:
    component output="false" extends="appname.extensions.components.core.Framework" {...}
    I have a CF mapping "appname\extensions" to the folder where the code is.  I've tried just about everything with the server settings in CFB2 as well as the Project settings.  When I click on the error in the gutter, "Quick Fix" suggests to me to create "appname.appname.extensions.core.Framework", but I'm not sure why.  Any help would be great!
    Thanks,
    Tyler

  • Help with Custom Component: Ajax and ValueChangeListener

    Hello,
    I am trying to create a custom component that triggers an update via Ajax. However, I would also like to trigger a ValueChangeListener method from the same component, however I am unsure of how to obtain and trigger the ValueChangeEvent.
    The code I have so far in the Phase Listener is:
    private void handleAjaxRequest(PhaseEvent event) {
         FacesContext context = event.getFacesContext();
            HttpServletResponse response = (HttpServletResponse)context.getExternalContext().getResponse();
            Object object = context.getExternalContext().getRequest();
            if (!(object instanceof HttpServletRequest)) {
                return;
            HttpServletRequest request = (HttpServletRequest)object;
            HttpSession session =  request.getSession();
            String requestType = request.getParameter("jsflotRequestType");
            if (requestType != null && requestType.equalsIgnoreCase("jsflotchartValueChange")) {
                 //Trigger valueChangeEvents
                 log.info("Handling JSFlot Chart Value Change Event.");
    }What I am looking for though, is some information regarding how to obtain the ValueChangeListener from the request/session objects.
    The component tag is called like this:
    <jsflot:flotChart id="valueTimeChart"
         value="#{chartMbean.chartSeries}"
         valueChangeListener="#{chartMbean.valueChangeListener}"Any help would be greatly appreciated!

    The field calculation order was not in the correct order, had a devil of a time figuring out how to get to it, in Acrobat X.
    My check boxes for shipping have the same name field but I don't see a tab for export value for the check boxes, and I have no idea how to implement your suggestions for a switch or if statement or what fields to attach them to. 
    My amatuer attempt at a shipping formula follows, I don't know if I can use a range for event value, or where to put the script, if it is even correct.
    if(event.value == "<25.01")
        nShipFee = 06;
    else if(event.value == "25.01 - 75")
        nShipFee = 11.50;
    else if(event.value == "75.01 - 125")
        nShipFee = 15;
    else if(event.value == "125.01 - 200")
        nShipFee = 20;
    else if(event.value == "200.01 - 300")
        nShipFee = 25;
    else if(event.value == "300.01 - 400")
        nShipFee = 30;
    else if(event.value == ">400")
        nShipFee = 50;

  • Help with Train component

    Hi,
    I have to implement wizard based page flow for my application and I read that we can achieve it using train component. I am not able to find documentation or examples on it.
    Does any of you know any link to documentation and/or example program for it?
    I am trying to see if train component will suffice for our needs. We have simple sequence flow, conditional branching, looping within the wizard flow (like adding repetitive items within the flow) etc.
    Thanks in advance,
    _Jp                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Here are several very simple examples of the train in UIX. I don't know of any full example program.
    <ctrl:page xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:data="http://xmlns.oracle.com/uix/ui"
    xmlns:html="http://www.w3.org/TR/REC-html40" expressionLanguage="el"
    xmlns:ui="http://xmlns.oracle.com/uix/ui">
    <ctrl:head>
    <html:title>&lt;train&gt; element</html:title>
    </ctrl:head>
    <ctrl:content xmlns:ui="http://xmlns.oracle.com/uix/ui">
    <stackLayout>
    <separator>
    <separator/>
    </separator>
    <contents>
    <link text="View Source"
    destination="${ctrl:eventUrl(uix, 'viewSource')}"/>
    <html:p/>
    <styledText styleClass="OraHeaderSubSub"
    text="Train with no children or selection"/>
    <train/>
    <styledText styleClass="OraHeaderSubSub"
    text="Train with 4 children but no selection"/>
    <train>
    <contents>
    <link text="Bali"/>
    <link text="Baja"/>
    <link text="Architecture"/>
    <link text="Release"/>
    </contents>
    </train>
    <styledText styleClass="OraHeaderSubSub"
    text="Train with 4 children and value=2"/>
    <train value="2">
    <contents>
    <link text="Bali"/>
    <link text="Baja"/>
    <link text="Architecture"/>
    <link text="Release"/>
    </contents>
    </train>
    <styledText styleClass="OraHeaderSubSub"
    text="Train with 4 children and selectedIndex=1"/>
    <train selectedIndex="1">
    <contents>
    <link text="Bali"/>
    <link text="Baja"/>
    <link text="Architecture"/>
    <link text="Release"/>
    </contents>
    </train>
    <styledText styleClass="OraHeaderSubSub"
    text="Train with 4 children and value=1 and selectedIndex=3 (value takes precedence)"/>
    <train value="1" selectedIndex="3">
    <contents>
    <link text="Bali"/>
    <link text="Baja"/>
    <link text="Architecture"/>
    <link text="Release"/>
    </contents>
    </train>
    <styledText styleClass="OraHeaderSubSub"
    text="Train with 4 children and value out of bounds low"/>
    <train value="-1">
    <contents>
    <link text="Bali"/>
    <link text="Baja"/>
    <link text="Architecture"/>
    <link text="Release"/>
    </contents>
    </train>
    <styledText styleClass="OraHeaderSubSub"
    text="Train with 4 children and value out of bounds high"/>
    <train selectedIndex="7">
    <contents>
    <link text="Bali"/>
    <link text="Baja"/>
    <link text="Architecture"/>
    <link text="Release"/>
    </contents>
    </train>
    <styledText styleClass="OraHeaderSubSub"
    text="Train with 11 children and value=1"/>
    <train value="1">
    <contents>
    <link text="Active Step1"/>
    <link text="Next Step2"/>
    <link text="Next Step3"/>
    <link text="Next Step4"/>
    <link text="Next Step5"/>
    <link text="Next Step6"/>
    <link text="Next Step7"/>
    <link text="Next Step8"/>
    <link text="Next Step9"/>
    <link text="Next Step10"/>
    <link text="Next Step11"/>
    </contents>
    </train>
    <styledText styleClass="OraHeaderSubSub"
    text="Train with 11 children and value=4"/>
    <train value="4">
    <contents>
    <link text="Visited Step1"/>
    <link text="Visited Step2"/>
    <link text="Visited Step3"/>
    <link text="Active Step4"/>
    <link text="Next Step5"/>
    <link text="Next Step6"/>
    <link text="Next Step7"/>
    <link text="Next Step8"/>
    <link text="Next Step9"/>
    <link text="Next Step10"/>
    <link text="Next Step11"/>
    </contents>
    </train>
    <styledText styleClass="OraHeaderSubSub"
    text="Train with 11 children and value=5"/>
    <train value="5">
    <contents>
    <link text="Visited Step1"/>
    <link text="Visited Step2"/>
    <link text="Visited Step3"/>
    <link text="Visited Step4"/>
    <link text="Active Step5"/>
    <link text="Next Step6"/>
    <link text="Next Step7"/>
    <link text="Next Step8"/>
    <link text="Next Step9"/>
    <link text="Next Step10"/>
    <link text="Next Step11"/>
    </contents>
    </train>
    <styledText styleClass="OraHeaderSubSub"
    text="Train with 11 children and value=6"/>
    <train value="6">
    <contents>
    <link text="Visited Step1"/>
    <link text="Visited Step2"/>
    <link text="Visited Step3"/>
    <link text="Visited Step4"/>
    <link text="Visited Step5"/>
    <link text="Active Step6"/>
    <link text="Next Step7"/>
    <link text="Next Step8"/>
    <link text="Next Step9"/>
    <link text="Next Step10"/>
    <link text="Next Step11"/>
    </contents>
    </train>
    <styledText styleClass="OraHeaderSubSub"
    text="Train with 11 children and value=7"/>
    <train value="7">
    <contents>
    <link text="Visited Step1"/>
    <link text="Visited Step2"/>
    <link text="Visited Step3"/>
    <link text="Visited Step4"/>
    <link text="Visited Step5"/>
    <link text="Visited Step6"/>
    <link text="Active Step7"/>
    <link text="Next Step8"/>
    <link text="Next Step9"/>
    <link text="Next Step10"/>
    <link text="Next Step11"/>
    </contents>
    </train>
    <styledText styleClass="OraHeaderSubSub"
    text="Train with 11 children and value=8"/>
    <train value="8">
    <contents>
    <link text="Visited Step1"/>
    <link text="Visited Step2"/>
    <link text="Visited Step3"/>
    <link text="Visited Step4"/>
    <link text="Visited Step5"/>
    <link text="Visited Step6"/>
    <link text="Visited Step7"/>
    <link text="Active Step8"/>
    <link text="Next Step9"/>
    <link text="Next Step10"/>
    <link text="Next Step11"/>
    </contents>
    </train>
    <styledText styleClass="OraHeaderSubSub"
    text="Train with 11 children and value=9"/>
    <train value="9">
    <contents>
    <link text="Visited Step1"/>
    <link text="Visited Step2"/>
    <link text="Visited Step3"/>
    <link text="Visited Step4"/>
    <link text="Visited Step5"/>
    <link text="Visited Step6"/>
    <link text="Visited Step7"/>
    <link text="Visited Step8"/>
    <link text="Active Step9"/>
    <link text="Next Step10"/>
    <link text="Next Step11"/>
    </contents>
    </train>
    <styledText styleClass="OraHeaderSubSub"
    text="Train with 11 children and value=10"/>
    <train value="10">
    <contents>
    <link text="Visited Step1"/>
    <link text="Visited Step2"/>
    <link text="Visited Step3"/>
    <link text="Visited Step4"/>
    <link text="Visited Step5"/>
    <link text="Visited Step6"/>
    <link text="Visited Step7"/>
    <link text="Visited Step8"/>
    <link text="Visited Step9"/>
    <link text="Active Step10"/>
    <link text="Next Step11"/>
    </contents>
    </train>
    <styledText styleClass="OraHeaderSubSub"
    text="Train with 11 children. User returned to step 9 (value=9, maxVisited=9)"/>
    <train value="9" maxVisited="9">
    <contents>
    <link text="Visited Step1"/>
    <link text="Visited Step2"/>
    <link text="Visited Step3"/>
    <link text="Visited Step4"/>
    <link text="Visited Step5"/>
    <link text="Visited Step6"/>
    <link text="Visited Step7"/>
    <link text="Visited Step8"/>
    <link text="Active Step9"/>
    <link text="Visited Step10"/>
    <link text="Next Step11"/>
    </contents>
    </train>
    <styledText styleClass="OraHeaderSubSub"
    text="Train with 11 children. User returned to step 5 (value=5, maxVisited=9)"/>
    <train value="5" maxVisited="9">
    <contents>
    <link text="Visited Step1"/>
    <link text="Visited Step2"/>
    <link text="Visited Step3"/>
    <link text="Visited Step4"/>
    <link text="Active Step5"/>
    <link text="Visited Step6"/>
    <link text="Visited Step7"/>
    <link text="Visited Step8"/>
    <link text="Visited Step9"/>
    <link text="Visited Step10"/>
    <link text="Next Step11"/>
    </contents>
    </train>
    <styledText styleClass="OraHeaderSubSub"
    text="Train with 6 children. All children disabled except active step"/>
    <train value="4">
    <contents>
    <link text="Disabled Step" disabled="true"/>
    <link text="Disabled Step" disabled="true"/>
    <link text="Disabled Step" disabled="true"/>
    <link text="Active Step4"/>
    <link text="Disabled Step" disabled="true"/>
    <link text="Disabled Step" disabled="true"/>
    </contents>
    </train>
    <styledText styleClass="OraHeaderSubSub"
    text="Train with 6 steps, one step disabled"/>
    <train value="5">
    <contents>
    <link text="Visited Step"/>
    <link text="Visited Step"/>
    <link text="Visited Step"/>
    <link text="Disabled Step" disabled="true"/>
    <link text="Active Step5"/>
    <link text="Next Step"/>
    </contents>
    </train>
    <styledText styleClass="OraHeaderSubSub"
    text="Train with 11 children. Step 9 Active (value=9), Steps 11 and 4 disabled"/>
    <train value="9">
    <contents>
    <link text="Visited Step1"/>
    <link text="Visited Step2"/>
    <link text="Visited Step3"/>
    <link text="Disabled Step4" disabled="true"/>
    <link text="Visited Step5"/>
    <link text="Visited Step6"/>
    <link text="Visited Step7"/>
    <link text="Visited Step8"/>
    <link text="Active Step9"/>
    <link text="Next Step10"/>
    <link text="Disabled Step11" disabled="true"/>
    </contents>
    </train>
    <styledText styleClass="OraHeaderSubSub"
    text="Train with 11 children. Step 9 Active (value=9), Steps 10 and 5 disabled"/>
    <train value="9">
    <contents>
    <link text="Visited Step1"/>
    <link text="Visited Step2"/>
    <link text="Visited Step3"/>
    <link text="Visited Step4"/>
    <link text="Disabled Step5" disabled="true"/>
    <link text="Visited Step6"/>
    <link text="Visited Step7"/>
    <link text="Visited Step8"/>
    <link text="Active Step9"/>
    <link text="Disabled Step10" disabled="true"/>
    <link text="Next Step11"/>
    </contents>
    </train>
    <styledText styleClass="OraHeaderSubSub"
    text="Train with 11 children. Step 9 Active (value=9), Steps 10 and 11 and 4 and 5 disabled"/>
    <train value="9">
    <contents>
    <link text="Visited Step1"/>
    <link text="Visited Step2"/>
    <link text="Visited Step3"/>
    <link text="Disabled Step4" disabled="true"/>
    <link text="Disabled Step5" disabled="true"/>
    <link text="Visited Step6"/>
    <link text="Visited Step7"/>
    <link text="Visited Step8"/>
    <link text="Active Step9"/>
    <link text="Disabled Step10" disabled="true"/>
    <link text="Disabled Step11" disabled="true"/>
    </contents>
    </train>
    <styledText styleClass="OraHeaderSubSub"
    text="Train with 11 children. User returned to step 5 (value=5, maxVisited=9) Step 6 is disabled"/>
    <train selectedIndex="4" maxVisited="9">
    <contents>
    <link text="Visited Step1"/>
    <link text="Visited Step2"/>
    <link text="Visited Step3"/>
    <link text="Visited Step4"/>
    <link text="Active Step5"/>
    <link text="Disabled Step6" disabled="true"/>
    <link text="Visited Step7"/>
    <link text="Visited Step8"/>
    <link text="Visited Step9"/>
    <link text="Visited Step10"/>
    <link text="Next Step11"/>
    </contents>
    </train>
    <!-- Beginning of tests with forms. Form names need to be unique -->
    <styledText styleClass="OraHeaderSubSub"
    text="Train inside a form with validation. value=4, formSubmitted=true, id is set"/>
    <styledText styleClass="OraTipText"
    text="Expected behavior is validation for next step will occur."/>
    <form name="myForm1a">
    <contents>
    <messageTextInput name="costCenter" required="yes"
    prompt="Cost Center"/>
    <train value="4" formSubmitted="true" id="TrainControl">
    <contents>
    <link text="Visited Step1"/>
    <link text="Visited Step2"/>
    <link text="Visited Step3"/>
    <link text="Active Step4"/>
    <link text="Next Step5"/>
    <link text="Next Step6"/>
    </contents>
    </train>
    </contents>
    </form>
    <styledText styleClass="OraHeaderSubSub"
    text="Train inside a form with validation. value=4, formSubmitted=true, id is set, unvalidated=true"/>
    <styledText styleClass="OraTipText"
    text="Expected behavior is validation for next step will *not* occur because unvalidated is set to true."/>
    <form name="myForm1b">
    <contents>
    <messageTextInput name="costCenter" required="yes"
    prompt="Cost Center"/>
    <train value="4" formSubmitted="true" id="TrainControl"
    unvalidated="true">
    <contents>
    <link text="Visited Step1"/>
    <link text="Visited Step2"/>
    <link text="Visited Step3"/>
    <link text="Active Step4"/>
    <link text="Next Step5"/>
    <link text="Next Step6"/>
    </contents>
    </train>
    </contents>
    </form>
    <styledText styleClass="OraHeaderSubSub"
    text="Train inside a form with validation. value=4, formSubmitted=false, destination set"/>
    <styledText styleClass="OraTipText"
    text="Expected behavior is validation will not occur. Destination will be used in url."/>
    <form name="myForm1c">
    <contents>
    <messageTextInput name="costCenter" required="yes"
    prompt="Cost Center"/>
    <train value="4" formSubmitted="false"
    destination="http://bali.us.oracle.com/cabo/baja/release.html"
    id="TrainControl">
    <contents>
    <link text="Visited Step1"/>
    <link text="Visited Step2"/>
    <link text="Visited Step3"/>
    <link text="Active Step4"/>
    <link text="Next Step5"/>
    <link text="Next Step6"/>
    </contents>
    </train>
    </contents>
    </form>
    <styledText styleClass="OraHeaderSubSub"
    text="Train inside a form with validation. value=4, formSubmitted=false, destination not set"/>
    <styledText styleClass="OraTipText"
    text="Expected behavior is no links will show"/>
    <form name="myForm2">
    <contents>
    <messageTextInput name="costCenter" required="yes"
    prompt="Cost Center"/>
    <train value="4" formSubmitted="false">
    <contents>
    <link text="Visited Step1"/>
    <link text="Visited Step2"/>
    <link text="Visited Step3"/>
    <link text="Active Step4"/>
    <link text="Next Step5"/>
    <link text="Next Step6"/>
    </contents>
    </train>
    </contents>
    </form>
    <styledText styleClass="OraHeaderSubSub"
    text="Train outside a form with validation. formName is set. id is set"/>
    <styledText styleClass="OraTipText"
    text="Expected behavior is formName will be used, and validation will occur"/>
    <form name="testForm">
    <contents>
    <messageTextInput name="costCenter" required="yes"
    prompt="Cost Center"/>
    </contents>
    </form>
    <train value="4" formName="testForm" id="TrainControl">
    <contents>
    <link text="Visited Step1"/>
    <link text="Visited Step2"/>
    <link text="Visited Step3"/>
    <link text="Active Step4"/>
    <link text="Next Step5"/>
    <link text="Next Step6"/>
    </contents>
    </train>
    <styledText styleClass="OraHeaderSubSub"
    text="Train with no form. destination and id set"/>
    <styledText styleClass="OraTipText"
    text="Expected behavior is train has links, destination is the base url"/>
    <train value="4"
    destination="http://bali.us.oracle.com/cabo/baja/release.html"
    id="TrainSource">
    <contents>
    <link text="Visited Step1"/>
    <link text="Visited Step2"/>
    <link text="Visited Step3"/>
    <link text="Active Step4"/>
    <link text="Next Step5"/>
    <link text="Next Step6"/>
    </contents>
    </train>
    <styledText styleClass="OraHeaderSubSub"
    text="Train with 11 children and destination. User returned to step 5 (value=5, maxVisited=9)"/>
    <train value="5"
    destination="http://bali.us.oracle.com/cabo/baja/release.html"
    id="TrainSource" maxVisited="9">
    <contents>
    <link text="Visited Step1"/>
    <link text="Visited Step2"/>
    <link text="Visited Step3"/>
    <link text="Visited Step4"/>
    <link text="Active Step5"/>
    <link text="Visited Step6"/>
    <link text="Visited Step7"/>
    <link text="Visited Step8"/>
    <link text="Visited Step9"/>
    <link text="Visited Step10"/>
    <link text="Next Step11"/>
    </contents>
    </train>
    <styledText styleClass="OraHeaderSubSub"
    text="subTrain Demo.
    To render a train which indicates that it is in a sub-process,
    use the train element and set the subTrain attribute to true.
    Here are a couple of examples: "/>
    <stackLayout>
    <contents>
    <styledText styleClass="OraDataText"
    text="&lt;train subTrain=&quot;true&quot; &gt;"/>
    <formattedText styleUsage="instruction" text="Train has 4 children."/>
    <train subTrain="true">
    <contents>
    <link text="Bali"/>
    <link text="Baja"/>
    <link text="Architecture"/>
    <link text="Release"/>
    </contents>
    </train>
    </contents>
    </stackLayout>
    <stackLayout>
    <contents>
    <styledText styleClass="OraDataText"
    text="&lt;train subTrain=&quot;true&quot; value=&quot;5&quot; maxVisited=&quot;9&quot;
    destination=&quot;http://www.oracle.com&quot;&gt; "/>
    <formattedText styleUsage="instruction"
    text="Train has 11 children. User returned to step 5 (value=5, maxVisited=9)"/>
    <train subTrain="true" value="5" destination="http://www.oracle.com"
    id="TrainSource" maxVisited="9">
    <contents>
    <link text="Visited Step1"/>
    <link text="Visited Step2"/>
    <link text="Visited Step3"/>
    <link text="Visited Step4"/>
    <link text="Active Step5"/>
    <link text="Visited Step6"/>
    <link text="Visited Step7"/>
    <link text="Visited Step8"/>
    <link text="Visited Step9"/>
    <link text="Visited Step10"/>
    <link text="Next Step11"/>
    </contents>
    </train>
    </contents>
    </stackLayout>
    <stackLayout>
    <contents>
    <styledText styleClass="OraDataText"
    text="Same train as above, but without the subTrain attribute set (it defaults to false)"/>
    <train value="5" destination="http://www.oracle.com"
    id="TrainSource" maxVisited="9">
    <contents>
    <link text="Visited Step1"/>
    <link text="Visited Step2"/>
    <link text="Visited Step3"/>
    <link text="Visited Step4"/>
    <link text="Active Step5"/>
    <link text="Visited Step6"/>
    <link text="Visited Step7"/>
    <link text="Visited Step8"/>
    <link text="Visited Step9"/>
    <link text="Visited Step10"/>
    <link text="Next Step11"/>
    </contents>
    </train>
    </contents>
    </stackLayout>
    </contents>
    </stackLayout>
    </ctrl:content>
    <ctrl:handlers>
    <ctrl:event name="*">
    <ctrl:null/>
    </ctrl:event>
    </ctrl:handlers>
    </ctrl:page>

  • Help with publishing component

    I've been working with the Strobe media playback package that I downloaded and installed as a component.  I have it loading videos and it is working fine in the Author mode, but not in publish mode.  I also downloaded a google maps package and installed which allows me to use google maps as a component, and it displays and works in the Author mode, but does not display in the publish instance.  Other changes show up fine in the publish mode, but it seems that all of the package components that Iv downloaded so far i can't see in the publish instance.  Can someone explain to me how to get these displaying in publish mode?  Thanks.
    -Jon

    Make sure you have activated the respective package from [1].  If you have already done that could you please eloborate more on the problem like where you have downloaded the package and what is the error you are getting in the publish.
    [1]  http://<host>:<port>/libs/wcm/core/content/misc.html#/etc/packages

  • Help with Loader component!

    hi, i've got a Loader component on a swf i call holder.swf
    i am loading an external.swf in this loader
    i have a variable called music in holder.swf.
    is there any way for me to access the variable music that was
    defined in holder.swf, from the externally loaded external.swf?
    in code:
    basically i have in "holder.swf"
    onClipEvent (load) {
    _root.myLoader.contentPath = "external.swf";
    _global.music=5;
    and in external.swf
    i am trying to do
    if(_root.music==5){
    do something;
    }

    Hi
    Won't using _global.music work (rather than _root.music)? I
    use various ways to load swf files and usually pass variables via
    _global.
    Don't think I've used your particualr load method
    though.

  • Help with creating a component: auto-sizing

    I'm trying to create a lightweight component (extends UIComponent) that supports auto-sizing (aka default sizing.) Many of the Flex component's do this, for instance mx:Button will, if you do not set a size, size itself to be "large enough to hold the label text, and any icon." How can I do this with my component?
    I tried overriding measure() and setting the measured sizes (measuredWidth, measuredHeight, measuredMinWidth, measuredMinHeight) but updateDisplayList always gets called with values of 0, 0 for unscaledWidth and unscaledHeight, and the .width and .height properties always stay at 0, 0.
    I've looked over the mx:Button code quite a bit and cannot figure out how it manages to perform default/auto-sizing. Can anyone help?
    Cheers.
    -Aaron

    You could set breakpoints to see if explicitWidth/Height is getting set in some surprising way.  Could maxWidth/maxHeight be set to 0?  That could also mess it up.
    One more thing is that the component is given its size by its parent.  If the parent is 0x0 that could also cause trouble.  Or some other part of the layout logic is trumping the measuredWidth/Height.  In theory there should be a call to setActualSize or setLayoutBoundsSize.  A breakpoint there should help you figure out the logic that determined the size.

  • How can I do live streaming with a Mac Book Pro 2011, using a new model of Sony HD camcorder which does not have firewire out/input? it comes only with a component video output, USB, HDMI and composite RCA output?

    I need to do live streaming with a Mac Book Pro 2011, using a new model of Sony HD camcorder (http://store.sony.co...ber=HDRAX2000/H) ..this camcorder model does not have firewire out/input ..it comes only with a component video output, USB, HDMI and composite A/V video output..
    I wonder how can I plug this camcorder to the firewire port of my laptop? Browsing on internet I found that Grass Valley Company produces this converter http://www.amazon.co...=A17MC6HOH9AVE6 ..but I am not sure -not even after checking the amazon reviews- if this device will send the video signal through firewire to my laptop, in order to live streaming properly? ..anyone in this forum could help me please?
    Thanx

    I can't broadcast with the built in iSight webcam... how would I zoom in or zoom out? or how would I pan? I've seem people doing it walking with their laptops but that's not an option for me... there's nothing wrong with my USB ports but that's neither an option to stream video because as far as I know through USB you can't connect video in apple operating systems ..you can for sure plug any video cam or photo camera through usb but as a drive to transfer data not as a live video camera...  is by firewire an old interface developed by apple that you can connect all sorts of cameras to apple computers... unfortunately my new sony HDR-AX2000 camcorder doesn't have firewire output...
    thanx

  • Hello everyone, hoping for some help with my new Apple Cinema Display 20"

    Hi everyone, I bought an Apple Cinema Display 20 inch LCD monitor, just about 3 weeks ago. I have two issues I am hoping to get some help with.
    1) I am using the screen on a PC with Windows XP, and I was very disappointed at the lack of PC support. I have no on screen display (OSD), so I can't see what percentage I have my brightness set to, and I can't alter the colour or contrast of the display, etc. Luckily it defaulted to very good settings, but I would really like to be able to use the (fan made?) program called "WinACD". If I would be best asking somewhere else, please direct me there. If not, my problem is that I installed it added the "Controls" tab, but it just says, Virtual Control Panel "None Present". I have tried googling for an answer, and I have seen many suggestions, but none of them worked. I installed the WinACD driver without my USB lead plugged in, and someone said that was important. So I have tried uninstalling, rebooting, then reinstalling it again with the USB plugged in, and a device plugged in to my monitor to be sure. It didn't seem to help. I have actually done this process a few times, just to be sure. So I would really like to get that working if possible.
    2) I am disappointed at the uniformity of the colour on the display. I have seen other people mention this (again, after a google search), and that someone seemed to think it is just an issue we have to deal with, with this generation of LCD monitors. Before I bought this screen, I had an NEC (20wgx2), and it had a very similar issue. Most of the time, you cannot see any problem at all, but if you display an entire screen with a dark (none prime) colour, like a dark blue green colour, you can see areas where it is slightly darker than others. It was more defined on the NEC screen, and that is why I returned it. I now bought this Apple Cinema Display, because it was the only good alternative to the NEC. (It has an 8bit S-IPS / AS-IPS panel, which was important to me). But the problem exists in this screen too. It isn't as bad thankfully, but it still exists... I have actually tried a third monitor just to be sure, and the problem existed very slightly in that one, so I think I am probably quite sensitive in that I can detect it.
    It is most noticable to me, because I do everything on this PC. I work, I watch films, and I play games. 99% of the time, I cannot see this problem. But in some games (especially one)... the problem is quite noticeable. When you pan the view around, my eyes are drawn to the slight areas on my screen which are darker, and it ruins my enjoyment. To confirm it wasn't just the game, like I said, I can use a program to make the entire screen display one solid colour, and if you pick the right type of colour (anything that isn't a bright primary colour), I can see the problem - albeit fairly faintly.
    I am pretty positive that it is not my graphics card or any other component of my PC, by the way, because everything is brand new and working perfectly, and the graphics card specifically, I have upgraded and yet the problem remains - even on the new card. Also, the areas that are darker, are different on this screen than on the other screens I have used.
    So basically, I would like to register my disappointment at the lack of perfect uniformity on a screen which cost me £400 (over double what most 20 inch LCD screens cost), and I would like to know if anybody could possibly suggest a way to fix it?
    It is upsetting, becuase although this problem exists on other screens too, this is, as far as I know, the most expensive 20" LCD monitor available today, and uses the best technology available too.
    p.s. If anyone would like to use the program that lets you set your entire PC screen a specific colour, it is called "Dead Pixel Buddy", and it is a free piece of software, made by somebody to check for dead pixels. But I found it useful for other things too, including looking at how uniform the colour of the screen is. That's not to say I was specifically looking for this problem by the way... the problem cought my eye.
    Thanks in advance!
    Message was edited by: telelove

    I've been talking about this on another forum too, and I made some pictures in photoshop to describe the problem. Here is what I posted on the other forum:
    Yes, "brightness uniformity" definitely seems to be the best description of my issue.
    Basically it just seems like there are very faint lines down the screen, that are slightly darker than the other areas on the screen. They aren't defined lines, and they aren't in a pattern. It's just slight areas that are darker, and the areas seem like narrow bands/lines. Usually you can't see it, but in some cases, it is quite noticeable. It is mainly when I'm playing a game. The slightly darker areas are not visible, and then when the image moves (because I am turning in a car, or turning a plane, or turning in a shooter etc.) the image moves, but these slightly darker areas stay still, and that makes them really stand out.
    As for how it looks, I tried to make an example in photoshop:
    Original Image:
    http://img340.imageshack.us/img340/3045/td1ja9.jpg
    Then imagine turning the car around a bend, and then it looks like this:
    http://img266.imageshack.us/img266/959/td2hq7.jpg
    It's those lines in the clouds. If you can tab between the two images, you can see the difference easily. Imagine seeing those lines appear, every single time you move in a game. (I haven't tested this in movies yet, but I am assuming it's the same).
    It isn't very clear on a static image. But when the image moves, the darker areas stay in the same place and it draws your eyes towards them. It isn't terrible, but it is annoying, especially consider how much this screen cost.
    Message was edited by: telelove

  • Please I need some help with a table

    Hi All
    I need some help with a table.
    My table needs to hold prices that the user can update.
    Also has a total of the column.
    my question is if the user adds in a new price how can i pick up the value they have just entered and then add it to the total which will be the last row in the table?
    I have a loop that gets all the values of the column, so I can get the total but it is when the user adds in a new value that I need some help with.
    I have tried using but as I need to set the toal with something like total
        totalTable.setValueAt(total, totalTable.getRowCount()-1,1); I end up with an infinite loop.
    Can any one please advise on some way I can get this to work ?
    Thanks for reading
    Craig

    Hi there camickr
    thanks for the help the other day
    this is my full code....
    package printing;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.print.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.text.DecimalFormat;
    public class tablePanel
        extends JDialog  implements Printable {
      BorderLayout borderLayout1 = new BorderLayout();
      private boolean printing = false;
      private Dialog1 dialog;
      JPanel jPanel = new JPanel();
      JTable table;
      JScrollPane scrollPane1 = new JScrollPane();
      DefaultTableModel model;
      private String[] columnNames = {
      private Object[][] data;
      private String selectTotal;
      private double total;
      public tablePanel(Dialog1 dp) {
        dp = dialog;
        try {
          jbInit();
        catch (Exception exception) {
          exception.printStackTrace();
      public tablePanel() {
        try {
          jbInit();
        catch (Exception exception) {
          exception.printStackTrace();
      private void jbInit() throws Exception {
        jPanel.setLayout(borderLayout1);
        scrollPane1.setBounds(new Rectangle(260, 168, 0, 0));
        this.add(jPanel);
        jPanel.add(scrollPane1, java.awt.BorderLayout.CENTER);
        scrollPane1.getViewport().add(table);
        jPanel.setOpaque(true);
        newTable();
        addToModel();
        addRows();
        setTotal();
    public static void main(String[] args) {
      tablePanel tablePanel = new  tablePanel();
      tablePanel.pack();
      tablePanel.setVisible(true);
    public void setTotal() {
      total = 0;
      int i = table.getRowCount();
      for (i = 0; i < table.getRowCount(); i++) {
        String name = (String) table.getValueAt(i, 1);
        if (!"".equals(name)) {
          if (i != table.getRowCount() - 1) {
            double dt = Double.parseDouble(name);
            total = total + dt;
      String str = Double.toString(total);
      table.setValueAt(str, table.getRowCount() - 1, 1);
      super.repaint();
      public void newTable() {
        model = new DefaultTableModel(data, columnNames) {
        table = new JTable() {
          public Component prepareRenderer(TableCellRenderer renderer,
                                           int row, int col) {
            Component c = super.prepareRenderer(renderer, row, col);
            if (printing) {
              c.setBackground(getBackground());
            else {
              if (row % 2 == 1 && !isCellSelected(row, col)) {
                c.setBackground(getBackground());
              else {
                c.setBackground(new Color(227, 239, 250));
              if (isCellSelected(row, col)) {
                c.setBackground(new Color(190, 220, 250));
            return c;
        table.addMouseListener(new MouseAdapter() {
          public void mouseClicked(MouseEvent e) {
            if (e.getClickCount() == 2) {
            if (e.getClickCount() == 1) {
              if (table.getSelectedColumn() == 1) {
       table.setTableHeader(null);
        table.setModel(model);
        scrollPane1.getViewport().add(table);
        table.getColumnModel().getColumn(1).setCellRenderer(new TableRenderDollar());
      public void addToModel() {
        Object[] data = {
            "Price", "5800"};
        model.addRow(data);
      public void addRows() {
        int rows = 20;
        for (int i = 0; i < rows; i++) {
          Object[] data = {
          model.addRow(data);
      public void printOut() {
        PrinterJob pj = PrinterJob.getPrinterJob();
        pj.setPrintable(tablePanel.this);
        pj.printDialog();
        try {
          pj.print();
        catch (Exception PrintException) {}
      public int print(Graphics g, PageFormat pageFormat, int pageIndex) throws PrinterException {
        Graphics2D g2 = (Graphics2D) g;
        g2.setColor(Color.black);
        int fontHeight = g2.getFontMetrics().getHeight();
        int fontDesent = g2.getFontMetrics().getDescent();
        //leave room for page number
        double pageHeight = pageFormat.getImageableHeight() - fontHeight;
        double pageWidth =  pageFormat.getImageableWidth();
        double tableWidth = (double) table.getColumnModel().getTotalColumnWidth();
        double scale = 1;
        if (tableWidth >= pageWidth) {
          scale = pageWidth / tableWidth;
        double headerHeightOnPage = 16.0;
        //double headerHeightOnPage = table.getTableHeader().getHeight() * scale;
        //System.out.println("this is the hedder heigth   " + headerHeightOnPage);
        double tableWidthOnPage = tableWidth * scale;
        double oneRowHeight = (table.getRowHeight() +  table.getRowMargin()) * scale;
        int numRowsOnAPage = (int) ( (pageHeight - headerHeightOnPage) / oneRowHeight);
        double pageHeightForTable = oneRowHeight *numRowsOnAPage;
        int totalNumPages = (int) Math.ceil( ( (double) table.getRowCount()) / numRowsOnAPage);
        if (pageIndex >= totalNumPages) {
          return NO_SUCH_PAGE;
        g2.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
    //bottom center
        g2.drawString("Page: " + (pageIndex + 1 + " of " + totalNumPages),  (int) pageWidth / 2 - 35, (int) (pageHeight + fontHeight - fontDesent));
        g2.translate(0f, headerHeightOnPage);
        g2.translate(0f, -pageIndex * pageHeightForTable);
        //If this piece of the table is smaller
        //than the size available,
        //clip to the appropriate bounds.
        if (pageIndex + 1 == totalNumPages) {
          int lastRowPrinted =
              numRowsOnAPage * pageIndex;
          int numRowsLeft =
              table.getRowCount()
              - lastRowPrinted;
          g2.setClip(0,
                     (int) (pageHeightForTable * pageIndex),
                     (int) Math.ceil(tableWidthOnPage),
                     (int) Math.ceil(oneRowHeight *
                                     numRowsLeft));
        //else clip to the entire area available.
        else {
          g2.setClip(0,
                     (int) (pageHeightForTable * pageIndex),
                     (int) Math.ceil(tableWidthOnPage),
                     (int) Math.ceil(pageHeightForTable));
        g2.scale(scale, scale);
        printing = true;
        try {
        table.paint(g2);
        finally {
          printing = false;
        //tableView.paint(g2);
        g2.scale(1 / scale, 1 / scale);
        g2.translate(0f, pageIndex * pageHeightForTable);
        g2.translate(0f, -headerHeightOnPage);
        g2.setClip(0, 0,
                   (int) Math.ceil(tableWidthOnPage),
                   (int) Math.ceil(headerHeightOnPage));
        g2.scale(scale, scale);
        //table.getTableHeader().paint(g2);
        //paint header at top
        return Printable.PAGE_EXISTS;
    class TableRenderDollar extends DefaultTableCellRenderer{
        public Component getTableCellRendererComponent(
          JTable table,
          Object value,
          boolean isSelected,
          boolean isFocused,
          int row, int column) {
            setHorizontalAlignment(SwingConstants.RIGHT);
          Component component = super.getTableCellRendererComponent(
            table,
            value,
            isSelected,
            isFocused,
            row,
            column);
            if( value == null || value .equals("")){
              ( (JLabel) component).setText("");
            }else{
              double number = 0.0;
              number = new Double(value.toString()).doubleValue();
              DecimalFormat df = new DecimalFormat(",##0.00");
              ( (JLabel) component).setText(df.format(number));
          return component;
    }

  • Help with form sending the data to email

    I have looked all over the Internet for help with this.  I have tried numerous video tutorials and for some reason I can't get it to work.  I have created a form in flash cs4 AS2.  It is a contact information form where the user fills out their information and sends it.  I have created a the form in a movie clip (I have also tried it not in a movie clip) with the form components inside that movie clip.  I have given each component on the form an instance name.
    The form has:
    Full name (with instance name=name)
    Company (with IN =company)
    Title (with IN = title)
    Phone (with IN = phone)
    Email (with IN = email)
    Topic combobox (with IN=topic)
    Message box (with IN=msg)
    Submit button (with IN=submit)
    I need help with the actionscript writing.  I am VERY new to flash and have never done any scripting really.  Does anyone have a sample file I can look at to see how it works or can someone IM me and I can send my file for them to help me?
    My IM is logan3975
    Any help is greatly appreciated.  I consider myself a pretty technical person so I do learn quick...I just need some guidance until I wrap my head around how this all works.  Thanks.

    Here's a link to a posting elsewhere some had had that may provide some useful info (?)
    http://board.flashkit.com/board/showthread.php?t=684031

  • Help with final Graduation Project

    I've done with the majority of it, however I need help with the remove method for a B tree. when removing from a non-leaf node, your remove must replace the removed item with the smallest item in the right subtree.
    The code:
    import java.util.Stack;
    public class BTreeG<E extends Comparable< ? super E>> {
        // Each Btree object is a B-tree header.
        // This B-tree is represented as follows: order is the maximum number
        // of children per node, and root is a link to its root node.
        // Each B-tree node is represented as follows: size contains its size; a
        // subarray items[0...size-1] contains its elements; and a subarray
        // childs[0...size] contains links to its child nodes. For each element
        // items, childs[i] is a link to its left child, and childs[i+1] is a
    // link to its right child. In a leaf node, all child links are null.
    // Moreover, for every element x in the left subtree of element y:
    // x.compareTo(y) < 0
    // and for every element z in the right subtree of element y:
    // z.compareTo(y) > 0.
    private final int order;
    private Node root;
    public BTreeG () {
         // Construct an empty B-tree of order 5.
    this(5);
    public BTreeG (int k) {
    // Construct an empty B-tree of order k.
    root = null;
    order = k;
    public E get(E item){
    if (root == null)
    return null;
    Node node = root;
    while (true) {
    int pos = node.searchInNode(item);
    if (item.equals(node.items[pos]))
    return (E)node.items[pos];
    else if (node.isLeaf())
    return null;
    else
    node = node.childs[pos];
    public void insert (E item) {
    // Insert element item into this B-tree.
    if (root == null) {
    root = new Node( item);
    return;
    Stack ancestors = new Stack();
    Node curr = root;
    while (true) {
    int currPos = curr.searchInNode(item);
    if (item.equals(curr.items[currPos]))
    return;
    else if (curr.isLeaf()) {
    curr.insertInNode(item, null, null, currPos);
    if (curr.size == order) // curr has overflowed
    splitNode(curr, ancestors);
    return;
    } else {
    ancestors.push(new Integer(currPos));
    ancestors.push(curr);
    curr = curr.childs[currPos];
    private void splitNode (Node node,
    Stack ancestors) {
    // Split the overflowed node in this B-tree. The stack ancestors contains
    // all ancestors of node, together with the known insertion position
    // in each of these ancestors.
    int medPos = node.size/2;
    E med = (E)node.items[medPos];
    Node leftSib = new Node(
    node.items, node.childs, 0, medPos);
    Node rightSib = new Node(
    node.items, node.childs, medPos+1, node.size);
    if (node == root)
    root = new Node( med, leftSib,
    rightSib);
    else {
    Node parent =
    (Node) ancestors.pop();
    int parentIns = ((Integer)
    ancestors.pop()).intValue();
    parent.insertInNode(med, leftSib, rightSib,
    parentIns);
    if (parent.size == order) // parent has overflowed
    splitNode(parent, ancestors);
    public void remove (E item) {
         // your code goes here
    public void print () {
    // Print a textual representation of this B-tree.
    printSubtree(root, "");
    private void printSubtree (Node top, String indent) {
    // Print a textual representation of the subtree of this B-tree whose
    // topmost node is top, indented by the string of spaces indent.
    if (top == null)
    System.out.println(indent + "o");
    else {
    System.out.println(indent + "o-->");
    boolean isLeaf = top.isLeaf();
    String childIndent = indent + " ";
    for (int i = 0; i < top.size; i++) {
    if (! isLeaf) printSubtree(top.childs[i], childIndent);
    System.out.println(childIndent + top.items[i]);
    if (! isLeaf) printSubtree(top.childs[top.size], childIndent);
    //////////// Inner class ////////////
    private class Node<E extends Comparable< ? super E>>
    // Each Node object is a B-tree node.
    private int size;
    private E[] items;
    private Node[] childs;
         private Node (E item) {
         this (item, null, null);
    private Node (E item, Node left, Node right) {
    // Construct a B-tree node of order k, initially with one element, item,
    // and two children, left and right.
    items = (E[])new Comparable[order];
    childs = new Node[order+1];
    // ... Each array has one extra component, to allow for possible
    // overflow.
    this.size = 1;
    this.items[0] = item;
    this.childs[0] = left;
    this.childs[1] = right;
    private Node ( E[] items, Node[] childs, int l, int r) {
    // Construct a B-tree node of order k, with its elements taken from the
    // subarray items[l...r-1] and its children from the subarray
    // childs[l...r].
    this.items = (E[])new Comparable[order];
    this.childs = new Node[order+1];
    this.size = 0;
    for (int j = l; j < r; j++) {
    this.items[this.size] = items[j];
    this.childs[this.size] = childs[j];
    this.size++;
    this.childs[this.size] = childs[r];
    private boolean isLeaf () {
    // Return true if and only if this node is a leaf.
    return (childs[0] == null);
    private int searchInNode (E item) {
    // Return the index of the leftmost element in this node that is
    // not less than item.
    int l = 0, r = size-1;
    while (l <= r) {
    int m = (l + r)/2;
    int comp = item.compareTo((E)items[m]);
    if (comp == 0)
    return m;
    else if (comp < 0)
    r = m - 1;
    else
    l = m + 1;
    return l;
    private void insertInNode (E item, Node leftChild,
    Node<E> rightChild, int ins) {
    // Insert element item, with children leftChild and rightChild, at
    // position ins in this node.
    for (int i = size; i > ins; i--) {
    items[i] = items[i-1];
    childs[i+1] = childs[i];
    size++;
    items[ins] = item;
    childs[ins] = leftChild;
    childs[ins+1] = rightChild;

    I've done with the majority of it, however I need
    help with the remove method for a B tree. when
    removing from a non-leaf node, your remove must
    replace the removed item with the smallest item in
    the right subtree. It's hard to implement a B tree. That's why you rather use a standard implementation. If not you're basically on your own. Don't expect others to do it for you. Why should they bother? Please tell us when you're finished and where we can download you B-tree implementation -:)

  • Help with systemd problems/reply to closed thread

    @Everyone; as the previopus topic was closed, I am opening a new one here, partly to reply to some things that was said to me in the previous thread/topic (and I do not like to leave people hanging), but mainly to try and get some help with my systemd config (that I was not able to find help with in the wiki or manpages).
    @czubek; eww, that sounds rather similiar to some other operating systems I've heard of (not just, but obviously including, windows)... For me, subjectively, that is not very attractive, as being able to have a single application do a single thing, and then mixing and matching as I personally see fit is a great thing.
    @tomegun: I can indeed see your point, but if I made direct quotes on all the things I reply too, my posts would reach biblical proportions.
    Mmm-hmm, I do indeed know of "the Arch Way"; however, the system that you expose can be of varying complexity as well, and I found that the system that was presented to me by way of Sysvinit/initscripts was a way simpler system than that presented to me by systemd.
    Indeed, and I do like that; I enjoy knowing how my system works and learning more about it; however, the truth is that reading manpages and the wiki isn't always enough. And I use the numbers instead of letters in certain places as a jest, please, do not get offended by that; if you have to, get offended by my opinions.
    Ah, I have now scanned the wiki, the manpages, and have already faced problems. While part of me is saddened by this fact (as I was hoping for a smooth transition to systemd), part of me is glad that I can at least prove that everything isn't quite as simple as some people would make it out to be. More on this later in this post, as I do need help with the problems I have faced.
    And I wouldn't say that the new and old way are equally trivial, as I immediatley faced problems with "the new way". More on this later.
    Ok, I find that if the debate is polarized, then there is nothing wrong with describing it as such. I spell what I see.
    Oh my... Ignored as a matter of principle? I would say that that is an excellent way to stagnate; by that logic, moviemakers, gamemakers etcetera should ignore any and all criticism they recieve, as the critics are not contributing.... Wouldn't that lead to a complete halt in development? Isn't criticism (so long as it is constructive, obviously) a key component of (media/software) evolution?
    Ah, I see, then I  misunderstood the current state of the install media
    "Some adjustements"... Well, I guess we'll have to see how that goes, then. Hopefully it'll be smooth.
    @Everyone; Awebb possesses stunning accuracy as far as his observations go.
    @zb3; My point exactly.
    @tomegun; I believe you to be wrong; complaining (but not whining) is the first step towards improvement, as I think that I and zb3 has shown.
    Further, your last point (where you talk about "deep understanding of Y" and whatnot) is basically saying that only devs and programmers can contribute, so zb3's observation would be correct.
    Also, making suggestions is part of constructive criticism; you can do that even if you can't code, e.g. by saying "X works badly because it makes Y crash; couldn't we replace X with something akin to Z?". This is a valid point even if you have no intricate understanding of X, Y or Z, and if it is impossible to replace X for one reason or the other, it's not hard to reply with "Replacing X is impossible because of reason Q", and then see if someone can solve reason Q etcetera.
    zb3's example is obviously helping; for one, it would allow people to know taht they can't boot with systemd in certain cases, or that installing/runing systemd can break their system. I would consider that rather important information.
    @Everyone; Now then, to see if I can (or rather, if I can get help to) shed some light on some problems I've been having.
    My transition to systemd went pretty smooth (besides the fact that I couldn't use 'systemctl' to set anything, and neither duckduckgo nor any posts in the forums could help me (the error I continously got was "Failed to issue method call: Launch helper exited with unknown return code 1") and that there are no manpages/tips on how to configure the files for "localtime" and "adjtime", which would've been good considering some syntax have changed) to about halfway through, to the point where I was supposed to start using systemd for my daemons.
    Now then, to the main problem; first, I tried running
    "systemctl enable syslog-ng.service"
    and got the following message;
    "ln -s '/usr/lib/systemd/system/syslog-ng.service' '/etc/systemd/system/syslog.service'
    ln -s '/usr/lib/systemd/system/syslog-ng.service' '/etc/systemd/system/multi-user.target.wants/syslog-ng.service'"
    Since it doesn't exclusively say that something went wrong (at least as far as I can understand), I pondered the message a bit, but moved on to try and start dbus by issuing
    "systemctl enable dbus.service",
    to which I got the reply
    "The unit files have no [Install] section. They are not meant to be enabled using systemctl."
    This I can only assume is an error message of some sort, especially seeing as it says "not meant to be enabled using systemctl", but the wiki rather explicitly states that that is what I am supposed to do.
    I dare not move on (or attempt to start other daemons) without further advice, as I fear I might break my system. Any ideas as to how to solve this would be greatly appreciated.

    tcmdvm wrote:
    The message;
    "ln -s '/usr/lib/systemd/system/syslog-ng.service' '/etc/systemd/system/syslog.service'
    ln -s '/usr/lib/systemd/system/syslog-ng.service' '/etc/systemd/system/multi-user.target.wants/syslog-ng.service'"
    indicates that running "systemctl enable syslog.service" is now enabled.
    If you try running sytemtctl enable <whatever>.service and get
    "The unit files have no [Install] section. They are not meant to be enabled using systemctl." means there is no <whatever>.service file available to enable.
    The dbus.service as far as I know is already enabled when installing systemd and doesn't require any action.
    Ah, right, systemd is chatty (I'm of the old skool; if nothing is/goes wrong, a program should keep quiet).
    Oh ok, then I should dare more on.
    ZekeSulastin wrote:To be a bit more precise, it means the service is there but it's only used as a dependency for something else; the [Install] section of the file is what tells systemctl where to link it and such.  Also, where exactly in the wiki were you told explicitly to 'systemctl enable dbus.service'?  I can easily point you to the sections in both installation guides that tell you how to set things like /etc/localtime et. al (also `man 7 archlinux`), but not the one that said to manually enable dbus.
    Ah, I see; and well, I was told right here, going from the top, to "Enable Daemons formerly listed in rc.conf [...] For a translation of the daemons from /etc/rc.conf to systemd services, see: List of Daemons and Services.", and, using the list, dbus is mentioned there, as you can see. Since I started from the top, I did not know that you didn't need to enable that service. Perhaps it could be added to the descriptions of the relevant services in the Wiki which ones are autostarted?
    ZekeSulastin wrote:Lastly, I don't think trying to continue conversations from a closed thread is a very good idea, let alone doing it in a giant undivided wall of text that makes it quite difficult to pick out much any single topic.
    Meh, I directly refer to the relevant people, they can easily see their own old posts in the previous thread, etcetera... I think te ones who have something to say will be able to find my replies to their previous statements (or so I hope). For now, as everyone can see, I quote stuff (but man might I make some huge posts if I ever post again in the future, if I quote what I reply to).
    fsckd wrote:This is not really a technical support subforum. Moving from Arch Discussion to Newbie Corner.
    Ah ok, thanks (or perhaps a cautious thanks? Moving it to "newbie corner" might, after all, be a subtle insult...).
    tomegun wrote:It is not really possible to follow your message as you don't quote what you are replying to. Moreover, as the thread was closed I think that means we should stop the discussion ;-)
    Hmm, I think it means cop-out for lack or proper arguments/responses... But ok, I'll let it slide, for now (mainly as I can't do much else).
    tomegun wrote:You are not meant to enable dbus.service as it is enabled unconditionally. To check the enabled/disabled state of your services try "systemctl list-unit-files". "static" means that you are not supposed to enabled/disable it.
    Ah ok, thank you. Now, having abandoned all hope, I'll start configuring again and see how it goes... May the void protect me. If I die, grieve not for me, but remember me in the fight against hard-to-configure applications.
    (edit/addon)
    Actually, what am I supposed to do with "hwclock"? the List of Daemons only says that I shouldn't run that in tandem with ntpd, but I'm not running ntpd, so... How do I get hwclock with systemd?
    Edited for additional question.
    Last edited by incassum (2012-11-07 08:44:42)

  • Help with Paint program.

    Hello. I am somewhat new to Java and I was recently assigned to do a simple paint program. I have had no trouble up until my class started getting into the graphical functions of Java. I need help with my program. I am supposed to start off with a program that draws lines and changes a minimum of 5 colors. I have the line function done but my color change boxes do not work and I am able to draw inside the box that is supposed to be reserved for color buttons. Here is my code so far:
    // Lab13110.java
    // The Lab13 program assignment is open ended.
    // There is no provided student version for starting, nor are there
    // any files with solutions for the different point versions.
    // Check the Lab assignment document for additional details.
    import java.applet.Applet;
    import java.awt.*;
    public class Lab13110 extends Applet
         int[] startX,startY,endX,endY;
         int currentStartX,currentStartY,currentEndX,currentEndY;
         int lineCount;
         Rectangle red, green, blue, yellow, black;
         int numColor;
         Image virtualMem;
         Graphics gBuffer;
         int rectheight,rectwidth;
         public void init()
              startX = new int[100];
              startY = new int[100];
              endX = new int[100];
              endY = new int[100];
              lineCount = 0;
              red = new Rectangle(50,100,25,25);
              green = new Rectangle(50,125,25,25);
              blue = new Rectangle(50,150,25,25);
              yellow = new Rectangle(25,112,25,25);
              black = new Rectangle(25,137,25,25);
              numColor = 0;
              virtualMem = createImage(100,600);
              gBuffer = virtualMem.getGraphics();
              gBuffer.drawRect(0,0,100,600);
         public void paint(Graphics g)
              for (int k = 0; k < lineCount; k++)
                   g.drawLine(startX[k],startY[k],endX[k],endY[k]);
              g.drawLine(currentStartX,currentStartY,currentEndX,currentEndY);
              g.setColor(Color.red);
              g.fillRect(50,100,25,25);
              g.setColor(Color.green);
              g.fillRect(50,125,25,25);
              g.setColor(Color.blue);
              g.fillRect(50,150,25,25);
              g.setColor(Color.yellow);
              g.fillRect(25,112,25,25);
              g.setColor(Color.black);
              g.fillRect(25,137,25,25);
              switch (numColor)
                   case 1:
                        g.setColor(Color.red);
                        break;
                   case 2:
                        g.setColor(Color.green);
                        break;
                   case 3:
                        g.setColor(Color.blue);
                        break;
                   case 4:
                        g.setColor(Color.yellow);
                        break;
                   case 5:
                        g.setColor(Color.black);
                        break;
                   case 6:
                        g.setColor(Color.black);
                        break;
              g.setColor(Color.black);
              g.drawRect(0,0,100,575);
         public boolean mouseDown(Event e, int x, int y)
              currentStartX = x;
              currentStartY = y;
              if(red.inside(x,y))
                   numColor = 1;
              else if(green.inside(x,y))
                   numColor = 2;
              else if(blue.inside(x,y))
                   numColor = 3;
              else if(yellow.inside(x,y))
                   numColor = 4;
              else if(black.inside(x,y))
                   numColor = 5;
              else
                   numColor = 6;
              repaint();
              return true;
         public boolean mouseDrag(Event e, int x, int y)
              int Rectheight = 500;
              int Rectwidth = 900;
              currentEndX = x;
              currentEndY = y;
              Rectangle window = new Rectangle(0,0,900,500);
              //if (window.inside(Rectheight,Rectwidth))
                   repaint();
              return true;
         public boolean mouseUp(Event e, int x, int y)
              int Rectheight = 500;
              int Rectwidth = 900;
              startX[lineCount] = currentStartX;
              startY[lineCount] = currentStartY;
              endX[lineCount] = x;
              endY[lineCount] = y;
              lineCount++;
              Rectangle window = new Rectangle(0,0,900,500);
              if (window.inside(Rectheight,Rectwidth))
                   repaint();
              return true;
         public void Rectangle(Graphics g, int x, int y)
              g.setColor(Color.white);
              Rectangle screen = new Rectangle(100,0,900,600);
    }If anyone could point me in the right direction of how to go about getting my buttons to work and fixing the button box, I would be greatly appreciative. I just need to get a little bit of advice and I think I should be good after I get this going.
    Thanks.

    This isn't in any way a complete solution, but I'm posting code for a mouse drag outliner. This may be preferable to how you are doing rectangles right now
    you are welcome to use and modify this code but please do not change the package and make sure that you tell your teacher where you got it from
    MouseDragOutliner.java
    package tjacobs.ui;
    import java.awt.BasicStroke;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Container;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.Point;
    import java.awt.Stroke;
    import java.awt.event.*;
    import java.util.ArrayList;
    import java.util.Iterator;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    * See the public static method addAMouseDragOutliner
    public class MouseDragOutliner extends MouseAdapter implements MouseMotionListener {
         public static final BasicStroke DASH_STROKE = new BasicStroke(1.0f, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_BEVEL, 10.0f, new float[] {8, 8}, 0);
         private boolean mUseMove = false;
         private Point mStart;
         private Point mEnd;
         private Component mComponent;
         private MyRunnable mRunner= new MyRunnable();
         private ArrayList mListeners = new ArrayList(1);
         public MouseDragOutliner() {
              super();
         public MouseDragOutliner(boolean useMove) {
              this();
              mUseMove = useMove;
         public void mouseDragged(MouseEvent me) {
              doMouseDragged(me);
         public void mousePressed(MouseEvent me) {
              mStart = me.getPoint();
         public void mouseEntered(MouseEvent me) {
              mStart = me.getPoint();
         public void mouseReleased(MouseEvent me) {
              Iterator i = mListeners.iterator();
              Point end = me.getPoint();
              while (i.hasNext()) {
                   ((OutlineListener)i.next()).mouseDragEnded(mStart, end);
              //mStart = null;
         public void mouseMoved(MouseEvent me) {
              if (mUseMove) {
                   doMouseDragged(me);
         public     void addOutlineListener(OutlineListener ol) {
              mListeners.add(ol);
         public void removeOutlineListener(OutlineListener ol) {
              mListeners.remove(ol);
         private class MyRunnable implements Runnable {
              public void run() {
                   Graphics g = mComponent.getGraphics();
                   if (g == null) {
                        return;
                   Graphics2D g2 = (Graphics2D) g;
                   Stroke s = g2.getStroke();
                   g2.setStroke(DASH_STROKE);
                   int x = Math.min(mStart.x, mEnd.x);
                   int y = Math.min(mStart.y, mEnd.y);
                   int w = Math.abs(mEnd.x - mStart.x);
                   int h = Math.abs(mEnd.y - mStart.y);
                   g2.setXORMode(Color.WHITE);
                   g2.drawRect(x, y, w, h);
                   g2.setStroke(s);
         public void doMouseDragged(MouseEvent me) {
              mEnd = me.getPoint();
              if (mStart != null) {
                   mComponent = me.getComponent();
                   mComponent.repaint();
                   SwingUtilities.invokeLater(mRunner);
         public static MouseDragOutliner addAMouseDragOutliner(Component c) {
              MouseDragOutliner mdo = new MouseDragOutliner();
              c.addMouseListener(mdo);
              c.addMouseMotionListener(mdo);
              return mdo;
         public static interface OutlineListener {
              public void mouseDragEnded(Point start, Point finish);
         public static void main(String[] args) {
              JFrame f = new JFrame("MouseDragOutliner Test");
              Container c = f.getContentPane();
              JPanel p = new JPanel();
              //p.setBackground(Color.BLACK);
              c.add(p);
              addAMouseDragOutliner(p);
              f.setBounds(200, 200, 400, 400);
              f.addWindowListener(new WindowClosingActions.Exit());
              f.setVisible(true);
    }

Maybe you are looking for

  • Flash player doesn't display correctly

    I am having problems loading customized flash players, such as those on Blizzard's website. Please see the link below: http://s847.photobucket.com/albums/ab34/blizzarc_xorder/Flash%20Player%20Problem /?action=view&current=screen-capture.png The playe

  • Master Plan - problem with calendar into Subproject

    If the save in the sub-project baseline and then connecting it to the master plan during the publication of the master plan, an error is returned "not found the appropriate calendar project............". The solution is to first connect the subprojec

  • Exporting photoshop cs3 docs into Illustrator cs3

    I used the pen tool to trace around the face of a coin, saved it to a transparent background png. I need to export this file to Illustrator so I can use the 3D effect to rotate it. I tried to export as ai. command and when the doc is opened in Illust

  • How to calculate median in BEX

    Hi, How can I calculate median value of a keyfigure in bex? It should not be calculated as Result but as Single Value. Example - I have Ticket Number, Ticket Resolution Date as Chars and Resolution Time in terms of days as KF. I want to calculate med

  • When I populate a form and send to my printer, the form prints without the info I entered

    When I populate a form and send to my printer, the form prints without the info I entered. How do I fix this?