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
| import java.util.List; | |
| public class BinarySearch { | |
| public static int search(List<Integer> numbers, int number) { | |
| int pLeft = 0, pRight = numbers.size()-1, pMiddle; | |
| while(pLeft <= pRight) { | |
| pMiddle = (pLeft + pRight) / 2; | |
| if(numbers.get(pMiddle).equals(number)) { |
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
| package de.zh32.slp; | |
| import com.google.gson.Gson; | |
| import java.io.ByteArrayOutputStream; | |
| import java.io.DataInputStream; | |
| import java.io.DataOutputStream; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.InputStreamReader; | |
| import java.io.OutputStream; |
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
| import java.util.List; | |
| import java.util.ArrayList; | |
| import java.util.Arrays; | |
| import java.util.stream.Collectors; | |
| public class Count { | |
| public static void main(String[] args) { | |
| Integer[] numbers = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; | |
| List<Integer> listNumbers = new ArrayList<Integer>(Arrays.asList(numbers)); |
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
| <!DOCTYPE html> | |
| <html lang="pt-br"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>navbar</title> | |
| <link rel="stylesheet" href="css/style.css"> | |
| <script src="https://kit.fontawesome.com/5773d4ffcc.js" crossorigin="anonymous"></script> | |
| </head> |
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
| <!DOCTYPE html> | |
| <html lang="pt-br"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>navbar</title> | |
| <link rel="stylesheet" href="css/style.css"> | |
| <script src="https://kit.fontawesome.com/5773d4ffcc.js" crossorigin="anonymous"></script> | |
| </head> |
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
| <!DOCTYPE html> | |
| <html lang="pt-br"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>navbar</title> | |
| <link rel="stylesheet" href="css/style.css"> | |
| <script src="https://kit.fontawesome.com/5773d4ffcc.js" crossorigin="anonymous"></script> | |
| </head> |
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
| <!DOCTYPE html> | |
| <html lang="pt-br"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Teste</title> | |
| <link rel="stylesheet" href="css/style.css"> | |
| </head> | |
| <body> |
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 <iostream> | |
| #include <fstream> | |
| using namespace std; | |
| void encrypt(string& text, int key) | |
| { | |
| char* pointer = &text[0]; | |
| while(*pointer != '\0'){ | |
| if(*pointer != '\n') |
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 <iostream> | |
| #include <fstream> | |
| using namespace std; | |
| int main() | |
| { | |
| //-------------------------------------- | |
| ofstream file1("arquivo.txt"); | |
| string input; |
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 <iostream> | |
| #include <stack> | |
| using namespace std; | |
| void showBooks(stack<string> books) | |
| { | |
| if(!books.empty()) | |
| { | |
| cout << "\n\tBooks in the stack:" << endl; |