Search Results

Search found 12 results on 1 pages for 'eedoh'.

Page 1/1 | 1 

  • Any ideas about how to make Programming Techniques Class more interesting.

    - by Eedoh
    Hello. I already found similar question here on SO, but almost all the answers were more philosophical, then practical. I'd like You to share some of Your PRACTICAL ideas about how to make my course more interesting. It doesn't matter how much effort it takes from me. I even thought about trying to motivate them to pick some topic in the beginning of the course and to work on it as some kind of real, small, startup project that they could maybe financially exploit once it's finished. But I'm afraid that most of them will not get the project to the end, and that it could be boring to them working on one thing all year long. Also I thought about involving them in Torcs, but I'm afraid most of them wouldn't be up to the task. Btw, Torcs is Car Racing Simulation, but there's an API for developers so they can develop their own AI for the driver, and then race their cars against the other programmer's AI's. I'm not asking here for problem examples, as I asked a separate question about that. I need ideas about making my lectures more interesting and fun.

    Read the article

  • Getting error "No address associated with hostname: mod_unique_id: unable to find IPv4 address of "z

    - by Eedoh
    Hello. I'm trying to set up video surveillance system using ip cameras and zonealarm on Arch Linux. I set up fixed ip address, I've managed to get streams from cameras, etc. However, after restart of the machine, I can not start apache again. I checked configuration of rc.conf, and saw that static ip configuration has been deleted, and also secondary nameserver in resolv.conf. Tried to re-write these with correct parameters, but now with no effect. This is tail of my /var/log/httpd/error_log file, after /etc/rc.d/httpd restart attempt [Fri Jan 29 04:20:45 2010] [alert] (EAI 5)No address associated with hostname: mod_unique_id: unable to find IPv4 address of "zmhost" Configuration failed Anybody has an idea how could I fix this??

    Read the article

  • Apache error "No address associated with hostname" on Arch Linux (ZMLarch)

    - by Eedoh
    I'm trying to set up video surveillance system using IP cameras and ZoneAlarm on Arch Linux. I set up fixed IP address, I've managed to get streams from cameras, etc. However, after restart of the machine, I cannot start Apache again. I checked configuration of rc.conf, and saw that static IP configuration has been deleted, and also secondary nameserver in resolv.conf. Tried to re-write these with correct parameters, but now with no effect. This is tail of my /var/log/httpd/error_log file, after /etc/rc.d/httpd restart attempt [Fri Jan 29 04:20:45 2010] [alert] (EAI 5) No address associated with hostname: mod_unique_id: unable to find IPv4 address of "zmhost" Configuration failed Anybody have an idea on how could I fix this?

    Read the article

  • Does anyone know about nagios plugin that uses nmap and does port checking??

    - by Eedoh
    Hi to all. I need to monitor open and closed ports on dozens of hosts. I've found a Nagios plugin that does what I need, but I would have to use this script through nrpe. Some of the hosts are powered by linux and they all have perl installed. But some of them are Windows machines, and it's not convenient for me to install perl on every one of them. That's why I can not use this plugin. I hope that there's Nagios plugin that uses nmap, or something similar, so it could check ports on every host remotely, without installing plugins on remote hosts, only on server.

    Read the article

  • How to retrieve value from DropDownListFor html helper in ASP>NET MVC2?

    - by Eedoh
    Hello I know there was few similar questions here about DropDownListFor, but neither helped me... I use Entity Framework as ORM in my project. There's EF model called "Stete". Stete has Foreign on EF model called "Drustva" Now I'm trying to make a form for editing the data, for Stete model. I managed to display everything, including Stete.Drustva.Naziv property, but I can't get this last property in my handler method [HttpPost]. It always return 0, no matter what I select in drop down list. Here's the code: DrustvaController: public static IEnumerable<SelectListItem> DrustvaToSelectListItemsById(this KnjigaStetnikaEntities pEntities, int Id) { IEnumerable<Drustva> drustva = (from d in pEntities.Drustva select d).ToList(); return drustva.OrderBy(drustvo => drustvo.Naziv).Select(drustvo => new SelectListItem { Text = drustvo.Naziv, Value = drustvo.Id.ToString(), Selected = (drustvo.Id == Id)? true : false }); } SteteController: private IEnumerable<SelectListItem> privremenaListaDrustava(int Id) { using (var ctx = new KnjigaStetnikaEntities()) { return ctx.DrustvaToSelectListItemsById(Id); } } public ActionResult IzmijeniPodatkeStete(Int32 pBrojStete) { PretragaStetaModel psm = new PretragaStetaModel(); ViewData["drustva"] = privremenaListaDrustava(psm.VratiStetuPoBrojuStete(pBrojStete).Drustva.Id); ViewData.Model = new Models.Stete(); return View("EditView", (Stete.Models.Stete)psm.GetSteta(pBrojStete)); } EditView: <div class="editor-label"> <%: Html.Label("Društvo") %> </div> <div class="editor-field"> <%: Html.DropDownListFor(m => m.Drustva.Naziv, ViewData["drustva"] as IEnumerable<SelectListItem>) %> <%: Html.ValidationMessageFor(model => model.FKDrustvo) %> </div> I am sorry for not translating names of the objects into english, but they hardly have appropriate translation. If necessary, I can try creating similar example...

    Read the article

  • How to update model in the database, from asp.net MVC2, using Entity Framework?

    - by Eedoh
    Hello. I'm building ASP.NET MVC2 application, and using Entity Framework as ORM. I am having troubles updating object in the database. Every time I try entity.SaveChanges(), EF inserts new line in the table, regardless of do I want update, or insert to be done. I tried attaching (like in this next example) object to entity, but then I got {"An object with a null EntityKey value cannot be attached to an object context."} Here's my simple function for inserts and updates (it's not really about vehicles, but it's simpler to explain like this, although I don't think that this effects answers at all)... public static void InsertOrUpdateCar(this Vehicles entity, Cars car) { if (car.Id == 0 || car.Id == null) { entity.Cars.AddObject(car); } else { entity.Attach(car); } entitet.SaveChanges(); } I even tried using AttachTo("Cars", car), but I got the same exception. Anyone has experience with this?

    Read the article

  • How to get rid of "Uncaught SoapFault exception: [Client] looks like we got no XML document in..." e

    - by Eedoh
    Hello I'm trying to develop business logic for a dynamic site using nusoap on server side (because I need wsdls, and PHP SOAP extension can't generate wsdls), and PHP SOAP extenstion on client side. However, I can't get even login and getRole functions right. When i try to invoke client, I get following message Uncaught SoapFault exception: [Client] looks like we got no XML document in [some paths]... Wsdl does exist on server side, and client does read it (when I put wrong url for wsdl, I get an error). Can anyone help??

    Read the article

  • How to retrieve value from DropDownListFor html helper in ASP.NET MVC2?

    - by Eedoh
    Hello I know there was few similar questions here about DropDownListFor, but neither helped me... I use Entity Framework as ORM in my project. There's EF model called "Stete". Stete has Foreign on EF model called "Drustva" Now I'm trying to make a form for editing the data, for Stete model. I managed to display everything, including Stete.Drustva.Naziv property, but I can't get this last property in my handler method [HttpPost]. It always return 0, no matter what I select in drop down list. Here's the code: DrustvaController: public static IEnumerable<SelectListItem> DrustvaToSelectListItemsById(this KnjigaStetnikaEntities pEntities, int Id) { IEnumerable<Drustva> drustva = (from d in pEntities.Drustva select d).ToList(); return drustva.OrderBy(drustvo => drustvo.Naziv).Select(drustvo => new SelectListItem { Text = drustvo.Naziv, Value = drustvo.Id.ToString(), Selected = (drustvo.Id == Id)? true : false }); } SteteController: private IEnumerable<SelectListItem> privremenaListaDrustava(int Id) { using (var ctx = new KnjigaStetnikaEntities()) { return ctx.DrustvaToSelectListItemsById(Id); } } public ActionResult IzmijeniPodatkeStete(Int32 pBrojStete) { PretragaStetaModel psm = new PretragaStetaModel(); ViewData["drustva"] = privremenaListaDrustava(psm.VratiStetuPoBrojuStete(pBrojStete).Drustva.Id); ViewData.Model = new Models.Stete(); return View("EditView", (Stete.Models.Stete)psm.GetSteta(pBrojStete)); } EditView: <div class="editor-label"> <%: Html.Label("Društvo") %> </div> <div class="editor-field"> <%: Html.DropDownListFor(m => m.Drustva.Naziv, ViewData["drustva"] as IEnumerable<SelectListItem>) %> <%: Html.ValidationMessageFor(model => model.FKDrustvo) %> </div> I am sorry for not translating names of the objects into english, but they hardly have appropriate translation. If necessary, I can try creating similar example...

    Read the article

  • Bash script function return value problem

    - by Eedoh
    Hi to all. Can anyone help me return the correct value from a bash script function? Here's my function that should return first (and only) line of the file passed as an argument: LOG_FILE_CREATION_TIME() { return_value=`awk 'NR==1' $1` return return_value } And here's my call of that function in the other script: LOG_FILE_CREATION_TIME "logfile" timestamp=$? echo "Timestamp = $timestamp" I always get some random values with this code. If, for example, there's a value of 62772031 in the "logfile", I get Timestamp = 255 as an output. For some other values in the file, I get other random values as a return value, never the correct one. Any ideas?

    Read the article

  • ASP.NET MVC validation in weakly typed views

    - by Eedoh
    Hello. I have a problem validating data on view that is not strongly typed. I'm updating data from 3 different models on that view, and I have validation methods that work on them, but I don't know how to display the validation message. Where should I put validation messages (on strongly typed views I put them in ModelState, I presume that does not make sense in this case), and how should I display them (I doubt that I will be able to use "validationmessagefor", maybe "validationmessage" somehow)?

    Read the article

  • Problem with skipping empty cells while importing data from .xlsx file in asp.net c# application

    - by Eedoh
    Hi to all. I have a problem with reading .xlsx files in asp.net mvc2.0 application, using c#. Problem occurs when reading empty cell from .xlsx file. My code simply skips this cell and reads the next one. For example, if the contents of .xlsx file are: FirstName LastName Age John 36 They will be read as: FirstName LastName Age John 36 Here's the code that does the reading. private string GetValue(Cell cell, SharedStringTablePart stringTablePart) { if (cell.ChildElements.Count == 0) return string.Empty; //get cell value string value = cell.ElementAt(0).InnerText;//CellValue.InnerText; //Look up real value from shared string table if ((cell.DataType != null) && (cell.DataType == CellValues.SharedString)) value = stringTablePart.SharedStringTable.ChildElements[Int32.Parse(value)].InnerText; return value; } private DataTable ExtractExcelSheetValuesToDataTable(string xlsxFilePath, string sheetName) { DataTable dt = new DataTable(); using (SpreadsheetDocument myWorkbook = SpreadsheetDocument.Open(xlsxFilePath, true)) { //Access the main Workbook part, which contains data WorkbookPart workbookPart = myWorkbook.WorkbookPart; WorksheetPart worksheetPart = null; if (!string.IsNullOrEmpty(sheetName)) { Sheet ss = workbookPart.Workbook.Descendants<Sheet>().Where(s => s.Name == sheetName).SingleOrDefault<Sheet>(); worksheetPart = (WorksheetPart)workbookPart.GetPartById(ss.Id); } else { worksheetPart = workbookPart.WorksheetParts.FirstOrDefault(); } SharedStringTablePart stringTablePart = workbookPart.SharedStringTablePart; if (worksheetPart != null) { Row lastRow = worksheetPart.Worksheet.Descendants<Row>().LastOrDefault(); Row firstRow = worksheetPart.Worksheet.Descendants<Row>().FirstOrDefault(); if (firstRow != null) { foreach (Cell c in firstRow.ChildElements) { string value = GetValue(c, stringTablePart); dt.Columns.Add(value); } } if (lastRow != null) { for (int i = 2; i <= lastRow.RowIndex; i++) { DataRow dr = dt.NewRow(); bool empty = true; Row row = worksheetPart.Worksheet.Descendants<Row>().Where(r => i == r.RowIndex).FirstOrDefault(); int j = 0; if (row != null) { foreach (Cell c in row.ChildElements) { //Get cell value string value = GetValue(c, stringTablePart); if (!string.IsNullOrEmpty(value) && value != "") empty = false; dr[j] = value; j++; if (j == dt.Columns.Count) break; } if (empty) break; dt.Rows.Add(dr); } } } } } return dt; }

    Read the article

1