Trying too get my head around this code.

I'm trying to understand what this code does. Yes'm a newbie soo every scrap of information on this would be apreciated.
byte[] data = new byte[2];
          if(aOn == true)
               data[0] = (byte) (current| 0x08);
               data[1]=0;
               fsuipc_wrapper.WriteData(0x0d0c,2,data);
          else
               data[0] = (byte) (current & 0xf7);
               data[1]=0;
               fsuipc_wrapper.WriteData(0x0d0c,2,data);
          }the way i see this thing work data[0] = (byte) (current| 0x08); it takes an Int (current) and compares it with a bit??
current is either 8 or 0.. can someone explain this do me in some detail??

Dragon_reborn wrote:
I'm trying to understand what this code does. Yes'm a newbie soo every scrap of information on this would be apreciated.
byte[] data = new byte[2];
          if(aOn == true)
               data[0] = (byte) (current| 0x08);
               data[1]=0;
               fsuipc_wrapper.WriteData(0x0d0c,2,data);
          else
               data[0] = (byte) (current & 0xf7);
               data[1]=0;
               fsuipc_wrapper.WriteData(0x0d0c,2,data);
          }the way i see this thing work data[0] = (byte) (current| 0x08); it takes an Int (current) and compares it with a bit??
current is either 8 or 0.. can someone explain this do me in some detail??It sets a bit (the fourth from the right)

