Trying to understand serialization basics

im getting a error messege in my test class
file load errorjava.lang.ClassCastException: java.lang.String
why would i be getting java.lang.string as a error if im trying to return a object
the load methods not working right but it seemed to save fine
can anyone tell me what im doing wrong
heres my full test applet
import java.util.Vector;
import java.io.*;
// ill serialize a vector here
public class SerilizationUsage extends Frame implements Serializable
Vector v = new Vector();
Vector vec;
A a;
int currentelement =0;
public SerilizationUsage(){
       a = new A();a.value = 2;
    v.addElement (a);
    a = (A) v.get (currentelement);
    System.out.println("v "+currentelement+"th elements value "+a.value);
    save();
    load();
public void save(){
try{
FileOutputStream out = new FileOutputStream("thevectordata");
ObjectOutputStream s = new ObjectOutputStream(out);
s.writeObject("v");
s.flush();
}catch (Exception e) {System.out.println("file save error"+e);}
public void load(){
try{
FileInputStream in = new FileInputStream("thevectordata");
ObjectInputStream s = new ObjectInputStream(in);
vec = (Vector)s.readObject();
}catch (Exception e) {System.out.println("file load error"+e);}
public static void main(String args[]){
System.out.println("Starting App");
SerilizationUsage f = new SerilizationUsage();
     System.exit(0);
class A{
int value;
public A(){value = 1;}
}

ah wait i didnt see i put "v" instead of v but now its giveing me a not serializable error
file save errorjava.io.NotSerializableException: A
file load errorjava.io.WriteAbortedException: Writing aborted by exception; java.io.NotSerializableException: A

Similar Messages

  • Trying to understand the basic concept of object oriented programming.

    I am trying to understand the basic concept of object oriented programming.
    Object - a region of storage that define is defined by both state/behavior.
    ( An object is the actual thing that behavior affects.)
    State - Represented by a set of variables and the values they contain.
    (Is the location or movement or action that is the goal that the behavior is trying to accomplish.)
    Variables- (What does this mean?)
    Value - (What does this mean?)
    Behavior - Represented by a set of methods and the logic they implement.
    ( A set of methods that is built up to tell's the how object to change it's state. )
    Methods - A procedure that is executed when an object receives a message.
    ( A very basic comand.For example the method tells the object to move up, another method tells the method to go left. Thus making the object move up/left that combination is the behavior.)
    Class - A template from which the objects are created.
    ( I am very confused on what classes are.)
    - The definitions of the words I obtained from the "Osborne Teach Yourself Java". The () statements are how I interperate the Mechanisms (I do not know if Thats what you call them.) interact with each other. I understand my interpretation may be horribly wrong. I will incredibly appreciate all the support I may get from you.
    Thank you

    Object oriented programming is a replacement for the older idea of procedural programming (you can research procedural programming in google). As I understand it, in procedural programming, you have a step by step set of function calls to accomplish some task. Each function receives a data structure, manipulates it, and passes it to the next function. The problem with this is that each function preforms some action for the overall task and can't easily be reused by some other task. Its also harder to read the flow of what is happening with raw data structures flying all over the place.
    In object oriented programming, an object calls a function of another object and receives back, not a data structure, but another object. Objects contain a data structure that can only be accessed by its functions. An object is not so much a sub component of a bigger task, as it is a service that any other task can use for any purpose. Also, when you pass an object to the caller, the caller can ask questions about the data structure via its functions. The developer doesnt have to know what the previous function did to the data by reading up on any documentation, or having to reverse engineer the code.
    I suggest the best way of learning this is to code something like a library object.
    A library object contains a collection of book objects
    A book object contains a collection of chapter objects
    A chapter object contains a collection of paragraph objects
    A paragraph object contains a collection of sentence objects
    A sentence object contains a collection of word objects.
    Add functions to each object to provide a service
    Example: A library object should have a:
    public void addBook(Book book)
    public Book getBook(String title)
    public boolean isBookInLibrary(String title)
    The key is to add functions to provide a service to anyone who uses your object(s)
    For example, what functions (service) should a paragraph object provide?
    It shouldn't provide a function that tells how many words there are in a sentence. That function belongs to a sentence object.
    Lets say you want to add a new chapter to a book. The task is easy to read
    if you write your objects well:
    Sentence sentence1=new Sentence("It was a dark and stormy night");
    Sentence sentence2=new Sentence("Suddenly, a shot ran out");
    Paragraph paragraph=new Paragraph();
    paragraph.addSentence(sentence1);
    paragraph.addSentence(sentence2);
    Paragraphs paragraphs=new Paragraphs();
    paragraphs.addParagraph(paragraph);
    Library library= new Library();
    library.getBook("My Novel").addChapter("Chapter 1",paragraphs).
    Now, lets say you want to have a word count for the entire book.
    The book should ask each chapter how many words it contains.
    Each chapter should ask its paragraphs, each paragraph should ask
    its sentences. The total of words should ripple up and be tallied at each
    stage until it reaches the book. The book can then report the total.
    Only the sentence object actually counts words. The other objects just tallies the counts.
    Now, where would you assign a librarian? What object(s) and functions would you provide?
    If written well, the project is easily extensible.

  • Trying to understand the basics of iTunes

    It may sound stupid, but after having read various manuals, guides, forum discussions, I still don't understand the basics of iTunes - is a 64 yo maybe too old for this?
    Yes, I can fill my iPod with music and sync it with my laptop. But to manage everything well, I need answers on these questions:
    - After I add my laptop folder MY MUSIC to the iTunes library, does iTunes make COPIES of all my files in that folder? Or just links? If copies, where are they stored?
    - What does the term synchronisation include? Does it mean: the music in the iTunes library will be identical to the music in the iPod? Or:
    - Will all changes in that folder automatically lead to updates of my iTunes library? Changes such as adding/removing files, changing filenames, modifying files with audio editors. If the contents are not automatically updated/synchronised, is there a manual way to do that?
    - And vice versa: if I delete a song in iTunes, does that effect the source file in MY MUSIC? If not, is there an option to delete the song there as well?
    - Could I theoretically delete the whole contents of MY MUSIC folder after all files have been added to iTunes? Is it recommended to do so? Or should I keep the 'originals'?
    - The same goes for cd's: After I (automatically or manually) added the contents of a cd to iTunes, could I theoretically throw or give it away?
    - There is the option to find doubles. If I want to delete one or more of them, how do I know which file I delete. I mean this: if song X is part of album A but also of a bunch of single files, then I would like to keep the album folder complete and just delete the 'single' occurrence. But how to determine that?
    - Changing filenames in MY MUSIC often has no effect on the filename as displayed in iTunes. Why not?
    - I think that is all for now. Maybe later I still come across more basic questions.
    Could anyone give me the basic answers? And if possible in language for dummies, not in nerd slang, please
    Thanks!
    WimYogya
    Dutchman in Indonesia

    *After I add my laptop folder MY MUSIC to the iTunes library, does iTunes make COPIES of all my files in that folder? Or just links? If copies, where are they stored?*
    That depends. Open iTunes and go to Edit>Preferences>Advanced. If "Copy files to iTunes Music Folder" is checked then iTunes is "copying" the files into the iTunes Music folder which is inside the iTunes folder. The library is then referenced to the location of the copy ( in this case you can if you wish delete the original). If it's unchecked it is adding the songs to to your iTunes library but referencing the location that the file is in without making a copy.
    *Will all changes in that folder automatically lead to updates of my iTunes library? Changes such as adding/removing files, changing filenames, modifying files with audio editors.*
    No, iTunes doesn't support folder watching so all changes have to be made within iTunes.
    *If the contents are not automatically updated/synchronised, is there a manual way to do that?*
    File>Add File to Library: Adding Content to iTunes
    *if I delete a song in iTunes, does that effect the source file in MY MUSIC? If not, is there an option to delete the song there as well?*
    iTunes will delete songs from the library and move them to Trash (Recycle Bin) only if they are in the iTunes Music folder. (iTunes will ask if you want to trash the file if this is the case, it doesn't trash it automatically). If your songs are kept outside of this folder then deleting only removes the reference to the song from the library and you have to go to the folder they are located in to trash the file itself.
    *Could I theoretically delete the whole contents of MY MUSIC folder after all files have been added to iTunes? Is it recommended to do so? Or should I keep the 'originals'?*
    You could only delete the songs from the original folder if you have set the preference above to copy the files to the iTunes Music folder, if not you have to keep them where they are. Regardless of where the files are stored you would be well advised to back them up in case you have problems with your computer. You might also find this article interesting/useful: iLounge - The Complete Guide to Backing Up your iTunes Library
    *The same goes for cd's: After I (automatically or manually) added the contents of a cd to iTunes, could I theoretically throw or give it away?*
    You don't own the copyright of the song, basically you own the license to play it. if you make a copy and then sell/give the CD away you are essentially sharing the files illegally.
    *There is the option to find doubles. If I want to delete one or more of them, how do I know which file I delete. I mean this*
    You would have to check the location of the file manually to be sure which one you wanted to keep.
    *Changing filenames in MY MUSIC often has no effect on the filename as displayed in iTunes*
    Because iTunes doesn't support folder watching, changes need to be made within iTunes. Changing the name of a file outside of iTunes can cause iTunes to lose the location of the file since it is referenced under the name it had when you added it.

  • Trying to understand the basics of architecture

    Hi there, that's my first post here.
    I began working with Oracle SGBD, started using Oracle 11g, then I have installed it on a computer and created sucessufully an user/database, the question is: I don't understand clearly
    yet the difference between tablesapce, schema, instance , database/user (is an user a database and vice-versa) and other question is about view, trigger, procedure and profile?
    Could you help me on understanding both questions?
    André AS.

    user13002323 wrote:
    hmm, very good, liked it... thanks for sharing the reference EdStevens.Good, but you haven't had time to do more than scan the TOC. Go back and start reading
    >
    I have read some tips now that helped me out too, let me try saying the concepts I've got and being more specific on questioning:
    1 - When I created the user, it also meant I've created the database by creating the user, I wanted to say, on Oracle user and database are the same?
    Absolutely untrue. Sounds like you are trying to apply SQL Server concepts to Oracle. The very term 'database' means different concepts between the two products.
    In oracle, the 'database' is the all-encompassing structure. EVERYTHING else exists inside the database - including users. Go back and
    2 - The Oracle's instance is a scope where someone could find the schemas that hierarchically are the databases linked to a tablespace (directory to record data)?The instance is the memory space and processes that operate the database.
    >
    3 - Every user/database I generate will use some profile? Every user you created will have a profile. Creating a user is NOT the same as creating a database.
    >
    4 - What's the difference between procedure, trigger and view?
    What is the difference between a car, a truck, and a duck?
    A procedure is a named and stored set of sql and plsql statements, that can be executed on-demand by referencing the name of the procedure.
    A trigger is a special kind of procedure, that executes when a defined event occurs.
    A view is a pre-defined and name query that can be SELECTed as if it were a table.
    hope that's clearer.
    Please spend some time actually reading the Concepts Guide, and specifically looking for the answers to your questions. We don't mind answering questions -- that's why we're here -- but we expect you to do some reading and thinking on your own.
    =================================================
    Learning how to look things up in the documentation is time well spent investing in your career. To that end, you should drop everything else you are doing and do the following:
    Go to tahiti.oracle.com.
    Drill down to your product and version.
    <b><i><u>BOOKMARK THAT LOCATION</u></i></b>
    Spend a few minutes just getting familiar with what is available here. Take special note of the "books" and "search" tabs. Under the "books" tab you will find the complete documentation library.
    Spend a few minutes just getting familiar with what <b><i><u>kind</u></i></b> of documentation is available there by simply browsing the titles under the "Books" tab.
    Open the Reference Manual and spend a few minutes looking through the table of contents to get familiar with what <b><i><u>kind</u></i></b> of information is available there.
    Do the same with the SQL Reference Manual.
    Do the same with the Utilities manual.
    You don't have to read the above in depth. They are <b><i><u>reference</b></i></u> manuals. Just get familiar with <b><i><u>what</b></i></u> is there to <b><i><u>be</b></i></u> referenced. Ninety percent of the questions asked on this forum can be answered in less than 5 minutes by simply searching one of the above manuals.
    Then set yourself a plan to dig deeper.
    - Read a chapter a day from the Concepts Manual.
    - Take a look in your alert log. One of the first things listed at startup is the initialization parms with non-default values. Read up on each one of them (listed in your alert log) in the Reference Manual.
    - Take a look at your listener.ora, tnsnames.ora, and sqlnet.ora files. Go to the Network Administrators manual and read up on everything you see in those files.
    - When you have finished reading the Concepts Manual, do it again.
    Give a man a fish and he eats for a day. Teach a man to fish and he eats for a lifetime.
    =================================
    Edited by: user13002323 on 10/01/2013 05:02

  • Trying to understand the Serialization interface

    Im trying to understand the Serialization of objects?
    As an example, I create a Library class that implements Serializable, that stores a collection of Book objects
    If I am only looking at saving a Library object to file, does the Book class require Serialization also or just the Library?
    I have read the API on serialization, no answer there, if it is it's not easy to understand or read into the API...

    There are some really important things to know about when doing serialization. For example one important thing to know about that not is mentioned here is that your serializable classes must define its own private static final long serialVersionUID because if you not do that will you not be able to deserialize (read in) the data you have saved later if you change anything in your serializable class. It is a bit tricky to manage files to which you have serialized different versions of your class, that is versions where you have added more serializable members to the class after you have serialized files. Well, it is not a problem if you don´t care if you have to type in all your saved data again every time you change anything instead of deserialize it (read it) from your file of course :)
    Situations like this may be handled if you define your own (private) writeObject(ObjectOutputStream) and your own readObject(ObjectInputStream) methods in your serializable class but there is a better a lot smarter way to handle this. Use of a serialization proxy! how to use that is described in the excellent book Effective Java 2nd ed. With a serialzation proxy for every serializable version of your class (where a version corresponds to a version of your class with differences in its number of serializable members) may your class deserialize data written from elder versions of your class also. Actually is it first since I read the last chapter of Effective Java that I think I have myself begin to understand serialization well enough and I recommend you to do the same to learn how to use serialization in practice.

  • Trying to understand Android OS updates delays

    This is not another hate mail, it´s more about trying to understand the facts and motives regarding the OS updates (or lack of).
    Hopefully this material will arrive at someone from Sony with enough power to do something about it.
    Ever since I can remember, Sony has been THE brand for electronics. I can´t remember a TV or VCR in my house that it wasn´t Sony, and they lasted for LOTS of years.
    When a couple years ago I finally had the money (and the need) for a Smartphone, i chose the X10 Mini, which is a great little phone from a great brand, but it´s stuck at Android 2.1... which makes it a crippled android nowadays...
    It really bothered me the lack of OS updates, so I chose to buy a Galaxy Nexus, but it´s really expensive in my country. So my second option was a Galaxy Ace 2, but they haven´t arrived to my country yet, so I went with my third option: Xperia Sola, knowing beforehand that it´s a great phone, a great brand, but I might get slow OS updates.
    I bought it about 10 days ago when I saw they were starting to roll out the updates.
    10 days later I still don´t have my update. And not only that, but I don´t see much light at the end of the tunnel...
    I found a thread with the SI numbers that were updated, and there were a bunch on Oct 1, another bunch on Oct 4, and one code on Oct 8, and no other update since...
    I also read that those who did get the update, were having bugs with the OS, and also found threads from other Xperia models, whose updates began rolling 3 months ago, and there is still people who hasn´t gotten the update...
    As a customer, and a owner/CEO of a small company, I have a really hard time understanding how a HUGE company like Sony can be making such mistakes...
    I have been thinking objective reasons, and I can only think of one. I know it´s a wild guess, but I´m starting to think that our salvation might be the very thing that means our condemnation: CYANOGENMOD!!!
    Think about it: Why would Sony spend more money hiring twice as much programmers, when they can make only one update per phone, and sit down and see how CM releases begin to appear, for all tastes and needs. And... IT´s FREE!!!
    Also, if there is a software related problem (way more likely than a hardware problem), then the CM developers take the fall, instead of Sony. And I´m beginning to see custom OS installers that are more user friendly, so it might be something that they take in accout when neglecting OS updates.
    If that´s the line Sony is following, it´s a very risky move and it won´t work. Sony Mobile will crash and burn, but it´s still a better business plan that "let´s get lazy and make ULTRA slow updates so we don´t spend a lot of money programming".
    If you can´t afford more programmers, stop including so much bells and whistles and make your OS near vanilla. Include a couple of Xperia menus, a custom theme and voila!
    The main reason I wanted the Galaxy Nexus is Vanilla OS, which means inmediate OS updates. Sony on the other hand, takes a year or two to release it after its launch. If they release it at all...
    Another though...  why not stop making that many different phones! Really! There are like 5 Xperia models i can´t tell one from the other... even with specs side by side!
    You are trying to make too many phones and you are failing with all of them! (Software and software updates are also part of the phone, one of the most importants...)
    I know hiring programmers is expensive, but you are sacrificing one of the most expensive values for a company EVER: Customer credibility! Which as you know better than me, takes years to create.
    If Apple had problems with carriers and code aprooving and stuff, they might get away with it, becouse they alone have all the devices. If iOS 6 is delayed a few months, it´s delayed for everyone, and besides Apple fanboys rarely complain about Mac products, but Android is a more independent and educated market.
    I´m not saying that Apple users are ignorant, not at all, but I´m pretty sure most iPhone owners don´t even know what processor or how much RAM their phone has. They just "swallow" the Apple Way of Life. (it´s a good phone becouse Apple says so).
    The Android user on the other side, because of the fragmentation of the market, has many brands and models to choose from. An Android user about to buy a new phone will most likely go online looking for different models, specs, reviews in webs and forums...etc.
    You can´t say "I don´t know how HTC and other companies get their updates so soon, but we take a lot more becouse Google and the Operators must aproove the code.", because there are many other brands that have exactly the same difficulties or more, since they are smaller, and we can SEE online that they are indeed delivering solid and relativly fast updates.
    Did we miss something? Does HTC use Witchcraft to get their code aprooved?
    My underlying point is this: You are getting lazy... VERY lazy with software programming for your phones, and WE KNOW IT!
    It´s not the "difficulties" you claim, becouse every brand has those difficulties.
    This isn´t 1999 you know. We are in the information age. If you lie to us and tell us that your phones have the latest OS, I can go online and see that you don´t (Hello!!!). If I see that the company lies to it´s customers, I will stop buying their products. If I´m so dissapointed with how Sony handles OS updates and their customers queries about it, then I want for the first time ever to sell my Cell Phone becouse I´m not happy with it, or the brand behind it.
    We also live in the "Here and now" age. You can´t expect your customers to read about new Android releases on news and blogs, and wait YEARS with arms crossed waiting for their update... The world doesn´t work like that. Not anymore at least...
    It´s not a matter of how many recources you have, it´s about how you use and balance them. GIVE MORE IMPORTANCE TO SOFTWARE UPDATES! IT´S WAY MORE IMPORTANT THAT YOU THINK! LISTEN TO YOUR CUSTOMERS!!!
    You guys are Sony are smart and design great products, but you are not GOD! You are not our wife, no one has sworn alliagence to you.
    If you stop giving us good products and start lying to us, we hate you and stop giving you our money. Simple as that.
    My sola is beatiful, I love the design, the screen, the hardware... but it hasn´t been updated yet to 4.0, not to mention 4.1, which REALLY is the latest version... so stop advertising that your phones have the latest Android OS, unless you want angry customers switching to other companies, which you are getting.
    I also read some stories that Androind 4.0 was announced for the Xperia PLAY, and then it was called off... Do you have any idea how pissed I would be and ripped off I would be if I bought my phone based in that information and then you say it won´t be available?
    Well, actually right now my possition is worse, since you SAY you will update my phone, but you don´t say when, and I read online about people still not getting their updates months after the rollout started, so I´m in the limbo right now...
    As a company, one of the worse things you can do is calling your customers stupid, and when I see the answers you give in this forum, then I feel insulted. I feel like they are talking to an idiot or ignorant person with the so called "diplomatic" answers, which are basicly empty excuses for not doing your job right.
    You gave us the frikking CDs, DVDs and Blu-Rays!!! Don´t tell us you can´t tweak an already built OS in a year!
    I really hope you change their OS update policies really soon, before you lose the already small cellphone market share you have, or at least change your P.R. and C.M. policies towards a more open one.
    We all are humans and make mistakes, but we customers really appreciate honesty and truth.
    Have an open conversation with your customers! Don´t lie about your shortcomings! Accept then and ask the community to help you solve them, ask them what they biggest problems are, what features are most important to them, how often do they expect updates... LISTEN TO THEM!!
    "Succes is a meneace. It tricks smart people into thinking they can´t lose."
    Ps: Nothing personal with the mods from this forum, I´m not killing the messenger, I know that you can ONLY give the info you are allowed to give, and even if you wanted, you probably don´t know the answers yourself, since you work in the Communications department, not Developement or anything technical, and if you can't give any given info, then they probably won´t give it to you either... My message is to the company as a whole. I just hope you will be a good messenger and give this to whoever needs to read it.

    My bad, it´s closer to 40 the number of phones released hehe
    I know it´s all about money, and I know Sony is obligated to neglect users who haven´t given them money after an x ammount of time. However, it´s not a matter of making the phones obsolete earlier, so the users want to buy a new phone faster and therefore getting more money.
    A person will buy a new phone when he/she has the money to do so and wants to do so.
    It´s not a matter of WHEN. It´s a matter of WHAT.
    The question is not "When will that user buy a new phone?", but rather "When that user buys a new phone, whenever that is, what phone will it be?"
    I have a love/hate relationship with Apple. I would never use a iPhone. I would love having any Mac, if someone gives it to me, but I would never spend my harn earned dollars on such an overpriced piece of hardware over general principals.
    However, i do recognice that Steve Jobs was a business genius. Weather you like or love his ideas and methods, he turned a garage project into the biggest company in the world, with a market value higher than Exxon with 1/3 of it´s assets.
    Apple is a money making machine, and that is where the "hate" part of my relationship comes from.
    However, it surprised me a lot to see that they released iOS 6 for the iPhone 3GS, released in 2008!
    That get´s you thinking, that inside all that "SELL NOW" culture Apple is, they also support their older devices that people bought years ago but can't buy a new phone now. However, when they can do it, it will surely be another iPhone. Because they FEEL that the company listens and cares for them.
    Also if you jump from iOS 6 on the 3 GS to a brand new iPhone 5, the transition will be virtually non-existant, except for Siri and a couple of features.
    However jumping from Android 1.5 or 2.1 to Jelly Bean, might not be so easy on some users, making them more likely to give iPhone a shot.
    Since they have to adapt to another phone anyway, they might as well try the apple...
    And for old users, it gives people a sense of continuity and care about the user. Otherwise we feel like being kicked out of a restaurant right after we payed the bill.

  • Trying to understand OIM - Please help

    Hello All,
    I am pretty new to OIM, just trying to understand how OIM works. For the past 4 years I was in Sun IdM and planning to switch over to OIM.
    I read some documentation, I think OIM will perform basic provisioning and it contains out of box connectors to do basic provisoning. I have some questions can anybody please help
    - Sun IdM uses Express language to develop custom workflows or forms, in OIM to develop workflows which language did you use, is it Java or any other language?
    - If I want to provision users on AS/400, HP Open VMS or AIX systems, how can I do that I don't see any out of box connectors for these resources, so in order to integrate these resources do we need to write our own custom connectors?
    - If the out of box connector does not support a specific function on a resource what are the options do we have? for example if the AD connector does not support to delete the exchange mailbox, how your going to perform this in OIM? Do we need to write a Java code for this?
    - How much Java coding is necessary in OIM?
    - Is OIM supports role based provisioning?
    Please share any information.
    Thanks in advance.

    Sun IdM uses Express language to develop custom workflows or forms, in OIM to develop workflows which language did you use, is it Java or any other language?
    - JAVA
    If I want to provision users on AS/400, HP Open VMS or AIX systems, how can I do that I don't see any out of box connectors for these resources, so in order to integrate these resources do we need to write our own custom connectors?
    - If OOTB connectors are not available then you'll have build you own connector as per Target Resource.
    If the out of box connector does not support a specific function on a resource what are the options do we have?
    - You'll have customize their connector as per your requirements or write your own
    How much Java coding is necessary in OIM?
    - We can't calculate how much java. It's totally depends on requirements how much code you'll ahve to write. But everything will be done using Java only.
    - Is OIM supports role based provisioning?
    Here Group represent Role. At a small scale it supports. But for large scale you'll have to use Oracle Role Manager as you do in Sun Role Manager.

  • Trying to understand the code???

    Hi,
    I am trying to understand the following bit of code, currently the code puts each catalogue into a different row of the table but i want each catalogue to be put in the next column
    (so the catalogues appear across the page on the actual web page). The following code is for the page in question but im not sure how much is relevant so i will paste it all and highlight the section i think is relevant:
    <html>
    <%-- DECLARATIONS --%>
    <%@ page import="se.ibs.ns.cf.*,  se.ibs.ccf.*, se.ibs.bap.*, se.ibs.bap.util.*, se.ibs.bap.web.*,  java.util.*, se.ibs.ns.icat.*, se.ibs.bap.asw.cf.*, java.lang.*" %>
    <% ItemCatalogueBean bean = (ItemCatalogueBean)SessionHelper.getSessionObject("ItemCatalogueBean",session);
       String resourcePath = bean.getResourcePath(null);
       String title = "Product catalogue";
       String languageCode = bean.getLanguageCode();
    %>
    <%@ include file="FuncHead.jsp" %>
    <BODY class="IBSBody" onLoad="loaded = true;">
    <form method="POST" action=<%= bean.getEncodedServlet("se.ibs.ns.icat.ItemCatalogueSearchServlet", response) %> name="basicForm">
    <%@ include file="FuncSubmitScript.jsp" %>
    <%@ include file="FuncPageBegin.jsp" %>
    <div align="center">
      <table border="0" width="895">
        <tr>
          <td align="left" width="502">
    <div align="left">
      <table border="0" width="500">
        <tr>
          <td class="IBSPageTitleText" align="left" valign="top" width="238">
              <%@ include file="FuncPageTitle.jsp" %>
              <%@ include file="FuncPageTitleImage.jsp" %>
                    <br>
           On this page you can see the product catalogues. Click on one of the
           links to go to the next level. Alternatively you can click the <b>Search
           catalogue</b> button to find the products of interest.</td>
               <td width="248" valign="bottom">
                <div align="left"><%@ include file="FuncShoppingCart.jsp" %></div>
               </td>
        </tr>
      </table>
    </div></td></tr></table></div>
    <input type="submit" value="Search catalogue" name="ACTION_NONE" onClick="submitButtonOnce(this); return false">
    <hr>
    <%-- REPEAT CATALOGUES --%>
    <div align="left">
    <table border="0" width="100%">
    <% Vector catalogues = bean.getItemCatalogues();
            int cataloguesSize = catalogues.size();
               for (int i = 0; i < cataloguesSize; i++){
                      BAPItemCatalogue cat =  (BAPItemCatalogue) catalogues.elementAt(i); %>
              <%-- LINK AND MARK AS NEW --%>
                  <tr>
                         <td width="23%"><a class="IBSMenuLink" href="link" onClick="javascript:invokeLink('<%= bean.getEncodedServlet("se.ibs.ns.icat.ItemCatalogueCategoryServlet", response) %>?CODE=<%= ToolBox.encodeURLParameter(cat.getCode())%>'); return false">
                              <%= cat.getDescription(languageCode) %></a>
                         </td>
                         <td width="40%" align="right">
                              <% if (cat.isNew()) {%>
                                     <img border=0 src="<%= resourcePath %>new.gif">
                              <% } %>
                        </td>
                  </tr>
              <%--  CATALOGUES IMAGE AND INTERNET INFORMATION (text, multimedia objects,downloads, links...) --%>
                  <tr>
                         <td width="23%" valign="top" align="left">
                              <% if (bean.isAdvanced(cat) && bean.hasMultimediaImage(cat)) { %>
                                   <a href="link" onClick="javascript:invokeLink('<%= bean.getEncodedServlet("se.ibs.ns.icat.ItemCatalogueCategoryServlet", response) %>?CODE=<%= ToolBox.encodeURLParameter(cat.getCode())%>'); return false">
                                   <img border="0" src="<%= bean.getMultimediaImage(cat) %>"></a>
                        <% } else {%>     
                                   <img border="0" src="<%= resourcePath %>Catalog.gif">
                              <% } %>
                         </td>
                         <td class="IBSTextNormal" width="40%" valign="top">
                              <%= bean.getWebText(cat) %>
                         </td>
                  </tr>
                  <tr>
                         <td width="23%">
                         </td>
                         <td width="40%">
                         <% Vector mmLinks = bean.getMultimediaLinks(cat);
                      int mmLinksSize = mmLinks.size();     
                              for (int ml=0; ml<mmLinksSize; ml++){
                                   BAPCodeAndDescription mmLink = (BAPCodeAndDescription)mmLinks.elementAt(ml); %>
                                   <a class="IBSLink" href="<%= mmLink.getCode() %>" target="_blank"><%= mmLink.getDescription() %></a><br>
                         <% } %>
                   <% Vector webLinks = bean.getWebLinks(cat);
                        int webLinksSize = webLinks.size();
                        for (int wl=0; wl<webLinksSize; wl++){
                                   BAPCodeAndDescription webLink = (BAPCodeAndDescription)webLinks.elementAt(wl); %>
                                   <a class="IBSLink" href="<%= webLink.getCode() %>" target="_blank"><%= webLink.getDescription() %></a><br>
                        <% } %>
                         </td>
                  </tr>
                <%}%>
    </table>
    </div>
    <%@ include file="FuncPageLinks.jsp" %>
    <%@ include file="FuncPageEnd.jsp" %>
    </form>
    </body>
    </html>i hope someone could help me to understand this,
    thank you for your help

    You've probably already seen these, but here are a couple of links that may help.
    http://help.adobe.com/en_US/FlashPlatform//reference/actionscript/3/operators.html#array_a ccess
    http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/Array.html
    What's basically happening is that the "for" loop goes through each item in the array.  Don't be confused by the fact that two of the items in the array are Strings and one is an Integer - variable i being a String has nothing to do with the data type of the elements in the array.
    The following code:
    private function createLabels():void
         var myArray:Array = ['one', 'two', 3];
         for(var i:String in myArray)
              trace("i = " + i);
              trace(myArray[i]);
    gives the following results:
    i = 0
    one
    i = 1
    two
    i = 2
    3
    From that we can see that the "for" loop is assigning the index number of each array element, not the actual array element ('one', 'two', or 3) to the variable i.  So calling myArray[i] is the same as calling myArray[0] the first time through the loop.  This type of "for" loop is just a shorter way of doing the following, which produces exactly the same results:
    private function createLabels():void
         var myArray:Array = ['one', 'two', 3];
         for(var i:int = 0; n < myArray.length; i++)
              trace("i = " + i);
              trace(myArray[i]);
    Hope that helps.
    Cheers!

  • Trying to understand and learn how to use btrfs

    I have been the past days trying to get my head around how btrfs works
    I have been trying tools like mkinitcpio-btrfs (very poorly documented) and now, if i list the subvolumes i have in certain volume (/) i see i have 4 subvolumes that have been created while playing around.
    If i try to delete them with "sudo btrfs subvolume delete __active", for example, I get a "ERROR: Error accessing '__active'
    What am I doing wrong?
    Also, I cannot get the whole idea about the difference between snapshots and subvolumes, i mean, a snapshot should be a directory that saves the changes made on the fs, s, if you want to roll back those changes, you just have to make btrfs "forget" the changes stored in that directory and move along, but I cannot take the idea of the subvolume thing.....
    As btrfs is quite experimental and the wikis are not noob-proof still, I'd appreciate if someone gave me a hand trying to understand these concept...
    For the moment, I'm just using it on a test computer and on a personal laptop with no fear of data loss,.
    Any help is welcome
    Thanks!
    Last edited by jasonwryan (2013-07-19 23:13:27)

    I honestly think it is probably a better idea to not use mkinitpcio-btrfs.  As mentioned above, it is poorly documented, and for me it has never worked right (if at all).  It is an unofficial AUR package, and unfortunately our wiki still seems to give the false impression that using this package is the way to user btrfs with Arch.
    The way I have my system set up is that in subvolid=0 (the root of the btrfs filesystem) I have a rootfs subvolume and a home subvolume (there are others, but these are what primarily make up my system).  So in my fstab, I basically have two nearly identical lines, but one has no subvol specified and is mounted at /, and the other has 'subvol=home' mounted at /home. 
    So in order to make it so that I can change the root filesystem as I please, instead of having the / fstab entry specify the subvolume, I put it in the kernel command line.  That is, I have 'rootflags=subvol=rootfs' in the kernel command line.  So if I want to change it, I simply change the path to one of the snapshots. 
    Just remember that if you are one who likes a custom kernel, it is likely that you will have to have an initamfs no matter what you compile into your kernel.  For one thing, the kernel has no mechanism for scanning for multiple device btrfs filesystems.  But also, I have read that the kernel itself cannot handle the rootflags kernel command line argument.
    Oracle Linux does something interesting with their default setup.  They are not a rolling release, so this probably wouldn't work so well in Arch Linux, but they actually install the root filesystem (I think it is actually done to subvolid=0) and then after installation of the packages, a snapshot of the root filesystem is made, and the system is setup to boot off of that snapshot.  So it is almost like having an overlayfs on openwrt.  There is always a copy of the original system, and and changes that are being made are being done "on top" of the original.  So in the event of an emergency, yo can always get back to the original working state.
    If you put your root filesystem on something other than the root of the btrfs filesystem (which you should, as it makes the whole setup much more flexible), then you should also set up a mountpoint somewhere to give administrator access to the filesystem from subvolid=0.  For example, I have an autofs mountpoint at /var/lib/btrfs-root.   chose that spot because /var/lib is where devtools puts the clean chroot.  So it seemed as reasonable a place as any.
    You should go to the btrfs wiki, and peruse through the stuff there... not our wiki, but the actual btrfs one, as our wiki is pretty sparse.  There is not all that much content there (not like the Arch wiki), but it does cover the features pretty well.  I mean, there is certainly quite a lot for being information on only a single filesystem, but it shouldn't take you too long to get through it.  There are a few links to articles about midway down the front page.  What really gave me a better grasp of getting started with btrfs were the ones titled "How I Got Started with the Btrfs Filesystem for Oracle Linux" and "How I Use the Advanced Capabilities of Btrfs".

  • Trying to understand hashCode( )

    Hello again, I'm trying to understand the hashCode( ) method. I have a textbook which describes it this way:
    "A hashcode is a value that uniquely identifies an individual object. For example, you could use the memory address of an object as it's hashcode if you wanted. It's used as a key in the standard java.util.Hashtable[i] class."
    Please forgive me if this emplies that I may be a bit slow with this, but this explanation is too vague for me to grasph what's going on here. Can someone thoroughly explain (in a non scientific way), how and why this method is used?
    Thanks in advance.

    I thought the examples I provided might give you an idea why the hashCode method is useful. I'll try one more brief one, and if that doesn't connect that spare wire to the light bulb over your head, then I'll have to agree with schapel and suggest that you study up on your CS theory.
    This will be a really crocked up example, and you could skirt some of the issues with better design, but it's a valid example nonetheless.
    You run a greenhouse or an arboretum or something. You've got 25,000 Tree objects (forget their subclasses for now). Trees have properties like species, name (I don't know why you'd name a tree--just bear with me), location, age, medical history. You're going to put your Trees into a java.util.Set, so you've got a collection with one reference to each tree. However, you're getting overlapping subsets of your trees from various sources--that is getAllElms() returns some trees that are also in getAllOlderThan(10). You need to combine all those results into a 1-each collection of Trees.
    When you go to add an Object to the Set, the Set has to first check if that Object is already present. The Set implementation could iterate over all its elements and call equals() to see if that Object is already there. Or, it could first get the hashCode (let's say you've implemented hashCode to return the xor of the species and the age). So, maybe 100 out of your 25,000 trees are 50 yeard old Elms. Internally, if the Set implementation keeps a mapping from hashCode to an array of Trees with that hashcode, then it only has to copmare to those 100 trees that match, rather than all 25,000.
    As I said, this is a cheezy example. One problem is that if trees are mutable, this Set implementation won't work, since the Set won't know that a Tree's internal values (and hence, possibly, its hashCode) have changed.
    Is is making any sense yet?
    Okay so please help me understand this rudimentary,
    logical reason for wanting to use a hashCode( )? Say
    I create a top level class called "Plant.java". Now
    from that class I create a subclass called Tree.java
    from which several other subclasses and objects are
    created. Help me gain a basic understanding of why
    and how the hashCode( ) method might be beneficial.
    (lol... I feel sort of like I've opened up a cool new
    electronic toy, I'm standing here with a "spare wire
    in my hand wondering what the heck this part is
    for?")
    Thanks again for your help. I really apprecitate it.

  • Trying to understand a WS-I validation failure

    I'm trying to understand the following WS-I validation failure message. I'm sure I'm making a basic mistake but I can't find an example of the use case where an xsd is imported. Can someone point out my error?
    Thanks,
    Bret
    Validation failure:
    Result failed:
    Failure Message: A QName reference that is referring to a schema component, uses a namespace not defined in the targetNamespace attribute on the xs:schema element, or in the namespace attribute on an xs:import element within the xs:schema element.Failure Detail Message:
    {http://Messages.xsd}SigReplyMessage,
    {http://schemas.xmlsoap.org/wsdl/}string,
    {http://Messages.xsd}SigRequestMessage
    Element Location: lineNumber=8
    My wsdl looks like this:
    <definitions targetNamespace="urn:S3SignatureGenerator"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="urn:S3SignatureGenerator"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:messages="http://Messages.xsd">
    <types>
    <xsd:schema>
    <xsd:import id="Messages.xsd"
    schemaLocation="../../XSDDocument/Messages.xsd"
    namespace="http://Messages.xsd"/>
    </xsd:schema>
    </types>
    <message name="ReturnSignature">
    <part name="SigAndExp" type="messages:SigReplyMessage"/>
    </message>
    <message name="RequestSignature">
    <part name="Keys" type="messages:SigRequestMessage"/>
    </message>
    <portType name="SigGenerator">
    <operation name="GetSignature">
    <input message="tns:RequestSignature"/>
    <output message="tns:ReturnSignature"/>
    <fault name="sigFault" message="tns:SigFault"/>
    </operation>
    </portType>
    <message name="SigFault">
    <part name="faultMessage" element="string"/>
    </message>
    <binding name="SigGenSoapHttp" type="tns:SigGenerator">
    <soap:binding style="document"
    transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="GetSignature">
    <soap:operation soapAction="urn:S3SignatureGenerator/GetSignature"/>
    <input>
    <soap:body use="literal" parts="SecretKey PublicKey"/>
    </input>
    <output>
    <soap:body use="literal" parts="Signature"/>
    </output>
    <fault name="sigFault">
    <soap:body use="literal" parts="SecretKey PublicKey"/>
    </fault>
    </operation>
    </binding>
    <service name="SignatureGenerationService">
    <port name="SigGenSoapHttpPort" binding="tns:SigGenSoapHttp">
    <soap:address location="tbd"/>
    </port>
    </service>
    </definitions>
    Messages.xsd looks like this:
    <?xml version="1.0" encoding="windows-1252" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://www.bret.org/S3test/Messages"
    targetNamespace="http://www.bret.org/S3test/Messages"
    elementFormDefault="qualified">
    <xsd:complexType name="sigRequestMessage">
    <xsd:sequence>
    <xsd:element name="publicKey" type="xsd:string"/>
    <xsd:element name="privateKey" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="sigReplyMessage">
    <xsd:sequence>
    <xsd:element name="Signature" type="xsd:string"/>
    <xsd:element name="expiration" type="xsd:dateTime"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>

    Hi Bret,
    Sorry it's taken me a bit of time to respond, but please find below a run-down of the WS-I related problems I spotted in your WSDL document. The first few are related to the import error you saw, and there's a few others that I'll also discuss. Apologies in advance if you've already spotted and corrected those.
    I'll use line numbering based on the formatting of the WSDL and XSD that you supplied.
    BP2417 (the one you asked about)
    The line number in the error is a red herring. There are two problems here:
    - WSDL document, line 29: You're using the XSD type string unqualified - it should be xsd:string.
    - WSDL document, lines 8 and 13; schema, lines 3 and 4: The namespaces you're using don't match. Either change the namespaces in the schema to be http://Messages.xsd, or change the namespaces in the WSDL to http://www.bret.org/S3test/Messages.
    BP2202
    You should declare UTF-8 or UTF-16 encoding when creating WSDL or schema documents. The easiest way to do this is to go to Tools|Preferences, and set JDeveloper's default encoding to either UTF-8 or UTF-16.
    BP2032
    WSDL document, line 26 and 43: The name attribute of the fault should read SigFault, not sigFault, as WSDL is case-sensitive.
    WSDL document, line 44: You should use a soap:fault element, not a soap:body element, to bind a fault, thus:
    <soap:fault name="SigFault" use="literal"/>
    BP2012
    WSDL document, lines 17 and 20: Message parts in a document-bound service like this one should reference XSD elements and not complexTypes. What you need to do is define two elements in your messages schema whose types are SigReplyMessage and SigRequestMessage respectively, and then reference those elements from the WSDL.
    WSDL document, line 38: The value of the parts attribute should be Keys to match the name of the part child of the RequestSignature.
    WSDL document, line 41: The value of the parts attribute should be SigAndExp to match the name of the part child of the ReturnSignature.
    WSDL document, line 44: The value of the parts attribute should be faultMessage to match the name of the part child of the SigFault.
    BP2115
    WSDL document, lines 17 and 20: The names of the elements should be sigReplyMessage and sigRequestMessage and not SigReplyMessage and SigRequestMessage, again because WSDL is case-sensitive.
    WSDL document, line 30: The element attribute of the part references xsd:string, which is not an element but a complexType. You'll need to add an element declaration to your schema, which is of type xsd:string.
    I've included corrected versions of your WSDL and schema below, I hope this helps. I also note you've posted a few other messages related to WS-I and WSDL, I hope I've managed to cover those in this message too.
    Regards,
    Alan.
    WSDL:
    <?xml version="1.0" encoding="UTF-8" ?>
    <definitions targetNamespace="urn:S3SignatureGenerator"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="urn:S3SignatureGenerator"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:messages="http://Messages.xsd">
    <types>
    <xsd:schema>
    <xsd:import id="Messages.xsd"
    schemaLocation="Messages.xsd"
    namespace="http://Messages.xsd"/>
    </xsd:schema>
    </types>
    <message name="ReturnSignature">
    <part name="SigAndExp" element="messages:sigReplyMessage"/>
    </message>
    <message name="RequestSignature">
    <part name="Keys" element="messages:sigRequestMessage"/>
    </message>
    <message name="SigFault">
    <part name="faultMessage" element="messages:faultMessage"/>
    </message>
    <portType name="SigGenerator">
    <operation name="GetSignature">
    <input message="tns:RequestSignature"/>
    <output message="tns:ReturnSignature"/>
    <fault name="SigFault" message="tns:SigFault"/>
    </operation>
    </portType>
    <binding name="SigGenSoapHttp" type="tns:SigGenerator">
    <soap:binding style="document"
    transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="GetSignature">
    <soap:operation soapAction="urn:S3SignatureGenerator/GetSignature"/>
    <input>
    <soap:body use="literal" parts="Keys"/>
    </input>
    <output>
    <soap:body use="literal" parts="SigAndExp"/>
    </output>
    <fault name="SigFault">
    <soap:fault name="SigFault" use="literal"/>
    </fault>
    </operation>
    </binding>
    <service name="SignatureGenerationService">
    <port name="SigGenSoapHttpPort" binding="tns:SigGenSoapHttp">
    <soap:address location="tbd"/>
    </port>
    </service>
    </definitions>
    Schema:
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://Messages.xsd"
    targetNamespace="http://Messages.xsd"
    elementFormDefault="qualified">
    <xsd:element name="sigRequestMessage">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="publicKey" type="xsd:string"/>
    <xsd:element name="privateKey" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="sigReplyMessage">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Signature" type="xsd:string"/>
    <xsd:element name="expiration" type="xsd:dateTime"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="faultMessage" type="xsd:string"/>
    </xsd:schema>

  • Trying to understand arrays

    I am trying to teach myself java, and I understand the basic concept of variables with integers, floats etc using output and input commands, but I was wondering if someone would be able to explain arrays better to me. I understand that they store numerous values that can be called at any point but I am having difficulting calling them in a program. When I declare them do I have to declare it similarly to this example
    int [ ] a = {2, 4, 6, 8, 10, 12} ;
    I am sorry for a very basic question and if you need to understand what I am asking in further detail please let me know. And thank you to anyone that may be able to help me.

    You access each individual value through an integer index. For example, if a is an array of integers,
    then a[i] is the ith integer in the array.
    You declare an array variable by specifying the array type?which is the element type followed by []?and the array variable name. For example, here is the declaration of an array a of integers:
    int[] a;
    However, this statement only declares the variable a. It does not yet initialize a with an actual array. You use the new operator to create the array.
    int[] a = new int[100];
    This statement sets up an array that can hold 100 integers.Java has a shorthand to create an array object and supply initial values at the same time.
    Here?s an example of the syntax at work:
    int[] smallPrimes = { 2, 3, 5, 7, 11, 13 };
    Notice that you do not call new when you use this syntax.

  • Trying to understand how MIDI Clock works in Logic

    Hi,
    I'm syncing a Roland MC-909 Groove Box with Logic.  I'm also using a MOTU MIDI Express interface.  The MC-909 syncs to Logic, thus it is in Slave mode. Under Preferences->Sync->MIDI Sync Project Settings, I've discovered something odd, and I'm trying to understand it.  It could be just a lack of understanding regarding the MIDI Spec.
    Under MIDI Clock, I necessarily need to set the destination to the MC-909.  I cannot use 'All'  or else the MIDI Express starts playing back at 8x the tempo set in Logic.  Not sure why this happens but its probably something weird with the MOTO interface.  Anyway in Logic, MIDI Time Code (MTC) is disabled, Song Position Pointer (SPP) is disabled, and MMC is disabled.
    So basically I'm only sending MIDI Clock to the MC-909.  Here's what is wierd:  As I locate to different places in the Arrange window (not in play mode), the MC-909 is locating to the correct time offset within the pattern!  This basically guarantees that you can start the Logic song anywhere, and the MC-909 will start playing back the pattern at the right time.  I don't understand how this can be happening given that I've disabled SPP in Logic.  The only sync communication between Logic and the MC-909 is MIDI Clock, but I don't believe that MIDI Clock is even capable of transmitting offset information that specifies the time-offset into a drum machine pattern, Does it?  Or is Logic sending SPP info as I click on different locations in the Arrange window?
    Another point, is that if I select to transmit MIDI Clock to another device other than the MC-909, but still using the MOTU MIDI Express, then the MC-909 plays back synchronously (i.e. its getting MIDI Clock from Logic, even though Logic isn't sending MIDI Clock to the MIDI port connected to the MC-909), but it does not track the pattern offset described in the previous paragraph.  The only way I can get the pattern offset to work, is if I select the MIDI Clock to be sent to the MIDI port connected to the MC-909.
    I would like to figure this out because I'm thiinking about buying an external MIDI synchronizer, but I don't want to lose the ability to have logic specify the offset into the pattern on the MC-909
    Thanks,

    Hi,
    I'm syncing a Roland MC-909 Groove Box with Logic.  I'm also using a MOTU MIDI Express interface.  The MC-909 syncs to Logic, thus it is in Slave mode. Under Preferences->Sync->MIDI Sync Project Settings, I've discovered something odd, and I'm trying to understand it.  It could be just a lack of understanding regarding the MIDI Spec.
    Under MIDI Clock, I necessarily need to set the destination to the MC-909.  I cannot use 'All'  or else the MIDI Express starts playing back at 8x the tempo set in Logic.  Not sure why this happens but its probably something weird with the MOTO interface.  Anyway in Logic, MIDI Time Code (MTC) is disabled, Song Position Pointer (SPP) is disabled, and MMC is disabled.
    So basically I'm only sending MIDI Clock to the MC-909.  Here's what is wierd:  As I locate to different places in the Arrange window (not in play mode), the MC-909 is locating to the correct time offset within the pattern!  This basically guarantees that you can start the Logic song anywhere, and the MC-909 will start playing back the pattern at the right time.  I don't understand how this can be happening given that I've disabled SPP in Logic.  The only sync communication between Logic and the MC-909 is MIDI Clock, but I don't believe that MIDI Clock is even capable of transmitting offset information that specifies the time-offset into a drum machine pattern, Does it?  Or is Logic sending SPP info as I click on different locations in the Arrange window?
    Another point, is that if I select to transmit MIDI Clock to another device other than the MC-909, but still using the MOTU MIDI Express, then the MC-909 plays back synchronously (i.e. its getting MIDI Clock from Logic, even though Logic isn't sending MIDI Clock to the MIDI port connected to the MC-909), but it does not track the pattern offset described in the previous paragraph.  The only way I can get the pattern offset to work, is if I select the MIDI Clock to be sent to the MIDI port connected to the MC-909.
    I would like to figure this out because I'm thiinking about buying an external MIDI synchronizer, but I don't want to lose the ability to have logic specify the offset into the pattern on the MC-909
    Thanks,

  • Trying to understand creating a console task to close a request

    So here is my situation:
    I created a new class that inherited from the change request base class, I added my new properties, created a new custom form using the change request assembly (so I could keep the overall look and feel), added the type projections, bundled everything into
    a mpb, imported the mpb, opened a new instance of my custom change request and submitted, and then I tried to cancel the request and obtained this error: Message: ChangeRequestStatusChangeTaskHandler has parameter that is not valid.  I did some searching
    here found these unanswered posts (https://social.technet.microsoft.com/Forums/systemcenter/en-US/fa4dea1a-98e6-476f-aca9-b363bb7d14c9/custom-change-management-form-errors-out-when-closing-the-change-request-ticket, https://social.technet.microsoft.com/Forums/systemcenter/en-US/5a8fa197-2b32-44dc-be46-bbbfb7b8a6fe/changerequeststatuschangetaskhandler-has-parameter-that-is-not-valid?forum=systemcenterservicemanager)
    ; I found one where someone said I would have to create new console tasks for these statuses, and gave a link to the basics of creating a new console task.  I understand the basics of creating a new console task, but just not what I need to code in order
    to get my new change request in a canceled state. So, I am wondering if that i need to create new console tasks?  And has anyone ever had to create a console task to close/resume/put on hold/cancel a request?  If so guidance would be greatly appreciated.

    Re: setting ranges and referring to stuff
    No you did not Set NewRange to another location.
    Rng is A1:A3  and NewRng is B1:B3.
    NewRng(1, 1)  refers to B1, NewRng(2, 2) refers to C2 and NewRng(3, 3) refers to D3.
    NewRng(1, 1) is the starting point.
    So NewRng(2, 2) is similar to telling someone the location of the Pet Store is one block down and one block over.
    NewRng can only be changed using the Set statement.
    [Edit-additional info]...
    Range("A1").Offset(0, 0)
    -and-
    Range("A1")(1, 1)
    Both of the above return Range("A1")
    Jim Cone

  • Hello, World - trying to understand the steps

    Hello, Experts!
    I am pretty new to Flash Development, so I am trying to understand how to implement the following steps using Flash environment
    http://pdfdevjunkie.host.adobe.com/00_helloWorld.shtml         
    Step 1: Create the top level object. Use a "Module" rather than an "Application" and implement the "acrobat.collection.INavigator" interface. The INavigator interface enables the initial hand shake with the Acrobat ActionScript API. Its only member is the set host function, which your application implements. During the initialize cycle, the Acrobat ActionScript API invokes your set host function. Your set host function then initializes itself, can add event listeners, and performs other setup tasks.Your code might look something like this.
    <mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" implements="acrobat.collection.INavigator" height="100%" width="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off" >
    Step 2: Create your user interface elements. In this example, I'm using a "DataGrid" which is overkill for a simple list but I'm going to expand on this example in the future. Also notice that I'm using "fileName" in the dataField. The "fileName" is a property of an item in the PDF Portfolio "items" collection. Later when we set the dataProvider of the DataGrid, the grid will fill with the fileNames of the files in the Portfolio.
    <mx:DataGrid id="itemList" initialize="onInitialize()" width="350" rowCount="12"> <mx:columns> <mx:DataGridColumn dataField="fileName" headerText="Name"/> </mx:columns> </mx:DataGrid>
    Step 3: Respond to the "initialize" event during the creation of your interface components. This is important because there is no coordination of the Flash Player's initialization of your UI components and the set host(), so these two important milestone events in your Navigator's startup phase could occur in either order. The gist of a good way to handler this race condition is to have both your INavigator.set host() implementation and your initialize() or creationComplete() handler both funnel into a common function that starts interacting with the collection only after you have a non-null host and an initialized UI. You'll see in the code samples below and in step 4, both events funnel into the "startEverything()" function. I'll duscuss that function in the 5th step.
                   private function onInitialize():void { _listInitialized = true; startEverything(); }

    Hello, Experts!
    I am pretty new to Flash Development, so I am trying to understand how to implement the following steps using Flash environment
    http://pdfdevjunkie.host.adobe.com/00_helloWorld.shtml         
    Step 1: Create the top level object. Use a "Module" rather than an "Application" and implement the "acrobat.collection.INavigator" interface. The INavigator interface enables the initial hand shake with the Acrobat ActionScript API. Its only member is the set host function, which your application implements. During the initialize cycle, the Acrobat ActionScript API invokes your set host function. Your set host function then initializes itself, can add event listeners, and performs other setup tasks.Your code might look something like this.
    <mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" implements="acrobat.collection.INavigator" height="100%" width="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off" >
    Step 2: Create your user interface elements. In this example, I'm using a "DataGrid" which is overkill for a simple list but I'm going to expand on this example in the future. Also notice that I'm using "fileName" in the dataField. The "fileName" is a property of an item in the PDF Portfolio "items" collection. Later when we set the dataProvider of the DataGrid, the grid will fill with the fileNames of the files in the Portfolio.
    <mx:DataGrid id="itemList" initialize="onInitialize()" width="350" rowCount="12"> <mx:columns> <mx:DataGridColumn dataField="fileName" headerText="Name"/> </mx:columns> </mx:DataGrid>
    Step 3: Respond to the "initialize" event during the creation of your interface components. This is important because there is no coordination of the Flash Player's initialization of your UI components and the set host(), so these two important milestone events in your Navigator's startup phase could occur in either order. The gist of a good way to handler this race condition is to have both your INavigator.set host() implementation and your initialize() or creationComplete() handler both funnel into a common function that starts interacting with the collection only after you have a non-null host and an initialized UI. You'll see in the code samples below and in step 4, both events funnel into the "startEverything()" function. I'll duscuss that function in the 5th step.
                   private function onInitialize():void { _listInitialized = true; startEverything(); }

Maybe you are looking for

  • How to remove a node from  a Jtree?

    I tried giving this to move a node from one parent node to other parent node. IconNodeClass userObject = (IconNodeClass)tr.getTransferData(TransferableDataItem.Image_Tree_Node_Flavor); IconNodeClass node = (IconNodeClass)path.getLastPathComponent();

  • Error occured in the data selection...urgent

    Hi, The master data(full update) is being pulled from R/3 to BW..while pulling it has thrown the error  as below. Error message from the source system Diagnosis An error occurred in the source system. System response Caller 09 contains an error messa

  • HT5234 Macbook Air Power Adapter

    Ok, I have just bought a brand, spanking new Macbook Air 13" and sold my 15" Late 2008 Unibody Macbook Pro to a friend. The thing is, I now have a spare MacBook Pro charger (kept the original at home and had a spare at the office). Can this spare Mac

  • Deploy problem in jbos

    hi all i am trying to deploy the .ear file in jbose server with the structure in which i useing common.jar , i made common.jar with my classes and the liberay which are required to run this classes i mean to say that i did not puted the classes and l

  • [SOLVED] Alt+Tab window switcher in KDE4.4 - no compositing effects

    It's just one of these small nagging things: I cannot get the Alt+Tab window switcher to display a cover flow effect in KDE4.4. Compositing works well otherwise - present windows, the rotating cube etc. Only the window switcher keeps showing me a bor