11 Ağustos 2010 Çarşamba

1ktris: JavaScript Tetris Oyunu (Yalnızca 1024 byte)

1ktris
JavaScript ile kodlanmış Tetris oyunu.
Yalnızca 1024 byte

Oynamak için; http://i.sstephenson.us/1ktris/1ktris.html linkini ziyaret edebilirsiniz.

Kaynak Kodları da buradan indirebilirsiniz.



7 Ağustos 2010 Cumartesi

.LVF dosya uzantısı nedir? Nasıl açılır?


.LVF Dosya Uzantısı, Logo tarafından üretilen LKS Muhasebe programında oluşturulmuş rapor dosyalarının uzantısıdır. Logo tarafından verilen CD içersinde LVF dosyalarını açacak programı bulabilirsiniz.

The Eight Fallacies of Distributed Computing

Essentially everyone, when they first build a distributed application, makes the following eight assumptions. All prove to be false in the long run and all cause big trouble and painful learning experiences.

1. The network is reliable
2. Latency is zero
3. Bandwidth is infinite
4. The network is secure
5. Topology doesn't change
6. There is one administrator
7. Transport cost is zero
8. The network is homogeneous

Source

Susam Sokağı - 8 Satan Adam



Video'yu izleyemiyorsanız Facebook'a login olduğunuzdan emin olup tekrar deneyiniz.

3 Ağustos 2010 Salı

YouTube videoları artık 15 dakika

YouTube kullanıcılarının kendilerini kısıtlanmış hissetmesine neden olan , sitedeki video uzunluğu sınırlaması 10 dakikadan 15 dakikaya yükseltildi.

YouTube videolarının 10 dakika ile sınırlandırılmalarının sebebi, telif hakkı olan videolardı. Ancak Google'ın yeni ve gelişmiş "İçerik belirleme" sistemi sayesinde artık telif hakkı ile korunan videolar otomatik olarak belirlenebiliyor.

Merak edilen diğer bir konu ise, sitedeki 100 MB limiti. Bu konu hakkında herhangi bir açıklama yapılmaz iken , tahminler videonuz 15 dakika olsa bile yine 100 MB'a sığmak zorunda şeklinde oldu.

18 Temmuz 2010 Pazar

Executing Applications on Remote Systems by using PsExec

Running an executable on a remote machine is a piece of cake when you know the credentials (username and password) of the remote machine. A telnet-replacement called PsExec , can be used to execute processes on remote systems without having to install a client application.

PsExec is a free tool in PsTools Suite v2.44 and can be downloaded from the link below.
http://download.sysinternals.com/Files/PsTools.zip
After downloading the tool set, you can use the following example to run a remote executable.

Think that you want to run an executable which is located in "MyFolder" in "D:" drive and the name of the file is "MyFile.exe". Also , you know that the IP of the remote computer is "10.0.0.8" and the credentials are "user" for username and "pass" for password.

According to the information given above, your command line should look like the following line;
psexec.exe \\10.0.0.8 -u user -p pass -c -f "D:\MyFolder\MyFile.exe"

-u : username in the remote machine
-p : password of the given user
-c : by using this switch, it copies the specified application in the specified location, to the remote system for execution.
-f : if file already exists on the remote system it overwrites the file.

Mapping Network Drives using C#

You can use the Windows Networking Functions "WNetAddConnection2" and "WNetCancelConnection2" to map the drives. You can make a connection to a network resource by using the "WNetAddConnection2" function and can cancel an existing network connection by using the "WNetCancelConnection2" function.

Sample file can be downloaded from the following links:
NetworkDriveMapper.cs (Google)
NetworkDriveMapper.cs (Uploading)



using System;
using System.Runtime.InteropServices;

namespace Mapping_Network_Drive
{
    public class NetworkDriveMapper
    {
        private enum ResourceScope
        {
            RESOURCE_CONNECTED = 1,
            RESOURCE_GLOBALNET,
            RESOURCE_REMEMBERED,
            RESOURCE_RECENT,
            RESOURCE_CONTEXT
        }

        private enum ResourceType
        {
            RESOURCETYPE_ANY,
            RESOURCETYPE_DISK,
            RESOURCETYPE_PRINT,
            RESOURCETYPE_RESERVED
        }

        private enum ResourceUsage
        {
            RESOURCEUSAGE_CONNECTABLE = 1,
            RESOURCEUSAGE_CONTAINER = 2,
            RESOURCEUSAGE_NOLOCALDEVICE = 4,
            RESOURCEUSAGE_SIBLING = 8,
            RESOURCEUSAGE_ATTACHED = 10
        }

        private enum ResourceDisplayType
        {
            RESOURCEDISPLAYTYPE_GENERIC,
            RESOURCEDISPLAYTYPE_DOMAIN,
            RESOURCEDISPLAYTYPE_SERVER,
            RESOURCEDISPLAYTYPE_SHARE,
            RESOURCEDISPLAYTYPE_FILE,
            RESOURCEDISPLAYTYPE_GROUP,
            RESOURCEDISPLAYTYPE_NETWORK,
            RESOURCEDISPLAYTYPE_ROOT,
            RESOURCEDISPLAYTYPE_SHAREADMIN,
            RESOURCEDISPLAYTYPE_DIRECTORY,
            RESOURCEDISPLAYTYPE_TREE,
            RESOURCEDISPLAYTYPE_NDSCONTAINER
        }

        [StructLayout(LayoutKind.Sequential)]
        private struct NetResource
        {
            public ResourceScope ResourceScope;
            public ResourceType ResourceType;
            public ResourceDisplayType DisplayType;
            public ResourceUsage ResourceUsage;
            public string LocalName;
            public string RemoteName;
            public string Comments;
            public string Provider;
        }

        [DllImport("mpr.dll")]
        private static extern int WNetAddConnection2(ref NetResource networkResource, string password,string userName, int iFlags);

        [DllImport("mpr.dll")]
        private static extern int WNetCancelConnection2(string localName, uint iFlags, int iForce);

        public static void MapNetworkDrive(string driveLetter, string networkPath)
        {
            if (networkPath.EndsWith(@"\")) //When the last character is '\' , this causes error on mapping a drive.
            {
                networkPath = networkPath.Substring(0, networkPath.Length - 1);
            }

            NetResource networkResource = new NetResource();
            networkResource.ResourceType = ResourceType.RESOURCETYPE_DISK;
            networkResource.LocalName = driveLetter + ":";
            networkResource.RemoteName = networkPath;

            //If this drive is currently mapped, first disconnect the mapping before adding the new one
            if (IsDriveMapped(driveLetter))
            {
                DisconnectNetworkDrive(driveLetter, true);
            }

            WNetAddConnection2(ref networkResource, null, null, 0);
        }

        public static int DisconnectNetworkDrive(string driveLetter, bool forceDisconnect)
        {
            if (forceDisconnect)
            {
                return WNetCancelConnection2(driveLetter + ":", 0, 1);
            }
            else
            {
                return WNetCancelConnection2(driveLetter + ":", 0, 0);
            }
        }

        public static bool IsDriveMapped(string driveLetter)
        {
            string[] driveList = Environment.GetLogicalDrives();
            for (int i = 0; i < driveList.Length; i++)
            {
                if (driveLetter + ":\\" == driveList[i].ToString())
                {
                    return true;
                }
            }
            return false;
        }
    }
}