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
socket1 = Socket() | |
socket2 = Socket() | |
FD_ZERO(&read); | |
while (1) { | |
FD_SET(socket1, &read); | |
FD_SET(socket2, &read); | |
state = select(maxfd+1, &read, 0, 0, 0); | |
switch (state) { |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>Aliens Abducted Me - Report an Abduction</title> | |
<link rel="stylesheet" type="text/css" href="style.css" /> | |
</head> | |
<body> |
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
#include <cstdio> | |
#include <set> | |
using namespace std; | |
const int _size = 100005; | |
int n, k, m[_size]; | |
multiset<int> s; | |
int get_minmax(multiset<int> s) { | |
return (*s.begin()) * (*s.rbegin()); | |
} |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#define QUEUE_SIZE 5 | |
typedef char element; | |
typedef struct { | |
element queue[QUEUE_SIZE]; | |
int front, rear; | |
} QueueType; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#define QUEUE_SIZE 5 | |
typedef char element; | |
typedef struct { | |
element queue[QUEUE_SIZE]; | |
int front, rear; | |
} QueueType; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#define QUEUE_SIZE 10 | |
typedef char element; | |
typedef struct { | |
element queue[QUEUE_SIZE]; | |
int front, rear; | |
} QueueType; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#define STACK_SIZE 10 | |
char stack[STACK_SIZE]; | |
int top = -1; | |
int isFull() { | |
return top >= STACK_SIZE - 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
#include <iostream> | |
#include <set> | |
#include <string> | |
using namespace std; | |
set <int> s; | |
void push () { | |
int val; | |
cin >> val; | |
if (s.insert(val).second) |
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
import numpy as np | |
import tensorflow as tf | |
from tensorflow.keras.models import Sequential | |
from tensorflow.keras.layers import Flatten, Dense, Activation | |
def softmax(x): | |
return np.exp(x) / np.sum(np.exp(x), axis=0) | |
(x_train, y_train), (x_test, y_test) = tf.keras.datasets.mnist.load_data() | |
x_train = x_train.astype('float32') |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <time.h> | |
#include <algorithm> | |
using namespace std; | |
const int maxSize = 150; // The maximum number of elements | |
const int boundSize = 50; |
NewerOlder