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

SEARCH KEYWORD -- Alignment



  MaxHeapSize in JVM

MaxHeapSize is an option which is to set the JVM maximum heap size can be allocated. We can specify the MaxHeapSize as VM argument when we run the program by setting -XX:MaxHeapSize=, here can be 2M, 20M, 200M etc. We can also view the current MaxHeapSize set by setting different JVM options. To view the MaxHeapSize, we can use two JVM options : -XX:+PrintFlagsFinal and -XX:+PrintCommandLineFlags. Below is one example when running -XX:+PrintFlagsFinal: bool MaxFDLimit ...

   JVM,MaxHeapSize,Alignment     2014-06-17 07:01:50

  Smuggling data in pointers

While reading up on The ABA Problem I came across a fantastic hack.  The ABA problem, in a nutshell, results from the inability to atomically access both a pointer and a "marked" bit at the same time (read the wikipedia page).  One fun, but very hackish solution is to "smuggle" data in a pointer.  Example:#include "stdio.h"void * smuggle(void * ptr, int value){  return (void *)( (long long)ptr | (value & 3) );}int recoverData(void * ptr){  return (long long)ptr &...

   C,Pointer,Bit,Data,Atomic,Smuggle     2011-11-14 08:15:59

  Successful Web Design: It’s All About The Details

While the tools are out there for almost anyone to build a website, the most successful designs all share a few characteristics. These sites tend to be organized well, have great content and have all the design details in order. Small parts of your site, from alignment and bolding to contrast and color, can make or break the design. Taking care of the details before your project is published will ensure the page has a clean overall feel. Unorganized design and lack of attention to detail ...

   Web design,Details,Success     2012-04-16 13:38:56

  How big is sizeof structure?

First let's see the codes of a structure: struct node{ int a; int b; }; Question : What's sizeof(node)? The answer is very simple, on a 32 bit machine, an int will take 4 bytes and two ints will take 8 bytes. So sizeof(node) is 8. The answer for the above codes is 8, then how about the following structure: struct node{ char a; int b; }; Question : Then what's sizeof(node) now? int takes 4 bytes, char takes 1 bytes, is the answer 5? Now the answer may not be 5, on some mac...

   Data structure alignment, pack     2012-10-29 12:13:37

  C programming tips in SPARC architecture

If you are a newbie of C programmers in SPARC architecture (For example, working on Solaris), you should pay attention to the following tips:(1) By default, SPARC is big-endian (For Endianness, you can refer http://en.wikipedia.org/wiki/Endianness). It means for an integer (short, int, long, etc), the MSB will be stored in the lower address, while the LSB will be stored in the higher address. (2) SPARC requires byte-alignment. It means for a short (2 bytes long) variable, the star...

   C     2014-06-01 03:56:30

  Life in Apple design team

While in mentioning about Apple, everyone of us will think of the amazing products shipped out by Apple such as iPhone and iPad. We are all impressed by its smooth design and handy user experience. But as a outsider do you know the story behind the amazing design of Apple? Apple has a team of world class designers and they are leading the fashion of design. What's the life in Apple's design team? Ben Williamson from Apple shared one story of him which can give us some hints on what the life is ...

   Apple,Design,Perfect     2014-01-02 07:00:27

  How to Create Dynamic PDF with Image and Content in Asp.Net Development?

Aegissofttech .net developers are specialized in developing real time web applications. While working on one of such real time web app development projects, our asp.net development team discovered an easy way to create PDF template from user inputs. The developers used Java Script and web service to accomplish PDF template development. To learn how to develop these dynamic PDF with content and graphics, you can follow the below tutorial. In real time web applications, we often require to generat...

   asp.net development,     2015-04-27 01:11:40

  Java Then, Java Now - Looking at the evolution of Java from EE7 to EE9

Java, the programming language developed at Sun Microsystems in the 90s and later acquired by Oracle, is the most common programming environment used today, by developers across the globe. With the diversification of applicability that accompanied the technological boom, Java updates now come as Standard Editions (SE), Enterprise Edition (EE) and Micro Edition (ME). The Java SE contains the core programming logic and platform, used for relatively smaller-scale tasks and academic purposes. Java E...

   JAVA DEVELOPMENT COMPANY     2017-07-05 01:09:28

  Check mobile device using JavaScript

Sometimes developers want to know whether the user is using a mobile browser or a desktop browser so that they can build corresponding user experience. Although in many cases responsive web design would help solve component alignment issues, there are performance related considerations in some cases where some code should not be ran or some feature should not be available if user is on mobile browser. or vice versa This post will summarize a few ways which are commonly used to check whether a us...

   CHECK,MOBILE BROWSER,MOBILE DEVICE,JAVASCRIPT     2021-10-02 01:36:16

  How big are PHP arrays (and values) really? (Hint: BIG!)

Upfront I want to thank Johannes and Tyrael for their help in finding some of the more hidden memory usage. In this post I want to investigate the memory usage of PHP arrays (and values in general) using the following script as an example, which creates 100000 unique integer array elements and measures the resulting memory usage: <?php $startMemory = memory_get_usage(); $array = range(1, 100000); echo memory_get_usage() - $startMemory, ' bytes'; How much would you expect it to ...

   PHP,Array,Memory occupation,Garbage collection     2011-12-16 10:06:04