Resources:
[1] Course and Tutorial https://github.com/AllenDowney/ThinkDSP
Monday, June 11, 2018
Friday, June 08, 2018
Fluid Simulation: Lectures and Resources
CAELinux LiveDVD in your computer to turn it into a free and open engineering development workstation with CAD, CAM, CAE / FEA / CFD, electronic design and 3D printing features: no licence and even no installation is required ! [2]
Resources:
[1] Laboratory http://lgg.epfl.ch/research_physicsbased_animation.php
[2] CFD Linux distro https://caelinux.com/CMS3/
Courses:
[1] Khan https://pt.khanacademy.org/partner-content/pixar/effects/particle/p/water-simulation
Wednesday, June 06, 2018
Compiling tris2indicator on Linux Ubuntu 16
change code from MapViewOfFile (Windows) to mmap (Linux) on read_obj.cpp and write_grid.cpp.
$g++ read_obj.cpp vect.cpp global.cpp insert_poly.cpp write_grid.cpp timer.cpp main.cpp -lpthread -lm -o tris2indicator
source code:
[1] http://josiahmanson.com/research/wavelet_rasterization/
$g++ read_obj.cpp vect.cpp global.cpp insert_poly.cpp write_grid.cpp timer.cpp main.cpp -lpthread -lm -o tris2indicator
source code:
[1] http://josiahmanson.com/research/wavelet_rasterization/
Tuesday, June 05, 2018
Mapping files into memory
- CreateFile(); or OpenFile();
- CreateFileMapping();
- MapViewOfFile();
mmap()
combines the functions of CreateFileMapping()
and MapViewOfFile()
References
[1] https://stackoverflow.com/questions/8391094/equivalent-win-api-in-nix
[2] http://pubs.opengroup.org/onlinepubs/9699919799/functions/mmap.html
[3] mmap example https://gist.github.com/marcetcheverry/991042
Saturday, May 19, 2018
AI Courses and Resources
Resources:
[1] Berkeley course http://ai.berkeley.edu
[2] Minimax algorithm https://www.geeksforgeeks.org/minimax-algorithm-in-game-theory-set-3-tic-tac-toe-ai-finding-optimal-move/
[3] Alfa Beta Prunning https://www.geeksforgeeks.org/minimax-algorithm-in-game-theory-set-4-alpha-beta-pruning/
[4] Full Course, Search slides https://courses.cs.washington.edu/courses/cse473/14au/slides/
Friday, May 18, 2018
Qt Project to MakeFile
qmake -spec macx-g++ x.pro
on Mac OS X to generate Makefileqmake x.pro
on linux to generate Makefile (default behaviour)qmake -spec win32-g++ x.pro
on Windows to generate MakefileReferences:
[1] https://stackoverflow.com/questions/8571687/how-to-get-a-makefile-from-qmake
Wednesday, May 16, 2018
Fluid SImulaton Source codes
Compile OceanSurface under Ubuntu 16 [2]
* Install dependences
libglm-dev
libglfw3-dev
libsoil-dev
$g++ -o OceanSurface main.cpp wave.cpp Record.cpp -lGL -lglfw -lGLEW -lfftw3 -lfftw3f -lSOIL
Resources:
[1] splishsplash http://melhorum.blogspot.com.br/2018/05/compile-splishsplash.html
[2] https://github.com/JiashuoLi/OceanSurface
[3] https://ttnghia.github.io/
Sunday, May 06, 2018
Ubuntu 16 Setting Screen Samsung SyncMaster T240M
$cvt 1600 1000 #get right values for this resolution
$gtf 1600 1000 60 #alternative
# 1600x1000 59.87 Hz (CVT 1.60MA) hsync: 62.15 kHz; pclk: 132.25 MHz
Modeline "1600x1000_60.00" 132.25 1600 1696 1864 2128 1000 1003 1009 1038 -hsync +vsync
$ sudo xrandr --newmode "1600x1000" 132.25 1600 1696 1864 2128 1000 1003 1009 1038 -hsync +vsync #define
$ sudo xrandr --addmode DVI-I-1 "1600x1000" #register on system
$ xrandr
Screen 0: minimum 320 x 200, current 1600 x 900, maximum 16384 x 16384
DVI-I-1 connected primary 1600x900+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
1920x1200 59.95 +
1600x1200 60.00
1280x1024 75.02 60.02
1280x960 60.00
1152x864 75.00
1024x768 75.08 70.07 60.00
832x624 74.55
800x600 72.19 75.00 60.32 56.25
640x480 75.00 72.81 66.67 60.00
720x400 70.08
1600x900 59.95*
1600x1000 59.87
DVI-I-2 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
1600x900_60.00 (0x58e) 118.250MHz -HSync +VSync
h: width 1600 start 1696 end 1856 total 2112 skew 0 clock 55.99KHz
v: height 900 start 903 end 908 total 934 clock 59.95Hz
* Set permanent settings using ~/.xprofile (for example)
$vi ~/.xprofile
#
xrandr --newmode "1600x1000" 132.25 1600 1696 1864 2128 1000 1003 1009 1038 -hsync +vsync
xrandr --addmode DVI-I-1 "1600x1000"
* Problem: After nvidia drivers installation this doesn't works (crap)
$xrandr --fb 1600x1000 #show
xrandr: specified screen 1900x1000 not large enough for output DVI-I-3 (1920x1200+0+0)
xrandr: Configure crtc 0 failed
X Error of failed request: BadValue (integer parameter out of range for operation)
#or
X Error of failed request: BadMatch (invalid parameter attributes)
$xrandr --output DVI-I-3 --scale 1x0.85 #this solve after nvidia drivers installation
References:
http://ubuntuhandbook.org/index.php/2017/04/custom-screen-resolution-ubuntu-desktop/
Friday, May 04, 2018
Nvidia and Opengl doesn't works
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Prepare removing
sudo apt-get purge nvidia*
#This will remove your current nVidia driverssudo apt-get install --reinstall xserver-xorg-video-intel libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
sudo dpkg-reconfigure xserver-xorg
#This should fix Xorgsudo update-alternatives --remove gl_conf /usr/lib/nvidia-current/ld.so.conf
sudo apt-add-repository ppa:xorg-edgers/ppa
#provides the necessary repositorysudo apt-get update
sudo apt-get install bumblebee-nvidia nvidia-319 nvidia-settings-319
Monday, April 30, 2018
Thursday, April 26, 2018
My favorite Music
Ludwig Van Beethoven
Symphony No. 5 in C minor ("Fate") (composed 1804–08, premièred 1808)
Sonata N° 14 'moonlight'
Fur Elisa
Himno de la alegria
Turkish March (Adapted by Chavo del 8 program, in intro)
Wolfgang Amadeus Mozart
Turkish March
Réquiem
Antonio Vivaldi
Storm
La Stravaganza Four Season:Spring
Johan Sebastian Bach
Toccata and Fugue Ave maria
Passacaglia
Frédéric Chopin
Waltz rain
Spring waltz (Mariage d'Amour)
Antonín Dvořák
Symphony no. 9 - 4th movement - Allegro con fuoco
Wednesday, April 25, 2018
C++ equivalent to getch() and getche() from conio.h
#include <iostream> #include <termios.h> //TCSANOW, ICANON, .. #include <unistd.h> //STDIN_FILENO .. #include <stdio.h> //getchar using namespace std; char getch(void) { struct termios oldattr, newattr; char ch; tcgetattr( STDIN_FILENO, &oldattr ); newattr = oldattr; newattr.c_lflag &= ~( ICANON | ECHO ); tcsetattr( STDIN_FILENO, TCSANOW, &newattr ); ch = getchar(); tcsetattr( STDIN_FILENO, TCSANOW, &oldattr ); return ch; } char getche(void) //with ECHO { struct termios oldattr, newattr; int ch; tcgetattr( STDIN_FILENO, &oldattr ); newattr = oldattr; newattr.c_lflag &= ~( ICANON ); tcsetattr( STDIN_FILENO, TCSANOW, &newattr ); ch = getchar(); tcsetattr( STDIN_FILENO, TCSANOW, &oldattr ); return ch; } int main(int argc,char *argv[]) { char ch1=getch(); char ch2=getche(); cout << "\nFirst : " << ch1 << "\nSecond: " << ch2 << endl; return 0; } //g++ getchx.cpp -o getchx
References
[1] https://www.daniweb.com/programming/software-development/threads/410155/gcc-equivalent-for-getch
Sunday, April 22, 2018
Alternatives to shazam
[1] On web https://www.midomi.com
[2] Get song name from mp3 on web http://audiotag.info
[3] Chrome plugin https://www.aha-music.com/
Saturday, April 21, 2018
Deep Learning Lectures
References:
[1] Top ten papers https://www.techleer.com/articles/517-a-list-of-top-10-deep-learning-papers-the-2018-edition/
Friday, April 20, 2018
Printable Grid and Rulers Paper
Resources:
[1] Graph Paper, ready for print over A4 http://www.grassfedjp.com/print-grid-paper/
[2] Rulers http://leversetdujour.info/ruler-to-print.html
Monday, April 16, 2018
Monday, April 09, 2018
Linux Microphone doesn't working
Try to reload drivers
$sudo alsa force-reload
restart device and check if sound is workin? if it doesnt do this:$sudo apt-get remove --purge alsa-base pulseaudio
$sudo apt-get install alsa-base pulseaudio
References:[1] https://askubuntu.com/questions/508221/sound-input-device-microphone-not-working
Saturday, April 07, 2018
Fedora/CentOS Change ports of Apache Web Server (httpd)
1) In file /etc/httpd/conf/httpd.conf
Listen 80
Listen 8079
This till your server to listen to the port 8079
2) virtual host file /etc/httpd/conf.d/vhost.conf
<VirtualHost *:8079>
DocumentRoot /var/www/html/api_folder
ServerName example.com
ServerAlias www.example.com
ServerAdmin root@example.com
ErrorLog logs/www.example.com-error_log
CustomLog logs/www.example.com-access_log common
</VirtualHost>
This mean when you go to your www.example.com:8079 redirect to
/var/www/html/api_folder
3) Restart the service
$sudo service httpd restart
$systemctl restart httpd.service
[1] https://httpd.apache.org/docs/2.4/bind.html
Wednesday, April 04, 2018
Call using Internet (Brasil - Perú)
https://www.poptox.com/Peru
https://www.spytox.com/whose-number-is-calling-me
Subscribe to:
Posts (Atom)
-
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