Samtal väntar hos Tele2

Jag vill kunna se att det ringer även om jag pratar i telefon. Av oklar anledning har Tele2 avaktiverat den funktionen men följande kod ska i alla fall aktivera “samtal väntar”/knackning när man är upptagen och någon ringer:

*43# lur

Jag vet inte om man behöver ringa till Tele2:s kundtjänst och faktiskt ha den tjänsten i sitt mobilabonnemang, tidigare har det gått att aktivera det enbart med hjälp av koder. Telefonsvararen/mobilsvar kan man läsa om här.

Mac OS X Lion and Time Machine backup error -1 [SOLVED]

By the installation of Mac OS X Lion my Time Machine backups started to fail. The backup disk is often not found and results in error code -1. I get the error message “The backup disk image could not be accessed (error -1).” I found that by turning the automatic backups off, bringing the computer in sleep mode to a location out of the WiFi range and then bringing it back, reactivating the backups, it often works. This problem seems to reoccur after each restart, though.

Edit: Updating the firmware in the Airport Utility seems to have fixed the issue.

Edit 2: Updating the firmware did not resolve the issue after restarting, got the same -1 error. But this time I set up the Time Capsule from scratch (didn’t erase any backups) through AirPort utility and now it works after restarting. Problem solved, finally!

Drag and select in ActionScript 3

Found this piece of code over at Kirupa that explains how to do a drag-and-select implementation in ActionScript 3.0:

import flash.geom.*;

var drawingBox:Sprite;/*resized sprite that acts as a selector*/
var stageObjects:Array = createRandomObjects(20);/*array of stage objects that might be selected*/

var mouseStart:Point;

/*drawing properties of drawingBox*/
var stroke:GraphicsStroke = new GraphicsStroke();
	stroke.thickness=1;
    stroke.fill = new GraphicsSolidFill(0x333399, .5);
var fill:GraphicsSolidFill = new GraphicsSolidFill(0x444444,.5);
var graph:Vector.<IGraphicsData>;
var path:GraphicsPath;

stage.addEventListener(MouseEvent.MOUSE_DOWN,MD,false,0,true);/*start drawing box*/
stage.addEventListener(MouseEvent.MOUSE_UP,MU,false,0,true);/*select objects*/

function createRandomObjects(n:int):Array
{
	var a:Array=new Array();
	for(var i:int=0;i<n;i++)
	{
		var s:Sprite = new Sprite;
		s.graphics.beginFill(Math.random()*0xFFFFFF);
		s.graphics.drawRect(0,0,20,20);
		s.x=Math.random()*stage.stageWidth;
		s.y=Math.random()*stage.stageHeight;
		s.alpha=.5;
		s.name = String(i);
		a.push(s);
		addChild(s);
	}
	return(a);
}

function MD(e:MouseEvent):void
/*MOUSE DOWN - start drawing square*/
{
	// removes previous one
	if(drawingBox!=null)drawingBox.parent.removeChild(drawingBox);
	drawingBox=new Sprite;
	addChild(drawingBox);
	mouseStart=new Point(mouseX,mouseY);
	addEventListener(Event.ENTER_FRAME, EF,false,0,true);

	for(var i:int=0; i<stageObjects.length; i++)
	{
		stageObjects[i].alpha=.5;
		stageObjects[i].rotation=0;
	}
}

function MU(e:MouseEvent):void
/*MOUSE UP - remove square and hit test everything under it*/
{
	removeEventListener(Event.ENTER_FRAME, EF,false);
trace('Selected objects are:');
	/*run a hit test for drawingBox against stageObjects*/
	for(var i:int=0; i<stageObjects.length; i++)
	{
		if(drawingBox.hitTestObject(stageObjects[i]))
		{
			stageObjects[i].alpha=1;
			stageObjects[i].rotation=45;
trace('Hit ' + stageObjects[i].name);
		}
	}
	drawingBox.graphics.clear();
}

function EF(e:Event):void
/*ENTER FRAME - redraws the selction box based on mouse pointer location every frame*/
{
	drawingBox.graphics.clear();
	path = RR(mouseStart.x,mouseStart.y,mouseX,mouseY);
	graph = new Vector.<IGraphicsData>();
	stroke.fill = new GraphicsSolidFill(0xFF0000,1);
	graph.push(stroke, fill, path);
	drawingBox.graphics.drawGraphicsData(graph);
}

function RR(sx:Number, sy:Number, ex:Number, ey:Number):GraphicsPath
/*RETURN RECTANGLE - returns a Graphics path for a rectangle*/
{
	var p:GraphicsPath=new GraphicsPath;
	p.moveTo(sx,sy);
	p.lineTo(ex,sy);
	p.lineTo(ex,ey);
	p.lineTo(sx,ey);
	p.lineTo(sx,sy);
	return(p);
}