Le Kevin dot com

photographic-poetic-musical horizon

Browsing Posts published by Le Kevin

1. Stop IIS service

 iisreset /stop

2. Stop Sql server reporting services(MSSQLSERVER)

  1. Right click on My Computer
  2. Select Manage
  3. Double click Services and Applications
  4. Then double click Services
  5. Right click on "Sql server reporting services(MSSQLSERVER)"
  6. Select Stop (or set it to manual start)
Use DatabaseName
ALTER DATABASE DatabaseName SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
ALTER DATABASE DatabaseName SET MULTI_USER
GO

Ba mươi năm nét đẹp kiêu sa, trong nhưng tà áo dài, áo tắm, đã mang đến cuộc thi Hoa Hậu Việt Nam Quốc Tế (Miss VNC), lần đâu tiên, một trương trình thật ngoạn mục.

_KLE7971
_KLE8214
_KLE7389
_KLE7417
_KLE8112
_KLE7595
_KLE7373
_KLE8110
_KLE8220
_KLE7483
_KLE7823
_KLE8063
_KLE7397
_KLE8240
_KLE7813
_KLE7605
_KLE7431
_KLE8055
_KLE7679
_KLE7403
_KLE7898
_KLE8068
_KLE7308
_KLE8143
_KLE7728
_KLE8268
_KLE8013
_KLE7765
_KLE7441
_KLE7498
_KLE7693
_KLE8236
_KLE7393
_KLE8276
_KLE7454
_KLE8019
_KLE7688
_KLE7703
_KLE7943
_KLE7643
_KLE7917
_KLE7786
_KLE7449
_KLE7352
_KLE8119
_KLE8225
_KLE7660
_KLE7724
_KLE7954
_KLE8284
_KLE7655
_KLE7628
_KLE7317
_KLE7684
_KLE7778

USE [master]
GO

/****** Object:  StoredProcedure [dbo].[spShrinkAllDatabases]    Script Date: 08/12/2011 15:40:15 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:             Dan Sutton
-- Create date: 06/14/2011
-- Description:      Reindex all tables and shrink Logs and Data Files in Server
-- =============================================
CREATE PROCEDURE [dbo].[spShrinkAllDatabases]
AS
BEGIN
       SET NOCOUNT ON;
  DECLARE @dbname VARCHAR(50)
  DECLARE @logname VARCHAR(50)
  DECLARE @sql VARCHAR(2000)
  DECLARE @TableName varchar(255)

  DECLARE cDB CURSOR FOR SELECT name FROM sys.databases
  OPEN cDB
  FETCH NEXT FROM cDB INTO @dbname
  WHILE @@FETCH_STATUS=0
    BEGIN
      PRINT ('Shrinking Database '+@dbname+' ...')
      BEGIN TRY
        EXEC ('ALTER DATABASE ['+@dbname+'] SET RECOVERY SIMPLE')
        DECLARE cLog CURSOR FOR SELECT name FROM sys.database_files WHERE type_desc='LOG'
        OPEN cLog
        FETCH NEXT FROM cLog INTO @logname
        WHILE @@FETCH_STATUS=0
          BEGIN
            BEGIN TRY
              DBCC SHRINKFILE (@logname,0)
            END TRY BEGIN CATCH END CATCH
            FETCH NEXT FROM cLog INTO @logname
          END
        CLOSE cLog
        DEALLOCATE cLog
        DBCC SHRINKDATABASE (@dbname, TRUNCATEONLY)
      END TRY
      BEGIN CATCH
        PRINT ('- Shrink Failed')
      END CATCH
      BEGIN TRY
        EXEC ('ALTER DATABASE ['+@dbname+'] SET RECOVERY FULL')
      END TRY BEGIN CATCH END CATCH

      -- Now rebuild all the indexes in the database
      create table #temp_reindex(TableName varchar(255))
      EXEC ('INSERT INTO #temp_reindex'
        +' SELECT ''['+@dbname+'].[''+OBJECT_SCHEMA_NAME([OBJECT_ID],DB_ID('''+@dbname+'''))+''].[''+name+'']'''
        +' FROM ['+@dbname+'].sys.tables')
      DECLARE tb CURSOR LOCAL FOR SELECT TableName from #temp_reindex
      OPEN tb
      FETCH NEXT FROM tb INTO @TableName
      WHILE @@FETCH_STATUS=0
        BEGIN
          PRINT ('Rebuilding Indexes for '+@TableName+' ...')
          BEGIN TRY
            EXEC ('ALTER INDEX ALL ON '+@TableName+' REBUILD WITH (FILLFACTOR=80)')
          END TRY
          BEGIN CATCH
            PRINT ('- Reindex Failed')
          END CATCH
          FETCH NEXT FROM tb INTO @TableName
        END
      CLOSE tb
      DEALLOCATE tb
      DROP TABLE #temp_reindex

      FETCH NEXT FROM cDB INTO @dbname
    END
  CLOSE cDB
  DEALLOCATE cDB
END    

GO

Apple’s AirPlay can be used to stream your iTunes media library from your PC or Mac to your iPhone, iPod or iPad as well as a wide range of supported hardware such as speakers and AV receivers. Shairport is a related, free tool that can be used to stream media files from your iOS device to your Windows computer.

While a Windows based computer can be used as a media broadcaster, but it cannot be used as a receiver. This is something that Shairport rectifies – all that is required is that Apple’s Bonjour service is installed and that you have some media files that you would like to stream.

Getting Shairport up and running is an incredibly simple process. Launch the program and enter a name for the access point you are creating and enter a password if you would like to add a layer of security. All that is then needed is for a device with an iTunes library to log onto the same network as your computer.

This can be another PC, a Mac or a device running iOS – you just need to ensure that you are using a version of iTunes or iOS that supports AirPlay. You can then fire up your iTunes library and opt to broadcast it to your access point, making it possible to enjoy your music collection anywhere in the home.

Download Shairport4w here…

Note: Shairport4w is based on Shairport by James Laird.

ShairPort 0.05 released
My girlfriend moved house, and her Airport Express no longer made it with her wireless access point. I figured it’d be easy to find an ApEx emulator – there are several open source apps out there to play to them. However, I was disappointed to find that Apple used a public-key crypto scheme, and there’s a private key hiding inside the ApEx. So I took it apart (I still have scars from opening the glued case!), dumped the ROM, and reverse engineered the keys out of it.

Download Prepared CA Tax July 1, 2011 here…

Statewide Base Tax Rate Decreases from 8.25% to 7.25%

Effective July 1, 2011, the one percent sales and use tax rate increase that was approved with the state budget and effective April 1, 2009, will expire lowering the statewide base tax rate from 8.25 percent to 7.25 percent. In areas where there are voter-approved district taxes, the total tax rate related to sales and purchases will be the statewide base tax rate of 7.25 percent plus the applicable district tax. (See the California Sales and Use Tax Rates by County and City or the table below.)

For More Information

Please note, if legislative action occurs which results in an extension of the 8.25% statewide base tax rate, updated tax rate information will be immediately available on the California City and County Sales and Use Tax Rates page of the BOE’s website. (www.boe.ca.gov/sutax/pam71.htm).