|
Hm... since many are so concious about their CP reputation, would it help to show voting statistics on the members profile pages (e.g. average of given votes for total/year/week)? Call it karma indicator.
|
|
|
|
|
|
I would also ask that Chris either has a word with the person responsible and reminds them of the terms and conditions of the site, or removes them outright - if they are an old troll coming back here, Chris can take the nuclear option and ban the IP address.
|
|
|
|
|
I am 100% agree with Pete.
NMehta83
“We cannot fail until we fail to try”
|
|
|
|
|
Why don't you reply to him and say you've never downvoted anyone?
I'd be happy to post the raw logs of your voting history if you wish.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
I noticed an error while reading through the Contest Entries and Requirements in the Terms and Conditions for the Windows Phone 7 Competition, I noticed that it states:
3. The articles must be an Android development tutorial or application template.
Cheers,
Daniel
|
|
|
|
|
|
Whoops. Thank for the catch - all fixed
Thanks,
Sean Ewington
The Code Project
|
|
|
|
|
Could this question be something to do with the rather excellent article the lovely Katka posted the other day? Damn, but she set the bar really high.
|
|
|
|
|
Cheers Pete.
mmm unfortunately it was submitted before the comp was announced. But perhaps part 2 will make it in there.
|
|
|
|
|
I might just have to spike your computers. BTW - when is your book released? I've had conflicting information from Amazon; latest details says that it will be released on New Years Eve.
|
|
|
|
|
Street date is for some time in Feb. We'll have to see though. I'm looking forward to having more time for articles. I'm going to talk to my publisher about putting some of the book on CP.
|
|
|
|
|
If you need a tech reviewer mate
|
|
|
|
|
Thanks buddy.
|
|
|
|
|
...someone genuinely did not like the answers here[^]?
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
I Upvoted for fairness.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC League Table Link
CCC Link[ ^]
|
|
|
|
|
Thanks.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
I give you a 5 for that as well. You're teaching the guy to dig a well, instead of just handing him a small cup of water.
|
|
|
|
|
This[^] guy is spamming the CSS forum. [^]
[EDIT] Hah, Just noticed the irony [/EDIT]
|
|
|
|
|
ex-spammer.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Hi Chris,
I was posting answer to one question. I don't know but somehow, my same answer was posted twice. Might be, it was due to clicking twice on Submit button. But it should not happen.
Then I thought to delete one, but now it is there with status as deleted (which is fine).
Please see the link below
Click here
|
|
|
|
|
We do have checks in place but clearly something slipped through. I'll make a bug entry.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
|
Hi editor.
I write a article use the following HTML code, when I publish , I find all source code (include XML and C#) move to the end automatic ,why?
<ul class="Download">
<li><a href="XLineCounter2010/XLineCounter.zip">Download XLineCounter - 313.13 KB</a></li>
</ul>
<h2>Introduction</h2>
<p ><span >XLineCounter is a open source C# program to analyze source code files and count number of source code line. It can count number of source line, comment line and blank line.</span></p>
<h2>Background</h2>
<p ><span >Million of programmers work hard year after year, and write many source codes in C++, C#, VB or Delphi. Some times they want know how many lines of those source code on earth. Of cause they can not count line by line, so they need a tool to count source lines.</span></p>
<h2>XLineCounter</h2>
<p ><span >Today, source code file is not alone, many source code file construct a project, and the compiler handle the project and generate program file.</span></p>
<p ><span >For example, in VS.NET2005, People create a C# project which file name’s extension is csproj, and add many C# source file to the C# project.</span></p>
<p ><span >XLineCounter need to analyze develop project file and get a list of source code file, also equip source code analyzer which can analyze source code like VB , C# or Pascal. So I design XLineCounter structure as the following shape.</span></p>
<p ><span ><img height="391" alt="XLineCounter_Structure.gif" src="XLineCounter2010/XLineCounter_Structure.gif" width="552" /></span></p>
<p ><span >There are two stresses in XLineCounter: first, analyze project file and get file list; second, analyze source file use specify syntax.</span></p>
<p ><span >For example, a C# .NET2005 project file in XML format, There is a sample.</span></p>
<p ><span >
<pre lang="XML">
<Project DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<AssemblyName>CellViewLib</AssemblyName>
</PropertyGroup>
<ItemGroup>
<Reference Include="System">
<Name>System</Name>
</Reference>
</ItemGroup>
<ItemGroup>
<Content Include="App.ico" />
<Compile Include="frmTestCellView.cs">
<SubType>Form</SubType>
</Compile>
<EmbeddedResource Include="frmTestCellView.resx">
<DependentUpon>frmTestCellView.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
</Project>
</pre>
</span></p>
<p ><span >To this XML document, I can execute XPath “Project/ItemGroup/Compile” and get a list of C# source file name. So I write the following C# code.</span></p>
<p >
<span >
<pre lang="CS">
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
doc.LoadXml(txt);
if (doc.DocumentElement.Name == "Project"
&& doc.DocumentElement.GetAttribute("xmlns") == "http://schemas.microsoft.com/developer/msbuild/2003")
{
project.ProjectFileName = strFileName;
project.RootPath = System.IO.Path.GetDirectoryName(strFileName);
ProjectFile ProjFile = new ProjectFile();
ProjFile.FileName = System.IO.Path.GetFileName(strFileName);
ProjFile.FullFileName = strFileName;
ProjFile.Style = FileStyle.None;
project.Files.Add(ProjFile);
System.Xml.XmlNamespaceManager ns = new System.Xml.XmlNamespaceManager(doc.NameTable);
ns.AddNamespace("a", "http://schemas.microsoft.com/developer/msbuild/2003");
System.Xml.XmlNode NameNode = doc.SelectSingleNode("a:Project/a:PropertyGroup/a:AssemblyName", ns);
if (NameNode != null)
{
project.Name = NameNode.InnerText;
}
foreach (System.Xml.XmlElement element in doc.SelectNodes("a:Project/a:ItemGroup/*[name()='Compile' or name()='None' or name()='EmbeddedResource' or name()='Content']", ns))
{
string file = element.GetAttribute("Include");
ProjectFile NewFile = new ProjectFile();
NewFile.FileName = project.FixFileName(file);
if (System.IO.Path.IsPathRooted(file))
{
NewFile.FullFileName = file;
}
else
{
NewFile.FullFileName = System.IO.Path.Combine(project.RootPath, file);
}
if (element.Name == "Compile")
{
NewFile.Style = FileStyle.SourceCode;
}
else if (element.Name == "EmbeddedResource")
{
NewFile.Style = FileStyle.Resource;
}
else
{
NewFile.Style = FileStyle.None;
}
project.Files.Add(NewFile);
}//foreach
}
</pre>
</span></p>
<p ><span >Use this code , XLineCounter can get file list from C#2005 project file. In the same way, XLineCounter can analyze VB.NET2005, VB6.0, Delphi project file and get source code file list.</span></p>
<p ><span >Next, XLineCounter need analyze source code with some kind of syntax. For example, There are some C# source code as the following.</span></p>
<p ><span >
<pre lang="CS">
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
doc.LoadXml(txt);
if (doc.DocumentElement.Name == "Project"
&& doc.DocumentElement.GetAttribute("xmlns") == "http://schemas.microsoft.com/developer/msbuild/2003")
{
project.ProjectFileName = strFileName;
project.RootPath = System.IO.Path.GetDirectoryName(strFileName);
ProjectFile ProjFile = new ProjectFile();
ProjFile.FileName = System.IO.Path.GetFileName(strFileName);
ProjFile.FullFileName = strFileName;
ProjFile.Style = FileStyle.None;
project.Files.Add(ProjFile);
System.Xml.XmlNamespaceManager ns = new System.Xml.XmlNamespaceManager(doc.NameTable);
ns.AddNamespace("a", "http://schemas.microsoft.com/developer/msbuild/2003");
System.Xml.XmlNode NameNode = doc.SelectSingleNode("a:Project/a:PropertyGroup/a:AssemblyName", ns);
if (NameNode != null)
{
project.Name = NameNode.InnerText;
}
foreach (System.Xml.XmlElement element in doc.SelectNodes("a:Project/a:ItemGroup/*[name()='Compile' or name()='None' or name()='EmbeddedResource' or name()='Content']", ns))
{
string file = element.GetAttribute("Include");
ProjectFile NewFile = new ProjectFile();
NewFile.FileName = project.FixFileName(file);
if (System.IO.Path.IsPathRooted(file))
{
NewFile.FullFileName = file;
}
else
{
NewFile.FullFileName = System.IO.Path.Combine(project.RootPath, file);
}
if (element.Name == "Compile")
{
NewFile.Style = FileStyle.SourceCode;
}
else if (element.Name == "EmbeddedResource")
{
NewFile.Style = FileStyle.Resource;
}
else
{
NewFile.Style = FileStyle.None;
}
project.Files.Add(NewFile);
}//foreach
}
</pre>
</span></p>
<p ><span ></span><span >In C# syntax, there are three characters</span></p>
<p style="MARGIN-LEFT: 18pt; TEXT-INDENT: -18pt"><span >1.<span > </span></span><span >Single line comment starts with // .</span></p>
<p style="MARGIN-LEFT: 18pt; TEXT-INDENT: -18pt"><span >2.<span > </span></span><span >Multi-line comment starts with /* and end with */ .</span></p>
<p style="MARGIN-LEFT: 18pt; TEXT-INDENT: -18pt"><span >3.<span > </span></span><span >String data starts with double quotes and end with double quotes.</span></p>
<p style="MARGIN-LEFT: 18pt; TEXT-INDENT: -18pt"><span >4.<span > </span></span><span >In string data , \” define a double quotes characters.</span></p>
<p style="MARGIN-LEFT: 18pt; TEXT-INDENT: -18pt"><span >5.<span > </span></span><span >Multi-line string data starts with @” .</span></p>
<p><span >So I write the following C# code to analyze C# source code text.</span></p>
<p><span >
<pre lang="CS">
// Single line comment
string str = "abc";
string str2 = @"abc
efg";
/*
Multi-line comment
*/
</pre>
</span></p>
<p><span ></span><span >LineInfo type is a class which contains information of a source code line, It define as the following</span></p>
<p><span >
<pre lang="CS">
// string define flag
// 0:It is not define string
// 1:It is a singleline string
// 2:It is a multi-line string
int DefineString = 0;
// Comment flag
bool DefineComment = false ;
foreach( LineInfo info in myLines )
{
info.CodeFlag = false;
if( info.LineText.Length == 0 && DefineString == 2)
info.BlankLine = false;
for(int iCount = 0 ; iCount < info.LineText.Length ; iCount ++)
{
// Get current character
char c = info.LineText[iCount] ;
// Get next character
char c2 = (char)0;
if( iCount < info.LineText.Length - 1 )
c2 = info.LineText[ iCount + 1 ];
if(! char.IsWhiteSpace( c ))
info.BlankLine = false;
// Defineing Comment
if( DefineComment )
{
info.BlankLine = false;
info.CommentFlag = true;
// Finish when meet */
if( c == '*' && c2 == '/' )
{
DefineComment = false;
iCount ++ ;
}
continue ;
}
if( DefineString == 0 )
{
// Is not defining string
if( c == '/' && c2 != 0 )
{
if( c2 == '/' )
{
// Single line comment when meet //
info.CommentFlag = true;
DefineComment = false;
goto NextLine ;
}
if( c2 == '*' )
{
// Start multi-line comment when meet /*
if( iCount > 0 )
info.CodeFlag = true;
info.CommentFlag = true;
DefineComment = true;
iCount ++ ;
continue;
}
}
if( c == '\"')
{
if( iCount < 0 && info.LineText[iCount-1] == '@')
// Start muli-line string when meet @"
DefineString = 2 ;
else
// Start single line string when meet "
DefineString = 1 ;
}
}
else
{
info.BlankLine = false;
// Defining string
if( c == '\"' )
{
// Finish string when meet "
if( iCount < 0 && info.LineText[iCount-1] !='\\' )
DefineString = 0 ;
}
}
if( ! char.IsWhiteSpace( c ))
info.CodeFlag = true;
}//for(int iCount = 0 ; iCount < info.LineText.Length ; iCount ++)
NextLine:;
}//foreach( LineInfo info in myLines )
</pre></span></p>
<p><span ></span><span >By using upper code, XLineCounter can analyze C#.NET2005 project file and C# source code, count number of C# source code. In the same way , XLineCounter can count number of source code of VB.NET, Delphi and C++.</span></p>
<p ><span >This is a snapshot of XLineCounter.</span></p>
<p><img height="490" alt="XLineCounter_Snapshot.jpg" src="XLineCounter2010/XLineCounter_Snapshot.jpg" width="571" />. </p>
<h2>Points of Interest</h2>
<p>None.</p>
<h2>History</h2>
<p>None.</p>
yfyuan
|
|
|
|
|
I fixed it
It's possible you had an <a href> tag that didn't have an end, or it's also possible something went wrong inside the <pre> tags. Our article editor requires you to use HTML inside the <pre> blocks, so "<" as "<" etc.
Thanks,
Sean Ewington
The Code Project
|
|
|
|