Posts

Showing posts from September, 2018

17 Inch To Cm Code Example

Example: inch to cm 1 inch = 2.54 cm

Error: ENOSPC: System Limit For Number Of File Watchers Reached, Watch '/home/shruti/shruti/lets_eduvate/oms/public' Code Example

Example: Error: ENOSPC: System limit for number of file watchers reached echo fs.inotify.max_user_watches= 524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p # that modifies the file watch limit to max 524 , 288 which consume approx. 512 MB Ram for 64 bit . # reduce that number to consume less memory. # to see if that did it run cat /proc/sys/fs/inotify/max_user_watches # you should see fs.inotify.max_user_watches= 524288

180 Degrees In Radians Code Example

Example 1: degrees to radians radians = degrees * pi / 180; Example 2: degrees to radians double radians = Math.toRadians(degrees);

Cross Product Latex Code Example

Example: latex product \prod_{n=1}^{10} n^{2}

Android M Camera Intent + Permission Bug?

Answer : I had the same issue and find this doc from google: https://developer.android.com/reference/android/provider/MediaStore.html#ACTION_IMAGE_CAPTURE "Note: if you app targets M and above and declares as using the CAMERA permission which is not granted, then atempting to use this action will result in a SecurityException." This is really weird. Don't make sense at all. The app declares Camera permission using intent with action IMAGE_CAPTURE just run into SecurityException. But if your app doesn't declare Camera permission using intent with action IMAGE_CAPTURE can launch Camera app without issue. The workaround would be check is the app has camera permission included in the manifest, if it's , request camera permission before launching intent. Here is the way to check if the permission is included in the manifest, doesn't matter the permission is granted or not. public boolean hasPermissionInManifest(Context context, String permissionName)

Materialize Change Width Container Code Example

Example: materialize customize container .container { margin : 0 auto ; max-width : 1280 px ; width : 90 % ; } @media only screen and ( min-width : 601 px ) { .container { width : 85 % ; } } @media only screen and ( min-width : 993 px ) { .container { width : 70 % ; } }

Youtube Convertidor Mp3 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/

C# Guid Length Code Example

Example: c# guid length Guid . NewGuid ( ) . ToString ( ) => 36 characters ( Hyphenated ) e . g . 12345678 - 1234 - 1234 - 1234 - 123456789abc

CSS: How To Have Position:absolute Div Inside A Position:relative Div Not Be Cropped By An Overflow:hidden On A Container

Image
Answer : A trick that works is to position box #2 with position: absolute instead of position: relative . We usually put a position: relative on an outer box (here box #2) when we want an inner box (here box #3) with position: absolute to be positioned relative to the outer box. But remember: for box #3 to be positioned relative to box #2, box #2 just need to be positioned. With this change, we get: And here is the full code with this change: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <style type="text/css"> /* Positioning */ #box1 { overflow: hidden } #box2 { position: absolute } #box3 { position: absolute; top: 10px } /* Styling */ #box1 { background: #efe; padding: 5px; width: 125px } #box2 { background: #fee; padding: 2px; width: 100px; height: 100px } #box3 { background: #eef; pad

Html No Scroll Code Example

