Programming :: Capturing Short Randomly Occurring Events

May 8, 2011

I want to capture short randomly occurring events such as Sudden Interstellar Disturbances, Lightning, ion counting, etc. To do this I wish to use the LINE-IN port. My sensor would feed a signal of less that 2 volts but could be submitted via a voltage divider. Since the sound card captures 44100 events per second this should capture events I am looking at, I think, but maybe not. I would capture the sound buffer to a string or memory buffer every second (and half second so I can prevent overwriting of its buffer, then merge the two).

Every 60 seconds (for validation) I would run "time" and count full buffer transfers in between to time events. By effectively counting characters from the beginning of the processing buffer to the beginning of the event I could further refine the "time to event". I think I could then save a decent number of values or until no data received from the processing buffer to preserve the event. This I would output with event time (to within 1/44100 sec) along with the data points captured to a file.

Except for the outputting of info to a file I think I can scan a buffer for events within a second (while LINE-IN continues capturing data on that port). I believe I have a way to handle the outputting. I am asking if any of the processing of the previous buffer would interfere with the sound cards data capture on LINE-IN? There would be no disabling of interrupts. I am presuming that system interrupts would not effect the LINE-IN data capture. Is this true?

View 6 Replies


ADVERTISEMENT

General :: Keyboard Activating SHIFT Randomly For A Short Time

Feb 14, 2010

I think this might be related to the changes to using udev or DeviceKit. It started when I was running the beta versions of F12. Then it crept into Debian Sid. And my Arch Testing and Gentoo also suffer from the same.

What happens is that I'll be working along. Then when I press any key it is as if the SHIFT key is pressed. When I press CAPSLOCK, some of the keys react as they would normally. This never lasts for more than 5 minutes. And seems to happen infrequently. I say seems because there are the times I am at work and it could be that the same thing is happening only there is no one on the keyboard.

The reason I pick out udev/DeviceKit is that when it used to happen to F12 beta, the other distros had not yet made the move. So back then it was only a F12 issue. Now it is happening across the board. And only started recently.

View 3 Replies View Related

Programming :: Way To Capture X Keyboard Events

Jan 8, 2010

I wonder if there is a way to caputure all X keyboard events, blocking them from going to the window with keyboard focus?

View 4 Replies View Related

Programming :: VB Scripting Worklsheet And Key Events?

Jan 18, 2011

am working an a worksheet where I need to lookup id in an other worksheet.The script works as long as I am staying on the same row. When pressing key up or enter the corresponmding lookup information is not placed on the very same row.In short terms, I want the lookup data to be enterd on the same row no matter what key I am pressing.

The script:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim cfind As Range
On Error Resume Next
If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub
thisRow = ActiveCell.Row

[code].....

This example is set to Enter key procedure. So when the enter key is pressed, my current row will change by 1 so I have to compensate for that. All I want is that the data will be correctly enterd no matter what key I am pressing.

View 3 Replies View Related

Programming :: Intercept The Mouse And Keyboard Events?

Nov 13, 2010

how to intercept the mouse and keyboard events in Linux,like hooking technique in Window ?

View 1 Replies View Related

Programming :: Simulate Key Strokes Events In Other Processes In System?

Feb 3, 2011

I have a program that receive user input.
I want to run this program automatically without user interaction, and in order to do that I need to simulate key events.
How can I do such a thing?

The program I am running is partly java and partly shell.

The shell part is easily done by using:
./prog.sh <parameters (Parameters being a file containing parameters)
But the java doesn't work similarly.

View 7 Replies View Related

Programming :: Capture/record The Keyboard And Mouse Events In Kde?

Aug 25, 2010

i want to capture the mouse events (click,double..,position ) as well as keyboard events (key strokes) for every application running separately?

View 1 Replies View Related

Programming :: Generating Keyboard Events In Shell Script

Nov 23, 2010

Is it possible to generate keyboard event "Ctrl+c" from a shell script code.? I have written a shell script to compile my application and copy it to the server home directory, inorder to run my application I need to start the server (by running a shell script). But before that I need to stop the the currently running instance of my server. To do that I have to generate a keyboard event (Ctrl+c which I press it manually). I want to automate the entire process by writing a shell script I am able to run the server just by adding ./run.sh in my shell script. But before that to stop my server can I generate a keyboard by using a shell script event(ctrL+C) to stop server.?

View 2 Replies View Related

Programming :: Capturing The Exit Status Of The Script Running In Background

Apr 10, 2010

I have a scenario where I am executing some child shell scripts in background (using &)through a master parent script.

Is there a way I can capture the exit status of each individual child script after the execution is completed.

View 7 Replies View Related

Programming :: Game Graphics Short Inquiry?

May 28, 2011

