An Excel Macro Do Until Question – until specific info in a specific cell

Hi, first, let me say this seems the best site I have come across for some great education and discussions... much appreciated! I am now to VBA and have a macro that I want to run until I get a particular message "#VALUE!" in a particular cell "B2". So far saw lots of Do Until loop with various options, have played with different ideas, but nothing working. My current code goes through 194 loop because that is the extent of data I have on another worksheet, but want to trigger the do until to stop not at a certain amount of loops but when last row, which generates the #VALUE! so that should be the cue to stop. Any input great appreciated. Thanks, Paul

Here is my current code:

Sub RunShoes1()
'
' RunShoes1 Macro
'
' Keyboard Shortcut: Ctrl+r
'
Dim i As Integer
i = 0
Do Until i = 196
i = i + 1
Range("A4").Select
ActiveCell.FormulaR1C1 = i + 1
Range("A2:J2").Select
Selection.Copy
Range("A13").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
Application.CutCopyMode = False
Selection.EntireRow.Insert , CopyOrigin:=xlFormatFromLeftOrAbove
Loop

End Sub

AMP Plugin 2.0 Adds Onboarding Wizard and Expanded Reader Mode

The official AMP plugin for WordPress recently crossed the 2.0 milestone, a major release that closed 141 issues and merged 174 pull requests. The release was originally planned for v1.6 but due to the number of major changes the team decided to bump it to 2.0.

One of the most significant updates in this release is the expansion of the Reader Mode. The plugin has a lot of AMP-specific terminology associated with it and unless you are working with it every day, it’s easy to get confused by the different modes. Standard Mode is an AMP-first site where all URLs are presented as AMP pages. Transitional Mode uses one theme but canonical non-AMP URLs may offer a separate AMP version. Reader Mode uses two themes with the active one for canonical non-AMP URLs and a separate “Reader” theme for AMP URLs.

Version 2.0 introduces a new AMP Customizer for customizing the Reader theme. It loads with a mobile view and does not support widgets or homepage settings, as they are not applicable for the AMP version. The AMP Customizer makes it easy for site owners to make tweaks and changes that will only apply to the AMP version of URLs.

The Reader Mode is especially useful for sites that are not using AMP-compatible themes. Google engineer Weston Ruter described the expanded Reader Mode as follows:

Reader mode now allows for any AMP-compatible theme to be used to serve AMP pages, rather than just the legacy post templates. This allows for long-requested features including nav menus, logos, commenting, and template design variations. It also makes it possible to serve all URLs of a Reader-mode site in AMP, as opposed to just singular posts. 

One major usability update in version 2.0 is the addition of an onboarding wizard and revamped Settings screen that guides users through the different templating modes when configuring the plugin. Users who are routed to Reader Mode will be presented with a selection of themes for serving AMP pages and the wizard will handle installation. The final step of the configuration process allows users to review their choices in a preview screen.

Given the complexity of the AMP plugin and its many configuration options, the onboarding wizard was a critical addition if the plugin is going to grow past 500,000 active installs to reach a larger number of non-technical users.

Another notable update in this release includes a feature called “Plugin Suppression” that allows administrators to turn certain plugins off for AMP pages if they are causing validation errors. It also introduces mobile redirection for Transitional/Reader mode sites where AMP is intended to be the mobile version.

AMP is still far from a plug-and-play experience for WordPress users but the plugin does a lot of the heavy lifting and is evolving towards becoming more approachable for non-technical users. To that end, the AMP plugin team just announced a new video series that will focus on success with WordPress as a content creator, as well as performance and usability.

“We are crafting it with an audience in mind that covers both technical and non-technical users,” Google Developer Advocate Alberto Medina said. “The 2.0 version of the plugin makes an emphasis on providing options for users that are non technical but still want to take advantage of AMP to bring great page experiences to their users.”

The series will launch next week on Google’s AMP YouTube channel. Medina is also working on another series geared towards content creators that will cover topics like Web Stories in the first episodes.

3 Ways to Select Features Using Machine Learning Algorithms in Python

Artificial intelligence which gives machines the ability to think and behave like humans are gaining traction since the last decade. These features of artificial intelligence are only there because of its ability to predict certain things accurately, these predictions are based upon one certain technology which we know as machine learning (ML). Machine learning as the name suggests is the computer’s ability to learn new things and improve its functionality over time. The main focus of machine learning is on the development of computer programs that are capable of accessing data and using it to learn for themselves. 

To implement machine learning algorithms, two programming languages, R and Python for machine learning are normally used. Generally, selecting features for training data on machine learning in python is a very complex and technical process. But here we will go over some basic techniques and details regarding what is machine learning and how it works. So, let us start by going into detail regarding what ML is, what feature selection is and how can one select feature using python.

Bulk vs Individual Compression

I'd like to share something very brief and very obvious - that compression works better with large amounts of data. That is, if you have to compress 100 sentences you'd better compress them in bulk rather than once sentence at a time. Let me illustrate that:

Java
 




x
13


 
1
public static void main(String[] args) throws Exception {
2
    List<String> sentences = new ArrayList<>();
3
    for (int i = 0; i < 100; i ++) {
4
        StringBuilder sentence = new StringBuilder();
5
        for (int j = 0; j < 100; j ++) { 
6
          sentence.append(RandomStringUtils.randomAlphabetic(10)).append(" "); 
7
        } 
8
        sentences.add(sentence.toString()); 
9
    } 
10
    byte[] compressed = compress(StringUtils.join(sentences, ". ")); 
11
    System.out.println(compressed.length); 
12
    System.out.println(sentences.stream().collect(Collectors.summingInt(sentence -> compress(sentence).length)));
13
}


The compress method is using commons-compress to easily generate results for multiple compression algorithms:

Start a Recipe Blog With the Recipe Block WordPress Plugin

“Organize your quarantine-inspired baking blog with a ‘Recipe’ block!” read the opening description of Kelly Choyce-Dwan’s new plugin, Recipe Block. That was enough to pique my interest. I love food. I love baking — mostly pizza and bread. Food-related plugins and themes almost inspire me to spin up a recipe blog of my own. Almost.

At least with plugins like this, I can dream of building that site. Or, I can vicariously live through those who have the inclination, passion, and drive to post recipes regularly.

For far too long, building a recipe blog has required specialized themes or overly complex plugins. I have been eagerly awaiting a simple recipe block because I have known since Day 1 of Gutenberg’s launch that it would be well-suited to such a feature. Choyce-Dwan’s Recipe Block plugin makes the complex simple and brings recipe-blogging to any WordPress user.

Using the Recipe Block

Within a couple of minutes of installing and activating the plugin, I had a quick pizza recipe set up and published on my test install. It worked well with the several themes I tested it against. I did make a couple of spacing adjustments via CSS for my personal theme, but that is not uncommon for plugins that have front-end output.

Technically, the plugin adds four blocks:

  • Recipe: Primary block that houses other blocks.
  • Information: Sub-block for adding servings, time, and difficulty level.
  • Ingredients: Sub-block for listing ingredients.
  • Directions: Sub-block for listing directions.

The Recipe block also makes use of the core Image and Heading blocks. It is as simple to use as nearly any other block. Add the block to a post via the inserter or the /recipe slash command. From there, end-users can customize the output to their heart’s content.

Because the Recipe block itself lacks any custom colors or other stylistic options outside of wide and full-width alignment, the easiest way to spruce up the design a bit is to drop it into a Cover or Group block. Doing so provides a wider range of design options. For those users who need even more design control, Munir Kamal’s EditorPlus plugin is a nice addition when wrapping it with the Group block.

One of the best things about the Recipe block is that it is not locked. End-users can move sub-blocks around to their liking. It even allows nesting of other blocks. Not everyone creates the exact same type of recipe cards, so it makes sense to have some extra customizability.

The block is also flexible enough for recipes that have multiple ingredients and directions lists. So, that pie and pie crust recipe you want to share? No problem. You can split the ingredients and directions so that your readers are not accidentally dropping lard into the pie filling.

Missing Features

The Recipe Block plugin is by no means ideal for every situation. Some features could make it stand out a bit more. For the most part, I wanted a few additional styling options.

Choyce-Dwan makes it clear in the plugin description that it does not support Schema or structured content. That would make a nice block option for those who want to enable it.

I would like to be able to change the text and background color of the main Recipe block. However, this is easily done by wrapping it with the core Group block. Ultimately, I would like to have the option to add some different styles to it, such as a custom border. Such a feature should probably land in core WordPress first so that there is a standard.

It would be nice to allow users to change the font size and colors within the Information, Ingredients, and Directions blocks similar to how the core Paragraph block works. Again, you can wrap this with the Group block and at least set the colors at a higher level.

Defining “View Source”

Last time there was a little flurry of activity around the concept of “View Source,” I did get the sense that not everyone was on the same page about what that even means. Jim Nielsen:

First, when we talk about “View Source” what precisely are we talking about? I think this is an important point to clarify, as it sometimes goes unsaid and therefore a lot of assumptions sneak into the conversation and we might realize we’re not all talking about the same thing.

There are three things that people might be talking about:

  1. View source code (the code that generates the HTML delivered over the network)
  2. View page source (the HTML delivered over the network)
  3. View runtime source (the living HTML, a.k.a the DOM)

I’ll assign what I think are the values of each are, as slices of a pie chart:

  1. 10%
  2. 5%
  3. 85%

Every major browser ships with built-in DevTools where you can easily peak at the “runtime source.” That’s where the vast bulk of value is to me. If browsers ever talked about removing that, I’m sure we’d all be up in arms. Even for non-developers, the existence of this tool might be the spark that grows baby web developers.

DevTools also provides a way to view the HTML delivered over the network, hence my hardline stance from before:

I literally don’t care at all about View Source and wouldn’t miss it if it was removed from browsers. I live in DevTools, and I’ll bet you do too. It entirely supersedes View Source, as you can quite literally view source inside it if you’d like.

Jim’s post explains the difference between all three types of “viewing source” in great detail. For sites that are built entirely from client-side JavaScript, viewing the HTML over the wire is nearly useless. But if you could see the whole codebase (say if it was open-source on GitHub), there is certainly value there.

Direct Link to ArticlePermalink


The post Defining “View Source” appeared first on CSS-Tricks.

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

What, When, and How of Scatterplot Matrix in Python – Data Analytics

In this post, you will learn about some of the following in relation to scatterplot matrix. Note that scatter plot matrix can also be termed as pairplot. Later in this post, you would find Python code example in relation to using scatterplot matrix / pairplot (seaborn package).

  • What is scatterplot matrix?
  • When to use scatterplot matrix/pairplot?
  • How to use scatterplot matrix in Python?

What Is Scatterplot Matrix?

Scatter plot matrix is a matrix (or grid) of scatter plots where each scatter plot in the grid is created between different combinations of variables. In other words, scatter plot matrix represents bi-variate or pairwise relationship between different combinations of variables while laying them in grid form. Here is a sample scatter plot matrix created using Sklearn Iris dataset.

PostgreSQL synchronous_commit Options and Synchronous Standby Replication

I find myself discussing and explaining sychronous_commit with many PostgreSQL users, especially with novice users. So, I thought of noting down all the key points as a blog post which will be useful for more users. Recently I got an opportunity to talk about some related topics in our PostgreSQL Percona Tech Days.

What Is sychronous_commit All About?

This is the parameter by which we can decide when a transaction-commit can be acknowledged back to the client as successful.

Windows 10 and Android Cell Phone File Transfer

I just bought a Figo Nitro 4X cell phone (Android 8.1) phone for my son. When I connect my cell phone (Figo Android 6) to my Windows 10 laptop it displays in file manager with an icon that I can open to see all the folders on my phone. From there I can easily copy files back and forth with file manager.

When I plug in the new phone I still get the icon but when I open it I get a blank screen. No folders. The USB settings I have available on the phone are:

  1. Charge Only
  2. Media Device (MTP)
  3. Camera (PTP)
  4. USB virtual drive

The first three options get me a blank window. The last option shows the phone as a CD-ROM and opening it shows a readme file. The "drive" is read only.

Any suggestions? Online help is pretty much useless as they refer to USB options that are no longer valid in Android 8.

Setup Postgres, and GraphQL API With Hasura on Azure

monitors

I created a data model to store railroad systems, services, scheduled, time points, and related information, detailing the schema "Beyond CRUD n' Cruft Data-Modeling" with a few tweaks. The original I'd created for Apache Cassandra, and have since switched to Postgres giving the option of primary and foreign keys, relations, and the related connections for the model.

In this post I'll use that schema to build out infrastructure as a code solution with Terraform, utilizing Postgres and Hasura (OSS).

Create an API Gateway with Load Balancer Using Java

Used Libraries

  1.   Netflix Eureka naming server 
  2.   Netflix Zuul
  3.   Ribbon
  4.   Feign

Network Architecture of the system

This Architecture Contains Four Applications

  1. Load balancing application [netflix-eureka-naming-server]
  2. API gateway application [api-gateway-server]
  3. Server application [micro-service-server]
  4. Client application [micro-service-client]

Steps To Run The Applications

  1. Install JDK 11 or latest. 
  2. Clone git repository of the project into local.
  3. Github: https://github.com/VishnuViswam/LOAD-BALANCER-WITH-API-GATEWAY.git
  4. Run Load balancing application first. 
  5. Run The API gateway application.
  6. Then run Server application in two ports. 
  7. At last run Client application.

1) Load Balancing Application

All client server communication will be done through this load balancing server application. 

Data Migration From JanusGraph to Nebula Graph – Practice at 360 Finance

Speaking of graph data processing, we have had experience in using various graph databases. In the beginning, we used the stand-alone edition of AgensGraph. Later, due to its performance limitations, we switched to JanusGraph, a distributed graph database. I introduced details on how to migrate data in my article “Migrate tens of billions of graph data into JanusGraph (only in Chinese)”. As the data size and the number of business calls grew, a new problem appeared: Each query consumed too much time. In some business scenarios, a single query took up to 10 seconds, and with increase of the data size, a more complicated single query needed two or three seconds. These problems had seriously affected the performance of the entire business process and the development of related businesses.

The architecture design of JanusGraph determines that a single query is time-consuming. The core reason is that its storage depends on the external storage, and JanusGraph cannot control the external storage well. In our production environment, an HBase cluster is used, which makes it impossible for all queries to be pushed down to the storage layer for processing. Instead, data can only be queried from HBase to the JanusGraph Server memory and then filtered accordingly.

Using Feature Flags During Incident Management

switches

Whether you call it an Incident, outage, surprise, or unplanned work, your application isn't working as expected, and you need to deal with the problem. Your aim during incident resolution is to minimize the impact and get services restored as quickly as possible.

I am defining an incident as unplanned service interruption or reduction in quality. An incident can be: