473,808 Members | 2,855 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Declaring/populating variable arrays in ASP.NET???

Sorry if this is the wrong group. I tried to find the one I thought
would be most relevant.

I'm an old PHP guy, who knows little about asp and NOTHING about
asp.net, but need to learn at least enough to convert a favorite PHP
script to work on an ASP.NET site.

I'm experimenting with simple example scripts that will help me learn
how to implement each "piece" of the puzzle.

Doing well so far... one piece of the puzzle at a time.
I need to create a simple funtion that will check the IP Address of a
visitor against an "array variable" of banned IPs.

In asp, it saeems simple enough. Here's the include that contains the
function to be called (in .asp):

############### ###############
<%
Dim sIPAddress
sIPAddress = Request.ServerV ariables("HTTP_ X_FORWARDED_FOR ")
if sIPAddress = "" then
sIPAddress = Request.ServerV ariables("REMOT E_ADDR")
End If
%>

<script language="VB" runat=server>

function BannedIP(sIPAdd ress)
Dim sBanned
sBanned =
Array("69.202.1 23.157","216.23 9.39.5","216.23 9.37.5","216.23 9.37.104","2
16.155.200.231" ,"216.155.200.2 32","216.155.20 0.233","216.155 .200.234")

Dim i
For i = 0 to UBound( [sBanned] )
If selCriteria(i,1 ) = cstr(sBanned) Then
BannedIP = TRUE
Else
BannedIP = false
End Function

</script>
############### ############### ##

The function is called from an existing .aspx page thus:
############### ############### ##
if BannedIP(sIPAdd ress) then
' show it the "SORRY" page
Server.Execute( "sorry.aspx ")
' Then STOP! (same as PHP's "exit;" statement ???)
Response.End
' otherwise it's cool, go ahead and display this page below
End If
############### ############### ##

ASP.NET doesn't like this at all!
It tells me: "'Array' is a type and cannot be used as an expression."
:-(

What is the proper syntax in ASP.NET for:
variable = Array("value1", "value2","value 3")

I would simply use the function as is, written in asp, but the pages
are VERY .aspx and choke on it.
ALSO: My next piece of the puzzle will be to tackle this one, using the
same test script:
If I want e to ban a violator with a dynamic IP, how do I deal with
entire C-blocks (e.g.: BannedIP is TRUE if sIPAdress contains
123.45.6.*)
Many TIA
:-)
Friday

--
############### ############### #######
"The people cannot be all, & always well informed. The part which is wrong will
be discontented in proportion to the importance of the facts they misconceive.
If they remain quiet under such misconceptions it is a lethargy, the forerunner
of death to the public liberty. What country before ever existed a century & a
half without a rebellion? & what country can preserve it's liberties if their
rulers are not warned from time to time that their people preserve the spirit
of resistance? Let them take arms... The tree of liberty must be refreshed from
time to time with the blood of patriots & tyrants"
-- Thomas Jefferson
############### ############### #######
Nov 19 '05 #1
34 2137
Friday wrote:

What is the proper syntax in ASP.NET for:
variable = Array("value1", "value2","value 3")

I would simply use the function as is, written in asp, but the pages
are VERY .aspx and choke on it.

http://www.vb-helper.com/howto_net_declare_arrays.html

ALSO: My next piece of the puzzle will be to tackle this one, using the
same test script:
If I want e to ban a violator with a dynamic IP, how do I deal with
entire C-blocks (e.g.: BannedIP is TRUE if sIPAdress contains
123.45.6.*)
Many TIA
:-)
Friday


To get the visitor's IP address (if you don't know this already):

http://groups-beta.google.com/group/...057ebbfed6c18b

To match the 'wildcard' comparison you need, just check

sIPAdress.Index Of("123.45.6." ) = 0

If this is true, then ban them...

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 19 '05 #2
> What is the proper syntax in ASP.NET for:
variable = Array("value1", "value2","value 3")

Dim sBanned() As String =
{"69.202.123.15 7","216.239.39. 5","216.239.37. 5","216.239.37. 104","216.155.2 00.231","216.15 5.200.232","216 .155.200.233"," 216.155.200.234 "}

