Search Results

Search found 3 results on 1 pages for 'ishpeck'.

Page 1/1 | 1 

  • Binfmt config not persisting after booting

    - by Ishpeck
    I have the binfmt kernel module set up so I can run .NET apps as if they were native binaries. I have the /etc/rc.local file configured identically to this. If I power down my computer or boot into Windows, when I come back to Ubuntu, I can't run .NET apps without calling Mono. However, if I simply touch /etc/rc.local and restart, the binfmt configuration appears to kick in and I can run my .NET EXE's as I expect to. How do I get my configuration to stick?

    Read the article

  • Is there a functional way to do this?

    - by Ishpeck
    def flattenList(toFlatten): final=[] for el in toFlatten: if isinstance(el, list): final.extend(flattenList(el)) else: final.append(el) return final When I don't know how deeply the lists will nest, this is the only way I can think to do this. 2

    Read the article

  • Dynamic Operator Overloading on dict classes in Python

    - by Ishpeck
    I have a class that dynamically overloads basic arithmetic operators like so... import operator class IshyNum: def __init__(self, n): self.num=n self.buildArith() def arithmetic(self, other, o): return o(self.num, other) def buildArith(self): map(lambda o: setattr(self, "__%s__"%o,lambda f: self.arithmetic(f, getattr(operator, o))), ["add", "sub", "mul", "div"]) if __name__=="__main__": number=IshyNum(5) print number+5 print number/2 print number*3 print number-3 But if I change the class to inherit from the dictionary (class IshyNum(dict):) it doesn't work. I need to explicitly def __add__(self, other) or whatever in order for this to work. Why?

    Read the article

1