This file contains 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
/* | |
sp_async_execute - asynchronous execution of T-SQL command or stored prodecure | |
2012 Antonin Foller, Motobit Software, www.motobit.com | |
URL FONT: http://www.motobit.com/tips/detpg_async-execute-sql/ | |
*/ | |
CREATE PROCEDURE sp_async_execute(@sql varchar(4000), @jobname varchar(200) = null, | |
@database varchar(200)= null, @owner varchar(200) = null ) AS BEGIN | |
SET NOCOUNT ON; | |
declare @id uniqueidentifier |
This file contains 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
-- URL FONT: http://www.motobit.com/tips/detpg_sql-find-text-stored-procedure/ | |
-- ============================================= | |
-- Author: Antonin Foller, www.foller.cz | |
-- Create date: 2007-09-19 | |
-- Description: Search a text in stored procedure source code. | |
-- @text - any text to find, search is done by like '%text%' | |
-- @dbname - database where to search, | |
-- - if omitted, all databases in the SQL server instance | |
-- ============================================= | |
ALTER PROCEDURE [dbo].[find_text_in_sp] |
This file contains 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
From https://blogs.msdn.microsoft.com/carlosag/2006/04/17/microsoft-web-administration-in-iis-7/ | |
Creating a Site | |
ServerManager iisManager = new ServerManager(); | |
iisManager.Sites.Add(“NewSite”, “http”, “*:8080:”, “d:\\MySite”); | |
iisManager.Update(); | |
This basically creates an instance of the ServerManager class and uses the Add method in the Sites collection to create a new site named “NewSite” listening at port 8080 using http protocol and content files are at d:\MySite. | |
One thing to note is that calling Update is a requirement since that is the moment when we persist the changes to the configuration store. | |
After running this code you have now a site that you can browse using http://localhost:8080 |
This file contains 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
-- Pegar a data removendo a HH:MM:SS:mmm | |
SELECT DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) | |
-- ou | |
SELECT convert(DATETIME, floor(convert(FLOAT(24), GETDATE()))) | |
-- SQL Server Date Formats (http://www.sql-server-helper.com/tips/date-formats.aspx) | |
SELECT REPLACE(CONVERT(VARCHAR(10), GETDATE(), 103), '/', '') AS [DDMMYYYY] | |
-- Convert rows in concatenaded string list | |
SELECT STUFF((SELECT ',''' + field + '''' |
This file contains 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.Linq; | |
using System.Net; | |
using System.Net.Sockets; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Host | |
{ |
This file contains 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.Linq; | |
using System.Net.Sockets; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Client | |
{ | |
class Program |
This file contains 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.Configuration; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using SAP.Middleware.Connector; | |
namespace exemplo | |
{ |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<Target Name="BeforeBuild"> | |
<!-- https://stackoverflow.com/a/6472195/2076784 --> | |
<PropertyGroup> | |
<Year>$([System.DateTime]::Now.ToString("yyyy"))</Year> | |
<Month>$([System.DateTime]::Now.ToString("MM"))</Month> | |
<Date>$([System.DateTime]::Now.ToString("dd"))</Date> | |
<Time>$([System.DateTime]::Now.ToString("HHmm"))</Time> | |
<AssemblyFileVersionAttribute>[assembly:System.Reflection.AssemblyFileVersion("$(Year).$(Month).$(Date).$(Time)")]</AssemblyFileVersionAttribute> |
This file contains 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 HTTP interceptor (https://docs.angularjs.org/api/ng/service/$http - Interceptors topic) | |
App.factory('AuthInterceptor', ['$window', '$q', '$location', function ($window, $q, $location) { | |
return { | |
request: function (config) { | |
config.headers = config.headers || {}; | |
config.headers.ContentType = 'application/json; charset=UTF-8'; | |
if (myGlobalVar.getToken()) { | |
// populate header custom fields | |
config.headers.Authorization = 'Bearer ' + myGlobalVar.getToken().access_token; | |
config.headers.iduser = myGlobalVar.getToken().iduser; |
This file contains 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
<UserSettings> | |
<ApplicationIdentity version="11.0"/> | |
<ToolsOptions> | |
<ToolsOptionsCategory name="Environment" RegisteredName="Environment"> | |
<ToolsOptionsSubCategory name="Documents" RegisteredName="Documents" PackageName="Visual Studio Environment Package"> | |
<PropertyValue name="ShowMiscFilesProject">false</PropertyValue> | |
<PropertyValue name="AutoloadExternalChanges">false</PropertyValue> | |
<PropertyValue name="CheckForConsistentLineEndings">true</PropertyValue> | |
<PropertyValue name="SaveDocsAsUnicodeWhenDataLoss">false</PropertyValue> | |
<PropertyValue name="InitializeOpenFileFromCurrentDocument">true</PropertyValue> |
OlderNewer