f

#### First things first

```Firstly I would like to thank everyone who contributed to the creation of
the function I have been working on.

The function I have so far is this.

Private Function Sbox0(dword As Long) As Long
Dim x(0 To 3) As Byte
Dim ROW as Byte 'This is a 2 bit value.
Dim COLUMN as Byte 'This is a 6 bit value.
Dim VALUE as Byte 'this is a 6 bit value.
Const M_TOP As Byte = &H80
Const M_BOTTOM As Byte = 1
Const M_MIDDLE As Byte = &H7E

Call CopyMemory(x(0), dword, 4)

x(0) = ((x(0) * (2 ^ 1)) Mod (2 ^ 8)) + ((x(0) * (2 ^ 1)) \ (2 ^ 8))
ROW = (x(0) And M_TOP) / 64 Or (x(0) And M_BOTTOM)

Select Case ROW
Case Is = 0: ROW = 3
Case Is = 1: ROW = 2
Case Is = 2: ROW = 1
Case Is = 3: ROW = 0
End Select

COLUMN = (x(0) And M_MIDDLE) / 2
VALUE = S0(ROW,COLUMN)
'Code here for reconstructing the byte by substituting the middle 6 bits
with VALUE, and flipping the most significant and least significant bits.

....
....
....

Call CopyMemory(dword, x(0), 4)
Call CopyMemory(Sbox0, dword, 4)
End Function

What I require to finish this function and the others like it is a way to
substitute bits 2-7 and flip bits 1 and 8 without breaking the byte down
into binary.  What I mean by flipping a bit is 0 becomes 1 and 1 becomes 0.
Is this possible? I will gladly post the finished function if peopel would
like to review, comment, or suggest optimizations.

```
 0
10/19/2008 7:07:58 AM
comp.lang.basic.visual.misc 10153 articles. 0 followers.

10 Replies
958 Views

Similar Articles

[PageSpeed] 28

```Antony Clements wrote:
>
> What I require ... is a
> way to substitute bits 2-7 and flip bits 1 and 8 without breaking
> the byte down into binary.  What I mean by flipping a bit is 0
> becomes 1 and 1 becomes 0. Is this possible?

OutByte = InByte Xor &h81

This inverts the outer bits while preserving the inner ones.

You could use Not, Or, And to create a more complex but also more
flexible version of the same thing:

OutByte = (Not Inbyte And &h81) Or (Inbyte And &h7E)

--
Jim Mack
MicroDexterity Inc
www.microdexterity.com

```
 0
no-uce-ube (50)
10/19/2008 11:09:10 AM
```"Jim Mack" <no-uce-ube@mdxi.com> wrote in message
news:zeWdnQJIWffKiGbVnZ2dnUVZ_sjinZ2d@giganews.com...
> Antony Clements wrote:
>>
>> What I require ... is a
>> way to substitute bits 2-7 and flip bits 1 and 8 without breaking
>> the byte down into binary.  What I mean by flipping a bit is 0
>> becomes 1 and 1 becomes 0. Is this possible?
>
> OutByte = InByte Xor &h81
>
>
> This inverts the outer bits while preserving the inner ones.
>
> You could use Not, Or, And to create a more complex but also more
> flexible version of the same thing:
>
> OutByte = (Not Inbyte And &h81) Or (Inbyte And &h7E)
>
> --
>    Jim Mack
>    MicroDexterity Inc
>    www.microdexterity.com

Thanks Jim but what about the substitution of the middle bits?

```
 0
