Daily Archives

Articles indexed Saturday March 13 2010

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

  • When does an asio timer go out of scope?

    - by ApplePieIsGood
    What I mean is, let's say you do an async_wait on an asio timer and bind the update to a function that takes a reference to a type T. Let's say you created the T initially on the stack before passing it to async_wait. At the end of that async_wait, it calls async_wait itself, renewing the timer over and over. Does that stack allocated type T stay alive until the first time the timer doesn't renew itself, or after the first invocation of the function will the T go out of scope?

    Read the article

  • Why is there no IronPerl (Perl for .Net)?

    - by Renaud Bompuis
    I'm a bit disappointed that there doesn't seem to be any effort to make Perl a first-class citizen of the .Net world. I've read a few 'reasons' in the past but I don't see why they can't be overcome (different garbage collectors, hard-to-parse syntax, part of CPAN modules couldn't be ported, different communities, ...). Activestate has a Perl.Net product but it's a hack (in the good sense) around a standard interpreter and some syntactic sugar to interoperate with .Net assemblies. A few years ago they stopped they visual studio integration of Perl citing lack of interest. That was a while ago, before all the changes to .Net to make it more 'dynamic'. Am I the only one who yearns for IronPerl?

    Read the article

  • Issues with ASP.NET via Apache/mod_mono on Ubuntu.

    - by Matthew Scharley
    I run an Ubuntu test server, and my deployment system is also Ubuntu. I've recently been trying to get ASP.NET to work on my test server so that we can take it live. I managed to get it installed, and configured properly, and my application is installed and running, but I can't get anything to work. The error I keep receiving is below, if anyone has any clue what might be going on, it would be greatly appreciated. Server Error in '/' Application Standard output has not been redirected or process has not been started. Description: HTTP 500. Error processing request. Stack Trace: System.InvalidOperationException: Standard output has not been redirected or process has not been started. at System.Diagnostics.Process.CancelErrorRead () [0x00000] at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:CancelErrorRead () at Mono.CSharp.CSharpCodeCompiler.CompileFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00000] at Mono.CSharp.CSharpCodeCompiler.CompileAssemblyFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00000] at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00000] at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath, System.CodeDom.Compiler.CompilerParameters options) [0x00000] at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath) [0x00000] at System.Web.Compilation.BuildManager.BuildAssembly (System.Web.VirtualPath virtualPath) [0x00000] at System.Web.Compilation.BuildManager.GetCompiledType (System.String virtualPath) [0x00000] at System.Web.HttpApplicationFactory.InitType (System.Web.HttpContext context) [0x00000] Version information: Mono Version: 2.0.50727.42; ASP.NET Version: 2.0.50727.42 Apache version String: Apache/2.2.11 (Ubuntu) mod_mono/2.0 PHP/5.2.6-3ubuntu4.2 with Suhosin-Patch Server at dev Port 80 PS: I had to add three DLL's to the /bin directory in my application, copying them from Windows because I couldn't find them in any of Mono's packages. This might or might not be causing problems, I don't know. The list that I had to add is: System.Web.Abstractions System.Web.Routing System.Web.Mvc

    Read the article

  • Virtual Directory or Application in IIS 7?

    - by user25164
    I am new to Windows 2008 and IIS 7. With the default installation, IIS 7 has a Default Website. For my application, do I create a new Website outside of Default Website or createa Virtual Directory or Application within the Default Website? Can someone explain the differences? Thank you

    Read the article

  • Tool to modify properties/metadata of a PDF? i.e. Change "Title", "Author"? Sony Reader showing som

    - by Chris W. Rea
    I own a Sony Reader PRS-600 ebook reader. I bought a ton of Manning Publications ebooks (DRM-free) recently. Many of the books are PDFs since not all the ones I wanted are available in epub format. The problem: Some of the PDF books I purchased have incorrect or missing metadata. Making things worse, the Sony Reader only displays the "Title" from the PDF metadata when displaying book titles in the reader's collection of books! The Reader doesn't display the filename. So, even though I have a PDF informatively named "Windows PowerShell In Action.pdf", it shows up as "untitled" in the Reader. Imagine how useful the Reader's list of book titles becomes when many are just "untitled" or "unnamed document" ! Yes, it is maddening. So – short of expecting the publisher to fix the files or Sony to add a filename-based list instead, I'm looking for a way to fix the PDF metadata. I can view the metadata with Adobe Reader, but it doesn't permit modification of the properties. Leading to: Question: Is there a tool – free, or cheap – and either for PC or Mac, that can modify the properties / metadata of a DRM-free PDF document? I want to correct "Title" and "Author" fields, specifically.

    Read the article

  • Problem with Expression Blend crashing

    - by Judi
    I've recently installed Microsoft Expression Blend 3. I've started the program but I now get this message Microsoft Expression Blend 3 has stopped working. A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available Do I have to reinstall the whole program again? Is this a fault with the new Expression Blend 3 application?

    Read the article

  • Worst security hole you've seen?

    - by Si
    Subject says it all, probably a good idea to keep details basic to protect the guilty. FWIW, here's a question about what to do if you find a security hole, and another with some useful answers if a company doesn't (seem to) respond.

    Read the article

  • SELECT SUM returns a row when there are no records

    - by Jose L Martinez-Avial
    Hi, I'm finding some problems with a query that returns the sum of a field from a table for all the records that meet certain conditions. I expected to receive a "No records found' when there were no records, but instead I'm receiving a null result. SQL> SELECT * FROM DUAL WHERE 1=2; no rows selected SQL> SELECT SUM(dummy) FROM DUAL WHERE 1=2; SUM(DUMMY) ---------- SQL> Is there any way to not receive any record in that case?

    Read the article

  • Binding the textDidChange event on a NSTextField to a MacRuby delegate

    - by kolrie
    I have a NSTextField within a Window and I created a very simple MacRuby delegate: class ServerInputDelegate attr_accessor :parent def textDidChange(notification) NSLog notification.inspect parent.filter end end And I have tried setting the control's delegate: I have tried setting the Window and every other object I could think of to this delegate. I have also tried setting it to other delegates (application for instance) and events like applicationDidFinishLaunching are being properly triggered. Is there any trick I am missing in order for this event to be triggered every time the contents of this NSTextField changes?

    Read the article

  • ASP.Net MVC Keeping action parameters between postbacks

    - by Matt
    Say I have a page that display search results. I search for stackoverflow and it returns 5000 results, 10 per page. Now I find myself doing this when building links on that page: <%=Html.ActionLink("Page 1", "Search", new { query=ViewData["query"], page etc..%> <%=Html.ActionLink("Page 2", "Search", new { query=ViewData["query"], page etc..%> <%=Html.ActionLink("Page 3", "Search", new { query=ViewData["query"], page etc..%> <%=Html.ActionLink("Next", "Search", new { query=ViewData["query"], page etc..%> I dont like this, I have to build my links with careful consideration to what was posted previously etc.. What I'd like to do is <%=Html.BuildActionLinkUsingCurrentActionPostData ("Next", "Search", new { Page = 1}); where the anonymous dictionary overrides anything currently set by previous action. Essentially I care about what the previous action parameters were, because I want to reuse, it sounds simple, but start adding sort and loads of advance search options and it starts getting messy. Im probably missing something obvious

    Read the article

  • How to get objects to react to touches in Cocos2D?

    - by Wayfarer
    Alright, so I'm starting to learn more about Coco2D, but I'm kinda frusterated. A lot of the tutorials I have found are for outdated versions of the code, so when I look through and see how they do certain things, I can't translate it into my own program, because a lot has changed. With that being said, I am working in the latest version of Coco2d, version 0.99. What I want to do is create a sprite on the screen (Done) and then when I touch that sprite, I can have "something" happen. For now, let's just make an alert go off. Now, I got this code working with the help of a friend. Here is the header file: // When you import this file, you import all the cocos2d classes #import "cocos2d.h" // HelloWorld Layer @interface HelloWorld : CCLayer { CGRect spRect; } // returns a Scene that contains the HelloWorld as the only child +(id) scene; @end And here is the implementation file: // // cocos2d Hello World example // http://www.cocos2d-iphone.org // // Import the interfaces #import "HelloWorldScene.h" #import "CustomCCNode.h" // HelloWorld implementation @implementation HelloWorld +(id) scene { // 'scene' is an autorelease object. CCScene *scene = [CCScene node]; // 'layer' is an autorelease object. HelloWorld *layer = [HelloWorld node]; // add layer as a child to scene [scene addChild: layer]; // return the scene return scene; } // on "init" you need to initialize your instance -(id) init { // always call "super" init // Apple recommends to re-assign "self" with the "super" return value if( (self=[super init] )) { // create and initialize a Label CCLabel* label = [CCLabel labelWithString:@"Hello World" fontName:@"Times New Roman" fontSize:64]; // ask director the the window size CGSize size = [[CCDirector sharedDirector] winSize]; // position the label on the center of the screen label.position = ccp( size.width /2 , size.height/2 ); // add the label as a child to this Layer [self addChild: label]; CCSprite *sp = [CCSprite spriteWithFile:@"test2.png"]; sp.position = ccp(300,200); [self addChild:sp]; float w = [sp contentSize].width; float h = [sp contentSize].height; CGPoint aPoint = CGPointMake([sp position].x - (w/2), [sp position].y - (h/2)); spRect = CGRectMake(aPoint.x, aPoint.y, w, h); CCSprite *sprite2 = [CCSprite spriteWithFile:@"test3.png"]; sprite2.position = ccp(100,100); [self addChild:sprite2]; //[self registerWithTouchDispatcher]; self.isTouchEnabled = YES; } return self; } // on "dealloc" you need to release all your retained objects - (void) dealloc { // in case you have something to dealloc, do it in this method // in this particular example nothing needs to be released. // cocos2d will automatically release all the children (Label) // don't forget to call "super dealloc" [super dealloc]; } - (void)ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; //CGPoint location = [[CCDirector sharedDirector] convertCoordinate:[touch locationInView:touch.view]]; CGPoint location = [touch locationInView:[touch view]]; location = [[CCDirector sharedDirector] convertToGL:location]; if (CGRectContainsPoint(spRect, location)) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Win" message:@"testing" delegate:nil cancelButtonTitle:@"okay" otherButtonTitles:nil]; [alert show]; [alert release]; NSLog(@"TOUCHES"); } NSLog(@"Touch got"); } However, this only works for 1 object, the sprite which I create the CGRect for. I can't do it for 2 sprites, which I was testing. So my question is this: How can I have all sprites on the screen react to the same event when touched? For my program, the same event needs to be run for all objects of the same type, so that should make it a tad easier. I tried making a subclass of CCNode and over write the method, but that just didn't work at all... so I'm doing something wrong. Help would be appreciated!

    Read the article

  • ext-js chart, multiple series on same chart

    - by user121196
    Ext-js Chart, I have a line graph, and I wish to add a single line(eg. average line) to the graph. The only way I can think of to emulate this line is to do the following: add an extra field with identical value to all my data points if, but this seems to be a waste and plus I don't want to show the dots that comes with the line. is there anyway to add an average line to my existing chart?

    Read the article

  • Java Timers - Messing up function called?

    - by Matt Swanson
    So I have a TimerTask task calling a function onTimerComplete() in its run() onTimerComplete() looks something like this: private void onTimerComplete(){ myFunc1(); myFunc2(); } I make a Timer t and I schedule the TimerTask with t.schedule(task, 2000); The problem is, when the timer is up and the task runs my onTimerComplete() but that function does not finish. It runs myFunc1() but never finishes it nor does it ever call myFunc2() However, if I call onTimerComplete() directly, everything works. What's the deal here?

    Read the article

  • Why does the interpretted order seem different from what I expect?

    - by inspectorG4dget
    I have a problem that I have not faced before: It seems that the order of interpretation in my program is somehow different from what I expect. I have written a small Twitter client. It takes a few seconds for my program to actually post a tweet after I click the "GO" button (which can also be activated by hitting ENTER on the keyboard). I don't want to click multiple times within this time period thinking that I hadn't clicked it the first time. Therefore, when the button is clicked, I would like the label text to display something that tells me that the button has been clicked. I have implemented this message by altering the label text before I send the tweet across. However, for some reason, the message does not display until the tweet has been attempted. But since I have a confirmation message after the tweet, I never get to see this message and my original problem goes unsolved. I would really appreciate any help. Here is the relevant code: class SimpleTextBoxForm(Form): def init(self): # set window properties self.Text = "Tweeter" self.Width = 235 self.Height = 250 #tweet away self.label = Label() self.label.Text = "Tweet Away..." self.label.Location = Point(10, 10) self.label.Height = 25 self.label.Width = 200 #get the tweet self.tweetBox = TextBox() self.tweetBox.Location = Point(10, 45) self.tweetBox.Width = 200 self.tweetBox.Height = 60 self.tweetBox.Multiline = True self.tweetBox.WordWrap = True self.tweetBox.MaxLength = 140; #ask for the login ID self.askLogin = Label() self.askLogin.Text = "Login:" self.askLogin.Location = Point(10, 120) self.askLogin.Height = 20 self.askLogin.Width = 60 self.login = TextBox() self.login.Text= "" self.login.Location = Point(80, 120) self.login.Height = 40 self.login.Width = 100 #ask for the password self.askPass = Label() self.askPass.Text = "Password:" self.askPass.Location = Point(10, 150) self.askPass.Height = 20 self.askPass.Width = 60 # display password box with character hiding self.password = TextBox() self.password.Location = Point(80, 150) self.password.PasswordChar = "x" self.password.Height = 40 self.password.Width = 100 #submit button self.button1 = Button() self.button1.Text = 'Tweet' self.button1.Location = Point(10, 180) self.button1.Click += self.update self.AcceptButton = self.button1 #pack all the elements of the form self.Controls.Add(self.label) self.Controls.Add(self.tweetBox) self.Controls.Add(self.askLogin) self.Controls.Add(self.login) self.Controls.Add(self.askPass) self.Controls.Add(self.password) self.Controls.Add(self.button1) def update(self, sender, event): if not self.password.Text: self.label.Text = "You forgot to enter your password..." else: self.tweet(self.tweetBox.Text, self.login.Text, self.password.Text) def tweet(self, msg, login, password): self.label.Text = "Attempting Tweet..." # this should be executed before sending the tweet is attempted. But this seems to be executed only after the try block try: success = 'Tweet successfully completed... yay!\n' + 'At: ' + time.asctime().split()[3] ServicePointManager.Expect100Continue = False Twitter().UpdateAsXML(login, password, msg) except: error = 'Unhandled Exception. Tweet unsuccessful' self.label.Text = error else: self.label.Text = success self.tweetBox.Text = ""

    Read the article

  • Twitter mood API

    - by user220755
    Is there a twitter API that returns mood? I have seen some websites that return the mood of a specific tweet and I want to be able to use an API (or to use some open source code) to get the mood of a tweet, does anyone know if there is an easy way to do that or if there is an already built API for this?

    Read the article

  • An EventBus framework for Android

    - by Benju
    Can anybody recommend a good framework for handling events in Android? These would be business logic events like UserUpdatedEvent. I am looking for something similar to the EventBus provided by GWT-EVENT but for a JVM that supports weak-references.

    Read the article

  • Sentiment analysis for twitter in python

    - by Ran
    I'm looking for an open source implementation, preferably in python, of Textual Sentiment Analysis (http://en.wikipedia.org/wiki/Sentiment_analysis). Is anyone familiar with such open source implementation I can use? I'm writing an application that searches twitter for some search term, say "youtube", and counts "happy" tweets vs. "sad" tweets. I'm using Google's appengine, so it's in python. I'd like to be able to classify the returned search results from twitter and I'd like to do that in python. I haven't been able to find such sentiment analyzer so far, specifically not in python. Are you familiar with such open source implementation I can use? Preferably this is already in python, but if not, hopefully I can translate it to python. Note, the texts I'm analyzing are VERY short, they are tweets. So ideally, this classifier is optimized for such short texts. BTW, twitter does support the ":)" and ":(" operators in search, which aim to do just this, but unfortunately, the classification provided by them isn't that great, so I figured I might give this a try myself. Thanks! BTW, an early demo is here and the code I have so far is here and I'd love to opensource it with any interested developer.

    Read the article

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