Daily Archives

Articles indexed Tuesday March 23 2010

Page 15/130 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • How to bind form collection back to custom model object that uses 2 custom objects in asp.net mvc?

    - by baijajusav
    What I'm trying to do is rather basic, but I might have my facts mixed up. I have a details page that has a custom class as it's Model. The custom class uses 2 custom objects with yet another custom object a property of one of the 2. The details page outputs a fair amount of information, but allows the user to post a comment. When the user clicks the post button, the page gets posted to a Details action that looks something like this: [AcceptVerbs(HttpVerbs.Post)] public ActionResult Details(VideoDetailModel vidAndComment) { ....} The only fields on the form that is posted are CommentText and VideoId. Here is what the VideoDetailModel looks like. public class VideoDetailModel { public VideoDetailModel() { Video = new VideoDTO(); Comment = new CommentDTO(); } public VideoDetailModel(VideoDTO vid) { Video = vid; Comment = new CommentDTO(); } public VideoDTO Video { get; set; } public CommentDTO Comment { get; set; } } VideoDTO has a few properties, but the ones I need are VideoId. CommentDTO's pertinent properties include CommentText (which is posting correctly) and a UserDTO object that contains a userId property. Everything other than the CommentText value is not being posted. I also have the following line on the ascx page, but the model value never gets posted to the controller. Html.Hidden("Model.Video.VideoId", Model.Video.VideoId); I'm really not sure what I'm missing here. I suppose if I added more form fields for the properties I need, they would get posted, but I only need 1 form entry field for the CommentText. If I could get the same Model objects value that were sent to the page to post with the page, that would help. I'll be happy to make any clarifications needed here. I'm just at loss as to what's going on.

    Read the article

  • JavaFX MediaPlayer: problem with setting of mute and volume properties

    - by lady_disaster
    Hi, first of all sorry for my bad english, I'm Italian... :) I'm developing with JavaFX and I'm new of it... I've an instance of a MediaPlayer and I can play songs, but if I set the volume properties to 0 or to other values the volume doesn't change and the song plays at the maximum. If I set the mute properties to true it's the same thing!!! I think that the setting of volume and mute properties doesn't work! Have you found this problem? Do you know which is the solution? Where am I wrong? Please help me... Thanks in advance!!!!

    Read the article

  • Make content 100% height with scrollbar

    - by Ben Sinclair
    I am using CKEditor (http://ckeditor.com) and I've created my own custom file browser... Problem is, when you open the filebrowser, it opens it in a new popup window and has no scrollbars. I submitted a support ticket 2 weeks ago to find out how to add the scrollbars and no answer. I can't find what to edit in the code either... So what I plan to do is make it scroll using CSS... I found this post about making the body 100% (http://stackoverflow.com/questions/886809/css-quirks-html-4-01-strict-100-body-height-and-scrollbars) but it doesn't add scrollbars. Any ideas how I can force scrollbars using CSS?

    Read the article

  • C++ : C++ Primer (Stanley Lipmann) or The C++ programming language (special edition)

    - by Kim
    I have a Computer Science degree (long2 time ago) .. I do know Java OOP but i am now trying to pick up C++. I do have C and of course data structure using C or pascal. I have started reading Bjarne Stroustrup book (The C++ Programming Language - Special Edition) but find it extremely difficult esp. some section which i don't have exposure such as Recursive Descent Parser (chapter 6). In terms of the language i don't foresee i have problem but i have problem as mentioned cos' those topic are usually covered in a Master Degree program such as construction of compiler. I just bought a book called C++ primer (Stanley Lipmann) which i heard it is a very good book for C++. Only setback is it's of course no match with the amount of information from the original C++ creator. Please advice. Thanks.

    Read the article

  • ANTLR parser hanging at proxy.handshake call

    - by Peter Boughton
    I am attempting to get a basic ECMAScript parser working, and found a complete ANTLR grammar for ECMAScript 3, which appears to compile ok and produces the appropriate Lexer/Parser/Walker Java files. (Running inside ANTLR IDE plugin for Eclipse 3.5) However, when actually trying to use it with some simple test code (following guide on ANTLR wiki), it just hangs when trying to create the parser: CharStream MyChars = new ANTLRFileStream(FileName); // FileName is valid ES3Lexer MyLexer = new ES3Lexer(MyChars); CommonTokenStream MyTokens = new CommonTokenStream(MyLexer); MyTokens.setTokenSource(MyLexer); ES3Parser MyParser = new ES3Parser( MyTokens ); // hangs here ES3Parser.program_return MyReturn = MyParser.program(); I've tracked down the problem to inside the ES3Parser constructor, where it's calling the function proxy.handshake() - before this line I can successfully do System.out.println("text") but after it I get nothing. So, how do I go about finding out why it's hanging, and stopping it - or even just bypassing this section (can/should I disable debugging?) - so long as that lets it work and allows me to get on with doing useful stuff.

    Read the article

  • How to specify dynamic field names in a Linq where clause?

    - by Dr. Zim
    If you create a Filter object that contains criteria for Linq that normally goes in a where clause like this: var myFilterObject = FilterFactory.GetBlank(); myFilterObject.AddCondition("Salary", "lessThan", "40000"); var myResult = myRepository.GetEmployees(myFilterObject); How would you match the Linq field to the Field Name without using a big case statement? return from e in db.Employee where e.Salary < 40000 select new IList<EmployeeViewModel> { Name= e.name, Salary= e.Salary }; I assume you need to send an object to the Repository that specifies filtering so that you only pull what records you need. I assume Linq doesn't pre-compile (unless you create a customized delegate and function), so you should be able to dynamically specify which fields you want to filter. It would be nice if you could do something like e["Salary"] like some type of Expando Object.

    Read the article

  • "Failed to find or load the registered .Net Framework Data Provider" with MySQL + ASP.NET

    - by Malachi
    How do we repair this? This question has been sort of addressed many times around the internet, but it's always a workaround. Always copying the MySql.data.dll into your bin directory, or explicitly stating what version you want. What is the "proper" approach to using DbProvderFactory for MySQL with ASP.NET? I'd like to be able to develop locally and not worry what version they have installed on the server. As it stands, if I do copy up my own version I have to make sure it's the one they use. Seems easy to break.

    Read the article

  • Is it possible to resize text to fit a fixed size div?

    - by int3
    This seems like a pretty natural use case to me, though I haven't been able to find anything on it: Say I have a fixed-width div that is dynamically populated with some number. What's the best way to ensure that numbers with more digits take smaller font sizes such that they fit nicely into that fixed width? Is there some CSS property for this, or do I have to resort to Javascript hackage?

    Read the article

  • SharePoint: what does "System.Runtime.InteropServices.COMException (0x81071003)" mean?

    - by kpinhack
    Hallo, i've got some code that imports documents into a SharePoint (WSS 3.0 SP1) document-library. That code works most of the time without any problems, but sometimes the document is not imported into the document-library and i get this nasty exception instead. Microsoft.SharePoint.SPException: Unable to update the information in the Microsoft Office document myFileName. ---> System.Runtime.InteropServices.COMException (0x81071003): Unable to update the information in the Microsoft Office document myFileName. bei Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish) bei Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish) What does this exception mean? And why does it occur only sometimes? Thanks!

    Read the article

  • Getting rid of Plesk on a VPS

    - by TomA
    I've been using a relatively expensive VPS for hosting about 30 domains and I want to migrate to a cheaper one, without Plesk. Both use CentOS. My users will not care, they don't use Plesk anyway. But I will not be able to use it for creating new virtual hosts, FTP accounts etc. I'm not a commandline guru, esp. not in a server environment. Is there a free Plesk alternative for these purposes? I need to: Create a new virtual host with it's own FTP account Setup some basic FTP quota I don't need: DNS management (the new VPS service has an external DNS management GUI) Mail server management (I use Google Apps) Any suggestions welcome, from Plesk alternatives to "RTFM" or links to tutorials.

    Read the article

  • using iptables to change a destination port but keep the ip the same.

    - by Scott Chamberlain
    I am playing around with transparent proxies, The current way I am doing things is the program makes a request to a computer on port 80, I use iptables -t nat -A OUTPUT -p tcp --destination-port 80 -j REDIRECT --to-port 1234 to redirect to my proxy that I am playing with. the proxy will send out a request to port 81 (as all outbound port 80 are being fed back in to the proxy so I want to do something like iptables -t nat -A OUTPUT -p tcp --destination-port 81 -j DNAT --to-destination xxxx:80 The problem lies with the xxxx part. How do I change the destination port without changing changing the destination ip? Or am I doing this setup completely wrong, I am learning after all and constructive criticism is definitely appreciated.

    Read the article

  • Remote desktop to dedicated server running CentOS 5

    - by Saif Bechan
    I have a dedicated server running CentOS. I was wondering if it is possible to remote desktop to this server. If this is possible can someone explain to me how this works. I have downloaded a VMware image of CentSO, and i can run it with the VMware player, but I don't know what to do next. If this is possible can someone guide me in the right direction.

    Read the article

  • Changing Text in Visio Org Chart Shape Changes Multiple Shapes' Text

    - by Eric
    I have inherited an organizational chart that was created in Visio 2003. I am updating it with Visio 2007. When changing the text in one shape, such as a person's title, multiple shapes nearby change their text to the same. For example, if I change Bob's title from Programmer to Programmer/DBA then Wendy's text will change to "Bob - Programmer/DBA". Some changes update three or four other boxes. Some changes will only update one box. My thought is the originator copied or duplicated the one box to create multiple boxes and it created some type of link between them. How do I remove this link? Thanks!

    Read the article

  • PHP script not automatically updating when moved to another server

    - by user32007
    A friend built a ranking system on his site and I am trying to host in on mine via WordPress and Go Daddy. It updates for him but when I load it to my site, it works for 6 hours, but as soon as the reload is supposed to occur, it errors and I get a 500 timeout error. His page is at: jeremynoeljohnson .com/yakezieclub My page is currently at http://sweatingthebigstuff.com/yakezieclub but when you ?reload=1 it will give the error. Any idea why this might be happening? Any settings that I might need to change? Here is the top of the index.php file. I'm not sure which part of any of it is messing up. I literally uploaded the same code as him. Here's the reload part: $cachefile = "rankings.html"; $daycachefile = "rankings_history.xml"; $cachetime = (60 * 60) * 6; // every 6 hours, the cache refreshes $daycachetime = (60 * 60) * 24; // every 24 hours, the history will be written to // - or whenever the page is requested after 24 hours has passed $writenewdata = false; if (!empty($_GET['reload'])) { if ($_GET['reload']== 1) { $cachetime = 1; } } if (!empty($_GET['reloadhistory'])) { if ($_GET['reloadhistory'] == 1) { $daycachetime = 1; $cachetime = 1; } } if (file_exists($daycachefile) && (time() - $daycachetime < filemtime($daycachefile))) { // Do nothing } else { $writenewdata = true; $cachetime = 1; } // Serve from the cache if it is younger than $cachetime if (file_exists($cachefile) && (time() - $cachetime < filemtime($cachefile))) { include($cachefile); echo "<!-- Cached ".date('jS F Y H:i', filemtime($cachefile))." -->"; exit; } ob_start(); // start the output buffer ?>

    Read the article

  • How to resolve 'Error Dependency is not satisfiable: libascound2' on ubuntu

    - by michael
    Hi, I am trying to install skype-ubuntu-intrepid_2.1.0.91-1.i386.deb on ubuntu 8.04: But in the Package installer, I get 'Error Dependency is not satisfiable: libascound2'. And I have tried. $ sudo apt-get install libasound2 [sudo] password for novarra: Reading package lists... Done Building dependency tree Reading state information... Done libasound2 is already the newest version. The following packages were automatically installed and are no longer required: linux-headers-2.6.24-24-generic libdns35 linux-headers-2.6.24-24 Use 'apt-get autoremove' to remove them. I appreciate if anyone can help me with it.

    Read the article

  • Then files in my project folder used for what?

    - by william-hu
    I finished one project. But others want me give them the non-Compiled code.what's that? My project folder include: Classes:of course, the source code. build: I don't understand clearly. imagesrc: I added, include the images of my project. The others are the nib file. Give me the explanation in detail,thank you so much.

    Read the article

  • C# Sockets and Proxy Servers

    - by Tristan
    Hi Guys, I'm trying to make some source code for a library I downloaded work with a proxy server. The library uses sockets to connect to a server but if the client using the library is behind a proxy server it can't connect. Does anyone know how I can modify the socket to be able to connect to the server through a proxy server? I really want to just do this with the sockets in the library without having to change too much code to use WebRequest or something similar Cheers -Tristan

    Read the article

  • Any book on designing and implementing a CRPG engine?

    - by Fabzter
    Hi! First, let me tell you, I am not really interested in making my own rpg engine (at least not in the near future, hehe), but I do feel like I want to understand the internals of how a rpg engine works. Why? Well, because I like to read about programming and design, It keeps me motivated and excited, and because I know I will learn a lot, for, even when I have been programming for some years now, I never stop considering myself an ignorant... there are simply SO many things involving a game engine (specially rpg ones, like branching storylines, and items and economics!) I'm eager to know. I've been searching (and thus, finding) lots of info online, but it is never focused in what I'm interested (most of it talks about the mathematics and AI algorithms implementation, which I know quite well), which is the design of overall structure, patterns, scripting engine, decision engine... damn, so many things I can't even imagine, since I've never done any game programming. I hope you know have an idea of how I feel, and how I want to learn for the sake of learning, and why would I want you to tell me if you know if there exist books touching the topics that interest me the most.

    Read the article

  • [JavaScript] Continuous Progress Bar

    - by Goro
    Hello, I am trying to find the best option to create a simple progress bar that I need to be triggered periodically from within another JavaScript script. Every few minutes, a timer would cause the progress bar to start going from 0 to 100%. Once it reaches 100%, the bar would reset to 0. I am trying to implement a smooth animated version of the bar, like this one: http://www.webappers.com/progressBar/. (I tried adapting this particular one but I could not get it to work the way I described) I am looking into the jQuery UI ProgressBar: Is it possible to use it in the manner I have described? Thank you.

    Read the article

  • Channel Audio from .mp4?

    - by Kyle
    Hi there. I am at a loss here after searching around with no results. I am attempting to channel the audio specifically from an .mp4 for use in a driver. I am aware that there are programs which extract the audio from .mp4's, but I am looking for another approach without using external applications such as those.. is there any direction that someone can point me towards to solve this problem? Thanks, -K

    Read the article

  • WCF error service error message with shared classes

    - by sevenalive
    Source code: http://code.google.com/p/sevenupdate/source/browse/#hg/Source/SevenUpdate.Base SevenUpdate.Base.Sui cannot be used since it does not match imported DataContract. Need to exclude this type from referenced types. Now I tried unchecking reuse reference types and I was able to get my project to compile. but when sending a collection from the client it was never received or couldn't be deserialized on the server end. I really need this to work. Any help would be appreciated, the fullsource code is provided by google code.

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >