Posts

Showing posts from March, 2010

Camtasia 2020 Software Key Code Example

Example: camtasia 2020 offline activation UHGFS-WERTG-HJ6UY-GFDSE-RTYH9 FSW6Q-AZXDE-WQAZX-CVG7K-JNBVG

Type Casting In Oop Javatpoint Code Example

Example 1: java type casting // You can typecast to convert a variable of one data type to another. // Wide Casting converts small data types to larger ones. // Narrow Casting converts large data types to smaller ones. // Java can automatically Wide Cast. // Java will throw an error when trying to automatically Narrow Cast. // This is because data is often lost when Narrow Casting. // Narrow Casting must be done manually. //Wide Cast: int SomeNumber = 5 ; double WideCastedNumber = ( double ) SomeNumber ; //Narrow Cast: double SomeNumber = 5.39 ; int NarrowCastedNumber = ( int ) SomeNumber ; //Note: The data that holds the decimal places will be lost! Example 2: cast java JAVA : Example of cast : int SomeNumber = 5 ; //int double WideCastedNumber = ( double ) SomeNumber ; //from int to double double myDouble = 9.78 ; int myInt = ( int ) myDouble ; // from double to int

Primary Color Colour Code Code Example

Example: rgb purple color ( 128 , 0 , 128 ) Hex #800080

Convert PHP-MySQL Web Application To Desktop App (exe)

Answer : The convenient solution is not to convert the website to .exe. I think it will be better if you have portable server/php/mysql and make the website work from a usb or CD with autorun. I was also looking for a similar solution and found https://code.google.com/p/phpdesktop/ Hope this helps. NuSphere's PhpDock claims to do this: It serves as a deployment helper and comes with a bundled web server. However, I don't know about the database part, and it's not free. PhpDock enables you to deploy any PHP web application as a Stand Alone Windows Desktop application w/o any changes in the code. I don't know that particular product, but I have been using their IDE for years and am quite happy.

Angular Scrollable Mat-selection-list?

Answer : Simple CSS mat-selection-list { max-height: 400px; overflow: auto; } StackBlitz Demo By setting custom CSS properties? CSS for fancy scroll bar which only supports Chrome browsers: .custom-scroll-bar{ height:70vh; overflow-y:scroll; overflow-x: hidden; } .custom-scroll-bar::-webkit-scrollbar{ width: 5px; } .custom-scroll-bar::-webkit-scrollbar-thumb{ background: rgba(0,0,0,.26); } For Firefox and Internet explorer just simply use: .custom-scroll-bar{ height:70vh; overflow-y:scroll; } HTML: <mat-selection-list #shoes class="custom-scroll-bar"> <mat-list-option *ngFor="let shoe of typesOfShoes"> {{shoe}} </mat-list-option> </mat-selection-list> StackBlitz Example You can try with: <mat-card fxFlex="33%"> <mat-selection-list [style.overflow]="'auto'" [style.height.px]="'300'"> <mat-list-item

How To Position Image In Css Code Example

Example 1: how to change image position in css .image { position : absolute ; right : 300 px ; } Example 2: html image position <img src= "image.jpg" style= "top:---%; left:---%" > <!-- if you put "top" to an higher % , the image will be more down. exemple : --> <img src= "romuald.png" style= "top:03%; left:80%" > <!-- my image will be up and in the right corner --> Example 3: what are the types of positioning in css The types of positioning in CSS are- 1 ) static : this is the default value. 2 ) sticky : the element is positioned based on the user's scroll position. 3 ) fixed : the element is positioned related to the browser window. 4 ) relative : the element is positioned relative to its normal position. 5 ) absolute : the element is positioned absolutely to its first positioned parent.

Write A Bool Function C Code Example

Example: boolean function c # include <stdbool.h>

Youtube Mp32 Code Example

Example: youtube download mp3 I use https : //github.com/ytdl-org/youtube-dl/ as a Python CLI tool to download videos

Can I Use React Bootstrap With Next.js?

Answer : It is obviously possible to use react-bootstrap in a nextjs application. The only problem you might encounter will be in the rendering of your application if javascript is disabled in user's browser if you use react-bootstrap components to build your layout (see example below). Nextjs allows you to display SSG/SSR pages, javascript-disabled users will see your app but the layout will be messy. But if you still want to go with it: npm i react-bootstrap bootstrap Import bootstrap styles in your _app.js: import 'bootstrap/dist/css/bootstrap.min.css'; You can then use your react-bootstrap components as you would do in reactjs: import {Container, Row, Col} from 'react-bootstrap'; const Layout = () => ( <> <Container fluid> <Row> <Col> <p>Yay, it's fluid!</p> </Col> </Row> </Container> </> ); export default Layout; Yes

