Search Results

Search found 208 results on 9 pages for 'anders svensson'.

Page 3/9 | < Previous Page | 1 2 3 4 5 6 7 8 9  | Next Page >

  • Create Views for object properties in model in MVC 3 application?

    - by Anders Svensson
    I have an Asp.Net MVC 3 application with a database "Consultants", accessed by EF. Now, the Consultant table in the db has a one-to-many relationship to several other tables for CV type information (work experience, etc). So a user should be able to fill in their name etc once, but should be able to add a number of "work experiences", and so on. But these foreign key tables are complex objects in the model, and when creating the Create View I only get the simple properties as editor fields. How do I go about designing the View or Views so that the complex objects can be filled in as well? I picture a View in my mind where the simple properties are simple fields, and then some sort of control where you can click "add work experience", and as many as needed would be added. But how would I do that and still utilize the model binding? In fact, I don't know how to go about it at all. (BTW, Program and Language stand for things like software experience in general, and natural language competence, not programming languages, in case you're wondering about the relationships there). Any ideas greatly appreciated! Here's the Create View created by the add View command by default: @{ ViewBag.Title = "Create"; } <h2>Create</h2> <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script> @using (Html.BeginForm()) { @Html.ValidationSummary(true) <fieldset> <legend>Consultant</legend> <div class="editor-label"> @Html.LabelFor(model => model.FirstName) </div> <div class="editor-field"> @Html.EditorFor(model => model.FirstName) @Html.ValidationMessageFor(model => model.FirstName) </div> <div class="editor-label"> @Html.LabelFor(model => model.LastName) </div> <div class="editor-field"> @Html.EditorFor(model => model.LastName) @Html.ValidationMessageFor(model => model.LastName) </div> <div class="editor-label"> @Html.LabelFor(model => model.UserName) </div> <div class="editor-field"> @Html.EditorFor(model => model.UserName) @Html.ValidationMessageFor(model => model.UserName) </div> <div class="editor-label"> @Html.LabelFor(model => model.Description) </div> <div class="editor-field"> @Html.EditorFor(model => model.Description) @Html.ValidationMessageFor(model => model.Description) </div> <p> <input type="submit" value="Create" /> </p> </fieldset> } <div> @Html.ActionLink("Back to List", "Index") </div> And here's the EF database diagram:

    Read the article

  • How do you make use of the provider independency in the Entity Framework?

    - by Anders Svensson
    I'm trying to learn more about data access and the Entity Framework. My goal is to have a "provider independent" data access layer (to be able to switch easily e.g. from SQL Server to MySQL or vice versa), and since the EF is supposed to be provider independent it seems like a good way to go. But how do you use this provider independence? I mean, I was expecting to be able to sort of "program to an interface", and then just be able to switch database provider. But as far as I can tell I'm only getting a concrete type to program against, an "Entities" class, e.g. in my case it is: UserDBEntities _context = new UserDBEntities(); What I would have expected to be able to switch provider easily was to have an interface e.g. like IEntities _context = new UserDBEntities(); Sort of like I can do with datasets... But maybe that isn't how it works at all with EF? Or do you just switch provider in the connectionstring, and the model stays the same?? Please remember that I'm a complete newbie at this EF, and rather inexperienced with databases in general, so I would really appreciate if you could be as clear as possible :-)

    Read the article

  • DIV inside TD to make it appear correctly

    - by Daniel Svensson
    Hi, I have a <table> generated from code-behind and now facing a problem. In one of the TD i need to have a DIV that is setup with JQuery so that when i click a link the DIV slideToggles. Now i need the TD belonging to that TR not to expand the TR. To solve this i have used an old trick that is to place the JQuery DIV inside another surrounding DIV with height 1px and make the TR not expanding with the heigth of the DIV that slides out. In IE the sliding DIV is partially under the table and in Firefox the DIV appears over the table but it's trasparent, the text from the data in the table shows thru. I have tried to alter the Z-index in various ways but it's no good. Anyone that has an idea or alternatively solution that has worked for them. HtmlGenericControl containerDiv = new HtmlGenericControl("div"); containerDiv.ID = "containerDiv"; containerDiv.Style.Add(System.Web.UI.HtmlTextWriterStyle.Width, "100%"); containerDiv.Style.Add(System.Web.UI.HtmlTextWriterStyle.Height, "1px"); containerDiv.Style.Add(System.Web.UI.HtmlTextWriterStyle.ZIndex, "999"); HtmlGenericControl innerDiv = new HtmlGenericControl("div"); innerDiv.ID = System.Guid.NewGuid().ToString() + "_annualDiv"; inner.Style.Add(System.Web.UI.HtmlTextWriterStyle.Width, "100%"); innerDiv.Style.Add(System.Web.UI.HtmlTextWriterStyle.Height, "300px"); innerDiv.Style.Add(System.Web.UI.HtmlTextWriterStyle.ZIndex, "1000"); innerDiv.Style.Add(System.Web.UI.HtmlTextWriterStyle.BorderStyle, "solid"); innerDiv.Style.Add(System.Web.UI.HtmlTextWriterStyle.BorderColor, "Black"); innerDiv.Style.Add(System.Web.UI.HtmlTextWriterStyle.BorderWidth, "1px"); innerDiv.Style.Add(System.Web.UI.HtmlTextWriterStyle.BackgroundColor, "white"); innerDiv.InnerHtml = "Here is a list of links coming later"; conDiv.Controls.Add(innerDiv);

    Read the article

  • Show data relationship in gridview with dropdownlist or similar?

    - by Anders Svensson
    I have data coming from two tables with a foreign key relationship - one User table containing users of the web application, and one Page table containing details about pages visited by each user. I would like to be able to view these data in a gridview or the like on a page. It's easy enough to just show the User table data like so (I'm using the Entity Framework and LINQ): UserDBEntities context = new UserDBEntities(); GridView1.DataSource = from user in context.UserSet select new { user.Ip, user.Count, user.Description, user.Referer }; GridView1.DataBind(); But how can I show the Page details? I'm not bent on any particular way of showing it, but the only idea I've been able to come up with is to have a dropdown list for each user in a column. But I can't figure out how to get the page data into such a dropdown list. The tables are associated with the primary/foreign key UserID. Any ideas would be welcome (dropdownlist solution or other)!

    Read the article

  • Javascript int variable from ASP.NET MVC Model data?

    - by Anders Svensson
    I need to get model data into a javascript variable and use it as an int to compare values. But I can only figure out how to get the model data as strings, otherwise the compiler complains. So how can I get the max and taskBudgetHours as int variables in the Javascript? <script type="text/javascript"> $(document).ready(function () { $("#taskForm").submit(function (e) { var taskBudgetHours = $('#BudgetHours').val(); var max = '<%: Model.Project.RemainingBudgetHours %>'; var test = 'test'; alert(taskBudgetHours); alert(max); if (taskBudgetHours <= max) { //This doesn't work, seems to treat it as strings... return true; } else { //Prevent the submit event and remain on the screen e.preventDefault(); alert('There are only ' + max + ' hours left of the project hours.'); return false; } }); return; }); </script>

    Read the article

  • Automatically update php loop with data pulled from database

    - by John Svensson
    SQL STRUCTURE CREATE TABLE IF NOT EXISTS `map` ( `id` int(11) NOT NULL AUTO_INCREMENT, `x` int(11) NOT NULL, `y` int(11) NOT NULL, `type` varchar(50) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; http://localhost/map.php?x=0&y=0 When I update the x and y via POST or GET, I would like to pull the new data from the database without refreshing the site, how would I manage that? Could someone give me some examples, because I am really stuck here. <?php mysql_connect('localhost', 'root', ''); mysql_select_db('hol'); $startX = $_GET['x']; $startY = $_GET['y']; $fieldHeight = 6; $fieldWidth = 6; $sql = "SELECT id, x, y, type FROM map WHERE x BETWEEN ".$startX." AND ".($startX+$fieldWidth). " AND y BETWEEN ".$startY." AND ".($startY+$fieldHeight); $result = mysql_query($sql); $positions = array(); while ($row = mysql_fetch_assoc($result)) { $positions[$row['x']][$row['y']] = $row; } echo "<table>"; for($y=$startY; $y<$startY+$fieldHeight; $y++) { echo "<tr>"; for($x=$startX; $x<$startX+$fieldWidth; $x++) { echo "<td>"; if(isset($positions[$x][$y])) { echo $positions[$x][$y]['type']; } else { echo "(".$x.",".$y.")"; } echo "</td>"; } echo "</tr>"; } echo "</table>"; ?>

    Read the article

  • How to use different providers for Linq to entities?

    - by Anders Svensson
    I'm trying to familiarize myself a bit more with database programming, and I'm looking at different ways of creating a data access layer for applications. I've tried out a few ways but there is such a jungle of different database technologies that I don't know what to learn. For instance I've tried using datasets with tableadapters. Using that I am able to switch data provider rather easily (by programming against the interfaces such as IDbConnection). This is one thing I would want to achieve. But I also know everyone's talking about LINQ, and I'm trying to get to know that a bit better too. So I have tried using Linq to Sql classes as the data access layer as well, but apparently this is not provider independent (works only for SQL Server). So then I read about the Entity Framework (which just as Linq to SQL apparently has gotten its share of bashing already...). It's supposed to be provider independent everybody says, but how? I tried out a tutorial to create an entity data model, but the only providers to choose from were SQL Server/Express. Just for learning purposes, I would like to know how to use the entity framework with MS Access/OleDb. Also, I would appreciate some input on what is the preferred database technology for data access. Is it LINQ still after all the bashing, or should you just use datasets because they are provider independent? Any pointers for what to learn would be great, because it's just too much to learn it all if I'm not going to use it in the end...!

    Read the article

  • Minimizing SQL transaction log file size on developer box running simple recovery model

    - by Anders Rask
    We have alot of SQL servers on development environment where we never take backup of the databases (TFS for code is enough). The (SharePoint) databases are all set to simple recovery model, but the log files, especially for the SharePoint configuration database is growing quite large and filling up our data drive on the SQL server. Since these log files are never used for anything, i would like advice on how to best minimize the size of these log files -or even disable them if possible. I'm not completely sure why the log files grow so large even on simple logging (checked for long running transactions (DBCC OPENTRAN) but found none). I guess the reason for the log files not being truncated is, that we dont take any backups, and hence Checkpoints arent reached. The autogrowth for log files are set to autogrow by 10% restricted to 2 gb, so i guess that is why Checkpoint (70%) arent reached here either. What would be the be best strategy to keep log files small (best case 0) without sacrificing performance (eg VLF fragmentation)?

    Read the article

  • When Installing Oracle Client 11.1.0.7 can I use a common directory for Oracle Base?

    - by Anders
    I am trying to install Oracle Client 11.1.0.7 on a Windows Server 2008 64-bit. To some this might not be rocket science but I can't understand what the options under the install screen "Specify Home Details" mean. The defaults given suggest that I use Oracle Base and install software under my own account name. It also suggests that each user should have a separate Oracle Base. This seems counter intuitive to me. I am doing a server install after all. All I want to use the installation for is to connect to an Oracle Database from Reporting Services. Can I safely ignore this and just accept the defaults? What are the implications if I change the location to a common directory?

    Read the article

  • Removing Duplicate entries in grub2 Ubuntu 9.10

    - by Anders
    I have made a custom grub2 menu however, both the default and the custom show together. So my grub looks like the list below, the bolded entries are my custom ones. How do I get rid of the duplicates? I have tried apt-get remove and deleting old kernels. I am a bit lost. Thanks! in Advance. ubuntu,linux ... ubuntu,linux recovery memtest memtest windows7 windows7 ubuntu linux ubuntu linux recover I have tried apt-get remove I have tried marking and removing older kernels. This is how I made my custom grub by the way. I copied and pasted the grub.cfg menuentry code into the custom one and just renamed the titles so it would be perfectly clear for the user who doesn't want to know what version # it is.

    Read the article

  • CruiseControl.Net - not able to see Project Statistics

    - by Anders Juul
    Hi all, I've made a reinstallation of the buildserver and can no longer see the standard graphs of project statistics. The error message shown is "Missing/Invalid statistics reports. Please check if you have enabled the Statistics Publisher, and statistics have been collected atleast once after that." To the best of my knowledge, the ccnet.config file has not been changed in this respect and by inspection it is verified that I have a Statistics / statisticsList-section for the project. Furthermore, the values appear in the Artifacts\statistics.csv and Artifacts\report.xml files. My guess would then be StatisticsGraph.xslt, which I have copied fresh from distribution to both Server\xlst and WebDashboard\xslt (why are they located in both places, by the way!?). Rebuild and check - still same error message. Any hints to how to debug this would be appreciated!

    Read the article

  • Can a site detect if I use AdBlock in Firefox?

    - by Anders
    I recently visited (an official) website in search for an episode of a TV-show. The site popped an information dialog stating that I had to disable AdBlock to see the content. Is this at all possible or is it just an educated guess? Does Firefox advertise what addons I have installed? If so: how and why does it work that way?

    Read the article

  • Gateway NE56R & mouse swipe gesture...how to disable?

    - by Anders
    Can anyone tell me how to shut off the swipe gesture mechanism on my computer? It's driving me crazy. I cannot use a single application without having my computer screen minimize every time I move my hand over the mouse following a mouse-click, pointer movement, etc. Having to maximize my spreadsheets, documents, and applications so much is undercutting my productivity. How some software engineer/inventor imagined that this mouse/gesture swipe gimmick would be helpful to computer users is inconceivable to me. It is a massive annoyance. I've found instructions online for disabling this obnoxious feature, but all the instructions involve messing with my registry, which I don't want to do. I will be SO GRATEFUL to any techie who can tell me how to disable this horrible mouse swipe mechanism without having to alter my registry! I'm using a Gateway NE56R Notebook, Windows 7 operating system, and an Inland USB Mouse (model no. 37535). Thank you in advance!

    Read the article

  • Full disk encryption on dual boot system using TrueCrypt

    - by Anders Hovgaard
    I'm thinking about encrypting my whole harddrive for example using TrueCrypt, which I've used for encrypting file containers for a while. It is possible to encrypt the whole harddisk through the program and then add a password secured bootloader before the actual bootloader. Is it possible to do this on a dualboot system with Windows 7 and Fedora 15 currently using Grub as the main bootloader? If so, is it possible to reinstall a system later or will that ruin the whole setup? Thanks

    Read the article

  • Limit on WMIC requests from a Windows Service

    - by Anders
    Hi all, Does anyone know if there is limit on how many wmic requests Windows can handle simultaneously if they are originating from a Windows service? The reason I'm asking is because my application fails when too many simultaneous requests have been initiated. I don't get any data back from the application. However, If I compile the Python application and run it as a stand alone application all will work fine. The wmic calls are looking like this: subprocess.Popen("wmic path Win32_PerfFormattedData_PerfOS_Memory get CommittedBytes", stdout=subprocess.PIPE, stderr=subprocess.PIPE) This makes me wonder, is there a limit Windows Services and what they can perform? I mean, if the .exe file can handle all requests, then it must be something to do with the fact that I have compiled it as a Windows service.

    Read the article

  • Get the number of tiffs in a multi-tiff with command line ImageMagick?

    - by Anders
    Is there a way to get the number of tiffs in a multi-tiff with a command line utility in ImageMagick? What I want to to is to extract (split) the multi-tiff into single files. However if the tiff only contains one tiff (is not a multi-tiff), I would like to do nothing at all... Also if I use the "%d"-option to name the output files I get the "%d" in the file name if it is only one. ...or is there another way to use ImageMagick to avoid strange filenames when converting?

    Read the article

  • Thecus N5200, disk has dropped out of RAID5

    - by Anders Ekdahl
    We have a Thecus 5200 NAS here at work with five WD Caviar Black 2TB disks in a RADI5 array. Yesterday, disk 4 dropped out of the array, and in the NAS web interface there's a warning about the RAID array being "degraded". When I go into Storage - Disks, disk 1 and 4 has a warning next to them. When I click on the warnings, this information about the disks are displayed: Tray Number 4 Model WD2001FASS-00W2B Power On Hours 2403 Hours Temperature Celsius 34 Reallocated Sector Count 66 Current Pending Sector 1447 Raw Read Error Rate 61 Seek Error Rate 0 Hardware ECC Recovered N/A Tray Number 1 Model WD2001FASS-00W2B Power On Hours 2403 Hours Temperature Celsius 32 Reallocated Sector Count 0 Current Pending Sector 1465 Raw Read Error Rate 0 Seek Error Rate 0 Hardware ECC Recovered N/A I'm not really an expert on either disks or RAID arrays. Does this indicate that the fourth disk is damaged, and needs to be replaced? And what about disk number one? It has a warning, but it's still in the array. Is it safe to add the fourth disk back into the array as a spare? I can't find any way to add it back as a it were before.

    Read the article

  • Hard Drive that was used before not detected or accessible in Windows 7

    - by Anders
    Hello SU: My PC crashed for some unknown reason, and I am still working on what caused that. However, I pulled my main (windows) drive from my computer and hooked it up to my roommate's machine and was able to pull the data I needed off of it (i.e. the drive is good). I hook up his drives as they were, I had to turn off his machine and unplug his secondary drive to hook mine up, boot his machine and there is no second drive available in windows explorer. I opened Device Manager to see if for some reason it's drive letter got un-assigned, but there is nothing listed in there except his primary hard drive, his optical drive and one other optical drive which I believe is the virtual drive Daemon Tools made. The drive shows up in the BIOS, however after I restarted his machine again it sits on the "Entering setup....." screen at the load window. The only thing I can think of is that may have messed with stuff is I used this tutorial to create a bootable XP install on a USB drive to install XP on my machine (I am 99% certain that the optical drive in my PC is broken) and maybe it used the other hard drive's letter for the USB drive for some reason, which doesn't make much sense since it was recognized it as a different drive letter before I started the process. It is possible that it used the secondary hard drive's letter for it's work, but once again I am uncertain. Where should I go from here? He his bound to wake up within the next several hours and will probably flip a lid if I cannot get some sort of handle on this. Any and all help is greatly appreciated. PS: Anyone who helps me get this situated has a beer or two on me, as long as you are in the greater metro Detroit area, or don't mind traveling a bit!

    Read the article

  • Installing Oracle Client 11.1.0.7 on Windows Server 2008 64-bit. What does "Install Location" and "S

    - by Anders
    I am trying to install Oracle Client 11.1.0.7 on a Windows Server 2008 64-bit. To some this might not be rocket science but I can't understand what the options under the install screen "Specify Home Details" mean. The defaults given suggest that I use Oracle Base and install software under my own account name. It also suggests that each user should have a separate Oracle Base. This seems counter intuitive to me. I am doing a server install after all. All I want to use the installation for is to connect to an Oracle Database from Reporting Services. Can I safely ignore this and just accept the defaults? What are the implications if I change the location to a common directory?

    Read the article

  • Best way to review pdf documents

    - by Anders Rasmussen
    I'm looking for an easy way to get my pdf document reviewed. I would prefer an online solution, where I just upload my document and then sent out an url to my reviewers. They can then give comments through the website without any special software installed.

    Read the article

  • Postfix message ID originating process?

    - by Anders Braüner Nielsen
    Last night my postfix mail server(Debian Squeeze with dovecot, roundcube, opendkim and spamassassin enabled) started sending out spam from a single domain of mine like these: $cat mail.log|grep D6930B76EA9 Jul 31 23:50:09 myserver postfix/pickup[28675]: D6930B76EA9: uid=65534 from=<[email protected]> Jul 31 23:50:09 myserver postfix/cleanup[27889]: D6930B76EA9: message-id=<[email protected]> Jul 31 23:50:09 myserver postfix/qmgr[7018]: D6930B76EA9: from=<[email protected]>, size=957, nrcpt=1 (queue active) Jul 31 23:50:09 myserver postfix/error[7819]: D6930B76EA9: to=<[email protected]>, relay=none, delay=0.03, delays=0.02/0/0/0, dsn=4.4.2, status=deferred (delivery temporarily suspended: lost connection with mta5.am0.yahoodns.net[66.196.118.33] while sending RCPT TO) The domain in question did not have any accounts enabled but only a catchall alias set through postfixadmin - most emails were send from a specific address I use frequently but some were also sent from bogus addresses. None of the other virtual domains handled by postfix were affected. How can I find out what process was feeding postfix/sendmail or more info on where they originated? As far as I can tell php mail() wasn't used and I've run several open relay tests. I did a little tinkering(removed winbind from the server and ipv6 addresses from main.cf) after the attack and it seems to have subsided but I still have no idea how my server was suddenly sending out spam. Maybe I fixed it - maybe I didn't. Can anyone help figuring out how I was compromised? Anywhere else I should look? I've run Linux Malware Detect on recently changed files but nothing found.

    Read the article

  • HTC Diamond Touch sync problem

    - by Anders
    I have a HTC Diamond Touch with all my contacts etc. on it. Did however not use it for 6mo while being abroad. When I start the phone now I realize that the touch screen has stopped working. I have tried restarting, soft resetting, shutting it off etc but the touch just wont follow commands. However, I can manage the phone by buttons so it's not frozen. Hence I can get into the phone and watch contacts but not use it to call etc. The problem is, how do I get my 300 contacts out of the thing!? When I'm plugging in the phone, it lets me choose between "Sync with Outlook" and "Use as storage device". It automatically selects "Use as storage device". Now, I cannot choose to sync it with the buttons. I can not change this option afterwards either. In short, I have a phone with all of my contact data and am completely unable to get that out of it. Any tips/help/suggestions? If possible, preferably one that does not including sending the phone to a hardware workshop for three weeks in order to get it fixed:)

    Read the article

  • Syncing Google Desktop Scratch Pad

    - by Anders Frey
    I'm a long time user of Google Desktop Scratch Pad and I would like to be able to put the note in the cloud and make it accessible from all my electronic units. I'm working towards changing the filepath Scratch Pad uses to retrieve the .txt to lead to a DropBox folder. As the Desktop Scratch Pad is discontinued I've had no luck in retrieving the API, but what I've got so far is this: The scratch pad data is located at: C:\Users[user]\AppData\Local\Google\Google Desktop\a3d83d5fa2e9\scratchpad.txt The registry keys related to Google Desktop is located at: HKEY_CURRENT_USER\Software\Google\Google Desktop I'm guessing the Scratch Pad app itself is located at: HKEY_CURRENT_USER\Software\Google\Google Desktop\Components I have limited experience with the registry, so I'm not able to translate the binary and hexadecimals, but I'm hoping that the path location is in there somewhere. I've tried using a bunch of other noteapps (including the 'new' scratch pad in chrome) but haven't been able to find one that suits my needs as Desktop Scratch Pad. Hence the effort in this matter. I may be way off and I'm not sure if this is possible to do, but I'm looking forward to hearing your thoughts.

    Read the article

  • Ubuntu12.04 - launched applications, not staying in same desktop

    - by Anders Metnik
    My question is why a launched application, if it has loading time like netbeans, eclipse jdeveloper etc. If i go to desktop3 and launch an application and then go to desktop 2 while I wait, then when it has loaded the application will launch in desktop2. Is there anyway to change this? I find it highly annoying since i on startup would like to launch 3-4 big applications, leave my computer while loadingf, and then return. But i cant leave since i have to launch them sequential instead of simultaneous... Help please :-)

    Read the article

  • How does Ubuntu keep track of the "System restart required" flag in motd?

    - by Anders Lindahl
    I have a few Ubuntu servers (8.10, 9.10) that is set to automatically install security updates. Some times these updates requires a restart of the system, and this string is shown in motd: *** System restart required *** To get a notice about these, I plan to write a Nagios test to monitor if the server is in need of a reboot. So, my question: Is there a better way than parsing /etc/motd to find out if a reboot is needed?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9  | Next Page >