Kayıtlar

google chrome font problem

Resim
Go to address bar and type chrome://flags/#disable-direct-write. There you will see the option to disable DirectWrite.

c# Merkez Bankası Döviz Kurları Okunması

using System; using System.Collections.Generic; using System.Xml; namespace TCMBCurrency {     public class TCMBCurrencyRead     {           private string XMLUrl = "http://www.tcmb.gov.tr/kurlar/today.xml";         public string Tarih = "";         public string Bulten_No = "";         public List CurrencyList = new List ();         public TCMBCurrencyRead()         {                         }             public void ReadData()         {                 XmlTextReader reader = new XmlTextReader(XMLUrl);                 XmlDocument xmldoc = new XmlDocument();         ...

Similarity Methods (Cosine Similarty, L1 Distance, KullbackLeibler, Simetric KullbackLeibler, JensenShannon) in C#

 public static double CosineSimilarty(double[] q, double[] d)         {             if (d == null || q == null) return 0;             if (q.Length != d.Length) throw new Exception("both vectors must be of similar length");             // Calculate cosine similarity:             double numer = 0;             double denom = 1;             double d1 = 0, d2 = 0;                 for (int m = 0; m < q.Length; m++)             {                 numer += (q[m] * d[m]);                             d1 += (q[m] * q[m]);                 d2 += (d[m] * d[m]);   ...

T-SQL WITH

USE AdventureWorks2012; GO -- Define the CTE expression name and column list. WITH Sales_CTE (SalesPersonID, SalesOrderID, SalesYear) AS -- Define the CTE query. ( SELECT SalesPersonID, SalesOrderID, YEAR(OrderDate) AS SalesYear FROM Sales.SalesOrderHeader WHERE SalesPersonID IS NOT NULL ) -- Define the outer query referencing the CTE name. SELECT SalesPersonID, COUNT(SalesOrderID) AS TotalSales, SalesYear FROM Sales_CTE GROUP BY SalesYear, SalesPersonID ORDER BY SalesPersonID, SalesYear; GO source : http://msdn.microsoft.com/en-us/library/ms175972.aspx

How to retrieve the top N rows for each group

-- Solution   for   SQL   Server   2000   and   later       SELECT   ProductID ,           CategoryID ,           UnitPrice    FROM     @ Products   p1    WHERE    ProductID   IN  ( SELECT   TOP   3   ProductID                          FROM     @ Products   p2                          WHERE    p1 . CategoryID  =  p2 . CategoryID                          ORDER    BY   UnitPrice ...

T-Sql Case When

CASE WHEN durum1 THEN  yapılacaklar WHEN durum2 THEN yapılacaklar ELSE  yapılacaklar END

WITH common_table_expression (Transact-SQL)

WITH Sales_CTE (SalesPersonID, NumberOfOrders) AS ( SELECT SalesPersonID, COUNT(*) FROM Sales.SalesOrderHeader WHERE SalesPersonID IS NOT NULL GROUP BY SalesPersonID ) SELECT AVG(NumberOfOrders) AS "Average Sales Per Person" FROM Sales_CTE; GO source : http://msdn.microsoft.com/en-us/library/ms175972.aspx