Daily Archives

Articles indexed Thursday February 17 2011

Page 3/12 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Getting "Unable to find a medium containing a live file system" when installing 10.10

    - by Krastin Konstantinov
    I got this error while trying to install ubuntu 10.10 from a bootable USB stick on to Sony Vaio P series laptop. The disk boots into the language and installation type screen. After that it goes through the splash and pulls up this error: BusyBox v1.13.3 (Ubuntu 1:1.13.3-ubuntu11) built in shell (ash) Enter 'help' for a list of built-in commands. (initramfs) Unable to find a medium containing a live file system After getting this error the installation fails to start. I have used the same USB stick on some other laptops and the installation started as usual. Any help will be appreciated. My installation is i386 and my machine is Vaio P VGN-P610. I've tried every possible thing: Bios: [enable boot external] Boot order: [external] [hard drive] [network boot] Tried 2 different USB drives Tried 2 different external CD drives Tried 6 different downloads of both the desktop and netbook remix. All downloads were checked with MD5SUM. Ubuntu Desktop 9.10 installs properly in every version and from every source. Getting reaaaally frustrated.

    Read the article

  • full screen flash problems

    - by richzilla
    when i play flash videos from sites such as youtube, the videos initially play ok. However when the videos are full screened, a number of problems arise. Usually when the full screen button is first clicked, the video will take up the full screen, but will be frozen (however the video audio can still be heard). It can take several attempts to get the video to play in full screen. The video is also frozen if something triggers osd-notify (changing the volume, getting a new email etc.). Any ideas what might be going wrong?

    Read the article

  • Spam prevention through IP tracking

    - by whamsicore
    I am building a website with user generated comments. In order to implement user moderation/spam-protection, users have the ability to mark comments as spam. When one comment is marked as spam, I want all comments from the same IP address to be deleted. I am not familiar with spam prevention in general, other than Captcha. Question: is this a feasible/good system for spam prevention? are there better ways, or improvements I can make? Thanks.

    Read the article

  • Why/How do expired domain names get bought so quickly?

    - by Alex Angas
    A relative let my wife's family .com domain name expire. Apart from that being annoying in itself, the domain now redirects to random spam blogs and is owned by someone with almost 5000 other domains according to DomainTools. They also want a fortune to return it. The family name is pretty unusual and completely unrelated to the spam. So how did they manage to snap the domain name up so quickly and what value is it to them?

    Read the article

  • FAVICON: Favicon not showing up

    - by Russ
    I'm using a .png favicon file and it is not showing up on my site. Doing a grep, I see the following in home.htm which looks right for me(I have also confirmed it's in the HEAD section within home.htm): home.htm: <link rel="shortcut icon" type="image/png" href="favicon.png"> The favicon.png file is in the same directory as the home.html file. Any suggestions are welcome! Thanks all. In case the file info is revealing for anyone, I'll attach it here:

    Read the article

  • Can I reuse my nameservers from one domain registrar with another?

    - by Nikki Erwin Ramirez
    My regular domain is one I got from GoDaddy. Just recently, I registered a short .cr domain (Costa Rica) in http://www.nic.cr/ . During registration, they asked for nameservers (and just nameservers), so I thought of reusing my GoDaddy nameservers. I kinda thought it would just be a straight-forward mapping, but nothing's happening, though. What am I missing here? (There is an option to use their own nameservers, but I just wanted to explore this option. If there's nothing to be had here, I'll fall back to using theirs.)

    Read the article

  • Tetris Movement - Implementation

    - by James Brauman
    Hi gamedev, I'm developing a Tetris clone and working on the input at the moment. When I was prototyping, movement was triggered by releasing a directional key. However, in most Tetris games I've played the movement is a bit more complex. When a directional key is pressed, the shape moves one space in that direction. After a short interval, if the key is still held down, the shape starts moving in the direction continuously until the key is released. In the case of the down key being pressed, there is no pause between the initial movement and the subsequent continuous movement. I've come up with a solution, and it works well, but it's totally over-engineered. Hey, at least I can recognize when things are getting silly, right? :) public class TetrisMover { List registeredKeys; Dictionary continuousPressedTime; Dictionary totalPressedTime; Dictionary initialIntervals; Dictionary continousIntervals; Dictionary keyActions; Dictionary initialActionDone; KeyboardState currentKeyboardState; public TetrisMover() { *snip* } public void Update(GameTime gameTime) { currentKeyboardState = Keyboard.GetState(); foreach (Keys currentKey in registeredKeys) { if (currentKeyboardState.IsKeyUp(currentKey)) { continuousPressedTime[currentKey] = TimeSpan.Zero; totalPressedTime[currentKey] = TimeSpan.Zero; initialActionDone[currentKey] = false; } else { if (initialActionDone[currentKey] == false) { keyActions[currentKey](); initialActionDone[currentKey] = true; } totalPressedTime[currentKey] += gameTime.ElapsedGameTime; if (totalPressedTime[currentKey] = initialIntervals[currentKey]) { continuousPressedTime[currentKey] += gameTime.ElapsedGameTime; if (continuousPressedTime[currentKey] = continousIntervals[currentKey]) { keyActions[currentKey](); continuousPressedTime[currentKey] = TimeSpan.Zero; } } } } } public void RegisterKey(Keys key, TimeSpan initialInterval, TimeSpan continuousInterval, Action keyAction) { if (registeredKeys.Contains(key)) throw new InvalidOperationException( string.Format("The key %s is already registered.", key)); registeredKeys.Add(key); continuousPressedTime.Add(key, TimeSpan.Zero); totalPressedTime.Add(key, TimeSpan.Zero); initialIntervals.Add(key, initialInterval); continousIntervals.Add(key, continuousInterval); keyActions.Add(key, keyAction); initialActionDone.Add(key, false); } public void UnregisterKey(Keys key) { *snip* } } I'm updating it every frame, and this is how I'm registering keys for movement: tetrisMover.RegisterKey( Keys.Left, keyHoldStartSpecialInterval, keyHoldMovementInterval, () = { Move(Direction.Left); }); tetrisMover.RegisterKey( Keys.Right, keyHoldStartSpecialInterval, keyHoldMovementInterval, () = { Move(Direction.Right); }); tetrisMover.RegisterKey( Keys.Down, TimeSpan.Zero, keyHoldMovementInterval, () = { PerformGravity(); }); Issues that this doesn't address: If both left and right are held down, the shape moves back and forth really quick. If a directional key is held down and the turn finishes and the shape is replaced by a new one, the new one will move quickly in that direction instead of the little pause it is supposed to have. I could fix the issues, but I think it will make the solution even worse. How would you implement this?

    Read the article

  • Separate shaders from HTML file in WebGL

    - by Chris Smith
    I'm ramping up on WebGL and was wondering what is the best way to specify my vertex and fragment shaders. Looking at some tutorials, the shaders are embedded directly in the HTML. (And referenced via an ID.) For example: <script id="shader_1-fs" type="x-shader/x-fragment"> precision highp float; void main(void) { // ... } </script> <script id="shader_1-vs" type="x-shader/x-vertex"> attribute vec3 aVertexPosition; uniform mat4 uMVMatrix; // ... My question is, is it possible to have my shaders referenced in a separate file? (Ideally as plain text.) I presume this is straight forward in JavaScript. Is there essentially a way to do this: var shaderText = LoadRemoteFileOnSever('/shaders/shader_1.txt');

    Read the article

  • Mandelbrot set not displaying properly

    - by brainydexter
    I am trying to render mandelbrot set using glsl. I'm not sure why its not rendering the correct shape. Does the mandelbrot calculation require values to be within a range for the (x,y) [ or (real, imag) ] ? Here is a screenshot: I render a quad as follows: float w2 = 6; float h2 = 5; glBegin(GL_QUADS); glVertex3f(-w2, h2, 0.0); glVertex3f(-w2, -h2, 0.0); glVertex3f(w2, -h2, 0.0); glVertex3f(w2, h2, 0.0); glEnd(); My vertex shader: varying vec3 Position; void main(void) { Position = gl_Vertex.xyz; gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; } My fragment shader (where all the meat is): uniform float MAXITERATIONS; varying vec3 Position; void main (void) { float zoom = 1.0; float centerX = 0.0; float centerY = 0.0; float real = Position.x * zoom + centerX; float imag = Position.y * zoom + centerY; float r2 = 0.0; float iter; for(iter = 0.0; iter < MAXITERATIONS && r2 < 4.0; ++iter) { float tempreal = real; real = (tempreal * tempreal) + (imag * imag); imag = 2.0 * real * imag; r2 = (real * real) + (imag * imag); } vec3 color; if(r2 < 4.0) color = vec3(1.0); else color = vec3( iter / MAXITERATIONS ); gl_FragColor = vec4(color, 1.0); }

    Read the article

  • Correct usage of "<T extends SuperClass>"

    - by yusaku
    I am not familiar with "Generics". Is it a correct use of "<T extends SuperClass>" ? And do you agree that the codes after using generics are better? Before using Generics ================================================= public abstract class SuperSample { public void getSomething(boolean isProcessA) { doProcessX(); if(isProcessA){ doProcessY(new SubASample()); }else{ doProcessY(new SubBSample()); } } protected abstract void doProcessX(); protected void doProcessY(SubASample subASample) { // Nothing to do } protected void doProcessY(SubBSample subBSample) { // Nothing to do } } public class SubASample extends SuperSample { @Override protected void doProcessX() { System.out.println("doProcessX in SubASample"); } @Override protected void doProcessY(SubASample subASample) { System.out.println("doProcessY in SubASample"); } } public class Sample { public static void main(String[] args) { SubASample subASample = new SubASample(); subASample.getSomething(true); } } After using Generics ================================================= public abstract class SuperSample { public void getSomething(boolean isProcessA) { doProcessX(); if(isProcessA){ doProcessY(new SubASample()); }else{ doProcessY(new SubBSample()); } } protected abstract void doProcessX(); protected abstract <T extends SuperSample> void doProcessY(T subSample); } public class SubASample extends SuperSample { @Override protected void doProcessX() { System.out.println("doProcessX in SubASample"); } @Override protected <T extends SuperSample> void doProcessY(T subSample) { System.out.println("doProcessY in SubASample"); } } public class Sample { public static void main(String[] args) { SubASample subASample = new SubASample(); subASample.getSomething(true); } }

    Read the article

  • Couldn't copy package file to temp file in android

    - by Siva K
    hi i created a new app, whenever i try to run in my device it shows as [2011-02-17 18:57:09 - SpeedApp02] Installation error: INSTALL_FAILED_MEDIA_UNAVAILABLE [2011-02-17 18:57:09 - SpeedApp02] Please check logcat output for more details. [2011-02-17 18:57:10 - SpeedApp02] Launch canceled! in the console and 02-17 18:58:58.540: ERROR/PackageManager(59): Couldn't copy package file to temp file. in the logcat. What it means? what is the problem. This is the same with emulator too....

    Read the article

  • How to catch HttpRequestValidationException in production

    - by bruno
    Hello all, I have this piece of code to handle the HttpRequestValidationException in my global.asax.cs file. protected void Application_Error(object sender, EventArgs e) { var context = HttpContext.Current; var exception = context.Server.GetLastError(); if (exception is HttpRequestValidationException) { Response.Clear(); Response.StatusCode = 200; Response.Write(@"<html><head></head><body>hello</body></html>"); Response.End(); return; } } If I debug my webapplication, it works perfect. But when i put it on our production-server, the server ignores it and generate the "a potentially dangerous request.form value was detected from the client" - error page. I don't know what happens exactly... If anybody knows what the problem is, or what i do wrong..? Also I don't want to set the validaterequest on false in the web.config. The server uses IIS7.5, And I'm using asp.net 3.5. Thanks, Bruno

    Read the article

  • PHP resized image functions and S3 upload functions - but how to merge the two?

    - by chocolatecoco
    I am using S3 to store images and I am resizing and compressing images before it gets uploaded using PHP. I'm using this class for storing the images to an S3 bucket - http://undesigned.org.za/2007/10/22/amazon-s3-php-class This all works fine if I'm not doing any file processing before the file is uploaded because it reads the file upload from the $_FILES array. The problem is I am resizing and compressing the image before storing to the S3 bucket. So I'm no longer able to read from the $_FILES array. The functions for resizing: public function resizeImage($newWidth, $newHeight, $option="auto") { // *** Get optimal width and height - based on $option $optionArray = $this->getDimensions($newWidth, $newHeight, $option); $optimalWidth = $optionArray['optimalWidth']; $optimalHeight = $optionArray['optimalHeight']; // *** Resample - create image canvas of x, y size $this->imageResized = imagecreatetruecolor($optimalWidth, $optimalHeight); imagecopyresampled($this->imageResized, $this->image, 0, 0, 0, 0, $optimalWidth, $optimalHeight, $this->width, $this->height); // *** if option is 'crop', then crop too if ($option == 'crop') { $this->crop($optimalWidth, $optimalHeight, $newWidth, $newHeight); } } The script I am using to store the file after resizing and compressing to a local directory: public function saveImage($savePath, $imageQuality="100") { // *** Get extension $extension = strrchr($savePath, '.'); $extension = strtolower($extension); switch($extension) { case '.jpg': case '.jpeg': if (imagetypes() & IMG_JPG) { imagejpeg($this->imageResized, $savePath, $imageQuality); } break; case '.gif': if (imagetypes() & IMG_GIF) { imagegif($this->imageResized, $savePath); } break; case '.png': // *** Scale quality from 0-100 to 0-9 $scaleQuality = round(($imageQuality/100) * 9); // *** Invert quality setting as 0 is best, not 9 $invertScaleQuality = 9 - $scaleQuality; if (imagetypes() & IMG_PNG) { imagepng($this->imageResized, $savePath, $invertScaleQuality); } break; // ... etc default: // *** No extension - No save. break; } imagedestroy($this->imageResized); } with this PHP code to invoke it: $resizeObj = new resize("$images_dir/$filename"); $resizeObj -> resizeImage($thumbnail_width, $thumbnail_height, 'crop'); $resizeObj -> saveImage($images_dir."/tb_".$filename, 90); How do I modify the code above so I can pass it through this function: $s3->putObjectFile($thefile, "s3bucket", $s3directory, S3::ACL_PUBLIC_READ)

    Read the article

  • Default enum visibility in C++

    - by Benjamin Borden
    I have a class that looks like this: namespace R { class R_Class { enum R_Enum { R_val1, R_val2, R_val3 } private: // some private stuff public: // some public stuff } } I'm performing unit testing using an automated test tool (LDRA). The compiler (GHS) claims that my test harness cannot access the type R::R_Class::R_Enum. I have no trouble accessing the values within a similar class that is defined as such: namespace S { class S_Class { public: enum S_Enum { S_val1, S_val2, S_val3 } } private: // some private stuff public: // some public stuff } Do enums in C++ need to be given explicit visibility directives? If not given any, do they default to private? protected?

    Read the article

  • is it possible to make a child element visible if the parent is hidden

    - by amir
    Hi just wondering if its possible to have a hidden parent and a visible child with css or jQuery, basically on some certain pages I'm trying to make a child element visible even though the parents are hidden, var bodyClass = jQuery('body').attr('class'); //alert (bodyClass); var searchTerm = 'category-mens'; var searchTerm2 = 'category-ladies'; if((bodyClass.search(searchTerm) || bodyClass.search(searchTerm2)) != -1) { jQuery('.nav-container ul.level0 li.level1 ul.level1 li.level2 ul.level2 li.first a span').css({ 'display':'block', 'position':'absolute', 'top':'500px', 'left':'500px' }); } at the moment it doesn't work because the li.level2 is hidden. Thanks for the help.

    Read the article

  • Debug vs Trace in C#

    - by koumides
    All, As I understand statements like Debug.WriteLine() will not stay in the code in the Release build. On the other hand Trace.WriteLine() will stay in the code in the Release build. What is controling this behaviour? Does the C# compiler ignores everything from the System.Diagnostics.Debug class when the DEBUG is defined? I am just trying to understand the internals of C# and just curious. Thanks, MK

    Read the article

  • ASP.net MVC 2.0 using the same form for adding and editing.

    - by Chevex
    I would like to use the same view for editing a blog post and adding a blog post. However, I'm having an issue with the ID. When adding a blog post, I have no need for an ID value to be posted. When model binding binds the form values to the BlogPost object in the controller, it will auto-generate the ID in entity framework entity. When I am editing a blog post I DO need a hidden form field to store the ID in so that it accompanies the next form post. Here is the view I have right now. <% using (Html.BeginForm("CommitEditBlogPost", "Admin")) { %> <% if (Model != null) { %> <%: Html.HiddenFor(x => x.Id)%> <% } %> Title:<br /> <%: Html.TextBoxFor(x => x.Title, new { Style = "Width: 90%;" })%> <br /> <br /> Summary:<br /> <%: Html.TextAreaFor(x => x.Summary, new { Style = "Width: 90%; Height: 50px;" }) %> <br /> <br /> Body:<br /> <%: Html.TextAreaFor(x => x.Body, new { Style = "Height: 250px; Width: 90%;" })%> <br /> <br /> <input type="submit" value="Submit" /> <% } %> Right now checking if the model is coming in NULL is a great way to know if I'm editing a blog post or adding one, because when I'm adding one it will be null as it hasn't been created yet. The problem comes in when there is an error and the entity is invalid. When the controller renders the form after an invalid model the Model != null evaluates to false, even though we are editing a post and there is clearly a model. If I render the hidden input field for ID when adding a post, I get an error stating that the ID can't be null. Any help is appreciated. EDIT: I went with OJ's answer for this question, however I discovered something that made me feel silly and I wanted to share it just in case anyone was having a similar issue. The page the adds/edits blogs does not even need a hidden field for id, ever. The reason is because when I go to add a blog I do a GET to this relative URL BlogProject/Admin/AddBlogPost This URL does not contain an ID and the action method just renders the page. The page does a POST to the same URL when adding the blog post. The incoming BlogPost entity has a null Id and is generated by EF during save changes. The same thing happens when I edit blog posts. The URL is BlogProject/Admin/EditBlogPost/{Id} This URL contains the id of the blog post and since the page is posting back to the exact same URL the id goes with the POST to the action method that executes the edit. The only problem I encountered with this is that the action methods cannot have identical signatures. [HttpGet] public ViewResult EditBlogPost(int Id) { } [HttpPost] public ViewResult EditBlogPost(int Id) { } The compiler will yell at you if you try to use these two methods above. It is far too convenient that the Id will be posted back when doing a Html.BeginForm() with no arguments for action or controller. So rather than change the name of the POST method I just modified the arguments to include a FormCollection. Like this: [HttpPost] public ViewResult EditBlogPost(int Id, FormCollection formCollection) { // You can then use formCollection as the IValueProvider for UpdateModel() // and TryUpdateModel() if you wish. I mean, you might as well use the // argument since you're taking it. } The formCollection variable is filled via model binding with the same content that Request.Form would be by default. You don't have to use this collection for UpdateModel() or TryUpdateModel() but I did just so I didn't feel like that collection was pointless since it really was just to make the method signature different from its GET counterpart. Thanks for the help guys!

    Read the article

  • How to change value inside a JSON string.

    - by Jeremy Roy
    I have a JSON string array of objects like this. [{"id":"4","rank":"adm","title":"title 1"}, {"id":"2","rank":"mod","title":"title 2"}, {"id":"5","rank":"das","title":"title 3"}, {"id":"1","rank":"usr","title":"title 4"}, {"id":"3","rank":"ref","title":"title 5"}] I want to change the title value of it, once the id is matching. So if my variable myID is 5, I want to change the title "title 5" to new title, and so on. And then I get the new JSON array to $("#rangArray").val(jsonStr); Something like $.each(jsonStr, function(k,v) { if (v==myID) { this.title='new title'; $("#myTextArea").val(jsonStr); } }); Here is the full code. $('img.delete').click(function() { var deltid = $(this).attr("id").split('_'); var newID = deltid[1]; var jsonStr = JSON.stringify(myArray); $.each(jsonStr, function(k,v) { if (v==newID) { // how to change the title jsonStr[k].title = 'new title'; alert(jsonStr); $("#rangArray").val(jsonStr); } }); }); The above is not working. Any help please?

    Read the article

  • inserting time delay with cocos2d

    - by KDaker
    I am trying to add several labels that appear sequentially with a time delay between each. The labels will display either 0 or 1 and the value is calculated randomly. I am running the following code: for (int i = 0; i < 6; i++) { NSString *cowryString; int prob = arc4random()%10; if (prob > 4) { count++; cowryString = @"1"; } else { cowryString = @"0"; } [self runAction:[CCSequence actions:[CCDelayTime actionWithDuration:0.2] ,[CCCallFuncND actionWithTarget:self selector:@selector(cowryAppearWithString:data:) data:cowryString], nil]]; } the method that makes the labels appear is this: -(void)cowryAppearWithString:(id)sender data:(NSString *)string { CCLabelTTF *clabel = [CCLabelTTF labelWithString:string fontName:@"arial" fontSize:70]; CGSize screenSize = [[CCDirector sharedDirector] winSize]; clabel.position = ccp(200.0+([cowries count]*50),screenSize.height/2); id fadeIn = [CCFadeIn actionWithDuration:0.5]; [clabel runAction:fadeIn]; [cowries addObject:clabel]; [self addChild:clabel]; } The problem with this code is that all the labels appear at the same moment with the same delay. I understand that if i use [CCDelayTime actionWithDuration:0.2*i] the code will work. But the problem is that i might also need to iterate this entire for loop and have the labels appear again after they have appeared the first time. how is it possible to have actions appear with delay and the actions dont always follow the same order or iterations???

    Read the article

  • trying to get property of non object curl issue

    - by user550265
    I have a curl setup as follows to access a json object $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://sitename.com"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_BINARYTRANSFER, true); curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookiefilename.txt'); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Host:sitename.com')); $output = curl_exec($ch); curl_close($ch); $output = json_decode($output); echo $output->property; I get the error 'trying to access property of non object'.

    Read the article

  • Prevent Method call without Exception using @PreAuthorize Annotation

    - by Chepech
    Hi all. We are using Spring Security 3. We have a custom implementation of PermissionEvaluator that has this complex algorithm to grant or deny access at method level on the application. To do that we add a @PreAuthorize annotation to the method we want to protect (obviously). Everything is fine on that. However the behavior that we are looking for is that if a hasPermission call is denied, the protected method call only needs to be skipped, instead we are getting a 403 error each time that happens. Any ideas how to prevent that? You can find a different explanation of the problem here; AccessDeniedException handling during methodSecurityInterception

    Read the article

  • Fabric methods exceptions

    - by baobee
    I try to make Fabric func, which checks if Apache installed: from fabric.api import * def check_apache(): try: result = local('httpd -v', capture=True) except: print "check_apache exception" But if httpd not installed I get: [root@server-local ~]$ fab check_apache Fatal error: local() encountered an error (return code 127) while executing 'ahttpd -v' Aborting. check_apache exception Done. How can I get correct exception for Fabric local() method ? So I need to get exception and continue executing without any Fabric error messages: [root@server-local ~]$ fab check_apache check_apache exception Done.

    Read the article

  • mongo_mapper custom data types for localization

    - by rick
    hi i have created a LocalizedString custom data type for storing / displaying translations using mongo_mapper. This works for one field but as soon as i introduce another field they get written over each and display only one value for both fields. The to_mongo and from_mongo seem to be not workings properly. Please can any one help with this ? her is the code : class LocalizedString attr_accessor :translations def self.from_mongo(value) puts self.inspect @translations ||= if value.is_a?(Hash) value elsif value.nil? {} else { I18n.locale.to_s => value } end @translations[I18n.locale.to_s] end def self.to_mongo(value) puts self.inspect if value.is_a?(Hash) @translations = value else @translations[I18n.locale.to_s] = value end @translations end end Thank alot Rick

    Read the article

  • How to use OpenCV in Python?

    - by Roman
    I have just installed OpenCV on my Windows 7 machine. As a result I get a new directory: C:\OpenCV2.2\Python2.7\Lib\site-packages In this directory I have two files: cv.lib and cv.pyd. Then I try to use the opencv from Python. I do the following: import sys sys.path.append('C:\OpenCV2.2\Python2.7\Lib\site-packages') import cv As a result I get the following error message: File "<stdin>", line 1, in <module> ImportError: DLL load failed: The specified module could not be found. What am I doing wrong? ADDED As it was recommended here, I have copied content of C:\OpenCV2.0\Python2.6\Lib\site-packages to the C:\Python26\Lib\site-packages. It did not help.

    Read the article

  • Logging in "Java Library Code" libs for Android applications

    - by K. Claszen
    I follow the advice to implement Android device (not application!) independent library code for my Android Apps in a seperate "Java Library Code" project. This makes testing easier for me as I can use the standard maven project layout, Spring test support and Continuous Build systems the way I am used to. I do not want to mix this inside my Android App project although this might be possible. I now wonder how to implement logging in this library. As this library will be used on the Android device I would like to go with android.util.Log. I added the followind dependency to my project to get the missing Android packages/classes and dependencies: <dependency> <groupId>com.google.android</groupId> <artifactId>android</artifactId> <version>2.2.1</version> <scope>provided</scope> </dependency> But this library just contains stub method (similar to the android.jar inside the android-sdk), thus using android.util.Log results in java.lang.RuntimeException: Stub! when running my unit tests. How do I implement logging which works on the Android device but does not fail outside (I do not expect it to work, but it must not fail)? Thanks for any advice Klaus For now I am going with the workaround to catch the exception outside android but hope there is a better solution. try { Log.d("me", "hello"); } catch (RuntimeException re) { // ignore failure outside android }

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >