Search Results

Search found 53 results on 3 pages for 'arno smit'.

Page 2/3 | < Previous Page | 1 2 3  | Next Page >

  • Django Caught an exception while rendering: No module named registration

    - by Arno Smit
    I seem to have run into a bit of an issue. I am busy creating an app, and over the last few weeks setup my server to use Git, mod_wsgi to host this app. Since deploying it, everything seems to be running smoothly however, I had to go through all my files and insert the absolute url of the project to make sure it works fine. on my local machine from registration.models import UserRegistration on server from myapp.registration.models import UserRegistration Am I doing something wrong? And this has also caused an issue for me where I cannot access my django admin interface. All i get is this: Caught an exception while rendering: No module named registration Exception Value: Caught an exception while rendering: No module named registration As far as I am concerned my app has all the relevant urls, but it does not seem to work. Thank you in advance

    Read the article

  • Memeory Leak in Windows Page file when calling a shell command

    - by Arno
    I have an issue on our Windows 2003 x64 Build Server when invoking shell commands from a script. Each call causes a "memory leak" in the page file so it grows quite rapidly until it reaches the maximum and the machine stops working. I can reproduce the problem very nicely by running a perl script like for ($count=1; $count<5000; $count++) { system "echo huhu"; } It is independent of he scripting language as the same happens with lua: for i=1,5000 do os.execute("echo huhu") end I found somebody describing the same issue with php at http://www.issociate.de/board/post/454835/Memory_leak_occurs_when_exec%28%29_function_is_used_on_Windows_platform.html His solution: Firewall/Virus Scanner does not apply, neither are running on the machine. We can also reproduce the issue on other Developer Machines running XP 64, but not on XP 32 Bit. I also found an article describing a leak situation in page file at http://www.programfragment.com/ The guilty guy for the allocation is C:\WINDOWS\System32\svchost.exe -k netsvcs which runs all the basic Windows services. Does anybody know the issue and how to resolve it ?

    Read the article

  • How to Execute an Oracle SQL Statements with VBScript

    - by Arno Conradie
    I am trying to execute an Oracle SQL statement or Oracle Functions through Microsoft VBScript and the loop throught the result set or display the value returned by the function So far I have managed to connect to Oracle via SQLPlus*, but now I am stuck. Can anybody help? Dim output Dim WshShell, oExec, input set WshShell = CreateObject("WScript.Shell") set oEnv=WshShell.Environment("Process") cmdString = "C:\Oracle\11g\product\11.1.0\ruby\BIN\sqlplus.exe -S stradmin/stradmin@ruby select * from dual" Set oExec = WshShell.Exec(cmdString) WScript.Echo "Status" & oExec.Status Do While oExec.Status = 0 WScript.Sleep 2 Loop input = "" Do While Not oExec.StdOut.AtEndOfStream input = input & oExec.StdOut.Read(1) Loop wscript.echo input

    Read the article

  • disabling a window

    - by Arno Greiler
    In my application I have a button. If the button is clicked as select against a database is executed and the result is shown in a ListView. As the select is quite complex, it takes some time to retrieve the data. When I click the Button, the Application-Window should be disabled until the data is loaded. But when I set the IsEnabled-Property of the Window to false, the Window gets disabled after the data is loaded. I tried to disable the Window in an other thread with a BackgroundWorker. But then I get an exception that the Window is alreay in use by an other thread. How can I disable the Window bevore it retrieves the data?

    Read the article

  • Create a new instance in a static function of an abstract class

    - by arno
    abstract class db_table { static function get_all_rows() { ... while(...) { $rows[] = new self(); ... } return $rows; } } class user extends db_table { } $rows = user::get_all_rows(); I want to create instances of a class from a static method defined in the abstract parent class but PHP tells me "Fatal error: Cannot instantiate abstract class ..." How should I implement it correctly?

    Read the article

  • Enforce numbers in mobile web form

    - by Peter Smit
    I have a simple webform targeted for Opera Mini and Opera Mobile. I'm using just a HTML input element. Now I would like to restrict the element to only have integer numbers. Is there a way to enforce this in this browser (possible even that the phone will have it's number mode on when entering the form)? And if I wanted to allow floats, is something possible then?

    Read the article

  • How to synchronize a python dict with multiprocessing

    - by Peter Smit
    I am using Python 2.6 and the multiprocessing module for multi-threading. Now I would like to have a synchronized dict (where the only atomic operation I really need is the += operator on a value). Should I wrap the dict with a multiprocessing.sharedctypes.synchronized() call? Or is another way the way to go?

    Read the article

  • How does TransactionScope guarantee data integrity across multiple databases?

    - by Bas Smit
    Hey guys, Can someone tell me the principle of how TransactionScope guarantees data integrity across multiple databases? I imagine it first sends the commands to the databases and then waits for the databases to respond before sending them a message to apply the command sent earlier. However when execution is stopped abruptly when sending those apply messages we could still end up with a database that has applied the command and one that has not. Can anyone shed some light on this? Edit: I guess what Im asking is can I rely on TransactionScope to guarantee data integrity when writing to multiple databases in case of a power outage or a sudden shutdown. Thanks, Bas Example: using(var scope=new TransactionScope()) { using (var context = new FirstEntities()) { context.AddToSomethingSet(new Something()); context.SaveChanges(); } using (var context = new SecondEntities()) { context.AddToSomethingElseSet(new SomethingElse()); context.SaveChanges(); } scope.Complete(); }

    Read the article

  • Wrapping a C# service in a console app to debug it.

    - by Jack Smit
    I want to debug a service written in C# and the old fashioned way is just too long. I have to stop the service, start my application that uses the service in debug mode (Visual studio 2008), start the service, attach to the service process and then navigate in my Asp.Net application to trigger the service. I basically have the service running in the background, waiting for a task. The web application will trigger a task to be picked up by the service. What I would like to do is to have a console application that fires the service in an effort for me to debug. Is there any simple demo that anybody knows about? Thank you Jack

    Read the article

  • Compile and optimize for different target architectures

    - by Peter Smit
    Summary: I want to take advantage of compiler optimizations and processor instruction sets, but still have a portable application (running on different processors). Normally I could indeed compile 5 times and let the user choose the right one to run. My question is: how can I can automate this, so that the processor is detected at runtime and the right executable is executed without the user having to chose it? I have an application with a lot of low level math calculations. These calculations will typically run for a long time. I would like to take advantage of as much optimization as possible, preferably also of (not always supported) instruction sets. On the other hand I would like my application to be portable and easy to use (so I would not like to compile 5 different versions and let the user choose). Is there a possibility to compile 5 different versions of my code and run dynamically the most optimized version that's possible at execution time? With 5 different versions I mean with different instruction sets and different optimizations for processors. I don't care about the size of the application. At this moment I'm using gcc on Linux (my code is in C++), but I'm also interested in this for the Intel compiler and for the MinGW compiler for compilation to Windows. The executable doesn't have to be able to run on different OS'es, but ideally there would be something possible with automatically selecting 32 bit and 64 bit as well. Edit: Please give clear pointers how to do it, preferably with small code examples or links to explanations. From my point of view I need a super generic solution, which is applicable on any random C++ project I have later. Edit I assigned the bounty to ShuggyCoUk, he had a great number of pointers to look out for. I would have liked to split it between multiple answers but that is not possible. I'm not having this implemented yet, so the question is still 'open'! Please, still add and/or improve answers, even though there is no bounty to be given anymore. Thanks everybody!

    Read the article

  • How to setup a Zend_Application with an application.ini and a user.ini

    - by Peter Smit
    I am using Zend_Application and it does not feel right that I am mixing in my application.ini both application and user configuration. What I mean with this is the following. For example, my application needs some library classes in the namespace MyApp_ . So in application.ini I put autoloaderNamespaces[] = "MyApp_". This is pure application configuration, no-one except a programmer would change these. On the other hand I put there a database configuration, something that a SysAdmin would change. My idea is that I would split options between an application.ini and an user.ini, where the options in user.ini take preference (so I can define standard values in application.ini). Is this a good idea? How can I best implement this? The idea's I have are Extending Zend_Application to take multiple config files Making an init function in my Bootstrap loading the user.ini Parsing the config files in my index.php and pass these to Zend_Application (sounds ugly) What shall I do? I would like to have the 'cleanest' solution, which is prepared for the future (newer ZF versions, and other developers working on the same app)

    Read the article

  • How should I use random.jumpahead in Python

    - by Peter Smit
    I have a application that does a certain experiment 1000 times (multi-threaded, so that multiple experiments are done at the same time). Every experiment needs appr. 50.000 random.random() calls. What is the best approach to get this really random. I could copy a random object to every experiment and do than a jumpahead of 50.000 * expid. The documentation suggests that jumpahead(1) already scrambles the state, but is that really true? Or is there another way to do this in 'the best way'? (No, the random numbers are not used for security, but for a metropolis hasting algorithm. The only requirement is that the experiments are independent, not whether the random sequence is somehow predictable or so)

    Read the article

  • Subsonic in a VS2008 Add-In woes

    - by Michael Smit
    Hi, I am writing a VS2008 add-in that connects to a remote database blah blah. I am having a problem with the app.config in this project. When I use SubSonic in my code, it moans that is cannot find the SubSonicServer section. This is because the .config file cannot be found. This appears to a problem with paths as the add-in is a DLL running in the context of VS2008 and the working directory is C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE. Is there a way to get the app.config to deploy properly with the application so my add-in (and SubSonic) can find what it needs in the .config file, or is there a way to get SubSonic to work without the need for the .config? I am very experienced in SubSonic projects now, but only winforms, web, web service, and WPF applications. This is the first time I have tried to use SubSonic in a VS2008 Add-In project. I also have AppSettings in the config file which the ConfigurationManager cannot read because it cannot see the .config file. 2AM now and brain is tired of trying to figure this one out. Hopefully there is an answer when I wake up :) TIA

    Read the article

  • XSLT Transforming sequential XML to hierarchical XML

    - by Jean-Paul Smit
    I have a requirement to transform a sequential XML node list into a hierarchical, but I run into some XSLT specific knowledge gap. The input XML contains articles, colors and sizes. In the sample below 'Record1' is an article, 'Record2' represents a color and 'Record3' are the sizes. The number of colors and sizes (record2 and record3) elements can vary. <root> <Record1>...</Record1> <Record2>...</Record2> <Record3>...</Record3> <Record3>...</Record3> <Record2>...</Record2> <Record3>...</Record3> <Record3>...</Record3> <Record3>...</Record3> <Record3>...</Record3> <Record1>...</Record1> <Record2>...</Record2> <Record3>...</Record3> <Record3>...</Record3> <Record2>...</Record2> <Record3>...</Record3> <Record3>...</Record3> <Record3>...</Record3> <Record3>...</Record3> </root> All fields are on the same hierarchical level, but still I have to create this structure as output: <root> <article> -> Record1 <color> -> Record2 <size>...</size> -> Record3 <size>...</size> -> Record3 </color> <color> -> Record2 <size>...</size> -> Record3 <size>...</size> -> Record3 <size>...</size> -> Record3 <size>...</size> -> Record3 </color> </article> <article> -> Record1 <color> -> Record2 <size>...</size> -> Record3 <size>...</size> -> Record3 </color> <color> -> Record2 <size>...</size> -> Record3 <size>...</size> -> Record3 <size>...</size> -> Record3 <size>...</size> -> Record3 </color> </article> </root> I've tried to iterate the nodes sequentially but for example the 'article' (=record1) node tag needs to remain unclosed while 'color' (=record2) nodes are processed. The same counts for processing 'size' (=record3) having 'color' unclosed, but that is not allowed by XSLT. My next idea was to call a template for every article, color and size level, but I don't know how to select for example all 'record3' nodes between the current 'record2' and the next article represented by 'record1'. I've also got a limitation on the XSLT version because I need this transformation in BizTalk Server which only supports XSLT 1.0 Can someone push me in the right direction?

    Read the article

  • Is it possible to give a python dict an initial capacity (and is it usefull)

    - by Peter Smit
    I am filling a python dict with around 10,000,000 items. My understanding of dict (or hashtables) is that when too much elements get in them, the need to resize, an operation that cost quite some time. Is there a way to say to a python dict that you will be storing at least n items in it, so that it can allocate memory from the start? Or will this optimization not do any good to my running speed? (And no, I have not checked that the slowness of my small script is because of this, I actually wouldn't now how to do that. This is however something I would do in Java, set the initial capacity of the HashSet right)

    Read the article

  • Why can I not access this class member in python?

    - by Peter Smit
    I have the following code class Transcription(object): WORD = 0 PHONE = 1 STATE = 2 def __init__(self): self.transcriptions = [] def align_transcription(self,model,target=Transcription.PHONE): pass The important part here is that I would like to have a class member as default value for a variable. This however gives the following error: NameError: name 'Transcription' is not defined Why is this not possible and what is the right (pythonic) way to do something like this.

    Read the article

  • How to select rows from data.frame with 2 conditions

    - by Peter Smit
    I have an aggregated table: > aggdata[1:4,] Group.1 Group.2 x 1 4 0.05 0.9214660 2 6 0.05 0.9315789 3 8 0.05 0.9526316 4 10 0.05 0.9684211 How can I select the x value when I have values for Group.1 and Group.2? I tried: aggdata[aggdata[,"Group.1"]==l && aggdata[,"Group.2"]==lamda,"x"] but that replies all x's. More info: I want to use this like this: table = data.frame(); for(l in unique(aggdata[,"Group.1"])) { for(lambda in unique(aggdata[,"Group.2"])) { table[l,lambda] = aggdata[aggdata[,"Group.1"]==l & aggdata[,"Group.2"]==lambda,"x"] } } Any suggestions that are even easier and giving this result I appreciate!

    Read the article

  • How to escape LIKE %$var% with Doctrine?

    - by Peter Smit
    I am making a Doctrine query and I have to do a wildcard match in the where clause. How should I escape the variable that I want to insert? The query I want to get: SELECT u.* FROM User as u WHERE name LIKE %var% The php code until now: $query = Doctrine_Query::create() ->from('User u') ->where(); What should come in the where clause? The variable I want to match is $name

    Read the article

  • Is it possible to print on a networked Windows Print server from an AIX server, without using remote

    - by Stringent Software
    I have an application on an AIX server (v5.3) that needs to print via a Windows Print Server over the LAN. The simplest way to do this is to use SMIT to setup a remote print queue - which I've done on the test environment - but the IT department have refused to set up a remote print queue on the Production server. I don't have root access to the Production server. Is there any other method for connecting the app to the print server that doesn't involve print queues on the AIX box?

    Read the article

  • Blocking specific IP requests

    - by user42908
    Hi, I own a VPS running Ubuntu with Apache stuff. Recently I am getting continous request from IP static-195.22.94.120.addr.tdcsong.se.54303 : 12337 I already installed the 'arno-iptables-firewall'. Have iptables blocking 195.22.94.120 Still then I get the request from that IP if i see via tcpdump. May I know what else i can do to protect my VPS? Thank you.

    Read the article

  • Is it possible to print on a networked Windows Print server from an AIX server, without using remote printer queues?

    - by Stringent Software
    I have an application on an AIX server (v5.3) that needs to print via a Windows Print Server over the LAN. The simplest way to do this is to use SMIT to setup a remote print queue - which I've done on the test environment - but the IT department have refused to set up a remote print queue on the Production server. I don't have root access to the Production server. Is there any other method for connecting the app to the print server that doesn't involve print queues on the AIX box?

    Read the article

  • nmap on my webserver shows TCP ports 554 and 7070 open

    - by atc
    I have a webserver that hosts various websites for me. The two services that are accessible outside are SSH and Apache2. These are running on a non-standard and standard port, respectively. All other ports are closed explicitly via arno-iptables-firewall. The host is running Debian Testing. I noticed that a scan of the host using nmap produced different results from different PCs. From my laptop on my home network (behind a BT Homehub), I get the following: Not shown: 996 filtered ports PORT STATE SERVICE 80/tcp open http 554/tcp open rtsp 7070/tcp open realserver 9000/tcp open cslistener whereas scanning from a US-based server with nmap 5.00 and a Linux box in Norway running nmap 5.21 I get the following: Not shown: 998 filtered ports PORT STATE SERVICE 80/tcp open http 9000/tcp open cslistener so I hope it's my internal network or ISP that's playing up, but I cannot be sure. Running a netstat -l | grep 7070 produces nothing. Similarly for port 554. Can anyone explain the peculiarities I'm seeing?

    Read the article

< Previous Page | 1 2 3  | Next Page >