Posts

Showing posts from December, 2006

Center Widget Vertically Inside A SingleChildScrollView

Image
Answer : ArtiomLK Suggested a solution in comments which helped me: wrap SingleChildScrollView in a Center . The widgets tree is: Center( child: SingleChildScrollView( child: Column(...))) None of the others helped. Solution: Put your top level Stack inside Center widget. body: Center(child: Stack( children: _buildBody(), ))); Tip to debug: Use Flutter Inspector to find where the layout is going wrong. I edited your code a bit(to make to work in my local) and then I inspected. It showed like below We have a Stack and SingleChildScrollView as per code(refer right side of the diagram where the stack of widgets are displayed). As size is determined by SingleChildScrollView (contents inside it), Stack occupies only little space and by default, it aligned at top . So put it under Center , the whole Stack view will come in center. There's a section about it in the official docs: Using SingleChildScrollView with a Column Source: https://api.

Cdn Slick Carousel Code Example

Example 1: slick slider cdn 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 > Example 2: slick slider cdn add latest version of slick slider css < link rel = " stylesheet " href = " https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.css " integrity = " sha512-yHknP1/AwR+yx26cB1y0cjvQUMvEa2PFzt1c9LlS4pRQ5NOTZFWbhBig+X9G9eYW/8m0/4OXNx8pxJ6z57x0dw== " crossorigin = " anonymous " /> js < script src = " https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js " integrity = " sha512-XtmMtDEcNz2j7ekrtHvOVR4iwwaD6o/FUJe6+Zq+HgcCsk3kj4uSQQR8weQ2QVj1o0Pk6PwYLohm206ZzNfubg== " crossorigin = " anonymous

Bootstrap Accordion With Plus Minus Icon W3schools Code Example

Example 1: html faq < html > < body bgcolor = "E1C699" > < ul > < li > < strong > What is ( WEBSITE ) ? < / strong > < br > < br > < em > < strong > ( WEBSITE ) < / strong > is a / an ( DEATILS ) . < / em > < br > < / li > < br > < li > < strong > How do I post a ( na ) < / strong > < br > < br > < em > To create a ( na ) , simply , go to the < strong > ( website ) homepage < / strong > and click "Create a (na)" < / em > < / li > < / ul > < style > body { background - color : navy ; } < / style > < / body > < / html > Example 2: on button click show collapse div jquery $ ( function ( ) { var b = $ ( "#button" ) ; var w = $ ( "#wrapper" ) ; var l = $ ( "#list" )

Angular Material: How To Change Top Padding Of Mat-grid-tile

Answer : The grid tile component sets top padding dynamically on the element itself, so you need to use the !important modifier in your CSS to override it. HTML: <mat-grid-tile class="my-grid-tile"></mat-grid-tile> CSS: .my-grid-tile { padding-top: 24px !important; } Setting rowHeight of mat-grid-list works for me, the G. Tranter doesn't work because the mat-grid-list has a padding It's set dynamically too and cannot be setted with !important. <!-- 70px to prevent hide floatLabel in matInput --> <mat-grid-list cols="2" rowHeight="70px"> <mat-grid-tile> <!-- your controls --> </mat-grid-tile> </mat-grid-list> Ref: https://material.angular.io/components/grid-list/examples "@angular/material": "^6.4.3" "@angular/core": "^6.1.0" To get rid of the padding on top of mat grid tile restrict the height of the mat grid tile usi

Apex:pageMessages Includes The Entire Component Tree Path For A Apex:inputText With Required="true"

Answer : Try adding a label attribute to the inputText field - if there is no label, the error will display the whole tree, but with a label, it should just display the label + error message

Cannot Read Configuration File Due To Insufficient Permissions

Image
Answer : There is no problem with your web.config . Your web site runs under a process. In iis you can define the identity of that process. The identity that your web site's application pool runs as ( Network Services, Local System , etc.), should have permission to access and read web.config file. Update: This updated answer is same as above, but a little longer and simpler and improved. First of all : you don't have to change anything in your config file. It's OK . The problem is with windows file permissions . This problems occurs because your application can not access and read web.config file. Make the file accessible to IIS_IUSRS group. Just right click web.config and click properties , under security tab, add IIS_IUSRS . So what is this IIS_IUSRS thing? Your web site is like an exe file. Just like any exe file, it should be started by a user and it runs according to permissions assigned to that user. When your site is started in IIS , A

==> Click Here <== Code Example

Example 1: html open things in new tab The home page will open in another tab. Example 2: ==> click here <== ==> CLICK HERE <==

Bootstrap Login Form W3schools Code Example

Example: bootstrap form < form > < div class = "form-group" > < label for = "exampleInputEmail1" > Email address < / label > < input type = "email" class = "form-control" id = "exampleInputEmail1" aria - describedby = "emailHelp" placeholder = "Enter email" > < small id = "emailHelp" class = "form-text text-muted" > We 'll never share your email with anyone else . < / small > < / div > < div class = "form-group" > < label for = "exampleInputPassword1" > Password < / label > < input type = "password" class = "form-control" id = "exampleInputPassword1" placeholder = "Password" > < / div > < div class = "form-group form-check" > < input type = "checkbox" class = "form-

Adding Whitespace In Java

Answer : I think you are talking about padding strings with spaces. One way to do this is with string format codes. For example, if you want to pad a string to a certain length with spaces, use something like this: String padded = String.format("%-20s", str); In a formatter, % introduces a format sequence. The - means that the string will be left-justified (spaces will be added on the right of the string). The 20 means the resulting string will be 20 characters long. The s is the character string format code, and ends the format sequence. There's a few approaches for this: Create a char array then use Arrays.fill, and finally convert to a String Iterate through a loop adding a space each time Use String.format

Card Bootstrap 4 W3schools Code Example

Example 1: boostrap card Card title Card subtitle Some quick example text to build on the card title and make up the bulk of the card's content. Card link Another link Example 2: html make card box-shadow: 0 20px 20px rgba(0, 0, 0, 0.2), 0px, 0px, 50px rgba(0, 0, 0, 0.2)

9 Minute Timer Code Example

Example: 20 minute timer for good eyesight every 20 minutes look out the window at something 20 feet away for 20 seconds

Android Studio - Android Emulator Wifi Connected With No Internet

Image
Answer : Stated below are the solutions for Windows and Mac, but similar solutions will work on any OS: On Windows Open Network and Sharing Center and click on current Connection Click on Properties Double Click on Internet Protocol Version 4 (TCP/IPv4) Set the Preferred and Alternate DNS servers as (Screenshot below) : 8.8.8.8 8.8.4.4 On Mac Go to Settings > Network > Advanced... > DNS Delete whatever entries you have there and add these two entries (Screenshot below): 8.8.8.8 8.8.4.4 Note: For Mac users, if the entries field is disabled and you're not able to edit it, click on the 'Lock' icon in the bottom area of that window and enter the password to be able to make changes Restart the emulator, and it should solve: Screenshots: Windows Mac Edit: This is the fix for a situation when the emulator's wifi has changed the DNS to some non-working DNS. While this works most of the time, there might also be other rea

Api.get(...).then(...).catch(...).finally Is Not A Function

Answer : I suggest to use another then instead of using finally . then after catch is works like a finally . don't forget to use at least one catch in your promise chain, in order to handle your instructions failure. So this two line of code is the same: api.get(…).then(…).catch(…).then(...) and api.get(…).then(…).catch(…).finally(...) Only a native Promise (constructed with new Promise ) is guaranteed to have a .finally method (in newer environments). (in older environments, .finally won't work at all with Promises created with new Promise ) It looks like axios doesn't use new Promise internally - rather, it just returns a thenable, which is not guaranteed to have a finally method (and because it doesn't, it throws an error). While you could use the explicit Promise construction antipattern to wrap the axios call in a native new Promise , so that it has Promise.prototype.finally in its prototype chain, a better option (thanks Bergi!) is to just

Android: Remove All The Previous Activities From The Back Stack

Answer : The solution proposed here worked for me: Java Intent i = new Intent(OldActivity.this, NewActivity.class); // set the new task and clear flags i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); startActivity(i); Kotlin val i = Intent(this, NewActivity::class.java) // set the new task and clear flags i.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK startActivity(i) However, it requires API level >= 11. Here is one solution to clear all your application's activities when you use the logout button. Every time you start an Activity, start it like this: Intent myIntent = new Intent(getBaseContext(), YourNewActivity.class); startActivityForResult(myIntent, 0); When you want to close the entire app, do this: setResult(RESULT_CLOSE_ALL); finish(); RESULT_CLOSE_ALL is a final global variable with a unique integer to signal you want to close all activities. Then define every activity's onActivityRe

500dollars In Rupees Code Example

Example: 500 usd to inr 37,878.77 Indian Rupee

403 Forbidden Vs 401 Unauthorized HTTP Responses

Image
Answer : A clear explanation from Daniel Irvine: There's a problem with 401 Unauthorized , the HTTP status code for authentication errors. And that’s just it: it’s for authentication, not authorization. Receiving a 401 response is the server telling you, “you aren’t authenticated–either not authenticated at all or authenticated incorrectly–but please reauthenticate and try again.” To help you out, it will always include a WWW-Authenticate header that describes how to authenticate. This is a response generally returned by your web server, not your web application. It’s also something very temporary; the server is asking you to try again. So, for authorization I use the 403 Forbidden response. It’s permanent, it’s tied to my application logic, and it’s a more concrete response than a 401. Receiving a 403 response is the server telling you, “I’m sorry. I know who you are–I believe who you say you are–but you just don’t have permi

Border Radius For Card In Flutter Code Example

