Sabtu, 17 Januari 2015

Bristol Digest, Vol 585, Issue 9

Send Bristol mailing list submissions to
bristol@mailman.lug.org.uk

To subscribe or unsubscribe via the World Wide Web, visit
https://mailman.lug.org.uk/mailman/listinfo/bristol
or, via email, send a message with subject or body 'help' to
bristol-request@mailman.lug.org.uk

You can reach the person managing the list at
bristol-owner@mailman.lug.org.uk

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Bristol digest..."


Today's Topics:

1. Re: Simple script query (DHT11 Sensor) (Peter Hemmings)
2. Re: LDAP (Martin Moore)
3. Re: Simple script query (DHT11 Sensor) (James Cownie)
4. Re: Simple script query (DHT11 Sensor) (Richard Stearn)
5. Re: LDAP (Keith Edmunds)
6. Re: LDAP (Gavin Henry)


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

Message: 1
Date: Sat, 17 Jan 2015 16:57:18 +0000
From: Peter Hemmings <peter@hemmings.eclipse.co.uk>
To: Bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] Simple script query (DHT11 Sensor)
Message-ID: <54BA946E.4030605@hemmings.eclipse.co.uk>
Content-Type: text/plain; charset=windows-1252; format=flowed



On 17/01/15 16:30, James Cownie wrote:
> Searching for deciC is unlikely to be helpful, and, I think you have
> confusion between C (the language) and C (Centigrade).
>

ooooops!

> The suggestion is to use a fixed point format internally, which you
> can think of as enumerating your temperatures in 10ths of a degree
> (?deciC?) or hundredths (centiC).

OK

>
> (From a language point of view this would all be more easily done in
> C++ than C, since [aside from the fact that there are likely laready
> fixed point C++ libraries available], you can overload the operators
> on this new type, making it much easier to work with at the user
> level).

OK its all a bit over the top for me and as its only a hobby for a
retired person, I will accept the 0.3 degree inaccuracy, at least I
did make a correction!

>
> -- -- Jim -- James Cownie <jcownie@cantab.net>
>
>
>
> On 17 Jan 2015, at 16:24, Peter Hemmings
> <peter@hemmings.eclipse.co.uk> wrote:
>
>> On 17/01/15 12:13, Richard Stearn wrote:
>>> Alex Butcher (LUG) wrote:
>>>> As it is, that C source is using integer arithmetic, so it'll
>>>> need a littlebit of reworking to use float or double types for
>>>> the temperature instead.
>>>
>>> Or convert the value to deciC, centiC or milliC as appropriate,
>>> do the corrections (offset, slope, ...), sort the decimal point
>>> on output.
>>>
>>
>> As I am a beginner with "C" I do not know exactly how to do it!!,
>> I will probably do as Alex says but if you could point me to where
>> deciC etc is explained I will have a go (had a quick google with no
>> luck).
>>
>> Regards
>>
>> -- Peter H
>>
>> _______________________________________________ Bristol mailing
>> list Bristol@mailman.lug.org.uk
>> https://mailman.lug.org.uk/mailman/listinfo/bristol
>
>
> _______________________________________________ Bristol mailing list
> Bristol@mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/bristol
>

Regards
--
Peter H



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

Message: 2
Date: Sat, 17 Jan 2015 17:17:46 -0000
From: "Martin Moore" <martinm@it-helps.co.uk>
To: "'Bristol and Bath Linux User Group'" <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] LDAP
Message-ID:
<!&!AAAAAAAAAAAYAAAAAAAAAFLxZtQqo65Oo+1jhlUB9DvCgAAAEAAAAEgCy9vgvYBHvdKA20g7w3sBAAAAAA==@it-helps.co.uk>

Content-Type: text/plain; charset="us-ascii"

Great, cheers Keith.

Martin.

-----Original Message-----
From: bristol-bounces@mailman.lug.org.uk
[mailto:bristol-bounces@mailman.lug.org.uk] On Behalf Of Keith Edmunds
Sent: 17 January 2015 16:18
To: bristol@mailman.lug.org.uk
Cc: martinm@it-helps.co.uk
Subject: Re: [bristol] LDAP

