Pin this program to taskbar option missing

Posted by Administrator (admin) in ICT | Tagged , , | Leave a comment

In windows 7 you can pin your favorite programs to the taskbar for quick access. But some programs are missing the “Pin this program to the taskbar” option in the context menu when you right-click the icon in the taskbar.

There are two reason I found out about that could cause this behavior:

  1. Programs that are located on a remote location, for instance programs on a server share, cannot be pinned. Programs stored locally can be pinned.
  2. Some words in the name of a program may prevent pinning. These words can be found in a registry key at:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileAssociation\AddRemoveNames

In a default environment the key contains:

  • Documentation
  • Help
  • Install
  • More Info
  • Readme
  • Read me
  • Read First
  • Setup
  • Support
  • What’s New
  • Remove

Dr. Tom’s Workshop: How Table Variables Can Speed Up Your Queries

Posted by Erwin Wester in Geen categorie | Leave a comment

Tom Moreau

Link to original article: http://msdn.microsoft.com/en-us/library/aa175774(v=sql.80).aspx

For years, you’ve seen Tom Moreau solve many T-SQL problems, eschewing such ugly approaches as temp tables, their table variable cousins, and–worse yet–cursors. This month, Tom makes a concession, showing that the exception proves the rule. Along the way, he shows you how to create what amounts to an index on a table variable. Very cool.

As you know, I enjoy receiving e-mail from you, particularly when you provide me with a challenging T-SQL problem or one that makes me dig in and learn something new. This month’s “best question” award comes from UK-based Dr. Graham Smith.

	Graham has a table that looks and feels a lot like the Orders table in Northwind, so we’ll use it for our discussion. Graham needs to build a stored proc that takes the EmployeeID as an input parameter and returns a rowset with the OrderID, RequiredDate, and ShippedDate of all orders for that EmployeeID. However, the orders need to be sorted by RequiredDate–and he also needs to generate a sequence number. Graham tried using a SELECT INTO in conjunction with an IDENTITY column, but that approach errored out, since the OrderID itself is also an IDENTITY, and you can’t have two identities in the same table. More about that later.

	Doing running counts or running totals via a correlated subquery in the SELECT list is fairly straightforward in T-SQL, as I’ve shown in a number of columns, so let’s start there. Take a look at Listing 1and Table 1.

Listing 1. Using a correlated subquery to generate sequence numbers.

select o1.OrderID, (select count (*) from Orders o2 where (o2.RequiredDate < o1.RequiredDate or (o2.RequiredDate = o1.RequiredDate and o2.OrderID <= o1.OrderID)) and o2.EmployeeID = 9) as SequenceNo, o1.RequiredDate, o1.ShippedDate from Orders o1 where o1.EmployeeID = 9 order by o1.RequiredDate 

Table 1. Results of Listing 1.

OrderID

SequenceNo

RequiredDate ShippedDate
10255 1 1996-08-09 00:00:00.000 1996-07-15 00:00:00.000
10263 2 1996-08-20 00:00:00.000 1996-07-31 00:00:00.000
10324 3 1996-11-05 00:00:00.000 1996-10-10 00:00:00.000
10331 4 1996-11-27 00:00:00.000 1996-10-21 00:00:00.000
10386 5 1997-01-01 00:00:00.000 1996-12-25 00:00:00.000
…

&#9;This does a scan count of 44–once through the table to pick up the rows for EmployeeID 9, and then 43 more times to calculate the sequence number, once for every row in the result set. But it gets worse: 4,007 logical reads. Wouldn’t it be nice to ease the burden on the Orders table somewhat?

&#9;If you had many orders and many employees, then the percentage of orders for a given employee would be quite low. With an index on EmployeeID, you should be able to get the rows you need for your result set fairly quickly. It’s the sequence number thing that’s dragging us down.

