Mindblown: a blog about philosophy.

  • Area Calculation Javascript

    Area Calculation Javascript

    function areaOfCircle(radius) { return Math.PI * Math.pow(radius, 2); } function areaOfRectangle(width, height) { return width * height; } function areaOfSphere(radius) { return 4 * Math.PI * (Math.pow(radius, 2)); } function areaOfTriangle(baseWidth, height) { return baseWidth * height / 2; }

  • Retina Display Media queries

    Retina Display Media queries

    @media only screen and (min-width: 320px) { } /* Retina enabled devices with smaller screen */ @media only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px), only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px), only screen and ( min-device-pixel-ratio: 2) and (min-width: 320px), only screen and ( min-resolution: 192dpi) and (min-width: 320px), only screen and […]

  • Use Picture tag to create responsive image (html)

    <picture> <!– Default low resolution image –> <source srcset=”small.jpg” type=”image/jpg”> <!– Medium resolution image –> <source srcset=”medium.jpg” media=”(min-width: 768px)”> <!–High resolution Image –> <source srcset=”large.jpg” media=”(min-width: 1200px)”> <!– Fallback image incase the picture element is not supported –> <img src=”small.jpg” alt=”description of image”> </picture>

  • Media Queries for standard devices

    @media only screen and (min-device-width : 320px) and (max-device-width : 480px) { } /* Smartphones (landscape) ———– */ @media only screen and (min-width : 321px) { } /* Smartphones (portrait) ———– */ @media only screen and (max-width : 320px) { } /* iPads (portrait and landscape) ———– */ @media only screen and (min-device-width : 768px) […]

  • Computer Architecture and Assembly Language [ Irvine32.inc ]

    Assembly Language Program taking user input and displaying on screen. section .bss ;data num1 resb 5 num2 resb 5 section .data msg db ‘ Elementary Arithmetic’, 0xa ;string to be printed len equ $ – msg ;length of the string breakLine db ” “, 0xa lenBreakLine equ $ – breakLine msg2 db “Enter 2 numbers, […]

  • LMC – Little Man Computer Program – List largest

    LMC – Little Man Computer Program – List largest

    Here is  a program that reads three values as input and output these numbers in order from largest to smallest. INP STA 91 INP STA 92 INP STA 93 LDA 92 SUB 91 BRP STEP2 LDA 92 STA 99   LDA 91   STA 92 LDA 99 STA 91 STEP2 LDA 93 SUB 92 BRP […]

Got any book recommendations?