Search Results

Search found 1329 results on 54 pages for 'rob smallshire'.

Page 33/54 | < Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >

  • How do I track the method the user is looking at in VS 2010 IDE as an Addin

    - by Rob
    I have been wandering around the object model for VS 2010 and haven't been able to work out the best method for watching what the user is looking at in the main edit window. I know that each Class/method/property is broken down into its own . What I would ideally like is to hook to an event which says "The user has moved the cursor onto Project.Class.Method" and ideally "and is looking at line 4". Any suggestions?

    Read the article

  • When should clojure keywords be in namespaces?

    - by Rob
    In clojure, keywords evaluate to themselves, e.g.: >>:test :test They don't take any parameters, and they aren't bound to anything. Why then, would we need to qualify keywords in a namespace? I know that creating isa hierachies using derive requires namespace qualified keywords. Are there any other cases where there is a clear need for keywords to be in a namespace?

    Read the article

  • Why check if your popoverController is nil? Doesn't Obj-C ignore messages to nil?

    - by Rob Fonseca-Ensor
    Pretty much everyone that writes about the UISplitView on the iPad uses the following code structure to dismiss a popover: if (popoverController != nil) { [popoverController dismissPopoverAnimated:YES]; } I though Objective-C was happy to ignore messages that are passed to nil? In fact, in the File New Project New Split View Application template, there's an example of this shortcut in the same code block (DetailsViewController.m): - (void)setDetailItem:(id)newDetailItem { if (detailItem != newDetailItem) { [detailItem release]; //might be nil detailItem = [newDetailItem retain]; // Update the view. [self configureView]; } if (popoverController != nil) { [popoverController dismissPopoverAnimated:YES]; //was checked for nil } } Why is that second if necessary?

    Read the article

  • PHP not outputting errors?

    - by Rob
    My webpage is putting out a 500 Internal Server Error. I've turned on E_ALL for error reporting in the php.ini, and restarted the httpd. I've even used error_reporting(E_ALL) and error_reporting(-1) but still no luck. Any suggestions? OS: CentOS5.5 PHP: 5.2.6 HTTPD: Apache/2.2.3

    Read the article

  • Python threads all executing on a single core

    - by Rob Lourens
    I have a Python program that spawns many threads, runs 4 at a time, and each performs an expensive operation. Pseudocode: for object in list: t = Thread(target=process, args=(object)) # if fewer than 4 threads are currently running, t.start(). Otherwise, add t to queue But when the program is run, Activity Monitor in OS X shows that 1 of the 4 logical cores is at 100% and the others are at nearly 0. Obviously I can't force the OS to do anything but I've never had to pay attention to performance in multi-threaded code like this before so I was wondering if I'm just missing or misunderstanding something. Thanks.

    Read the article

  • If you could unlearn everything you know, and start again

    - by Rob Conery
    I'm giving a presentation at NDC 2010 and in one of the talks I'm going to focus on education and its power over your career (and you personally). There are people who mercilessly educate themselves, and there are others who are a bit ho-hum about it, feeling a bit of apathy. If you remove all of the risk associated surrounding a "refocus" of your career - what choices would you make? What things would you learn and what would you do with it? Think of it as a reroll, Ground Hog day, starting over from scratch today. What platform and language choices would you make and why? Most important to me are those who are completely happy where they are - would love to hear more about what it is that keeps you where you're at. Please do let me know what platform and tools you work with - it would help tremendously! Thanks in advance.

    Read the article

  • Regular expression for finding non-breaking string names in code and then breaking them up for SQL q

    - by Rob Segal
    I am trying to devlop a regex for finding camel case strings in several code files I am working with so I can break them up into separate words for use in a SQL query. I have strings of the form... EmailAddress FirstName MyNameIs And I want them like this... Email Address First Name My Name Is An example SQL query which I currently have is... select FirstName, MyNameIs from MyTables I need the queries in the form... select FirstName as 'First Name', MyNameIs as 'My Name Is' from MyTables Any time a new capital letter appears that should be a new grouping which I can pick out of the matched string. I currently have the following regex... ([A-Z][a-z]+)+ Which does match the cases I have shown above but when I want to perform a replace I need to define groups. Currently I have tried... (([A-Z])([a-z]+))+ Which sort of works. It will pick out "Address" as the first grouping from "EmailAddress" as opposed to "Email" which is what I was expecting. No doubt there is something I'm misunderstanding here so any help is greatly appreciated.

    Read the article

  • A standard set of questions to ask an interviewer?

    - by Rob Wells
    We have had many questions for interviewers to ask interviewees. But none addressing information flow in the other direction, interviewee to interviewer. Just an indirect question about "deal breakers" and one about "finding dream jobs". What I'm after is when you're interviewing at a company do you have a set of questions that you like to ask to help get a feel for the company and the work environment? I have a series of questions that I like to ask that range from the development environment to testing techniques to how the team get on together. Anything else you'd like to ask? Edit: I moved my original list of interviewer questions to my answer below. I've also gone through the other answers and added the ones thought were useful in to that answer. The answer is community wiki so feel free to add anything useful. N.B. This is my first cut of categories. Feel free to modify/add/etc. the categories. Or to recategorise the questions themselves.

    Read the article

  • How to connect to Oracle using JRuby & JDBC

    - by Rob
    First approach: bare metal require 'java' require 'rubygems' require "c:/ruby/jruby-1.2.0/lib/ojdbc14.jar" # should be redundant, but tried it anyway odriver = Java::JavaClass.for_name("oracle.jdbc.driver.OracleDriver") puts odriver.java_class url = "jdbc:oracle:thin:@myhost:1521:mydb" puts "About to connect..." con = java.sql.DriverManager.getConnection(url, "myuser", "mypassword"); if con puts " connection good" else puts " connection failed" end The result of the above is: sqltest.rb:4: cannot load Java class oracle.jdbc.driver.OracleDriver (NameError) Second approach: Active Record require 'rubygems' gem 'ActiveRecord-JDBC' require 'jdbc_adapter' require 'active_record' require 'active_record/version' require "c:/ruby/jruby-1.2.0/lib/ojdbc14.jar" # should be redundant... ActiveRecord::Base.establish_connection( :adapter => 'jdbc', :driver => 'oracle.jdbc.driver.OracleDriver', :url => 'jdbc:oracle:thin:@myhost:1521:mydb', :username=>'myuser', :password=>'mypassword' ) ActiveRecord::Base.connection.execute("SELECT * FROM mytable") The result of this is: C:/ruby/jruby-1.2.0/lib/ruby/gems/1.8/gems/activerecord-jdbc-adapter-0.9.1/lib/active_recordconnection_adapters/jdbc_adapter.rb:330:in `initialize': The driver encountered an error: cannot load Java class oracle.jdbc.driver.OracleDriver (RuntimeError) Essentially the same error no matter how I go about it. I'm using JRuby 1.2.0 and I have ojdbc14.jar in my JRuby lib directory Gems: ActiveRecord-JDBC (0.5) activerecord-jdbc-adapter (0.9.1) activerecord (2.2.2) What am I missing? Thanks,

    Read the article

  • Parse usable Street Address, City, State, Zip from a string

    - by Rob Allen
    Problem: I have an address field from an Access database which has been converted to Sql Server 2005. This field has everything all in one field. I need to parse out the individual sections of the address into their appropriate fields in a normalized table. I need to do this for approximately 4,000 records and it needs to be repeatable. Here are the rules for this exercise: 1 - no whining about how this should have been separate fields in the first place, we are often confronted with less than ideal situations and have to make the best of them 2- for this post, use any language you want 3- feel free to play code golf 4 - Assume an address in the US (for now) 5 - assume that the input string will sometimes contain an addressee (the person being addressed) and/or a second street address (i.e. Suite B) 6 - states may be abbreviated 7 - zip code could be standard 5 digit or zip+4 8 - there are typos in some instances UPDATE: In response to the questions posed, standards were not universally followed, I need need to store the individual values, not just geocode and errors means typo (corrected above) Sample Data: A. P. Croll & Son 2299 Lewes-Georgetown Hwy, Georgetown, DE 19947 11522 Shawnee Road, Greenwood DE 19950 144 Kings Highway, S.W. Dover, DE 19901 Intergrated Const. Services 2 Penns Way Suite 405 New Castle, DE 19720 Humes Realty 33 Bridle Ridge Court, Lewes, DE 19958 Nichols Excavation 2742 Pulaski Hwy Newark, DE 19711 2284 Bryn Zion Road, Smyrna, DE 19904 VEI Dover Crossroads, LLC 1500 Serpentine Road, Suite 100 Baltimore MD 21 580 North Dupont Highway Dover, DE 19901 P.O. Box 778 Dover, DE 19903

    Read the article

  • MVC: Submit one form from a page with multiple forms

    - by Rob
    I'm working in an ASP.NET 3.5 MVC application where i've got a view with multiple forms in it. Form 1 contains information about products and will form a shoppingcart with a remove button. Form 2 is as below and is to be used to get the information from the shoppingcart and create an order of it. <% using (Html.BeginForm()) { %> <%=Html.Hidden(Order.ProductId", "E63EF586-F625-4C8D-B82E-E63A6FA4A63C")%> <%=Html.Hidden(Order.Amount", 1)%> <input type="submit" value="Pay" /> <%} % The first form contains a similar beginform with a foreach loop to get the information about the products from the model. When i use the submit button on the second form everything seems to be submitted and the action in the controller for the first form is trying to handle the request. That is where the error occurce because the information in the viewmodel isn't corresponding to what is being expected. The controller which is trying to handle the request: [AcceptVerbs(HttpVerbs.Post)] public ActionResult ShowShoppingcartForm([Bind(Prefix = "Order")] MyViewmodel viewModel) { //.. } The controller which is expected to handle the request: [AcceptVerbs(HttpVerbs.Post)] public ActionResult SaveOrder([Bind(Prefix = "Order")] MyViewmodel viewModel) { throw new NotImplementedException(); }

    Read the article

  • Spider a Website and Return URLs Only

    - by Rob Wilkerson
    I'm not quite sure how best to define/articulate this, but I'm looking for a way to pseudo-spider a website. The key is that I don't actually want the content, but rather a simple list of URIs. I can get reasonably close to this idea with Wget using the --spider option, but when piping that output through a grep, I can't seem to find the right magic to make it work: wget --spider --force-html -r -l1 http://somesite.com | grep 'Saving to:' The grep filter seems to have absolutely no affect on the wget output. Have I got something wrong or is there another tool I should try that's more geared towards providing this kind of limited result set? Thanks. UPDATE So I just found out offline that, by default, wget writes to stderr. I missed that in the man pages (in fact, I still haven't found it if it's in there). Once I piped the return to stdout, I got closer to what I need: wget --spider --force-html -r -l1 http://somesite.com 2>&1 | grep 'Saving to:' I'd still be interested in other/better means for doing this kind of thing, if any exist.

    Read the article

  • Why would a TableAdapter populate a DataSet with "1/1/2000" for an entire timestamp column?

    - by Rob
    I have a TableAdapter filling a DataSet, and for some reason every select query populates my timestamp column with the value 1/1/2000 for every selected row. I first verified that original values are intact on the DB side; for the most part, they are, although it seems a few rows lost their original timestamp because of update queries performed programmatically before the issue was discovered. The DataColumn type is DateType, while the database (Postgres) column type is timestamp. Up until recently, this was all playing very nicely. I noticed the issue in a bound DataGridView control, and verified that this is not related to data binding by utilizing the 'Preview Data' option in the VS DataSet Editor. Usually when I notice unexpected values popping up in my application it's related to a mis-configured property, type conflict, or another silly mistake I've made. So after checking properties and types, and even recreating the TableAdapter from scratch, to say I'm a little baffled is an understatement. Does anyone have any ideas of what I could do to fix the issue and/or diagnose the cause?

    Read the article

  • iphone integer multiplication

    - by Rob
    I don't understand why this doesn't work: [abc = ([def intValue] - 71) * 6]; '*' should be the viable way of doing multiplication and 'abc' is defined as an NSInteger. ('def' is an NSString)

    Read the article

  • Can Symfony simply reload a page request?

    - by Rob Wilkerson
    I have an app that receives a request from another app. It detects a value on the query string, checks that value against a cached value and, if they don't match, it needs to clear its cache and reload the page (establishing a new cache). Unfortunately, I can't find a way to tell Symfony to redirect to the current page in exactly the same format (protocol, URI path, query string, etc.). What am I missing? This is all happening in a filter on isFirstCall(). Thanks.

    Read the article

  • Django gives "I/O operation on closed file" error when reading from a saved ImageField

    - by Rob Osborne
    I have a model with two image fields, a source image and a thumbnail. When I update the new source image, save it and then try to read the source image to crop/scale it to a thumbnail I get an "I/O operation on closed file" error from PIL. If I update the source image, don't save the source image, and then try to read the source image to crop/scale, I get an "attempting to read from closed file" error from PIL. In both cases the source image is actually saved and available in later request/response loops. If I don't crop/scale in a single request/response loop but instead upload on one page and then crop/scale in another page this all works fine. This seems to be a cached buffer being reused some how, either by PIL or by the Django file storage. Any ideas on how to make an ImageField readable after saving?

    Read the article

  • C# mvc 3 using selectlist with selected value in view

    - by Rob
    I'm working on a MVC3 web application. I want a list of categories shown when editing a blo from whe applications managements system. In my viewmodel i've got the following property defined for a list of selectlistitems for categories. /// <summary> /// The List of categories /// </summary> [Display(Name = "Categorie")] public IEnumerable<SelectListItem> Categories { get; set; } The next step, my controller contains the following edit action where the list of selectlistitems is filled from the database. public ActionResult Edit(Guid id) { var blogToEdit = _blogService.First(x => x.Id.Equals(id)); var listOfCategories = _categorieService.GetAll(); var selectList = listOfCategories.Select(x =>new SelectListItem{Text = x.Name, Value = x.Id.ToString(), Selected = x.Id.Equals(blogToEdit.Category.Id)}).ToList(); selectList.Insert(0, new SelectListItem{Text = Messages.SelectAnItem, Value = Messages.SelectAnItem}); var viewModel = new BlogModel { BlogId = blogToEdit.Id, Active = blogToEdit.Actief, Content = blogToEdit.Text, Title = blogToEdit.Titel, Categories = selectList //at this point i see the expected item being selected //Categories = new IEnumerable<SelectListItem>(listOfCategories, "Id", "Naam", blogToEdit.CategorieId) }; return View(viewModel); } When i set a breakpoint just before the view is being returned, i see that the selectlist is filled as i expected. So at this point everything seems to be okay. The viewmodel is filled entirely correct. Then in my view (i'm using Razor) i've got the following two rules which are supposed to render the selectlist for me. @Html.LabelFor(m => m.Categories) @Html.DropDownListFor(model=>model.Categories, Model.Categories, Model.CategoryId) @Html.ValidationMessageFor(m => m.Categories) When I run the code and open the view to edit my blog, I can see all the correct data. Also the selectlist is rendered correctly, but the item i want to be selected lost it's selection. How can this be? Until the point the viewmodel is being returned with the view everything is okay. But when i view the webpage in the browser, the selectlist is there only with out the correct selection. What am I missing here? Or doing wrong?

    Read the article

  • ASP.NET Webforms site using HTTPCookie with 100 year timeout times out after 20 minutes

    - by Rob
    I have a site that is using Forms Auth. The client does not want the site session to expire at all for users. In the login page codebehind, the following code is used: // user passed validation FormsAuthentication.Initialize(); // grab the user's roles out of the database String strRole = AssignRoles(UserName.Text); // creates forms auth ticket with expiration date of 100 years from now and make it persistent FormsAuthenticationTicket fat = new FormsAuthenticationTicket(1, UserName.Text, DateTime.Now, DateTime.Now.AddYears(100), true, strRole, FormsAuthentication.FormsCookiePath); // create a cookie and throw the ticket in there, set expiration date to 100 years from now HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName, FormsAuthentication.Encrypt(fat)) { Expires = DateTime.Now.AddYears(100) }; // add the cookie to the response queue Response.Cookies.Add(cookie); Response.Redirect(FormsAuthentication.GetRedirectUrl(UserName.Text, false)); The web.config file auth section looks like this: <authentication mode="Forms"> <forms name="APLOnlineCompliance" loginUrl="~/Login.aspx" defaultUrl="~/Course/CourseViewer.aspx" /> </authentication> When I log into the site I do see the cookie correctly being sent to the browser and passed back up: However, when I walk away for 20 minutes or so, come back and try to do anything on the site, the login window reappears. This solution was working for a while on our servers - now it's back. The problem doesn't occur on my local dev box running Cassini in VS2008. Any ideas on how to fix this?

    Read the article

  • How can I control the height of a ListView in WPF, using a complex DataTemplate with DataTriggers?

    - by Rob Perkins
    I have a ListView element with a DataTemplate for each ListViewItem defined as follows. When run, the ListView's height is not collapsed onto the items in the view, which is undesirable behavior: <DataTemplate x:Key="LicenseItemTemplate"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <TextBlock Grid.Row="0" Text="{Binding company}"></TextBlock> <Grid Grid.Row="1" Style="{StaticResource HiddenWhenNotSelectedStyle}"> <Grid.RowDefinitions> <RowDefinition /> </Grid.RowDefinitions> <Button Grid.Row="0">ClickIt</Button> </Grid> </Grid> </DataTemplate> The second row of the outer grid has a style applied which looks like this. The purpose of the style is to : <Style TargetType="{x:Type Grid}" x:Key="HiddenWhenNotSelectedStyle" > <Style.Triggers> <DataTrigger Binding="{Binding Path=IsSelected, RelativeSource={ RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem} } }" Value="False"> <Setter Property="Grid.Visibility" Value="Collapsed" /> </DataTrigger> <DataTrigger Binding="{Binding Path=IsSelected, RelativeSource={ RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem} } }" Value="True"> <Setter Property="Grid.Visibility" Value="Visible" /> </DataTrigger> </Style.Triggers> </Style> The ListView renders like this: The desired appearance is this, when none of the elements are selected: ...with, of course, the ListView's height adjusting to accommodate the additional content when the second grid is made visible by selection. What can I do to get the desired behavior?

    Read the article

  • Query next/previous record

    - by Rob
    I'm trying to find a better way to get the next or previous record from a table. Let's say I have a blog or news table: CREATE TABLE news ( news_id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, news_datestamp DATETIME NOT NULL, news_author VARCHAR(100) NOT NULL, news_title VARCHAR(100) NOT NULL, news_text MEDIUMTEXT NOT NULL ); Now on the frontend I want navigation buttons for the next or previous records, if i'm sorting by news_id, I can do something rather simple like: SELECT MIN(news_id) AS next_news_id FROM news WHERE news_id > '$old_news_id' LIMIT 1 SELECT MAX(news_id) AS prev_news_id FROM news WHERE news_id < '$old_news_id' LIMIT 1 But the news can be sorted by any field, and I don't necessarily know which field is sorted on, so this won't work if the user sorts on news_author for example. I've resorted to the rather ugly and inefficient method of sorting the entire table and looping through all records until I find the record I need. $res = mysql_query("SELECT news_id FROM news ORDER BY `$sort_column` $sort_way"); $found = $prev = $next = 0; while(list($id) = mysql_fetch_row($res)) { if($found) { $next = $id; break; } if($id == $old_news_id) { $found = true; continue; } $prev = $id; } There's got to be a better way.

    Read the article

  • Converting from a day of week to unix time in PHP

    - by Rob
    Hi, I'm trying to get the unix time for date strings that are formatted like so: 'second sunday of march 2010' 'first sunday of november 2010' I was under the impression that strtotime could handle such a string, but apparently not, as this returns false. How can I convert to unix time when given a day of week, which one of those in the month (ie. first, second, etc.), a month and a year.

    Read the article

  • RegEx - Remove HTML hyperlinks based on the link text

    - by Rob
    Hi, I have some text that has HTML hyper-links in it. I want to remove the hyperlinks, but only specific ones. e.g. I start with this: This is text <a href="link/to/somewhere">Link to Remove</a> and more text with another link <a href="/link/to/somewhere/else">Keep this link</a> I want to have: This is text and more text with another link <a href="/link/to/somewhere/else">Keep this link</a> I have this RegEx expression, <a\s[^>]*>.*?</a> ... but it matches ALL of the links. What do I need to add to that expression to match only the links with the link-text 'Remove' (for example) in it? thanks in advance.

    Read the article

  • Trying to Install Rails 3

    - by Rob Fuller
    I'm trying to install Rails 3 on a brand new MacBook Pro running OS X 10.6.3, Ruby 1.8.7, and Rails 2.3.5 and I'm wondering if I've hosed myself. So far, I've run these commands: $ gem update --system $ gem install arel tzinfo builder memcache-client rack rack-test rack-mount erubis mail text-format thor bundler i18n $ gem install rails --pre However, when I run the last command, I get this error: ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions into the /usr/bin directory. I think it wants me to run the command with sudo so that it can write over /usr/bin/rails. But if I do that, won't I be overwriting my Rails 2.3.5 executable? I don't want to do that. Instead, I'd like to keep both versions of Rails. Can anyone help? Thanks.

    Read the article

  • How do I control the background color during the iPhone flip view animation transition?

    - by Rob S.
    I have some pretty standing flipping action going on: [UIView beginAnimations:@"swapScreens" context:nil]; [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.view cache:YES]; [UIView setAnimationDuration:1.0]; [self.view exchangeSubviewAtIndex:0 withSubviewAtIndex:1]; [UIView commitAnimations]; To Apple's credit, this style of animation is amazingly easy to work with. Very cool, and I've been able to animate transitions, flips, fades etc. throughout the app very easily. Question: During the flip transition, the background visible 'behind' the two views during the flip is white and I'd like it to be black. I've: Set the background of the containing view (self.view above) - no dice. I really thought that would work. Set the background of each view to black - no dice. I didn't think this would work although you give different things a shot to understand better :) Google'd like crazy; keep landing on Safari-related listings. Thanks in advance!

    Read the article

  • Visual Studio 2008 Create Word 2007 Template Project Crashes

    - by Rob
    I've got this weird crashing happening when creating a C# Word 2007 Template Project in Visual Studio 2008. The IDE tells me that it's creating the project (it does create the solution and C# vsproj as well as the dotx and cs files). Then the IDE just crashes - no errors, messages, etc. When I try devenv /SafeMode it still doesn't work. I've also tried devenv /log but I don't really see any smoking guns. I have VS2008 SP1 and VSTO 3.0 SP1 installed. Anybody know why this is occurring or more importantly, how I can get it to stop?

    Read the article

< Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >