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

SEARCH KEYWORD -- OUTPUT



  Go channel explained

In Go, a channel is a type of concurrent data structure that allows two or more goroutines (Go's term for lightweight threads) to communicate with each other. Channels provide a way for goroutines to send and receive values, and they are an essential part of Go's concurrency model. Here's a simple example that demonstrates how to use channels in Go: package main import ( "fmt" ) func main() { // Create a new channel with the `make` function ch := make(chan int) // Start a new ...

   GOLANG,CHANNEL     2022-12-10 22:24:26

  About C++ comma operator precedence

When learning programming language, we will always have one topic about the operator precedence. Since there are many operators can be used in one expression, there should be some rules regarding which operation can happen first so that the compiler or interpreter can handle them correctly. One rule of programming with expression is using as much as brackets as you can to avoid unexpected results. Here we refer one problem we see online about the comma operator in C++. The following program has ...

   comma,precedence     2012-11-12 10:25:00

  What and what not to log while debugging

Log is a critical part of an application. It serves as an eye to the programmer on how the application is working while debugging. Especially for applications running on production environment, if the application encounters problem and the problem cannot be reproduced on other environments, log will be extremely useful. While log is essential, but developers have to log smartly. Because if don't put log smartly, you may not get what you want while debugging or you may get too many...

   PROGRAMMING,DEBUG,LOG,SUPPORT     2016-03-14 08:09:03

  Ruby WinRM undefined method `split' for nil:NilClass

WinRM service is a service provided by Windows to enable remote access a Windows system. It is similar to what SSH is for *nix. And it is frequently used in applications which want to automate process or accessing remote Windows system and perform actions on them. Ruby also provided the WinRM gem which is an implementation of the WinRM service.  When using WinRM gem, one may often want to use :negotiate as the transport protocol for authentication. This transport will negotiate using d...

   RUBY,WINRM,INIT_AUTH,PROXY     2017-03-08 02:21:09

  How to play with cross domain request

What is cross domain request In simple, cross domain request is to request resource from other domain in one domain. Note, the "other domain" doesn't just mean domain name only, it includes much more. If the protocol, domain name, port is not the same, two domains will be considered different.  Below example describes what is considered as different domain. http://www.a.com/a.jshttp://www.a.com/b.js               # Same domainhttp://www.a.com/lab/a.js &nb...

   FRONT END,JSONP,CROSS DOMAIN,CROSS ORIGIN,CORS,DOCUMENT.DOMAIN,WINDOW.NAME     2016-11-06 00:48:54

  Simple Animation in the HTML5 Canvas Element

HTML5 is generating all kinds of buzz these days. Some of the buzz is about HTML5 being a replacement for Adobe’s Flash. I don’t think it’s there yet but it’s certainly on the way to changing the way content is presented on the web. This is a description of a very simple animation in an HTML5 canvas element. It is coded for readability and not for optimized operation. We’ll add a canvas element to a web page and then use javascript to draw on it. We will...

   HTML5,Canvas,Animation,Sample code     2011-07-01 10:20:08

  Replacing small C programs with Haskell

C is the classic go-to tool for small programs that need to be really fast. When scripts.mit.edu needed a small program to be a glorified cat that also added useful HTTP headers to the beginning of its output, there was no question about it: it would be written in C, and it would be fast; the speed of our static content serving depended on it! (The grotty technical details: our webserver is based off of a networked filesystem, and we wanted to avoid giving Apache too many credentials in ca...

   C,Haskell,Small program     2012-01-03 10:51:39

  Time to think about supporting max/min functions for integers in GoLang

Sometime back we wrote a post explaining why there is no max/min function support for integers in GoLang, one of the reasons is that no overloading is supported and the function name has been used for other numeric types float64. To solve this problem and make max/min function support integer as well, either GoLang should support overloading like in Java or the same set of functions need to be created in a different package other than standard math. These don't look like good options as overload...

   MIN,MAX,GENERICS,GOLANG     2021-07-24 03:14:42

  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

  Create rounded corner buttons in photoshop using gradient

Hi People,I should rather call you photoshop lovers, right ? We are going to create a very simply yet eye catching but sober buttons in photoshop. They are simple light in weight and can be used the way you want. You can also add some glossy look if you wish to. But these days not many people like website with those glossy looks. Here is the final output which you will get after reading this tutorial.However many web-developers, webmasters, designers do not like to use images as buttons, but the...

   PhotoShop,Rounded button,Design,Gradient     2011-10-10 14:04:33