Skip to content

RMohit927/Tip-Tricks

Repository files navigation

Tip-Tricks

RegEx in T-SQL Query

https://www.sqlshack.com/t-sql-regex-commands-in-sql-server/

Download File from Kaggle:

from IPython.display import FileLink
FileLink(r'./model.h5')

CSV Hacks

  1. How to Write data into CSV using String Builder and SuperScript the hashstric before data like LINK
StringBuilder str = new StringBuilder();
var line = "\xB*InvoiceNo, \xB*Customer, \xB*InvoiceDate, \xB*DueDate, Term, Location, Memo, Item(Product/Service), ItemDescription, " +
                    "ItemQuantity, ItemRate, \xB*ItemAmount, \xB*ItemTextCode, ItemTaxAmount, Currency, ServiceDate";
str.AppendLine(line);
str.AppendLine();

File.WriteAllText("D:\\test.csv", str.ToString());

image

Visual Studio Code Extensions(Installation Tips):

  • prettier
  • Material icon theme
  • markdown all in one
  • one monokai theme
  • bracket pair colorization
  • auto rename tag
  • live server
  • Simple React Snippets
  • Prettier - Code formatter
  • Path intellisense
  • ES7+ React/Redux

ExcelSheet Formulas:

  1. Join/Combine every Row of single column with seperated by simething:
=TEXTJOIN(";",TRUE,B34:B73)
  1. Transpose all rows into column:
=TRANSPOSE(E9:BF9)
  1. Sort every sentence in Lexicography order(Sorting based on a,b,c...) based on word level: Prerequisites - In every sentense every words are seperated by comma
=TEXTJOIN(" ",1,SORT(FILTERXML("<x><y>"&SUBSTITUTE(F6,",","</y><y>")&"</y></x>","//y")))
  1. Extract sub-text from string whose sub-text between Bracket "[]" OR "{}" OR"()"
=MID(B2,SEARCH("[",B2)+1,SEARCH("]",B2)-SEARCH("[",B2)-1)
  1. General way to extract sub-string from string starts from 'UCM' and also replace brackets as well
=SUBSTITUTE(SUBSTITUTE(TRIM(LEFT(SUBSTITUTE(MID(C3,FIND("UCM",C3),LEN(C3))," ",REPT(" ",100)),100)),"[",""),"]","")
  1. Find The Word from String Query
=IF(ISNUMBER(FIND("prix",G2,1)),TRUE,FALSE)
  1. Find the Exact Word from String Query
=ISNUMBER(SEARCH(" low ", " "&A2&" "))
  1. Find Unique AdInfoScore from Array
=UNIQUE(A2:A142)
  1. Find Fiscal Year from Created Date
=YEAR(DATE(YEAR(E2),MONTH(E2)+($I$2-1),1))

image
10. Find Week Number based on Month in excel

=WEEKNUM(E2,2)-WEEKNUM(DATE(YEAR(E2),MONTH(E2),1),2)+1

image
11. count no of cells where each cell contains sub string as "es" etc.

=COUNTIF(D2:D15, "*es*")

12. Search if current text exist in anywhere between range cell in excell sheet ``` =IF(COUNTIF($D$1:$D$365, A1)>0, "YES", "NO") ```

Azure Boards:

  1. How to get last week workitem only: image

Installing Aether VS Extenstion:

  1. Error Link

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published