{"id":15726654,"url":"https://github.com/mahboub99/every-day-learning","last_synced_at":"2025-05-06T18:18:11.636Z","repository":{"id":124374740,"uuid":"334458082","full_name":"Mahboub99/every-day-Learning","owner":"Mahboub99","description":"every-day-learning is a collection of questions and answers that i write down through my journey in learning ,here you might find various questions in front end , problem solving and programming languages","archived":false,"fork":false,"pushed_at":"2021-04-06T14:13:13.000Z","size":39,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-06T18:18:06.382Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mahboub99.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-30T16:26:30.000Z","updated_at":"2023-03-08T15:22:53.000Z","dependencies_parsed_at":"2024-07-24T17:20:59.481Z","dependency_job_id":null,"html_url":"https://github.com/Mahboub99/every-day-Learning","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mahboub99%2Fevery-day-Learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mahboub99%2Fevery-day-Learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mahboub99%2Fevery-day-Learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mahboub99%2Fevery-day-Learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mahboub99","download_url":"https://codeload.github.com/Mahboub99/every-day-Learning/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252741483,"owners_count":21797030,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T22:28:12.279Z","updated_at":"2025-05-06T18:18:11.615Z","avatar_url":"https://github.com/Mahboub99.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://github.com/Mahboub99/every-day-Learning\" rel=\"noopener\"\u003e\n  \n  ![every day learning](https://user-images.githubusercontent.com/43186742/106606559-f23db080-656a-11eb-8728-d5231dfcec62.png)\n\n\n\u003c/div\u003e\n\n\u003ch3 align=\"center\"\u003eevery day learning\u003c/h3\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \n  [![GitHub contributors](https://img.shields.io/github/contributors/Mahboub99/every-day-Learning)](https://github.com/Mahboub99/every-day-Learning/contributors)\n  [![GitHub issues](https://img.shields.io/github/issues/Mahboub99/every-day-Learning)](https://github.com/Mahboub99/every-day-Learning/issues)\n  [![GitHub forks](https://img.shields.io/github/forks/Mahboub99/every-day-Learning)](https://github.com/Mahboub99/every-day-Learning/network)\n  [![GitHub stars](https://img.shields.io/github/stars/Mahboub99/every-day-Learning)](https://github.com/Mahboub99/every-day-Learning/stargazers)\n  [![GitHub license](https://img.shields.io/github/license/Mahboub99/every-day-Learning)](https://github.com/Mahboub99/every-day-Learning/blob/master/LICENSE)\n  \u003cimg src=\"https://img.shields.io/github/languages/count/Mahboub99/every-day-Learning\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/languages/top/Mahboub99/every-day-Learning\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/languages/code-size/Mahboub99/every-day-Learning\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/issues-pr-raw/Mahboub99/every-day-Learning\" /\u003e\n\n\u003c/div\u003e\n\n## About\n\u003e every-day-learning is a collection of questions and answers that i write down through my journey in learning ,here you might find various questions in front end , problem solving and programming languages\n\n\n\n### How can I export a directory structure in Windows?\n\n\u003e[Complete answer](https://superuser.com/questions/258287/how-can-i-export-a-directory-structure-in-windows).\n``` shell\ntree /f /a \u003e tree.txt\n```\n\n### How to install vue CLI?\n``` shell\nnpm install -g vue-cli\n```\n\n### How to create vue app?\n```shell\nvue create \u003cproject name\u003e\n```\n\n### what is the difference betwen \"data\" and \"props\" in vue?\n\u003e [Complete answer](https://medium.com/javascript-in-plain-english/different-between-props-and-data-in-vue-components-d571cfa078e4).\n\n\u003eThere’s a difference between props and data. Data is stored in the private memory of each component where we can store variables that we need. Props are passed in from the parent component to the child.\n\n#### example passing data from parent to child as props:\n\nchild:\n```vue\n\u003ctemplate\u003e\n  \u003cdiv class=\"hello\"\u003e\n   \u003cp\u003e{{msg}}\u003c/p\u003e\n\n  \u003c/div\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\nexport default {\n  name: 'HelloWorld',\n  props: {\n    msg: String\n  }\n}\n\u003c/script\u003e\n\n```\n\n\nparent:\n\n```vue\n\u003ctemplate\u003e\n  \u003cdiv id=\"app\"\u003e\n   \n    \u003cHelloWorld :msg=\"title\"/\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\nimport HelloWorld from './components/HelloWorld.vue'\n\nexport default {\n  name: 'App',\n  data(){\n    return{\n      title:\"from app component\"\n      }\n  },\n  components: {\n    HelloWorld\n  }\n}\n\u003c/script\u003e\n```\n\nusing `:msg=\"title\"` to pass \"title\" as data not `string` \n\n### what is the differance between `methods` and `computed` in vue ?\n\u003e[Complete answer](https://medium.com/notonlycss/the-difference-between-computed-and-methods-in-vue-js-9cb05c59ed98).\n\n\u003eIn comparison, a method invocation will always run the function whenever a re-render happens but computed just calls whenever the data is updated.\n\n| methods                                                                                   | computed                                                   |\n|:-----------------------------------------------------------------------------------------:| :---------------------------------------------------------:| \n| To call a function when an event happen in the DOM                                        | You need to compose new data from existing data sources    |     \n| To call a function from the computed or watchers when something happens in your component.| You need to reference a value directly in your template    |\n| You need to pass parameters                                                               | You call the same function more than once in your template |\n\n\n\n### what is the diffrence between Primitive and Reverance value in js?\n\u003e [Complete answer](https://www.javascripttutorial.net/javascript-primitive-vs-reference-values).\n\n\n\u003eIn JavaScript, a variable may store two types of values: primitive and reference.\nJavaScript provides six primitive types as `undefined`, `null`, `boolean`, `number`, `string`, and `symbol` , and a reference type `object`(also `array`).\nThe size of a primitive value is fixed, therefore, JavaScript stores the primitive value on the `stack`.\nOn the other hand, the size of a reference value is dynamic so JavaScript stores the reference value on the `heap`.\n\n\n### How to count the number of inversions in an array ?\n\n\u003e we can do it in `O(n^2)` the brute force solution \n\n```\ninitialize arr to [1,2,4,3,5,6]\ninitialize i to 0\ninitialize inversions to 0\nwhile i is less than length of arr\n  initialize j to i+1\n  \n  while j is less than length of arr\n    if arr[i] is greater than arr[j]\n      then increment inversions by 1\nprint out inversions\n``` \n\u003eor we can use merge sort in `O(nlog(n))` devide and conquer algorithm.\n```\nfunction countInversions(array) {\n  if length of array is equal to 1\n    return array\n  midPoint = length of array \\ 2\n  firstHalf, inversions1 = mergeSort(first half of the array)\n  secondHalf, inversions2 = mergeSort(second half of the array)\n  initialize sortedArray to an empty array\n  initialize i to 0\n  initialize j to 0\n  initialize inversions to 0\n  while i \u003c length of firstHalf and j \u003c length of secondHalf\n    if firstHalf[i] \u003e secondHalf[j]\n      append secondHalf[j] to sortedArray\n      inversions = inversions + (midPoint - i)\n    else\n      append firstHalf[i] to sortedArray\n  append the remaining elements of firstHalf to sortedArray\n  append the remaining elements of secondHalf to sortedArray\n  totalInversions = inversions1 + inversions2 + inversions\n  return sortedArray, totalInversions\n}\n```\n\u003e [Complete answer](https://medium.com/the-andela-way/count-inversions-5fe3288f11fb).\n\u003e \n\n### what is the Progressive web Apps?\n\u003e [Complete answer](https://web.dev/what-are-pwas/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahboub99%2Fevery-day-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmahboub99%2Fevery-day-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahboub99%2Fevery-day-learning/lists"}