&#9;Longtime subscribers know that I’m not a huge fan of temp tables, but let me clarify my position: I only don’t like them when they’re not necessary. They do, however, earn their keep when your query has to do the same thing more than once. In those cases, it’s better to take the hit once and just refer to your–much smaller–temp table as many times as you need. One more thing–SQL Server 2000 allows you to use table variables, and they have proven in many cases to outperform your basic temp table. [BOL points out that table variables, which behave like local variables, offer several advantages: They have well-defined scopes, they're cleaned up automatically at the end of the function, stored proc, or batch in which they're defined, and they tend to result in fewer recompilations and less locking in stored procs and transactions where they're used.–Ed.]

&#9;Listing 2 shows you an alternative solution, using a table variable. It gets populated with the required rows and columns (sans sequence number). The correlated subquery then gets applied to it. Check out the code.

Listing 2. Using a table variable.

declare @t table (OrderID int primary key, RequiredDate datetime not null, ShippedDate datetime null) insert @t select o1.OrderID, o1.RequiredDate, o1.ShippedDate from Orders o1 where o1.EmployeeID = 9 select o1.OrderID, (select count (*) from @t o2 where (o2.RequiredDate < o1.RequiredDate or (o2.RequiredDate = o1.RequiredDate and o2.OrderID <= o1.OrderID))) as SequenceNo, o1.RequiredDate, o1.ShippedDate from @t o1 order by o1.RequiredDate 

&#9;The INSERT made 99 logical reads against Orders, with a scan count of just one, but it also caused 88 logical reads against the table variable @t. And it didn’t even return a result set, so there’s still more work to do. If we do a SELECT (which gives you a scan count of 44–no surprises there), it costs us 88 logical reads. Thus, the total number of logical reads is 99 + 88 = 187, way lower than the original query in Listing 1. Not only that, but the query cost went from 0.145 down to 0.1117. Looks like a win-win.

&#9;You know me well enough by now to know that after that bit of work, I wouldn’t just raise the flag of victory, grab a cold one, and look for the remote. Let’s think about that table variable. The correlated subquery looks at RequiredDate and OrderID, so it would be very cool if we could add an index to that table variable. Although you can’t do a CREATE INDEX against a table variable, you can have an index created behind the scenes when you declare the table variable with a PRIMARY KEY constraint (the same goes for UNIQUE constraints). Since a table can have at most one PRIMARY KEY constraint, any other index you add has to be done through a UNIQUE constraint. As its name implies, the combination of columns that make up the UNIQUE constraint’s key must be unique. So, any combinations of columns that also include the PRIMARY KEY constraint’s columns are de facto unique, too. Since we need an index on RequiredDate and OrderID–in order to get index coverage for the inner part of the subquery–adding a UNIQUE constraint on (RequiredDate, OrderID) does the trick.

&#9;This doesn’t just help with respect to the instance of @t (o2) used inside the subquery, it also helps with the instance (o1) outside the subquery. The subquery can tap the UNIQUE constraint twice and then do a Bookmark Lookup to pick up the remaining columns for o1. Listing 3 shows the revised DECLARE for @t. (The SELECT is the same as Listing 2 and isn’t shown.)

Listing 3. Adding a UNIQUE constraint.

declare @t table (OrderID int primary key, RequiredDate datetime not null, ShippedDate datetime null, unique (RequiredDate, OrderID)) 

&#9;Populating this version of table variable @t yields the same scan count and logical reads as before. However, the logical reads jump up to 132 for @t, since it has to populate not only the clustered index on the PRIMARY KEY constraint, but also the nonclustered index on the UNIQUE constraint. The final SELECT yielded a scan count of 87, with 173 logical reads. That looks like bad news. However, the query cost of Listing 3 dropped to 0.0693, suggesting that the saving was in CPU.

&#9;We’re not done yet. By default, PRIMARY KEY constraints are clustered, while UNIQUE are nonclustered. What would happen if we explicitly made the PRIMARY KEY nonclustered and the UNIQUE constraint clustered? See Listing 4.

Listing 4. Clustering on the UNIQUE constraint.

declare @t table (OrderID int primary key nonclustered, RequiredDate datetime not null, ShippedDate datetime null, unique clustered (RequiredDate, OrderID)) 

&#9;This time, you get one more logical read and a very slight drop in query cost to 0.0693. Of course, I decided to time the solutions and see who the real winner would be–see Table 2.

