Posts

Showing posts from 2016

Mintty.exe: Process has exited, so the requested information is not available

Mintty, Cygwin and SuperPutty issue Mintty.exe: Process has exited, so the requested information is not available. From  https://github.com/jimradford/superputty/issues/528 (...) I also had this issue, but was able to do some troubleshooting this evening. The issue is caused by the current version of mintty.exe distributed with cygwin. In the new version, if mintty thinks that it wasn't started from a terminal, it will fork itself and then exit. Since superputty doesn't notice this, it tries to wait on the initial mintty process, which has already exited. Fortunately, there is a mintty config setting to disable this behavior. Just add "daemonize=false" to the .minttyrc file in your cygwin home dir.

Mysql Joins

From  http://stackoverflow.com/questions/38549/what-is-the-difference-between-inner-join-and-outer-join example   (not using your example tables :-) I have a car rental company. Table car id : integer primary key autoincrement licence_plate : varchar purchase_date : date Table customer id : integer primary key autoincrement name : varchar Table rental id : integer primary key autoincrement car_id : integer bike_id : integer customer_id : integer rental_date : date Simple right? I have 10 records for cars because I have 10 cars. I've been running this business for 10 years, so I've got 1000 customers. And I rent the cars about 20x per year per cars = 10 years x 10 cars x 20 = 2000 rentals. If I store everything in one big table I've got 10x1000x2000 = 20 million records. If I store it in 3 tables I've got 10+1000+2000 = 3010 records. That's 3 orders of magnitude, so that's why I use 3 tables. But because I use 3 tables  (to save

Useful MySQL commands

show open TABLES WHERE in_use <> 0 - shows tables in used, eventually locked show processlist - shows all processes including the ones locking tables show full processlist - same as above, but with complete statements kill <pid> - kills a process. Useful for unlocking tables locked by lost processes OPTIMIZE TABLE  tbl_name [, tbl_name] ... - Reorganizes the physical storage of table data and associated index data, to reduce storage space and improve I/O efficiency when accessing the table.

Parallel processing in bash

https://pebblesinthesand.wordpress.com/2008/05/22/a-srcipt-for-running-processes-in-parallel-in-bash/

Ferramenta para diagramas

Ferramenta para diagramas: http://plantuml.com/activity-diagram-legacy

Removing "Insert" statements from Mysql Full DB dump file (to be able to create a DB with empty tables)

http://stackoverflow.com/questions/16735344/mysql-import-database-but-ignore-specific-table (...) The accepted answer by RandomSeed could take a long time! Importing the table (just to drop it later) could be very wasteful depending on size. For a file created using mysqldump - u user - ppasswd --opt --routines DBname > DBdump.sql I currently get a file about 7GB, 6GB of which is data for a log table that I don't 'need' to be there; reloading this file takes a couple of hours. If I need to reload (for development purposes, or if ever required for a live recovery) I skim the file thus: sed '/INSERT INTO `TABLE_TO_SKIP`/d' DBdump . sql > reduced . sql And reload with: mysql - u user - ppasswd DBname < reduced . sql This gives me a complete database, with the "unwanted" table created but empty. If you really don't want the tables at all, simply drop the empty tables after the load finishes. For multiple tables you could d

How to Find Your Lost Windows or Office Product Keys

How to Find Your Lost Windows or Office Product Keys If you’re planning on  doing a reinstall of Windows  but can’t find your product key, you’re in luck because it’s stored in the Windows Registry. It’s just not easy to find, and it’s impossible to read without some help. Luckily, we’re here to help. As you can see in the screenshot above, the product ID is stored in the registry but is in a binary format that can’t be read by humans unless you are some sort of Cylon. You aren’t, are you? The great thing is that you can even recover a key, even from a computer that won’t boot anymore. All you need is access to the disk drive from a working computer. Keep reading for more. We’re not really sure why Microsoft went to great lengths to make it difficult to see the product keys for their software, especially since they are stored right in there in the registry and can be read by software, if not by humans. We can only assume that they don’t want anybody to re-use a key from an ol

Set paste values as default paste when using Ctrl + V with VBA code

Image
Set paste values as default paste when using Ctrl + V with VBA code Amazing! Using Tabs in Excel like Firefox, Chrome, Internet Explore 10! When you paste the data as values only, you need to click the little square at the corner of your selection and choose Values option each time after pasting the data. The following VBA code can help you to change the default paste to paste values. 1 . Hold down the  ALT + F11  keys to open the  Microsoft Visual Basic for Applications window . 2 . Click  Insert  >  Module , and paste the following code in the  Module  Window. VBA code: Set paste values as default paste when using Ctrl + V 1 2 3 Sub PasteasValue() Selection.PasteSpecial Paste:=xlPasteValues End Sub 3 . Then save and close the code, and press  Alt + F8  keys to open the  Macro  dialog box. 4 . In the  Macro  dialog, choose the used macro name  PasteasValue  and then click  Options  button, see screenshot: 5 . Then in the  Macro Optio

Repair missing User folders in Windows 7

Image
In https://scottiestech.info/2014/11/11/repair-missing-user-folders-in-windows-7/ Repair missing User folders in Windows 7 November 11th, 2014 Goto comments Leave a comment At some point, you’ll probably run into a problem that doesn’t seem to have an easy solution: one of your default User folders in Windows 7 (My Documents, My Pictures, My Music, My Videos, Downloads, and Desktop) will suddenly disappear. Try as you might, you won’t be able to restore these user folders, because they are actually “special”. Windows treats them differently than a normal folder you might create yourself, and they even have pretty icons, like so: There is a lot of info out there on how to fix these built-in Windows 7 folders, but it’s all rather complicated. So, here’s the boiled-down, anybody-can-do-it version on how to restore your missing User folders – or so I hope! First, a few bits of info you’ll need to keep in mind. The default locations for the User folders in Windows 7