Linux-Development-Apps Digest #418, Volume #7    Sun, 20 May 01 13:13:11 EDT

Contents:
  application control by natural speech recognition via ISDN-Adapter  (Thomas Baehren)
  Re: application control by natural speech recognition via ISDN-Adapter  ("Arthur H. 
Gold")
  Re: stl header files (Markus Kossmann)
  Re: fork() in pthread (manik roy)
  Re: Advice needed. (roald osinga)
  Re: Cross compiling from Windows to Linux (Lucius Chiaraviglio)
  Re: Development tools (roald osinga)
  Re: MySQL or other database (roald osinga)
  Makefiles (roald osinga)
  chdir()... or strcat() then chdir() (manik roy)
  Re: chdir()... or strcat() then chdir() (roald osinga)
  Newbie Question (Marvin Massih)
  Re: crypt() function syntax (Aranwen)
  Re: chdir()... or strcat() then chdir() (manik roy)
  Glade program compiled error ?
  Re: chdir()... or strcat() then chdir() ("Arthur H. Gold")
  Re: Faster than strstr (Keith Thompson)
  Re: Faster than strstr (CBFalconer)

----------------------------------------------------------------------------

From: Thomas Baehren <[EMAIL PROTECTED]>
Subject: application control by natural speech recognition via ISDN-Adapter 
Date: Sun, 20 May 2001 07:34:24 +0200

I want to control some applications by calling my linux-computer via
phone and posting commands with natural speech.
The overall design could look like this:

ISDN-Driver  <-Interface 1-> phone call handler  <-2->  speech
recognition and command generation <-3-> command receiver in application

Description:
- The phone call handler is waiting for calls and handling them (pick
up, etc.). Via Interface 1 a data stream representing the callers talk
(format could be raw digital sound data with 8 kBit sampling frequence
etc.) is handed over to a speech recognition module.
- The speech recognition module should detect single words out of a set
of approx.100. The result should be handed over as a stream of
Identifier to the command receiver module (e.g. the parser) in the
application.

My questions:
- Where can I get information about the ISDN-Application-Interface on
the above mentioned level? (I'm using a recently purchased Fritz!
PCI-ISDN-Adapter).
- Is a module for speech recognition available to solve to problem?

Thanks for help.
Thomas


------------------------------

Date: Sun, 20 May 2001 01:13:44 -0500
From: "Arthur H. Gold" <[EMAIL PROTECTED]>
Subject: Re: application control by natural speech recognition via ISDN-Adapter 

Thomas Baehren wrote:
> 
> I want to control some applications by calling my linux-computer via
> phone and posting commands with natural speech.
Way cool.
> The overall design could look like this:
> 
> ISDN-Driver  <-Interface 1-> phone call handler  <-2->  speech
> recognition and command generation <-3-> command receiver in application
> 
> Description:
> - The phone call handler is waiting for calls and handling them (pick
> up, etc.). Via Interface 1 a data stream representing the callers talk
> (format could be raw digital sound data with 8 kBit sampling frequence
> etc.) is handed over to a speech recognition module.
> - The speech recognition module should detect single words out of a set
> of approx.100. The result should be handed over as a stream of
> Identifier to the command receiver module (e.g. the parser) in the
> application.
> 
> My questions:
> - Where can I get information about the ISDN-Application-Interface on
> the above mentioned level? (I'm using a recently purchased Fritz!
> PCI-ISDN-Adapter).
I did a Google search with the following key:

linux +"ISDN interface"

and there were several hits (many seem to duplicates or near duplicates)
Check them out.

> - Is a module for speech recognition available to solve to problem?

Similarly with:

speech recognition +"open source"

Search engines are your friend!
[well, they're a start anyway]

HTH,
--ag
-- 
Artie Gold, Austin, TX  (finger the cs.utexas.edu account for more info)
mailto:[EMAIL PROTECTED] or mailto:[EMAIL PROTECTED]
--
I am looking for work. Contact me.

------------------------------

From: Markus Kossmann <[EMAIL PROTECTED]>
Subject: Re: stl header files
Date: Sun, 20 May 2001 07:09:51 +0200

Charles Herman wrote:
> 
> How can I find out in which directory g++ is looking for STL header
> files?
> 
A "g++ -v some_source.C" will tell you the searched directories. So will
get a list like that:
[...]
GNU CPP version 2.95.3 20010315 (SuSE) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/g++
 /usr/local/include
 /usr/lib/gcc-lib/i486-suse-linux/2.95.3/include
 /usr/include
End of search list.
[...] 

-- 
Markus Kossmann                                    
[EMAIL PROTECTED]

------------------------------

From: [EMAIL PROTECTED] (manik roy)
Subject: Re: fork() in pthread
Date: 19 May 2001 23:55:12 -0700

"Wong Ka Chun" <[EMAIL PROTECTED]> wrote in message 
news:<9e31ev$hf4$[EMAIL PROTECTED]>...
> Hi,
> 
>   I have a problem that my program crash randomly. My program create threads
>

Don't create the thread. fork() first then run execve(), and waitpid().
hope it will work.


================
[EMAIL PROTECTED]
================

------------------------------

From: roald osinga <[EMAIL PROTECTED]>
Subject: Re: Advice needed.
Date: Sun, 20 May 2001 09:35:18 +0200



David Kistner schrieb:
> 
> I need advise.
> 
> I am using Microsoft Frontpage 2000, Access 2000 and Visual Basic 6 to
> manage databases and develop/manage multiple database driven websites.  I'm
> locked into the Microsoft world at work, but want to escape Microsoft for
> the sites I manage on my own from home.  These sites are for non-profit
> groups and frankly I can't afford to keep up with Microsoft's prices for the
> web dev products.
> 
> 1.  I want to try Linux but am bewildered by the different Linux offerings.
> What Linux O.S. should I try?
> 
> 2.  What web tool could replace my Frontpage, or is there anything like
> this?
> 
> 3.  What database could replace my Microsoft Access 2000?
> 
> 4.  What programming language would you recommend to replace Visual Basic?
> 
> Any additional advice would be greatly appreciated.  I'm very very
> disillusioned with Microsoft and would like to escape to a better world - I'
> m hoping it's Linux.

I saw to options indication Python. I've no experience with them, but
what about Java? It's a fairly easy programming language. ok, a bit more
difficult than VB, but once you know it you save development time. And
since it is cross platform and database independant, you can f.i. start
with it within a known environment and then 'port' it to another os. In
theory, you won't need to port and you can focus on other specifics for
the other platform.
when you need to lear:
- new os
- manual html layout
- new database
- new lanuage
The it will be most easy to do it in steps. I think you should switch to
another language first because vb really is a pain in the ass - You will
agree when you know some other languages. Then maybe mysql, i think it
is possible to run it under windows. The learn how to do your own html
layout. (that pretty easy). ohh, you can use netscape composer for that
one too.
And last but not least, the big step...
Another os.
I hope you will not find to much difficulties during you migration.

------------------------------

From: [EMAIL PROTECTED] (Lucius Chiaraviglio)
Subject: Re: Cross compiling from Windows to Linux
Reply-To: [EMAIL PROTECTED]
Date: Sun, 20 May 2001 08:09:17 GMT

Daniel Lux <[EMAIL PROTECTED]> wrote:
>jacob navia wrote:
>> "Daniel Lux" <[EMAIL PROTECTED]> wrote in message
>> news:9e0ae8$dsq$[EMAIL PROTECTED]...
>>> We are using a cvs like system in our company wich runs under windows only,
>>> we are now developing programs for linux and would like to cross compile
>>> under windows to linux.
>>> I already took a look at cygwin, but could not see any switches for cross
>>> compilation to linux.
>>> Are there any other compilers which can run under windows/dos and that
>>> can cross compile to linux or does any one know what the switches are for
>>> cygwin?
>>
>> [. . .]
>> 2) The object format is ELF under Linux, PE under windows. This *could* be
>> done by a cross-compiler, but you would have to get all linux libraries
>> under windows, to be able to link the program. This is not difficult
>> (storage is now cheaper), but there is no software now that does this;
>> you would have to port all the binutils to windows first.
>> [. . .]
> 
>I do not intend to run the compiled program under windows, I only want to 
>compile under windows.  
>All the binutils are already ported in the form of cygwin.
>It is exactly the cross compiler that you mentioned that I am looking for.
>I do not need both OS'es on one machine as the linux program will run on a 
>dedicated linux machine.

        Also, I have seen a Blue Cat Linux software box (not yet opened) that
claims to be for building Linux targets on a Windows host.  I haven't tried
this myself.  Strangely, the Blue Cat Linux site (http://www.lynuxworks.com/)
seems to make no mention of this, and only lists Red Hat and TurboLinux hosts.

-- 
Lucius Chiaraviglio
New e-mail address is approximately:  [EMAIL PROTECTED]
To get the exact address:                         ^^^^^^^^^^^^^^^^^
Replace indicated characters with common 4-letter word meaning the same thing
and remove underscores (Spambots of Doom, take that!).

------------------------------

From: roald osinga <[EMAIL PROTECTED]>
Subject: Re: Development tools
Date: Sun, 20 May 2001 11:21:00 +0200

Well, I think it's going to be difficult, but ok.
I would to it in two steps:
the qt-library is both available for Linux as well as for Windows. This
way you can first port the UI part of your application.
Then switch to Linux. (Most devellopers use Debian I heard.)
And a very mature IDE is -however prety young- KDevelop. This is a very
promissing project.
But Remenber well, the way threads work are different under linux.
MAYBE it's faster to use your experience of you devellopment and build
fram scratch. When building reuse as many sources as possible.

"Bourgeon Stéphane" schrieb:
> 
> I have to move a Microsoft Windows (NT 4.0) application to Linux.
> This multi-threading application has an MMI (displaying bitmaps, using tabs)
> and it's running on a bi-processors machine.
> 
> What tools can I use to realize this porting ?
> - Linux version,
> - Development tool (as Visual C++ ???),
> - Graphic libraries,
> - Powerful debugger (multi-threading).
> 
> Thanks.

------------------------------

From: roald osinga <[EMAIL PROTECTED]>
Subject: Re: MySQL or other database
Date: Sun, 20 May 2001 11:26:59 +0200

MySQL is a good database. There are multiple frontends available. Suse
comes with one for KDE, UBT since i'm currently loggid in under Windows,
i can't tell you the name of the application. :(
there also exists a crossplatform crossdatabase gui written in java.
(don't know this name either, but have a look on sourceforge.net or
freshmeat.net)

Cheng Huang schrieb:
> 
> I want to choose a simple database, which can support GUI client, like
> 
> tcl/tk, so that I can write a small application for myself. Does anybody
> 
> have suggestions? Thanks.
> 
> -- Cheng

------------------------------

From: roald osinga <[EMAIL PROTECTED]>
Subject: Makefiles
Date: Sun, 20 May 2001 11:31:06 +0200

Hi there,

is there anybody who can provide me a link to a kind of Makefile HOWTO.
I want to UNDERSTAND how to and why in this way build correct makefiles
and provide a configure.

cheers,
Roald

------------------------------

From: [EMAIL PROTECTED] (manik roy)
Subject: chdir()... or strcat() then chdir()
Date: 20 May 2001 03:03:41 -0700

can anyone tell me which one would be better?

for ( i = 0; i < at least 1000 times; i++ ) {
        chdir() 4 times then reading of the dir content
        or,
        strcat() of the whole string of dir name, 
        then chdir().
}

thanks in advance.

================|
[EMAIL PROTECTED] |
================|

------------------------------

From: roald osinga <[EMAIL PROTECTED]>
Subject: Re: chdir()... or strcat() then chdir()
Date: Sun, 20 May 2001 12:11:27 +0200

well with a loop of "at least 1000 times", you can measure it. and if
not do it 100000 times ;-)
I GUESS the latter will be the fastest.

manik roy schrieb:
> 
> can anyone tell me which one would be better?
> 
> for ( i = 0; i < at least 1000 times; i++ ) {
>         chdir() 4 times then reading of the dir content
>         or,
>         strcat() of the whole string of dir name,
>         then chdir().
> }
> 
> thanks in advance.
> 
> ----------------|
> [EMAIL PROTECTED] |
> ----------------|

------------------------------

Date: Sun, 20 May 2001 12:32:56 +0200
From: Marvin Massih <[EMAIL PROTECTED]>
Subject: Newbie Question

Hi!

In school, we have a computer that is behind a firewall we don't have
access to. However, I want to administrate that computer remotely.
So I wrote a program that is to execute commands from emails. Most of it
was taken from the libmutt pop.c.
But my program was incredibly slow. To me it seemed like that was due to
read(). So I made the socket non-blocking.
But now I get one inverse question mark ( printf("%d", ch) prints "-65")
and then "EOF" is printed.
Here's the code (the printf()'s are just debug messages).

int main()
{
  //...
  if(fcntl(socket, F_SETFL, O_NONBLOCK) != 0){
    printf("Damn! Couldn't set non-blocking flag: %s\n",
strerror(errno));
    exit(1);
  }
  //...
}

int timeout = 10;
int timed_out = 0;

void on_timeout(int sig)
{
  timed_out = 1;
}
 
int get_line(int fd, char *s, int len)
{
  char* old;
  char ch;
  int bytes = 0;

  old = s;

  if(fcntl(fd, F_GETFL) & O_NONBLOCK){
    ssize_t r;
    timed_out = 0;
    signal(SIGALRM, on_timeout);
  set_timeout:
    alarm(timeout);
    while(!timed_out){
      if((r = read(fd, &ch, 1)) > 0){
        printf(">%c\n", ch);
        if(ch == '\r'){
          goto set_timeout; //we don't want "\r\n" but just "\n"
        }
        *s++ = ch;
        bytes++;
        if(ch == '\n'){
          *s = 0;
          printf("I've got: \"%s\"\n", old);
          return bytes;
        }
        /* make sure not to overwrite the buffer */
        if(bytes == len - 1){
          *s = 0;
          printf("I've got: \"%s\"\n", old);
          return bytes;
        }
      }else if(r == -1){
        if(errno == EAGAIN){
          printf("Again!\n");
          continue;
        }else{
          alarm(0);
          timed_out = 0;
          printf("-1 Bytes\n");
          return -1;
        }
      }
      *s = 0;
      alarm(0);
      timed_out = 0;
      printf("EOF\n");
      return -1;
    }
    *s = 0;
    alarm(0);
    timed_out = 0;
    printf("Timeout\n");
    return -1;
  }else{
    while(read(fd, &ch, 1) > 0){
      if(ch == '\r'){
        continue; //we don't want "\r\n" but just "\n"
      }
      *s++ = ch;
      bytes++;
      if(ch == '\n'){
        *s = 0;
        printf("I've got: \"%s\"\n", old);
        return bytes;
      }
      /* make sure not to overwrite the buffer */
      if(bytes == len - 1){
        *s = 0;
        printf("I've got: \"%s\"\n", old);
        return bytes;
      }
    }
    *s = 0;
    printf("EOF\n");
    return -1;
  }
}