Similar Messages

  • Boffins can u get your head around this?

    Hi im trying to implment a data structure which works exactly like Internet Explorers history.
    I could really do with some input and code alteration here. My head is starting to swim around the diff scenerios.
    So what it needs to do is add items to the history and then be able to go backwards through them and then go forwards again. However if you submit a new item then obvioulsy you lose the forward option since those infront get erased. Can any1 help me out here pls?
    Author: Justin Thomas
    Date  : 05 Nov 2001
    Notes : This class implements a circular queue for String data type.
            Making string Object would make this generic but its not needed!
    import java.lang.Exception;
    public class HistoryItems
      private int Head, Tail, QSIZE;
      private String[] Element;
      public HistoryItems(int maxSize)
        Head = 0;
        Tail = Head+1;
        QSIZE = maxSize;
        Element = new String[QSIZE];
      public boolean Empty()
        return Head == Tail;
      public int GetHead()
        return Head;
      public int GetTail()
        return Tail;
      public boolean Full()
        return (Tail + 1) % QSIZE == Head;
      public String Remove()
        String HeadElement;
        if(Empty())
          System.out.println("Warning Queue is empty");
        else
          HeadElement = Element[Head];
          // set item to null
          Element[Head] = null;
          Head = (Head + 1) % QSIZE;
          System.out.println("Head afer remove: " +((Head + 1) % QSIZE));
          System.out.println("Removed " + HeadElement);
          return HeadElement;
        return null;
        public void Add(String newItem)
            if (Full())
                //move Tail to start of array
                Tail = 0;
                System.out.println("Full");
            Element[Tail] = newItem;
            System.out.println("Added " + newItem + "Head="+Head + " Tail="+Tail);
            if (Head == Tail)
                System.out.println("Need to move head");
                Head = (Head + 1) % QSIZE;
            Tail = (Tail + 1) % QSIZE;
        public static void main (String[] args)
            HistoryItems test = new HistoryItems(5);
            test.Add("RIC1");
            test.Add("RIC2");
            test.Add("RIC3");
            test.Add("RIC4");
            test.Add("RIC5");
    /*        test.Add("RIC6");
            test.Add("RIC7");
            test.Add("RIC8");
            test.Add("RIC9");
            test.Add("RIC10");
            test.Remove();
    }

    Hi im trying to implment a data structure which works
    exactly like Internet Explorers history.IE history (or any browser's history) works far more like a stack than a queue, so trying to implement it as a circular queue will bring nothing but confusion.
    You also not only need the pages in the history, but an indicator of where the current page is in the history. If you go back, you do not remove items from the history. However, if you go back and then click on another link, you need to remove the items in the history beyond the current page.

  • Trying to get my head around how SUPs work

    Hi fellas,
    Completely new to SCCM (well, I've  had some training, but still quite green).  I had some general questions about Software Update Points and best practices.
    1.  When creating a SUP, would it be wise to select all classifications for all necessary products to synchronize, and then just use filters to select what you actually want to download and deploy?  It seems to me that if you can filter according
    to product, classification, and many other criteria, then for synchronization you should cast as wide a net as possible since you're just syncing, not downloading.  Anybody agree with that?  Or does this unnecessarily tax the SQL Server?
    2.  When using a GPO to point clients to the SUP as its designated Windows Update source, what happens when a user manually searches for updates using his Windows Update agent?  Is there a recommended Group Policy setting for the WUA on all clients,
    such as completely disabling the user's ability to use it?
    3.  When you deploy a deployment package of updates to a specified collection of clients, what happens to an offline client when it comes back online?  I would assume it picks up the deployed content on its next Software Updates Deployment Evaluation
    Cycle.  Is that correct?
    4.  I'm not sure I understand compliance.  I understand that it shows a percentage of clients that have the update installed, but which clients is it talking about?  All machines that have the ConfigMgr client installed within the boundary
    group assigned to the server hosting the SUP?  Secondly, how can you find out
    which clients are non-compliant?
    5.  Am I correct in this?  When you right-click an un-downloaded software update group and hit Download, it just downloads the updates to the distribution point.  When you right-click an un-downloaded software update group and hit Deploy,
    it downloads the updates to the DP AND deploys it to a specified collection.  Right?
    6.  Scenario:  You deploy a group of updates to a collection.  They don't install.  What log can you look at to troubleshoot this?
    I appreciate your help.  We are working with SCCM 2012 R2, incidentally.

    1.  When creating a SUP, would it be wise to select all classifications for all necessary products to synchronize, and then just use filters to select what you actually want to download and deploy?
    Generally, yes. But do NOT select the "Drivers" update classification!
    It seems to me that if you can filter according to product, classification, and many other criteria, then for synchronization you should cast as wide a net as possible since you're just syncing, not downloading.
    Absolutely correct. Furthermore, you can only get compliance state information on updates that are actually synchronized to the SUP. If you intentionally exclude classifications, then it would be impossible to know whether those updates were needed/installed
    or neither.
    2.  When using a GPO to point clients to the SUP as its designated Windows Update source
    The CMAgent takes care of pointing the clients to the SUP via LOCAL policy. Generally the only thing you'll want to do in the GPO (and there are differing opinions on this, so today I'm respecting the forum that I'm actually posting in) is to disable the automatic
    updates checks that the WUAgent would do autonomously. (The CM SUAgent will trigger the WUA to do Software Update Scans according to the policy you configure on the Site Server.)
    what happens when a user manually searches for updates using his Windows Update agent?
    Possibly a lot of havoc. You should also block the ability of users to use those features via that GPO.
    Is there a recommended Group Policy setting for the WUA on all clients, such as completely disabling the user's ability to use it?
    Yes, in Computer Configuration\Administrative Templates\System\Internet Communication Management\Internet Communication Settings, enable the policy
    Turn off access to all Windows Update features.
    3.  When you deploy a deployment package of updates to a specified collection of clients, what happens to an offline client when it comes back online?  I would assume it picks up the deployed content on its next Software Updates Deployment Evaluation
    Cycle.  Is that correct?
    Yes. And I'll defer to the CM MVPs to answer the rest of your questions.
    Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

  • Need help getting my head around this.

    I'm new to this Java programming lark but it has always interested me so i thought I would give it a go but I am stumped on a project I'm working on. Maybe there is a simple answer that I just can not see.
    The problem I am having is linking elements in ArrayLists. I have two arraylists, accounts and groups. accounts is sorted using a compareTo method to be organised by their level (an integer). What I need to do though, is place the accounts into groups sequentially so that the groups are mixed with accounts of different levels. I wouldn't like the code but if someone could help me see what I need to do that would be great, it should work like this.
    Daniel 5 ----> group 1
    Graham 5 ---> group 2
    Andy 5 ---> group 1
    John 4 ----> group 2
    Clark 4 ---> group 1
    Kevin 3 ---> group 2
    I'm guessing loops are involved but I can't see how it would work around. Any help would be greatly appreciated thanks a lot :)

    wigglet wrote:
    I'm new to this Java programming lark but it has always interested me so i thought I would give it a go but I am stumped on a project I'm working on.
    cough
    >
    The problem I am having is linking elements in ArrayLists. I have two arraylists, accounts and groups. accounts is sorted using a compareTo method to be organised by their level (an integer). What I need to do though, is place the accounts into groups sequentially so that the groups are mixed with accounts of different levels. I wouldn't like the code but if someone could help me see what I need to do that would be great, it should work like this.
    Daniel 5 ----> group 1
    Graham 5 ---> group 2
    Andy 5 ---> group 1
    John 4 ----> group 2
    Clark 4 ---> group 1
    Kevin 3 ---> group 2
    I'm guessing loops are involved but I can't see how it would work around. Any help would be greatly appreciated thanks a lot :)Quick answer : write comparators
    Longer answer : I don't understand some parts of your question. Perhaps you want a two stage sort? Perhaps something else. I'm not sure how these people relate to the groups in your code, that appears to be a key question here for the data you want to display.
    But in the end the answer will either to be make some else Comparable or write Comparators that produce the sort you want. The answer is not "loops".

  • I still cant get my head around this:  java.lang.NullPointerException

    heres my disgusting amount of code and its error report. please help. its basically the board for a twixt game. if you dont know what that is its not important because the error has nothing to do with the rules of the game.
    Exception in thread "main" java.lang.NullPointerException
         at Board.pcomp(Board.java:81)
         at Board.addremovebridge(Board.java:34)
         at Twixt.main(Twixt.java:21)
    Thanks again for reading this far.
    public class Twixt {
         public static void main(String[] args) {
              Board game = new Board();
              point p = new point();
              p.x = 4;
              p.y = 4;
              p.p = 1;
              point f = new point();
              f.x = 5;
              f.y = 6;
              p.p = 1;
              String s = new String();
              s = game.placetower(p);
              s = game.placetower(p);
              System.out.println(s);
              s = game.placetower(f);
              System.out.println(s);
              s = game.addremovebridge(p,f);
              System.out.println(s);
              s = game.addremovebridge(p,f);
              System.out.println(s);
    public class point {
         int x = 0;
         int y = 0;
         int p = 0;
    import java.lang.Math;
    public class Board{
         public int[][] board1 = new int[26][26];
         public point[][][] board2 = new point[26][26][6];
         private int board3d;
         private int board3e;
         /*Board() {
              for(int x = 0; x<=25; x++){
                   for(int i = 0; i<=25; i++){
                        for(int j = 0; j<=6;j++){
                             pmakezero(board2[x][j]);
         public String placetower(point d){
              if (board1[d.x][d.y] == 0){
                   board1[d.x][d.y] = d.p;
                   return ("Tower placed at "+d.x+", "+d.y+".");
              }else{
                   return ("That space is already taken.");
         public String addremovebridge(point d, point e){
              if(checkplayer(d,e)){
                   boolean removebridge = false;
                   for(int i = 0; i<=5;i++){
                        if(pcomp(board2[d.x][d.y][i], e)){
                             pmakezero(board2[d.x][d.y][i]);
                             removebridge = true;
                        if(pcomp(board2[e.x][e.y][i], d)){
                             pmakezero(board2[e.x][e.y][i]);
                             removebridge = true;
                   if(distance(d,e)&&!intersect(d,e)&&!removebridge&&!full(d,e)){
                        board2[d.x][d.y][board3d] = e;
                        board2[e.x][e.y][board3e] = d;
                        return ("Bridge placed between "+d.x+", "+d.y+" and "+e.x+", "+e.y+".");
                   }else{
                        return ("That is not a valid bridge placement.");
              }else{
                   return ("That tower does not belong to you.");
         private boolean distance(point d, point e){
              double g;
              int f;
              int i;
              f = d.x - e.x;
              i = d.y - e.y;
              f = f*f;
              i = i*i;
              f = f+i;
              g = f;
              if (g>0){
                   g = g * -1;
              g = Math.sqrt(g);
              if(g == Math.sqrt(5)){
                   return true;
              }else{
                   return false;
         private boolean pcomp(point d, point e){
              if(d.x == e.x && d.y == e.y){
                   return true;
              }else{
                   return false;
         private void pmakezero(point d){
              d.x = 0;
              d.y = 0;
              d.p = 0;
         private boolean checkplayer(point d, point e){
              if(board1[d.x][d.y] == d.p && board1[e.x][e.y]==e.p){
                   return true;
              }else{
                   return false;
         private boolean full(point d, point e){
              point x;
              int y;
              int z;
              boolean full = true;
              for(int i=0; i<=5; i++){
                   x = board2[d.x][d.y][i];
                   y = x.x;
                   z = x.y;
                   if(y == 0 && z == 0){
                        board3d = i;
                        i = 3;
                        full = false;
              for(int i=0; i<=3; i++){
                   x = board2[e.x][e.y][i];
                   y = x.x;
                   z = x.y;
                   if(y == 0 && z == 0){
                        board3e = i;
                        i = 3;
                        full = false;
              return full;
         private boolean intersect(point d, point e){
              boolean inter = false;
              int f;
              int h;
              f = d.x - e.x;
              h = d.y - e.y;
              if(f == 2 && h == 1){
                   if(board1[e.x + 1][e.y]!=0){
                        for(int w=0;w<=5;w++){
                             if(board2[e.x + 2][e.y + 2][w]==e){
                                  inter = true;
                             }else if(board2[e.x][e.y + 2][w]==e){
                                  inter = true;
                   }else if(board1[d.x - 1][d.y]!=0){
                        for(int w=0;w<=5;w++){
                             if(board2[d.x - 2][d.y - 2][w]==d){
                                  inter = true;
                             }else if(board2[d.x][d.y - 2][w]==d){
                                  inter = true;
                   }else if(board1[e.x + 2][e.y]!=0){
                        for(int w=0;w<=5;w++){
                             if(board2[e.x + 1][e.y + 2][w]==e){
                                  inter = true;
                   }else if(board1[d.x - 2][d.y]!=0){
                        for(int w=0;w<=5;w++){
                             if(board2[d.x - 1][d.y - 2][w]==d){
                                  inter = true;
              }else if(f == -2 && h == -1){
                   if(board1[e.x - 1][e.y]!=0){
                        for(int w=0;w<=5;w++){
                             if(board2[e.x - 2][e.y - 2][w]==e){
                                  inter = true;
                             }else if(board2[e.x][e.y - 2][w]==e){
                                  inter = true;
                   }else if(board1[d.x + 1][d.y]!=0){
                        for(int w=0;w<=5;w++){
                             if(board2[d.x + 2][d.y + 2][w]==d){
                                  inter = true;
                             }else if(board2[d.x][d.y + 2][w]==d){
                                  inter = true;
                   }else if(board1[e.x - 2][e.y]!=0){
                        for(int w=0;w<=5;w++){
                             if(board2[e.x - 1][e.y - 2][w]==e){
                                  inter = true;
                   }else if(board1[d.x + 2][d.y]!=0){
                        for(int w=0;w<=5;w++){
                             if(board2[d.x + 1][d.y + 2][w]==d){
                                  inter = true;
              }else if(f == 1 && h == 2){
                   if(board1[e.x][e.y + 1]!=0){
                        for(int w=0;w<=5;w++){
                             if(board2[e.x + 2][e.y + 2][w]==e){
                                  inter = true;
                             }else if(board2[e.x + 2][e.y][w]==e){
                                  inter = true;
                   }else if(board1[d.x][d.y - 1]!=0){
                        for(int w=0;w<=5;w++){
                             if(board2[d.x - 2][d.y - 2][w]==d){
                                  inter = true;
                             }else if(board2[d.x - 2][d.y][w]==d){
                                  inter = true;
                   }else if(board1[e.x][e.y + 2]!=0){
                        for(int w=0;w<=5;w++){
                             if(board2[e.x + 2][e.y + 1][w]==e){
                                  inter = true;
                   }else if(board1[d.x][d.y - 2]!=0){
                        for(int w=0;w<=5;w++){
                             if(board2[d.x - 2][d.y - 1][w]==d){
                                  inter = true;
              }else if(f == -1 && h == -2){
                   if(board1[e.x][e.y - 1]!=0){
                        for(int w=0;w<=5;w++){
                             if(board2[e.x - 2][e.y - 2][w]==e){
                                  inter = true;
                             }else if(board2[e.x - 2][e.y][w]==e){
                                  inter = true;
                   }else if(board1[d.x][d.y + 1]!=0){
                        for(int w=0;w<=5;w++){
                             if(board2[d.x + 2][d.y + 2][w]==d){
                                  inter = true;
                             }else if(board2[d.x + 2][d.y][w]==d){
                                  inter = true;
                   }else if(board1[e.x][e.y - 2]!=0){
                        for(int w=0;w<=5;w++){
                             if(board2[e.x - 2][e.y - 1][w]==e){
                                  inter = true;
                   }else if(board1[d.x][d.y + 2]!=0){
                        for(int w=0;w<=5;w++){
                             if(board2[d.x + 2][d.y + 1][w]==d){
                                  inter = true;
              return inter;
    Thank you.

    Exception in thread "main"
    java.lang.NullPointerException
         at Board.pcomp(Board.java:81)
         at Board.addremovebridge(Board.java:34)
         at Twixt.main(Twixt.java:21)
    So the null pointer occurs on the 81st line in the Board.java source code file. I'm not sure, but I expect this is line 81.if(d.x == e.x && d.y == e.y){Here's one way to troubleshoot null pointer problems. First find the line causing the error. Then, use System.out.println() statements to display the values of all the reference variables in that line, one variable at a time. So if I guessed correctly on line 81, you would put these statements just before line 81System.out.println("d " + d);
    System.out.println("e " + e);Because d and e are the only reference variables in that line. When you run the code after putting these lines in, one or both of these will display "null" and that will tell you which variable to trace. You will need to trace backward through your code a find out why d or e or both are null.
    (hint: A statement like Object[] objects = new Object[10];" creates an Object array with 10 elements, each of which is null. You have to use "objects[1] = new Object();" to create an element in the array which is an Object.)

  • Trying to get my head around Apple TV, Google TV and DLNA

    Is it right to consider Airplay, or Apple TV itself, a DLNA alternative / competitor?
    Wouldn't it be a good idea for Apple computers / iphones / ipods etc to support DLNA? (I have no 1st hand experience of DLNA).
    If not, then wouldn't it be great if Apple TV had the ability to playback a wide range of video codecs?
    Could this ability could be added by installing apps, right?
    How could it be, or indeed, is it possible for Apple TV to play back content that VLC can handle? Would the solution be a VLC app on the Apple TV?
    I'm presuming that the decoding of say, a DIVX file would take place on the receiving device? On the Apple TV itself?
    In the world of DLNA, the TV that can see a DLNA storage device, and a DIVx file that resides on the storage device , in order to play it back the decoding would have to take place on the TV? So the TV would need updates to support new codecs?
    I'm just thinking about the best solution for a home, to store all media in one location, and to access it / play it back on any device.
    Considering Google TV seems to support apps, and there's indication of DLNA support (and 'Fling'), and i'm sure it would have the ability (an app) to play back a wide range of video formats downloaded from the web, and stored on a NAS. Apple TV is looking limited, with it's lack of supported codecs, and reliance on a running iTunes (where a DLNA compliant TV just needs to access, say, a DLNA compliant NAS?).
    Any thoughts, i'd love to hear.
    Thanks

    That makes sense.  Thanks for explaining.  Couple more questions, if you don't mind.   If I choose to import proxy only, then does that mean that I am ONLY importing lower quality and the original quality is lost forever once I wipe the source medium, like my SD card?
    Can you please give me a little more background on the point of optimized?  I trust that you are right that I don't need it, but just for the record, why would I need it?  Am I right in understanding that it makes bigger files than the original media which play nicer in FCPX, but only really if your system is older and requires that optimization?
    Thanks Tom.  Really appreciate your quick and helpful responses.

  • Trying to get my head around lists, sub-lists and DHTML Tree Template

    I'm missing something..
    1) I create a list using the DHTML tree template
    2) I create the following list entries
    A
    ...1
    ...2
    ...3
    B
    C
    Lists entries 1,2 and 3 have the "Parent List Entry" set to "A"
    List entries A,B and C have the "Parent List Entry" set to "No Parent..."
    3) I create a list region and select the above list
    How do I make A a label or heading and not a link? If I click on a heading I expect the list to expand.
    How do you set up the lists as shown in Carls demos at
    http://htmldb.oracle.com/pls/otn/f?p=11933:31
    regards
    Paul P

    Hi Paul,
    In the list definition, you can set the "Target Type" for the headers to " - No Target - ".
    Regards
    Andy

  • HELP! Cannot get by head around this....

    Hi Guys,
    New Mac user here from 12 years of PC use!
    I have several hundred photos I took during a world trip. As a result I have photos from Australia, New Zealand, Los Angeles, Singapore.......
    On my PC I had a folder called "World Trip" and then had subfolders for each country I visited with the corresponding photos in these folders. E.g. All the photos from Australia were in a folder called "Oz" within the "World Trip" folder.
    How can I do this in iPhoto? It seems that I cannot collate various events into one without combining ALL the world trip photos in one event and thus just being able to jump to the pics from Singapore or pics from Maui etc.
    Help?
    Thanks,
    Mark

    schroedm,
    You don't need to make a world folder and sub folders of various locations. iPhoto will do all the work for you.
    Imagine, on the PC, if you put all your photos in World folder. Then in an OZ folder you put shortcuts (links) to all the pictures from Oz, in a Singapore folder you put shortcuts to all the Singapore pictures, etc. Then you could open a folder and see, print, ... all the associated pictures.
    You could also make a folder called "Buildings" and in it put links to all the buildings in your World folder. Another folder could contain links to people of the world or roadways, etc.
    On the Mac:
    Let iPhoto put all your pictures wherever it wants. When you create an album, it is just setting up links to pictures for that album. A single picture can be "in" several albums but there will only be one copy of that picture residing somewhere on the hard drive.
    Old PC user,
    Ron

  • Cannot get my head around this query!

    Ignore the coloring it was for my benefit. This query joins two tables and puts out a third table.
    Basically tblContractAge is a list of ages and the buckets to which people of those ages are to be assigned. Cognos is a table of people of certain ages. This is a vast oversimplification but will suffice.
    The customer is expecting the resulting table to contain rows even if no people (in Cognos) table have the age for the bucket (in tblContract), This is not happening. No rows are output in this case. I'm confused as to the effect of the DISTINCT and GROUP
    BY and how this works combined with the ON and WHERE. As I understand it, the ON does the join and the WHERE filters the joined tables. But when does the DISTINCT and GROUP BY come into effect? Can anyone clarify this?
    SELECT DISTINCT tblContractAge.Seq AS [order], tblContractAge.Seq, tblContractAge.CMS, Cognos.Primary_Ahcccs_Id AS [Primary Ahcccs Id], Cognos.Title, tblContractAge.Age_range, tblContractAge.Service_Delivery, IIf([cognos].[title]='Title XXI',0,IIf([FPL_Percent]='0
    - 100',1,0)) AS [0-100], IIf([cognos].[title]='Title XXI',1,IIf([FPL_Percent]='101 - 200',1,0)) AS [101-200], 1 AS Ever_Enrolled, Cognos.New9 AS New, Cognos.Disenrolled, IIf([Disenrolled]=1,0,1) AS EligAtEnd, Cognos.Member_Months, Cognos.Sex, Cognos.Race,
    Cognos.Ethnicity INTO mtblDistribute
    FROM tblContractAge LEFT JOIN Cognos ON (tblContractAge.[Contract Type] = Cognos.[Contract_Type]) AND (tblContractAge.Title = Cognos.Title)
    WHERE (((IIf([cognos].[age]-Fix([cognos].[age])>0.999,Round([cognos].[age],0),Fix([cognos].[age])))=[tblContractAge].[age])) OR ((Cognos.Title='Title XXI adult'))
    GROUP BY tblContractAge.Seq, tblContractAge.CMS, Cognos.Primary_Ahcccs_Id, Cognos.Title, tblContractAge.Age_range, tblContractAge.Service_Delivery, IIf([cognos].[title]='Title XXI',0,IIf([FPL_Percent]='0 - 100',1,0)), IIf([cognos].[title]='Title
    XXI',1,IIf([FPL_Percent]='101 - 200',1,0)), 1, Cognos.New9, Cognos.Disenrolled, IIf([Disenrolled]=1,0,1), Cognos.Member_Months, Cognos.Sex, Cognos.Race, Cognos.Ethnicity, tblContractAge.Seq;

     As I understand it, the ON does the join and the WHERE filters the joined tables. But when does the DISTINCT and GROUP BY come into effect? Can anyone clarify this?
    DISTINCT is to output a single record when there are multiple identical ones.
    GROUP BY is the roll up level when doing SUM, MIN, MAX, AVG, COUNT, etc.
    I do not understand what you are doing with the [Cognos].[age] in the WHERE.   Do you have decimal ages?
    Build a little, test a little

  • New itunes can't get my head around it

    Hello.
    Recently downloaded the latest version of itunes and I honestly have tried to get my head around it with plenty of good will but it just doesn't work for me. So i was wondering am I the only one or are there others? would love to hear about what you like and what you don't like here is my comments:
    genius playlist:
    why can't i see full list of previous songs played? if I would like to hear a specific previous song in the list I cannot just click it
    why can't i access song sub-menu? old itunes you could right click on the song and search for the file location for example?
    why do I need seperate windows to open when opening specific items such as downloads or genius why can't they just feature in the main screen?
    but my biggest gripe with it  is that it just generally feels overcroweded. the previous version was so clear and easy on the eye with enough information to know what was listed but not too much to make you lose focus on what you are after. This one offers so much information on everything that I cannot seem to focus any more (maybe not bright enough )
    but seriously as an example of overcrowding, it now lists all the TV series I have previously purchased and removed as already watched. Although no longer on my main hard drive it comes up as available through iclouds. I specifically stored them in a seperate hard drive to not overcrowed my itunes now they are back. and the fact that you can select to only show the non viewed TV episodes doesn't help as it shows series I have bought but haven't downloaded yet .
    am I the only one and starting to become a grumpy old man? should I just accept and adapt? looking forward to hear other peoples thoughts

    I love the new version of Grid view but some of the other changes feel like they still need some fine tuning. And I miss cover flow even if I didn't use it that often...
    You can restore much of the look & feel of the previous version with these shortcuts:
    Ctrl-B to turn on the menu bar.
    Ctrl-S to turn on the sidebar (your device should be listed here as before).
    Ctrl-/ to turn on the status bar.
    Click the magnifying glass top right and untick Search Entire Library to restore the old search behaviour.
    Use View > Hide <Media Kind> in the cloud or Edit > Preferences > Store and untick Show iTunes in the cloud purchases to hide the cloud items. The second method eliminates the cloud status column (but perhaps it does more)
    If you want to roll back to iTunes 10.7 first download a copy of the 32 bit installer or 64 bit installer as appropriate, uninstall iTunes and suppporting software, i.e. Apple Application Support & Apple Mobile Device Support. Reboot. Restore the pre-upgrade version of your library database as per the diagram below, then install iTunes 10.7.
    See iTunes Folder Watch for a tool to scan the media folder and catch up with any changes made since the backup file was created.
    tt2

  • Getting my head around DocumentListener and how inner classes work

    So I'm trying to get my first Swing GUI up and running and I cannot get my head around the DocumentListener.
    I have a JTextArea element called textArea which has the following code for it's listener:
    public class Gui extends JFrame {
        public Gui() {
            // Add the Text area
            JTextArea textArea = new JTextArea(textDoc);
            add(scrollPane, BorderLayout.CENTER);
            textArea.getDocument().addDocumentListener(new DocumentListener() {
                public void changeUpdate(DocumentEvent e) {
                public void insertUpdate(DocumentEvent e) {
                    saveText();
                public void removeUpdate(DocumentEvent e) {
                public void changedUpdate(DocumentEvent e) {
                    throw new UnsupportedOperationException("Not supported yet.");
        public void saveText() {
            System.out.println("saving");
    }Now of course this will not work. The method saveText() is in the parent class. So how do I invoke this method???
    Instead of calling the saveText() method I could interact with the variables of the parent class so why can't I invoke the method?

    OllieL wrote:
    public void insertUpdate(DocumentEvent e) {
    saveText();
    }Now of course this will not work. The method saveText() is in the parent class. So how do I invoke this method???Really? What happened when you tried? What does "will not work" mean? A compile error?
    Anyway, if there actually were a conflict (there isn't here, that's not why it's not working) you can always qualify the member further:
    //for instance member
    Gui.this.saveText();
    //for static member
    Gui.otherMethod();

  • Can't get my head around creating audio

    Hi,
    It's all a bit too mathematic looking for me, and I should be ashamed of myself really as I can handle complicated music sequencers, but....I can't get my head around creating the files as detailed here:
    http://www.iwebformusicians.com/Website-Music-Movies/HTML5-Audio.html
    It's got codes listed, but what do I do with them, where do I put them, how do I put them in my page etc?
    I've already got video on my site which I converted and plays OK on a PC without quicktime, but my music MP3 files won't play on some PC's, so I was looking at the above as the solution. But I'm completely lost how to start?
    Can someone run through the process from step 1, step 2 etc - I would be very grateful.
    Thanks.

    The stuff that I wrote in the section of iWeb for Musicians that you are referring to was meant as an introduction to HTML5 and how it will be used in the future. I will update it when time permits!
    Right now, Safari, Chrome and Firefox support this although the last needs an OGG file which is a pain!. Internet Explorer, of course, hasn't even got around to HTML5 yet except in V 9 which is still beta as far as I know.
    There seems to be at least half of PC users still sticking with IE Vs 6 & 7 so there's a long way to go before HTML5 is the king.
    Flash is still the way to go to reach most viewers as QuickTime is far less popular and there are problems when you try to load more than two or three files onto a web page. Due to the fact that iOS does not support flash its a question of providing an alternative.
    My, short term, solution is to provide a flash player on a page with a link to one for iOS users which has the files loaded as HTML5. The other alternative is to provide both as shown in the second example on this page.....
    http://www.iwebformusicians.com/Website-Music-Movies/Wordpress-Flash-HTML5-Audio .html
    There are a number of solutions for video available which play them as flash and fallback to HTML5 or vice versa and I gave some examples of these and how they can be adapted to audio.

  • I am no musician, but have owned an iMac now for around four years. During that time I have had Garageband installed. I have dipped in and out very occasionally as I would like nothing more than to be able to get my head around it just for my own amusemen

    I am no musician, but have owned an iMac now for around four years. During that time I have had Garageband installed. I have dipped in and out very occasionally as I would like nothing more than to be able to get my head around it just for my own amusement really. I would at least like to be able to record my electric guitar with loops and tracks etc, just try to be a bit creative and see what comes out. The problem that I have is that perhaps its me, but every time I try to get to grips with this software, I just can't seem to get my head around it, even to begin to do something. I have now recently downloaded 10.0.2 which is confusing in itself, as, as far as I can ascertain that is actually version 11, but I'm not even sure about that. I have also recently purchased a Rocksmith RealTone Cable to connect my guitar. I can sometimes get a sound come out, but nothing to brilliant. And every time I try to set something up, it just doesn't seem to work out. I end up hitting buttons and controls in the simple hope that I may hit the correct control in order to get some sort of result. But I'm kind of fumbling in the dark with this. I have trawled the Internet just trying to find either a good manual or video tutorials for absolute beginners, but there just simply doesn't seem to be anything of that nature out there and what there is appears always to be very sketchy and not particularly detailed in explaining anything properly, and so I always find myself seemingly jumping in with both feet and just struggling to try and find a foothold with this on how to really begin. It is so frustrating as I can see the fantastic potential of this software, but just can't understand how to use it properly. If there is anyone out there who may be able to offer me some advice with this, I would be most grateful indeed... Many Thanks.

    I have now recently downloaded 10.0.2 which is confusing in itself, as, as far as I can ascertain that is actually version 11, but I'm not even sure about that.
    Version 10.0.2 is the newest version and the successor to GarageBand '11 (version 6.0.5).
    The '11 is referring to the iLife '11 suit of multimedia application - the older GarageBand was a part of this bundle.
    Have a look at Edgar's graphical enhanced manuals, the explain very detailed how things work and why. You can buy them as iBooks from the iBook store or directly from the page:
    http://DingDingMusic.com/Manuals/

  • Getting my head around SOFS

    Hi,
    I am really struggling to get my head around how to actually build a SOFS using server 2012 R2 which is supposed to be able to use iSCSI disks. I am trying to provide high storage availability should a storage system fail in one of our buildings. this is
    what I have:
    Building 1:
    1 Server 2012 R2
    1 NAS which supports the creation of iSCSI targets and LUNs
    Building 2: - the same as above.
    what I want to achieve is a storage system (probably using SMB) for hyper-v virtual machines reside on, whereby any server and/or storage system becomes unavailable and the storage stays up in an active-active node. I have created 3 iSCSI targets and LUNs
    on each NAS, on server 1 i attached to NAS1 iSCSI targets, on server 2 i attached to NAS2 iSCSI targets.
    I am no unsure how to get these into one cluster shared pool/space. I have got as far as making a storage pool on each of my 2 nodes under "pools" in failover cluster manager I have cluster pool1 owned by node 1, and cluster pool2 owned by node2.
    I created a virtual disk for cluster pool1. then created a volume on that. under disks in FCM it shows assigned to available storage, owner node1
    I tried to create a virtual disk for cluster pool2 but it wont attach, in server manager i see an error and trying to attach it shows "Error attaching or detaching virtual disk. failed to attach virtual disk to node2. access denied"
    i can see in FCM it has been added to the disks as available storage but is offline and owned by node1 - i cant move the ownership.
    am I understanding SOFS wrong here or should my scenario be possible?
    thanks
    Steve

    Hi,
    thanks for such a great detailed answer, you have given a lot there. just a couple of things though:
    your point 3 states online VM's cannot be deduplicated - are you referring to Server 2012 or R2, as I believe in R2 they now can be Deduped. Does StarWind support Deduplication or is it best to use Microsofts version? can StarWind Dedupe be used in a HA
    image?
    in point 5 you have said about SQL and Exchange cant be used in Hyper-v replica. are you saying that if I had a SQL or Exchange virtual server I can't replicate it to a hyper-v replica server, why would this be? can StarWind be used to send a replica of
    the VM's to another destination server and function similar to hyper-v replica? I like the idea of 30 seconds replications for servers which are close enough for us to do this, and the 15 minutes for servers in further locations.
    thank you
    Steve
    1) With R2 MSFT had improved VDI scenarios. But still deduplication of a running VMs is not supported. See:
    What's New in Data Deduplication in Windows Server 2012 R2
    http://technet.microsoft.com/en-us/library/dn486808.aspx
    Important
    In Windows Server 2012 R2, the performance of VHDs optimized through Data Deduplication is fully tested and supported only on VDI workloads. The same performance gains are not guaranteed for non-VDI workloads running on Hyper-V virtual machines; nor does Microsoft
    offer support for these scenarios in Windows Server 2012 R2.
    Extending Data Deduplication to new workloads in Windows Server 2012 R2
    http://blogs.technet.com/b/filecab/archive/2013/07/31/extending-data-deduplication-to-new-workloads-in-windows-server-2012-r2.aspx
    Is Hyper-V in general supported with a Deduplicated volume?
    We spent a lot of time to ensure that Data Deduplication performs correctly on general virtualization workloads. However, we focused our efforts to ensure that the performance of optimized files is adequate for VDI scenarios. For non-VDI scenarios (general
    Hyper-V VMs), we cannot provide the same performance guarantees.
    As a result, we do not support deduplication of arbitrary in use VHDs in Windows Server 2012 R2. However, since Data Deduplication is a core part of the storage stack, there is no explicit block in place that prevents it from being enabled on arbitrary workloads.
    Sure we (StarWind) do support running VMs deduplication.
    2) You can replicate running VMs with SQL Server and Exchange with Hyper-V Replica the problem is you're not going to have consistent content on the destination side. See:
    Support policy for Microsoft SQL Server products that are running in a hardware virtualization environment
    http://support.microsoft.com/kb/956893/en-us
    If multiple SQL VMs are tightly coupled with one another, individual VMs can failover to the disaster recovery (DR) site but SQL high
    availability (HA) features inside the VM need to be removed and re-configured after VM failover. For this reason the following SQL Server features are not supported on Hyper-VM Replica: 
    Availability Groups
    Database mirroring
    Failover Cluster instances
    Log shipping
    Replication
    Does Exchange Support Hyper-V Replica
    http://blogs.technet.com/b/rmilne/archive/2013/07/29/exchange-and-hyper-v-replica-support.aspx
    In short, Exchange does not support the Hyper-V Replica feature.  Exchange has a long history of supporting virtualisation from Exchange
    2003 onwards.  It is fully supported to install Exchange 2007, 2010 or 2013 as
    a virtual machine on Hyper-V, but using the Hyper-V replica feature is not supported.
    The Exchange 2010 virtualization support requirements and Exchange
    2013 virtualization requirements pages are rather detailed in what must and must not be done on an Exchange virtual machine or hypervisor.  If what you want to do is not listed, then that should set an alarm bell off…. 
    The Exchange virtualization support statement has never listed Hyper-V replica, though some of the Hyper-V content has alluded to running Exchange as a replicated VM.  
    You cannot use StarWind to replicate VMs (not any more at least) as we're working on a LU level so you replicate all "linked" VMs located on LU/CSV.
    Hope this helped 
    StarWind VSAN [Virtual SAN] clusters Hyper-V without SAS, Fibre Channel, SMB 3.0 or iSCSI, uses Ethernet to mirror internally mounted SATA disks between hosts.

  • Really cannot get my head around Apple ID and iCloud

    Hi
    I have been reading up on various posts and threads and it seems there is no one definitive answer.
    I have an Apple ID (this uses one email address) from the beginning of time when iTunes first  came out.  Subsequently, I then had a .mac account (this uses a different email address) which has grown and become iCloud.
    On my new iPhone 6, I cannot get my head around which affects what and which calendars, to dos are here or there.  It is a right mess.
    Can someone kindly tell me how can I simply my dumb existence?  Perhaps I am getting too old for tech.
    I think at one point I wanted the Apple ID for personal use and the iCloud account for business use.

    I spent FOUR hours on the phone with Apple yesterday and still no wiser.
    Few of my apps work.  I backed up my iPhone 4S on iOS 6.0 and restored it onto new iPhone 6 on iOS 8.
    The weather app shows all the 10 locations I have saved in there as 32 deg  Celsius yesterday but deleting and re-adding corrects that issue I think it was Steve Jobs that coined the phrase "It just works!" - God bless him!  He would turn in his grave I am sure at the state of affairs so few years on.
    The motto should be refreshed to "It just doesn't work".
    I am so frustrated with this that I reckon I am going to be returning the phone over the weekend if I cannot get any useful advice on this issue.
    I have no idea whether all 10,000+ photos I have are properly synced.  Apple advised me to use the iCloud Photo Beta but then said they cannot guarantee it.  Obviously as it is in Beta stage.  Why would anyone take that risk?

Maybe you are looking for

  • Sharing the same data on two macs

    Hello, I have two Macs and would like to keep the same data on each laptop. I don't think iSync is the tool for the job. Can anybody out there advise of an easy affordable method of ensuring both my machines are sharing the same data; itunes, photo's

  • GUI_DOWNLOAD - number type fields

    Hi, I am using GUI_DOWNLOAD to download data. Before the download, the fields have padded zeroes i.e. (customer) 0000000006. After the download the padding is missing. I need the padded fields. Any ideas. Thanks Leanne

  • 10.6.2 Killed My RAID

    I just updated my MacPro to 10.6.2 and in the process it destroyed the partition table on my RAID. Now on startup OSX prompts me to either format, ignore, or eject the RAID. The RAID Configuration software says all the drives are ok, and the unit is

  • ITunes causing hang on shut down. Help!

    iTunes 11 has been causing my Macbook Pro 15.4" running Lion to hang at shutdown.  I would open up iTunes and it would not respond so I would have to force quit it. Then I proceed to shut my mac down (I always quit all running applications and unchec

  • Wo kann ich meine mails sehen?

    Ich arbeite mit YAHOO!. Wie und wo kann ich meine e-mails ansehen?