recentpopularlog in
« earlier   later »
Throttlegate | Low End Mac | http://lowendmac.com/
If Apple had added a feature that put up a warning dialog box when a battery was nearly consumed that gave the user an option to either keep the unit in full power mode (with the expectation that unexpected shutdowns could occur) or reduced power mode (to minimize the risk of unexpected shutdowns), I wouldn’t have any issues and I wouldn’t be writing this article. They could have also easily added a dialog box with an option to contact AppleCare or make an appointment at a local Apple Store to have their battery replaced. But I guess that is just too much to ask from the powers that be at Apple HQ in Cupertino.
throttlegate  apple  hardware 
february 2018
Low End Mac’s Compleat* Guide to the MacBook Air | Low End Mac | http://lowendmac.com/
Apple has stopped selling the 11″ Air – the 13″ model remains for sale, but with minimal upgrades and – in particular – a screen resolution that was good in 2010 but is now a bit of an embarrassment. Continued sales are a testament to the quality and value of its now 8-year old design, but I wonder how much longer it will remain in production?
macbookair  apple  mac  hardware 
february 2018
dict.cc | castaño | English-Spanish Dictionary | https://enes.dict.cc/
Listen to the cat purring in the first pronunciation (brunette).
español 
february 2018
Shortcut key for bookmark toolbar in Firefox - Super User | https://superuser.com/
This suggests using the Hide BookmarksBar extension, which used to be a great option, but this no longer works in the era of WebExtensions.
firefox  bookmarksbar  annoyance  likechrome  needshelp 
february 2018
Bookmark Toolbar Menu Button – Add-ons for Firefox
Show the contents of the Bookmarks Toolbar in a drop down menu. This compresses the bookmark menu into one button that you can put on any toolbar you want to.

Popups (like bookmarklets) get blocked, though, and there's no way to confirm the popup warning banner, because the page gets reloaded immediately, at least for the Pinboard bookmarklet.
bookmarks  firefox  extension  addon  bookmarksbar  annoyance 
february 2018
Bookmark Toolbar Shortcuts – Add-ons for Firefox
Use Alt+1, Alt+2, ... , Alt+9 for bookmarks in the toolbar

Doesn't seem to work in OS X, though.
firefox  bookmarksbar  extension  addon  maybesolution 
february 2018
Consent, explained for Donald Trump - YouTube
"I did not have sexual relations with that woman." — "No I did not."

reference:
consent  presidenttrump  explained  video 
february 2018
The Midnight – River of Darkness Lyrics | Genius Lyrics | https://genius.com/
Look I know you miss her man, but..
But you can't keep doing this to yourself
She's moved on
Meanwhile you're out there just
Walking the streets at night
Alone, in a river of darkness
lyrics  samples  darkwave 
february 2018
Basic Relationship Patterns — SQLAlchemy 0.9 Documentation | http://docs.sqlalchemy.org/
The bidirectional version adds backrefs to both relationships:
<code class="language-python">
class Association(Base):
__tablename__ = 'association'
left_id = Column(Integer, ForeignKey('left.id'), primary_key=True)
right_id = Column(Integer, ForeignKey('right.id'), primary_key=True)
extra_data = Column(String(50))
child = relationship("Child", backref="parent_assocs")

class Parent(Base):
__tablename__ = 'left'
id = Column(Integer, primary_key=True)
children = relationship("Association", backref="parent")

class Child(Base):
__tablename__ = 'right'
id = Column(Integer, primary_key=True)
</code>

Working with the association pattern in its direct form requires that child objects are associated with an association instance before being appended to the parent; similarly, access from parent to child goes through the association object:
<code class="language-python"># create parent, append a child via association
p = Parent()
a = Association(extra_data="some data")
a.child = Child()
p.children.append(a)

# iterate through child objects via association, including association
# attributes
for assoc in p.children:
print assoc.extra_data
print assoc.child</code>
sqlalchemy  dba  webdevel  flask-admin  samplecode  maybesolution 
february 2018
mysql - Insert auto increment primary key to existing table - Stack Overflow | https://stackoverflow.com/
This is interesting, but I don't know how it could work:

You can add a new Primary Key column to an existing table, which can have sequence numbers, using command:
<code class="language-sql">ALTER TABLE mydb.mytable ADD pk_columnName INT IDENTITY
</code>
dba  mysql  sql  newbie  syntax  primarykey  altertable  solution 
february 2018
sql - Update one MySQL table with values from another - Stack Overflow | https://stackoverflow.com/

<code class="language-sql">UPDATE tobeupdated
INNER JOIN original ON (tobeupdated.value = original.value)
SET tobeupdated.id = original.id</code>

That should do it, and really its doing exactly what yours is. However, I prefer 'JOIN' syntax for joins rather than multiple 'WHERE' conditions, I think its easier to read

As for running slow, how large are the tables? You should have indexes on tobeupdated.value and original.value

