Posts

Text Font Border Css Code Example

Example 1: how to make border for letters in css h1 { /* 1 pixel black shadow to left, top, right and bottom */ text-shadow : -1 px 0 black , 0 1 px black , 1 px 0 black , 0 -1 px black ; font-family : sans ; color : yellow ; } Example 2: html font white text with black border h1 { color : yellow ; text-shadow : -1 px 0 black , 0 1 px black , 1 px 0 black , 0 -1 px black ; } <h1>Hello World</h1>

Responsive Text Bootstrap Code Example

Example 1: how to make fonts respnsive h1 { font-size : clamp ( 16 px , 5 vw , 34 px ) ; } Example 2: responsive text css /* Uses vh and vm with calc */ @media screen and ( min-width : 25 em ) { html { font-size : calc ( 16 px + ( 24 - 16 ) * ( 100 vw - 400 px ) / ( 800 - 400 ) ) ; } } /* Safari <8 and IE <11 */ @media screen and ( min-width : 25 em ) { html { font-size : calc ( 16 px + ( 24 - 16 ) * ( 100 vw - 400 px ) / ( 800 - 400 ) ) ; } } @media screen and ( min-width : 50 em ) { html { font-size : calc ( 16 px + ( 24 - 16 ) * ( 100 vw - 400 px ) / ( 800 - 400 ) ) ; } } Example 3: bootstrap 4 responsive paragraph <p class= "lead" > Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis , est non commodo luctus. </p>

C# Unity Velocity Code Example

Example: unity how to set rigidbody velocity Vector3 velocity = new Vector3 ( 10f /*x*/ , 10f /*y*/ , 10f /*z*/ ) ; GetComponent < Rigidbody > ( ) . velocity = velocity ;

Transform Rotate3d Css Code Example

Example: rotate 3d rotate3d ( x , y , z , a )

Conditional $sum In MongoDB

Answer : As Sammaye suggested, you need to use the $cond aggregation projection operator to do this: db.Sentiments.aggregate( { $project: { _id: 0, Company: 1, PosSentiment: {$cond: [{$gt: ['$Sentiment', 0]}, '$Sentiment', 0]}, NegSentiment: {$cond: [{$lt: ['$Sentiment', 0]}, '$Sentiment', 0]} }}, { $group: { _id: "$Company", SumPosSentiment: {$sum: '$PosSentiment'}, SumNegSentiment: {$sum: '$NegSentiment'} }}); Starting from version 3.4, we can use the $switch operator which allows logical condition processing in the $group stage. Of course we still need to use the $sum accumulator to return the sum. db.Sentiments.aggregate( [ { "$group": { "_id": "$Company", "SumPosSenti": { "$sum": { "$switch": { ...

Always Show Windows CPU Monitor Graphic In Taskbar

Image
Answer : I have three programs for you. All of them are free: 1. XMeters Taskbar appearance: Setting: So far I'm satisfied with this program. 2. RAM CPU (+DISK) Taskbar It turns your taskbar into a dynamic color-changing resource meter. 3. CleanMem Mini Monitor This one actually display a floating panel and an icon in the notification area rather than in taskbar. It also has more settings than the two above. you can start your pc up with task manager running minimized Right click your desktop and select New then shortcut Type in taskmgr and hit enter Hit enter again Right click the new shortcut and go to properties In the Run dropdown select "Minimized" Click Start and All Programs Find Startup and right click the folder and select Open Drag the new shortcut into that folder Now the taskmanager will always run - minimized - when the computer boots. The @Keltari solution looks good, but the 'Task Manager' icon is still displayed in th...

Angular Material Datepicker: Change Event Not Firing When Selecting Date

Answer : There's a dateChange event that's raised both when the date is edited in the text box and when the date is changed via the calendar control. See here <mat-form-field> <input matInput [matDatepicker]="datepicker" required placeholder="Choose a date" (dateChange)="valueChanged()"> <mat-datepicker-toggle matSuffix [for]="datepicker"></mat-datepicker-toggle> <mat-datepicker #datepicker></mat-datepicker> </mat-form-field> Replace change with ngModelChange Change from <input mdInput [mdDatepicker]="datePicker" placeholder="Choose Date" name="date" [(ngModel)]="date" (change)="updateCalcs()" required> To <input mdInput [mdDatepicker]="datePicker" placeholder="Choose Date" name="date" [(ngModel)]="date" (ngModelCha...

Android.permission.INTERNET In Android Manifest Code Example

Example 1: allow internet permission android //add to AndroidManifest.xml < uses-permission android: name = " android.permission.INTERNET " /> Example 2: internet permission android < uses-permission android: name = " android.permission.INTERNET " />

Accessing JPEG EXIF Rotation Data In JavaScript On The Client Side

Image
Answer : If you only want the orientation tag and nothing else and don't like to include another huge javascript library I wrote a little code that extracts the orientation tag as fast as possible (It uses DataView and readAsArrayBuffer which are available in IE10+, but you can write your own data reader for older browsers): function getOrientation(file, callback) { var reader = new FileReader(); reader.onload = function(e) { var view = new DataView(e.target.result); if (view.getUint16(0, false) != 0xFFD8) { return callback(-2); } var length = view.byteLength, offset = 2; while (offset < length) { if (view.getUint16(offset+2, false) <= 8) return callback(-1); var marker = view.getUint16(offset, false); offset += 2; if (marker == 0xFFE1) { if (view.getUint32(offset += 2, false) != 0x45786966) { ...

Cs Go S1mple Settings 2021 Code Example

Example: cs go s1mple settings 2021 cl_crosshairalpha 255; cl_crosshaircolor 5; cl_crosshairdot 0; cl_crosshairgap -2; cl_crosshairsize 3; cl_crosshairstyle 4; cl_crosshairusealpha 1; cl_crosshairthickness 1; cl_crosshair_drawoutline 0; cl_crosshair_sniper_width 1; cl_crosshaircolor_r 0; cl_crosshaircolor_g 255; cl_crosshaircolor_b 170;

Css Selector For Id Code Example

Example 1: css id selector #id{ color:red; } Example 2: how to call an id in css < style > #selector { color : red ; } /* # is id selector */ </ style > < div id = " selector " > < p > This is an id </ p > </ div > Example 3: css how to style id /*put a # infront of the id*/ /* < section id = " example " > </ section > */ #example{ margin: auto; } Example 4: css selectors * { color: pink; } h1, h2 {Select all h1 and h2} li a {select all anchor inside a list} h1 + p {select all p placed after an h1} div > li {all li directly in a div}

Transition Css W3s Code Example

Example: css transition transition : property duration timing-function delay|initial|inherit ;

Slick Slider Animation Effects Code Example

Example 1: slick slider CSS <link rel= "stylesheet" type= "text/css" href= "//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.css" /> JS <script type= "text/javascript" src= "//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.min.js" > </script > <script > $ ( ' #carousel ' ) .slick ( { infinite: true , slidesToShow: 3 , slidesToScroll: 1 , arrows: true , autoplay: true , autoplaySpeed: 2000 , responsive: [ { breakpoint: 1200 , settings: { slidesToShow : 2 , slidesToScroll : 1 } } , { ...

Css Unclickable Div Code Example

Example: make something unclickable css pointer-events : none ;

Comments In Matlab Code Example

Example 1: block of comments in matlab % { Commented code here . % } Example 2: matlab comments % single line comment % Example 3: matlab comment % This is a one - line comment % { This is a multi - line comment % }

Set Webkit Appearance None Js Code Example

Example: css appearance -webkit-appearance : value ; -moz-appearance : value ; appearance : value ;