473,655 Members | 3,112 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML Serializer - Skip creation of Blank/Empty Class members

I have a class I am serializing, and need the resultant XML to skip/omit
classes that are not initialized, or their member variables have not been
set. Is this possible?

Say for the following code, sometimes the Person may not have given us one,
both, or either of their addresses.

The serialize function will still put in a "<BillingAddres s />" tag
indicating no data. I want it to completely omit the tag if the class is
empty, similar to the way it omits any tag for blank STRING members, such as
if there is no SSN given.

VB.NET SAMPLE CODE:
=============== ===========
Public Class clsPerson
Public FirstName As String
Public LastName As String
Public BillingAddress As New clsAddress()
Public ShippingAddress As New clsAddress()
Public SSN As String
End Class

Public Class clsAddress
Public AddressLine1 As String
Public AddressLine2 As String
Public City As String
Public StateCode As String
Public ZipCode As String
End Class

Public Function BuildXML()
Dim oPerson As New clsPerson()
oPerson.FirstNa me = "John"
oPerson.LastNam e = "Smith"
'NOTE THERE IS NO ADDRESS INFO or SSN INFO ASSIGNED.

Dim xmlS1 As New XmlSerializer(G etType(clsPerso n))
Dim swri1 As New StringWriter()
Dim xwri1 As New XmlTextWriter(s wri1)

xwri1.Formattin g = Formatting.Inde nted
xmlS1.Serialize (swri1, oPerson)

'Copy to Clipboard for EZ Access While Troubleshooting
Clipboard.SetDa taObject(swri1. ToString())
MsgBox(swri1.To String())
swri1.Close()
End Function
RESULT
==========

<?xml version="1.0" encoding="utf-16"?>
<clsPerson xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance">
<FirstName>John </FirstName>
<LastName>Smith </LastName>
<BillingAddre ss />
<ShippingAddres s />
</clsPerson>

'NOTICE THERE IS A TAG FOR EACH CLASS EVEN THOUGH EMPTY, BUT NO TAG FOR SSN,
THOUGH IT WAS ALSO EMPTY/BLANK.

For this example, it is really no big deal if I were to just include them.
But, in my code I am trying to do, I literally have many nested classes with
many nested classes with many nested classes and I am really generating a
lot of blank tags.

Any ideas? Thanks!
Nov 11 '05 #1
5 2320
You are initializing the fields BillingAddress and ShippingAddress to empty
objects. Therefore the serializer does write the root element for these
objects. You need to either a) only initialize them an instance of
clsAddress when you have data, or b) set them explicitly to Nothing when you
have no data.

--
HTH
Christoph Schittko [MVP]
Software Architect, .NET Mentor

"Tappy Tibbons" <ta**********@s bcglobal.net> wrote in message
news:#P******** ******@TK2MSFTN GP11.phx.gbl...
I have a class I am serializing, and need the resultant XML to skip/omit
classes that are not initialized, or their member variables have not been
set. Is this possible?

Say for the following code, sometimes the Person may not have given us one, both, or either of their addresses.

The serialize function will still put in a "<BillingAddres s />" tag
indicating no data. I want it to completely omit the tag if the class is
empty, similar to the way it omits any tag for blank STRING members, such as if there is no SSN given.

VB.NET SAMPLE CODE:
=============== ===========
Public Class clsPerson
Public FirstName As String
Public LastName As String
Public BillingAddress As New clsAddress()
Public ShippingAddress As New clsAddress()
Public SSN As String
End Class

Public Class clsAddress
Public AddressLine1 As String
Public AddressLine2 As String
Public City As String
Public StateCode As String
Public ZipCode As String
End Class

Public Function BuildXML()
Dim oPerson As New clsPerson()
oPerson.FirstNa me = "John"
oPerson.LastNam e = "Smith"
'NOTE THERE IS NO ADDRESS INFO or SSN INFO ASSIGNED.

Dim xmlS1 As New XmlSerializer(G etType(clsPerso n))
Dim swri1 As New StringWriter()
Dim xwri1 As New XmlTextWriter(s wri1)

xwri1.Formattin g = Formatting.Inde nted
xmlS1.Serialize (swri1, oPerson)

'Copy to Clipboard for EZ Access While Troubleshooting
Clipboard.SetDa taObject(swri1. ToString())
MsgBox(swri1.To String())
swri1.Close()
End Function
RESULT
==========

<?xml version="1.0" encoding="utf-16"?>
<clsPerson xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance">
<FirstName>John </FirstName>
<LastName>Smith </LastName>
<BillingAddre ss />
<ShippingAddres s />
</clsPerson>

'NOTICE THERE IS A TAG FOR EACH CLASS EVEN THOUGH EMPTY, BUT NO TAG FOR SSN, THOUGH IT WAS ALSO EMPTY/BLANK.

For this example, it is really no big deal if I were to just include them.
But, in my code I am trying to do, I literally have many nested classes with many nested classes with many nested classes and I am really generating a
lot of blank tags.

Any ideas? Thanks!

Nov 11 '05 #2
That's what I was afraid of. Do you know of a slick way to do either?

The only thing I could think of was to manually set my classes to NEW
instances, either manually via a special function call before any child
members are set, or make some sort of a wrapper function to do it
automatically before one it's children variables is set. Both seem kind of
kludgy.

I also thought about leaving it as it is, and at the end looping through,
and somehow testing if any of the children members had been assigned
anything, and if not, set it to NOTHING, but I can't come up with a good way
of iterating through and testing the child member vars.

Thanks for any help you can give....
"Tappy Tibbons" <ta**********@s bcglobal.net> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
I have a class I am serializing, and need the resultant XML to skip/omit
classes that are not initialized, or their member variables have not been
set. Is this possible?

Say for the following code, sometimes the Person may not have given us one, both, or either of their addresses.

The serialize function will still put in a "<BillingAddres s />" tag
indicating no data. I want it to completely omit the tag if the class is
empty, similar to the way it omits any tag for blank STRING members, such as if there is no SSN given.

VB.NET SAMPLE CODE:
=============== ===========
Public Class clsPerson
Public FirstName As String
Public LastName As String
Public BillingAddress As New clsAddress()
Public ShippingAddress As New clsAddress()
Public SSN As String
End Class

Public Class clsAddress
Public AddressLine1 As String
Public AddressLine2 As String
Public City As String
Public StateCode As String
Public ZipCode As String
End Class

Public Function BuildXML()
Dim oPerson As New clsPerson()
oPerson.FirstNa me = "John"
oPerson.LastNam e = "Smith"
'NOTE THERE IS NO ADDRESS INFO or SSN INFO ASSIGNED.

Dim xmlS1 As New XmlSerializer(G etType(clsPerso n))
Dim swri1 As New StringWriter()
Dim xwri1 As New XmlTextWriter(s wri1)

xwri1.Formattin g = Formatting.Inde nted
xmlS1.Serialize (swri1, oPerson)

'Copy to Clipboard for EZ Access While Troubleshooting
Clipboard.SetDa taObject(swri1. ToString())
MsgBox(swri1.To String())
swri1.Close()
End Function
RESULT
==========

<?xml version="1.0" encoding="utf-16"?>
<clsPerson xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance">
<FirstName>John </FirstName>
<LastName>Smith </LastName>
<BillingAddre ss />
<ShippingAddres s />
</clsPerson>

'NOTICE THERE IS A TAG FOR EACH CLASS EVEN THOUGH EMPTY, BUT NO TAG FOR SSN, THOUGH IT WAS ALSO EMPTY/BLANK.

For this example, it is really no big deal if I were to just include them.
But, in my code I am trying to do, I literally have many nested classes with many nested classes with many nested classes and I am really generating a
lot of blank tags.

Any ideas? Thanks!

Nov 11 '05 #3
How do you actually populate your Person objects?

Can you just change the class definition to:

Public Class clsPerson
Public FirstName As String
Public LastName As String
Public BillingAddress As clsAddress()
Public ShippingAddress As clsAddress()
Public SSN As String
End Class

and assign BillingAddress and ShippingAddress when the data was entered?
There is also another option but it also requires knowledge if data is
present or not, so I'd stick with a method that instantiates the clsAddress
object adds it to Person and sets the properties. That's just the way the
XmlSerializer works ...

--
HTH
Christoph Schittko [MVP]
Software Architect, .NET Mentor

"Tappy Tibbons" <ta**********@s bcglobal.net> wrote in message
news:em******** ******@tk2msftn gp13.phx.gbl...
That's what I was afraid of. Do you know of a slick way to do either?

The only thing I could think of was to manually set my classes to NEW
instances, either manually via a special function call before any child
members are set, or make some sort of a wrapper function to do it
automatically before one it's children variables is set. Both seem kind of
kludgy.

I also thought about leaving it as it is, and at the end looping through,
and somehow testing if any of the children members had been assigned
anything, and if not, set it to NOTHING, but I can't come up with a good way of iterating through and testing the child member vars.

Thanks for any help you can give....
"Tappy Tibbons" <ta**********@s bcglobal.net> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
I have a class I am serializing, and need the resultant XML to skip/omit
classes that are not initialized, or their member variables have not been set. Is this possible?

Say for the following code, sometimes the Person may not have given us one,
both, or either of their addresses.

The serialize function will still put in a "<BillingAddres s />" tag
indicating no data. I want it to completely omit the tag if the class is
empty, similar to the way it omits any tag for blank STRING members, such as
if there is no SSN given.

VB.NET SAMPLE CODE:
=============== ===========
Public Class clsPerson
Public FirstName As String
Public LastName As String
Public BillingAddress As New clsAddress()
Public ShippingAddress As New clsAddress()
Public SSN As String
End Class

Public Class clsAddress
Public AddressLine1 As String
Public AddressLine2 As String
Public City As String
Public StateCode As String
Public ZipCode As String
End Class

Public Function BuildXML()
Dim oPerson As New clsPerson()
oPerson.FirstNa me = "John"
oPerson.LastNam e = "Smith"
'NOTE THERE IS NO ADDRESS INFO or SSN INFO ASSIGNED.

Dim xmlS1 As New XmlSerializer(G etType(clsPerso n))
Dim swri1 As New StringWriter()
Dim xwri1 As New XmlTextWriter(s wri1)

xwri1.Formattin g = Formatting.Inde nted
xmlS1.Serialize (swri1, oPerson)

'Copy to Clipboard for EZ Access While Troubleshooting
Clipboard.SetDa taObject(swri1. ToString())
MsgBox(swri1.To String())
swri1.Close()
End Function
RESULT
==========

<?xml version="1.0" encoding="utf-16"?>
<clsPerson xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance">
<FirstName>John </FirstName>
<LastName>Smith </LastName>
<BillingAddre ss />
<ShippingAddres s />
</clsPerson>

'NOTICE THERE IS A TAG FOR EACH CLASS EVEN THOUGH EMPTY, BUT NO TAG FOR

SSN,
THOUGH IT WAS ALSO EMPTY/BLANK.

For this example, it is really no big deal if I were to just include

them. But, in my code I am trying to do, I literally have many nested classes

with
many nested classes with many nested classes and I am really generating a lot of blank tags.

Any ideas? Thanks!


Nov 11 '05 #4
Something like this? Can you think of anything more elegant?
=============== ==========

Public Class clsPerson
Public FirstName As String
Public LastName As String
Public BillingAddress As clsAddress
Public ShippingAddress As clsAddress
Public SSN As String

Public Sub BillingAddress_ New()
BillingAddress = New clsAddress()
End Sub

Public Sub ShippingAddress _New()
ShippingAddress = New clsAddress()
End Sub

End Class

USAGE:
=============== ===========
Dim oPerson As New clsPerson()
oPerson.FirstNa me = "John"
oPerson.LastNam e = "Smith"
oPerson.Billing Address_New()
oPerson.Billing Address.Address Line1 = "12345 6th Street"
oPerson.Billing Address.City = "Fairfield"


"Christoph Schittko [MVP]" <ch************ ********@austin .rr.com> wrote in
message news:eJ******** ******@TK2MSFTN GP11.phx.gbl...
How do you actually populate your Person objects?

