Ctrl+K then Ctrl+D, akfif dökümanı formatlar. Ctrl+K then Ctrl+F, Seçili alanı formatlar…
Monthly Archives: January 2015
Birden fazla text dosyasının içeriğini tek bir text dosya içinde birleştirme.
Bazen birden fazla text dosyasını, tek bir text dosya içinde birleştirmek gerekebilir. 3-5 dosya olduğunda kopyala-yapıştır yaparak işimizi görebiliriz ama iş onlarca hatta yüzlerde dosyaya geldiğinde bu yöntem saatler alabilir. Bu yazıda bu işlemi windows komut satırından kolayca nasıl yapabileceğimizi anlatacağım…
Php ile Ean13 check digit hesaplama
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
<?php function ean13_check_digit($digits){ //first change digits to a string so that we can access individual numbers $digits =(string)$digits; // 1. Add the values of the digits in the even-numbered positions: 2, 4, 6, etc. $even_sum = $digits{1} + $digits{3} + $digits{5} + $digits{7} + $digits{9} + $digits{11}; // 2. Multiply this result by 3. $even_sum_three = $even_sum * 3; // 3. Add the values of the digits in the odd-numbered positions: 1, 3, 5, etc. $odd_sum = $digits{0} + $digits{2} + $digits{4} + $digits{6} + $digits{8} + $digits{10}; // 4. Sum the results of steps 2 and 3. $total_sum = $even_sum_three + $odd_sum; // 5. The check character is the smallest number which, when added to the result in step 4, produces a multiple of 10. $next_ten = (ceil($total_sum/10))*10; $check_digit = $next_ten - $total_sum; return $digits . $check_digit; } ?> |
…
Mssql’de kayıtlı triggerları listeleme
1 2 3 4 |
SELECT ParentObject = o.name,TriggerName = t.name,[Type] = t.type,TypeDesc = t.type_desc FROM sys.triggers t LEFT JOIN sys.objects o ON t.parent_id = o.object_id WHERE t.is_ms_shipped = 0 ORDER BY [Type],ParentObject,TriggerName |
…