Daily Archives

Articles indexed Wednesday April 14 2010

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

  • How to stop intermittent playback on airtunes (iTunes + Airport Express)?

    - by Alex B
    Is there a definitive answer for how to stop intermittent "skips" or pauses while playing music from iTunes to an airport express connected to my home stereo? When I read other forums I see a wealth of posts that say "I did XYZ and it's fixed" followed by "I tried XYZ and it didn't work." This does not appear to be signal strength related. The green light on the Airport Express does not turn to yellow/orange. Other wireless devices have no trouble connecting at the same or greater distances from the wireless router.

    Read the article

  • Powering-down USB Powered Devices on laptop sleep

    - by Carl
    I recently purchased a Targus Lap Chill Mat, which is a USB powered device, but doesn't have any interface/storage/etc function. I'd like it to power-down when my (macbook) laptop sleeps (since the fan obviously doesn't need to be running when the laptop is idle) without having to unplug it. Any suggestions?

    Read the article

  • Animate View gone

    - by MrSnowflake
    I want to make an Animation for when a View gets it's visibility set to GONE. Instead of just dissapearing, the View should 'collapse'. I tried this with a ScaleAnimation but then the View is collapse, but the layout will only resize it's space after (or before) the Animation stops (or starts). How can I make the Animation so that, while animating, the lower Views will move up?

    Read the article

  • why is this C++ Code not doing his job

    - by hamza
    i want to create a program that write all the primes in a file ( i know that its a popular algorithm but m trying to make it by my self ) , but it still showing all the numbers instead of just the primes , & i dont know why someone pleas tell me why #include <iostream> #include <stdlib.h> #include <stdio.h> void afficher_sur_un_ficher (FILE* ficher , int nb_bit ); int main() { FILE* p_fich ; char tab[4096] , mask ; int nb_bit = 0 , x ; for (int i = 0 ; i < 4096 ; i++ ) { tab[i] = 0xff ; } for (int i = 0 ; i < 4096 ; i++ ) { mask = 0x01 ; for (int j = 0 ; j < 8 ; j++) { if ((tab[i] & mask) != 0 ) { x = nb_bit ; while (( x > 1 )&&(x < 16384)) { tab[i] = tab[i] ^ mask ; x = x * 2 ; } afficher_sur_un_ficher (p_fich , nb_bit ) ; } mask = mask<<1 ; nb_bit++ ; } } system ("PAUSE"); return 0 ; } void afficher_sur_un_ficher (FILE* ficher , int nb_bit ) { ficher = fopen("res.txt","a+"); fprintf (ficher ,"%d \t" , nb_bit); int static z ; z = z+1 ; if ( z%10 == 0) fprintf (ficher , "\n"); fclose(ficher); }

    Read the article

  • Django exclude(**kwargs) help

    - by shawnjan
    Hey guys/gals! I had a question for you, something that I can't seem to find the solution for... Basically, I have a model called Environment, and I am passing all of them to a view, and there are particular environments that I would like to exclude. Now, I know there is a exclude function on a queryset, but I can't seem to figure out how to use it for multiple options... For example, I tried this but it didn't work: kwargs = {"name": "env1", "name": "env2"} envs = Environment.objects.exclude( kwards ) But the only thing that it will exclude is the last "name" value in the list of kwargs. I understand why it does that now, but I still can't seem to exclude multiple objects with one command. Any help is much appreciated! Shawn

    Read the article

  • Resize a photo after being submitted with a form via PHP

    - by Benjamin
    I am working on a form that adds employee information to a MySQL table and I need to attach a single photo to the file. This is part of a Content Management System and the users do not know how to resize photos, so I need to resize the image to a set size after it is uploaded. How can this be done with PHP? Please note, I am not trying to accomplish a thumbnail image, simply scale the one that is uploaded.

    Read the article

  • Embed pdb into assembly

    - by Konstantin
    Hi! I want my application to be distributable as a single .exe file but I want to be able to get nice error reports with source code line numbers (the application simply sends email with exception.ToString() and some additional information when unhandled exception occurs). Is there any way to embed .pdb into assembly?

    Read the article

  • How to layer views

    - by Finer Recliner
    I have a custom-made view that extends the View class. I would like 2 instances of my custom view layered directly on top of each other. How should my layout file look to achieve this?

    Read the article

  • python pdb not breaking in files properly?

    - by YGA
    Hi Folks, I wish I could provide a simple sample case that occurs using standard library code, but unfortunately it only happens when using one of our in-house libraries that in turn is built on top of sql alchemy. Basically, the problem is that this break command: (Pdb) print sqlalchemy.engine.base.__file__ /prod/eggs/SQLAlchemy-0.5.5-py2.5.egg/sqlalchemy/engine/base.py (Pdb) break /prod/eggs/SQLAlchemy-0.5.5-py2.5.egg/sqlalchemy/engine/base.py:946 Is just being totally ignored, it seems, by pdb. As in, even though I am positive the code is being hit (both because I can see log messages, and because I've used sys.settrace to check which lines in which files are being hit), pdb is just not breaking there. I suspect that somehow the use of an egg is confusing pdb as to what files are being used (I can't reproduce the error if I use a non-egg'ed library, like pickle; there everything works fine). It's a shot in the dark, but has anyone come across this before? Thanks, /YGA

    Read the article

  • Why does TheyWorkForYou (TWFY) web API always returns '{}'

    - by Tartley
    I'm calling a web API exposed by TheyWorkForYou (TWFI). http://www.theyworkforyou.com/api/ I'm using the Python bindings provided by twfython: http://code.google.com/p/twfython/ I wrote some code to call this API a few months ago, at which time it worked fine. But now I dig it out to run it again, no matter what query I ask of the API, it always returns '{}' (an empty dictionary). For example the following code, which should return a list of all MPs: from twfy import TWFY API_KEY = 'XXXXXXXXXXXXXXXXXXXXXX' twfy = TWFY.TWFY(API_KEY) print twfy.api.getMPs(output='js') Am I being really dumb? What else should I check?

    Read the article

  • svn diff: file marked as binary type

    - by Charles Ma
    I'm doing an svn diff on one of my files and svn is detecting it as a binary type. The file is readable plain text and I would like to be able to get a diff of this file. How do I tell SVN that this is not a binary file? Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream

    Read the article

  • My Favorite New Features in Visual Studio 2010

    On Tuesday, April 13th, Microsoft released Visual Studio 2010 and the .NET Framework 4.0 (which includes ASP.NET 4.0). To get started with Visual Studio 2010 you can either download a trial version of one of the commercial editions or you can go grab the free Visual Web Developer 2010 Express Edition. The Visual Studio 2010 user experience is noticeably different than with previous versions. Some of the changes are cosmetic - gone is the decades-old red and orange color scheme, having been replaced with blues and purples - while others are more substantial. For instance, the Visual Studio 2010 shell was rewritten from the ground up to use Microsoft's Windows Presentation Foundation (WPF). In addition to an updated user experience, Visual Studio introduces an array of new features designed to improve developer productivity. There are new tools for searching for files, types, and class members; it's now easier than ever to use IntelliSense; the Toolbox can be searched using the keyboard; and you can use a single editor - Visual Studio 2010 - to work on . This article explores some of the new features in Visual Studio 2010. It is not meant to be an exhaustive list, but rather highlights those features that I, as an ASP.NET developer, find most useful in my line of work. Read on to learn more! Read More >

    Read the article

  • Can VMWare Server 2.0 be useful in Production for easing backups?

    - by Keith Sirmons
    Howdy, Let's run this idea by the group here. I am thinking about using VMWare Server in production to host a 2008 Domain Controller with DHCP and DNS, a 2008 member server with WSUS, some virus software, and other "management" utilities a second 2008 member server with SQL, IIS, and File Shares for a medium business of 50-100 desktops. The reason I am leaning toward Server vs ESXi is for backup purposes. Using ESXi, if I want to backup the VM's, I would need a second server in the office with enough storage availability to hold a copy of the vmdks. I am wondering if putting this virtual environment on top of a basic 2008 server install will allow for easier backups to both tape and/or to offsite storage using JungleDisk. Can a snapshot be triggered easily via a scheduled job? I know this doesn't necessarily handle file level restores, but I want to make sure in a DR situation, we can restore production servers quickly. Does this concept hold water? Would a very minimum install of the 2008 Host remove too many resources from the actual production machines? This would be a new Dell 410 server with 12 GB ram and (6) 600 GB 15K in a RAID 6, Dual Intel Xeon 2.26GHz procs.

    Read the article

  • IE GIF/PNG Transparency issue with jQuery

    - by Andrew
    Ok, this is pretty weird... Here's the page in question: http://s289116086.onlinehome.us/lawjournaltv/index.php The main blue callout background was originally a PNG, but when I applied some jQuery trickery to it (click the numbers in the top right to see what I mean), an ugly white border appeared where the transparency should be. See this screenshot from IE8: http://skitch.com/darkdriving/n62bu/windows-xp-professional I figured I could sacrifice the quality/flexibility of a PNG and just resaved each of the backgrounds as GIFs and set the matte color to white (for now). Well, I was proven wrong because IE is treating the GIF transparency the same as the original PNGs. I've read here that the issue with PNGs, Javascript, and IE has something to do with multiple filters can't be applied to one image, but shouldn't GIFs be exempt from this because they lack the Alpha Channel? Is there any way to make this page look similar in IE to Firefox or Webkit browsers? Thanks in advance!

    Read the article

  • Basic Objective-C syntax: "%@"?

    - by cksubs
    Hi, I'm working through the Stanford iPhone podcasts and have some basic questions. The first: why is there no easy string concatenation? (or am I just missing it?) I needed help with the NSLog below, and have no idea what it's currently doing (the %@ part). Do you just substitute those in wherever you need concatenation, and then comma separate the values at the end? NSString *path = @"~"; NSString *absolutePath = [path stringByExpandingTildeInPath]; NSLog(@"My home folder is at '%@'", absolutePath); whereas with any other programing language I'd have done it like this: NSLog(@"My home folder is at " + absolutePath); Thanks! (Additionally, any good guides/references for someone familiar with Java/C#/etc style syntax transitioning to Objective-C?)

    Read the article

  • Problems debugging virtual host with Netbeans

    - by WebDevHobo
    I'm running Ubuntu 9.10 I installed apache2 and downloaded the php 5.3.2 tar.gz, untarred and compiled. I then installed xdebug via pecl. After that I installed mysql-server and PhpMyAdmin. PhpMyAdmin can change apache2 settings, and now, xdebug is no longer included in my phpinfo(); overview. I've done a search for all possible php.ini files, but the 2 that I've found both link the xdebug.so file correctly. Yet still, Xdebug won't show. I have used and tested /etc/php5/php.ini and that worked, but it seems apache is now using a different php.ini file, and I don't know how to change that setting. Can anyone tell me how to bring it back to what it used to be? Also, installing apache, php and Xdebug was something I did by use of this video: http://vimeo.com/8005503

    Read the article

  • Python: some newbie questions on sys.stderr and using function as argument

    - by Cawas
    I'm just starting on Python and maybe I'm worrying too much too soon, but anyways... log = "/tmp/trefnoc.log" def logThis (text, display=""): msg = str(now.strftime("%Y-%m-%d %H:%M")) + " TREfNOC: " + text if display != None: print msg + display logfile = open(log, "a") logfile.write(msg + "\n") logfile.close() return msg def logThisAndExit (text, display=""): msg = logThis(text, display=None) sys.exit(msg + display) That is working, but I don't like how it looks. Is there a better way to write this (maybe with just 1 function) and is there any other thing I should be concerned under exiting? Now to some background... Sometimes I will call logThis just to log and display. Other times I want to call it and exit. Initially I was doing this: logThis ("ERROR. EXITING") sys.exit() Then I figured that wouldn't properly set the stderr, thus the current code shown on the top. My first idea was actually passing "sys.exit" as an argument, and defining just logThis ("ERROR. EXITING", call=sys.exit) defined as following (showing just the relevant differenced part): def logThis (text, display="", call=print): msg = str(now.strftime("%Y-%m-%d %H:%M")) + " TREfNOC: " + text call msg + display But that obviously didn't work. I think Python doesn't store functions inside variables. I couldn't (quickly) find anywhere if Python can have variables taking functions or not! Maybe using an eval function? I really always try to avoid them, tho. Sure I thought of using if instead of another def, but that wouldn't be any better or worst. Anyway, any thoughts?

    Read the article

  • How To Draw More Precise Lines using Core Graphics and CALayer

    - by user308444
    Hello I am having a hard time making this UI element look the way I want (see screenshot). Notice the image on the right--how the line width and darkness looks inconsistent compared to the image on the left (which happens to be a screen grab from safari) where the border width is more consistent. How does apple make their lines so perfect? I'm using a CALayer and the Core Graphics API to draw the image on the right. Is it possible to draw such perfect lines with the standard apis?

    Read the article

  • Having trouble with instantiating objects in PHP & Ajax custom shopping cart

    - by Phil
    This is my first time playing with both ajax and objects, so please go easy on me I have 3 pages that make up the tester shopping cart. 1) page with 'add' 'remove' buttons and ajax code to call the PHP functions on page 2. this is the actual user page with the HTML output. 2) page with PHP cart function calls, receives $_GET requests from ajax on page 1 and calls functions of the cart object from page 3, returns results to page 1. 3) page with cart object definition. Here's the problem I believe I'm having. Currently I have 'session_start()' on pgs 1 & 2, and the cart definition (pag 3) on pgs 1 & 2. I only define '$_SESSION[cart]= new Cart' on page 2. However, it seems like each time i hit an ajax function (eg each time pg 2 reloads) it seems like it's rewriting $_SESSION['cart'] over again, thus it's always empty at each new click (even tho it displays results of that click) However, if i don't define '$_SESSION[cart] = new Cart' on pg 2, i get an error: Fatal error: main() [function.main]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "Cart" of the object you are trying to operate on was loaded before unserialize() gets called or provide a __autoload() function to load the class definition in /home3/foundloc/public_html/booka/carti.php on line 17 Any suggestions? How can i stop re-creating my cart each time my page 2 (php cart function page) is called by ajax?

    Read the article

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