Table 2. Query durations (ms) and relative query cost (percent).

Duration Std Dev Relative Query Cost
Listing 1 65 12 36.79
Listing 2 18 14 28.22
Listing 3 18 14 17.51
Listing 4 21 23 17.48

&#9;Each test ran over 100 iterations, purging the data cache via DBCC DROPCLEANBUFFERS each time. All three table variable solutions were 3X faster than the original query. Indeed, the average durations rivaled their own standard deviations. It appears that clustering on the UNIQUE constraint cost a bit relative to the other two table variable techniques.

&#9;Let’s get back to Graham’s original error. He wanted to do a SELECT INTO and got blindsided by the apparent double identities and didn’t really want OrderID to remain an identity in his temp table anyway. Listing 5 shows how to counteract that problem by using CAST().

Listing 5. Eliminating the identity property in a SELECT INTO.

select cast (o1.OrderID as int) OrderID, identity (int, 1, 1) as SequenceNo, o1.RequiredDate, o1.ShippedDate into #t from Orders o1 where o1.EmployeeID = 9 

&#9;A word of caution, though: There’s no guarantee that the IDENTITY() function will coordinate with the other columns–even if you specify an ORDER BY. Therefore, this isn’t a reliable solution to Graham’s problem. See KB 273586, “INF: How the IDENTITY Function Behaves When It Is Used in SELECT INTO Queries That Have an ORDER BY Clause and a TOP Operator or a SET ROWCOUNT Statement,” for the details.

&#9;With SQL Server 2005 coming up on the horizon, I’d be remiss if I didn’t let you in on a new T-SQL feature that would make this type of problem far less work for you, the coder. Check out Listing 6–and make sure you’re sitting down.

Listing 6. Using the ROW_NUMBER() function in SQL Server 2005.

select o1.OrderID, row_number () over (order by o1.RequiredDate) as SequenceNo, o1.RequiredDate, o1.ShippedDate from Orders o1 where o1.EmployeeID = 9 order by o1.RequiredDate 

&#9;How long have you been waiting for that one, eh? You’ll also find that it will outperform all of the approaches you saw earlier.

&#9;Let me conclude by saying that, although this was a fun exercise, sequence numbers really belong in the client code–specifically, the presentation layer. Doing the work there takes the load off of SQL Server and spreads it over hundreds, thousands, or perhaps even millions of machines–and that’s the way it ought to be. Thanks for this one, Graham. Now, I think I’ll look for that remote. See you next month.

Download 502TOM.SQL

Tom Moreau, B.Sc., Ph.D., MCSE, and MCDBA, is an independent consultant specializing in Microsoft SQL Server database administration, design, and implementation and is based in the Toronto area. Tom’s a SQL Server MVP and co-author—with fellow MVP Itzik Ben-Gan—of Advanced Transact-SQL for SQL Server 2000. tom@cips.ca.

To find out more about SQL Server Professional and Pinnacle Publishing, visit their Web site at http://www.pinpub.com/

Note: This is not a Microsoft Corporation Web site. Microsoft is not responsible for its content.

This article is reproduced from the February 2005 issue of SQL Server Professional. Copyright 2005, by Pinnacle Publishing, Inc., unless otherwise noted. All rights are reserved. SQL Server Professional is an independently produced publication of Pinnacle Publishing, Inc. No part of this article may be used or reproduced in any fashion (except in brief quotations used in critical articles and reviews) without prior consent of Pinnacle Publishing, Inc. To contact Pinnacle Publishing, Inc., please call 1-800-788-1900.

http://www.random.org/

Posted by Erwin Wester in ICT | 1 Comment

What’s this fuss about true randomness?

Perhaps you have wondered how predictable machines like computers can generate randomness. In reality, most random numbers used in computer programs are pseudo-random, which means they are a generated in a predictable fashion using a mathematical formula. This is fine for many purposes, but it may not be random in the way you expect if you’re used to dice rolls and lottery drawings.

