This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*************** | |
| * Simple Process Hollowing in C# | |
| * | |
| * #Build Your Binaries | |
| * c:\Windows\Microsoft.NET\Framework\v2.0.50727\csc.exe Hollowing.cs /unsafe | |
| * | |
| * @author: Michael Gorelik <smgorelik@gmail.com> | |
| * gist.github.com/smgorelik/9a80565d44178771abf1e4da4e2a0e75 | |
| * #Most of the code taken from here: @github: github.com/ambray |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ul> | |
| <li ng-repeat="(key, errors) in form.$error track by $index"> <strong>{{ key }}</strong> errors | |
| <ul> | |
| <li ng-repeat="e in errors">{{ e.$name }} has an error: <strong>{{ key }}</strong>.</li> | |
| </ul> | |
| </li> | |
| </ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.ComponentModel.DataAnnotations.Schema; | |
| using System.Data.Entity; | |
| using System.Linq; | |
| using System.Linq.Expressions; | |
| using System.Reflection; | |
| using System.Text; | |
| namespace EFExtensions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --Set offline database and cancel the transactions running. | |
| ALTER DATABASE <database_name> SET OFFLINE WITH ROLLBACK IMMEDIATE | |
| -- And to bring the database online again | |
| ALTER DATABASE <database_name> SET ONLINE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * @source: http://anubhavg.wordpress.com/2009/06/11/how-to-format-datetime-date-in-sql-server-2005/ | |
| * Microsoft SQL Server T-SQL date and datetime formats | |
| * Date time formats - mssql datetime | |
| * MSSQL getdate returns current system date and time in standard internal format | |
| */ | |
| SELECT convert(varchar, getdate(), 100) | |
| /* mon dd yyyy hh:mmAM (or PM) - Oct 2 2008 11:01AM */ | |
| SELECT convert(varchar, getdate(), 101) | |
| /* mm/dd/yyyy - 10/02/2008 */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE PROCEDURE SPS_CONSULTACONTENIDOSP | |
| @BUSCAR VARCHAR(MAX) | |
| AS | |
| BEGIN | |
| --Variable que contentendrá el texto a buscar, nombre de una tabla, columna, etc... | |
| DECLARE @SearchText AS VARCHAR(100) | |
| SET @SearchText = @BUSCAR | |
| --Consulta de los procedimeintos que contienen dicho texto | |
| SELECT DISTINCT USER_NAME(o.uid) + '.' + OBJECT_NAME(c.id) AS 'Object name', | |
| CASE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select '$'+convert(varchar(50), CAST( Total as money), -1) Total from Ventas |