How to Integrate Remote Configuration of AppGallery Connect in React Native

If you want to experience the remote configuration function, see the GitHub demo.

Integration Procedure

  1. Install the React Native dependency.
    1. npm install -g yarn
  2. Create a project and enable Remote Configuration.
    • a) Create an Android app in AppGallery, add it to a project, enable Remote Configuration, and add a parameter.
    • b) Run the following command to create a React Native project. In this example, we named the project RemoteConfig.
      • npx react-native init RemoteConfig 
    • c) Add the configuration file to your React Native project. Add the agconnect-services.json file to the android/app directory of the React Native project.
    • d) Configure the Maven repository address and AppGallery Connect plug-in address.
      1. Open the build.gradle file in the androiddirectory of your React Native project.
        • Go to allprojects > repositories and configure the Maven repository address.
        • Go to buildscript > repositories and configure the Maven repository address.
        • Go to buildscript > dependencies and configure the AppGallery Connect plug-in address.
      2. Add build dependencies and the AppGallery Connect plug-in address. Open the build.gradle file in the android/app directory of the React Native project and add the plug-in address.
  3. Install the plug-in.
    • Add the plug-in to dependencies under the package.json file in your project.
    • Call npm install or yarn installto install the plug-in.
      • npm install
  4. Use the Remote Configuration service.
    • a) Apply the local settings. You can set the local settings to Map format and call the applyDefault API to apply them.
    • b) Fetch the cloud data or the parameter values fetched last time. Call the fetch API to fetch parameter values from the cloud with an interval. Similarly, call applyLastFetch to fetch data that is fetched from the cloud last time.
    • c) Merge the local and cloud data. Call getMergedAll to merge the local and cloud data.
    • d) Clear the data. Call the clearAll API to clear the cached data that is fetched earlier.
    • e) Fetch the value of a key from the cloud. Call getValue to fetch related data from the cloud.
    • f) Package the APK file. Run the yarn android command under the root directory of your project.
    • g) Result. You can obtain all required parameter values and on-cloud parameter values.

For more:

Open Source: What, Why, How?

What comes to your mind when you hear the words open source?

I read about it and tried to understand the subject more closely. My research on the topic led me to many articles that described open source as source code that is made available to the public to view, use, modify, and distribute under a license. 'License' here is the key word; insight on how licenses work will follow soon.

Lazy Load Routes in Vue with webpack Dynamic Comments

The way routing works in JavaScript is usually that you specify which relative URL pattern you want for which component to render. So for /about you want the <About /> component to render. Let’s take a look at how to do this in Vue/Vue Router with lazy loading, and do it as cleanly as possible. I use this little tip all the time in my own work.

A repo that includes everything covered in this post is available on GitHub.

You’ve probably seen Vue routes (URLs) like this:

import Vue from 'vue'
import VueRouter from 'vue-router'

import Home from '../views/Home.vue'
import About from '../views/About.vue'
import Login from '../views/Login.vue'

Vue.use(VueRouter)

const routes = [
  { path: '/', name: 'Home', component: Home },
  { path: '/about', name: 'About', component: About },
  { path: '/login', name: 'Login', component: Login }
]

const router = new VueRouter({
  routes
})

export default router

That will load the <Home /> component at the / route, the <About /> component at the /about route, and the <Login /> component at the /login route.

That doesn’t do a very good job of code splitting though, since all three of those components will be bundled together rather than loaded dynamically as needed.

This is a terminal screenshot with a dark purple background with text in white green and blue. The content shows the final build after compiling.

Here’s another way to do the same, only with code splitting with dynamic import statements and webpack chunk names:

const routes = [
  {
    path: '/',
    name: 'Home',
    component: () => import(/* webpackChunkName: "Home" */ '../views/Home.vue')
  },
  {
    path: '/about',
    name: 'About',
    component: () => import(/* webpackChunkName: "About" */ '../views/About.vue')
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import(/* webpackChunkName: "Login" */ '../views/Login.vue')
  }
]

This is perfectly fine and doesn’t have any major downsides, other than being a bit verbose and repetitive. Since we’re awesome developers, let’s do a bit of abstraction to help, using an array that we’ll .map over.

const routeOptions = [
  { path: '/', name: 'Home' },
  { path: '/about', name: 'About' },
  { path: '/login', name: 'Login' }
]

const routes = routeOptions.map(route => {
  return {
    ...route,
    component: () => import(`@/views/${route.name}.vue`)
  }
})

