Translate

Freitag, 23. Oktober 2015

Johannes Schlüter steuert die Merkel durch alle Gefahren


Johannes Schlüter steuert die Merkel-Lustiges... von FranzHuber23

Twitter: @FranzHuber23
Twitter: @TheFranzHuber23
Homepage
Keine Homepage
Facebook
Facebook
Youtube:FranzHuber23
Youtube:HansDampf99984
Youtube:LetsZockClassic
Youtube:Elon Musk
Google+:FranzHuber23
Google+:LetsZockClassic
Google+:HansDampf99984
Google+:Elon Musk

Hackevoll durch die Nacht HD HQ Official Helene Fischer Atemlos Parodie


Hackevoll durch die Nacht HD HQ Official Helene... von FranzHuber23

Twitter: @FranzHuber23
Twitter: @TheFranzHuber23
Homepage
Keine Homepage
Facebook
Facebook
Youtube:FranzHuber23
Youtube:HansDampf99984
Youtube:LetsZockClassic
Youtube:Elon Musk
Google+:FranzHuber23
Google+:LetsZockClassic
Google+:HansDampf99984
Google+:Elon Musk

Dark horse-Katy Perry HD HQ Official


Dark horse-Katy Perry HD HQ Official von FranzHuber23

Twitter: @FranzHuber23
Twitter: @TheFranzHuber23
Homepage
Keine Homepage
Facebook
Facebook
Youtube:FranzHuber23
Youtube:HansDampf99984
Youtube:LetsZockClassic
Youtube:Elon Musk
Google+:FranzHuber23
Google+:LetsZockClassic
Google+:HansDampf99984
Google+:Elon Musk

Dare la la la-Shakira HD HQ Official


Dare la la la-Shakira HD HQ Official von FranzHuber23

Twitter: @FranzHuber23
Twitter: @TheFranzHuber23
Homepage
Keine Homepage
Facebook
Facebook
Youtube:FranzHuber23
Youtube:HansDampf99984
Youtube:LetsZockClassic
Youtube:Elon Musk
Google+:FranzHuber23
Google+:LetsZockClassic
Google+:HansDampf99984
Google+:Elon Musk

Dangerous-David Guetta HD HQ Official


Dangerous-David Guetta HD HQ Official von FranzHuber23

Twitter: @FranzHuber23
Twitter: @TheFranzHuber23
Homepage
Keine Homepage
Facebook
Facebook
Youtube:FranzHuber23
Youtube:HansDampf99984
Youtube:LetsZockClassic
Youtube:Elon Musk
Google+:FranzHuber23
Google+:LetsZockClassic
Google+:HansDampf99984
Google+:Elon Musk

Dancing in the dark-Bruce Springsteen HD HQ Official


Dancing in the dark-Bruce Springsteen HD HQ... von FranzHuber23

Twitter: @FranzHuber23
Twitter: @TheFranzHuber23
Homepage
Keine Homepage
Facebook
Facebook
Youtube:FranzHuber23
Youtube:HansDampf99984
Youtube:LetsZockClassic
Youtube:Elon Musk
Google+:FranzHuber23
Google+:LetsZockClassic
Google+:HansDampf99984
Google+:Elon Musk

Socket-Receive data byte per byte in C#


public string SendMessage(string serverAddress, int port, string message)
        {
            try
            {
                // Establish the remote endpoint for the socket.
                IPHostEntry ipHostInfo = Dns.Resolve(serverAddress);
                IPAddress ipAddress = ipHostInfo.AddressList[0];
                IPEndPoint remoteEP = new IPEndPoint(ipAddress, port);

                // Create a TCP/IP  socket.
                Socket sender = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);

                // Connect the socket to the remote endpoint. Catch any errors.
                sender.Connect(remoteEP);

                // Encode the data string into a byte array.
                byte[] data = Encoding.ASCII.GetBytes(message);

                // Send the data through the socket.
                int bytesSent = sender.Send(data);

                // String to store the response ASCII representation.
                string responseData = "";

                // Buffer to store the response bytes.
                data = new byte[262144]; //2^18
                byte [] onlyOneByte = new byte[1];

                // Receive the response from the remote device.
                int bytesRec = 0;
                do
                {
                    sender.Receive(onlyOneByte);
                    data[bytesRec] = onlyOneByte[0];
                    bytesRec++;
                }
                while (onlyOneByte[0]!=(char)3);
                //While not <ETX> reached, get new data

                responseData =  System.Text.Encoding.ASCII.GetString(data, 0, bytesRec);

                // Release the socket.
                sender.Shutdown(SocketShutdown.Both);
                sender.Close();
                return responseData;
            }
            catch (Exception e)
            {
                return "";
            }
        }


Get all indexes of a list in C#


var result = Enumerable.Range(0, lst1.Count)
            .Where(i => lst1[i] == "a")
            .ToList();