Monday, February 11, 2019
Ubuntu 16 - Setting PDF Printer
List of printers installed
$ls /etc/cups/ppd
Manually
Device URI:cups-pdf:/
By Command Line (Partial tested)
lpadmin -h localhost -p cups-pdf -v cups-pdf:/ -P /usr/share/cups/model/CUPS-PDF.ppd -E
Setting file (output/destination)
/etc/cups/cups-pdf.conf
Status Idle - File "/usr/lib/cups/backend/cups-pdf" has insecure permissions
$chmod 700 /usr/lib/cups/backend/cups-pdf
Null Printer
Device URI: file:/dev/null
References:
[1] Complete info https://en.opensuse.org/SDB:Printing_to_PDF
[2] openSUSE compile cups-pdf and ppd file https://pawn.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/documentation.shtml
[3] CUPS PDF-WRITER Backend on Suse https://www.novell.com/coolsolutions/feature/17636.html
[4] Fake printer https://superuser.com/questions/304670/how-to-add-a-fake-dummy-null-printer-in-cups
[5] Install cups-pdf http://www.debianadmin.com/howto-install-and-customize-cups-pdf-in-debian.html
Tuesday, February 05, 2019
Fedora 29 Network Settings
[1] https://alchemist.digital/articles/configure-a-static-ip-address-on-fedora-24-25/
Fedora 29 firewalld settings
$sudo service firewalld start
$sudo
firewall-cmd --list-all
$sudo
firewall-cmd --get-zones
$sudo
sudo firewall-cmd --zone=home --list-all
$sudo
firewall-cmd --get-default-zone
$sudo
firewall-cmd --get-active-zones
$sudo firewall-cmd --add-port=8081/tcp --permanent
$sudo firewall-cmd --add-port=8081/udp --permanent
$sudo firewall-cmd --reload #important in Fedora 23 (VPS)
References:
[1] firewall-cmd https://docs.fedoraproject.org/en-US/Fedora/19/html/Security_Guide/sec-Open_Ports_in_the_firewall-CLI.html
[2] other firewall-cmd https://www.hiroom2.com/2017/07/12/fedora-26-firewalld-en/
[3] zones https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-using-firewalld-on-centos-7
Monday, February 04, 2019
Fedora - mySQL restoring root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
#service mysqld stop // id doesn't stop run #mysqladmin -u root -p shutdown
#mysqld_safe --skip-grant-tables &
#mysql -u root
> use mysql;
> update user set password=PASSWORD("mynewpassword") where User='root';
> flush privileges;
> quit
#service mysqld stop
#service mysqld start &
if mysqld_safe not exist (updated 2019)
# systemctl stop mysqld
# systemctl set-environment MYSQLD_OPTS="--skip-grant-tables"
# systemctl start mysqld
$ mysql -u root
get temporaly password (updated 2019)
$sudo grep 'temporary password' /var/log/mysqld.log
A temporary password is generated for root@localhost: cvcvcv
$mysql -u root -p
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';
https://dev.mysql.com/doc/refman/8.0/en/linux-installation-yum-repo.htmlreference:
http://www.rackspace.com/knowledge_center/article/mysql-resetting-a-lost-mysql-root-password
Sunday, January 27, 2019
Thursday, January 17, 2019
Monday, January 14, 2019
Ubuntu Memory type ddr2 ddr3
$ sudo dmidecode --type 17
$ sudo lshw -short -C memory
From [1]
DDR1: 2.5 V, 133–200 MHz
DDR2: 200–400 MHz
DDR3: 1.5 V, 400–800 MHz (up to 1400 MHz for super-high-end)
DDR4: 1.2 V, 2133–4266 MHz
For example: if shows up in lshw -short -C memory
as simply 16GiB DIMM Synchronous 2133 MHz (0.5 ns)
. The MHz rating indicates that it's almost certainly DDR4. References:
[1] memory types http://en.wikipedia.org/wiki/Synchronous_dynamic_random-access_memory#Generations_of_SDRAM
[2]
Tuesday, January 08, 2019
Ubuntu upgrade from i386 to x86_64
Wednesday, December 19, 2018
Wednesday, December 12, 2018
Tuesday, December 04, 2018
Tensor resources
References:
[1] Tensor decomposition https://www.slideshare.net/panisson/tensor-decomposition-with-python
[2] Tensores (sp) http://bibing.us.es/proyectos/abreproy/12082/fichero/Cap%C3%ADtulo3.pdf
Friday, November 30, 2018
Ubuntu 16 OpenCV 2.4
./configure --enable-nonfree --enable-pic --enable-shared
Download ffmpeg and build 3.4.5, 3.2.12 or 4.0 and try to compile opencv doesn't help, then
Final solution: disable ffmpeg
$cmake -D WITH_CUDA=OFF -D WITH_FFMPEG=0 ..
$make
That compile opencv 2.4.x and 3.4.x
References:
[1] Error sys/videoio.h not found problem http://yutopapa.hatenadiary.com/entry/2017/06/08/173149
Tuesday, November 27, 2018
ASP.NET MVC Mono
.Net Framework 4.5.2 using project properties
Mysql.Data.Entity using NuGet(6.10.8)
Setup Web.config
Fix version of entry System.Web.Mvc.MvcWebRazorHostFactory at views/Web.config
Classes
//Ado
using System;
using System.Data.Entity;
using MySQLEntity.Models;
namespace MySQLEntity.Entity
{
public class MyDb : DbContext
{
public MyDb() : base("ferredb")
//public MyDb() : base(nameOrConnectionString: "ferredb")
{
}
public DbSet
}
}
//Entity
using System;
//Added
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace MySQLEntity.Models
{
[Table("Users")]
public class Usuario
{
[Key]
public string usuario { get; set; }
public string apenom { get; set; }
}
}
Controller Snippet code
public ActionResult Index()
{
MyDb db = new MyDb();
var Model=db.Usuarios.ToList();
return View(Model);
}
View Snippet code
@foreach (var item in Model)
{
<div> @item.usuario @item.apenom </div>
Action results
References:
[1] MySQL EntityFramework web.config https://iyalovoi.wordpress.com/2015/04/06/entity-framework-with-mysql-on-mac-os/
[2] Action results
https://www.c-sharpcorner.com/article/different-types-of-action-results-in-asp-net-mvc/
[3] ViewBag better than DataView http://www.tutorialsteacher.com/mvc/viewbag-in-asp.net-mvc
Monday, November 26, 2018
mySQL Develop Optimization
Select * from MOVPRO where fecmov>='2018-11-25' and tipmov='S'
EXPLAIN Select * from MOVPRO where fecmov>='2018-11-25' and tipmov='S'
CREATE INDEX MOVPRO_fecmov_tipmov_index ON MOVPRO (fecmov,tipmov)
References:
[1] faster using indexes https://blog.nodeswat.com/making-slow-queries-fast-with-composite-indexes-in-mysql-eb452a8d6e46
python3 using mysql connection
$pip3 install mysql-connector-python --user
from mysql.connector import (connection)
cnx=connection.MySQLConnection(user='user', password='*******',
host='ip', database='db')
cnx.close()
Resources:
[1] https://dev.mysql.com/doc/connector-python/en/connector-python-installation.html
API Testing
References
[1] postman https://steelkiwi.com/blog/api-testing-useful-tools-postman-tutorial-and-hints/
Water Simulation
[1] 2D SPH https://github.com/tizian/SPH-Water-Simulation
$sudo apt-cache search sfml
$sudo apt-get install libsfml-dev
#change for's
$make
$./sph
[2] WebGL water simulation https://experiments.withgoogle.com/webgl-water-simulation
[3] Google webgl https://experiments.withgoogle.com/search?q=fluid
[3.1] http://david.li/fluid/
[3.2] http://madebyevan.com/webgl-water/
[4] 3D Simulation/Animation/Fluids and more https://www.fetchcfd.com/search-projects/type/cfd
Related:
[1] Stanford su2 https://su2code.github.io/
[2] Multiple Interacting Fluids https://www.yiningkarlli.com/projects/multifluid.html
SĆ£o Carlos to Guarulhos
1) Expensive alternative
SĆ£o Carlos - SP to RodoviĆ”ria TietĆŖ, SĆ£o Paulo - SP 66.53R
https://passagemcometa.com.br
SĆ£o Carlos - SP to RodoviĆ”ria TietĆŖ, SĆ£o Paulo - SP 66.55R
http://www.empresacruz.com.br
SĆ£o Paulo - TietĆŖ - SP to Aeroporto de Guarulhos 37.00R
http://www.airportbusservice.com.br/
2) Cheap alternative
SĆ£o Carlos - SP to Campinas - SP 40.53R
https://passagemcometa.com.br
SĆ£o Carlos - SP to Campinas - SP 40.55R
http://www.empresacruz.com.br
Campinas-SP to Aeroporto de Guarulhos-SP 42.75R
https://www.buscaonibus.com.br
Thursday, November 15, 2018
English Tools
English test - Duolingo
[1] https://englishtest.duolingo.com/applicants
Lessons
[1] https://webapps.towson.edu/ows/activepass.htm
e-Books
[1] http://www.kosstu.kz/static/uploads/library/gumanitar/english/g-e-91.pdf
http://www.kosstu.kz/static/uploads/library/gumanitar/english/
[2] English Grammar In Use for Raymond Murphy. https://golammartoza.files.wordpress.com/2016/02/english-grammar-in-use-intermediate001.pdf
Online grammar
[1] http://www.gingersoftware.com/grammarcheck
[2] http://www.grammarcheck.net/editor/
Aditional helps
[1] https://www.websiteplanet.com/blog/talking-aloud-talking-allowed-watch-write-make-sure-right/
[2] For Presentation
[2.1] Presentation Skills for Scientists
-
Resources: [1] Hela https://ome.grc.nia.nih.gov/iicbu2008/hela/index.html
-
en inglĆ©s se llama “A potentially dangerous Request.Form value was detected from the client”. varias pĆ”ginas indican dos cosas: 1. agrega...
-
mas plugins http://devsnippets.com/reviews/using-jquery-to-style-design-elements-20-impressive-plugins.html http://www.extjs.com/deploy/dev/...
Odoo 17 - Custom adds
[1] Diario/Seq https://apps.odoo.com/apps/modules/17.0/sequence_for_journal