C++ FAQ by Marshall Cline says: [10.6] Should my constructors use "initialization lists" or "assignment"? [^].
"We make a living by what we get, we make a life by what we give." --Winston Churchill
C++ FAQ by Marshall Cline says: [10.6] Should my constructors use "initialization lists" or "assignment"? [^].
"We make a living by what we get, we make a life by what we give." --Winston Churchill
ValBase2 is stored on the unmanaged heap since you are using new instead of gcnew. Thus, you will have to explicitly delete it: delete ValBase2;
.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
template<typename T>
ref class Base
{
public:
Base(T value) : _value(value) {}
T get_value() { return _value; }
private:
T _value;
};
ref class Derived : Base<String^>
{
public:
Derived(String^ value) : Base(value) {}
};
"We make a living by what we get, we make a life by what we give." --Winston Churchill
1. Use $test as a constant. 2. Rename your param $text to something else, e.g. $sub_text and select="$text" (without this you have an empty string 3. Your if test is incorrect. count does not have a '$' in front of it. "not($count = string-length($text))" 4. The last parm $text should be renamed to $sub_text and select attrib set to "substring($text, $count + 1)" since you should be chopping off the first character and passing it to the next recursion.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
modified on Tuesday, June 7, 2011 7:55 PM
It depends on the point of view, just having multiple physical files or having both multiple physical files and the method of class construction. Yes, you can use multiple files (header/source) in C++ as you do in C#. However, the C# partial class is constructed more like a C++ class-namespace hybrid where you can define methods and data members in multiple source files that somehow come together in the scope of one class.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
A C# Partial Class is not equivalent to the C++ & C++/CLI header/source model. The following cannot not be done with C++ or C++/CLI in different (or in the same) files:
// In source file X:
public partial class Employee
{
public void DoWork()
{
}
}
// In source file Y
public partial class Employee
{
public void GoToLunch()
{
}
}
"We make a living by what we get, we make a life by what we give." --Winston Churchill
He progressed from "A programmer"?
"We make a living by what we get, we make a life by what we give." --Winston Churchill
You need to import the node, XmlNode XmlDocument.ImportNode(XmlNode, bool)
, first.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
Your xsl:for-each
executes in the scope of the current node, arguments. However, your XPath expression was designed to match a child arguments node of a parent arguments node:
<xsl:for-each select="arguments/argument">
It should be:
<xsl:for-each select="argument">
since the argument node is a child of the arguments node.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
Which function you need an example for? If you are using .NET 3.5, you can use the DateTimeOffset
structure: .[^][^]. Examples for DateTime.ToUniversalTime
method: http://msdn.microsoft.com/en-us/library/system.datetime.touniversaltime.aspx[^]. DateTime.UtcNow
works like DateTime.Now
: http://msdn.microsoft.com/en-us/library/system.datetime.utcnow.aspx[^]. gmtime
: http://msdn.microsoft.com/en-us/library/0z9czt0w.aspx[^]. And, _mkgmtime
: http://msdn.microsoft.com/en-us/library/2093ets1.aspx[^].
"We make a living by what we get, we make a life by what we give." --Winston Churchill
If the value was created on computer in local time EST, and it was converted on a computer in local time PST, you will have a 3 hour difference. You should use coordinated universal time (UTC) and adjust the time according to the local time of the computer. .NET has DateTime.UtcNow
and DateTime.ToUniversalTime
and C/C++ has gmtime
.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
modified on Thursday, June 4, 2009 8:02 AM
Go to: http://www.codeproject.com/Messages/3066386/Re-Convert-to-datetime-problem.aspx[^]
"We make a living by what we get, we make a life by what we give." --Winston Churchill
If you are trying to convert a time_t
to a DateTime
in C++/CLI see: http://www.codeproject.com/Messages/3066386/Re-Convert-to-datetime-problem.aspx[^]
"We make a living by what we get, we make a life by what we give." --Winston Churchill
The value, 1243930978, is calculated from the number of seconds from 1/1/1970. To convert to a DateTime
, you must account for this offset:
DateTime time_offset(1970, 1, 1);
DateTime time_converted = time_offset.AddSeconds(1243930978);
"We make a living by what we get, we make a life by what we give." --Winston Churchill
modified on Wednesday, June 3, 2009 4:36 PM
Did you add any data to the dataset?
"We make a living by what we get, we make a life by what we give." --Winston Churchill
The "MySpace" element is not the child of the root node as indicated in: <xsl:template match="/">
. Also, "value-of" needs to be "xsl:value-of".
"We make a living by what we get, we make a life by what we give." --Winston Churchill
modified on Monday, June 1, 2009 2:12 PM
The "so-called" code is returning the ASCII base-10 value of the first character in the string.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
You can use XmlWriter
with XmlWriterSettings
:
XmlWriterSettings settings = new XmlWriterSettings();
settings.OmitXmlDeclaration = false;
settings.Indent = true;
XmlWriter xmlWriter = xmlWriter = XmlWriter.Create(
@"c:\temp\temp.xml", settings);
studentDS.WriteXml(xmlWriter);
xmlWriter.Close();
"We make a living by what we get, we make a life by what we give." --Winston Churchill
modified on Tuesday, May 19, 2009 12:27 PM
Have you tried: onclientclick="status()"
? Sounds like you may have an error in your status()
function.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
modified on Wednesday, May 6, 2009 4:01 PM
See: http://www.codeproject.com/script/Forums/View.aspx?fid=3421&msg=3023232[^]
"We make a living by what we get, we make a life by what we give." --Winston Churchill