Can you just change the class definition to:

Public Class clsPerson
Public FirstName As String
Public LastName As String
Public BillingAddress As clsAddress()
Public ShippingAddress As clsAddress()
Public SSN As String
End Class

and assign BillingAddress and ShippingAddress when the data was entered?
There is also another option but it also requires knowledge if data is
present or not, so I'd stick with a method that instantiates the clsAddress object adds it to Person and sets the properties. That's just the way the
XmlSerializer works ...

--
HTH
Christoph Schittko [MVP]
Software Architect, .NET Mentor

"Tappy Tibbons" <ta**********@s bcglobal.net> wrote in message
news:em******** ******@tk2msftn gp13.phx.gbl...
That's what I was afraid of. Do you know of a slick way to do either?

The only thing I could think of was to manually set my classes to NEW
instances, either manually via a special function call before any child
members are set, or make some sort of a wrapper function to do it
automatically before one it's children variables is set. Both seem kind of
kludgy.

I also thought about leaving it as it is, and at the end looping through, and somehow testing if any of the children members had been assigned
anything, and if not, set it to NOTHING, but I can't come up with a good way
of iterating through and testing the child member vars.

Thanks for any help you can give....
"Tappy Tibbons" <ta**********@s bcglobal.net> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
I have a class I am serializing, and need the resultant XML to skip/omit classes that are not initialized, or their member variables have not been set. Is this possible?

Say for the following code, sometimes the Person may not have given us

one,
both, or either of their addresses.

The serialize function will still put in a "<BillingAddres s />" tag
indicating no data. I want it to completely omit the tag if the class is empty, similar to the way it omits any tag for blank STRING members, such
as
if there is no SSN given.

VB.NET SAMPLE CODE:
=============== ===========
Public Class clsPerson
Public FirstName As String
Public LastName As String
Public BillingAddress As New clsAddress()
Public ShippingAddress As New clsAddress()
Public SSN As String
End Class

Public Class clsAddress
Public AddressLine1 As String
Public AddressLine2 As String
Public City As String
Public StateCode As String
Public ZipCode As String
End Class

Public Function BuildXML()
Dim oPerson As New clsPerson()
oPerson.FirstNa me = "John"
oPerson.LastNam e = "Smith"
'NOTE THERE IS NO ADDRESS INFO or SSN INFO ASSIGNED.

Dim xmlS1 As New XmlSerializer(G etType(clsPerso n))
Dim swri1 As New StringWriter()
Dim xwri1 As New XmlTextWriter(s wri1)

xwri1.Formattin g = Formatting.Inde nted
xmlS1.Serialize (swri1, oPerson)

'Copy to Clipboard for EZ Access While Troubleshooting
Clipboard.SetDa taObject(swri1. ToString())
MsgBox(swri1.To String())
swri1.Close()
End Function
RESULT
==========

<?xml version="1.0" encoding="utf-16"?>
<clsPerson xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance">
<FirstName>John </FirstName>
<LastName>Smith </LastName>
<BillingAddre ss />
<ShippingAddres s />
</clsPerson>

'NOTICE THERE IS A TAG FOR EACH CLASS EVEN THOUGH EMPTY, BUT NO TAG

FOR SSN,
THOUGH IT WAS ALSO EMPTY/BLANK.

For this example, it is really no big deal if I were to just include them. But, in my code I am trying to do, I literally have many nested
classes with
many nested classes with many nested classes and I am really

generating a lot of blank tags.

Any ideas? Thanks!



Nov 11 '05 #5
How about:

Public Class clsAddress
Public Sub New( line1 As String, line2 As String, ci As String, state
As String, zip As String )
AddressLine1 = line1
AddressLine2 = line2
City = ci
StateCode = state
ZipCode = zip
End Sub

Public Sub New()
' Make the XmlSerializer happy
End Sub

Public AddressLine1 As String
Public AddressLine2 As String
Public City As String
Public StateCode As String
Public ZipCode As String
End Class

