none

Anyone know a better workaround for getting the computed height of an element set to display: none?

I need to calculate a top position for an element of variable height, so I was thinking of doing the following: Move the element 1000px off the top of the viewport Set the element to display: block Get the height of the element Set the element to display: none Continue on as if everything is normal and good Does anyone see any pitfal...

python dealing with Nonetype before cast\addition

I'm pulling a row from a db and adding up the fields (approx 15) to get a total. But some field values will be Null, which causes an error in the addition of the fields (TypeError: unsupported operand type(s) for +: 'NoneType' and 'int') Right now, with each field, I get the field value and set it to 'x#', then check if it is None and ...

Question regaridng J2ME Streaming

Hi, I have read you tried to make a local RTSP server to feed to the player but that didnt work. Do you have any source or could you help me on my way ? Also any source regarding the two player solution ? Thanks in advance ! ...

The Matlab equivalent of Python's "None"

Is there a keyword in Matlab that is roughly equivalent to None in python? I am trying to use it to mark an optional argument to a function. I am translating the following Python code def f(x,y=None): if y == None: return g(x) else: return h(x,y) into Matlab function rtrn = f(x,y) if y == []: rtrn = g(x);...

problem with form elements when div is faded in from being display : none (IE problem)

hi! on a webpage I've been working on I have a problem which I seem unable to solve. I have a div with display set to none which I fade in. it contains form-element which are not being shown the way they are supposed to when wieved in IE. you can look at it at http://www.orrmyr.se Thanks for you help Martin ...

Null pattern in Python underused?

Every now and then I come across code like this: foo = Foo() ... if foo.bar is not None and foo.bar.baz == 42: shiny_happy(...) Which seems, well, unpythonic, to me. In Objective-C, you can send messages to nil and get nil as the answer. I've always thought that's quite handy. Of course it is possible to implement a Null pattern i...

How do I remove an active outline from jquery accordion ?

I am using Jquery Accordion. The active link has an outline. I have tried using css: #accordion a:focus { outline: none; } #accordion a:active {outline: none; font-weight:bold;} and also #accordion a:-moz-any-link:focus { outline: none; } None of these seem to work. Can anyone advise a setting or another option to remove the dot...

None in boost.python

I am trying to translate the following code d = {} d[0] = None into C++ with boost.python boost::python::dict d; d[0] = ?None How can I get a None object in boost.python? ANSWER: boost::python::dict d; d[0] = boost::python::object(); ...

List minimum in Python with None?

Is there any clever in-built function or something that will return 1 for the min() example below? (I bet there is a solid reason for it not to return anything, but in my particular case I need it to disregard None values really bad!) >>> max([None, 1,2]) 2 >>> min([None, 1,2]) >>> ...

jquery count div that has a display:none attribute

I want to count the div that has a class name "items" and has an attribute "style=display:none". <div id="skills"> <div class="items" style="display:none">1</div> <div class="items">2</div> <div class="items">3</div> <div class="items" style="display:none">4</div> <div class="items" style="display:none">5</div></div> the output should...

Authentification-None for one folder(page) when the project is under FormsAuthentifications

I have a WebApplication on asp.net 2.0 with namespace Admin. I have Form Authentification mode for the project. <authentication mode="Forms"> <forms name="ASP_XML_Form" loginUrl="Login.aspx" protection="All" timeout="30" path="/" requireSSL="false" slidingExpiration="true" cookieless="AutoDetect...

Python check for blank CSV value not working

I have a CSV file and I am running a script against it to insert into a database. If the value is blank then I don't want to insert it. Here is what I have if attrs[attr] != '' and attrs[attr] != None: log.info('Attriute ID: %s' % attr) log.info('Attriute Value: %s' % attrs[attr]) sql = insert_attr_q...

ASP.Net incorrect background image style rendered

Using ASP.Net, I have a server control for which i would like to add the inline css style "background-image:none". However, when i call: writer.AddStyleAttribute("background-image", "none"); The following inline style is generated (and tries to resolve the url "none"): background-image:url(none) Is there a special syntax I can use...

display:none doesn't work on outlook 2007

I want to send some msg from our manage system to customers. but i wanna some tags hidden to them. i set css : .hidden{display:none;} , but this does not work. ...

StringProperty, None vs. Empty String

class Person(db.Model): first_name=db.StringProperty() middle_name=db.StringProperty() last_name=db.StringProperty() p1=Person(first_name='john', last_name='smith') p2=Person(first_name='john',middle_name=None,last_name='smith') p3=Person(first_name='john',middle_name='', last_name='smith') p1 and p2 is the same...

django: Nonelogout in admin urls

After upgrading to Django 1.2 I have strange urls in my administration panel. They look like this: http://example.com/admin/Nonelogout/ or http://example.com/admin/Nonepassword_change/ What might have gone wrong during the migration and what I need to fix? I have found in django source, that it is caused by root_path, but I have n...

jQuery Detect CSS Property Change

Hi Guys, I am trying to use jQuery to establish whether a CSS property has changed inside a class. I dont want to use .HasClass() - I want to find a property within the CSS - namely display:block; I thought maybe this might work ? if (jQuery('css-class').css('display') == 'block') But not sure if it does. Does anyone have any sugg...

Lightbox display:none css problem

Im trying to rotate 3 panels of lightbox icons, problem is Lightbox dosen't seem to like the display:none divs. Is there any way i can make lightbox aware of the existance of the hidden div's. Check out the problem at www.richmondbuild.co.uk/new.html. If anyone can spare a few minuits on this i would be muchly happy!. Mike1038 ...

Function returning a tuple or None: how to call that function nicely?

Hello, Suppose the following: def MyFunc(a): if a < 0: return None return (a+1, a+2, a+3) v1, v2, v3 = MyFunc() # Bad ofcourse, if the result was None What is the best way to define a function that returns a tuple and yet can be nicely called. Currently, I could do this: r = MyFunc() if r: v1, v2, v3 = r else: # bad!! ...

Python + JSON, what happened to None?

Dumping and loading a dict with None as key, results in a dict with "null" as the key. Values are un-affected, but things get even worse if a string-key "null" actually exists. What am I doing wrong here? Why cant i serialize/deserialize a dict with "None" keys? Example >>> json.loads(json.dumps({'123':None, None:'What happened to No...