Skip to content

Instantly share code, notes, and snippets.

@Parables
Last active July 31, 2020 23:59
Show Gist options
  • Select an option

  • Save Parables/50841d0481560cd84228abfaf5038fa2 to your computer and use it in GitHub Desktop.

Select an option

Save Parables/50841d0481560cd84228abfaf5038fa2 to your computer and use it in GitHub Desktop.
idelmis-kryztalina-sync
{
"version": 2,
"clips": [
{
"value": "app",
"createdAt": 1591673877303,
"copyCount": 1,
"useCount": 0,
"language": "typescript",
"createdLocation": {
"range": {
"start": {
"line": 6,
"character": 15
},
"end": {
"line": 6,
"character": 18
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/ui-kits/sveta/src/index.ts"
}
},
{
"value": "export default app;",
"createdAt": 1591673859296,
"copyCount": 1,
"useCount": 0,
"language": "javascript",
"createdLocation": {
"range": {
"start": {
"line": 6,
"character": 0
},
"end": {
"line": 6,
"character": 19
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/ui-kits/sveta/old/src/main.js"
}
},
{
"value": " <link rel=\"stylesheet\" href=\"./global.pcss\" />\n",
"createdAt": 1591673629665,
"copyCount": 1,
"useCount": 0,
"language": "html",
"createdLocation": {
"range": {
"start": {
"line": 7,
"character": 0
},
"end": {
"line": 8,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/ui-kits/sveta/old/src/index.html"
}
},
{
"value": " \"tailwindcss-truncate-multiline\": \"^1.0.3\"\n\n \"@fullhuman/postcss-purgecss\": \"^1.3.0\",\n\n \"autoprefixer\": \"^9.7.3\",\n\n \"eslint-plugin-svelte3\": \"^2.7.3\",\n\n \"parcel-plugin-svelte\": \"^4.0.5\",\n\n \"prettier\": \"^1.19.1\",\n\n \"prettier-plugin-svelte\": \"^0.7.0\",\n\n \"tailwindcss\": \"^1.1.4\"\n",
"createdAt": 1591673385897,
"copyCount": 1,
"useCount": 0,
"language": "json",
"createdLocation": {
"range": {
"start": {
"line": 35,
"character": 0
},
"end": {
"line": 36,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/ui-kits/sveta/old/package.json"
}
},
{
"value": " \"serve\": \"rm -rf dist && parcel serve src/index.html\",\n \"build\": \"rm -rf dist && parcel build src/index.html\"\n ",
"createdAt": 1591671025237,
"copyCount": 1,
"useCount": 0,
"language": "json",
"createdLocation": {
"range": {
"start": {
"line": 6,
"character": 2
},
"end": {
"line": 8,
"character": 1
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/ui-kits/sveta/package-old.json"
}
},
{
"value": "\n \"browserslist\": [\n \"last 1 chrome versions\"\n ]",
"createdAt": 1591670935680,
"copyCount": 1,
"useCount": 0,
"language": "json",
"createdLocation": {
"range": {
"start": {
"line": 17,
"character": 4
},
"end": {
"line": 20,
"character": 3
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/ui-kits/sveta/package-old.json"
}
},
{
"value": " \"parcel-bundler\": \"^1.12.4\",\n \"parcel-plugin-svelte\": \"^4.0.6\",\n \"svelte-preprocess\": \"^3.9.6\",",
"createdAt": 1591670915672,
"copyCount": 1,
"useCount": 0,
"language": "json",
"createdLocation": {
"range": {
"start": {
"line": 13,
"character": 2
},
"end": {
"line": 15,
"character": 34
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/ui-kits/sveta/package-old.json"
}
},
{
"value": " \"typescript\": \"^3.9.5\"\n",
"createdAt": 1591670892659,
"copyCount": 1,
"useCount": 0,
"language": "json",
"createdLocation": {
"range": {
"start": {
"line": 16,
"character": 0
},
"end": {
"line": 17,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/ui-kits/sveta/package-old.json"
}
},
{
"value": " \"svelte\": \"^3.23.0\"\n",
"createdAt": 1591670880665,
"copyCount": 1,
"useCount": 0,
"language": "json",
"createdLocation": {
"range": {
"start": {
"line": 10,
"character": 0
},
"end": {
"line": 11,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/ui-kits/sveta/package-old.json"
}
},
{
"value": "http://localhost:3000",
"createdAt": 1591575534102,
"copyCount": 1,
"useCount": 1
},
{
"value": "Bookstore",
"createdAt": 1591559541096,
"copyCount": 1,
"useCount": 1,
"language": "svelte",
"createdLocation": {
"range": {
"start": {
"line": 4,
"character": 4
},
"end": {
"line": 4,
"character": 13
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/idel-project/client/src/components/widgets/Pagination.svelte"
}
},
{
"value": " addLecturer: (data) => LECTURER_STORE.update(allLecturers => [...allLecturers, data]),\n",
"createdAt": 1591558912546,
"copyCount": 1,
"useCount": 1,
"language": "typescript",
"createdLocation": {
"range": {
"start": {
"line": 78,
"character": 0
},
"end": {
"line": 79,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/idel-project/client/src/stores/main_store.ts"
}
},
{
"value": "unction LecturerStore() {\n return {\n init: (data) => LECTURER_STORE.set(data),\n subscribe: LECTURER_STORE.subscribe,\n addLecturer: (data) => LECTURER_STORE.update(allLecturers => [...allLecturers, data]),\n updateLecturer: (data) => LECTURER_STORE.update(allLecturers => updateStore(allLecturers, data)),\n deleteLecturer: (data) => LECTURER_STORE.update(allLecturers => deleteStore(allLecturers, data)),\n };",
"createdAt": 1591557894705,
"copyCount": 1,
"useCount": 1,
"language": "typescript",
"createdLocation": {
"range": {
"start": {
"line": 74,
"character": 1
},
"end": {
"line": 81,
"character": 6
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/idel-project/client/src/stores/main_store.ts"
}
},
{
"value": " if (\n event.detail.location === '/books' ||\n location === '/courses' ||\n location === '/programmes' ||\n location === '/lecturers' ||\n location === '/students'\n )\n showPaginator = false;",
"createdAt": 1591544604806,
"copyCount": 1,
"useCount": 1,
"language": "svelte",
"createdLocation": {
"range": {
"start": {
"line": 29,
"character": 3
},
"end": {
"line": 29,
"character": 3
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/idel-project/client/src/App.svelte"
}
},
{
"value": "function getData(location){\n if(location==='/books') return $Bookstore\n else if(location==='/courses') return $Coursestore\n else if(location==='/programmes') return $Programmestore\n else if(location==='/lecturers') return $Lecturerstore\n else if(location==='/students') return $Studentstore\n}",
"createdAt": 1591543364684,
"copyCount": 1,
"useCount": 1,
"language": "svelte",
"createdLocation": {
"range": {
"start": {
"line": 12,
"character": 0
},
"end": {
"line": 12,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/idel-project/client/src/App.svelte"
}
},
{
"value": ", Bookstore, Coursestore, Programmestore, Lecturerstore, Studentstore",
"createdAt": 1591543304143,
"copyCount": 1,
"useCount": 1,
"language": "svelte",
"createdLocation": {
"range": {
"start": {
"line": 3,
"character": 16
},
"end": {
"line": 3,
"character": 16
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/idel-project/client/src/App.svelte"
}
},
{
"value": "courses",
"createdAt": 1591543059160,
"copyCount": 2,
"useCount": 2,
"language": "svelte",
"createdLocation": {
"range": {
"start": {
"line": 18,
"character": 0
},
"end": {
"line": 18,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/idel-project/client/src/App.svelte"
}
},
{
"value": "students",
"createdAt": 1591543099679,
"copyCount": 1,
"useCount": 1,
"language": "svelte",
"createdLocation": {
"range": {
"start": {
"line": 16,
"character": 18
},
"end": {
"line": 16,
"character": 18
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/idel-project/client/src/App.svelte"
}
},
{
"value": "lecturers",
"createdAt": 1591543048156,
"copyCount": 2,
"useCount": 2,
"language": "svelte",
"createdLocation": {
"range": {
"start": {
"line": 17,
"character": 0
},
"end": {
"line": 17,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/idel-project/client/src/App.svelte"
}
},
{
"value": "programmes",
"createdAt": 1591543066162,
"copyCount": 1,
"useCount": 1,
"language": "svelte",
"createdLocation": {
"range": {
"start": {
"line": 19,
"character": 0
},
"end": {
"line": 19,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/idel-project/client/src/App.svelte"
}
},
{
"value": "students\nlecturers\ncourses\nprogrammes\nbooks",
"createdAt": 1591543021116,
"copyCount": 1,
"useCount": 1,
"language": "typescript",
"createdLocation": {
"range": {
"start": {
"line": 20,
"character": 6
},
"end": {
"line": 20,
"character": 14
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/idel-project/client/src/utils/routes.ts"
}
},
{
"value": " else if(location==='') return $Bookstore\n",
"createdAt": 1591542933524,
"copyCount": 1,
"useCount": 1,
"language": "svelte",
"createdLocation": {
"range": {
"start": {
"line": 17,
"character": 0
},
"end": {
"line": 18,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/idel-project/client/src/App.svelte"
}
},
{
"value": " if(location==='') return $Bookstore\n",
"createdAt": 1591542910517,
"copyCount": 1,
"useCount": 1,
"language": "svelte",
"createdLocation": {
"range": {
"start": {
"line": 16,
"character": 0
},
"end": {
"line": 17,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/idel-project/client/src/App.svelte"
}
},
{
"value": "export const chunk = writable([])\n",
"createdAt": 1591531291016,
"copyCount": 1,
"useCount": 1,
"language": "typescript",
"createdLocation": {
"range": {
"start": {
"line": 84,
"character": 0
},
"end": {
"line": 85,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/idel-project/client/src/stores/main_store.ts"
}
},
{
"value": "chunck",
"createdAt": 1591530128126,
"copyCount": 1,
"useCount": 1,
"language": "typescript",
"createdLocation": {
"range": {
"start": {
"line": 84,
"character": 13
},
"end": {
"line": 84,
"character": 19
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/idel-project/client/src/stores/main_store.ts"
}
},
{
"value": "<Pagination bind:chunk data=\"{$Bookstore}\" />\n",
"createdAt": 1591526500590,
"copyCount": 1,
"useCount": 1,
"language": "svelte",
"createdLocation": {
"range": {
"start": {
"line": 95,
"character": 0
},
"end": {
"line": 96,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/idel-project/client/src/routes/Books.svelte"
}
},
{
"value": " <!-- App bar -->\n <div id=\"app-bar\" class=\"inset-x-0 flex items-center flex-none \">\n <AppBar />\n </div>",
"createdAt": 1591526105172,
"copyCount": 1,
"useCount": 1,
"language": "svelte",
"createdLocation": {
"range": {
"start": {
"line": 42,
"character": 1
},
"end": {
"line": 45,
"character": 10
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/idel-project/client/src/App.svelte"
}
},
{
"value": "",
"createdAt": 1591523539214,
"copyCount": 1,
"useCount": 1,
"language": "typescript",
"createdLocation": {
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 0,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/web-apps/idel-project/encrypt.ts/encrypt.ts"
}
},
{
"value": "#include <iostream>\n#include <cstring>\n#include <sstream>\n#include <iterator>\n#include <numeric>\n#include <algorithm>\n#include <string>\n#include <fstream>\n#include <vector>\n#include <algorithm>\n#include <limits>\nusing namespace std;\n\n// Global variables\nconst string filename = \"geyser.txt\";\nstring heading;\n\n// type difinition for each line\nstruct entry\n{\n int index;\n double length;\n int waitTime;\n};\n\n// List of all entries read from the file\nvector<entry> entries;\n\n// Used to find the max and min\ndouble avgLength = std::numeric_limits<double>::min();\ndouble maxLength = std::numeric_limits<double>::min();\ndouble minLength = std::numeric_limits<double>::max();\nint avgTime = std::numeric_limits<int>::max();\nint maxTime = std::numeric_limits<int>::min();\nint minTime = std::numeric_limits<int>::max();\n\n// Function Prototypes\nifstream openFile(string filename);\nstring outputFile(bool output);\nvoid parseFileData(ifstream inputFile);\nentry split(string str);\nbool isHeading(string str);\nvoid displayMenu();\nvoid getReply(int opt);\nvoid displayStats();\nvoid initStats();\nvoid calcStats(double length, int time);\nvoid addEntry();\nvoid updateEntry();\nvoid deleteEntry();\nvoid updateFileContent();\n\n// Main Programme\nint main()\n{\n // Open and parse the file\n parseFileData(openFile(filename));\n displayMenu();\n return 0;\n}\n\n// Function definitions\n// Opens and returns the file\nifstream openFile(string filename)\n{\n ifstream inputFile(filename);\n if (!inputFile)\n {\n cerr << \"Couldn't open \" << filename << \" for reading\\n\";\n system(\"PAUSE\");\n exit(1);\n }\n else\n return inputFile;\n}\n\n// Parse the file into a vector of entries\nvoid parseFileData(ifstream inputFile)\n{\n string readLine;\n while (getline(inputFile, readLine))\n {\n if (!isHeading(readLine))\n {\n entry newEntry = split(readLine);\n entries.push_back(newEntry);\n if (entries.size() == 1)\n initStats();\n calcStats(newEntry.length, newEntry.waitTime);\n }\n else\n heading = readLine;\n }\n inputFile.close();\n}\n\n//checks if line contains heading. returns false if is data\nbool isHeading(string str)\n{\n transform(str.begin(), str.end(), str.begin(), ::tolower);\n size_t found = str.find(\"index\");\n if (found != string::npos)\n {\n // cout << \"This is the first line which is the column title \" << endl;\n return true;\n }\n return false;\n}\n\n// split up the lines to extract the individual parts\nentry split(string str)\n{\n std::string text = str;\n std::istringstream iss(text);\n std::vector<std::string> results(std::istream_iterator<std::string>{iss},\n std::istream_iterator<std::string>());\n entry wordsInString;\n wordsInString.index = stoi(results[0]);\n wordsInString.length = stod(results[1]);\n wordsInString.waitTime = stoi(results[2]);\n // cout << \"Logging: \" << wordsInString.index << wordsInString.length << wordsInString.waitTime << endl;\n return wordsInString;\n}\n\nvoid initStats()\n{\n avgLength = entries[0].length;\n maxLength = entries[0].length;\n minLength = entries[0].length;\n avgTime = entries[0].waitTime;\n maxTime = entries[0].waitTime;\n minTime = entries[0].waitTime;\n}\n\n// Finds the maximum and minimum length\nvoid calcStats(double length, int time)\n{\n if (length > maxLength)\n maxLength = length;\n else if (length < minLength)\n minLength = length;\n else if (avgLength <= length && avgLength >= length)\n avgLength = maxLength + minLength / 2;\n\n if (time > maxTime)\n maxTime = time;\n else if (time < minTime)\n minTime = time;\n else if (avgLength <= length && avgLength >= length)\n avgTime = maxTime + minTime / 2;\n}\n\nstring outputFile(bool output = true)\n{\n if (output)\n cout << heading << endl;\n int n = entries.size();\n stringstream content;\n\n for (int i = 0; i < n; i++)\n {\n content << entries[i].index << \" \" << entries[i].length << \" \" << entries[i].waitTime << endl;\n if (output)\n cout << content.str();\n }\n return content.str();\n}\n\nvoid displayStats()\n{\n cout << \"Printing Stats: \\n\\t\"\n << \"Max Length:\" << maxLength << \"\\n\\t\"\n << \"Min Length:\" << minLength << \"\\n\\t\"\n << \"Avg Length:\" << avgLength << \"\\n\\t\"\n << \"Max Time:\" << maxTime << \"\\n\\t\"\n << \"Max Time:\" << minTime << \"\\n\\t\"\n << \"Avg Time:\" << avgTime << \"\\n\\n\"\n << endl;\n}\n\nvoid displayMenu()\n{\n string readInput = \"\";\n while (readInput != \"q\" || (stoi(readInput) > 0 && stoi(readInput) < 11))\n {\n cout << \"\\n\\nWelcome to Geyser\\nNote: an invalid option terminates the program...\\nPease select an option..\\n\\t\";\n cout << \"1. Read the file\\n\\t\"\n << \"2. Get statistics\\n\\t\"\n /* << \"3. Find average length\\n\\t\"\n << \"4. Find maximum length\\n\\t\"\n << \"5. Find minimum length\\n\\t\"\n << \"6. Find average time\\n\\t\"\n << \"7. Find maximum time\\n\\t\"\n << \"8. Find minimum time\\n\\t\" */\n // uncomment if you need it and add the reply\n << \"3. Add new entry\\n\\t\"\n << \"4. Update entry\\n\\t\"\n << \"5. Delete entry\" << endl;\n cout << \"Enter your option: \";\n cin >> readInput;\n getReply(stoi(readInput));\n }\n}\n\nvoid getReply(int opt)\n{\n switch (opt)\n {\n case 1:\n outputFile();\n break;\n case 2:\n displayStats();\n break;\n case 3:\n addEntry();\n break;\n case 4:\n updateEntry();\n break;\n case 5:\n deleteEntry();\n break;\n }\n}\n\nvoid addEntry()\n{\n cout << \"Adding a new entry\" << endl;\n string length, time;\n cout << \"\\n\\tenter the length(numeric): \";\n cin >> length;\n cout << \"\\n\\tenter the time(numeric): \";\n cin >> time;\n entry newEntry;\n newEntry.index = entries.size() + 1;\n newEntry.length = stod(length);\n newEntry.waitTime = stoi(time);\n entries.push_back(newEntry);\n updateFileContent();\n cout << \"New entry added @ Index: \" << entries.size() << endl;\n}\n\nvoid updateEntry()\n{\n cout << \"Updating an entry\" << endl;\n string length, time;\n int index;\n cout << \"\\n\\tenter the index of the entry(numeric): \";\n cin >> index;\n cout << \"\\n\\tenter the length(numeric): \";\n cin >> length;\n cout << \"\\n\\tenter the time(numeric): \";\n cin >> time;\n index -= 1;\n cout << \"Entry @ \" << entries[index].index << \" is: \" << entries[index].length << endl;\n entries[index].length = stod(length);\n entries[index].waitTime = stoi(time);\n updateFileContent();\n cout << \"Entry updated @ Index: \" << entries[index].index << endl; //<< \" length: \" << entries[index].length << \" time: \" << entries[index].waitTime << endl;\n}\n\nvoid deleteEntry()\n{\n cout << \"Deleting an entry\" << endl;\n int index;\n cout << \"\\n\\tenter the index of the entry(numeric): \";\n cin >> index;\n index -= 1;\n entries.erase(entries.begin() + index);\n updateFileContent();\n cout << \"Entry deleted @ Index: \" << index << endl;\n}\n\nvoid updateFileContent()\n{\n char file_name[filename.size() + 1];\n strcpy(file_name, filename.c_str());\n\n // remove the original file\n remove(file_name);\n // create a new temp file\n ofstream myfile;\n myfile.open(filename, ofstream::out);\n myfile << outputFile(false);\n myfile.close();\n}",
"createdAt": 1591438063078,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 286,
"character": 1
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "(numeric)",
"createdAt": 1591437854558,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 230,
"character": 33
},
"end": {
"line": 230,
"character": 42
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "#include <iostream>\n#include <cstring>\n#include <sstream>\n#include <iterator>\n#include <numeric>\n#include <algorithm>\n#include <string>\n#include <fstream>\n#include <vector>\n#include <algorithm>\n#include <limits>\nusing namespace std;\n\n// Global variables\nconst string filename = \"geyser.txt\";\nstring heading;\n\n// type difinition for each line\nstruct entry\n{\n int index;\n double length;\n int waitTime;\n};\n\n// List of all entries read from the file\nvector<entry> entries;\n\n// Used to find the max and min\ndouble avgLength = std::numeric_limits<double>::min();\ndouble maxLength = std::numeric_limits<double>::min();\ndouble minLength = std::numeric_limits<double>::max();\nint avgTime = std::numeric_limits<int>::max();\nint maxTime = std::numeric_limits<int>::min();\nint minTime = std::numeric_limits<int>::max();\n\n// Function Prototypes\nifstream openFile(string filename);\nstring outputFile(bool output);\nvoid parseFileData(ifstream inputFile);\nentry split(string str);\nbool isHeading(string str);\nvoid displayMenu();\nvoid getReply(int opt);\nvoid displayStats();\nvoid initStats();\nvoid calcStats(double length, int time);\nvoid addEntry();\nvoid updateEntry();\nvoid deleteEntry();\nvoid updateFileContent();\n\n// Main Programme\nint main()\n{\n // Open and parse the file\n parseFileData(openFile(filename));\n displayMenu();\n return 0;\n}\n\n// Function definitions\n// Opens and returns the file\nifstream openFile(string filename)\n{\n ifstream inputFile(filename);\n if (!inputFile)\n {\n cerr << \"Couldn't open \" << filename << \" for reading\\n\";\n system(\"PAUSE\");\n exit(1);\n }\n else\n return inputFile;\n}\n\n// Parse the file into a vector of entries\nvoid parseFileData(ifstream inputFile)\n{\n string readLine;\n while (getline(inputFile, readLine))\n {\n if (!isHeading(readLine))\n {\n entry newEntry = split(readLine);\n entries.push_back(newEntry);\n if (entries.size() == 1)\n initStats();\n calcStats(newEntry.length, newEntry.waitTime);\n }\n else\n heading = readLine;\n }\n inputFile.close();\n}\n\n//checks if line contains heading. returns false if is data\nbool isHeading(string str)\n{\n transform(str.begin(), str.end(), str.begin(), ::tolower);\n size_t found = str.find(\"index\");\n if (found != string::npos)\n {\n // cout << \"This is the first line which is the column title \" << endl;\n return true;\n }\n return false;\n}\n\n// split up the lines to extract the individual parts\nentry split(string str)\n{\n std::string text = str;\n std::istringstream iss(text);\n std::vector<std::string> results(std::istream_iterator<std::string>{iss},\n std::istream_iterator<std::string>());\n entry wordsInString;\n wordsInString.index = stoi(results[0]);\n wordsInString.length = stod(results[1]);\n wordsInString.waitTime = stoi(results[2]);\n // cout << \"Logging: \" << wordsInString.index << wordsInString.length << wordsInString.waitTime << endl;\n return wordsInString;\n}\n\nvoid initStats()\n{\n avgLength = entries[0].length;\n maxLength = entries[0].length;\n minLength = entries[0].length;\n avgTime = entries[0].waitTime;\n maxTime = entries[0].waitTime;\n minTime = entries[0].waitTime;\n}\n\n// Finds the maximum and minimum length\nvoid calcStats(double length, int time)\n{\n if (length > maxLength)\n maxLength = length;\n else if (length < minLength)\n minLength = length;\n else if (avgLength <= length && avgLength >= length)\n avgLength = maxLength + minLength / 2;\n\n if (time > maxTime)\n maxTime = time;\n else if (time < minTime)\n minTime = time;\n else if (avgLength <= length && avgLength >= length)\n avgTime = maxTime + minTime / 2;\n}\n\nstring outputFile(bool output = true)\n{\n if (output)\n cout << heading << endl;\n int n = entries.size();\n stringstream content;\n\n for (int i = 0; i < n; i++)\n {\n content << entries[i].index << \" \" << entries[i].length << \" \" << entries[i].waitTime << endl;\n if (output)\n cout << content.str();\n }\n return content.str();\n}\n\nvoid displayStats()\n{\n cout << \"Printing Stats: \\n\\t\"\n << \"Max Length:\" << maxLength << \"\\n\\t\"\n << \"Min Length:\" << minLength << \"\\n\\t\"\n << \"Avg Length:\" << avgLength << \"\\n\\t\"\n << \"Max Time:\" << maxTime << \"\\n\\t\"\n << \"Max Time:\" << minTime << \"\\n\\t\"\n << \"Avg Time:\" << avgTime << \"\\n\\n\"\n << endl;\n}\n\nvoid displayMenu()\n{\n string readInput = \"\";\n while (readInput != \"q\" || (stoi(readInput) > 0 && stoi(readInput) < 11))\n {\n cout << \"\\n\\nWelcome to Geyser\\nNote: an invalid option terminates the program...\\nPease select an option..\\n\\t\";\n cout << \"1. Read the file\\n\\t\"\n << \"2. Get statistics\\n\\t\"\n /* << \"3. Find average length\\n\\t\"\n << \"4. Find maximum length\\n\\t\"\n << \"5. Find minimum length\\n\\t\"\n << \"6. Find average time\\n\\t\"\n << \"7. Find maximum time\\n\\t\"\n << \"8. Find minimum time\\n\\t\" */\n // uncomment if you need it and add the reply\n << \"3. Add new entry\\n\\t\"\n << \"4. Update entry\\n\\t\"\n << \"5. Delete entry\" << endl;\n cout << \"Enter your option: \";\n cin >> readInput;\n getReply(stoi(readInput));\n }\n}\n\nvoid getReply(int opt)\n{\n switch (opt)\n {\n case 1:\n outputFile();\n break;\n case 2:\n displayStats();\n break;\n case 3:\n addEntry();\n break;\n case 4:\n updateEntry();\n break;\n case 5:\n deleteEntry();\n break;\n }\n}\n\nvoid addEntry()\n{\n cout << \"Adding a new entry\" << endl;\n string length, time;\n cout << \"\\n\\tenter the length: \";\n cin >> length;\n cout << \"\\n\\tenter the time: \";\n cin >> time;\n entry newEntry;\n newEntry.index = entries.size() + 1;\n newEntry.length = stod(length);\n newEntry.waitTime = stoi(time);\n entries.push_back(newEntry);\n updateFileContent();\n cout << \"New entry added @ Index: \" << entries.size() << endl;\n}\n\nvoid updateEntry()\n{\n cout << \"Updating an entry\" << endl;\n string length, time;\n int index;\n cout << \"\\n\\tenter the index of the entry: \";\n cin >> index;\n cout << \"\\n\\tenter the length: \";\n cin >> length;\n cout << \"\\n\\tenter the time: \";\n cin >> time;\n index -= 1;\n cout << \"Entry @ \" << entries[index].index << \" is: \" << entries[index].length << endl;\n entries[index].length = stod(length);\n entries[index].waitTime = stoi(time);\n updateFileContent();\n cout << \"Entry updated @ Index: \" << entries[index].index << \" length: \" << entries[index].length << \" time: \" << entries[index].waitTime << endl;\n}\n\nvoid deleteEntry()\n{\n cout << \"Deleting an entry\" << endl;\n int index;\n cout << \"\\n\\tenter the index of the entry: \";\n cin >> index;\n index -= 1;\n entries.erase(entries.begin() + index);\n updateFileContent();\n cout << \"Entry deleted @ Index: \" << index << endl;\n}\n\nvoid updateFileContent()\n{\n char file_name[filename.size() + 1];\n strcpy(file_name, filename.c_str());\n\n // remove the original file\n remove(file_name);\n // create a new temp file\n ofstream myfile;\n myfile.open(filename, ofstream::out);\n myfile << outputFile(false);\n myfile.close();\n}",
"createdAt": 1591437722647,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 286,
"character": 1
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "Pease select an option...\\n",
"createdAt": 1591437657654,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 185,
"character": 40
},
"end": {
"line": 185,
"character": 40
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "#include <iostream>\n#include <cstring>\n#include <sstream>\n#include <iterator>\n#include <numeric>\n#include <algorithm>\n#include <string>\n#include <fstream>\n#include <vector>\n#include <algorithm>\n#include <limits>\nusing namespace std;\n\n// Global variables\nconst string filename = \"geyser.txt\";\nstring heading;\n\n// type difinition for each line\nstruct entry\n{\n int index;\n double length;\n int waitTime;\n};\n\n// List of all entries read from the file\nvector<entry> entries;\n\n// Used to find the max and min\ndouble avgLength = std::numeric_limits<double>::min();\ndouble maxLength = std::numeric_limits<double>::min();\ndouble minLength = std::numeric_limits<double>::max();\nint avgTime = std::numeric_limits<int>::max();\nint maxTime = std::numeric_limits<int>::min();\nint minTime = std::numeric_limits<int>::max();\n\n// Function Prototypes\nifstream openFile(string filename);\nstring outputFile(bool output);\nvoid parseFileData(ifstream inputFile);\nentry split(string str);\nbool isHeading(string str);\nvoid displayMenu();\nvoid getReply(int opt);\nvoid displayStats();\nvoid initStats();\nvoid calcStats(double length, int time);\nvoid addEntry();\nvoid updateEntry();\nvoid deleteEntry();\nvoid updateFileContent();\n\n// Main Programme\nint main()\n{\n // Open and parse the file\n parseFileData(openFile(filename));\n displayMenu();\n return 0;\n}\n\n// Function definitions\n// Opens and returns the file\nifstream openFile(string filename)\n{\n ifstream inputFile(filename);\n if (!inputFile)\n {\n cerr << \"Couldn't open \" << filename << \" for reading\\n\";\n system(\"PAUSE\");\n exit(1);\n }\n else\n return inputFile;\n}\n\n// Parse the file into a vector of entries\nvoid parseFileData(ifstream inputFile)\n{\n string readLine;\n while (getline(inputFile, readLine))\n {\n if (!isHeading(readLine))\n {\n entry newEntry = split(readLine);\n entries.push_back(newEntry);\n if (entries.size() == 1)\n initStats();\n calcStats(newEntry.length, newEntry.waitTime);\n }\n else\n heading = readLine;\n }\n inputFile.close();\n}\n\n//checks if line contains heading. returns false if is data\nbool isHeading(string str)\n{\n transform(str.begin(), str.end(), str.begin(), ::tolower);\n size_t found = str.find(\"index\");\n if (found != string::npos)\n {\n // cout << \"This is the first line which is the column title \" << endl;\n return true;\n }\n return false;\n}\n\n// split up the lines to extract the individual parts\nentry split(string str)\n{\n std::string text = str;\n std::istringstream iss(text);\n std::vector<std::string> results(std::istream_iterator<std::string>{iss},\n std::istream_iterator<std::string>());\n entry wordsInString;\n wordsInString.index = stoi(results[0]);\n wordsInString.length = stod(results[1]);\n wordsInString.waitTime = stoi(results[2]);\n // cout << \"Logging: \" << wordsInString.index << wordsInString.length << wordsInString.waitTime << endl;\n return wordsInString;\n}\n\nvoid initStats()\n{\n avgLength = entries[0].length;\n maxLength = entries[0].length;\n minLength = entries[0].length;\n avgTime = entries[0].waitTime;\n maxTime = entries[0].waitTime;\n minTime = entries[0].waitTime;\n}\n\n// Finds the maximum and minimum length\nvoid calcStats(double length, int time)\n{\n if (length > maxLength)\n maxLength = length;\n else if (length < minLength)\n minLength = length;\n else if (avgLength <= length && avgLength >= length)\n avgLength = maxLength + minLength / 2;\n\n if (time > maxTime)\n maxTime = time;\n else if (time < minTime)\n minTime = time;\n else if (avgLength <= length && avgLength >= length)\n avgTime = maxTime + minTime / 2;\n}\n\nstring outputFile(bool output = true)\n{\n if (output)\n cout << heading << endl;\n int n = entries.size();\n stringstream content;\n\n for (int i = 0; i < n; i++)\n {\n content << entries[i].index << \" \" << entries[i].length << \" \" << entries[i].waitTime << endl;\n if (output)\n cout << content.str();\n }\n return content.str();\n}\n\nvoid displayStats()\n{\n cout << \"Printing Stats: \\n\\t\"\n << \"Max Length:\" << maxLength << \"\\n\\t\"\n << \"Min Length:\" << minLength << \"\\n\\t\"\n << \"Avg Length:\" << avgLength << \"\\n\\t\"\n << \"Max Time:\" << maxTime << \"\\n\\t\"\n << \"Max Time:\" << minTime << \"\\n\\t\"\n << \"Avg Time:\" << avgTime << \"\\n\\n\"\n << endl;\n}\n\nvoid displayMenu()\n{\n string readInput = \"\";\n while (readInput != \"q\" || (stoi(readInput) > 0 && stoi(readInput) < 11))\n {\n cout << \"\\n\\nWelcome to Geyser\\nplease select an option... \\n\\t\";\n cout << \"1. Read the file\\n\\t\"\n << \"2. Get statistics\\n\\t\"\n /* << \"3. Find average length\\n\\t\"\n << \"4. Find maximum length\\n\\t\"\n << \"5. Find minimum length\\n\\t\"\n << \"6. Find average time\\n\\t\"\n << \"7. Find maximum time\\n\\t\"\n << \"8. Find minimum time\\n\\t\" */\n // uncomment if you need it and add the reply\n << \"3. Add new entry\\n\\t\"\n << \"4. Update entry\\n\\t\"\n << \"5. Delete entry\" << endl;\n cout << \"Enter your option: \";\n cin >> readInput;\n getReply(stoi(readInput));\n }\n}\n\nvoid getReply(int opt)\n{\n switch (opt)\n {\n case 1:\n outputFile();\n break;\n case 2:\n displayStats();\n break;\n case 3:\n addEntry();\n break;\n case 4:\n updateEntry();\n break;\n case 5:\n deleteEntry();\n break;\n }\n}\n\nvoid addEntry()\n{\n cout << \"Adding a new entry\" << endl;\n string length, time;\n cout << \"\\n\\tenter the length: \";\n cin >> length;\n cout << \"\\n\\tenter the time: \";\n cin >> time;\n entry newEntry;\n newEntry.index = entries.size() + 1;\n newEntry.length = stod(length);\n newEntry.waitTime = stoi(time);\n entries.push_back(newEntry);\n updateFileContent();\n cout << \"New entry added @ Index: \" << entries.size() << endl;\n}\n\nvoid updateEntry()\n{\n cout << \"Updating an entry\" << endl;\n string length, time;\n int index;\n cout << \"\\n\\tenter the index of the entry: \";\n cin >> index;\n cout << \"\\n\\tenter the length: \";\n cin >> length;\n cout << \"\\n\\tenter the time: \";\n cin >> time;\n index -= 1;\n cout << \"Entry @ \" << entries[index].index << \" is: \" << entries[index].length << endl;\n entries[index].length = stod(length);\n entries[index].waitTime = stoi(time);\n updateFileContent();\n cout << \"Entry updated @ Index: \" << entries[index].index << \" length: \" << entries[index].length << \" time: \" << entries[index].waitTime << endl;\n}\n\nvoid deleteEntry()\n{\n cout << \"Deleting an entry\" << endl;\n int index;\n cout << \"\\n\\tenter the index of the entry: \";\n cin >> index;\n index -= 1;\n entries.erase(entries.begin() + index);\n updateFileContent();\n cout << \"Entry deleted @ Index: \" << index << endl;\n}\n\nvoid updateFileContent()\n{\n char file_name[filename.size() + 1];\n strcpy(file_name, filename.c_str());\n\n // remove the original file\n remove(file_name);\n // create a new temp file\n ofstream myfile;\n myfile.open(filename, ofstream::out);\n myfile << outputFile(false);\n myfile.close();\n}",
"createdAt": 1591437431576,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 286,
"character": 1
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "#include <iostream>\n#include <cstring>\n#include <sstream>\n#include <iterator>\n#include <numeric>\n#include <algorithm>\n#include <string>\n#include <fstream>\n#include <vector>\n#include <algorithm>\n#include <limits>\nusing namespace std;\n\n// Global variables\nconst string filename = \"geyser.txt\";\nstring heading;\n\n// type difinition for each line\nstruct entry\n{\n int index;\n double length;\n int waitTime;\n};\n\n// List of all entries read from the file\nvector<entry> entries;\n\n// Used to find the max and min\ndouble avgLength = std::numeric_limits<double>::min();\ndouble maxLength = std::numeric_limits<double>::min();\ndouble minLength = std::numeric_limits<double>::max();\nint avgTime = std::numeric_limits<int>::max();\nint maxTime = std::numeric_limits<int>::min();\nint minTime = std::numeric_limits<int>::max();\n\n// Function Prototypes\nifstream openFile(string filename);\nstring outputFile(bool output);\nvoid parseFileData(ifstream inputFile);\nentry split(string str);\nbool isHeading(string str);\nvoid displayMenu();\nvoid getReply(int opt);\nvoid displayStats();\nvoid initStats();\nvoid calcStats(double length, int time);\nvoid addEntry();\nvoid updateEntry();\nvoid deleteEntry();\nvoid updateFileContent();\n\n// Main Programme\nint main()\n{\n // Open and parse the file\n parseFileData(openFile(filename));\n displayMenu();\n return 0;\n}\n\n// Function definitions\n// Opens and returns the file\nifstream openFile(string filename)\n{\n ifstream inputFile(filename);\n if (!inputFile)\n {\n cerr << \"Couldn't open \" << filename << \" for reading\\n\";\n system(\"PAUSE\");\n exit(1);\n }\n else\n return inputFile;\n}\n\n// Parse the file into a vector of entries\nvoid parseFileData(ifstream inputFile)\n{\n string readLine;\n while (getline(inputFile, readLine))\n {\n if (!isHeading(readLine))\n {\n entry newEntry = split(readLine);\n entries.push_back(newEntry);\n if (entries.size() == 1)\n initStats();\n calcStats(newEntry.length, newEntry.waitTime);\n }\n else\n heading = readLine;\n }\n inputFile.close();\n}\n\n//checks if line contains heading. returns false if is data\nbool isHeading(string str)\n{\n transform(str.begin(), str.end(), str.begin(), ::tolower);\n size_t found = str.find(\"index\");\n if (found != string::npos)\n {\n // cout << \"This is the first line which is the column title \" << endl;\n return true;\n }\n return false;\n}\n\n// split up the lines to extract the individual parts\nentry split(string str)\n{\n std::string text = str;\n std::istringstream iss(text);\n std::vector<std::string> results(std::istream_iterator<std::string>{iss},\n std::istream_iterator<std::string>());\n entry wordsInString;\n wordsInString.index = stoi(results[0]);\n wordsInString.length = stod(results[1]);\n wordsInString.waitTime = stoi(results[2]);\n // cout << \"Logging: \" << wordsInString.index << wordsInString.length << wordsInString.waitTime << endl;\n return wordsInString;\n}\n\nvoid initStats()\n{\n avgLength = entries[0].length;\n maxLength = entries[0].length;\n minLength = entries[0].length;\n avgTime = entries[0].waitTime;\n maxTime = entries[0].waitTime;\n minTime = entries[0].waitTime;\n}\n\n// Finds the maximum and minimum length\nvoid calcStats(double length, int time)\n{\n if (length > maxLength)\n maxLength = length;\n else if (length < minLength)\n minLength = length;\n else if (avgLength <= length && avgLength >= length)\n avgLength = maxLength + minLength / 2;\n\n if (time > maxTime)\n maxTime = time;\n else if (time < minTime)\n minTime = time;\n else if (avgLength <= length && avgLength >= length)\n avgTime = maxTime + minTime / 2;\n}\n\nstring outputFile(bool output = true)\n{\n if (output)\n cout << heading << endl;\n int n = entries.size();\n stringstream content;\n\n for (int i = 0; i < n; i++)\n {\n content << entries[i].index << \" \" << entries[i].length << \" \" << entries[i].waitTime << endl;\n if (output)\n cout << content.str();\n }\n return content.str();\n}\n\nvoid displayStats()\n{\n cout << \"Printing Stats: \\n\\t\"\n << \"Max Length:\" << maxLength << \"\\n\\t\"\n << \"Min Length:\" << minLength << \"\\n\\t\"\n << \"Avg Length:\" << avgLength << \"\\n\\t\"\n << \"Max Time:\" << maxTime << \"\\n\\t\"\n << \"Max Time:\" << minTime << \"\\n\\t\"\n << \"Avg Time:\" << avgTime << \"\\n\\n\"\n << endl;\n}\n\nvoid displayMenu()\n{\n string readInput = \"\";\n while (readInput != \"q\" || (stoi(readInput) > 0 && stoi(readInput) < 11))\n {\n cout << \"\\n\\nWelcome to Geyser\\nplease select an option... \\n\\t\";\n cout << \"1. Read the file\\n\\t\"\n << \"2. Get statistics\\n\\t\"\n /* << \"3. Find average length\\n\\t\"\n << \"4. Find maximum length\\n\\t\"\n << \"5. Find minimum length\\n\\t\"\n << \"6. Find average time\\n\\t\"\n << \"7. Find maximum time\\n\\t\"\n << \"8. Find minimum time\\n\\t\" */\n // uncomment if you need it and add the reply\n << \"3. Add new entry\\n\\t\"\n << \"4. Update entry\\n\\t\"\n << \"5. Delete entry\" << endl;\n cout << \"Enter your option: \";\n cin >> readInput;\n getReply(stoi(readInput));\n }\n}\n\nvoid getReply(int opt)\n{\n switch (opt)\n {\n case 1:\n outputFile();\n break;\n case 2:\n displayStats();\n break;\n case 3:\n addEntry();\n break;\n case 4:\n updateEntry();\n break;\n case 5:\n deleteEntry();\n break;\n }\n}\n\nvoid addEntry()\n{\n cout << \"Adding a new entry\" << endl;\n string length, time;\n cout << \"\\n\\tenter the length: \";\n cin >> length;\n cout << \"\\n\\tenter the time: \";\n cin >> time;\n entry newEntry;\n newEntry.index = entries.size() + 1;\n newEntry.length = stod(length);\n newEntry.waitTime = stoi(time);\n entries.push_back(newEntry);\n updateFileContent();\n cout << \"New entry added @ Index: \" << entries.size() << endl;\n}\n\nvoid updateEntry()\n{\n cout << \"Updating an entry\" << endl;\n string length, time;\n int index;\n cout << \"\\n\\tenter the index of the entry: \";\n cin >> index;\n cout << \"\\n\\tenter the length: \";\n cin >> length;\n cout << \"\\n\\tenter the time: \";\n cin >> time;\n index -= 1;\n cout << \"Entry @ \" << entries[index].index << \" is: \" << entries[index].length << endl;\n entries[index].length = stod(length);\n entries[index].waitTime = stoi(time);\n updateFileContent();\n cout << \"Entry updated @ Index: \" << entries[index].index << \" length: \" << entries[index].length << \" time: \" << entries[index].waitTime << endl;\n}\n\nvoid deleteEntry()\n{\n cout << \"Deleting an entry\" << endl;\n int index;\n cout << \"\\n\\tenter the index of the entry: \";\n cin >> index; index -= 1;\n entries.erase(entries.begin() + index);\n updateFileContent();\n cout << \"Entry deleted @ Index: \" << index << endl;\n}\n\nvoid updateFileContent()\n{\n char file_name[filename.size() + 1];\n strcpy(file_name, filename.c_str());\n\n // remove the original file\n remove(file_name);\n // create a new temp file\n ofstream myfile;\n myfile.open(filename, ofstream::out);\n myfile << outputFile(false);\n myfile.close();\n}",
"createdAt": 1591437361241,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 285,
"character": 1
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": " index -= 1;\n",
"createdAt": 1591437274843,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 254,
"character": 0
},
"end": {
"line": 255,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "1 3.6 79\n2 1.8 54\n3 3.333 74\n4 2.283 62\n5 4.533 85\n6 2.883 55\n7 4.7 88\n8 3.6 85\n9 1.95 51\n10 4.35 85\n11 1.833 54\n12 3.917 84\n13 4.2 78\n14 1.75 47\n15 4.7 83\n16 2.167 52\n17 1.75 62\n18 4.8 84\n19 1.6 52\n20 4.25 79\n21 1.8 51\n22 1.75 47\n23 3.45 78\n24 3.067 69\n25 4.533 74\n26 3.6 83\n27 1.967 55\n28 4.083 76\n29 3.85 78\n30 4.433 79\n31 4.3 73\n32 4.467 77\n33 3.367 66\n34 4.033 80\n35 3.833 74\n36 2.017 52\n37 1.867 48\n38 4.833 80\n39 1.833 59\n40 4.783 90\n41 4.35 80\n42 1.883 58\n43 4.567 84\n44 1.75 58\n45 4.533 73\n46 3.317 83\n47 3.833 64\n48 2.1 53\n49 4.633 82\n50 2 59\n51 4.8 75\n52 4.716 90\n53 1.833 54\n54 4.833 80\n55 1.733 54\n56 4.883 83\n57 3.717 71\n58 1.667 64\n59 4.567 77\n60 4.317 81\n61 2.233 59\n62 4.5 84\n63 1.75 48\n64 4.8 82\n65 1.817 60\n66 4.4 92\n67 4.167 78\n68 4.7 78\n69 2.067 65\n70 4.7 73\n71 4.033 82\n72 1.967 56\n73 4.5 79\n74 4 71\n75 1.983 62\n76 5.067 76\n77 2.017 60\n78 4.567 78\n79 3.883 76\n80 3.6 83\n81 4.133 75\n82 4.333 82\n83 4.1 70\n84 2.633 65\n85 4.067 73\n86 4.933 88\n87 3.95 76\n88 4.517 80\n89 2.167 48\n90 4 86\n91 2.2 60\n92 4.333 90\n93 1.867 50\n94 4.817 78\n95 1.833 63\n96 4.3 72\n97 4.667 84\n98 3.75 75\n99 1.867 51\n100 4.9 82\n101 2.483 62\n102 4.367 88\n103 2.1 49\n104 4.5 83\n105 4.05 81\n106 1.867 47\n107 4.7 84\n108 1.783 52\n109 4.85 86\n110 3.683 81\n111 4.733 75\n112 2.3 59\n113 4.9 89\n114 4.417 79\n115 1.7 59\n116 4.633 81\n117 2.317 50\n118 4.6 85\n119 1.817 59\n120 4.417 87\n121 2.617 53\n122 4.067 69\n123 4.25 77\n124 1.967 56\n125 4.6 88\n126 3.767 81\n127 1.917 45\n128 4.5 82\n129 2.267 55\n130 4.65 90\n131 1.867 45\n132 4.167 83\n133 2.8 56\n134 4.333 89\n135 1.833 46\n136 4.383 82\n137 1.883 51\n138 4.933 86\n139 2.033 53\n140 3.733 79\n141 4.233 81\n142 2.233 60\n143 4.533 82\n144 4.817 77\n145 4.333 76\n146 1.983 59\n147 4.633 80\n148 2.017 49\n149 5.1 96\n150 1.8 53\n151 5.033 77\n152 4 77\n153 2.4 65\n154 4.6 81\n155 3.567 71\n156 4 70\n157 4.5 81\n158 4.083 93\n159 1.8 53\n160 3.967 89\n161 2.2 45\n162 4.15 86\n163 2 58\n164 3.833 78\n165 3.5 66\n166 4.583 76\n167 2.367 63\n168 5 88\n169 1.933 52\n170 4.617 93\n171 1.917 49\n172 2.083 57\n173 4.583 77\n174 3.333 68\n175 4.167 81\n176 4.333 81\n177 4.5 73\n178 2.417 50\n179 4 85\n180 4.167 74\n181 1.883 55\n182 4.583 77\n183 4.25 83\n184 3.767 83\n185 2.033 51\n186 4.433 78\n187 4.083 84\n188 1.833 46\n189 4.417 83\n190 2.183 55\n191 4.8 81\n192 1.833 57\n193 4.8 76\n194 4.1 84\n195 3.966 77\n196 4.233 81\n197 3.5 87\n198 4.366 77\n199 2.25 51\n200 4.667 78\n201 2.1 60\n202 4.35 82\n203 4.133 91\n204 1.867 53\n205 4.6 78\n206 1.783 46\n207 4.367 77\n208 3.85 84\n209 1.933 49\n210 4.5 83\n211 2.383 71\n212 4.7 80\n213 1.867 49\n214 3.833 75\n215 3.417 64\n216 4.233 76\n217 2.4 53\n218 4.8 94\n219 2 55\n220 4.15 76\n221 1.867 50\n222 4.267 82\n223 1.75 54\n224 4.483 75\n225 4 78\n226 4.117 79\n227 4.083 78\n228 4.267 78\n229 3.917 70\n230 4.55 79\n231 4.083 70\n232 2.417 54\n233 4.183 86\n234 2.217 50\n235 4.45 90\n236 1.883 54\n237 1.85 54\n238 4.283 77\n239 3.95 79\n240 2.333 64\n241 4.15 75\n242 2.35 47\n243 4.933 86\n244 2.9 63\n245 4.583 85\n246 3.833 82\n247 2.083 57\n248 4.367 82\n249 2.133 67\n250 4.35 74\n251 2.2 54\n252 4.45 83\n253 3.567 73\n254 4.5 73\n255 4.15 88\n256 3.817 80\n257 3.917 71\n258 4.45 83\n259 2 56\n260 4.283 79\n261 4.767 78\n262 4.533 84\n263 1.85 58\n264 4.25 83\n265 1.983 43\n266 2.25 60\n267 4.75 75\n268 4.117 81\n269 2.15 46\n270 4.417 90\n271 1.817 46\n272 4.467 74\n",
"createdAt": 1591436968186,
"copyCount": 1,
"useCount": 1,
"language": "plaintext",
"createdLocation": {
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 272,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser.txt"
}
},
{
"value": "#include <iostream>\n#include <cstring>\n#include <sstream>\n#include <iterator>\n#include <numeric>\n#include <algorithm>\n#include <string>\n#include <fstream>\n#include <vector>\n#include <algorithm>\n#include <limits>\nusing namespace std;\n\n// Global variables\nconst string filename = \"geyser.txt\";\nstring heading;\n\n// type difinition for each line\nstruct entry\n{\n int index;\n double length;\n int waitTime;\n};\n\n// List of all entries read from the file\nvector<entry> entries;\n\n// Used to find the max and min\ndouble avgLength = std::numeric_limits<double>::min();\ndouble maxLength = std::numeric_limits<double>::min();\ndouble minLength = std::numeric_limits<double>::max();\nint avgTime = std::numeric_limits<int>::max();\nint maxTime = std::numeric_limits<int>::min();\nint minTime = std::numeric_limits<int>::max();\n\n// Function Prototypes\nifstream openFile(string filename);\nstring outputFile(bool output);\nvoid parseFileData(ifstream inputFile);\nentry split(string str);\nbool isHeading(string str);\nvoid displayMenu();\nvoid getReply(int opt);\nvoid displayStats();\nvoid initStats();\nvoid calcStats(double length, int time);\nvoid addEntry();\nvoid updateEntry();\nvoid deleteEntry();\nvoid updateFileContent();\n\n// Main Programme\nint main()\n{\n // Open and parse the file\n parseFileData(openFile(filename));\n displayMenu();\n return 0;\n}\n\n// Function definitions\n// Opens and returns the file\nifstream openFile(string filename)\n{\n ifstream inputFile(filename);\n if (!inputFile)\n {\n cerr << \"Couldn't open \" << filename << \" for reading\\n\";\n system(\"PAUSE\");\n exit(1);\n }\n else\n return inputFile;\n}\n\n// Parse the file into a vector of entries\nvoid parseFileData(ifstream inputFile)\n{\n string readLine;\n while (getline(inputFile, readLine))\n {\n if (!isHeading(readLine))\n {\n entry newEntry = split(readLine);\n entries.push_back(newEntry);\n if (entries.size() == 1)\n initStats();\n calcStats(newEntry.length, newEntry.waitTime);\n }\n else\n heading = readLine;\n }\n inputFile.close();\n}\n\n//checks if line contains heading. returns false if is data\nbool isHeading(string str)\n{\n transform(str.begin(), str.end(), str.begin(), ::tolower);\n size_t found = str.find(\"index\");\n if (found != string::npos)\n {\n // cout << \"This is the first line which is the column title \" << endl;\n return true;\n }\n return false;\n}\n\n// split up the lines to extract the individual parts\nentry split(string str)\n{\n std::string text = str;\n std::istringstream iss(text);\n std::vector<std::string> results(std::istream_iterator<std::string>{iss},\n std::istream_iterator<std::string>());\n entry wordsInString;\n wordsInString.index = stoi(results[0]);\n wordsInString.length = stod(results[1]);\n wordsInString.waitTime = stoi(results[2]);\n // cout << \"Logging: \" << wordsInString.index << wordsInString.length << wordsInString.waitTime << endl;\n return wordsInString;\n}\n\nvoid initStats()\n{\n avgLength = entries[0].length;\n maxLength = entries[0].length;\n minLength = entries[0].length;\n avgTime = entries[0].waitTime;\n maxTime = entries[0].waitTime;\n minTime = entries[0].waitTime;\n}\n\n// Finds the maximum and minimum length\nvoid calcStats(double length, int time)\n{\n if (length > maxLength)\n maxLength = length;\n else if (length < minLength)\n minLength = length;\n else if (avgLength <= length && avgLength >= length)\n avgLength = maxLength + minLength / 2;\n\n if (time > maxTime)\n maxTime = time;\n else if (time < minTime)\n minTime = time;\n else if (avgLength <= length && avgLength >= length)\n avgTime = maxTime + minTime / 2;\n}\n\nstring outputFile(bool output = true)\n{\n if (output)\n cout << heading << endl;\n int n = entries.size();\n stringstream content;\n\n for (int i = 0; i < n; i++)\n {\n content << entries[i].index << \" \" << entries[i].length << \" \" << entries[i].waitTime << endl;\n if (output)\n cout << content.str();\n }\n return content.str();\n}\n\nvoid displayStats()\n{\n cout << \"Printing Stats: \\n\\t\"\n << \"Max Length:\" << maxLength << \"\\n\\t\"\n << \"Min Length:\" << minLength << \"\\n\\t\"\n << \"Avg Length:\" << avgLength << \"\\n\\t\"\n << \"Max Time:\" << maxTime << \"\\n\\t\"\n << \"Max Time:\" << minTime << \"\\n\\t\"\n << \"Avg Time:\" << avgTime << \"\\n\\n\"\n << endl;\n}\n\nvoid displayMenu()\n{\n string readInput = \"\";\n while (readInput != \"q\" || (stoi(readInput) > 0 && stoi(readInput) < 11))\n {\n cout << \"\\n\\nWelcome to Geyser\\nplease select an option... \\n\\t\";\n cout << \"1. Read the file\\n\\t\"\n << \"2. Get statistics\\n\\t\"\n /* << \"3. Find average length\\n\\t\"\n << \"4. Find maximum length\\n\\t\"\n << \"5. Find minimum length\\n\\t\"\n << \"6. Find average time\\n\\t\"\n << \"7. Find maximum time\\n\\t\"\n << \"8. Find minimum time\\n\\t\" */\n // uncomment if you need it and add the reply\n << \"3. Add new entry\\n\\t\"\n << \"4. Update entry\\n\\t\"\n << \"5. Delete entry\" << endl;\n cout << \"Enter your option: \";\n cin >> readInput;\n getReply(stoi(readInput));\n }\n}\n\nvoid getReply(int opt)\n{\n switch (opt)\n {\n case 1:\n outputFile();\n break;\n case 2:\n displayStats();\n break;\n case 3:\n addEntry();\n break;\n case 4:\n updateEntry();\n break;\n case 5:\n deleteEntry();\n break;\n }\n}\n\nvoid addEntry()\n{\n cout << \"Adding a new entry\" << endl;\n string length, time;\n cout << \"\\n\\tenter the length: \";\n cin >> length;\n cout << \"\\n\\tenter the time: \";\n cin >> time;\n entry newEntry;\n newEntry.index = entries.size() + 1;\n newEntry.length = stod(length);\n newEntry.waitTime = stoi(time);\n entries.push_back(newEntry);\n updateFileContent();\n cout << \"New entry added @ Index: \" << entries.size() << endl;\n}\n\nvoid updateEntry()\n{\n cout << \"Updating an entry\" << endl;\n string length, time;\n int index;\n cout << \"\\n\\tenter the index of the entry: \";\n cin >> index;\n cout << \"\\n\\tenter the length: \";\n cin >> length;\n cout << \"\\n\\tenter the time: \";\n cin >> time;\n index -= 1;\n cout << \"Entry @ \" << entries[index].index << \" is: \" << entries[index].length << endl;\n entries[index].length = stod(length);\n entries[index].waitTime = stoi(time);\n updateFileContent();\n cout << \"Entry updated @ Index: \" << entries[index].index << \" length: \" << entries[index].length << \" time: \" << entries[index].waitTime << endl;\n}\n\nvoid deleteEntry()\n{\n cout << \"Deleting an entry\" << endl;\n string index;\n cout << \"\\n\\tenter the index of the entry: \";\n cin >> index;\n entries.erase(entries.begin() + stoi(index));\n updateFileContent();\n cout << \"Entry deleted @ Index: \" << index << endl;\n}\n\nvoid updateFileContent()\n{\n char file_name[filename.size() + 1];\n strcpy(file_name, filename.c_str());\n\n // remove the original file\n remove(file_name);\n // create a new temp file\n ofstream myfile;\n myfile.open(filename, ofstream::out);\n myfile << outputFile(false);\n myfile.close();\n}",
"createdAt": 1591436872097,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 285,
"character": 1
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "entries[index]",
"createdAt": 1591436478919,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 253,
"character": 23
},
"end": {
"line": 253,
"character": 37
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "foundEntry",
"createdAt": 1591435962797,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 254,
"character": 23
},
"end": {
"line": 254,
"character": 33
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "stoi(index)",
"createdAt": 1591435743259,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 254,
"character": 12
},
"end": {
"line": 254,
"character": 23
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": ".str()",
"createdAt": 1591434162793,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 161,
"character": 13
},
"end": {
"line": 161,
"character": 19
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "stringstream",
"createdAt": 1591434140240,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 161,
"character": 13
},
"end": {
"line": 161,
"character": 25
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "3.333",
"createdAt": 1591433639188,
"copyCount": 1,
"useCount": 1,
"language": "plaintext",
"createdLocation": {
"range": {
"start": {
"line": 3,
"character": 2
},
"end": {
"line": 3,
"character": 7
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser.txt"
}
},
{
"value": " if (output)",
"createdAt": 1591432603551,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 162,
"character": 7
},
"end": {
"line": 162,
"character": 19
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "cout << entryList[i].index << \" \";\n cout << entryList[i].length << \" \";\n cout << entryList[i].waitTime << endl;\n ",
"createdAt": 1591432297003,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 83,
"character": 12
},
"end": {
"line": 86,
"character": 6
}
},
"uri": "git-graph:/file.cpp?eyJmaWxlUGF0aCI6ImdleXNlci1hcHAuY3BwIiwiY29tbWl0IjoiNzZhZTM3ODg0MTcwN2FmODcxOTY0OTUzY2UwMjkxNDM2MmM2NDdlYSIsInJlcG8iOiIvbWVkaWEvcGFyYWJsZXMvUGFyYURpc2svV29ya3NwYWNlL2NsaS9iYXNoIn0%3D"
}
},
{
"value": "Index\tEruptionlength(mins)\tEruptionwait(mins)\r\n1\t3.6\t79\r\n2\t1.8\t54\r\n3\t3.333\t74\r\n4\t2.283\t62\r\n5\t4.533\t85\r\n6\t2.883\t55\r\n7\t4.7\t88\r\n8\t3.6\t85\r\n9\t1.95\t51\r\n10\t4.35\t85\r\n11\t1.833\t54\r\n12\t3.917\t84\r\n13\t4.2\t78\r\n14\t1.75\t47\r\n15\t4.7\t83\r\n16\t2.167\t52\r\n17\t1.75\t62\r\n18\t4.8\t84\r\n19\t1.6\t52\r\n20\t4.25\t79\r\n21\t1.8\t51\r\n22\t1.75\t47\r\n23\t3.45\t78\r\n24\t3.067\t69\r\n25\t4.533\t74\r\n26\t3.6\t83\r\n27\t1.967\t55\r\n28\t4.083\t76\r\n29\t3.85\t78\r\n30\t4.433\t79\r\n31\t4.3\t73\r\n32\t4.467\t77\r\n33\t3.367\t66\r\n34\t4.033\t80\r\n35\t3.833\t74\r\n36\t2.017\t52\r\n37\t1.867\t48\r\n38\t4.833\t80\r\n39\t1.833\t59\r\n40\t4.783\t90\r\n41\t4.35\t80\r\n42\t1.883\t58\r\n43\t4.567\t84\r\n44\t1.75\t58\r\n45\t4.533\t73\r\n46\t3.317\t83\r\n47\t3.833\t64\r\n48\t2.1\t53\r\n49\t4.633\t82\r\n50\t2\t59\r\n51\t4.8\t75\r\n52\t4.716\t90\r\n53\t1.833\t54\r\n54\t4.833\t80\r\n55\t1.733\t54\r\n56\t4.883\t83\r\n57\t3.717\t71\r\n58\t1.667\t64\r\n59\t4.567\t77\r\n60\t4.317\t81\r\n61\t2.233\t59\r\n62\t4.5\t84\r\n63\t1.75\t48\r\n64\t4.8\t82\r\n65\t1.817\t60\r\n66\t4.4\t92\r\n67\t4.167\t78\r\n68\t4.7\t78\r\n69\t2.067\t65\r\n70\t4.7\t73\r\n71\t4.033\t82\r\n72\t1.967\t56\r\n73\t4.5\t79\r\n74\t4\t71\r\n75\t1.983\t62\r\n76\t5.067\t76\r\n77\t2.017\t60\r\n78\t4.567\t78\r\n79\t3.883\t76\r\n80\t3.6\t83\r\n81\t4.133\t75\r\n82\t4.333\t82\r\n83\t4.1\t70\r\n84\t2.633\t65\r\n85\t4.067\t73\r\n86\t4.933\t88\r\n87\t3.95\t76\r\n88\t4.517\t80\r\n89\t2.167\t48\r\n90\t4\t86\r\n91\t2.2\t60\r\n92\t4.333\t90\r\n93\t1.867\t50\r\n94\t4.817\t78\r\n95\t1.833\t63\r\n96\t4.3\t72\r\n97\t4.667\t84\r\n98\t3.75\t75\r\n99\t1.867\t51\r\n100\t4.9\t82\r\n101\t2.483\t62\r\n102\t4.367\t88\r\n103\t2.1\t49\r\n104\t4.5\t83\r\n105\t4.05\t81\r\n106\t1.867\t47\r\n107\t4.7\t84\r\n108\t1.783\t52\r\n109\t4.85\t86\r\n110\t3.683\t81\r\n111\t4.733\t75\r\n112\t2.3\t59\r\n113\t4.9\t89\r\n114\t4.417\t79\r\n115\t1.7\t59\r\n116\t4.633\t81\r\n117\t2.317\t50\r\n118\t4.6\t85\r\n119\t1.817\t59\r\n120\t4.417\t87\r\n121\t2.617\t53\r\n122\t4.067\t69\r\n123\t4.25\t77\r\n124\t1.967\t56\r\n125\t4.6\t88\r\n126\t3.767\t81\r\n127\t1.917\t45\r\n128\t4.5\t82\r\n129\t2.267\t55\r\n130\t4.65\t90\r\n131\t1.867\t45\r\n132\t4.167\t83\r\n133\t2.8\t56\r\n134\t4.333\t89\r\n135\t1.833\t46\r\n136\t4.383\t82\r\n137\t1.883\t51\r\n138\t4.933\t86\r\n139\t2.033\t53\r\n140\t3.733\t79\r\n141\t4.233\t81\r\n142\t2.233\t60\r\n143\t4.533\t82\r\n144\t4.817\t77\r\n145\t4.333\t76\r\n146\t1.983\t59\r\n147\t4.633\t80\r\n148\t2.017\t49\r\n149\t5.1\t96\r\n150\t1.8\t53\r\n151\t5.033\t77\r\n152\t4\t77\r\n153\t2.4\t65\r\n154\t4.6\t81\r\n155\t3.567\t71\r\n156\t4\t70\r\n157\t4.5\t81\r\n158\t4.083\t93\r\n159\t1.8\t53\r\n160\t3.967\t89\r\n161\t2.2\t45\r\n162\t4.15\t86\r\n163\t2\t58\r\n164\t3.833\t78\r\n165\t3.5\t66\r\n166\t4.583\t76\r\n167\t2.367\t63\r\n168\t5\t88\r\n169\t1.933\t52\r\n170\t4.617\t93\r\n171\t1.917\t49\r\n172\t2.083\t57\r\n173\t4.583\t77\r\n174\t3.333\t68\r\n175\t4.167\t81\r\n176\t4.333\t81\r\n177\t4.5\t73\r\n178\t2.417\t50\r\n179\t4\t85\r\n180\t4.167\t74\r\n181\t1.883\t55\r\n182\t4.583\t77\r\n183\t4.25\t83\r\n184\t3.767\t83\r\n185\t2.033\t51\r\n186\t4.433\t78\r\n187\t4.083\t84\r\n188\t1.833\t46\r\n189\t4.417\t83\r\n190\t2.183\t55\r\n191\t4.8\t81\r\n192\t1.833\t57\r\n193\t4.8\t76\r\n194\t4.1\t84\r\n195\t3.966\t77\r\n196\t4.233\t81\r\n197\t3.5\t87\r\n198\t4.366\t77\r\n199\t2.25\t51\r\n200\t4.667\t78\r\n201\t2.1\t60\r\n202\t4.35\t82\r\n203\t4.133\t91\r\n204\t1.867\t53\r\n205\t4.6\t78\r\n206\t1.783\t46\r\n207\t4.367\t77\r\n208\t3.85\t84\r\n209\t1.933\t49\r\n210\t4.5\t83\r\n211\t2.383\t71\r\n212\t4.7\t80\r\n213\t1.867\t49\r\n214\t3.833\t75\r\n215\t3.417\t64\r\n216\t4.233\t76\r\n217\t2.4\t53\r\n218\t4.8\t94\r\n219\t2\t55\r\n220\t4.15\t76\r\n221\t1.867\t50\r\n222\t4.267\t82\r\n223\t1.75\t54\r\n224\t4.483\t75\r\n225\t4\t78\r\n226\t4.117\t79\r\n227\t4.083\t78\r\n228\t4.267\t78\r\n229\t3.917\t70\r\n230\t4.55\t79\r\n231\t4.083\t70\r\n232\t2.417\t54\r\n233\t4.183\t86\r\n234\t2.217\t50\r\n235\t4.45\t90\r\n236\t1.883\t54\r\n237\t1.85\t54\r\n238\t4.283\t77\r\n239\t3.95\t79\r\n240\t2.333\t64\r\n241\t4.15\t75\r\n242\t2.35\t47\r\n243\t4.933\t86\r\n244\t2.9\t63\r\n245\t4.583\t85\r\n246\t3.833\t82\r\n247\t2.083\t57\r\n248\t4.367\t82\r\n249\t2.133\t67\r\n250\t4.35\t74\r\n251\t2.2\t54\r\n252\t4.45\t83\r\n253\t3.567\t73\r\n254\t4.5\t73\r\n255\t4.15\t88\r\n256\t3.817\t80\r\n257\t3.917\t71\r\n258\t4.45\t83\r\n259\t2\t56\r\n260\t4.283\t79\r\n261\t4.767\t78\r\n262\t4.533\t84\r\n263\t1.85\t58\r\n264\t4.25\t83\r\n265\t1.983\t43\r\n266\t2.25\t60\r\n267\t4.75\t75\r\n268\t4.117\t81\r\n269\t2.15\t46\r\n270\t4.417\t90\r\n271\t1.817\t46\r\n272\t4.467\t74\r\n",
"createdAt": 1591432143365,
"copyCount": 1,
"useCount": 1,
"language": "plaintext",
"createdLocation": {
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 273,
"character": 0
}
},
"uri": "git-graph:/file.txt?eyJmaWxlUGF0aCI6ImdleXNlci50eHQiLCJjb21taXQiOiI3NmFlMzc4ODQxNzA3YWY4NzE5NjQ5NTNjZTAyOTE0MzYyYzY0N2VhIiwicmVwbyI6Ii9tZWRpYS9wYXJhYmxlcy9QYXJhRGlzay9Xb3Jrc3BhY2UvY2xpL2Jhc2gifQ%3D%3D"
}
},
{
"value": " updateFileContent();\n",
"createdAt": 1591431491639,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 256,
"character": 0
},
"end": {
"line": 257,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "void updateFileContent()\n",
"createdAt": 1591430715906,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 279,
"character": 0
},
"end": {
"line": 280,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "updateFileContent()",
"createdAt": 1591430483666,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 277,
"character": 5
},
"end": {
"line": 277,
"character": 24
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "bool output= false",
"createdAt": 1591430360558,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 152,
"character": 18
},
"end": {
"line": 152,
"character": 36
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "file_name",
"createdAt": 1591430139225,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 282,
"character": 11
},
"end": {
"line": 282,
"character": 20
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "void writeToFile(string line)",
"createdAt": 1591428214866,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 261,
"character": 0
},
"end": {
"line": 261,
"character": 29
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "ifstream inputFile",
"createdAt": 1591427940396,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 75,
"character": 19
},
"end": {
"line": 75,
"character": 37
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "void",
"createdAt": 1591426596766,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 46,
"character": 0
},
"end": {
"line": 46,
"character": 4
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": " updateEntry();\n deleteEntry();",
"createdAt": 1591426582229,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 211,
"character": 5
},
"end": {
"line": 211,
"character": 22
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "void addEntry()",
"createdAt": 1591426559142,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 214,
"character": 0
},
"end": {
"line": 214,
"character": 15
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "void getReply(int opt)",
"createdAt": 1591426537105,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 191,
"character": 0
},
"end": {
"line": 191,
"character": 22
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "void displayMenu()",
"createdAt": 1591426523950,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 168,
"character": 0
},
"end": {
"line": 168,
"character": 18
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "void displayStats()\n",
"createdAt": 1591426504176,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 155,
"character": 0
},
"end": {
"line": 156,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "void outputFile()",
"createdAt": 1591426485015,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 143,
"character": 0
},
"end": {
"line": 143,
"character": 17
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "void calcStats(int index, float length, int time)",
"createdAt": 1591426464937,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 124,
"character": 0
},
"end": {
"line": 124,
"character": 49
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "void initStats()",
"createdAt": 1591426451404,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 112,
"character": 0
},
"end": {
"line": 112,
"character": 16
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "entry split(string str)",
"createdAt": 1591426435381,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 97,
"character": 0
},
"end": {
"line": 97,
"character": 23
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "bool isHeading(string str)",
"createdAt": 1591426417313,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 83,
"character": 0
},
"end": {
"line": 83,
"character": 26
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "void parseFileData(ifstream inputFile)",
"createdAt": 1591426404802,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 64,
"character": 0
},
"end": {
"line": 64,
"character": 38
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "\n// Main Programme\nint main()\n{\n // Open and parse the file\n parseFileData(openFile(filename));\n displayMenu();\n return 0;\n}",
"createdAt": 1591426355207,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 237,
"character": 0
},
"end": {
"line": 245,
"character": 1
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "ifstream openFile(string filename)",
"createdAt": 1591426320031,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 36,
"character": 0
},
"end": {
"line": 36,
"character": 34
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": " cout << \"Entry updated @ Index: \" << index << endl;\n",
"createdAt": 1591426067046,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 219,
"character": 0
},
"end": {
"line": 220,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": " cout << \"Updating an entry\" << endl;\n string length, time, index;\n cout << \"\\n\\tenter the index of the entry: \";\n cin >> index;",
"createdAt": 1591426058042,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 209,
"character": 2
},
"end": {
"line": 212,
"character": 17
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": " string length, time;",
"createdAt": 1591425579839,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 193,
"character": 1
},
"end": {
"line": 193,
"character": 24
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": " cout<< \"\\tenter the length: \" ; cin>> length;\n cout<< \"enter the time: \" ; cin>> time;",
"createdAt": 1591425560270,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 194,
"character": 2
},
"end": {
"line": 195,
"character": 43
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": " cout<< \"enter the length: \" ; cin>> length;\n",
"createdAt": 1591407670218,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 193,
"character": 0
},
"end": {
"line": 194,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "\nvoid addEntry(){\n \n}",
"createdAt": 1591407517343,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 190,
"character": 0
},
"end": {
"line": 193,
"character": 1
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": " case 3:\n addEntry();\n break;\n ",
"createdAt": 1591407460800,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 179,
"character": 3
},
"end": {
"line": 182,
"character": 3
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": " << \"3. Add new entry\\n\\t\"\n",
"createdAt": 1591407429738,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 161,
"character": 0
},
"end": {
"line": 162,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": " break;\n",
"createdAt": 1591406771063,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 175,
"character": 0
},
"end": {
"line": 176,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": " cout<< \"Printing Stats: \\n\\t\"<<\n \"Max Length:\"<<maxLength << \"\\n\\t\"<<\n \"Mn Length:\"<<minLength << \"\\n\\t\"<<\n \"Avg Length:\"<<avgLength << \"\\n\\t\"<<\n \"Max Time:\"<<maxTime << \"\\n\\t\"<<\n \"Max Time:\"<<minTime << \"\\n\\t\"<<\n \"Avg Time:\"<<avgTime << \"\\n\\n\"<< endl;\n",
"createdAt": 1591406633389,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 122,
"character": 5
},
"end": {
"line": 122,
"character": 5
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "Add new entry",
"createdAt": 1591406435295,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 156,
"character": 21
},
"end": {
"line": 156,
"character": 34
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": " \"Max Length:\"<<maxLength << \"\\n\\t\"<<\n",
"createdAt": 1591406250295,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 123,
"character": 0
},
"end": {
"line": 124,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "case 1: outputFile();\n",
"createdAt": 1591405989381,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 159,
"character": 0
},
"end": {
"line": 160,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "getReply",
"createdAt": 1591405843517,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 151,
"character": 13
},
"end": {
"line": 151,
"character": 21
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": " << \"2. Find average length\\n\\t\"\n",
"createdAt": 1591405572965,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 142,
"character": 0
},
"end": {
"line": 143,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": " << \"4. Find average time\\n\\t\"\n",
"createdAt": 1591405489343,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 143,
"character": 0
},
"end": {
"line": 144,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": " << \"4. Find minimum length\\n\\t\"\n",
"createdAt": 1591405433644,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 143,
"character": 0
},
"end": {
"line": 144,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": " << \"Find maximum length\\n\\t\"\n",
"createdAt": 1591405375072,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 141,
"character": 0
},
"end": {
"line": 142,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": " // Display options\n /* \n 1. Accept the filename\n 2. open the file or throw error\n 3. Display more options\n i. Read the file\n ii. Find highest\n iii. find lowest\n iv. find average\n v. add more entries\n */\n",
"createdAt": 1591405063064,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 142,
"character": 2
},
"end": {
"line": 153,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": " string readLine;\n while (getline(inputFile, readLine))\n {\n if (!isHeading(readLine))\n {\n entry newEntry = split(readLine);\n entries.push_back(newEntry);\n if (entries.size() == 1)\n initStats();\n getStats(newEntry.index, newEntry.length, newEntry.waitTime);\n }\n else\n heading = readLine;\n }",
"createdAt": 1591404674237,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 133,
"character": 1
},
"end": {
"line": 133,
"character": 1
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": " else if (avgLength<=length&&avgLength>=length)\n avgLength= maxLength+minLength/2;",
"createdAt": 1591404543966,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 93,
"character": 7
},
"end": {
"line": 93,
"character": 54
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "int maxLength = std::numeric_limits<float>::min();\nint minLength = std::numeric_limits<float>::max();\n",
"createdAt": 1591404116618,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 28,
"character": 0
},
"end": {
"line": 30,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "avgLength",
"createdAt": 1591404064073,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 81,
"character": 4
},
"end": {
"line": 81,
"character": 13
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": " minLength = entries[0].length\n",
"createdAt": 1591403980341,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 78,
"character": 0
},
"end": {
"line": 79,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": " maxLengthIndex = entries[0].length\n",
"createdAt": 1591403936213,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 77,
"character": 0
},
"end": {
"line": 78,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "\n std::vector<std::string> tokens;\n std::string token;\n std::istringstream tokenStream(str);\n while (std::getline(tokenStream, token, delimiter))\n {\n tokens.push_back(token);\n }\n",
"createdAt": 1591393398590,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 53,
"character": 0
},
"end": {
"line": 53,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": " if(length > maxLength) maxLength = length;\n else if(length < minLength) minLength = length;",
"createdAt": 1591396905678,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 78,
"character": 4
},
"end": {
"line": 79,
"character": 58
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": " int max = std::numeric_limits<int>::min();\n int min = std::numeric_limits<int>::max();",
"createdAt": 1591396133595,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 72,
"character": 4
},
"end": {
"line": 72,
"character": 4
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": " //#include <limits>",
"createdAt": 1591396086997,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 72,
"character": 46
},
"end": {
"line": 72,
"character": 46
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "results",
"createdAt": 1591395218918,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 60,
"character": 25
},
"end": {
"line": 60,
"character": 32
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "Segmentation fault",
"createdAt": 1591394785074,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 57,
"character": 0
},
"end": {
"line": 57,
"character": 0
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "stream_iterator",
"createdAt": 1591394578435,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 55,
"character": 29
},
"end": {
"line": 55,
"character": 44
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
},
{
"value": "istream_iterator",
"createdAt": 1591394480853,
"copyCount": 1,
"useCount": 1,
"language": "cpp",
"createdLocation": {
"range": {
"start": {
"line": 55,
"character": 39
},
"end": {
"line": 55,
"character": 55
}
},
"uri": "file:///media/parables/ParaDisk/Workspace/cli/bash/geyser-app.cpp"
}
}
]
}
{"lastUpload":"2020-07-31T23:55:25.583Z","extensionVersion":"v3.4.3"}
[
{
"metadata": {
"id": "5a6e2b21-1d61-4acd-b31b-907f9c23f18a",
"publisherId": "CoenraadS.bracket-pair-colorizer-2",
"publisherDisplayName": "CoenraadS"
},
"name": "bracket-pair-colorizer-2",
"publisher": "CoenraadS",
"version": "0.2.0"
},
{
"metadata": {
"id": "e337c67b-55c2-4fef-8949-eb260e7fb7fd",
"publisherId": "Shan.code-settings-sync",
"publisherDisplayName": "Shan"
},
"name": "code-settings-sync",
"publisher": "Shan",
"version": "3.4.3"
},
{
"metadata": {
"id": "d0bfc4ab-1d3a-4487-8782-7cf6027b4fff",
"publisherId": "ms-dotnettools.csharp",
"publisherDisplayName": "ms-dotnettools"
},
"name": "csharp",
"publisher": "ms-dotnettools",
"version": "1.22.1"
},
{
"metadata": {
"id": "7f7aec0e-c15c-4fee-8f7e-3202db017fa6",
"publisherId": "FerrierBenjamin.fold-unfold-all-icone",
"publisherDisplayName": "FerrierBenjamin"
},
"name": "fold-unfold-all-icone",
"publisher": "FerrierBenjamin",
"version": "0.0.2"
},
{
"metadata": {
"id": "438221f8-1107-4ccd-a6fe-f3b7fe0856b7",
"publisherId": "mhutchie.git-graph",
"publisherDisplayName": "mhutchie"
},
"name": "git-graph",
"publisher": "mhutchie",
"version": "1.25.0"
},
{
"metadata": {
"id": "6226e0be-5975-4616-948c-545d562adc1d",
"publisherId": "heybourn.headwind",
"publisherDisplayName": "heybourn"
},
"name": "headwind",
"publisher": "heybourn",
"version": "1.7.0"
},
{
"metadata": {
"id": "be992f3f-9f22-4b66-a1d2-ecad04c28a28",
"publisherId": "abusaidm.html-snippets",
"publisherDisplayName": "abusaidm"
},
"name": "html-snippets",
"publisher": "abusaidm",
"version": "0.2.1"
},
{
"metadata": {
"id": "2cb78115-e6f0-4ad3-9626-650536f897a0",
"publisherId": "L13RARY.l13-diff",
"publisherDisplayName": "L13RARY"
},
"name": "l13-diff",
"publisher": "L13RARY",
"version": "0.27.0"
},
{
"metadata": {
"id": "6618b055-469c-4f8e-860b-1d25f70d8852",
"publisherId": "cpylua.language-postcss",
"publisherDisplayName": "cpylua"
},
"name": "language-postcss",
"publisher": "cpylua",
"version": "1.1.0"
},
{
"metadata": {
"id": "dff6b801-247e-40e9-82e8-8c9b1d19d1b8",
"publisherId": "christian-kohler.npm-intellisense",
"publisherDisplayName": "christian-kohler"
},
"name": "npm-intellisense",
"publisher": "christian-kohler",
"version": "1.3.0"
},
{
"metadata": {
"id": "79afa437-682e-4fa2-a4fd-87844832a1dc",
"publisherId": "ryu1kn.partial-diff",
"publisherDisplayName": "ryu1kn"
},
"name": "partial-diff",
"publisher": "ryu1kn",
"version": "1.4.1"
},
{
"metadata": {
"id": "a41c1549-4053-44d4-bf30-60fc809b4a86",
"publisherId": "christian-kohler.path-intellisense",
"publisherDisplayName": "christian-kohler"
},
"name": "path-intellisense",
"publisher": "christian-kohler",
"version": "2.2.1"
},
{
"metadata": {
"id": "e8b469bd-915d-4070-bfc2-05c9b546f8ee",
"publisherId": "jakob101.RelativePath",
"publisherDisplayName": "jakob101"
},
"name": "RelativePath",
"publisher": "jakob101",
"version": "1.4.0"
},
{
"metadata": {
"id": "c5463f77-75d9-4a25-8cc4-d8541a461285",
"publisherId": "svelte.svelte-vscode",
"publisherDisplayName": "svelte"
},
"name": "svelte-vscode",
"publisher": "svelte",
"version": "101.7.0"
},
{
"metadata": {
"id": "9ccc1dd7-7ec4-4a46-bd4f-7d7b8b9d322a",
"publisherId": "vscode-icons-team.vscode-icons",
"publisherDisplayName": "vscode-icons-team"
},
"name": "vscode-icons",
"publisher": "vscode-icons-team",
"version": "10.2.0"
},
{
"metadata": {
"id": "ae9e3eb0-3357-4cc0-90ee-598d2d384757",
"publisherId": "eg2.vscode-npm-script",
"publisherDisplayName": "eg2"
},
"name": "vscode-npm-script",
"publisher": "eg2",
"version": "0.3.12"
},
{
"metadata": {
"id": "4db62a7c-7d70-419c-96d2-6c3a4dc77ea5",
"publisherId": "bradlc.vscode-tailwindcss",
"publisherDisplayName": "bradlc"
},
"name": "vscode-tailwindcss",
"publisher": "bradlc",
"version": "0.4.1"
},
{
"metadata": {
"id": "f2fd462f-f1bd-4c62-b54f-59a4e5ffc6a3",
"publisherId": "WakaTime.vscode-wakatime",
"publisherDisplayName": "WakaTime"
},
"name": "vscode-wakatime",
"publisher": "WakaTime",
"version": "4.0.0"
}
]
{"previous":{"extension":"1.24.0","vscode":"1.46.0"},"current":{"extension":"1.25.0","vscode":"1.47.1"},"apiAvailable":true,"queue":[]}
{
"workbench.iconTheme": "vscode-icons",
"editor.columnSelection": false,
"editor.multiCursorModifier": "ctrlCmd",
"git.confirmSync": false,
"browser-preview.startUrl": "http://localhost:3000",
"browser-preview.chromeExecutable": "/opt/brave.com/brave/brave",
"git.autofetch": true,
"tailwindCSS.emmetCompletions": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"svelte-type-checker.enableCompletion": true,
"svelte-type-checker.enableDefinitions": true,
"svelte-type-checker.enableHoverHints": true,
"tailwindCSS.includeLanguages": {
"svelte":"javascript"
},
"typescript.updateImportsOnFileMove.enabled": "always",
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"sync.gist": "50841d0481560cd84228abfaf5038fa2"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment