Basic automator help needed

I consider myself fairly self reliant, but I cannot figure out how to get "batch rename" to work. I don't think I understand how to utilize automator in it's basic essence. I have large folders of randomly named jpegs. I would like to rename them by topic. I have tried to program and initiate the batch rename automator, but the process does not change the files. Can anyone offer me a step by step, idiot proof, direction of how to do this properly?
I would greatly appreciate some assitance.

Hi, David. Automator is perfectly suited for this task. In fact, you're in luck. Apple has written an excellent easy-to-follow guide that walks you through precisely the project you describe!
http://www.apple.com/macosx/features/automator/example1.html
Good luck, and happy automating.
PowerMac G5 (June 2004) 2x1.8GHz 1.25GB, PowerBook G4 (12-inch DVI) 1x1GHz 768MB   Mac OS X (10.4.3)  

Similar Messages

  • Automator Help - Need script to send text to an existing document

    Hi,
    Automator Newbie Alert. I need help with a basic automator script. I would like to highlight some text, right click and send to an existing document. Adding the text on a new line. Is this possible?
    Thanks

    Sorry, I agree. It will update Style Library and other out of the box ones. Include the library titles in a collection and run the update against them provided these libraries are common across all sites. If not, you will have to first get an extract of
    all such libraries in all sites say in a CSV file and then update the script below to refer to the CSV records.
    Add-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction Stop;
    #List of Libraries to be updated.
    $Libraries = @("Shared Documents","My Document Library");
    $spAssgn = Start-SPAssignment;
    $site = Get-SPSite http://site -AssignmentCollection $spAssgn
    #Walk through each site in the site collection
    $site | Get-SPWeb -Limit ALL -AssignmentCollection $spAssgn |
    ForEach-Object {
    #Enumerate through all document libraries
    $_.Lists|Where{$_.BaseTemplate -eq "DocumentLibrary" -and $Libraries -contains $_.Title}|Foreach-Object{
    #Get the list in this site
    $list = $_;
    #Create a version each time you edit an item in this list (lists)
    #Create major versions (document libraries)
    $list.EnableVersioning = $true
    #Create major and minor (draft) versions (document libraries only)
    $list.EnableMinorVersions = $true
    #Keep the following number of versions (lists)
    #Keep the following number of major versions (document libraries)
    $list.MajorVersionLimit = 7
    #Keep drafts for the following number of approved versions (lists)
    #Keep drafts for the following number of major versions (document libraries)
    $list.MajorWithMinorVersionsLimit = 5
    #Update the list
    $list.Update()
    Stop-SPAssignment $spAssgn;
    This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

  • *Basic* Java help needed...

    I feel like a complete novice for posting this kinda stuff, but i figured somebody would take 5 minutes and help me out. My final in my programming class depends on 2 programs, one of which is giving me some actual trouble.
    What I have to do is create a java applet that allows a user to input their weight, select a planet, and then have their weight converted to what their weight would be on the selected planet. However, if the ouput is higher than 60 pounds, I need a picture of the michelin man to appear and the theme from star wars to play. If it is below 60, A multicolored asterisk should be displayed with applause.
    I will post what code I have already made. Please note: ITS VERY VERY BASIC. I may have overcomplicated some things, and there is always more than one way to do something (in my experience). Also, I kinda just converted a temperature conversion applet, so there may be some extra stuff I don't need.
    Please help.
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    public class tempsapp2 extends Applet implements ActionListener
    Label prompt1;
    TextField input1;
    Label prompt2;
    TextField input2;
    int number1, number2;
    int mercury, venus, earth, mars, jupiter, saturn, neptune, uranus, pluto, result;
    public void init()
    prompt1 = new Label ("Enter your weight:");
    add (prompt1);
    input1 = new TextField (10);
    add (input1);
    prompt2 = new Label ("Enter the Number of the Planet you would like to have your weight converted to:");
    add (prompt2);
    input2 = new TextField (10);
    add (input2);
    input2.addActionListener(this);
    add (input2);
    public void paint (Graphics g)
    number1 = Integer.parseInt(input1.getText());
    number2 = Integer.parseInt(input2.getText());
    mercury = (number1*3780)/1000;
    venus = (number1*9070)/1000;
    earth = (number1*10)/1000;
    mars = (number1*3770)/1000;
    saturn = (number1*9160)/1000;
    uranus = (number1*8890)/1000;
    neptune = (number1*1125)/1000;
    jupiter =  (number1*2364)/1000;
    pluto = (number1*670)/1000;
    if(number2==1)
    g.drawString("Your weight on Mercury would be "+mercury+" lbs",100,150);
    else if(number2==2)
    g.drawString("Your weight on Venus would be "+venus+" lbs",100,150);
    else if(number2==3)
    g.drawString("Your weight on Earth would be "+earth+" lbs",100,150);
    else if(number2==4)
    g.drawString("Your weight on Mars would be "+mars+" lbs",100,150);
    else if(number2==5)
    g.drawString("Your weight on Jupiter would be "+jupiter+" lbs",100,150);
    else if(number2==6)
    g.drawString("Your weight on Saturn would be "+saturn+" lbs",100,150);
    else if(number2==7)
    g.drawString("Your weight on Uranus would be "+uranus+" lbs",100,150);
    else if(number2==8)
    g.drawString("Your weight on Neptune would be "+neptune+" lbs",100,150);
    else if(number2==9)
    g.drawString("Your weight on Pluto would be "+pluto+" lbs",100,150);
    public void actionPerformed(ActionEvent evt)
      number1 = Integer.parseInt(input1.getText());
      number2 = Integer.parseInt(input2.getText());
      repaint();
    }

    I am guessing that you are wondering where to go from here. If so http://java.sun.com/products/plugin/1.5.0/demos/applets/Animator/Animator.java may prove helpful.
    Also I would recommend using arrays of planet names and weight multipliers. It could make your code a lot less cumbersome.

  • Basic DVD Help Needed - More challenging than expected

    Need help creating a basic DVD that a client needs. Here are the specs needed for the DVD:
    No Menu
    No Chapters
    Can scrub forward and backward
    Begins in DVD player in a stopped state
    I can not seem to find an option to remove chapter 1 from the V1 timeline in DVD Studio Pro. Also when DVD is inserted into DVD player the video begins playing right away instead of beginning in a "stopped state" on the DVD player. Any help would be greatly appreciated.

    Make a black menu with a invisible button and link it to your track.
    as for the chapter 1 - you can't get rid of this and is a good thing to have for what your trying to achieve anyways. That way the user can either hit play to start the video or they can hit chapter and it will play as well.
    If you don't want them to be able to push anything other than play on their remote you can disable buttons.

  • Basic Info & Help Needed!

    Hello,
    I recently got Logic Pro, and a TonePort KB37.
    Basically, I can't figure out how to use TonePort on Logic. I see that there's input from it, yet i cannot hear anything.
    I also can't figure out how to record anything.
    If you guys could help me out, I would greatly appreciate it.
    also if you could just offer some basic functions
    like recording with my iBook internal mic or stuff like that, i would like it much.
    thank you in advance
    Cody Trevino

    1)How Do I activate my Plug- Ins?
    Please note that the Toneport DI is preactivated and a license key is not necessary.
    In order to activate your Line 6 Plug-Ins there are a few steps you must take. First, please make sure you have downloaded the latest version of Line 6 Monkey from our website HERE http://www.line6.com/software/ . Once you have the Line 6 Monkey downloaded please plug in the device that contains the plug ins via USB and launch the Line 6 Monkey. On the Optional Add-Ons tab in the Monkey select “Activate Purchase” and paste your License Key in the prompt window. Select “Activate”. Once the Monkey has activated your Plug-Ins you may need to authorize your computer to use them. In the Optional Add-ons tab in Monkey click on the “Authorize” button in the top right corner. For more detailed information please refer to our Gearbox 3.0 set up guide on our website HERE. http://www.line6.com/support/knowledgebase/toneporthelp/

  • Really basic Install help needed, please.

    Assistance would be greatly appreciated.
    Yes, I've searched this whole forum and probably don't know enough to ask the right "search" questions because I haven't found the answers.
    Over the past few months, I've been learning Linux as I now plan to switch from Windows to a Linux distro rather than go with a new computer and Windows 7 and the associated problems.  I have tried several Linux distros individaully side by side with  Windows XP on a partitioned drive.. Most recently I've been using Linux Mint 8 'Helena' and done lots with and to it.  Linux Mint 9 'Isadora' was just released, and since upgrading for a non-rolling distro is a nuisance, I thought I'd try a rolling one. After review and recommendations, I thought I'd give Arch Linux a try. Since most of my computer use is music via a Jukebox (14+k files), browsing, email and info seeking, I don't need all the bells and whistles whith which many distros come. I'm not a gamer.
    Basic Infor:
    PC with 1.4GHz Athlon,  512 Ram, 320 G Hard Drive partitioned equally between Windows XP and Linux (hopefully Arch). High Speed DSL.
    What I need are some really really basic instructions on a side by side install of Arch.
    SOofar, I've got the clock set, and have partitioned my hard drive into
    SDA 1 (my Windows Partition)(160 Gigs
    SDA5                                               1200mb for my swap
    SDA6                                                20 Gigs for the root
    SDA7                                               130 (the rest) Gigs for home
    What I need to know is darned near everything else.
    Bootability for SDA5-7
    How to label (the method for) SDA 5-7
    and thereafter a step by step really simple set of install instructions for a side by side installation.
    I've searched on this forum as well as via Google, but simple  instructions are nowhere to be found. I really have had no trouble installing Mepis, Madriva, Ubuntu, and Linux Mint side by side with my Windows Xp partition and done so for at least 2 of them with manual partitioning rather than the automatic side by side install offered.
    With this introduction, can someone point me to a Arch Linux side by side install for Dummies or help me with a walk through??
    Or am I in completely over my head and need to just go back to Linux Mint and plan to upgrade every 6-18 months? Or try a different rolling Distro???
    Thanks in advance to any and all who can help..
    Dick

    Willie,
    Were I certain I would be happy with Arch, there would be no problem doing as you suggest. However, looking backover at least 2 decades, our first computer was an IBM with an 8086 chip and 20 whole MB of hard drive. The choice of operating systems was DOS. As we moved onwards and upwards, Windows 95, 98, and XP were Hobson's choice for PC users (our office computer used Unix). Now with more experience and research, a new world of operating systems is available, especially for those of us with older computers which would require major (and expensive) upgrades when possible to move to Windows 7. And as with Windows ME, 2000, and Vista, there is probably potential for significant problems with 7. Utilizing my current ability to have 2 (or more) OS's on my computer affords the opportunity to learn more about them and develop my 'geekiness" as well as to evaluate and selectively choose one which will best meet my needs.
    As of now, I have at least 3 problems with abandoing Windows XP completely:
    1) I haven't found a Jukebox program for Linux equivalent to J Rivers' Media Jukebox which has seamless track switching, an equalizer, and DSP studio effects,etc. I've used WINE doors and made it run on Linux Mint, but the program will not recognize my CD-ROM drives. I have some 14+k music files and my computer jukebox runs through my home sound system.
    2) I've some 600+ movies indexed on Movie Organizer (movieorganizer.org) which flat out won't run on the Linux distro's I've tried. Re-entering those 600+ indexed movies to another program will be a bear. So far, no one of my local sources or on the other various Linux forums has a solution. WINE doors won't do it as it needs MDAC. 
    3) For all its frailties and faults, I'm reasonably literate with Windows XP. Linux OS's are still, quite obviously, relatively unfamiliar to me (3 mos experience).. So until I'm much more conversant with Linux, better the devil I know.
    I have installed and used both the Linux Mint 8 Fluxbox and KDE editions on more than one computer so it's not a question of my being shy. BTW, I'm a retired internist, and our speciality is known for being really nitpicky, detail oriented, and investigational, and I'm sure it shows.
    Again, thanks to all for the suggestions and comments. I'll keep in touch.
    Dick

  • Basic form help needed

    I am new to Dreamweaver 8 (but have worked with simple html a
    quite a bit) and am working on building a, hopefully, simple
    prototype for a project. What I need to do is collect user-entered
    text and user-selected dropdown box data on one page and send it to
    another for presentation there. After looking at the Help screens,
    I looked at using Session variables and it seems that is the best
    way to pass the data. Where I am stuck is in the (from Help
    Contents) Making Pages Dynamic - Creating Forms - Creating HTML
    forms help. They first say to, in step 2, Select Insert > Form
    (which doesn't do anything - you have to click another option,
    which I figured meant Form again). Then, in step 3, they say to
    "Specify the page or script that will process the form data." by
    selecting the file in the Action box in Properties. I don't have a
    file to "process the form data" and don't really know what they are
    talking about. Help!
    I originally (before I reverted to using Help) set it up with
    Insert->Form->Text Field text entry boxes, figuring this was
    a Form field that could be captured and passed on. Right? Wrong? I
    guess I thought the method would be to define a variable name
    associated with a text input field in one page, then pass it with
    the value to the next page. That is pretty much what it seems
    Session variables do (?), which I discovered when I started looking
    at Help.
    So, was I on the right track for a simple implementation and
    missed the way to capture and transmit the data, or do I need to
    use the Forms->Forms option? If the former, how do I define the
    variable names? If the later...well, I am real confused then. :-)
    Thanks for your help.
    (btw, we do have training material coming - went with
    Dreamweaver for Dummies, Peachpit Macromedia Dreamweaver 8 Hands-On
    Training "dead tree media" and TechRepublic Fast Track Dreamweaver
    8 CBT. Any opinions on those?)

    Session variables as the name suggests are created when a
    user starts a session and last till the session is open. You form
    doesn't really need session variables unless you are carrying form
    data from one page to another and need to keep it associated with
    that specific user such as in shopping cart applications.
    I have never used the dreamweaver insert form, so can't help
    you there. why not code the form yourself, especially since you
    have been using html
    The link below may help.
    http://www.w3schools.com/html/html_forms.asp

  • Automator help needed

    Hi,
    the question is relevant automator workflow.
    I have a folder with hundred subfolder and in each subfolder there is a file named index.html
    I would like to batch rename all the index.html files with the own subfolder name and then move all of them in a separate folder.
    I have tried several options but the result is always a failure.
    Can some one help?
    Thanks,
    Millone

    Hi,
    OS X can print everything.
    But not by AppleScript without using the GUI Scripting (simulated keyboard and mouse, I use this when there is not any other solution), It's generally slow, not very reliable and the user can not touch the keyboard, mouse or trackpad during the execution of the script..
    It's possible directly in some applications ("Microsoft Word", "Pages"), but Pages does not open HTML files.
    It's possible in Safari by using a virtual printer : https://bitbucket.org/codepoet/cups-pdf-for-mac-os-x/wiki/Home
    AppleScript can change the printer in Safari and create a PDF in the default folder, but it can't change the destination folder.
    There are command line utilities that can be use in an AppleScript, but requires Terminal knowledges to install or make it executables ( http://code.google.com/p/wkhtmltopdf/ or http://plessl.github.com/wkpdf/ ).
    Here is my solution (this AppleScript uses cocoa frameworks in python shell):
    set x to quoted form of POSIX path of (choose folder with prompt "Select the source folder")
    set destFolder to quoted form of POSIX path of (choose folder with prompt "Select the destination folder")
    set pythonScript to "import os, sys, Foundation, AppKit, WebKit
    class AppDelegate (Foundation.NSObject):
      def applicationDidFinishLaunching_(self, aNotification):
         wview = aNotification.object().windows()[0].contentView()
         wview.frameLoadDelegate().openFileIn(wview)
    class WebkitLoad (Foundation.NSObject, WebKit.protocols.WebFrameLoadDelegate):
      def webView_didFailLoadWithError_forFrame_(self, wview,error,frame):
         self.openFileIn(wview)
      def webView_didFailProvisionalLoadWithError_forFrame_(self, wview,error,frame):
         self.openFileIn(wview)
      def openFileIn(self, wview):
         fPath = sys.stdin.readline().rstrip()
         if (fPath == \"\") : AppKit.NSApplication.sharedApplication().terminate_(None)
         tPAth = Foundation.CFStringCreateWithCString(None, fPath, Foundation.kCFStringEncodingUTF8)
         self.filePath = tPAth
         url = Foundation.CFURLCreateWithFileSystemPath(None, tPAth, 0, False)
         wview.window().setContentSize_((400, 200))
         wview.setFrame_(Foundation.NSMakeRect(0,0, 400, 200))
         wview.mainFrame().loadRequest_(Foundation.NSURLRequest.requestWithURL_(url))
         if not wview.mainFrame().provisionalDataSource(): self.openFileIn(wview)
      def webView_didFinishLoadForFrame_(self, wview, frame):
         if (frame == wview.mainFrame()):
           view = frame.frameView().documentView()
           view.window().display()
           rect = view.bounds()
           view.window().setContentSize_(rect.size)
           view.setFrame_(rect)
           dirPath, t = os.path.split(self.filePath)
           fName = os.path.basename(dirPath)
           pdfData = view.dataWithPDFInsideRect_(rect)
           if (pdfData.writeToFile_atomically_(self.destF + fName + \".pdf\", False)): os.remove(self.filePath)
           self.openFileIn(wview)
    app = AppKit.NSApplication.sharedApplication()
    delegate = AppDelegate.alloc().init()
    AppKit.NSApp().setDelegate_(delegate)
    rect = Foundation.NSMakeRect(0,0,100,100)
    wind = AppKit.NSWindow.alloc()
    wind.initWithContentRect_styleMask_backing_defer_ (rect, AppKit.NSBorderlessWindowMask, 2, False)
    wview = WebKit.WebView.alloc()
    wview.initWithFrame_(rect)
    wview.mainFrame().frameView().setAllowsScrolling_(False)
    wview.preferences().setLoadsImagesAutomatically_(True)
    wview.preferences().setShouldPrintBackgrounds_(True)
    wview.setMediaStyle_(\"screen\")
    wind.setContentView_(wview)
    loaddelegate = WebkitLoad.alloc().init()
    loaddelegate.filePath = \"\"
    loaddelegate.destF = Foundation.CFStringCreateWithCString(None, sys.argv[1], Foundation.kCFStringEncodingUTF8)
    wview.setFrameLoadDelegate_(loaddelegate)
    app.run()"
    do shell script "/usr/bin/find " & x & " -type f -name 'index.html' -print | /usr/bin/python -c " & (quoted form of pythonScript) & " " & destFolder
    activate
    display dialog "Done"
    If the script creates the PDF file, the HTML file will be deleted, otherwise the HTML file will remain in the folder.
    Another solution : the "Paparazzi!" application http://derailer.org/paparazzi/ (Donation Ware).
    With this script:
    set x to quoted form of POSIX path of (choose folder with prompt "Select the source folder")
    set destFolder to POSIX path of (choose folder with prompt "Select the destination folder")
    -- get all "index.html" files and his parent name
    set r to do shell script "/usr/bin/find " & x & " -type f -name 'index.html' |/usr/bin/perl -pe 's:.*/(.*?)/.*:$_\\1:'"
    if r is not "" then
        set tFiles to paragraphs of r
        set TC to count tFiles
        repeat with i from 1 to TC by 2
            set tFile to item i of tFiles
            set folderName to item (i + 1) of tFiles
            tell application "Paparazzi!"
                capture tFile delay 0
                repeat while busy
                    delay 0.1
                end repeat
                save as PDF in (destFolder & folderName & ".pdf")
            end tell
            --do shell script "/bin/rm -f " & (quoted form of tFile) & " > /dev/null 2>&1 &"
        end repeat
        quit application "Paparazzi!"
        activate
        display dialog "Done"
    end if
    The HTML files will not be changed, if you want to remove it, uncomment this line :  --do shell script "/bin/rm -f " & (quoted form of tFile) & " > /dev/null 2>&1 &"
    Another solution that I would use:
    The script move the HTML files and it change the relative paths to absolute paths in the HTML files.
    It's not very complicated, but it requires to know the tags of your HTML files.

  • Basic Recording Help Needed!

    I am recording a song that consists of 3 tracks total. I have cut out the parts that are not needed while maintaining the position of the remaining sections. How do I record a final mix that is only one track? Or, how do I burn these tracks to a disc? Basically, I have the recording and editing process done, but now I need to place the music on a disc, or at least have it all saved as one track.
    THANKS!
    LMZ

    Well, I assume since you're in the Logic forum, you are using Logic on your project.
    What you're talking about is called bouncing. This means creating a 2-track mixdown (one track for the left, one for the right). Fortunately, this is easy: just go to File and choose "bounce". From there a window will open giving you several options. If you choose to bounce as AIFF, you can take the resulting file and burn it as an audio CD in Toast or iTunes. Or better yet, you can choose "burn" which will put your smash hit directly on a disc.
    See how easy that was? Now have a pancake.
    macbook pro   Mac OS X (10.4.9)  

  • Basic Profibus Help Needed

    I've been tasked with establishing some communication between a spectrometer (interfaced with by a laptop) and a process skid on a Profibus network to have data such as concentration/total mass/etc. appear on it's hmi. Ive had success in writing a program in C# that mapped this data to analog signals via an NI 6009 and the nidaqmx api to communicate with other skids but am at a loss when it comes to serial communication, how would this connection be established? Could I similarly map the data using some digital i/o device an/or Profibus interface module? I apologize, I'm completely new to this sort of thing, and any sort of Product/Resource recommendation would be much appreciated.

    Hi mbatc,
    What devices are you trying to communicate with?  Are you looking to communicate using a compactRIO or PXI/PCI device for your PROFIBUS communication?  Are you looking to communicate in LabVIEW or a different programming language?  In terms of LabVIEW, we have our cRIO PROFIBUS module, and was also have PXI/PCI format.  We also have examples available to help guide you with using the PROFIBUS modules.  I encourage you to take a look at the examples we include with the cRIO PROFIBUS driver.  Additionally, please take a look at the getting started material we have available for PROFIBUS.  Let me know if you have any questions!
    Matt S.
    Industrial Communications Product Support Engineer
    National Instruments

  • Basic labview help needed

    actually i m working on labview programming..my sub vi is working but when I use it in main vi its not working.. i know its the problem of dataflow but I could not find the solution to my problem..please anone help me out
    Attachments:
    subvi.vi ‏39 KB
    mainvi.vi ‏7 KB

    the way how you call a SubVI was not ok. I hope it works now.
    see attached VI.LV Version 2009
    Message Edited by FHM on 06-10-2010 09:35 AM
    Attachments:
    mainvi.vi ‏26 KB
    subvi.vi ‏16 KB

  • Basic Array Help needed

    K all i am trying to do is Make an array of 5 int and then make a small basic test program that returns the smallest index of the matrix. Now the way i am doing this i want to make two files and make a call to the method that i createded called getSmallest of the public class SmallestIndex. The reason i am doing it this way nstead of putting the code in the main method is because i want to learn to pass arrays as parameters . I am learning them for the first time. This is my code:
    import java.util.*;
    import java.io.*;
    public class SmallestIndex
         public static int getSmallest(int[] matrix)
              int minIndex = 0;
              int smallestmatrix;
              for(int index = 1; index < matrix.length; index++)
                   if(matrix[minIndex] < matrix[index])
                        minIndex = index;
                   smallestmatrix = matrix[minIndex];
                   return smallestmatrix;
         public static void fillarray(int[] matrix, int numofelements) throws IOException
              BufferedReader board = new BufferedReader(new InputStreamReader(System.in));
              StringTokenizer tokenizer;
              tokenizer = new StringTokenizer(board.readLine());
              for(int index = 0; index < numofelements; index++)
                   matrix[index] = Integer.parseInt(tokenizer.nextToken());
                   if(!tokenizer.hasMoreTokens())
                        tokenizer = new StringTokenizer(board.readLine());
         public static void printArray(int[] matrix, int numofelements)
              for(int index = 0;index < numofelements; index++)
                   System.out.print(matrix[index] + " ");
    import java.io.*;
    public class TestMatrix
         static BufferedReader board = new BufferedReader(new InputStreamReader(System.in));
         public static void main(String[] args) throws IOException
              int[] matrix = new int[5];
              for(int index = 0; index < matrix.length; index++)
                   matrix[index] = Integer.parseInt(board.readLine());
              System.out.print("Elements");
              SmallestIndex.printArray(matrix, matrix.length);
              //SmallestIndex.fillarray(matrix);
              //SmallestIndex.getSmallest(matrix);

    Here's something slightly different. Compare to yours to see differences
    import java.io.*;
    class SmallestIndex
      public SmallestIndex()
        int[] matrix = fillArray();
        printArray(matrix);
        System.out.println("Smallest          = " + getSmallestNumber(matrix));
        System.out.println("Index of smallest = " + getSmallestIndex(matrix));  
        System.exit(0);
      private int[] fillArray()
        int[] temp = new int[5];
        try
          BufferedReader board = new BufferedReader(new InputStreamReader(System.in));
          for( int x = 0; x < 5; x++)
            System.out.print("Enter a number: ");
            temp[x] = Integer.parseInt(board.readLine());
        catch(Exception e) {System.out.println("error - " + e.getMessage());}   
        return temp;  
      private void printArray(int[] arrayToPrint)
        for(int x = 0; x < arrayToPrint.length; x++)
          System.out.println("Element "+ x + " = " + arrayToPrint[x]);
      private int getSmallestNumber(int[] arrayToGetNumber)
        int smallest = arrayToGetNumber[0];
        for(int x = 1; x < arrayToGetNumber.length; x++)
          if(arrayToGetNumber[x] < smallest)
            smallest = arrayToGetNumber[x];
        return smallest;
      private int getSmallestIndex(int[] arrayToGetIndex)
        int smallest = arrayToGetIndex[0];
        int smallestIndex = 0;
        for(int x = 1; x < arrayToGetIndex.length; x++)
          if(arrayToGetIndex[x] < smallest)
            smallest = arrayToGetIndex[x];
            smallestIndex = x;
        return smallestIndex;
      public static void main(String[] args){new SmallestIndex();}
    }

  • WLAN Controller basic configuration help needed

    Please advise me for the initial config. of wlan controller. if found following parameters needs to be configured for initial config. of wlan controller.
    Enable Link Aggregation (LAG) [yes][NO]:
    Management Interface IP Address:
    Management Interface Netmask:
    Management Interface Default Router:
    Management Interface VLAN Identifier (0 = untagged):
    Management Interface Port Num [1 to 2]:
    Management Interface DHCP Server IP Address:
    AP Transport Mode [layer2][LAYER3]:
    AP Manager Interface IP Address:
    AP-Manager is on Management subnet, using same values
    AP Manager Interface DHCP Server (192.168.50.3):
    Virtual Gateway IP Address:
    Please advise me what these parameters mean. I'm new to wlan controller.
    Please advise.
    Thanks in advance.

    Enable Link Aggregation (LAG) [yes][NO]: Yes
    Management Interface IP Address: ex - 192.168.1.2
    Management Interface Netmask: Ex- 255.255.255.0
    Management Interface Default Router: 192.168.1.1
    Management Interface VLAN Identifier (0 = untagged):(Hit enter no need to fill this)
    Management Interface Port Num [1 to 2]:1
    Management Interface DHCP Server IP Address:
    AP Transport Mode [layer2][LAYER3]: LAYER 3
    AP Manager Interface IP Address: ex - 192.168.1.3 (same subnet that of Management interface)
    AP-Manager is on Management subnet, using same values
    AP Manager Interface DHCP Server (192.168.50.3):
    Virtual Gateway IP Address:1.1.1.1

  • Applescript/Automator help needed.

    I attempting to create an Automator Folder Action that will do two things.  First, when an image is added to the “Upload” folder, a new mail message will be created.  Second, it will run an applescript that allows me to select from a list of album names.  This value will go into the title field of the new email.  Here’s what the Automator Folder Action looks like so far:
    1.  Automator Action:  Get Selected Finder Items - this will get the item just added to the “Upload” folder. 
    2.  Automator Action:  Set Value of Variable - Since I don’t see a way to save the image itself as a variable, I store the image name here and call it “Image Name.”
    3.  Automator Action:  Run AppleScript - When run, this will bring up a list of album names.  I click on the one I want and click OK.
    4.  Automator Action:  Set Value of Variable - set the value that holds the album name from step 3.
    5.  Automator Action:  Get Value of Variable - gets the value stored in step 2.
    6.  Automator Action:  New Mail Message - Fills out the To: field, populates the Subject: field with the Album name.  But here’s where it fails.  It populates the message field with the name of the path where the image is located, not with the image. 
    Note the first and last actions are disabled.
    It seems this would work if I could pass the image itself as a variable, but I see no way to do that.  I apparently can only pass the name of the image.
    Any ideas how I can fix this? Thanks!

    There is an error in the AppleScript.  It should read...
    on run {input, parameters}
              set the_list to {"Album 1", "Album 2", "Album 3"}
    choose from list the_list
              set album_name to result
              return album_name
    end run
    But the problem is still there.

  • Help needed for using BASIC authentication through JDBCRealm

    Help needed.
    Hello,
    I am doing a degree project, so far it works fine in my local machine, I need to try it on my virtual hosting (as it is a live server).
    My project requires JDBCRealm, that is BASIC authentication loading access data from mysql database. Normally this setup can be done in Server.xml file, because my Tomcat hosting is a virtual one, I only have permission to access the web.xml file.
    My question is: is it possible to get it done in an alternative way? In web.xml? Some properties file maybe?
    Thank you very much.

    You can set this up for your context using META-INF/context.xml instead of working with server.xml.
    Make a directory called META-INF under your webapp ( it'll be at the same level as WEB-INF ). Under this, add a context.xml with all your context specific configuration including the realm. A sample is below
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/myApp" reloadable="true">
        <Realm
            className="org.apache.catalina.realm.JDBCRealm"            
            driverName="com.microsoft.jdbc.sqlserver.SQLServerDriver"         
            connectionURL="jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=myDB;SelectMethod=Cursor;"
            connectionName="username" connectionPassword="password"
            digest="MD5" userTable="users" userNameCol="userid" userCredCol="userpassword"
            userRoleTable="user_roles" roleNameCol="rolename"
        />
    </Context>Hope this helps.
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    ----------------------------------------------------------------

Maybe you are looking for

  • Get/Set values from a drop down list

    I am trying to modify the http://www.netbeans.org/kb/60/web/web-jpa-part2.html so that instead of entering the data from a text field (in update & add) the values come from a drop down list from a table. I have drop down lists that are populated both

  • Transfer of Pictures from PC to MacBook Pro

    Two questions. I recently bought a MacBook Pro and successfully transferred pictures from our PC. Although photographs in IPhoto retain the dates on which they were originally taken, those in Pictures only have the date on which they were transferred

  • Imessage will ONLY have option to send from email. Phone number is greyed out... Please help

    Hi, I have tried all of the tips and tricks for getting my imessage to send from my phone number, not my email but I am not having any luck. The option in the message settings has my phone number greyed out and my apple ID has my phone number stored.

  • Trouble with euro symbol ( x80 )

    Hi! on windows-plattforms the euro-symbol often is encoded with x80. I can manage to read from those files/streams, but as soon as I try to write this value to into a stream with whatever encoding java "thinks" that x80 is not a printable character a

  • How to uninstall a program

    I dowloaded a screenshot free app and I didnt care for it...and now I cant get rid of it...I clicked on Menue and selected delete and deleted the icon but in menue it's still there. is there some other way to delete apps that I dont know about?