TIA

Marvin <[EMAIL PROTECTED]>

------------------------------

From: Aranwen <[EMAIL PROTECTED]>
Subject: Re: crypt() function syntax
Date: Sun, 20 May 2001 10:30:05 -0000

Ok i'm sorry i know that was really stupid but i stayed up until 2 in the
morning and i was kind of dizzy. I'm sorry i even posted that.
I've only been studying C for 3 months now but be sure i know at least the
%s and %d etc.. :)
Thanks for all your help either way.

-Lady Aranwen

--
Posted via CNET Help.com
http://www.help.com/

------------------------------

From: [EMAIL PROTECTED] (manik roy)
Subject: Re: chdir()... or strcat() then chdir()
Date: 20 May 2001 06:12:39 -0700

roald osinga <[EMAIL PROTECTED]> wrote in message 
news:<[EMAIL PROTECTED]>...
> well with a loop of "at least 1000 times", you can measure it. and if
> not do it 100000 times ;-)
> I GUESS the latter will be the fastest.
> 
> manik roy schrieb:

what does <schrieb> mean?
thanks for your guess!

------------------------------

From: <[EMAIL PROTECTED]>
Subject: Glade program compiled error ?
Date: Sun, 20 May 2001 13:17:24 +0000 (UTC)

When I compiled the glade programe, it shows the error messages:

