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

SEARCH KEYWORD -- Programming.Net



  Cripple Pachebel's Canon on Matlab

What can Matlab do? What the following Matlab code does is playing the piano music of Cripple Pachebel's Canon. You can have a try if you have Matlab installed on your computer. % Cripple Pachebel's Canon on Matlab % Have fun fs = 44100; % sample rate dt = 1/fs; T16 = 0.125; t16 = [0:dt:T16]; [temp k] = size(t16); t4 = linspace(0,4*T16,4*k); t8 = linspace(0,2*T16,2*k); [temp i] = size(t4); [temp j] = size(t8); % Modification functions mod4 =...

   Matlab,Programming,Canon,Music     2012-05-16 11:55:13

  errGroup in GoLang explained

Today, let's talk about the usage and applicable scenarios of errGroup, which is often used. Why is it useful? Generally, when we use goroutine, we cannot return a value. If you want to pass out the result of the goroutine execution, you usually have to use the channel. The errGroup package is suitable if you want to know when the goroutine you opened encounters an error during execution and stop working, and I need to know the error value. errGroup usage The package needs to be downloaded and i...

   GOLANG,ERRGROUP,WAITHROUP,CONCURRENCY     2023-05-27 23:58:20

  Write Your Own R Packages

Introduction A set of user-defined functions (UDF) or utility functions are helpful to simplify our code and avoid repeating the same typing for daily analysis work. Previously, I saved all my R functions to a single R file. Whenever I want to use them, I can simply source the R file to import all functions. This is a simple but not perfect approach, especially when I want to check the documentation of certain functions. It was quite annoying that you can’t just type ?func&n...

   DATA SCIENCE,R PROGRAMMING,DATA ENGINEERING     2019-10-19 07:20:52

  Go 1.16 is released

Note: The post is authorized by original author to republish on our site. Original author is Stefanie Lai who is currently a Spotify engineer and lives in Stockholm, original post is published here. Last week, Go1.16 was released, bringing relatively more changes than version 1.15, which was influenced by the epidemic. The update is in many aspects, including compilation, deployment, standard library, etc. In the official Go document, all changes are classified based on Too...

   GOLANG,GO1.16,NEW FEATURES     2021-02-26 21:08:42

  Getting the most out of your pixels - adapting to view state changes

In Windows 8, your apps run on a variety of screen sizes and under various view states. A user might have your app snapped to the side of a 25-inch desktop monitor, or fill the whole screen of a 10-inch widescreen tablet. In each case, you want your app to take full advantage of the available space. In this post, I show you how you can track the current size and view state of your app in code, and give you tips on how to write your app in the Windows 8 Consumer Preview to handle screen si...

   Windos 8,Metro,Resolution,Style     2012-04-23 06:13:02

  10 tools to make your shell script more powerful

Many people mistakenly think that shell scripts can only be run in command line. In fact shell can also call some GUI components such as menus,alert dialogs, progress bar etc. You can control the final output, cursor position and various output effects. Here we introduce some tools which can help you create powerful, interactive and user friendly Unix/Linux shell scripts. 1. notify-send This command can let you inform the process to send a desktop notification to users. This can be used to send ...

   shell,GUI,zenity     2013-04-05 08:50:41

  A Quick Look at the Services Offered by RDBMs vs. NoSQL

The world of IT has to deal with the issue of data storage. The reason for this is that there is plenty of data produced and created daily on the internet and on various business applications. In the past, RDBMs or Relational Database Management Systems were used for storage. Even though they are still used today, there are other offerings that present competition and anyone wishing to purchase data storage systems needs to make comparisons.  One such competing system is NoSQL or Not Only ...

   NOSQL,DATABASE,RDMS,DATABASE SUPPORT     2015-11-06 04:52:54

  9 quotes that stayed with me as a developer

I find quotes inspiring, motivating or sometimes just thought provoking, so here's some of my favourites from over the years. Sometimes reading a book can have a real influence on how you write code, or how you approach a problem. Sometimes a simple quote  is enough to make me question the way I look at the code I'm writing. Or often I sit in awe about someone's so well distilled what I've known internally for ages but have never been able to enunciate.   "Design is finding t...

   Quote,programmer,programming     2011-05-27 03:34:49

  Top 10 Go Coding Traps and Tips

Go is currently the most common programming language in cloud development. Though I use it very much in my work, I am still repeating certain mistakes. This article is more a record of these errors, figuring out the causes and solutions so that people who read this article will save themselves time when coming across the same problems. Let’s cut through to the tips. Don’t rely on index var in the for loop The most common mistake we make is that we often create goroutine&nbs...

   TIPS,GOLANG,NIL INTERFACE     2021-07-03 23:45:51

  That “JavaScript not available” case

During some interesting discussions on Twitter yesterday I found that there is now more than ever a confusion about JavaScript dependence in web applications and web sites. This is a never ending story but it seems to me to flare up ever time our browsing technology leaps forward. I encountered this for the first time back in the days of DHTML. We pushed browsers to their limits with our lovely animated menus and 3D logos (something we of course learned not to do again, right?) and we were ...

   JavaScript,Security,Banned,Reason     2012-01-04 02:37:35