I have all of the code written for a text based game but how big of a leap is it from text to graphics? lets just say a 2d engine. Is this a fairly easy task or would it be a bit of effort? I've never done anything with graphics before and would just like a quick idea of how much of a project is graphics vs functionality.

View 5 Replies View Related

Programming :: Pthread And Mutex With Short Unlock Time?

Jun 15, 2010

I am wondering if pthread could make that a single thread keeps the "mutex" all the time if the time it remains unlocked is very small.

thread1
{
while (1)
{
lock; do_task(); unlock();

[code]...

I experiment the thread2 never getting access to the mutex and never printing the nice message. I would expect that once thread2 calls "lock", it would get the mutex as soon as thread1 calls unlock() but it does not seem to be the case. If I add a sleep of some microseconds (100) in thread1 after unlocking the mutex, it solves the problem.

Does anyone know if this behaviour is normal? Is there a way to configure my mutex so that thread2 receives it when unlocked?I use

pthread_mutexattr_settype(&att, PTHREAD_MUTEX_RECURSIVE_NP);
pthread_mutex_init(&handle, &att);

to create my mutex. I am running ubuntu 9.04

View 3 Replies View Related

Programming :: Getting A Short Shell Script Related To PIDs?

Nov 21, 2010

how can I store the output of (ty to colucix for this line)

Code:

xprop -id $(xprop -root | awk '/_NET_ACTIVE_WINDOW(WINDOW)/{print $NF}') | awk '/_NET_WM_PID(CARDINAL)/{print $NF}'

in a variable and then pass the value of that variable to the kill command as the PID to kill?

View 3 Replies View Related

Programming :: Short C++ Program Segmentation Fault. Using GCC 4.4.5 On Ubuntu 32bit?

Jun 12, 2011

I'm very excited to post a question, since I always do everything by myself. I'm reading several lines from a text file using istream::getline(char *, streamsize n). I get the file name from the command line. Here is the code:

Code:
#include <iostream>
#include <fstream>
using namespace std;
int main ( int argc, char *argv[])

[Code]...

Using GCC 4.4.5 on Ubuntu 32bit Btw: I know assembly language and know what a segmentation fault is

View 4 Replies View Related

General :: Downgrading OpenSSL On Centos - Errors Occurring

Sep 27, 2010

I recently just installed centos, but it appears that when I installed it v 0.9.8e was installed consequently, all the lib's etc. are /lib/libssl.so.0.9.8e instead of an ordinary /lib/libssl.so.0.9.8 etc. and this is causing some problems for me, as programs are looking for /lib/libssl.so.0.9.8, and even if i symlink/copy/move /lib/libssl.so.0.9.8e to /lib/libssl.so.0.9.8 there are still some errors occurring. I had been reading that supposedly yum is meant to have a "yum downgrade" option, however it doesn't appear to be recognised when I run it on my centos server.

View 2 Replies View Related

Programming :: CURL In Bash - Error "Upload Is Disabled During Short Maintenance Work (ETA 10 Minutes). Brb"

Mar 7, 2010

i'm trying to write a bash script to upload an image to [URL], but i can't get i working properly. Everytime i try, the html returns me a error saying "Upload is disabled during short maintenance work (ETA 10 minutes). Brb!", while from the browser everything works fine. This is my current command line:

Code: curl -L -b cookie-pix.txt -c newcookie.txt www.pixhost.org/cover-upload -A "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" -F 0=@/home/admin/Desktop/karm.jpg -F content_type=0 -F press=Upload And this is the html of the form:

[Code]....

View 1 Replies View Related

Programming :: Convert Short Array To Char Array?

Jun 7, 2010

I have trouble converting a short array to a char array

Code:

short pShort[4] = { 0x41, 0x42, 0x43, 0x44 };

How to convert this to a char array?

View 4 Replies View Related

Ubuntu :: "access Denied" Occurring When Tried To Change Something In The Administrator Menu?

Jan 17, 2011

I have installed KlamAV just in case and am now proceeding with scanning. However, a few directories showed up in pop-ups non-accessible and at about 5% a whole sequence of such. I also remember this "access denied" occurring when I tried to change something in the Administrator menu, although I can't remember what

View 7 Replies View Related

Programming :: Write A Program In C Which Will Generate A Maze Randomly ?

Oct 8, 2010

I want to write a program in C which will generate a maze randomly and find the solution for it ..

The idea behind is in [url]

How the 16 bit integer is stored in a variable..Earlier I wrote a program on trees and displayed it using dotty.. Is there any such tool to display a maze..I am using ubuntu 10.04.

View 1 Replies View Related

Programming :: Randomly Selecting 160 Lines Within A Data Set Of 1000 In Perl

Apr 11, 2011

I have a dataset of around 1000 lines. Out of these 1000 lines I need to pick randomly 160 lines of data and write it to a file. The program is needed to eliminate data bias when I run the program through a reanalysis program. I am thinking I need to use the rand or srand term, but I am having difficulty writing this in perl. I have to write it in perl, because the rest of my scripts for this project are in perl, so consistency is important. The data only consists of one column of the data (YYYYMMDDHHHH).

View 2 Replies View Related

Software :: Capturing SCP Output With PHP?

Jul 20, 2011

I've made a simple php wrapper around scp. It works fine, but unlike when I run the scp command straight from the console, there is no output returned. I've tried using passthru(), exec(), system() and shell_exec(), all to no avail. I'm redirecting stderr to stdout already.

For example:
PHP Code:
<?php
$command = "scp -C -r $files $target 2>&1";
exec($command, $result);
print_r($result);
?>

Will scp the files correctly to the server, but doesn't print any output - $result is just an empty array. I'd like to see the output so I can visually confirm that the files have been transferred correctly.

View 1 Replies View Related

Fedora Security :: Where Does Firestarter Get 'events'

Jul 18, 2009

Running Fedora 10 and 11. Using Firestarter firewall.Does anyone know where Firestarter gets the Events which it displays?I do not find anything in /etc/firestarter/.I suspect Firestarter looks in a log file which Fedora keeps somewhere.

View 2 Replies View Related

OpenSUSE :: Can't Audit Logout Events From Ssh Or Su In 11.0?

Feb 16, 2010

I am trying to setup auditing for NISPOM requirements using the built-in linux audit kernel which uses auditd and audit.rules for setup. I have been able to meet all other requirements, but I cannot find a way to audit user logout actions. My audit.rules file is listed below

Code:
#This file contains the a sample audit configuration intended to
# meet the NISPOM Chapter 8 rules.

[code]....

View 3 Replies View Related

Ubuntu :: Modify Events That Are Logged?

Jun 5, 2011

I was looking at my logs and was wondering what the easiest way to go about removing certain things from being logged.

For instance I noticed by default Ubuntu seems to log all network traffic and handshakes with wifi etc and I would like to keep such out of my logs.

View 2 Replies View Related

General :: Syslog Events To Identify Particular?

May 24, 2011

I know about syslog and /var/log/* log files but I don't know what kind of events means particular problem.

E.g.
- hardware issues (?)
- security problem (/var/log/security)

[code]....

View 1 Replies View Related

OpenSUSE :: KRDC Not Capturing Keys Using RDP

Jan 20, 2011

I can't seem to figure out the secret to send ctrl-alt-del to a remote Windows box using KRDC 4.4.4. Tried in windowed and full screen mode - no difference. Tried enabling "Grab All Possible Keys" in KRDC tool bar - nope. In all cases, ctrl-alt-del and alt-tab are sent to localhost. There are some mentions of a "config special keys dialog" for KDRC in a few places, though I don't actually find this anywhere in KRDC itself. Documentation for KRDC at the KDE site is very minimalistic. This should be super simple, but I can't quit seem to get it.

View 5 Replies View Related

Ubuntu :: 10.04 - Webcam Isn't Capturing Video?

May 4, 2010

Since I upgraded to 10.04 my Webcam (a logitech Quickcam Pro 4000) won't capture video.Ubuntu see it is there, but aMSN, Google Talk, Skype, and Cheese all give me nothing.

View 2 Replies View Related

General :: Capturing From Line One Input?

Apr 23, 2011

On my first card of ALSA (alsamixer -c 0) I would need to record the Line only.

View 1 Replies View Related

General :: Capturing PID And Killing Process

Oct 9, 2010

I want to capture PID of a program and kill it using the PID if the program is been executing beyond 5 seconds.The problem I'm facing is I have another copy of the same program running under different shell script, and the above code is killing both the process. How do I specifically kill the program which has started under the current running shell script.

View 2 Replies View Related

General :: Capturing URL Response Using Command

Aug 6, 2010

I am capturing the response of three URLs which are in file named urls.txt using following command and write response in output.txt file.

####Code############
wget -i urls.txt -q -O - | tee output.txt
###########End of code
Now i am finding the case where url is not responding and that output is not available to me in the file and on console i am getting "Could not connect to host".

Now I want to modify my urls.txt to have two fields:
Name and URL
Example:
URL1 | http://10.0.0.2/xsc/abc
URL2 | http://10.0.0.1/lkj/csv
URL3 | http://10.0.0.5/sdf/plk

I want to execute each url and print there response against each name
Example:
URL1 : CONNECTED
URL2 : NOT CONNECTED
URL3 : NOT CONNECTED

View 2 Replies View Related

Red Hat :: Capturing Start Up Messages In System Log

Jul 17, 2010

Is there any way to capture the "[OK]" or "[FAILED]" messages? I would like to know which daemons starts successfully and which ones fails. Any way to tell the system to save those messages in /var/log? I could do CTRL-Print Screen but I would rather not.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved