Category: Teaching course

  • JavaScript: convert String to Hex code

    JavaScript: convert String to Hex code

    JavaScript is a powerful programming language that is widely used in web development. One of the common tasks in JavaScript programming is converting a string to a hexadecimal code. This can be done easily using a built-in function in JavaScript called charCodeAt(). In this article, we will discuss how to convert a string to a […]

  • Part- 2 Illustrator Scripting Creating folder using Javascript

    Part- 2 Illustrator Scripting Creating folder using Javascript

    Below is the code that will create a folder using javascript in illustrator script. Suppose there is dir variable selected by user. (as shown here) For MAC OS path= dir.fsName;new Folder(path+”/White”).create(); For WINDOWS OS path= dir.fsName;new Folder(path+”\\White”).create(); For different operating system in full path above is the code to create folder correctly. see the difference […]

  • 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 […]

  • caspio Programing

    Here is some code snippet to replace <br> to <p> tag in CKEDITOR Below code will convert the normal textarea to ckeditor and will replace the breakline tag to paragraph tag on pressing enter. <script type=”text/javascript” src=”https://c0abg481.caspio.com/scripts/CKEditor/ckeditor.js” ></script><script type=”text/javascript”> CKEDITOR.editorConfig = function( config ) { config.toolbarGroups = [ { name: ‘document’, groups: [ ‘mode’, ‘document’, […]