Filter and sorter Problem

Hi All
hope someone can help me in this issue.
if i build a list view from a table the filters and sorter are working fine, but if i build it using a recordset i get a page has this on it:
Connection Interrupted
The document contains no data.
The network link was interrupted while negotiating a connection. Please try again.
am i missing something in here ?!?!?
here is the code for my page..
http://twayns.150m.com/
thnx

-------
but is ther any reason why the Site Root does not work?
ADDT (and also DW´s own rudimentary PHP server behaviours) does require this setting for loading "related" files which are relative to the current document -- blame it on the "internal design" if you like, but that´s how it works ;-)
but when try to filter using any data i got the message (underneath the menus): the table is empty or the filter is too restrictive!!!
this means that filtering the table didn´t return any records for a reason which ADDT just doesn´t know, that´s why you´re getting this general message returned.
If you´d like to change this message to something more meaningful like "No records found, please try with another filter setting", open the file "includes/resources/NXT.res.php" and change the line...
'The table is empty or the filter you\'ve selected is too restrictive.' => 'The table is empty or the filter you\'ve selected is too restrictive.',
...to...
'The table is empty or the filter you\'ve selected is too restrictive.' => 'No records found, please try with another filter setting.',
Rule of thumb when editing ADDT´s "language files" which are all assembled in that "resources" folder: Only change the text string that´s displayed *after* the => sign, and always make sure not to accidently delete the surrounding ''
Cheers,
Günter Schenk
Adobe Community Expert, Dreamweaver

