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
void Main() | |
{ | |
var dpts = new List<Department> | |
{ | |
new Department {id = 1, Name = "CIO Department"}, | |
new Department {id = 2, Name = "CEO Department"} | |
}; | |
var cioEmplyers = new List<Employer> | |
{ |
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
<system.web> | |
<globalization uiCulture="pt-BR" culture="pt-BR"/> | |
<compilation debug="true" targetFramework="4.5.1" /> | |
<httpRuntime targetFramework="4.5.1" maxRequestLength="1048576" requestPathInvalidCharacters="" /> | |
<pages validateRequest="false"/> | |
<machineKey validationKey="ABD40FDFB8D031E24643799452B69E81144807334F87C4AFDE7B93083D59C3E2" decryptionKey="BE6987D2CD1D38C9D2AD4A6E4C67E8E49C4B61262FB6FCEB0C45A601F924C472" validation="HMACSHA256" decryption="AES" /> | |
<authentication mode="Forms"> | |
<forms loginUrl="~/../Global/Usuario/Login" timeout="20" /> | |
</authentication> | |
<customErrors mode="Off"/> |
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 (LINQ Syntax) | |
var regions = | |
from r in Regions | |
where r.RegionID > 0 | |
select r; | |
regions.Dump(); | |
// insert | |
Region newRegion = new Region(){ | |
RegionID = 99, |
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
public static int [] BubbleSort(int[] vetor) | |
{ | |
int aux; | |
bool control; | |
for (int i = 0; i < vetor.Length; ++i) | |
{ | |
control = true;// usando o mecanismo de controle para evitar que o BubbleSort ordene um array já ordenado | |
for (int j = 0; j < (vetor.Length - 1); ++j) | |
{ | |
if (vetor[j] > vetor[j + 1]) |
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.Text; | |
namespace PI.EdaII.App | |
{ | |
public class ArrayUtils | |
{ | |
private int[] _vet; | |
private int[] _originalVet; | |
private const int maxLength = 10; |
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
namespace PI.EdaII.App | |
{ | |
public static class MDC | |
{ | |
public static int MdcInterativo(int a, int b) | |
{ | |
var remainder = (a % b); | |
while (remainder != 0) | |
{ | |
a = b; |
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
/** | |
* 1. Faça um programa que crie um registro de um funcionário com as seguintes informações: | |
* nome, identidade, data de nascimento e salário. | |
* O programa deve inicializar a estrutura e depois mostra-la na tela. | |
*/ | |
#include <stdio.h> | |
typedef struct{ | |
int dia; | |
int mes; |
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
#include <stdio.h> | |
int fib(int n) | |
{ | |
if((n == 0) || (n == 1)) | |
return n; | |
else | |
return fib(n-1) + fib(n-2); | |
} | |
main() | |
{ |
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.IO; | |
namespace EncodingMultiplyFiles | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.WriteLine("put bellow the path of files:"); |
NewerOlder