Filter file list in SmartGit - smartgit

In SmartGit I'm comparing two branches like described in How to compare two branches/commits? I'm receiving the file list:
Then, how can I filter this files by name? Thanks.

You only may search by name, but not filter. To search, put the focus into the Files table and start typing the name.

Related

Multiple file renaming based on regex pattern + renaming within files based on new file names

How to achieve this? I have a folder with over 1000 code files, mostly xml.
Most of the files have a common pattern:
abbb
accc
addd
a should be placed by z:
zbbb
zccc
zddd
However, there are also files that do not start with a:
efff
ghhh
These names should then simply be preceded by z.
zefff
zghhh
Within the files various of the file names can show up. Hence, all original file names should be replaced by the new names within the files, too.
My idea was something like putting original names in column 1 of a table and put the new names in column 2 next to them. Then looping over this table and if an original name is found within a file - it can also show up multiple times in code lines - and replace it with the new name. Any tips?
This solved it for me:
File renaming e.g. as described here: https://superuser.com/questions/16007/how-can-i-mass-rename-files
Batch replacement with this VS Code plugin: https://marketplace.visualstudio.com/items?itemName=angelomollame.batch-replacer
since I had the said table (old vs. new name) prepared, a simple regex replacement of the table entries did the trick to meet the prerequisites for the plugin, i. e. the old names were replaced by replace "old_file_name" and the new names by with "new_file_name"; then, just copy & paste everything for this plugin as described there and all is replaced

Cleaning and merging data in Stata

I have two questions.
1) I would like to reduce the number of observations in "location" from 5 to 1 for every country and get the corresponding values for the years in just one row. How do I do this?
Screenshot of dataset
2) I would like to merge this dataset with another one, where "location" is not defined by country code, but country name. How can I merge them?
Thanks!
collapse (min) YR*, by(location)
There is no straightforward way to do this. You need to make sure that both datasets contain a variable with the same values to merge on, so either 3-letter country codes or country names. You can try to find a dataset that contains both and merge it with one of your datasets. Another option is the user-written kountry which is made for these kinds of things. If you type search kountry in Stata, the first result will be package dm0038_1. If you click on it there will be a link to click on to install it.

ADF-Azure Data factory multiple wild card filtering

I have a condition where i have more than 2 types of files which i have to filter out. I can filter out 1 type using wildcard, something like: *.csv but cant do something like *.xls, *.zip.
I have a pipeline which should convert csv, avro, dat files into .parquet format. But, folder also have .zip, excel, powerpoint files and i want them o be filtered out. Instead of using 3-4 activities i am finding if any way i can use (or) condition to filter out multiple extensions using wildcard option of data factory?
Dynamic content can't accept multiple wildcards or Regular expression based on my test.
You have to using multiple activities to match the different types of your files.Or you could consider a workaround that using LookUp activity+For-each Activity.
1.LookUp Activity loads all the file names from specific folder.(Child Item)
2.Check the file format in the for-each activity condition.(using endswith built-in feature)
3.If the file format matches the filter condition, then go into the True branch and configure it as dynamic path of dataset in the copy activity.

I need to extract three columns from a file

I am doing a project in Association Rule Mining. For my data set, I need to extract three columns from a text file.
Here is the link for the text file.
I need to extract Billno, Product and Batch columns and write them on to a text file.
The easiest way would be to use grep
http://www.dreamincode.net/forums/topic/290545-using-a-grep-command-in-a-c-program-in-linux/
Otherwise, that data is consistent, all the bill numbers are the same length and and appear to be easily Regex'ed
http://www.cplusplus.com/reference/regex/

Import CSV to class structure as the user defines

I have a contact manager program and I would like to offer the feature to import csv files. The problem is that different data sources order the fields in different ways. I thought of programming an interface for the user to tell it the field order and how to handle exceptions.
Here is an example line in one of many possible field orders:
"ID#","Name","Rank","Address1","Address2","City","State","Country","Zip","Phone#","Email","Join Date","Sponsor ID","Sponsor Name"
"Z1234","Call, Anson","STU","1234 E. 6578 S.","","Somecity","TX","United States","012345","000-000-0000","someemail#gmail.com","5/24/2010","z12343","Quantum Independence"
Notice that in one data field "Name" there is a comma to separate last name and first name and in another there is not.
My plan is to have a line for each field (ie ID, Name, City etc.) and a statement "import to" and list box with options like: Don't Import, Business>Join Date, First Name, Zip
and the program recognizes those as properties of an object...
I'd also like the user to be able to record preset field orders so they can re-use them for csv files from the same download source.
Then I also need it to check if a record all ready exists (is there a record for Anson Call all ready?) and allow the user to tell it what to do if there is a record (ie mailing address may have changes, so if that field is filled overwrite it, or this mailing address is invalid, leave the current data untouched for this person, overwrite the rest).
While I'm capable of coding this...i'm not very excited about it and I'm wondering if there's a tool or set of tools out there to all ready perform most of this functionality...
I hope this makes sense...
Is there a header row?
usually in CSV files, the first line is the header.
If so you could use the header line to determine the order, just have a list of column names, and only prompt the user if a column name does not match.(this could then be auto added into the predefined list).
EDIT:
even if a header does not exist, its simple enough to add one. The file can be manually edited. Alternatively in your program let the user define it (from your predefined list)
I can't find any tools all ready out there and no one has replied otherwise, so for the sake of leaving a question answered until otherwise notified the answer is: no.

Resources