Latest Entries »

Convert javascript ticks to .net ticks

js.getTime() returns ticks since 1.1.1970 however .net ticks since 1.1.2000.
I had a case where every clicks is recorded on client and processed on the server. Here is how i convert js ticks to c# ticks.

Js Code
tracking.StartTime = new Date().getTime() – new Date().getTimezoneOffset() * 60 * 1000;

C# Code
const long ticks1970 = 621355968000000000;
DateTime startTime = new DateTime((Convert.ToInt64(ta.StartTime) * TimeSpan.TicksPerMillisecond) + ticks1970);

happy coding.

by the way, the code has some errors.

SELECT table_name=sysobjects.name,
         column_name=syscolumns.name,
         datatype=systypes.name,
         length=syscolumns.length
    FROM sysobjects
    JOIN syscolumns ON sysobjects.id = syscolumns.id
    JOIN systypes ON syscolumns.xtype=systypes.xtype
   WHERE sysobjects.xtype='U'
ORDER BY sysobjects.name,syscolumns.colid

yada

select Table_Name, Column_Name,DATA_TYPE from Information_schema.Columns with (nolock) order by Table_Name

Resetting Nokia N810 lock code

Resetting Nokia N810 lock code

1- download getlockcode
2- login as root on console
3- copy it somewhere other than mmc
4- chmod +x getlockcode
5- execute getlockcode

Thats it

where is SQL Server Management Studio?

i could not install SQL Server Management Studio.

The solution Microsoft offers is here , probably it takes one too many hours

My own solution is

  1. install Visual Studio 2008 Sp 1 , completely uninstall Visual Studio 2008. never ever use/install for home environment again.
  2. install Sql Server 2008 Sp 1, reinstall it using original package.
  3. Install Visual Studio 2010 RC

It would give so many errors during installation, dont count them on, just ignore

RESTORE DATABASE [Device]
FROM DISK = ‘d:\Dbs\tlnsDevice.BAK’
WITH REPLACE

Garanti Bonus Kart Web Sitesi

Çok basit bir ayar sorunu yüzünden hala websiteleri açılmıyor. Teknik olarak basit ama işlev büyük.

Adres

  1. Bonus www siz  adres http://bonus.com.tr/
  2. Bonus www li adres http://www.bonus.com.tr/

Deneyin, farkı gorun.

Daha onceki islerimde Sql Server Enterprise yada Oracle ile clustur serverlar uzerinde 400gb – 2 tb calisiyordum. Bu durumlarda sql server performans islemleri sandigimdan daha kolay oluyordu. Simdi ise elimde bir adet Sql Express surumu ve 2.5 gb veritabani var. Bunun performans arastirmasini yapmak kolay olmuyor. Buraya ilerde de referans olsun diye adim adim yapacagim/okuyacagim isleri/baglantilari yaziyorum.

1-Troubleshooting Performance Problems in SQL Server 2005
2- Microsoft Sql Server 2005 , Performance Optimization and Tuning Handbook (Ken England, Gavin Powell)

Markali cep bilgisayariniz bozulursa ve Istanbul icinde onaracabilecek bir servis ariyorsaniz
Mert tech , Doğubank Kat 3 no 305 Sirkeci/ist , dukkanin sahibi yuksek elektronik muhendisi , sim entegresi bozuk olan telefonumu 1 gunde teslim aldim. Benim gibi sizde 1 ay o servis bu servis gezmeyin. alin verin yaptirin cebinize can verin.

Index dosyasi yok hatasi

MsSql Server 2005 Express’de veritabanini ilistirme (attach) icin 2 dosyadan ( mdf + ldf )fazlasina ihtiyac duyuyormus. Isteki veritabanini (mdf ve ldf dosyalarini) test icin baska msqql servera eklemek isteyince index dosyalari bulunamadi hatasi verdi. Bende bunun icin asagidaki sekilde ilistirmeyi yaptim.

sp_attach_single_file_db @dbname= ‘databasename’, @physname= ‘C:\Users\Blake\Documents\Databases\databasefile.mdf’

Siteye su basmış

Ben askerde iken diye bir seri yazı dizisi yazmayı düşünüyorum. Gördüğünüz gibi ben askerde iken siteye su basmış, tüm bilgiler gitmiş. Kısa zamanda da geri gelmez. Terzi sökük misali bir ara siteyi ayaga kaldırırım.

guncelleme: yedeklerinden geri dondum, karakterler sacmalamis.

Powered by WordPress and Motion by 85ideas.