Similar Messages

  • WebPart: Display the search result in an spgridview with filter and sort

    hi,
    For explain more in details.
    I need the search result in a table displaying some meta common in the different library.
    I've to have the possibility to filter and sort the grid.
    i'm trying to extend Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart
    i can have the result from the textbox search with: SharedQueryManager.GetInstance(this.Page).QueryManager
    My queryManager is populate in the method: CreateChildControls
    I put the sample code i use. and in the populateData method, my querymanager is null while in the createChildContriol, it's correctly populate with : this.queryManager = SharedQueryManager.GetInstance(this.Page).QueryManager;
    using System;
    using System.ComponentModel;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.WebControls;
    using Microsoft.SharePoint.Search.Internal.WebControls;
    using Microsoft.Office.Server.Search.Query;
    using Microsoft.Office.Server.Search.WebControls;
    using System.Data;
    using System.Xml;
    namespace CustomSearchResultWebPart.CustomCoreResultWebPart
    [ToolboxItemAttribute(false)]
    public class CustomCoreResultWebPart : Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart
    private ObjectDataSource objDS;
    private const string ObjectDataSourceID = "gridViewDataSource";
    private QueryManager queryManager;
    private SPGridView gridView = new SPGridView();
    protected override void CreateChildControls()
    //here is correctly populate
    this.queryManager = SharedQueryManager.GetInstance(this.Page).QueryManager;
    try
    LoadSearchGrid();
    catch (Exception ex)
    Page.Response.Write(ex.Message + " - " + ex.StackTrace);
    //base.CreateChildControls();
    protected override void OnInit(EventArgs e)
    base.OnInit(e);
    protected override void OnLoad(EventArgs e)
    base.OnLoad(e);
    protected override void OnPreRender(EventArgs e)
    //gridView.DataBind();
    base.OnPreRender(e);
    protected override void Render(HtmlTextWriter writer)
    base.Render(writer);
    public DataTable populateData()
    DataSet dtSet = null;
    DataTable dtTable = null;
    //here is my query manager is null
    if (queryManager != null && queryManager.Count > 0)
    XmlDocument xdoc = new XmlDocument(); //We are using XmlDocument
    xdoc = queryManager.GetResults(queryManager[0]);//xml returned by search
    if (xdoc != null)
    XmlReader xmlReader = new XmlNodeReader(xdoc);
    dtSet = new DataSet();
    dtSet.ReadXml(xmlReader);
    if (dtSet.Tables.Count > 1)
    dtTable = dtSet.Tables["Result"];
    return dtTable;
    private void LoadSearchGrid()
    this.objDS = new ObjectDataSource();
    this.objDS.ID = ObjectDataSourceID;
    this.objDS.SelectMethod = "populateData";
    this.objDS.TypeName = this.GetType().AssemblyQualifiedName;
    this.objDS.ObjectCreating += new ObjectDataSourceObjectEventHandler(objDS_ObjectCreating);
    this.Controls.Add(objDS);
    gridView.ID = "_gridView";
    gridView.AutoGenerateColumns = false;
    gridView.Width = new Unit(100, UnitType.Pixel);
    gridView.EnableViewState = false;
    gridView.AllowPaging = true;
    gridView.PageSize = 5;
    gridView.DataSourceID = ObjectDataSourceID;
    this.Controls.Add(gridView);
    void objDS_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
    //e.ObjectInstance = objDS;
    protected void gridView_RowDataBound(object sender, GridViewRowEventArgs e)
    //throw new NotImplementedException();
    Do you have a sample that i can use or some tutorial?
    thanks for your help

    I added this in my class
    public class CustomResultsDatasource : CoreResultsDatasource
    public CustomResultsDatasource(Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart parentWebPart)
    : base(parentWebPart)
    View = new CustomResultsDatasourceView(this, GetType().Name);
    public class CustomResultsDatasourceView : CoreResultsDatasourceView
    public CustomResultsDatasourceView(SearchResultsBaseDatasource dataSourceOwner, string viewName)
    : base(dataSourceOwner, viewName)
    //make sure we have a value for the datasource
    if (DataSourceOwner == null)
    throw new ArgumentNullException("DataSourceOwner");
    CustomResultsDatasource datasource = this.DataSourceOwner as CustomResultsDatasource;
    this.QueryManager = SharedQueryManager.GetInstance(datasource.ParentWebpart.Page).QueryManager;
    And this in my customSearchResultWebPart
    protected override void CreateDataSource()
    //base.CreateDataSource();
    this.DataSource = new CustomResultsDatasource(this);
    How can i use queryManager in populateData?
    thanks for your help

  • How can I save a named filter and sorting for later use?

    I regularly do several different complex filtering and sorting on large tables. I did not find a way to save them for later one-click reuse. So I always have to do it again, which is time-consuming and error-prone. Hoped to get a solution by AppleScript, but filter and sort is not accessible by scripting.
    Is there a way or does Apple have it on it´s agenda for future versions of Numbers? 

    Hi Jan,
    filter and sort is not accessible by scripting.
    There is some support for sort (and less for filter) in Numbers 3.
    Table has a filtered property.
    And you can sort.
    A sort example can be found at https://iworkautomation.com/numbers/table-sort.html.
    Not sure if this will be sufficient to handle your needs, but just wanted to point out there is some scripting support.
    SG

  • How to show the filter and sort capabilities in adf dynamic table

    hi
    how to show the filter and sort capabilities in adf dynamic table..
    Pls help me

    Hi
    Click on a colum in your table and go to the properties pallet
    make true the sortable property then you can sort the table according to that column
    Thanx
    Padma

  • Confusion in FILTER and SORT operations in the execution plan

    Hi
    I have been working on tuning of a sql query:
    SELECT SUM(DECODE(CR_FLG, 'C', NVL(TOT_AMT, 0), 0)),
           SUM(DECODE(CR_FLG, 'C', 1, 0)),
           SUM(DECODE(CR_FLG, 'R', NVL(TOT_AMT, 0), 0)),
           SUM(DECODE(CR_FLG, 'R', 1, 0)),
           SUM(DECODE(CR_FLG, 'C', NVL(TOT_AMT, 0), -1 * NVL(TOT_AMT, 0))),
           SUM(1)
         FROM TS_TEST
        WHERE SMY_DT BETWEEN TO_DATE(:1, 'DD-MM-YYYY') AND
           TO_DATE(:1, 'DD-MM-YYYY');Table TS_TEST is range partitioned on smy_dt and there is an index on smy_dt column. Explain plan of the query is:
    SQL> explain plan for  SELECT SUM(DECODE(CR_FLG, 'C', NVL(TOT_AMT, 0), 0)),
      2         SUM(DECODE(CR_FLG, 'C', 1, 0)),
      3         SUM(DECODE(CR_FLG, 'R', NVL(TOT_AMT, 0), 0)),
      4         SUM(DECODE(CR_FLG, 'R', 1, 0)),
      5         SUM(DECODE(CR_FLG, 'C', NVL(TOT_AMT, 0), -1 * NVL(TOT_AMT, 0))),
      6         SUM(1)
      7    FROM TS_TEST
      8   WHERE SMY_DT BETWEEN TO_DATE(:1, 'DD-MM-YYYY') AND
      9         TO_DATE(:1, 'DD-MM-YYYY');
    Explained.
    SQL> @E
    PLAN_TABLE_OUTPUT
    Plan hash value: 766961720
    | Id  | Operation                            | Name                | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop |
    |   0 | SELECT STATEMENT                     |                     |     1 |    14 | 15614   (1)| 00:03:08 |       |       |
    |   1 |  SORT AGGREGATE                      |                     |     1 |    14 |            |             |       |       |
    |*  2 |   FILTER                             |                     |       |       |            |          |       |       |
    |   3 |    TABLE ACCESS BY GLOBAL INDEX ROWID| T_TEST             | 79772 |  1090K| 15614   (1)| 00:03:08 | ROWID | ROWID |
    |*  4 |     INDEX RANGE SCAN                 | I_SMY_DT         |   143K|       |   442   (1)| 00:00:06 |       |       |
    Predicate Information (identified by operation id):
       2 - filter(TO_DATE(:1,'DD-MM-YYYY')<=TO_DATE(:1,'DD-MM-YYYY'))
       4 - access("SMY_DT">=TO_DATE(:1,'DD-MM-YYYY') AND "SMY_DT"<=TO_DATE(:1,'DD-MM-YYYY'))
    17 rows selected.
    SQL>I am not able to understand the FILTER & SORT operations. As there is an index on SMY_DT column, so index range scan is fine. But why a FILTER (Step no 2) and SORT (Step no 1) operation after that ?
    Oracle version is 10.2.0.3 on AIX 5.3 64 bit.
    Any other information required please let me know.
    Regards,
    Amardeep Sidhu

    Sort aggregate tells you that there was performed an aggregate operation which returns one row, in opposite to sort order by or hash group by which indicates you have grouping, and there more than one row can be returned.
    SQL> SELECT SUM(comm) FROM emp;
    SUM(COMM)
          2200
    Plan wykonywania
    Plan hash value: 2083865914
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |     1 |     2 |     3   (0)| 00:00:01 |
    |   1 |  SORT AGGREGATE    |      |     1 |     2 |            |          |
    |   2 |   TABLE ACCESS FULL| EMP  |    14 |    28 |     3   (0)| 00:00:01 |
    SQL> SELECT AVG(comm) FROM emp;
    AVG(COMM)
           550
    Plan wykonywania
    Plan hash value: 2083865914
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |     1 |     2 |     3   (0)| 00:00:01 |
    |   1 |  SORT AGGREGATE    |      |     1 |     2 |            |          |
    |   2 |   TABLE ACCESS FULL| EMP  |    14 |    28 |     3   (0)| 00:00:01 |
    SQL> SELECT MIN(comm) FROM emp;
    MIN(COMM)
             0
    Plan wykonywania
    Plan hash value: 2083865914
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |     1 |     2 |     3   (0)| 00:00:01 |
    |   1 |  SORT AGGREGATE    |      |     1 |     2 |            |          |
    |   2 |   TABLE ACCESS FULL| EMP  |    14 |    28 |     3   (0)| 00:00:01 |
    SQL> SELECT deptno, SUM(comm) FROM emp GROUP BY deptno;
        DEPTNO  SUM(COMM)
            30       2200
            20
            10
    Plan wykonywania
    Plan hash value: 4067220884
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |     3 |    15 |     4  (25)| 00:00:01 |
    |   1 |  HASH GROUP BY     |      |     3 |    15 |     4  (25)| 00:00:01 |
    |   2 |   TABLE ACCESS FULL| EMP  |    14 |    70 |     3   (0)| 00:00:01 |
    SQL>Edited by: Łukasz Mastalerz on Jan 14, 2009 11:41 AM

  • Filter and sorting on table when getting data through store proc

    Hi All,
    I am using JDeveloper 11g and trying to implement a table which gets its data from a result set returned by a store procedure. The store procedure is using joins to fetch data from multiple oracle tables. I am able to display the data by binding result set element to each columns of ADF table, but sorting and filtering is not working on this, I have checked the chek box while creating table to make it sortable and filtering.
    Please help on this issue. How can we implement filtering and sorting in this case?
    Thanks in advance
    Saurabh agarwal

    Hi,
    I use managed bean directly to access data. My back end returns me a map with the values and these values are then mapped to columns.
    Can you please suggest me any link or example where this model supporting filter is used.
    Thanks
    Saurabh

  • Filter and Sort Options???

    Is there a way to Sort or Filter only the RAW files in a Library folder that have had adjustments made to them in the Develop Module?   Not by date, key words or flags etc.  Only develop adjustments.
    Thanks
    Mark

    Versions prior to LR 4 allowed you to easily apply a smart collection to an arbitrary folder, but Adobe removed that functionality in LR 4.  There are several workarounds:
    - Add the criterion Folder Contains All <folder name> to your smart collection.  Of course, you'll have to edit it every time you want to search a different folder.
    - Use this recipe:
    1. Click on the smart collection to show the photos matched by it (all photos in your catalog).
    2. Edit > Select All.
    3. In the Folders pane, click on the desired folder.
    Only the photos in the folder that match the smart collection will be selected.  You can save that selection to the Quick Collection or another collection.
    - Use the Any Filter plugin.
    Please see the discussion about this topic in the official feedback forum and add your opinion and vote:
    http://feedback.photoshop.com/photoshop_family/topics/multi_selecting_smart_collections_an d_folders_in_library_module_has_changed_for_the_worse

  • Compare and sort problem

    Code:
    import java.io.*;
    import java.text.NumberFormat;
    public class Account implements Comparable
    private NumberFormat fmt = NumberFormat.getCurrencyInstance();
    private final double RATE = 0.030; // interst rate at 3%
    public String acctNumber;
    private double balance;
    public String name;
    // Sets up the account by defining its owner, account number
    // and initial balance.
    public Account (String owner, String account, double initial)
         name = owner;
         acctNumber = account;
         balance = initial;
    // Validates the transaction, then deposits the specfied amount
    // into the account. Returns the new balance.
    public double deposit (String name, String phone, double amount)
         if (amount < 0) // deposit value is negative
         System.out.println ("!!! Can not deposit negative amount.");
         else
         balance = balance + amount;
         return balance;
    // Validates the transaction, then withdraws the specified amount
    // from the account. Returns the new balance.
    public double withdraw (double amount)
    if (amount < 0 ) // withdraw value is negative
         System.out.println ("!!! Amount " + "(" + (amount) + ") " + "is not valid " + "(" + (balance) + ")");
    else
         if (amount > balance) // withdraw value exceeds balance
         System.out.println ("!!! Amount " + "(" + (amount) + ") " + "excedes balance " + "(" + (balance) + ")");
         else
         balance = balance - amount;
    return balance;
    // Adds interest to the account and returns the new balance.
    public double addInterest ()
         balance += (balance * RATE);
         return balance;
    // Returns the current balance of the account.
    public double getBalance()
         return balance;
    // Returns customers name.
    public String getName()
         return name;
    // Retruns the account number.
    public String getAccountNumber()
         return acctNumber;
    public int compareTo (Object other)
         int result;
         if (name.equals(((Account)other).name))
         result = acctNumber.compareTo(((Account)other).acctNumber);
         else
         result = name.compareTo(((Account)other).name);
         return result;
    // Returns a one-line description of the account as a string.
    public String toString()
         return (name + "\t" + acctNumber + "\t" + fmt.format(balance));
    public class Bank
    private int count = 0;
    private Account[] customer;
    private int custTotal = 0;
    private int index;
    public Bank(int customerNum)
    customer = new Account[customerNum];
    custTotal = customerNum;
    public int add(String owner, String account, double initial)
    if (findAccount(owner, account) == 0)
    customer[count] = new Account(owner, account, initial);
    count++;
    else
         System.out.println("\n*** Account " + "(" + owner + ", " + account + ") " + "already exists...");
    return count+1;
    public void deposit (String name, String phone, double amount)
    if (findAccount(name, phone) == 1)
    customer[index].deposit(name, phone, amount);
    System.out.println (">>> customer " + "(" + name + ", " + phone + ") " + " depositing $" + (amount));
    else
    System.out.println ("*** customer " + "(" + name + ", " + phone + ") " + " not found");
    public void withdraw(String name, String phone, double amount)
    if (findAccount(name, phone) == 1)
         System.out.println(">>> customer " + "(" + name + ", "
    + phone + ") " + "withdrawing $" + (amount));     
    customer[index].withdraw(amount);
    else if (findAccount(name, phone) != 1)
    System.out.println ("*** customer " + "(" + name + ", " + phone + ") " + "not found");
    public int findAccount(String name, String phone)
    int result = 0;
    for (int i = 0; i < count; i++)
    if ((customer.getName() == name)&&(customer[i].getAccountNumber() == phone))
         index = i;
    result = 1;
    return result;
    public void Interest ()
    for (int i = 0; i < count; i++)
    customer[i].addInterest();
    public void list(String display)
    System.out.println ();
    System.out.println(display);
    System.out.println ("Cust ID" +"\t" + "Name" + "\t" + "Phone#" + "\t" + "Balance");
    for (int i= 0;i < count; i++)
         System.out.println(i + "\t" + customer[i].toString());
    public int compareTo( Object other )
    Account tempAccount = (Account) other;
    int result;
    if (customer[index].equals(((Account)other).getName()))
    result = (customer[index].compareTo(((Account)other).getAccountNumber()));
    else
    result = customer[index].compareTo(((Account)other).getName());
    return result;
    public void sort(Comparable[] names)
    // Sort the array names into increasing order.
    int itemsSorted; // Number of items that have been sorted so far.
    for (itemsSorted = 1; itemsSorted < names.length; itemsSorted++)
    // Assume that items names[0], names[1], ... names[itemsSorted-1]
    // have already been sorted. Insert names[itemsSorted]
    // into the sorted list.
         Comparable temp = names[itemsSorted]; // The item to be inserted.
    int loc = itemsSorted - 1; // Start at end of list.
    while (loc >= 0 && names[loc].compareTo(temp) > 0)
    names[loc + 1] = names[loc]; // Bump item from names[loc] up to loc+1.
    loc = loc - 1; // Go on to next location.
    names[loc + 1] = temp; // Put temp in last vacated space.
    public class LLBBank
    public static void main(String[] args)
    int count = 0;
    Bank accountList = new Bank (30);
    count = accountList.add("Karen", "1234567", 50.00);
    count = accountList.add("Karen", "1234444", 50.00);
    count = accountList.add("Karen", "1234567", 50.00); // *** Error
    count = accountList.add("Jim", "1235555", 200.00);
    count = accountList.add("Andy", "1235665", 600.00);
    accountList.list("Show beginning balance...");
    accountList.withdraw("Karen", "1234567", 30.00);
    accountList.withdraw("Karen", "1234567",60); // *** Error
    accountList.withdraw("karen chen", "1234567",60); // *** Error
    accountList.deposit("Andy", "1234567",60); // *** Error
    accountList.deposit("Andy", "1235665",-60); // *** Error
    accountList.deposit("Andy", "1235665", 500);
    accountList.list("after withdraws and deposits...");
    accountList.Interest();
    accountList.list("With interest...");
    /*accountList.insertionSort();*/
    accountList.list("Sorted customer list...");
         /*Bank.insertionSort(accountList);*/
    /************ S A M P L E O U T P U T ***************
    *** Account (Karen, 1234567) already exists...
    Show beginning balance...
    Cust ID Name Phone Balance
    0 Karen 1234567 50.0
    1 Karen 1234444 50.0
    2 Jim 1235555 200.0
    3 Andy 1235665 600.0
    customer (Karen, 1234567) withdrawing $30.0
    customer (Karen, 1234567) withdrawing $60.0!!! Amount (60.0) excedes balance (20.0)
    *** customer (karen chen, 1234567) not found.
    *** customer (Andy, 1234567) not found.
    customer (Andy, 1235665) depositting $-60.0!!! Can not deposit negative amount.
    customer (Andy, 1235665) depositting $500.0after withdraws and deposits...
    Cust ID Name Phone Balance
    0 Karen 1234567 20.0
    1 Karen 1234444 50.0
    2 Jim 1235555 200.0
    3 Andy 1235665 1100.0
    Add 3% interest to all accounts.With interest...
    Cust ID Name Phone Balance
    0 Karen 1234567 20.6
    1 Karen 1234444 51.5
    2 Jim 1235555 206.0
    3 Andy 1235665 1133.0
    Sorted customer list...
    Cust ID Name Phone Balance
    0 Andy 1235665 1133.0
    1 Jim 1235555 206.0
    2 Karen 1234444 51.5
    3 Karen 1234567 20.6
    ********** E N D O F S A M P L E O U T P U T *************/
    Problem: I have this assigment for school. I have to do this ATM wannabe program ... but the last two parts they are a problem...
    1.to sort the accouts(array) by name
    2.when "inputing" an account to compare to existing accounts to make sure that it does no exist ...
    directions if needed: compile all and run LLBBank the problem can be see in the output the correct output is in LLBBank.java and also started the compare method
    Thank you all

    Pls try this code
    i already resolved some of the errors
    and then post back again the other errors
    hope it Helps
    gudluck!!!!
    import java.io.*;
    import java.text.NumberFormat;
    public class LLBBank
    public static void main(String[] args) {
        int count = 0;
        Bank accountList = new Bank (30);
        count = accountList.add("Karen", "1234567", 50.00);
        count = accountList.add("Karen", "1234444", 50.00);
        count = accountList.add("Karen", "1234567", 50.00); // *** Error
        count = accountList.add("Jim", "1235555", 200.00);
        count = accountList.add("Andy", "1235665", 600.00);
         accountList.list("Show beginning balance...");
         accountList.withdraw("Karen", "1234567", 30.00);
         accountList.withdraw("Karen", "1234567",60); // *** Error
         accountList.withdraw("karen chen", "1234567",60); // *** Error
         accountList.deposit("Andy", "1234567",60); // *** Error
         accountList.deposit("Andy", "1235665",-60); // *** Error
         accountList.deposit("Andy", "1235665", 500);
         accountList.list("after withdraws and deposits...");
         accountList.Interest();
         accountList.list("With interest...");
         /*accountList.insertionSort();*/
         accountList.list("Sorted customer list...");
        /*Bank.insertionSort(accountList);*/
    public class Bank {
    private int count = 0;
    private Account[] customer;
    private int custTotal = 0;
    private int index;
        public Bank(int customerNum) {
            customer = new Account[customerNum];
            custTotal = customerNum;
        public int add(String owner, String account, double initial) {
            if (findAccount(owner, account) == 0) {
                customer[count] = new Account(owner, account, initial);
                count++;
            } else
                System.out.println("\n*** Account " + "(" + owner + ", " + account + ") " + "already exists...");
            return count+1;
        public void deposit (String name, String phone, double amount) {
            if (findAccount(name, phone) == 1) {
                if(amount>0) {
                    customer[index].deposit(name, phone, amount);
                    System.out.println (">>> customer " + "(" + name + ", " + phone + ") " + " depositing $" + (amount));
                 } else {
                   System.out.println("Cannot deposit Amount that is less than or equal to 0");
            } else
                System.out.println ("*** customer " + "(" + name + ", " + phone + ") " + " not found");
        public void withdraw(String name, String phone, double amount) {
            if (findAccount(name, phone) == 1) {
                System.out.println(">>> customer " + "(" + name + ", "+ phone + ") " + "withdrawing $" + (amount));
                customer[index].withdraw(amount);
            } else if (findAccount(name, phone) != 1)
                System.out.println ("*** customer " + "(" + name + ", " + phone + ") " + "not found");
        public int findAccount(String name, String phone) {
          int result = 0;
          for (int i = 0; i < count; i++) {
            if ( customer.getName().equals(name)) {
    //&&(customer[i].getAccountNumber().equals(phone))) {
    index = i;
    result = 1;
    return result;
    public void Interest () {
    for (int i = 0; i < count; i++) {
    customer[i].addInterest();
    public void list(String display) {
    System.out.println ();
    System.out.println(display);
    System.out.println ("Cust ID" +"\t" + "Name" + "\t" + "Phone#" + "\t" + "Balance");
    for (int i= 0;i < count; i++) {
    System.out.println(i + "\t" + customer[i].toString());
    public int compareTo( Object other ) {
    Account tempAccount = (Account) other;
    int result;
    if (customer[index].equals(((Account)other).getName()))
    result = (customer[index].compareTo(((Account)other).getAccountNumber()));
    else
    result = customer[index].compareTo(((Account)other).getName());
    return result;
    public void sort(Comparable[] names) {
    // Sort the array names into increasing order.
    int itemsSorted; // Number of items that have been sorted so far.
    for (itemsSorted = 1; itemsSorted < names.length; itemsSorted++) {
    // Assume that items names[0], names[1], ... names[itemsSorted-1]
    // have already been sorted. Insert names[itemsSorted]
    // into the sorted list.
    Comparable temp = names[itemsSorted]; // The item to be inserted.
    int loc = itemsSorted - 1; // Start at end of list.
    while (loc >= 0 && names[loc].compareTo(temp) > 0) {
    names[loc + 1] = names[loc]; // Bump item from names[loc] up to loc+1.
    loc = loc - 1; // Go on to next location.
    names[loc + 1] = temp; // Put temp in last vacated space.
    import java.io.*;
    import java.text.NumberFormat;
    public class Account implements Comparable
    private NumberFormat fmt = NumberFormat.getCurrencyInstance();
    private final double RATE = 0.030; // interst rate at 3%
    public String acctNumber;
    private double balance;
    public String name;
    // Sets up the account by defining its owner, account number
    // and initial balance.
    public Account (String owner, String account, double initial) {
    name = owner;
    acctNumber = account;
    balance = initial;
    // Validates the transaction, then deposits the specfied amount
    // into the account. Returns the new balance.
    public double deposit (String name, String phone, double amount) {
    balance = balance + amount;
    return balance;
    // Validates the transaction, then withdraws the specified amount
    // from the account. Returns the new balance.
    public double withdraw (double amount) {
    // withdraw value is negative
    if (amount < 0 ) {
    System.out.println ("!!! Amount " + "(" + (amount) + ") " + "is not valid " + "(" + (balance) + ")");
    // withdraw value exceeds balance
    } else if (amount > balance) {
    System.out.println ("!!! Amount " + "(" + (amount) + ") " + "excedes balance " + "(" + (balance) + ")");
    } else
    balance = balance - amount;
    return balance;
    // Adds interest to the account and returns the new balance.
    public double addInterest () {
    balance += (balance * RATE);
    return balance;
    // Returns the current balance of the account.
    public double getBalance() {
    return balance;
    // Returns customers name.
    public String getName() {
    return name;
    // Retruns the account number.
    public String getAccountNumber() {
    return acctNumber;
    public int compareTo (Object other) {
    int result;
    if (name.equals(((Account)other).name))
    result = acctNumber.compareTo(((Account)other).acctNumber);
    else
    result = name.compareTo(((Account)other).name);
    return result;
    // Returns a one-line description of the account as a string.
    public String toString() {
    return (name + "\t" + acctNumber + "\t" + fmt.format(balance));

  • Filter and Sort Transient Attribute from Query Panel

    Jdev 11.1.1.3
    Hello,
    i am not able to filter a transient attribute from the standard query panel (with result table).
    I did following things:
    -Call an Initial AppMod Service Method from my Bounded Task Flow, and fill the Transient Attribute with some values (with setter method)
    -Next, call the Page with following characteristics:
    I defined a custom View Criteria with particular Bind Variables, take as query execution mode = In Memory and activate the Auto Query Flag
    Drag and Droped this Criteria from Conroll Panel on the Page as Query Panel with Table
    In Page Data Binding Definition, i set the InitialQueryOverridden Flag to true, otherwise no data will be filled in the transient attribute
    The sort and filter works only for the Database Attributes.
    Has anyone an Idea, how to keep same behavior for the trans attr.?
    Thank You!
    (Note: When i set the Query Mode (after init Call) to vo.setQueryMode(ViewObject.QUERY_MODE_SCAN_VIEW_ROWS), then the sorting of Trans Attr is working fine.
    But the filtering is not working well: Lets say a filtering is done by the Trans Attribute and we get 3 Rows. But when all rows wanted to be retrieved again, only those 3 are available then, no chance to get all rows back)

    Hi,
    assuming that sorting and filtering are similar, have a look here
    sorting on transient attribute
    Frank

  • Help: YouTube app Search and sort problem

    Hi,
    I have problem with the YouTube app.  I know there is a search feature, I found the magnifying glass.  However, I have 3 problems.  
    1.) Search Problem:  It won't search everything on YouTube.  I tried seaching, many results would come up from PB's web brower, but it would NOT on the app.  So, what's the point of the app?  
    2.)  After finding the video, the app does not allow me to find/list "video by the same author" or "related video", the "related videos" are not so close "related" compare the web version.
    3.)  When press on the "info" buttom on the app.  The author's describing and format are off.  or not display completely..  
    Would someone please tell me if there will be a fix?  or how to fix it?
    Thanks

    I am not having that problem. Could you post screen shots?
    Be a Shepard and not an iSheep.

  • CompareTo and sorting problems.

    hi all,
    and thanks a lot for your help.
    I have created the following class which as you can see creates an object and can sort an array of such objects
    with respect to the deadline variable using the compareTo method.
    import java.util.Date;
    public class Task {
         Date deadline;
         long runtime;
         public int compareTo (Object obj){
         Date thatDate = ((Task)obj).deadline;
         Date thisDate = new Date(0);
         int k = thatDate.compareTo(thisDate);
         return k;
    I am trying to find a way of sorting the Task objects with respect to the runtime variable but I cannot.
    Can you please make a suggestion?
    Thanks in advance,
    Dennis

    Your compareTo won't work: it doesn't compare the deadlines of the two tasks, but rather the deadline of one task with the fixed Date 1. January 1970. Try this instead (in addition to the advice of the OP):
    public int compareTo(Object obj) {
      Date thatDate = ((Task)obj).deadline; // this will throw an exception if obj is not a Task
      return deadline.compareTo(thatDate.deadline);
      // or: return thatDate.deadline.compareTo(deadline);
    }Also, consider making instance variables private and accessible through accessor methods.

  • How do I fix my problem with Artist and Sort Artist?

    I have all my songs sorted by Artist and because I have songs that feature other artists I use the sort artist field.
    In itunes it all looks fine but when I sync it with my iPod Nano 5th Gen one of the artists names comes up as the artist for all songs.
    Eg. I have 5 B.o.B songs.The Artist field has B.o.B and the featured artist so it looks like -B.o.B feat. Hayley Williams-. The sort artist field along with album artist and sort album artist field are all only B.o.B.
    My problem is that when I sync them onto my iPod all the songs by B.o.B appear under B.o.B feat. Rivers Cumo when I sort by Artist despite this only being the artist for one and all listed with the same format as above. They all also come up with the Artist as B.o.B feat. River Cumo when I play one of the songs.
    Is there anyway to fix this so on my iPod they all appear under B.o.B when sorting by Artist but when I play the song it gives me the artist name? I'd prefer not to have to put the featured artist in the song title.

    This sometimes happens if your MacBook battery is swollen, and pushes on the underside of the trackpad.
    Some users forgot that an alternate input device, like a tablet, does not shut off when set aside -- it continues to provide input at the same time as the mouse you put your hand on.

  • Open a SharePoint List item in Modal Pop up in SP 2013 fails after you filter or sort the list

    Sorry for the long post. This has been killing me. I had this script working perfectly fine in SharePoint 2010 (online) and basically i have a source custom list (list A) with a hyperlink column and a Destination List with say title and my name.
    Source List (list A) looks like this with these 2 columns
    Title    Test Link
    A         Link 1
    B         Link 2 
    C         Link 3
    Each of these links link to the actual list item in the destination list, so for example, link 1 is/sites/2013DevSite/Lists/Destination%20List/EditForm.aspx?ID=1
    So basically i want anytime the Link are clicked that point to another list's item to open in a modal dialog and the script below worked perfectly fine in SharePoint 2010 (online)
    <script language="javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script>
    <script language ="javascript" type="text/javascript">   
    jQuery(document).ready(function() {
    jQuery('a[href*="EditForm.aspx"]').each(function (i, e) {
    // Store the A tag's current href in a variable
    var currentHref = jQuery(e).attr('href');
    jQuery(e).attr({
    'href': 'javascript:void(0);', 
    // Use the stored href as argument for the ShowInModal functions parameter.
    'onclick': 'ShowInModal("' + currentHref + '");'
    function ShowInModal(href) {
    SP.UI.ModalDialog.showModalDialog({title: "Edit Item", url: href});    
    </script>
    All it does is find the href tags for that particular value Editform.aspx and the pop modal works in SP 2010 online. So the site page is designed in such a way there is a content editor web part with the reference to this javascript file and the sharepoint
    list is right beneath it and this worked perfectly opening in modal windows in SP 2010.
    Since migration to 2013, this is what exactly happens
    1.) when you come to the site page, the modal works,
    2.) If you filter or sort on say the Title or Test Link column in Source list (lets say you select the Value A), the script does not fire at all, if i hover over the hyperlink, the who hyperlink is shown and does not open the hyperlink in the modal pop up.
    - This is important because i want to be able to sort on a particular item...
    Could someone please let me know what am i doing wrong and why is this not working when i sort the list. Thanks for all the help.
    Once again i am trying to open a sharepoint list item in Sharepoint 2013 from another list using Jquery

    A ListItem has its own unique row id so in all likelihood, an insert with the same data will result in a new list entry. The Lists Web Service however, has an UpdateListItem method which will take an update request. [refer
    http://msdn.microsoft.com/en-us/library/office/websvclists.lists.updatelistitems(v=office.15).aspx ]
    There is another note in the conference (marked answered) to your List Item Update problem. Probably worth a try too. [refer
    http://social.msdn.microsoft.com/Forums/en-US/bee8f6c6-3259-4764-bafa-6689f5fd6ec9/how-to-update-an-existing-item-in-a-sharepoint-list-using-the-wss-adapter-for-biztalk?forum=biztalkgeneral ]
    Regards.

  • Comparing and sorting raw (NEF) & JPG in LR

    I am interested in importing raw & jpg and then comparing them.
    I want to apply different effects on the raw files to see if I can match or better the jpg files as rendered by the camera
    (I use Nikon).
    Background:
    In the past I have used L:R to view my Nikon NEF files side by side with JPG files from the camera and discovered the amazing versatility of the NEF files at fixing problems in image files and I have therefore always preferred working with RAW files.
    But recently I read a discussion of NikonView (or maybe it was different editing software by Nikon -NX2?) compared to LR wherein several people agreed that Nikon is better at rendering its own NEF files than ADOBE  and they suggested that this was because Nikon engineers know the exact processes (algorithms?) they used to extract & compute the chip data and therefore can better engineer the right editing environment, while Adobe uses a "best guess".  I have no idea whether this is true but it seemed plausible.
    Now I don't own the latest Nikon Software but I wanted to see if I could compare "good" JPGs out of the camera with the image Raw data in LR.
    (Without having to buy the softwareor even open a free trial version)
    The first thing I did was import NEF files and JPG files as separate imports into the same catalog, by changing my import settings.
    It was easy to notice the difference on my screen. (How that translates to print, I dunno.)
    What surprized me was that the JPGs out of the camera immediately looked better than the "Unproessed" NEF files.
    (When properly captured.)  I don't expect them to be as easy to enhance as the raw files though.
    But could I get the Raw file to resemble the JPGS?
    I attempted to set the NEF files to my preferred camera profiles, ( was using portrait setting in camera)
    Even upon eidting my first RAW file I noticed that if I wanted to match the JPGs, I would have to use other adjustments such as contrast, recovery etc.
    I intended to do quick mass-adjustments to the RAW files to see if I could match or beat the JPGs for overall image quality
    I wanted to use Synch to copy those setting to each NEF file.so I set out to sort out the NEF files and JPG files into different groupings and soon discovered I don't know how to do this:  
    IS THERE A QUICK WAY TO SORT / GROUP FILE TYPES IN LR?
    Can I select just the RAW file or just the JPG files?
    I know I can sort files by metadata,  but can't figure out how to sort by extension.
    I realize I can do a workaround by removing the entire folder from the catoalgue and sorting them using windows explorer(XP) and then reimporting them separately.
    But I think there should be an easy way to sort them right in LR.  But I fear there  is not.  Am I right?
    Once I sort them I would be able to mass-apply settings (like contrast adjustments) to one set or another and do some side - by - side comparisons between the RAW files and the JPGs and get the most out of my photos.

    To select by file type, go to the metadata panel in the Library filter (if this isn't showing check
    Show filter bar in the view menu). Then click on any of the meta data panels and select file type. Select the file type you want to see.

  • Audio noise, which filter and how to...

    Greetings.
    I've got a project that I'm pretty happy with and now I'm ready to tweek the sound. The audio was a recording of an interview using the internal mike on a Canon Optura 50.
    I know, not exactly high end, but that is what I had. The wireless lav flaked out.
    Needless to say the audio could use some sort of clean up. There seems to be a constant and consistant sound throughout the interview in the audio. It is either the sound of the camera itself, the room we were in, or a combination of both.
    FCE has LOTS of audio filters, and reading the manual confused more than helped. Can anyone describe a way to filter, and which filter, starting adjustments, etc. I should be approaching?
    The good thing about my project is that once I get one clip adjusted, I think I can copy and paste the attributes to the other similar clips.
    Thanks.
    Jonathan

    Hi Jonathan,
    You can try the hum filter in FCE, it may help, but it's really designed to reduce 50/60Hz A/C hum. Graphic EQ really won't help - the noise crosses a wide swath of frequencies and has enough randomness in it that you need something that has a 'learn noise' capability to really attack the problem.
    Audacity is a sound editor. I'd suggest exporting your audio track as an AIFF file, import that into Audacity and see if the noise filter will work on it (you DO sample the noise in Audacity just like in Sound Soap). If it works, you can save the result and import it back into FCE.

Maybe you are looking for