Month: October 2023
How to delete all commit history in github
Deleting the .git folder may cause problems in your git repository. If you want to delete all your commit history but keep the code in its current state, it is very safe to do it as in the following: Checkout git checkout –orphan latest_branch Add all the files git add -A Commit the changes git commit -am […]
How to display HTML components on the same line in CSS
Let’s say we have 3 buttons and we want to show them on the same line: #outer { width:100%; text-align: center; } .inner { display: inline-block; } <div id=”outer”> <div class=”inner”><button type=”submit” class=”msgBtn” onClick=”return false;” >Save</button></div> <div class=”inner”><button type=”submit” class=”msgBtn2″ onClick=”return false;”>Publish</button></div> <div class=”inner”><button class=”msgBtnBack”>Back</button></div> </div>
How to insert results of a stored procedure into a temporary table
CREATE TABLE #tmpTable ( COL1 int, COL2 int, COL3 nvarchar(max), COL4 nvarchar(max), COL5 bit ) INSERT INTO #tmpTable exec SpGetRecords ‘Params’ NOTE: The columns of #tmpTable must be the same as SpGetRecords. Otherwise, there will be a problem. If there are no parameters in the stored procedure, you don’t need to use ‘Params’.