HELP share methods between packages

Hello...
I have 2 packages, the first (named "Library") is inttended to use as a library of miscelaneuos functions, all of them, inside one (and the only one) public Class named "MiscFunctions"
At the second package, i got a clase named "A" that import the first package, like "import Library.MiscFunctions;", and a method named "M" that calls the method i need (named "IsMember") from the Class "MiscFunctions" at the package "Library"
the problem is that when i compile, it doesnt recognizes the function "IsMember", it says that is not defined
can somebody help me pleasee !!
i will be grateful !...
i' alooone with java...

CALLER.JAVA
package Example;
import library.Funcs;
import java.util.ArrayList;
public class Caller {
public static void main(java.lang.String[] args) {
     ArrayList dontcare=new ArrayList();
     if (fIsMember(dontcare, "doesnt work")) {
          /* the error is this:
The method fIsMember invoked for type Example.Caller with arguments
(java.util.ArrayLIst, java.lang.String) is not defined.
FUNCS.JAVA
package library;
import java.util.ArrayList;
public class Funcs {
public boolean fIsMember(ArrayList x, String s) {
     return true;

Similar Messages

  • Using HttpServletRequest object to share variables between static methods.

    Does anyone know of the overhead/performance implications of using the HttpServletRequest object to share variables between a static method and the calling code?
    First, let me explain why I am doing it.
    I have some pagination code that I would like to share across multiple servlets. So I pulled the pagination code out, and created a static method that these servlets could all use for their pagination.
    public class Pagination {
         public static void setPagination (HttpServletRequest request, Config conf, int totalRows) {
              int page = 0;
              if (request.getParameter("page") != null) {
                   page = new Integer(request.getParameter("page")).intValue();
              int articlesPerPage = conf.getArticlesPerPage();
              int pageBoundary = conf.getPageBoundary();
                int numOfPages = totalRows / articlesPerPage;  
                // Checks if the page variable is empty (not set)
                if (page == 0 || (page > numOfPages && (totalRows % articlesPerPage) == 0 && page < numOfPages + 1)) {    
                 page = 1;  // If it is empty, we're on page 1
              // Ex: (2 * 25) - 25 = 25 <- data starts at 25
             int startRow = page * articlesPerPage - (articlesPerPage);
             int endRow = startRow + (articlesPerPage);           
             // Set array of page numbers.
             int minDisplayPage = page - pageBoundary;
             if (minDisplayPage < 1) {
                  minDisplayPage = 1;     
             int maxDisplayPage = page + pageBoundary;
             if (maxDisplayPage > numOfPages) {
                  maxDisplayPage = numOfPages;     
             int arraySize = (maxDisplayPage - minDisplayPage) + 1;
             // Check if there is a remainder page (partially filled page).
             if ((totalRows % articlesPerPage) != 0) arraySize++;
             // Set array to correct size.
             int[] pages = new int[arraySize];
             // Fill the array.
             for (int i = 1; i <= pages.length; i++) {
                  pages[i - 1] = i;
             // Set pageNext and pagePrev variables.
             if (page != 1) {
                  int pagePrev = page - 1;
                  request.setAttribute("pagePrev", pagePrev);
             if ((totalRows - (articlesPerPage * page)) > 0) {
                 int pageNext = page + 1;
                 request.setAttribute("pageNext", pageNext);
             // These will be used by calling code for SQL query.
             request.setAttribute("startRow", startRow);
             request.setAttribute("endRow", endRow);
             // These will be used in JSP page.
             request.setAttribute("totalRows", totalRows);
             request.setAttribute("numOfPages", numOfPages);
             request.setAttribute("page", page);
             request.setAttribute("pages", pages);          
    }I need two parameters from this method (startrow and endrow) so I can perform my SQL queries. Since this is a multithreaded app, I do not want to use class variables that I will later retrieve through methods.
    So my solution was to just set the two parameters in the request and grab them later with the calling code like this:
    // Set pagination
    Pagination.setPagination(request, conf, tl.getTotalRows());
    // Grab variables set into request by static method
    int startRow = new Integer(request.getAttribute("startRow").toString());
    int endRow = new Integer(request.getAttribute("endRow").toString());
    // Use startRow and endRow for SQL query below...Does anyone see any problem with this from a resource/performance standpoint? Any idea on what the overhead is in using the HttpServletRequest object like this to pass variables around?
    Thanks for any thoughts.

    You could either
    - create instance vars in both controllers and set them accordingly to point to the same object (from the App Delegate) OR
    - create an instance variable on the App Delegate and access it from within the view controllers
    Hope this helps!

  • How do I share files between profiles on my Macbook Pro. 10.8.4, HELP!

    how do I share files between profiles on my Macbook Pro. 10.8.4 I have moved the files to the public folder, shared the folder and enabled sharing in system preferences. however, i still cannot access the files from my other profile. Please help!

    Information.
    Try dropping the files into your wife's Public Folder.
    File Sharing
    File Sharing (2)

  • I want to share files between my MacBook Pro and G5, I am using an AirPort

    I want to share files between my MacBook Pro and G5, I am using an AirPort Extreme Base Station. I can see the MacBook Pro on the G5 and vice versa, I have file sharing turned on both, as well as Screen Sharing. I currently am sharing using Target Disk Mode, I want to know what other wireless options are available to me?
    I want to have the 2 computers able to see each other and be able to share files be drag and dropping, I also have another G4 on using Tiger I want to be a part of this happy Apple sharing family. Can someone please tell me how to accomplish my goal?
    Thanks in advance for reading and replying to my post,
    Sebastian

    The mac help is: Finder window/Help/Mac Help. It provides answers to a lot of common questions, including file sharing.
    As for the ethernet cable, you can either buy another one (inexpensive and available in many places including Walmart), or just unplug it from your modem temporarily and plug it back in when you're done.
    As for Target disk mode, take a look at this Apple article:
    http://docs.info.apple.com/article.html?artnum=58583
    Apple online support pages are also a great way to find out how to do things.
    As I mentioned, I prefer using the ethernet/file sharing method if I need to copy a lot of files; however, there is another way around if you have an external drive and just want to copy one or two files. Just plug the external into one computer, copy the file onto it, unplug, plug into the other computer and copy.

  • HT1203 iTunes: How to share music between different accounts on a single computer - I tried to use the instructions to configure 2 different windows users sharing the same iTunes library.  I could not get this to work per the instructions.

    I tried to configure 2 windows users accounts using a single library per the instructions in HT1203.  My iTunes library is on an external drive.  I cannot get this to work.  Any suggestions?

    To give other users read-only access to your iTunes library, use the Sharing features of iTunes. Sharing works over the local network as well as on the same computer. See the built-in help for details.
    If you want to give full read/write access to more than one user, see the support article linked below.
    iTunes: How to share music between different accounts on a single computer
    There is a way to share the library without moving it to a secondary volume. If you really need to do that, ask for instructions.

  • What is the diffrence between package javax.sql and java.sql

    Is javax designed for J2EE?
    And when to use package javax?

    Hi,
    What is the diffrence between package javax.sql and java.sql?The JDBC 2.0 & above API is comprised of two packages:
    1.The java.sql package and
    2.The javax.sql package.
    java.sql provides features mostly related to client
    side database functionalities where as the javax.sql
    package, which adds server-side capabilities.
    You automatically get both packages when you download the JavaTM 2 Platform, Standard Edition, Version 1.4 (J2SETM) or the JavaTM 2, Platform Enterprise Edition, Version 1.3 (J2EETM).
    For further information on this please visit our website at http://java.sun.com/j2se/1.3/docs/guide/jdbc/index.html
    Hope this helps.
    Good Luck.
    Gayam.Srinivasa Reddy
    Developer Technical Support
    Sun Micro Systems
    http://www.sun.com/developers/support/

  • I have 2 profiles on one computer. How to share music between the profiles in itunes?, I have 2 profiles on one computer. How to share music between the profiles in itunes?

    I have 2 profiles on one computer. How to share music between the 2 separate profiles in iTunes?

    iTunes: How to share music between different accounts on a single computer
    This might help. info provided by 'b noir'
    iMoz

  • Can i share music between two iTunes accounts on the same computer

    I know you can share the library with 'home share', but can you copy the titles to the account sothey can be loaded on to an ipod / iphone?
    Or have i got to load any required music on to the computer a second time?

    This should help:
    iTunes: How to share music between different accounts on a single computer
    Note that when it says "publicly accessible location", it needs to be a place where everyone has read and write access. The most common such place is the Shared folder in the Users folder, but you can place the music elsewhere if you change the access permissions manually (don't start tinkering with permissions unless you're confident you know what you're doing and can reverse things if they get messed up). 
    Regards.

  • I have one iMac with 2 users. Will Home sharing allow me to share music between users? (running Mac OS 10.8.2

    I just seemed to get turned around when trying to share music on the same iMac.
    How do I share music between two different users with two different iTunes accounts on the same iMac. My wife and I simply want to be able to share music that she purchases with me and visa versa. We each have our own iPads and I am unsure of the proper way to do this so I don't messup the syncing of our iPads.
    Part of the reason I ask is that I see questions concerning two different computers. Does it make any difference that I am trying to share music between two users on the same iMac
    Thank you in advance for information helping me to understand the Home Sharing process.

    Hi, one question & one suggestion...
    What possible things are connected at home but not at the store, inlude every cable, etc.
    One way to test is to Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, Test for problem in Safe Mode...
    PS. Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive
    Reboot, test again.
    If it only does it in Regular Boot, then it could be some hardware problem like Video card, (Quartz is turned off in Safe Mode), or Airport, or some USB or Firewire device, or 3rd party add-on, Check System Preferences>Accounts>Login Items window to see if it or something relevant is listed.
    Check the System Preferences>Other Row, for 3rd party Pref Panes.
    Also look in these if they exist, some are invisible...
    /private/var/run/StartupItems
    /Library/StartupItems
    /System/Library/StartupItems
    /System/Library/LaunchDaemons
    /Library/LaunchDaemons

  • How do I share music between user accounts on the same computer?

    My wife and I have separate user accounts on the same MacBook Pro so that we can both sync our phones to this computer. My account is the primary user account, and my iTunes library is stored in this account. My wife would like to put music on her iPhone so she can run, but I can't seem to access the music library thru her account. I know the files are all on the hard drive regardless, so I just need to know how I can make iTunes on my wife's account access the library that's there. I've tried the steps I could find on Apple's website, but I can't seem to make it work. I'm running the latest versions of everything - even tho the post says I'm running 10.9.1, I'm actually running 10.9.4

    To give other users read-only access to your iTunes library, use the Sharing features of iTunes. Sharing works over the local network as well as on the same computer. See the built-in help for details.
    If you want to give full read/write access to more than one user, see the support article linked below.
    iTunes: How to share music between different accounts on a single computer
    There is a way to share the library without moving it to a secondary volume. If you really need to do that, ask for instructions.

  • How do I share files between users on the same machine?

    I tried using /Users/shared to share files between myself (Admin user) and another user on the machine (Standard user). Whenever I put a file or a folder into said directory permissions are 755 for directories and 644 for files, my umask is 0022. The files and directories belong to my user and the group staff. This means I can read and write and others can read. If I do the same using the other users account. Permissions are 700 and 600 respectively. (Owner is the other user and group is staff.) Strangely the other users umask is 0022, too.
    The result is, that all directories and files I create with my account (Admin user) are readable to every other user on the machine, whereas all directories and files the other user (Standard user) creates are not readable for anyone else. I can easily rectify this using the Terminal and chmod and/or chown, but it is a pain having to do this, since I also need to forcefully restart the Finder App for it to notice the changed permissions.
    Ideally I'd like all directories in /Users/Shared to have permissions 777 and all files 666 no matter which user created, copied or moved them to said location. I think this could possibly be done using applescript and shellscripting and the folder action hook. So far my attempts to find such a script on the net or/and write it myself have failed. I'd be grateful for any hints how I:
    a) write and setup such a script
    b) accomplish what I try to do (share files and folders on the same machine) in another possibly more Mac way
    Kind regards
    David

    The following AppleScript will recursively descend the directory tree and change the items to your modes:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 340px;
    color: #000000;
    background-color: #FFDDFF;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    on adding folder items to this_folder after receiving these_items
    repeat with some_item in these_items
    ProcessStuff from some_item
    end repeat
    end adding folder items to
    to ProcessStuff from SomeItem
    processes items contained in SomeItem, recursively descending the directory tree
    parameters - SomeItem [mixed]: an item containing the items to process
    returns nothing
    set SomeItem to SomeItem as text
    set FileInfo to (info for SomeItem as alias)
    if (folder of FileInfo) and not (package folder of FileInfo) then -- a folder (not a package)
    do shell script "chmod 666 " & quoted form of POSIX path of SomeItem
    -- do shell script "chown root:staff " & quoted form of POSIX path of SomeItem user name "me" password "mypassword" with administrator privileges
    try -- to get items in the folder
    tell application "Finder" to set SubFolder to (items of folder SomeItem)
    on error
    return {}
    end try
    repeat with SubItem in SubFolder -- process the sub items
    ProcessStuff from SubItem
    end repeat
    else -- a file
    do shell script "chmod 777 " & quoted form of POSIX path of SomeItem
    -- do shell script "chown root:staff " & quoted form of POSIX path of SomeItem user name "me" password "mypassword" with administrator privileges
    end if
    return
    end ProcessStuff
    </pre>
    You shouldn't need to change the ownership, so I commented out the chown shell script since this would need to be run as a super user. You can run a shell script with administrator privileges, but in order to be used by a standard user you will need to provide the appropriate user name and password in the script, which might not be a good idea - note that the folder action script will need to be attached in all accounts that you want to change the permissions, which means that it would need to be accessible to those accounts.

  • How do I share files between two Macs on my wireless network?

    I have an iMac G4 and an ibook G3 on a wireless network. I have "file sharing" activated on both computers. (Also Appletalk, which may or may not be a misguided move, but I got the idea from OSX "Help.")
    When I try to get from either computer onto the other, my computer is recognized by name (another alternative is to log on as a "guest"). I'm prompted for a password. None of the passwords I use works. I've tried the administrative passwords for both computers.
    How do I get beyond this hurdle to share files? I've posted elsewhere to no avail. This must be an easy one. How do you share files between two macs on one network?

    Do your accounts on the machines have the same short name? It's an issue I've seen a few names.. one machine with bsmith, the other with bobsmith, but the long names for both being "Bob Smith". The login windows would confuse users because it showed their names, but because the short names didn't match, it wouldn't work.
    The password you should use is the administrative one, so I don't know why you're not having luck.

  • How do I share files between users on the same Macbook pro?

    I have created different users on my new Macbookpro, but I can't seem to share files between two users. Help how do I share files between users on one laptop? eg. a pdf file that I want to grab from my user x and use it on user y, thanks.  By the way I have already tries going into system preferences, sharing folder, then turning on file sharing and that didnt work. thanks

    From the Help Menu using the search criteria Drop Box

  • Can I share files between two different networks at same location?

    Until TWC can offer DOCSIS 3.0 later this year or next...
    - In my home I have a closet where all my audio, video and network come together.
    - I have two cable modems from Time Warner
    - Modem A goes to a WRT320N; 192.168.0.1
    -- This router connects all my "heavy" downloads, ie. DirecTV receivers, Netflix, home server w/videos, gaming, etc.
    - Modem B goes to a E2000; 192.168.1.1
    -- This router connects my everyday use computers so they don't suffer poor speeds from all the traffic on Modem A
    My question is, how or can I somehow share files between these two routers without the need for hitting the modems? Obviously I can just push files over the Internet but I am doing it at a much slower speed due to upload restrictions on the modem.
    Thank you for any help on this!

    The easiest way would be to assign LAN IP 192.168.1.2 to the WRT320N and disable the DHCP server. Then assign static IP addresses in 192.168.1.* to all devices connected to the WRT at the moment, e.g. 192.168.1.10, 255.255.255.0, gateway 192.168.1.2, DNS 192.168.1.2 (or DNS servers of your ISP).
    Now you can connect a LAN port of the WRT to a LAN port of the E2000. All DHCP clients get the IP address from the E2000 which will assign the E2000 as gateway, i.e. they use the E2000 for internet. All other devices will have static IP addresses and use the WRT as gateway.

  • How can I share data between two forms on different lists

    Using a custom content type, I created two lists that I want to share the same data - one is a calendar.  Our employees complete a form from the "Out of Office Request" list that has workflow functionality that sends an email to that person's
    manager.  If the manager approves the request, the item automatically populates the "Out of Office Calendar."  The problem is that the only information from the request list that populates the calendar is the Title field and date/time fields. 
    I need the manager name in order to create a view for each manager.  
    How can I connect the other information in the request list to the calendar list.  It seems to me that if the title and date fields carry over the information, there should be a way to connect the other information.  I'm using Designer.
    I've tried to connect the two lists' webparts with the wizard, but when I get to the page that maps the two lists, there are no column names and the "Next >" button is grayed out.  This seems like the logical place to connect the two lists,
    but it isn't working.

    Hi,
    According to your post, my understanding is that you wanted share data between two forms on different lists.
    To show external  information on the calendar event, there are two methods: Calculated column, workflow. You can refer to:
    A Simple Guide to Show More Information on a Calendar Event
    I recommend to use workflow to achieve what you want. But you need to create a people column to display the manager.
    You can create a workflow associated to the "Out of Office Request" list, add action to Start Approve Process. If the manager approves the request, you can create a item in the calendar, and then update the people column and the title column.
    Then the calendar will display the Title, date/time and the manager.
    To create a view for each manager, you need to modify the Filter. You can use the people column is equal to the manager name or the Title contains the manager name.
    Thank you for your understanding.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

Maybe you are looking for

  • Executing a report from a JSP

    I built a report in Reports Builder and I want to execute it from a JSP, especifically in the action of the form, something like this: <form name="forma2" method= "post" action ="">. Am I right? What should I write in the action ??? Thanks for your h

  • PXIe acquiring and disk streaming speed

    Good evening, I need to acquire and stream to disk the status of N.8 digital lines at 100 MHz clock, idest 100MBytes/sec data rate, in continuously mode (without data loss) for five minutes. I've thought to a PXIe configuration with: PXIe 6544 High s

  • Ssrs 2012 export to comma delimited (csv) file problem

    In an ssrs 2012 report, I want to be able to export all the data to a csv (comma delimited) file that only contains the detailed row information. I do not want to export any rows that contain header data information. Right now the export contains hea

  • Premiere cs3 media encoder

    Can anyone recomend a good output for a video containing video and moving images H264 is great for video but the moving images look really bad I need a format that can cope with the two for output on dvd and a file that can be played on a laptop I ha

  • Some doubts about Combo Drivers onto T60 and T61.

    Hello guys, I am own of T60 (200742u) and T61 (7663b93) ThinkPad and I would like to know if I can use combo driver (code 39T2737) that it came with my ThinkPad T60 to newer ThinkPad T61. Is it compatible? Thanks in advance. Ricardo ThinkPad T60 and