Public Sub AddBillingAddre ss( line1 As String, line2 As String, ci As
String, state As String, zip As String )
BillingAddress = New clsAddress( line1, line2, ci, state, zip )
End Sub

Public Sub AddShippingAddr ess( line1 As String, line2 As String, ci As
String, state As String, zip As String )
ShippingAddress = New clsAddress( line1, line2, ci, state, zip )
End Sub
--
HTH
Christoph Schittko [MVP]
Software Architect, .NET Mentor
"Tappy Tibbons" <ta**********@s bcglobal.net> wrote in message
news:ub******** ******@TK2MSFTN GP10.phx.gbl...
Something like this? Can you think of anything more elegant?
=============== ==========

Public Class clsPerson
Public FirstName As String
Public LastName As String
Public BillingAddress As clsAddress
Public ShippingAddress As clsAddress
Public SSN As String

Public Sub BillingAddress_ New()
BillingAddress = New clsAddress()
End Sub

Public Sub ShippingAddress _New()
ShippingAddress = New clsAddress()
End Sub

End Class

USAGE:
=============== ===========
Dim oPerson As New clsPerson()
oPerson.FirstNa me = "John"
oPerson.LastNam e = "Smith"
oPerson.Billing Address_New()
oPerson.Billing Address.Address Line1 = "12345 6th Street"
oPerson.Billing Address.City = "Fairfield"


"Christoph Schittko [MVP]" <ch************ ********@austin .rr.com> wrote in
message news:eJ******** ******@TK2MSFTN GP11.phx.gbl...
How do you actually populate your Person objects?

Can you just change the class definition to:

Public Class clsPerson
Public FirstName As String
Public LastName As String
Public BillingAddress As clsAddress()
Public ShippingAddress As clsAddress()
Public SSN As String
End Class

and assign BillingAddress and ShippingAddress when the data was entered?
There is also another option but it also requires knowledge if data is
present or not, so I'd stick with a method that instantiates the clsAddress
object adds it to Person and sets the properties. That's just the way the
XmlSerializer works ...

--
HTH
Christoph Schittko [MVP]
Software Architect, .NET Mentor

"Tappy Tibbons" <ta**********@s bcglobal.net> wrote in message
news:em******** ******@tk2msftn gp13.phx.gbl...
That's what I was afraid of. Do you know of a slick way to do either?

The only thing I could think of was to manually set my classes to NEW
instances, either manually via a special function call before any child members are set, or make some sort of a wrapper function to do it
automatically before one it's children variables is set. Both seem kind of kludgy.

I also thought about leaving it as it is, and at the end looping through, and somehow testing if any of the children members had been assigned
anything, and if not, set it to NOTHING, but I can't come up with a
good
way
of iterating through and testing the child member vars.

Thanks for any help you can give....
"Tappy Tibbons" <ta**********@s bcglobal.net> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
> I have a class I am serializing, and need the resultant XML to
skip/omit > classes that are not initialized, or their member variables have not

been
> set. Is this possible?
>
> Say for the following code, sometimes the Person may not have given
us one,
> both, or either of their addresses.
>
> The serialize function will still put in a "<BillingAddres s />" tag
> indicating no data. I want it to completely omit the tag if the

class is > empty, similar to the way it omits any tag for blank STRING members,

such
as
> if there is no SSN given.
>
> VB.NET SAMPLE CODE:
> =============== ===========
> Public Class clsPerson
> Public FirstName As String
> Public LastName As String
> Public BillingAddress As New clsAddress()
> Public ShippingAddress As New clsAddress()
> Public SSN As String
> End Class
>
> Public Class clsAddress
> Public AddressLine1 As String
> Public AddressLine2 As String
> Public City As String
> Public StateCode As String
> Public ZipCode As String
> End Class
>
> Public Function BuildXML()
> Dim oPerson As New clsPerson()
> oPerson.FirstNa me = "John"
> oPerson.LastNam e = "Smith"
> 'NOTE THERE IS NO ADDRESS INFO or SSN INFO ASSIGNED.
>
> Dim xmlS1 As New XmlSerializer(G etType(clsPerso n))
> Dim swri1 As New StringWriter()
> Dim xwri1 As New XmlTextWriter(s wri1)
>
> xwri1.Formattin g = Formatting.Inde nted
> xmlS1.Serialize (swri1, oPerson)
>
> 'Copy to Clipboard for EZ Access While Troubleshooting
> Clipboard.SetDa taObject(swri1. ToString())
> MsgBox(swri1.To String())
> swri1.Close()
> End Function
>
>
> RESULT
> ==========
>
> <?xml version="1.0" encoding="utf-16"?>
> <clsPerson xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance">
> <FirstName>John </FirstName>
> <LastName>Smith </LastName>
> <BillingAddre ss />
> <ShippingAddres s />
> </clsPerson>
>
> 'NOTICE THERE IS A TAG FOR EACH CLASS EVEN THOUGH EMPTY, BUT NO TAG FOR SSN,
> THOUGH IT WAS ALSO EMPTY/BLANK.
>
> For this example, it is really no big deal if I were to just include

them.
> But, in my code I am trying to do, I literally have many nested classes with
> many nested classes with many nested classes and I am really

generating
a
> lot of blank tags.
>
> Any ideas? Thanks!
>
>



Nov 11 '05 #6

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

Similar topics

0
1483
by: Mark | last post by:
Hi all, i'm trying to serialize a class. Using the constructor of XmlSerializer i get these (odd?) errors: "File or assembly name goseij9w.dll, or one of its dependencies, was not found". Everytime i run the testprogram it complains about another exotically named dll like et_kn-hl.dll or afeaqisr.dll. Even the example from msdn throws these errors. Anyone knows wuts wrong?
3
1661
by: Emmanuel Thomé | last post by:
This is a comment aside the empty class behavior FAQ. I understand there are a fair number of reasons which make empty classes have non-zero size (except as base classes). If ``class foo'' were of size 0, then: - an object of type foo may lie at the same address as another. - arrays of foo objects would have size 0, and pointer arithmetic on array cell would break. - requirements of the standard explicitly stating objects have
4
3493
by: William Payne | last post by:
Hello, I was under the impression that if I made a class Foo and if I didn't specify a copy constructor I would get one anyway that simply assigns the member variables (and that won't work for dynamically allocated member variables). Anyway, I have a program that segfaults without a copy constructor but if I add an empty one, the segfault is gone. The code is ugly indeed so I don't want to post it, but, in general terms, what sort of error...
3
26347
by: puzzlecracker | last post by:
I want to read lines and skip blank lines: would this work considering the lines can contain tabs, spaces, etc.? file.in: ------ line1 line2
3
2109
by: Mark | last post by:
Hi all, i'm trying to serialize a class. Using the constructor of XmlSerializer i get these (odd?) errors: "File or assembly name goseij9w.dll, or one of its dependencies, was not found". Everytime i run the testprogram it complains about another exotically named dll like et_kn-hl.dll or afeaqisr.dll. Even the example from msdn throws these errors. Anyone knows wuts wrong?
6
4657
by: Wilfried Mestdagh | last post by:
Hi, I use this class to save application settings in a xml file. Sometime I have exception error in the Load method, and sometime in the Save method. Is this a bug in NET or is there something I do wrong ? I load in the form Load and save in the FormClosing. This is the class: public class Config { public formSettings MainForm = new formSettings();
8
4278
by: Q. John Chen | last post by:
I have following code: public class Member { public string FirstName; public string LastName; public string GetXml() { StringBuilder sb = new StringBuilder(); XmlSerializer serializer
10
1242
by: John | last post by:
Hi, How can I achieve that a childs constructor is only callable from it's parent? Must I declare the class Private within A? Thanks in Advance Public MustInherit Class A Protected Sub New()
2
16955
code green
by: code green | last post by:
I am trying to skip empty rows in a csv file The manual states But none of these tests seem to work. Anybody know why while(($data = fgetcsv($this->handle)) !== false) { if(!is_null($data)) #no if(!empty($data)) #no if(!empty($data)) #no { And variations thereof
0
8380
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8296
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
8816
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
7310
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5627
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
4150
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
4299
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1928
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1598
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.