Posts

Showing posts from January, 2010

Bootstrap 5 Text Uppercase Code Example

Example 1: uppercase bootstrap class < p class = " text-lowercase " > Lowercased text. </ p > < p class = " text-uppercase " > Uppercased text. </ p > < p class = " text-capitalize " > CapiTaliZed text. </ p > Example 2: bootstrap text capitalize < p class = " text-capitalize " > CapiTaliZed text. </ p >

Cc Converter Code Example

Example: youtube to mp4 ytmp3.cc is the best by far

Add Shadow Css Image Code Example

Example 1: drop shadow image css filter : drop-shadow ( 0 px 10 px 3 px black ) ; Example 2: shadow css Source :www .w3schools .com 0 image shadow cssCSS By Ankur on May 1 2020 Donate <!Doctype > <html > <head > <style > .img { width : 400 px ; height : 200 px ; border : 2 px solid #fff ; background : url ( img/tiger.png ) no-repeat ; box-shadow : 10 px 10 px 5 px #ccc ; -moz-box-shadow : 10 px 10 px 5 px #ccc ; -webkit-box-shadow : 10 px 10 px 5 px #ccc ; -khtml-box-shadow : 10 px 10 px 5 px #ccc ; } </style> </head> <body> <div class= "img" ></div> </body> </html> Example 3: add shadow to background image css box-shadow : inset 0 0 5 px 2 px #282a2d ; /* mark the inset */

Angular Toastr Npm Code Example

Example 1: angular toastr npm install ngx-toastr --save npm install @angular/animations --save // angular.json "styles": [ "styles.scss", "node_modules/ngx-toastr/toastr.css" // try adding '../' if you're // using angular cli before 6 ] // app.module import { CommonModule } from '@angular/common'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { ToastrModule } from 'ngx-toastr'; imports: [ CommonModule, BrowserAnimationsModule, // required animations module ToastrModule.forRoot(), // ToastrModule added ], // component import { ToastrService } from 'ngx-toastr'; constructor(private toastr: ToastrService) {} showSuccess() { this.toastr.success('Hello world!', 'Toastr fun!'); } Example 2: how to add toaster in angular 9 npm install ngx-toastr --save

Angular Grid Ag-grid ColumnDefs Dynamically Change

Answer : In ag-grid the columns in gridOptions are used once at grid initialisation. If you change the columns after initialisation, you must tell the grid. This is done by calling gridOptions.api.setColumnDefs() Details of this api method are provided in the ag-grid documentation here. I think this has been fixed already. I am able to do something like this now with latest angular and ag-grid. Please note I am using ngxs here, however this still indicates the ability to get the column definitions async as I am getting the column defs based on the property names of the data that is being returned from the back-end in this case rowData. Firstly, I am fetching the row data from the back-end API. Then when it is fetched I perform operations in the Select for column that map the headers from returned data to properties. The data will not be displayed without headers, as soon as the headers are there it will redraw the grid with all the column definitions and data. <ag-grid

Clearing The Watchman React Native Code Example

Example 1: npm start reset cache npm start -- -- reset - cache Example 2: yarn start --reset-cache watchman watch - del - all && rm - f yarn . lock && rm - rf node_modules && yarn && yarn start -- reset - cache

Bootstrap 5 Scss Default Font Color Code Example

Example 1: bootstrap text color < p class = "text-primary" > . text - primary < / p > < p class = "text-secondary" > . text - secondary < / p > < p class = "text-success" > . text - success < / p > < p class = "text-danger" > . text - danger < / p > < p class = "text-warning" > . text - warning < / p > < p class = "text-info" > . text - info < / p > < p class = "text-light bg-dark" > . text - light < / p > < p class = "text-dark" > . text - dark < / p > < p class = "text-muted" > . text - muted < / p > < p class = "text-white bg-dark" > . text - white < / p > Example 2: bootstrap 4 bg < div class = "p-3 mb-2 bg-gradient-primary text-white" > . bg - gradient - primary < / div > < div class = "p-3 mb-2 bg-gradient-secondary te

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

Compare Char To Char In C Code Example

Example: compare two chars c strcmp ( char , char ) ;

Programiz.com C Compiler Code Example

Example: c compilers // I Like https://www.programiz.com/c-programming/online-compiler/

Bind Command In WPF Using MVVM

Answer : You can bind the Command property of the button to any property that returns ICommand. Prism implements a nice convenient command called DelegateCommand that is very easy to use (here is a knock-off of it): public ICommand MyButtonClickCommand { get { return new DelegateCommand<object>(FuncToCall, FuncToEvaluate); } } private void FuncToCall(object context) { //this is called when the button is clicked } private bool FuncToEvaluate(object context) { //this is called to evaluate whether FuncToCall can be called //for example you can return true or false based on some validation logic return true; } <Button x:Name="myButton" Command="{Binding MyButtonClickCommand}" /> The CodeProject example How to use Commands in WPF has a very similar example with code that you can easily work through. The previous Stack Overflow question has an example using RoutedCommands that are statically bound to: How to bind Close command

Bootstrap Nowrap Col Code Example

Example 1: bootstrap align right To aligning div in bootstrap you can use bootstrap classes like 1. float-left 2. float-right 3. float-none < div class = " float-left " > Float left on all viewport sizes </ div > < br > < div class = " float-right " > Float right on all viewport sizes </ div > < br > < div class = " float-none " > Don't float on all viewport sizes </ div > Example 2: bootstrap row no-wrap < div class = " row flex-nowrap " > < div class = " col " > </ div > < div class = " col " > </ div > </ div >

Angular Invalid Host Header Code Example

Example 1: invalid host header ngrok ngrok http 8080 -host-header="localhost:8080" ngrok http --host-header=rewrite 8080 Example 2: ngrok invalid host header ngrok http --host-header=rewrite 8080

Can I Get Inline Blame (like GitLens) On Webstorm?

Image
Answer : UPDATED: corrected name to "GitToolBox" from "Jetbrains Toolbox" This can be achieved through the GitToolBox plugin, it provides the exact same functionality as git lens, finally I found it! This can be toggled from other settings> git toolbox global or git toolbox project (if you only want to configure per project) See screenshot Install plugin GitToolBox. It has the same functionality as VisualCode's GitLens. File > Settings > Plugins > Marketplace In Webstorm, you can get all the blames for a file with the option: VCS > Git > Annotate Inline blame exact to Gitlens is most probably not available as of now for Webstorm.

Atoi C Function Code Example

Example 1: atoi # include <stdlib.h> //atoi's library # include <stdio.h> int main ( void ) { string input = "9" ; int output = atoi ( input ) ; printf ( "%i" , output ) ; //this will print out 9 as an int not a string } Example 2: atoi c # include <stdio.h> # include <stdlib.h> # include <string.h> //CONVERT STRING TO INT int main ( ) { int val ; char str [ 20 ] ; strcpy ( str , "98993489" ) ; val = atoi ( str ) ; printf ( "String value = %s, Int value = %d\n" , str , val ) ; strcpy ( str , "tutorialspoint.com" ) ; val = atoi ( str ) ; printf ( "String value = %s, Int value = %d\n" , str , val ) ; return ( 0 ) ; } Example 3: what is atoi in strinf The C library function int atoi ( const char * str ) converts the string argument str to an integer ( type int ) . Note : It is

Apple - AppleScript Keystroke Ignoring Numbers

Answer : Have a look at https://stackoverflow.com/questions/18136567/applescript-keystroke-not-behaving-as-expected & the list of ANSI codes at How do I automate a key press in AppleScript? It appears you're not the only one with the issue. One solution on there was to use the key code instead... tell application "System Events" key code {18} using {command down} It may depend on what app you're trying to send the keystrokes to - I just tested with an already-open blank document in Text Edit using tell application "TextEdit" to activate tell application "System Events" keystroke "abc 123" end tell & it worked as expected. A keystroke is the scripted equivalent of actually pressing that/those keys[s] How about... tell application "TextEdit" to activate tell application "System Events" keystroke "abc" keystroke space keystroke "123" end tell Some more

Beacon Recipe Minecraft Code Example

Example 1: how many iron blocks for a full beacon You need 81 iron blocks for a full beacon Example 2: how to use beacon power in minecraft in java edition /give @p beacon 1 0

Chnage Locatin On Image On Hover Js Code Example

Example: javascript onmouseover change image let img = document . querySelector ( 'img' ) ; let start = img . src ; let hover = img . getAttribute ( 'data-hover' ) ; //specified in img tag img . onmouseover = ( ) => { img . src = hover ; } img . onmouseout = ( ) => { img . src = start ; } //to revert back to start

Ascii Art Generator Code Example

Example 1: accii art ......... .'------.' | Plug and Play | .-----. | | | | | | | __| | | | |;. _______________ / |*`-----'.|.' `; // / `---------' .;' // /| / .''''////////;' // |=| .../ ######### /;/ //| |/ / / ######### // //|| / `-----------' // || /________________________________//| || `--------------------------------' | || : | || | || |__LL__|| || | || : | || | || | || `""' n | || `""' | || M | || | || | || | || `""' `""' Example 2: ascii art _ ._ _ , _ ._ (_ ' ( ` )_ .__) ( ( ( ) `) ) _) (__ (_ (_ . _) _) ,__) `~~`\ ' . /`~~`

Aucun Adaptateur Wifi Trouvé Ubuntu Code Example

Example: aucun adaptateur wifi trouvé ubuntu rfkill list #if hard blocked option is yes lspci -v #at the Network controller you will find your wifi adapter name #search on google and download the iwllwifi corresponding at the network controller #exemple for intel i go to https://www.intel.com/content/www/us/en/support/articles/000005511/wireless.html #And download iwlwifi-xxxx.tgz #After unzip and go to the directory with the terminal and copie iwlwifi file in /lib/firmware cp iwlwifi-xxx /lib/firmware #After reboot reboot

Anti Afk Script Roblox Code Example

Example: Anti Hacker script for roblox --Script By Rigby#9052 on Discord. nubcaik = {"Aeghost", "alexalexalex12699", "andrew99301", "AirPaco", "AJ2Cool", "angelhawk", "AEantagonist1337", "Astraois", "Archiver", "aviationdirec", "AquaHero", "awesomeness123", "AnonymousID", "Astraois", "AORxHQ", "administrator109", "ant04", "AlertKoolKid", "awsomehaxor", "AEprotagonist1337", "BUILDERDUDE242", "blueal123", "Blaze3290", "bellyboy99", "buddy2222", "BarSaysEatMyShorts", "Club559", "ControlledHaxor", "cam", "chrisbaseball", "croso1", "coolmichael111", "Chrisman648", "ControlledHappear", "demonreaper", "Depleted", "DerPretender&

"App Rejected" Banner Stays Up On Google Play Console Despite Updates/modifications Submitted

Image
Answer : If your app was rejected and you changed it, then it will need to be re-reviewed. It looks like the re-review is waiting to complete. If you wait it should update. I've resubmitted game again and notice that status still 'App rejected'. New information appears beside your app icon "Processing update". It means that Google Play is processing review your app again and it's expected to have 'App rejected' status at the end of their review. FYI: I'm waiting for reviewing my app 12 hours. So don't worry, it's expected. Keeps you updated. UPDATE 1. So now I have published game fully. It took ~24 hours from " Pending publication " to " Rejected " status It took ~24 hours after fix apk from " Rejected " to " Published " status So it can take more that 2-3 hours as it's wrote in the documentations. Keep eyes on the current status of your publication.

Codeigniter 4 Update Query Code Example

Example 1: update in codeigniter query $data = array( 'title' => $title, 'name' => $name, 'date' => $date ); $this->db->where('id', $id); $this->db->update('mytable', $data); // Produces: // // UPDATE mytable // SET title = '{$title}', name = '{$name}', date = '{$date}' // WHERE id = $id Example 2: codeigniter update query return value public function update_row(){ $update_rows = array( 'name' => 'rincky', 'address' => 'India', 'contact' => '98545785', 'department' => 'IT', ); $this->db->where('id', 1 ); $result = $this->db->update('user', $update_rows); return $result; } Example 3: codeigniter 3 update $data = array( 'title' => $title, 'name' => $name, 'date' => $date

Come Creare Un Bot Discord Con Python Code Example

Example 1: python discord bot moderate chat import discord class MyClient ( discord . Client ) : async def on_ready ( self ) : print ( 'Logged on as' , self . user ) async def on_message ( self , message ) : word_list = [ 'cheat' , 'cheats' , 'hack' , 'hacks' , 'internal' , 'external' , 'ddos' , 'denial of service' ] # don't respond to ourselves if message . author == self . user : return messageContent = message . content if len ( messageContent ) > 0 : for word in word_list : if word in messageContent : await message . delete ( ) await message . channel . send ( 'Do not say that!' ) messageattachments = message . attachments if len ( messageattachments ) > 0 : for at

C Function To Convert Float To Byte Array

Answer : Easiest is to make a union: #include <stdio.h> int main(void) { int ii; union { float a; unsigned char bytes[4]; } thing; thing.a = 1.234; for (ii=0; ii<4; ii++) printf ("byte %d is %02x\n", ii, thing.bytes[ii]); return 0; } Output: byte 0 is b6 byte 1 is f3 byte 2 is 9d byte 3 is 3f Note - there is no guarantee about the byte order… it depends on your machine architecture. To get your function to work, do this: void float2Bytes(byte bytes_temp[4],float float_variable){ union { float a; unsigned char bytes[4]; } thing; thing.a = float_variable; memcpy(bytes_temp, thing.bytes, 4); } Or to really hack it: void float2Bytes(byte bytes_temp[4],float float_variable){ memcpy(bytes_temp, (unsigned char*) (&float_variable), 4); } Note - in either case I make sure to copy the data to the location given as the input parameter. This is crucial, as local variables will not exist after you return (alt

Clipboard Manager For Ubuntu?

Image
Answer : Glipper is a GNOME clipboard app, and Parcelite is a GTK+ clipboard manager. Both should be available to install from the repository. If you're using Unity or GNOME Shell, ClipIt is a fork of Parcellite with AppIndicator support (thanks @pydave). It has a Ubuntu package. Diodon is now in the Ubuntu repositories. Install it with: sudo apt-get install diodon -y There's also a PPA with an updated version: sudo add-apt-repository ppa:diodon-team/stable sudo apt-get update sudo apt-get install diodon unity-scope-diodon CopyQ is a cross-platform clipboard manager written in Qt that comes with many advanced features. CopyQ features: configurable history size, number of tray menu items, multiple clipboards etc.; editable and searchable clipboard history; encryption; synchronization; keyboard shortcuts for opening the clipboard history, show the tray menu and more; commands: you can define actions or commands when a text copied to the clipboard m