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> | |
#include <string.h> | |
#include <unistd.h> | |
#include <stdint.h> | |
#include <stdarg.h> | |
/* | |
Assignment name : first_word | |
Expected files : first_word.c |
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 "get_next_line.h" | |
#include <stdio.h> // printf | |
#include <fcntl.h> // open, O_RDONLY, O_WRONLY, O_RDWR, | |
int main(void) | |
{ | |
int gnl_calls = 3, fd, i; | |
char *line; | |
fd = open("test.txt", O_RDONLY); |
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> | |
// selection sort example | |
void ft_ssort_arr(int *arr, int size) | |
{ | |
int i = 0, j; // arr indexes | |
int min; // index of the minimum value | |
int temp; // temporary variable to store the value of the array | |
while (i < size-1) // arr iter |
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> | |
// bubble sort example | |
void ft_sort_arr(int *arr, int size) | |
{ | |
int passes = 0; // number of passes | |
int j; // index of the array | |
int temp; // temporary variable to store the value of the array | |
int swap_count = -1; // number of swaps in each pass, -1 to enter the loop |
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
const people = [ | |
'Bernhard, Sandra', | |
'Bethea, Erin', | |
'Becker, Carl', | |
'Bentsen, Lloyd', | |
'Beckett, Samuel', | |
'Blake, William', | |
'Berger, Ric', | |
'Beddoes, Mick', | |
'Beethoven, Ludwig', |
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
<?php | |
/* | |
Backup script for trakt.tv (API v2). | |
Live demo: https://darekkay.com/blog/trakt-tv-backup/ | |
*/ | |
// create a Trakt app to get a client API key: http://docs.trakt.apiary.io/#introduction/create-an-app | |
$apikey = "CLIENT_API_KEY"; |
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
const arr = ['html', 'css', 'js']; | |
const iter = arr.entries(); | |
for (let value of iter) { | |
console.log(value); // [ 0, 'html' ], [ 1, 'css' ], [ 2, 'js' ] | |
} | |
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
const arr = ["html", "css", "js"]; | |
arr.forEach(ele => { | |
console.log(ele); // html, css, js | |
}); |
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
window.addEventListener("load", function(){ | |
var curU = window.location.href; // get current URL | |
var newU = curU.replace('/j/', '/wc/join/'); // Set URL for running metting in the browser | |
var browMe = document.createElement('a'); | |
browMe.setAttribute('href', newU); | |
browMe.innerHTML = 'Run in browser'; | |
document.querySelector('div[role="main"]').appendChild(browMe); // Add button to Zoom's content | |
}); |
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
// https://stackoverflow.com/questions/2705583/how-to-simulate-a-click-with-javascript | |
function eventFire(el, etype){ | |
if (el.fireEvent) { | |
el.fireEvent('on' + etype); | |
} else { | |
var evObj = document.createEvent('Events'); | |
evObj.initEvent(etype, true, false); | |
el.dispatchEvent(evObj); | |
} | |
} |
NewerOlder