Search Results

Search found 45142 results on 1806 pages for 'web py'.

Page 50/1806 | < Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >

  • Will a hosting company work with a site that'll (eventually and ideally) have many frequent visitors

    - by user66083
    I have a website I'd like to develop that might eventually get fairly large (in terms of what's stored and how many people visit). My question is, will staying with a hosting company (namely, FatCow) be a complete disaster? Or is there an alternative? I know very little about this aspect of web dev, so it would be great if any technology I need to learn was mentioned with some detail. Thank you very much.

    Read the article

  • Ninject.Web, OnePerRequestModule, and IIS7 Integrated Pipeline

    - by Ted
    Using Ninject.Web with ASP.NET WebForms project. Works without issues using classic pipeline, but when it's under integrated pipeline, a null reference exception occurs on every request (which I've narrowed down to the use of the OnePerRequestModule): [NullReferenceException: Object reference not set to an instance of an object.] System.Web.PipelineStepManager.ResumeSteps(Exception error) +1216 System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb) +113 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +616 The above always occurs unless I remove the OnePerRequestModule initializization. occurs consistently on a very basic test app I put together. On a standard app where I actually want to implement it, I can solve the issue by initializing the OnePerRequestModule like so: protected override IKernel CreateKernel() { // This will always blow up. //var module = new OnePerRequestModule(); //module.Init(this); IKernel kernel = new StandardKernel(new MyModule()); // This works on larger app, but on basic app, it makes no difference under integrated pipeline as the above exception is always thrown. var module = new OnePerRequestModule(); module.Init(this); return kernel; } Before I start spelunking further, is anybody out there using Ninject.Web extension successfully under the integrated pipeline in IIS7 AND using the OnePerRequestModule? There are certain restrictions for modules under the integrated pipeline that weren't there in previous IIS versions/classic pipeline. Quickly thrown together sample project at http://www.filedropper.com/test_59 And in case it's not obvious with Ninject.Web: it's an ASP.NET WebForms project.

    Read the article

  • ImportError using nose, no ImportError using raw unittest ?

    - by southof40
    I get an ImportError when running my unittests using Nose and I don't when I just run it standalone. All files referred to here may be seen at http://gist.github.com/395541# . If I run the test script, importTest-Test.py, directly I get this output: C:\usr\x\data\src\Python\mmm>python importTest-Test.py In mmdb In BusinessLogic [] . ---------------------------------------------------------------------- Ran 1 test in 0.001s If I allow Nose to run it I get an error : C:\usr\x\data\src\Python\mmm>nosetests.exe E ====================================================================== ERROR: Failure: ImportError (No module named mmdb.DataAccess.AttemptDB) ---------------------------------------------------------------------- Traceback (most recent call last): File "c:\bin\installed\python2.6\lib\site-packages\nose-0.11.3-py2.6.egg\nose\loader.py", line 382, in loadTestsFromName addr.filename, addr.module) File "c:\bin\installed\python2.6\lib\site-packages\nose-0.11.3-py2.6.egg\nose\importer.py", line 39, in importFromPath return self.importFromDir(dir_path, fqname) File "c:\bin\installed\python2.6\lib\site-packages\nose-0.11.3-py2.6.egg\nose\importer.py", line 86, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "C:\usr\x\data\src\Python\mmm\importtest-Test.py", line 2, in <module> import importtest File "C:\usr\x\data\src\Python\mmm\importtest.py", line 1, in <module> from mmdb.BusinessLogic.AttemptManager import AttemptManager File "C:\usr\x\data\src\Python\mmm\mmdb\BusinessLogic\AttemptManager.py", line 1, in <module> from mmdb.DataAccess.AttemptDB import AttemptDB ImportError: No module named mmdb.DataAccess.AttemptDB ---------------------------------------------------------------------- Ran 1 test in 0.002s FAILED (errors=1) The files involved in the package which nose is having difficulties with are in the following structure - some may be seen here http://gist.github.com/395541# .: mmm\importtest-Test.py mmm\importtest.py mmm\mmdb mmm\__init__.py mmm\mmdb\BusinessLogic mmm\mmdb\BusinessObject mmm\mmdb\DataAccess mmm\mmdb\__init__.py mmm\mmdb\BusinessLogic\AttemptManager.py mmm\mmdb\BusinessLogic\Collections mmm\mmdb\BusinessLogic\__init__.py mmm\mmdb\BusinessLogic\Collections\__init__.py mmm\mmdb\BusinessObject\__init__.py mmm\mmdb\DataAccess\AttemptDB.py mmm\mmdb\DataAccess\__init__.py This is happening on Win32 / Python 2.6 / Nose 0.11.3 . I'd be grateful for any help. 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

  • 3D Web Sites and Applications

    - by Scott Evernden
    I have for the last several years been struggling to understand why the Internet has so few actually useful 3D web applications. It's 2009 and still everything looks like pages from a Sears catalog. You can turn on your TV and find flying logos every night. After that you can get nostalgic and flip on ol' N-64 and play some Zelda or Mario Kart. On the PC, Sims 2 is approaching 6 years old already.. And then there's WoW. Current generation of users - the Facebook crowd, let's say - has ~no~ problem dealing with multi-dimensional environments.. And yet, nothing really immersive seems to happen on the web. I've been hearing about VRML and X3D for at least 10 years and ... pffft .. - nothing earth shaking going on there. Java 3D ? .. cool ! .. but ...... Still .... waiting and waiting. Do you think it will take a killer-web app before people become accustomed-to or will seek to use what could more more engaging web experiences? I am not talking about Second Life and other dedicated downloaded applications. I probably am more focused on apps like Lively or SceneCaster or Hangout or a half dozen others that are delivered 'painlessly' directly into web pages. My own particular interest is in the domain of virtual stores and immersive shopping. Its been a challenge trying to understand why an average user would not want to browse and wander a changing mall-space - like in the real world -- entertained by unexpected discovery. Is the 3D web always going to be 5 years in the future ?

    Read the article

  • Proper DateTime Format for a Web Service

    - by user48408
    I have a webservice with a method which is called via a xmlhttprequest object in my javascript. The method accepts a datetime parameter which is subsequently converted to a string and run against the database to perform a calculation. I get the value from m_txtDateAdd and send off the xmlHttprequest <asp:textbox id=m_txtDateAdd tabIndex=4 runat="server" Width="96px" Text="<%# Today %>"> </asp:textbox> which has a validator attacted to it <asp:CustomValidator id="m_DateAddValidator" runat="server" ErrorMessage="Please Enter a Valid Date" ControlToValidate="m_txtDateAdd">&#x25CF;</asp:CustomValidator> My webmethod looks something like this [WebMethod] public decimal GetTotalCost(DateTime transactionDate) { String sqlDateString = transactionDate.Year+"/"+transactionDate.Month+"/"+transactionDate.Day; I use sqlDateString as part of the commandtext i send off to the database. Its a legacy application and its inline sql so I don't have the freedom to set up a stored procedure and create and assign parameters in my code behind. This works 90% of the time. The webservice is called on the onchange event of m_txtDateAdd. Every now and again the response i get from the server is System.ArgumentException: Cannot convert 25/06/2009 to System.DateTime. System.ArgumentException: Cannot convert 25/06/2009 to System.DateTime. Parameter name: type --- System.FormatException: String was not recognized as a valid DateTime. at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) at System.DateTime.Parse(String s, IFormatProvider provider) at System.Convert.ToDateTime(String value, IFormatProvider provider) at System.String.System.IConvertible.ToDateTime(IFormatProvider provider) at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) at System.Web.Services.Protocols.ScalarFormatter.FromString(String value, Type type) --- End of inner exception stack trace --- at System.Web.Services.Protocols.ScalarFormatter.FromString(String value, Type type) at System.Web.Services.Protocols.ValueCollectionParameterReader.Read(NameValueCollection collection) at System.Web.Services.Protocols.HtmlFormParameterReader.Read(HttpRequest request) at System.Web.Services.Protocols.HttpServerProtocol.ReadParameters() at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()

    Read the article

  • "import numpy" tries to load my own package

    - by Sebastian
    I have a python (2.7) project containing my own packages util and operator (and so forth). I read about relative imports, but perhaps I didn't understand. I have the following directory structure: top-dir/ util/__init__.py (empty) util/ua.py util/ub.py operator/__init__.py ... test/test1.py The test1.py file contains #!/usr/bin/env python2 from __future__ import absolute_import # removing this line dosn't change anything. It's default functionality in python2.7 I guess import numpy as np It's fine when I execute test1.py inside the test/ folder. But when I move to the top-dir/ the import numpy wants to include my own util package: Traceback (most recent call last): File "tests/laplace_2d_square.py", line 4, in <module> import numpy as np File "/usr/lib/python2.7/site-packages/numpy/__init__.py", line 137, in <module> import add_newdocs File "/usr/lib/python2.7/site-packages/numpy/add_newdocs.py", line 9, in <module> from numpy.lib import add_newdoc File "/usr/lib/python2.7/site-packages/numpy/lib/__init__.py", line 4, in <module> from type_check import * File "/usr/lib/python2.7/site-packages/numpy/lib/type_check.py", line 8, in <module> import numpy.core.numeric as _nx File "/usr/lib/python2.7/site-packages/numpy/core/__init__.py", line 45, in <module> from numpy.testing import Tester File "/usr/lib/python2.7/site-packages/numpy/testing/__init__.py", line 8, in <module> from unittest import TestCase File "/usr/lib/python2.7/unittest/__init__.py", line 58, in <module> from .result import TestResult File "/usr/lib/python2.7/unittest/result.py", line 9, in <module> from . import util File "/usr/lib/python2.7/unittest/util.py", line 2, in <module> from collections import namedtuple, OrderedDict File "/usr/lib/python2.7/collections.py", line 9, in <module> from operator import itemgetter as _itemgetter, eq as _eq ImportError: cannot import name itemgetter The troublesome line is either from . import util or perhaps from operator import itemgetter as _itemgetter, eq as _eq What can I do?

    Read the article

  • Activate a python virtual environment using activate_this.py in a fabfile on Windows

    - by Rudy Lattae
    I have a Fabric task that needs to access the settings of my Django project. On Windows, I'm unable to install Fabric into the project's virtualenv (issues with Paramiko + pycrypto deps). However, I am able to install Fabric in my system-wide site-packages, no problem. I have installed Django into the project's virtualenv and I am able to use all the " python manage.py" commands easily when I activate the virtualenv with the "VIRTUALENV\Scripts\activate.bat" script. I have a fabric tasks file (fabfile.py) in my project that provides tasks for setup, test, deploy, etc. Some of the tasks in my fabfile need to access the settings of my django project through "from django.conf import settings". Since the only usable Fabric install I have is in my system-wide site-packages, I need to activate the virtualenv within my fabfile so django becomes available. To do this, I use the "activate_this" module of the project's virtualenv in order to have access to the project settings and such. Using "print sys.path" before and after I execute activate_this.py, I can tell the python path changes to point to the virtualenv for the project. However, I still cannot import django.conf.settings. I have been able to successfully do this on *nix (Ubuntu and CentOS) and in Cygwin. Do you use this setup/workflow on Windows? If so Can you help me figure out why this wont work on Windows or provide any tips and tricks to get around this issue? Thanks and Cheers. REF: http://virtualenv.openplans.org/#id9 | Using Virtualenv without bin/python Local development environment: Python 2.5.4 Virtualenv 1.4.6 Fabric 0.9.0 Pip 0.6.1 Django 1.1.1 Windows XP (SP3)

    Read the article

  • Changing customErrors in web.config semi-dynamically

    - by Tom Ritter
    The basic idea is we have a test enviroment which mimics Production so customErrors="RemoteOnly". We just built a test harness that runs against the Test enviroment and detects breaks. We would like it to be able to pull back the detailed error. But we don't want to turn customErrors="On" because then it doesn't mimic Production. I've looked around and thought a lot, and everything I've come up with isn't possible. Am I wrong about any of these points? We can't turn customErrors on at runtime because when you call configuration.Save() - it writes the web.config to disk and now it's Off for every request. We can't symlink the files into a new top level directory with it's own web.config because we're on windows and subversion on windows doesn't do symlinks. We can't use URL-Mapping to make an empty folder dir2 with its own web.config and make the files in dir1 appear to be in dir2 - the web.config doesn't apply We can't copy all the aspx files into dir2 with it's own web.config because none of the links would be consistent and it's a horrible hacky solution. We can't change customErrors in web.config based on hostname (e.g. add another dns entry to the test server) because it's not possible/supported We can't do any virtual directory shenanigans to make it work. If I'm not, is there a way to accomplish what I'm trying to do? Turn on customErrors site-wide under certain circumstances (dns name or even a querystring value)?

    Read the article

  • Getting data from array of DataSet objects returned from web service

    - by Sarah Vessels
    I have a web service that I want to access when it is added as a web reference to my C# project. A particular method in the web service takes a SQL query string and returns the results of the query as a custom type. When I add the web service reference, the method shows up as returning DataSet[] instead of the custom type. This is fine provided I can still somehow access the data returned from the query within those DataSet objects. I ran a particular query that should return 6 rows; I got back a DataSet[] array with 6 elements. However, when I iterate over those DataSet objects, none of them has any tables (via the Tables property on the DataSet). What gives? Where is my data? The web service is tested and works when I use it as a data source in a Report Builder 2.0 report. I am able to send an XML SOAP query to the web service and get back XML results containing my data.

    Read the article

  • Where is my python script spending time? Is there "missing time" in my cprofile / pstats trace?

    - by fmark
    I am attempting to profile a long running python script. The script does some spatial analysis on raster GIS data set using the gdal module. The script currently uses three files, the main script which loops over the raster pixels called find_pixel_pairs.py, a simple cache in lrucache.py and some misc classes in utils.py. I have profiled the code on a moderate sized dataset. pstats returns: p.sort_stats('cumulative').print_stats(20) Thu May 6 19:16:50 2010 phes.profile 355483738 function calls in 11644.421 CPU seconds Ordered by: cumulative time List reduced from 86 to 20 due to restriction <20> ncalls tottime percall cumtime percall filename:lineno(function) 1 0.008 0.008 11644.421 11644.421 <string>:1(<module>) 1 11064.926 11064.926 11644.413 11644.413 find_pixel_pairs.py:49(phes) 340135349 544.143 0.000 572.481 0.000 utils.py:173(extent_iterator) 8831020 18.492 0.000 18.492 0.000 {range} 231922 3.414 0.000 8.128 0.000 utils.py:152(get_block_in_bands) 142739 1.303 0.000 4.173 0.000 utils.py:97(search_extent_rect) 745181 1.936 0.000 2.500 0.000 find_pixel_pairs.py:40(is_no_data) 285478 1.801 0.000 2.271 0.000 utils.py:98(intify) 231922 1.198 0.000 2.013 0.000 utils.py:116(block_to_pixel_extent) 695766 1.990 0.000 1.990 0.000 lrucache.py:42(get) 1213166 1.265 0.000 1.265 0.000 {min} 1031737 1.034 0.000 1.034 0.000 {isinstance} 142740 0.563 0.000 0.909 0.000 utils.py:122(find_block_extent) 463844 0.611 0.000 0.611 0.000 utils.py:112(block_to_pixel_coord) 745274 0.565 0.000 0.565 0.000 {method 'append' of 'list' objects} 285478 0.346 0.000 0.346 0.000 {max} 285480 0.346 0.000 0.346 0.000 utils.py:109(pixel_coord_to_block_coord) 324 0.002 0.000 0.188 0.001 utils.py:27(__init__) 324 0.016 0.000 0.186 0.001 gdal.py:848(ReadAsArray) 1 0.000 0.000 0.160 0.160 utils.py:50(__init__) The top two calls contain the main loop - the entire analyis. The remaining calls sum to less than 625 of the 11644 seconds. Where are the remaining 11,000 seconds spent? Is it all within the main loop of find_pixel_pairs.py? If so, can I find out which lines of code are taking most of the time?

    Read the article

  • Data of the web services in a RSS

    - by vymz
    I only have the .wsdl and I want to put the data that the web services return in the RSS. And in a web page of SAP, I can only upload RSS, so I need put the information of the web services in the RSS For example, I put the information manually(name and total value) in the fields <title> and <descripcion>, these data are extracted from the web services. But sometimes I don´t know how much information brings the web service. Also, I know that RSS is not to store information such as web services. <?xml version="1.0" encoding="UTF-8" ?> <rss version="2.0"> <channel> <title>Test RSS</title> <link>http://solutions.com</link> <description>RSS</description> <item> <title>Luiz</title> <link>http://www.solutions.com/prueba1</link> <description>10</description> </item> <item> <title>Clodoaldo</title> <link>http://www.solutions.com/prueba2</link> <description>5</description> </item>

    Read the article

  • Accessing we.config from Sharepoint web part

    - by philj
    I have a VS 2008 web parts project - in this project is a web.config file: something like this: ……. In my web part I am trying to access values in the appSetting section: I've tried all of the code below and each returns null: string Owner = ConfigurationManager.AppSettings.Get("MFOwner"); string stuff1 = ConfigurationManager.AppSettings["MFOwner"]; string stuff3 = WebConfigurationManager.AppSettings["MFOwner"]; string stuff4 = WebConfigurationManager.AppSettings.Get("MFOwner"); string stuff2 = ConfigurationManager.AppSettings["MFowner".ToString()]; I've tried this code I found: NameValueCollection sAll; sAll = ConfigurationManager.AppSettings; string a; string b; foreach (string s in sAll.AllKeys) { a = s; b = sAll.Get(s); } and stepped through it in debug mode - that is getting things like : FeedCacheTime FeedPageURL FeedXsl1 ReportViewerMessages which is NOT coming from anything in my web.config file....maybe a config file in sharepoint itself? How do I access a web.config (or any other kind of config file!) local to my web part??? thanks, Phil J

    Read the article

  • Undefined Web.config error in VS 2008

    - by user1066050
    I'm working on a web app using VS 2008, .Net 3.5 and C#. Most of the projects in the solution are either classic asp.net pages with some MVC 1 in the mix, the rest is shared libraries. The solution is one that is some 5 years old and has gone through a variety of developers working on it and clearly has some performance and architectural issues. Previously, I've been working on the project using VS 2008 on a Win XP machine, but have just transitioned over to a new box using Win 7 Ultimate. To do so, I've installed VS 2008, asp.net 3.5. To support future work on the solution I've also installed VS 2010 and asp.net 4.0. Opening the solution on the new box with VS 2008 works fine, and it builds without error. However, when I attempt to run it with the debugger, I get the following message: "There is an error in web.config. Please correct before proceeding. (You might rename the current web.config and add a new one.)" I think it's clear that there is some sort of environmental issue regarding web.config on the new machine, but the error message is not "helpful". Adding a new web.config is not an option as the existing one is quite long and involved (too much to post here). I'm hoping someone has a suggestion or two about where I might look for missing elements or changed configurations that might produce such an error message. Lacking that, I'll revisit this post and provide the web.config in the hope that will elicit further help. Thanks to all in advance for taking a look at this. The StackOverflow community has helped me many times in the past with pertinent answers although this is my first posting. Jeff

    Read the article

  • Declare models elsewhere than in "models.py"

    - by sebpiq
    Hi ! I have an application that splits models into different files. Actually the folder looks like : >myapp __init__.py models.py >hooks ... ... myapp don't care about what's in the hooks, folder, except that there are models, and that they have to be declared somehow. So, I put this in myapp.__init__.py : from django.conf import settings for hook in settings.HOOKS : try : __import__(hook) except ImportError as e : print "Got import err !", e #where HOOKS = ("myapp.hooks.a_super_hook1", ...) The problem is that it doesn't work when I run syncdb(and throws some strange "Got import err !"... strange considering that it's related to another module of my program that I don't even import anywhere :/ ) ! So I tried successively : 1) for hook in settings.HOOKS : try : exec ("from %s import *" % hook) doesn't work either : syncdb doesn't install the models in hooks 2) from myapp.hooks.a_super_hook1 import * This works 3) exec("from myapp.hooks.a_super_hook1 import *") This works to So I checked that in the test 1), the statement executed is the same than in tests 2) and 3), and it is exactly the same ... Any idea ???

    Read the article

  • changing asp .net web service namespace when already in productive state

    - by eloQ
    by some unfortunate events we published a web service with the tempuri-namespace a couple of months ago and no one did notice (not in our company, not the companies connecting to the web service) even though it's live since that time and lots of companies (~25 i guess) already access this web service. now i'm thinking of correcting that mistake and have the namespace fixed to a proper value. the only problem is: as soon as we would do it, all the programs and services connected to this web service would stop working. i can't really allow that to happen. is there any way to fix the namespace for future purpose or to have the web service operate under two namespaces as one web service? any tip at all what i could do to get rid of the tempuri-namespace and have it fixed without needing to synchronize the change with all the external companies? i'm all out of ideas, so any help would be much appreciated! thanks! I hope this question is alright here, first time user, found this through using search engines on my research and found tempuri.org related posts, just not the right one..

    Read the article

  • cython setup.py gives .o instead of .dll

    - by alok1974
    Hi, I am a newbie to cython, so pardon me if I am missing something obvious here. I am trying to build c extensions to be used in python for enhanced performance. I have fc.py module with a bunch of function and trying to generate a .dll through cython using dsutils and running on win64: c:\python26\python c:\cythontest\setup.py build_ext --inplace I have the dsutils.cfg in C:\Python26\Lib\distutils. As required the disutils.cfg has the following config settings: [build] compiler = mingw32 My startup.py looks like this: from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext ext_modules = [Extension('fc', [r'C:\cythonTest\fc.pyx'])] setup( name = 'FC Extensions', cmdclass = {'build_ext': build_ext}, ext_modules = ext_modules ) I have latest version mingw for target/host amdwin64 type builds. I have the latest version of cython for python26 for win64. Cython does give me an fc.c without errors, only a few warning for type conversions, which I will handle once I have it right. Further it produces fc.def an fc.o files Instead of giving a .dll. I get no errors. I find on threads that it will create the .so or .dll automatically as required, which is not happening.

    Read the article

  • Declaring models elsewhere than in "models.py" AND dynamically

    - by sebpiq
    Hi ! I have an application that splits models into different files. Actually the folder looks like : >myapp __init__.py models.py >hooks ... ... myapp don't care about what's in the hooks, folder, except that there are models, and that they have to be declared somehow. So, I put this in myapp.__init__.py : from django.conf import settings for hook in settings.HOOKS : try : __import__(hook) except ImportError as e : print "Got import err !", e #where settings.HOOKS = ("myapp.hooks.a_super_hook1", ...) The problem is that it doesn't work when I run syncdb(and throws some strange "Got import err !"... strange considering that it's related to another module of my program that I don't even import anywhere :/ ) ! So I tried successively : 1) for hook in settings.HOOKS : try : exec ("from %s import *" % hook) - doesn't work either : syncdb doesn't install the models in hooks 2) from myapp.hooks.a_super_hook1 import * - This works 3) exec("from myapp.hooks.a_super_hook1 import *") - This works to So I checked that in the test 1), the statement executed is the same than in tests 2) and 3), and it is exactly the same ... Any idea ???

    Read the article

  • iPhone UIImage upload to web service

    - by user347635
    Hi all, I worked on this for several hours today and I'm pretty close to a solution but clearly need some help from someone who's pulled this off. I'm trying to post an image to a web service from the iPhone. I'll post the code first then explain everything I've tried: NSData *imageData = UIImageJPEGRepresentation(barCodePic, .9); NSString *soapMsg = [NSString stringWithFormat: @"<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap:Body><WriteImage xmlns=\"http://myserver/imagewebservice/\"><ImgIn>%@</ImgIn></WriteImage></soap:Body></soap:Envelope>", [NSData dataWithData:imageData] ]; NSURL *url = [NSURL URLWithString:@"http://myserver/imagewebservice/service1.asmx"]; NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:url]; NSString *msgLength = [NSString stringWithFormat:@"%d", [soapMsg length]]; [req addValue:@"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"]; [req addValue:@"http://myserver/imagewebservice/WriteImage" forHTTPHeaderField:@"SOAPAction"]; [req addValue:msgLength forHTTPHeaderField:@"Content-Length"]; [req setHTTPMethod:@"POST"]; [req setHTTPBody: [soapMsg dataUsingEncoding:NSUTF8StringEncoding]]; conn = [[NSURLConnection alloc] initWithRequest:req delegate:self]; if (conn) { webData = [[NSMutableData data] retain]; } First thing, this code works fine for anything but an image. The web service is running on my local network and I can change the source code at will and if I change the "ImgIn" parameter to a string and pass a string in, everything works fine, I get a return value no problem. So there are no connectivity issues at all, I'm able to call and get data from this web service on this server no problems. But I need to upload an image to this web service via the ImgIn parameter, so the above code is my best shot so far. I also have didReceiveResponse, didReceiveData, didFailWithError, etc all being handled. The above code fires off didRecieveResponse every time. However didReceiveData is never fired and it's like the web service itself never even runs. When I debug the web service itself, it runs and debugs fine when I use a string parameter, but with the image parameter, it never even debugs when I call it. It's almost like the ImgIn parameter is too long (it's huge when I output it to the screen) and the web service just chokes on it. I've read about having to encode to Base64 when using this method, but I can't find any good links on how that's done. If that's what I'm doing wrong, can you PLEASE provide code as to how to do this, not just "you need to use Base64", I'd really appreciate it as I can find almost nothing on how to implement this with an example. Other than that, I'm kind of lost, it seems like I'm doing everything else right. Please help! Thanks

    Read the article

  • Hadoop in a RESTful Java Web Application - Conflicting URI templates

    - by user1231583
    I have a small Java Web Application in which I am using Jersey 1.12 and the Hadoop 1.0.0 JAR file (hadoop-core-1.0.0.jar). When I deploy my application to my JBoss 5.0 server, the log file records the following error: SEVERE: Conflicting URI templates. The URI template / for root resource class org.apache.hadoop.hdfs.server.namenode.web.resources.NamenodeWebHdfsMethods and the URI template / transform to the same regular expression (/.*)? To make sure my code is not the problem, I have created a fresh web application that contains nothing but the Jersey and Hadoop JAR files along with a small stub. My web.xml is as follows: <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <servlet> <servlet-name>ServletAdaptor</servlet-name> <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet- class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>ServletAdaptor</servlet-name> <url-pattern>/mytest/*</url-pattern> </servlet-mapping> <session-config> <session-timeout> 30 </session-timeout> </session-config> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app> My simple RESTful stub is as follows: import javax.ws.rs.core.Context; import javax.ws.rs.core.UriInfo; import javax.ws.rs.Path; @Path("/mytest") public class MyRest { @Context private UriInfo context; public MyRest() { } } In my regular application, when I remove the Hadoop JAR files (and the code that is using Hadoop), everything works as I would expect. The deployment is successful and the remaining RESTful services work. I have also tried the Hadoop 1.0.1 JAR files and have had the same problems with the conflicting URL template in the NamenodeWebHdfsMethods class. Any suggestions or tips in solving this problem would be greatly appreciated.

    Read the article

  • SOA Suite Integration: Part 1: Building a Web Service

    - by Anthony Shorten
    Over the next few weeks I will be posting blog entries outlying the SOA Suite integration of the Oracle Utilities Application Framework. This will illustrate how easy it is to integrate by providing some samples. I will use a consistent set of features as examples. The examples will be simple and while will not illustrate ALL the possibilities it will illustrate the relative ease of integration. Think of them as a foundation. You can obviously build upon them. Now, to ease a few customers minds, this series will certainly feature the latest version of SOA Suite and the latest version of Oracle Utilities Application Framework but the principles will apply to past versions of both those products. So if you have Oracle SOA Suite 10g or are a customer of Oracle Utilities Application Framework V2.1 or above most of what I will show you will work with those versions. It is just easier in Oracle SOA Suite 11g and Oracle Utilities Application Framework V4.x. This first posting will not feature SOA Suite at all but concentrate on the capability for the Oracle Utilities Application Framework to create Web Services you can use for integration. The XML Application Integration (XAI) component of the Oracle Utilities Application Framework allows product objects to be exposed as XML based transactions or as Web Services (or both). XAI was written before Web Services became fashionable and has allowed customers of our products to provide a consistent interface into and out of our product line. XAI has been enhanced over the last few years to take advantages of the maturing landscape of Web Services in the market place to a point where it now easier to integrate to SOA infrastructure. There are a number of object types that can be exposed as Web Services: Maintenance Objects – These are the lowest level objects that can be exposed as Web Services. Customers of past versions of the product will be familiar with XAI services based upon Maintenance Objects as they used to be the only method of generating Web Services. These are still supported for background compatibility but are starting to become less popular as they were strict in their structure and were solely attribute based. To generate Maintenance Object based Web Services definition you need to use the XAI Schema Editor component. Business Objects – In Oracle Utilities Application Framework V2.1 we introduced the concept of Business Objects. These are site or industry specific objects that are based upon Maintenance Objects. These allow sites to respecify, in configuration, the structure and elements of a Maintenance Object and other Business Objects (they are true objects with support for inheritance, polymorphism, encapsulation etc.). These can be exposed as Web Services. Business Services – As with Business Objects, we introduced Business Services in Oracle Utilities Application Framework V2.1 which allowed applications services and query zones to be expressed as custom services. These can then be exposed as Web Services via the Business Service definition. Service Scripts - As with Business Objects and Business Services, we introduced Service Scripts in Oracle Utilities Application Framework V2.1. These allow services and/objects to be combined into complex objects or simply expose common routines as callable scripts. These can also be defined as Web Services. For the purpose of this series we will restrict ourselves to Business Objects. The techniques can apply to any of the objects discussed above. Now, lets get to the important bit of this blog post, the creation of a Web Service. To build a Business Object, you first logon to the product and navigate to the Administration Menu by selecting the Admin Menu from the Menu action on left top of the screen (next to Home). A popup menu will appear with the menu’s available. If you do not see the Admin menu then you do not have authority to use it. Here is an example: Navigate to the B menu and select the + symbol next to the Business Object menu item. This indicates that you want to ADD a new Business Object. This menu will appear if you are running Alphabetic mode in your installation (I almost forgot that point). You will be presented with the Business Object maintenance screen. You will fill out the following on the first tab (at a minimum): Business Object – The name of the Business Object. Typically you will make it descriptive and also prefix with CM to denote it as a customization (you can easily find it if you prefix it). As I running this on my personal copy of the product I will use my initials as the prefix and call the sample Web Service “AS-User”. Description – A short description of the object to tell others what it is used for. For my example, I will use “Anthony Shorten’s User Object”. Detailed Description – You can add a long description to help other developers understand your object. I am just going to specify “Anthony Shorten’s Test Object for SOA Suite Integration”. Maintenance Object – As this Business Service is going to be based upon a Maintenance Object I will specify the desired Maintenance Object. In this example, I have decided to use the Framework object USER. Now, I chose this for a number of reasons. It is meaningful, simple and is across all our product lines. I could choose ANY maintenance object I wished to expose (including any custom ones, if I had them). Parent Business Object – If I was not using a Maintenance Object but building a child Business Object against another Business Object, then I would specify the Parent Business Object here. I am not using Parent’s so I will leave this blank. You either use Parent Business Object or Maintenance Object not both. Application Service – Business Objects like other objects are subject to security. You can attach an Application Service to an object to specify which groups of users (remember services are attached to user groups not users) have appropriate access to the object. I will use a default service provided with the product, F1-DFLTS ,as this is just a demonstration so I do not have to be too sophisticated about security. Instance Control – This allows the object to create instances in its objects. You can specify a Business Object purely to hold rules. I am being simple here so I will set it to Allow New Instances to allow the Business Object to be used to create, read, update and delete user records. The rest of the tab I will leave empty as I want this to be a very simple object. Other options allow lots of flexibility. The contents should look like this: Before saving your work, you need to navigate to the Schema tab and specify the contents of your object. I will save some time. When you create an object the schema will only contain the basic root elements of the object (in fact only the schema tag is visible). When you go to the Schema Tab, on the dashboard you will see a BO Schema zone with a solitary button. This will allow you to Generate the Schema for you from our metadata. Click on the Generate button to generate a basic schema from the metadata. You will now see a Schema with the element tags and references to the metadata of the Maintenance object (in the mapField attribute). I could spend a while outlining all the ways you can change the schema with defaults, formatting, tagging etc but the online help has plenty of great examples to illustrate this. You can use the Schema Tips zone in the for more details of the available customizations. Note: The tags are generated from the language pack you have installed. The sample is English so the tags are in English (which is the base language of all installations). If you are using a language pack then the tags will be generated in the language of the user that generated the object. At this point you can save your Business Object by pressing the Save action. At this point you have a basic Business Object based on the USER maintenance object ready for use but it is not defined as a Web Service yet. To do this you need to define the newly created Business Object as an XAI Inbound Service. The easiest and quickest way is to select + off the XAI Inbound Service off the context menu on the Business Object maintenance screen. This will prepopulate the service definition with the following: Adapter – This will be set to Business Adaptor. This indicates that the service is either Business Object, Business Service or Service Script based. Schema Type – Whether the object is a Business Object, Business Service or Service Script. In this case it is a Business Object. Schema Name – The name of the object. In this case it is the Business Object AS-User. Active – Set to Yes. This means the service is available upon startup automatically. You can enable and disable services as needed. Transaction Type – A default transaction type as this is Business Object Service. More about this in later postings. In our case we use the default Read. This means that if we only specify data and not a transaction type then the product will assume you want to issue a read against the object. You need to fill in the following: XAI Inbound Service – The name of the Web Service. Usually people use the same name as the underlying object , in the case of this example, but this can match your sites interfacing standards. By the way you can define multiple XAI Inbound Services/Web Services against the same object if you want. Description and Detail Description – Documentation for your Web Service. I just supplied some basic documentation for this demonstration. You can now save the service definition. Note: There are lots of other options on this screen that allow for behavior of your service to be specified. I will leave them blank for now. When you save the service you are issued with two new pieces of information. XAI Inbound Service Id is a randomly generated identifier used internally by the XAI Servlet. WSDL URL is the WSDL standard URL used for integration. We will take advantage of that in later posts. An example of the definition is shown below: Now you have defined the service but it will only be available when the next server restart or when you flush the data cache. XAI Inbound Services are cached for performance so the cache needs to be told of this new service. To refresh the cache you can use the Admin –> X –> XAI Command menu item. From the command dropdown select Refresh Registry and press Send Command. You will see an XML of the command sent to the server (the presence of the XML means it is finished). If you have an error around the authorization, then check your default user and password settings on the XAI Options menu item. Be careful with flushing the cache as the cache is shared (unless of course you are the only Web Service user on the system – In that case it only affects you). The Web Service is NOW available to be used. To perform a simple test of your new Web Service, navigate to the Admin –> X –> XAI Submission menu item. You will see an open XML request tab. You need to type in the request XML you want to test in the Main tab. The first tag is the XAI Inbound Service Name and the elements are as per your schema (minus the schema tag itself as that is only used internally). My example is as follows (I want to return the details of user SYSUSER) – Remember to close tags. Hitting the Save button will issue the XML and return the response according to the Business Object schema. Now before you panic, you noticed that it did not ask for credentials. It propagates the online credentials to the service call on this function. You now have a Web Service you can use for integration. We will reuse this information in subsequent posts. The process I just described can be used for ANY object in the system you want to expose. This whole process at a minimum can take under a minute. Obviously I only showed the basics but you can at least get an appreciation of the ease of defining a Web Service (just by using a browser). The next posts now build upon this. Hope you enjoyed the post.

    Read the article

  • Enterprise 2.0 - Connecting People, Processes & Content

    - by kellsey.ruppel(at)oracle.com
    With recent technological advances, the Internet is changing. When users head to the web, they are no longer just looking for information from a simple text and picture based website. Users want a more interactive experience - they want to participate, to share their views and get the feedback of others. And this is precisely what Web 2.0 technology addresses. Web 2.0 is about web applications that facilitate interactive information sharing, user-centered design and collaboration on the World Wide Web. Web 2.0 technology is everywhere on the Internet and is radically changing the speed and medium in which we interact and communicate. There are thousands of examples in the consumer world of Web 2.0 applications, technologies and solutions at work. You might be familiar with some of them...blogs, wikis (Wikipedia), Twitter, Facebook, LinkedIn - these are all examples of Web 2.0. And these technologies are transforming our world into a real-time, participation-oriented, user-driven, content-centric world. With all of these Web 2.0 solutions it's about the user, the consumer and all the content they are generating. It's a world full of online communities where people share and participate. We're not talking about disseminating information top-down , nor is it a bottom-up fight. Everyone has an equal opportunity to participate and share. The more you participate, the more you share, the more valued you are in the community. The web is not just a collection of documents online. It is the social web.  For the active users in the community, staying connected becomes critically important so they can participate at anytime and from anywhere. And because feedback and interaction are so critical, time is of the essence. When everyone is providing immediate responses, you feel the urge to do the same. Hence everything needs to be done right now, together...and collaboratively. With all the content being generated online by users, there is complete information overload out there. (That's a good thing for Google). But...it's no longer just about search. Sometimes you want the information to just come to you. Recommendations and discovery engines will deliver you more applicable results than a non-contextual search. How many of you have heard about a news headline on Facebook as part of your feed before you read the paper or see it on TV? This is how the new generation of workers live their daily lives...and as they enter the workforce, these trends and technologies are showing up in the enterprise too. A lot of the Web 2.0 technologies and solutions in the consumer world are geared for just that....consumers. But the core concepts that put them into the Web 2.0 category can be applied to the enterprise as well. And that is what we mean when we talk about Enterprise 2.0. Enterprise 2.0 is the use of Web 2.0 tools and technologies in the workplace.  It provides a modern user experience by connecting the people, content and business processes inside and outside the enterprise. Enterprise 2.0 empowers users to collaborate more effectively, find and share information in the proper content and improves the overall business processes which they participate in. As we head into 2011, is your organization using Enterprise 2.0 capabilities to the fullest? Are you connecting your people, processes and content together to provide a modern user experience?

    Read the article

  • Web authentication using LDAP and Apache?

    - by Stephen R
    I am working on a project of setting up a web administered inventory database for my work (or if they don't want it then i'll enjoy learning about it) and hit the problem of allowing only authorized users to access the website (In its testing/development phase, I allow all people to navigate to the website to add entries to the database and query it). I am trying to make it so only particular users in the domain (Active Directory) are allowed to access the website after they are queried about their credentials. I read that Apache (I am using a LAMP server) has a means of asking visitors to the website to provide LDAP credentials in order to gain access to the site, but I wasn't sure if that was exactly what I was looking for. If anyone has experience in the LDAP configurations for Apache that I mentioned or any other means of securely authenticating with websites I would greatly appreciate advice or a direction to go Thank you!

    Read the article

  • Use Web Browser (Google Chrome or Firefox) to Open Web Sites from a List in File

    - by MMA
    I have a (text) file containing a list of web site addresses. I know that I can open the file in an editor and then copy-paste the addresses to the browser address bar. That means, if I have ten addresses in that file, I will need ten copy-paste operations, which must be tedious. But is there a way to ask the browser (preferably Google Chrome or Firefox) to open all of them in one go in different tabs? I am using Ubuntu, if that is related in any way to the solution you provide.

    Read the article

  • RDF and OWL: Have these delivered the promises of the Semantic Web?

    - by Dark Templar
    These days I've been learning a lot about how different scientific fields are trying to move their data over to the Semantic Web in order to "free up data from being stored in isolated silos". I read a lot about how these fields are saying how their efforts are implementing the "visions" of the Semantic Web. As a learner (and from purely a learning perspective) I was curious to know why, if semantic technology is deemed to be so powerful, the efforts have been around for years but myself and a lot of people I know have never even heard of it until very recently? Also, I don't come across any scholarly articles deeming "oh, our inferencing engine was able to make such and such discovery, which is helping us pave our way to solving...." etc. It seems that there are genuine efforts across different institutions, fields, and disciplines to shift all their data to a "semantic" format, but what happens after all that's been done? All the ontologies have been created/unified, and then what?

    Read the article

< Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >