Posts

Showing posts from November, 2017

How To Increase The Size Of Border Length In Css Code Example

Example: css border length .page-title :after { content : "" ; /* This is necessary for the pseudo element to work. */ display : block ; /* This will put the pseudo element on its own line. */ margin : 0 auto ; /* This will center the border. */ width : 50 % ; /* Change this to whatever width you want. */ padding-top : 20 px ; /* This creates some space between the element and the border. */ border-bottom : 1 px solid black ; /* This creates the border. Replace black with whatever color you want. */ }

Crontab Every 6 Hours Code Example

Example 1: cron every 3 hours 0 */3 * * * Example 2: crontab every 30 minutes between hours // from 08h to 17h (until 17:30) */30 8-17 * * * // from 08h to 17h, at number '5' (until 17:35) 5,30 8-17 * * *

Android Horizontal RecyclerView Scroll Direction

Answer : Assuming you use LinearLayoutManager in your RecyclerView, then you can pass true as third argument in the LinearLayoutManager constructor. For example: mRecyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, true)); If you are using the StaggeredGridLayoutManager , then you can use the setReverseLayout method it provides. You can do it with just xml. the app:reverseLayout="true" do the job! <android.support.v7.widget.RecyclerView android:layout_width="match_parent" android:layout_height="wrap_content" android:divider="@null" android:orientation="horizontal" app:reverseLayout="true" app:layoutManager="android.support.v7.widget.LinearLayoutManager" /> XML approach using androidx: <androidx.recyclerview.

Table Cols Code Example

Example: col tag in html <!-- use the scope tag --> <table> <tr scope= "col" >Column</tr> <tr scope= "row" >Row</tr> </table>

Confirm Deletion Using Bootstrap 3 Modal Box

Answer : You need the modal in your HTML. When the delete button is clicked it popup the modal. It's also important to prevent the click of that button from submitting the form. When the confirmation is clicked the form will submit. $('button[name="remove_levels"]').on('click', function(e) { var $form = $(this).closest('form'); e.preventDefault(); $('#confirm').modal({ backdrop: 'static', keyboard: false }) .on('click', '#delete', function(e) { $form.trigger('submit'); }); $("#cancel").on('click',function(e){ e.preventDefault(); $('#confirm').modal.model('hide'); }); }); <link href="http://getbootstrap.com/2.3.2/assets/css/bootstrap.css" rel="stylesheet" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"

Css Image With Transparent Background Code Example

Example 1: background image opacity css /* Two ways to make images opaque */ div { background-color : rgba ( 120 , 120 , 120 , 0.5 ) /* the 0.5 is the value of opacity on a scale of 0-1 */ } /* OR */ div { background-color : blue opacity : 50 % } Example 2: transparent background css for image background-color : rgba ( 255 , 0 , 0 , 0.5 ) ; Example 3: png image background transparent css body { background-color : transparent ; } Example 4: css background image opacity /* You have to fake it, as there is no such property */ div { width : 200 px ; /* Image Width */ height : 200 px ; /* Image Height */ display : block ; position : relative ; } div ::after { content : "" ; background : url ( image.jpg ) ; opacity : 0.5 ; top : 0 ; left : 0 ; bottom : 0 ; right : 0 ; position : absolute ; z-index : -1 ; } Example 5: transparent background css div { width : 200 px ; height : 200 px ; disp

Android "elevation" Not Showing A Shadow

Answer : I've been playing around with shadows on Lollipop for a bit and this is what I've found: It appears that a parent ViewGroup 's bounds cutoff the shadow of its children for some reason; and shadows set with android:elevation are cutoff by the View 's bounds, not the bounds extended through the margin; the right way to get a child view to show shadow is to set padding on the parent and set android:clipToPadding="false" on that parent. Here's my suggestion to you based on what I know: Set your top-level RelativeLayout to have padding equal to the margins you've set on the relative layout that you want to show shadow; set android:clipToPadding="false" on the same RelativeLayout ; Remove the margin from the RelativeLayout that also has elevation set; [EDIT] you may also need to set a non-transparent background color on the child layout that needs elevation. At the end of the day, your top-level relative layout sho

Creating A Minecraft Mod Sword Code Example

Example: how to code a minecraft json file mod this is for the manifest.json file { "format_version": 1, "header": { "uuid": "6796d13d-a738-4f5d-ac8e-f26c630411eb", "name": "NAME HERE", "description": "YOUR DESCRIPTION HERE", "version": [ 0, 0, 1 ] }, "modules": [ { "description": "YOUR DESCRIPTION HERE", "type": "resources", "version": [ 0, 0, 1 ], "uuid": "743f6949-53be-44b6-b326-398005028819" } ] }

Convert Pem File To Ppk Code Example

Example: old pem format putty Convert .pem to .ppk file format Using Putty ( Windows ) To convert the .pem file .ppk follow below points 1 . First you need to download Putty from here. 2 . Then run puttygen to convert .PEM file to .PPK file. 3 . Start puttygen and select “Load” 4 . Select your .PEM file. 5 . Putty will convert the .PEM format to .PPK format. 6 . Select “Save Private Key” A passphrase is not required but can be used if additional security is required.

Install Expo Vector Icons React Native Code Example

Example: expo vector icons install npm install @expo/vector-icons

Scanf Clear Buffer C Code Example

Example: c++ flush stdin fflush ( stdin ) ;