Skip to content

Instantly share code, notes, and snippets.

View winhtut's full-sized avatar
🎯
Focusing

WinHtut winhtut

🎯
Focusing
View GitHub Profile
@winhtut
winhtut / 1 Accessing and Creating Properties .cpp
Last active December 29, 2019 13:36
Class and Object DeepDive C++
#include<iostream>
using namespace std;
class Dog{
public :
string name;
int age;
float weight;
};
int main(){
@winhtut
winhtut / FEOF.c
Last active February 2, 2020 16:10
Reading Data From File
#include<stdio.h>
int main(){
FILE *fptr;
if((fptr=fopen("clients.txt","w"))==NULL){
puts("File could not be opened");
}
else{
@winhtut
winhtut / fprintf.c
Last active December 10, 2019 08:27
FileProcessingWithC
#include <stdio.h>
int main() {
FILE *fptr;
int account=101;
char name[]="WinHtut";
double balance=10.1;
fptr = fopen("1hello.txt", "w");
if(fptr==NULL){
printf("Somethings wrong with this process");
@winhtut
winhtut / calloc.c
Last active December 9, 2019 09:35
Dynamic Memory Allocation
#include<stdio.h>
#include<stdlib.h>
int main(){
int i=0;
int *ptr;
int sum=0;
ptr=calloc(6 , sizeof(int));
@winhtut
winhtut / 0 structure initialize.c
Last active December 26, 2019 18:04
Structure
#include<stdio.h>
struct student{
int age;
int roll;
float marks;
};
struct student stu={18,20,100};
int main(){
printf(" printing data from Structure %d\n",stu.age);
@winhtut
winhtut / 1 Pointer
Last active November 28, 2019 20:34
PointerLessonByWinHtut
#include <stdio.h>
int main()
{
int arr[5]={10,30,20,50,60};
int *ptr1=&arr[0];// *ptr=arr;
int *ptr2= ptr1+3;
printf(" address of ptr1= %d\n",ptr1);
//pointer address = p + x*sizeof(*p);
@winhtut
winhtut / 1_winhtut.c
Last active November 2, 2019 16:41
C for Geeks
#include<iostream>
#include<conio.h>
#include<stdio.h>
using namespace std;
void fun(int kkk[])
{
int i;
int* f_ptr = &kkk[0];
int* final_ptr = &kkk[3];
import secrets
import sys
secureNumber=secrets.SystemRandom()
while True:
print('___Welcome to our Game___')
press1=int(input('Press 1 to Read Rule or Press 2 To Play Game:>'))
if press1==1:
print('>Age must be more than 18:')
print('>Show money more than 5000')
#include <ESP8266WiFi.h>
const char* ssid = "****";
const char* password = "****";
int ledPin = 13;
WiFiServer server(80);
void setup() {
@winhtut
winhtut / main1.py
Last active November 12, 2019 06:32
#!/usr/bin/python
import picamera
import picamera.array
import subprocess
import io
import os
import numpy as np
from pushbullet import Pushbullet
from time import sleep
from push import NotificationHandler