Hot answers tagged

25

You're in luck! You should try SQLite. SQLite is very lightweight and implements a large subset of SQL. Your entire database is stored on a single file. And there is a perl API. Here's a link to SQLite's homepage ... SQLite To install only SQLite ... sudo apt-get install sqlite To install the perl API and SQLite (no need for the above) ... sudo apt-...


4

Figured it out when I opened it up in a tmux window because it was getting annoying to keep killing the terminal tabs; just do a ctrl+D and that will dump you back in the shell: sqlite> select * from files where strFilename like %Recreation%'; ...> ...> ; ...> ; ...> .quit ...> ; ...> .exit ...> ; ...> ...


3

I just figured it out, what I did is I added this line Require all granted between the directory tages to the etc/apache2/conf-avilable/serve-cgi-bin.conf. Then I added the following line to the /etc/apache2/apache2.conf file: ServerName localhost Then a2enmod cgi service apache2 restart


3

Your public files are owned by root. Apache can't access it. Change the ownership so that it's owned by www-data. To restore ownership of the files in your public directories, run these: chown -R www-data /var/www chgrp -R www-data /var/www chown -R www-data /usr/lib/cgi-bin chgrp -R www-data /usr/lib/cgi-bin These will change the owner and group of the ...


3

Just use CSV. That way you can just append your data to the existing file. That way only the last block will change, resulting in fewer writes to the SD. Once the block is full, it will never be rewritten. Maybe do some logrotate to create a separate file for every day. That way any data-corruption will only mess up one day of data.


2

Here's a sample script to read an sqlite3 database using Python: import sqlite3 conn = sqlite3.connect('example.db') c = conn.cursor() for row in c.execute('SELECT * FROM led'): print row Check out the documentation, it's pretty good.


2

You should be able to continue the SQL query in the same manner and add another named placeholder with a corresponding element in the parameter dictionary. cur.execute("SELECT * FROM sensors WHERE sensor_id=:id AND group_id=:gid", {"id": subdirname, "gid": somevar})


2

PL/SQL is a proprietary language owned by Oracle Corp. This is why you only see support for it in commercial RDBMS's such as Oracle itself and IBM DB2. The latter presumably pay giant licensing fees for the privilege. Any of the above could release an ARMv7 version that might work on the Pi 2, but it seems they have not. So you are out of luck.


2

Using WiringPi: gpio readall will return the state of all of the pins.


2

Raspbmc is just Raspbian and kodi, it's already setup up for NAS and SQL, all you have to do is setup the bluetooth.


2

NOTE: This question is dangerously close to being an opinion question, which is more appropriate for Reddit. But I've tried to cast this answer as a "here's a working example". And you yourself have found another. Having recently asked myself the same question for the same reason I will share what I know. I use NodeJs because Javascript is common to front/...


2

To be able to link an SQLite3 program you need the libsqlite3 (run-time) and libsqlite3-dev (development) libraries installed. Install those with sudo apt install libsqlite-dev (which will pull in the run-time dependency).


1

I log data to an SQLite3 database on a NFS filesystem with no problems. The only rule is one writer, multiple readers (to avoid the locking/locked database problem). To enforce that my reader programs use PRAGMA query_only; There's some code at https://github.com/DougieLawson/RaspberryPi that demonstrates that.


1

As far as network file system go, reasonable options are AFAIK limited to NFS and SMB, and unless you need SMB features (like Windows compatibility) you should really go with NFS. It's much faster (and CPU time is something you'd rather spare on an RPi) and somewhat more stable than SMB. NFS v4 supports file locking. Also, Attaching a USB drive seems a ...


1

One way to do it is to specify the path of the actual file (using package SQLite.Net-PCL - You didn't say what package you are using) path = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "db.sqlite"); conn = new SQLite.Net.SQLiteConnection(new SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(), path); Print out the path somewhere and ...


1

Yes, I had deleted one user. adding the user back has solved the error. now I'll have to figure out a "safe" way to delete the user.


1

Updating to stretch solved the problem!


1

The error message is E: Cannot get debconf version. Is debconf installed? This is needed to configure installed packets. Check if it is available: rpi3 ~$ debconf --help Check if it is installed: rpi3 ~$ sudo apt update rpi3 ~$ sudo apt full-upgrade rpi3 ~$ apt list debconf If not installed: rpi3 ~$ sudo apt install debconf If installed, try to ...


1

Even if you could, why would you? If you want to work with a sqlite database you'd use a python sqlite library. Also you wouldn't want to test with kodi's sqlite database. You can create a new sqlite database by issuing the command "sqlite mydatabase.db", then create a table, and add some test data. With sqlite you can create as many databases as you want, ...


1

In the code, find the line with Temperature and remove the degree symbol so it looks like this "Temperature [C]". Could be your version of python but whatever the reason, it's unable to decode that symbol. Try searching "python can't decode 0xc2" in your favorite search engine.


1

I searched for Package 'sqlite3' must not be downloaded from pypi using DuckDuckGo and found this solution from a-team systems: The good news is there is an easy work around: enable your virtualenv to use the system’s (global) site pacakges. This is disabled by default and needs to be enabled when creating the virtualenv via: virtualenv --system-...


1

The error is pretty clear that sqlite3 should not be downloaded from pypi (this is where pip3 gets packages from by default). To install from the Raspbian repository do this: sudo apt update sudo apt install sqlite3 You can then verify it is installed and its version with the following command: sqlite3 --version You don't mention if you are using ...


1

I expect installing the PostgreSQL libraries is a requirement: sudo apt-get install libpq-dev


1

You'll need to first install the node.js package compatible with ARM: sudo apt-get update sudo apt-get upgrade wget http://nodejs.org/dist/v0.10.26/node-v0.10.26-linux-arm-pi.tar.gz tar -xvzf node-v0.10.26-linux-arm-pi.tar.gz Now add this to your .bash_profile NODE_JS_HOME=/home/pi/node-v0.10.26-linux-arm-pi PATH=$PATH:$NODE_JS_HOME/bin source From ...


1

While PHP's PDO itself extension is provided by the php5 package, not all of its database-specific drivers are. You'll have to install the PDO sqlite driver separately: sudo apt-get install php5-sqlite


Only top voted, non community-wiki answers of a minimum length are eligible