I want to read content from a web page and store it in a string array using the programming language Gambas (a BASIC language used on Linux).
Eventually I could program it in C/C++ and call the routine from Gambas.
I have a technical room in my flat where I have (among other things) two meters counting the use of hot and cold water.
To automate the task of reading these counters I want to use a Raspberry PI model 3 with a camera module, controlling the process from an app on my Android phone - or from my Linux PC as well.
The two meters are placed in the inner part of the room, and because I'm a little short of space in my flat I need to put up a wall (to be easily removed when needed) so that I could use the rest of the room for storing goods.
To be able to read the meters after setting up the walls I need some sort of light source connected to my rp model 3 (preferably using the GPIO-contact) which could be controlled by software.
Does anyone know about a ready-made solution which I could use ? I don't want to use much time to make something of my own.. :-)
I did this project in Gambas because it was the easiest way for me to get it "on the run" so that I could use it as fast as possible.. :-)
The program I'm developing does all the job for me so that I can deliver my systems for soccer betting whenever I want (and it is the first program of it's kind which is written exclusivly for the Linux platform).
GAMBAS is an excellent tool to get things running in a fast way. Maybe I'll transform it to C++ sometime in the future.
And I'm not a student. In fact I had to retire from work 5 years ago due to health problems, and before that I worked 25 years in the IT-industry. Mainly on support, but also on network and security. And programming has been my hobby for years...
I wondered if it was correct to use the terms "permutations" and/or "combinations" in this question, but I had to name it something.. .:-)
So I think I'll go further with the "brute force" method, and then try to refine it if I find some pattern I could follow..
This project is about doing predicitions for soccer games (which could have three outcomes: home win, draw or away win, hence using the terms 4-2-1 which again could be regarded as octal values => binary: 100 - 010 - 001). In my country we have the possibility to bet for 12 games three times a week, both fulltime or halftime. 12 games with 3 outcomes gives 3^12 possible results ==> 531 441. And usually there is cash prizes if you have 12, 11 or 10 correct results... :-)
Most of my program is already finished (for the moment I'm using Gambas as programming language), but this challenge is really a challenge..
Let's call the maximum number of permutations for A, and the subset I'm looking for B.
(In my example A equals 81 combinations, and B equals 9 combinations).
A is known, but B is unknown.
(In my example I used an "old" and well-known "solution").
Then I'll have to pick the first combination in A and find out which other combinations fullfills the requirement.
Let's call these other combinations C.
So I must exclude the C combinations from A, and find the next combination in A which could be used to check the remaining combinations (and so on).
But then again: How will I know that this will give me the minimum number of combinations ? It's not given that I should start with the first combination in A.. (And what a large job this would be if I tried to run 12 outcomes with 3 states for each: 3^12 = 531 441 combinations..)
So I really need some other thoughts on this...
(NOTE: I did a typo error in my last post: It's 3^4 = 81 combinations, not 4^3.. )
I know permutation, and I know how to calculate permutations. The question is HOW to find the combinations which gives me 2 out of 3 for each of them in the example above.
If you have 4 outcomes with 3 states each you have 4^3 = 81 different combinations.
Mathematically you need 81 / 9 = 9 combinations to fullfill this requirement to give you 3 out of 4 correct states.
If you use 4, 2 and 1 as the different states you have these 9 combinations which gives you 3 out of 4 states no matter which of the 81 different combinations you try...
I have an outcome (O) which could have three states: octal 4, octal 2 or octal 1.
With three such outcomes I have 27 combinations.
The challenge is to find an algorithm which gives me the minimum number of combinations (NK) which always gives me minimum 2 of 3 states correct.
An example: The combinations 4-4-4 covers the following combinations: 4-4-4, 4-4-2, 4-2-4, 2-4-4, 4-4-1, 4-1-4, 1-4-4 given this requirement.
Mathematically this could be done with only 4 combinations, but how do I find them ???
(The total challenge covers 2-3 states and up til 12 outcomes).
Now it's working!
1) I switched from line input to microphone input.
2) In PulseAudio Volume Control I adjusted the volume of the Front Mic (which I'm using) so that the Silence meter is set as low as possible.
Then I got rid of that annoying noise in the speakers.. :-)
3) Then I started QJackCtrl-panel, started the Jack Server and choose the Audio tab.
4) There I found "system" under both "Readable Clients/Output ports" and "Writeable Clients/Input Ports". When I expand both of them I found the following:
Readable Clients/Output ports:
Writeable Clients/Input ports:
5) By connecting capture_1 with playback_1 and playback_2 I got the sound out of my speakers AND I was able to record the sound in Audacity. :-)
6) The settings in Audacity was straightforward:
JACK Audio Connection Kit
2 (Stereo Recording Channels)
7) But I lost the ability to record from streaming output like i.e. Spotify or YouTube. Any suggestions ?
I have a pretty modern desktop PC with both input and output lines so the hardware should be good enough.
Since I've managed to get the sound through from my cassette player/recorder to my speakers there might be a hope that I could fix the rest as well. I'll dive into both PulseAudio and JACK documentation to see what I can get out of it.
I've been using Audacity to record from Spotify, YouTube and other sources in the past so I know the program pretty well. But I have never succeeded in recording using line in as source.
I loaded the pulseaudio-loopback module using the command 'pactl load-module module-loopback latency_msec=1'
and then I'm able to hear the sound from my cassette record in my speakers with a bit of (well, a lot of..) noise.
I'll look at it tomorrow. Now it's time to bed here in Europe.. :-)))
I want to use my Linux Mint 18 (kernel version 4.4.0-62) computer to record music/recordings from (old) cassette tapes to disk using Audacity version 2.1.2.
I'm using a cable between the headphone output of the cassette recorder to the input line of my computer, and I want to be able to monitor the recordings through the speakers connected to the computer.
Linux Mint comes with ALSA and PulseAudio as standard, but I have also installed Jack2 as an alternate sound server.
But what do I do know ? Is it possible to use ALSA and PulseAudio to solve this task or should I use Jack2 alone or somehow together with PulseAudio ?
And how do I set up my system to make this work ?
When I want to use Firefox with the KeePass Password Manager I have the KeeFox add-on.
But it there anything similar to use if you want to integrate your KeePass password database with the new Microsoft Edge browser,
or is it another way to do it ?
I have been in the business for so long that I KNOW that content you don't have backup of will be lost - sooner or later.
Today I use one of my 3TB drives mainly for storing TV shows recorded from my satelite desktop box (and the disk is nearly full).
I can afford to lose that one.. :-)
The second one is used for storing downloads, documents, my e-mail archive for Thunderbird and other important stuff.
I'm going to backup it to different external HDDs and cloud storage. This is the important part for me..
So yes: I'm aware of the risks...
(and I should be as an CISSP..)
SSDs are practically noise free, but they are not cheap - especially if you want much storage ( > 2 TB).
I need the 6TB diskspace, but can't afford to buy 3 x 2TB SSDs (as an example).. :-)
Thanks for your interest, anyway... :-)
Well, it's not that important... I won't use my time (and money) to create a unique solution "all by myself".
So if there's no off-the-shelf solution available I think I rather drop it and use the built-in brackets in my PC case.
(The idea was that by mounting the HDD on a PCI-e expansion card the noise from the HDD would be lower than by using the mounting brackets in the PC chassis itself. But I might be wrong on that as well...).
I have built a new desktop machine running Ubuntu 15.10 (Cinnamon/GNOME desktop) with the following spec:
(Tried to use Linux Mint 17.3, but it had no support for Skylake Graphics out-of-the box).
32 GB RAM (will be expanded to 64GB as soon as I can afford it.. :-) )
250 GB Samsung EVO SSD
2 x 3TB HDD (Toshiba and Seagate Barracuda)
550W PSU (Cooler Master G550M)
Obviously when I removed the HDDs the system was practially noiseless, but when adding the HDDs it was not noiseless anymore... :-(
The noise is by no means very disturbing, but compared to a system with only SSD-disk(s) it's noticeably.
At this point I was wondering if it was possible to put the HDDs on an PCI-express card (with SATA-connections).
(Sorry if my English/American language is not perfect. It's ...
Does anyone know if there is an internal PCI-express card on the market with SATA-connections where you could put your old 3.5'' HDDs ?
There are a lot of SSDs on the market for this purpose, but I have some special needs.. :-)
I am connected to my internet router and my satelite set-top box using TP HomePlugs. My desktop computer is on the first floor, while my router and set-top box are on the ground floor.
Sometimes I loose connection to my router, but not my set-top box. The ethernet interface still works, but ping and packets are not travelling to my router. In such cases I have to wait to see if the problem solves itself, or I have to reset the HomePlug connected to my internet router.
My internet router also has wireless capability, and so I'm using a D-Link DWA-140 USB stick to connect to it using the wireless connection.
I was thinking of using the bonding function in Linux to try to solve this problem by bonding my ethernet and wireless interface. But it seems to me that this will only work if the ethernet interface is physically stopping (or is being disconnected).
So: Is there anyone who can point me in any direction which could help me with my problem ?
If I ping a certain host on the internet and this host is not responding (it's a name server belonging to a central Internet provider in my country so it's not very likely that it will not be available...)
then connection via the TP HomePlug is lost, and I want to use the WiFi-connection.
One way to do this is to delete the default route (which is routed via the ethernet interface) and define it ...
I need some help in deciding which mobo/cpu to choose.
My requirements are:
1) Preferable Intel CPU (4 cores) which should be able to address 64GB RAM.
2) 64 GB RAM onboard (4 slots -> 16 GB DIMM ?)
3) Support for USB 2.0 and USB 3.0 (and maybe 3.1 as well)
4) HDMI/DVI onboard
5) 6 or more SATA3 or better connections
6) ATX form factor
And of course at an affordable price... (I live in Norway)..
I'm not into gaming or video editing, but I want to be able to run some virtual machines along with my host system (which will be Linux : either Linux Mint or Ubuntu).
I'm searching for a user-friendly tool (preferable with a GUI) which could help me convert my system partition (ext3/ext4) on my Linux Mint
installation to a VirtualBox or VMWare HDD (VDI).
It should run on Linux Mint 17, and be able to do the conversion while the system is running.. :-)
My main goal is to free space on my office desktop.
Then I want to be able to test different flavours of OS'es in a "real" environment.
But of course: I could use this system as a desktop PC, and use host virtualization instead.. :-)
(BTW: VirtualBox only supports four CPU-cores as far as I know..).