On Sat, 17 Jan 2015 16:03:05 -0000, martinm@it-helps.co.uk said:

> Before I say OK and with possible similar requests from other clients
> in mind, is it possible to have multiple 'separate' LDAP
> domains/clients on one server

Yes.

> will LDAP be able to restrict access to just the web stuff

You can restrict LDAP.

> or do I need a separate server for each LDAP client?

No.
--
"A champion is someone who gets up when he can't" - Jack Dempsey


_______________________________________________
Bristol mailing list
Bristol@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/bristol
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.5645 / Virus Database: 4260/8931 - Release Date: 01/14/15




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

Message: 3
Date: Sat, 17 Jan 2015 18:21:41 +0100
From: James Cownie <jcownie@cantab.net>
To: Bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] Simple script query (DHT11 Sensor)
Message-ID: <27D01EAC-6B20-48E9-A149-761C583C8C91@cantab.net>
Content-Type: text/plain; charset="windows-1252"

> OK its all a bit over the top for me and as its only a hobby for a retired person

Don?t knock retired people! It?s approaching for me fast :-)

--
-- Jim
--
James Cownie <jcownie@cantab.net>



On 17 Jan 2015, at 17:57, Peter Hemmings <peter@hemmings.eclipse.co.uk> wrote:

>
>
> On 17/01/15 16:30, James Cownie wrote:
>> Searching for deciC is unlikely to be helpful, and, I think you have
>> confusion between C (the language) and C (Centigrade).
>>
>
> ooooops!
>
>> The suggestion is to use a fixed point format internally, which you
>> can think of as enumerating your temperatures in 10ths of a degree
>> (?deciC?) or hundredths (centiC).
>
> OK
>
>>
>> (From a language point of view this would all be more easily done in
>> C++ than C, since [aside from the fact that there are likely laready
>> fixed point C++ libraries available], you can overload the operators
>> on this new type, making it much easier to work with at the user
>> level).
>
> OK its all a bit over the top for me and as its only a hobby for a retired person, I will accept the 0.3 degree inaccuracy, at least I did make a correction!
>
>>
>> -- -- Jim -- James Cownie <jcownie@cantab.net>
>>
>>
>>
>> On 17 Jan 2015, at 16:24, Peter Hemmings
>> <peter@hemmings.eclipse.co.uk> wrote:
>>
>>> On 17/01/15 12:13, Richard Stearn wrote:
>>>> Alex Butcher (LUG) wrote:
>>>>> As it is, that C source is using integer arithmetic, so it'll
>>>>> need a littlebit of reworking to use float or double types for
>>>>> the temperature instead.
>>>>
>>>> Or convert the value to deciC, centiC or milliC as appropriate,
>>>> do the corrections (offset, slope, ...), sort the decimal point
>>>> on output.
>>>>
>>>
>>> As I am a beginner with "C" I do not know exactly how to do it!!,
>>> I will probably do as Alex says but if you could point me to where
>>> deciC etc is explained I will have a go (had a quick google with no
>>> luck).
>>>
>>> Regards
>>>
>>> -- Peter H
>>>
>>> _______________________________________________ Bristol mailing
>>> list Bristol@mailman.lug.org.uk
>>> https://mailman.lug.org.uk/mailman/listinfo/bristol
>>
>>
>> _______________________________________________ Bristol mailing list
>> Bristol@mailman.lug.org.uk
>> https://mailman.lug.org.uk/mailman/listinfo/bristol
>>
>
> Regards
> --
> Peter H
>
> _______________________________________________
> Bristol mailing list
> Bristol@mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/bristol

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.lug.org.uk/mailman/private/bristol/attachments/20150117/67089bda/attachment-0001.html>

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

Message: 4
Date: Sat, 17 Jan 2015 17:36:27 +0000
From: Richard Stearn <richard@rns-stearn.demon.co.uk>
To: Bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] Simple script query (DHT11 Sensor)
Message-ID: <54BA9D9B.2040703@rns-stearn.demon.co.uk>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Peter Hemmings wrote:
> As I am a beginner with "C" I do not know exactly how to do it!!, I
> will probably do as Alex says but if you could point me to where deciC
> etc is explained I will have a go (had a quick google with no luck).

