Skip to main content

Posts

Android emulator not able to access the internet

Change the DNS address of your network to 8.8.8.8 (Google's DNS) or another of your preference: MacOSX: Open "System Preferences" Click on "Network" Select the network which your computer is connected and click on "Advanced" Select "DNS", Select the "+" button, type "8.8.8.8" (Google's DNS) or if you prefer OpenDNS, "208.67.222.222" Select "Ok" and "Apply" Windows & Linux: https://developers.google.com/speed/public-dns/docs/using After that close the emulator and start it again. URL :  https://stackoverflow.com/questions/42736038/android-emulator-not-able-to-access-the-internet

REACT NATIVE DYNAMIC STAR RATING

  renderRatings ( rating ){     let stars = [];     // Loop 5 times     for (var i = 1; i <= 5; i++) {       // Set the path to filled stars       let path = <Icon name="star" style={{fontSize: 10, color: '#eb9534',marginHorizontal:2}}/>;       // If ratings is lower, set the path to unfilled stars       if (i > rating ) {         path = <Icon name="star" style={{fontSize: 10, color: theme.LIGHT_GREY_COLOR, marginHorizontal:2}}/>;       }       // Push the Image tag in the stars array       stars.push(path);     }     return (       <View style={{flexDirection:"row",marginTop: 5,}}>            { stars }       </View>     )   }     render () {   ...

REACT NATIVE FONT INTEGRATION

REFERENCE URL   Download required fonts https://www.1001freefonts.com/gobold.font  1. Create an assets folder at the root of your project directory  2. Create a fonts folder within the assets folder and place your font files here  3. In your package.json specify where the custom fonts are located   "rnpm": {       "assets": [ "./assets/fonts/" ]  }  4. Next run the command react-native link

SEARCH TABLE DATA JAVA SCRIPT

———————————————————————— CDN https://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.js ———————————————————————— HTML  <input type="text" id="search" placeholder="Search"> ———————————————————————— JS (any column)  $("#search").on("keyup", function() {                 var value = $(this).val();                                  $("table tr").each(function(index) {                     if (index !== 0) {                         $row = $(this);                         var text = $row.text();                                          ...

Node Package Manager

INSTALL NODE REFERENCE SITE $ which node /usr/bin/node $ node --version v10.15.3 $ node > console.log ( 'Node is running' ) ; Node is running > .help .break Sometimes you get stuck, this gets you out .clear Alias for .break .editor Enter editor mode .exit Exit the repl .help Show repl options .load Load JS from a file into the REPL session .save Save all evaluated commands in this REPL session to a file > .exit $ which npm /usr/bin/npm $ npm --version 6.4.1 Updating npm npm install npm@latest -g npm install --global --production npm-windows-upgrade npm-windows-upgrade --npm-version latest Node Packaged Modules $ npm config list ; cli configs user-agent = "npm/6.9.0 node/v10.15.3 linux x64" ; userconfig /home/sitepoint/.npmrc prefix = "/home/sitepoint/.node_modules_global" ; node bin location = /usr/bin/nodejs ; cwd = /home/sitepoint ; HOME = /home/sitepoint ;...