Copy only timestamp info of files

10 Eki 2024 In: ipucu

 
Dont copy files (data), only fixes timestamps (create date, Date modified, etc) if the file exist in destination folder

robocopy /e /timfix /dcopy:t /copy:t \\192.168.1.52\d\SourceFolder d:\\MajestechInc\DestinationFolder
 
 

LazyLoad

9 May 2024 In: ipucu

1.

<script src="https://cdn.jsdelivr.net/npm/lazyload@2.0.0-rc.2/lazyload.js"></script> 

 

2.

 <img class="lazyload" data-src='images/urunler/ACT 073_.jpg' alt='ACTIVA-GY6 50-TVS PEP ÖZEL BİLYA KB 42-17 NTN' />

 

3. 

    <script>
        lazyload();
    </script>

 

SQL string agg methodu

8 Oca 2023 In: ipucu
select * from (
select u.UYE_ID,
  (
    SELECT STRING_AGG (CONVERT(NVARCHAR(max),v.Kodu), ', ') AS csv 
    FROM [v_UyelerveMulkleri] v where v.UYE_ID=u.UYE_ID 
  ) as Mulkleri
from Uyeler u) z
where Mulkleri is not null

Get Random SipNo

1 Şub 2021 In: .net, ipucu
        public  string GetSipNo()
        {
            Random rn = new Random();
            //yeni
            int lenght = 6;
            StringBuilder rs = new StringBuilder();
            //string charPool = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
            string chars = "ABCDEFGHIJKLMNPRSTUVYZ";
    //string nums = "1234567890"; 
            string nums = "123456789";
            while (lenght > 0)
            {
                if (lenght == 6 || lenght == 5 || lenght == 2 || lenght == 1)
                    rs.Append(nums[(int)(rn.NextDouble() * nums.Length)]);

                if (lenght == 3 || lenght == 4)
                    rs.Append(chars[(int)(rn.NextDouble() * chars.Length)]);

                lenght--;
            }

            using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnStr_b2b"].ConnectionString))
            {
                using (SqlCommand comm = new SqlCommand(@"SELECT COUNT (SIP_ID) FROM Siparisler WHERE SipNo='" + rs.ToString() + "'"))
                {
                    comm.Connection = conn;
                    conn.Open();
                    if (comm.ExecuteScalar().ToString() != "0") return GetSipNo();
                }
            }
            return rs.ToString();
        }

BootBox JS ile Confirm ve Alert

20 Şub 2019 In: ipucu
    <script src="js/bootbox.all.min.js"></script>
 
 
<button id="btn_ydilkaydet_" onclick="sinavyerisec();return false;" value="Seçimi Kaydet" class="btn btn-primary" style="width: 130px"></button>
<asp:Button ID="btn_ydilkaydet" runat="server" Text="Kaydet" style="display:none"  OnClick="btn_ydilkaydet_Click" /> 
 
 
        function sinavyerisec() {
            var ms = "<br>Bu bilgiler kaydedilsin mi?<br>";
            bootbox.confirm({
                message: ms,
                buttons: {
                    confirm: {
                        label: 'Kaydet',
                        className: 'btn-primary'
                    },
                    cancel: {
                        label: 'Vazgeç',
                        className: 'btn-warning'
                    }
                },
                callback: function (result) {
    //if(result){}
    //window.open('<%= ConfigurationManager.AppSettings["failurlsi"] %>'); 
                    $("[id$='btn_ydilkaydet']").click();
                }
            });
                }
 
veya
 

bootbox.confirm("This is the default confirm!", function(result){ console.log('This was logged in the callback: ' + result);  

}); 

 
 
 
//ALERT
 
bootbox.alert("This is the default alert!"); 
 

bootbox.alert({ message: "This is an alert with a callback!", callback: function () { console.log('This was logged in the callback!'); } 

}); 

ASUS UX430UQ Windows 10 Kurulumu

24 Şub 2018 In: ipucu

Merhabalar,

UX430 u USB den boot edebilmek ve Win10 kurabilmek için 

1. F2 deyip BIOS a giriyoruz

2. Advanced Mode -> Security -> Secure boot : Disabled -> F10 (Save and Quit)

3. F2 deyip yeniden BIOS a  

4. Advanced Mode -> Boot -> CSM Support : Enabled -> F10 (Save and Quit) 

5. F2 deyip yeniden BIOS a  

6. Advanced Mode -> Boot -> Change Boot Priorities with your USB Disk ( seçebilirsiniz hangi cihaz ile açılacagını)

Transfer HTTP to HTTPS on IIS

1 Haz 2017 In: .net, ipucu

We have 2 methods for this purpose:

1. You can add this line to your index.html/default.aspx web page

if (location.protocol !== "https:"){
location.replace(window.location.href.replace("http:","https:"));
}

 

2. If you are using higher version of IIS 6.1, just put this lines to web.config

<system.webServer>
<rewrite>
<rules>
<rule name="HTTPyi HTTPSye Yonlendirme" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>

 

 

CSS ve Table

13 May 2017 In: ipucu

response ve sade olsun

 <style>
table {
    border-collapse: collapse;
    width: 100%;
}

th {
    padding-top: 11px;
    padding-bottom: 11px;
    background-color: #4CAF50;
    color: white;
}  

th, td {
    border: 1px solid #ddd;
    text-align: left;
    padding: 8px;
}

tr:nth-child(even){background-color: #f2f2f2}
</style>

 

---------------------------------------

 

<style>
table#customers {
    font-size:16px;
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}

#customers td, #customers th {
    border: 1px solid #ddd;
    text-align: left;
    padding: 8px;
}

#customers tr:nth-child(even){background-color: #f2f2f2}

#customers th {
    padding-top: 11px;
    padding-bottom: 11px;
    background-color: #4CAF50;
    color: white;

 

 <table id="customers">

<tbody><tr>

  <th>Company</th>

  <th>Contact</th>

  <th>Country</th>

</tr>

<tr>

<td>Alfreds Futterkiste</td>

<td>Maria Anders</td>

<td>Germany</td>

</tr>

<tr class="alt">

<td>Berglunds snabbköp</td>

<td>Christina Berglund</td>

<td>Sweden</td>

</tr></table>

 

 

 

 

 

Ben Kimim ?

Celiker BahceciMerhabalar, ben Çeliker BAHÇECİ. 2004 den beri özel sektörde bilgisayar mühendisligi ve egitmenlik yapıyorum. Yine aynı yılın Ekim ayından beri sitemde .Net ile programlama ve hayat görüşüm ile ilgili makalelerimi yayınlıyorum. Blogum dışında Yazgelistir.com, mobilnedir.com gibi ineta kapsamındaki bir çok siteye Microsoft teknolojileri ile ilgili yazılar yazmaktayım.
Bu site ile sizinde hayatınızı anlamlandırmanızda bir parça katkımın olması dilegiyle...