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

SEARCH KEYWORD -- arguments



  Python internals: how callables work

[The Python version described in this article is 3.x, more specifically - the 3.3 alpha release of CPython.] The concept of a callable is fundamental in Python. When thinking about what can be "called", the immediately obvious answer is functions. Whether it’s user defined functions (written by you), or builtin functions (most probably implemented in C inside the CPython interpreter), functions were meant to be called, right? Well, there are also methods, but they’re not very ...

   Python,Callable work,Rationale     2012-03-24 05:20:27

  HeartBleed: OpenBSD now starts to clean up OpenSSL

Since the disclosure of HeartBleed bug in OpenSSL, some arguments emerge around the safety of OpenSSL, the largest open source SSL/TLS library used by large number of servers, applications. Some people are even starting to create their own version of SSL library. This includes OpenBSD, a famous Unix like open source operating system. Just a few days after the HeartBleed bug, OpenBSD forked a new branch of OpenSSL and started to clean up the forked branch and plans to merge it to its own cod...

   HeartBleed,OpenBSD     2014-04-15 04:21:26

  JavaScript-style object literals in PHP

The object literal notation in JavaScript looks like: var fido = {name: "Fido", barks: true}; or var fido = {}; fido.name = "Fido"; fido.barks = true; From assoc arrays to objects In PHP you would call that an associative array. $fido = array( 'name' => "Fido", 'barks' => true ); And you can easily make it an object too: $fido = (object)$fido; echo gettype($fido); // "object" Or if you want to start with a blank object and add stuff to it: $fido = (object)array(); or $fido...

   PHP,JavaScript,Object,Function call,Self vs this     2011-11-30 11:11:45

  Implement struct no copy in GoLang

There is some case where some of the struct in GoLang which is not meant to be copied. For example, sometimes a global configuration which should have only one version passed around the whole application and should not be copied and modified. In GoLang, there is no intuitive solution on preventing copying of struct. But there is still some way which can be leveraged to help prevent this while developing the code. The trick is to define some struct implementing sync.Locker interface and has this ...

   GO VET,NOCOPY,NO COPY     2020-09-04 22:24:58

  A simple tutorial on Linux nohup command

In our daily work, there might be need to run some important program for hours or even days without being abruptly terminated. In such case, we may want to run the program with command nohup. nohup is the abbreviation of no hangup, i.e, don't hang up or terminate the process. This command will tell the process to ignore the system HUP signal. The HUP signal will be emitted when the terminal is exited or disconnected. Normally process will abort its execution when receiving this signal.  Bas...

   NOHUP,LINUX     2020-08-08 01:14:50

  Set Theory in C++11

Have you ever felt the need to perform set theoretic operations on types? Not really? Me neither, but I thought it’s a fun thing to try out. So, if you ever feel the need of using type sets, C++11 makes it quite easy to do so. Especially variadic templates allow for a much more condensed syntax compared to type list constructs formerly used. (Disclaimer: This is rather a proof of concept, but maybe somebody comes up with a useful scenario.) Let’s start by d...

   C++,set theory,Math     2012-03-11 13:15:55

  Understanding PHP's internal function definitions

Welcome to the second part of the “PHP’s Source Code For PHP Developers” series. In the previous part ircmaxell explained where you can find the PHP source code and how it is basically structured and also gave a small introduction to C (as that’s the language PHP is written in). If you missed that post, you probably should read it before starting with this one. What we’ll cover in this article is locating the definitions of internal functions in t...

   PHP,internal function,definition,rationale     2012-03-16 10:46:26

  How Artificial Intelligence is Changing the Future of Web Design & Development

Artificial intelligence is having a say in how web designs are shaping up nowadays. Many within the industry have even gone on to say that AI is the future of web design and development. The impact of AI on web design and development can be felt by understanding how web design has evolved over the years. Traditionally, all websites were created using HTML. Then, with the advancement of technology, the code structure of websites began to change and became more sophisticated. Now, it has come to a...

   HIRE WEBSITE DESIGNER, OUTSOURCE WEBSITE DESIGN SERVICES     2020-02-13 02:21:26

  The Value of the Designer Who Codes

"Well, it's a start, but basically it stinks," said Steve Jobs, telling early Apple engineer Chris Espinosa exactly how he felt about the company's first calculator application. Iteration after iteration, Jobs continued to be dissatisfied with the calculator. Espinosa continued to code, slowly inching his way to perfection. But nothing was quite right. In a flash of both brilliance and perhaps frustration, Espinosa put together a visual builder that let Jobs design the calculator himself...

   Designer,Coder,Value,Designer knows code     2012-01-03 10:49:39

  JavaScript: Passing by Value or by Reference

In JavaScript, we have functions and we have arguments that we pass into those functions. But how JavaScript handles what you’re passing in is not always clear. When you start getting into object-oriented development, you may find yourself perplexed over why you have access to values sometimes but not other times. When passing in a primitive type variable like a string or a number, the value is passed in by value. This means that any changes to that variable while in the function are com...

   JavaScript,Function,Pass by reference,Pa     2011-07-28 11:05:25