MySQL import – all rows missing except those in final INSERT of InnoDB tables

This is a very strange bug. I’m using this on a mac:

mysql Ver 15.1 Distrib 10.4.6-MariaDB, for osx10.13 (x86_64)

If I import an SQL dump of a WordPress DB (so not very complicated structure, but some long lines) from the command line, the table structure for all tables appears normal, but lots of content is missing from InnoDB tables.

Specifically, where the INSERTS have been ‘chunked’ into groups of records, only the final group is there. If I use --skip-extended-insert to write a statement for every record, only one record is ever in the InnoDB table.

MyISAM data seems fine.

I’ve tried dropping and recreating the database, could there be some corruption elsewhere?

Ubuntu top panel app icons to open app window by double/click except app menu

Top Panel Icons

How to setup Ubuntu desktop to open app window by clicking or double-clicking on Top Panel icons?

When i click on them i see same menu like for right mouse click. Irrational use.

Another strange behavior, when i try open app window from menu by this icons and app in background i see just popup message but not app window.

Tablet simulated right click doesn’t work except in the file browser

I have turned on the simulated right click in the system settings. When I use an external mouse, holding the left mouse button triggers a right click as expected. However, doing so with the finger on the touchscreen of the tablet doesn’t. Surprisingly though, it works in the file browser but nowhere else.

Try & Except, maneira correta

A maneira correta de usar o try e except no Python é como?

try:   variavel = funcao() except:   return 'error' 

Ou eu faço:

variavel = funcao() e depois eu trato, dessa forma

variavel = funcao()  try:  return variavel except:  return 'error' 

Tanto faz? Sou iniciante no Python, e no PHP nunca usei try e catch

Forma correta de se utilizar try except

Estou trabalhando pela primeira vez com uma API e preciso retornar um erro caso ocorra, a seguir o meu código com a forma mais clara e simples que encontrei de notificar os erros:

if request.method == 'POST':             try:                     information = json.loads(request.data)                     string_open = information['before']                     string_closed = information['after']             except:                     return 'Não foi possivel interpretar a requisição'               try:                     results_open = tfnet.return_predict(readb64(string_open))                     results_closed = tfnet.return_predict(readb64(string_closed))             except:                     return 'Não foi possível converter a string64'  return jsonify(result_inventory) 

Gostaria de saber se existe alguma forma melhor de escrever esse código ou alguma convenção que regularize o tratamento de exceções no python.

Add another layer of security in accounts except phone number

I recently came across articles in which another person went to telecom company and got another sim registered with the target’s phone number. After doing so, he was able to reset the passwords in almost all the accounts (like gmail, outlook) etc and hijack everything.

This also defeats 2FA (at least in google) as anybody who gets my phone number can reset the password of gmail. Once an attacker has access to Gogle account, they can go on to gain access to almost every other website where my gmail account is the verification mail. This includes AWS, Google cloud where I could be significantly charged.

SO my first question is, how to prevent this from happening. Is there any way to tell google to stop using my phone number as fallback for verification or tell them to use something else along with phone number.

2nd question. If this happens, how can I recover my accounts (google and all the connected accounts) as soon as possible. Because the attacker will most likely change all the passwords. He/she might also go one step ahead to change the verification emails/phone number, effectively locking me out of my account. Also if I somehow, do manage to gain back the access to gmail, the attacker could meanwhile hijack all my other accounts tied up with gmail and change email id in them preventing me from resetting password there.

samsung galaxy a3: block all notifications except email and sms

Device: Samsung Duos (SM_A300H) Android version 5.0.2 

I want something very basic: that my samsung galaxy a3 works like a phone and makes sound only for call, sms and alarm. No more FB nor email nor whatever notifications.

I googled and found some answers that doesn’t suit my device. They say: Go to Settings -> Device -> Sound -> Default Notification Sound -> Silent. Next, set your text message sound to whatever you want.

I have Settings -> Sounds and Notifications, and there I can silent notifications, but there is zero options for message.

Smartphones are so smart that they aren’t phone anymore 🙁


This is what I see when I press sound button + options:

enter image description here

Redirect all pages to homepage via .htaccess except backend

I’ve been trying to redirect all pages of my Magento website to homepage via .htaccess – except the backend, naturally. Currently, I’m using these rules and everything is working fine so far but I want to access my backend (domain.com/office):

# Redirect the all pages to homepage  RewriteEngine On RewriteCond %{REQUEST_URI} !/$   [NC] RewriteCond %{REQUEST_URI} !.(css|fonts|gif|jpe?g?|png|ico) [NC] RewriteRule ^(.*)$   / [R=302,L] 

Can someone help me with this? I’ve been trying many rules but none of them worked well. With some rules, when I try to access my backend, I’m still redirected to homepage. With other rules, I got a ERR_TOO_MANY_REDIRECTS error message.

Thanks!

What does “Network” inside yammer refer to? is it similar to “Everyone except external” sharepoint group

When creating new yammer groups we got 2 options, “Internal” & “External” groups as follow:-

enter image description here

and inside the Internal group >> we got a text saying that anyone inside your network can view conversations. so what does the word “network” refer to? does it refer to all internal users inside office 365 (similar to “Everyone except external” sharepoint group)?