Daily Archives

Articles indexed Wednesday April 21 2010

Page 24/126 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • Plotting Tweets from DB in Ruby, grouping by hour.

    - by plotti
    Hey guys I've got a couple of issues with my code. I was wondering that I am plotting the results very ineffectively, since the grouping by hour takes ages the DB is very simple it contains the tweets, created date and username. It is fed by the twitter gardenhose. Thanks for your help ! require 'rubygems' require 'sequel' require 'gnuplot' DB = Sequel.sqlite("volcano.sqlite") tweets = DB[:tweets] def get_values(keyword,tweets) my_tweets = tweets.filter(:text.like("%#{keyword}%")) r = Hash.new start = my_tweets.first[:created_at] my_tweets.each do |t| hour = ((t[:created_at]-start)/3600).round r[hour] == nil ? r[hour] = 1 : r[hour] += 1 end x = [] y = [] r.sort.each do |e| x << e[0] y << e[1] end [x,y] end keywords = ["iceland", "island", "vulkan", "volcano"] values = {} keywords.each do |k| values[k] = get_values(k,tweets) end Gnuplot.open do |gp| Gnuplot::Plot.new(gp) do |plot| plot.terminal "png" plot.output "volcano.png" plot.data = [] values.each do |k,v| plot.data << Gnuplot::DataSet.new([v[0],v[1]]){ |ds| ds.with = "linespoints" ds.title = k } end end end

    Read the article

  • maya2008 win32api 64 bit python

    - by knishua
    how is it possible to run import win32api successfully on a 64bit maya version 2008 following error occurs Error: No module named win32api Traceback (most recent call last): File "", line 1, in ImportError: No module named win32api # I need to get mouse cursor position in python so that i can place window exactly in that position. Is there any other way to get it Brgds, kNish

    Read the article

  • Jquery Dialog - div disappears after initialization

    - by Zuber
    JQuery Dialog is giving me lots of pain lately. I have the following div which I want to be popped up. (Ignore that the classes do not show the double quotes in the syntax) TABLE class=widget-title-table border=0 cellSpacing=0 cellPadding=0> <TBODY> <TR> <TD class=widget-title><SPAN class=widget-title>Basic Info</SPAN></TD> <TD class=widget-action> <DIV id=edit-actions jQuery1266325647362="3"> <UL class="linkbutton-menu read-mode"> <LI class="control-actions"> <A id="action-button" class="mouse-over-pointer linkbutton">Delete this stakeholder</A> <DIV id="confirmation" class="confirmation-dialog title=Confirmation"> Are you sure you want to delete this stakeholder? </DIV> </LI></UL></DIV></TD></TR></TBODY></TABLE> The JQuery for this is ... $(document).ready(function() { $('#confirmation').dialog({ bgiframe: true, modal: true, autoOpen: false, closeOnEscape: false, draggable: true, position: 'center', resizable: false, width: 400, height: 150 }); }); And the dialog is 'open'ed by var confirmationBox = $('#confirmation',actionContent); if (confirmationBox.length > 0) { //Confirmation Needed $(confirmationBox).dialog('option', 'buttons', { 'No': function() { $(this).dialog('close'); }, 'Yes': function() { $('ul.read-mode').hide(); $.post(requestUrl, {}, ActionCallback(context[0], renderFormUrl), 'json'); $(this).dialog('close'); } }); $(confirmationBox).dialog('open'); } The problem starts in the initialization itself. When the document loads, the <div #confirmation> is deleted from the markup! I had a similar issue earlier, but I cannot use that solution here. On this page I can have multiple PopUp divs. When I added the initialization in just before opening it; the form popped up. But after I close it, the div is removed; so I am not able to see the popup again.

    Read the article

  • Sending alert message if user not logged in ?

    - by suchita
    IN my application i use MFMailComposeViewController class to send mail and i know in the case of sending mail through ipod is sucessfully when one account is already open in that but in my application I want to a message which alert the application to open ur account.......

    Read the article

  • Silverlight Cream for April 20, 2010 -- #842

    - by Dave Campbell
    In this Issue: Zoltan Arvai, Svetla Stoycheva, Alexey Zakharov, Chris Rouw, David Anson(-2-), Bill Reiss, John Papa and Adam Kinney, Chris Klug, CorrinaB, and Mike Snow. Shoutouts: Pete Brown interviewed David Kelley at MIX10: Pete at MIX10: David Kelley on the Prototype WPF and Silverlight Retail Experience Pete Brown also interviewed Emil Stoychev at MIX10: Pete at MIX10: Emil Stoychev on the CompletIT Silverlight Site SilverlightShow has a MIX10 Review by SilverlightShow Live Reporter Cigdem Patlak SilverlightShow also has an Interview with SilverlightShow Article Author Andrej Tozon From SilverlightCream.com: Implementing Push Notifications in Windows Phone 7 Zoltan Arvai has a post up on SilverlightShow discussing Push Notification on WP7 ... what it is, and how to use it. Completit.com - the challenges behind building a corporate website in Silverlight Svetla Stoycheva shows off the new CompleteIT corporate website which is pretty darn cool... and disucusses some of the challenges and solutions Introducing to Halcyone - Silverlight Application Framework: Silverlight Rest Extensions Alexey Zakharov has a tutorial up on a Silverlight application framework he's working on called Halcyone which is available on CodePlex Using the Tag Property during Silverlight Binding Chris Rouw details his SL3 to SL4 conversion and some issues he had, and how he was able to resolve a binding problem using the tag property. Using ContextMenu to implement SplitButton and MenuButton for Silverlight (or WPF) David Anson has a cool discussion up of using the ContextMenu code he put up previously to build a Split button, and includes all the code as usual. Silverlight/WPF Data Visualization Development Release 4 and Windows Phone 7 Charting sample! David Anson updated his Data Visualization because of the new releases, and this time he's including WP7... charting in WP7... ! Space Rocks game step 10: More fun with rocks In episode 10, Bill Reiss shows how to deal with multiple asteroids and all the interaction. Silverlight Training Course (Silverlight 4) Get your serious Silverlight 4 Mojo on with a new SL4 Training kit on Channel 9 ... buncha folks, spearheaded (it looks like) by John Papa and Adam Kinney... Plug-ins and composite applications in Silverlight – pt 3 Chris Klug is back with part 3 of his series on extensions and plug-in loading. So far he's covered a roll-your-own concept and MEF, now he digs into Prism. Transitions, Animations, and Effects with Blend - Part One How cool to have CorrinaB speak at your User Group meeting! ... She did just that in Portland, and instead of simply dropping a deck and some code in her blog, she's giving the run-down on her presentation... always good stuff, Corrina! Tip of the Day #110 – Using Static Resources in Class Libraries Mike Snow's latest tip is about how to create and use a Resource Dictionary. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Unable to access the WCF service over VPN!

    - by kurozakura
    Heres the scenario, im on a network A, and i use a vpn client to connect network B to access the webservice which can be accessed in network B.Even though im connect to network B , im unable to access the webservice link.Do i need to configure any settings. But if u r originally in network B and even though if u have connected to network A using vpn client, im able to access the webservice link. But the other way isnt working.

    Read the article

  • rundll32 gets stuck when running games on windows 7 [closed]

    - by Midhat
    When I run a game on my windows 7 laptop, Rundll32 completely uses up one of my cores and the game wont start. By searching the web I have been able to fix it by 1 - Disabling game info collection/updation from the games explorer. It solved the problem for some games but not all 2 - Killing the game exe once rundll32 gets stuck and restarting the game This has solved the problem for now, but is there a proper and permanent solution to this?

    Read the article

  • How can I reinstall QoS Packet Scheduler if it was removed from the winxp installation by nLite?

    - by Irwin1138
    I have a WinXP SP3 installation modified by nLite. This particular installation was stripped off the QoS Packet Scheduler. I was advised to remove QoS because of the overhead it produces or something like that. Now, I read this lifehacker post about windows maintenance, and it says that on the contrary, by doing so I may have done more harm than good: Disabling QoS in Windows XP: Rumor had it that Microsoft had permanently tied up 20 percent of your net bandwidth for Windows Update. They didn't, and those who disable QoS, or IPv6, in XP actually end up with some pretty harsh connectivity problems. I tend to believe this, and now I seek a way to reinstall QoS. I tried to install it by going to network adapter properties - install - service, but there is no QoS there. I have the original, untouched WinXP SP3 cd. So, is there a way to bring back QoS into my WinXP installation, preferably without reinstalling windows from scratch?

    Read the article

  • TStringList, Dynamic Array or Linked List in Delphi?

    - by lkessler
    I have a choice. I have an array of ordered strings that I need to store and access. It looks like I can choose between using: A TStringList A Dynamic Array of strings, and A Linked List of strings In what circumstances is each of these better than the others? Which is best for small lists (under 10 items)? Which is best for large lists (over 1000 items)? Which is best for huge lists (over 1,000,000 items)? Which is best tor minimize memory use? Which is best to minimize loading and/or access time? For reference, I am using Delphi 2009.

    Read the article

  • Is there a function that can read a php function post-parsing?

    - by Rob
    I've got a php file echoing hashes from a MySQL database. This is necessary for a remote program I'm using, but at the same time I need my other php script opening and checking it for specified strings POST parsing. If it checks for the string pre-parsing, it'll just get the MySQL query rather than the strings to look for. I'm not sure if any functions do this. Does fopen() read the file prior to parsing? or file_get_contents()? If so, is there a function that'll read the file after the php and mysql code runs? The file with the hashes query and echo is in the same directory as the php file reading it, if that makes a difference. Perhaps fopen reads it post-parse, and I've done something wrong, but at first I was storing the hashes directly in the file, and it was working fine. After I changed it to echo the contents of the MySQL table, it bugged out.

    Read the article

  • How to receive EMails in C# application?

    - by Sheery
    Hi dears, I have an application build in C# for reading and saving SMS and MMS, now i want to add another functionality of reading EMails through my C# application using any mail servcies e.g gmail, hotmail or yahoo? How to do this in C#?

    Read the article

  • @selector and return value

    - by user320926
    The idea it's very easy, i have an http download class, this class must support the http authentication but it's basically a background thread so i would like to avoid to prompt directly to the screen, i would like to use a delegate method to require from outside of the class, like a viewController. But i don't know if is possible or if i have to use a different syntax. This class use this delegate protocol: //Updater.h @protocol Updater <NSObject> -(NSDictionary *)authRequired; @optional -(void)statusUpdate:(NSString *)newStatus; -(void)downloadProgress:(int)percentage; @end @interface Updater : NSThread { ... } This is the call to the delegate method: //Updater.m // This check always fails :( if ([self.delegate respondsToSelector:@selector(authRequired:)]) { auth = [delegate authRequired]; } This is the implementation of the delegate method //rootViewController.m -(NSDictionary *)authRequired; { // TODO: some kind of popup or modal view NSMutableDictionary *ret=[[NSMutableDictionary alloc] init]; [ret setObject:@"utente" forKey:@"user"]; [ret setObject:@"password" forKey:@"pass"]; return ret; }

    Read the article

  • Running CGI With Perl under Apache Permission Problem

    - by neversaint
    I have the following entry under apache2.conf in my Debian box. AddHandler cgi-script .cgi .pl Options +ExecCGI ScriptAlias /cgi-bin/ /var/www/mychosendir/cgi-bin/ Then I have a perl cgi script stored under these directories and permissions: nvs@somename:/var/www/mychosendir$ ls -lhR .: total 12K drwxr-xr-x 2 nvs nvs 4.0K 2010-04-21 13:42 cgi-bin ./cgi-bin: total 4.0K -rwxr-xr-x 1 nvs nvs 90 2010-04-21 13:40 test.cgi However when I tried to access it in the web browser: http://myhost.com/mychosendir/cgi-bin/test.cgi They gave me this error: Forbidden You don't have permission to access /mychosendir/cgi-bin/test.cgi on this server. What's wrong with it?

    Read the article

  • SQL 2005 - Search stored procedures for text (Not all text is being searched)

    - by hamlin11
    The following bits of code do not seem to be searching the entire routine definition. Code block 1: select top 50 * from information_schema.routines where routine_definition like '%09/01/2008%' and specific_Name like '%NET' Code Block 2: SELECT ROUTINE_NAME, ROUTINE_DEFINITION FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_DEFINITION LIKE '%EffectiveDate%' AND ROUTINE_TYPE='PROCEDURE' and ROUTINE_NAME like '%NET' I know for a fact that these bits of SQL work under most circumstances. The problem is this: When I run this for "EffectiveDate" which is buried at line ~800 in a few stored procedures, these stored procedures never show up in the results. It's as if "like" only searches so deep. Any tips on fixing this? I want to search the ENTIRE stored procedure for the specified text. Thanks!

    Read the article

  • How start a project and how make partnership?

    - by Asinox
    Hi guys, im thinking about a project, but my project need to be linked to cellphone company, the problem is that i don't know how ill take care about make the presentation to the cellphone company and the company don't steal my idea, i dont know if is clear, sorry with my English some tip's? thanks

    Read the article

  • SVN merge adding parameters. WTF? Or how to do big merges?

    - by HeavyWave
    I am doing an SVN merge for a branch, and in one of the files I see this: GetQueryReferenceData(int sessionId, Int32 sessionId) Which means that the merge tool just added another parameter without asking any questions. Imagine if it was a call to Substring(0) and in another branch it would be Substring(0,2). That is completely different behavior, how does it even get to decide which one to choose? Good thing it came up during compile time. The problem is that it will not be marked as a conflict and will be merged automatically. That is very dangerous behavior and if you don't have the luxury of having a unit test for every line of code - you are screwed. What am I doing wrong and how to do big merges without the merging tool putting in dangerous changes silently? Is there a merge tool that is not language agnostic? I am using Tortoise SVN.

    Read the article

  • Where to go after Informix 4GL?

    - by Chris Harris
    We have a large homegrown ERP system written in Informix 4GL. Currently we are running on old Sun hardware, Solaris 8, and a ten year old version of 4GL and Informix. We need to move on, and one option obviously is to get the latest versions of 4GL & Informix, installed on new hardware (probably Linux/Intel). However I believe there are options for migrating 4GL programmes to other development platforms. Does anyone have experience of that? If so, what platforms, how did it go, what are the pros and cons?

    Read the article

  • How do I get the Virtual Machines folder on Win7?

    - by xpmore
    I'm writing a tool called XP-More, which should help manage Windows 7 Virtual Machines. The first thing the tool has to do when launched is find the VM folder. However, turns out that folder is not listed as a Windows Special Folder. I use a workaround, but it's unreliable. Ideally, Environment.GetFolderPath(Environment.SpecialFolder.VMFolder) or so would have done the job, but VMFolder is a fiction of my imagination. Is there any real way to get that folder?

    Read the article

  • JQuery TableSorter with Pager and LightWindow problem

    - by Maxim
    Hi 2ALL... I've a tablesorter with attached pager plugin on my page with links 'Details' in the one of the cell. Links have a class='lightwindow' and after clicking is rising up a LightWindow script with a window. So it work's vell on the First Page .. when i click Next Page on SortTable.Pager and clickin on my link 'Details' it's doesnt work correctly, it looks like my links lost their class='lightwindow'. Any suggestions?

    Read the article

  • Count total children divs inside a container

    - by kuswantin
    I want to count the total divs inside a container and toggle their visibilities with structure like this. Please also note that the div.content may also reside inside another nested or even nested-nested containers. That's why I handle it with jquery to add div.topmost for each topmost parent container: <div id="parent"> <div class="counter">There are 3 div.contents inside the container below</div> <div class="container"> <div class="content"> 1 </div> <div class="container"> <!--container inside container --> <div class="content"> 2 </div> <div class="content"> 3 </div> </div> </div> <div class="counter">There are 5 div.contents inside the container below</div> <div class="container"> <div class="content"> 1 </div> <div class="content"> 2 </div> <div class="content"> 3 </div> <div class="content"> 4 </div> <div class="content"> 5 </div> </div> </div> And the jquery: // only grab the top most container $('#parent > .container').addClass('topmost'); var topMost = $(".topmost"); var totContent = topMost.children('.content').size(); if (topMost.length > 0) { topMost.before('<div class="toggle">There are ' + totContent + ' div.contents inside the container below</div>'); } topMost.hide(); $('#parent > .counter').click(function() { $(this).next('.topmost').toggle(); //alert(totContent); return false; }); But I can't make it work to loop for each div.counter. The counter always shows all div.content. So placing the each function is suspected to be the problem. Any hep would be very much appreciated. Thanks

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >