Posts

Showing posts from 2016

Removing tags in html (and similar) files

sed - e 's/<[^>]*>//g' file . html

Excel: Vba code for deleting entire row based on a criteria

Sub Loop_Example() Dim Firstrow As Long Dim Lastrow As Long Dim Lrow As Long Dim CalcMode As Long Dim ViewMode As Long With Application CalcMode = .Calculation .Calculation = xlCalculationManual .ScreenUpdating = False End With 'We use the ActiveSheet but you can replace this with 'Sheets("MySheet")if you want With ActiveSheet 'We select the sheet so we can change the window view .Select 'If you are in Page Break Preview Or Page Layout view go 'back to normal view, we do this for speed ViewMode = ActiveWindow.View ActiveWindow.View = xlNormalView 'Turn off Page Breaks, we do this for speed .DisplayPageBreaks = False 'Set the first and last row to loop through Firstrow = 6 Lastrow = 6359 'We loop from Lastrow to Firstrow (bottom to top) For Lrow = Lastrow To Firstrow Step -1 'We check the values in the A column in this example With .Cells(Lrow, "EC") If Not IsError(.Value) Then If .Value = 0 ...

Excel: Count number of spaces in a cell

=LEN(A1)-LEN(SUBSTITUTE(A1," ",""))

Sıcak Şarap Tarifi

Malzemeler: 1 litre sofra şarabı 2 adet portakal 1 adet elmanın kabuğu ve soyduğunuz elmanın yarısı 3 adet çubuk tarçın 15 diş karanfil 2 adet kuru incir 2 adet kuru kayısı yarım su bardağı toz şeker (damak tadına göre artabilir ya da azalabilir) isteğe göre 2-3 adet çilek ve 1 adet kırmızı pancar eklenebilir. Yapılışı: Adet portakalın kabuğunu soyun, portakal kabuğuna karanfil dişlerini saplayın. Kabuğunu soyduğunuz portakalı ve diğer portakalın suyunu sıkın. Elmanın kabuğunu soyarak çekirdeklerini çıkartın ve küp küp doğrayın. Kayısıları ve kuru incirleri 2 parçaya bölün. Portakal suyunu ve şarabı tencereye alın, şekeri ekleyerek kısık ateşte ısıtmaya başlayın. Hazırladığınız malzemeleri tencereye ekleyin, kısık ateşte 15 kaynama noktasına gelene kadar ısıtın ve sıcak servis yapın

Triangular protractor with TikZ

Image
Following latex code will create a triangular protractor below: \documentclass[margin=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{calc, intersections} \tikzset{ numbers/.style={fill=white,font=\scriptsize}, degrees/.style={below, anchor=north, text centered, inner ysep=2pt, text width=5mm, rotate=\mnum-270, fill=white, font=\scriptsize} } \begin{document} \begin{tikzpicture}%[transform shape, rotate=90] % uncomment for rotating picture % finding right angle \path[name path=line 1] (-8,0) --++ (-45:11.5); \path[name path=line 2] (8,0) --++ (225:11.5); % draw border \draw[line width=.3pt, name path=border, name intersections={of=line 1 and line 2,by=A}] (A) -- (8,0) coordinate (B) -- (-8,0) coordinate (C) -- cycle; % top ruler \foreach \tnum in {-7,-6,...,7}{ \pgfmathtruncatemacro\tnuma{abs(\tnum)} \draw (\tnum,0) -- (\tnum,-.2) node[numbers, below] (n\tnum) {\tnuma}; \ifnum\tnum \draw (\tnum+.5,0) -- (\tnum+.5,-.2); \else\fi ...