Visual Studio Code - Compare two csv and find data that not in the two files - csv

So, I have two csv files that I need to compare. However, I am not sure if I am using compare active file in Visual Code will help me.
File 1.csv --> the starting point
id,name
12a,mark
134,jon
151,pete
z18,sab
329,lin
m32,sam
kla,kop
l5h,ming
File 2.csv --> modified one, basically made some changes (delete two id)
id,name
12a,mark
134,jon
151,pete
l5h,ming
kla,kop
329,lin
So, I want to use visual code to compare between these two files and find out which line from the 1.csv that already been removed. If I use compare active file in visual code, it only gave me which line that different from the original one. But I cannot find between the original file (1.csv) and the modified one (2.csv), which data/id has been removed.
I am not sure whether visual code can do this or what keyword that I need to use in google to find this solution. So I am wondering if anyone could help me with this.
Ps
The real files that I need to deal with in the same situation have more than a thousand id.
Sorry if this has been resolved or asked somewhere in StackOverflow, English is not my native and I don't know what keyword that I should use in StackOverflow for this.
Thanks!

If you multi-select (Ctrl+Left-Click on Windows) both files (file1.csv, file2.csv) in the VS Code (File) Explorer window, then select Compare Selected from the right-click menu in the (File)Explorer window, a diff window will open with the comparison you desire.
Note the first-selected file will appear on the left pane of the diff window.

Related

Files not under caret on new computer

I opened my project on another computer, and the files where I'd been using a file watcher were expanded, like before they used to be nested like home.scss is now after I run the watcher once on that file.
Is there a way to automatically make all the files be nested?
Because when adding new files and folder with git, it would be quite troublesome to go into each and every file in order to make them become nested.
Like I have some minified JavaScript files that used to be nested, but now is expanded for some reason.
Hope you understand. Thank you.
Edit: Nested***
Is there a way to automatically make all the files go under a caret like that?
Unfortunately not. Such nesting information (to "go under a caret" as you are saying) is taken from "Output path to refresh" field of the corresponding File Watcher.
You have to run file watcher for such files at least once in order to see files nested like you have it on your another computer.
Here is how you can run File Watchers manually without the need to modify those files (so no extra history will appear in your git (or whatever VCS you may be using there)).
https://stackoverflow.com/a/20012655/783119
P.S.
In PhpStorm 2016.3 (the next version that will be released in 1.5-2 months or so) such nesting will be done automatically (the most common combinations) so there will be no need to have File Watchers for providing such info.
If you wish -- you can try EAP build right now (EAP means Early Access Program .. which is sort of Alpha/Beta builds (simply speaking).. and therefore some bugs for new functionality might be present and performance may not be optimal).

PHPStorm Find and Replace in All Files Except One

Sometimes when I do a find and replace for a string in my project, I'd like it to be committed to all directories / files except one. Is there a way to exclude a particular file in the GUI screen that appears before you commence your search?
This link might help you.
No need to upvote or accept my answer if it works for you :)
Exclude folder from search but not from the project list
Or this, using scopes: How to exclude files/folders from code inspection in PHPStorm?

How to get a list of files with errors in PhpStorm

In PhpStorm I get a read mark on the upper right side of the code window if there's a PHP bug in the file. That's great. What I like to have is a list of all files which have this read mark.
Any ideas?
To get the list of all files with errors and warnings use Code | Inspect Code. It's possible to specify what inspection profile to use, which directories to scan. Custom Scope provides a flexible way to include/exclude certain directories or files from the inspection results.
Slightly off-topic, but may be helpful. If you need to jump through all the errors in a file (for example, CSS file), open up the file and and hit the F2 button on the keyboard. Repeat it to cycle through all the errors. To navigate back to the previous error, hit Shift + F2

rename an html page according to an image within it

firstly I'll give some background regarding the situation.
I have a website containing approximately 56k pages each page contain a mapped sketch of a machine part. this machine part is made out of smaller parts which are outlined in the image and hold a certain number. when you hover over the numbers a box with the part item code shows up.
I order parts according to this item codes but recently a lot of the items codes have changed, therefore I am looking for a solution.
now I own a database with data on all the 56k parts and I want to link the relevant webpage to each record according to the name of the part(a column in my database), the problem is that the webpages names has no logic name that could connect with the part name in any way but the image that is displayed in the page has the exact name of the part.
I want to rename all the html files I has according to the Images displayed within them. how can I achieve that without renaming all the 56k pages manually?
additionally how can I add the links to all the 56k pages automatically to my database after all the above is done?
Thank you for your patience I know it was long.
If you have a *nix shell, then a simple egrep will get you far
egrep "<img src=\".*\"" -r . > list
The regexp would have to be adapted to match the part you are looking for of course.
You could easily to some search/replace in the resulting list to create a batch script that will do all the renaming for you.
Pick your favorite scripting language and parse each html file to find the image name to use in renaming the file. Personally I would use Perl as it makes parsing the files and updating a database at the same time with the URL easy.

Associate a help file with a library in the VBA object browser

I have a reference to the Microsoft Scripting Runtime (scrrun.dll) in one of my Access projects. If I open the object browser in VBA (by pressing F2) and choose 'Scripting' from the library dropdown it shows me all of the properties, functions, etc. for the Scripting library. If I choose one of these functions and then click on the help button (with the yellow question mark) it opens a help window with the title of 'Microsoft Visual Basic Help.'
It acts like it is unable to find the help file for this library. I can manually find the help file on my computer at the following location: "C:\Program Files (x86)\Common Files\microsoft shared\VBA\VBA6\1033\VBLR6.CHM". (Note: I have 64-bit Win 7, thus the '(x86)' in the Program Files folder name.)
I tried copying the help file to the following locations with no luck:
"C:\Windows\Help\VBLR6.CHM"
"C:\Windows\SysWOW64\VBLR6.CHM" (I believe SysWOW64 folder is the Win7 64-bit equivalent of C:\Windows\System32)
I have had this same problem with other referenced libraries as well, so I'm looking for some kind of generic solution. I'm hoping there is some way to specify a location for the help file of a particular reference, or something else along those lines.
Copy VBLR6.CHM to "C:\Program Files (x86)\Microsoft Office\Office10\1033\VBENLR98.CHM"
That's the short answer for this specific case...here's how to get there which may be useful for getting other help files associated:
Download Process Monitor (currently hosted here: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx or do a Google search for Process Monitor)
Run Process Monitor with the following filter: 'Process Name' 'is' MSOHelp.exe 'include'
Open object browser in VBA
Choose the library (Scripting in this case)
Choose any function, property, or event in the library and click on the yellow question mark (this should open an empty window with the title Microsoft Visual Basic Help)
Go back to Process Monitor and scroll all the way to the bottom of the list; make sure the Path and Result columns are displayed
There should be dozens of 'PATH NOT FOUND' and 'NAME NOT FOUND' Results in the list. For each one of these results, there should be a corresponding Path where MSOHelp was looking for the help file. Choose any one of these and create a file with that path name. I chose to create a copy of the help file from its original location to the new spot and rename it to match what MSOHelp was looking for.
My best guess is that the scrrun.dll contains the name of the help file and over the years the dll stayed the same but the help file was renamed, modified, etc.