Posts

Showing posts from April, 2004

Clas Code Example

Example 1: class .ThisIsAClassName { color: blue; } Example 2: class < p class = " ThisIsAClassName " > Class </ p >

1/2 Inch To Cm Code Example

Example: inch to cm 1 inch = 2.54 cm

Angular - Material: Progressbar Custom Color?

Image
Answer : You can use ::ng-deep selector to achieve what you want, this answer has some info on it. How I did it: CSS ::ng-deep .mat-progress-bar-fill::after { background-color: #1E457C; } ::ng-deep .mat-progress-bar-buffer { background: #E4E8EB; } ::ng-deep .mat-progress-bar { border-radius: 2px; } HTML <mat-progress-bar mode="determinate" value="{{progress}}"></mat-progress-bar> And the result is this: EDIT: I found a way to avoid using ::ng-deep as it will be removed from angular soon. It seems that if you move your style from your component.css file to the global styles.css file it will work without ::ng-deep . So, a style defined above can change in mat-progress-bar .mat-progress-bar-buffer { background: #E4E8EB; } Move it to styles.css and it will be applied like this: LATER EDIT As an explanation why setting styles in the global style sheet works: For components the default is that angul

131 To Binary Code Example

Example: 10 binary to denary binary 10 = 2 denary

Youtube To Mp3 Free Online Converter 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/

Bootstrap 4 Default Tab-pane Active Fade In Not Working

Answer : USE fade show instead of fade in in the tab-content classes Reference https://getbootstrap.com/docs/4.0/components/navs/?#javascript-behavior This is the way of solving it on bootstrap 4. But in bootstrap 3, your code should be working. Related question for bootstrap 3. Bootstrap tab - active class not working on page loading <!-- 1. BOOTSTRAP v4.0.0 CSS !--> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> <!-- 2. GOOGLE JQUERY JS v3.2.1 JS !--> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <!-- 3. BOOTSTRAP v4.0.0 JS !--> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6v

Android Emulator - "Encryption Unsuccessful"

Image
Answer : Wiping data in Android Virtual Device Manager helped me in my case. Tools -> Android -> AVD Manager -> Actions (triangle down) -> Wipe Data There is also Advanced settings in virtual device's configuration ( the pencil ) where is a configuration of SD card and internal storage, but I didn't have to change it. Android Device Manager > Stop your device and right click > Factory Reset

Awscli Version 2 On Alpine Linux

Answer : Actually with a bit a effort it is possible to run AWS CLI v2 on Alpine: FROM alpine:3.11 ENV GLIBC_VER=2.31-r0 # install glibc compatibility for alpine RUN apk --no-cache add \ binutils \ curl \ && curl -sL https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub \ && curl -sLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VER}/glibc-${GLIBC_VER}.apk \ && curl -sLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VER}/glibc-bin-${GLIBC_VER}.apk \ && curl -sLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VER}/glibc-i18n-${GLIBC_VER}.apk \ && apk add --no-cache \ glibc-${GLIBC_VER}.apk \ glibc-bin-${GLIBC_VER}.apk \ glibc-i18n-${GLIBC_VER}.apk \ && /usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8 \ && curl -sL https://awscli.amazonaws.com/

Brew Install Nvm. Nvm: Command Not Found

Answer : There are two steps to installing nvm with brew. First use brew to install the application: brew install nvm Then take a look at the brew info "caveats" section, to see what else you have to do: brew info nvm You might see something like (this can change!): You should create NVM's working directory if it doesn't exist: mkdir ~/.nvm Add the following to ~/.bash_profile or your desired shell configuration file: export NVM_DIR="$HOME/.nvm" . "/usr/local/opt/nvm/nvm.sh" If you do not have a ~/.bash_profile file, then you can simply create one. Make sure to restart your terminal before trying the command. From the docs: Your system may not have a [.bash_profile file] where the command is set up. Simply create one with touch ~/.bash_profile and run the install script again you might need to restart your terminal instance. Try opening a new tab/window in your terminal and retry. Restarting worked f

Before Delete Trigger Salesforce Code Example

Example: before delete trigger in salesforce trigger AccountTrigger on Account (before delete) { if(System.Trigger.IsDelete) { for (Account acc : trigger.old) { if (String.isNotBlank(acc.Client_ID__c)) { acc.addError('You cannot delete This Account Please contact your Salesforce.com Administrator for assistance.'); } } } }

Bootstrap Datetimepicker Set Date

Answer : As per documentation you can use string, Date, moment, null , string and Date examples are below. Note default picker format. $('#datetimepicker1').data("DateTimePicker").date(new Date()) or $('#datetimepicker1').data("DateTimePicker").date('1/11/2016 12:23:12') Sure, i'm real Necromancer, but i got same problem and .date() function does not help for me. But, i found this: $('#datetimepicker1').data("DateTimePicker").options({ defaultDate: newdate}); // newdate - could be Date, Moment or ISO string

Aspect Not Being Called In Spring Test

Answer : Not sure what you are trying to do but your @ContextConfiguration is useless as you aren't using Spring Test to run your test (that would require a @RunWith or one of the super classes from Spring Test). Next you are adding a singleton which is already fully mocked and configured (that is what the context assumes). I strongly suggest to use Spring instead of working around it. First create a configuration inside your test class for testing, this configuration should do the scanning and register the mocked bean. Second use Spring Test to run your test. @ContextConfiguration public class SoftwareServiceTests extends AbstractJUnit4SpringContextTests { private static final Logger LOGGER = LoggerFactory.getLogger(SoftwareServiceTests.class.getName()); @Autowired private SoftwareService softwareService; @Test(expected = ValidationException.class) public void testAddInvalidSoftware() throws ValidationException { LOGGER.info("Testing a

Addpath Windows Matlab Code Example

Example: matlab add to path addpath('matlab/myfiles') savepath matlab/myfiles/pathdef.m

Blue Sky Rgb Code Example

Example 1: rgba green color rgb ( 0 , 128 , 0 ) /*green*/ Hex #008000 Example 2: rgba blue color rgb ( 0 , 0 , 255 ) /*blue*/ Hex #0000FF

Class Constructor Cannot Be Invoked Without 'new' - Typescript With Commonjs

Answer : TypeScript transpiles a class to its ES5 counterpart, but this way it's necessary that entire class hierarchy is transpiled to ES5. In case parent class is untranspiled (native class or imported ES6 class, including the ones that were transpiled with Babel), this won't work, because TypeScript relies on var instance = Parent.call(this, ...) || this trick to call parent constructor, while ES6 classes should be called only with new . This problem should be solved in Node.js by setting TypeScript target option to es6 or higher. Modern Node.js versions support ES6 classes, there is no need to transpile them. The same problem applies to Babel. I came across the same problem using javascript, webpack, and babel (but no TypeScript). I found a solution based on ES6/Babel Class constructor cannot be invoked without 'new' I needed to explicitly include colyseus in my babel loader. Below is the snippet in my webpack config file: module: { rules: [

Assembly Code Vs Machine Code Vs Object Code?

Image
Answer : Machine code is binary (1's and 0's) code that can be executed directly by the CPU. If you open a machine code file in a text editor you would see garbage, including unprintable characters (no, not those unprintable characters ;) ). Object code is a portion of machine code not yet linked into a complete program. It's the machine code for one particular library or module that will make up the completed product. It may also contain placeholders or offsets not found in the machine code of a completed program. The linker will use these placeholders and offsets to connect everything together. Assembly code is plain-text and (somewhat) human read-able source code that mostly has a direct 1:1 analog with machine instructions. This is accomplished using mnemonics for the actual instructions, registers, or other resources. Examples include JMP and MULT for the CPU's jump and multiplication instructions. Unlike machine code, the CPU does not understand assemb
Answer : Two errors here: first, you're trying to declare arrays[63] for storing 64 elements, as you've probably confused the size of array ( n ) with the maximum possible index value (that's n - 1 ). So it definitely should be litera[64] and liczba[64] . BTW, you have to change this line too - while (i<=64) : otherwise you end up trying to access 65th element. And second, you're trying to fill char value with %s format specifier for scanf, while you should have used %c here. Also, can't help wondering why you declare liczba array as one that stores int s, that initialize it with array of char s. All these '1', '2', etc... literals represent NOT the corresponding digits - but the charcodes for them. I doubt that was your intent.

Check Internet Connection Continuously In Flutter Code Example

Example 1: flutter check internet connection import 'package:connectivity/connectivity.dart'; var connectivityResult = await (Connectivity().checkConnectivity()); if (connectivityResult == ConnectivityResult.mobile) { // I am connected to a mobile network. } else if (connectivityResult == ConnectivityResult.wifi) { // I am connected to a wifi network. } //connectivity: any Example 2: check if internet connected flutter The connectivity plugin states in its docs that it only provides information if there is a network connection, but not if the network is connected to the Internet Note that on Android, this does not guarantee connection to Internet. For instance, the app might have wifi access but it might be a VPN or a hotel WiFi with no access. You can use import 'dart:io'; ... try { final result = await InternetAddress.lookup('google.com'); if (result.isNotEmpty && result[0].rawAddress.isNotEmpty) { print('connected');