const router = new VueRouter({
  routes
})

Now we’ve reduced the use of the component key by using the route name as param in the import function.

But what happens if we want to set the chunk name?

As far as I know, you can’t have dynamic comments in JavaScript without some kind of build step. So, we are sacrificing comments (webpackChunkName) in favor of having to write less code in this case. It’s entirely up to you which you prefer.

Just kidding, let’s fix it.

As of webpack 2.6.0 , the placeholders [index] and [request] are supported, meaning we can set the name of the generated chunk like this:

// ...

const routeOptions = [
  { path: '/', name: 'Home' },
  { path: '/about', name: 'About' },
  { path: '/login', name: 'Login' }
]

const routes = routeOptions.map(route => {
  return {
    ...route,
    component: () => import(/* webpackChunkName: "[request]" */ `../views/${route.name}.vue`)
  }
})

const router = new VueRouter({
  routes
})

Nice! Now we have all the power, plus dynamically loaded routes with named chunks. And it works with Vue 2 and Vue 3. You can check it out by running npm run build in the terminal:

This is the same terminal screenshot as before, but with three of the JavaScript built files highlighted with the words "Named Chunks" annotated beside them.
See that? Now the components are chunked out… and the build did all the naming for us!

Buuuuut, we can still take this one step further by grouping the lazy loaded routes into named chunks rather than individual components. For example, we can create groups that group our most important components together and the rest in another “not so important” group. We merely update the webpack chunk name in place of the [request] placeholder we used earlier:

const routes = [
  {
    path: "/",
    name: "Home",
    component: () =>
      import(/* webpackChunkName: "VeryImportantThings" */ "../views/Home.vue")
  },
  {
    path: "/about",
    name: "About",
    component: () =>
      import(/* webpackChunkName: "VeryImportantThings" */ "../views/About.vue")
  },
  {
    path: "/login",
    name: "Login",
    component: () =>
      import(/* webpackChunkName: "NotSoImportant" */ "../views/Login.vue")
  },
  {
    path: "/contact",
    name: "Contact",
    component: () =>
      import(/* webpackChunkName: "NotSoImportant" */ "../views/Contact.vue")
  }
];

Now our four components are groups into two separate chunks.

The same terminal with different compiled JavaScript files.

There you have it! A technique for lazy loading routes in Vue, plus some ideas for how to name and group them together at build.


The post Lazy Load Routes in Vue with webpack Dynamic Comments appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.

Oracle EBS to Oracle Cloud Migration Testing Types

Testing is crucial during the migration of legacy applications to the cloud in order to avoid any data loss or downtime. So, analyzing and determining which testing strategy to employ while performing a migration is critical. Enterprises must invest quality time and effort to establish a proper migration testing plan. A well-defined migration testing strategy is essential to mitigating the risks involved and delivering a successful migration. This is comprised of three phases: Pre-Migration, In-Migration, and Post-Migration. In this post, we’ll break down what goes into the In-Migration and Post-Migration phases.

Let’s start with the testing types involved in the In-Migration testing phase:

Collective #647



Collective 647 Item Image

Our Sponsor

Blockchain domains are owned, not rented

Blockchain domains are stored by their owners in their wallet like a cryptocurrency, no third party can take them away. Pay once and you own the domain for life, no renewal fees. Get your .crypto or .zil domain now.

Check it out













Collective 647 Item Image

Iconduck

Iconduck lists over 100,000 free open source icons, illustrations and graphics from around the web. They can be used for personal and commercial projects.

Check it out



Collective 647 Item Image

ReacType

If you didn’t know about it yet: ReacType is an open-source application that assists developers in prototyping React applications via a user-friendly drag-and-drop interface.

Check it out













The post Collective #647 appeared first on Codrops.

Salesforce Integration Opportunities

What is Salesforce Integration?

In my prior post, I focused on what it means to be a Salesforce Business App Developer, and looked at some key native application development capabilities of the Salesforce Lightning Platform. In this post, I'll look at opportunities for becoming a Salesforce Integration Developer—and how the platform provides a standards-based open architecture to promote and allow integrations across an enterprise system landscape to one or more systems and applications, both on-prem and cloud-based.

Why Do Salesforce Customers Need Integration Developers?

While a Data or Business Analyst can typically define the requirements around any particular integration, the implementation of any sophisticated integration usually needs a resource with a developer mindset and broad technical experience. Opportunities for Integration Developers on the platform not only include ongoing integration projects, but also an almost never-ending need for legacy system data and process migrations.

The State of JVM Desktop Frameworks: TornadoFX

The two previous posts of this series were respectively dedicated to Swing and SWT. This post is dedicated to Tornado FX, which itself is built on JavaFX.

  1. The State of JVM Desktop Frameworks: Introduction
  2. The State of JVM Desktop Frameworks: Swing
  3. The State of JVM Desktop Frameworks: SWT

JavaFX

JavaFX started as a scripting language named JavaFX script. Sun Microsystems intended to use it to compete with Adobe Flex (now Apache Flex) and Microsoft Silverlight to a lesser extent.

Convert Python to csharp

I'm new to c# and would like to convert this code from Python. Any help or orientation would be great. Thanks D.

api_url_base = 'https://oneapi.zemanta.com/o/token/'
api_token = b64encode(b"2JreK10kPxO3P0wHPkqjfDSw8yKdHzSSyIQNavWH:JLYcjOjoP9LzTO6AI7N0FprW7Uuy8pZVFxk6eRIfDgTSHNaZGAHOMbickdzvtv41PXVpJZ9O2y5DHPpJs4rTchpv9MIursLi4S1Om4qINLanazpygR3Zr8rKTHdsZm8B").decode("ascii")
headers = {'Content-Type': 'application/x-www-form-urlencoded',
       'Authorization': 'Basic {0}'.format(api_token)}
payload = {'grant_type': 'client_credentials'}
api_url = '{0}'.format(api_url_base)
r = requests.post(api_url, headers=headers, data=payload)
ret = json.loads(r.content)
return ret['access_token']

Algolia

Algolia is for search. Literally any website can take advantage of Algolia-powered search. You put JSON data (“records”) in, and then you can search them at lightning speed. The magic of Algolia is that they help you with both of those things: getting data in and getting search results out.

As far as getting data in, there are all sorts of ways. The most likely situation is that you already have data somewhere and you just need to give it to Algolia. They’ve got great docs on that. You basically write an integration that updates Algolia as you update your own data. There are so many things to help with this though. Got a WordPress site? They’ve got a PHP API client and people have built plugins around it.

\

Got a Rails site? They have integrations for you. What about a Jamstack site? No problem, they’ve got a Netlify build plugin. So, for example, your Jekyll site can have great search.

One way, and I’ve used this myself plenty of times, is literally entering records manually. While manually typing in records isn’t particularly scalable, I like that it’s possible.

So that’s all the “getting data in” part. Now the fun part: building a search UI experience. Great news here too: there is lots of help to make this awesome.

The core of it is InstantSearch.js, which Algolia provides directly. That native version also has versions in React, Vue, and Angular (you could make it work with anything). Wanna see it work super quickly? Try their Create InstantSearchApp flow, which will spin up a search UI super quickly for you.

While you don’t have to use any particular library, I find them very easy to use, very flexible configuration-wise, and no problem to style. Wanna see? CDNjs has everything on it in an Algolia index, so here’s a Pen that connects to that and provides a search UI:

You can see in the code how I’m controlling the number of results, the template and styles the results are shown in, and what happens when a search result is selected. That’s powerful stuff.

This is just the surface of Algolia though. Algolia is a very mature platform with all kinds of bells and whistles you can take advantage of. You can tweak algorithms, you can dig into analytics, you can take advantage of AI, you can use it on native mobile apps… and all with real customer support along the way.


The post Algolia appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.

Ajax request success but result shows empty value

I am new for PHP. I tried to display text box value based on drop down selection. it seems code working. no error display here. But when i change the drop down, text box value shows empty. Even print the data it will display only null.

HTML:-

<select name="cat" id="cat">
<?php  
    $query1 = "select * from customer_master";
    $res1 = mysqli_query($con, $query1);   

  //while ($row = $res->fetch_assoc()) 
    while($row1 = mysqli_fetch_array($res1)):
?>
        <option value="<?php echo $row1[0];?>"><?php echo $row1[2];?></option>
<?php 
    endwhile;
?>
</select>

<input placeholder="Phone Number" name="phoneNumber" id="pnum"  type="text">        

Script:-

<script>
$('#cat').click(function(){
    var package = $('#cat').val();
    $.ajax({
        url: 'ajax1.php',
        type:'POST',
        data: {package: $('#cat').val()},

        success: function(data) {
            $('#pnum').val(data);
            alert(data);     
        }
    });
 });
</script> 

PHP:-

<?php
include('config.php');

if (isset($_POST['package'])) {

    $query = "select * from `customer_master` where Name=" . $_POST['package'];
    $result1 = mysqli_query($db, $query);
    if (mysqli_num_rows($result1) > 0) {
        while ($res = mysqli_fetch_array($result1)) {
            echo $res['Start_Ref'];
        }   
    }
    die();
}
?>

Beginner’s Guide: How to Publish a Website in 2021 (Step by Step)

Do you want to publish a website but are worried about technical stuff?

It is a misconception that you need to be a web designer or developer to code a website. There are many tools that make it super easy to put your website online without writing any code.

In this article, we’ll show you how to easily publish a website with step by step instructions.

A beginners guide on publishing a website online

Using a Website Builder to Publish a Website

Most beginners feel that they need to learn programming and web design skills to publish their websites.

It was true in the early days of the internet. At that time, businesses hired web developers or they had to learn coding skills to publish a website on their own.

However, things have changed over the years and technical skills are no longer a hurdle in publishing your content on the web.

These days, beginners, businesses, and even developers use website builders like WordPress to easily publish websites.

More than 69% of all websites on the internet are built using a website builder or CMS platform. This means, even developers don’t need to write code from scratch to publish a website.

These platforms allow anyone in the world to easily publish a website and put it on the internet. We’ll show you the easiest and most popular way to publish your website (no coding required).

1. Publish a Website with WordPress

WordPress is the most popular website builder on the market with the slogan ‘Democratize Publishing’. It is a free (as in freedom) and open-source software that anyone can use to build any type of website.

WordPress mission is to democratize publishing

Over 39% of all websites on the internet are powered by WordPress.

To get started with WordPress, you’ll need a domain name (e.g. wpbeginner.com) and web hosting (this is where your website files are stored).

We recommend using Bluehost. They’re offering WPBeginner users a free domain name and a generous 60% discount on hosting ($2.75/month).

If you want to try an alternative, then we recommend SiteGround or any of these top WordPress hosting providers.

Next, you’ll need to install WordPress. We have a step by step WordPress installation tutorial that’ll walk you through the installation process.

Once you have installed WordPress, you’ll see the WordPress dashboard which looks like this.

WordPress dashboard

Next, you need to install and activate the SeedProd plugin. For more details, see our step by step guide on how to install a WordPress plugin.

SeedProd is the best WordPress page builder plugin. It allows you to quickly publish professionally designed web pages for your website using a simple drag and drop user interface.

SeedProd user interface

It is super easy to use and allows you to quickly publish your website with professional designs that are already optimized for sales, conversions, and SEO.

Alternatives to SeedProd

There are several popular page builder tools for WordPress. You can use any of the following to publish your website without any coding or design skills.

  • Beaver Builder – A drag and drop WordPress website builder with advanced theme customizations
  • Divi Builder – Another beginner friendly WordPress theme builder with tons of ready made templates
  • Elementor – A powerful page builder tool for WordPress suitable for both beginners and developers

We believe WordPress is the most beginner-friendly platform to publish your website.

It is widely used and trusted by millions of beginners as well as big name brands like Microsoft, Facebook, and even US government uses WordPress to power the The White House website.

The best part about WordPress is that there are over 58,000 WordPress plugins that let you add just about any functionality to your website such as online store, contact form, SEO features, and more.

You can think of plugins like addons or apps for your iPhone. They make it easy for even first time users to configure and publish a website that search engines love and is easy to use for your customers.

2. Publish a Website with Contact Contact Website Builder

Constant Contact Website builder is an AI-powered website publishing tool suitable for beginners and small businesses.

Constant Contact Website Builder

If you don’t want to go through the trouble of purchasing hosting, domain name, and installing a web application software, then Constant Contact Website Builder would be the right tool for you.

It is an AI-powered website publishing tool that allows you to simply follow a step by step wizard. You’ll answer some questions and it will generate ideal layouts for you complete with the dummy content.

You can customize it in any way you want using a simple drag and drop interface. Once you’re done, simply click the Publish button.

Constant Contact customizer

The best part about using Constant Contact Website Builder is that you don’t need to worry about hosting or updates. You also get reliable support via chat, phone, and email.

If you simply want to publish a small business website or a quick online store, then it gets the job done with very little effort.

Alternatives to Constant Contact Website Builder

There are plenty of other fully-hosted, drag and drop website publishing platforms similar to Constant Contact. Following are a few hosted website builders picked by our expert team.

  • Wix – a fast growing website builder platform that has all the features you’d need to build a website.
  • Gator by HostGator – Fully hosted website builder by the folks behind HostGator. It comes with an intuitive drag and drop publisher with beautiful templates.
  • Domain.com Website Builder – A fully hosted website builder with beautiful templates to quickly publish a website.
  • GoDaddy – a large domain name registrar that also offer website builder tools.

All of these platforms are easy to use and allow you to publish your website without writing code.

3. Manually Publish Your Website

For those of you are who are eager to learn and willing to dive into basic HTML, CSS, and JavaScript, then this is the route you can take.

Note: If you don’t have any previous experience with these programming languages, then it may take you a while to get enough basic grip to code a reasonably presentable website and publish it online.

There are several online course platforms for students offering courses on web development for beginners. We recommend checking out the one offered by the CodeAcademy.

You can make a website on your computer, but you will still need a domain name (web address for your site) and website hosting service to publish it online.

All websites on the internet need hosting. It provides you storage on an online web server where you can upload and store your website files.

You can sign up with Bluehost which is one of the biggest hosting companies in the world. They are offering WPBeginner users a generous discount + free domain name + free SSL certificate.

Once you have signed up for a hosting account, you can upload the website files from your computer to your website by using an FTP client.

Alternatively, if your web hosting provider has cPanel, then you can use their built-in file manager for uploading your website in the public_html folder. This saves you from learning how to use the FTP server.

We hope this article helped you learn how to easily publish a website. You may also want to see our guide on how to create a professional business email address, and how to get a virtual business phone number for your small business.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post Beginner’s Guide: How to Publish a Website in 2021 (Step by Step) appeared first on WPBeginner.

Wix Tutorial: A Step-by-Step Guide for Beginners on How to Use Wix

While there are dozens of great tools for building a website, Wix offers the fastest route to a complete and fully-functioning site. With AI-powered tools like the Wix ADI (Artificial Design Intelligence), you can enjoy a hands-off website building experience without sacrificing your personal touch. In this Wix tutorial, we will guide you through building a website from start to finish.

Reinstall Windows 10

Dell Inspiron is stuck in Network update configuration boot loop will not go into to set up or bios. Hard drive has been erased need to reinstall Windows 10 how do I get it to stop Network booting?

Assembly language program

Write a program that asks a user for a character and then displays a message whether the
parity of the character is odd or even.
For calculating the parity, instead of testing the parity flag directly, use a loop that shifts each
bit into the carry flag and accumulates a count of the number of times the carry flag was set.
For example: If the user entered an A, its ASCII value is 41h and thus, the program should
display parity even, i.e. it contain an even number of ones.

Best Privacy-Focused Alternatives to Google Analytics

This post is originally published on Designmodo: Best Privacy-Focused Alternatives to Google Analytics

Best Privacy-Focused Alternatives to Google Analytics

Google has a treasure chest of helpful tools. From Chrome Dev Tools to G Suite to Google Meet, there is something for everyone. Among these professional utilities, Google Analytics occupies the lead position. Created to track website activity, Google Analytics …

For more information please contact Designmodo

Show username in chat

Hi guys, im making a chat app in C#
I can get it to show time and text but the code im using shows PC username not login username of app
Could someone please help me with the correct bit to put it
Thanks in Advance

            if (textBoxSend.Text != "")
            {
                richTextBoxChat.Text += DateTime.Now.ToString("hh:mm:ss:tt") + " :  " + System.Environment.GetEnvironmentVariable("username") + textBoxSend.Text + Environment.NewLine;
                textBoxSend.Text = "";

            }

Azure Service Bus Dead-letter Queues

What is the Azure Service Bus Queue?

Queues are a very common piece of infrastructure. It offers First In, First Out (FIFO) message delivery to one or more competing consumers. As the queue grows the last item added to the queue typically must wait longer to be processed. Just like someone waiting in line to order food, the first one in line gets to order first. Microsoft Azure Service Bus (ASB) is Microsoft’s premier enterprise-level messaging technology that uses this principle of FIFO.

Types of Queues:

  • Primary queue called main queue or active queue.
  • Secondary sub-queue called a dead-letter queue (DLQ). 

Main Queue

ASB queues always have two parties involved-a producer and a consumer. The producer pushes the messages into the queue, while the consumer periodically polls for messages and consumes them. The main queue holds the messages until it is consumed or moved to the dead-letter queue.