Search Results

Search found 979 results on 40 pages for 'jonathan parker'.

Page 12/40 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • What's the best way to annotate this ggplot2 plot? [R]

    - by Matt Parker
    Here's a plot: library(ggplot2) ggplot(mtcars, aes(x = factor(cyl), y = hp, group = factor(am), color = factor(am))) + stat_smooth(fun.data = "mean_cl_boot", geom = "pointrange") + stat_smooth(fun.data = "mean_cl_boot", geom = "line") + geom_hline(yintercept = 130, color = "red") + annotate("text", label = "130 hp", x = .22, y = 135, size = 4) I've been experimenting with labeling the geom_hline in a few different ways, each of which does something I want but has a problem that the other methods don't have. annotate(), used above, is nice - the text is resizeable, black, and easy to position. But it can only be placed within the plot itself, not outside the plot like the axis labels. It also makes an "a" appear in the legend, which I can't dismiss with legend = FALSE. legend = FALSE works with geom_text, but I can't get geom_text to just be black - it seems to be getting tangled up in the line colorings. grid.text lets me put the text anywhere I want, but I can't seem to resize it. I can definitely accept the text being inside of the plot area, but I'd like to keep the legend clean. I feel like I'm missing something simple, but I'm just fried. Thanks in advance for your consideration.

    Read the article

  • Numeric comparison difficulty in R

    - by Matt Parker
    I'm trying to compare two numbers in R as a part of a if-statement condition: (a-b) >= 0.5 In this particular instance, a = 0.58 and b = 0.08... and yet (a-b) >= 0.5 is false. I'm aware of the dangers of using == for exact number comparisons, and this seems related: (a - b) == 0.5) is false, while all.equal((a - b), 0.5) is true. The only solution I can think of is to have two conditions: (a-b) > 0.5 | all.equal((a-b), 0.5). This works, but is that really the only solution? Should I just swear off of the = family of comparison operators forever?

    Read the article

  • Payment gateways and XSS

    - by Rowan Parker
    Hi all, I'm working on a website which takes payment from a customer. I'm using Kohana 2.3.4 and have created a library to handle the payment gateway I use (www.eway.com.au). Basically I'm just using their sample code, copied into it's own class. Anyway, the code works fine and I can make payments, etc. The issue I have is when the payment gateway is returning the user to my site. The payment gateway uses HTTPS so that is secure, and it is sending the user back to a HTTPS page on my site. However I have the NoScript plugin installed in Firefox, and when I get sent back to the page on my website (which also handles storing the transaction data) I get an error message saying that NoScript has blocked a potential XSS attack. Now I understand why it's unsecure (POST data being sent across two different domains) but what should I be doing instead? Obviously during my testing here I temporarily disable NoScript and it all works fine, but I can't rely on that for the end users. What's the best practice here?

    Read the article

  • jQuery Date Picker where text input is read only

    - by Rowan Parker
    Hi all, I want to use the Jquery datepicker. I've got it setup using an the alt field option. I'm displaying Y-M-D in the text field, but submitting Y-M-D. Everything works fine so far, sending the correct data, etc. However I want to stop the user from being able to manually type a date. I add originally set the INPUT field to disabled, which worked in every browser except IE. In IE it would popup the date picker but then not close after clicking a date. Does anyone know the best way to do this?

    Read the article

  • What is the best way to format Django urls for two parameters, either of which are optional?

    - by Parker
    I'm designing a gallery application for viewing vehicle pictures and there are two parameters: Manufacturer Vehicle type Right now you can view either, but not both. Urls go like so: /manufacturer/# /type/# Where # is an ID number. How/can I format my URLs so it can accept both? My current solution is to do: /both/#/# but this requires some retooling since the application doesn't know when you want to filter by both. Any insight would be appreciated.

    Read the article

  • Grabbing rows from MySql where current date is in between start date and end date (Check if current date lies between start date and end date)

    - by Jordan Parker
    I'm trying to select from the database to get the "campaigns" that dates fall into the month. So far i've been successful in grabbing rows that starts or ends inside the current month. What I need to do now is select rows that start in one month and ends a few months down the line ( EG: It's the 3rd month in the year, and there's a "campaign" that runs from the 1st month until the 5th. other example There is a "campaign" that runs from 2012 until 2013 ) I'm hoping there is some way to select via MySql all rows in which a capaign may run. If not should I grab all data in the database and only show the ones that run via the current month. I have already made a function that displays all the days inbetween each date inside an array, which is called "dateRange". I've also created another which shows how many days the campaign runs for called "runTime". Select all (Obviously) $result = mysql_query("SELECT * FROM campaign"); Select Starting This Month $result = mysql_query("SELECT * FROM campaign WHERE YEAR( START ) = YEAR( CURDATE( ) ) AND MONTH( START ) = MONTH( CURDATE( ) )"); Select Ending This Month $result = mysql_query("SELECT * FROM campaign WHERE YEAR( END ) = YEAR( CURDATE( ) ) AND MONTH( END ) = MONTH( CURDATE( ) ) LIMIT 0 , 30"); Code sample while($row = mysql_fetch_array($result)) { $dateArray = dateRange($row['start'], $row['end']); echo "<h3>" . $row['campname'] . "</h3> Start " . $row['start'] . "<br /> End " . $row['end']; echo runTime($row['start'], $row['end']); print_r($dateArray); } In regards to the dates, MySql database only holds start date and end date of the campaign.

    Read the article

  • How to call a function from another class file

    - by Guy Parker
    I am very familiar with writing VB based applications but am new to Xcode (and Objective C). I have gone through numerous tutorials on the web and understand the basics and how to interact with Interface Builder etc. However, I am really struggling with some basic concepts of the C language and would be grateful for any help you can offer. Heres my problem… I have a simple iphone app which has a view controller (FirstViewController) and a subview (SecondViewController) with associated header and class files. In the FirstViewController.m have a function defined @implementation FirstViewController (void) writeToServer:(const uint8_t ) buf { [oStream write:buf maxLength:strlen((char)buf)]; } It doesn't really matter what the function is. I want to use this function in my SecondViewController, so in SecondViewController.m I import FirstViewController.h import "SecondViewController.h" import "FirstViewController.h" @implementation SecondViewController -(IBAction) SetButton: (id) sender { NSString *s = [@"Fill:" stringByAppendingString: FillLevelValue.text]; NSString *strToSend = [s stringByAppendingString: @":"]; const uint8_t *str = (uint8_t *) [strToSend cStringUsingEncoding:NSASCIIStringEncoding]; FillLevelValue.text = strToSend; [FirstViewController writeToServer:str]; } This last line is where my problem is. XCode tells me that FirstViewController may not respond to writeToServer. And when I try to run the application it crashes when this function is called. I guess I don't fully understand how to share functions and more importantly, the relationship between classes. In an ideal world I would create a global class to place my functions in and call them as required. Any advice gratefully received.

    Read the article

  • fastest way to crawl recursive ntfs directories in C++

    - by Peter Parker
    I have written a small crawler to scan and resort directory structures. It based on dirent(which is a small wrapper around FindNextFileA) In my first benchmarks it is surprisingy slow: around 123473ms for 4500 files(thinkpad t60p local samsung 320 GB 2.5" HD). 121481 files found in 123473 milliseconds Is this speed normal? This is my code: int testPrintDir(std::string strDir, std::string strPattern="*", bool recurse=true){ struct dirent *ent; DIR *dir; dir = opendir (strDir.c_str()); int retVal = 0; if (dir != NULL) { while ((ent = readdir (dir)) != NULL) { if (strcmp(ent->d_name, ".") !=0 && strcmp(ent->d_name, "..") !=0){ std::string strFullName = strDir +"\\"+std::string(ent->d_name); std::string strType = "N/A"; bool isDir = (ent->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) !=0; strType = (isDir)?"DIR":"FILE"; if ((!isDir)){ //printf ("%s <%s>\n", strFullName.c_str(),strType.c_str());//ent->d_name); retVal++; } if (isDir && recurse){ retVal += testPrintDir(strFullName, strPattern, recurse); } } } closedir (dir); return retVal; } else { /* could not open directory */ perror ("DIR NOT FOUND!"); return -1; } }

    Read the article

  • Rails on Google App Engine - Error on OS X development machine

    - by Phillip Parker
    Hi, I'm running through the Ruby on Rails tutorial at http://guides.rubyonrails.org/getting_started.html (adjusting where appropriate for Google's App Engine). All is well up till section 6.3: when I try to click "New Post", I get the following error: Internal Server Error (500) Request Method: GET Request URL: http://localhost:8080/500.html access denied (java.io.FilePermission /dev/urandom read) It works fine when I upload the application to Google's App Engine; it's just on my development machine (OS X 10.6) that it doesn't work. Thanks in advance.

    Read the article

  • How can I make Access combo boxes unfurl on arrow key down?

    - by Matt Parker
    With combo box controls, I'm used to being able tab to them, click the down arrow key to open up the options, and then use the up and down arrow keys to navigate those options. In an Access form I've designed, pressing down while a combo box is active moves to the next control. I already have tab for that, so how can I get the down arrow to behave as I expect? These combo boxes are the only thing between me and a mouse-free form, which I consider essential for data entry. Thanks in advance for your help!

    Read the article

  • Qt moc not error

    - by Robert Parker
    So I'm pretty new to Qt, and I've just inherited a project from someone else who is also new to Qt. He isn't around this week btw. We are using Visual Studio 2008, and have the latest version of Qt installed(4.6.2). The project builds on my coworker's machine fine, and I can get the project from svn and build it directly. But under any other circumstances it refuses to build on my machine, and it doesn't give me much of an explanation why. Even if I just do a 'build clean' and then a 'build' it doesn't work. Any slight modification will make it fail. When I try to build the entire project I get the error message: 1Moc'ing MatrixTypeInterface.h... 1moc: Cannot create .\GeneratedFiles\Debug\moc_MatrixTypeInterface.cpp;.\GeneratedFiles\Debug\moc_matrixtypeinterface.cpp 1Project : error PRJ0019: A tool returned an error code from "Moc'ing MatrixTypeInterface.h..." The moc tool doesn't give any sort of error message as to why it isn't working, and I wasted most of yesterday trying to figure out why. I got the command that VS was using to call moc, and I entered in the command line myself. It didn't write anything to the screen. Any ideas?

    Read the article

  • How do I retain a requested url with parameters after redirecting to a login page?

    - by Brent Parker
    I have been asked to set up some authentication for some content on our website using JSP. What I would like to do seems simple to me but I can't quite figure out how to do it in JSP. What I would like to do is this: When a user requests a page that you must be logged in to see, I have a tag that checks their cookies for an authentication token. If it is not there, they are redirected to a login page. After they log in, I want to redirect them back to the page they first requested along with any parameters they were sending. Now, I have the tag that is checking their authentication and redirecting them to the login page. That part is working just fine. But I'm not sure how to maintain the first requested url and parameters so they can be redirected after they login. How might I accomplish this?

    Read the article

  • how to implement a game character task queue

    - by Stephen Lee Parker
    I'm working on a personal game engine in C# and need to give certain characters / sprites responses to conditions or certain patterns that they follow and since these patterns will be repeated over and over for other characters / sprites, I don't want to tie the patterns to the character / sprite. I will likely want to define the conditions / actions in level data files... I plan to use this for platformers, space shooters, and pack man like games... Almost an extenable AI system. Any suggestions on how this can be implemented?

    Read the article

  • How do I see if an established socket is stuck on a server that's expecting input?

    - by Parker
    I have a script that scans ports for open proxy servers. Problem is if it encounters a login program (specifically telnet) then it hangs there forever since it doesn't know what to do and eventually the server closes the connection. The simple solution would be to create a bunch of cases. If telnet, do this. If SSH, do that. If something else, blah blah blah. I'd like an umbrella solution since the script is not a high priority for me. The script, as it is now, is available at http://parkrrr.net/socks/scan.phps On a small scale (the page maybe averages 15 hits/day) it's fine but on a larger scale I'd be worried about a lot of open zombie sockets. Swapping the !$strpos doesn't work since servers can return more information than what you requested (headers, ads, etc). Only accepting a fixed number of bytes (as opposed to appending until EOF, which it does now) from the $fgets also does not seem to work. I am sure this is where it gets stuck: while (!feof($fp)) { $data.=fgets($fp,512); } But what can I do? Any other suggestions/warnings would also be welcomed.

    Read the article

  • Adding new records in Access without wrecking the form

    - by Matt Parker
    I'm working on a simple Access 2003 application to keep track of things that need to be done for clients for some colleagues. Each colleague has a set of clients, and each client has a set of actions that need to be taken by a certain date. I've set up a form that consists of a combobox for client ID (indexed), a drop-down for the person who is handling that client's case, and a button for adding new clients (a standard Access-created Add Record button). The actions are listed in a subform below these three elements. The problem I've run into is that the first person I tested this on clicked the button to add a new record, then didn't fill it out and tried to select another client from the drop-down list. Access interprets this as an attempt to set the selected Client ID as the ID for the new record and rightfully throws an error for duplicate primary keys. I can think of a couple of ways around this problem, but I'd much rather hear your elegant solutions than kludge together some junk in a language I don't know. Let me know if you have any questions. Thank you.

    Read the article

  • Nesting QDockWidgets

    - by Brent Parker
    Right now I have four customized QDockWidgets on the left side of my application. When you start the application, each one is visible, but very small because of the visibility of each one. I would like for three of the QDockWidgets to nest behind one primary one to give that one priority and the entire left side of the screen. Does anyone know how to tell QDockWidgets to nest when they are created?

    Read the article

  • Altering sql tables based on condition

    - by Parker
    Is there any possible way to add a row of data to only some of the tables in a database? I am not sure what parameter I could use amongst the tables to compare them to each other. Any Ideas? For Example: My database has tables that are (let's say) group A tables, and tables that are group B. I want to add a row to only the group B tables while leaving the group A tables untouched. Sorry I should have been a bit more specific. The tables that need to have a row added will change. My application monitors inventory in different store locations(each table in my database represents a store). When I need to add an item to inventory(the items are rows in the tables) I don't want to have to manually add the row to all the store tables. My problem is: Not all the tables in the database represent stores. For instance one table stores the user login data. Obviously I do not want to add the new row to this table. How do I update only the tables that represent stores?

    Read the article

  • Silverlight Cream for May 18, 2010 -- #864

    - by Dave Campbell
    In this Issue: Jesse Liberty, Chris Koenig, Kyle McClellan, Kunal Chowdhury(-2-), Tim Heuer, and Jonathan van de Veen. Shoutout: René Schulte has posted a SLARToolkit Beginner's Guide Erik Mork and the Sparkling Podcast crew posted Silverlight Week – Silverlight Android? John Papa opens up a dialog: Ask the Experts on Silverlight TV ... get your questions answered! From SilverlightCream.com: Windows Phone 7 For Silverlight Programmers Jesse Liberty's starting a series on WP7, so you obviously don't want to miss this... source, commentary, external links, how-to's... what more could you ask for?? WP7 Part 3: Navigation Chris Koenig is revamping his WP7 application to use Community Megaphone instead of Nerd Dinner and in this episode 3 he's looking into Navigation ... definitely good stuff here. RIA Services Authentication Out-Of-Browser Kyle McClellan has code up demonstrating how to get around the fact that the Browser networking stack handles cookies differently than the client networking stack used OOB, and achieve forms authentication OOB. How to work with the Silverlight BusyIndicator? Kunal Chowdhury has a post up talking about the busy indicator and how to use it to show an active indicator while disabling other content. Drag and Drop Operation in Silverlight ListBox In a second entry, Kunal Chowdhury has a nice long post displaying drag-and-drop within and between ListBox controls. Silverlight 4 Tools, WCF RIA Services and Themes Released As usual, Tim Heuer has a great post up about the new releases not only for those with 'clean' machines, but also instructions for those that have been playing along. Advanced printing in Silverlight 4 Just after a post on printing yesterday, Jonathan van de Veen has a post up at SilverlightShow on printing as well, and is demonstrating fitting the text to the page and printing multiple pages. 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

  • Silverlight Cream for May 25, 2010 -- #869

    - by Dave Campbell
    In this Issue: Miroslav Miroslavov, Victor Gaudioso, Phil Middlemiss, Jonathan van de Veen, Lee, and Domagoj Pavlešic. From SilverlightCream.com: Book Folding effect using Pixel Shader On the new CompleteIT site, did you know the page-folding was done using PixelShaders? I hadn't put much thought into it, but that's pretty cool, and Miroslav Miroslavov has a blog post up discussing it, and the code behind it. New Silverlight Video Tutorial: How to create a Slider with a ToolTip that shows the Value of the Slider This is pretty cool... Victor Gaudioso's latest video tutorial shows how to put the slider position in the slider tooltip... code and video tutorial included. Backlighting a ListBox Put this in the cool category as well... Phil Middlemiss worked out a ListBox styling that makes the selected item be 'backlit' ... check out the screenshot on the post... and then grab the code :) Adventures while building a Silverlight Enterprise application part #33 Jonathan van de Veen is discussing changes to his project/team and how that has affected development. Read about what they did right and some of their struggles. RIA Services and Storedprocedures Lee's discussing Stored Procs and RIA Services ... he begins with one that just works, then moves on to demonstrate the kernel of the problem he's attacking and the solution of it. DoubleClick in Silverlight Domagoj Pavlešic got inspiration from one of Mike Snow's Tips of the Day and took off on the double-click idea... project source included. 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

  • Welcome to the Red Gate BI Tools Team blog!

    - by BI Tools Team
    Welcome to the first ever post on the brand new Red Gate Business Intelligence Tools Team blog! About the team Nick Sutherland (product manager): After many years as a software developer and project manager, Nick took an MBA and turned to product marketing. SSAS Compare is his second lean startup product (the first being SQL Connect). Follow him on Twitter. David Pond (developer): Before he joined Red Gate in 2011, David made monitoring systems for Goodyear. Follow him on Twitter. Jonathan Watts (tester): Jonathan became a tester after finishing his media degree and joining Xerox. He joined Red Gate in 2004. Follow him on Twitter. James Duffy (technical author): After a spell as a writer in the video game industry, James lived briefly in Tokyo before returning to the UK to start at Red Gate. What we're working on We launched a beta of our first tool, SSAS Compare, last month. It works like SQL Compare but for SSAS cubes, letting you deploy just the changes you want. It's completely free (for now), so check it out. We're still working on it, and we're eager to hear what you think. We hope SSAS Compare will be the first of several tools Red Gate develops for BI professionals, so keep an eye out for more from us in the future. Why we need you This is your chance to help influence the course of SSAS Compare and our future BI tools. If you're a business intelligence specialist, we want to hear about the problems you face so we can build tools that solve them. What do you want to see? Tell us! We'll be posting more about SSAS Compare, business intelligence and our journey into BI in the coming days and weeks. Stay tuned!

    Read the article

  • Welcome to the Red Gate BI Tools Team blog!

    - by Red Gate Software BI Tools Team
    Welcome to the first ever post on the brand new Red Gate Business Intelligence Tools Team blog! About the team Nick Sutherland (product manager): After many years as a software developer and project manager, Nick took an MBA and turned to product marketing. SSAS Compare is his second lean startup product (the first being SQL Connect). Follow him on Twitter. David Pond (developer): Before he joined Red Gate in 2011, David made monitoring systems for Goodyear. Follow him on Twitter. Jonathan Watts (tester): Jonathan became a tester after finishing his media degree and joining Xerox. He joined Red Gate in 2004. Follow him on Twitter. James Duffy (technical author): After a spell as a writer in the video game industry, James lived briefly in Tokyo before returning to the UK to start at Red Gate. What we’re working on We launched a beta of our first tool, SSAS Compare, last month. It works like SQL Compare but for SSAS cubes, letting you deploy just the changes you want. It’s completely free (for now), so check it out. We’re still working on it, and we’re eager to hear what you think. We hope SSAS Compare will be the first of several tools Red Gate develops for BI professionals, so keep an eye out for more from us in the future. Why we need you This is your chance to help influence the course of SSAS Compare and our future BI tools. If you’re a business intelligence specialist, we want to hear about the problems you face so we can build tools that solve them. What do you want to see? Tell us! We’ll be posting more about SSAS Compare, business intelligence and our journey into BI in the coming days and weeks. Stay tuned!

    Read the article

  • Welcome to the Red Gate BI Tools Team blog!

    - by BI Tools Team
    Welcome to the first ever post on the brand new Red Gate Business Intelligence Tools Team blog! About the team Nick Sutherland (product manager): After many years as a software developer and project manager, Nick took an MBA and turned to product marketing. SSAS Compare is his second lean startup product (the first being SQL Connect). Follow him on Twitter. David Pond (developer): Before he joined Red Gate in 2011, David made monitoring systems for Goodyear. Follow him on Twitter. Jonathan Watts (tester): Jonathan became a tester after finishing his media degree and joining Xerox. He joined Red Gate in 2004. Follow him on Twitter. James Duffy (technical author): After a spell as a writer in the video game industry, James lived briefly in Tokyo before returning to the UK to start at Red Gate. What we're working on We launched a beta of our first tool, SSAS Compare, last month. It works like SQL Compare but for SSAS cubes, letting you deploy just the changes you want. It's completely free (for now), so check it out. We're still working on it, and we're eager to hear what you think. We hope SSAS Compare will be the first of several tools Red Gate develops for BI professionals, so keep an eye out for more from us in the future. Why we need you This is your chance to help influence the course of SSAS Compare and our future BI tools. If you're a business intelligence specialist, we want to hear about the problems you face so we can build tools that solve them. What do you want to see? Tell us! We'll be posting more about SSAS Compare, business intelligence and our journey into BI in the coming days and weeks. Stay tuned!

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >