Daily Archives

Articles indexed Saturday March 27 2010

Page 20/84 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • No acceleration for OpenGL and ImportError for modules that exist

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

    Read the article

  • PHP and SwfUpload

    - by balanza
    Hi, I'm trying to implement SwfUpload in my web page, and I'm using php to save files on server. As is the first time I use this component, I choose to run the algoritm is suggested from the SwfUpload team (http://swfupload.org/forum/generaldiscussion/214): I've put it in a file and I've said the control to use it as code file. It didn't work, as I'm asking help, but what really drives me crazy is that i really don't know how to debug that stuff! The request to the file is encapsulated into the flash object, and i can't get any feedback from it if something goes wrong. Anyone is more experienced than me about this control? Thanks

    Read the article

  • slow php command line performance - is this normal or do I have an install problem?

    - by Frank Schwieterman
    I have a simple PHP app that prints 'hello world'. When I run it from the command line it takes 6 seconds. Is this normal? It seems to take 1 seconds before "hello world" prints, then 5 seconds after. I assume this is overhead of the interpreter. I am running PHP version 5.2.12 on Windows Server 2008 R2. Could this be an install issue, or is it typical? I did a manual install of PHP then added whatever components were needed to run Drupal. The only PHP addon I remember adding was MDB2, CGI support is there too. I am used to a Lua project I run from the command line, hundreds of lines of code that will run in under a second. I have some unit tests I run from the command line, and already with just a few they are very slow. I run them from Netbeans and the tests are still very slow.

    Read the article

  • How to improve quality of software

    - by hariharan
    Last week in our organization, we triggered a topic related to different ways of improving the quality of software (both technical as well as functional related topics). Since i am a technical person, i suggested following ideas, Use case based detailed design document – Both technical as well as functional specification should be well organized according to use case requirement. Design patterns – Will help developers to adopt common approach irrespective of technologies. Analyze and implement new technologies – Helps to improve the performance as well as the security of the application. As I am not a well experienced technical candidate , i am unable to provide other solutions. If any suggestions or topics related to this (including testing, functional requirement), please post your valuable comments.

    Read the article

  • How to translate a config.ini file into C#.NET objects

    - by JACK IN THE CRACK
    config.ini: [globalloads] plugin.SWPlugin = 1 plugin.SWPlugin.params.1 = true plugin.SWPlugin.params.2 = 10 [testz : globballoads] plugin.SWPlugin.params.2 = 20 Simple enough? // load testz config and programmatically create this equivalent code: SWPluginAbstract p = new SWPlugin(true, 20); If a different config.ini setup is needed to do that, it's not a problem...

    Read the article

  • Javascript Namespace Declaration

    - by objektivs
    What neat ways do you use for declaring JavaScript namespaces. I've come across this one: if (Foo == null || typeof(Foo) != "object") { var Foo = new Object();} Is there a more elegant or succinct way of doing this? Just a bit of fun...

    Read the article

  • Is assert evil?

    - by dehmann
    The Go language creators write: Go doesn't provide assertions. (...) Programmers use them as a crutch to avoid thinking about proper error handling and reporting. What is your opinion about this?

    Read the article

  • Is there anyway to set values in the settings.bundle from within the APP

    - by joneswah
    Is there any way to set/update values in the settings.bundle from within your app. I am fine reading in values from the preferences into NSUserDefaults but was wondering whether you can set values from within the app. I have a web-app which I am making a iPhone client for and was thinking to include the users account details in the settings.bundle. This is fine if the user only updates the values through the Apple Application Preferences screens, but what if the user updated those values in the web app. I wanted to pull down the values from the web and then "update" the values in the settings.bundle from within the App. I am guessing that this is not possible and that maybe I need to create my own "in-app" settings screen? But thought I would check with you all first ...

    Read the article

  • .jar why it works only with specigic jdk version???

    - by sadiq
    Hi friends, I have website source code...in which there is a adito.jar file first i extract it ...then make again jar using "jar -cvf adito.jar . and the changed jar file work fine again with that website. above process is only work when i use jdk1.6.0_14 only... BUT..... if i use jdk1.5 or letest jdk1.6.0_18 the same thing is not work..i mean that jar file will not run in my website... So what is the possible reason of this..as i am new kid in java... thanking you, sadiq.

    Read the article

  • Check if the path input is URL or Local File

    - by Ahmed
    Hi All, I'm working in xmldataprovider and we have configuration value "source" this value may be local file or url like c:\data\test.xml --absolute data\test.xml --relative or url http:\mysite\test.xml how I can determine all this cases in code I'm working c#

    Read the article

  • please convert this PHP code in ruby

    - by Arpit Vaishnav
    <?php // amcharts.com export to image utility // set image type (gif/png/jpeg) $imgtype = 'jpeg'; // set image quality (from 0 to 100, not applicable to gif) $imgquality = 100; // get data from $_POST or $_GET ? $data = &$_POST; // get image dimensions $width = (int) $data['width']; $height = (int) $data['height']; // create image object $img = imagecreatetruecolor($width, $height); // populate image with pixels for ($y = 0; $y < $height; $y++) { // innitialize $x = 0; // get row data $row = explode(',', $data['r'.$y]); // place row pixels $cnt = sizeof($row); for ($r = 0; $r < $cnt; $r++) { // get pixel(s) data $pixel = explode(':', $row[$r]); // get color $pixel[0] = str_pad($pixel[0], 6, '0', STR_PAD_LEFT); $cr = hexdec(substr($pixel[0], 0, 2)); $cg = hexdec(substr($pixel[0], 2, 2)); $cb = hexdec(substr($pixel[0], 4, 2)); // allocate color $color = imagecolorallocate($img, $cr, $cg, $cb); // place repeating pixels $repeat = isset($pixel[1]) ? (int) $pixel[1] : 1; for ($c = 0; $c < $repeat; $c++) { // place pixel imagesetpixel($img, $x, $y, $color); // iterate column $x++; } } } // set proper content type header('Content-type: image/'.$imgtype); header('Content-Disposition: attachment; filename="chart.'.$imgtype.'"'); // stream image $function = 'image'.$imgtype; if ($imgtype == 'gif') { $function($img); } else { $function($img, null, $imgquality); } // destroy imagedestroy($img); ?

    Read the article

  • remove duplicate values from a multidimensional arrays in php

    - by haseeb
    hi this is my array , i need to remove duplicating values , please hekp me out Array ( [0] = Array ( [0] = * garfield calicut Address: tanil nadu chennai0696955666 About Company: re stored. [1] = 0.0004 [2] = 0 ) [1] = Array ( [0] = * gamut Address: ashok puram calicut9865326921 About Company: You've come. * garfield calicut Address: tanil nadu chennai0696955666 About Company: re stored. * Hyva It Solutions Address: 697 / 75,30th Cross About Company: Hyva IT Solutions. * streem pvt Ltd Address: onden road kannur9845672062 About Company: Go to the website * Advanced It Wave Address: Ayyappankavu, Ernakulam (North), About Company: Website Developement Services * Viral Industry Address: vettiyar, kodam p o tramp8469666663 About Company: # for discussion [1] = 0.0008 [2] = 0 ) [2] = Array ( [0] = company [1] = 0.0007 [2] = 1 ) ) here 'garfield calicut Address: tanil nadu chennai0696955666 About Company: re stored. ' is repeated , i need to display that only once

    Read the article

  • Unit testing the app.config file with NUnit

    - by Dana
    When you guys are unit testing an application that relies on values from an app.config file? How do you test that those values are read in correctly and how your program reacts to incorrect values entered into a config file? It would be ridiculous to have to modify the config file for the NUnit app, but I can't read in the values from the app.config I want to test. Edit: I think I should clarify perhaps. I'm not worried about the ConfigurationManager failing to read the values, but I am concerned with testing how my program reacts to the values read in.

    Read the article

  • Load XML file on seperate thread, overwrite old , and save.

    - by Luis Tovar
    Hey everyone... so Im trying to figure out how to do this. I have bounced around alot of forums to try and find my answer, but no success. Either their process it too complicated for me to understand, or is just overkill. What I am trying to do is this. I have an XML file within my app. Its a 500k xml file that i dont want the user to have to wait on when loading. SO... I put it in my app which kills the load time, and makes the app available offline. What i want to do is, when the app loads, in the background (seperate thread) download the SAME xml file which MIGHT be updated with new data. Once the xml file is complete, i want to REPLACE the xml file that was used to load the file. Any suggestions or code hints would be greatly appreciated. Thanks in advance!

    Read the article

  • How to safely store encryption key in a .NET assembly

    - by Alex
    In order to prevent somebody from grabbing my data easily, I cache data from my service as encrypted files (copy protection, basically). However, in order to do this, I must store the encryption key within the .NET assembly so it is able to encrypt and decrypt these files. Being aware of tools like Red Gate's .NET Reflector which can pull my key right out, I get a feeling that this is not a very safe way of doing it... are there any best practices to doing this?

    Read the article

  • 2 AudioQueue questions

    - by iter
    I am learning to use AudioQueue. I wish to generate an audio stream programmatically. I have 2 issues that I cannot account for. I am getting audio when I run in the simulator, but not on an iPhone. (Other apps do produce sound on the phone). I get about 20ms-long gaps of silence between buffers. In my testing, I generate an audio buffer on startup and repeatedly enqueue it without modification. I don't spend any processing on filling audio buffers at runtime, not even copying them. Ari.

    Read the article

  • How to convert Silverlight XAML to Resource dictionary in Silverlight 2

    - by Vecdid
    I am looking for the quickest and easiest way to combine two silverlight projects. Once has controls all in Silverlight XAML the other is template driven and uses a template based on a Silverlight resource dictionary. I am looking for some advice and resources on the best and quickest way to do this. One project is based on this: Silverlight Image Slider http://www.silverlightshow.net/items/Image-slider-control-in-Silverlight-1.1.aspx the other project is based on this: Open Video Player http://www.openvideoplayer.com/ I need to move the slider into the player, but the player uses a template and I just don't get how to merge the two as I do not understand resource dictionaries as they are applied to the player. We have completely gutted and made each proiject do what we want, but heck if I can figure out how to combine them.

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >