How do I find out what is causing the app “Google” to use so much background data

Even though I have background data turned off, it is using incredibly high amounts of data to the point of being ridiculous. This is starting to cost me money as data is not unlimited in Canada. It’s gotten to the point where I can’t use data because if I turn it on Google just gobbles it all up. At one point, it was just full tilt downloading/uploading something I have no idea what it would be.

What is causing this and/or how can I turn off background usage for Google for real (obviously the toggle is a placebo)

Screenshots of data usage.

enter image description here enter image description here

How would I take data from an Excel tab and create a list for use in a Classify function?

I would like to do the following:

  1. Load data from a single tab of an Excel workbook into a Mathematica table.
  2. Prepare the data for use with the Mathematica Classify function.

The training set that I want to pass into Classify would be:

{{cell[2,1],cell[2,2],cell[2,3]}->cell{2,7},  {cell[3,1],cell[3,2],cell[3,3]}->cell{3,7}, ...    ,{cell[n,1],cell[n,2],cell[n,3]}->cell{n,7}} 

I have no problem importing the Excel data into a table.

I am unsure as to how this data would be converted into a list for use with Classify.

Managing heterogeneous data

The underlying problem is one I seem to run into a lot. You have a collection of objects with some things in common, but other information about the objects may apply to some of them but not to others. The challenge is to manage this in a sane way.

Here is the core of my latest attempt to deal with this problem. I’ll put some related classes below.

public class TournamentModel {     public Guid Id { get; set; }     public string Name { get; set; }     public HashSet<TournamentEntrantModel> Entrants { get; set; }     public List<TournamentRoundModel> Rounds { get; set; } = new List<TournamentRoundModel>();     public GameModel Game { get; set; }     public Dictionary<string, ITournamentDetails> Details { get; set; } } 

Everything in the above except Details is something I expect the vast majority of tournaments to have. But then we come to things like seeding, prizes, and other properties that a tournament may or may not have. As a further challenge, neither seeding nor prizes would always take the same form. For example, a seeding may or may not seed all players, and some seedings put players into groups rather than ordering them linearly. One tournament might award prizes for 1st through 3rd places, while another might award a prize for most fun to play against.

Here are the details classes for LinearSeeding and for PlacePrizes:

public class LinearSeedingModel: ITournamentDetails {     public List<TournamentEntrantModel> SeededEntrants { get; set; } }  public class PlacePrizesModel: ITournamentDetails {     public List<string> Prizes { get; set; } } 

Here is the TournamentDetailsService that glues things together. It could be expected to grow over time.

public class TournamentDetailsService {     public const string LinearSeedingKey = "LinearSeeding";     public const string PlacePrizesKey = "PlacePrizes";      public LinearSeedingModel GetSeeding(TournamentModel tournament)         => tournament.Details.GetValue(LinearSeedingKey) as LinearSeedingModel;      public void SetSeeding(TournamentModel tournament, LinearSeedingModel seeding)         => tournament.Details.SetValue(LinearSeedingKey, seeding);       public PlacePrizesModel GetPlacePrizes(TournamentModel tournament)         => tournament.Details.GetValue(PlacePrizesKey) as PlacePrizesModel;      public void SetPlacePrizes(TournamentModel tournament, PlacePrizesModel prizes)         => tournament.Details.SetValue(PlacePrizesKey, prizes); } 

And here is the DictionaryExtensions class used by the service:

public static class DictionaryExtensions {     public static T GetValue<T>(this Dictionary<string, T> dictionary, string key, T defaultValue = default(T))     => dictionary.ContainsKey(key) ? dictionary[key] : defaultValue;      public static void SetValue<T>(this Dictionary<string, T> dictionary, string key, T value)         where T : class     {         if (value == null)         {             dictionary.Remove(key);         }         else         {             dictionary[key] = value;         }     } } 

If I go with the above pattern, it might get repeated a lot. For example, one could imagine Details fields on both TournamentEntrantModel and TournamentRoundModel.

As an alternative, I haven’t ruled out having a fat TournamentModel class with a list of properties that would be certain to grow over time, and many of which would not be applicable to a particular tournament. No idea if that is likely to be more trouble or less.

Send data recieved by netcat to script

I’m trying to take data I receive over a netcat connection to a script that will send each line to another server via a curl post command.

Heres where I am.

This works: nc -lk 9272 > test.log

Each line received is in the log as expected

This doesn’t work:

nc -lk 9272 | ./ 

Expect it to send the lines to this script:

#! /bin/bash echo "Received Line!"  line=$  1  cart=$  {line:0:7} type=$  {line:7:4} title=$  {line:14:28} curl -d "cart=$  cart&type=$  type&title=$  title" -X POST http://server/update 

Nor does this ./ 9272

#!/bin/bash  echo "Started listening on port $  1 ..."  while read line do     if [ "$  line" == 'exit' ]; then         echo "Received 'exit'"         break     else         echo "Received Line!"         cart=$  {line:0:7}         type=$  {line:7:4}         title=$  {line:14:28}         curl -d "cart=$  cart&type=$  type&title=$  title" -X POST http://server/update     fi done < <((echo "Welcome.") | nc -kl $  1) echo "Good bye" 

The end goal is to receive the data and then send it to my app via a post.

Network line switch-over in Oracle Data Guard

We have a Primary database with a remote Standby which established using Oracle Data Guard. They can be syncing over a private Wireless Network and a Wired LAN (There are two options as network medium)

Is there any setting in Data Guard to handle network line failure? For example, I want to set wired LAN as main line and when it is not available data guard automatically switch to wireless network.

Load category, but only with limited data to build a Breadcrumb

Based on the helper catalog there is a function that returns a path for the breadcrumb to be displayed in Magento when viewing a Product.

I want to enhance this method to return the full path of the categories back to me.

Current implementation:

  ...           if ($  this->getProduct()) {                 $  path['product'] = array('label'=>$  this->getProduct()->getName());             }         $  this->_categoryPath = $  path; 

Here I want to append a process that load the categories of the product via getCategoryIds(), which is available trough the getProduct() method.

I’d like to load a conditional collection, that only loads the respective ID of the categories but only the following data:

  • url
  • name
  • title
  • my_custom_eav_param

I assume something like:

        if ($  product = $  this->getProduct()) {             $  cats = $  product->getCategoryIds();             foreach ($  cats as $  category_id) {                 $  attributesToSelect = [''];                 $  _cat = Mage::getModel('catalog/category')                     ->getCollection()                     ->addAttributeToSelect('*')                     ->addAttributeToFilter(['name', 'id', 'url', 'description'])                     ->load()                     ->getSelect()->__toString();                 var_dump($  _cat); die;             }             $  path['product'] = array('label'=>$  this->getProduct()->getName());         }          $  this->_categoryPath = $  path; 

but this does not work. How can I specify what entities are loaded in order to keep load to DB as low as possible for this requests? To load the whole category all the time is a lot of traffic, or can it be ignored completely?

Microservices and “Master Data Management” – are they compatibile?

My understanding is that separate data store per service is a best practice in microservices architecture. This Nginx article mentions that, but it goes on to advocate a Master Data Management system for ensuring consistency of data across disparate data stores. How can both coexist peacefully? It seems to me that each individual service would be competing with the MDM solution for “owning” the rights to create/update/master data.

I’d love to hear from anyone that has an MDM solution plus separate data store per service. What MDM tool(s) are you using? Doesn’t each service “master” its own data – e.g., shouldn’t Order data be written ONLY via the Order microservice? If the MDM solution detects a problem with regard to data consistency around Order data, does it instruct the Order service to reconcile it – or does this happen in the MDM tool?

Also, how do you stand up an MDM solution without introducing undesirable coupling between services and the MDM solution? Teams developing services should be able to change schema as needed, but an MDM solution would need to know the intimate details of schema and thus be tightly coupled right?