Search Results

Search found 20869 results on 835 pages for 'things i hate'.

Page 141/835 | < Previous Page | 137 138 139 140 141 142 143 144 145 146 147 148  | Next Page >

  • What is your strategy to avoid dynamic typing errors in Python (NoneType has no attribute x)?

    - by Koen Bok
    Python is one of my favorite languages, but I really have a love/hate relationship with it's dynamicness. Apart from the advantages, it often results in me forgetting to check a type, trying to call an attribute and getting the NoneType (or any other) has no attribute x error. A lot of them are pretty harmless but if not handled correctly they can bring down your entire app/process/etc. Over time I got better predicting where these could pop up and adding explicit type checking, but because I'm only human I miss one occasionally and then some end-user finds it. So I'm interested in your strategy to avoid these. Do you use type-checking decorators? Maybe special object wrappers? Please share...

    Read the article

  • runas command in windows 7

    - by iva123
    Hi, I'm trying to run a batch file as admin. I found that I can use runas command which corresponds sudo command in Linux I think. I tried runas /noprofile /user:computername\adminuser "blah.bat start" But it gives an error, saying : Logon failure: user account restriction.. (msdos window doesn't allow me to coppy damn thing I hate dos anyway .. ) is there anyway, I can run this batch file as admin, right click doesn't work me because I can't give any parameter to it. Any help, I really really apreciated that.

    Read the article

  • Should I use `!IsGood` or `IsGood == false`?

    - by chills42
    I keep seeing code that does checks like this if (IsGood == false) { DoSomething(); } or this if (IsGood == true) { DoSomething(); } I hate this syntax, and always use the following syntax. if (IsGood) { DoSomething(); } or if (!IsGood) { DoSomething(); } Is there any reason to use '== true' or '== false'? Is it a readability thing? Do people just not understand Boolean variables? Also, is there any performance difference between the two?

    Read the article

  • Python Vector Class

    - by sfjedi
    I'm coming from a C# background where this stuff is super easy—trying to translate into Python for Maya. There's gotta' be a better way to do this. Basically, I'm looking to create a Vector class that will simply have x, y and z coordinates, but it would be ideal if this class returned a tuple with all 3 coordinates and if you could edit the values of this tuple through x, y and z properties, somehow. This is what I have so far, but there must be a better way to do this than using an exec statement, right? I hate using exec statements. class Vector(object): '''Creates a Maya vector/triple, having x, y and z coordinates as float values''' def __init__(self, x=0, y=0, z=0): self.x, self.y, self.z = x, y, z def attrsetter(attr): def set_float(self, value): setattr(self, attr, float(value)) return set_float for xyz in 'xyz': exec("%s = property(fget=attrgetter('_%s'), fset=attrsetter('_%s'))" % (xyz, xyz, xyz))

    Read the article

  • Connect to a network via Command Linke

    - by justasking
    Hi guys, I want to be able to connect to a network via command line in Windows. My goal is to script out remoting into my work computer. I hate having to always manually connect to the VPN connection and then rdping into my work machine. I want to just have a script which will do both of it for me. I know how to rdp via command line, I just need to know how to connect to my VPN via command line. Thanks!

    Read the article

  • What is your strategy to avoid dynamic typing errors in Python (NoneType has not attribute x)?

    - by Koen Bok
    Python is one of my favorite languages, but I really have a love/hate relationship with it's dynamicness. Apart from the advantages, it often results in me forgetting to check a type, trying to call an attribute and getting the NoneType (or any other) has no attribute x error. A lot of them are pretty harmless but if not handled correctly they can bring down your entire app/process/etc. Over time I got better predicting where these could pop up and adding explicit type checking, but because I'm only human I miss one occasionally and then some end-user finds it. So I'm interested in your strategy to avoid these. Do you use type-checking decorators? Maybe special object wrappers? Please share...

    Read the article

  • I wanted to be a programmer

    - by Henrik P. Hessel
    Hello, let me ask your opinion. I'm 25 now, living in Germany. I started with QBASIC, did some Java in Highschool, and after School I created some Websites in PHP. Now, because my Company is Microsoft Gold Partner, I've to use Microsoft all the time. C#, MSSQL, ASPX and Sharepoint <- I really hate it! So, in my spare I concentrate to gain more knowledge (C++, Java, Silverlight or WPF), because it feels that I'm so far behind, in comparison for example to you guys, or other older employees in my company. Do think that my behaviour is useful? Should I focus my time to become i.e. a pure C# Programmer? I did C# even before I started to learn some C++. Should I learn what do with pointers, memcpy and stuff like that, even if managed code brings us so much benefits? Or is it a waste of time, better invested in learning the latest technologies? rAyt

    Read the article

  • Customizing RadioSelect

    - by Kugel
    Hello I have a form with ChoiceField whose widget is set to RadioSelect Now to override default html output one needs to subclass RadioFieldRenderer like this: class SimpleRadioFieldRenderer(forms.widgets.RadioFieldRenderer): def render(self): """Outputs widget without <ul> or <li> tags.""" return mark_safe(u'\n'.join([u'%s' % force_unicode(w.tag()) for w in self])) All is good now except I'd like to be able to render 1 radio button at a time from template. Something like this: {{ form.myfield.0 }}} Or perhaps hanging it onto widget itself: {{ form.myfield.field.widget.0 }} What bugs me is that RadioFieldRenderer already implements __get_item__ to get just one RadioInput. The problem is that the renderer does not contain data, neither does the widget. And I'd really hate to mess with Field and BoundField. I need this to inject html before/after each radiobutton and I'd like it to be done in the template. From the code it would be easy. Any ideas are welcome.

    Read the article

  • Does performance even matter anymore? [closed]

    - by Jeff Dahmer
    The performance differences between C/C++ and C# are astounding. An ASP.NET page loads in 1/8 the time that a PHP script does haha.... WPF, aka " The Future ", (you know it will be, all the companies are gonna want cool looking desktop apps, don't kid yourself.) And it has huge performance hits just to start up. We've let Microsoft make us as developers lazy! Why do I hate this, it's such a good thing? Are we at a point in time where the majority of computers can handle this kinda crap? I remember when performance used to matter. Anyways, I'm writing a .NET library and ever since I found out LINQ is slower than traditional delegates which is slower than the normal procedural code... well it's a guilty evil I feel for every LINQ query I write, because they are so beautiful. Am I just too much of a performance stickler? Or just too big of a nerd?

    Read the article

  • How do I display exception errors thrown by Zend framework

    - by Ali
    Hi guys I'm working with Zend framework and just hate the fact that I seem to encounter hundreds of exception errors like if I try to reference a non existant property of an object my application just dies and crashes. However I have no idea where to see these errors or how to be able to display them on screen. I've set display errors to true and error reporting to E_ALL but when an error is thrown all I see is a blank page rendered only until a bit before where the error apparently occurred or the exception was thrown. Help please my debugging hours are dragging

    Read the article

  • Will this safely delete my record?

    - by Sergio Tapia
    I hate these three tables that. Two tables have a many to many relationship and as such it generates a third table. I'm using Linq-to-SQL and in the .dbml file I've dragged all the folder there to the graphic surface. Here is the method I'm using to delete an Area safely. Remember that documents are associated to an Area, so I can't just delete it and leave documents hanging. ScansDataContext db = new ScansDataContext(); /// <summary> /// Deletes an Area object from the database along with all associations in the database. /// </summary> /// <param name="area">Area object to save</param> public void Delete(Area area) { db.DocumentAreaRelations.DeleteAllOnSubmit(area.DocumentAreaRelations); db.Areas.DeleteOnSubmit(area); db.SubmitChanges(System.Data.Linq.ConflictMode.FailOnFirstConflict); }

    Read the article

  • Web Page Opinions and Suggestions

    - by MrEnder
    Been working my * off on this for a few days trying to keep updating it to make it most efficient with everything I learn... I'm quite proud of it so far considering I'm not actually the best coder lol most JS and PHP confuses the crap outa me unless I do it from scratch. So anyways here is the link. Tell me what you think. Suggestions would be amazing. I'd love to know what I screwed up as long as you explain in detail as to why and how to fix it. I really hate when people hand me a huge snippet and expect me to understand it -_- Thanks Shelby LINK http://opentech.durhamcollege.ca/~in...rittains/labs/

    Read the article

  • disable eclipse auto completion

    - by SpliFF
    I love Eclipse but I HATE auto-completion with a vengeance! I swear though, no matter how hard I look in prefs or Google I can't find where I turn this off! I'm having the problem with both CFEclipse and the PHP editor. How do I completely disable all "smart" quotes/tags/braces auto-inserting. Not some of it.. ALL of it. No matter how many options I untick both editors keep trying to finish my code for me.. usually with irritating results. Like this one (PHP editor): <img alt="banner" src="/images/banner.jpg"></img> This is HTML, not XHTML - I don't want, or need, my img tags closed. Anyway this is still happening after I've gone to Preferences | PHP | Editor | Typing and Preferences | PHP | Editor | Code Assist and unchecked every option. I can't be the only one having this issue but I can't find any howtos or help on this.

    Read the article

  • ORA-01722: invalid number

    - by Lluis Martinez
    I'm getting the infamous invalid number Oracle error. Hibernate is issuing an INSERT with a lot of columns, I want to know just the name of the column giving the problem. Is it possible? I hate Oracle messages, in 15 years they haven't improved a bit (the reason why is beyond my imagination). FYI the insert is this: insert into GEM_INVOICE_HEADER (ENDORSEE_ACCOUNT_ID, INVOICE_CODE, APPROVAL_ORGAN, APROVAL_DATE, APROVAL_REFERENCE, BALANCE_BASE_AMOUNT, BALANCE_DEDUCT_AMOUNT, BALANCE_TOTAL_AMOUNT, BALANCE_VAT_AMOUNT, BALANCE_VAT_DED_AMOUNT, BALANCE_VAT_NOT_DED_AMOUNT, DESCRIPTION, SUPPLIER_INVOICE_NUMBER, INVOICE_DATE, RECEIPT_DATE, MEMO, VAT_INTRACOM, INVOICE_BASE_AMOUNT, INVOICE_VAT_AMOUNT, INVOICE_VAT_DED_AMOUNT, INVOICE_VAT_NOT_DED_AMOUNT, INVOICE_DEDUCT_AMOUNT, INVOICE_TOTAL_AMOUNT, VAT_EXEMPT, RECTIFICATION_SIGN, REASON, LOT, FILE_ID, RETAINED, INSTITUTION_ID, PERIOD_CODE, IS_RECTIFIED, DEFAULT_OFFBUDGET_ACCOUNT, OFFBUDGET_DOC_ID, PHASE_OF_ACCOUNTING, ACCOUNTED_OFF_BUDGET, CANCEL_DOC_ID, BUDGET_TYPE, INVOICE_TYPE, SOURCE_ID, STATE_ID, MANAGER_UNIT_ID, DOCUMENT_TYPE_CODE, ACCOUNTED_DOC_ID, ACCOUNTING_LIST, ENDORSEE_ID, PAYMASTER_ID, SUPPLIER_ID, SUPPLIER_ACCOUNT_ID, PAY_JUSTIFY_ID, PETTY_CASH_ID, DBOID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)

    Read the article

  • NHibernate with or without Repository

    - by Groo
    There are several similar questions on this matter, by I still haven't found enough reasons to decide which way to go. The real question is, is it reasonable to abstract the NHibernate using a Repository pattern, or not? It seems that the only reason behind abstracting it is to leave yourself an option to replace NHibernate with a different ORM if needed. But creating repositories and abstracting queries seems like adding yet another layer, and doing much of the plumbing by hand. One option is to use expose IQueryable<T> to the business layer and use LINQ, but from my experience LINQ support is still not fully implemented in NHibernate (queries simply don't always work as expected, and I hate spending time on debugging a framework). Although referencing NHibernate in my business layer hurts my eyes, it is supposed to be an abstraction of data access by itself, right? What are you opinions on this?

    Read the article

  • Include Problem with Objective-C++ and OpenGL

    - by Stephen Furlani
    Hello, I feel silly asking this but I've searched for 'include problems' and have only come up with basic stuff. I'm working with an API that includes/imports in their header files (ARGH! HATE ANGER DESTRUCTION). One of these Obj-C files #import "OpenGL/CGLMacros.h" which #define's things like glMatrixMode(...); In my code I need the glMatrixMode(...); from #include "OpenGL/gl.h" but it won't access it! I can't edit the headers from the (poorly) coded API to put the includes in their definition files. What can I do? If the CGLMacros.h file starts out like /* Copyright: (c) 1999 by Apple Computer, Inc., all rights reserved. */ #ifndef _CGLMACRO_H #define _CGLMACRO_H Can I put a #define _CGLMACRO_H before I include the offending API header file? -Stephen

    Read the article

  • Can an app use the clipboard for its own purposes? (read: who owns the clipboard?)

    - by eran
    In PowerBuilder's IDE, the code autocomplete feature uses the clipboard to communicate the completed text to the code window. By doing so, it overrides whatever was stored on the clipboard before. So, if you had the winning numbers of the next lottary stored on your clipboard, and you used the autocomplete to turn m_goodfor into m_goodfornothing, you've just lost your only chance of ever getting rich, and you're left with nothing on your clipboard. Features like that are the reason I hate software. It looks like it was implemented by some intern that noone was looking after. However, there's also a chance I got all worked up for nothing, and making such use of the clipboard is absolutely legit. So, can an app use the clipboard for its own purposes? Who is considered the owner of the clipboard? (Bonus votes to whoever puts himself in place of the feature's programmer, and provides some reasoning for this being done on purpose, assuming the users would actually benefite from it)

    Read the article

  • How to pass data to another droid device when the other device isn't expecting it

    - by James Black
    I am working on an application and one feature that would make it really useful is the ability to share some information, but the other device may not be expecting the data to be sent. For example, if I am reading a really good book, and I realize that a friend may like it, I could use an application to send the data to him, so he could order the book from Amazon. But, since he isn't expecting the data, I would hate for the application to be polling a server every so often, as that will be needlessly draining the battery. Ideally it would be great if there was a way to make a phone call to the target device, send a data packet and end the call. If it could be done and prevent the phone from ringing, then it would be very useful to me. I am curious if there is some way to send data between devices without polling.

    Read the article

  • Is there an "extended" UIHint attribute to apply CSS styles for DisplayFor - EditorFor templates?

    - by AJ
    Intro: After reading Brad Wilson Metadata series and searching unsuccesfully on google, I was wondering: Question: Has any OS project / code been created that allows you to tag CSS styles in the Meta information, for example in my (buddy) Model, I want to be able to decorate a property with multiple CSS styles (a single style you can fake with UIHint, I want to set many possible styles - and be able to "cross-utilise") eg. public class MyModel { [DisplayCssHint("h5")] [DisplayCssHint("color:#777;")] [EditorCssHint(".myCoolTextClass")] [EditorCssHint(".myOtherCoolTextClass")] public string Title{ get;set; } [DisplayCssHint(".normaltext")] [EditorCssHint(".myCoolTextClass")] [EditorCssHint(".myOtherCoolTextClass")] public string Message {get;set;} } Thoughts: I know that this does not seem like a logical place to put styling information, however as it is metadata and is discriptive... besides it would be nice to do this while prototyping - (especially being able to apply class styles and extending it further - to generate .Less files would really be cool! more to the point I would hate to write it, if its already been done ;). Any links/pointers/idea's would be appreciated. Thanks,

    Read the article

  • Weird Workflow Behavior in Sharepoint 2007

    - by frbry
    I have a Document Library A and a list B. When a document added to A, an item is created in B with the Title = A.Url. Another workflow runs whenever a document is updated in A which makes a lookup: B.Title = A.Url, and changes another column in B in found item. Item Change Workflow always gives "Error Occurred: List item is not found". I modified the workflow to send me an e-mail containing the new (but unchanged) A.Url. It sent me the exact string with the one already in list B. Anyways, why it can't find the item when the two columns are equal? Thanks in advance. Edit I literally hate Microsoft Sharepoint.

    Read the article

  • Safari ignores input type="file" on server post

    - by Jon
    I have a real problem with a classic ASP page. The page allows the user to upload a document and save it to the database. The intial page posts to another asp page which saves down to the db. This works on IE and Firefox. However on Safari it fails. I've debugged the problem and it boils down to the fact that of all the controls that the server page has access to, only 1 control is missing. This happens to be this: <input type="file" size="40" id="myfile" name="myfile" /> So I'm wondering why safari would decide to not give me access to this control (using asp's Request("") ) and why it works in FF and IE. I have some debug code which writes out all controls and it doesn't see this control. p.s. I hate Web development

    Read the article

  • Restfull authentication between two GAE apps.

    - by user259349
    Hello everyone, i am trying to write a restful google app engine application (python) that accepts requests only from another GAE that i wrote. I dont like any of the ways that i thought of to get this done, please advice if you know of something better than: Get SSL setup, and simply add the credentials on the request that my consuming app will send. I dont like it cause SSL will slow things down. Security by obsecurity. Pass a long number by my consuming app that is in Xmod0, where X is a secret number that both applications know. I just,,,, dont like this. Check the HTTP header to see where is the request coming from. This option is the one that i hate the least, not alot of processing, and spoofing an HTTP request is not really worth it, for my application's data. Is there any other clean solution for this?

    Read the article

  • Simple NLP: How to use ngram to do word similarity?

    - by sadawd
    Dear Everyone, I Hear that google uses up to 7-grams for their own data. I am interested in finding words that are similar in context (i.e. cat and dog) and I was wondering how do I compute the similarity of two words on a n-gram model given that n 2. Given a sample set like this forexample: (I, love cats), (cats, loves, dogs), (dogs, hate, human) What is a good way to compare the similarity of this pair (I, cats)? Also does anyone know of anyway to do levels for NLP? like: Army-Military-Solider ?

    Read the article

  • Htaccess Rewrite Rule

    - by Marcx
    Hi, I'm getting crazy with htaccess and rewrite rule.. I'd like to understand how it works, I hate it, anyway here's my problem (really simple for most of you) My site has one main page index.php. This is the only page, all the others are handled by this one. I did a simple RewriteRule RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?page=$1 to do this: http://www.me.ext/index.php?page=VAL - http://www.me.ext/VAL but I don't know how create a rule for this http://www.me.ext/index.php?page=VAL&var1=VAL2&var2=VAL3 etc. I'd like a final url like: http://www.me.ext/VAL/VAL2/VAL3 etc. Thanks

    Read the article

  • jQuery using .animate() fails to do ANYTHING in IE8

    - by Cypher
    So, it's official: I hate Internet Explorer. Yes, all bloody versions of it. :-D So, I didn't think I was doing anything complicated here, but apparently I am. I have a bunch of list items in an unordered list styled for a navigation menu, and in Firefox, Chrome, Safari, and Opera, things work fine. What is supposed to happen is when you hover a navigational item, it should animate some growth and animate a background color change. Nothing happens in Internet Explorer 7/8. I think it's just tied to the animate function, since if I swap .animate with .css, it works. http://project-cypher.net/wtf/ Ideas?

    Read the article

< Previous Page | 137 138 139 140 141 142 143 144 145 146 147 148  | Next Page >