JXSE and Equinox Tutorial, Part 2

JXSE and Equinox Tutorial, Part 2


NOTE: As of January 2015, you can integrate JXTA in OSGI through an update site. The WIKI  At chaupal.org  gives detailed instructions on how to use the new 2.8.x JXSE bundles for OSGI.Many of the features covered here are implemented by default.

Abstract

In the first post of this series, we covered the quickest way to get JXSE 2.7x working in Equinox and, with some considerations, probably other OSGI frameworks as well. The approach aimed to get the same functionality as you would get by using the jar file in a regular JAVA setting, but as I demonstrated, Equinox does have the benefit of allowing multiple JXSE instances to run simultaneously, which is a great benefit when developing JXSE applications.

In this second tutorial, we will cover some ways of improving the functionality by severing the dependency on the 4.2x version of Jetty (which has just released it's 9.0 version!) and we will introduce some basic tools to visualize the properties and functions of JXSE. This will improve the development cycle of JXSE applications even more.

JXSE and Equinox Tutorial, Part 1

Abstract

NOTE: As of January 2015, you can integrate JXTA in OSGI through an update site. The WIKI  At chaupal.org  gives detailed instructions on how to use the new 2.8.x JXSE bundles for OSGI.

This extended series of tutorials will cover the various ways that the JAVA P2P framework JXSE (formerly popularly known as JXTA, and currently the most up-to-date JAVA implementation of the JXTA specifications) can be made to work with Equinox (the engine on which Eclipse runs). It would be tempting to replace Equinox with OSGI, and indeed many of the issues covered here will work fine with alternative OSGI implementations such as Apache Felix or Knopflerfish, but I will concentrate on Equinox because it will allow us to do a few things with JXSE that requires a bit more handwork on other OSGI platforms. Besides this, I have tested the code on Equinox alone, so I don't want to get ahead of myself. This tutorial is work in progress, so the document will be re-edited a few times.

This tutorial not meant to cover the principles behind P2P in general, and JXTA/JXSE in particular. If you are interested in this, I'd recommend the (free) book Practical Jxta II by Jérôme Verstrynge, or to go through the online manuals for JXTA 2.5, JXSE 2.6 and 2.7. This first tutorial is aimed to get you started with JXSE 2.7x in an Equinox environment. The reader is expected to have a good understanding on developing plugins with the Eclipse IDE. If you are new to Eclipse I would advise you to read the excellent articles on developing plugins by Lars Vogel and brush up on OSGI and Equinox while you're at it.

Beginners Guide To Getting Started With NPM

NPM, which stands for Node Package Manager, is a package manager for the JavaScript programming language. It provides a central repository for managing and sharing packages of code that can be used in a variety of projects. With NPM, developers can easily install, update, and manage packages without having to manually download and manage dependencies.

Your Web Designer Toolbox

Unlimited Downloads: 500,000+ Web Templates, Icon Sets, Themes & Design Assets Starting at only $16.50/month!

 

Getting Started with NPM

Before you can start using NPM, you need to have Node.js installed on your computer. You can download the latest version of Node.js from the official website (https://nodejs.org/).

Once you have Node.js installed, you can start using NPM by opening a terminal or command prompt window. You can then use the following command to check if it is installed:

npm -v

Creating a Package.json File

The first step in using NPM is to create a package.json file for your project. This file is used to manage your project’s dependencies, scripts, and metadata. You can create a package.json file by running the following command in your project’s directory:

npm init

Installing Packages

NPM makes it easy to install packages and add them to your project. You can install packages using the following command:

npm install <package_name>

For example, to install the lodash package, you would run the following command:

npm install lodash

The installed packages will be added to the dependencies section in your package.json file.

Using Packages in Your Project

Once you have installed a package, you can use it in your project by requiring it in your code. For example, to use the lodash package, you would add the following code to your project:

var _ = require(“lodash”);

Updating Packages

NPM makes it easy to keep your packages up-to-date. You can update all packages in your project by running the following command:

npm update

Or, you can update a specific package by running the following command:

npm update <package_name>

Uninstalling Packages

You can uninstall a package from your project by running the following command:

npm uninstall <package_name>

Conclusion

NPM is a powerful tool for managing packages and dependencies in your JavaScript projects. With its simple commands and centralized repository, this tool makes it easy for developers to install, update, and manage packages in their projects. By following the steps outlined in this article, you can get started using NPM today and start taking advantage of its many benefits.

Further reading

Google Cloud Messaging with Payload

google cloud messaging (or gcm) sends two types of messages:

  1. collapsible, “send-to-sync” messages, where  new messages replace older ones  in the sending queue. (i.e. the older messages are “collapsed”).
  2. non-collapsible messages with payload, where  every single message is delivere  d.

each payload in non-collapsible messages is a unique content that has to be delivered and can’t be just replaced with a more recent message in the server sending queue. on the other hand, a  collapsible message can be a simple  ping  from the server to ask its mobile clients to sync their data.

Designing Search (part 3): Keeping on track


In the previous post we looked at techniques to help us create and articulate more effective queries. From auto-complete for lookup tasks to auto-suggest for exploratory search, these simple techniques can often make the difference between success and failure.

But occasionally things do go wrong. Sometimes our information journey is more complex than we’d anticipated, and we find ourselves straying off the ideal course. Worse still, in our determination to pursue our original goal, we may overlook other, more productive directions, leaving us endlessly finessing a flawed strategy. Sometimes we are in too deep to turn around and start again.

Android Cloud Apps with Azure

a  recent study by gartner  predicts a very significant increase in cloud usage by consumers in a few years, due in great part to the ever growing use of smartphone cameras by the average household. in this context, it could be useful to have a smartphone application that is able to upload / download digital content from a cloud provider.

in this article, we will construct a basic android prototype that will allow us to plug in the  windows azure  cloud provider, and use the  windows azure toolkit for android (  available at  github  ) to do all of the  basic cloud operations  :  upload  content to cloud storage,  browse  the storage,  download  or  delete  files in cloud storage. once those operations are implemented, we will see how to enable our android application to receive server  push notifications  .

Building a Data Warehouse, Part 5: Application Development Options

see also:

in part i we looked at the advantages of building a data warehouse independent of cubes/a bi system and in part ii we looked at how to architect a data warehouse’s table schema. in part iii, we looked at where to put the data warehouse tables. in part iv, we are going to look at how to populate those tables and keep them in sync with your oltp system. today, our last part in this series, we will take a quick look at the benefits of building the data warehouse before we need it for cubes and bi by exploring our reporting and other options.

Guide to Install NPM and Node JS on Mac and Windows

With exponential growth and demand for full-stack development, JavaScript has become a reliable technology for developing a full-fledged business application.

Several backend and frontend frameworks and libraries are available, which are based on JavaScript and are highly compatible with each other. Node JS is a technology that professionals appraised for fabricating a scalable server-side for robust and responsive applications.

How to Change the Category Base Prefix in WordPress

Do you want to change the category base prefix in WordPress?

By default, WordPress automatically adds /category/ as a prefix to URLs for all category pages. However, you can easily change the category base prefix or completely remove it.

In this article, we will show you how to change the category base prefix in WordPress.

How to change the category base prefix in WordPress

What is Category Base Prefix? Should You Change It?

Each category on your WordPress site gets its own page and RSS feed. You can view all posts filed under a category by visiting that category archive page.

By default, WordPress adds ‘category’ as a base prefix to URLs for category pages. This helps differentiate pages and posts from category and tag archives.

For example, if you have a category called ‘News’ then its URL will look like this:

http://example.com/category/news/

Similarly, WordPress also adds tag prefixes to URLs for tag archives.

http://example.com/tag/iphone/

This SEO-friendly URL structure helps users and search engines understand what kind of page they are visiting.

Most websites don’t need to change the base prefix at all. However, if you are creating a niche site where you would like to use a different word or phrase for your categories, then you can change the category base prefix to reflect that.

Changing Category Base Prefix in WordPress

Changing the category base prefix is quite simple in WordPress.

You need to visit the Settings » Permalinks page from your WordPress dashboard and scroll down to the ‘Optional’ section.

Add a new category base prefix

In the ‘Category base’ field, you can enter the prefix you would like to use next to the category base option. You can also change the tag base prefix if you want.

For example, you can add ‘topics’ as the new prefix. In this case, your category URLs will look like this:

http://example.com/topics/news/

Don’t forget to click on the ‘Save Changes’ button to store your settings.

Removing Category Base Prefix from URLs

Many of our users have asked us about removing the category base prefix from WordPress URLs altogether. This will change your category URLs to look like this:

http://example.com/news/

This is not a good idea, and we recommend that you do not remove category base prefix.

The category base prefix helps both users and search engines distinguish between posts/pages and categories. Removing the prefix makes your URLs ambiguous, which is not good for user experience or WordPress SEO.

You may also run into technical issues with various WordPress plugins. For example, if you have a category and a page with the same name or when you are using %postname% as your URL structure for single posts, then your site will experience an infinite redirect loop causing the pages to never load.

However, if you still want to do this, then you can use the All in One SEO (AIOSEO) plugin.

All In One SEO - AIOSEO

It is the best SEO plugin for WordPress and makes it super easy to optimize your website for search engines. Plus, it gives you an option to strip the category base prefix with a click of a button.

For this tutorial, we’ll use the AIOSEO Pro license because it includes the feature to remove category base and other powerful options like the redirection manager and link assistant. There’s also a free version of AIOSEO that you can use.

First, you’ll need to install and activate the AIOSEO plugin. For more details, please see our guide on how to install a WordPress plugin.

Upon activation, you’ll see the AIOSEO setup wizard. Simply click the ‘Let’s Get Started’ button. You can see our guide on how to setup All in One SEO for WordPress for more information.

All in One SEO setup

Next, you can head over to All in One SEO Search » Appearance from your WordPress admin panel and click on the ‘Taxonomies’ tab.

After that, go to the Categories section and switch to the ‘Advanced’ tab. From here, simply click the toggle to Yes for ‘Remove Category Base Prefix’ option.

Enable the remove category base prefix button

Don’t forget to click the ‘Save Changes’ button when you’re done.

Setting Up Redirects After Changing Category Base Prefix

If you are changing or removing the category base prefix on a new WordPress website, then you don’t need to do anything. However, if you are doing this on an existing website, then users visiting the old category page will see a 404 error.

To fix this, you will need to set up a redirect to make sure both search engines and regular visitors are properly redirected to the correct category page on your site.

The easiest way of setting up redirection in WordPress is by using the All in One SEO (AIOSEO) plugin.

To start, you can go to All in One SEO » Redirects from the WordPress admin panel and then click the ‘Activate Redirects’ button.

Activate redirects

Once it’s active, you can go to the ‘Redirects’ tab to setup redirection.

Simply enter the URL you want to redirect under the ‘Source URL’ field and the new location for the link under the ‘Target URL’ field.

As for the Redirct Type, you can select ‘301 Moved Permanently’ from the dropdown menu. This will permanently move your old category pages to the new destination.

Set up redirection in AIOSEO

Don’t forget to click the ‘Add Redirect’ button when you’re done.

For more details, please see our beginners guide to creating 301 redirects in WordPress.

Now all your users and search engines will be redirected to the correct URLs using your new category prefix.

We hope this article helped you learn how to change the category base prefix in WordPress. You may also want to see our list of most wanted WordPress tips, tricks, and hacks and how to start an online store.

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 How to Change the Category Base Prefix in WordPress first appeared on WPBeginner.

Easily Format Markdown Files in VS Code

Every respectable software project needs a README. This file provides crucial information about what the project is, how to work with it, and other relevant information for developers. README files are written in markdown, a special markup syntax. The syntax for markdown is simple enough, but it can be a pain to manually type out, and it’s easy to make simple mistakes and typos.

Wouldn’t you like to just use the Cmd+B keyboard shortcut to bold some text instead of typing ** around your text? Or what about creating a nicely formatted table in your README, especially when editing an existing table? Wouldn’t it be nice if the table formatting and column width adjustments were taken care of for us? Markdown is wonderful, but it’s not exactly as easy as working with a Google doc when applying formatting.

Microsoft Outlook Integration to Mulesoft With Oauth 2.0

The Microsoft Outlook Connector enables users to create daemon applications to connect directly with the Microsoft outlook, permitting users to create applications that can read or write to Outlook accounts using modern authentication without any manual intervention. 

The lack of documentation to configure OAuth authentication for the Microsoft Outlook connector makes it difficult for developers to use the connector with this security configuration. This article will guide developers to perform seamless integration with Microsoft Outlook and Mulesoft.

Introduction to Serverless With AWS Lambda and Bitrise API: Part 1

In the early days of software development, anyone seeking to develop a web, mobile, or backend application had to own the hardware required to run a server, which is an expensive process.

Then, when cloud computing came, it became possible to lease server space or a number of servers remotely. The developers and companies who rent these fixed units of server space generally overbuy to ensure that a spike in traffic or activity won't exceed their monthly limits and break their applications. Because of this, a lot of the server space that gets paid for can be wasted.