Search Results

Search found 15231 results on 610 pages for 'presentation model'.

Page 167/610 | < Previous Page | 163 164 165 166 167 168 169 170 171 172 173 174  | Next Page >

  • SQL Saturday #89 in Atlanta!

    - by Most Valuable Yak (Rob Volk)
    (Yeah yeah, technically it's in Alpharetta, but it's close enough.) Saturday…Saturday….Saturday…. September 17th.  TWO THOUSAND ELEVEN! OK, it's not a tractor pull, but it's even better:  FREE SQL SERVER TRAINING!  They have a bunch of great speakers lined up, and for some reason, me.  (Protip: be good friends with the program committee, have sufficient bribe funds, and if all else fails, lots of alcohol, drugs and a camera.  Ba-ZING!  You too can speak at SQL Saturday!) I will be presenting Revenge: The SQL! in a new and improved SQL Saturday themed presentation.  Actually, it's the same ol' presentation, I just updated the slide theme to match the new SQL Saturday website design.  (Yeah guys, thanks for changing that a month ago.  So much for coasting on the old format.) Of course, you have your choice of three other SQL Saturdays in other cities that day, but come on, you really want to go to this one. #sqlsat89 #sqlsaturday #sqlkilt #sqlpass

    Read the article

  • Country specific content vs global content

    - by Ando
    I have a global product presentation website myproduct.com For certain countries I also own the country domain: myproduct.co.uk, myproduct.com.au, myproduct.es, myproduct.de, etc. The presentation website is translated in multiple languages and I set up redirects: myproduct.es will redirect to myproduct.com/es/, myproduct.de will redirect to myproduct.com/de/, etc. . The content so far is the same, just translated in different languages. The advantages are that it's easy to keep the content aligned - everything is managed from one centralized dashboard (I'm using Wordpress with qtranslate). Now I'm running into trouble as for different countries I want localized content - for UK I want to run different promotions and use a different reseller than for .com.au so I would like that users coming from myproduct.co.uk see something different than those coming from myproduct.com.au (and not be redirected to myproduct.com as they are right now). How can I achieve this? I could duplicate the whole main website and modify only certain parts but then I would have a lot of duplicate content (e.g. info about how the product works) and I would have pages that are likely to change (FAQ page) that I would have to keep updated over all websites. I can duplicate only partially the main website: on the localized website I would have only the pages that are different and then all other links would point to the .com site. This would solve the duplication problem but would cause confusion for the user as you would navigate from .co.uk to .com without noticing and then wonder how to get back. Other, better option?

    Read the article

  • Retrofit WebForms with ASP.NET MVC - NoVa Code Camp 2010.2 Demo

    - by Soe Tun
    Thank you to everyone who attended my Retrofit WebForms with ASP.NET MVC session at NoVa Code 2010.2. It was a fun event for me and I hope you had a great time and learned something from it. I wish I had more time to go over some more important topics in more detail. I *promise* I will be writing blog post series about it since I'll have some vacation time during the December holidays to cover some topics that I didn't get to cover in detail.   Please note that the ".bak" file included in the zip file is a SQL Server Database backup file. You have to restore it on your Database server to run it with the source code demo.   Please feel free to ask me about the demo project through Twitter or from this blog post. I'll be glad to help you out. If you want me to give this presentation at your .NET User Group, please let me know and I'll be honored to speak there also.   Again, thank you all and have a great holiday season. Here is the download link to my Demo project Zip file with the PowerPoint presentation in it. Please let me know if the link doesn't work.

    Read the article

  • LiveMeeting VC PowerShell PASS – Troubleshooting SQL Server with PowerShell

    - by Laerte Junior
    Guys, join me on Wednesday July 18th 12 noon EDT (GMT -4) for a presentation called Troubleshooting SQL Server With PowerShell. It will be in English, so please make allowances for this. I’m sure that you’re aware that my English is not perfect, but it is not so bad. I will do my best, you can be sure. The registration link will be available soon from PowerShell.sqlpass.org, so I hope to see you there. It will be a session without slides. Just code; pure PowerShell code. Trust me, We will see a lot of COOL stuff.Big thanks to Aaron Nelson (@sqlvariant) for the opportunity! Here are some more details about the presentation: “Troubleshooting SQL Server with PowerShell – The Next Level’ It is normal for us to have to face poorly performing queries or even complete failure in our SQL server environments. This can happen for a variety of reasons including poor Database Designs, hardware failure, improperly-configured systems and OS Updates applied without testing. As Database Administrators, we need to take precaution to minimize the impact of these problems when they occur, and so we need the tools and methodology required to identify and solve issues quickly. In this Session we will use PowerShell to explore some common troubleshooting techniques used in our day-to-day work as s DBA. This will include a variety of such activities including Gathering Performance Counters in several servers at the same time using background jobs, identifying Blocked Sessions and Reading & filtering the SQL Error Log even if the Instance is offline The approach will be using some advanced PowerShell techniques that allow us to scale the code for multiple servers and run the data collection in asynchronous mode.

    Read the article

  • How can I disable recent documents in Unity?

    - by detly
    How do I disable the tracking and display of recently opened files (and whatever else is remembered) in a default installation of Ubuntu 11.10? (Note that this is not a duplicate of How can I keep recent files from appearing in Unity?, since that question and its answers are concerned with temporary and specific filtering. I want to disable it completely for a single user account.) Okay, to deflect the inevitable and expand on my motivation... While trawling the usual forums and Google results for a solution, it (unsurprisingly) seems that the near-universal use cases for this request are either browsing porn or Warhammer research. And the obvious solution to this is to create another user account to contain all evidence. However, this is not why I'm asking, and I don't say that to get all high and mighty about it, it's because this answer won't help. (Even though I really don't have any interest in Warhammer, and I have no idea how that paint pot and brush ended up in my drawer, no that's not glue on my thumb, etc.) My actual use case is that I use my personal laptop for presentations in different circles of my life. I have a user account set up with all the settings I like for presentations (shortcuts, small launcher, default associations, etc). But I don't want an accidental keystroke (or the find dialog) to display other recent presentations I've given, or the files I used in composing the presentation, or whatever. I also don't want to have to recreate this profile for every single presentation I might give. I just want a nice little isolated, memoryless, clean corner of my notebook for public display.

    Read the article

  • SharePoint Saturday Huntsville Wrap Up

    - by Mark Rackley
    So, Cathy Dew (@catpaint1) and company put on a great SharePoint Saturday event this past weekend. I got to hang out with some old friends and meet some new ones. I’d list you all, but I’d undoubtedly miss someone and don’t want to offend anyone.  Although I find it odd that I see @MossLover now more since she moved to New Jersey than when she lived next door in Kansas City… what’s up with that? Anyway, Cathy did a tremendous job organizing the event.  Everything went smoothly and everyone had a great time. Maybe I can talk her into organizing the rest of SharePoint Saturday Ozarks on June 12th… you know that’s coming up? right? While you’re here why not go ahead and register right now at: http://spsozarks.eventbrite.com/  Yes.. that was a shameless plug… I did my default presentation on “Wrapping Your Head Around the SharePoint Beast”. This continues to be my most popular presentation. I try to tweak it every time and I always have fun doing it. I get to pick on people and they pick on me back, but I always manage to learn something new when I present it. I had a great interactive crowd and they didn’t throw anything at me.  All in all I consider it a success.  Thanks for coming if you attended!  You can get the slides here:  SharePoint Saturday Huntsville - Wrapping Your Head Around the SharePoint Beast Next up for me is SharePoint Saturday DC on May 15th.  Wow this is going to be a huge event with space for 1500 attendees.. no, that is not a typo!  Stop me and say hi if you are able to make it!!

    Read the article

  • The Enterprise Side of JavaFX: Part Two

    - by Janice J. Heiss
    A new article, part of a three-part series, now up on the front page of otn/java, by Java Champion Adam Bien, titled “The Enterprise Side of JavaFX,” shows developers how to implement the LightView UI dashboard with JavaFX 2. Bien explains that “the RESTful back end of the LightView application comes with a rudimentary HTML page that is used to start/stop the monitoring service, set the snapshot interval, and activate/deactivate the GlassFish monitoring capabilities.”He explains that “the configuration view implemented in the org.lightview.view.Browser component is needed only to start or stop the monitoring process or set the monitoring interval.”Bien concludes his article with a general summary of the principles applied:“JavaFX encourages encapsulation without forcing you to build models for each visual component. With the availability of bindable properties, the boundary between the view and the model can be reduced to an expressive set of bindable properties. Wrapping JavaFX components with ordinary Java classes further reduces the complexity. Instead of dealing with low-level JavaFX mechanics all the time, you can build simple components and break down the complexity of the presentation logic into understandable pieces. CSS skinning further helps with the separation of the code that is needed for the implementation of the presentation logic and the visual appearance of the application on the screen. You can adjust significant portions of an application's look and feel directly in CSS files without touching the actual source code.”Check out the article here.

    Read the article

  • SQL Server 2008 R2 Launch Event - Montreal

    - by guybarrette
    If you’re into SQL Server, you may want to attend the free 2008 R2 launch event that will take place on May 26th, 2010 in Montreal. Agenda: 8:00 - 9:00am : Registration and Breakfast 9:00 – 9:15am:  Welcome and Introductions 9:15 – 10:00am:  Keynote Presentation 10:00 - 10:15am: Morning break 10:15 – 11:45am: SQL Server Presentation 11:45 – 12:45pm: Lunch 12:45 – 1:45pm: Track Session 1 1:45 – 2:45pm: Track Session 2 2:45 – 3:00pm: Afternoon break 3:00 - 4:00pm: Track Session 3 Track Descriptions DBA TRACK Session 1: Ensure Business Continuity with SQL Server 2008 R2,  Windows Server 2008 & Hyper-V Live Migration Session 2: Simplify management of your SQL Server data platform with Multi-server Management Session 3: Deliver unprecedented access to business-critical data at a lower TCO with SQL Server 2008 R2 Parallel Data Warehouse BI TRACK Session1: Enable Managed Self-service BI with Power Pivot for Excel and SharePoint 2010 Session 2: Achieve Rapid Reporting with Reporting Services and Report Builder 3.0 Session 3: Importance of Master Data Management Dev - Visual Studio TRACK Session 1: Developing SQL Applications with Visual Studio 2010 Session 2:Managing Change for SQL Server applications using Team Foundation Server  Session 3: Targeting SQL Azure using Visual Studio   Register here var addthis_pub="guybarrette";

    Read the article

  • Teach Your Kid to Code Coming to Philly.NET

    - by Steve Michelotti
    Originally posted on: http://geekswithblogs.net/michelotti/archive/2014/05/20/teach-your-kid-to-code-coming-to-philly.net.aspxTomorrow night (Wednesday, May 21) my son and I will be at Philly.NET presenting Teach Your Kid to Code. Bring your kid out to Philly.NET with you for a fun evening! After our first talk, I’ll then be giving an introduction to TypeScript. Of any presentation I’ve ever given, this is my favorite: Have you ever wanted a way to teach your kid to code? For that matter, have you ever wanted to simply be able to explain to your kid what you do for a living? Putting things in a context that a kid can understand is not as easy as it sounds. If you are someone curious about these concepts, this is a “can’t miss” presentation that will be co-presented by Justin Michelotti (6th grader) and his father. Bring your kid with you to Philly.NET for this fun and educational session. We will show tools you may not have been aware of like SmallBasic and Kodu – we’ll even throw in a little Visual Studio and JavaScript. Concepts such as variables, conditionals, loops, and functions will be covered while we introduce object oriented concepts without any of the confusing words. Kids are not required for entry!

    Read the article

  • TechEd North America 2012-Day 4 #msTechEd #teched

    - by Marco Russo (SQLBI)
    I hadn’t time yesterday to write a blog post before of the beginning of the day and I recover now that I’m already back to Europe. I spent many hours at the Microsoft booth meeting people who asked questions about Tabular, Power View and PowerPivot. I have to say that I’m really glad so many people started using PowerPivot and of the large interest around Tabular. During my BISM: Multidimensional vs. Tabular I’ve been helped by Alberto during the demo (we joked about he was the demo monkey) and the feedback received are good. I tried to compare the strength and weakness of the two modeling options without spending time describing the area in which they are similar. During the days before I had many discussions about scenarios based on snapshots and I added a few slides to the presentation in order to cover this area that I thought was marginal but seems to be a very common one. To know more, watch the presentation when it will be available or wait for some article I’ll write in the future describing these patterns. In less than 10 days, I’ll be at TechEd Europe and I’m really looking forward to meet other Tabular developers and PowerPivot users there!

    Read the article

  • How to use Nexus groups with Hudson to deploy artifacts post-build?

    - by John
    Hi there. I'm currently setting up Hudson to push artifacts to my Nexus repository upon succesful builds. Unfortunately I am having some trouble with getting Hudson to deploy using Nexus groups. I have two groups, upbeat.nexus (private) and public.nexus (public). I've set up the associated repositories in Nexus already. Here's my settings.xml: <settings> <mirrors> <mirror> <id>upbeat.nexus</id> <mirrorOf>*</mirrorOf> <url>http://localhost:8099/nexus/content/groups/upbeat</url> </mirror> <mirror> <id>public.nexus</id> <mirrorOf>*</mirrorOf> <url>http://localhost:8099/nexus/content/groups/public</url> </mirror> </mirrors> <profiles> <profile> <id>upbeat.nexus</id> <repositories> <repository> <id>upbeat.central</id> <url>http://central</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </repository> </repositories> </profile> <profile> <id>public.nexus</id> <repositories> <repository> <id>public.central</id> <url>http://central</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </repository> </repositories> </profile> </profiles> <servers> <server> <id>upbeat.nexus</id> <username>build</username> <password></password> </server> <server> <id>public.nexus</id> <username>build</username> <password></password> </server> </servers> <activeProfiles> <activeProfile>upbeat.nexus</activeProfile> <activeProfile>public.nexus</activeProfile> </activeProfiles> In Hudson, when setting the "Deploy artifacts to Maven repository", I need to specify the repository URL and the repository ID. I've set the repository ID to "public.nexus" but if I set the URL to http://forge.upbeat.no/nexus/content/repositories/public and the ID to public.nexus I get the following error: Deploying artifacts to http://forge.upbeat.no/nexus/content/repositories/public Deploying the main artifact pom.xml [INFO ] Retrieving previous build number from public.nexus [INFO ] repository metadata for: 'snapshot com.upbeat.appl:skuldweb:1.0-SNAPSHOT' could not be found on repository: public.nexus, so will be created ERROR: Error deploying artifact: Failed to transfer file: http://forge.upbeat.no/nexus/content/repositories/public/com/upbeat/appl/skuldweb/1.0-SNAPSHOT/skuldweb-1.0-SNAPSHOT.pom. Return code is: 400 org.apache.maven.artifact.deployer.ArtifactDeploymentException: Error deploying artifact: Failed to transfer file: http://forge.upbeat.no/nexus/content/repositories/public/com/upbeat/appl/skuldweb/1.0-SNAPSHOT/skuldweb-1.0-SNAPSHOT.pom. Return code is: 400 at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:94) at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:119) at hudson.maven.reporters.MavenAggregatedArtifactRecord.deploy(MavenAggregatedArtifactRecord.java:79) at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:109) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:580) at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:598) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528) at hudson.model.Run.run(Run.java:1264) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:306) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:124) Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://forge.upbeat.no/nexus/content/repositories/public/com/upbeat/appl/skuldweb/1.0-SNAPSHOT/skuldweb-1.0-SNAPSHOT.pom. Return code is: 400 at org.apache.maven.wagon.providers.http.LightweightHttpWagon.put(LightweightHttpWagon.java:172) at org.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(DefaultWagonManager.java:244) at org.apache.maven.artifact.manager.DefaultWagonManager.putArtifact(DefaultWagonManager.java:160) at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:80) ... 12 more Finished: FAILURE Any tips on how to deploy to a group so I don't have to specify (in Hudson) whether or not I am building a snapshot or a release version, and instead have it look at the version-tag in the pom to automatically place the artifact in the correct repository?

    Read the article

  • ASP.NET MVC: Render checkbox list from MultiSelectList

    - by aximili
    How do you associate a MultiSelectList with a list of checkboxes? eg. I pass something like this to the model model.Groups = new MultiSelectList(k.Groups, "Id", "Name", selectedGroups) How should I render it? This doesn't work <% foreach (var item in Model.Groups.Items) { %> <input type="checkbox" name="groups" value="<%=item.Value%>" id="group<%=item.Value%>" checked="<%=item.Selected?"yes":"no"%>" /> <label for="group<%=item.Value%>"><%=item.Text%></label> <% } %> Error CS1061: 'object' does not contain a definition for 'Value'... Is there a HTML Helper method that I can use? (Then, unless it is straightforward, how should I then get the selected values back on the Controller when the form is submitted?)

    Read the article

  • TextBoxFor rendering to HTML with prefix on the ID attribute

    - by msi
    I have an ASPNET MVC 2 project. When I use <%= Html.TextBoxFor(model => model.Login) %> the TexBoxFor will render as <input id="Login" name="Login" type="text" value="" /> Field in the model is [Required(ErrorMessage = "")] [DisplayName("Login")] public string Login { get; set; } Can I made id and name attribute with some prefix? Like <input id="prefixLogin" name="prefixLogin" type="text" value="" /> Thanks to all.

    Read the article

  • Proper way to add record to many to many relationship in Django

    - by blcArmadillo
    First off, I'm planning on running my project on google app engine so I'm using djangoappengine which as far as I know doesn't support django's ManyToManyField type. Because of this I've setup my models like this: from django.db import models from django.contrib.auth.models import User class Group(models.Model): name = models.CharField(max_length=200) class UserGroup(models.Model): user = models.ForeignKey(User) group = models.ForeignKey(Group) On a page I have a form field where people can enter a group name. I want the results from this form field to create a UserGroup object for the user - group combination and if the group doesn't yet exist create a new Group object. At first I started putting this logic in the UserGroup class with a add_group method but quickly realized that it doesn't really make sense to put this in the UserGroup class. What would the proper way of doing this be? I saw some stuff about model managers. Is this what those are for?

    Read the article

  • ASP.NET MVC Html.Display() using ViewData?

    - by JK
    When I use Html.DisplayFor() using a property of the model, it comes out nicely with both a label for the property name and a textbox or label with the property value: Html.DisplayFor(model => model.FirstName) // renders as First Name: Joe Smith But if I try to use the same for something that is in ViewData, it doesn't seem to have any way to specify the text that will be used in the label in the rendered html: Html.Display(ViewData["something"].ToString()) // renders as (no label) something The other Html.Display() parameters don't look helpful: Html.Display(ViewData["something"].ToString(), "TemplateName", "HtmlElementId", {additionalData}) It looks like the only place I might pass the label is with the additionalData param, but I haven't found any examples or docs on how to do this.

    Read the article

  • MVC2 Checkbox problem...

    - by BitFiddler
    When I used the html Helper Checkbox, it produces 2 form elements. I understand why this is, and I have no problem with it except: The un-checking of the checkbox does not seem to be in sync with the 'hidden' value. What I mean is that when I have a bunch of checkboxes being generated in a loop: <%=Html.CheckBox("model.MarketCategories[" & i & "].Value", category.Value)%> and the user deselects and checkbox and the category.Value is FALSE, the code being generated is: <input checked="checked" id="model_MarketCategories_0__Value" name="model.MarketCategories[0].Value" type="checkbox" value="true" /> <input name="model.MarketCategories[0].Value" type="hidden" value="false" /> This is wrong since the Value is False the checkbox should NOT be checked. Any ideas why this is happening?

    Read the article

  • List display names from django models

    - by Ed
    I have an object: POP_CULTURE_TYPES = ( ('SG','Song'), ('MV', 'Movie'), ('GM', 'Game'), ('TV', 'TV'), ) class Pop_Culture(models.Model): name = models.CharField(max_length=30, unique=True) type = models.CharField(max_length=2, choices = POP_CULTURE_TYPES, blank=True, null=True) Then I have a function: def choice_list(request, modelname, field_name): mdlnm = get.model('mdb', modelname.lower()) mdlnm = mdlnm.objects.values_list(field_name, flat=True).distinct().order_by(field_name) return render_to_response("choice_list.html", { 'model' : modelname, 'field' : field_name, 'field_list' : mdlnm }) This gives me a distinct list of all the "type" entries in the database in the "field_list" variable passed in render_to_response. But I don't want a list that shows: SG MV I want a list that shows: Song Movie I can do this on an individual object basis if I was in the template object.get_type_display But how do I get a list of all of the unique "type" entries in the database as their full names for output into a template? I hope this question was clearly described. . .

    Read the article

  • VS 2010 and Entity Framework: accessing SQL Server 2000 databases

    - by pcampbell
    Consider a Visual Studio 2010 project whose requirement is to model the data using Entity Framework. The datasource is a SQL Server 2000 database. The first step is creating a new ADO.NET Entity Data Model item. The Entity Data Model Wizard prompts for a Data Connection. When creating a new Connection, you will need to use a provider other than SqlClient. Usually it's SQLOLEDB. The list of data providers only has SqlClient or ".NET Framework Data Provider for SQL Server". Is there a work-around for Visual Studio 2010 to create or use data connections to SQL Server 2000 using the Entity Framework?

    Read the article

  • Sorting deeply nested attributes in Rails

    - by Senthil
    I want to be able to drag and drag App model which is nested under Category model. http://railscasts.com/episodes/196-nested-model-form-part-1 's the Railscast I've tried to follow. Category controller def move params[:apps].each_with_index do |id, index| Category.last.apps.update(['position=?', index+1], ['id=?', Category.last.id]) end render :nothing => true end I'm able to sort Categories with something similar, but since I'm updating an attribute, I'm having trouble. def sort params[:categories].each_with_index do |id, index| Category.update_all(['position=?', index+1], ['id=?', id]) end render :nothing => true end Any help is appreciated.

    Read the article

  • Database design for summarized data

    - by holden
    I have a new table I'm going to add to a bunch of other summarized data, basically to take some of the load off by calculating weekly avgs. My question is whether I would be better off with one model over the other. One model with days of the week as a column with an additional column for price or another model as a series of fields for the DOW each taking a price. I'd like to know which would save me in speed and/or headaches? Or at least the trade off. IE. ID OBJECT_ID MON TUE WED THU FRI SAT SUN SOURCE OR ID OBJECT_ID DAYOFWEEK PRICE SOURCE

    Read the article

  • Why does this render as a list of "System.Web.Mvc.SelectListItem"s?

    - by JMT
    I'm trying to populate a DropDownList with values pulled from a property, and my end result right now is a list of nothing but "System.Web.Mvc.SelectListItem"s. I'm sure there's some minor step I'm omitting here, but for the life of me I can't figure out what it is. The property GET generating the list: public IEnumerable<SelectListItem> AllFoo { get { var foo = from g in Bar orderby g.name select new SelectListItem { Value = g.fooid.ToString(), Text = g.name }; return foo.AsEnumerable(); } } The controller code: public ActionResult Edit(string id) { // n/a code ViewData["fooList"] = new SelectList(g.AllFoo, g.fooid); return View(model); } The view code: <%= Html.DropDownListFor(model => model.fooid, ViewData["fooList"] as SelectList) %>

    Read the article

  • Best way of implementing DropDownList in ASP.NET MVC 2?

    - by Kelsey
    I am trying to understand the best way of implementing a DropDownList in ASP.NET MVC 2 using the DropDownListFor helper. This is a multi-part question. First, what is the best way to pass the list data to the view? Pass the list in your model with a SelectList property that contains the data Pass the list in via ViewData How do I get a blank value in the DropDownList? Should I build it into the SelectList when I am creating it or is there some other means to tell the helper to auto create an empty value? Lastly, if for some reason there is a server side error and I need to redisplay the screen with the DropDownList, do I need to fetch the list values again to pass into the view model? This data is not maintained between posts (at least not when I pass it via my view model) so I was going to just fetch it again (it's cached). Am I going about this correctly?

    Read the article

  • Sumproduct using Django's aggregation

    - by Matthew Rankin
    Question Is it possible using Django's aggregation capabilities to calculate a sumproduct? Background I am modeling an invoice, which can contain multiple items. The many-to-many relationship between the Invoice and Item models is handled through the InvoiceItem intermediary table. The total amount of the invoice—amount_invoiced—is calculated by summing the product of unit_price and quantity for each item on a given invoice. Below is the code that I'm currently using to accomplish this, but I was wondering if there is a better way to handle this using Django's aggregation capabilities. Current Code class Item(models.Model): item_num = models.SlugField(unique=True) description = models.CharField(blank=True, max_length=100) class InvoiceItem(models.Model): item = models.ForeignKey(Item) invoice = models.ForeignKey('Invoice') unit_price = models.DecimalField(max_digits=10, decimal_places=2) quantity = models.DecimalField(max_digits=10, decimal_places=4) class Invoice(models.Model): invoice_num = models.SlugField(max_length=25) invoice_items = models.ManyToManyField(Item,through='InvoiceItem') def _get_amount_invoiced(self): invoice_items = self.invoiceitem_set.all() amount_invoiced = 0 for invoice_item in invoice_items: amount_invoiced += (invoice_item.unit_price * invoice_item.quantity) return amount_invoiced amount_invoiced = property(_get_amount_invoiced)

    Read the article

  • Core Location in iPhone Simulator 3.2 (iPad)

    - by choise
    So, i'm trying to port my app to iPad. I'm using CoreLocation. Apple says the iPad does have Location: Wi-Fi Digital compass Assisted GPS (Wi-Fi + 3G model) Cellular (Wi-Fi + 3G model) so it should be possible to get the position of my ipad (at least with 3g model) about 3km radius would be enought. but it doesnt work in simulator (3.2 ipad) (running 3.1.3 in simulator simulates me cupertino). is there a way to get the position in simulator (3.2 ipad) ? i live in germany and here the ipad isnt released yet, so i cannot test it on my device. thanks!

    Read the article

  • Databinding a ListBox with SelectionMode = Multiple

    - by David Veeneman
    I have a WPF ListBox that I would like to Enable multiple selection in the ListBox, and Databind the ListBox to my view model. These two requirements appear to be incompatible. My view model has an ObservableCollection<T> property to bind to this ListBox; I set up a binding in XAML from the property to the ListBox.SelectedItems property. When I compiled, I got an error saying that the SelectedItems property was read only and could not be set from XAML. Am I binding to the wrong control property? Is there a way to bind a multiple-selection ListBox in XAML to a view model collection property? Thanks for your help.

    Read the article

< Previous Page | 163 164 165 166 167 168 169 170 171 172 173 174  | Next Page >