Example 1: disable scroll css /* Answer to: "disable scroll css" */ /* You must set the height and overflow of the body, to disable scrolling. */ html , body { margin : 0 ; height : 100 % ; overflow : hidden } Example 2: css no scroll <!DOCTYPE html > <html > <head > <style > body { height : 5000 px ; /* Make this site really long */ width : 5000 px ; /* Make this site really wide */ overflow : hidden ; /* Hide scrollbars */ } </style> </head> <body> <h2>Hide scrollbars</h2> <p>This example will hide the scrollbars ( and the functionality - it is not possible to scroll inside the page ) .</p> <p>Try to remove <strong> overflow : hidden ; </strong> to see the effect.</p> </body> </html> Example 3: javascript keep scroll visible ::-webkit-scrollbar { -webkit-appearance : none ; width : 7 px ; } ::-webkit-scrollbar-thumb { border-radius

Youtube To Mp3 Con Code Example

Example 1: 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/ Example 2: yt to mp3 Youtube - DL works great . Download from https : //youtube-dl.org/. To use, type youtube-dl <url> --audio-format mp3 Example 3: youtube download mp3 I use https : //github.com/ytdl-org/youtube-dl/ as a Python CLI tool to download videos

Angular-Material Sidenav CdkScrollable

Answer : Add to your app module imports: ScrollDispatchModule . Add cdkScrollable to your mat-sidenav-content : <mat-sidenav-content cdkScrollable> </mat-sidenav-content> In your root component: a) inject ScrollDispatcher from @angular/cdk/overlay and subscribe to scrolling: constructor(public scroll: ScrollDispatcher) { this.scrollingSubscription = this.scroll .scrolled() .subscribe((data: CdkScrollable) => { this.onWindowScroll(data); }); } c) do something when scrolling, e.g. check the offset private onWindowScroll(data: CdkScrollable) { const scrollTop = data.getElementRef().nativeElement.scrollTop || 0; if (this.lastOffset > scrollTop) { // console.log('Show toolbar'); } else if (scrollTop < 10) { // console.log('Show toolbar'); } else if (scrollTop > 100) { // console.log('Hide toolbar'); } this.lastOffset = scrollTop; } D

Can I Get A Combined Inbox In Thunderbird?

Answer : I believe the feature you are looking for is called 'Unified Folders' which works on both IMAP and POP3 protocols. The official site location: http://kb.mozillazine.org/Global_Inbox#Unified_Folders Quote from the site: Unified Folders (originally named Smart Folders when it was added in 3.0) is a folder pane view which looks like a global inbox account by merging the contents of all inbox folders (both POP, IMAP and local folders) from all accounts. It also shows the inbox of each account as a child folder of the unified Inbox account. Any messages in an inbox shows up in both the root of the unified Inbox, plus the child folder of the unified Inbox for that account. To use this functionality: View >> Folders >> Unified I have verified that this does work on Thunderbird 12.0.1 using Ubuntu 12.04 . The KB article I found above it a bit old but still holds correct information about the functionality of the 'Unified Folders

What Does => Mean Javascript Code Example

Example: what does -= mean in JavaScript /* JavaScript shorthand -= -= is shorthand to subtract something from a variable and store the result as that same variable. */ // The standard syntax: var myVar = 5 ; console . log ( myVar ) // 5 var myVar = myVar - 3 ; console . log ( myVar ) // 2 // The shorthand: var myVar = 5 ; console . log ( myVar ) // 5 var myVar -= 3 ; console . log ( myVar ) // 2

Can I Include An MSI File Inside A Chocolatey Package?

Answer : Yes, this is definitely possible. This is actually exactly what the ChocolateyGUI package does. You can see its .nuspec file here: https://github.com/chocolatey/ChocolateyGUI/blob/develop/nuspec/chocolatey/ChocolateyGUI.nuspec <?xml version="1.0"?> <package> <metadata> <id>chocolateygui</id> <version>$version$</version> <title>Chocolatey GUI</title> <authors>Chocolatey</authors> <owners>Chocolatey</owners> <projectUrl>https://github.com/chocolatey/ChocolateyGUI</projectUrl> <projectSourceUrl>https://github.com/chocolatey/ChocolateyGUI</projectSourceUrl> <packageSourceUrl>https://github.com/chocolatey/ChocolateyGUI/tree/develop/nuspec/chocolatey</packageSourceUrl> <iconUrl>https://raw.githubusercontent.com/chocolatey/choco/master/docs/logo/chocolateyicon.gif</iconUrl> <licenseUrl>https://ra

CSS Selector For Child Of Parent's Sibling Element

Answer : In a word: no. Given the current structure of your HTML (and the current state of CSS selectors), this is not possible. Perhaps we will get something like this in CSS4, but traversal like this is best left up to Javascript. You can obviously restructure your markup, and use the sibling selector: HTML <div class="parent"> <a href="#" id="trigger">Trigger</a> <div class="sibling"> <div id="change">Hello</div> </div> </div> CSS #trigger:hover + .sibling #change { color:red; } codepen No. You cannot achieve this using CSS only. Javascript is a good option in this case.. You can however detect the .parent being hovered (which will solve your problem if the parent surrounds exactly the trigger): .parent:hover + .sibling div#change{background:red;} (markup stays the same jsFiddle)