mnemonics

How to remember in CSS that margin is outside the border, and padding inside

I don't edit CSS very often, and almost every time I need to go and google the CSS box model to check whether padding is inside the border and margin outside, or vice versa. (Just checked again and padding is inside). Does anyone have a good way of remembering this? A little mnemonic, a good explanation as to why the names are that wa...

Intuitive way of understanding hexadecimal html color codes?

Is there an intuitive way, or a good mnemonic, for understanding the correspondence between colors and their hexadecimal values? ...

A mnemonic for the order of CSS margin and padding shorthand properties

I can never remember the order of the shorthand property for setting the margin or padding in one declaration. That is: margin-top: 2px; margin-bottom: 4px; margin-left: 3px; margin-right: 8px; may be written as margin: 2px 8px 4px 3px; Yes I understand that one can visualise the order by thinking of a clock, starting at midd...

Any mnemonic tip for boolean?

I guess this is trivial for most of good1 programmers, but I'm so used to programming using true and false2 that when I encounter 0 and 1, I can never remember which one means true and which one means false. Any suggestions? 1Good: I mean one who knows C, of course :) 2I am a Java developer, as you have guessed ;) ...

Question regarding assembler output

Consider the following assembler output: START 100 MOVER BREG, ONE 101) + 04 2 105 MOVEM BREG, RESULT 102) + 05 2 106 PRINT RESULT 103) + 10 0 106 STOP 104) + 00 0 000 ONE DC '1' ...

Are there any patterns/algorithms for dealing with localisable mnemonics?

I work on a web application product which allows mnemonics (i.e. an underscore below the character 'C', to allow a keyboard combination and the key C to trigger the "Close" button). Forms are created by different developers and they can each statically set mnemonics for buttons. Forms can be nested, so it is not necessarily known at ...

Long-term memorization techniques to become an expert in the field?

I'm familiar with some mnemonic/memorization techniques for about a year. I think that this techniques can give a developer significant benefit or even make you an expert in the field. If you are familiar with this techniques, you know that there are mnemonic techniques for long-term memorizing. We often read lots of books, and there a...

Good/Funny/Useful mnemonic devices?

In order to keep the OSI model straight in my head, I dreamt up the silly mnemonic: P. Diddy Never Takes Shit, Punk Ass! (Physical, Data, Network, Transport, Session, Presentation, Application) Similarly I was first learning Perl, I rearranged (some of) the regex modifiers to: SIXMOP GC (as in 6 of the things you use to clean the floo...

Generating random 6-character strings

How many possible words of length 6 can I generate from the English lower case alphabet, if each word starts with a random consonant, and after that vowels and consonants alternate? What if I add digits to my alphabet? See also this question. ...

Remembering the Ternary Operator Syntax

Anyone have a good trick to remember the standard ternary syntax? Specifically whether the '?' or ':' comes first. I have consistently gotten this backwards over the years. ...

Setting Mnemonics and Hot Keys for a JOptionPane Dialog

Is it possible to assign hotkeys and mnemonics to the buttons in a JOptionPane Dialog? I'd like to be able, in a JOptionPane generated message dialog with the options Yes, No and Cancel, press Y to hit the Yes button, N to hit the No button and escape to activate the escape button. Similarly in a dialog with Okay and Cancel buttons I'd...

Mnemonic not showing on a System.Windows.Forms.ContextMenu

I'm having some problems with Mnemonics and ContextMenus - although the Mnemonic property of the Menutem is set correctly the little underline wont show under the relevant key. Here is my code: private void Form1_MouseDown(object sender, MouseEventArgs e) { System.Windows.Forms.ContextMenu menu = new ContextMenu(); menu.MenuItem...

Counting how often which mnemonic occures

Do you know a program which gives you a list of all assembler mnemonics used by a given byte machine code (mainly for x86's) beside their number of occurrences? I don't mean something like a pure disassembler. I'm only interested in their absolute frequencies. Edit: I'm happy too with a simple shell script or a cunning sequence of well ...

Windows standard for mnemonics

Are there any mnemonic standards for Windows? For example -- the menu bar, actions on the menu bar (e.g. Alt+f to file menu but ctrl+s to do the save under the file menu), and controls. I'm asking because we have a search screen with many controls and we're trying to decide shortcut keys to get to fields and such described above. Is t...

JButton with HTML named action and a mnemonic

Hi all, I have a JButton that is constructed using an Action and this action has a name that is contains html. I then go about setting the mnemonic on the JButton by first parsing out html to get the first character in the name. For example, the JButton name might be "<html>Test<br>Button</html>", so after parsing the html the mnemoni...

How to disable mnemonics?

I'm extending Eclipse using the Eclipse plugin infrastructure, and I've come into a problem: I created an Eclipse editor and I would like to disable the mnemonic menus Eclipse, for example: ALT + a is equivalent to the menu Search. Because I need these combinations (Alt +...) in my editor. what to do? ...

Database mnemonics

I'm looking for mnemonics to help me with databases, the relational model and transaction theory. For example I learned "ACID" to help me remember the properties of a transaction: atomicity, consistency, isolation, and durability. What others are out there? ...

Java Swing: Can I set a button mnemonic that doesn't require pressing alt?

For example, say I have a series of toolbar-style buttons across the top of my application's main window. I want to attach a mnemonic to one of these that's just a single keypress, like F3. When you set the mnemonic to KeyEvent.VK_F3, the user has to press Alt+F3. If you have a menu item, you can set an accelerator, rather than a mnem...

Generating easy-to-remember random identifiers

Hi all, As all developers do, we constantly deal with some kind of identifiers as part of our daily work. Most of the time, it's about bugs or support tickets. Our software, upon detecting a bug, creates a package that has a name formatted from a timestamp and a version number, which is a cheap way of creating reasonably unique identifi...

Do you have suggestions for these assembly mnemonics?

Greetings! Last semester in college, my teacher in the Computer Languages class taught us the esoteric language named Whitespace. In the interest of learning the language better with a very busy schedule (midterms), I wrote an interpreter and assembler in Python. An assembly language was designed to facilitate writing programs easily, an...