Skip to content

Instantly share code, notes, and snippets.

#include <string>
#include <vector>
#include <sstream>
#include <iostream>
using namespace std;
int main(void) {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main(void) {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
#include <stdio.h>
#include <string.h>
int main(void) {
char s[30] = "Hello world!";
char *ptr = strstr(s, "wor");
if (ptr != NULL) {
printf("%s\n", ptr);
}
#include <stdio.h>
#include <string.h>
int main(void) {
char buf[30] = "1,2,3,4,5,6";
char *ptr = strtok(buf, ",");
while (ptr != NULL) {
printf("%s\n", ptr);
ptr = strtok(NULL, ",");
#include <stdio.h>
#include <string.h>
int main(void) {
char buf[] = "GET /index.html HTTP/1.1";
char *ptr;
ptr = strtok(buf, " /");
printf("%s\n", ptr);
ptr = strtok(NULL , " /");
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <pthread.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#define BUF_SIZE 1024
#define SMALL_BUF 100
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
#include <sys/stat.h>
#include <arpa/inet.h>
#include <sys/types.h>
#include <sys/socket.h>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Raspberry Pi Contorller</title>
</head>
<body>
<form action="control.html" method="GET" onSubmit="document.reload()">
<table>
<tr>
<td>LED</td>
#include <stdio.h>
#include <string.h>
char buf[10001];
int main(void) {
scanf("%s", buf);
int cnt1 = 0;
char *ptr = strstr(buf, "JOI");
while (ptr != NULL) {
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#define BUF_SIZE 1024
#define OPSZ 4