Search Results

Search found 4200 results on 168 pages for 'dnn modules'.

Page 17/168 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Linux C/C++ : How to reload dynamic modules?

    - by Arman
    Hi, Are there way to reload dynamic library? I am loading module by dlopen library: bool load_functions(){ std::string function_name="libfunction-factory.so"; void* handle = dlopen(function_name.c_str(), RTLD_NOW); //some initialization and usage // ''' // unload the library dlclose(handle); return true; } int main() { int i=0; for(;;) { cout<<"##prompt##"<<i++<<">"; if(std::cin.get()=='q') break; else { if(!load_functions()) std::cout<<"Failed to load Function Factory..."<<std::endl; } cout<<endl; } return 0; } after running I am editing library and trying to reload the library, but the new library does not load. Always the first loaded library is used. Are there way to force to reload library? Why dlclose does not unload library? Kind regards Arman.

    Read the article

  • Self logging modules without Moose

    - by stephenmm
    I have the same question as was asked here but unfortunately I cannot install Moose and I think the solution described there was particular to Moose. Can someone tell me how to the same in old school "use base" speak? To reiterate the question, I would like to have my base classes to have an automatic logging mechanism so if the user does not do anything I get some reasonable logging but if the user of my class needs/wants to overwrite it they can.

    Read the article

  • Issues with dynamically loading modules in code with Silverlight/Prism

    - by Greg Bailey
    In my Bootstrapper.cs in GetModuleCatalog, I need to specify the Module types using the typeof(ModuleType). In the example below I'm trying to load the Contact module on demand, but in order to get it into my module catalog, I need to have a reference to it in the project that holds my Bootstrapper. When I add a reference to Contact, then the Contact.dll gets added to the initial xap file, which defeats the purpose of loading the module dynamically. Am I missing something? Do you have to load the module catalog from a file to make this work? var catalog = new ModuleCatalog(); catalog.AddModule(typeof(Core)); catalog.AddModule(typeof(Contact), InitializationMode.OnDemand);

    Read the article

  • wxPython, Threads, and PostEvent between modules

    - by Sam Starling
    I'm relatively new to wxPython (but not Python itself), so forgive me if I've missed something here. I'm writing a GUI application, which at a very basic level consists of "Start" and "Stop" buttons that start and stop a thread. This thread is an infinite loop, which only ends when the thread is stopped. The loop generates messages, which at the moment are just output using print. The GUI class and the infinite loop (using threading.Thread as a subclass) are held in separate files. What is the best way to get the thread to push an update to something like a TextCtrl in the GUI? I've been playing around with PostEvent and Queue, but without much luck. Here's some bare bones code, with portions removed to keep it concise: main_frame.py import wx from loop import Loop class MainFrame(wx.Frame): def __init__(self, parent, title): # Initialise and show GUI # Add two buttons, btnStart and btnStop # Bind the two buttons to the following two methods self.threads = [] def onStart(self): x = Loop() x.start() self.threads.append(x) def onStop(self): for t in self.threads: t.stop() loop.py class Loop(threading.Thread): def __init__(self): self._stop = threading.Event() def run(self): while not self._stop.isSet(): print datetime.date.today() def stop(self): self._stop.set() I did, at one point, have it working by having the classes in the same file by using wx.lib.newevent.NewEvent() along these lines. If anyone could point me in the right direction, that'd be much appreciated.

    Read the article

  • How do the XMPP modules work in perl?

    - by TheGNUGuy
    Hey everybody, I am trying to make my own jabber bot but i have run into a little trouble. I have gotten my bot to respond to messages, however, if I try to change the bot's presence then it seems as though all of the messages you send to the bot get delayed. What I mean is when I run the script I change the presence so I can see that it is online. Then When I send it a message it takes 3 before the callback subroutine i have set up for messages gets called. After the 3rd message is sent and the chat subroutine is called it still process the first message I sent. This really doesn't pose TOO much of a problem except that I have it set up to log out when I send the message "logout" and it has to be followed by two more messages in order to log out. I am not sure what it is that I have to do to fix this but i think it has something to do with iq packets because I have an iq callback set as well and it gets called 2 times after setting the presence. Here is my source code: http://pastebin.com/MgKMhTML Thanks for your help!

    Read the article

  • Pydev and Django: Shell not finding certain modules?

    - by Rosarch
    I am developing a Django project with PyDev in Eclipse. For a while, PyDev's Django Shell worked great. Now, it doesn't: >>> import sys; print('%s %s' % (sys.executable or sys.platform, sys.version)) C:\Python26\python.exe 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] >>> >>> from django.core import management;import mysite.settings as settings;management.setup_environ(settings) Traceback (most recent call last): File "<console>", line 1, in <module> ImportError: No module named mysite.settings >>> The dev server runs just fine. What could I be doing wrong? The models module is also conspicuously absent: >>> import mysite.myapp.models Traceback (most recent call last): File "<console>", line 1, in <module> ImportError: No module named mysite.myapp.models On the normal command line, outside of PyDev, the shell works fine. Why could this be happening?

    Read the article

  • Propietary modules within GPL and BSD kernels

    - by Francisco Garcia
    Since the Linux kernel is GPL and not LGPL I suppose that it is illegal to link proprietary code to it. How does the industry circumvents this? I would expect that the GPL license will force any developer to release under GPL driver and/or kernel module. Maybe I am confused and implementing a new module is not really linking against the kernel code ??? How do companies deal with this? Maybe linking the other way around (from kernel to their binaries)? On the other hand there is the BSD kernel. Where you are free to link protected IP. Can you get a better design implementing your drivers within a BSD kernel? Is there any design restriction when implementing drivers for GPL kernels?

    Read the article

  • Reading Python Documentation for 3rd party modules

    - by Shadyabhi
    I recently downloaded IMDbpy moduele.. When I do, import imdb help(imdb) i dont get the full documentation.. I have to do im = imdb.IMDb() help(im) to see the available methods. I dont like this console interface. Is there any better way of reading the doc. I mean all the doc related to module imdb in one page..

    Read the article

  • Guidelines for calling controller methods in helper modules?

    - by keruilin
    Few questions: Is it possible to call a controller method in a helper module (e.g., application helper)? If so, how does the helper handle the rendering of views? Ignore it? In what instances would you want to call a controller method from a helper? Is it bad practice? Do you have any sample code where you're calling controller methods in helper?

    Read the article

  • Processor affinity settings for Linux kernel modules?

    - by Stephen Pape
    In Windows, I can set the processor affinity of driver code using KeSetSystemAffinityThread, and check which processor my code is running on using KeGetCurrentProcessorNumber. I'm trying to do something similar in a Linux kernel module, but the only affinity calls I can see are for userland processes. Is there any way to do this, so that I can run assembly code on a specific processor? (i.e. sgdt)

    Read the article

  • Using views as a data interface between modules in a database

    - by Stefan
    Hello, I am working on the database layout of a straighforward small database in Mysql. We want to modularize this system in order to have more flexiblity for different implementations we are going to make. Now, the idea was to have one module in the database (simple a group of tables with constraints between them) pass its data to the next module via views. In this way, changes in one module would not affect the other ones, as we can make sure in the view that the right data is present there at any time, although the underlying structure of tables might be different. The structure of the App handling the database would likewise be modularized. Is this something that is sometimes done? On a technical side, as I understand views can't have primary keys - how would I then adress such a view? What other issues should be considered?

    Read the article

  • Rails: Accessing /lib Modules from Controller

    - by Dex
    I have a Module called /lib/string_parser.rb. It looks like: module StringParser def wrap_lines(input, chars) ... end #make available to views def self.included(base) base.send :helper_method, :my_method_for_views if base.respond_to? :helper_method end end I'm trying to call wrap_lines from the create method of my controller but no matter what I do, I keep getting NoMethodErrors for an undefined method.

    Read the article

  • Apache modules: C module vs mod_wsgi python module - Performance

    - by Gopal
    Hi A client of ours is asking us to implement a module in C in Apache webserver for performance reasons. This module should handle RESTful uri's, access a database and return results in json format. Many people here have recommended python mod_wsgi instead - but for simplicity of programming reasons. Can anyone tell me if there is a significant difference in performance between the mod_wsgi python solution vs. the Apache + C.module. Any anecdotes? Pointers to some study posted online?

    Read the article

  • Rails MVC Best Practices for Website Modules

    - by Randuin
    I am just beginning to build my Rails application and thus far I've followed a RESTful design and it's proven much easier to understand and organize the code and structure of the application. I have things like posts and comments. However for the front page. I want to display all the latest posts but also may be in the sidebar display things such as Latest Comments and Latest events. What's the best way to go about this while maintaining the RESTful philosophy?

    Read the article

  • install python modules on shared web hosting

    - by Ali
    I am using a shared hosting environment that will not give me access to the command line. Can I download the python module on my computer, compile it using python setup.py installand then simply upload a .py file to the web host? If yes, where does the install statement place the compiled file?

    Read the article

  • Mocking imported modules in Python

    - by Evgenyt
    I'm trying to implement unit tests for function that uses imported external objects. For example helpers.py is: import os import pylons def some_func(arg): ... var1 = os.path.exist(...) var2 = os.path.getmtime(...) var3 = pylons.request.environ['HTTP_HOST'] ... So when I'm creating unit test for it I do some mocking (minimock in my case) and replacing references to pylons.request and os.path: import helpers def test_some_func(): helpers.pylons.request = minimock.Mock("pylons.request") helpers.pylons.request.environ = { 'HTTP_HOST': "localhost" } helpers.os.path = minimock.Mock(....) ... some_func(...) # assert ... This does not look good for me. Is there any other better way or strategy to substitute imported function/objects in Python?

    Read the article

  • Web programming: Apache modules: mod_python vs mod_php

    - by Olivier Pons
    Hi! I've been using for more than 12 years PHP with Apache (a.k.a mod_php) for my web development work. I've recenlty discovered python and its real power (I still don't understand why this is not always the best product that becomes the most famous). I've just discovered mod_python for Apache. I've already googled but without success things like mod_python vs mod_php. I wanted to know the differences between the two mod_php and mod_python in terms of: speed productivity maintainance (I know `python is most productive and maintainable language in the world, but is it the same for Web programming with Apache) availability of features e.g, cookies and session handling, databases, protocols, etc.

    Read the article

  • Loading Modules in Angular

    - by SL Dev
    I'm new to AngularJS. In my efforts to learn, I've relied on the AngularJS tutorials. Now, I'm trying to build an app using the AngularSeed project template. I'm trying to make my project as modular as possible. For that reason, my controllers are broken out into several files. Currently, I have the following: /app index.html login.html home.html javascript app.js loginCtrl.js homeCtrl.js my app.js file has the following: 'use strict'; var app = angular.module('site', ['ngRoute']); app.config(function($routeProvider, $locationProvider) { $locationProvider.html5Mode(true); $routeProvider.when('/login', {templateUrl: 'app/login.html', controller:'loginCtrl'}); $routeProvider.when('/home', {templateUrl: 'app/home.html', controller:'homeCtrl'}); $routeProvider.otherwise({redirectTo: '/login'}); }); my loginCtrl.js file is very basic at the moment. It only has: 'use strict'; app.controller('loginCtrl', function loginCtrl($scope) { } ); My homeCtrl.js is almost the same, except for the name. It looks like the following: 'use strict'; app.controller('homeCtrl', function homeCtrl($scope) { } ); My index.html file is the angularSeed index-async.html file. However, when I load the dependencies, I have the following: // load all of the dependencies asynchronously. $script([ 'http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.3/angular.min.js', 'http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.3/angular-route.min.js', 'javascript/app.js', 'javascript/loginCtrl.js', 'javascript/homeCtrl.js' ], function() { // when all is done, execute bootstrap angular application angular.bootstrap(document, ['site']); }); My problem is, sometimes my app works and sometimes it doesn't. It's almost like something gets loaded before something else. Occasionally, I receive this error. Other times, I get an error in the console window that says: 'Uncaught ReferenceError: app is not defined' in loginCtrl.js. Sometimes it happens with homeCtrl.js. What am I doing wrong? It feels like I need to have my controllers in a module and pass that module in my app.config in the app.js file. However, a) I'm not sure if that allowed and b) I'm not sure how to do it.

    Read the article

  • Can't require local CoffeeScript modules

    - by superlukas
    I'm running Node.js 0.10.21. I tried both CoffeeScript 1.6.3 and master both with and without require('coffee-script/extensions'). Compiling the two files to JavaScript and running them directly in Node works just fine of course. # ./folder/a.coffee require('../b').test() # ./b.coffee exports.test = -> console.log 'yay' # $ coffee folder/a.coffee # # Error: Cannot find module '../b' # at Function.Module._resolveFilename (module.js:338:15) # at Function.Module._load (module.js:280:25) # at Module.require (module.js:364:17) # at require (module.js:380:17) # at Object.<anonymous> (/Users/test/folder/a.coffee:1:1) # at Module._compile (module.js:456:26)

    Read the article

  • importing modules in app engine

    - by tanky
    Ive asked this before, but it seems i wasnt clear/detailed enough and after a week of trying im still struggling so i will try again. i am trying to use, oauth2 and ply on app engine. i have tried copying their directories into my app engine project directory (in the form ply-3.4 or brosner-python-oauth2-82a05f9) and i have tried copying the specific sub directory contained within the aforemention one. (ply or oauth2) i have tried saying import oauth2, from brosner-oauth2_python-82a05f9 import oauth and other variations on the theme, but i still cant get it to work nothing has worked. i have tried including them in app.yaml, but that seemed to create an even bigger error as my entire project wouldnt even run when i tried that. and now i have run out of things to try. the error log i am getting is as follows. INFO 2012-10-20 22:33:29,358 dev_appserver.py:2884] "GET / HTTP/1.1" 500 - WARNING 2012-10-20 22:33:58,453 py_zipimport.py:139] Can't open zipfile C:\Python27\lib\site-packages\oauth2-1.0.2-py2.7.egg: IOError: [Errno 13] file not accessible: 'C:\Python27\lib\site-packages\oauth2-1.0.2-py2.7.egg' WARNING 2012-10-20 22:33:58,453 py_zipimport.py:139] Can't open zipfile C:\Python27\lib\site-packages\ply-3.4-py2.7.egg: IOError: [Errno 13] file not accessible: 'C:\Python27\lib\site-packages\ply-3.4-py2.7.egg' WARNING 2012-10-20 22:33:58,453 py_zipimport.py:139] Can't open zipfile C:\Python27\lib\site-packages\tweepy-1.11-py2.7.egg: IOError: [Errno 13] file not accessible: 'C:\Python27\lib\site-packages\tweepy-1.11-py2.7.egg' ERROR 2012-10-20 22:34:00,015 wsgi.py:189] Traceback (most recent call last): File "C:\Program Files\Google\google_appengine\google\appengine\runtime\wsgi.py", line 187, in Handle handler = _config_handle.add_wsgi_middleware(self._LoadHandler()) File "C:\Program Files\Google\google_appengine\google\appengine\runtime\wsgi.py", line 225, in _LoadHandler handler = import(path[0]) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 676, in Decorate return func(self, *args, **kwargs) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 1850, in load_module return self.FindAndLoadModule(submodule, fullname, search_path) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 676, in Decorate return func(self, *args, **kwargs) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 1722, in FindAndLoadModule description) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 676, in Decorate return func(self, *args, **kwargs) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 1665, in LoadModuleRestricted description) File "C:\Documents and Settings\ladds\My Documents\udacity\sigh\main.py", line 3, in import ply ImportError: No module named ply INFO 2012-10-20 22:34:00,030 dev_appserver.py:2884] "GET / HTTP/1.1" 500 - thanks for any help.

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >