Langsung ke konten utama

Postingan

Menampilkan postingan dari Maret, 2017

Cara mudah menginstall ZeosLib di Lazarus

ZeosLib menurut pembuatnya adalah komponen database (meliputi MySQL, Postgresql, MSSQL, Firebird, Sybase, Oracle dan SQLite) populer, gratis dan opensource yang dapat digunakan di Freepascal/Lazarus, Delphi, Kylix dan C++ Builder. Berikut ini adalah cara mudah untuk menginstall ZeosLib di Lazarus, saya coba di Lazarus 1.x dan Freepascal 2.6.2.

Laravel 5 example

Laravel 5 example For Laravel 5.3 improved version look at this repository . Laravel 5 example is a tutorial application for Laravel 5.2 (in french there ). Installation git clone https://github.com/bestmomo/laravel5-example.git projectname cd projectname composer install php artisan key:generate Create a database and inform .env php artisan migrate --seed to create and populate tables Inform config/mail.php for email sends php artisan vendor:publish to publish filemanager php artisan serve to start the app on http://localhost:8000/ [java]composer create-project laravel/laravel laravelapp --prefer-dist[/java]

Format Number with commas in T-SQL Sql Server

Demo 1 Demonstrates adding commas: [sql] PRINT FORMATMESSAGE('The number is: %s', format(5000000, '#,##0')) [/sql] -- Output The number is: 5,000,000 Demo 2 Demonstrates commas and decimal points. Observe that it rounds the last digit if necessary. [sql] PRINT FORMATMESSAGE('The number is: %s', format(5000000.759145678, '#,##0.00')) [/sql] -- Output The number is: 5,000,000.76 Compatibility SQL Server 2012+.

Git Hub

GIT merupakan sebuah Version Control System (VCS) yang digunakan dalam tim pengembangan perangkat lunak untuk bekerja bersama. Version Control maksudnya sistem Git akan mencatat setiap perubahan yang terjadi pada source code kita sehingga memungkinkan untuk mengambil kembali source code lama jika suatu saat kita ingin kembali ke versi berapapun dari aplikasi yang pernah kita tulis.

ApexSQL Refactor SQL Server

Features ApexSQL Refactor Format SQL with over 160 options Qualify objects and expand wildcards Encapsulate SQL into procedures Add surrogate keys Replace one-to-many relationships Change procedure parameters Safely rename SQL objects Locate & highlight unused variables Format SQL objects Obfuscate SQL Link ApexSQL Refactor :  apexsql_refactor My Template xml ApexSQL Refactor

Easily Create Trigger Delete Protection SQL Server

First learn :  Tricks For Document Delete Protection On Trigger [sql] CREATE PROCEDURE [System].[Utility.GenerateTriggerDeleteProtect] @TableName NVARCHAR(250) AS BEGIN SET NOCOUNT ON; DECLARE @SQL NVARCHAR(MAX) IF NOT EXISTS ( SELECT TOP 1 name FROM sys.triggers WHERE parent_id = OBJECT_ID(@TableName) ) BEGIN SET @SQL = ' CREATE TRIGGER '+REPLACE(@TableName,']','.DeleteProtect]')+' ON '+@TableName+' Instead of DELETE AS BEGIN SET NOCOUNT ON; delete from '+@TableName+' where doc_id in (select doc_id from deleted where docflow_seq=0) END' EXEC sp_executesql @SQL PRINT 'Create delete protect trigger for '+@TableName END ...

sys.processes Status sp_who2 SQL Server

Taken from the books online reference for sys.processes  and the status column. dormant = SQL Server is resetting the session. running = The session is running one or more batches. When Multiple Active Result Sets (MARS) is enabled, a session can run multiple batches. For more information, see Using Multiple Active Result Sets (MARS). background = The session is running a background task, such as deadlock detection. rollback = The session has a transaction rollback in process. pending = The session is waiting for a worker thread to become available. runnable = The task in the session is in the runnable queue of a scheduler while waiting to get a time quantum. spinloop = The task in the session is waiting for a spinlock to become free. suspended = The session is waiting for an event, such as I/O, to complete.

Sp_who Dynamic Quert SQL Server

View spesifik process wp_who Sql Server   [sql] SELECT spid ,sp.[status] ,loginame [Login] ,hostname ,blocked BlkBy ,sd.name DBName ,cmd Command ,dbo.spidprocess(spid) AS process ,cpu CPUTime ,physical_io DiskIO ,last_batch LastBatch ,program_name AS ProgramName FROM master.dbo.sysprocesses sp JOIN master.dbo.sysdatabases sd ON sp.dbid = sd.dbid ORDER BY spid [/sql]