Example 1: card rounded corners flutter Card ( //Card with circular border shape : RoundedRectangleBorder ( borderRadius : BorderRadius . circular ( 15.0 ) , ) , child : Text ( 'Card with circular border' , textScaleFactor : 1.2 , ) , ) , Card ( //Card with beveled border shape : BeveledRectangleBorder ( borderRadius : BorderRadius . circular ( 10.0 ) , ) , child : Text ( 'Card with Beveled border' , textScaleFactor : 1.2 , ) , ) , Card ( shape : StadiumBorder ( //Card with stadium border side : BorderSide ( color : Colors . black , width : 2.0 , ) , ) , child : Text ( 'Card with Beveled border' , textScaleFactor : 1.2 , ) , ) , Example 2: how to give shape to card in flutter Card ( color : Colors . grey [ 900 ] , shape : RoundedRectangleBorder ( side : BorderSide ( color : Colors . white70 , width : 1 ) ,

"415 Unsupported Media Type" For Content-Type "application/csp-report" In ASP.NET Core

Answer : The following example shows how to add support to the SystemTextJsonInputFormatter for handling additional media-types: services.AddControllers(options => { var jsonInputFormatter = options.InputFormatters .OfType<SystemTextJsonInputFormatter>() .Single(); jsonInputFormatter.SupportedMediaTypes.Add("application/csp-report"); }); This is a two-step process: Interrogate the configured list of input-formatters to find the SystemTextJsonInputFormatter . Add application/csp-report to its existing list of supported media-types ( application/json , text/json , and application/*+json ). If you're using Json.NET instead of System.Text.Json , the approach is similar : services.AddControllers(options => { var jsonInputFormatter = options.InputFormatters .OfType<NewtonsoftJsonInputFormatter>() .First(); jsonInputFormatter.SupportedMediaTypes.Add("application/csp-report"); }) T

Any Good Way To Get The New Menlo Font On Windows?

Answer : This may be a bit of a workaround - but the font is very similar to Bitstream Vera Sans Mono. Here is a comparison ( updated link ) of Menlo and Bitstream Vera Sans Mono DejaVu Sans Mono (also based on Bitstream's original). You can download the Bitstream set absolutely free (zip file). this font https://github.com/andreberg/Meslo-Font is designed to be similar to Menlo I have found a github repo. Try here https://github.com/hbin/top-programming-fonts Hope this helps.. :)

Rick Astley Never Gonna Give You Up Lyrics Code Example

Example: never gonna give you up lyrics /* We're no strangers to love You know the rules and so do I A full commitment's what I'm thinking of You wouldn't get this from any other guy I just wanna tell you how I'm feeling Gotta make you understand Never gonna give you up Never gonna let you down Never gonna run around and desert you Never gonna make you cry Never gonna say goodbye Never gonna tell a lie and hurt you We've known each other for so long Your heart's been aching but you're too shy to say it Inside we both know what's been going on We know the game and we're gonna play it And if you ask me how I'm feeling Don't tell me you're too blind to see Never gonna give you up Never gonna let you down Never gonna run around and desert you Never gonna make you cry Never gonna say goodbye Never gonna tell a lie and hurt you Never gonna give you up Never gonna let you down Never gonna run around and

Bootstrap 4 Ul Li List Inline Code Example

Example: Bootstrap 4 - Inline List? Ask Question < ul class = " list-inline " > < li class = " list-inline-item " > < a class = " social-icon text-xs-center " target = " _blank " href = " # " > FB </ a > </ li > < li class = " list-inline-item " > < a class = " social-icon text-xs-center " target = " _blank " href = " # " > G+ </ a > </ li > < li class = " list-inline-item " > < a class = " social-icon text-xs-center " target = " _blank " href = " # " > T </ a > </ li > </ ul >

Cannot Find Command 'dotnet Ef'?

Image
Answer : In my case, the tools folder didn't exist inside %USERPROFILE%\.dotnet\ so I had to run the command dotnet tool install --global dotnet-ef to install dotnet ef. Then I was able to run dotnet ef... This was the result of the above install command: Note to readers: If you haven't installed dotnet ef , you need to install it first: dotnet tool install --global dotnet-ef . The question-asker already did that. You need to do that first before the rest of this answer can help. How to fix this For Linux and macOS , add a line to your shell's configuration: bash / zsh : export PATH="$PATH:$HOME/.dotnet/tools/" csh / tcsh : set path = ($path $HOME/.dotnet/tools/) When you start a new shell/terminal (or the next time you log in) dotnet ef should work. For Windows : See this question on how to add to the PATH environment variable. You need to add %USERPROFILE%\.dotnet\tools to the PATH . What's going on? The .NET Core 3.0 (preview)

Amazon RDS Instance Backup Window Duration?

Answer : Backup window doesn't specifically ask for the time when to start take backup but instead ask for time period in which aws can trigger backup. So basically it's asking for backup window time . That's why it has 2 fields 1. StartTime: When can the process of backup be started. 2. Duration : time window in which process must start to take backup. E.G if I set start time: 5:30 and duration: 30mints Backup can start at anytime between 5:30 to 6:00 . from Working With Backups documentaion Below is the answer for "what if the backup did not fit into a backup window?" If the backup requires more time than allotted to the backup window, the backup continues after the window ends, until it finishes. Below is the answer for "If backup may not fit into the backup window, why do we need a backup window?" The backup window can't overlap with the weekly maintenance window for the DB instance.