/usr/bin/ld: cannot find -ldb1
collect2: ld returned 1 exit status
make[2]: *** [calc] Error 1
make[2]: Leaving directory `/root/Projects/calc/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/Projects/calc'
make: *** [all-recursive-am] Error 2

I don't know what is the problem ? Please Help me. 
Thanks. Best Regards, Jackie.

PS. I make sure the libdb1.so.2 library is installed well.
    And the library path is correct in the /etc/ld.so.conf. 



------------------------------

Date: Sun, 20 May 2001 11:39:16 -0500
From: "Arthur H. Gold" <[EMAIL PROTECTED]>
Subject: Re: chdir()... or strcat() then chdir()

manik roy wrote:
> 
> roald osinga <[EMAIL PROTECTED]> wrote in message 
>news:<[EMAIL PROTECTED]>...
> > well with a loop of "at least 1000 times", you can measure it. and if
> > not do it 100000 times ;-)
> > I GUESS the latter will be the fastest.
I would be quite surprised if it weren't. The overhead of a system call
(chdir() itself is a library function that wraps a system call), i.e.
having to trap into the kernel from user space and return, is likely to
be considerable, at least in relation to a (pretty much) trivial
userland call.
> >
> > manik roy schrieb:
> 
> what does <schrieb> mean?
"wrote"
[and this comes from a stereotypically nearly monolingual 'murkin]

> thanks for your guess!

HTH,
--ag

-- 
Artie Gold, Austin, TX  (finger the cs.utexas.edu account for more info)
mailto:[EMAIL PROTECTED] or mailto:[EMAIL PROTECTED]
--
I am looking for work. Contact me.

------------------------------

Subject: Re: Faster than strstr
From: Keith Thompson <[EMAIL PROTECTED]>
Crossposted-To: comp.lang.c.moderated,comp.lang.c
Date: 20 May 2001 16:41:58 GMT

[EMAIL PROTECTED] (mmf) writes:
[...]
>         case 'pl': switch (character) {
>             case 'p': state = 'p'; continue;
>             case 'o': state = 'plo'; continue;
>             case 'u': state = 'plu'; continue;
>             default: state = 0; continue;
>         }
[...]

Multi-character constants like 'plu' are non-portable.  Since all you
really care in this case about is uniqueness, it makes more sense to
use an enum.

-- 
Keith Thompson (The_Other_Keith) [EMAIL PROTECTED]  <http://www.ghoti.net/~kst>
San Diego Supercomputer Center           <*>  <http://www.sdsc.edu/~kst>
Cxiuj via bazo apartenas ni.
-- 
comp.lang.c.moderated - moderation address: [EMAIL PROTECTED]

------------------------------

Subject: Re: Faster than strstr
From: CBFalconer <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Crossposted-To: comp.lang.c.moderated,comp.lang.c
Date: 20 May 2001 16:42:03 GMT

mmf wrote:
> 
> In article <[EMAIL PROTECTED]>, DB <[EMAIL PROTECTED]> wrote:
> 
> >My current project for SPI Dynamics made extensive use of the strstr()
> >function to detect malicious activity in web server log files. The
> >performance of that search routine was quite a bottleneck while LogAlert
> >was detecting exploit strings. The strstr() function seemed to be part
> >of the problem, I had to find a way to speed things up.
> 
> why not move laterally? instead of a faster way to repeatedly scan text
> why not find a way to scan text once

A technique used in ID2ID (to replace id strings in multiple
source files in one pass) inputs the candidate strings and forms a
binary tree.  It uses an AVL tree to avoid imbalance, but could
also use red-black trees.  Having formed that, a single pass
through the source extracts each possible identifier and does a
rapid binary search.  If not found the original identifier is
output, otherwise the replacement.

There are complexities in ID2ID to avoid replacing strings with
identifiers that are already in the source and other anomalies,
none of which applies to a simple search.

Look up Ben Pfaffs libraries for AVL and Red-Black trees in
standard C.  

In your case things should be especially simple because the input
set of strings is relatively unchanging.

-- 
Chuck F ([EMAIL PROTECTED]) ([EMAIL PROTECTED])
http://www.qwikpages.com/backstreets/cbfalconer :=(down for now)
   (Remove "NOSPAM." from reply address. my-deja works unmodified)
   mailto:[EMAIL PROTECTED]  (for spambots to harvest)
-- 
comp.lang.c.moderated - moderation address: [EMAIL PROTECTED]

------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list by posting to the
comp.os.linux.development.apps newsgroup.

Linux may be obtained via one of these FTP sites:
    ftp.funet.fi                                pub/Linux
    tsx-11.mit.edu                              pub/linux
    sunsite.unc.edu                             pub/Linux

End of Linux-Development-Apps Digest
******************************

Reply via email to