Posts

Showing posts from December, 2016

How To Write Background Image In Css In Visual Studio Code Code Example

Example: css background image not showing vscode #bg { background-image : url ( "images/image1.jpeg" ) ; }

Converting Hex To Base64 With Notepad++

Answer : The trick was that by converting the HEX directly in notepad++, It's taken as a ASCII value not as A HEX Value as intended. So we need to converted first the HEX --> ASCII then ASCII --> BASE64 1/ Select the string 2/ Using Notepad++ menu: Plugins -> Converter -> HEX -> ASCII 3/ Plugins -> MIME Tools -> Base64 Encode and we get the needed value The characters FB can be encoded as the 16-bit values 46004200 and encoding that in Base 64 gives RkI= . Using Notepad++ menu => TextFx => TextFx Tools => Base 64 decode : Converting +w== gives the single byte xFB . It show as thouse three characters in white on a black background. The status bar at the bottom of the window shows the buffer has a length of 1 (i.e. one). Converting RkI= gives the two characters FB . Shown in black on a white background, i.e. as normal text. The buffer is shown to have a length of 2. Conclusion, your initial conversion was of the two charactgers FB not the byt

Controlling Spacing Between Table Cells

Answer : Use the border-spacing property on the table element to set the spacing between cells. Make sure border-collapse is set to separate (or there will be a single border between each cell instead of a separate border around each one that can have spacing between them). Check this fiddle. You are going to need to take a look at using border-collapse and border-spacing. There are some quirks for IE (as usual). This is based on an answer to this question. table.test td { background-color: lime; margin: 12px 12px 12px 12px; padding: 12px 12px 12px 12px; } table.test { border-collapse: separate; border-spacing: 10px; *border-collapse: expression('separate', cellSpacing='10px'); } <table class="test"> <tr> <td>Cell</td> <td>Cell</td> <td>Cell</td> </tr> <tr> <td>Cell</td> <td>Cell</td> <td>Cell</td> </tr>

CSS/HTML: Create A Glowing Border Around An Input Field

Image
Answer : Here you go: .glowing-border { border: 2px solid #dadada; border-radius: 7px; } .glowing-border:focus { outline: none; border-color: #9ecaed; box-shadow: 0 0 10px #9ecaed; } Live demo: http://jsfiddle.net/simevidas/CXUpm/1/show/ (to view the code for the demo, remove "show/" from the URL) label { display:block; margin:20px; width:420px; overflow:auto; font-family:sans-serif; font-size:20px; color:#444; text-shadow:0 0 2px #ddd; padding:20px 10px 10px 0; } input { float:right; width:200px; border:2px solid #dadada; border-radius:7px; font-size:20px; padding:5px; margin-top:-10px; } input:focus { outline:none; border-color:#9ecaed; box-shadow:0 0 10px #9ecaed; } <label> Aktuelles Passwort: <input type="password"> </label> <label> Neues Passwort: <input type="password"> </label> How about something like this... ht

C How To Use Extern Variable Code Example

Example: what is the usage of extern in c # include <stdio.h> extern int x = 32 ; int b = 8 ; int main ( ) { auto int a = 28 ; extern int b ; printf ( "The value of auto variable : %d\n" , a ) ; printf ( "The value of extern variables x and b : %d,%d\n" , x , b ) ; x = 15 ; printf ( "The value of modified extern variable x : %d\n" , x ) ; return 0 ; }

The Longest Common Subsequence Code Example

Example 1: longest common subsequence class Solution : def longestCommonSubsequence ( self , text1 : str , text2 : str ) -> int : "" " text1 : horizontally text2 : vertically "" " dp = [ [ 0 for _ in range ( len ( text1 ) + 1 ) ] for _ in range ( len ( text2 ) + 1 ) ] for row in range ( 1 , len ( text2 ) + 1 ) : for col in range ( 1 , len ( text1 ) + 1 ) : if text2 [ row - 1 ] == text1 [ col - 1 ] : dp [ row ] [ col ] = 1 + dp [ row - 1 ] [ col - 1 ] else : dp [ row ] [ col ] = max ( dp [ row - 1 ] [ col ] , dp [ row ] [ col - 1 ] ) return dp [ len ( text2 ) ] [ len ( text1 ) ] Example 2: longest common subsequence int maxSubsequenceSubstring ( char x [ ] , char y [ ] , int n , int m ) { int dp [ MAX ] [ MAX ] ;

Convert Blob To Base64 String Javascript Code Example

Example: how to convert a base 64 to blob import { base64StringToBlob } from 'blob-util'; const contentType = 'image/png'; const b64Data = 'iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=='; const blob = base64StringToBlob(b64Data, contentType); // Do whatever you need with your blob...

CSS Transform Skew Without Blur

Answer : I have yet to see any pure CSS solution to fix blurry text after a transform - but I'm happy to be proven wrong! I've found it best to never skew or transform text and instead skew the image, border etc., then just position the text over the top. For example: body { margin: 0; } nav { display: flex; margin-left: -54px; overflow: hidden; } article { position: relative; width: 100%; } section { min-width: 300px; margin-top: 130px; margin-left: 70px; } aside { background-image: url('https://i.redd.it/kvowi2zio7h01.jpg'); background-size: cover; background-repeat: no-repeat; background-position: center; position: absolute; top: 0; left: 0; transform: skew(-15deg, 0deg); transform-origin: bottom center; z-index: -1; width: 100%; height: 200px; } aside::after { content: ""; height: 100%; position: absolute; border-right: 20px solid #fdcb6e; } article:nth-child(2n) aside::after { border-right-color: #e84

Symbol For Square Root Latex Code Example

Example: square root latex \sqrt [ n ] { expression }

CONVERT Int Array To Char Array Java Code Example

Example 1: number to char java char b = Integer . toString ( a ) ; //7-->"7" char b = ( char ) b ; //65-->"A" Example 2: convert from integer to character java char a = ( char ) 65 ;