Media Only Screen And (max-width > Code Example

Example: media query min and max /* Max-width */ @media only screen and ( max-width : 600 px ) { ... } /* Min-width */ @media only screen and ( min-width : 600 px ) { ... } /* Combining media query expressions */ @media only screen and ( max-width : 600 px ) and ( min-width : 400 px ) { ... }

Convert Date String To Date Php Code Example

Example 1: php string to date $s = '06/10/2011 19:00:02' ; $date = strtotime ( $s ) ; echo date ( 'd/M/Y H:i:s' , $date ) ; The above one is the one of the example of converting a string to date . echo $s - > format ( 'Y-m-d' ) ; The above one is another method Example 2: convert string to date php $s = '08/11/2010 19:37:02' ; $date = strtotime ( $s ) ; echo date ( 'Y-m-d H:i:s' , $date ) ; Example 3: php string to date $s = '06/10/2011 19:00:02' ; $date = strtotime ( $s ) ; echo date ( 'd/M/Y H:i:s' , $date ) ; The above one is the one of the example of converting a string to date . echo $s - > format ( 'Y-m-d' ) ; The above one is another method

Destroy Itself Unity Code Example

Example: how to destroy in unity // To remove a GameObject use the function 'Destroy()' Destroy ( gameObject ) ;

Adding Music Html Code Example

Example: how to add Music to body html < !DOCTYPE html > < html > < head > < title > HTML background music < / title > < / head > < body > < p > The music is running in the background . < / p > < p > ( Song : Kalimba which is provided as a Sample Music in Windows ) < / p > < embed src = "/html/Kalimba.mp3" loop = "true" autostart = "true" width = "2" height = "0" > < / body > < / html >

Call Another Rest Api From My Server In Spring-Boot

Answer : This website has some nice examples for using spring's RestTemplate. Here is a code example of how it can work to get a simple object: private static void getEmployees() { final String uri = "http://localhost:8080/springrestexample/employees.xml"; RestTemplate restTemplate = new RestTemplate(); String result = restTemplate.getForObject(uri, String.class); System.out.println(result); } Instead of String you are trying to get custom POJO object details as output by calling another API/URI , try the this solution. I hope it will be clear and helpful for how to use RestTemplate also, In Spring Boot , first we need to create Bean for RestTemplate under the @Configuration annotated class. You can even write a separate class and annotate with @Configuration like below. @Configuration public class RestTemplateConfig { @Bean public RestTemplate restTemplate(RestTemplateBuilder builder) { return builder.build(); } } The

Allow Facebook Access Only In Specific Hours Of The Day With Squid

Answer : Taken from my configfile: # When is Facebook allowed? acl allowfacebooktime time MTWHF 12:15-13:45 # Facebook ACL acl facebookdotcom dstdomain .facebook.com # Only allow Facebook as described by allowfacebooktime http_access allow facebookdotcom allowfacebooktime # Else block facebook http_access deny facebookdotcom Squid supports time-base ACLS Something like this should work: acl FACEBOOK dst www.facebook.com acl LUNCH time MTWHF 12:30-1:30 http_access allow FACEBOOK LUNCH http_access deny FACEBOOK The "FACEBOOK" acl is probably wrong, I'm just making this up as I go :). The above says to allow access to whatever matches the FACEBOOK acl, during the time period matched by the LUNCH acl. It then says to deny access to the FACEBOOK acl as a fall back. Rules are matched in order, so the lunchtime rule has priority. Squid Wiki page on time ACLS

Copy And Overwrite A File In Shell Script

Answer : Use cp -fr /source/file /destination this should probably solve the problem. This question has been already discussed, however you can write a little script like this: #!/bin/bash if [ ! -d "$2" ]; then mkdir -p "$2" fi cp -R "$1" "$2" Explaining this script a little bit #!/bin/bash : tells your computer to use the bash interpreter. if [ ! -d "$2" ]; then : If the second variable you supplied does not already exist... mkdir -p "$2" : make that directory, including any parent directories supplied in the path. Running mkdir -p one/two/three will make: $ mkdir -p one/two/three $ tree one one/ └── two └── three If you don't supply the -p tag then you'll get an error if directories one and two don't exist: $ mkdir one/two/three mkdir: cannot create directory ‘one/two/three’: No such file or directory fi : Closes the if statement. cp -R "$1" "$2" : copies files from the first

Max And Min Width Code Example

Example 1: min and max width media query @media ( max-width : 989 px ) and ( min-width : 768 px ) { } Example 2: orientation css max and min width media query <style type= "text/css" > /* default styles here for older browsers. I tend to go for a 600px - 960px width max but using percentages */ @media only screen and ( min-width : 960 px ) { /* styles for browsers larger than 960px; */ } @media only screen and ( min-width : 1440 px ) { /* styles for browsers larger than 1440px; */ } @media only screen and ( min-width : 2000 px ) { /* for sumo sized (mac) screens */ } @media only screen and ( max-device-width : 480 px ) { /* styles for mobile browsers smaller than 480px; (iPhone) */ } @media only screen and ( device-width : 768 px ) { /* default iPad screens */ } /* different techniques for iPad screening */ @media only screen and ( mi

Margin-bottom Bootstrap 4 Class Code Example

Example 1: bootstrap Margin and padding Use the margin and padding spacing utilities to control how elements and components are spaced and sized. Bootstrap 4 includes a five-level scale for spacing utilities , based on a 1 rem value default $spacer variable. Choose values for all viewports ( e.g. , .mr-3 for margin-right : 1 rem ) , or pick responsive variants to target specific viewports ( e.g. , .mr-md-3 for margin-right : 1 rem starting at the md breakpoint ) . <div class= "my-0 bg-warning" >Margin Y 0 </div> <div class= "my-1 bg-warning" >Margin Y 1 </div> <div class= "my-2 bg-warning" >Margin Y 2 </div> <div class= "my-3 bg-warning" >Margin Y 3 </div> <div class= "my-4 bg-warning" >Margin Y 4 </div> <div class= "my-5 bg-warning" >Margin Y 5 </div> <div class= "my-auto bg-warning" >Margin Y Auto</div> Examp

Can I Get Rid Of My Premium Raid Passes?

Answer : April 2019 Update: You can now delete your Raid Passes by simply clicking the 'delete' button. Legacy info: There's only one in-game way of deleting those Premium Raid Passes, which is as user SHRLY has suggested - just join an ongoing raid and leave them repeatedly until all is used up. Alternatively, you can also email Niantic support and ask to remove your Premium Raid Passes (as well as other non-deletable items like Incubators), by going to the Niantic support page and selecting "Purchase Issues". You can now delete them after applying the latest update Yes, I had same problem, they can not be deleted. I join raid left raid, join raid left raid,... that is only way how to rid them off.

Access Google Spreadsheet API Without Oauth Token

Answer : API key is not enough. You're trying to use spreadsheets.values.append which requires OAuth authorization: Authorization Requires one of the following OAuth scopes: https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/spreadsheets For more information, see the [Auth Guide](https://developers.google.com/identity/protocols/OAuth2). Note it says OAuth. You could use the format as below: https://docs.google.com/spreadsheets/d/{sheetID}/export?format=csv Make a URLConnection to this URL, after replacing the sheetID with your public sheet and read the csv file as you would normally do in your programming language of choice. Please note that this is only true for Readable Public Google spreadsheets, and is a bit of a hack when you don't necessarily need to do the Credentials jig and jive In my case I need to publish content from a Google Spreadsheet to a web page. My workaround consists in u

Youtube To Mp4 Online Free Code Example

Example 1: youtube mp4 downloader I suggest videovor . com , it's really great and you even get an option to choose if you want the whole video or just the audio ! Example 2: youtube to mp4 ytmp3 . cc is the best by far

Android Shape: Circle With Cross(plus)

Answer : I accomplished something similar (a solid circle with a white plus in the middle) using this drawable xml: <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape android:shape="oval"> <solid android:color="@color/accent"/> </shape> </item> <item> <shape android:shape="line"> <stroke android:width="5dp" android:color="@android:color/white" /> </shape> </item> <item> <rotate android:fromDegrees="90" android:pivotX="50%" android:pivotY="50%" android:toDegrees="-90"> <shape android:shape="line"> <stroke android:width="5dp&quo

Android.support.design.widget.TextInputLayout Could Not Be Instantiated

Answer : replace android.support.design.widget.TextInputLayout with com.google.android.material.textfield.TextInputLayout If you uses AndroidStudio, you should not include android-support-design.jar. Instead, write like below in your build.gradle: dependencies { ... compile 'com.android.support:design:24.0.0' ... } Edit : If this doesn't work you are probably using a different version. In Windows, go to: [android-sdk]\extras\android\m2repository\com\android\support\design On Mac: sdk/extras/android/m2repository/com/android/support/design This directory holds a number of version folders. Use the latest version on your build.gradle. add in the build.gradle following this line: implementation 'com.android.support:design:28.0.0' and use in the xml file: <com.google.android.material.textfield.TextInputLayout android:id="@+id/inputLayoutMobile" android:layout_width="ma

Admin Lte Git Code Example

Example: adminlte npm install admin-lte@^3.0 --save

Alter Table Modify Column Sql Server Code Example

Example 1: sql change column types ALTER TABLE table_name ALTER COLUMN column_name datatype; -- Example ALTER TABLE product ALTER COLUMN description VARCHAR(250); Example 2: sql add column ALTER TABLE Customers ADD Email varchar(255); Example 3: append column sql ALTER TABLE table_name ADD column_name datatype; --example ALTER TABLE Customers ADD Email varchar(255); Example 4: sql server alter column ALTER TABLE table_name ALTER COLUMN column_name new_data_type(size); Example 5: sql alter column size ALTER TABLE table_name ALTER COLUMN column_name datatype; Example 6: sqlserver add column to table ALTER TABLE dbo.doc_exa ADD column_b VARCHAR(20) NULL, column_c INT NULL ;