Search Results

Search found 1688 results on 68 pages for 'andrew patterson'.

Page 47/68 | < Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >

  • Handle Enter Key on Website (ASP and VB)

    - by Andrew
    So I have a website with multiple asp controls. When I press enter inside by login form, the search function runs because it's the first thing found on the page. How would I handle the enter button so that when the active textbox is for the login form, the loginbutton code actually runs rather than the searchbutton. One last problem is that the login controls are inside a loginview so the hierarchy shows that the asp:textbox and asp:button for logging in are inside 3 tags like so: <loginview> <login> <logintemplate> //controls are here. </logintemplate> </login> Just a note that all controls are asp and that all code is prefered in VB. Thanks

    Read the article

  • Signing 3rd Party Assemblies leads to them turnign invisible!

    - by Andrew
    Hi All, I followed OJ's instructions here This allowed me to successfully breakdown, then rebuild and sign some 3rd party DLLs. Here's what I did: Dissassembled Old.dll Rebuild and signed as New.dll (using the same *.snk that my VS2005 proj is signed with) Removed all references in my proj to Old.dll and added references to New.dll Replaced 'Imports Old.dll' with 'Imports New.dll' this final step fails. VS2005 won't recognise my New.dll Any clues?

    Read the article

  • C++ String manipulation isn't making sense to me...

    - by Andrew Bolster
    I am trying some of the Stanford SEE courses online to learn some new languages; this particular assignment has to do with removing substrings from strings. What I've got so far is below, but if text = "hello hello" and remove ="el", it gets stuck in a loop, but if i change text to text = "hello hllo", it works, making me think I'm doing something obviously stupid. There is a stipulation in the assignment not to modify the incoming strings, and instead to return a new string. string CensorString1(string text, string remove){ string returned; size_t found=0, lastfound=0; found = (text.substr(lastfound,text.size())).find(remove); while (string::npos != found ){ returned += text.substr(lastfound,found); lastfound = found + remove.size(); found = (text.substr(lastfound,text.size())).find(remove); } returned += text.substr(lastfound,found); return returned; } Guidance would be appreciated :-) Thanks

    Read the article

  • Best way to construct this query?

    - by Andrew
    I have two tables set up similar to this (simplified for the quest): actions- id - user_id - action - time users - id - name I want to output the latest action for each user. I have no idea how to go about it. I'm not great with SQL, but from what I've looked up, it should look something like the following. not sure though. SELECT `users`.`name`, * FROM users, actions JOIN < not sure what to put here > ORDER BY `actions`.`time` DESC < only one per user_id > Any help would be appreciated.

    Read the article

  • Calling a function that has 'Activity' as an argument.

    - by Andrew
    I have stripped down my functions for simplicity: public static int countLines(String fileName, Activity activity) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(activity.getAssets().open(fileName))); return 3; } I am calling it from here: private CharSequence RandomRead() throws IOException { int numberLines = countLines("data.txt", ??????); return "Success" } In the call to countLines("data.txt", ??????), what do I put as the argument for the Activity? I've Googled all night and I can find no examples of an actual call to a function where Activity is an argument. (Lots of examples actually using 'activity', but no calls to the example functions). Thanks!

    Read the article

  • increase number of photos from flickr using json

    - by Andrew Welch
    Hi this is my code: Is is possible to get more photos from flickr. What is the standard / default number? $(document).ready(function(){ $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?id=48719970@N07&lang=en-us&format=json&jsoncallback=?", function(data){ $.each(data.items, function(i, item){ var newurl = 'url(' + item.media.m + ')'; $("<div class='images'/>").css('background', newurl).css('backgroundPosition','top center').css('backgroundRepeat','no-repeat').appendTo("#images").wrap("<a target=\"_blank\ href='" + item.link + "'></a>"); }) $("#title").html(data.title); $("#description").html(data.description); $("#link").html("<a href='" + data.link + "' target=\"_blank\">Visit the Viget Inspiration Pool!</a>"); //Notice that the object here is "data" because that information sits outside of "items" in the JSON feed $('.jcycleimagecarousel').cycle({ fx: 'fade', speed: 300, timeout: 3000, next: '#next', prev: '#prev', pause: 1, random: 1 }); }); });

    Read the article

  • How to construct this query? (Ordering by COUNT() and joining with users table)

    - by Andrew
    users table: id-user-other columns scores table: id-user_id-score-other columns They're are more than one rows for each user, but there's only two scores you can have. (0 or 1, == win or loss). So I want to output all the users ordered by the number of wins, and all the users ordered by the numbers of losses. I know how to do this by looping through each user, but I was wondering how to do it with one query. Any help is appreciated!

    Read the article

  • What is the easiest way to get the property value from a passed lambda expression in an extension me

    - by Andrew Siemer
    I am writing a dirty little extension method for HtmlHelper so that I can say something like HtmlHelper.WysiwygFor(lambda) and display the CKEditor. I have this working currently but it seems a bit more cumbersome than I would prefer. I am hoping that there is a more straight forward way of doing this. Here is what I have so far. public static MvcHtmlString WysiwygFor<TModel, TProperty>(this HtmlHelper<TModel> helper, Expression<Func<TModel, TProperty>> expression) { return MvcHtmlString.Create(string.Concat("<textarea class=\"ckeditor\" cols=\"80\" id=\"", expression.MemberName(), "\" name=\"editor1\" rows=\"10\">", GetValue(helper, expression), "</textarea>")); } private static string GetValue<TModel, TProperty>(HtmlHelper<TModel> helper, Expression<Func<TModel, TProperty>> expression) { MemberExpression body = (MemberExpression)expression.Body; string propertyName = body.Member.Name; TModel model = helper.ViewData.Model; string value = typeof(TModel).GetProperty(propertyName).GetValue(model, null).ToString(); return value; } private static string MemberName<T, V>(this Expression<Func<T, V>> expression) { var memberExpression = expression.Body as MemberExpression; if (memberExpression == null) throw new InvalidOperationException("Expression must be a member expression"); return memberExpression.Member.Name; } Thanks!

    Read the article

  • Solution: Android INSTALL_FAILED_INSUFFICIENT_STORAGE error.

    - by Andrew Smith
    The INSTALL_FAILED_INSUFFICIENT_STORAGE error is the bane of every Android developer's life. It happens regardless of app size, or how much storage is available. Rebooting the target device fixes the problem briefly, but it soon comes back. There are hundreds (if not thousands) of message board posts from people asking why the problem occurs, but the folks at Google are frustratingly silent on the issue. There is a simple workaround. If your test device is running Android 2.2 or later then add the android:installLocation attribute to your application's manifest file, with the value "preferExternal". This will force the app to be installed on the device's external storage, such as a phone's SD card. For example: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.andrewsmith.android.darkness" android:installLocation="preferExternal" This is more of a band-aid than a fix, and it may not be ideal if you want your finished app to install on the device's internal memory. But it will at least make the development process a lot less frustrating.

    Read the article

  • snprintf and Visual Studio 2010

    - by Andrew
    I'm unfortunate enough to be stuck using VS 2010 for a project, and noticed the following code still doesn't build using the non-standards compliant compiler: #include <stdio.h> #include <stdlib.h> int main (void) { char buffer[512]; snprintf(buffer, sizeof(buffer), "SomeString"); return 0; } (fails compilation with the error: C3861: 'snprintf': identifier not found) I remember this being the case way back with VS 2005 and am shocked to see it still hasn't been fixed. Does any one know if Microsoft has any plans to move their standard C libraries into the year 2010?

    Read the article

  • Selenium RC: How to click buttons that use onclick window.location?

    - by Andrew
    I have a button (outside of a form) that redirects to another page using the onclick attribute that calls window.location to redirect the user to another page. This time I can't change the HTML. I am using Safari 4 for testing. How can I click a button that uses the onclick attribute and window.location to redirect using Safari 4 and Selenium RC PHPUnit Extension? Here's my HTML: <input type="button" onclick="window.location='/registrations/new'" value="Start a new registration" id="create"> Update: Alternatively, I'm thinking about doing something where I assert that a location is specified in the window.location='', store that location, and call the open() command using that location. Not sure if this is an acceptable approach to testing this.

    Read the article

  • Why isn't my Ruby object deleted when the last reference goes out of scope?

    - by Andrew Clegg
    Hi gurus, I've found a weird effect when trying to track down a memory leak in a Rails app. Can anyone explain what's going on here? Save this script as a plain Ruby script (Rails not necessary): class Fnord def to_s 'fnord' end end def test f = Fnord.new end test GC.start sleep 2 ObjectSpace.each_object do |o| puts o if o.is_a? Fnord end When I run this via ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux] I get the following: bash $ ruby var_test fnord Although the variable f is out of scope, there are no other references to the single Fnord object, and I've garbage collected, the object still seems to exist. Is this a nefarious memory leak of some sort, or am I completely missing something about Ruby? Further, if I change the test method to this: def test f = Fnord.new f = nil end I get no output. But surely this should not change the semantics here? Many thanks!

    Read the article

  • routing in asp.net mvc.

    - by andrew Sullivan
    I have a route routes.MapRoute("BuildingProject", "BuildingProject/{action}/{id}", new { controller = "Home", action = "Index", id = "" }); i want it to behave like default route ie for url that starts with BuildingProject like http://localhost:4030/BuildingProject/DeleteAll. I tried routes.MapRoute("BuildingProject", "BuildingProject/{action}/{id}", new { controller = "Home", action = "", id = "" }); It worked.But on typing localhost:4030/BuildingProject it is not redirecting to it's Index but showing error. .How to do this.

    Read the article

  • Vb6 project files and source safe

    - by Andrew
    A part of the application that I am working on is a legacy Vb6 Windows forms application. All the files in the project are under source control (VSS) except the Vb6 project file. From what I can establish from the other developers working on the project the reason for this is that the com components used in the projects have different references on each developers machine. I want to move the project files into VSS so that when files are added to the project these can be updated in the project files and other developers (and more importantly an automated build script) can get the latest project files from source safe. Does anyone know if/how I can achieve this in such a way as to not corrupt the references to other com components on different development machines?

    Read the article

  • Using Alias in Apache ONLY if local directory not present?

    - by Andrew E.
    Hey all, We're running a reseller web host, and aliasing a particular directory for ALL the sites within. This is all happening through WHM/Cpanel, which could possibly complicate my question. We want all hosts to run their "/concrete" directory through a shared location on the server. This is working fine by adding "Alias /concrete/ "/usr/local/share/concrete5/concrete-latest/concrete/" to the apache include editor in WHM. However, if a local concrete/ directory exists within the particular webroot of the virtual host, we'd rather use that than "/concrete" globally. It would also be nice if we could make this alias change in the context of the virtual host, within WHM (and I haven't found a great way to modify virtual host sections in WHM without hacking a file that I don't believe we're supposed to hack.) Thoughts?

    Read the article

  • Can Win32_NetworkAdapterConfiguration.EnableStatic() be used to set more than one IP address?

    - by Andrew J. Brehm
    I ran into this problem in a Visual Basic program that uses WMI but could confirm it in PowerShell. Apparently the EnableStatic() method can only be used to set one IP address, despite taking two parameters IP address(es) and subnetmask(s) that are arrays. I.e. $a=get-wmiobject win32_networkadapterconfiguration -computername myserver This gets me an array of all network adapters on "myserver". After selecting a specific one ($a=$a[14] in this case), I can run $a.EnableStatic() which has this signature System.Management.ManagementBaseObject EnableStatic(System.String[] IPAddress, System.String[] SubnetMask) I thought this implies that I could set several IP addresses like this: $ips="192.168.1.42","192.168.1.43" $a.EnableStatic($ips,"255.255.255.0") But this call fails. However, this call works: $a.EnableStatic($ips[0],"255.255.255.0") It looks to me as if EnableStatic() really takes two strings rather than two arrays of strings as parameters. In Visual Basic it's more complicated and arrays must be passed but the method appears to take into account only the first element of each array. Am I confused again or is there some logic here?

    Read the article

  • .NET framework deprecated interfaces and attributes. What was your biggest refactoring due to lack o

    - by Andrew Florko
    Some .net-framework interfaces and attributes become obsolete and deprecated since new framework version appears. I am warned that such code may be removed or become unpredictable in next versions but have you ever faced the situation when you were forced to refactor code because code came uncompilable or start to behave weird? What was you biggest refactoring? Or maybe Microsoft always continued to support api's once they were published? Thank you in advance!

    Read the article

  • Radio buttons being reset in FF on cache-refresh

    - by Andrew Song
    (This is technically an addendum to an earlier StackOverflow question I had posted, but my original post asked a different question which doesn't really cover this topic -- I don't want to edit my older question as I feel this is different enough to merit its own page) While browsing my website in Firefox 3.5 (and only FF3.5), I come across a page with two radio buttons that have the following HTML code: <input id="check1" type="radio" value="True" name="check" checked="checked"/> <input id="check2" type="radio" value="False" name="check"/> This page renders as expected, with 'check1' checked and 'check2' unchecked. When I then go to refresh the page by pressing Control + R, the two radio buttons render, but they are both unchecked even though the raw HTML code is the same (as above). If I do a cache-miss refresh (via Control + F5 or Control + Shift + R), the page returns back to the way you'd expect it. This is not a problem in any other browser I've tried except FF3.5. What is causing these radio buttons to be reset on a normal refresh? How can I avoid this?

    Read the article

  • Broadcastreceiver to obtain ServiceState information

    - by Andrew
    Hi, Does anyone know of a way to obtain the phone service state (IN_SERVICE, OUT_OF_SERVICE, EMERGENCY_ONLY, POWER_OFF) in android. I was hoping there would be a broadcastreciever to identify the changes, but I can't find anything. I know there's a listener but I'm not sure how I would use that from my app as it runs as a service using a WakefulIntentService (by thecommonsguy). With something like battery level (ie BATTERY_LOW, BATTERY_OKAY) it's quite easy, but I just can't work out a similar things for phone service changes.

    Read the article

  • Windows 8 Data Binding Bug - OnPropertyChanged Updates Wrong Object

    - by Andrew
    I'm experiencing some really weird behavior with data binding in Windows 8. I have a combobox set up like this: <ComboBox VerticalAlignment="Center" Margin="0,18,0,0" HorizontalAlignment="Right" Height="Auto" Width="138" Background="{StaticResource DarkBackgroundBrush}" BorderThickness="0" ItemsSource="{Binding CurrentForum.SortValues}" SelectedItem="{Binding CurrentForum.CurrentSort, Mode=TwoWay}"> <ComboBox.ItemTemplate> <DataTemplate> <TextBlock HorizontalAlignment="Right" Text="{Binding Converter={StaticResource SortValueConverter}}"/> </DataTemplate> </ComboBox.ItemTemplate> </ComboBox> Inside of a page with the DataContext set to a statically located ViewModel. When I change that ViewModel's CurrentForm attribute, who's property is implemented like this... public FormViewModel CurrentForm { get { return _currentForm; } set { _currentForm = value; if (!_currentForm.IsLoaded) { _currentSubreddit.Refresh.Execute(null); } RaisePropertyChanged("CurrentForm"); } } ... something really strange happens. The previous FormViewModel's CurrentSort property is changed to the new FormViewModel's current sort property. This happens as the RaisePropertyChanged event is called, through a managed-to-native transition, with native code invoking the setter of CurrentSort of the previous FormViewModel. Does that sound like a bug in Win8's data binding? Am I doing something wrong?

    Read the article

  • Azure Table Storage rejects an entity with a Property whose value is an Interface

    - by Andrew B Schultz
    I have a type called "Comment" that I'm saving to Azure Table Storage. Since a comment can be about any number of other types, I created an interface which all of these types implement, and then put a property of type ICommentable on the comment. So Comment has a property called About of type ICommentable. When I try to save a Comment to Azure Table Storage, if the Comment.About property has a value, I get the worthless invalid input error. However, if there is no value for Comment.About, I have no problem. Why would this be? Comment.About is not the only property that is a reference type. For example, Comment.From is a reference type, but the Comment.About is the only property of a type that is an interface. Fails: var comment = new Comment(); comment.CommentText = "It fails!"; comment.PartitionKey = "TEST"; comment.RowKey = "TEST123"; comment.About = sow1; comment.From = person1; Works: var comment = new Comment(); comment.CommentText = "It works!"; comment.PartitionKey = "TEST"; comment.RowKey = "TEST123"; //comment.About = sow1; comment.From = person1; Thanks!

    Read the article

< Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >