Posts

Showing posts from September, 2000

Light Grey Color Hex Code Code Example

Example 1: light grey color code HTML / CSS Color Name Hex Code #RRGGBB Decimal Code ( R , G , B ) gainsboro #DCDCDC rgb ( 220 , 220 , 220 ) lightgray / lightgrey #D3D3D3 rgb ( 211 , 211 , 211 ) silver #C0C0C0 rgb ( 192 , 192 , 192 ) darkgray / darkgrey #A9A9A9 rgb ( 169 , 169 , 169 ) Example 2: grey rgb RGB ( 220 , 220 , 220 )

How To Use Internal Css In Html Code Example

Example 1: adding css to html body Three ways to add CSS to the body of html: 1 ) External CSS 2 ) Internal CSS 3 ) Inline CSS 1 ) Externally: Type your css code in a file. Remember you file name. Then , <head > <link rel="stylesheet" type="text/css" href="FileName .css " > </head > 2 ) Internally: Type your cSS in the html file itself. ( It is not preffered until little CSS code is to be added ) . This can be done by style tag. Example: <head > <style > h1 { text-color : red ; text-size : 0.8 em ; } </style> </head> 3 ) Inline : This method is not used by developers as it is very lengthy and maintaining code becomes difficult. Example : <h1 style= "color:blue;text-align:center;" >Header file</h1> Example 2: how to write css in html <p style= "color: blue; font-size: 46px;" > Example 3: internal css <!DOCTYPE html > <

Android - Android 4.3: How To Get The Notification History

Image
Answer : This is not a rumor: the notification history is a true feature from Android 4.3, although they don't make any mention of it in their What's New page. The following steps will allow you to take advantage from the Notification History in a vanilla Android Jelly Bean 4.3: Go to your app drawer, then tap the Widgets tab. Scroll until you reach Settings shortcut (1x1) widget. Drag and drop this widget to your home screen . You'll see a screen where you can select the type of settings this shortcut will open. Select Notifications . The shortcut Notifications will be in your home screen , tap it. The screen Notifications shows the notification history we are talking about. In this screen currently active notifications appear in full intensity, while dismissed ones are dimmed. Tapping in each notification from this screen will open the corresponding App info screen, where you'll be able to toggle the option Show notifications as you wish. R

Can I Define Multiple Agent Labels In A Declarative Jenkins Pipeline?

Answer : You can see the 'Pipeline-syntax' help within your Jenkins installation and see the sample step "node" reference. You can use exprA||exprB : node('small||medium') { // some block } This syntax appears to work for me: agent { label 'linux && java' } EDIT: I misunderstood the question. This answer is only if you know which specific agent you want to run for each stage. If you need multiple agents you can declare agent none and then declare the agent at each stage. https://jenkins.io/doc/book/pipeline/jenkinsfile/#using-multiple-agents From the docs: pipeline { agent none stages { stage('Build') { agent any steps { checkout scm sh 'make' stash includes: '**/target/*.jar', name: 'app' } } stage('Test on Linux') { agent { label

Browsers' Default CSS For HTML Elements

Answer : It's different for each browser, so: Firefox (Gecko): https://dxr.mozilla.org/mozilla-central/source/layout/style/res/html.css. Or, browse to resource://gre-resources/ and look at html.css . Chrome/Safari (WebKit): http://trac.webkit.org/browser/trunk/Source/WebCore/css/html.css Chrome (Blink): https://chromium.googlesource.com/chromium/blink/+/master/Source/core/css/html.css Internet Explorer (Trident) , older versions: http://web.archive.org/web/20170122223926/http://www.iecss.com/ You can also look at the HTML5 Boilerplate stylesheet, which "normalizes the display of a lot of stuff without being a reset in the traditional sense". It also fixes quite a few bugs/inconsistencies. It's also worth looking at: https://github.com/necolas/normalize.css/blob/master/normalize.css A GitHub repository of all W3C HTML spec and vendor default CSS stylesheets can be found here 1. Default Styles for Firefox 2. Default Styles for Internet Explorer

Button Disable Jquery Code Example

Example 1: jquery add disabled to button $ ( "#button" ) . attr ( "disabled" , true ) ; Example 2: How disable button jquery $ ( "button" ) . prop ( "disabled" , true ) ; Example 3: jquery enable submit button //jQuery 1.6+ use: $ ( "#submitButtonID" ) . prop ( 'disabled' , true ) ; //disable $ ( "#submitButtonID" ) . prop ( 'disabled' , false ) ; //enable //jQuery 1.5 and below use: $ ( "#submitButtonID" ) . attr ( 'disabled' , 'disabled' ) ; //disable $ ( "#submitButtonID" ) . removeAttr ( 'disabled' ) ; //enable

Difference Between Class And Interface. Code Example

Example: difference between class and interface in java A class can be instantiated by creating its objects . An interface is never instantiated as the methods declared inside an interface are abstract and does not perform any action , so there is no use of instantiating any interface . A class is declared using a keyword class . In the same way , an interface is created using a keyword interface . The members of a class can have access modifier like public , private , protected . But the members of an interface are always public as they have to be accessed by the classes implementing them . The methods inside a class are defined to perform an action on the fields declared in the class . The methods inside an interface are purely abstract . A class can implement any number of interfaces but can extend only one super class . An interface can extend any number of interfaces but cannot implement any interface . A class has constructors d

Adding Shadows At The Bottom Of A Container In Flutter?

Image
Answer : Or you can wrap your Container widget with a Material widget which contains an elevation property to give the shadowy effects. Container( child: Row( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Material( elevation: 15.0, child: Container( height: 100, width: 100, color: Colors.blue, child: Center(child: Text("Material",style: TextStyle(color: Colors.white),)), ), ), SizedBox(width: 100,), Container( height: 100, width: 100, decoration: BoxDecoration( boxShadow: <BoxShadow>[ BoxShadow( color: Colors.black54, blurRadius: 15.0, offset: Offset(0.0, 0.75)

How To Put A Border Around Text Css Code Example

Example 1: text border css h1 { -webkit-text-stroke : 1 px black ; } Example 2: how to add a border around text in html <p style= "border:3px; border-style:solid; border-color:#FF0000; padding: 1em;" > First example with text surrounded by a red border.<br>This example also has multiple lines. </p> Example 3: put an border around an text in css text-shadow : 2 px 0 0 #fff , -2 px 0 0 #fff , 0 2 px 0 #fff , 0 -2 px 0 #fff , 1 px 1 px #fff , -1 px -1 px 0 #fff , 1 px -1 px 0 #fff , -1 px 1 px 0 #fff ;

Angular RouterLink

directive When applied to an element in a template, makes that element a link that initiates navigation to a route. Navigation opens one or more routed components in one or more <router-outlet> locations on the page. See more... Exported from RouterModule Selectors :not(a) :not( area) [ routerLink] Properties Property Description @ Input() queryParams ?: Params | null Passed to Router#createUrlTree as part of the UrlCreationOptions . See also: UrlCreationOptions#queryParams Router#createUrlTree @ Input() fragment ?: string Passed to Router#createUrlTree as part of the UrlCreationOptions . See also: UrlCreationOptions#fragment Router#createUrlTree @ Input() queryParamsHandling ?: QueryParamsHandling | null Passed to Router#createUrlTree as part of the UrlCreationOptions . See also: UrlCreationOptions#queryParamsHandling Router#createUrlTree @ Input() preserveFragment : boolean Passed to Router#create

Html Image Align Middle Code Example

Example: aligning image to middle in html <style > .aligncenter { text-align : center ; } </style>

CSS Last-child Selector: Select Last-element Of Specific Class, Not Last Child Inside Of Parent?

Answer : :last-child only works when the element in question is the last child of the container, not the last of a specific type of element. For that, you want :last-of-type http://jsfiddle.net/C23g6/3/ As per @BoltClock's comment, this is only checking for the last article element, not the last element with the class of .comment . body { background: black; } .comment { width: 470px; border-bottom: 1px dotted #f0f0f0; margin-bottom: 10px; } .comment:last-of-type { border-bottom: none; margin-bottom: 0; } <div class="commentList"> <article class="comment " id="com21"></article> <article class="comment " id="com20"></article> <article class="comment " id="com19"></article> <div class="something"> hello </div> </div> If you are floating the elements you can reverse the order i.e. float: right; instead of float: left; And

80 Inches In Cm Code Example

Example: inch to cm 1 inch = 2.54 cm

Document.getelementbyid .style.display 'block' In Javascript Code Example

Example 1: display none js document. getElementById ( "myDIV" ) .style.display = "none" ; Example 2: javascript display block document. getElementById ( "someElementId" ) .style.display = "block" ;

Angular Providers Code Example

Example 1: how to inject service in component angular 6 you can inject service in components constructor : constructor ( public anyService : Service ) { } Example 2: angular import service import { < service name > Service } from '../<service path>' ; Example 3: angular how to use service in class import { < service name > Service } from '../<service path>' ; you can inject service in components constructor : constructor ( public anyService : Service ) { }

Online Youtube To Mp4 Converter Code Example

Example 1: youtube mp4 downloader I suggest videovor . com , it's really great and you even get an option to choose if you want the whole video or just the audio ! Example 2: youtube to mp4 ytmp3 . cc is the best by far Example 3: yt to mp4 yt1s . com for mp4 is my recommendation Example 4: youtube to mp4 flvto . biz is great for it

Can Not Use Command Telnet In Git Bash

Answer : That's because telnet is not provided with git. In windows, you need to go to control panel, programs, turn windows features on/off and enable the telnet client. To add on to @lostbard's answer and @signonsridhar's comment, telnet utility need to be invoked with winpty to work on git bash. Example: MINGW64 ~ $ which telnet /c/WINDOWS/system32/telnet MINGW64 ~ $ winpty telnet localhost 2181 Zookeeper version: 3.4.14-4c25d480e66aadd371de8bd2fd8da255ac140bcf, built on 03/06/2019 16:18 GMT

Angle Bracket Latex Code Example

Example: latex angle brackets \langle \rangle

Cannot Install Support Repository And Sync Project In Android Studio

Answer : Previously the Android Support Library dependencies were downloaded from Android SDK Manager. Now all the new versions are available from Google's Maven repository. In future all android libraries will be distributed through maven.google.com So, by adding the below code to the repositories will build the project. repositories { maven { url "https://maven.google.com" } } I had to add the following to my project level build.gradle. Then the button to install and worked. allprojects { repositories { maven { url "https://maven.google.com" } jcenter() } } Try using the latest support library versions: compile 'com.android.support:appcompat-v7:25.3.1' compile 'com.android.support:support-v4:25.3.1' compile 'com.android.support:design:25.3.1' compile 'com.google.android.gms:play-services-vision:10.2.1' compile 'com.android.volley:volley:1.0.0' //

CakePHP TypeConverterTrait (trait)

Type converter trait Namespace: Cake\Database Method Summary cast() public Converts a give value to a suitable database value based on type and return relevant internal statement type matchTypes() public Matches columns to corresponding types Method Detail cast() public cast ( mixed $value , mixed $type ) Converts a give value to a suitable database value based on type and return relevant internal statement type Parameters mixed $value The value to cast \Cake\Database\TypeInterface|string|int $type optional The type name or type instance to use. Returns array list containing converted value and internal type matchTypes() public matchTypes ( array $columns , array $types ) Matches columns to corresponding types Both c o l u m n s a n d columns and co l u mn s an d types should either be numeric based or string key based at the same time. Parameters array $columns list or associative array of columns and

Converting Epub Files To PDF Format

Answer : You definitely want Calibre. You can use it to convert virtually any file type to any other file type, as long as the source file doesn't have DRM (like Amazon, Adobe, etc.). If it does have DRM, check out Apprentice Alf's blog for help stripping it out with Calibre plugins. Don't use the DRM stripper to pirate books or otherwise violate your agreement with the vendor. Use it so you can enjoy your books on any device in any format. Calibre is also an awesome e-book management program that can do virtually everything. It can manage Kindles, Android phones/tablets, etc. It can even email your books with one click to your Kindle's email address if you want. You won't be disappointed :-) From a terminal: sudo apt-get install calibre Or search for it in Ubuntu Software Center To actually convert the EPUB file you can use the following command: ebook-convert file.epub file.pdf (For details, check this other answer) Or you can check the details for the

Apple - AirPods: Extremely Poor Mic Quality On Mac

Image
Answer : OP here – I'd just like to add to the answer below, that I've been in contact with Apple Support. Explanation Apple claims that the poor Mono 8kHz quality which affects recording and indeed simultaneously playback on Mac when the AirPod microphones are activated, is because the SCO codec then gets employed over the entire Mac audio system. This is supposedly "expected behaviour" when trying to use the AirPods and other Bluetooth headsets together with a computer, according to Apple. The AAC codec is normally used when just listening to playback on the AirPods. It's just very unfortunate that SCO – low-quality as it may be – upon AirPod microphone activation is not only limited to doing recording, but also displaces AAC and audio playback. Apple Support claims that Apple is looking at this issue, and that improvements might be coming in future firmware updates, but I did not interpret that as a promise to be honest. But for the time being, I'd

Convert Ascii To Char Python Code Example

Example 1: python ascii >>> ord ( 'a' ) 97 >>> chr ( 97 ) 'a' >>> chr ( ord ( 'a' ) + 3 ) 'd' >>> Example 2: how to write the character from its ascii value in python c = 'p' x = ord ( c ) #it will give you the ASCII value stored in x chr ( x ) #it will return back the character Example 3: get char from ascii value python >>> chr ( 104 ) 'h' >>> chr ( 97 ) 'a' >>> chr ( 94 ) '^' Example 4: convert number to char python >>> chr ( 65 ) 'A' Example 5: python ascii code to string >>> L = [ 104 , 101 , 108 , 108 , 111 , 44 , 32 , 119 , 111 , 114 , 108 , 100 ] >>> '' . join ( chr ( i ) for i in L ) 'hello, world' Example 6: python convert ascii to char >>> ord ( 'h' ) 104 >>> ord ( 'a' ) 97 >>> ord ( '^' ) 94

Bootstrap Modal Not Showing Code Example

Example 1: bootstrap show modal on page load < script type = "text/javascript" > $ ( window ) . on ( 'load' , function ( ) { $ ( '#myModal' ) . modal ( 'show' ) ; } ) ; < / script > Example 2: bootstrap modal not close $ ( '#MymodalPreventScript' ) . modal ( { backdrop : 'static' , keyboard : false } ) ; Example 3: .show() and .hide not working for bootstrap modal < button class = "button primary" id = "buy" style = "text-decoration:none;" type = "button" > Review and confirm < / button > < div class = "modal-bootstrap fade bs-example-modal-sm" id = "myModal" tabindex = "-1" role = "dialog" aria - labelledby = "smallModalLabel" aria - hidden = "true" > < ! -- modal contents -- > < / div > < script type = "text/javascript&q

58 Cm In Inches Code Example

Example: cm to inches const cm = 1 ; console . log ( ` cm: ${ cm } = in: ${ cmToIn ( cm ) } ` ) ; function cmToIn ( cm ) { var in = cm / 2.54 ; return in ; }

Export Interface Typescript Code Example

Example 1: typescript class implements interface interface Task { name : String ; //property run ( arg : any ) : void ; //method } class MyTask implements Task { name : String ; constructor ( name: String ) { this.name = name ; } run ( arg: any ) : void { console .log ( `running: $ { this.name } , arg: $ { arg } ` ) ; } } let myTask : Task = new MyTask ( 'someTask' ) ; myTask. run ( "test" ) ; Example 2: module.exports in typescript class Person { private firstName : string ; private lastName : string ; constructor ( firstName: string , lastName: string ) { this.firstName = firstName ; this.lastName = lastName ; } public getFullName ( ) { return `$ { this.firstName } $ { this.lastName } ` ; } } export = Person ; Example 3: typescript export interface array interface Animal { name : string ; size : "small" ; medium ; large ; } const animalsArray: Animal [ ] = [

Div Width Fit Content Code Example

Example 1: css width fit to content width : fit-content ; Example 2: make div the size of the text inside div { display : inline-block ; } Example 3: css div width fit content display : inline-block ; Example 4: width defined by content css /* <length> values */ width : 300 px ; width : 25 em ; /* <percentage> value */ width : 75 % ; /* Keyword values */ width : max-content ; width : min-content ; width : fit-content ( 20 em ) ; width : auto ; /* Global values */ width : inherit ; width : initial ; width : unset ;

Add 10 Seconds To A Date

Answer : There's a setSeconds method as well: var t = new Date(); t.setSeconds(t.getSeconds() + 10); For a list of the other Date functions, you should check out MDN setSeconds will correctly handle wrap-around cases: var d; d = new Date('2014-01-01 10:11:55'); alert(d.getMinutes() + ':' + d.getSeconds()); //11:55 d.setSeconds(d.getSeconds() + 10); alert(d.getMinutes() + ':0' + d.getSeconds()); //12:05 // let timeObject = new Date(); // let milliseconds= 10 * 1000; // 10 seconds = 10000 milliseconds timeObject = new Date(timeObject.getTime() + milliseconds); Just for the performance maniacs among us. getTime var d = new Date('2014-01-01 10:11:55'); d = new Date(d.getTime() + 10000); 5,196,949 Ops/sec, fastest setSeconds var d = new Date('2014-01-01 10:11:55'); d.setSeconds(d.getSeconds() + 10); 2,936,604 Ops/sec, 43% slower moment.js var d = new moment('2014-01-01 10:11:55'); d = d.add(10,

Convert From String To Int In Js Code Example

Example 1: how to convert string to int js let string = "1" ; let num = parseInt ( string ) ; //num will equal 1 as a int Example 2: Javascript string to int var myInt = parseInt ( "10.256" ) ; //10 var myFloat = parseFloat ( "10.256" ) ; //10.256 Example 3: how to change a string to number in javascript let theInt = parseInt ( "5.90123" ) ; //5 let theFloat = parseFloat ( "5.90123" ) ; //5.90123 Example 4: string to int javascript var text = '42px' ; var integer = parseInt ( text , 10 ) ; // returns 42 Example 5: string to int javascript // Convert strings Number ( '123' ) ; // returns 123 Number ( '12.3' ) ; // returns 12.3 Number ( '3.14someRandomStuff' ) ; // returns NaN Number ( '42px' ) ; // returns NaN