Jody
"Friday" <fr****@nowhere .org> wrote in message
news:0605200513 06302444%fr**** @nowhere.org... Sorry if this is the wrong group. I tried to find the one I thought
would be most relevant.

I'm an old PHP guy, who knows little about asp and NOTHING about
asp.net, but need to learn at least enough to convert a favorite PHP
script to work on an ASP.NET site.

I'm experimenting with simple example scripts that will help me learn
how to implement each "piece" of the puzzle.

Doing well so far... one piece of the puzzle at a time.
I need to create a simple funtion that will check the IP Address of a
visitor against an "array variable" of banned IPs.

In asp, it saeems simple enough. Here's the include that contains the
function to be called (in .asp):

############### ###############
<%
Dim sIPAddress
sIPAddress = Request.ServerV ariables("HTTP_ X_FORWARDED_FOR ")
if sIPAddress = "" then
sIPAddress = Request.ServerV ariables("REMOT E_ADDR")
End If
%>

<script language="VB" runat=server>

function BannedIP(sIPAdd ress)
Dim sBanned
sBanned =
Array("69.202.1 23.157","216.23 9.39.5","216.23 9.37.5","216.23 9.37.104","2
16.155.200.231" ,"216.155.200.2 32","216.155.20 0.233","216.155 .200.234")

Dim i
For i = 0 to UBound( [sBanned] )
If selCriteria(i,1 ) = cstr(sBanned) Then
BannedIP = TRUE
Else
BannedIP = false
End Function

</script>
############### ############### ##

The function is called from an existing .aspx page thus:
############### ############### ##
if BannedIP(sIPAdd ress) then
' show it the "SORRY" page
Server.Execute( "sorry.aspx ")
' Then STOP! (same as PHP's "exit;" statement ???)
Response.End
' otherwise it's cool, go ahead and display this page below
End If
############### ############### ##

ASP.NET doesn't like this at all!
It tells me: "'Array' is a type and cannot be used as an expression."
:-(

What is the proper syntax in ASP.NET for:
variable = Array("value1", "value2","value 3")

I would simply use the function as is, written in asp, but the pages
are VERY .aspx and choke on it.
ALSO: My next piece of the puzzle will be to tackle this one, using the
same test script:
If I want e to ban a violator with a dynamic IP, how do I deal with
entire C-blocks (e.g.: BannedIP is TRUE if sIPAdress contains
123.45.6.*)
Many TIA
:-)
Friday

--
############### ############### #######
"The people cannot be all, & always well informed. The part which is wrong
will
be discontented in proportion to the importance of the facts they
misconceive.
If they remain quiet under such misconceptions it is a lethargy, the
forerunner
of death to the public liberty. What country before ever existed a century
& a
half without a rebellion? & what country can preserve it's liberties if
their
rulers are not warned from time to time that their people preserve the
spirit
of resistance? Let them take arms... The tree of liberty must be refreshed
from
time to time with the blood of patriots & tyrants"
-- Thomas Jefferson
############### ############### #######

Nov 19 '05 #3
In article <OT************ *@TK2MSFTNGP12. phx.gbl>, Jody Gelowitz
<jg************ **@blah.leevall ey.com> wrote:
What is the proper syntax in ASP.NET for:
variable = Array("value1", "value2","value 3")

Dim sBanned() As String =

{"69.202.123.15 7","216.239.39. 5","216.239.37. 5","216.239.37. 104","216.155.2 00.
231","216.155.2 00.232","216.15 5.200.233","216 .155.200.234"}

Jody


Many Thanks!
Can't wait to try it.
:-)

"Friday" <fr****@nowhere .org> wrote in message
news:0605200513 06302444%fr**** @nowhere.org...
Sorry if this is the wrong group. I tried to find the one I thought
would be most relevant.

I'm an old PHP guy, who knows little about asp and NOTHING about
asp.net, but need to learn at least enough to convert a favorite PHP
script to work on an ASP.NET site.

I'm experimenting with simple example scripts that will help me learn
how to implement each "piece" of the puzzle.

Doing well so far... one piece of the puzzle at a time.
I need to create a simple funtion that will check the IP Address of a
visitor against an "array variable" of banned IPs.

In asp, it saeems simple enough. Here's the include that contains the
function to be called (in .asp):

