Search Results

Search found 1366 results on 55 pages for 'universal coder'.

Page 8/55 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • MVC 4 Authentication

    - by Aligned
    First: After searching for awhile to figure out what’s new/different with MVC 4 and forms authentication, this is the best article I've found on the subject: http://weblogs.asp.net/jgalloway/archive/2012/08/29/simplemembership-membership-providers-universal-providers-and-the-new-asp-net-4-5-web-forms-and-asp-net-mvc-4-templates.aspx Some quotes from the article: “The ASP.NET Web Pages team designed SimpleMembership to (wait for it) simplify the task of dealing with membership” "WSAT is built to work with ASP.NET Membership, and is not compatible with Simple Membership. There are two main options there: Use the WebSecurity and OAuthWebSecurity API to manage the users and roles Create a web admin using the above APIs Since SimpleMembership runs on top of your database, you can update your users as you would any other data - via EF or even in direct database edits (in development, of course)" “If you want to use an existing ASP.NET Membership Provider in ASP.NET MVC 4, you can't use the new AccountController. You can do a few things:” “Universal Providers do not work with Simple Membership.” ~ this post (look for Bob.at.SBS’s answer) says Universal Providers is not needed for MVC 4 to work in Azure)   I've been trying to figure out the Forms Authentication in MVC4. It's different than the past approach (aspnet_regsql). If you do file new project -> MVC 4 -> internet application, you get a really nice template with the controller and model setup for you. However, the tables are different than using aspnet_regsql and the ASP.Net Configuration tool (WSAT) wasn’t connecting to the data I had (it was creating an App_Data/aspnet.mdf file, which I didn’t see right away). Points of Note The database tables are created in the SimpleMembershipInitializer class, when you first run your app using Entity Framework 5 migration functionality. The tables created are webpages_Membership, webpages_OAuthMembership, webpages_Roles, webpages_UsersInRoles, UserProfile. Web.config settings don’t seem to be needed.   Scott Hanselman on Universal Providers was also useful if not somewhat out dated. Universal Providers and SimpleMembership are not compatible. http://www.asp.net/web-pages/tutorials/security/16-adding-security-and-membership – walk-through

    Read the article

  • Can we use both Google Analytics (Asynchronous) and Google Analytics with Display Advertising code in same page

    - by Gadde
    I have Google Analytics (Asynchronous) script <script type=”text/javascript”> _gaq.push(['_setAccount', 'UA-XXXXX-X']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> and Google Analytics with Display Advertising Script <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXXXX-X-yz']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> The UA - codes are different can i use both the codes ? I've read some where that Universal Analytics will not interfere with previous versions of Google Analytics. If i have upgraded to Universal Analytics, If the UA - codes are different should i use only the Universal Analytics script or should i use both Universal Analytics script and Universal Analytics script. please advise.....

    Read the article

  • Python MySQL wrong architecture error

    - by phoebebright
    I've been at this for some time and read many sites on the subject. suspect I have junk lying about causing this problem. But where? This is the error when I import MySQLdb in python: >>> import MySQLdb /Library/Python/2.6/site-packages/MySQL_python-1.2.3c1-py2.6-macosx-10.6-universal.egg/_mysql.py:3: UserWarning: Module _mysql was already imported from /Library/Python/2.6/site-packages/MySQL_python-1.2.3c1-py2.6-macosx-10.6-universal.egg/_mysql.pyc, but /Users/phoebebr/Downloads/MySQL-python-1.2.3c1 is being added to sys.path Traceback (most recent call last): File "<stdin>", line 1, in <module> File "MySQLdb/__init__.py", line 19, in <module> import _mysql File "build/bdist.macosx-10.6-universal/egg/_mysql.py", line 7, in <module> File "build/bdist.macosx-10.6-universal/egg/_mysql.py", line 6, in __bootstrap__ ImportError: dlopen(/Users/phoebebr/.python-eggs/MySQL_python-1.2.3c1-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so, 2): no suitable image found. Did find: /Users/phoebebr/.python-eggs/MySQL_python-1.2.3c1-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so: mach-o, but wrong architecture I'm trying for 64 bit so checked here: file $(which python) /usr/bin/python: Mach-O universal binary with 3 architectures /usr/bin/python (for architecture x86_64): Mach-O 64-bit executable x86_64 /usr/bin/python (for architecture i386): Mach-O executable i386 /usr/bin/python (for architecture ppc7400): Mach-O executable ppc file $(which mysql) /usr/local/mysql/bin/mysql: Mach-O 64-bit executable x86_64 Have set my default version of python to 2.6 python Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Tried deleting build directory and python setup.py clean Renamed Python/2.5/site-packages so it could not try and pick that up. Run out of ideas. Any suggestions?

    Read the article

  • Xcode / Interface Builder - better workflow from designer to coder?

    - by tbarbe
    Were dealing with some pretty custom UI elements while building our OSX / Cocoa and iPhone / IPad apps. I was wondering if anyone has good recommendations or tricks for getting a better workflow between UI designers and coders while using Xcode / Interface Builder? It seems that many things require programmatic settings with UI editing in Cocoa... if you stray from the pre-built UI elements then you can't really easily drag-drop build a UI... instead we end up handing off a design doc ( photoshop/illustrator ) and then the poor developer has to deal with recreating this masterpiece in code or by using interface builder - usually a combination of both. This work flow is leading us to not so great results and we have to re-iterate around the UI elements to get them to work better. We love CSS and / or Flash designer to developer workflow where the UI could look exactly as it should and the hand off to developer was more seamless. Is there anyone out there who has some tricks - or insights into getting better workflow when using tools like Xcode / Interface Builder and doing Cocoa apps?

    Read the article

  • How do I run a universal app on the iPhone 3.1.3 simulator?

    - by bpapa
    I'm working on a new app that I want to be universal for the iPhone and iPad. I started out with the "Create a Window-based app" wizard, and it created separate app delegates in "iPhone" and "iPad" groups. Since I already was quite familiar with iPhone dev, I did that part of my project, and now I'm ready to do some iPad stuff. So... I started out by adding a UISplitViewController to my iPad delegate, switch the Active SDK to 3.2, and it works! But when I switch back to 3.1.3, and try to run it in the simulator, Build and Go fails. For starters, I see: ...path.../iPad/AppDelegate_Pad.h:13: error: expected specifier-qualifier-list before 'UISplitViewController' I've got my Base SDK set to 3.2 and my Deployment Target set to 3.1.3. I thought that was enough. But I also have found in the documentation this method to conditionally compile: #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 30200 MyIPadViewController* vc; // Create the iPad view controller #else MyIPhoneViewController* vc; // Create the iPhone view controller #endif So do I need to do this everywhere? It seems like an awful lot of code to add (that I'll be getting rid of in a short time for 4.0 anyway) so I feel like I must be doing something wrong. And, I don't even have any idea how this works for things like @property or @synthesize declarations. tl;dr version of the question - did I miss a setting somewhere?

    Read the article

  • Default or fink python and lxml under 10.6.8

    - by songdogtech
    Ah, confusion. I'm trying to install a python library called lxml as needed by a python script. I've been through numerous SU quesitons and answers. I haven't been able to make much progress. I run easy_install lxml and get: Processing lxml-3.0.1-py2.6-macosx-10.6-universal.egg lxml 3.0.1 is already the active version in easy-install.pth Using /Library/Python/2.6/site-packages/lxml-3.0.1-py2.6-macosx-10.6-universal.egg Processing dependencies for lxml Finished processing dependencies for lxml but when I run my script, I get: File "scraper.py", line 3, in import lxml.html File "/Library/Python/2.6/site-packages/lxml-3.0.1-py2.6-macosx-10.6-universal.egg/lxml/html/init.py", line 42, in from lxml import etree ImportError: dlopen(/Library/Python/2.6/site-packages/lxml-3.0.1-py2.6-macosx-10.6-universal.egg/lxml/etree.so, 2): Symbol not found: _htmlParseChunk Referenced from: /Library/Python/2.6/site-packages/lxml-3.0.1-py2.6-macosx-10.6-universal.egg/lxml/etree.so Expected in: flat namespace in /Library/Python/2.6/site-packages/lxml-3.0.1-py2.6-macosx-10.6-universal.egg/lxml/etree.so I think that maybe I'm not using the correct python install? I've installed python with fink, but should I use OS X's python? This is in my .profile: test -r /sw/bin/init.sh && . /sw/bin/init.sh which points to the fink install. echo $PATH gives me: /sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/X11R6/bin Should I change that to point to snow leopard's python? (Which is 2.6.1) In Library/, there is: which are the lxml libaries I need, it appears, as well as requests. And whereis python gives me /usr/bin/python What do I do? How do I get python to use these libraries. And which python?

    Read the article

  • Error installing pygraphviz on OSX

    - by Neil
    I'm trying to get the graph-models to work (from django-command extensions) on Snow Leopard. It requires pygraphviz, which I installed via macports. After successful install I am getting this error: >>> import pygrahphviz Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named pygrahphviz >>> import pygraphviz Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Python/2.6/site-packages/pygraphviz-1.1-py2.6-macosx-10.6-universal.egg/pygraphviz/__init__.py", line 54, in <module> from agraph import AGraph, Node, Edge, Attribute, ItemAttribute File "/Library/Python/2.6/site-packages/pygraphviz-1.1-py2.6-macosx-10.6-universal.egg/pygraphviz/agraph.py", line 19, in <module> import graphviz as gv File "/Library/Python/2.6/site-packages/pygraphviz-1.1-py2.6-macosx-10.6-universal.egg/pygraphviz/graphviz.py", line 7, in <module> import _graphviz ImportError: dlopen(/Library/Python/2.6/site-packages/pygraphviz-1.1-py2.6-macosx-10.6-universal.egg/pygraphviz/_graphviz.so, 2): Symbol not found: _Agdirected Referenced from: /Library/Python/2.6/site-packages/pygraphviz-1.1-py2.6-macosx-10.6-universal.egg/pygraphviz/_graphviz.so Expected in: flat namespace in /Library/Python/2.6/site-packages/pygraphviz-1.1-py2.6-macosx-10.6-universal.egg/pygraphviz/_graphviz.so >>> Any suggestions?

    Read the article

  • Which universal or driverless printing solution do you use/recommend?

    - by Matt
    I'm in need of a driverless printing solution for Microsoft Terminal Services 2003/2008. This is mainly to support clients who are connected through broadband into our hosted servers. We were hoping that MSTS 2008 thinprint would be the answer but unfortunately it performs poorly in the print area. The files are too large. I found the following slightly outdated URL: http://www.msterminalservices.org/software/Printing/ This lists a number of products but I have no experience with any of them. I'd like a product that works/easy to install (as our clients are remote and not particularly tech savvy) and ideally I just pay for the server license and not every clients. What is your experience/recommendation and tips you can offer me in regards to TS printing? thanks in advance.

    Read the article

  • how to create a system-wide independent universal counter object primarily for Database keys?

    - by andora
    I would like to create/use a system-wide independent universal 'counter object' that can be called via COM in a thread-safe manner. The counter object will be passed an ID to identify which counter to return, handle the counting, 'persist' the count (occasionally), have reasonable performance (as fast as possible) perhaps capable of 1000 counts per second or better (1mS) and be accessible cross-process/out-of-process. The current count status must be persisted between object restarts/shutdowns. The counter object is liklely to be a 'singleton' type object implemented in some form of free-threaded dictionary, containing maybe 10 counters (perhaps 50 max). The count needs to be monotonic and consistent, (ie: guaranteed unique sequential values). Each counter should have a few methods, like reset, inc, dec, set, clear, remove. As a luxury, I would like to have a variable-increment (ie: 'step by' value). To support thread-safefty, perhaps some sorm of critical-section or mutex call. It just needs to return a long/4byte signed integer. I really want something that can be called from anywhere, including VBScript, so I figure COM is my preferred solution. The primary use of this is for database keys. I am unable to use autoinc or guid type keys and have ruled out database-generated counting systems at this point. I've spent days researching this and I have really struggled to find a solution. The best I can find is a free-threaded dictionary object that can be instantiated using COM+ from Motobit - it seems to offer all the 'basics' and I guess I could create some form of wrapper for this. So, here are my questions: Does such a 'general purpose counter-object already exist? Can you direct me to it? (MS did do an IIS/ASP object called 'MSWC.Counter' but this isn't 'cross-process'/ out-of-process component and isn't thread-safe. (but if it was, it would do!) What is the best way of creating such a Component? (I'd prefer VB6 right-now, [don't ask!] but can do in VB.NET2005 if I had to). I don't have the skills/knowledge/tools to use anything else. I am desparate for a workable solution. I need specific guidance! If anybody can code something up for me I am prepared to pay for it.

    Read the article

  • Can't change screen resolution Ubuntu 10.04 (BT)

    - by Universal Coder
    I'm using Backtrack 5 R2 , what is based on Ubuntu 10.04 LTS. It is installed on Samsung Laptop , and default screen resolution in Windows for it is 1366x768 , but BT/Ubuntu Screen Resolution GUI tool (System=Preferences=Monitors) shows that only resolution available is 1024x768 , and called my monitor as "Unknown". Found a solution , that I have to change resolution in /usr/share/xresprobe/xorg.conf , but I did it , logged out/in and restarted many times , but it took me nowhere. Tried with xrandr , but it shows only mentioned 1024x768 as only solution , and when I tried to input needed resolution , but it did not accept it , because it is not available. As much as I googled , there are a lot of people that had similar problems with BT , but most of them solved with VirtualBox additional tools , but it can't help me , because I've installed it as second OS. In one forum read , that same problems is in Ubuntu 12 , so I ask this question here.

    Read the article

  • Business person turned into coder? How and why? Inspire the non-technical.

    - by huisjames
    I graduated with a Business degree. Two years later, I finally realized the power of programming - the power to "invent." I wish I realized this in high school. Nevertheless, I tried to self-teach C# but found it difficult. Then I pivoted to learn PHP two months ago and I have been able to build things I thought was beyond my abilities. Has anyone had the same experience? Or self-taught programming? What lessons did you learn?

    Read the article

  • How to serialize object containing NSData?

    - by AO
    I'm trying to serialize an object containing a number of data fields...where one of the fields is of datatype NSData which won't serialize. I've followed instructions at http://www.isolated.se but my code (see below) results in the error "[NSConcreteData data]: unrecognized selector sent to instance...". How do I serialize my object? Header file: @interface Donkey : NSObject<NSCoding> { NSString* s; NSData* d; } @property (nonatomic, retain) NSString* s; @property (nonatomic, retain) NSData* d; - (NSData*) serialize; @end Implementation file: @implementation Donkey @synthesize s, d; static NSString* const KEY_S = @"string"; static NSString* const KEY_D = @"data"; - (void) encodeWithCoder:(NSCoder*)coder { [coder encodeObject:self.s forKey:KEY_S]; [coder encodeObject:self.d forKey:KEY_D]; } - (id) initWithCoder:(NSCoder*)coder; { if(self = [super init]) { self.s = [coder decodeObjectForKey:KEY_STRING]; self.d [coder decodeObjectForKey:KEY_DATA]; } return self; } - (NSData*) serialize { return [NSKeyedArchiver archivedDataWithRootObject:self]; } @end

    Read the article

  • Storing arrays in NSUserDefaultsController

    - by neoneye
    Currently I use NSUserDefaults and I'm interested in using NSUserDefaultsController, so that I get notifications when things change. Below is my current code. items = /* NSArray of MYItem's */; NSData* data = [NSKeyedArchiver archivedDataWithRootObject:items]; [[NSUserDefaults standardUserDefaults] setObject:data forKey:kMYItems]; How should I rework my code to store items in NSUserDefaultsController ? Is NSKeyedArchiver the smartest way to store arrays? @interface MYItem : NSObject <NSCoding> { NSString* name; NSString* path; } @property (copy) NSString* name; @property (copy) NSString* path; @end @implementation MYItem @synthesize name, path; -(void)encodeWithCoder:(NSCoder*)coder { [coder encodeObject:name forKey:@"name"]; [coder encodeObject:path forKey:@"path"]; } -(id)initWithCoder:(NSCoder*)coder { [super init]; [self setName:[coder decodeObjectForKey:@"name"]]; [self setPath:[coder decodeObjectForKey:@"path"]]; return self; } @end

    Read the article

  • game state singleton cocos2d, initWithEncoder always returns null

    - by taber
    Hi, I'm trying to write a basic test "game state" singleton in cocos2d, but for some reason upon loading the app, initWithCoder is never called. Any help would be much appreciated, thanks. Here's my singleton GameState.h: #import "cocos2d.h" @interface GameState : NSObject <NSCoding> { NSInteger level, score; Boolean seenInstructions; } @property (readwrite) NSInteger level; @property (readwrite) NSInteger score; @property (readwrite) Boolean seenInstructions; +(GameState *) sharedState; +(void) loadState; +(void) saveState; @end ... and GameState.m: #import "GameState.h" #import "Constants.h" @implementation GameState static GameState *sharedState = nil; @synthesize level, score, seenInstructions; -(void)dealloc { [super dealloc]; } -(id)init { if(!(self = [super init])) return nil; level = 1; score = 0; seenInstructions = NO; return self; } +(void)loadState { @synchronized([GameState class]) { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *saveFile = [documentsDirectory stringByAppendingPathComponent:kSaveFileName]; Boolean saveFileExists = [[NSFileManager defaultManager] fileExistsAtPath:saveFile]; if(!sharedState) { sharedState = [GameState sharedState]; } if(saveFileExists == YES) { [sharedState release]; sharedState = [[NSKeyedUnarchiver unarchiveObjectWithFile:saveFile] retain]; } // at this point, sharedState is null, saveFileExists is 1 if(sharedState == nil) { // this always occurs CCLOG(@"Couldn't load game state, so initialized with defaults"); sharedState = [self sharedState]; } } } +(void)saveState { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *saveFile = [documentsDirectory stringByAppendingPathComponent:kSaveFileName]; [NSKeyedArchiver archiveRootObject:[GameState sharedState] toFile:saveFile]; } +(GameState *)sharedState { @synchronized([GameState class]) { if(!sharedState) { [[GameState alloc] init]; } return sharedState; } return nil; } +(id)alloc { @synchronized([GameState class]) { NSAssert(sharedState == nil, @"Attempted to allocate a second instance of a singleton."); sharedState = [super alloc]; return sharedState; } return nil; } +(id)allocWithZone:(NSZone *)zone { @synchronized([GameState class]) { if(!sharedState) { sharedState = [super allocWithZone:zone]; return sharedState; } } return nil; } ... -(void)encodeWithCoder:(NSCoder *)coder { [coder encodeInt:level forKey:@"level"]; [coder encodeInt:score forKey:@"score"]; [coder encodeBool:seenInstructions forKey:@"seenInstructions"]; } -(id)initWithCoder:(NSCoder *)coder { CCLOG(@"initWithCoder called"); self = [super init]; if(self != nil) { CCLOG(@"initWithCoder self exists"); level = [coder decodeIntForKey:@"level"]; score = [coder decodeIntForKey:@"score"]; seenInstructions = [coder decodeBoolForKey:@"seenInstructions"]; } return self; } @end ... I'm saving the state on app exit, like this: - (void)applicationWillTerminate:(UIApplication *)application { [GameState saveState]; [[CCDirector sharedDirector] end]; } ... and loading the state when the app finishes loading, like this: - (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { ... [GameState loadState]; ... } I've tried moving around where I call loadState too, for example in my main CCScene, but that didn't seem to work either. Thanks again in advance.

    Read the article

  • Problem trying to install PyCurl on Mac Snow Leopard

    - by Ldn
    Hi, My app needs to use PyCurl, so i tried to install it on my Mac but i found a lot of problems and error :( Requirement: First of all i've to say that the version of Python working on my Mac is 32 bit based, because i need to use WxPython, that needs 32 bit Python. For doing this i used: defaults write com.apple.versioner.python Prefer-32-Bit -bool yes To install PyCurl i used: sudo env ARCHFLAGS="-arch x86_64" easy_install setuptools pycurl And the terminal returned: Best match: setuptools 0.6c11 Processing setuptools-0.6c11-py2.6.egg setuptools 0.6c11 is already the active version in easy-install.pth Installing easy_install script to /usr/local/bin Installing easy_install-2.6 script to /usr/local/bin Using /Library/Python/2.6/site-packages/setuptools-0.6c11-py2.6.egg Processing dependencies for setuptools Finished processing dependencies for setuptools Searching for pycurl Best match: pycurl 7.16.2.1 Processing pycurl-7.16.2.1-py2.6-macosx-10.6-universal.egg pycurl 7.16.2.1 is already the active version in easy-install.pth Using /Library/Python/2.6/site-packages/pycurl-7.16.2.1-py2.6-macosx-10.6-universal.egg Processing dependencies for pycurl Finished processing dependencies for pycurl so i thought that pycurl was correctly installed and working. But... But when i started my app, python return me an error: python /Users/lorenzodenobili/Desktop/Python/AGGIORNATORE_PY/Dropbox/wxPython/test.py Traceback (most recent call last): File "/Users/lorenzodenobili/Desktop/Python/AGGIORNATORE_PY/Dropbox/wxPython/test.py", line 20, in <module> import pycurl File "build/bdist.macosx-10.6-universal/egg/pycurl.py", line 7, in <module> File "build/bdist.macosx-10.6-universal/egg/pycurl.py", line 6, in __bootstrap__ ImportError: dlopen(/Users/lorenzodenobili/.python-eggs/pycurl-7.16.2.1-py2.6-macosx-10.6-universal.egg-tmp/pycurl.so, 2): no suitable image found. Did find: /Users/lorenzodenobili/.python-eggs/pycurl-7.16.2.1-py2.6-macosx-10.6-universal.egg-tmp/pycurl.so: mach-o, but wrong architecture Yep, there is something quite big that goes wrong. I really don't have any idea on how to solve this error, so i really need your help! thank you so much!!

    Read the article

  • error when plotting log'd array in matplotlib/scipy/numpy

    - by user248237
    I have two arrays and I take their logs. When I do that and try to plot their scatter plot, I get this error: File "/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/pyplot.py", line 2192, in scatter ret = ax.scatter(x, y, s, c, marker, cmap, norm, vmin, vmax, alpha, linewidths, faceted, verts, **kwargs) File "/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/axes.py", line 5384, in scatter self.add_collection(collection) File "/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/axes.py", line 1391, in add_collection self.update_datalim(collection.get_datalim(self.transData)) File "/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/collections.py", line 153, in get_datalim offsets = transOffset.transform_non_affine(offsets) File "/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/transforms.py", line 1924, in transform_non_affine self._a.transform(points)) File "/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/transforms.py", line 1420, in transform return affine_transform(points, mtx) ValueError: Invalid vertices array. the code is simply: myarray_x = log(my_array[:, 0]) myarray_y = log(my_array[:, 1]) plt.scatter(myarray_x, myarray_y) any idea what could be causing this? thanks.

    Read the article

  • How can I use Django with MySQL in MAMP stack?

    - by Robert A Henru
    Hi all, I have difficulty especially in installing MySQLdb module (MySQL-python-1.2.3c1), to connect to the MySQL in MAMP stack. I've done a number of things such as copying the mysql include directory and library (including plugin) from a fresh installation of mysql (version 5.1.47) to the one inside MAMP (version 5.1.37). Now, the MySQLdb module build and install doesnt give me error. The error happens when I'm calling 'import MySQLdb' from python shell (version 2.6). Traceback (most recent call last): File "<stdin>", line 1, in <module> File "build/bdist.macosx-10.6-universal/egg/MySQLdb/__init__.py", line 19, in <module> File "build/bdist.macosx-10.6-universal/egg/_mysql.py", line 7, in <module> File "build/bdist.macosx-10.6-universal/egg/_mysql.py", line 6, in __bootstrap__ ImportError: dlopen(/Users/rhenru/.python-eggs/MySQL_python-1.2.3c1-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so, 2): Symbol not found: _mysql_affected_rows Referenced from: /Users/rhenru/.python-eggs/MySQL_python-1.2.3c1-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so Expected in: flat namespace in /Users/rhenru/.python-eggs/MySQL_python-1.2.3c1-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so Any idea, what else do I need to do to make it works? Thanks a bunch, Robert

    Read the article

  • Android: Is there a universal way to send the MMS on any android devices?

    - by Roces
    This code works on the plain google devices with native android system. But there is no MMS app in the list on htc sense devices and I don't know about Motorola Blur etc.: final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); emailIntent.setType("image/png"); emailIntent.putExtra(Intent.EXTRA_STREAM, uri); context.startActivity(Intent.createChooser(emailIntent, context.getString(R.string.send_intent_name))); This code works on the htc sense but not from the Chooser, what I really need: Intent sendIntent = new Intent("android.intent.action.SEND_MSG"); sendIntent.putExtra(Intent.EXTRA_STREAM, uri); sendIntent.setType("image/png"); context.startActivity(sendIntent); But I don't know how to combine this code samples together and I don't know how to determine Htc Sense ui programmatically. Is it right way to support different type of devices? Thank you for answers.

    Read the article

  • What is the universal way to use file I/O API with unicode filenames?

    - by dma_k
    In Windows there is a common problem: the filenames should be converted to local codepage, before they are passed to open(). Of course, there is a possibility to use Win32::API for that, but I don't want my script to be platform-dependent. At the moment I have to write something like: open IN, "<", encode("cp1251", $filename) or die $!; but is there any library, that hides these details? I think the local codepage can be automatically detected, so I just want to pass unicode filename and forget about the details. Why is it still not in the box?

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >