pip install --allow-unverified django-admin-tools django-admin-tools==0.5.1
Ярлыки
- Задачки (3)
- Поиск маршрутов (1)
- Amazon (2)
- apache (2)
- Celery (3)
- curl (1)
- Django (9)
- english (1)
- fabric (1)
- GLPK (1)
- HTML (1)
- java (6)
- Job (1)
- JS (1)
- knockout JS (3)
- LP (2)
- mongo (1)
- MySQL (9)
- neo4j (5)
- Oracle (1)
- parallel (1)
- PostgreSQL (3)
- PsyCo (1)
- PyQt (17)
- Python (30)
- routers finding (3)
- Soft (1)
- SSH (4)
- supervisor (1)
- SVG (2)
- SVN (1)
- TEX (1)
- Ubuntu (15)
- web (1)
- wsgi (1)
среда, 23 апреля 2014 г.
четверг, 10 апреля 2014 г.
воскресенье, 6 апреля 2014 г.
MySql compressed row format ("Row size too large" error resolve)
I have follow error:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/ dist-packages/django/core/ management/base.py", line 222, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/local/lib/python2.7/ dist-packages/django/core/ management/base.py", line 255, in execute
output = self.handle(*args, **options)
File "/home/vinger4/Projects/a360/ router/management/commands/ places_update.py", line 428, in handle
airport.save()
File "/home/vinger4/Projects/a360/ content/models.py", line 545, in save
super(Airport, self).save(*args, **kwargs)
File "/usr/local/lib/python2.7/ dist-packages/django/db/ models/base.py", line 546, in save
force_update=force_update, update_fields=update_fields)
File "/usr/local/lib/python2.7/ dist-packages/django/db/ models/base.py", line 626, in save_base
rows = manager.using(using).filter( pk=pk_val)._update(values)
File "/usr/local/lib/python2.7/ dist-packages/django/db/ models/query.py", line 605, in _update
return query.get_compiler(self.db). execute_sql(None)
File "/usr/local/lib/python2.7/ dist-packages/django/db/ models/sql/compiler.py", line 1020, in execute_sql
cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File "/usr/local/lib/python2.7/ dist-packages/django/db/ models/sql/compiler.py", line 846, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python2.7/ dist-packages/django/db/ backends/mysql/base.py", line 128, in execute
six.reraise(utils. DatabaseError, utils.DatabaseError(*tuple(e. args)), sys.exc_info()[2])
File "/usr/local/lib/python2.7/ dist-packages/django/db/ backends/mysql/base.py", line 120, in execute
return self.cursor.execute(query, args)
File "/usr/lib/python2.7/dist- packages/MySQLdb/cursors.py", line 174, in execute
self.errorhandler(self, exc, value)
File "/usr/lib/python2.7/dist- packages/MySQLdb/connections. py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
DatabaseError: (1118, 'Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.')
Set ROW_FORMAT=COMPRESSED for my_table:
mysql> SET GLOBAL innodb_file_format=Barracuda; SET GLOBAL innodb_file_per_table=ON; ALTER TABLE my_table ROW_FORMAT=COMPRESSED;
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 258 rows affected (0.35 sec)
Records: 258 Duplicates: 0 Warnings: 0
mysql>
понедельник, 17 марта 2014 г.
generate html for correct view SVG
<embed src="GDP.svg" width="5000" height="8000"
type="image/svg+xml"
pluginspage="http://www.adobe. com/svg/viewer/install/" />
pluginspage="http://www.adobe.
curl - measure time
curl -o /dev/null -s -w %{time_total}\\n -X POST http://localhost:7474/db/data/ ext/GetAllGoods
screen brightness on HP dv7
Original: http://ubuntuforums.org/showthread.php?t=1906803
Run this in a terminal:and change this line:Code:sudo nano /etc/default/grubto:Code:GRUB_CMDLINE_LINUX=""Save the file and run:Code:GRUB_CMDLINE_LINUX="acpi_backlight=vendor"Now reboot. Your function keys for brightness should now work.Code:sudo update-grub
Disable second video adapter every time your computer boots (Ubuntu)
The commands in rc.local are executed every time your computer boots.
So you just need to add the commands that power down the discrete adapter right before you chown the vgaswitcheroo/switch file
I turn off my radeon adapter every time I boot as well. My rc.local is very simple:
# [...]
# By default this script does nothing.
# turn off the discrete video adapter
echo OFF > /sys/kernel/debug/ vgaswitcheroo/switch
exit 0
I don't bother with any other scripts, but if you do they should still work just fine. Just put the echo OFF before the chown or any of the other user scripts.
Ubuntu has hibernation turned off by default, but note that if you do turn it on this method doesn't get a chance to run when you come out of hibernation (not sleep) so both adapters will be powered up.
Paste together two pdf files
pdftk titul.pdf Chapter1.pdf Chapter2.pdf Chapter3.pdf output wholeBook.pdf
Java: Cobertura coverage report
Original here: http://stackoverflow.com/questions/2006014/how-to-generate-cobertura-code-coverage-report-using-maven-from-hudson
To run Cobertura during package phase, do
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.5.2</version>
<configuration>
<formats>
<format>xml</format>
</formats>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>cobertura</goal>
</goals>
</execution>
</executions>
</plugin>
Heres an example of pom
And here how to integrate in Hudson http://macgyverdev.blogspot.com/2011/04/hudson-continous-integration-for-google.html
воскресенье, 16 марта 2014 г.
pycallgraph
You may import pycallgraph as a module and run the trace graph within your application.
Just before your first line of code you want to graph, put in the following code:
import pycallgraph pycallgraph.start_trace()
To stop the trace and generate the graph, put in the following code /usually at the end of your program/:
pycallgraph.make_dot_graph('test.png')
The default is to output in png with with the dot tool. You can change them by specifying arguments:
pycallgraph.make_dot_graph('test.jpg', format='jpg', tool='neato')
Use notification in Ubuntu
Use crontab and notify- send:
EDITOR=gedit crontab -e
Add schedule:
15 12 * * 1-5 DISPLAY=:0.0 notify-send --urgency normal -i typing-monitor “Lunch” “Lunch”
15 17 * * 1-5 DISPLAY=:0.0 notify-send --urgency normal -i ktip “End of work day” “go home”
15 17 * * 1-5 DISPLAY=:0.0 notify-send --urgency normal -i ktip “End of work day” “go home”
Save and close.
воскресенье, 19 января 2014 г.
Install Oracle Java 7 in Ubuntu
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
Подписаться на:
Сообщения (Atom)