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
/* | |
* ////////////////////////// MAPA FILA BANCO ////////////////////////////// | |
* Atividade MAPA desenvolvida para ajudar os amigos da faculdade UniCesumar | |
* Trata-se de uma simples implementação de um atendimento de uma fila | |
* de banco utilizando os recursos da fila encadeada da linguagem c | |
* | |
* Copyright(c) 2016 Celso Junior, [email protected] | |
* | |
* Licensed under MIT-style license: | |
* |
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
/* | |
* ////////////////////////// MAPA FILA BANCO C# ////////////////////////////// | |
* Atividade MAPA desenvolvida para ajudar os amigos da faculdade UniCesumar | |
* Trata-se de uma simples implementação de um atendimento de uma fila de | |
* banco utilizando os recursos da linguagem c# 6 | |
* | |
* Copyright(c) 2016 Celso Junior, [email protected] | |
* | |
* Licensed under MIT-style license: | |
* |
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
// F# calculating the factorial in imperative approach programming. | |
let Fact n = | |
let mutable x = n | |
let mutable y = 1 | |
while x > 0 do | |
y <- y * x | |
x <- (x - 1) | |
y | |
for i in 0 .. 10 do |
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. | |
* F# Tail Recursive Factorial in a functional programming approach. | |
* Also using the CPS technique (Continuation Passing Style). | |
* Ref.: https://en.wikipedia.org/wiki/Continuation-passing_style | |
* --------------------------------------------------------------------------------------------*) | |
[<TailCall>] | |
let fac1 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
open System | |
let (<->) x y = 2 * x + y = 1 | |
let a = [ -1..5 ];; let b = [ -3..8 ];; | |
let axb = a |> List.collect (fun c -> b |> List.map (fun d -> c,d)) | |
|> List.choose (fun (a,b) -> | |
match (a,b) with | |
| x when a <-> b -> Some(a,b) | |
| _ -> None) |
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
/** | |
* Programa em Java para contar as ocorrências de cada letra em uma frase. | |
* | |
* @author Celso Jr | |
* @version Imperativa | |
* | |
*/ | |
import java.io.*; |
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; |
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
// 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
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}"); | |
} |
OlderNewer