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
// POST api/v1/author/{authorId}/undo | |
/// <summary> | |
/// Undo a deleted action on Author | |
/// </summary> | |
/// <remarks>Undo a deleted action on Author</remarks> | |
/// <param name="authorId"></param> | |
[HttpPost("{authorId:length(24)}/undo", Name = nameof(UndoDeletedAuthor))] | |
[ProducesResponseType(StatusCodes.Status410Gone)] | |
[ProducesResponseType(StatusCodes.Status201Created)] | |
public async Task<IActionResult> UndoDeletedAuthor(string authorId) |
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
// DELETE api/v1/author/{authorId} | |
/// <summary> | |
/// Deletes an Author | |
/// </summary> | |
/// <remarks>Deletes an Author</remarks> | |
/// <param name="authorId"></param> | |
[HttpDelete("{authorId:length(24)}", Name = nameof(DeleteAuthor))] | |
[ProducesResponseType(StatusCodes.Status404NotFound)] | |
[ProducesResponseType(typeof(DeleteModel<>), StatusCodes.Status200OK)] | |
public async Task<IActionResult> DeleteAuthor(string authorId) |
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
DECLARE @Participantes TABLE | |
( | |
Numero INT | |
) | |
INSERT INTO @Participantes VALUES (1), (2), (3) | |
DECLARE @RESPONSAVEL_TECNICO INT = 1 | |
DECLARE @TRUE INT = 1 | |
DECLARE @PRINCIPAL INT = 1 |
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
# sample.xml file content | |
# <file> | |
# <categories> | |
# <category>cat1</category> | |
# <category>cat2</category> | |
# <category>removecategory</category> | |
# <category>keepthisone</category> | |
# <category>deletethisone</category> | |
# <category>somethingelse</category> | |
# </categories> |
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
// CSharp https://dotnetfiddle.net/jjMC07 | |
using System; | |
using System.Linq; | |
using System.Xml.Linq; | |
using System.Xml.XPath; | |
public class Program | |
{ | |
public static void Main() | |
{ |
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
/*-------------------------------------------------------------------------------------------- | |
* Copyright (c) 2019 Celso Junior, All rights reserved. | |
* Licence: Copy 'n paste freed! \o/ | |
* Description: Csharp program benchmarking the best place to use .ToList() method | |
* --------------------------------------------------------------------------------------------*/ | |
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
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; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
for (int i = 0, x = 1; i <= 10; i++, x*=i) | |
{ | |
Console.WriteLine($"{i:D2}! - {x}"); | |
} |
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
// C# function to calculate the factorial of a given number. | |
using System.Linq; | |
using System.Collections.Generic; | |
using static System.Console; | |
public class Program | |
{ | |
public static void Main() | |
{ |
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
-- MySQL Workbench Forward Engineering | |
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; | |
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; | |
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; | |
-- ----------------------------------------------------- | |
-- Schema mapa_exemplo | |
-- ----------------------------------------------------- | |
DROP SCHEMA IF EXISTS `mapa_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
/*-------------------------------------------------------------------------------------------- | |
* Copyright (c) 2017 Celso Junior, [email protected]. All rights reserved. | |
* Licensed under the MIT License. See License.txt in the project root for license information. | |
* Inspired by Matrix Rain: https://www.codeproject.com/Articles/113227/Matrix-Rain | |
* --------------------------------------------------------------------------------------------*/ | |
namespace Matrix | |
{ | |
using System; | |
using System.Threading.Tasks; | |
using System.Runtime.InteropServices; |