Search Results

Search found 197 results on 8 pages for 'jonny adams'.

Page 1/8 | 1 2 3 4 5 6 7 8  | Next Page >

  • Douglas Adams Describes the Invention of the Ebook [Video]

    - by Jason Fitzpatrick
    In 1993, Douglas Adams–of The Hitch Hikers Guide to the Galaxy fame–lent his creative talent and voice to explaining the invention of the Ebook. The audio segment was produced almost 20 years ago by Adams to both promote his own work in digital format and the work of early ebook publisher Voyager Expanded Books. You may notice Adams refers to their product as a PowerBook, a name they kept until they heard Apple would be releasing a laptop with the same name (from then on the product was simply referred to as Expanded Books). The thoroughly modern video accompanying Adams concise and entertaining description of book history is an animation courtesy of U.K. designer Gavin Edwards, which he submitted to a contest hosted by The Literary Platform intended to match a clever animation with Adam’s monologue. [via Neatorama] HTG Explains: Why Linux Doesn’t Need Defragmenting How to Convert News Feeds to Ebooks with Calibre How To Customize Your Wallpaper with Google Image Searches, RSS Feeds, and More

    Read the article

  • Twitter Typeahead only shows only 5 results

    - by user3685388
    I'm using the Twitter Typeahead version 0.10.2 autocomplete but I'm only receiving 5 results from my JSON result set. I can have 20 or more results but only 5 are shown. What am I doing wrong? var engine = new Bloodhound({ name: "blackboard-names", prefetch: { url: "../CFC/Login.cfc?method=Search&returnformat=json&term=%QUERY", ajax: { contentType: "json", cache: false } }, remote: { url: "../CFC/Login.cfc?method=Search&returnformat=json&term=%QUERY", ajax: { contentType: "json", cache: false }, }, datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'), queryTokenizer: Bloodhound.tokenizers.whitespace }); var promise = engine.initialize(); promise .done(function() { console.log("done"); }) .fail(function() { console.log("fail"); }); $("#Impersonate").typeahead({ minLength: 2, highlight: true}, { name: "blackboard-names", displayKey: 'value', source: engine.ttAdapter() }).bind("typeahead:selected", function(obj, datum, name) { console.log(obj, datum, name); alert(datum.id); }); Data: [ { "id": "1", "value": "Adams, Abigail", "tokens": [ "Adams", "A", "Ad", "Ada", "Abigail", "A", "Ab", "Abi" ] }, { "id": "2", "value": "Adams, Alan", "tokens": [ "Adams", "A", "Ad", "Ada", "Alan", "A", "Al", "Ala" ] }, { "id": "3", "value": "Adams, Alison", "tokens": [ "Adams", "A", "Ad", "Ada", "Alison", "A", "Al", "Ali" ] }, { "id": "4", "value": "Adams, Amber", "tokens": [ "Adams", "A", "Ad", "Ada", "Amber", "A", "Am", "Amb" ] }, { "id": "5", "value": "Adams, Amelia", "tokens": [ "Adams", "A", "Ad", "Ada", "Amelia", "A", "Am", "Ame" ] }, { "id": "6", "value": "Adams, Arik", "tokens": [ "Adams", "A", "Ad", "Ada", "Arik", "A", "Ar", "Ari" ] }, { "id": "7", "value": "Adams, Ashele", "tokens": [ "Adams", "A", "Ad", "Ada", "Ashele", "A", "As", "Ash" ] }, { "id": "8", "value": "Adams, Brady", "tokens": [ "Adams", "A", "Ad", "Ada", "Brady", "B", "Br", "Bra" ] }, { "id": "9", "value": "Adams, Brandon", "tokens": [ "Adams", "A", "Ad", "Ada", "Brandon", "B", "Br", "Bra" ] } ]

    Read the article

  • Don’t be a dinosaur. Use Calendar Tree!

    - by jamiet
    If one spends long enough in my company one will likely eventually have to listen to me bark on about subscribable calendars. I was banging on about them way back in 2009, I’ve cajoled SQLBits into providing one, provided one myself for the World Cup, and opined that they could be transformative for the delivery of BI. I believe subscribable calendars can change the world but have never been good at elucidating why I thought so, for that reason I always direct people to read a blog by Scott Adams (yes, the guy who draws Dilbert) entitled Calendar as Filter. In that blog post Scott writes: I think the family calendar is the organizing principle into which all external information should flow. I want the kids' school schedules for sports and plays and even lunch choices to automatically flow into the home calendar. Everything you do has a time dimension. If you are looking for a new home, the open houses are on certain dates, and certain houses that fit your needs are open at certain times. If you are shopping for some particular good, you often need to know the store hours. Your calendar needs to know your shopping list and preferences so it can suggest good times to do certain things I think the biggest software revolution of the future is that the calendar will be the organizing filter for most of the information flowing into your life. You think you are bombarded with too much information every day, but in reality it is just the timing of the information that is wrong. Once the calendar becomes the organizing paradigm and filter, it won't seem as if there is so much. I wholly agree and hence was delighted to discover (via the Hanselminutes podcast) that Scott has a startup called CalendarTree.com whose raison d’etre is to solve this very problem. What better way to describe a Scott Adams startup than with a Scott Adams comic: I implore you to check out Calendar Tree and make the world a tiny bit better by using it to share any information that has a time dimension to it. Don’t be a dinosaur, use Calendar tree! @Jamiet

    Read the article

  • creating Object equality "HashMap" in ActionScript3 as java HashMap

    - by jason
    const jonny1 : Person = new Person("jonny", 26); const jonny2 : Person = new Person("jonny", 26); const table : Dictionary = new Dictionary(); table[jonny1] = "That's me"; trace(table[jonny1]) // traces: "That's me" trace(table[jonny2]) // traces: undefined. But I want use Dictionary like this way: trace(table[jonny2]) // traces: "That's me". in a word, I want implements a data-structure works like HashMap in java

    Read the article

  • load domain specific content

    - by wayne
    Let's say I have an app sitting at myapp.com The app has clients or users that are situated here myapp.com/jonny myapp.com/sally I want to allow users to point their own domain to my server (A record) and load their specific content. No redirects or anything. jonnysapp.com -> myapp.com/jonny So somehow my server needs to detect where the request is coming from and set the client... correct?

    Read the article

  • deriving from NSTabViewItem

    - by Jonny
    I'm writing a Cocoa app. One dialog has 3 tabs, some of the tabs needs more loading time, so I want to load them lazily. Since each Tab is a NSTabViewItem class, so I'm trying to derive from it and overriding its view property. In the view getter method, I use a ViewController to load a view and returns out. In Debugging, I found NSTabViewItem -view method is get called correctly, but after that NSTabView tries to set Initial FirstResponder and crashed with message: * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'In -[NSTabViewItem setInitialFirstResponder:], the first responder must descend from the tab view item's view. (Item: Invalid responder: )' I tried to override the -initialFirstResponder method to return a sub-view of my loaded view, but it still crashes the same place. does anyone know how to get it work correctly? Also is it correct way to do this by deriving the NSTabViewItem? thanks! -Jonny

    Read the article

  • Mac OS X Server Configure DHCP Options 66 and 67

    - by Paul Adams
    I need to configure Mountain Lion (10.8.2) OS X Server BOOTP to provide DHCP options 66 and 67 to provide PXE booting for PCs on my network. I have tried following the bootpd MAN pages, but they are not specific enough. I have also read conflicting information on the net, but nothing definitive for Mountain Lion DHCP. From bootpd man page: bootpd has a built-in type conversion table for many more options, mostly those specified in RFC 2132, and will try to convert from whatever type the option appears in the property list to the binary, packet format. For example, if bootpd knows that the type of the option is an IP address or list of IP addresses, it converts from the string form of the IP address to the binary, network byte order numeric value. If the type of the option is a numeric value, it converts from string, integer, or boolean, to the proper sized, network byte-order numeric value. Regardless of whether bootpd knows the type of the option or not, you can always specify the DHCP option using the data property list type <key>dhcp_option_128</key> <data> AAqV1Tzo </data> My TFTP server is 172.16.152.20 and the bootfile is pxelinux.0 I have edited /etc/bootpd.plist and added the following to the subnet dict: <key>dhcp_option_66</key> <data> LW4gLWUgrBCYFAo= </data> <key>dhcp_option_67</key> <data> LW4gLWUgcHhlbGludXguMAo= </data> According to the man page, the data elements are supposed to be Base64 encoded, but no matter what I try, I cannot get PXE clients to boot. I have tried encoding 172.16.152.20 using various methods: echo "172.16.152.20" | openssl enc -base64 returns MTcyLjE2LjE1Mi4yMAo= DHCP Option Code Utility (http://mac.softpedia.com/get/Internet-Utilities/DHCP-Option-Code-Utility.shtml) generating a string from 172.16.152.20 yields: LW4gLWUgMTcyLjE2LjE1Mi4yMAo= (used in the above example) DHCP Option Code Utility generating an IP Addresss from 172.16.152.20 yields: LW4gLWUgrBCYFAo= Encoding pxelinux.0 with the above methods likewise yields different encodings. I have tried using all three methods of encoding the data elements, but nothing seems to work i.e. my PXE boot clients do not get directed to my TFTP server. Can anyone help? Regards, Paul Adams.

    Read the article

  • Programming concepts taken from the arts and humanities

    - by Joey Adams
    After reading Paul Graham's essay Hackers and Painters and Joel Spolsky's Advice for Computer Science College Students, I think I've finally gotten it through my thick skull that I should not be loath to work hard in academic courses that aren't "programming" or "computer science" courses. To quote the former: I've found that the best sources of ideas are not the other fields that have the word "computer" in their names, but the other fields inhabited by makers. Painting has been a much richer source of ideas than the theory of computation. — Paul Graham, "Hackers and Painters" There are certainly other, much stronger reasons to work hard in the "boring" classes. However, it'd also be neat to know that these classes may someday inspire me in programming. My question is: what are some specific examples where ideas from literature, art, humanities, philosophy, and other fields made their way into programming? In particular, ideas that weren't obviously applied the way they were meant to (like most math and domain-specific knowledge), but instead gave utterance or inspiration to a program's design and choice of names. Good examples: The term endian comes from Gulliver's Travels by Tom Swift (see here), where it refers to the trivial matter of which side people crack open their eggs. The terms journal and transaction refer to nearly identical concepts in both filesystem design and double-entry bookkeeping (financial accounting). mkfs.ext2 even says: Writing superblocks and filesystem accounting information: done Off-topic: Learning to write English well is important, as it enables a programmer to document and evangelize his/her software, as well as appear competent to other programmers online. Trigonometry is used in 2D and 3D games to implement rotation and direction aspects. Knowing finance will come in handy if you want to write an accounting package. Knowing XYZ will come in handy if you want to write an XYZ package. Arguably on-topic: The Monad class in Haskell is based on a concept by the same name from category theory. Actually, Monads in Haskell are monads in the category of Haskell types and functions. Whatever that means...

    Read the article

  • What is the purpose of the "non-endorsement clause" in the New BSD license?

    - by Joey Adams
    Note: This question is not about the "obnoxious BSD advertising clause". The New BSD license does not contain that clause, and is compatible with the GPL. I'm trying to pick between the New BSD license and the MIT license for my own projects. They are essentially identical, except the BSD license contains the following clause: Neither the name of the <organization> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. Why would anyone want to use this clause? What's wrong with gaining some notoriety if someone makes a well-known piece of software using your code? Also, wouldn't dictating what users can and cannot do with your given name fall outside the domain of intellectual property?

    Read the article

  • Is there such a thing as a Google Result Set simulator?

    - by Dave Adams
    I am always making tweaks to my site, be it in the .htaccess file, some new SEO plugin, different types of content or whatever. For all these changes, I would really like to be able test it immediately and see if the change had any positive or negative effect. I am just wondering if there was some way of doing immediate testing using some simulator instead of having to wait for Google to discover and index it - which could take a long time.

    Read the article

  • Closest location - Heapify or Build-heap

    - by Trevor Adams
    So lets say we have a set of gps data points and your current location. If asked to give the closest point to your current location we can utilize a heap with the distance being the key. Now if we update the current location, I suspect that only a few of the keys will change enough to violate the heap property. Would it be more efficient to rebuild the heap after recalculating the keys or to run heapify (assuming that only a few of the keys have changed enough). It is assumed that we don't jump around with the new location (new current location is close to the last current location).

    Read the article

  • Working for free?

    - by Jonny
    I came across this article Work for Free that got me thinking. The goal of every employer is to gain more value from workers than the firm pays out in wages; otherwise, there is no growth, no advance, and no advantage for the employer. Conversely, the goal of every employee should be to contribute more to the firm than he or she receives in wages, and thereby provide a solid rationale for receiving raises and advancement in the firm. I don't need to tell you that the refusenik didn't last long in this job. In contrast, here is a story from last week. My phone rang. It was the employment division of a major university. The man on the phone was inquiring about the performance of a person who did some site work on Mises.org last year. I was able to tell him about a remarkable young man who swung into action during a crisis, and how he worked three 19-hour days, three days in a row, how he learned new software with diligence, how he kept his cool, how he navigated his way with grace and expertise amidst some 80 different third-party plug-ins and databases, how he saw his way around the inevitable problems, how he assumed responsibility for the results, and much more. What I didn't tell the interviewer was that this person did all this without asking for any payment. Did that fact influence my report on his performance? I'm not entirely sure, but the interviewer probably sensed in my voice my sense of awe toward what this person had done for the Mises Institute. The interviewer told me that he had written down 15 different questions to ask me but that I had answered them all already in the course of my monologue, and that he was thrilled to hear all these specifics. The person was offered the job. He had done a very wise thing; he had earned a devotee for life. The harder the economic times, the more employers need to know what they are getting when they hire someone. The job applications pour in by the buckets, all padded with degrees and made to look as impressive as possible. It's all just paper. What matters today is what a person can do for a firm. The resume becomes pro forma but not decisive under these conditions. But for a former boss or manager to rave about you to a potential employer? That's worth everything. What do you think? Has anyone here worked for free? If so, has it benefited you in any way? Why should(nt) you work for free (presuming you have the money from other means to keep you going)? Can you share your experience? Me, I am taking a year out of college and haven't gotten a degree yet so that's probably why most of my job applications are getting ignored. So im thinking about working for free for the experience?

    Read the article

  • Extreme Programming Dying? [closed]

    - by jonny
    Is Extreme Programming Dying? I've been reviewing my fellow students reports on extreme programming.(I am a student myself) Some students are claiming that extreme programming lacks in empirical evidences, and is relevantly new, hence lacking in empirical evidence. XP is already 13 years old it should be considered as new, from my perspective. I guess the practices of XP has been tweaked and used in newer methodologies such as scrum. What are your point of view on this, do you guys think XP is Dying?

    Read the article

  • Cannot install gnome extensions from gnome site. No switch appearing in firefox or chrome

    - by Andrew James Adams
    I have installed ubuntu 12.04, and installed gnome3 on my system. I am attempting to download the user theme extensions from extensions.gnome.org, but I can't see this "switch" everyone's talking about. I've tried both chromium and firefox browsers on the site. I found a similar subject here at askUbuntu. I followed the directions but I got a warning about gnome common dependencies. I installed gnome-extensions-common without an error but I still cannot install user-themes, and I can't find the mysterious "switch". Any ideas? Thanks in advance.

    Read the article

  • Credentials Not Passed From SharePoint WebPart to WCF Service

    - by Jacob L. Adams
    I have spent several hours trying to resolve this problem, so I wanted to share my findings in case someone else might have the same problem. I had a web part which was calling out to a WCF service on another server to get some data. The code I had was essentially using System.ServiceModel; using System.ServiceModel.Channels; ... var binding = new CustomBinding( new HttpTransportBindingElement { AuthenticationScheme = System.Net.AuthenticationSchemes.Negotiate } ); var endpoint = new EndpointAddress(new Uri("http://someotherserver/someotherservice.svc")); var someOtherService = new SomeOtherServiceClient(binding, endpoint); string result = someOtherService.SomeServiceMethod(); This code would run fine on my local instance of SharePoint 2010 (Windows 7 64-bit). However, when I would deploy it to the testing environment, I would get a yellow screen of death  with the following message: The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Negotiate,NTLM'. I then went through the usual checklist of Windows Authentication problems: Check WCF bindings to make sure authentication is set correctly Check IIS to make sure Windows Authentication is enabled and anonymous authentication was disabled. Check to make sure the SharePoint server trusted the server hosting the WCF service Verify that the account that the IIS application pool is running under has access to the other server I then spend lot of time digging into really obscure IIS, machine.config, and trust settings (as well of lots of time on Google and StackOverflow). Eventually I stumbled upon a blog post by Todd Bleeker describing how to run code under the application pool identity. Wait, what? The code is not already running under application pool identity? Another quick Google search led me to an MSDN page that imply that SharePoint indeed does not run under the app pool credentials by default. Instead SPSecurity.RunWithElevatedPrivileges is needed to run code under the app pool identity. Therefore, changing my code to the following worked seamlessly using System.ServiceModel; using System.ServiceModel.Channels; using Microsoft.SharePoint; ... var binding = new CustomBinding( new HttpTransportBindingElement { AuthenticationScheme = System.Net.AuthenticationSchemes.Negotiate } ); var endpoint = new EndpointAddress(new Uri("http://someotherserver/someotherservice.svc")); var someOtherService = new SomeOtherServiceClient(binding, endpoint); string result; SPSecurity.RunWithElevatedPrivileges(()=> { result = someOtherService.SomeServiceMethod(); });

    Read the article

  • Log oddities: 404s for client-garbled image URLs

    - by Chris Adams
    I've noticed some odd 404s which appear to be broken URL rewriting code: Our deep zoom view generates images URLs like this: /media/204/service/dzi/1/1_files/7/0_0.jpg I see some - well under <1% - requests for slightly altered URLs: /media/204/s/rvice/d/i/1/1_files/7/0_0.jpg These requests come from IP addresses all over the world (US, Canada, China, Russia, India, Israel, etc.), desktop and mobile users with multiple user-agents (Chrome, IE, Firefox, Mobile Safari, etc.), and there is plenty of normal activity in the same session so I'm assuming this is either widespread malware or some broken proxy service. I have not seen them from anything other than images, which suggests that this may be some sort of content filter. Has anyone else seen this? My CDN logs show the first request on June 8th ramping up from several dozen to several hundred per day.

    Read the article

  • Image Magic Make Fails - PHP extension

    - by Kyle Adams
    So I was doing the following: sudo apt-get install php-pear php5-dev sudo apt-get install imagemagick libmagickwand-dev sudo pecl install imagick It all works till I get the error: make: *** [imagick_class.lo] Error 1 ERROR: `make' failed Which according to blog posts and forms is because of libmagick9-dev, how ever when trying to install this I get: sudo apt-get install libmagick9-dev Reading package lists... Done Building dependency tree Reading state information... Done Package libmagick9-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: graphicsmagick-libmagick-dev-compat E: Package 'libmagick9-dev' has no installation candidate Thoughts?

    Read the article

  • Canonicals with differing content

    - by Jimbo Jonny
    Interesting conundrum here with canonicals. Lets say I have a site with a "verified" system where other websites can become so and so "verified". Their url to send people to to confirm verification is something like "blah.com/verify/company1" and "blah.com/verify/company2". But logically "blah.com/verify" itself is not verifying anyone in particular, so it redirects to the signup form to get verified, at "blah.com/verify/register" As far as the actual companies registered, I figure it doesn't make sense to index every individual url with only the tiny difference of which company name it's saying yay or nay to being verified, so canonicals could come in handy on those pages to condense the indexing. Yet making "blah.com/verify" the canonical "hub" doesn't work well because it's a signup form, not a verification page, so technically has quite different content from the various verification pages themselves. But at the same time it's a bit unfair to choose 1 company to point all the canonical benefits too to use that as the "hub", yet a bit wasteful to have google index every individual verification page and spread out all that linkjuice. Basically, I'm just looking for advice, what's best for this from a search engine standpoint?

    Read the article

  • College for Game Development [closed]

    - by Cole Adams
    I am currently a Freshman Computer Science Major at Samford University, but I am realizing that the actual field I want to get into is Game Development. I go to all of these classes that are supposed to make you well rounded that have nothing to do with what I want to do and frankly, after 18 years of schooling, I am sick of having to be in classes like that. I want to go to a Game Design/Development school where that is the priority and I am not overburdened with useless classes. At this point I am so tired of the Samford classes already that I am heavily considering taking next semester off and just getting a job and focusing on learning programming on my own or something like that. My question is what would be some good schools to apply to for enrollment in 2013 and what does it take to get into these schools? Thanks in advanced.

    Read the article

  • Windows 7+ desktop apps - what's the best UI toolkit for a new project?

    - by Chris Adams
    I'm trying to make a decision for a new Windows desktop app: what to use for the UI. (This is a desktop app that needs to have compatibility with Windows 7. It won't be distributed on the Windows Store.) This application is going to be cross-platform. I intend on writing the core in C++, and using each platform's native UI toolkit. I feel this is preferable to using a cross-platform toolkit like Qt, as it allows me to keep the native look and feel of each platform. On the Windows side, the UI situation isn't exactly clear. I'm getting the feeling that Microsoft is slowly abandoning .NET, particularly as their preferred toolkit for desktop apps. Indeed, the Getting Started chapter for Windows 7, as well as the rest of Microsoft's documentation, seems to be more suited for C++. I have a few options here: C# with WPF - This sesms like this might be the best Microsoft has to offer for Windows 7 desktop apps, even if it isn't their "preferred" toolkit. I'd need to use P/Invoke to call my C++ code. C++ with Direct2D - This is what Microsoft used in one of their examples. This feels like it's too low-level. Part of the appeal of a higher-level UI toolkit is the consistency with the native look and feel of the platform, so doing this would just feel strange. C++ with a third-party UI toolkit, like Qt There might be some other options I'm missing, which I'd love to hear about. So, if you were starting a new Windows 7+ desktop app today, what would you use?

    Read the article

  • What makes a project big?

    - by Jonny
    Just out of curiosity what's the difference between a small, medium and large size project? Is it measured by lines of code or complexity or what? Im building a bartering system and so far have about 1000 lines of code for login/registration. Even though there's lots of LOC i wouldnt consider it a big project because its not that complex though this is my first project so im not sure. How is it measured?

    Read the article

  • Is 'Protection' an acceptable Java class name

    - by jonny
    This comes from a closed thread at stack overflow, where there are already some useful answers, though a commenter suggested I post here. I hope this is ok! I'm trying my best to write good readable, code, but often have doubts in my work! I'm creating some code to check the status of some protected software, and have created a class which has methods to check whether the software in use is licensed (there is a separate Licensing class). I've named the class 'Protection', which is currently accessed, via the creation of an appProtect object. The methods in the class allow to check a number of things about the application, in order to confirm that it is in fact licensed for use. Is 'Protection' an acceptable name for such a class? I read somewhere that if you have to think to long in names of methods, classes, objects etc, then perhaps you may not be coding in an Object Oriented way. I've spent a lot of time thinking about this before making this post, which has lead me to doubt the suitability of the name! In creating (and proof reading) this post, I'm starting to seriously doubt my work so far. I'm also thinking I should probably rename the object to applicationProtection rather than appProtect (though am open to any comments on this too?). I'm posting non the less, in the hope that I'll learn something from others views/opinions, even if they're simply confirming I've "done it wrong"!

    Read the article

  • Probably the dumbest and poitnless question to ask

    - by Anthony Adams
    How can I dual boot this with Windows 8? I've tried to burn to a CD, never have a enough memory or the program tells me that the CD isn't writable. So, I want to run from USB. But I never understood how to run the program from the USB, how to download it on to the USB and how to set up the computer to run the USB before the Hard Drive. I am a beginner trying to learn Linux, if any one could help a newbie like me, that would be much appreciated.

    Read the article

  • Cocoa nextEventMatchingMask not receiving NSMouseMoved event

    - by Jonny
    Hello, I created a local event loop and showed up a borderless window (derived from NSPanel), I found in the event loop there's no NSMouseMoved event received, although I can receive Mouse button down/up events. What should I do to get the NSMouseMoved events? I found making the float window as key window can receive the NSMouseMoved events, but I don't want to change key window. And it appears this is possible, because I found after clicking the test App Icon in System Dock Bar, I can receive the mousemoved events, and the key window/mainwindow are unchanged. Here's the my test code: (Create a Cocoa App project names FloatWindowTest, and put a button to link it with the onClick: IBAction). Thanks in advance! -Jonny #import "FloatWindowTestAppDelegate.h" @interface FloatWindow : NSPanel @end @interface FloatWindowContentView : NSView @end @implementation FloatWindowTestAppDelegate @synthesize window; - (void)delayedAction:(id)sender { // What does this function do? // 1. create a float window // 2. create a local event loop // 3. print out the events got from nextEventMatchingMask. // 4. send it to float window. // What is the problem? // In local event loop, althrough the event mask has set NSMouseMovedMask // there's no mouse moved messages received. // FloatWindow* floatWindow = [[FloatWindow alloc] init]; NSEvent* event = [NSApp currentEvent]; NSPoint screenOrigin = [[self window] convertBaseToScreen:[event locationInWindow]]; [floatWindow setFrameTopLeftPoint:screenOrigin]; [floatWindow orderFront:nil]; //Making the float window as Key window will work, however //change active window is not anticipated. //[floatWindow makeKeyAndOrderFront:nil]; BOOL done = NO; while (!done) { NSAutoreleasePool* pool = [NSAutoreleasePool new]; NSUInteger eventMask = NSLeftMouseDownMask| NSLeftMouseUpMask| NSMouseMovedMask| NSMouseEnteredMask| NSMouseExitedMask| NSLeftMouseDraggedMask; NSEvent* event = [NSApp nextEventMatchingMask:eventMask untilDate:[NSDate distantFuture] inMode:NSDefaultRunLoopMode dequeue:YES]; //why I cannot get NSMouseMoved event?? NSLog(@"new event %@", [event description]); [floatWindow sendEvent:event]; [pool drain]; } [floatWindow release]; return; } -(IBAction)onClick:(id)sender { //Tried to postpone the local event loop //after return from button's mouse tracking loop. //but not fixes this problem. [[NSRunLoop currentRunLoop] performSelector:@selector(delayedAction:) target:self argument:nil order:0 modes:[NSArray arrayWithObject:NSDefaultRunLoopMode]]; } @end @implementation FloatWindow - (id)init { NSRect contentRect = NSMakeRect(200,300,200,300); self = [super initWithContentRect:contentRect styleMask:NSTitledWindowMask backing:NSBackingStoreBuffered defer:YES]; if (self) { [self setLevel:NSFloatingWindowLevel]; NSRect frameRect = [self frameRectForContentRect:contentRect]; NSView* view = [[[FloatWindowContentView alloc] initWithFrame:frameRect] autorelease]; [self setContentView:view]; [self setAcceptsMouseMovedEvents:YES]; [self setIgnoresMouseEvents:NO]; } return self; } - (BOOL)becomesKeyOnlyIfNeeded { return YES; } - (void)becomeMainWindow { NSLog(@"becomeMainWindow"); [super becomeMainWindow]; } - (void)becomeKeyWindow { NSLog(@"becomeKeyWindow"); [super becomeKeyWindow]; } @end @implementation FloatWindowContentView - (BOOL)acceptsFirstMouse:(NSEvent *)theEvent { return YES; } - (BOOL)acceptsFirstResponder { return YES; } - (id)initWithFrame:(NSRect)frameRect { self = [super initWithFrame:frameRect]; if (self) { NSTrackingArea* area; area = [[NSTrackingArea alloc] initWithRect:frameRect options:NSTrackingActiveAlways| NSTrackingMouseMoved| NSTrackingMouseEnteredAndExited owner:self userInfo:nil]; [self addTrackingArea:area]; [area release]; } return self; } - (void)drawRect:(NSRect)rect { [[NSColor redColor] set]; NSRectFill([self bounds]); } - (BOOL)becomeFirstResponder { NSLog(@"becomeFirstResponder"); return [super becomeFirstResponder]; } @end

    Read the article

  • Getting client denied when accessing a wsgi graphite script

    - by Dr BDO Adams
    I'm trying to set up graphite on my Mac OS X 10.7 lion, i've set up apache to call the python graphite script via WSGI, but when i try to access it, i get a forbiden from apache and in the error log. "client denied by server configuration: /opt/graphite/webapp/graphite.wsgi" I've checked that the scripts location is allowed in httpd.conf, and the permissions of the file, but they seem correct. What do i have to do to get access. Below is the httpd.conf, which is nearly the graphite example. <IfModule !wsgi_module.c> LoadModule wsgi_module modules/mod_wsgi.so </IfModule> WSGISocketPrefix /usr/local/apache/run/wigs <VirtualHost _default_:*> ServerName graphite DocumentRoot "/opt/graphite/webapp" ErrorLog /opt/graphite/storage/log/webapp/error.log CustomLog /opt/graphite/storage/log/webapp/access.log common WSGIDaemonProcess graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120 WSGIProcessGroup graphite WSGIApplicationGroup %{GLOBAL} WSGIImportScript /opt/graphite/conf/graphite.wsgi process-group=graphite application-group=%{GLOBAL} # XXX You will need to create this file! There is a graphite.wsgi.example # file in this directory that you can safely use, just copy it to graphite.wgsi WSGIScriptAlias / /opt/graphite/webapp/graphite.wsgi Alias /content/ /opt/graphite/webapp/content/ <Location "/content/"> SetHandler None </Location> # XXX In order for the django admin site media to work you Alias /media/ "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site- packages/django/contrib/admin/media/" <Location "/media/"> SetHandler None </Location> # The graphite.wsgi file has to be accessible by apache. <Directory "/opt/graphite/webapp/"> Options +ExecCGI Order deny,allow Allow from all </Directory> </VirtualHost> Can you help?

    Read the article

1 2 3 4 5 6 7 8  | Next Page >