Search Results

Search found 16 results on 1 pages for 'beginer'.

Page 1/1 | 1 

  • Python beginer having trouble running code

    - by Protean
    For some reason this code will not seem to run in the interpreter. When I hit F5 nothing happens, not even the debugger seems to recognize it. I assume it has something to do with the class, as when removed the interpreter seems to recognize the rest of the code. Please tell me what I am doing wrong. Edit: I have restarted the interpreter multiple times, any other piece of code I try to load runs fine, just this one is having trouble. print ('Why won't this work?') class sorting_class: def __init__(self): self.order = ['a', 'b', 'c', 'd'] self.globali = 0 self.orderi = 0 self.sortedlist = [] def sort(self, array): carry, leave = [] for arrayi in array: print ('run', arrayi) if self.order[self.orderi] == arrayi[self.globali]: carry.append(arrayi) else: if self.globali != 0: leave.append(arrayi) return carry, leave def srt(self, array): globalii = 0 carry, leave = my.sort(array) while len(self.sortedlist) != len(array): if len(self.carry) == 1: self.sortedlist.append(carry) arrayt = leave self.globali = 1 self.orderi = 0 carry, leave = my.sort(arrayt) elif len(self.carry) == 0: if len(self.leave) != 0: arrayt = leave self.globali = 1 self.orderi += 1 my.sort(arrayt) else: self.arrayt globalii += 1 self.orderi = globalii self.globali = 0 my.sort(arrayt) self.orderi = 0 else: arrayt = carry carry = [] self.globali += 1 carry, leave += my.sort(arrayt) my = sorting_class() x = ['ac', 'bc' ,'ab', 'da'] my.srt(x)

    Read the article

  • Ubuntu 11.10 not showing up in GRUB bootloader after update and restart :(

    - by beginer
    I was using ubuntu 11.10 with gnome-shell. I installed various useful softwares and ran system update using update manager which ran smoothly and asked me to restart my comp at the end. I restarted it to find that Ubuntu entries were missing from the GRUB bootloader and only memory test and windows are showing up. I took a lot of pain in installing various important softwares and cannot afford a re-installation. Tried to boot from the live cd and installed boot-repair and after running it .. it wasnt working properly .. it was just showing that it was "scanning systems" for more than an hour. Kindly help. Thank you ..

    Read the article

  • Android liveWallpaper background

    - by Beginer Developer
    How do I scroll the background image on an ACTION_MOVE event? Here is my code used to draw the background image: void drawFrame() { final SurfaceHolder holder = getSurfaceHolder(); Canvas c = null; try { c = holder.lockCanvas(); if (c != null) { c.drawBitmap(myBg, 0, 0, mPaint); } } finally { if (c != null) holder.unlockCanvasAndPost(c); } // Reschedule the next redraw mHandler.removeCallbacks(mDrawAnim); if (mVisible && mAnime) { mHandler.postDelayed(mDrawAnim, 50 ); } }

    Read the article

  • Iphone Alarm Clock

    - by Koushik Podder
    Hi All, I am a beginer in iphone application development. Is There anybody who can help me with some sort of codes to develop a alarm clock in xcode for the iphone. Thanks in advance. Koushik Podder

    Read the article

  • How to use ASP .NET dropdown with ajax

    - by Poomjai
    Greeting, I'm beginer of ajax technology and now i need to create two dropdown in MVC project for example: First dropdown has the list of classroom [601,602,603] when i choose one then next dropdown will has the list of student belong to each class room. Now, I already create the repository class that has method GetStudentByClassroomName() and already connect to the database. Can anyone give me a suggestion how to create it or any technology to create the dropdown like this? Thank you very much ^_^

    Read the article

  • Using an Internal HDD as an External HDD also or an External HDD for installing SAP ?

    - by Asterix
    Is it possible and advisable to use an Internal Hard Drive as an External Hard drive also. I wanted to install SAP ECC 6 on my system which has only 250 GB but atleast 300 GB is required.I wanted to buy an External Drive first, then I heard loading SAP on an External would make it extremely slow. I'll be using it only as a beginer so even if it is a little slow i don't mind. Is it feasible to run such a big application from an External Hard disk ? So can i purchase a 500 or 1 TB Internal Hard disk and use it as an External too by fitting it with the necessary USB 3.0 Hard drive cases and cables ? or should i purchase a External and load SAP onto it ? Thank you.

    Read the article

  • How to update document object value in loop (Javascript)

    - by Graham
    Hi folks i am a beginer to Java script so appologies if this is a dumb question. I am trying to put the following in a for loop but I can't seem to get it to work. if (rowID==1) { document.form1.class_titleDis_1.value=class_title; } if (rowID==2) { document.form1.class_titleDis_2.value=class_title; } This is what I tried var i=1; for (i=1;i<=2;i++) { document.form1.(class_titleDis_)+i.value=class_title; } I would be really grateful for any suggestions. Graham

    Read the article

  • The markup must be well-formed

    - by Haythem
    Hi, I am beginer in SAX and Java. I am tring to read Information from not well formed XML File. When I try to use SAX or DOM Parser then I have this error: The markup in the document following the root element must be well-formed. My XML File looks like this: <format type="filename" t="13241">0;W650;004;AG-Erzgeb</format> <format type="driver" t="123412">001;023</format> ... Can I force SAX or DOM to parse not well-formed XML files? Thank you for your help. Haythem

    Read the article

  • How to map a set of text as a whole to a node?

    - by JIpeng Tan
    Suppose I have a plain text file with the following data: DataSetOne <br /> content <br /> content <br /> content <br /> DataSetTwo <br /> content <br /> content <br /> content <br /> content <br /> ...and so on... What I want to to is: count how many contents in each data set. For example the result should be <DataSetOne, 3>, <DataSetTwo, 4> I am a beginer to hadoop, I wonder if there is a way to map a chunk of data as a whole to a node. for example, set all DataSetOne to node 1 and all DataSetTwo to node 2. Does anyone can give me an idea how to archive this?

    Read the article

  • Refresh RadGridview when Insert,Update and Delete Operation done on Database in WPF

    - by patelriki13
    WPF and C#: Problem: 1. How to Refresh Radgridview when i Insert,update and Delete Record in database anrecord. 2.when i am Insert or Update Record than in radgridview that row is selected. i am useing sql server 2005. i am use to set data source of radgridview like " radgridview1.ItemsSource = ds; " == ds is dataset. i am beginner so if possible than tel me by code it is easy to understand....... can u help me as early as possible .... i give some code which i am useing for update RadGridview con.ConnectionString = @"Data Source=(local);Initial Catalog=DigiDms;Integrated Security=True"; cmd1.Connection = con; con.Open(); cmd1.CommandType = CommandType.StoredProcedure; cmd1.CommandText = "Pro_Insurance_Master_Select"; da1.SelectCommand = cmd1; da1.Fill(ds1); con.Close(); //dataGrid.clear(); //dsGrid.Reset(); //dsGrid = dataGrid.GetData("Pro_Insurance_Master_Select"); //set datasource of gridview gridShowData.ItemsSource = null; gridShowData.ItemsSource = ds1; doing this , when i am delete or update record than folloning error generated... Error: "Object reference not set to an object" when i am doing the "gridShowData.ItemsSource = null;" and when i am doing insert operation than this error is not generated and RadGridview also updated..... so pls help me as early as possible.... i am beginer ........ my email address is [email protected]

    Read the article

  • [Zend Framework] Forms and success output

    - by rasouza
    Well, It's a beginer's question but I really don't know what is the best way. I have a basic CRUD (Create, Retrieve, Update and Delete) in my project and I'd like to output some message if succeded or not in a div inside the same page. So, basically, I have a form which action is setted to the same page and I have a div #statusDiv below this same form which I'd like to output something like Register included with success. What is the best way for doing this? Set a flag in the controller $this->view->flagStatus = 'message' then call it in the view? Just to make it more clear. It's my code: //IndexController.php indexAction() ... //Check if there's submitted data if ($this->getRequest()->isPost()) { ... $registries->insert($data); $this->view->flagStatus = 'message'; $this->_redirect('/'); } Then my view: .... <?php if ($this->flagStatus) { ?> <div id="divStatus" class="success span-5" style="display: none;"> <?php echo $this->flagStatus; ?> </div> <?php } ?> ....

    Read the article

  • ASP.NET MVC 2 JQuery POST not displaying the model state errors

    - by Oshan
    Hello, I have been using asp.net mvc for a bit (but I'm still a beginer). I want to have the ability to update two views as a result of a jquery postback. Basically I have a list and a details view. The details view is presented using a jquery popup (using jquery-UI popup). I only want to update the list if the details save is successful (i.e. there are no validation errors on the details view). However, if there are any validation errros in the details view, I want to update the details view so that the user sees the validation errors. so I thought in my controller, I return a JsonResult instead of a View. [HttpPost] public ActionResult SavePersonInfo(Person p) { if(ModelState.Valid) { return View("PersonList"); } return Json({Error = true, View = PartialView("PersonDetails", p)}); } As you can see if there are no errors I return the person list view, but if there are any validation errors, I have return the details view. The reason that I'm returning a JsonResult is I need to tell my view there is an error so that the view (jquery) knows which section to update (as in whether to update the person list 'div' or the popup dialog 'div'). So, in my view, the jquery is as follows (please assume that there is a form for entering in the person details and "SubmitPersonForm();" function is called upon clicking on the "Save" button): <script type="text/javascript> $('#btnSave').click(function (event) { onBegin(); $.ajax( { type: "POST", url: "/Person/Save", data: $('form').serialize(), success: function (result) { if(result.Error) { $('#dvDetails').html($(result).View)); } else { $('#dvPersonList').html($result); } } }); }); </script> So the problem that I have now, is that when there is a validation error, I do see the correct, 'div' being updated, but I lose the asp.net mvc validation messages. I do not see any validation errors in red, as if ASP.NET MVC is completely ignored them. However, my ModelState does have those errros, just not displayed in the details view. I do have valication summary and Html.ValidationFor(m = ...) statements put in my details view. Could someone tell me why I'm not seeing the validation errors? although I'm using a JSonResult, I do use the right property which is a valid view when I render the 'dvDetails'. Am I doing something that I'm not suppose to in asp.net mvc? Btw I'm using asp.net mvc2 RC with Visual Studio 2010 RC. Thank you.

    Read the article

1