RANDOM.ORG offers true random numbers to anyone on the Internet. The randomness comes from atmospheric noise, which for many purposes is better than the pseudo-random number algorithms typically used in computer programs. People use RANDOM.ORG for holding drawings, lotteries and sweepstakes, to drive games and gambling sites, for scientific applications and for art and music. The service has existed since 1998 and was built and is being operated by Mads Haahr of the School of Computer Science and Statistics at Trinity College, Dublin in Ireland.

As of today, RANDOM.ORG has generated 1,096 billion random bits for the Internet community.

The hot chocolate effect

Posted by Erwin Wester in Personal | Tagged | 1 Comment

Hot chocolate effect – Wikipedia, the free encyclopedia

The Hot Chocolate Effect also known as the Allassonic Effect is a phenomenon of wave mechanics first documented in 1982 by Frank Crawford, where the pitch heard from tapping a cup of hot liquid rises after the addition of a soluble powder. It typically arises in the making of hot chocolate or instant coffee, but also occurs in other situations such as adding salt to supersaturated hot water or cold beer.

It can be observed by pouring hot milk into a mug, stirring in chocolate powder, and tapping the bottom of the mug with a spoon while the milk is still in motion. The pitch of the taps will increase progressively with no relation to the speed or force of tapping. Subsequent stirring will gradually decrease the pitch again.

The phenomenon is explained by the effect of bubble density on the speed of sound in the liquid. The note heard is the frequency of a standing wave where a quarter wavelength is the distance between the base of the mug and the liquid surface.

This frequency f is equal to the speed v of the wave divided by four times the height of the water column h:

<br />
f = 0.25\frac{v}{h}<br />

Upon initial stirring, entrained gas bubbles reduce the speed of sound in the liquid, lowering the frequency. As the bubbles clear, sound travels faster in the liquid and the frequency increases.

Oh, no. My TortoiseSVN icon overlays are missing

Posted by Erwin Wester in ICT | Tagged , | Leave a comment

Oh, no. My TortoiseSVN overlays are missing

It’s a matter of time. Good were the days when almost no application knew how to put overlays on your file icons in Explorer. These days it seems this is the coolest thing ever and virtually all file system type of utilities want to add their own.

Sooner or later you will install some utility and not notice anything different. But after the next reboot, poof, your TortoiseSVN overlays are gone. And, depending on how much time elapsed between the utility installation and that reboot, you may not have the slightest clue of what happened. Reinstalling TSVN won’t fix it

TFS Power tools, Dropbox, Mozy, stop breaking my TSVN overlays

I should not blame these applications for a Windows shell limitation. To be fair, TSVN is the greater offender of them all.

It seems that the shell only supports 15 different icon overlays and TSVN creates 9 of those. After 15 the shell starts ignoring the extra ones. The trick is that Windows chooses the first 15 alphabetically from their entries in the system registry.

I love simple fixes

The fix is rather obvious; just make sure the overlays you want to be active are registered alphabetically before the ones you can live without.

Open the registry editor and go to HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers and look at all the child keys in there. It will be obvious that, if you want to preserve the TSVN overlays like me, you need to keep the ones starting with Tortoise* before the other ones.

If you look at the image below you’ll see that I changed my entries by prefixing the undesirable ones with z_, following someone else’s suggestion.

After that change you just need to kill and restart explorer.exe using Task Manager (or logoff or reboot the machine depending on your tolerance to pain.)

I believe this is a common problem so I hope this tip helps somebody.

via Oh, no. My TortoiseSVN overlays are missing – Sergio Pereira – Devlicio.us – Just the Tasty Bits.

Windows 8 is de toekomst van de pc

Posted by Erwin Wester in ICT | Tagged , | Leave a comment

15 februari 2010 door: Jelle Wijkstra

Windows 8 wordt een totaal nieuw platform dat het denken over pc’s en de manier waarop we die gebruiken totaal zal veranderen. Dat stelde althans een enthousiaste Microsoft-medewerker in een blog, die vervolgens spoorslags offline werd gehaald.

“Men kan er minimaal op rekenen dat de volgende versie iets totaal anders wordt dan wat men gewoonlijk van Windows verwacht. Ik ben gewoon onder de indruk van het proces dat Steven [ Steven Sinofsky, het hoofd van de Windows en Windows Live divisie - red.] heeft opgezet om de eisen en wensen van onze klanten te inventariseren en om een team samen te stellen dat kan zorgen dat het ook gerealiseerd wordt”, schreef een ongeïdentificeerde medewerker van Microsofts helpdesk.

Volgens de medewerker zijn tientallen teams uit alle verschillende divisies van Microsoft betrokken bij het denkproces over wat hij aanduidt als Windows.next: “De thema’s die over tafel gaan zijn vormen daadwerkelijk een afspiegeling van waar mensen al jaren naar op zoek zijn, en zullen de manier veranderen waarop mensen denken over pc’s en waarop ze deze gebruiken. Dit is de toekomst van de pc.”

Ondanks de enthousiaste toonzetting en het ontbreken van details was Sinofsky kennelijk niet gecharmeerd van de ontboezemingen. De blog is namelijk verwijderd van het Microsoft Developers Network, waar hij oorspronkelijk gepubliceerd werd, nadat de site Activewin erover publiceerde.

Microsoft heeft nog niets losgelaten over Windows 8. Uit blogs en personeelsadvertenties is wel duidelijk dat er een 128-bitsversie komt, dat er een nieuw beheersraamwerk voor de serverversie komt voor IT-professionals, en dat Microsoft kijkt naar de robuustheid van applicaties en het updaten van applicaties van derden en virtuele machines. Het ontwikkelwerk zou van de zomer moeten starten; Windows 8 zou dan volgens de planning in 2012 uit moeten komen.

via ‘Windows 8 is de toekomst van de pc’ – Software – Automatisering Gids Technologie pagina’s – Automatisering Gids.

Windows 8 heeft nieuwe bootprocedure

Posted by Erwin Wester in ICT | Tagged , | Leave a comment

21 september 2011 door: Thijs Doorenbosch

Een opvallende functionaliteit van Windows 8  is de snelle opstart. Maar de interactie met de Unified Extensible Firmware Interface (UEFI), de opvolger van BIOS, is ook ingrijpend veranderd.

De meeste hardware die nu op de markt komt maakt gebruik van de UEF interface om de instellingen van de onderliggende hardware te kunnen communiceren. Billie Sue Chafins, bij Microsoft specialist in gebruikersinterfaces, legt in een blog uit hoe in Windows 8 de ervaring bij het gebruik van de UEFI is aangepast.

De belangrijkste wijziging is dat voor de interactie met de UEFI geen fysiek toetsenbord en muis meer nodig is. Nu er steeds meer computers op de markt komen die volledig met het aanraakscherm worden bediend, zou het onzinnig zijn dat eindgebruikers een toetsenbord moeten aanschaffen om de machine te herstellen van een fout. De UEFI heeft via het Grafische Outlook Protocol (GOP) nu ook een grafische interface.

Virtueel toetsenbord direct beschikbaar

Ook in het normale opstartproces bij het configureren is interactie met de UEF interface nodig. Wanneer Windows 8 is voorgeïnstalleerd kunnen bij het eerste gebruik van de computer ook de ‘product key’ en andere instellingen met het virtuele toetsenbord worden ingevoerd.

Bij een standaard bootprocedure komen de verschillende fasen van het opstartproces niet meer op het scherm. Vanaf het moment van het inschakelen van de stroom verschijnt het logo van de fabrikant van de machine en dat blijft zichtbaar tot de Metro-interface verschijnt. Dat proces neemt zo’n 7 seconden in beslag op de snelste machines met SSD-geheugen tot een tiental seconden op oudere machines. Ook bij dual-bootsystemen vindt de interactie met de gebruiker plaats door middel van een grafische interface.

Oude BIOS doet het ook nog

Windows 8 ondersteunt overigens ook nog de oude BIOS-interface op minder recente machines, maar daarin komen de verbeteringen niet zo goed uit de verf.

via Windows 8 heeft nieuwe bootprocedure – Software – Automatisering Gids Technologie pagina’s – Automatisering Gids.

Google helpt HTC in rechtszaak tegen Apple

Posted by Erwin Wester in ICT | Tagged , , , | Leave a comment

Google helpt HTC in rechtszaak tegen Apple

Techzine – ICT Nieuws – Business – De community voor ICT liefhebbers en professionals
Tweet Donderdag 8 september 2011 13:25 door Coen van Eenbergen

 De juridische strijd tussen HTC en Apple is flink uitgebreid, Google heeft namelijk besloten zich ermee te gaan bemoeien en dat lijk slecht nieuws te zijn voor Apple. Google heeft 9 patenten doorverkocht aan HTC waar Apple inbreuk op zou maken. Hierdoor staat HTC nu een heel stuk sterker tegenover Apple.

Google heeft op 1 september in totaal 9 patenten verkocht aan HTC waarmee het Apple om de oren kan slaan. HTC heeft momenteel twee rechtszaken lopen tegen Apple die nu zijn uitgebreid met 5 van deze patenten. Het gaat om de rechtszaak bij de International Trade Commission (ITC) en de rechtbank in Delaware. Ook heeft HTC ervoor gekozen een nieuwe zaak te openen bij de rechtbank in Delaware, in deze zaak wordt Apple beschuldigd van patentschending in iOS-apparaten maar ook in de Mac-computers, hiervoor zijn de overige 4 patenten ingezet die zijn overgenomen van Google.

Als we gaan kijken naar de patenten die Apple zou schenden dan vallen er een aantal op. Zoals het draadloos kunnen upgraden van software, zogenaamde over-the-air updates, iets wat Apple voornemens is in te voeren vanaf iOS 5. Dan is er ook nog een patent dat gaat over de communicatie tussen de interne antenne en het besturingssysteem van de smartphone en een patent dat gaat over de reactie van een statusbalk binnen een grafische omgeving. Deze drie zijn in onze optiek de drie belangrijkste die HTC nu heeft ingezet tegen Apple. Als een rechter van mening is dat Apple op een van deze drie patenten inbreuk maakt kan dat grote gevolgen hebben. Uiteraard zijn er nog meer patenten die meespelen in de rechtszaak voor een compleet overzicht zie Fosspatents.com.

Het moge duidelijk zijn dat de juridische strijd in de mobiele markt steeds serieuzere vormen begint aan te nemen en de grote vraag is waar het zal eindigen. Begin december doet een rechter van het ITC een uitspraak of er HTC-toestellen worden verboden in de Verenigde Staten naar aanleiding van een rechtszaak die Apple heeft aangespannen. HTC lijkt er niet erg sterk voor te staan, wellicht dat Google daarom heeft besloten HTC te helpen.

De serie patenten die Google heeft doorverkocht aan HTC maken geen onderdeel uit van de overname van Motorola. Deze is overname is namelijk nog niet voltooid, waardoor Google officieel nog geen eigenaar is. Het gaat om eerder overgenomen patenten van ondermeer Motorola, Palm en OpenWave systems. Sommige patenten zijn inmiddels al 5 of 6 keer doorverkocht.

De grote vraag is nu hoe Apple gaat reageren op de hulp van Google aan HTC. Uiteindelijk zijn al deze rechtszaken terug te herleiden naar één onderwerp; het Android besturingssysteem dat flinke concurrentie biedt aan Apple’s eigen iOS. Apple zou ervoor kunnen kiezen om nu eindelijk Google voor de rechter te dagen en niet alle fabrikanten aan te blijven klagen. In elk geval moet Apple nu gaan uitkijken want doordat het bedrijf zo actief de rechtbank is gaan opzoeken heeft het weinig vrienden gemaakt, wat uiteindelijk weleens negatief kan uitpakken.

via Google helpt HTC in rechtszaak tegen Apple – Techzine – ICT Nieuws – Business – De community voor ICT liefhebbers en professionals.

WordPress geïnstalleerd

Posted by Administrator (admin) in Personal | 2 Comments

Ziet er goed uit…!
Het was zo gepiept… ik vermoed dat het customizen wat langer zal duren…