Search Results

Search found 1210 results on 49 pages for 'raise'.

Page 10/49 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Introducing Oracle User Productivity Kit (UPK) 12.1 Thursday 26th June 2014 – Oracle, Reading, Berkshire

    - by Kathryn Lustenberger
    Join Oracle UPK Product Management and Product Development In conjunction with Larmer Brown Register Now v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} Normal 0 false false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} table.MsoTableGrid {mso-style-name:"Table Grid"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-priority:59; mso-style-unhide:no; border:solid windowtext 1.0pt; mso-border-alt:solid windowtext .5pt; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-border-insideh:.5pt solid windowtext; mso-border-insidev:.5pt solid windowtext; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} UPK Client Event – Introducing v12.1 Thursday 26th June 2014 Oracle Thames Valley Park, Reading, Berkshire Agenda Time Session 10.00am Registration and Coffee 10.30am Introductions and Objectives TWIN TRACK SESSION 10.45am Introduction to UPK (Standard) Version 12.1 Overview and Demonstration for delegates new to UPK Upgrading to UPK (Standard) Version 12.1 Demonstration of the latest release, for delegates with experience of UPK 12.25pm Q&A An opportunity for delegates to raise specific questions about the tool Q&A An opportunity for delegates to raise specific questions about the latest release 12.45pm Lunch 1.30pm Larmer Brown Development Tracker Larmer Brown’s Development Tracker addresses the challenge of ensuring that a Content Development Project will meet agreed deadlines, identifying risks with sufficient notice to take action 1.50pm Case Study How the Development Tracker addressed this client’s requirement to track, monitor and report progress on a large-scale implementation Project 2.10pm Larmer Brown Library Content for UPK This session will showcase some of Larmer Brown’s content library and consider how pre-built content can be used to your advantage 2.30pm Coffee Break 2.45pm Making the most of UPK Professional This presentation and demonstration seeks to unlock the potential of UPK Professional for those that may not be fully utilising the tool   3.20pm Case Study How this client has utilised the tracking and reporting features within UPK Professional 3.40pm Summary and Conclusions 4.00pm Close

    Read the article

  • Company wants to write custom project management tool, rather then use third party product.

    - by Jason Evans
    At the company I work, we are really wanting to get into the agile methodology for developing software. One thing that I'm not excited about is the fact that management wants us to build a custom project management feature inside the company's Intranet. I think this is a total waste of time. There are many great third party tools available (e.g. Axosoft OnTime) that can do everything we need, and more. For how much development time it would cost us to build our own project management module, we could buy numerous licences for a third party product. One concern is that, whilst we are writing code for a client, and using our custom Intranet project management module, we find bugs in the module that need fixing ASAP. That means having to stop work on the client code to fix the Intranet. That just puts shivers down my spine. Another worry I have is lack of functionality. This custom module is going to be so basic, that it will just feel really crap to use. That might sound a bit snooty, but for goodness sake, many third party tools are so feature rich, that the idea of having to write our own tool makes feel very uneasy. In fact, I can't be bothered. What do you guys think? I'm going to raise this issue with my boss, since I feel it's such an important topic to talk about. EDIT: Thanks for the great responses, much appreciated. To summarize some of them: Money Naturally my boss does want to save money, by not forking out a few hundred £'s for licences. However, for us to write a custom tool, it will take x number of days, multiplied by approx £500, which is our costs. I don't see the business value in this. Management have mentioned that they want to sell the Intranet as a product in the future, but it's so custom to our needs (and downright basic), that in order to give it to another client, I can see us having to fork a version of the code and rebuild the majority of it anyway. So it's not like we're gaining anything there in reuse. Features Having our own custom module means not feature bloat - only the functionality we require will be in the product. My issue is that there are plenty of free, open-source project management tools out there with minimal features already. So even if cost is an issue, we could look into open-source. Again it all boils down to the fact that I don't see the point in writing a project management tool in this day and age. It's a bit like writing your own web browser - why?, what's the point? Although management are asking for this tool, just because they are, it does not mean I'm going to please them and do it just because they asked for it. If something does not make sense, then I will raise it as a concern. At the end of the day, it's the developers who write the code, it's the developers who make money for a business. Thus, as far I'm concerned, the devs have a very big role in deciding how a company should manage projects and what tools are used. "I am Spartan, argh!" :) Hmm, I've not been able to make this question a wiki for some reason, thus I'm going to have to pick an answer to accept. Cheers. Jas.

    Read the article

  • Application Module Extension in Oracle Application R12

    - by Manoj Madhusoodanan
    In this blog I will describe how to Extend Application Module.I will explain this based on my previous blog PL/SQL based EO.  I want to extend FndUserAM to add a procedure to raise a custom business event when the FND_USER has created successfully. Here I am using a custom business event "xxcust.oracle.apps.demo_event". Please find the code used in Business Event. TablePackage Following steps needs to perform. 1) Download all files pertaining to "Entity Object Based on PL/SQL" to JDEV_USER_HOME/myprojects and JDEV_USER_HOME/myclasses.If you want to see the content of source java file decompile it and save it in JDEV_USER_HOME/myprojects. 2) Create XXFndUserAM as follows. 3) Add following method to XXFndUserAMImpl.    import oracle.apps.fnd.framework.OAException;   import oracle.apps.fnd.framework.server.OADBTransactionImpl;   import oracle.apps.fnd.wf.bes.BusinessEvent;   import oracle.apps.fnd.wf.bes.BusinessEventException;    import java.sql.Connection;     public void raiseEvent(String userName) {        String eventName = "xxcust.oracle.apps.demo_event";        String eventKey = userName;        Connection conn = ((OADBTransactionImpl)getOADBTransaction()).getJdbcConnection();         BusinessEvent event = null;         try{             event = new BusinessEvent(eventName, eventKey);             /* Setting Parameters */             event.setStringProperty("USER_NAME",userName);             event.setStringProperty("STATUS","User has created sucessfully");             event.raise(conn);             }             catch (BusinessEventException e) {                 throw new OAException("Exception occured when invoking web service - "+e.getMessage());             }             getOADBTransaction().commit();    } 4) Create a controller which extends from xxcust.oracle.apps.fnd.user.webui.CreateFndUserCO.Call raiseEvent method from new controller. 5) Create substitution for FndUserAM. 6) Migrate following files to $JAVA_TOP. xxcustom.oracle.apps.fnd.user.server.FndUserAMImpl.javaxxcustom.oracle.apps.fnd.user.server.XXFndUserAM.xmlxxcustom.oracle.apps.fnd.user.webui.XXCreateFndUserCO.java 8) Migrate the substitution. 9) Restart the server. 10) Personalize the page /xxcust/oracle/apps/fnd/user/webuiCreateFndUserPG and set the new controller. 11) Verify the substitution has properly applied by clicking About the Page. 12) Access the page and create a user. You can the the result of the Business Event.

    Read the article

  • C# Socket.BeginSend AsyncCallback behavior (timeout?)

    - by mdarsigny
    Hi guys, Here is a scenario with asynchronous sockets that I dont't quite understand... I have 2 Tcp sockets, a client socket & a server socket. My server socket is bound & listening on a port. My client sockets connect to the server socket (using BeginConnect / EndConnect). I then send a message to the server using BeginSend(). On the server side, I don't do a Receive() or BeginReceive(). What happens is that my AsyncCallback specified for my BeginSend call gets invoked & its IAsyncResult tells me that it completed & the call to Socket.EndSend() does not raise any exception... Is there something that I don't get or shouldn't my AsyncCallback be called only if the BeginSend call actually sends something to the server (ie.: callback called after the server has received all bytes)? If there was no receive done on the server, shouldn't my callback be called after the sendtimeout expires and my call to Socket.EndSend then would raise an exception? Thanks

    Read the article

  • Using M2Crypto to save and load X509 certs in pem files

    - by Brock Pytlik
    I would expect that if I have a X509 cert as an object in memory, saved it as a pem file, then loaded it back in, I would end up with the same cert I started with. This seems not to be the case however. Let's call the original cert A, and the cert loaded from the pem file B. A.as_text() is identical to B.as_text(), but A.as_pem() differs from B.as_pem(). To say the least, I'm confused by this. As a side note, if A has been signed by another entity C, then A will verify against C's cert, but B will not. I've put together a tiny sample program to demonstrate what I'm seeing. When I run this, the second RuntimeError is raised. Thanks, Brock #!/usr/bin/python2.6 import M2Crypto as m2 import time cur_time = m2.ASN1.ASN1_UTCTIME() cur_time.set_time(int(time.time()) - 60*60*24) expire_time = m2.ASN1.ASN1_UTCTIME() # Expire certs in 1 hour. expire_time.set_time(int(time.time()) + 60 * 60 * 24) cs_rsa = m2.RSA.gen_key(1024, 65537, lambda: None) cs_pk = m2.EVP.PKey() cs_pk.assign_rsa(cs_rsa) cs_cert = m2.X509.X509() # These two seem the minimum necessary to make the as_text function call work # at all cs_cert.set_not_before(cur_time) cs_cert.set_not_after(expire_time) # This seems necessary to fill out the complete cert without errors. cs_cert.set_pubkey(cs_pk) # I've tried with the following set lines commented out and not commented. cs_name = m2.X509.X509_Name() cs_name.C = "US" cs_name.ST = "CA" cs_name.OU = "Fake Org CA 1" cs_name.CN = "www.fakeorg.dex" cs_name.Email = "[email protected]" cs_cert.set_subject(cs_name) cs_cert.set_issuer_name(cs_name) cs_cert.sign(cs_pk, md="sha256") orig_text = cs_cert.as_text() orig_pem = cs_cert.as_pem() print "orig_text:\n%s" % orig_text cs_cert.save_pem("/tmp/foo") tcs = m2.X509.load_cert("/tmp/foo") tcs_text = tcs.as_text() tcs_pem = tcs.as_pem() if orig_text != tcs_text: raise RuntimeError( "Texts were different.\nOrig:\n%s\nAfter load:\n%s" % (orig_text, tcs_text)) if orig_pem != tcs_pem: raise RuntimeError( "Pems were different.\nOrig:\n%s\nAfter load:\n%s" % (orig_pem, tcs_pem))

    Read the article

  • NSURL URLWithString: raises exception

    - by Stephen Darlington
    In short, [NSURL URLWithString:] appears to be raising an exception. According to the documentation "If the string was malformed, returns nil." There is no mention of an exception being raised under any circumstance. In addition to this, I am both encoding the URL and checking for nil before converting the string to a URL. Can anyone offer any advice as to which exception it could be or what other error checking I should be doing before converting the URL? In case you're interested in the details, the calling code looks like this: NSString* tmpText = [newUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; if (tmpText == nil) { // error handling } else { NSURL* tmpURL = [NSURL URLWithString:tmpText]; And this is a section from the crash report download from iTunes Connect: 8 libobjc.A.dylib 0x300c1f84 objc_exception_throw 9 CoreFoundation 0x3029a598 +[NSException raise:format:arguments:] 10 CoreFoundation 0x3029a538 +[NSException raise:format:] 11 Foundation 0x30696dde -[NSURL initWithString:relativeToURL:] 12 Foundation 0x30696cd8 +[NSURL URLWithString:relativeToURL:] 13 Foundation 0x30696cae +[NSURL URLWithString:] 14 Yummy 0x000146ca -[DeliciousPostCell setUrl:] + 46 It seems that the URL was in a "bad" format somehow but that should really be returning a nil not an exception. I have never seen the exception being raised myself so I can't use XCode to trap the code and see what's happening. And the user(s) that experienced the problem never contacted me directly so I can't ask for more details. Any suggestions greatly appreciated. Update (14/7/2009): Seems like such a hack, but I added an exception block around the suspect line. I also raised a Radar bug report (#7031551) suggesting that the code should match the documentation.

    Read the article

  • Spikes in Socket Performance

    - by Harun Prasad
    We are facing random spikes in high throughput transaction processing system using sockets for IPC. Below is the setup used for the run: The client opens and closes new connection for every transaction, and there are 4 exchanges between the server and the client. We have disabled the TIME_WAIT, by setting the socket linger (SO_LINGER) option via getsockopt as we thought that the spikes were caused due to the sockets waiting in TIME_WAIT. There is no processing done for the transaction. Only messages are passed. OS used Centos 5.4 The average round trip time is around 3 milli seconds, but some times the round trip time ranges from 100 milli seconds to couple of seconds. Steps used for Execution and Measurement and output Starting the server $ python sockServerLinger.py /dev/null & Starting the client to post 1 million transactions to the server. And logs the time for a transaction in the client.log file. $ python sockClient.py 1000000 client.log Once the execution finishes the following command will show the execution time greater than 100 milliseconds in the format <line_number>:<execution_time>. $ grep -n "0.[1-9]" client.log | less Below is the example code for Server and Client. Server # File: sockServerLinger.py import socket, traceback,time import struct host = '' port = 9999 l_onoff = 1 l_linger = 0 lingeropt = struct.pack('ii', l_onoff, l_linger) s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, lingeropt) s.bind((host, port)) s.listen(1) while 1: try: clientsock, clientaddr = s.accept() print "Got connection from", clientsock.getpeername() data = clientsock.recv(1024*1024*10) #print "asdasd",data numsent=clientsock.send(data) data1 = clientsock.recv(1024*1024*10) numsent=clientsock.send(data) ret = 1 while(ret>0): data1 = clientsock.recv(1024*1024*10) ret = len(data) clientsock.close() except KeyboardInterrupt: raise except: print traceback.print_exc() continue Client # File: sockClient.py import socket, traceback,sys import time i = 0 while 1: try: st = time.time() s = socket.socket(socket.AF_INET,socket.SOCK_STREAM) while (s.connect_ex(('127.0.0.1',9999)) != 0): continue numsent=s.send("asd"*1000) response = s.recv(6000) numsent=s.send("asd"*1000) response = s.recv(6000) i+=1 if i == int(sys.argv[1]): break except KeyboardInterrupt: raise except: print "in exec:::::::::::::",traceback.print_exc() continue print time.time() -st

    Read the article

  • Fitting Gaussian KDE in numpy/scipy in Python

    - by user248237
    I am fitting a Gaussian kernel density estimator to a variable that is the difference of two vectors, called "diff", as follows: gaussian_kde_covfact(diff, smoothing_param) -- where gaussian_kde_covfact is defined as: class gaussian_kde_covfact(stats.gaussian_kde): def __init__(self, dataset, covfact = 'scotts'): self.covfact = covfact scipy.stats.gaussian_kde.__init__(self, dataset) def _compute_covariance_(self): '''not used''' self.inv_cov = np.linalg.inv(self.covariance) self._norm_factor = sqrt(np.linalg.det(2*np.pi*self.covariance)) * self.n def covariance_factor(self): if self.covfact in ['sc', 'scotts']: return self.scotts_factor() if self.covfact in ['si', 'silverman']: return self.silverman_factor() elif self.covfact: return float(self.covfact) else: raise ValueError, \ 'covariance factor has to be scotts, silverman or a number' def reset_covfact(self, covfact): self.covfact = covfact self.covariance_factor() self._compute_covariance() This works, but there is an edge case where the diff is a vector of all 0s. In that case, I get the error: File "/srv/pkg/python/python-packages/python26/scipy/scipy-0.7.1/lib/python2.6/site-packages/scipy/stats/kde.py", line 334, in _compute_covariance self.inv_cov = linalg.inv(self.covariance) File "/srv/pkg/python/python-packages/python26/scipy/scipy-0.7.1/lib/python2.6/site-packages/scipy/linalg/basic.py", line 382, in inv if info>0: raise LinAlgError, "singular matrix" numpy.linalg.linalg.LinAlgError: singular matrix What's a way to get around this? In this case, I'd like it to return a density that's essentially peaked completely at a difference of 0, with no mass everywhere else. thanks.

    Read the article

  • Django: Using 2 different AdminSite instances with different models registered

    - by omat
    Apart from the usual admin, I want to create a limited admin for non-staff users. This admin site will have different registered ModelAdmins. I created a folder /useradmin/ in my project directory and similar to contrib/admin/_init_.py I added an autodiscover() which will register models defined in useradmin.py modules instead of admin.py: # useradmin/__init__.py def autodiscover(): # Same as admin.autodiscover() but registers useradmin.py modules ... for app in settings.INSTALLED_APPS: mod = import_module(app) try: before_import_registry = copy.copy(site._registry) import_module('%s.useradmin' % app) except: site._registry = before_import_registry if module_has_submodule(mod, 'useradmin'): raise I also cretated sites.py under useradmin/ to override AdminSite similar to contrib/admin/sites: # useradmin/sites.py class UserAdminSite(AdminSite): def has_permission(self, request): # Don't care if the user is staff return request.user.is_active def login(self, request): # Do the login stuff but don't care if the user is staff if request.user.is_authenticated(): ... else: ... site = UserAdminSite(name='useradmin') In the project's URLs: # urls.py from django.contrib import admin import useradmin admin.autodiscover() useradmin.autodiscover() urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), (r'^useradmin/', include(useradmin.site.urls)), ) And I try to register different models in admin.py and useradmin.py modules under app directories: # products/useradmin.py import useradmin class ProductAdmin(useradmin.ModelAdmin): pass useradmin.site.register(Product, ProductAdmin) But when registering models in useradmin.py like useradmin.site.register(Product, ProductAdmin), I get 'module' object has no attribute 'ModelAdmin' exception. Though when I try this via shell; import useradmin from useradmin import ModelAdmin does not raise any exception. Any ideas what might be wrong? Edit: I tried going the @Luke way and arranged the code as follows as minimal as possible: (file paths are relative to the project root) # admin.py from django.contrib.admin import autodiscover from django.contrib.admin.sites import AdminSite user_site = AdminSite(name='useradmin') # urls.py (does not even have url patterns; just calls autodiscover()) import admin admin.autodiscover() # products/admin.py import admin from products.models import Product admin.user_site.register(Product) As a result I get an AttributeError: 'module' object has no attribute 'user_site' when admin.user_site.register(Product) in products/admin.py is called. Any ideas? Solution: I don't know if there are better ways but, renaming the admin.py in the project root to useradmin.py and updating the imports accordingly resolved the last case, which was a naming and import conflict.

    Read the article

  • Xcode raises exception when refactoring

    - by Sam Gwydir
    When I run a refactor on my code in xcode, all the files are correctly refactored except one, and when I click to check the changes made in that file, the following 'Internal Error Occurs': Uncaught Exception: Invalid parameter not satisfying: fileName Stack Backtrace: The stack backtrace has been logged to the console. Here is what it spat out in the console: 4/7/10 06:47:30 Xcode[35355] [MT] Uncaught Exception: Invalid parameter not satisfying: fileName Backtrace: 0 0x92842bbd __raiseError (in CoreFoundation) 1 0x914b9509 objc_exception_throw (in libobjc.A.dylib) 2 0x92842908 +[NSException raise:format:arguments:] (in CoreFoundation) 3 0x98801dc3 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] (in Foundation) 4 0x98db0f8e -[NSDocument(NSDeprecated) initWithContentsOfFile:ofType:] (in AppKit) 5 0x0075c07e -[PBXTextFileDocument initWithContentsOfFile:ofType:] (in DevToolsInterface) 6 0x007dc5be -[PBXFileDocument initWithFileReference:usingType:] (in DevToolsInterface) 7 0x00b1c0f8 -[XCRefactoringFileChangeSet(XCRefactoringModule_HelperMethods) referencedTextFileDocument] (in DevToolsInterface) 8 0x00b1d1f4 -[XCRefactoringEditableExistingTextFileChangeSet populateComparator:] (in DevToolsInterface) 9 0x00ab19b7 -[XCRefactoringModuleFileItem populateComparator:previewFinished:] (in DevToolsInterface) 10 0x00aa4606 -[XCRefactoringModule(MasterListDelegate) outlineViewSelectionDidChange:] (in DevToolsInterface) 11 0x987381cb _nsnote_callback (in Foundation) 12 0x927ca3f9 __CFXNotificationPost (in CoreFoundation) 13 0x927c9e2a _CFXNotificationPostNotification (in CoreFoundation) 14 0x9872d098 -[NSNotificationCenter postNotificationName:object:userInfo:] (in Foundation) 15 0x9873a475 -[NSNotificationCenter postNotificationName:object:] (in Foundation) 16 0x98af1de2 -[NSTableView _enableSelectionPostingAndPost] (in AppKit) 17 0x98bd11d0 -[NSTableView mouseDown:] (in AppKit) 18 0x98bcfeea -[NSOutlineView mouseDown:] (in AppKit) 19 0x007596c3 -[PBXExtendedOutlineView mouseDown:] (in DevToolsInterface) 20 0x98b6e548 -[NSWindow sendEvent:] (in AppKit) 21 0x00757a06 -[XCWindow sendEvent:] (in DevToolsInterface) 22 0x98a871af -[NSApplication sendEvent:] (in AppKit) 23 0x006f6dec -[PBXExtendedApplication sendEvent:] (in DevToolsInterface) 24 0x98a1ac4f -[NSApplication run] (in AppKit) 25 0x98a12c85 NSApplicationMain (in AppKit) 26 0x0000eee1 27 0x000021a5 If you would like to take a look at the project I'm working on, here is a link to download my xcodeproject: Tea Timer.zip To recreate my problem, open Timer.h, attempt to refactor timeField to minuteField, use the preview function of refactor and then select Timer.m, to look at the changes supposedly made within. It will then raise this error without editing the file.

    Read the article

  • Bitbucket API authentication with Python's HTTPBasicAuthHandler

    - by jbochi
    I'm trying to get the list of issues on a private repository using bitbucket's API. I have confirmed that HTTP Basic authentication works with hurl, but I am unable to authenticate in Python. Adapting the code from this tutorial, I have written the following script. import cookielib import urllib2 class API(): api_url = 'http://api.bitbucket.org/1.0/' def __init__(self, username, password): self._opener = self._create_opener(username, password) def _create_opener(self, username, password): cj = cookielib.LWPCookieJar() cookie_handler = urllib2.HTTPCookieProcessor(cj) password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm() password_manager.add_password(None, self.api_url, username, password) auth_handler = urllib2.HTTPBasicAuthHandler(password_manager) opener = urllib2.build_opener(cookie_handler, auth_handler) return opener def get_issues(self, username, repository): query_url = self.api_url + 'repositories/%s/%s/issues/' % (username, repository) try: handler = self._opener.open(query_url) except urllib2.HTTPError, e: print e.headers raise e return handler.read() api = API(username='my_username', password='XXXXXXXX') api.get_issues('my_username', 'my_repository') results in: >>> Server: nginx/0.7.62 Date: Mon, 19 Apr 2010 16:15:06 GMT Content-Type: text/plain Connection: close Vary: Authorization,Cookie Content-Length: 9 Traceback (most recent call last): File "C:/USERS/personal/bitbucket-burndown/bitbucket-api.py", line 29, in <module> print api.get_issues('my_username', 'my_repository') File "C:/USERS/personal/bitbucket-burndown/bitbucket-api.py", line 25, in get_issues raise e HTTPError: HTTP Error 401: UNAUTHORIZED api.get_issues('jespern', 'bitbucket') works like a charm. What's wrong with my code?

    Read the article

  • No acceleration for OpenGL and ImportError for modules that exist

    - by Aku
    I'm writing a program using wxPython and OpenGL. The program works, but without any antialiasing, and I get these error messages: (I'm using ArchLinux) INFO:OpenGL.acceleratesupport:No OpenGL_accelerate module loaded: No module named OpenGL_accelerate INFO:OpenGL.formathandler:Unable to load registered array format handler numpy: Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/OpenGL/arrays/formathandler.py", line 44, in loadPlugin plugin_class = entrypoint.load() File "/usr/lib/python2.6/site-packages/OpenGL/plugins.py", line 14, in load return importByName( self.import_path ) File "/usr/lib/python2.6/site-packages/OpenGL/plugins.py", line 28, in importByName module = __import__( ".".join(moduleName), {}, {}, moduleName) File "/usr/lib/python2.6/site-packages/OpenGL/arrays/numpymodule.py", line 11, in <module> raise ImportError( """No numpy module present: %s"""%(err)) ImportError: No numpy module present: No module named numpy INFO:OpenGL.formathandler:Unable to load registered array format handler numeric: Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/OpenGL/arrays/formathandler.py", line 44, in loadPlugin plugin_class = entrypoint.load() File "/usr/lib/python2.6/site-packages/OpenGL/plugins.py", line 14, in load return importByName( self.import_path ) File "/usr/lib/python2.6/site-packages/OpenGL/plugins.py", line 28, in importByName module = __import__( ".".join(moduleName), {}, {}, moduleName) File "/usr/lib/python2.6/site-packages/OpenGL/arrays/numeric.py", line 15, in <module> raise ImportError( """No Numeric module present: %s"""%(err)) ImportError: No Numeric module present: No module named Numeric However, when I look into my site-packages folder, I see those modules present there. I have a wxPython demo program that uses GLCanvas, and it works fine, without any errors. My program is quite similar to the GLCanvas demo, involving just translations, rotations, drawing quads and some basic lighting. What am I doing wrong here? (The code is over 200 lines, if necessary I'll edit this and put it here.)

    Read the article

  • Add fields to Django ModelForm that aren't in the model

    - by Cyclic
    I have a model that looks like: class MySchedule(models.Model): start_datetime=models.DateTimeField() name=models.CharField('Name',max_length=75) With it comes its ModelForm: class MyScheduleForm(forms.ModelForm): startdate=forms.DateField() starthour=forms.ChoiceField(choices=((6,"6am"),(7,"7am"),(8,"8am"),(9,"9am"),(10,"10am"),(11,"11am"), (12,"noon"),(13,"1pm"),(14,"2pm"),(15,"3pm"),(16,"4pm"),(17,"5pm"), (18,"6pm" startminute=forms.ChoiceField(choices=((0,":00"),(15,":15"),(30,":30"),(45,":45")))),(19,"7pm"),(20,"8pm"),(21,"9pm"),(22,"10pm"),(23,"11pm"))) class Meta: model=MySchedule def clean(self): starttime=time(int(self.cleaned_data.get('starthour')),int(self.cleaned_data.get('startminute'))) return self.cleaned_data try: self.instance.start_datetime=datetime.combine(self.cleaned_data.get("startdate"),starttime) except TypeError: raise forms.ValidationError("There's a problem with your start or end date") Basically, I'm trying to break the DateTime field in the model into 3 more easily usable form fields -- a date picker, an hour dropdown, and a minute dropdown. Then, once I've gotten the three inputs, I reassemble them into a DateTime and save it to the model. A few questions: 1) Is this totally the wrong way to go about doing it? I don't want to create fields in the model for hours, minutes, etc, since that's all basically just intermediary data, so I'd like a way to break the DateTime field into sub-fields. 2) The difficulty I'm running into is when the startdate field is blank -- it seems like it never gets checked for non-blankness, and just ends up throwing up a TypeError later when the program expects a date and gets None. Where does Django check for blank inputs, and raise the error that eventually goes back to the form? Is this my responsibility? If so, how do I do it, since it doesn't evaluate clean_startdate() since startdate isn't in the model. 3) Is there some better way to do this with inheritance? Perhaps inherit the MyScheduleForm in BetterScheduleForm and add the fields there? How would I do this? (I've been playing around with it for over an hours and can't seem to get it) Thanks! [Edit:] Left off the return self.cleaned_data -- lost it in the copy/paste originally

    Read the article

  • Unit test for Web Forms MVP presenter has a null Model

    - by jacksonakj
    I am using Web Forms MVP to write an DotNetNuke user control. When the 'SubmitContactUs' event is raised in my unit test the presenter attempts to set the 'Message' property on the Modal. However the View.Modal is null in the presenter. Shouldn't the Web Forms MVP framework automatically build a new View.Model object in the presenter? It could be that the 'Arrange' portion of my test is missing something that the presenter needs. Any help would be appreciated. Here is my test: using System; using AthleticHost.ContactUs.Core.Presenters; using AthleticHost.ContactUs.Core.Views; using Xunit; using Moq; namespace AthleticHost.ContactUs.Tests { public class ContactUsPresenterTests { [Fact] public void ContactUsPresenter_Sets_Message_OnSubmit() { // Arrange var view = new Mock<IContactUsView>(); var presenter = new ContactUsPresenter(view.Object); // Act view.Raise(v => v.Load += null, new EventArgs()); view.Raise(v => v.SubmitContactUs += null, new SubmitContactUsEventArgs("Chester", "Tester", "[email protected]", "http://www.test.com", "This is a test of the emergancy broadcast system...")); presenter.ReleaseView(); // Assert Assert.Contains("Chester Tester", view.Object.Model.Message); } } }

    Read the article

  • Mocking View with RhinoMocks

    - by blu
    We are using MVP (Supervising Controller) for ASP.NET WebForms with 3.5 SP1. What is the preferred way to check the value of a view property that only has the a set operation with RhinoMocks? Here is what we have so far: var service = MockRepository.GenerateStub<IFooService>(); // stub some data for the method used in OnLoad in the presenter var view = MockRepository.GenerateMock<IFooView>(); var presenter = new FooPresenter(view, service); view.Raise(v => v.Load += null, this, EventArgs.Empty); Assert.IsTrue(view.Bars.Count == 10); // there is no get on Bars Should we use Expects or another way, any input would be great. Thanks Update based on Darin Dimitrov's reply. var bars = new List<Bar>() { new Bar() { BarId = 1 } }; var fooService = MockRepository.GenerateStub<IFooService>(); // this is called in OnLoad in the Presenter fooService.Stub(x => x.GetBars()).Return(bars); var view = MockRepository.GenerateMock<IFooView>(); var presenter = new FooPresenter(view, fooService); view.Raise(v => v.Load += null, this, EventArgs.Empty); view.AssertWasCalled(x => x.Bars = bars); // this does not pass This doesn't work. Should I be testing it this way or is there a better way?

    Read the article

  • How CPU finds ISR and distinguishes between devices

    - by ripunjay-tripathi-gmail-com
    I should first share all what I know - and that is complete chaos. There are several different questions on the topic, so please don't get irritated :). 1) To find an ISR, CPU is provided with a interrupt number. In x86 machines (286/386 and above) there is a IVT with ISRs in it; each entry of 4 bytes in size. So we need to multiply interrupt number by 4 to find the ISR. So first bunch of questions is - I am completely confused in mechanism of CPU receiving the interrupt. To raise an interrupt, firstly device shall probe for IRQ - then what ? The interrupt number travels "on IRQ" towards CPU? I also read something like device putting ISR address on data bus ; whats that then ? What is the concept of devices overriding the ISR. Can somebody tell me few example devices where CPU polls for interrupts? And where does it finds ISR for them ? 2) If two devices share an IRQ (which is very much possible), how does CPU differs amongst them ? What if both devices raise an interrupt of same priority simultaneously. I got to know there will be masking of same type and low priority interrupts - but how this communication happens between CPU and device controller? I studied the role of PIC and APIC for this problem, but could not understand. Thanks for reading. Thank you very much for answering.

    Read the article

  • Swig: No Constructor defined

    - by wheaties
    I added %allowexcept to my *.i file when building a Python <-- C++ bridge using Swig. Then I removed that preprocessing directive. Now I can't get the Python produced code to recognize the constructor of a C++ class. Here's the class file: #include <exception> class Swig_Foo{ public: Swig_Foo(){} virtual ~Swig_Foo(){} virtual getInt() =0; virtual throwException() { throw std::exception(); } }; And here's the code Swig produces from it: class Swig_Foo: __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, Swig_Foo, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Swig_Foo, name) def __init__(self): raise AttributeError, "No constructor defined" __repr__ = _swig_repr __swig_destroy__ = _foo.delete_Swig_Foo __del__ = lambda self : None; def getInt(*args): return apply(_foo.Swig_Foo_getInt, args) def throwOut(*args): return apply(_foo.Swig_Foo_throwOut, args) Swig_Foo_swigregister = _foo.Swig_Foo_swigregister Swig_Foo_swigregister(Swig_Foo) The problem is the def __init__self): raise AttributeError, "No constructor defined" portion. It never did this before I added the %allowexception and now that I've removed it, I can't get it to create a real constructor. All the other classes have actual constructors. Quite baffled. Anyone know how I can get it to stop doing this?

    Read the article

  • Coredump in Multithreading Application in RHEL-5

    - by Chinnu
    I am working on multi-threading application it is dumping frequently.I could not able to analyaze the core.The core is showing like this Core was generated by 'thread-process'. Program terminated with signal 6, Aborted. #0 0x00000038f4e30045 in raise () from /lib64/libc.so.6 (gdb) where #0 0x00000038f4e30045 in raise () from /lib64/libc.so.6 #1 0x00000038f4e31ae0 in abort () from /lib64/libc.so.6 #2 0x00000038f4e681bb in __libc_message () from /lib64/libc.so.6 #3 0x00000038f4e72b96 in free () from /lib64/libc.so.6 #4 0x000000000046a137 in std::string::substr () #5 0x000000000042c549 in std::operator<< <char, std::char_traits<char>, std::allocator<char> > () #6 0x000000000042cc1d in std::operator<< <char, std::char_traits<char>, std::allocator<char> > () #7 0x000000000046b069 in std::string::substr () #8 0x000000000046c866 in std::string::substr () #9 0x0000000000431062 in std::operator<< <char, std::char_traits<char>, std::allocator<char> > () #10 0x00000038f5a062e7 in start_thread () from /lib64/libpthread.so.0 #11 0x00000038f4ece3bd in clone () from /lib64/libc.so.6

    Read the article

  • How to test if raising an event results in a method being called conditional on value of parameters

    - by MattC
    I'm trying to write a unit test that will raise an event on a mock object which my test class is bound to. What I'm keen to test though is that when my test class gets it's eventhandler called it should only call a method on certain values of the eventhandlers parameters. My test seems to pass even if I comment the code that calls ProcessPriceUpdate(price); I'm in VS2005 so no lambdas please :( So... public delegate void PriceUpdateEventHandler(decimal price); public interface IPriceInterface{ event PriceUpdateEventHandler PriceUpdate; } public class TestClass { IPriceInterface priceInterface = null; TestClass(IPriceInterface priceInterface) { this.priceInterface = priceInterface; } public void Init() { priceInterface.PriceUpdate += OnPriceUpdate; } public void OnPriceUpdate(decimal price) { if(price > 0) ProcessPriceUpdate(price); } public void ProcessPriceUpdate(decimal price) { //do something with price } } And my test so far :s public void PriceUpdateEvent() { MockRepository mock = new MockRepository(); IPriceInterface pi = mock.DynamicMock<IPriceInterface>(); TestClass test = new TestClass(pi); decimal prc = 1M; IEventRaiser raiser; using (mock.Record()) { pi.PriceUpdate += null; raiser = LastCall.IgnoreArguments().GetEventRaiser(); Expect.Call(delegate { test.ProcessPriceUpdate(prc); }).Repeat.Once(); } using (mock.Playback()) { test.Init(); raiser.Raise(prc); } }

    Read the article

  • How to make a custom NSFormatter work correctly on Snow Leopard?

    - by Nathan
    I have a custom NSFormatter attached to several NSTextFields who's only purpose is to uppercase the characters as they are typed into field. The entire code for my formatter is included below. The stringForObjectValue() and getObjectValue() implementations are no-ops and taken pretty much directly out of Apple's documentation. I'm using the isPartialStringValid() method to return an uppercase version of the string. This code works correctly in 10.4 and 10.5. When I run it on 10.6, I get "strange" behaviour where text fields aren't always render the characters that are typed and sometimes are just displaying garbage. I've tried enabling NSZombie detection and running under Instruments but nothing was reported. I see errors like the following in "Console": HIToolbox: ignoring exception '*** -[NSCFString replaceCharactersInRange:withString:]: Range or index out of bounds' that raised inside Carbon event dispatch ( 0 CoreFoundation 0x917ca58a __raiseError + 410 1 libobjc.A.dylib 0x94581f49 objc_exception_throw + 56 2 CoreFoundation 0x917ca2b8 +[NSException raise:format:arguments:] + 136 3 CoreFoundation 0x917ca22a +[NSException raise:format:] + 58 4 Foundation 0x9140f528 mutateError + 218 5 AppKit 0x9563803a -[NSCell textView:shouldChangeTextInRange:replacementString:] + 852 6 AppKit 0x95636cf1 -[NSTextView(NSSharing) shouldChangeTextInRanges:replacementStrings:] + 1276 7 AppKit 0x95635704 -[NSTextView insertText:replacementRange:] + 667 8 AppKit 0x956333bb -[NSTextInputContext handleTSMEvent:] + 2657 9 AppKit 0x95632949 _NSTSMEventHandler + 209 10 HIToolbox 0x93379129 _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1567 11 HIToolbox 0x933783f0 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 411 12 HIToolbox 0x9339aa81 SendEventToEventTarget + 52 13 HIToolbox 0x933fc952 SendTSMEvent + 82 14 HIToolbox 0x933fc2cf SendUnicodeTextAEToUnicodeDoc + 700 15 HIToolbox 0x933fbed9 TSMKeyEvent + 998 16 HIToolbox 0x933ecede TSMProcessRawKeyEvent + 2515 17 AppKit 0x95632228 -[NSTextInputContext handleEvent:] + 1453 18 AppKit 0x9562e088 -[NSView interpretKeyEvents:] + 209 19 AppKit 0x95631b45 -[NSTextView keyDown:] + 751 20 AppKit 0x95563194 -[NSWindow sendEvent:] + 5757 21 AppKit 0x9547bceb -[NSApplication sendEvent:] + 6431 22 AppKit 0x9540f6fb -[NSApplication run] + 917 23 AppKit 0x95407735 NSApplicationMain + 574 24 macsetup 0x00001f9f main + 24 25 macsetup 0x00001b75 start + 53 ) Can anybody shed some light on what is happening? Am I just using NSFormatter incorrectly? -(NSString*) stringForObjectValue:(id)object { if( ![object isKindOfClass: [ NSString class ] ] ) { return nil; } return [ NSString stringWithString: object ]; } -(BOOL)getObjectValue: (id*)object forString: string errorDescription:(NSString**)error { if( object ) { *object = [ NSString stringWithString: string ]; return YES; } return NO; } -(BOOL) isPartialStringValid: (NSString*) cStr newEditingString: (NSString**) nStr errorDescription: (NSString**) error { *nStr = [NSString stringWithString: [cStr uppercaseString]]; return NO; }

    Read the article

  • Testing a patch to the Rails mysql adapter

    - by Sleepycat
    I wrote a little monkeypatch to the Rails MySQLAdapter and want to package it up to use it in my other projects. I am trying to write some tests for it but I am still new to testing and I am not sure how to test this. Can someone help get me started? Here is the code I want to test: unless RAILS_ENV == 'production' module ActiveRecord module ConnectionAdapters class MysqlAdapter < AbstractAdapter def select_with_explain(sql, name = nil) explanation = execute_with_disable_logging('EXPLAIN ' + sql) e = explanation.all_hashes.first exp = e.collect{|k,v| " | #{k}: #{v} "}.join log(exp, 'Explain') select_without_explain(sql, name) end def execute_with_disable_logging(sql, name = nil) #:nodoc: #Run a query without logging @connection.query(sql) rescue ActiveRecord::StatementInvalid => exception if exception.message.split(":").first =~ /Packets out of order/ raise ActiveRecord::StatementInvalid, "'Packets out of order' error was received from the database. Please update your mysql bindings (gem install mysql) and read http://dev.mysql.com/doc/mysql/en/password-hashing.html for more information. If you're on Windows, use the Instant Rails installer to get the updated mysql bindings." else raise end end alias_method_chain :select, :explain end end end end Thanks.

    Read the article

  • Python: puzzling behaviour inside httplib

    - by Anna
    I have added one line ( import pdb; pdb.set_trace() ) to httplib's HTTPConnection.putheader, so I can see what's going on inside. httplib.py, line 489: def putheader(self, header, value): """Send a request header line to the server. For example: h.putheader('Accept', 'text/html') """ import pdb; pdb.set_trace() if self.__state != _CS_REQ_STARTED: raise CannotSendHeader() str = '%s: %s' % (header, value) self._output(str) then ran this from the interpreter import urllib2 urllib2.urlopen('http://www.ioerror.us/ip/headers') ... and as expected PDB kicks in: > c:\python26\lib\httplib.py(858)putheader() -> if self.__state != _CS_REQ_STARTED: (Pdb) in PDB I have the luxury of evaluating expressions on the fly, so I have tried to enter self.__state: (Pdb) self.__state *** AttributeError: HTTPConnection instance has no attribute '__state' Alas, there is no __state of this instance. However when I enter step, the debugger gets past the if self.__state != _CS_REQ_STARTED: line without a problem. Why is this happening? If the self.__state doesn't exist python would have to raise an exception as it did when I entered the expression. Python version: 2.6.4 on win32

    Read the article

  • Close application on error

    - by poke
    I’m currently writing an application for the Android platform that requires a mounted SD card (or ExternalStorage). I know that it might not be the best way to require something like that, but the application will work with quite a lot of data, and I don’t even want to think about storing that on the device’s storage. Anyway, to ensure that the application won’t run without the external storage, I do a quick check in the activity’s onCreate method. If the card is not mounted, I want to display an error message and then quit the application. My current approach looks like this: public void onCreate ( Bundle savedInstanceState ) { super.onCreate( savedInstanceState ); setContentView( R.layout.main ); try { // initialize data storage // will raise an exception if it fails, or the SD card is not mounted // ... } catch ( Exception e ) { AlertDialog.Builder builder = new AlertDialog.Builder( this ); builder .setMessage( "There was an error: " + e.getMessage() ) .setCancelable( false ) .setNeutralButton( "Ok.", new DialogInterface.OnClickListener() { public void onClick ( DialogInterface dialog, int which ) { MyApplication.this.finish(); } } ); AlertDialog error = builder.create(); error.show(); return; } // continue ... } When I run the application, and the exception gets raised (I raise it manually to check if everything works), the error message is displayed correctly. However when I press the button, the application closes and I get an Android error, that the application was closed unexpectedly (and I should force exit). I read some topics before on closing an application, and I know that it maybe shouldn’t happen like that. But how should I instead prevent the application from continuing to run? How do you close the application correctly when an error occurs?

    Read the article

  • Javascript doesnt update

    - by Trikam
    Hi all, I have a function that passes a parameter which is a function call and then i use setTimeout to call this passed function call. now i tried two methods with setTimout to raise the event and i used function.call(). When this passed parameter function call was raised none of the javascript was being updated, below is the javascript which im using to raise the event and the javascript which is supposed to be updated: The function being passed is [context] - function() { ErrorMessageFileSelect('diverrortextchoosechannal','The file chosen is to big, you must choose a file less than 1MB'); } function FileSizeOnLoad(contentLength,context) { if (context != null) { // context.call(); setTimeout(context,0); // or context.call(); } else { $('#inputHiddenFileSizeField').val(contentLength); DisplayChoseFileInformation(contentLength); } } //this is where the update should happen function ErrorMessageFileSelect(className, errorMessage) { $('div.' + className).text(errorMessage); alert($('div.' + className).text()); } Is there somthing im missing, can someone help me with this issue please. Thanks

    Read the article

  • BWToolkit inclusion crashing

    - by Schroedinger
    Hey guys I'm using the latest version of XCode (3.2.2) and I've linked the framework using the tutorial. I was building my app and tested it and I get a BWToolkit exception on decoding. I've included the Framework in the frameworks and added it to the copy files stage. I even created a new dummy app including the framework and adding it to the copy files stage and it still crashes when I try to run. Any ideas? Do I need to include it somewhere in the app? I'm worried I've overlooked something really simple. 2010-04-13 14:14:24.540 BWTestFramework[7504:a0f] An uncaught exception was raised 2010-04-13 14:14:24.543 BWTestFramework[7504:a0f] *** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (BWSplitView) 2010-04-13 14:14:24.545 BWTestFramework[7504:a0f] *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: '*** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (BWSplitView)' *** Call stack at first throw: ( 0 CoreFoundation 0x00007fff84a77d24 __exceptionPreprocess + 180 1 libobjc.A.dylib 0x00007fff82ba00f3 objc_exception_throw + 45 2 CoreFoundation 0x00007fff84a77b47 +[NSException raise:format:arguments:] + 103 3 CoreFoundation 0x00007fff84a77ad4 +[NSException raise:format:] + 148 4 Foundation 0x00007fff83804aa6 _decodeObjectBinary + 2427 5 Foundation 0x00007fff83805825 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1229 6 Foundation 0x00007fff83805d65 -[NSArray(NSArray) initWithCoder:] + 462 7 Foundation 0x00007fff83804b1f _decodeObjectBinary + 2548 8 Foundation 0x00007fff83803f99 _decodeObject + 208 9 AppKit 0x00007fff8069fbfb -[NSView initWithCoder:] + 362 10 Foundation 0x00007fff83804b1f _decodeObjectBinary + 2548 11 Foundation 0x00007fff83803f99 _decodeObject + 208 12 AppKit 0x00007fff806adfbb -[NSWindowTemplate initWithCoder:] + 3824 13 Foundation 0x00007fff83804b1f _decodeObjectBinary + 2548 14 Foundation 0x00007fff83805825 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1229 15 Foundation 0x00007fff83805268 -[NSSet(NSSet) initWithCoder:] + 447 16 Foundation 0x00007fff83804b1f _decodeObjectBinary + 2548 17 Foundation 0x00007fff83803f99 _decodeObject + 208 18 AppKit 0x00007fff8062fcde -[NSIBObjectData initWithCoder:] + 1983 19 Foundation 0x00007fff83804b1f _decodeObjectBinary + 2548 20 Foundation 0x00007fff83803f99 _decodeObject + 208 21 AppKit 0x00007fff8062f40d loadNib + 146 22 AppKit 0x00007fff8062e96d +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 248 23 AppKit 0x00007fff8062e7a5 +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 326 24 AppKit 0x00007fff8062bd27 NSApplicationMain + 279 25 BWTestFramework 0x0000000100001891 main + 33 26 BWTestFramework 0x0000000100001868 start + 52 ) terminate called after throwing an instance of 'NSException' That's the crash report

    Read the article

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