Search Results

Search found 794 results on 32 pages for 'steven lu'.

Page 8/32 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • How to integrate Pidgin and Evolution into the message indicator?

    - by Steven Robert Chetwynd
    I upgraded to 12.10, I was using Unity 2d, but as it no longer exists I moved to gnome classic, something in the upgrade seems to have change the message indicator in the "Indicator Applet Complete". How do I integrate Pidgin and Evolution into the message indicator, there is only a button to launch Pidgin, but a new message does not change the colour of the icon or show up in the dropdown part. Also when minimizing Pidgin it minimizes like a normal window instead of minimizing to the applet. There is nothing in the menu for Evolution at all.

    Read the article

  • Consultations with ATG Development at OpenWorld 2014

    - by Steven Chan (Oracle Development)
    Our OpenWorld 2014 San Francisco conference is about six weeks away.  We have a great lineup of sessions this year.  Our EBS Applications Technology track sessions are listed here, and we'll have a more-detailed article about those soon. One of the advantages of attending OpenWorld is that you can meet face-to-face with senior staff in ATG Development.  You can use these meetings to discusss your questions, requirements, plans, and deployment architectures with us. There are several options for doing this: At general sessions: collar the speaker of your choice after his or her presentation. At the Meet The Experts sessions:  these are first-come first-served round-table discussions Setting up private meetings via your Oracle account manager The last option is best if you have lots of in-depth questions or confidential details about your implementation that cannot be discussed in front of other customers.  Many of this blog's experts, including me, will be attending OpenWorld this year.  If you'd like to meet with us privately, please contact your Oracle account manager to arrange that as soon as possible.  My calendar, in particular, is already starting to fill up.  It is often completely full by the time OpenWorld starts. See you there!

    Read the article

  • Not able to track traffic on subdomain using Google Analytics

    - by Steven
    I'm trying to track traffic for my sub-domain, but it's not happening. This is how it's set up. My partner has a domain called sub1.partner.com. This domain points to partner1.mydomain.com. The idea is that users think they are browsing my partners website, when they are in fact browsing pages on my server. My tracking code looks like this: var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-xxxxxxxx-x']); _gaq.push(['_setDomainName', '.mysite.com']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); In Google analytics I've created a new account under my main account and called in partner1.mysite.com. On this account I have created a filter: Filter type: include Filter field: Host name Filter pattern: partner1.mysite.no Case sensetive: No What more can I try to track traffic on my subdomain? UPDATE Question 1 Is this line correct? _gaq.push(['_setDomainName', '.mysite.com']); Question 2 Is it correct that I have to add \ before any punctuations like so \. in filters?

    Read the article

  • What term is used to describe running frequent batch jobs to emulate near real time

    - by Steven Tolkin
    Suppose users of application A want to see the data updated by application B as frequently as possible. Unfortunately app A or app B cannot use message queues, and they cannot share a database. So app B writes a file, and a batch job periodically checks to see if the file is there, and if load loads it into app A. Is there a name for this concept? A very explicit and geeky description: "running very frequent batch jobs in a tight loop to emulate near real time". This concept is similar to "polling". However polling has the connotation of being very frequent, multiple times per second, whereas the most often you would run a batch job would be every few minutes. A related question -- what is the tightest loop that is reasonable. Is it 1 minute of 5 minutes or ...? Recall that the batch jobs are started by a batch job scheduler (e.g. Autosys, Control M, CA ESP, Spring Batch etc.) and so running a job too frequently would causes overhead and clutter.

    Read the article

  • When will EBS 12.2 be released?

    - by Steven Chan (Oracle Development)
    The most frequently asked question at OpenWorld this year was, "When will EBS 12.2 be released?" Sadly, Oracle's communication policies prohibit us from speculating about release dates for unreleased software. We are not permitted to give estimates, rough timelines, guesses, or anything else that remotely resembles specific guidance on release dates. You can monitor My Oracle Support and this blog for updates on EBS 12.2.  I'll post them here as soon as they're available.  I'm embedding an old favourite from 2007 in its entirety here, since it applies equally to new releases as well as certifications. "Loose Lips Sink Ships" (March 20, 2007)If I were to sort emails in my inbox into groups, the biggest -- by far -- would be the one for emails that start with, "When will _____ be certified with the E-Business Suite?"  I answer these dutifully but know that my replies can sometimes be maddening, for two reasons:  technical uncertainty, and Oracle's rules for such communications. On the Spiral Model of CertificationsTechnology stack certifications tend to be highly iterative in nature.  As a result, statements about certification dates tend to be accurate only when made in hindsight.  Laypeople are horrified to hear this, but it's the ugly truth.  Uncertainty is simply inherent to the process.  I've become inured to it over the years, but it might come as a surprise to you that it can take many cycles to get fully-released software to work together.  Take this scenario: We test a particular combination of Component A and B. If we encounter a problem, say, with Component A, we log a bug. We receive a new version of Component A. The process iterates again. The reality is this: until a certification is completed and released, there's no accurate way of telling how many iterations are yet to come.  This is true regardless of the number of iterations that have already been completed.  Our Lips Are SealedGenerally, people understand that things are subject to change, so the second reason I can't say anything specific is actually much more important than the first.  "Loose lips might sink ships" was coined in World War II in an effort to remind people that careless talk can have serious consequences.  Curiously, this applies to Oracle's communications about upcoming features, configurations, and releases, too.  As a publicly traded company, we have very strict policies that prohibit us from linking specific releases to specific dates.  If you've ever listened to an earnings call with analysts, you'll often hear them asking, "Can you add a little more color to that statement?"  For certifications, color is usually the only thing that I have.  Sometimes I can provide a bit more information about the technical nature of the certification in question, such as expected footprints or version levels.  I can occasionally share technical issues that we've found, too, to convey the degree of risk or complexity involved in the certification.  Aside from that, there's little additional information about specific dates, date ranges, or even speculation about dates that I can provide... that is, without having one of those uncomfortable conversations with Oracle Legal.  So, as much as it pains me to do so, when it comes to dates, I'm always forced to conclude with a generic reply that blandly states one of the following: We're working on that certification right now That certification is in the pipeline but hasn't been started yet We don't have plans for that certification Don't Shoot the MessengerThankfully, I've developed a thick skin over the years -- which is a good thing, considering the colorful and energetic responses I've received over the years after answering these questions.  However, on behalf of my Oracle colleagues who are faced with these questions every day in the field, I urge you to remember that they're required to follow these same corporate rules about date disclosures.  It never hurts to ask, but don't be too disappointed if we can't provide you with a detailed answer.  The Go-Go's had it right, after all.  Related Articles Webcast Replay Available: Technical Preview of EBS 12.2 Online Patching

    Read the article

  • AMP and ACMP 4.0 Now Available for More Platforms

    - by Steven Chan (Oracle Development)
    We released the latest Application Management Pack and Application Change Management Packs for Oracle E-Business Suite 4.0 for Oracle Enterprise Manager 11g earlier this year for Linux platforms.  This pair of packs is released as part of the Application Management Suite for Oracle E-Business Suite.  These two packs are also referred to as the Oracle E-Business Suite Plug-in 4.0 for OEM 11g. As a follow-up to that announcement, I'm pleased to announce that these products are now available and certified on the following additional platforms: Release 12 (12.0.4+, 12.1.1+): Oracle Solaris on SPARC (64-bit) (9, 10) HP-UX Itanium (11.23, 11.31) HP-UX PA-RISC (11.23, 11.31) IBM AIX on Power Systems (64-bit) (5.3, 6.1) Release 11i (11.5.10.2): Oracle Solaris on SPARC (64-bit) (9, 10) HP-UX PA-RISC (11.23, 11.31) IBM AIX on Power Systems (64-bit) (5.3, 6.1) For certified configurations, prerequisites, and links to the downloads and documentation, see: Oracle E-Business Suite Plug-in 4.0 Released for OEM 11g (11.1.0.1)

    Read the article

  • Hosted EBS 11i Integration Repository Temporarily Offline

    - by Steven Chan (Oracle Development)
    Most developers know that they can integrate their external applications with the E-Business Suite via the business service interfaces and SOA service endpoints documented in the E-Business Suite's Integration Repository.  This is shipped as part of EBS 12.  Until recently, it was provided as a hosted environment on the Oracle.com domain for EBS 11i. Unfortunately, we identified some standards-related issues in the process of switching from the existing server that hosts the EBS 11i environment to a new one, notably in the area of accessibility. Some of those issues will require coding changes to resolve.  Given our focus on EBS 12.2 right now, it may take some time to prioritize this relative to our other existing commitments. In the meantime, we are required to suspend access to the EBS 11i Integration Repository.  I don't have a firm schedule for getting this back online yet, but you're welcome to monitor or subscribe to this blog. I'll post updates here as soon as soon as they're available.    Related Articles Integration Repository for the E-Business Suite New Whitepaper: Primer on Integrating with EBS 12 with Other Applications

    Read the article

  • What Scripting Program would you choose to recover deleted and missing files?

    - by Steven Graf
    For a private project I'm looking for a command line tool to scan and recover files. I'm working on Gnome 3 (but I could also change my OS if it helps reaching my goal) and must be able to find and recover files on attached devices with formats such as NTFS, Fat32, MAC OS Extended and ext3. Is there a command line script to cover all of them or do I need to use different programs to reach my goal? can you recommend command line tools for these kind of tasks? is one of you willing and able to show me some examples and teach me further?

    Read the article

  • Sign E-Business Suite JAR Files Now

    - by Steven Chan (Oracle Development)
    Oracle E-Business Suite uses Java, notably for running Forms-based content via the Java Runtime Environment (JRE) browser plug-in.  The default security settings for the JRE plug-in are expected to become more stringent over time.  To prepare for upcoming changes to Java security, all EBS 11i, 12.0, 12.1, and 12.2 system administrators must follow the procedures documented here: Enhanced Signing of Oracle E-Business Suite JAR Files (Note 1591073.1 ) More information about Java security is available here: Security of the Java Platform Getting help If you have questions about Java Security, please log a Service Request with Java Support. If you need assistance with the steps for signing EBS JAR files, please log a Service Request against the "Oracle Applications Technology Stack (TXK)" > "Java."

    Read the article

  • Where Can You Find OpenWorld 2013 Presentations?

    - by Steven Chan (Oracle Development)
    Presentations for OpenWorld 2013 sessions are available for approximately six months (until ~March 2014).  You should download presentation materials now, while they're still available: OpenWorld 2013 Course Catalog If a search engine brought you here:  this blog is maintained by E-Business Suite Development, not the OpenWorld team. Questions about OpenWorld content can be directed to the OpenWorld team here. Related Articles E-Business Suite Technology Sessions at OpenWorld 2013

    Read the article

  • Print screen key can no longer select a region to capture

    - by Steven Sproat
    After upgrading from 11.04 to 11.10, I've noticed that the "Take Screenshot" application used to be launched when I'd hit print screen. Now it automatically captures the entire screen. In 11.04 it would pop up the "take screenshot" application which allows me to capture a rectangular region of the screen. Can this be reverted? I never want to capture the whole screen, only portions of it, which means manually cropping out that section in GIMP with this changed behaviour. Cheers.

    Read the article

  • screen saver issue

    - by Steven
    When i leave my pc alone for while the screens turns black which is fine, when i return and move my mouse it comes back on but my second screen stays black and my first screen has a blue overlay over the top of the unlock screen. I believe this is to do with my dual screens on gts450. screen 1 is 1920*1080 screen 2 is 1024*768 the blue over lay is on screen one and looks to be the size of screen 2 I can out the password in and press enter and then everything goes back to normal, but how do i fix this issue of a blue overlay stopping me seeing whats on screen.

    Read the article

  • secure boot windows 8 issues it hates ubuntu :(

    - by Steven Brown
    im running into issues with windows 8. ok so i disabled secure boot from my laptop. i tell it to launch from my USB with ubuntu installed on it and it wont boot. just simply light my screen and darken it. iv google the fire out of this and no use so im asking for help. im useing ubuntu 13.04. more details: well i have tryed to boot another OS (zorin) and it hates it too. i dont know why my secure boot wont shut off. if it helps i have a HP 2000.

    Read the article

  • locate the crash code from the crash log in my ip4 device

    - by lu yuan
    How could I locate the crash code from the crash log in my ip4 device? As the crashed thread 0 presents a serial frameworks and main.m, I couldn't locate the accurate code launched this crash and debug it. Any suggestion? Thanks in advance! Incident Identifier: B6BD84B7-CE0A-485D-A877-0FD0F5B75933 CrashReporter Key: b0b97a37f2a1e4911ce2ef34e1793e028463bb67 Hardware Model: iPhone3,1 Process: myApp [11615] Path: /var/mobile/Applications/28AE71F2-36CA-4A87-83D9-07DF2DFE74F1/myApp.app/myApp Identifier: myApp Version: ??? (???) Code Type: ARM (Native) Parent Process: launchd [1] Date/Time: 2012-06-09 21:12:22.792 +0800 OS Version: iPhone OS 5.1 (9B176) Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000b Crashed Thread: 0 Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 libobjc.A.dylib 0x36721f78 0x3671e000 + 16248 1 MapKit 0x34e7ace6 0x34e68000 + 77030 2 CoreFoundation 0x3525f1f4 0x35247000 + 98804 3 Foundation 0x311b6740 0x31112000 + 673600 4 CoreFoundation 0x352d4acc 0x35247000 + 580300 5 CoreFoundation 0x352d4298 0x35247000 + 578200 6 CoreFoundation 0x352d303e 0x35247000 + 573502 7 CoreFoundation 0x3525649e 0x35247000 + 62622 8 CoreFoundation 0x35256366 0x35247000 + 62310 9 GraphicsServices 0x36552432 0x3654e000 + 17458 10 UIKit 0x3234ce76 0x3231b000 + 204406 11 myApp 0x0001bac0 main (main.m:16) 12 myApp 0x0001ba80 start + 32

    Read the article

  • What’s the strategy to recover data during DAO unit test?

    - by Michael Lu
    When I test DAO module in JUnit, an obvious problem is: how to recover testing data in database? For instance, a record should be deleted in both test methods testA() and testB(), that means precondition of both test methods need an existing record to be deleted. Then my strategy is inserting the record in setUp() method to recover data. What’s your better solution? Or your practical idea in such case? Thanks

    Read the article

  • Does Firefox on OS X Lion make use of Full Page Zoom for the touchpad? How to customize behavior?

    - by Steven Lu
    I really like the smooth pinch-zoom of Safari using the touchpad, but the two-finger scroll on Firefox is so much better than the scrolling performance in Safari. So I really like to use Firefox, but then I miss out on two-finger-double-tap to zoom to paragraph width, and the smooth pinch gesture zoom. What I'm wondering is if it is possible to write a Firefox Extension to improve the update rate of the full-page zoom in Firefox that is already functioning via the touchpad pinch gesture. I feel like it is specifically programmed to zoom at certain zoom levels: 100%, 120%, 150% (these are guesses of mine) but I think it would be great if I can get some more control there to make it work more like the zoom functionality in Safari. Also the two-finger-double-tap on a paragraph or element to zoom to it would be really awesome as well. https://developer.mozilla.org/en/Full_page_zoom This seems to indicate (if "full page zoom" is what I think it is) that an extension has the ability to zoom to an arbitrary scale factor, but what remains is to find out if it is possible to obtain or hook the touchpad pinch gesture. Update: I have updated the toolkit.zoomManager.zoomValues option in about:config to include more zoom levels: .3,.5,.67,.8,.9,1,1.01,1.02,1.03,1.04,1.05,1.06,1.07,1.08,1.09,1.1,1.2,1.33,1.5,1.7,2,2.4,3 Notice how I inserted a bunch of entries between 1 and 1.1. But it isn't switching between them any faster (why would it?) so it's less usable than before because of waiting for it to respond fast enough. It's clear that re-rendering the page at a different zoom level requires time and in order for the zoom to be dynamic, some kind of screen capture and scale effect must be performed (which is what Safari does). I guess such a thing is probably doable but I don't think I could pull it off. :-/

    Read the article

  • How to specify a font from javascript?

    - by Steven Lu
    I am trying to customize a view-src bookmarklet for iPad. This one is looking pretty good so far. But I want to make it just a little more readable: The Courier (New) font is a bit ugly even (especially?) on the retina display and I'd prefer any one of DejaVu Sans Mono, Monaco, Lucida Console, Bitstream Vera Sans Mono. I tried to modify the bookmarklet script by adding: pre.style.fontFamily = '"DejaVu Sans Mono", "Lucida Console", Monaco;'; It's not doing the trick. Perhaps prettyprint cancels out my fontFamily setting when it loads. Maybe I can set it at the end of the script somehow...

    Read the article

  • Performing full screen grab in windows

    - by Steven Lu
    I am working an idea that involves getting a full capture of the screen including windows and apps, analyzing it, and then drawing items back onto the screen, as an overlay. I want to learn image processing techniques and I could get lots of data to work with if I can directly access the Windows screen. I could use this to build automation tools the likes of which have never been seen before. More on that later. I have full screen capture working for the most part. HWND hwind = GetDesktopWindow(); HDC hdc = GetDC(hwind); int resx = GetSystemMetrics(SM_CXSCREEN); int resy = GetSystemMetrics(SM_CYSCREEN); int BitsPerPixel = GetDeviceCaps(hdc,BITSPIXEL); HDC hdc2 = CreateCompatibleDC(hdc); BITMAPINFO info; info.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); info.bmiHeader.biWidth = resx; info.bmiHeader.biHeight = resy; info.bmiHeader.biPlanes = 1; info.bmiHeader.biBitCount = BitsPerPixel; info.bmiHeader.biCompression = BI_RGB; void *data; hbitmap = CreateDIBSection(hdc2,&info,DIB_RGB_COLORS,(void**)&data,0,0); SelectObject(hdc2,hbitmap); Once this is done, I can call this repeatedly: BitBlt(hdc2,0,0,resx,resy,hdc,0,0,SRCCOPY); The cleanup code (I have no idea if this is correct): DeleteObject(hbitmap); ReleaseDC(hwind,hdc); if (hdc2) { DeleteDC(hdc2); } Every time BitBlt is called it grabs the screen and saves it in memory I can access thru data. Performance is somewhat satisfactory. BitBlt executes in 50 milliseconds (sometimes as low as 33ms) at 1920x1200x32. What surprises me is that when I switch display mode to 16 bit, 1920x1200x16, either through my graphics settings beforehand, or by using ChangeDisplaySettings, I get a massively improved screen grab time between 1ms and 2ms, which cannot be explained by the factor of two reduction in bit-depth. Using CreateDIBSection (as above) offers a significant speed up when in 16-bit mode, compared to if I set up with CreateCompatibleBitmap (6-7ms/f). Does anybody know why dropping to 16bit causes such a speed increase? Is there any hope for me to grab 32bit at such speeds? if not for the color depth, but for not forcing a change of screen buffer modes and the awful flickering.

    Read the article

  • How to manage transaction for database and file system in jee environment?

    - by Michael Lu
    I store file’s attributes (size, update time…) in database. So the problem is how to manage transaction for database and file. In jee environment, JTA is just able to manage database transaction. In case, updating database is successful but file operation fails, should I write file-rollback method for this? Moreover, file operation in EJB container violates EJB spec. What’s your opinion? Thank!

    Read the article

  • Emulating Button Press Using Kinect/SimpleOpenNI + Processing Depth

    - by Alex Lu
    I am using Kinect with Simple OpenNI and Processing, and I was trying to use the Z position of a hand to emulate a button press. So far when I try it using one hand it works really well, however, when I try to get it to work with a second hand, only one of the hands work. (I know it can be more efficient by moving everything except the fill out of the if statements, but I kept those in there just in case I want to change the sizes or something.) irz and ilz are the initial Z positions of the hands when they are first recognized by onCreateHands and rz and lz are the current Z positions. As of now, the code works fine with one hand, but the other hand will either stay pressed or unpressed. If i comment one of the sections out, it works fine as well. if (rz - irz > 0) { pushStyle(); fill(60); ellipse(rx, ry, 10, 10); popStyle(); rpressed = true; } else { pushStyle(); noFill(); ellipse(rx, ry, 10, 10); popStyle(); rpressed = false; } if (lz - ilz > 0) { pushStyle(); fill(60); ellipse(lx, ly, 10, 10); popStyle(); lpressed = true; } else { pushStyle(); noFill(); ellipse(lx, ly, 10, 10); popStyle(); lpressed = false; } I tried outputting the values of rz - irz and lz - ilz and the numbers range from small negative values to small positive values (around -8 to 8) for lz - ilz. But rz - irz outputs numbers from around 8-30 depending on each time I run it and is never consistent. Also, when I comment out the code for the lz-ilz, the values for rz-irz look just fine and it operates as intended. Is there a reason tracking both Z positions throws off one hand? And is there a way to get it to work? Thanks!

    Read the article

  • About data size filled in the buffer

    - by Bohan Lu
    I need low-latency audio in my project, and I know Android 2.3 supports OpenSL ES. I have read documents and sample code and I decide to use Android simple buffer queue to do the play and record. I now try to write a simple application to do the test. However, I have some questions about recording. If I set the recorder stop when it is recording, how do I know the exact number of bytes filled in the last buffer if it is not filled up ? In 1.1 version, the callback function has some parameters about buffer and its filled data, but there is no such parameters in version 1.0.1. Is there any way to get this information ? Any suggestion would be greatly appreciated !

    Read the article

  • When to call glEnable(GL_FRAMEBUFFER_SRGB)?

    - by Steven Lu
    I have a rendering system where I draw to an FBO with a multisampled renderbuffer, then blit it to another FBO with a texture in order to resolve the samples in order to read off the texture to perform post-processing shading while drawing to the backbuffer (FBO index 0). Now I'd like to get some correct sRGB output... The problem is the behavior of the program is rather inconsistent between when I run it on OS X and Windows and this also changes depending on the machine: On Windows with the Intel HD 3000 it will not apply the sRGB nonlinearity but on my other machine with a Nvidia GTX 670 it does. On the Intel HD 3000 in OS X it will also apply it. So this probably means that I'm not setting my GL_FRAMEBUFFER_SRGB enable state at the right points in the program. However I can't seem to find any tutorials that actually tell me when I ought to enable it, they only ever mention that it's dead easy and comes at no performance cost. I am currently not loading in any textures so I haven't had a need to deal with linearizing their colors yet. To force the program to not simply spit back out the linear color values, what I have tried is simply comment out my glDisable(GL_FRAMEBUFFER_SRGB) line, which effectively means this setting is enabled for the entire pipeline, and I actually redundantly force it back on every frame. I don't know if this is correct or not. It certainly does apply a nonlinearization to the colors but I can't tell if this is getting applied twice (which would be bad). It could apply the gamma as I render to my first FBO. It could do it when I blit the first FBO to the second FBO. Why not? I've gone so far as to take screen shots of my final frame and compare raw pixel color values to the colors I set them to in the program: I set the input color to RGB(1,2,3) and the output is RGB(13,22,28). That seems like quite a lot of color compression at the low end and leads me to question if the gamma is getting applied multiple times. I have just now gone through the sRGB equation and I can verify that the conversion seems to be only applied once as linear 1/255, 2/255, and 3/255 do indeed map to sRGB 13/255, 22/255, and 28/255 using the equation 1.055*C^(1/2.4)+0.055. Given that the expansion is so large for these low color values it really should be obvious if the sRGB color transform is getting applied more than once. So, I still haven't determined what the right thing to do is. does glEnable(GL_FRAMEBUFFER_SRGB) only apply to the final framebuffer values, in which case I can just set this during my GL init routine and forget about it hereafter?

    Read the article

  • How to make multiple windows using Win32 API

    - by Steven Lu
    I see plenty of tutorials and articles showing me how to make a simple windows program, which is great but none of them show me how to make multiple windows. Right now I have working code that creates and draws a layered window and I can blit stuff using GDI to draw anything I want on it, drag it around, even make it transparent, etc. But I wanted a second rectangular area that I can draw to, drag around, etc. In other words, a second window. Probably want it to be a child window. Question is, how do I make it? Also, if anybody knows any good resources (online preferably) like articles or tutorials for window management in the Windows API, please share.

    Read the article

  • Using unions to simplify casts

    - by Steven Lu
    I realize that what I am trying to do isn't safe. But I am just doing some testing and image processing so my focus here is on speed. Right now this code gives me the corresponding bytes for a 32-bit pixel value type. struct Pixel { unsigned char b,g,r,a; }; I wanted to check if I have a pixel that is under a certain value (e.g. r, g, b <= 0x10). I figured I wanted to just conditional-test the bit-and of the bits of the pixel with 0x00E0E0E0 (I could have wrong endianness here) to get the dark pixels. Rather than using this ugly mess (*((uint32_t*)&pixel)) to get the 32-bit unsigned int value, i figured there should be a way for me to set it up so I can just use pixel.i, while keeping the ability to reference the green byte using pixel.g. Can I do this? This won't work: struct Pixel { unsigned char b,g,r,a; }; union Pixel_u { Pixel p; uint32_t bits; }; I would need to edit my existing code to say pixel.p.g to get the green color byte. Same happens if I do this: union Pixel { unsigned char c[4]; uint32_t bits; }; This would work too but I still need to change everything to index into c, which is a bit ugly but I can make it work with a macro if i really needed to.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >