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
'use client'; | |
import React, { useState, createContext, useContext, ReactNode } from 'react'; | |
import { motion, AnimatePresence } from 'framer-motion'; | |
import clsx from 'clsx'; | |
interface CollapseContextProps { | |
isOpen: boolean; | |
toggle: () => void; | |
} |
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
'use client'; | |
import React, { useState, createContext, useContext, ReactNode, useRef, useEffect } from 'react'; | |
import { motion, AnimatePresence } from 'framer-motion'; | |
import clsx from 'clsx'; | |
interface DropdownContextProps { | |
isOpen: boolean; | |
toggle: () => void; | |
setIsOpen: (open: boolean) => void; |
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 { createContext, useContext, useState, useRef, ReactNode, Children, ReactElement, cloneElement, useEffect } from "react"; | |
import { motion, AnimatePresence } from "framer-motion"; | |
// Context | |
const SliderContext = createContext<{ | |
index: number; | |
setIndex: (i: number) => void; | |
next: () => void; | |
prev: () => void; | |
slideCount: 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
#!/bin/bash | |
echo "DENEME" |
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 main() | |
{ | |
int x, y; | |
printf("Kordinatlari giriniz (x,y) : "); | |
scanf("%d%d", &x, &y); | |
if (x > 0 && y > 0) | |
printf("Coordinates are at 1. side\n"); | |
else if (x < 0 && y > 0) |
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> | |
#include<stdlib.h> | |
int main() | |
{char prnt[1000],scn[20]; | |
FILE *d, *dd, *ddd; | |
d=fopen("fileDestinaiton/filename","mode"); //if your file is the same place with program you can write just name | |
dd=fopen("print.txt","r+"); | |
fprintf(dd,"%s",prnt); | |
fclose(dd); |
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 main () | |
{ | |
int var = 20; // actual variable declaration | |
int *ip; // pointer variable declaration | |
ip = &var; //store address of var in pointer variable | |
printf("Address of var variable: %x\n", &var ); | |
// address stored in pointer variable |
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> | |
struct school | |
{ | |
int no; | |
char name[20]; | |
char surnema[20]; | |
}; | |
int 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
#include<stdio.h> | |
int addition(int no1 , int no2); //If you write your function after the main you should specify your function before the main | |
int main() | |
{int a,b,sum; | |
printf("Please enter two number\n"); | |
scanf("%d %d",&a,&b); | |
sum=addition(a,b); | |
printf("Result : %d",sum); | |
} |
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 main() | |
{ //Arrays can save value how much you want. | |
int x[10]; //Also arrays have variables type when you want to variable just prit'[numberOfHowMuchYouWant]' This array can save 10 number | |
char name[20]; //Chars' arrays are using for sentences or words | |
printf("Enter your phone number and name"); | |
scanf("%d %s",&x[1],name); | |
printf("Name: %s \nNo: %d",name,x[1]); | |
} |
NewerOlder