Daily Archives

Articles indexed Monday May 24 2010

Page 18/108 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • ASP.NET MVC, MVVM and file uploads...

    - by Kieron
    Hi, I'm big fan of the MVVM pattern, in particular while using the ASP.NET MVC Framework (in this case v2 preview 2). But I'm curious if anyone knows how to use it when doing file uploads? public class MyViewModel { public WhatTypeShouldThisBe MyFileUpload { get; set; } }

    Read the article

  • AI opponent car logic in car race game.

    - by ashok patidar
    hello i want to develop AI car(opponent) in car race game what should be my direction to develop them with less complexity because i don't have any idea. because the player car is moving on the scrolling track plz suggest me should i have to use relative motion or way point concept but that should also be change on the scrolling track (i.e. player car movement)

    Read the article

  • Please help!! Is there a better way to write this LINQ query

    - by Raj Aththanayake
    Hi Is there a better simplified way to write this query. My logic is if collection contains customer ids and countrycodes, do the query ordey by customer id ascending. If there are no contain id in CustIDs then do the order by customer name. Is there a better way to write this query? I'm not really familiar with complex lambdas. var custIdResult = (from Customer c in CustomerCollection where (c.CustomerID.ToLower().Contains(param.ToLower()) && (countryCodeFilters.Any(item => item.Equals(c.CountryCode))) ) select c).ToList(); if (custIdResult.Count > 0) { return from Customer c in custIdResult ( c.CustomerName.ToLower().Contains(param.ToLower()) && countryCodeFilters.Any(item => item.Equals(c.CountryCode)) ) orderby c.CustomerID ascending select c; } else { return from Customer c in CustomerCollection where ( c.CustomerName.ToLower().Contains(param.ToLower()) && countryCodeFilters.Any(item => item.Equals(c.CountryCode)) ) orderby c.CustomerName descending select c; }

    Read the article

  • Where can I get software-related legal advice?

    - by musicfreak
    Whenever someone asks a legal question here on SO, the response is usually something along the lines of "we are not lawyers." Okay, that's legitimate, but in that case, how can I talk to a lawyer about software-related legal matters? I could look through the phone book and find a local lawyer, but then I have no way of knowing whether the lawyer knows anything about software. (And I hear most local lawyers charge for your time, even if it's just a simple question.) Is there maybe some kind of online service for this sort of thing? For now, I'm just looking for some basic advice, so something free would be awesome, even if the "quality" is not as good. However, I'll still take any kind of paid services--I'll keep them in mind for the future. You can give me anything from a forum or QA site (like this one) to a professional service. Just remember that I'm looking specifically for software-related legal advice. I'm sure most lawyers know a thing or two about software, but I'd rather talk to someone who legitimately knows his stuff than someone who can only guess.

    Read the article

  • TortoiseSVN : Good 'patch file' viewer ?

    - by mishal153
    Hi, The default patch file viewer is messy (ie. no side by side diff view etc). I tried setting the path of beyondCompare exe in "Settings-Unified Diff Viewer-custom", but beyond compare also behaves same as default diff tool. Is there a way to atleast allow side by side diff in patch files ? If so, what is the method ? My aim is to allow emailing of changes so that they can be reviewed before I commit them :) Mishal

    Read the article

  • Problem in Report Design Layout

    - by Prasanna
    Hi, I have a jasper report with 4 subreports in the detail band of the master report. If data is available for first subreport, it starts displaying from page 1 with the header of the subreport. When second subreport starts printing data, it prints only header in page 1 and the page breaks and in the page 2, it prints header again n data for that. I dont want the header of the second subreport to be printed in page1. It should start print in the page 2. How to solve this..? How could i page break...? its urgent.Please help. Thanks in advance, Prasanna

    Read the article

  • TabBarController delegate is not working

    - by Zach
    Hi, Can any one help me, when i am using my UITabBarController delegate it is not working.. I called a delegate method like this.. - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController { [self.navigationController popToRootViewControllerAnimated:NO]; }

    Read the article

  • Properly handling unicode characters in Rails

    - by Gdeglin
    By default Rails allows users of our application to input non-utf8 data, such as: ¶®«¼ However when we attempt to retrieve the data from our database and render it in a template Rails incorrectly assumes that it is in UTF-8 format and throws an error. ArgumentError: invalid byte sequence in UTF-8 What is the best way to handle this? I have seen one fix that suggested sanitizing the data in every place the user can input it. However, that would involve changing a considerable amount of code and it would strip out the characters entirely. Ideally we would want some characters converted to their UTF-8 equivalents. Our environment: Ruby: 1.9.1 Rails 2.3.5 MySql Gem: 2.8.1 This is a serious and urgent problem for us so your answers are very appreciated!

    Read the article

  • Set focus to textbox

    - by Geetha
    Hi All, In my web page there is a textbox with width and height equal to 0. This textbox is used to get the scanned bar code value which should not be visible to the user. Needs: I want to set focus to the textbox, when i click anywhere in the form. I want to make the cursor invisible. Geetha.

    Read the article

  • High-Powered Sites for low Cost

    - by HighAltitudeCoder
    Ahh, I am experiencing the intimidation of my very first post - visible by the whole world. Ok, here goes.   This first post is nothing exceptional.  It is simply a recommendation based (fittingly, I suppose) upon the job search you may be gearing up for.  I find myself in this very situation right now.  And, I will take my own recommendation after posting this entry. Job-Seekers: To the left you will notice two links under "Recommended Learning".  I have found these links to be invaluable when it comes to re-tooling, re-familiarizing, or otherwise resharping my skills when looking for that next job. Often, you will find job-postings with the text, usually posted after a laborious list of qualifications indicating the company's desire to hire candidates who know what they are doing: "...Looking for a candidate who can hit the ground running...".  The interesting thing about this post to me is I've encountered many individuals who, after speaking and working with them for some time, I've realized are perfectly capable of hitting the ground running - and FAST.  But what if they speed off in the wrong direction? The next time you spearhead a major task in your job, ask yourself: Am I headed in the wrong direction?  There are many ways to do this.  In fact, I've found in this new field there are more tempting ways to steer your project in the wrong direction than there are good ones.  I don't want to suggest that every one of my posts will fall into the "right direction" category, however I do think a healthy dose of introspection of the pros and cons will always be beneficial before you set off. That said, allow me to expound on the previously mentioned links. These web sites are invaluable.  They demonstrate the capabilities of existing as well as new and upcoming tools available in several IDE's.  I've viewed many tutorials in LearnVisualStudio.NET, and only one or two so far in TrainingSpot, however I've been delighted in their simplicity and straightforward approach to proper usage of the particular tool or concept being discussed.  They have not (so far in my experience) demonstrated ways in which to use the tools that become cumbersome, impractical, or error-prone. Each website has step-by-step videos that can be paused, replayed, and most importantly, they are done in real time.  As the author is typing, the viewer gets to experience the coding experience from a first-person perspective, including syntax errors, unexpected behaviors, IDE setup idiosyncracies, everything.  A subtle value I've gained from these videos is that a certain degree of confusion and introspection is normal when working with new tools and exploring new paths.  They (as well as your own experience) are not to be feared, but enjoyed.  I highly recommend them. Good work, guys!

    Read the article

  • IIS 7.5 Request Filtering logs versus UrlScan 3.1

    - by Mouffette
    When IIS 7.5 Request Filtering blocks a request it seems to add an entry into the regular IIS web logs with a 404. a) Is there any way to send the detailed Request Filtering logs to a separate file? UrlScan could specify LoggingDirectory and keep this "noise" out of our real IIS logs b) Also, is there a way to get more information that Request Filtering blocked a request? UrlScan logged the rule that caused the denial as well as control over a redirection using RejectResponseUrl which was especially convenient in non-production sites. c) If these features are important is the recommended practice to still install UrlScan 3.1 on IIS 7.5 (Windows 2008 R2) and disable Request Filtering? Any guidance is appreciated.

    Read the article

  • Is there a better way to write this LINQ query?

    - by Raj Aththanayake
    Hi Is there a better simplified way to write this query. My logic is if collection contains customer ids and countrycodes, do the query ordey by customer id ascending. If there are no contain id in CustIDs then do the order by customer name. Is there a better way to write this query? I'm not really familiar with complex lambdas. var custIdResult = (from Customer c in CustomerCollection where (c.CustomerID.ToLower().Contains(param.ToLower()) && (countryCodeFilters.Any(item => item.Equals(c.CountryCode))) ) select c).ToList(); if (custIdResult.Count > 0) { return from Customer c in custIdResult where ( c.CustomerName.ToLower().Contains(param.ToLower()) && countryCodeFilters.Any(item => item.Equals(c.CountryCode))) orderby c.CustomerID ascending select c; } else { return from Customer c in CustomerCollection where (c.CustomerName.ToLower().Contains(param.ToLower()) && countryCodeFilters.Any(item => item.Equals(c.CountryCode))) orderby c.CustomerName descending select c; }

    Read the article

  • MasterDetails Loading on Demand problem

    - by devnet247
    Hi As an exercise to learn wpf and understand how binding works I have an example that works.However when I try to load on demand I fail miserably. I basically have 3 classes Country-City-Hotels If I load ALL in one go it all works if I load on demand it fails miserably. What Am I doing wrong? Works <Window x:Class="MasterDetailCollectionViewSource.CountryCityHotelWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="CountryCityHotelWindow" Height="300" Width="450"> <Window.Resources> <CollectionViewSource Source="{Binding}" x:Key="cvsCountryList"/> <CollectionViewSource Source="{Binding Source={StaticResource cvsCountryList},Path=Cities}" x:Key="cvsCityList"/> <CollectionViewSource Source="{Binding Source={StaticResource cvsCityList},Path=Hotels}" x:Key="cvsHotelList"/> </Window.Resources> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition/> <ColumnDefinition/> <ColumnDefinition/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition/> </Grid.RowDefinitions> <TextBlock Grid.Column="0" Grid.Row="0" Text="Countries"/> <TextBlock Grid.Column="1" Grid.Row="0" Text="Cities"/> <TextBlock Grid.Column="2" Grid.Row="0" Text="Hotels"/> <ListBox Grid.Column="0" Grid.Row="1" Name="lstCountries" ItemsSource="{Binding Source={StaticResource cvsCountryList}}" DisplayMemberPath="Name" SelectionChanged="OnSelectionChanged"/> <ListBox Grid.Column="1" Grid.Row="1" Name="lstCities" ItemsSource="{Binding Source={StaticResource cvsCityList}}" DisplayMemberPath="Name" SelectionChanged="OnSelectionChanged"/> <ListBox Grid.Column="2" Grid.Row="1" Name="lstHotels" ItemsSource="{Binding Source={StaticResource cvsHotelList}}" DisplayMemberPath="Name" SelectionChanged="OnSelectionChanged"/> </Grid> </Window> DOES NOT WORK Xaml is the same as above, however I have added the following that fetches stuff on demand. It loads the countries only as opposed to the other one where it Loads everything at once and not code behind is necessary. public CountryCityHotelWindow() { InitializeComponent(); //Load only country Initially lstCountries.ItemsSource=Repository.GetCountries(); DataContext = lstCountries; } private void OnSelectionChanged(object sender, SelectionChangedEventArgs e) { var lstBox = (ListBox)e.OriginalSource; switch (lstBox.Name) { case "lstCountries": var country = lstBox.SelectedItem as Country; if (country == null) return; lstCities.ItemsSource = Repository.GetCities(country.Name); break; case "lstCities": var city = lstBox.SelectedItem as City; if (city == null) return; lstHotels.ItemsSource = Repository.GetHotels(city.Name); break; case "lstHotels": break; } } What Am I doing Wrong? Thanks

    Read the article

  • Memory Leak question

    - by franz
    I am having a memory leak issue with the following code. As much as I can tell I don't see why the problem persists but it still does not release when called. I am detecting the problem in instruments and the following code is keeping its "cards" classes alive even when it should had released them. Any help welcome. ... ... -(id)initDeckWithCardsPicked: (NSMutableArray*)cardsPicked andColors:(NSMutableArray*)cardColors { self = [self init]; if (self != nil) { int count = [cardsPicked count]; for (int i=0; i<count; i++) { int cardNum = [[cardsPicked objectAtIndex:i] integerValue]; Card * card = [[MemoryCard alloc] initWithSerialNumber:cardNum position: CGPointZero color:[cardColors objectAtIndex:i]]; [_cards addObject: card]; [card release]; } } return self; } - (id) init { self = [super init]; if (self != nil) { self.bounds = (CGRect){{0,0},[Card cardSize]}; self.cornerRadius = 8; self.backgroundColor = kAlmostInvisibleWhiteColor; self.borderColor = kHighlightColor; self.cards = [NSMutableArray array]; } return self; } ... ...

    Read the article

  • Dynamic columns/rows

    - by Fuego DeBassi
    Wondering--does anyone know of any good articles explaining the CSS technique allowing multiple instances of a class to flow down the page relative to the items above it. Not explaining it that well. Veerle' Pierter's does it on this page: http://veerle.duoh.com/belgiangraphicdesign Although I'm not sure I want to use a technique like her's that requires entering of the height per element via her EE installation. I made a little graphic of what I am trying to acheive; http://cl.ly/71163510ce9d294f9f33 The key is I need a robust technique for doing it. Something where the markup could be as simple as; <div class="box"> Number 1 </div> <div class="box"> Number 2 </div> <div class="box"> Number 3 </div> <div class="box"> Number 4 </div> <div class="box"> Number 5 </div> ... Would love any pointers in the right direction.

    Read the article

  • acts-as-taggable-on find within specific tag context

    - by user284194
    I have two models (entries and messages) using acts-as-taggable-on for tagging. How do I write a find condition for tagged messages from only the one model and not both? The only way I can get the tagged items to display is through the basic find: @tags = Tag.find(:all) But this displays tags from both the entries model and the messages model. How can I find the tags from just the messages model? I'm really new to Rails and ActiveRecord finds. I appreciate any help you can offer. Thank you for reading my question.

    Read the article

  • Forwarding HTTP Request with Direct Server Return

    - by Daniel Crabtree
    I have servers spread across several data centers, each storing different files. I want users to be able to access the files on all servers through a single domain and have the individual servers return the files directly to the users. The following shows a simple example: 1) The user's browser requests http://www.example.com/files/file1.zip 2) Request goes to server A, based on the DNS A record for example.com. 3) Server A analyzes the request and works out that /files/file1.zip is stored on server B. 4) Server A forwards the request to server B. 5) Server B returns file1.zip directly to the user without going through server A. Note: steps 4 and 5 must be transparent to the user and cannot involve sending a redirect to the user as that would violate the requirement of a single domain. From my research, what I want to achieve is called "Direct Server Return" and it is a common setup for load balancing. It is also sometimes called a half reverse proxy. For step 4, it sounds like I need to do MAC Address Translation and then pass the request back onto the network and for servers outside the network of server A tunneling will be required. For step 5, I simply need to configure server B, as per the real servers in a load balancing setup. Namely, server B should have server A's IP address on the loopback interface and it should not answer any ARP requests for that IP address. My problem is how to actually achieve step 4? I have found plenty of hardware and software that can do this for simple load balancing at layer 4, but these solutions fall short and cannot handle the kind of custom routing I require. It seems like I will need to roll my own solution. Ideally, I would like to do the routing / forwarding at the web server level, i.e. in PHP or C# / ASP.net. However, I am open to doing it at a lower level such as Apache or IIS, or at an even lower level, i.e. a custom proxy service in front of everything. Thanks.

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >