Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- Connection



  Guide to Implement an SSH Client Using Golang

SSH, short for Secure Shell, is a network protocol used for securely remote logging into other computers on a network. I believe most backend developers are familiar with SSH. Common shell tools used for logging into servers, such as Xshell, SecureCRT, and iTerm2, are all based on the SSH protocol. In Golang, the crypto/ssh package provides functionality for implementing an SSH client. In this article, we will explain in detail how to implement an SSH client using Golang. Creating SSH Client Con...

   SSH CLIENT,GUIDE,SSH,GOLANG     2023-11-11 09:19:29

  Output a file with HTTP range header in PHP

When downloading a large file, we may encounter some network issues which causes download termination and only part of the file is downloaded. When the network connection resumes next time, we may need to redownload the file again from the beginning. In order to save bandwidth, http provides a Range parameter in its header which can control the file transfer flow. With the range parameter in the header, we can resume the download from where we stop. Here is a piece of PHP code snippet which uses...

   PHP, range,http, file transfer     2013-01-09 05:55:05

  SSH Security and You - /bin/false is *not* security

Backstory While at RIT around 2004 or 2005, I discovered that a few important machines at the datacenter allowed all students, faculty, and staff to authenticate against them via ssh. Everyone's shells appear to be set to /bin/false (or some derivative) on said machines, so the only thing you'll see after you authenticate is the login banner and your connection will close. I thought to myself, "Fine, no shell for me. I wonder if port forwarding works?" ...

   Linux,Security,/bin/false,SSH     2012-02-06 07:46:29

  My love… for Expressive Programming Languages

I started out my journey with programming as a teenager learning GW-BASIC. Soon I learnt C language followed by C++.  I was impressed with the OO syntactic constructs C++ had on offer but I felt a little uneasy with a few constructs such as the scope resolution. I started studying Java. It immediately caught my attention with the syntactic improvements and simplifications it brought over C++. I was still in academics, so learning(precisely trying) programming languages on su...

   descriptive,programming,language,prefere     2011-08-17 07:31:09

  Reproduce "MySQL server has gone away" in PHP

If you want to debug the issue of "MySQL server has gone away", you can reproduce it with below steps: Modify configuration file: sudo vi /etc/mysql/my.cnf  Make below changes: [mysqld]   wait_timeout = 30   interactive_timeout = 30  Restart the service: sudo /etc/init.d/mysql restart  Write below PHP codes: $link = mysql_connect('127.0.0.1', 'root', 'root');   if (!$link)&nbs...

   MySQL,debug,rMySQL server has gone away     2013-04-15 11:33:14

  A simple tutorial on GoLang connecting to Clickhouse

Go, also known as Golang, is a statically-typed, concurrent programming language created by Google. ClickHouse is a high-performance, column-oriented database management system that can be used for real-time data analysis. This tutorial will provide a deep dive into how to connect to ClickHouse from a Go program, including how to perform common database operations such as SELECT and INSERT statements. Before proceeding, it is assumed that you already have Go and ClickHouse installed on your mach...

   GOLANG,CLICKHOUSE,TUTORIAL     2023-02-11 07:05:36

  Why is single threaded Redis so fast

Redis is a high-performance, in-memory key-value database. According to official test reports, it can support around 100,000 QPS (queries per second) on a single machine. However, Redis uses a single-threaded architecture in its design. Why does Redis still have such high performance with a single-threaded design? Wouldn't it be better to use multiple threads for concurrent request processing? In this article, let's explore why Redis has a single-threaded architecture and still maintains its spe...

   REDIS,SINGLE-THREADED,MULTI-THREADING     2023-02-28 05:16:22

  How to send asynchronous requests in PHP

It’s easy to make asynchronous calls in PHP with just a little bit of HTTP header knowledge and some library code around PHP sockets. This technique is useful when posting requests to your own server for bits of logic you’d like to run in the background.  If you don’t control the endpoint, you might not be comfortable with some of the limitations, such as the inability to read anything from the response.  So, you couldn’t post data to a we...

   PHP,Asynchronous request,socket     2012-04-28 06:45:51

  How to teach "Modern" Perl?

Since I started my Perl Tutorial series a couple of people commented on what and how I am teaching.Some people asked why did I show "open or die" and why not using autodie. Others recommended the use IO::All instead of open.Another complaint was the introduction of time and localtime instead of DateTime.While I was mostly writing parts of my regular training material these comments led me to think about it again. I wonder how to teach Perl in 2012?When I started to write the tutorial I still cal...

   Perl,Trainning,Teach,Modern,Modern Perl     2011-11-15 08:40:18

  Send Email Using Gmail in ASP.NET

If you want to send email using your Gmail account or using Gmail's smtp server in ASP.NET application or if you don't have a working smtp server to send mails using your ASP.NET application or aspx page than sending e-mail using Gmail is best option.you need to write code like this First of all add below mentioned namespace in code behind of aspx page from which you want to send the mail.using System.Net.Mail;Now write this code in click event of button C# code protected void But...

   ASP.NET,Email,Send email,Gmail     2011-11-15 13:01:02