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

SEARCH KEYWORD -- Overflow



  CSS Overflow Property Utilization

Sometimes when we do CSS on HTML elements. We may want to hide some text when the text in a specified box overflows. Usually, we can use a CSS property overflow:hidden to hide the text so that the format of the whole element will not be affected. But will it always work? I believe some of us may encounter problems when we want to hide some text in a table td cell with specified width. If we use td { overflow:hidden;}, it is supposed to hide the text if the text in a td cell overflows. But the fa...

   CSS,Overflow,TD,Cell,Hidden     2014-10-21 08:24:48

  Be careful about printing error as string in GoLang

In GoLang, we can format and produce string using fmt.Printf(), just like C, GoLang also supports format verbs like %s, %d which can be placeholder for different types of values. But please pay attention when printing error as string so that you will not fall into some trap. Let's first take an example code snippet and see what trap we are talking about. package main import "fmt" type A string func (a A) Error() string { return fmt.Sprintf("%s is an error", a) } func main() { a := A("hello...

   STACKOVERFLOW,GOLANG,FMT     2019-01-23 09:17:15

  New CSS3 Properties to Handle Text and Word Wrapping

About a year and a half ago, I wrote about CSS3′s word-wrap property. The angle of the article was the fact that it was a feature that was new in CSS3 that didn’t exist in CSS2.1 and it worked in just about every browser, including old IE. Well, now that’s all changed, which I discovered while researching additions to my CSS3 Click Chart. The word-wrap property has been removed from the CSS3 spec and other related properties have been added. Text-Wrap The text-wrap proper...

   CSS3,Word wrap,Overflow-Wrap,Line-Break     2012-01-30 05:58:41

  Readability in Programming Languages

I saw a side by side comparison of a bunch of scripting languages online recently. Scripting Languages: PHP, Perl, Python, Ruby My first, and second reaction was yuck! Now I have my biases – biases which may  not be shared by others of course. But I like readable code and for me anytime I see a special character (anything not an alphanumeric) it slows me down. This got me thinking about where we are going in design of programming languages? Are we moving forward (what ever ...

   Programming,Style,Coding style,Readabili     2011-09-22 09:20:03

  C program to shutdown or turn off computer

C Program to shutdown your computer :- This program turn off i.e shutdown your computer system. Firstly it will asks you to shutdown your computer if you press 'y' the your computer will shutdown in 30 seconds, system function of "stdlib.h" is used to run an executable file shutdown.exe which is present in C:\WINDOWS\system32 in windows-xp. You can use various options while executing shutdown.exe for example -s option shutdown the computer after 30 seconds, if you wish to shutdown immediately th...

   C,Windows,Shutdown,Command,Code     2011-10-10 07:08:31

  Command Line Arguments

Our Hello program still isn’t very general. We can’t change the name we say hello to without editing and recompiling the source code. This may be fine for the programmers, but what if the secretaries want their computers to say Hello to them? (I know. This is a little far-fetched but bear with me. I’m making a point.)What we need is a way to change the name at runtime rather than at compile time. (Runtime is when we type java HelloRusty. Compile time is when w...

   Java,Command line arguments,First elemen     2011-09-30 11:31:54

  A simple tutorial about CSS flex property

CSS Flexbox is a layout module that makes it easier to create flexible and responsive layouts in CSS. It provides a simple and powerful way to align elements within a container and distribute space between them. To use flexbox, you need to set the display property of an element to "flex". You can do this by adding the following rule to your CSS: .container { display: flex; } The flex container will now have two main axes: the main axis and the cross axis. By default, the main axis runs horizo...

   JUSTIFY-CONTENT,FLEX,CSS     2022-12-25 06:44:34

  Pointers, arrays, and string literals

A recently posted question on Stack Overflow highlighted a common misconception about the role of pointers and arrays held by many programmers learning C.The confusion stems from a misunderstanding concerning the role of pointers and strings in C. A pointer is an address in memory. It often points to an index in an array, such as in the function strtoupper in the following code:void strtoupper(char *str) { if (str) { // null ptr check, courtesy of Michael while (...

   char pointer,initialization,literal,cann     2011-09-22 13:29:23

  Image lazy loading plugins on Github

Image lazy loading is a concept where images are getting loaded only when needed. It has been adopted in many web applications to reduce usage of bandwidth. When a web page is loaded in a web browser, not all the page elements would be visible in the view port, hence those resources(images, videos etc) don't need to be loaded.  Currently there are quite a few open source plugins on Github which can help achieve image lazy loading. Today we will introduce a few of them. Echo.js Echo.js is a ...

   JAVASCRIPT,OPEN SOURCE,WEB DEVELOPMENT,IMAGE LOADING     2017-04-22 01:16:04

  Integer overflow

You may be familiar with integer overflow, but what you may not be familiar with is how gcc handles signed integer overflow. First let's look at the standard, for unsigned integer, the standard says : A computation involving unsigned operands can never overflow, because a result that cannot be represented by the resulting unsigned integer type is reduced modulo the number that is one greater than the largest value that can be represented by the resulting type. In other words, unsigned integer ov...

   Integer overflow,gcc,Linux     2012-10-20 13:33:10