############### ###############
<%
Dim sIPAddress
sIPAddress = Request.ServerV ariables("HTTP_ X_FORWARDED_FOR ")
if sIPAddress = "" then
sIPAddress = Request.ServerV ariables("REMOT E_ADDR")
End If
%>

<script language="VB" runat=server>

function BannedIP(sIPAdd ress)
Dim sBanned
sBanned =
Array("69.202.1 23.157","216.23 9.39.5","216.23 9.37.5","216.23 9.37.104","2
16.155.200.231" ,"216.155.200.2 32","216.155.20 0.233","216.155 .200.234")

Dim i
For i = 0 to UBound( [sBanned] )
If selCriteria(i,1 ) = cstr(sBanned) Then
BannedIP = TRUE
Else
BannedIP = false
End Function

</script>
############### ############### ##

The function is called from an existing .aspx page thus:
############### ############### ##
if BannedIP(sIPAdd ress) then
' show it the "SORRY" page
Server.Execute( "sorry.aspx ")
' Then STOP! (same as PHP's "exit;" statement ???)
Response.End
' otherwise it's cool, go ahead and display this page below
End If
############### ############### ##

ASP.NET doesn't like this at all!
It tells me: "'Array' is a type and cannot be used as an expression."
:-(

What is the proper syntax in ASP.NET for:
variable = Array("value1", "value2","value 3")

I would simply use the function as is, written in asp, but the pages
are VERY .aspx and choke on it.
ALSO: My next piece of the puzzle will be to tackle this one, using the
same test script:
If I want e to ban a violator with a dynamic IP, how do I deal with
entire C-blocks (e.g.: BannedIP is TRUE if sIPAdress contains
123.45.6.*)
Many TIA
:-)
Friday

--
############### ############### #######
"The people cannot be all, & always well informed. The part which is wrong
will
be discontented in proportion to the importance of the facts they
misconceive.
If they remain quiet under such misconceptions it is a lethargy, the
forerunner
of death to the public liberty. What country before ever existed a century
& a
half without a rebellion? & what country can preserve it's liberties if
their
rulers are not warned from time to time that their people preserve the
spirit
of resistance? Let them take arms... The tree of liberty must be refreshed
from
time to time with the blood of patriots & tyrants"
-- Thomas Jefferson
############### ############### #######



--
############### ############### #######
"The people cannot be all, & always well informed. The part which is wrong will
be discontented in proportion to the importance of the facts they misconceive.
If they remain quiet under such misconceptions it is a lethargy, the forerunner
of death to the public liberty. What country before ever existed a century & a
half without a rebellion? & what country can preserve it's liberties if their
rulers are not warned from time to time that their people preserve the spirit
of resistance? Let them take arms... The tree of liberty must be refreshed from
time to time with the blood of patriots & tyrants"
-- Thomas Jefferson
############### ############### #######
Nov 19 '05 #4
In article <uF************ **@TK2MSFTNGP14 .phx.gbl>, Craig Deelsnyder
<cdeelsny@NO_SP AM_4_MEyahoo.co m> wrote:
Friday wrote:

What is the proper syntax in ASP.NET for:
variable = Array("value1", "value2","value 3")

I would simply use the function as is, written in asp, but the pages
are VERY .aspx and choke on it.


http://www.vb-helper.com/howto_net_declare_arrays.html

ALSO: My next piece of the puzzle will be to tackle this one, using the
same test script:
If I want e to ban a violator with a dynamic IP, how do I deal with
entire C-blocks (e.g.: BannedIP is TRUE if sIPAdress contains
123.45.6.*)
Many TIA
:-)
Friday


To get the visitor's IP address (if you don't know this already):
http://groups-beta.google.com/group/...ework.aspnet/b
rowse_frm/thread/dddc409ea955057 1/ba057ebbfed6c18 b?&rnum=2&hl=en #ba057ebbfed6c
18b

To match the 'wildcard' comparison you need, just check

sIPAdress.Index Of("123.45.6." ) = 0

If this is true, then ban them...


Thanks Craig
:-)
Friday

--
############### ############### #######
"The people cannot be all, & always well informed. The part which is wrong will
be discontented in proportion to the importance of the facts they misconceive.
If they remain quiet under such misconceptions it is a lethargy, the forerunner
of death to the public liberty. What country before ever existed a century & a
half without a rebellion? & what country can preserve it's liberties if their
rulers are not warned from time to time that their people preserve the spirit
of resistance? Let them take arms... The tree of liberty must be refreshed from
time to time with the blood of patriots & tyrants"
-- Thomas Jefferson
############### ############### #######
Nov 19 '05 #5
In article <OT************ *@TK2MSFTNGP12. phx.gbl>, Jody Gelowitz
<jg************ **@blah.leevall ey.com> wrote:
What is the proper syntax in ASP.NET for:
variable = Array("value1", "value2","value 3")

Dim sBanned() As String =

{"69.202.123.15 7","216.239.39. 5","216.239.37. 5","216.239.37. 104","216.155.2 00.
231","216.155.2 00.232","216.15 5.200.233","216 .155.200.234"}

Jody


Darn...
Now I'm geting an error: "Expression expected."

at: Dim sBanned() As String =

Something else wrong withmy little fndtion.
Any thoughts?

Now my little test reads:
############### ###############
<%
Dim sIPAddress
sIPAddress = Request.ServerV ariables("HTTP_ X_FORWARDED_FOR ")
if sIPAddress = "" then
sIPAddress = Request.ServerV ariables("REMOT E_ADDR")
End If
%>

<script language="VB" runat=server>

function BannedIP(sIPAdd ress)

Dim sBanned() As String =
("69.202.123.15 7","216.239.39. 5","216.239.37. 5","216.239.37. 104","2
16.155.200.231" ,"216.155.200.2 32","216.155.20 0.233","216.155 .200.234")

Dim i
For i = 0 to UBound( [sBanned] )
If selCriteria(i,1 ) = cstr(sBanned) Then
BannedIP = TRUE
Else
BannedIP = false
End Function

</script>
############### ############### ##

The function is called from an existing .aspx page thus:
############### ############### ##
if BannedIP(sIPAdd ress) then
' show it the "SORRY" page
Server.Execute( "sorry.aspx ")
' Then STOP! (same as PHP's "exit;" statement ???)
Response.End
' otherwise it's cool, go ahead and display this page below
End If
############### ############### ##

--
############### ############### #######
"The people cannot be all, & always well informed. The part which is wrong will
be discontented in proportion to the importance of the facts they misconceive.
If they remain quiet under such misconceptions it is a lethargy, the forerunner
of death to the public liberty. What country before ever existed a century & a
half without a rebellion? & what country can preserve it's liberties if their
rulers are not warned from time to time that their people preserve the spirit
of resistance? Let them take arms... The tree of liberty must be refreshed from
time to time with the blood of patriots & tyrants"
-- Thomas Jefferson
############### ############### #######
Nov 19 '05 #6
Dim sBan as String() = {...}

-Brock
DevelopMentor
http://staff.develop.com/ballen
In article <OT************ *@TK2MSFTNGP12. phx.gbl>, Jody Gelowitz
<jg************ **@blah.leevall ey.com> wrote:
What is the proper syntax in ASP.NET for:
variable = Array("value1", "value2","value 3")

Dim sBanned() As String =

{"69.202.123.15 7","216.239.39. 5","216.239.37. 5","216.239.37. 104","216
.155.200. 231","216.155.2 00.232","216.15 5.200.233","216 .155.200.234"}

Jody

Darn...
Now I'm geting an error: "Expression expected."
at: Dim sBanned() As String =

Something else wrong withmy little fndtion.
Any thoughts?
Now my little test reads:
############### ###############
<%
Dim sIPAddress
sIPAddress = Request.ServerV ariables("HTTP_ X_FORWARDED_FOR ")
if sIPAddress = "" then
sIPAddress = Request.ServerV ariables("REMOT E_ADDR")
End If
%>
<script language="VB" runat=server>

function BannedIP(sIPAdd ress)

Dim sBanned() As String =
("69.202.123.15 7","216.239.39. 5","216.239.37. 5","216.239.37. 104","2
16.155.200.231" ,"216.155.200.2 32","216.155.20 0.233","216.155 .200.234")

Dim i
For i = 0 to UBound( [sBanned] )
If selCriteria(i,1 ) = cstr(sBanned) Then
BannedIP = TRUE
Else
BannedIP = false
End Function
</script>
############### ############### ##
The function is called from an existing .aspx page thus:
############### ############### ##
if BannedIP(sIPAdd ress) then
' show it the "SORRY" page
Server.Execute( "sorry.aspx ")
' Then STOP! (same as PHP's "exit;" statement ???)
Response.End
' otherwise it's cool, go ahead and display this page below
End If
############### ############### ##


Nov 19 '05 #7
Friday, Jody's replied on the Array, but the syntac on your VB code needs a
couple of tweeks:
function BannedIP(sIPAdd ress as String) as Boolean
Dim sBanned, i as integar

sBanned = _
Array("69.202.1 23.157","216.23 9.39.5","216.23 9.37.5","216.23 9.37.104", _
"216.155.200.23 1","216.155.200 .232","216.155. 200.233","216.1 55.200.234")

For i = 0 to UBound( [sBanned] )
If sIPAddress = cstr(sBanned(i) ) Then
BannedIP = TRUE
Exit For
Else
BannedIP = false
End If
Next
End Function

I am assuming that you are passing the IPAddress to be checked. Also, if you
want to check through the whole array, you will want to check each element of
the array. Also, you will want to break if it finds a banned address.

Just to let you know, I have 25 years of C, C++, C#, and only 1 year of VB
(and then only in MS Office. So you might know more about VB than I.

John H W

"Friday" wrote:
Sorry if this is the wrong group. I tried to find the one I thought
would be most relevant.

I'm an old PHP guy, who knows little about asp and NOTHING about
asp.net, but need to learn at least enough to convert a favorite PHP
script to work on an ASP.NET site.

I'm experimenting with simple example scripts that will help me learn
how to implement each "piece" of the puzzle.

Doing well so far... one piece of the puzzle at a time.
I need to create a simple funtion that will check the IP Address of a
visitor against an "array variable" of banned IPs.

In asp, it saeems simple enough. Here's the include that contains the
function to be called (in .asp):

############### ###############
<%
Dim sIPAddress
sIPAddress = Request.ServerV ariables("HTTP_ X_FORWARDED_FOR ")
if sIPAddress = "" then
sIPAddress = Request.ServerV ariables("REMOT E_ADDR")
End If
%>

<script language="VB" runat=server>

function BannedIP(sIPAdd ress)
Dim sBanned
sBanned =
Array("69.202.1 23.157","216.23 9.39.5","216.23 9.37.5","216.23 9.37.104","2
16.155.200.231" ,"216.155.200.2 32","216.155.20 0.233","216.155 .200.234")

Dim i
For i = 0 to UBound( [sBanned] )
If selCriteria(i,1 ) = cstr(sBanned) Then
BannedIP = TRUE
Else
BannedIP = false
End Function

</script>
############### ############### ##

The function is called from an existing .aspx page thus:
############### ############### ##
if BannedIP(sIPAdd ress) then
' show it the "SORRY" page
Server.Execute( "sorry.aspx ")
' Then STOP! (same as PHP's "exit;" statement ???)
Response.End
' otherwise it's cool, go ahead and display this page below
End If
############### ############### ##

ASP.NET doesn't like this at all!
It tells me: "'Array' is a type and cannot be used as an expression."
:-(

What is the proper syntax in ASP.NET for:
variable = Array("value1", "value2","value 3")

I would simply use the function as is, written in asp, but the pages
are VERY .aspx and choke on it.
ALSO: My next piece of the puzzle will be to tackle this one, using the
same test script:
If I want e to ban a violator with a dynamic IP, how do I deal with
entire C-blocks (e.g.: BannedIP is TRUE if sIPAdress contains
123.45.6.*)
Many TIA
:-)
Friday

--
############### ############### #######
"The people cannot be all, & always well informed. The part which is wrong will
be discontented in proportion to the importance of the facts they misconceive.
If they remain quiet under such misconceptions it is a lethargy, the forerunner
of death to the public liberty. What country before ever existed a century & a
half without a rebellion? & what country can preserve it's liberties if their
rulers are not warned from time to time that their people preserve the spirit
of resistance? Let them take arms... The tree of liberty must be refreshed from
time to time with the blood of patriots & tyrants"
-- Thomas Jefferson
############### ############### #######

Nov 19 '05 #8
In article <0B************ *************** *******@microso ft.com>, John H
W <Jo****@discuss ions.microsoft. com> wrote:
Friday, Jody's replied on the Array, but the syntac on your VB code needs a
couple of tweeks:
function BannedIP(sIPAdd ress as String) as Boolean
Dim sBanned, i as integar
I see. Thank You.
But.... do I use Jody's example for declaring the variable or the
following example [variable=Array( ...)]???
sBanned = _
Array("69.202.1 23.157","216.23 9.39.5","216.23 9.37.5","216.23 9.37.104", _
"216.155.200.23 1","216.155.200 .232","216.155. 200.233","216.1 55.200.234")

For i = 0 to UBound( [sBanned] )
If sIPAddress = cstr(sBanned(i) ) Then
BannedIP = TRUE
Exit For
Else
BannedIP = false
End If
Next
End Function

I am assuming that you are passing the IPAddress to be checked.
Yes.
Also, if you
want to check through the whole array, you will want to check each element of
the array. Also, you will want to break if it finds a banned address.

Just to let you know, I have 25 years of C, C++, C#, and only 1 year of VB
(and then only in MS Office. So you might know more about VB than I.


Not quite.
Just an old PHP guy.

--
Nov 19 '05 #9
I have not used Array as such. How I do it is:

Dim sIPAddress(8) as String
I would use 8 or some other amount that I would not exceed. I then use
another function to fill it from an XML or other "formated" file, passing the
array, i.e.,

brtn = FillBannedAddre sses(sIPAddress ())

Then declare the other function as
public function FillBannedAddre sses(ByRef sIPAddress() as string) as Boolean
I then return a true if filled (false if a problem)

In this other function, I would open the file, parse it and load the
addresses into the passed array (byref).

I am leaving work now or I would give you some more "pointers."

John H W

"Friday" wrote:
In article <0B************ *************** *******@microso ft.com>, John H
W <Jo****@discuss ions.microsoft. com> wrote:
Friday, Jody's replied on the Array, but the syntac on your VB code needs a
couple of tweeks:
function BannedIP(sIPAdd ress as String) as Boolean
Dim sBanned, i as integar


I see. Thank You.
But.... do I use Jody's example for declaring the variable or the
following example [variable=Array( ...)]???

sBanned = _
Array("69.202.1 23.157","216.23 9.39.5","216.23 9.37.5","216.23 9.37.104", _
"216.155.200.23 1","216.155.200 .232","216.155. 200.233","216.1 55.200.234")

For i = 0 to UBound( [sBanned] )
If sIPAddress = cstr(sBanned(i) ) Then
BannedIP = TRUE
Exit For
Else
BannedIP = false
End If
Next
End Function

I am assuming that you are passing the IPAddress to be checked.


Yes.
Also, if you
want to check through the whole array, you will want to check each element of
the array. Also, you will want to break if it finds a banned address.

Just to let you know, I have 25 years of C, C++, C#, and only 1 year of VB
(and then only in MS Office. So you might know more about VB than I.


Not quite.
Just an old PHP guy.

--

Nov 19 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

29
4060
by: Friday | last post by:
Sorry if this is the wrong group. I tried to find the one I thought would be most relevant. I'm an old PHP guy, who knows little about asp and NOTHING about asp.net, but need to learn at least enough to convert a favorite PHP script to work on an ASP.NET site. I'm experimenting with simple example scripts that will help me learn how to implement each "piece" of the puzzle.
6
2073
by: JNY | last post by:
Hello, Is it possible to declare an array with variable indeces? i.e. int x = 4; int myArray; for (j = 0;j < 5;j++) {
4
1658
by: Peter Duniho | last post by:
On Thu, 14 Aug 2008 18:56:00 -0700, Phill <Phill@discussions.microsoft.comwrote: For future reference, if you are asking for help with an error (compile or execution), you really should post the complete text of the error and be specific about when and where it happens. That said, in your code it's clear what's wrong:
0
9600
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10628
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10113
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6880
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5547
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5685
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4331
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3859
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3011
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.