Search Results

Search found 118 results on 5 pages for 'wes mcclure'.

Page 4/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • Why does Perl's shift complain 'Type of arg 1 to shift must be array (not grep iterator).'?

    - by wes
    I've got a data structure that is a hash that contains an array of hashes. I'd like to reach in there and pull out the first hash that matches a value I'm looking for. I tried this: my $result = shift grep {$_->{name} eq 'foo'} @{$hash_ref->{list}}; But that gives me this error: Type of arg 1 to shift must be array (not grep iterator). I've re-read the perldoc for grep and I think what I'm doing makes sense. grep returns a list, right? Is it in the wrong context? I'll use a temporary variable for now, but I'd like to figure out why this doesn't work.

    Read the article

  • Facebook Insights for Page via the API

    - by Wes
    Using the new API, is it possible to get the insights (analytics) data from a page that you are an admin of? I can successfully get the data from an app I own, but its not clear how to do this for a page. If not, is it possible to download the CSV of data from the API?

    Read the article

  • Clear Input onFocus with Google Custom Search

    - by Wes
    I'm moving a sites search over to google custom search. The old input for text looks like this: <input type="text" value="Search this website..." name="s" id="searchbox" onfocus="if (this.value == 'Search this website...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search this website...';}" /> Now I need to Have the attr 'name' as 'q', like so: <input type="text" value="Search this website..." name="q" id="searchbox" onfocus="if (this.value == 'Search this website...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search this website...';}" /> The odd thing is that when I swap the name over to q, I'm unable to clear the search box on focus. Am I missing something super easy?

    Read the article

  • What Javascript graphing package will let me plot points against a user-selected coordinate system?

    - by wes
    My customer has some specific requirements for a graph to show in our web app. We use HighCharts elsewhere in the app for more traditional graphing, but it doesn't seem to work for this situation. Their requirements: Allow the user to select a background image, set the scale and origin of the coordinate system. We'll graph our points against the user-defined coordinates. Points can be color coded Mouse-over boxes show more detail about the points Support for zooming and panning, scaling the background appropriately Less importantly: Support for drawing vectors off the points Some of this seems basic, but looking around at different graph packages, I was unable to find any with an example of this kind of usage. I've entertained the thought of just hacking it together in canvas myself, but I've never worked with canvas before so I don't think it would be cost effective. The basics of plotting points with a scaled coordinate system against an image background wouldn't be too hard, but the mouse-over details, zooming and panning sound much more daunting to me. More info: Right now we use jQuery, HighCharts, and ExtJS for our app. We tried flot in the past but switched to HighCharts after flot didn't meet our needs.

    Read the article

  • jQuery AJAX get request - cannot see returned data

    - by Wes
    I think I am missing something obvious here, but I can't figure it out. I expect the following HTML to alert a response from the server. But, the alert is empty. I can see in Wireshark that the expected response is coming back to me from the server. Why is it not populated in the data variable? <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> </head> <body> <script type="text/javascript"> $.get("http://www.geocommunicator.gov/TownshipGeocoder/TownshipGeocoder.asmx/GetTRS", {'Lat': 41, 'Lon': -93, 'Units': 'eDD', 'Datum': ''}, function(data) { alert('data:'+data); }); </script> </body> </html>

    Read the article

  • Add CSS Class to link based on Character Count with jquery

    - by Wes
    I have links that load dynamically onto a background to make them look like buttons. Some of the links take up two lines and some of the links take up 1 line. Eithe way they need to be vertically centered. My plan to to append a class based on the number of characters and then adjust the padding from there. So if the link's text is 25 characters (including spaces) or less - append class 'small' if the link's text is greater than 25 characters - append class 'large' How would I go about doing this with jQuery?

    Read the article

  • Jquery Exclude a Selector?

    - by Wes
    I've got a form that I clear on focus. I've selected the whole form and it works great except that the submit button goes blank when I click it. how can I exclude my input of input#submit from the following code? $(".wpcf7-form input, .wpcf7-form textarea").focus(function() { if( this.value == this.defaultValue ) { this.value = ""; $(this).addClass('filled'); } }).blur(function() { if( !this.value.length ) { this.value = this.defaultValue; $(this).removeClass('filled'); } });

    Read the article

  • Google App Engine django model form does not pick up BlobProperty

    - by Wes
    I have the following model: class Image(db.Model): auction = db.ReferenceProperty(Auction) image = db.BlobProperty() thumb = db.BlobProperty() caption = db.StringProperty() item_to_tag = db.StringProperty() And the following form: class ImageForm(djangoforms.ModelForm): class Meta: model = Image When I call ImageForm(), only the non-Blob fields are created, like this: <tr><th><label for="id_auction">Auction:</label></th><td><select name="auction" id="id_auction"> <option value="" selected="selected">---------</option> <option value="ahRoYXJ0bWFuYXVjdGlvbmVlcmluZ3INCxIHQXVjdGlvbhgKDA">2010-06-19 11:00:00</option> </select></td></tr> <tr><th><label for="id_caption">Caption:</label></th><td><input type="text" name="caption" id="id_caption" /></td></tr> <tr><th><label for="id_item_to_tag">Item to tag:</label></th><td><input type="text" name="item_to_tag" id="id_item_to_tag" /></td></tr> I want the Blob fields to be included in the form as well (as file inputs). What am I doing wrong?

    Read the article

  • SVNServ deny write access to a directory via wildcard match.

    - by Wes
    Hi, We have a requirement that every piece of code that makes it into production will be reviewed by a senior developer. The way I have envisioned this working is by a naming convention for branches that regular developers cannot check code into. Following the SVN recomended directory structure this translates into something like. [project-name]/trunk/ [project-name]/branches/ [project-name]/branches/development-01 [project-name]/branches/development-02 [project-name]/branches/task-increasefontsize [project-name]/branches/release-01 [project-name]/branches/release-02 [project-name]/tags/ So in the authz file I would like to have something like the following [/] @developers = rw [/*/branches/release-*] @developers = r @senior_developers = rw However I can't find any evidence that SVN supports * (or any other wildcard character). Is such a thing possible or do I need a pre-commit hook?

    Read the article

  • I can't get my Android program to run correctly on an AVM in Eclipse

    - by Wes
    This is a simple question about getting started with developing Android apps using Eclipse. I have followed all the tutorials on the developer site for installing Eclipse, the SDK and the ADT plugin. When trying to run a simple Hello World program, everything seems to compile correctly, but then the virtual machine comes up empty. In the Console Window it reads: The program then just sits and my text never comes up. Any idea with what the problem could be?

    Read the article

  • Format an input with Jquery?

    - by Wes
    I'm building a calculator that has a slider. Everytime I slide the bar an input box is updated with the number, the calculator passes the value and updates the calculation. So my input boxes have dollar values that can range anywhere from $0 to $10,000. Right now my boxes display 0 to 10000 and I want them to be displayed as $0 to $10,000. I'm assuming jquery would be my best route here. How do I format an input box to display values like this. Sort of like an input mask. note: users never have to type into the input box, its all controlled by the slider.

    Read the article

  • Multiplying two matrices from two text files with unknown dimensions

    - by wes schwertner
    This is my first post here. I've been working on this c++ question for a while now and have gotten nowhere. Maybe you guys can give me some hints to get me started. My program has to read two .txt files each containing one matrix. Then it has to multiply them and output it to another .txt file. My confusion here though is how the .txt files are setup and how to get the dimensions. Here is an example of matrix 1.txt. #ivalue #jvalue value 1 1 1.0 2 2 1 The dimension of the matrix is 2x2. 1.0 0 0 1 Before I can start multiplying these matrices I need to get the i and j value from the text file. The only way I have found out to do this is int main() { ifstream file("a.txt"); int numcol; float col; for(int x=0; x<3;x++) { file>>col; cout<<col; if(x==1) //grabs the number of columns numcol=col; } cout<<numcol; } The problem is I don't know how to get to the second line to read the number of rows. And on top of that I don't think this will give me accurate results for other matrices files. Let me know if anything is unclear. UPDATE Thanks! I got getline to work correctly. But now I am running into another problem. In matrix B it is setup like: #ivalue #jvalue Value 1 1 0.1 1 2 0.2 2 1 0.3 2 2 0.4 I need to let the program know that it needs to go down 4 lines, maybe even more (The matrices dimensions are unknown. My matrix B example is a 2x2, but it could be a 20x20). I have a while(!file.eof()) loop my program to let it loop until the end of file. I know I need a dynamic array for multiplying, but would I need one here also? #include <iostream> #include <fstream> using namespace std; int main() { ifstream file("a.txt"); //reads matrix A while(!file.eof()) { int temp; int numcol; string numrow; float row; float col; for(int x=0; x<3;x++) { file>>col; if(x==1) { numcol=col; //number of columns } } string test; getline(file, test); //next line to get rows for(int x=0; x<3; x++) { file>>test; if(x==1) { numrow=test; //sets number of rows } } cout<<numrow; cout<<numcol<<endl; } ifstream file1("b.txt"); //reads matrix 2 while(!file1.eof()) { int temp1; int numcol1; string numrow1; float row1; float col1; for(int x=0; x<2;x++) { file1>>col1; if(x==1) numcol1=col1; //sets number of columns } string test1; getline(file1, test1); //In matrix B there are four rows. getline(file1, test1); //These getlines go down a row. getline(file1, test1); //Need help here. for(int x=0; x<2; x++) { file1>>test1; if(x==1) numrow1=test1; } cout<<numrow1; cout<<numcol1<<endl; } }

    Read the article

  • Python win32api not moving mouse cursor in VirtualBox

    - by wes
    I'm trying to use this Python code: import math for i in xrange(500): x = 500 + math.sin(math.pi * i / 100) * 500 y = 500 + math.cos(i) * 100 x, y = int(x), int(y) win32api.SetCursorPos((x, y)) time.sleep(.01) taken from here to move the mouse cursor in an XP VirtualBox. The mouse icon will flicker to the appropriate graphic (when it hits the edge of a window it turns into the <- resize image, for instance), but it doesn't actually move the visible cursor. I can move the mouse around while the code is running. Same result using the ctypes example in the above link. It works fine in the Win7 host. I have Guest Additions installed, if that matters.

    Read the article

  • Simple wxPython Frame Contents Resizing - Ratio?

    - by Wes
    I have a wxPython app with one frame and one panel. On that panel are a number of static boxes, each of which has buttons and textboxes. I have just begun reading about sizers, but they seem like they might be more than what I need, or it could that they are exactly what I need but I don't know how to use them correctly! The frame currently opens at 1920 x 1080. If the user drags the bottom right corner to resize the app, I just want everything to get smaller or larger as needed to keep the same size ratio. Is this possible? Thank you! edit: additional info: I used wxPython 2.8 and Boa to construct the GUI. I am contemplating trying another gui ide. So after reading some more about sizers, I am thinking about doing the following: add a gridsizer and basically divide my window's elements into rows and columns, then set each row and column's size as necessary until I achieve the original layout. Then I guess set the rows and columns to resize correctly? Is this a decent idea?

    Read the article

  • Jquery Stop Fadein / Fadeout

    - by Wes
    This is a fairly easy one, but I cant seem to figure it out. Basically I have a jquery hover that fades in a div and fades out the other upon hover. When I quickly hover on and off a few times it pulses back and forth for about 3-4 seconds to finish all those fade in/fade outs. I generally stop these things with .stop(), but it doesnt seem to do the trick here. How can I kill the fade in if I hover off the button before the an`$(".txtWrap").stop().hover( $(".txtWrap").stop().hover( function () { $(this).find('.txtBock').fadeOut(); $(this).find('.txtDesc').fadeIn(); }, function () { $(this).find('.txtBock').fadeIn(); $(this).find('.txtDesc').fadeOut(); } )

    Read the article

  • HELP with sql query involving two tables and a max date

    - by wes
    hello all....firstly any help is greatly appreciated! i have been searching for a solution to my problem for a while and haven't found exactly what i am looking for. i have two tables notifications and mailmessages. notifications has fields( notifytime, notifynumber, and accountnumber). mailmessages has fields(id, messagesubject, messagenumber, accountnumber) my goal is to create a single sql query to retrieve distinct rows from mailmessages WHERE the accountnumber is a specific number AND the notifynumber=messagenumber AND ONLY the most recent notifytime from the notifications table where the accountnumbers match in both tables. i am using sqlexpress2008 as a backend to an asp.net page....this query should return distinct messages for an account with only the most recent date from the notifications table..please help! i'll buy you a beer!!!

    Read the article

  • What's the equivalent in C# of this VB code on an Outlook form?

    - by wes
    Basically, how do I link an Outlook form and a C# back end? In VB you can write on the form Sub ButtonName_Click() Dim Recipients With Item.GetInspector.ModifiedFormPages("Message") Set Recipients = .Controls("To") End With End Sub which will fire whenever the button named "ButtonName" on the form is clicked and will set the variable Recipients to a string of whatever is in the To text box. Now I have a custom form, and I have a VS C# Outlook Add-in, and they're two separate things. I've got an event handler that can catch MailItem objects, but I don't know how to handle custom form button clicks or even how to access elements on the form. EDIT - Just to clarify, the custom form was created in Outlook and then its .ofs was imported into VS. Both Outlook and VS are 2010.

    Read the article

  • Wordpress Admin Panel Code Input

    - by Wes
    I've got a wordpress admin panel for one of my themes and one of the boxes has an input for some code to drive google adsense. when I put the code into the box and call it with my php tags the code comes out like this: <script type="\&quot;text/javascript\&quot;"><!-- google_ad_client = \"pub-9295546347478163\"; /* Leaderboard 5/17/2010 */ google_ad_slot = \"7593465074\"; google_ad_width = 728; google_ad_height = 90; //--> </script> <script type="\&quot;text/javascript\&quot;" src="%5C%22http://pagead2.googlesyndication.com/pagead/show_ads.js%5C%22"> </script> Which I assume is a feature to stop SQL injections. How can I call pure code form a box? This is how I currently have that textbox setup. array( "name" => "Code for Top ad", "desc" => "Enter the HTML that will drive the banner ad for the page header", "id" => $shortname."_headerAd", "type" => "textarea"), and then echo it out with this: <?php echo get_option('lifestyle_headerAd'); ?>

    Read the article

  • htaccess redirect to www excluding subdomains both https and http

    - by wes
    So this is what I currently have, I'm trying to redirect http://something.com to http://www.something.com but if its a subdomain do no such things, so http://other.somethings.com will stay the same AND conditional based on https/http Currently have.. RewriteCond %{HTTP_HOST} !^www. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

    Read the article

  • Help creating a SQL Query

    - by Wes
    Somewhat new to SQL queries and I need a little help with my join. I am supplied with gid For each of these I need to grab name from table wp_ngg_gallery then join in table wp_ngg_pictures and grab field filename limit 1 order DESC by field imagedate Anyone able to help?

    Read the article

  • What's wrong with this Perl 'grep' syntax?

    - by wes
    I've got a data structure that is a hash that contains an array of hashes. I'd like to reach in there and pull out the first hash that matches a value I'm looking for. I tried this: my $result = shift grep {$_->{name} eq 'foo'} @{$hash_ref->{list}}; But that gives me this error: Type of arg 1 to shift must be array (not grep iterator). I've re-read the perldoc for grep and I think what I'm doing makes sense. grep returns a list, right? Is it in the wrong context? I'll use a temporary variable for now, but I'd like to figure out why this doesn't work.

    Read the article

  • echoing our parts of an Array?

    - by Wes
    I have the following array that I get as an output from facebook: http://www.paste.to/v/1jntlnml With the following code: $stream = $facebook->api_client->stream_get('',128342905144,'0','0',30,'','','',''); foreach($stream as $wallpost) { echo '<pre>'; print_r($wallpost); echo '</pre>'; } So I get the data that I need, but I want to call the individual variables within this array. For example, echo out the [message] for each post. Since it only loops once, I cant echo $wallpost['message'] or anything similar. any idea?

    Read the article

  • Bytes by MSDN - Let's talk Cloud

    - by Wallym
    While I was at DevConnections in Las Vegas, I was honored to be interviewed by Tim Huckaby for "Bytes by MSDN" on Cloud Computing. Here's a short intro from the talk:Do you believe in the Cloud? Wallace McClure, Founder and Architect of Scalable Development, Inc., does. His customers are extremely interested in the value and economies of scale that Cloud Computing, and more specifically, Windows Azure can bring. Building out an infrastructure that supports your web service or application can be expensive, complicated and time consuming. Or you could look to the Microsoft cloud. The Windows Azure platform is a flexible cloud–computing platform that lets you focus on solving business problems and addressing customer needs. Wally talks about all this, and more, in this interview with Tim Huckaby, and in his Windows Azure podcasts.

    Read the article

  • Review - Professional Android Programming with Mono for Android and .NET/C#

    - by Wallym
    Mike Riley of Dev Pro Connections Magazine has a review of our Mono for Android book.  You can read the full review on their siteMono for Android has been available for more than a year. The documentation for the product is adequate and has been improving over time, but until recently, finding a good book about the technology was difficult. Such a constraint has been lifted thanks to Wiley's Professional Android Programming with Mono for Android and .NET/C#. Written under the Wrox imprint by several contributors (Wallace B. McClure, Nathan Blevins, John J. Croft, Jonathan Dick, and Chris Hardy), the book is one of the most comprehensive and helpful Mono for Android titles currently on the market. Please buy 8-10 copies of our book for the ones you love, they make great romantic gifts.

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >