Posts

Css Style Placeholder Text Code Example

Example 1: css placeholder color ::-webkit-input-placeholder { /* Chrome/Opera/Safari */ color: pink; } ::-moz-placeholder { /* Firefox 19+ */ color: pink; } :-ms-input-placeholder { /* IE 10+ */ color: pink; } :-moz-placeholder { /* Firefox 18- */ color: pink; } Example 2: css style placeholder input::-webkit-input-placeholder {/* Chrome/Opera/Safari/Edge */ /*styles here*/ } input::-ms-input-placeholder { /* Microsoft Edge */ /*styles here*/ } input:-ms-input-placeholder {/* IE 10+ */ /*styles here*/ } input::-moz-placeholder {/* Firefox 19+ */ opacity: 1; /*Firefox by default has an opacity object that usually is ideal to reset so it matches webkit*/ /*styles here*/ } input:-moz-placeholder {/* Firefox 18- */ opacity: 1; /*Firefox by default has an opacity object that usually is ideal to reset so it matches webkit*/ /*styles here*/ } input::placeholder { /*styles here*/ } Example 3: css style placeholder <! DOCTYPE html > < html lang = " en ...

Programiz Online C Compiler Code Example

Example 1: online c compiler I Personally Like https : //www.programiz.com/c-programming/online-compiler/ Example 2: c compiler online i reccomend online gdb https : //www.onlinegdb.com/online_c_compiler Example 3: c compilers // I Like https://www.programiz.com/c-programming/online-compiler/

How To Generate Random Color In Css Code Example

Example 1: random color in javascript var randomColor = Math. floor ( Math. random ( ) * 16777215 ) . toString ( 16 ) ; Example 2: random color generator css,javascript,html //Javascript function randomColor ( ) { var color = "#" ; var randomHex = "123456ABCDEF" ; for ( var i = 0 ; i< 6 ;i + + ) { color+= randomHex[Math. floor ( Math. random ( ) * 16 ) ] } return color ; } var mytimer ; function setColor ( ) { $ ( "body" ) . css ( "background-color" , randomColor ) ; } var mytimer = setInterval ( setColor , .8000 ) ; // html !DOCTYPE html> <html> <head> <title>Page Title</title> <script src= "https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js" ></script> </head> <body> //include javascript file. </body> </html>

Can Overridden Method Have Different Return Type Code Example

Example: Return type of override method should be same or not return type MUST be same in method overriding

Html Tag Make A Hollow Circle With Border Code Example

Example: css circle border .circle { background-color : #fff ; border : 1 px solid red ; height : 100 px ; border-radius : 50 % ; -moz-border-radius : 50 % ; -webkit-border-radius : 50 % ; width : 100 px ; } <div class= "circle" ></div>

Change Height Of Rect Transform Unity Code Example

Example: set width of rect transform unity rectTransform . sizeDelta = new Vector2 ( 50 , 50 ) ;

Bootstrap Text Over Image Example

Example 1: bootstrap left image right text < div class = " card " > < div class = " row no-gutters " > < div class = " col-auto " > < img src = " //placehold.it/200 " class = " img-fluid " alt = " " > </ div > < div class = " col " > < div class = " card-block px-2 " > < h4 class = " card-title " > Title </ h4 > < p class = " card-text " > Description </ p > < a href = " # " class = " btn btn-primary " > BUTTON </ a > </ div > </ div > </ div > < div class = " card-footer w-100 text-muted " > Footer stating cats are CUTE little animals ...

Onkeyup Jquery Code Example

Example 1: check when keyup an input from a specific form jquery var inputs = $ ( '#formID' ) . find ( 'input[type="text"]' ) ; inputs . keyup ( function ( ) { console . log ( $ ( this ) ) ; } ) ; Example 2: javascript on keypu < input type = "text" onkeyup = "myFunction()" > Example 3: add javascript keyup on input < input type = "text" class = "form-control" placeholder = "Search" id = "search_id" / > < script type = "text/javascript" > const log = document . getElementById ( 'search_id' ) ; document . addEventListener ( 'keyup' , logKey ) ; function logKey ( e ) { const value = log . value ; if ( e . key == = 'Enter' || e . keyCode == = 13 ) { transmit ( { search : value } ) ; } } ; < / script > Example 4: set value of attribute using each and keyup jquery $ ( '.EntryField' ) . key...

Creating An RxJS Observable From A (server Sent) EventSource

Answer : You could use the following code to manually create Observable for EventSource stream: export class AppComponent implements OnInit { someStrings:string[] = []; constructor(private zone: NgZone) {} ngOnInit(){ const observable = Observable.create(observer => { const eventSource = new EventSource('/interval-sse-observable'); eventSource.onmessage = x => observer.next(x.data); eventSource.onerror = x => observer.error(x); return () => { eventSource.close(); }; }); this.subscription = observable.subscribe({ next: guid => { this.zone.run(() => this.someStrings.push(guid)); }, error: err => console.error('something wrong occurred: ' + err) }); } } // somewhere // this.subscription.unsubscribe() Don't forget to import the NgZone class: import {Component, OnInit, NgZone} from '@angular/core'; See also Angular2 View Not Changing After Data Is Updat...

Alter User Mysql Code Example

Example 1: mysql create user CREATE USER 'user' @'localhost' IDENTIFIED BY 'password' ; GRANT ALL PRIVILEGES ON * . * TO 'user' @'localhost' ; FLUSH PRIVILEGES ; Example 2: alter user mysql native password ALTER USER 'root' @'localhost' IDENTIFIED WITH mysql_native_password BY '<password>' ; Example 3: change mysql password from command line ALTER USER 'root' @'localhost' IDENTIFIED BY 'New-Password' ; Example 4: alter user root mysql ALTER USER 'root' @'localhost' IDENTIFIED BY 'newPassword' ; Example 5: mysql set password for user # `SET PASSWORD FOR <user> = PASSWORD('<plaintext_password>')` is deprecated SET PASSWORD FOR < user > = '<plaintext_password>' ; FLUSH PRIVILEGES ; Example 6: change user mysql [ madegow @fedora20 ~ ] $ mysql - u root - p Enter password: . . . MariaDB ...

Can't Connect To Localhost On SQL Server Express 2012 / 2016

Image
Answer : According to Aaron Bertand: You need to verify that the SQL Server service is running. You can do this by going to Start > Control Panel > Administrative Tools > Services , and checking that the service SQL Server ( SQLEXPRESS ) is running. If not, start it. While you're in the services applet, also make sure that the service SQL Browser is started. If not, start it. You need to make sure that SQL Server is allowed to use TCP/IP or named pipes. You can turn these on by opening the SQL Server Configuration Manager in Start > Programs > Microsoft SQL Server 2012 > Configuration Tools (or SQL Server Configuration Manager ), and make sure that TCP/IP and Named Pipes are enabled. If you don't find the SQL Server Configuration Manager in the Start Menu you can launch the MMC snap-in manually. Check SQL Server Configuration Manager for the path to the snap-in according to your version. Verify your SQL Server connection authentication mode matche...

Youtube To Mp3 Convert Online Y2mate Code Example

Example: youtube mp3 converter You can use WebTools , it's an addon that gather the most useful and basic tools such as a synonym dictionary , a dictionary , a translator , a youtube convertor , a speedtest and many others ( there are ten of them ) . You can access them in two clics , without having to open a new tab and without having to search for them ! - Chrome Link : https : //chrome.google.com/webstore/detail/webtools/ejnboneedfadhjddmbckhflmpnlcomge/ Firefox link : https : //addons.mozilla.org/fr/firefox/addon/webtools/

Anaconda/conda - Install A Specific Package Version

Answer : To install a specific package: conda install <pkg>=<version> eg: conda install matplotlib=1.4.3 There is no version 1.3.0 for rope . 1.3.0 refers to the package cached-property . The highest available version of rope is 0.9.4 . You can install different versions with conda install package=version . But in this case there is only one version of rope so you don't need that. The reason you see the cached-property in this listing is because it contains the string "rope" : "cached-p rope erty" py35_0 means that you need python version 3.5 for this specific version. If you only have python3.4 and the package is only for version 3.5 you cannot install it with conda. I am not quite sure on the defaults either. It should be an indication that this package is inside the default conda channel. If any of these characters, '>', '<', '|' or '*', are used, a single or double quotes must be...

Abstract W3schools Code Example

Example 1: abstraction in java Abstraction is defined as hiding internal implementation and showing only necessary information. // abstract class abstract class Addition { // abstract methods public abstract int addTwoNumbers(int number1, int number2); public abstract int addFourNumbers(int number1, int number2, int number3, int number4); // non-abstract method public void printValues() { System.out.println("abstract class printValues() method"); } } class AbstractMethodExample extends Addition { public int addTwoNumbers(int number1, int number2) { return number1 + number2; } public int addFourNumbers(int number1, int number2, int number3, int number4) { return number1 + number2 + number3 + number4; } public static void main(String[] args) { Addition add = new AbstractMethodExample(); System.out.println(add.addTwoNumbers(6, 6)); System.out.println(add.addFourNumbers(8, 8, 3, 2)); add.p...

Airpods Keep Disconnecting From Pc Windows 10 Code Example

Example: airpods connecting and then disconnecting I opened Bluetooth preferences on my MAC and told it to forget my AirPods. I then plugged the AirPods case directly into my MAC using the lightening cable. I held down the button on the AirPods case until it flashed white, then on my MAC selected the AirPods and clicked connect.

Convert PySpark Dataframe Column From List To String

Answer : While you can use a UserDefinedFunction it is very inefficient . Instead it is better to use concat_ws function: from pyspark.sql.functions import concat_ws df.withColumn("test_123", concat_ws(",", "test_123")).show() +----+----------------+ |uuid| test_123| +----+----------------+ | 1|test,test2,test3| | 2|test4,test,test6| | 3|test6,test9,t55o| +----+----------------+ You can create a udf that joins array/list and then apply it to the test column: from pyspark.sql.functions import udf, col join_udf = udf(lambda x: ",".join(x)) df.withColumn("test_123", join_udf(col("test_123"))).show() +----+----------------+ |uuid| test_123| +----+----------------+ | 1|test,test2,test3| | 2|test4,test,test6| | 3|test6,test9,t55o| +----+----------------+ The initial data frame is created from: from pyspark.sql.types import StructType, StructField schema = StructType([StructField("uuid",Int...