It is a matter of how you represent the information.

One of the tricks when programming is representing the information in a
way that allows you to manipulate it simply and retain the required precision.
Hint: converting from integer to floating point involves loss of precision.
This loss of precision may or may not be important.

In your case the loss of precision is not important. Anyway, I am attempting
to explain what I mean by deciC, centiC, ....

It is a matter of how you represent the information in your program.

1.0 C = 10 deciC = 100 centiC = 1000 milliC

I have not studied what you are doing in detail, however you appear to
have two values (humidity and temperature) both represented as a byte
to the left of the decimal point and one byte to the right.

The range of the above representation potentially covers from -128.99 to
+127.99 or 0.00 to 255.99 (given the printf statement, only 0 .. 9 is used
for the decimal part). So, if you multiply the LHS by 10 and add the RHS
you have a value in deciC (10ths of a deg C).

e.g.

#define TEMP_OFFSET -27
#define MULTIPLIER 10

int deciC;

deciC = (dht11_val[2] * MULTIPLIER) + dht11_val[3];
deciC = deciC + (TEMP_OFFSET);
printf( "%d.%d\n", deciC / MULTIPLIER, deciC % MULTIPLIER );


If the RHS represented 0 .. 99 then use 100 as the multiplier and you have
a value in centiC.

Although the sensor is only rated for 0 .. 50 C, you might want to check
what the output is when you stick it in the freezer. It might just curl
up and report 0C, it might attempt to give a sane output. If it gives
something sane then you will need to account for the sign in your
manipulations.

Or. You could do as Alex suggests and use a float or double representation.
You will still need to account for sign of the temperature (if relevant).

--
Regards
Richard




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

Message: 5
Date: Sat, 17 Jan 2015 17:44:36 +0000
From: Keith Edmunds <kae@midnighthax.com>
To: bristol@mailman.lug.org.uk
Cc: martinm@it-helps.co.uk
Subject: Re: [bristol] LDAP
Message-ID: <20150117174436.7dbb8d03@ws.the.cage>
Content-Type: text/plain; charset=US-ASCII

LDAP isn't overly complex, but it does need some understanding before you
try implementing it. I'd suggest you read up on it and set it up in a test
environment first. Setting up replication and LDAPS access is a bit more
complex.

Useful tools:

- phpLdapAdmin
- ldapvi

--
"Soccer is one of those things that the rest of world cares about more
than [Americans] do - you know, like healthcare, education and gun
control" - David Letterman




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

Message: 6
Date: Sat, 17 Jan 2015 18:27:42 +0000
From: Gavin Henry <ghenry@suretecsystems.com>
To: Bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>,
martinm@it-helps.co.uk
Subject: Re: [bristol] LDAP
Message-ID:
<CAPcb_GJD0q7o6q+Z_Za0Ex3akFKwHKAEtG1WjSztTZMYRDfDfQ@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

On 17 Jan 2015 16:36, "Martin Moore" <martinm@it-helps.co.uk> wrote:
>
> I've a potential client who wishes to have a single sign on to their
system and our system using LDAP.
>

Sorry, lurker here.

Single SignOn across multiple apps isn't the same as the same username and
password to be used on different apps. Does your client understand that?

>
> We have multiple sub-domains (different clients) on one box and currently
user access is via a mysql db for each sub-domian/client.
>

What do these domains look like?

>
> Before I say OK and with possible similar requests from other clients in
mind, is it possible to have multiple 'separate' LDAP domains/clients on
one server, will LDAP be able to restrict access to just the web stuff or
do I need a separate server for each LDAP client?

You can serve as many suffixes as you like, but each needs it's own config
etc. How many do you see serving? It may be better to design your DIT to
suit this application.

OpenLDAP ACLs rule :)

Only one instance of slapd is needed, yeah.

Gavin (ghenry@OpenLDAP.org)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.lug.org.uk/mailman/private/bristol/attachments/20150117/68296378/attachment.html>

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

_______________________________________________
Bristol mailing list
Bristol@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/bristol

End of Bristol Digest, Vol 585, Issue 9
***************************************

Tidak ada komentar:

Posting Komentar