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
" ~/.config/nvim/init.vim | |
3 | |
2 " ~/.local/share/nvim/site/pack/git-plugins/start | |
1 | |
5 " Colorscheme ^^ | |
1 colorscheme dago | |
2 | |
3 " self-explanatory | |
4 syntax on | |
5 set number |
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
// Place your key bindings in this file to overwrite the defaults | |
[ | |
{ "key": "ctrl+h", "command": "cursorLeft", | |
"when": "editorTextFocus" }, | |
{ "key": "ctrl+j", "command": "cursorRight", | |
"when": "editorTextFocus" }, | |
{ "key": "ctrl+u", "command": "cursorUp", | |
"when": "editorTextFocus" }, | |
{ "key": "ctrl+l", "command": "cursorDown", | |
"when": "editorTextFocus" }, |
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
// Place your settings in this file to overwrite the default settings | |
{ | |
"workbench.activityBar.visible": true, | |
"workbench.statusBar.visible": true, | |
"window.zoomLevel": 0, | |
"editor.fontFamily": "Liberation Mono", | |
"editor.fontSize": 14, | |
"editor.minimap.enabled": false, | |
"files.associations": { | |
"*.html": "html" |
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> | |
int main (void) { | |
int k = 42; | |
int *pointerToKadress; | |
pointerToKadress = &k; // an address | without asterisk | |
*pointerToKadress = 29; // a value placed at this address | go to this location and do something | |
printf("%s updated\n", *pointerToKadress == k ? "true" : "false"); // true | |
printf("%s updated|address %i\n", pointerToKadress == k ? "true" : "false", pointerToKadress); // false | |
} |
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
//selection sort | |
function selectionSort(arr) { | |
let indexOfSmallestItem = 0; | |
// really? LOL | |
let j = 0; | |
let i = 0; | |
let placeholder; | |
while (j < arr.length) { | |
for ( ; i < arr.length; i++) { | |
// find smallest item in the array |
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
//just my own thoughts about it. Actually I've had similar issues before. | |
function confusion() { | |
var x = 5; // hard-coded assignment | |
console.log(x); | |
} | |
confusion(); // call a function with hard-coded 5 value | |
function dontBeConfused(x // hey I'm a parameter, that is a placeholder for a future value/argument ) { | |
// putting x parameter this way is pretty mutch the same as creating a variable inside the function |
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
var pageCounter = 1; | |
var animalContainer = document.getElementById('animal-info'); | |
var btn = document.getElementById('btn'); | |
btn.addEventListener('click',function() { | |
var ourRequest = new XMLHttpRequest(); | |
ourRequest.open('GET','https://learnwebcode.github.io/json-example/animals-' + pageCounter + '.json'); | |
ourRequest.onload = function() { | |
var ourData = JSON.parse(ourRequest.responseText); | |
renderHTML(ourData); | |
}; |
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
var obj = { name: 'smith' }; | |
function outer() { | |
(function inner() { | |
console.log(this.name); | |
}).call(this); | |
} | |
function outer() { // same result as above | |
(function inner() { |
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
// Автор всё верно написал, но у Вас возникла объяснимая двусмысленность, сейчас поясню: | |
// Реализация слов автора | |
var str = '{"title":"Конференция","date":"2014-11-30T12:00:00.000Z"}'; | |
var event = JSON.parse(str, function(key, value) { | |
if (key == 'date') return undefined; // Относится к этому месту кода; соответствующая пара key/value будет пропущена/удалена | |
return value; | |
}); | |
// Ваша ошибочная интерпретация |
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
--- | |
version 1 | |
--- | |
//Oops... well, there probably was so much 'shame' that I decided to delete it :) | |
--- | |
version 2 | |
--- |