10/19/2008 11:24:57 AM
```"Antony Clements" <antony.clements@bigpond.com> wrote in message
news:dOEKk.6777\$sc2.5269@news-server.bigpond.net.au...
>
> "Jim Mack" <no-uce-ube@mdxi.com> wrote in message
> news:zeWdnQJIWffKiGbVnZ2dnUVZ_sjinZ2d@giganews.com...
>> Antony Clements wrote:
>>>
>>> What I require ... is a
>>> way to substitute bits 2-7 and flip bits 1 and 8 without breaking
>>> the byte down into binary.  What I mean by flipping a bit is 0
>>> becomes 1 and 1 becomes 0. Is this possible?
>>
>> OutByte = InByte Xor &h81
>>
>>
>> This inverts the outer bits while preserving the inner ones.
>>
>> You could use Not, Or, And to create a more complex but also more
>> flexible version of the same thing:
>>
>> OutByte = (Not Inbyte And &h81) Or (Inbyte And &h7E)
>>
>> --
>>    Jim Mack
>>    MicroDexterity Inc
>>    www.microdexterity.com
>
> Thanks Jim but what about the substitution of the middle bits?

It is often helpful to get a visual display of what is
happening with byte/bit manipulation.

Debug.Print Byte2Bits(&H7E) '01111110
Debug.Print Byte2Bits(&H81) '10000001
Debug.Print Byte2Bits(ClearOuter(&HFF)) '01111110
Debug.Print Byte2Bits(FlipOuter(&H7E)) '11111111
Debug.Print Byte2Bits(SetOuter(0)) '10000001
Debug.Print Byte2Bits(ClearInner(&HFF)) '10000001
Debug.Print Byte2Bits(FlipInner(0)) '01111110
Debug.Print Byte2Bits(SetInnerVal(&H81, &H18)) '10011001
Debug.Print Byte2Bits(SetInnerVal(&H81, &H7E)) '11111111
End Sub
Private Function Byte2Bits(ByVal B As Byte) As String
Dim i As Long
For i = 0 To 7
If (B And 2 ^ (7 - i)) > 0 Then
Byte2Bits = Byte2Bits & "1"
Else
Byte2Bits = Byte2Bits & "0"
End If
Next
End Function
Private Function Bits2Byte(ByVal Bits As String) As Byte
'needs err checking-length should be 8,'0' or '1" only
Dim i As Long
For i = 0 To 7
If Mid\$(Bits, i + 1, 1) = "1" Then
Bits2Byte = Bits2Byte Or 2 ^ (7 - i)
End If
Next
End Function
Private Function ClearOuter(ByVal B As Byte) As Byte
ClearOuter = B And &H7E
End Function
Private Function FlipOuter(ByVal B As Byte) As Byte
FlipOuter = B Xor &H81
End Function
Private Function SetOuter(ByVal B As Byte) As Byte
SetOuter = B Or &H81
End Function
Private Function ClearInner(ByVal B As Byte) As Byte
ClearInner = B And &H81
End Function
Private Function FlipInner(ByVal B As Byte) As Byte
FlipInner = B Xor &H7E
End Function
Private Function SetInnerVal(ByVal B As Byte, ByVal IV As Byte) As Byte
Dim Tmp As Byte
Dim i As Long
If IV > &H7E Then Stop 'error, its a 6 bit value
Tmp = ClearInner(B)
For i = 1 To 6
Tmp = Tmp Or (IV And 2 ^ (7 - i))
Next
SetInnerVal = Tmp
End Function

```
 0
normcook (23)
10/19/2008 2:16:32 PM
```Antony Clements wrote:
> "Jim Mack" wrote...
>> Antony Clements wrote:
>>>
>>> What I require ... is a
>>> way to substitute bits 2-7 and flip bits 1 and 8 without breaking
>>> the byte down into binary.  What I mean by flipping a bit is 0
>>> becomes 1 and 1 becomes 0. Is this possible?
>>
>> OutByte = InByte Xor &h81
>>
>> This inverts the outer bits while preserving the inner ones.
>>
>> You could use Not, Or, And to create a more complex but also more
>> flexible version of the same thing:
>>
>> OutByte = (Not Inbyte And &h81) Or (Inbyte And &h7E)
>>
>
> Thanks Jim but what about the substitution of the middle bits?

I don't know what you mean by 'substituting' the middle bits, but if
you mean replacing them with the middle bits of another variable, then
use the second form:

OutByte = (Not ByteOne And &h81) Or (ByteTwo And &h7E)

--
Jim Mack
MicroDexterity Inc
www.microdexterity.com

```
 0
no-uce-ube (50)
10/19/2008 2:52:55 PM
```"Jim Mack" <no-uce-ube@mdxi.com> wrote in message
news:gPKdnUI8meRa1GbVnZ2dnUVZ_j-dnZ2d@giganews.com...
> I don't know what you mean by 'substituting' the middle bits, but if
> you mean replacing them with the middle bits of another variable, then
> use the second form:
>
> OutByte = (Not ByteOne And &h81) Or (ByteTwo And &h7E)

Jim, what I mean by substituting the middle bits is this.

Take a byte value, say 255 an example, the inner 6 bits are taken as a 6 bit
value of 63, that 6 bit value is replaced by another 6 bit value of, for
example, 15. This substitution makes the byte value 159. The most
significant and least significant bit is then flipped, making the byte value
30.

I can do this by taking ab and converting it to bits and manipulating the
bit string, then converting back to a byte. What I need is a function to
substitute a 6 bit value for a different 6 bit value without converting the
byte into a bit stream and back.

```
 0
10/19/2008 9:28:48 PM
```"Norm Cook" <normcook@cableone.net> wrote in message
news:gdffg2\$7q9\$1@aioe.org...
> "Antony Clements" <antony.clements@bigpond.com> wrote in message
> news:dOEKk.6777\$sc2.5269@news-server.bigpond.net.au...
>>
>> "Jim Mack" <no-uce-ube@mdxi.com> wrote in message
>> news:zeWdnQJIWffKiGbVnZ2dnUVZ_sjinZ2d@giganews.com...
>>> Antony Clements wrote:
>>>>
>>>> What I require ... is a
>>>> way to substitute bits 2-7 and flip bits 1 and 8 without breaking
>>>> the byte down into binary.  What I mean by flipping a bit is 0
>>>> becomes 1 and 1 becomes 0. Is this possible?
>>>
>>> OutByte = InByte Xor &h81
>>>
>>>
>>> This inverts the outer bits while preserving the inner ones.
>>>
>>> You could use Not, Or, And to create a more complex but also more
>>> flexible version of the same thing:
>>>
>>> OutByte = (Not Inbyte And &h81) Or (Inbyte And &h7E)
>>>
>>> --
>>>    Jim Mack
>>>    MicroDexterity Inc
>>>    www.microdexterity.com
>>
>> Thanks Jim but what about the substitution of the middle bits?
>
> It is often helpful to get a visual display of what is
> happening with byte/bit manipulation.
>
> See if this is helpful:
>
> Debug.Print Byte2Bits(&H7E) '01111110
> Debug.Print Byte2Bits(&H81) '10000001
> Debug.Print Byte2Bits(ClearOuter(&HFF)) '01111110
> Debug.Print Byte2Bits(FlipOuter(&H7E)) '11111111
> Debug.Print Byte2Bits(SetOuter(0)) '10000001
> Debug.Print Byte2Bits(ClearInner(&HFF)) '10000001
> Debug.Print Byte2Bits(FlipInner(0)) '01111110
> Debug.Print Byte2Bits(SetInnerVal(&H81, &H18)) '10011001
> Debug.Print Byte2Bits(SetInnerVal(&H81, &H7E)) '11111111
> End Sub
> Private Function Byte2Bits(ByVal B As Byte) As String
> Dim i As Long
> For i = 0 To 7
>  If (B And 2 ^ (7 - i)) > 0 Then
>   Byte2Bits = Byte2Bits & "1"
>  Else
>   Byte2Bits = Byte2Bits & "0"
>  End If
> Next
> End Function
> Private Function Bits2Byte(ByVal Bits As String) As Byte
> 'needs err checking-length should be 8,'0' or '1" only
> Dim i As Long
> For i = 0 To 7
>  If Mid\$(Bits, i + 1, 1) = "1" Then
>   Bits2Byte = Bits2Byte Or 2 ^ (7 - i)
>  End If
> Next
> End Function
> Private Function ClearOuter(ByVal B As Byte) As Byte
> ClearOuter = B And &H7E
> End Function
> Private Function FlipOuter(ByVal B As Byte) As Byte
> FlipOuter = B Xor &H81
> End Function
> Private Function SetOuter(ByVal B As Byte) As Byte
> SetOuter = B Or &H81
> End Function
> Private Function ClearInner(ByVal B As Byte) As Byte
> ClearInner = B And &H81
> End Function
> Private Function FlipInner(ByVal B As Byte) As Byte
> FlipInner = B Xor &H7E
> End Function
> Private Function SetInnerVal(ByVal B As Byte, ByVal IV As Byte) As Byte
> Dim Tmp As Byte
> Dim i As Long
> If IV > &H7E Then Stop 'error, its a 6 bit value
> Tmp = ClearInner(B)
> For i = 1 To 6
>  Tmp = Tmp Or (IV And 2 ^ (7 - i))
> Next
> SetInnerVal = Tmp
> End Function

Norm thanks for your code, but I need something that is faster in runtime.

```
 0
10/19/2008 9:32:07 PM
```Antony Clements wrote:
> "Jim Mack" <no-uce-ube@mdxi.com> wrote in message
> news:gPKdnUI8meRa1GbVnZ2dnUVZ_j-dnZ2d@giganews.com...
>> I don't know what you mean by 'substituting' the middle bits, but if
>> you mean replacing them with the middle bits of another variable,
>> then use the second form:
>>
>> OutByte = (Not ByteOne And &h81) Or (ByteTwo And &h7E)
>
> Jim, what I mean by substituting the middle bits is this.
>
> Take a byte value, say 255 an example, the inner 6 bits are taken as
> a 6 bit value of 63, that 6 bit value is replaced by another 6 bit
> value of, for example, 15. This substitution makes the byte value
> 159. The most significant and least significant bit is then flipped,
> making the byte value 30.
>

Try Jim's formula:

Private Sub Command1_Click()
Dim ByteOne As Byte, ByteTwo As Byte
ByteOne = 255
ByteTwo = 15
MsgBox FlipNSub(ByteOne, ByteTwo)
End Sub

Function FlipNSub(ByVal ByteOne As Byte, _
ByVal ByteTwo As Byte) As Byte
' shift ByteTwo left 1 bit
ByteTwo = (ByteTwo And &H5F) * 2
FlipNSub = (Not ByteOne And &H81) Or (ByteTwo And &H7E)
End Function

```
 0
mynamehere (1583)
10/19/2008 10:16:18 PM
```"Steve Gerrard" <mynamehere@comcast.net> wrote in message
news:iIednXS8cfMyLGbVnZ2dnUVZ_jOdnZ2d@comcast.com...
> Antony Clements wrote:
>> "Jim Mack" <no-uce-ube@mdxi.com> wrote in message
>> news:gPKdnUI8meRa1GbVnZ2dnUVZ_j-dnZ2d@giganews.com...
>>> I don't know what you mean by 'substituting' the middle bits, but if
>>> you mean replacing them with the middle bits of another variable,
>>> then use the second form:
>>>
>>> OutByte = (Not ByteOne And &h81) Or (ByteTwo And &h7E)
>>
>> Jim, what I mean by substituting the middle bits is this.
>>
>> Take a byte value, say 255 an example, the inner 6 bits are taken as
>> a 6 bit value of 63, that 6 bit value is replaced by another 6 bit
>> value of, for example, 15. This substitution makes the byte value
>> 159. The most significant and least significant bit is then flipped,
>> making the byte value 30.
>>
>
> Try Jim's formula:
>
> Private Sub Command1_Click()
> Dim ByteOne As Byte, ByteTwo As Byte
>  ByteOne = 255
>  ByteTwo = 15
>  MsgBox FlipNSub(ByteOne, ByteTwo)
> End Sub
>
> Function FlipNSub(ByVal ByteOne As Byte, _
> ByVal ByteTwo As Byte) As Byte
>  ' shift ByteTwo left 1 bit
>  ByteTwo = (ByteTwo And &H5F) * 2
>  FlipNSub = (Not ByteOne And &H81) Or (ByteTwo And &H7E)
> End Function

Thanks Steve and Jim and Norm everyone else. If you would like I will post
the entire function.

```
 0
10/20/2008 12:21:43 AM
```On 19 Oct, 22:28, "Antony Clements" <antony.cleme...@bigpond.com>
wrote:

> What I mean by substituting the middle bits is this.
> Take a byte value, say 255 an example, the inner 6 bits are
> taken as a 6 bit value of 63, that 6 bit value is replaced
> by another 6 bit value of, for example, 15. This substitution
> makes the byte value 159. The most significant and least
> significant bit is then flipped, making the byte value 30.
> I can do this by taking ab and converting it to bits . . .

What you need to realise Antony is that the Byte value is ALREADY a
bit field. In fact all numbers are stored as bit fields. There is no
need for any string conversions. All you need to do is operate
directly on the individual bits of the bit field you have already got,
using the various logic functions provided by VB6 (And, Or, Not, Xor
and some others) and using "multiply * 2" or "divide by 2" when you
want to shift bit fields to the left or right (because VB does not
have standard Shift or Rotate operators). Those functions, coupled
with an understanding of the hex representation and the binary
represenatation of numbers, allow you to do all the things you have
asked for by operating directly on the data. You really need to buy a
good book or find a good online tutorial on the subject.

In the meantime, here is some code that performs what you have asked
for above. I have assumed that the byte variable holding the value you
want to copy into the six middle bits (15 in your example) actually
does hold the value 15, rather than having the binary bits for 15 in
its middle six bits. If not then post again:

Private Sub Command1_Click()
Dim b1 As Byte, b2 As Byte
' some test values
b1 = 255
b2 = 15
' replace middle six bits and flip outer two
b1 = ((b1 And &H81) Or ((b2 * 2) And &H7E)) Xor &H81
' print result for checking
Print b1
End Sub

Mike

```
 0
gagamomo (627)
10/20/2008 7:39:22 AM
```"Mike Williams" <gagamomo@yahoo.co.uk> wrote in message
> What you need to realise Antony is that the Byte value is ALREADY a
> bit field. In fact all numbers are stored as bit fields. There is no
> need for any string conversions. All you need to do is operate
> directly on the individual bits of the bit field you have already got,
> using the various logic functions provided by VB6 (And, Or, Not, Xor
> and some others) and using "multiply * 2" or "divide by 2" when you
> want to shift bit fields to the left or right (because VB does not
> have standard Shift or Rotate operators). Those functions, coupled
> with an understanding of the hex representation and the binary
> represenatation of numbers, allow you to do all the things you have
> asked for by operating directly on the data. You really need to buy a
> good book or find a good online tutorial on the subject.
>
> In the meantime, here is some code that performs what you have asked
> for above. I have assumed that the byte variable holding the value you
> want to copy into the six middle bits (15 in your example) actually
> does hold the value 15, rather than having the binary bits for 15 in
> its middle six bits. If not then post again:
>
Private Sub Command1_Click()
Dim b1 As Byte, b2 As Byte
' some test values
b1 = 255
b2 = 15
' replace middle six bits and flip outer two
b1 = ((b1 And &H81) Or ((b2 * 2) And &H7E)) Xor &H81
' print result for checking
Print b1
End Sub
>
> Mike

Mike I have known how to manipulate bits in a string representation of a
byte for quite some time, but manipulating bits without converting the byte
to a bit string has always eluded me. Now I know how.

```
 0
10/20/2008 9:05:19 AM

Similar Artilces:

First Come, First Served
iTunes code from a Pepsi bottle. JMMHJ RPJXL -- "...I doubt that I would ever buy a Mac. I've seen what owning one can do to people. And I don't want any part of that." Rich Brooks columnist for the Southwest Florida Herald-Tribune "Mayor of R'lyeh" <ev515o@hotmail.com> wrote in post r6eh21pffqnok8ej1ja4q7msupr9j5g9ds@4ax.com on 3/4/05 12:36 PM: > > iTunes code from a Pepsi bottle. > > JMMHJ > RPJXL > Thanks! Now just have to pick a song. Appreciate your posting the code. -- If A = B and B = C, then A = C, except where void or prohibited by law. Roy Santoro, Psycho Proverb Zone (http://snipurl.com/BurdenOfProof) _________________________________________ Usenet Zone Free Binaries Usenet Server More than 120,000 groups Unlimited download http://www.usenetzone.com to open account In article <r6eh21pffqnok8ej1ja4q7msupr9j5g9ds@4ax.com>, Mayor of R'lyeh <ev515o@hotmail.com> wrote: > iTunes code from a Pepsi bottle. > > JMMHJ > RPJXL More criminal activities from MS followers. Sorta "follow the leader" from an ethically devoid bunch. Typical. -- SD "...merely a preponderance of evidence." On Fri, 04 Mar 2005 19:05:04 -0800, StormDrain <Liberty@MS-Free.com> chose to bless us with the following wisdom: >In article <r6eh21pffqnok8ej1ja4q7msupr9j5g9ds@4ax.com>, > Mayor of R'lyeh <ev515o@hotmail.com> wrote: > >> i...

First
Hi, Does Qracle 9i support a SELECT that returns only a subset of the records something link SELECT FIRST 1 * FROM tablename thx Peter "Peter Plumber" <Klempner@gmxdot.net> a �crit dans le message de news:411100b6\$1@e-post.inode.at... > Hi, > > Does Qracle 9i support a SELECT that returns > only a subset of the records > > something link > > SELECT FIRST 1 * FROM tablename > > thx > > Peter Have a look at rownum pseudo-column. http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/sql_elements6a.htm#33158 -- Regards Michel Cadot Peter Plumber wrote: > Hi, > > Does Qracle 9i support a SELECT that returns > only a subset of the records > > something link > > SELECT FIRST 1 * FROM tablename > > thx > > Peter Look at ROWNUM .... but, in a system that does not, by definition, have any knowledge of 'order of input', what do you mean by 'first'???? /Hans > Hi, > > Does Qracle 9i support a SELECT that returns > only a subset of the records > > something link > > SELECT FIRST 1 * FROM tablename > > thx > > Peter Additionally, to the rownum suggested by others, there is the row_number() over (...) analytical function. The problem with rownum is that it doesn't work together with a order by clause. Well, it does, but most of the time, it doesn't return what was intended. Rene -- Rene Nyffenegger...

Capitalize first letter of FIRST word
I have one long textfield that contains productinfo where everything is stored in ALL CAPS. I'd like to convert it to sentence case, that is, the first letter of each sentence capitalized. Initcap doesn't quite do the trick since it converts the first character in each word. Does anyone know of a sql-function that will do this? Or, has anyone written a function to do this, and if so, would they mind sharing the code? I'm using Oracle 9.2 Tanks! Ragnar Husum ragnar.husum@gmail.com wrote: > I have one long textfield that contains productinfo where everything > is stored in ALL CAPS. I'd like to convert it to sentence case, that > is, the first letter of each sentence capitalized. > Initcap doesn't quite do the trick since it converts the first > character in each word. > > Does anyone know of a sql-function that will do this? Or, has anyone > written a function to do this, and if so, would they mind sharing the > code? I'm using Oracle 9.2 > > Tanks! Ragnar Husum Look into Oracle Text. -- Daniel A. Morgan Oracle Ace Director & Instructor University of Washington damorgan@x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.org On Thu, 3 Apr 2008 01:19:29 -0700 (PDT), ragnar.husum@gmail.com wrote: >I have one long textfield that contains productinfo where everything >is stored in ALL CAPS. I'd like to convert it to sentence case, that >is, the first letter of eac...

hi I am a begginer and try to learn simulink follow the sample in mathworks site i used a sine-wave source and a scope component to create a simple model. the problem is when i put the frequency in sine wave source 1 the shape of wave is Sinusoidal but if change the frequency the shape is not a Sinusoidal wave any more. thank you all The "accuracy" of the simulation depends greatly on the the Solver and other settings. For instance, in a new model, if you have only a Sine Wave and a Scope block, and do not change anything else, then you will see a sine wave in the scope. But ...

CFP: First International Symposia on Non-visual & Multimodal Visualization
Call For Papers First International Symposia on Non-visual & Multimodal Visualization 14 - 16th July 2004, London, UK http://www.m2vis.org/ A symposium of the International Conference on Information Visualization (IV04) Paper deadline: 1st March 2004. The aim of this symposium is to bring together top practitioners, researchers, developers and users of non-visual and multimodal visualization, and multisensory perception issues of visualization. Non-visual communication is on the increase. Indeed, information can be presented by sound, touch, or any of our senses: utili...

copying first thing only
when iam trying to copy text from a excel sheet to a remote application. it is only copying the first copied thing. when iam trying to copy another thing is it pasting the same thing which is copied first. how to resolve it. ...

first?
Hi, Can I choose how, when using group by, the first() function works? I want it to pick the first record from a sort on one of the fields, but must I first create a query to sort the data, then run another query on top of that? Cheers, Chris "C L Humphreys" <clhumphreys@toofgib.moc> wrote in message news:bnljdn\$1e8\$1@ucsnew1.ncl.ac.uk... > Hi, > > Can I choose how, when using group by, the first() function works? I want it > to pick the first record from a sort on one of the fields, but must I first > create a query to sort the data, then run another query on top of that? First() and Last() are fairly useless although I often use First() as a "don't care" option. If the field can be sorted you can generally use Min() or Max() instead and get the results you want. -- I don't check the Email account attached to this message. Send instead to... RBrandt at Hunter dot com -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 To pick the 1st record in a sorted query you can use the TOP predicate. E.g.: SELECT TOP 1 * FROM Products WHERE BuyDate >= #1/1/2003# ORDER BY BuyDate Desc This will select the product record that has the latest (most recent) BuyDate on, or after, Jan 1, 2003. MGFoster:::mgf Oakland, CA (USA) -----BEGIN PGP SIGNATURE----- Version: PGP for Personal Privacy 5.0 Charset: noconv iQA/AwUBP57R2YechKqOuFEgEQLJuwCg75FXKLnFw0pBVtrQqNpBLxmX1cMAoLMC a16RqZ/BtN7Fji3+BlUknJLu =WqDY -...

This has to be a first!
Since this has never happened before, I want to pass it along. I "aquired" a USB CDRW drive yesterday - condition unknown. Since I had no idea whether it worked or not, I plugged it into the USB port of my laptop to see what happened. The laptop was booted to OS/2 at the time and up pops the icon - USB CDROM recognized and worked right off the bat. I didn't have anything installed to test the burner function so I rebooted to XP and guess what? Not only did XP fail to recognize it as a burner, it wouldn't even accept it as a CDR! That's gotta be a fir...

Firsts
I was out tonight. Makes a nice change. For weeks I've been all too aware of what it's like to be unable to concentrate on other than the best way to prepare cheap cuts. I have also come to "realise" that, despite the excellent work I have done over the years, I am, after all, a failure. It hits hard. Despite all of that... Around the same time as I learnt PickBasic, before which I had taken a 2 1/2 year "get real" spell in the Aussie itinerant scene, I found programming too boring, so I took to writing and performing poetry at an Auckland pub (the Globe, sadly no more). They had a rule that every poem read had to be original. They often had a "topical" theme. It was interesting, when they had the "war" evening, that one old soldier told of how he missed the fun of war. Never would have thought of that, never having been part of it myself. The point of this post: I believe this is original. I never heard it before. Many people have said it's quality, and some have said it's by... "Oh I can't remember". Well... It's about the sound of the sea, it's mine, and I hereby document the fact... ....The rolling roar and sliding sigh of nature's heartbeat... (there was more) Hi Mike You are still alive and kicking. That is not a failure. It sounds more like depression probably brought on by stress and overwork, typical scenarios in our line. The chemical soup th...

If at first
A couple weeks ago I made a plea for simple, plain English help on putting a scanner on OS/2. I got one response, guiding me to sites that explained the engineering of control cards, etc. - precisely and exactly the opposite of what I need. Is this another field where using OS/2 requires professional knowledge? Is there nothing outlining a simple way to get the job done? Jim L, via eCS 1.14 version of OS/2 -- According to a few OS/2 gadflies, if you say something they don't agree with you're a liar. Hm, sounds like a political party I know of. On Wed, 29 Sep 2004 18:42:18 UTC, luth-astro@rubbishearthlink.net wrote: > A couple weeks ago I made a plea for simple, plain English help on > putting a scanner on OS/2. I got one response, guiding me to sites that > explained the engineering of control cards, etc. - precisely and exactly > the opposite of what I need. > > Is this another field where using OS/2 requires professional knowledge? > Is there nothing outlining a simple way to get the job done? Nowadays, the best way is to get Tame/2 from Hobbes. It contains pretty extensive step-by-step instructions on what to do, and also offers some support for a few USB scanners. If you don't mind running XFree86/OS2 you may also want to have a look at XSane, a new version of which got released today. See http://home.tiscalinet.de/fbakan/xsane-os2.htm. -- "I smell blood and an era of prominent madmen.&quo...

First row in Selection range (first index of a cell)
Hello, I have a problem with selecting first cel in selection Range or return an index of the first cell in Selection Cell. I have something like this: .................... Range1.Select "and here I want to Select the first range in selection Range1" ............. I there any special function of finding first cell in selection range or returning an index of the first cell?? Thanks for answet Marcin "Marcin" <mar_male@wp.pl>'s wild thoughts were released on 20 Mar 2006 05:38:17 -0800 bearing the following fruit: >Hello, >I have a problem with selecting first cel in selection Range or return >an index of the first cell in Selection Cell. If I had to guess I'd say your talking about excel but since you haven't told us then I don't know for sure. >I have something like this: >................... >Range1.Select >"and here I want to Select the first range in selection Range1" >............ >I there any special function of finding first cell in selection range >or returning an index of the first cell?? >Thanks for answet >Marcin Are you programming in VB6 or VBA? Jan Hyde (VB MVP) -- The past does not repeat itself, but it rhymes. Mark Twain In VBA Excel. Marcin Malec Marcin, Isn't Range1.Cells(1,1) doing what you want? Hope this helps, Max Kudrenko Brainbench MVP Program for Visual Basic www.brainbench.com Marcin wrote: > Hello, > I have a problem with selecting ...

Computer parts for sale FIRST COME FIRST SERVED
Okay if you want them, then please send payment via paypal to crucifyself03@aol.com. I believe the prices below will also pay for shipping and the part. All parts plugged from performa 6360 Mac. Sonnet G3/300 Upgrade Card L2 cache slot-\$50 64 MB DIMM RAM-\$10 each or \$17 for both PCI USB card-\$10 10/100 COM SLOTT II ethernet card-\$13 10GB ATAPI hard drive-\$15 (You will need FWB's Hard disk toolkit to format this one). BONUS THE ONE THAT PAYS FIRST WILL GET A FREE SUPRA EXPRESS 56K SERIAL MODEM!! PLEASE DO NOT FORCE THESE PARTS INTO THE DUMPSTER. Please take them!! Good luck John ...

Strategy/RTS/First Person game
Just fantasizing here, but I'd like to play a medeival/fantasy strategy game where you were a leader that didn't absolutely know everything about what was going on in his empire unless you were actually there. You should get reports in about different events, and decide what orders and what resources to devote to whatever the matter is. Pick different people to fill posts in your empire, whether it be governor, mayor, general, whatever. Remove/kill/bribe people that displeased you. You could walk around and observe whatever you wanted, or take a horse or carriage. Ba...

How to add a cell to the end of the first row of the first table on a page?
Hi all, My first javascript :) (I'm just a lowly local-applications programmer.) I'm trying to write a Greasemonkey script. The page I want to intercept has a toolbar implemented as a table, and I want to add a new button to the end of the toolbar. This boils down to adding a td onto the (first & only) tr of a table. How do I do this? Thanks for any pointers (heh), cdj ...

Align objects to a first object without the first object moving
I have several objects on a front panel that I want to align with one another.&nbsp; One object should keep its original position and the others should be aligned to it.&nbsp; Is there a way to do this?&nbsp; The normal method of alignment seems to move all the objects, including the one that I want to retain its original position.&nbsp; I tried locking the object that isn't supposed to move, but then I can't seem to align to it anymore. &nbsp; Darin If you want to align them to a side (top, bottom, left, right), make sure the base object is the outermost in that direction. For center alignment I don't think such a feature is available.Ton ...

Using sed to replace the first "." after the first space
How would I use sed to replace the first "." after the first space So I'm trying to do this: first.last first1.last1 first2.last2 first.last first1(.)last1 first2.last2 This works.... echo "first.last first1.last1 first2.last2" | sed 's/\./(&)/2' but when I have 2 '.' in the first word... echo "first.blah.last first1.last1 first2.last2" | sed 's/\./(&)/2' first.blah(.)last first1.last1 first2.last2 I get this... which is the correct sed behavior based on my expressions but I'd like to match the ...

First script
Hi, I created an HTML page with the following code: <html> <body> <form action="everif.php" method="post"> Name: <input type="text" name="name" size="12"><br> First name: <input type="text" name="fname" size="12"> <input type="submit" value="OK"> </form> </body> </html> and everif.php contains: <?php \$fname= \$_POST['fname']; \$name= \$_POST['name']; echo("<center>Hi \$fname \$name</center>"); ?> When I press OK from the HTML page 1 get: Parse error: parse error, unexpected T_VARIABLE in /var/www/free.fr/d/c/parispain/everif.php on line 2 where line 2 is: \$fname= \$_POST['fname']; Why? Thank you. > <?php > \$fname= \$_POST['fname']; > \$name= \$_POST['name']; > echo("<center>Hi \$fname \$name</center>"); > ?> > > > When I press OK from the HTML page 1 get: > Parse error: parse error, unexpected T_VARIABLE in > /var/www/free.fr/d/c/parispain/everif.php on line 2 > > where line 2 is: > \$fname= \$_POST['fname']; I am not sure but first of all you should check if \$_POST['fname']; is set . so it should be somthing like : if (isset(\$_POST['fname'])) \$fname = \$_POST['fname']; else \$fname = ""; the same for the \$_POST['name'] Tr...

Visual Xharbour first step
Hi all , Now that I feel comfortable with Xharbour the next step is of course Visual Xharbour. I=B4m trying to build a test application and I took a look on sample that opens the TEST.DBF. Looking the source I can understand the parts such Form object definition , Table object definition , etc. The problem is to know the functions parameters such as SETFILENAME and so on. I know that the parameters are in the sample but they are specific for that case. I mean that I would like to have the functions definition so that I can display a MYSQL table for instance. I also took a look in the "Getting Started with Visaul ..." but it has only the function list ! I=B4ve tried XHDN but I didn=B4t find the answer but probably is my fault. Can anybody help me ? Tia, Hu Hu, Apologies, we are working on the docs, but it's a huge task. It might help to know that for all WinAPI functions we basicly created clone wrappers, such that the MSDN docs should suffice. We'll try our best to provide more docs ASAP. Ron On 2 fev, 06:21, "Ron Pinkas" <R...@xHarbour.com> wrote: > Hu, > > Apologies, we are working on the docs, but it's a huge task. It might help= > to know that for all WinAPI functions we basicly created clone wrappers, > such that the MSDN docs should suffice. > > We'll try our best to provide more docs ASAP. > > Ron Hi Ron Please don=B4t get me wrong. I was not nagging ! I=B4ll be waiting for news. Meanwh...

The Thing is Thinging or The Thing Things
The Thing is Thinging I tried to express this concept by Heidegger in these items. www.thethingisthinging.com The Thing ...

" *first = new string(*rhs.first);" cannot compile in MSVC
Hi, I am learning C++ with a web download small C++ routine. The member function below the dot line cannot compile in MSVC express 2010. The error message is: 1>c:\users\jeff\documents\visual studio 2010\projects\ldpc\person \person.cpp(27): error C2679: binary '=' : no operator found which takes a right-hand operand of type 'std::string *' (or there is no acceptable conversion) Because the web site is a university C++ course, I guess it should not be a totally wrong. I also feel that line 27 usage is really strange. What is your opinion? Thanks a lot. .................

Newbie question:How to select first letter in a given line? What about the first word?
Dear all, I am trying to devise a macro that would be able to process the first word of the first paragraph in a chapter... Also I wanted to process the first letter of that word in a different manner... How do I go about this problem? Is there anyway I can do this with token lists? cheers, Rodrigo Rodrigo wrote: > Dear all, > > I am trying to devise a macro that would be able to process the > first word of the first paragraph in a chapter... > Also I wanted to process the first letter of that word in a different > manner... > > How do I go about this problem? Is there anyway I can do this with > token lists? > > cheers, > Rodrigo > <http://groups.google.dk/groups?hl=da&lr=&selm=4ps506%241a3%40lyra.csx.cam.ac.uk> Similarly for first word, but you must insert a blank space between #1 and #2. Thanks a lot Martin. That really helped! cheers, Rodrigo Thanks a lot Martin. That really helped! cheers, Rodrigo ...

Re: How to add a cell to the end of the first row of the first table on a page?
sherifffruitfly wrote : > I'm trying to write a Greasemonkey script. The page I want to > intercept has a toolbar implemented as a table, and I want to add a > new button to the end of the toolbar. This boils down to adding a td > onto the (first & only) tr of a table. How do I do this? Use insertCell method: insertCell : http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/insertcell.asp http://www.w3schools.com/htmldom/met_tablerow_insertcell.asp http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-68927016 http://developer.mozilla.org/en/docs/Gecko_DOM_Refer...

WoW stress test open on first come first serve basis
For those who have been watching World of Warcraft but did not get into the open beta, yesterday Blizzard began signup for a closed stress-test beta. It will be a week-long stress test of up to 10,000 accounts on a first come first serve basis. It isn't the regular beta, just a test of the network, but all of the game content is available. http://www.worldofwarcraft.com/ If you get in to the stress test, you will not be able to continue playing the beta after the stress test period is over. But it's a great opportunity to take a look at the game before release if you can get ...

Web resources about - First things first - comp.lang.basic.visual.misc

There ain't no such thing as a free lunch - Wikipedia, the free encyclopedia
" There ain't no such thing as a free lunch " (alternatively, " There's no such thing as a free lunch " or other variants) is a popular adage ...

NSW Libs did wrong thing: Baird tmedia My Account Webmail Telstra Media Search Web My Account Telstra ...
The NSW Liberal Party has been slammed for 'concealing' the identities of illegal donors.

Edison Destiny destined to be the next big thing?
... a new electric vehicle startup, but leaves few clues as to its legitimacy. Continue reading Edison Destiny destined to be the next big thing? ...

Houseplant Watering 101: How To Avoid Too Much Of A Good Thing
... (which is an interior plant specialist) for years and have lots to share with you on this subject. Actually, there is no secret or one thing ...

"In the future, I would like to do things such as go to college, start a business, even have my own home ...
"But I am not considered a legal person and cannot yet do these things." Said the scientist: "I do believe that there will be a time where robots ...

... hackers from simply placing a picture of someone else in front of the camera. Edible pills Swallowing pills might be one of the few things ...

This Kitten Version of Batman vs. Superman Is Better Than the Real Thing
Submitted by: (via The Pet Collective ) Tagged: kitten , Batman v Superman , Video Share on Facebook

6 things to know about credit reports
Understanding credit reports makes all the difference to finances. A look at six things everyone should know about them.

Brussels' mood: 'We know these things can happen, but we must go on'
CNN Brussels' mood: 'We know these things can happen, but we must go on' CNN (CNN) Day broke Wednesday on a Brussels facing a new reality, ...

Things Are Getting Very Nasty Over In The GOP
In the ongoing petty, chickensh*t battle of the spouses, Donald Trump tweeted this at Ted Cruz tonight: " @Don_Vito_08 : "A picture is worth ...

Resources last updated: 3/24/2016 7:56:51 PM