473,800 Members | 2,950 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

substitute img when EVAL file name is not found

I'm hoping there's a simple way to do this. I need to show a dummy image in
an asp image object if the file is missing. Here's my asp.net 2.0 markup:

<asp:Image ID="imgGrad" runat="server" BorderColor="Di mGray"
BorderStyle="So lid" BorderWidth="1p x" Height="120px" ImageUrl='<%#
"~/Images/ClassmatePics/" & Eval("GradPhoto FileName") %>' ToolTip="Click to
enlarge" /></td>
"GradPhotoFileN ame" is stored in a field in a table. If the file name stored
in the table is "JeffJones. jpg" but there is no "JeffJones. jpg" file in the
"~/Images/ClassmatePics/" folder then I have a dummy jpg image that I want
to show ("MissingPhoto. jpg").

I'm hoping there's an easy way to do that maybe in the EVAL code but I don't
know how. Can someone help me out?

Thanks,

Keith
Jun 27 '08 #1
10 1672
Probably the easiest way is to call a protected method that accepts type
object (e.g., Eval("GradPhoto FileName") ) -- and returns the proper string
url to the image, or the alternate image url.
--Peter
"Keith G Hicks" <kr*@comcast.ne twrote in message
news:eZ******** ******@TK2MSFTN GP05.phx.gbl...
I'm hoping there's a simple way to do this. I need to show a dummy image
in
an asp image object if the file is missing. Here's my asp.net 2.0 markup:

<asp:Image ID="imgGrad" runat="server" BorderColor="Di mGray"
BorderStyle="So lid" BorderWidth="1p x" Height="120px" ImageUrl='<%#
"~/Images/ClassmatePics/" & Eval("GradPhoto FileName") %>' ToolTip="Click
to
enlarge" /></td>
"GradPhotoFileN ame" is stored in a field in a table. If the file name
stored
in the table is "JeffJones. jpg" but there is no "JeffJones. jpg" file in
the
"~/Images/ClassmatePics/" folder then I have a dummy jpg image that I want
to show ("MissingPhoto. jpg").

I'm hoping there's an easy way to do that maybe in the EVAL code but I
don't
know how. Can someone help me out?

Thanks,

Keith

Jun 27 '08 #2
I appreciate the hint but being pretty new to all of this (asp.net) I have
no idea how to go about doing that. I'm fine with VB and can create subs and
functions just fine so if that's what you mean I can do that part I guess
but implementing it in my markup below is not remotely clear to me. I need
as much help as possible.

THanks,

Keith

"Peter Bromberg [C# MVP]" <pb*******@nosp ammaam.yahoo.co mwrote in message
news:30******** *************** ***********@mic rosoft.com...
Probably the easiest way is to call a protected method that accepts type
object (e.g., Eval("GradPhoto FileName") ) -- and returns the proper
string
url to the image, or the alternate image url.
--Peter
"Keith G Hicks" <kr*@comcast.ne twrote in message
news:eZ******** ******@TK2MSFTN GP05.phx.gbl...
I'm hoping there's a simple way to do this. I need to show a dummy image
in
an asp image object if the file is missing. Here's my asp.net 2.0
markup:

<asp:Image ID="imgGrad" runat="server" BorderColor="Di mGray"
BorderStyle="So lid" BorderWidth="1p x" Height="120px" ImageUrl='<%#
"~/Images/ClassmatePics/" & Eval("GradPhoto FileName") %>' ToolTip="Click
to
enlarge" /></td>
"GradPhotoFileN ame" is stored in a field in a table. If the file name
stored
in the table is "JeffJones. jpg" but there is no "JeffJones. jpg" file in
the
"~/Images/ClassmatePics/" folder then I have a dummy jpg image that I
want
to show ("MissingPhoto. jpg").

I'm hoping there's an easy way to do that maybe in the EVAL code but I
don't
know how. Can someone help me out?

Thanks,

Keith

Jun 27 '08 #3
Do this from the codebehind. You have the value of "GradPhotoFileN ame", you
can check if System.Io.File. Exists() and if it doesn't, set the .ImageUrl
property of your imgGrad image to your dummy image URL. I do not know how
you're binding your image to the data though, but how you assign the values
in the codebehind will depend on the method you're using.

--
---------------------------------------------------
S.M. Altaf [MVP]
http://www.mendhak.com/
"Keith G Hicks" <kr*@comcast.ne twrote in message
news:#m******** ******@TK2MSFTN GP04.phx.gbl...
I appreciate the hint but being pretty new to all of this (asp.net) I have
no idea how to go about doing that. I'm fine with VB and can create subs
and
functions just fine so if that's what you mean I can do that part I guess
but implementing it in my markup below is not remotely clear to me. I need
as much help as possible.

THanks,

Keith

"Peter Bromberg [C# MVP]" <pb*******@nosp ammaam.yahoo.co mwrote in
message
news:30******** *************** ***********@mic rosoft.com...
>Probably the easiest way is to call a protected method that accepts type
object (e.g., Eval("GradPhoto FileName") ) -- and returns the proper
string
>url to the image, or the alternate image url.
--Peter
"Keith G Hicks" <kr*@comcast.ne twrote in message
news:eZ******* *******@TK2MSFT NGP05.phx.gbl.. .
I'm hoping there's a simple way to do this. I need to show a dummy
image
in
an asp image object if the file is missing. Here's my asp.net 2.0
markup:
>
<asp:Image ID="imgGrad" runat="server" BorderColor="Di mGray"
BorderStyle="So lid" BorderWidth="1p x" Height="120px" ImageUrl='<%#
"~/Images/ClassmatePics/" & Eval("GradPhoto FileName") %>'
ToolTip="Click
to
enlarge" /></td>
"GradPhotoFileN ame" is stored in a field in a table. If the file name
stored
in the table is "JeffJones. jpg" but there is no "JeffJones. jpg" file in
the
"~/Images/ClassmatePics/" folder then I have a dummy jpg image that I
want
to show ("MissingPhoto. jpg").

I'm hoping there's an easy way to do that maybe in the EVAL code but I
don't
know how. Can someone help me out?

Thanks,

Keith


Jun 27 '08 #4
Here's what I've done so far:

The following markup for an asp:image is in an aspx file in my root folder:

<asp:Image runat="server" ID="imgGradLarg e" ImageUrl='<%#
imageFileToDisp lay("~/Images/ClassmatePics/", val("GradPhotoF ileName"))
%>'></asp:Image>

This VB.net code is in my App_Code folder in a file caled MyUtils.vb

Public Shared Function imageFileToDisp lay(ByVal imageFilePath As String,
ByVal imageFileName As String) As String
If System.IO.File. Exists(imageFil ePath & "/" & imageFileName) Then
imageFileToDisp lay = imageFilePath & "/" & imageFileName
Else
imageFileToDisp lay = imageFilePath & "/NoClassmatePic. jpg"
End If
End Function

I'm sure there's more wrong that I am not aware of but for starters I get
this error:

Compiler Error Message: BC30451: Name 'imageFileToDis play' is not declared.

If you are tempted to respond with "You need to declare
'imageFileToDis play'" then please don't respond. I need to know HOW to do
that in the aspx markup. I haven't found anything that explains how to do
that.

If you see anything else I need to correct, please feel free to be as
specific as possible.

I really need specific coding help. I'm a bit lost on this right now. Pseudo
code suggestions are not what I'm looking for. I need someone to either show
me (I'm still learning) how to corrrect the above code or at least point me
to a website that expains (with actual example code) how to do what I'm
trying to do.

Keith

"Keith G Hicks" <kr*@comcast.ne twrote in message
news:eZ******** ******@TK2MSFTN GP05.phx.gbl...
I'm hoping there's a simple way to do this. I need to show a dummy image
in
an asp image object if the file is missing. Here's my asp.net 2.0 markup:

<asp:Image ID="imgGrad" runat="server" BorderColor="Di mGray"
BorderStyle="So lid" BorderWidth="1p x" Height="120px" ImageUrl='<%#
"~/Images/ClassmatePics/" & Eval("GradPhoto FileName") %>' ToolTip="Click
to
enlarge" /></td>
"GradPhotoFileN ame" is stored in a field in a table. If the file name
stored
in the table is "JeffJones. jpg" but there is no "JeffJones. jpg" file in
the
"~/Images/ClassmatePics/" folder then I have a dummy jpg image that I want
to show ("MissingPhoto. jpg").

I'm hoping there's an easy way to do that maybe in the EVAL code but I
don't
know how. Can someone help me out?

Thanks,

Keith


Jun 27 '08 #5
Ok, I moved my function into the codebehind file for the page as follows:

Protected Function imageFileToDisp lay(ByVal imageFilePath As String,
ByVal imageFileName As String) As String
If File.Exists(Res olveUrl(imageFi lePath) & imageFileName) Then
imageFileToDisp lay = imageFilePath & imageFileName
Else
imageFileToDisp lay = imageFilePath & "NoClassmatePic .jpg"
End If
End Function

and it runs without errors. The problem is that the
ResolveUrl(imag eFilePath) only returns part of the path like this:

/mysite/...

but I need

C:\Inetpub\wwwr oot\mysite\.... ..

What vb.net function will give me this?

Keith
"Keith G Hicks" <kr*@comcast.ne twrote in message
news:eI******** *****@TK2MSFTNG P02.phx.gbl...
Here's what I've done so far:

The following markup for an asp:image is in an aspx file in my root
folder:
>
<asp:Image runat="server" ID="imgGradLarg e" ImageUrl='<%#
imageFileToDisp lay("~/Images/ClassmatePics/", val("GradPhotoF ileName"))
%>'></asp:Image>

This VB.net code is in my App_Code folder in a file caled MyUtils.vb

Public Shared Function imageFileToDisp lay(ByVal imageFilePath As String,
ByVal imageFileName As String) As String
If System.IO.File. Exists(imageFil ePath & "/" & imageFileName) Then
imageFileToDisp lay = imageFilePath & "/" & imageFileName
Else
imageFileToDisp lay = imageFilePath & "/NoClassmatePic. jpg"
End If
End Function

I'm sure there's more wrong that I am not aware of but for starters I get
this error:

Compiler Error Message: BC30451: Name 'imageFileToDis play' is not
declared.
>
If you are tempted to respond with "You need to declare
'imageFileToDis play'" then please don't respond. I need to know HOW to do
that in the aspx markup. I haven't found anything that explains how to do
that.

If you see anything else I need to correct, please feel free to be as
specific as possible.

I really need specific coding help. I'm a bit lost on this right now.
Pseudo
code suggestions are not what I'm looking for. I need someone to either
show
me (I'm still learning) how to corrrect the above code or at least point
me
to a website that expains (with actual example code) how to do what I'm
trying to do.

Keith

"Keith G Hicks" <kr*@comcast.ne twrote in message
news:eZ******** ******@TK2MSFTN GP05.phx.gbl...
I'm hoping there's a simple way to do this. I need to show a dummy image
in
an asp image object if the file is missing. Here's my asp.net 2.0
markup:

<asp:Image ID="imgGrad" runat="server" BorderColor="Di mGray"
BorderStyle="So lid" BorderWidth="1p x" Height="120px" ImageUrl='<%#
"~/Images/ClassmatePics/" & Eval("GradPhoto FileName") %>' ToolTip="Click
to
enlarge" /></td>
"GradPhotoFileN ame" is stored in a field in a table. If the file name
stored
in the table is "JeffJones. jpg" but there is no "JeffJones. jpg" file in
the
"~/Images/ClassmatePics/" folder then I have a dummy jpg image that I
want
to show ("MissingPhoto. jpg").

I'm hoping there's an easy way to do that maybe in the EVAL code but I
don't
know how. Can someone help me out?

Thanks,

Keith


Jun 27 '08 #6
Hhhmmmm....

Not sure, but if your markup is calling imageFileToDisp lay, then you should
be able to change both of the imageFileToDisp lay in your IF and ELSE
statements to return... i.e.

return imageFilePath & "/NoClassmatePic. jpg"
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"Keith G Hicks" <kr*@comcast.ne twrote in message
news:eI******** *****@TK2MSFTNG P02.phx.gbl...
Here's what I've done so far:

The following markup for an asp:image is in an aspx file in my root
folder:

<asp:Image runat="server" ID="imgGradLarg e" ImageUrl='<%#
imageFileToDisp lay("~/Images/ClassmatePics/", val("GradPhotoF ileName"))
%>'></asp:Image>

This VB.net code is in my App_Code folder in a file caled MyUtils.vb

Public Shared Function imageFileToDisp lay(ByVal imageFilePath As String,
ByVal imageFileName As String) As String
If System.IO.File. Exists(imageFil ePath & "/" & imageFileName) Then
imageFileToDisp lay = imageFilePath & "/" & imageFileName
Else
imageFileToDisp lay = imageFilePath & "/NoClassmatePic. jpg"
End If
End Function

I'm sure there's more wrong that I am not aware of but for starters I get
this error:

Compiler Error Message: BC30451: Name 'imageFileToDis play' is not
declared.

If you are tempted to respond with "You need to declare
'imageFileToDis play'" then please don't respond. I need to know HOW to do
that in the aspx markup. I haven't found anything that explains how to do
that.

If you see anything else I need to correct, please feel free to be as
specific as possible.

I really need specific coding help. I'm a bit lost on this right now.
Pseudo
code suggestions are not what I'm looking for. I need someone to either
show
me (I'm still learning) how to corrrect the above code or at least point
me
to a website that expains (with actual example code) how to do what I'm
trying to do.

Keith

"Keith G Hicks" <kr*@comcast.ne twrote in message
news:eZ******** ******@TK2MSFTN GP05.phx.gbl...
>I'm hoping there's a simple way to do this. I need to show a dummy image
in
>an asp image object if the file is missing. Here's my asp.net 2.0 markup:

<asp:Image ID="imgGrad" runat="server" BorderColor="Di mGray"
BorderStyle="S olid" BorderWidth="1p x" Height="120px" ImageUrl='<%#
"~/Images/ClassmatePics/" & Eval("GradPhoto FileName") %>' ToolTip="Click
to
>enlarge" /></td>
"GradPhotoFile Name" is stored in a field in a table. If the file name
stored
>in the table is "JeffJones. jpg" but there is no "JeffJones. jpg" file in
the
>"~/Images/ClassmatePics/" folder then I have a dummy jpg image that I
want
to show ("MissingPhoto. jpg").

I'm hoping there's an easy way to do that maybe in the EVAL code but I
don't
>know how. Can someone help me out?

Thanks,

Keith



Jun 27 '08 #7
I have never used resolveurl, so not sure what it does. However, you should
probably look at Server.MapPath instead of resolveurl.
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"Keith G Hicks" <kr*@comcast.ne twrote in message
news:er******** ******@TK2MSFTN GP02.phx.gbl...
Ok, I moved my function into the codebehind file for the page as follows:

Protected Function imageFileToDisp lay(ByVal imageFilePath As String,
ByVal imageFileName As String) As String
If File.Exists(Res olveUrl(imageFi lePath) & imageFileName) Then
imageFileToDisp lay = imageFilePath & imageFileName
Else
imageFileToDisp lay = imageFilePath & "NoClassmatePic .jpg"
End If
End Function

and it runs without errors. The problem is that the
ResolveUrl(imag eFilePath) only returns part of the path like this:

/mysite/...

but I need

C:\Inetpub\wwwr oot\mysite\.... ..

What vb.net function will give me this?

Keith
"Keith G Hicks" <kr*@comcast.ne twrote in message
news:eI******** *****@TK2MSFTNG P02.phx.gbl...
>Here's what I've done so far:

The following markup for an asp:image is in an aspx file in my root
folder:
>>
<asp:Image runat="server" ID="imgGradLarg e" ImageUrl='<%#
imageFileToDis play("~/Images/ClassmatePics/", val("GradPhotoF ileName"))
%>'></asp:Image>

This VB.net code is in my App_Code folder in a file caled MyUtils.vb

Public Shared Function imageFileToDisp lay(ByVal imageFilePath As String,
ByVal imageFileName As String) As String
If System.IO.File. Exists(imageFil ePath & "/" & imageFileName) Then
imageFileToDisp lay = imageFilePath & "/" & imageFileName
Else
imageFileToDisp lay = imageFilePath & "/NoClassmatePic. jpg"
End If
End Function

I'm sure there's more wrong that I am not aware of but for starters I get
this error:

Compiler Error Message: BC30451: Name 'imageFileToDis play' is not
declared.
>>
If you are tempted to respond with "You need to declare
'imageFileToDi splay'" then please don't respond. I need to know HOW to do
that in the aspx markup. I haven't found anything that explains how to do
that.

If you see anything else I need to correct, please feel free to be as
specific as possible.

I really need specific coding help. I'm a bit lost on this right now.
Pseudo
>code suggestions are not what I'm looking for. I need someone to either
show
>me (I'm still learning) how to corrrect the above code or at least point
me
>to a website that expains (with actual example code) how to do what I'm
trying to do.

Keith

"Keith G Hicks" <kr*@comcast.ne twrote in message
news:eZ******* *******@TK2MSFT NGP05.phx.gbl.. .
I'm hoping there's a simple way to do this. I need to show a dummy
image
in
an asp image object if the file is missing. Here's my asp.net 2.0
markup:
>
<asp:Image ID="imgGrad" runat="server" BorderColor="Di mGray"
BorderStyle="So lid" BorderWidth="1p x" Height="120px" ImageUrl='<%#
"~/Images/ClassmatePics/" & Eval("GradPhoto FileName") %>'
ToolTip="Click
to
enlarge" /></td>
"GradPhotoFileN ame" is stored in a field in a table. If the file name
stored
in the table is "JeffJones. jpg" but there is no "JeffJones. jpg" file in
the
"~/Images/ClassmatePics/" folder then I have a dummy jpg image that I
want
to show ("MissingPhoto. jpg").

I'm hoping there's an easy way to do that maybe in the EVAL code but I
don't
know how. Can someone help me out?

Thanks,

Keith




Jun 27 '08 #8
Well I got it working. So for anyone who ever has a similar question here's
what I ended up doing:

My code behind function is as follows (with Imports System.IO at the top of
the file):

Protected Function imageFileToDisp lay(ByVal imageFileName As String) As
String
If File.Exists(Sys tem.AppDomain.C urrentDomain.Ba seDirectory &
"Images\Classma tePics\" & imageFileName) Then
imageFileToDisp lay = "~/Images/ClassmatePics/" & imageFileName
Else
imageFileToDisp lay = "~/Images/ClassmatePics/NoClassmatePic. jpg"
End If
End Function

System.AppDomai n.CurrentDomain .BaseDirectory is getting the entire path of
the site's root (C:\Inetpub\www root\mySite for example). I suppose I could
have passed the path from the aspx file to the code behind but it's 6 of
one, 1/2 dozen of the other IMO. I didn't use ResolveURL because that
doesn't give the the whole base path.

My markup in the aspx page is as follows:

<asp:Image ID="imgGrad" runat="server" BorderColor="Da rkGray"
BorderStyle="So lid" BorderWidth="1p x" Height="130px" ImageUrl='<%#
imageFileToDisp lay(Eval("GradP hotoFileName")) %>' ToolTip="Click to enlarge"
/>

it all works perfectly fine.

Keith
Jun 27 '08 #9
Probably Server.MapPath( "relativepathto image") would do the trick for you.
Peter

"Keith G Hicks" <kr*@comcast.ne twrote in message
news:eQ******** ******@TK2MSFTN GP06.phx.gbl...
Well I got it working. So for anyone who ever has a similar question
here's
what I ended up doing:

My code behind function is as follows (with Imports System.IO at the top
of
the file):

Protected Function imageFileToDisp lay(ByVal imageFileName As String) As
String
If File.Exists(Sys tem.AppDomain.C urrentDomain.Ba seDirectory &
"Images\Classma tePics\" & imageFileName) Then
imageFileToDisp lay = "~/Images/ClassmatePics/" & imageFileName
Else
imageFileToDisp lay =
"~/Images/ClassmatePics/NoClassmatePic. jpg"
End If
End Function

System.AppDomai n.CurrentDomain .BaseDirectory is getting the entire path of
the site's root (C:\Inetpub\www root\mySite for example). I suppose I could
have passed the path from the aspx file to the code behind but it's 6 of
one, 1/2 dozen of the other IMO. I didn't use ResolveURL because that
doesn't give the the whole base path.

My markup in the aspx page is as follows:

<asp:Image ID="imgGrad" runat="server" BorderColor="Da rkGray"
BorderStyle="So lid" BorderWidth="1p x" Height="130px" ImageUrl='<%#
imageFileToDisp lay(Eval("GradP hotoFileName")) %>' ToolTip="Click to
enlarge"
/>

it all works perfectly fine.

Keith

Jun 27 '08 #10

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

Similar topics

7
1913
by: robcarlton | last post by:
hi everybody I've written this function to make a list of all of an objects attributes and methods (not for any reason, I'm just learning) def list_members(obj) l = dir(obj) return map(lambda x : eval('obj.'+x), l) but I get an error saying that obj isn't defined. As I understand it eval has access to the current local namespace, which does contain
9
8471
by: HikksNotAtHome | last post by:
This is a very simplified example of an Intranet application. But, is there an easier (or more efficient) way of getting the decimal equivalent of a fraction? The actual function gets the select values, this one is a simplified version where its passed. function checkIt(selVal){ valueInDec1 = eval(selVal); //do some calculations here with valueInDec1 }
12
2809
by: Stanley J Mroczek | last post by:
How do you load a dropdownlist when edit is clicked in a datagrid ? <Columns> <asp:BoundColumn DataField="OptionDescription" ItemStyle-Wrap="True" HeaderText="Option Description"></asp:BoundColumn> <asp:TemplateColumn runat="server" HeaderText="Id Type Option" "> <itemtemplate> <asp:label runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "TypeOption") %>' /> <asp:label runat="server" ID="LlbTypeOption" Visible=False...
4
1923
by: J. J. Cale | last post by:
given that I have a js file included which is written programatically and I can't change it. I would like to know how to do the following using something other than the deprecated eval(). whats in the js file var numArrays=something; var data0 = new Array(); data0.name="name"; data0.data="some data"; var data1 = new Array(); data1.name="another name";
12
2013
by: Baldy | last post by:
really tricky one here. I want to be able to call a function but the function name is in a variable. The code is a security module that is querying a table that stores names of functions, forms, reports etc and what access certain groups have. forms, reports etc work fine as I use DoCmd.OpenForm objectToRunName but how do I do it when "objectToRunName" has a function name?
5
2895
by: Steve Richter | last post by:
I have a public variable ( "mZipServiceUrl" ) in my code behind class that I am able to substitute into the HTML of the .aspx file: <span onclick="WindowOpen('<%=mZipServiceUrl%>')" style="text-decoration:underline;cursor:hand;color:red;"> <%=mZipServiceUrl%> </span> but in the same page, I cant substitute the same variable into a user control:
6
2315
by: Nathan Sokalski | last post by:
I am using a DataSet as the DataSource of a DataList in my code. The SQL used to get the data from the database begins with: SELECT members.organization,artists.artist,artists.email,artists.website,members.email FROM members INNER JOIN artists ON members.memberid=artists.memberid WHERE Notice that both tables involved in the SELECT statement have a field named
2
1977
by: malice | last post by:
I have been searching the internet for 12+ hours on how to do this. At this point I'm about to give up. I am using VB .Net 2.0 with the enterprise library jan 2006 release. This is my first time using it and I'm a novice to .Net. I am using the data access quickstart solution and I just started adding my own forms and stuff to it. I got my sql query to work and populate a dataview on my new form with just a few lines of code. Here is my problem...
0
976
by: gouraud | last post by:
Hello, I'm working on Visual Web Developper (ASPX with C# code Behind) I would like to fill a DataList with items using this format (with as item as elements) : "file - element", example : "MyTitle - Theme A" The problem is that labels, which are binded to theses fields, return me an error :
0
9550
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
10501
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...
1
10250
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9085
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...
1
7574
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6811
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
5469
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...
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2944
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.