Wondering if this was the correct way to patch my kernel for CFLAGS?

Hello. I use to build the zen-sources kernel but stopped many months ago. I didn't really need all of those patches but I did miss the Custom CFLAGS/MAKEFLAGS option that the zen kernel had. I also missed the 432HZ Timer frequency setting available in the zen patch.
So I researched a bit and grabbed these parts from the zen patch to add to the Arch kernel:
For the CFLAGS/MAKEFLAGS
diff --git a/Makefile b/Makefile
index 1ab3ebf..472fe73 100644
--- a/Makefile
+++ b/Makefile
@@ -328,13 +328,12 @@ CHECK = sparse
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
-Wbitwise -Wno-return-void $(CF)
MODFLAGS = -DMODULE
-CFLAGS_MODULE = $(MODFLAGS)
-AFLAGS_MODULE = $(MODFLAGS)
-LDFLAGS_MODULE =
-CFLAGS_KERNEL =
+CFLAGS_MODULE = $(MODFLAGS) $(CUSTOM_CFLAGS)
+AFLAGS_MODULE = $(MODFLAGS)
+LDFLAGS_MODULE =
+CFLAGS_KERNEL = $(CUSTOM_CFLAGS)
AFLAGS_KERNEL =
# Use LINUXINCLUDE when you must reference the include/ directory.
# Needed to be compatible with the O= option
LINUXINCLUDE := -Iinclude \
@@ -344,6 +343,9 @@ LINUXINCLUDE := -Iinclude \
KBUILD_CPPFLAGS := -D__KERNEL__
+# Apply custom flags
+KBUILD_CFLAGS += $(CUSTOM_CFLAGS)
+
KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common \
-Werror-implicit-function-declaration
diff --git a/init/Kconfig b/init/Kconfig
index 6a5c5fe..7b2f4b5 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -672,6 +734,32 @@ config CC_OPTIMIZE_FOR_SIZE
If unsure, say Y.
+menu "Custom Build Flags"
+
+config CUSTOM_CFLAGS
+ string "Custom CFLAGS for kernel"
+ default ""
+ help
+ You can use this to easily set custom gcc CFLAGS to be used for the
+ entire kernel (including modules).
+
+ No warning for you, i can't fix stupidity.
+
+ If unsure, leave blank.
+
+config CUSTOM_MAKEFLAGS
+ string "Custom MAKEFLAGS for kernel"
+ default ""
+ help
+ You can use this to easily set custom MAKEFLAGS to be used for building
+ the entire kernel.
+
+ (Or just use the options when you run make?)
+
+ If unsure, leave blank.
+
+endmenu
+
config SYSCTL
bool
and for the Timer frequency:
diff --git a/kernel/Kconfig.hz b/kernel/Kconfig.hz
index 94fabd5..7a830d4 100644
--- a/kernel/Kconfig.hz
+++ b/kernel/Kconfig.hz
@@ -4,7 +4,7 @@
choice
prompt "Timer frequency"
- default HZ_250
+ default HZ_1000
help
Allows the configuration of the timer frequency. It is customary
to have the timer interrupt run at 1000 Hz but 100 Hz may be more
@@ -23,6 +23,30 @@ choice
with lots of processors that may show reduced performance if
too many timer interrupts are occurring.
+ config HZ_108
+ bool "108 HZ"
+ help
+ 864 HZ is the best value for desktop systems. Most responsive
+ out of all the options. This is for Eight core/Processor systems only
+ as timer frequencies * NR_CPUS = actual frequency.
+ Try this if you have a Eight Core/Processor processor system and a desktop environment.
+
+ config HZ_144
+ bool "144 HZ"
+ help
+ 864 HZ is the best value for desktop systems. Most responsive
+ out of all the options. This is for Six Core/Processor systems only
+ as timer frequencies * NR_CPUS = actual frequency.
+ Try this if you have a Six core/processor system and a desktop environment.
+
+ config HZ_216
+ bool "216 HZ"
+ help
+ 864 HZ is the best value for desktop systems. Most responsive
+ out of all the options. This is for Quad-core/Processor systems only
+ as timer frequencies * number of processors = actual frequency.
+ Try this if you have a quad-core/dual processor system and a desktop environment.
+
config HZ_250
bool "250 HZ"
help
@@ -39,6 +63,22 @@ choice
on SMP and NUMA systems and exactly dividing by both PAL and
NTSC frame rates for video and multimedia work.
+ config HZ_432
+ bool "432 HZ"
+ help
+ 864 HZ is the best value for desktop systems. Most responsive
+ out of all the options. This is for Dual Core/Processor systems only
+ as timer frequencies * number of processors = actual frequency.
+ Try this if you have a dual-core/dual processor system and a desktop environment.
+
+ config HZ_864
+ bool "864 HZ"
+ help
+ 864 HZ is the best value for desktop systems. Most responsive
+ out of all the options. The only reason it is not default is
+ because it may break few drivers. Give it a try if you have
+ a desktop :).
+
config HZ_1000
bool "1000 HZ"
help
@@ -50,8 +90,13 @@ endchoice
config HZ
int
default 100 if HZ_100
+ default 108 if HZ_108
+ default 144 if HZ_144
+ default 216 if HZ_216
default 250 if HZ_250
default 300 if HZ_300
+ default 432 if HZ_432
+ default 864 if HZ_864
default 1000 if HZ_1000
config SCHED_HRTICK
Well the code was added to my make menuconfig kernel settings, and is in the .config of my newly compiled kernel..... I'm just wondering if I did this correctly. (I'm pretty sure that I did a crappy job of patching since I just grabbed the pieces of the zen patch that I thought were the correct one)..... This is the message from the patch:
patching file Makefile
patching file init/Kconfig
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 734 with fuzz 2.
patching file kernel/Kconfig.hz
patch unexpectedly ends in middle of line
Hunk #4 succeeded at 90 with fuzz 1.
So if someone can tell me a better way to patch the kernel26 for custom CFLAGS and 432HZ Timer frequency (for dual core) I would appreciate it. Thanks.

I'm still trying to find out if I needed to patch any other parts of the kernel source when I added CFLAGS to the kernel modules? I also would like to know if I did the Timing part correctly (so I could use the 432HZ setting for a dual core).
..... so far this kernel has worked ok for the last 4 days. Does anybody know how I can benchmark it and compare it to other kernels that I have built with different settings?
Any info is appreciated.
Last edited by methuselah (2009-05-19 15:20:55)

Similar Messages

  • When I send a webpage via email, some of my recipients are unable to see it properly. The website was made with iWeb, and a Mac person advised me this was the best way to do an email campaign with iWeb, but it's not working for a lot of my customers - why

    I have recently created a website for my family's business. When we bought the Macbook the guy in Apple said the best way to send an email campaign to our mailing list was to publish a hidden page, find it in the browser on Safari, then share it via email, so that is what I do. For most of my customers this works fine, however I have a number of people each month who cannot see any of the content of the email. I have added an 'If you can't see this email properly...' link at the top of the page, with no shapes or images etc near it, but even that does not appear for them.
    I am a self-taught novice unfortunately, so haven't a clue what the problem is. I'm not sure of the operating system, but we bought the Macbook in May and it has all the recent updates installed. I have just had a new baby so can't get into the store fdor a one-to-one, so if anyone could explain why this happens / what I can do about it, I would be very grateful! Thanks!

    If you think getting your web pages to appear OK in all the major browsers is tricky then dealing with email clients is way worse. There are so many of them.
    If you want to bulk email yourself, there are apps for it and their templates will work in most cases...
    http://www.iwebformusicians.com/Website-Email-Marketing/EBlast.html
    This one will create the form, database and send out the emails...
    http://www.iwebformusicians.com/Website-Email-Marketing/MailShoot.html
    The alternative is to use a marketing service if your business can justify the cost. Their templates are tested in all the common email clients...
    http://www.iwebformusicians.com/Website-Email-Marketing/Email-Marketing-Service. html
    "I may receive some form of compensation, financial or otherwise, from my recommendation or link."

  • What is the correct way to set up artwork for a Billboard?

    I need to set up photoshop artwork (which consists of about 5 layers) for a 6m x 3m billboard. I set up my whole billboard in Illustrator (at 3m x 1,5m - half of actual size) and placed the psd image in. I set up my photoshop artwork at a third of actual size (3m x 1m at 300dpi). However, this made my file VERY slow to work with (result was about 700mb!!!!). Someone suggested that I downscale the image to 500mm wide and choose resample image > Bicubic Sharper (best for reduction). This scaled my psd file to about 32mb, which worked much faster. Then I saved the psd file as a Tiff with LZW compression without layers and placed into my illustrator file. However, when I export for print as PDFX1a- 2001 my file size was only 17mb!!!! Did I do the whole process correctly?! Will the print quality still be fine for such a big billboard? Is there a better / standard way to set up photoshop graphics for a billboard?

    You can use this test to check ppi resolution.
    On your desktop printer print a few tiles from the image in real size at different ppi resolutions like 10, 20, 30, 40. Find a wall where you can mark 6 meters, and tape the tiles on it. Now step back to whichever is longer distance - from where you can see comfortably the whole size of the eventual billboard without turning your head or to the distance that will be possible to see the actual mounted billboard, . Choose the ppi resolution on which you can't see pixelation on the printed test tiles.

  • I'm not sure if I am writing this in the correct area (this is my second attempt at posting a question), but I have a comment about a recent store experience in Sandusky, OH.  I am not a current Verizon customer, but I was visiting friends and we had to g

    I'm not sure if I am writing this in the correct area (this is my second attempt at posting a question), but I have a comment about a recent store experience in Sandusky, OH.  I am not a current Verizon customer, but I was visiting friends and we had to go to the store to get something taken care of.  First off, allow me to compliment the nice, new store.  Boy, its changed over the past few years ago when I was in last. My comment is mostly directed to one specific employee.  When we entered the store, we were "welcomed" by a sloppy dressed gentlemen (his clothes were probably two sizes two small), which really struck me as unusual because every other employee in the store was dressed really "casual" with nice sporty clothing and red shoes.  Either way, after being entered into the computer, the gentlemen told me to wander around or have a seat in the back and someone would be with us soon.  As soon as we walked away from the door, the gentlemen handed his "duty" off to another employee who took over welcoming people coming in.  For whatever reason, I felt glued to him as he stood out to me.  After leaving the door, he immediately went to the back of the room, hunched over a cabinet, where he stood for the next 30+ minutes playing on his phone, frowning and not speaking to anyone around him.  Again, I found this unusual because everyone else was overly friendly and smiling.  I finally decided to walk by and see what he was doing.  It appeared that he was texting someone.  He paid no attention to me whatsoever as I walked by, just continued to frown and text on his phone.  I did take not of his name tag for future reference.  His name was Justin.  I am assuming he's the manager of the location as he was just standing around while everyone else worked.  I do understand that managers aren't necessarily doing the "dirty work" of the employees, but he could have at least found some better fitting clothing (I find it hard to believe Verizon doesn't supply it), been a little friendly, pretended to be busy, and not been texting the entire time we were there.  Again, the store was great, the other employees were very helpful, but the manager seemed to be doing is own little thing and it didn't put off a good image for the rest of the store.  Just wanted to share my comments.

    lisab101,
    We appreciate you reaching out to us. We greatly appreciate the feedback that you have provided us. Please know that we will lift this up to management and the issues will be addressed.
    Thank you,
    RobinD_VZW
    Follow us on twitter @VZWSupport

  • Hello.  I upgraded my MIFI 2200 (had no contract on it) to a Jetpack (with a contract) when customer service told me this 4G device would use less data because it was faster.  This was not correct.  Anyway, I got the device, had problems, did tech support

    I upgraded my MIFI 2200 (had no contract on it) to a Jetpack (with a contract) when customer service told me this 4G device would use less data because it was faster.  This was not correct.  Anyway, I got the device, had problems, did tech support, re-activated my MIFI.  1.  Decided to return the device. Spent hours with Customer Service, then finally up to Management, they agreed to take it back and void the contact, I sent it back immediately – and instead of voiding the contact they transferred it to my MIFI! Please cancel the contract on the MIFI. 2.  During the short time I had the Jetpack I continually received overage alerts, took it all the way up to 30 GB, each time I backdated the new data plan except twice when customer service did and failed to back date the increase, and once the computer locked customer service out and could not increase.  The end result is I have a $495 bill, many of these alerts were false since I ended up with only 14 MG for the month, etc.  I am asking that my bill be reduced significantly to reflect no overage and to compensate for these problems. Please open up a ticket for this.

    I had Verizon JetPak and you will find it will eat data like crazy. I opted to sign on to ATT Uverse and configured my phones and other devices to the WiFi on the Uverse system. It took about 5 minutes to completed the configuration.  I was using 10 to 12 GB monthly to support 5 devices. Even if you use Verizon DSL, you are still subjected to same GB allotment.  In my area, Verizon DSL is not available. With Uverse, I have 250 GB monthly to use, and I have not even come close to using anything of that magnitude. I reduced my GB package with Verizon to 2 GB per month and since having ATT Uverse, I never use more than 1GB a month with Verizon.
    I have no problem with Verizon cell phone service as we get a much stronger signal where we live than you can with ATT or any others.  It is just my opinion, but if you are running multiple devices off Verizon Jetpak, you will eventually spend a fortune to keep pace.  I pay $60 a month for 18 Mbps speed, although ATT have packages that cost much less. But, it saves me a bundle each month. The cost of Uverse alone is worth not having to run everything through a Jetpak.  
    If you have the  option to use another DSL service provider in your area, I recommend dumping the Jetpak and sign on with another carrier.

  • I would like to read a text file in which the decimal numbers are using dots instead of commas. Is there a way of converting this in labVIEW, or how can I get the program to enterpret the figures in the correct way?

    The program doest enterpret my figures from the text file in the correct way since the numbers contain dots instead of commas. Is there a way to fix this in labVIEW, or do I have to change the files before reading them in the program? Thanks beforehend!

    You must go in the labview option menu, you can select 'use the local
    separator' in the front side submenu (LV6i).
    If you use the "From Exponential/Fract/Eng" vi, you are able to select this
    opton (with a boolean) without changing the labview parameters.
    (sorry for my english)
    Lange Jerome
    FRANCE
    "Nina" a ecrit dans le message news:
    [email protected]..
    > I would like to read a text file in which the decimal numbers are
    > using dots instead of commas. Is there a way of converting this in
    > labVIEW, or how can I get the program to enterpret the figures in the
    > correct way?
    >
    > The program doest enterpret my figures from the text file in the
    > correct way since the numbers contain dots instea
    d of commas. Is there
    > a way to fix this in labVIEW, or do I have to change the files before
    > reading them in the program? Thanks beforehend!

  • Ok, does anyone know the correct way to do this

    Hi all
    would someone beable to explain the correct way of attaching dynamic text to a rotaing menu so that the text moves with the image as it rotates,
    I am now being told that in order to have dynamic text rotate/move I have to embed the font, by placing a text field on the stage outside my flash area and then set embedFonts property to true, and then apply a textformat.
    first, is this the correct way of doing it?
    second, can someone please explain(by breaking down into steps, as I am a newbie) how I go about setting embedFonts property to true and applying a textformat.
    what I have created;
    1.)I created a movieclip called 'textHolder' inside this has two dynamic text fields called 'headerText'  & 'bodyText'  <<<<< IS THIS CORRECT?
    2.)I have an xml file which will load the text in as well as the images with the rotating menu, see below;  <<<IS THIS CORRECT????
    <?xml version="1.0" encoding="utf-8"?>
    <data>
      <image name="image 1" path="img/img1.jpg"
        textHolder.headerText="Sunset"
        textHolder.bodyText="The hour of night is near, as the skies get blood-filled" />
    <data>
    3.What I am missing is what script I need for the main.as file, can anyone help here?
    so to break down.
    I have a rotating menu that is driven by xml, that loads images on the menu. I would also like to load text to the left of each image, and have the text be fixed with the image as it rotates.
    I can post the as, but I would like to know if the above is correct first, if you would like to see the main script please say.
    I have attached a jpg layout to give you an idea as to what I am trying to explain. can someone please help!!!!!!!!!
    (this is my previous post: http://forums.adobe.com/thread/463213?tstart=0  but I feel its got lost a little along the way)

    MY CURRENT SCRIPT, CAN YOU SEE HOW TO ATTACH THE TEXT WITH THE IMAGE?
    package 
    import flash.display.DisplayObject;
    import flash.display.MovieClip;
    import flash.display.Loader;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.net.URLLoaderDataFormat;
    import soulwire.ui.CircleMenu;
    public class Main extends Sprite
      //————————————————————————————————————————————— CLASS MEMBERS  VALUE
      public var circleMenu:      CircleMenu;
      public var xmlLoader:      URLLoader;
      //——————————————————————————————————————————————— CONSTRUCTOR
      public function Main()
      circleMenu = new CircleMenu( 300, 32, 14 );
      circleMenu.x = 150;
      circleMenu.y = 300;
      addChildAt( circleMenu, 0 );
      // Use URLLoader to load XML
      xmlLoader = new URLLoader();
      xmlLoader.dataFormat = URLLoaderDataFormat.TEXT;
      // Listen for the complete event
      xmlLoader.addEventListener(Event.COMPLETE, onXMLComplete);
      xmlLoader.load(new URLRequest("data.xml"));
      /*for (var i:int = 0; i < 20; i++)
        // MyMenuItem can be a symbol from your library
        // or any class which extends DisplayObject!
        var item:MyMenuItem = new MyMenuItem();
        item.txt.text = 'Menu Item ' + (i + 1);
        item.txt.mouseEnabled = false;
        item.buttonMode = true;
        item.addEventListener( MouseEvent.CLICK, onMenuItemClick );
        circleMenu.addChild( item );
      circleMenu.currentIndex = 4;*/
      // Enable the mouse wheel
      stage.addEventListener( MouseEvent.MOUSE_WHEEL, onMouseWheel );
      // Set up the UI
      ui.spacingSlider.addEventListener( Event.CHANGE, onSliderChange );
      ui.radiusSlider.addEventListener( Event.CHANGE, onSliderChange );
      ui.minAlphaSlider.addEventListener( Event.CHANGE, onSliderChange );
      ui.minScaleSlider.addEventListener( Event.CHANGE, onSliderChange );
      ui.scaleSlider.addEventListener( Event.CHANGE, onSliderChange );
      ui.itemsSlider.addEventListener( Event.CHANGE, onSliderChange );
      ui.spacingSlider.dispatchEvent( new Event( Event.CHANGE) );
      ui.radiusSlider.dispatchEvent( new Event( Event.CHANGE) );
      ui.minAlphaSlider.dispatchEvent( new Event( Event.CHANGE) );
      ui.minScaleSlider.dispatchEvent( new Event( Event.CHANGE) );
      ui.scaleSlider.dispatchEvent( new Event( Event.CHANGE) );
      ui.itemsSlider.dispatchEvent( new Event( Event.CHANGE) );
      //———————————————————————————————————————————— EVENT HANDLERS
      private function onXMLComplete(event:Event):void
      // Create an XML Object from loaded data
      var data:XML = new XML(xmlLoader.data);
      // Now we can parse it
      var images:XMLList = data.image;
      for(var i:int = 0; i < images.length(); i++)
        // Get info from XML node
        var imageName:String = images[i].@name;
        var imagePath:String = images[i].@path;
      //  var textInfo:TextInfo = new TextInfo(); 
    //      textInfo.headerText.text = images[i].@headerText; <<<<THIS IS WHAT i HAVE TRIED, GET ERRORS SO COMMENTED OUT
    //    textInfo.bodyText.text = images[i].@bodyText;
    //    addChild(textinfo);
                  //textInfo.x=120;
        //textInfo.y=300;
        var sp:Sprite=new Sprite();    <<<<<<<< THIS IS SCRIPT JUST ADDED
        var tf:TextField=new TextField();
        tf.wordWrap=true;
        tf.width=200;
        var ldr:Loader=new Loader();
        addChild(sp);
        sp.addChild(tf);
        sp.addChild(ldr);
        ldr.x=tf.width+10;
        // Load images using standard Loader
        var loader:Loader = new Loader();
        // Listen for complete so we can center the image
        loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onImageComplete);
        loader.load(new URLRequest(imagePath));
        // Create a container for the loader (image)
        var holder:Sprite = new Sprite();
        holder.addChild(loader);
        // Same proceedure as before
        holder.buttonMode = true;
        holder.addEventListener( MouseEvent.CLICK, onMenuItemClick );
        // Add it to the menu
        circleMenu.addChild(holder);
      private function onImageComplete(event:Event):void
      var img:Loader = event.currentTarget.loader;
      img.content["smoothing"] = true;
      img.x = -(img.width/2);
      img.y = -(img.height/2);
      private function onMouseWheel( event:MouseEvent ):void
      event.delta < 0 ? circleMenu.next() : circleMenu.prev();
      private function onMenuItemClick( event:MouseEvent ):void
      circleMenu.scrollToItem( event.currentTarget as DisplayObject );
      private function onSliderChange( event:Event ):void
      switch( event.currentTarget )
        case ui.spacingSlider:
        circleMenu.angleSpacing = event.currentTarget.value;
        break;
        case ui.radiusSlider:
        circleMenu.innerRadius = event.currentTarget.value;
        break;
        case ui.minAlphaSlider:
        circleMenu.minVisibleAlpha = event.currentTarget.value;
        break;
        case ui.minScaleSlider:
        circleMenu.minVisibleScale = event.currentTarget.value;
        break;
        case ui.scaleSlider:
        circleMenu.activeItemScale = event.currentTarget.value;
        break;
        case ui.itemsSlider:
        circleMenu.visibleItems = event.currentTarget.value;
        break;

  • We recived  ipads today in school to use as a tool and they said if i sync it to my itunes my itunes will be erased and all the ipad stuff currently on there would be erased the second i connect to the school i was wondering if this was possible?

    we recived  ipads today in school to use as a tool and they said if i sync it to my itunes my itunes will be erased and all the ipad stuff currently on there would be erased the second i connect to the school i was wondering if this was possible? i already pointed a couple things that they said was true but were false like useing that find my ipad thing were it just zooms in on your location they also said it would beep and they can track it anywhere witout a 3g network which we use the wi fi. teachers can connect to itunes i belive becasue they don't have the same rescrtictions as use students but early in the year they said one teacher tried and failed with the results that said would happen to  use. besides ristrictions like loseing the app store and not being aloud to open any app wemb adresses we are to add  music via the itunes that i already on the ipad. i was just wondering if there full of it right now because i think they are.

    If I were a teacher setting up iPads to be used at school/work, I wouldn't link it to my personal iTunes, rather I'd create/use a different one. If for no other reason than to keep the kidlets and your fellow teachers from possibly accessing your account.

  • What is the correct way to set up a new Mac

    A friend of mine recently migrated from Windows and bought himself an iMac. He got the local Apple store to set up his iMac and migrate his data from his Windows to his iMac. I was  recently helping him set up a few a additional things on his iMac and was supprised to see how the Apple store had set up the machine.
    There was only one account set up on the iMac and all of the user data had been loaded into this admin account. Now I've only been a Mac user for about 5 years, but I was always taught create an admin account with no data on it and then set up a separate user account(s) which contain all the user data and these are used by the users to log in.
    Now my question is who is right the Apple shop or me? I would e intertested to hear any experts views on the correct way to set up an OSX machine. 

    Both of you. Either way is acceptable. However, for a single user machine there's really no need to have more than the admin account.

  • What is the correct way to add styling to drag-and-drop created calendars?

    I have a working instance of a rich client calendar. I generated the view with the required fields (start, stop, provider, ...), put it into the App Module, and dragged it onto a JSF page to create a calendar.
    Next I created an activityScope object in a class called CalendarBean (no inheritance)
    Class CalendarBean()
    private HashMap<Set<String>, InstanceStyles> activityColorMap;
    +..+
    +public CalendarBean() {+
    super();
    activityColorMap = new HashMap<Set<String>, InstanceStyles>();
    HashSet setEd = new HashSet<String>();
    HashSet setLen = new HashSet<String>();
    setEd.add("Work");
    setLen.add("Home");
    activityColorMap.put(setEd, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.ORANGE));
    activityColorMap.put(setLen, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.RED));
    +}+
    +}+
    Next, I linked this up as a backing bean and associated the ActivityStyles of CalendarBean to it:
    +#{backingBeanScope.calendarBean.activityColorMap}+
    I populated some records in the database with properties "Work" and "Ed', but they show default blue.
    As I understand it, I need to do something with the getTags() method of the underlying CalendarActivity class, but I'm not quite sure how to do that.
    Took a stab at creating a class, CalendarActivityBean, that extended CalendarActivity, and pointed all the CalendarActivity references I had to the new class, but it didn't seem to fire (in debug), and I got into trouble, when inserting records, with
    public void calendarActivityListener(CalendarActivityEvent calendarActivityEvent) {
    currActivity = (CalendarActivityBean) calendarActivityEvent.getCalendarActivity();
    being an illegal cast
    What is the correct way to add provider-based styling to drag-and-drop create calendars?
    Ed Schechter

    A colleague of mine was kind enough to solve this:
    The calendar has ActivityStyles property = #{calendarBean.activityStyles}
    CalendarBean looks something like this:
    package com.hub.appointmentscheduler.ui.schedule;
    import java.util.HashMap;
    import java.util.HashSet;
    import java.util.Set;
    import oracle.adf.view.rich.util.CalendarActivityRamp;
    import oracle.adf.view.rich.util.InstanceStyles;
    +public class CalendarBean {+
    private HashMap activityStyles;
    private String dummy;
    +public CalendarBean() {+
    +// Define colors+
    activityStyles = new HashMap<Set<String>, InstanceStyles>();
    HashSet setPending = new HashSet<String>();
    HashSet setArrived = new HashSet<String>();
    HashSet setApproved = new HashSet<String>();
    HashSet setCompleted = new HashSet<String>();
    setApproved.add("APPROVED");
    setPending.add("PENDING");
    setArrived.add("ARRIVED");
    setCompleted.add("COMPLETED");
    activityStyles.put(setApproved, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.GREEN));
    activityStyles.put(setPending, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.ORANGE));
    activityStyles.put(setArrived, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.PLUM));
    activityStyles.put(setCompleted, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.LAVENDAR));
    +}+
    +public void setactivityStyles(HashMap activityStyles) {+
    this.activityStyles = activityStyles;
    +}+
    +public HashMap getactivityStyles() {+
    return activityStyles;
    +}+
    +}+
    Now, go into the Bindings tab on the calendar page, double click the calendar binding, and specify the column you've defined as the calendar's Provider in the Tags dropdown.
    Should show colors.

  • What's the correct way to handle changes in RDBMS/DBadapter?

    In my project all changes to the database are not done via Jdeveloper but via TOAD. This means DBadapters must be made aware of changes in the database.
    I tried to re-run the DBad.apter wizard twice (2 different services) - to make it aware of changes in the DB. Both times it failed. I think was after the import database tab. The next tab was just blank.
    So what's the correct way of reconile changes in the db backwards into Jdev?
    BTW, in the DBadapter wiz its not possible the remove a already imported table. How do I come across the situation where I want the DBadapter to point to af different table? - and possibly remove old references to another one - which might have been removed in the DB.
    As It is now - I have to re-work all my DBadapters, which is not very much fun...
    Rgds, Henrik

    Trust me, I hv done that umpteen nbr of times.
    I hate BA's coming to me with changes, for which I hv to modify the DB adapter.
    One big loop-hole with BPEL is if we try to modify the adapters/toplink, it doesnt tend to work properly.
    The manthra for such modifications is ... "recreate", which is definetely not a good practise.
    You may not like but gottu live with it, my friend.
    Pointing to a different table, I achieve it by doing a "Shift+Delete" to all the references of the old table in the BPEL project ... :|
    There isnt a specific provision in the wzd (I am not sure of the latest version, though).

  • Which is the correct way to program a Desktop Application???

    Hello all,
    I haven't programmed in a while and I just got the free Netbeans 6.1 CD just for kicks and to try it out. I'm making a basic application for a store that one of my family members has. I was programming away as I could and right now I came to a conclusion... I think I maybe doing this wrong.
    I have done all the GUI using the Netbeans IDE plugin visual designer and I just click on the button and add the event and then I program away. But just right now I noticed another file that is called NameOfProgramApp.java. Then I look to the right and I have NameOfProgramView.java where I have been placing most of my code. Is this the right place to put the code???
    I think I maybe missing something or maybe doing some lousy code writing. Any help would be awsome. Is this where I put my Object Oriented think hat on to accomplish the correct way??
    Thanks in advance and it feels good to be back :D

    A general rule of thumb that I use it to think in layers...
    --GUI {What you show the use}
    --GUI code logic {local rules and edits}
    --WEB/Network {interface for multiuser}
    --BUSINESS RULES {rules and coding to make your business work}
    --DATABASE {where do you store your durable data}
    Granted, this is a very simplistic look, but it will get you a start a thinking process for your app.

  • Attn - The correct way to connect to the repository

    From iFS Product Management.
    Many people appear to be having trouble connecting to the repository and are using the wrong API calls to do. The recommended API calls changed between beta and production. For the production release here is the correct way to connect:
    1. Four pieces of information are need to connect to the repository
    1. The iFS User Name
    2. The iFS User's password
    3. The properties file to be used
    4. The database password of the user who owns the iFS Schema
    This is different from the beta where the database password was hardcoded into the properties file.
    Note that any TNSNAMES information is still containing in the databaseURL entry in the properties file.
    package ifs.demo.samples;
    import oracle.ifs.beans.*;
    import oracle.ifs.common.*;
    import java.util.Locale;
    public class ConnectionTester extends Object {
    public static LibrarySession testConnection()
    throws IfsException
    LibraryService service = new LibraryService();
    CleartextCredential me = new CleartextCredential("gking","ifs");
    ConnectOptions connect = new ConnectOptions();
    connect.setLocale(Locale.getDefault());
    connect.setServiceName("IfsDefault");
    connect.setServicePassword("manager");
    return service.connect(me,connect);
    public static void main(String[] args)
    try {
    LibrarySession ifs = testConnection();
    ifs.disconnect();
    } catch (IfsException e) {
    IfsException.setVerboseMessage(true);
    e.printStackTrace();
    Note that in this example "gking" is the iFS user name, "ifs" is the gking user's ifs password. "manager" is the password of the database user who owns the iFS Schema.
    "IfsDefault" is the server properties file that describes the ifs connection. This file is in called "IfsDefault.properties" and is located in the package oracle.ifs.server.properties". This means that the folder that contains the 'oracle' folder that is the root of this package must be referenced in the class path when running this example.
    Note, if you use the older, 3 argument form of the connect you will get an unable to connect exception as the iFS will not have the Schema Password.
    null

    When I run the example below on Solaris (after setting the CLASSPATH etc., I get a oracle.ifs.common.IfsException: IFS-21008: Login Failure
    oracle.ifs.common.IfsException: IFS-10170: Invalid name/credential.
    (I am providing all 4 pieces of information for connecting)
    When using the web interface the same userid and password work fine (system/manager).
    Please help.....
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Mark_d_Drake ():
    From iFS Product Management.
    Many people appear to be having trouble connecting to the repository and are using the wrong API calls to do. The recommended API calls changed between beta and production. For the production release here is the correct way to connect:
    1. Four pieces of information are need to connect to the repository
    1. The iFS User Name
    2. The iFS User's password
    3. The properties file to be used
    4. The database password of the user who owns the iFS Schema
    This is different from the beta where the database password was hardcoded into the properties file.
    Note that any TNSNAMES information is still containing in the databaseURL entry in the properties file.
    package ifs.demo.samples;
    import oracle.ifs.beans.*;
    import oracle.ifs.common.*;
    import java.util.Locale;
    public class ConnectionTester extends Object {
    public static LibrarySession testConnection()
    throws IfsException
    LibraryService service = new LibraryService();
    CleartextCredential me = new CleartextCredential("gking","ifs");
    ConnectOptions connect = new ConnectOptions();
    connect.setLocale(Locale.getDefault());
    connect.setServiceName("IfsDefault");
    connect.setServicePassword("manager");
    return service.connect(me,connect);
    public static void main(String[] args)
    try {
    LibrarySession ifs = testConnection();
    ifs.disconnect();
    } catch (IfsException e) {
    IfsException.setVerboseMessage(true);
    e.printStackTrace();
    Note that in this example "gking" is the iFS user name, "ifs" is the gking user's ifs password. "manager" is the password of the database user who owns the iFS Schema.
    "IfsDefault" is the server properties file that describes the ifs connection. This file is in called "IfsDefault.properties" and is located in the package oracle.ifs.server.properties". This means that the folder that contains the 'oracle' folder that is the root of this package must be referenced in the class path when running this example.
    Note, if you use the older, 3 argument form of the connect you will get an unable to connect exception as the iFS will not have the Schema Password.<HR></BLOCKQUOTE>
    null

  • What is the correct way to destory a Thread?

    Just wondering what is the correct way to destroy a thread? I am currently using the stop() method, but i noticed that it has been depreciated (along with other methods used to destroy a thread) when i looked at the thread documentation. Since this is so, then how can one correctly destroy a thread? Thanks in advance for the help.

    There is an awful lot of bad advice in this thread about what null does. Please in future check on your own with working code before offering up misguided and very wrong advice. Particularly when your advice contradicts that previously given.
    Please compile and run the following
    public class Test implements Runnable{
      public static void main(String args[])throws Exception{
        Test test = new Test();
        Thread t= new Thread(test);
        t.start();
        // have delay wait a few seconds to demonstrate
        Thread.sleep(3000);
        System.out.println("Setting reference to thread to null");
        t = null; // what does this do?
        // jack all
        System.out.println("Exiting main");
      public void run(){
        while(true){
          System.out.println("Hello from test thread!");
          try{ Thread.sleep(750); }catch(InterruptedException iDontCareAboutThis){}
    }This will output the following
    C:\>java Test
    Hello from test thread!
    Hello from test thread!
    Hello from test thread!
    Hello from test thread!
    Setting reference to thread to null
    Exiting main
    Hello from test thread!
    Hello from test thread!
    Hello from test thread!
    Hello from test thread!
    Hello from test thread!
    Hello from test thread!And continues on endlessly. Setting the reference to null is NOT an answer to this problem.

  • The Correct Way To Design A Layout?

    Should i just select the AP DIV icon and draw my div tables and drag images and content into them? then style them? is this correct?
    if not, what is the correct way? i do not want to use a pre made template

    Should i just select the AP DIV icon and draw my div tables and drag images and content into them? then style them? is this correct?
    Only if you want a complete mess on your hands later.  APDivs are not a good way to being a project. Here's why.
    Why   do APDivs move?
    http://forums.adobe.com/message/2181263#2181263
    DW is not a drag & drop application.  It's a web authoring tool.  As such, it's only as good as the skills YOU bring to the table.  The correct way to layout pages depends on the following:
    a) your skills with CSS and X/HTML code,
    b) your site's requirements,
    c) intended target audience and
    d) how much content you need to display on your site.
    If your CSS and X/HTML skills are weakl, start by learning the basics first.  Or else DW will confound and frustrate you.
    HTML & CSS Tutorials - http://w3schools.com/
    There is no shame in starting out with a pre-built CSS layout which is nothing more than a framwork or  empty table. You customize it the way you wish.  IMO, having a pre-built CSS layout to work with is far more efficient than staring at a blank page & not knowing where to begin.
    Work your way through the following tutorials:  Post again later if you have specific questions.
    Taking   a Fireworks (or Photoshop) comp to a CSS based layout in DW
    http://www.adobe.com/devnet/fireworks/articles/web_standards_layouts_pt1.html
    From   Tables to CSS Web Design Part 1 -
    http://www.adobe.com/devnet/dreamweaver/articles/table_to_css_pt1.html
    From   Tables to CSS Web Design Part 2 -
    http://www.adobe.com/devnet/dreamweaver/articles/table_to_css_pt2.html
    Good luck,
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com
    Message was edited by: Nancy O. - fixed a messed up link.

Maybe you are looking for

  • Taptic Engine stop working after workout

    I don't know if others have experienced this, but so far after receiving my watch I went out and had two 5km runs, and each time I finished running the Taptic engine would stop working. For example, if I Force Touch, there's no "vibration", and no bu

  • Fim Synchronization service 2010 r2

    hello, I am running FIM Synchronization service  with different management agents. sometimes thing goes wrong. how can i monitor those tasks? I want to use powershell for than because i have a lot of other hings that i monitor that way. is it possibl

  • Tcode for Exchangerate01  idoc

    HI Guis, What is the tcode to generate standard idoc for  Exchange_rate. Regds, Santhosh

  • Copying Variant Configuration across sales order items

    Hi, We are working with SAP 4.7. I have a requirement to default the variant configuration values entered within line 1 of the sales order entry process on to subsequent lines. i.e. defaulting initial values for the configuration. Our users have to e

  • Reconcilin​g e-mail using BIS and Outlook

    I own a small business and am trying to make this e-mail thing work smoothly.  I use Outlook 2007 and my e-mails get sent to both my Blackberry and Outlook.  However what I delete in Outlook is not reconciling back to my Blackberry to be deleted.  I