It is a more and more common task that we need to have a date or maybe date with time as String. There are two reasonable ways to do this: * We may want the date formatted in the users Locale, whatever that is. * We want to use a generic date format, that is …
Kategorie-Archive: C
What do +, – and * with Integer do?
When using integers in C, Java or Scala, we often use what is called int. It is presented to us as the default. And it is extremely fast. Ruby uses by default arbitrary length integers. But what do +, – and * mean? We can rebuild them, in Ruby, kind of artificially restrict the integers …
System Programming on Linux and MS-Windows
Quite honestly I admit that I really love the Posix-APIs for system programming and even some Linux specific extensions to it. I/O, Locking, Semaphores, Shared Memory, Message Queues, Signals, named and anonymous pipes, Unix Domain Sockets, TCP/IP programming, Terminal I/O, pthreads and a lot more are very powerful and fun to program. I do discover …
How to multiply long numbers
Assuming we have a multiplication of n-bit-numbers already available. Other than typical compiled languages, which assume that the multiplication result fits into the same size as the two factors, we should take a closer look. Unsigned n-bit-numbers as factors and fullfill So we have for the product So we …
Testing Java- and C-programs with Ruby and Perl
It is very important to write good unit tests for software that is non-trivial and that is relied on by other pieces of software. Often the logic of the software can easily be covered by the native testing facilities of the programming language, like JUnit for Java or, much less well known but available, CUnit …
„Testing Java- and C-programs with Ruby and Perl“ weiterlesen