|
You had your article set as 'composing' meaning you weren't finished. I moved it to 'pending' and it should be apporved very soon
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
It's still showing the state as "Composing", and I am not able to view if I check this after logging out.
|
|
|
|
|
Dear Mr. Chris,
My article is still in the composing state and I am not able to view if I signout from CodeProject.
Although I got mail that my article is posted on CP.
Kindly check and update.
Regards,
Nishant
|
|
|
|
|
Hi Nishant,
The article is now available
Thanks,
Sean Ewington
The Code Project
|
|
|
|
|
I wrote a RTF document constructor library in C# almost a year ago. I planned to post an article but never had the time and, in fact, I got bored of writing the library itself. The point was creating reports with clean formatted tables, and I could find no free solutions capable of that.
I'm sorry for being too lazy to write even a good example. But here is something to look at:
private RtfDocument rtf = new RtfDocument(RtfCodePage.Windows1251);
private static RtfFont DefaultFont = new RtfFont("Times New Roman", RtfCharacterSet.Russian, RtfFontFamily.Roman, RtfFontPitch.Variable);
private static RtfParagraphFormatting
Centered12 = new RtfParagraphFormatting(RtfLanguage.Russian, 12F, RtfTextAlign.Center),
LeftAligned12 = new RtfParagraphFormatting(RtfLanguage.Russian),
Centered10 = new RtfParagraphFormatting(RtfLanguage.Russian, 10F, RtfTextAlign.Center);
private static RtfTableCellStyle
LeftAligned12NoBorder = new RtfTableCellStyle(RtfBorderSetting.None, LeftAligned12),
Centered12NoBorder = new RtfTableCellStyle(RtfBorderSetting.None, Centered12),
Centered10AllBordersVertical = new RtfTableCellStyle(RtfBorderSetting.All, Centered10, RtfTableCellVerticalAlign.Center, RtfTableCellTextFlow.LeftToRightBottomToTop);
public RtfExample()
{
RtfFormattedParagraph
empty = new RtfFormattedParagraph(LeftAligned12),
p1fp1 = new RtfFormattedParagraph(Centered12),
p2fp1 = new RtfFormattedParagraph(LeftAligned12);
RtfTableRow
p1tr1 = new RtfTableRow(RtfTableAlign.Center);
rtf.DefaultLanguage = RtfLanguage.Russian;
rtf.FontTable.Add(DefaultFont);
empty.IsFormattingIncluded = false;
empty.AppendParagraph();
p1tr1.Cells.AddRange(new RtfTableCell[] {
new RtfTableCell(5.5F, "A table cell", Centered12NoBorder),
new RtfTableCell(8.75F, "Another table cell", Centered12NoBorder),
});
p1fp1.AppendParagraph(new RtfFormattedText("Sort of header", RtfCharacterFormatting.Bold));
p1fp1.AppendParagraph();
p1fp1.AppendParagraph();
p2fp1.AppendParagraph("Paragraph text");
p2fp1.AppendParagraph();
rtf.Contents.AddRange(new IRtfDocumentPart[] {
p1fp1,
p1tr1,
new RtfPageBreak(),
p2fp1,
empty,
});
}
The conversion to RTF is made using Reflection as the classes have attributes with RTF control words, so the library can be easily expanded (I did not implement the complete RTF Specification). Classes are well documented and self-explanatory.
public class RtfBorder
{
[RtfControlWord("brdrw")]
public int Width = 10;
[RtfControlWord]
public RtfBorderStyle Style = RtfBorderStyle.SingleThicknessBorder;
[RtfControlWord("brdrcf"), RtfIndex]
public int ColorIndex = -1;
public void SetProperties(float width, RtfBorderStyle style, int colorIndex)
{
Width = TwipConverter.ToTwip(width, MetricUnit.Point);
Style = style;
ColorIndex = colorIndex;
}
public void CopyTo(RtfBorder border)
{
border.Width = this.Width;
border.Style = this.Style;
border.ColorIndex = this.ColorIndex;
}
}
Please contact me if you are interested in writing an article about the library or just want to have the source.
modified on Wednesday, July 14, 2010 2:13 AM
|
|
|
|
|
Hi KPEBEDKO,
imho you might consider posting this code, along with a brief summary statement, on 'Tips and Tricks' ? I'm sure some people would find it valuable.
best, Bill
"Many : not conversant with mathematical studies, imagine that because it [the Analytical Engine] is to give results in numerical notation, its processes must consequently be arithmetical, numerical, rather than algebraical and analytical. This is an error. The engine can arrange and combine numerical quantities as if they were letters or any other general symbols; and it fact it might bring out its results in algebraical notation, were provisions made accordingly." Ada, Countess Lovelace, 1844
|
|
|
|
|
Thank you, Bill. You encouraged me to write the article.
|
|
|
|
|
I have an article I wrote years ago, Painting Your Own Tabs[^] which has quite a following, with fixes posted by users etc, so I don't want to kill off the thread.
However, I have since rewritten the code from the ground up, much better, fixing bugs and adding new functionality.
My choices are:
1. Totally, re-write my original article, for the revised code.
2. Add all the revised code change details as a new section at the bottom (or top?) of the article. With the revised code, additional pictures, new coding tips, etc.
3. Post a new article, and change the old one to link to The new Version.
What is the recommend practice?
|
|
|
|
|
If I had an article that would need a serious rewrite (say over 30% gets changed), then I would:
- create a new article,
- choose a similar/same title and add "take 2", "reworked", "revisited", or so to it
- copy all existing material that is still useful into it (maybe add a "copied" note to each chapter),
- add/modify whatever needs being changed (maybe add a "new"/"modified" note to each new chapter),
- start the introduction with "this is a extended and reworked version of my old article [here]"
- add acknowledgments to all people who made helpful comments on the original article.
And on the existing, old article I would add a "a newer article is available [here]" note in the introduction, and a similar message in its forum.
Doing it that way, nobody is forced to read both articles to understand the current situation, and nobody will accidentally read the old one without being aware of the newer one.
|
|
|
|
|
Thanks Luc.
Time to get my article writing hat out.
|
|
|
|
|
I've updated the source code for an old (8+years) C++ article to current compilers and even fixed a bug or two.
I can submit it as a new article, referring back to the old one, or I can contact the original author and see if he's willing to update his original article.
Is there a way to contact the original author without sending an "I've got updated code" message to everyone (I don't want to send the code to anyone until the original author has had the chance to see it).
|
|
|
|
|
Did you try the forum under the article? When you create a "new message" there, an e-mail will be sent to the article's author, who may or may not receive it (the e-mail address may be stale), still be interested in CP, react, etc.
BTW: you could see his recent CP activity by watching his profile page (e.g. reputation graph).
|
|
|
|
|
ok, thanks, as I mentioned I'd hoped to avoid doing this in a public forum because I wanted the original author to get a chance to express an opinion before anyone else. The public approach will work though, so I'll just use that.
|
|
|
|
|
you can leave a message, without too much detail nor code, allowing him to answer in general, possibly enabling a private e-mail reply (as can you, right away, by checking "Allow private email replies to this message" below your message).
|
|
|
|
|
Yep, that's pretty much what I did, I didn't elect "allow private e-mail replies" because I didn't know whether that would expose my e-mail address to anyone who might read my posting.
There seems to be no private way to initiate a conversation, one or other of us must publicly provide a means for anyone to contact us via e-mail (via "allow private e-mail replies" or simply publishing a mail address).
Not that I expect a flood of replies, I'm just the cautious type.
Anyway, I'll wait a few days and see what happens.
Thanks for your advice.
|
|
|
|
|
The "allow private e-mail replies" checkbox, when checked, adds an "Email" widget next to the "Reply" widget of the message, it never exposes an e-mail address, however it enables everyone to send you an e-mail message that will not show in the CodeProject site. See below my sig.
|
|
|
|
|
Hello,
I'm just trying to post my very first article, and I can't get the images to show up. I included them in the zip file I uploaded, along with the zip for the test project. The site successfully extracted the the test project zip (the download link on the article works fine), but it didn't seem to pull out the images with it.
The article hasn't been approved yet, but will (hopefully) appear at http://www.codeproject.com/KB/dialog/SavingTheStateOfAForm.aspx[^], so I assumed from the info that I was supposed to use SavingTheStateOfAForm/imagename.gif in the <img> tag. This didn't work, and nor did anything else I tried.
Anyone know how I get my images to show? Thanks
|
|
|
|
|
Your article seems to contain HTML image tags such as
<img alt="The test project" src="SavingTheStateOfAForm/FormSerialisor3.gif" />
These are incorrect, as they need a relative path; and incomplete, as CP wants them to hold a width, a height and an alternate text as well.
Here is one from one of my articles:
<img src="CPVanity/CPVanityDesignerDetail.gif" width="308" height="220" alt="CPVanity Designer Detail" />
I assume you have been using the Article Submission Wizard. It offers some 4 pages, on one of them you are offered an opportunity to upload files; this is typically used to upload one or two ZIP files (mainly holding the source code and/or a demo EXE), as well as for uploading individual images. When done, it even offers HTML strings that refer to them, which you could copy verbatim into your article's body text.
There is no way the wizard will extract anything from the zip you present.
FWIW: Putting everything in a single zip (the article itself, its images, and its downloads) is the recommended way when you submit your article through e-mail.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Ah, thanks so much for that!
As you probably guessed, this was my first time submitting an article, and I was a bit confused the way it works. Re-reading the instructions on the first page of the wizard, I suppose you could read it to mean it's the place to upload zip files and images, etc. I read it to mean you upload zip files that contain your test project, image files, etc. This idea was supported by the fact that some other info I saw about using the wizard said you were to upload images on step 4. Perhaps this could be clarified for the Hard Of Thinking
Anyway, all fixed now and I'll (hopefully) remember for next time
Thanks again,
Alan
|
|
|
|
|
I've released, as part of our TechEd 2010 celebrations (or by pure coincidence - you decide) a new article layout:
http://beta.codeproject.com/KB/asp/readfile.aspx[^]
I'd like your comments and suggestions so I can do final tweaks this week and go live. If it's an abomination, speak now. If you have suggestions, I'll try and get them done fast. If you just think it looks good, then that's nice to hear too!
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Looks fine to me and I think I can see what it is trying to achieve. While I have no strong feelings I think I prefer the current layout with the article link tree to the left.
It's time for a new signature.
|
|
|
|
|
No major change, if there were only thumbs up and thumbs down for layout, I would not see a fit vote; if there were a 1-to-5 scale I would vote 3, and reconsider later.
Here are some comments:
advantages
+ slightly more modern look, needs getting used to
+ nice set of icons for print, ...
disadvantages
- Bob got demoted; your beta has the main/green menu bar higher up; it makes sense, doesn't look as good (maybe needs getting used to too); having green above and orange below the ad in the header does not look pretty.
- distraction pane now at the right, I don't like it there (*1)
- missing: last update date near first posted date (*2); I know it's near the author's name now, I don't think that is where it belongs
- the vote histogram not immediately visible, and no arrow cursor when hovering
- the new tabs look good but act very slowly
still not improved
= voting histogram is hard to read (try getting vote count on a short column), why not make it 3 times as large?
suggestions
1. make the search bar (bottom part of header) green, same as menu bar, rather than orange.
2. consider a lighter shade of green
3. in the header, let the author's hyperlink point to his profile page, not his article list; and add a (more articles) hyperlink if there are more.
(*1) The first thing I do when installing a new Visual Studio, is move the Solution Pane to the left; having navigation means and other tools to the left seems much more natural. If you must offer it on the right, can you make that a user setting?
(*2) Could easily be fixed.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Hi Chris,
IMO you have posted this in the wrong forum; "Article Writing" is visited by article writers, you however probably want the opinion of article readers, which is a much larger and somewhat different audience.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
It's also visited by editors, sub-editors and mentors, as well as those thinking of writing, or who have already written.
Basically: exactly the people whose opinion I'm currently after.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
The layout at a first glance gives a 1990 look. The current header compared to the new design, is easy to read and all the information is easily available, also all the tags are shown. It gives a clear separation between the article and the article details.
I would rather have the source code link on top of the article than in a separate tab; all it contains are a few links.
The links below the header with names are better. Was there a reason to change share to Digg?
The links on the left are something I used a lot. Would like to have that while reading an article, make it easy to navigate to different sub topic or open it in a new window.
|
|
|
|
|