EDIT: we can also simplify the query
<code class="language-sql">UPDATE tobeupdated
INNER JOIN original USING (value)
SET tobeupdated.id = original.id
</code>

USING is shorthand when both tables of a join have an identical named key such as id. ie an equi-join - http://en.wikipedia.org/wiki/Join_(SQL)#Equi-join
dba  sql  innerjoin  solution  newbie 
february 2018
Experimental Factor Ontology - Summary | NCBO BioPortal | http://bioportal.bioontology.org/
The Experimental Factor Ontology (EFO) is an application focused ontology modelling the experimental variables in multiple resources at the EBI and Open Targets. The ontology has been developed to increase the richness of the annotations that are currently made in resources and to promote consistent annotation, to facilitate automatic annotation and to integrate external data. The ontology pulls together classes from reference ontologies such as disease, cell line, cell type and anat...
bioinformatics  disease  phenotype  searchengine  ontology 
february 2018
MySQL's INSERT IGNORE INTO & foreign keys - Stack Overflow | https://stackoverflow.com/
INSERT IGNORE turns INSERTS that don't meet a primary key constraint into warnings (try SHOW WARNINGS right after0.
dba  mysql  sql  newbie  solution 
february 2018
MySQL :: MySQL 5.7 Reference Manual :: 10.3.1 Collation Naming Conventions | https://dev.mysql.com/
<code>Table 10.1 Collation Case Sensitivity Suffixes
Suffix Meaning
_ai Accent insensitive
_as Accent sensitive
_ci Case insensitive
_cs case-sensitive
_bin Binary</code>
mysql  dba  collation  casesensitivity  reference  solution 
february 2018
mysql - Roughly how long should an "ALTER TABLE" take on an 1.3GB INNODB table? - Server Fault | https://serverfault.com/
My problem was a pending metadata lock; see https://stackoverflow.com/a/23757255/785213.

I actually just needed to stop the web server, because the Flask-Admin application had a lock on the table metadata, and I was trying to ALTER TABLE changing column data types... wouldn't let me.
dba  mysql  performance  altertable 
february 2018
mysql - How do I find which transaction is causing a "Waiting for table metadata lock" state? - Stack Overflow | https://stackoverflow.com/
All I actually had to do was stop the web server. The Flask-Admin web application had a lock on the table metadata, and I was trying to ALTER TABLE changing the data type/size of the columns. No go while the application was running, and that makes sense in retrospect.
If you cannot find the process locking the table (cause it is alreay dead), it may be a thread still cleaning up like this

section TRANSACTION of
<code class="language-sql">show engine innodb status;</code>

at the end
<code>---TRANSACTION 1135701157, ACTIVE 6768 sec
MySQL thread id 5208136, OS thread handle 0x7f2982e91700, query id 882213399 xxxIPxxx 82.235.36.49 my_user cleaning up</code>

as mentionned in a comment in Clear transaction deadlock?

you can try killing the transaction thread directly, here with
<code class="language-sql">KILL 5208136;</code>

worked for me.
dba  mysql  sql  processmanagement  solution  flask-admin 
february 2018
How to connect MySQL database using Python+SQLAlchemy remotely? - Stack Overflow | https://stackoverflow.com/
n my setup (I'm using mysql-python) just using 127.0.0.1 instead of localhost in the MySQL SQLAlchemy url works. The complete url I'm using exactly for that scenario (tunnel with local port 3307) is:

mysql:/user:passwd@127.0.0.1:3307/

I'm using SQLAlchemy 1.0.5, but I guess that doesn't matter too much...
python  mysql  dba  networking  sqlalchemy  errormessage  annoyance  solution 
february 2018
mysql - Is it not possible to show warnings when using mysqlimport? - Stack Overflow | https://stackoverflow.com/
I used the mysql CLI tool, passing an equivalent "LOAD DATA ..." command followed by a semicolon, followed by "SHOW WARNINGS". The resulting display is helpful in finding detail on each warning.

For example:
<code class="language-bash">mysql <options> -e "LOAD DATA LOCAL INFILE 'foo' INTO TABLE bar; SHOW WARNINGS"</code>

P.S.: You will probably also need to add the '--local-infile=1' option or you'll get an error message about something not being supported in this version of MySQL.

What worked (finally) for me was:
<code class="language-sql">
mysql --login-path=dbserver --local-infile=1 --protocol=TCP \
-e 'load data local infile "zz_ensembl_genes.tsv" into table zz_ensembl_genes; show warnings;' \
the_database
</code>
dba  mysql  importexport  solution  debugging  logging  errormessage 
february 2018
MySQL :: MySQL Workbench Manual :: 5.3.5 Remote Management | https://dev.mysql.com/
The "SSH login based management" is greyed out if the host is "localhost" or 127.0.0.1. Workaround: add an alias called something else ("dev.local", "localhoerst", whatever) to /etc/hosts. Voila!
dba  mysql  mysqlworkbench  annoyance  workaround  solution 
february 2018
« earlier      later »
per page:    204080120160

Copy this bookmark:





to read