[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Looking for someone to help
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 23
Thread images: 6
File: csharp3.png (68 KB, 300x300) Image search: [Google]
csharp3.png
68 KB, 300x300
Greeting /g/
I just started programming in school with C# and we always need to make an analyse of the program we wrote. So I was wondering to make a program in c# that makes the analyse by just having the code. I started looking up on the internet learning how you can automate word in c# but it's a bit complicated because I don't know most of the code. If anyone has some free time and would like to help me you can add me on skype: branco.bryuneel :)
>>
>>51284892
LaTeX is really good for this sort of thing.

Eg you want to describe the performance of the system.
You simply make the timing in your program and save it to a file.
That file is then plotted with a script (R is good for this)
Then you rebuild your document so the new figures are in the document.

If you want a more fully featured solution, look into doxygen.
>>
>>51284946
First answer best answer, listen to him OP

Though I would suggest gnuplot for plotting
>>
I'm not sure I understand.. You're trying to write a C# program that analyzes (whatever that means) your C# code?
>>
File: analyse.jpg (236 KB, 1914x1019) Image search: [Google]
analyse.jpg
236 KB, 1914x1019
>>51284946
Hm Ill check it out but I just need to use some basic add-ins in the otd document like this
>>
>>51285051
Yes look i posted an example
>>
>>51285066
I have no idea what those fields say, but I am sure you know how to write text to a file in C#.

In LaTeX, you add some syntax to the text you want to write in order to turn that into a table.
Then you simply add that file into your document and you are done.

It will be a lot easier for you this way.
>>
>>51285097
Oh okay thanks for the help btw
>>
>>51285097
And do you prefer a site that gives you a good tutorial on how to use LaTeX?
>>
>>51285083
Well what are you analyzing? performance? lines of code? I have no clue what's written on that document...

I see property names and types, so you could just use reflection to get all the properties of a specific class, then write them to a document... Though creating a word document from C# might take some time to do and get right, doesn't look like it's worth it...
>>
>>51285160
https://en.wikibooks.org/wiki/LaTeX
This is a very comprehensive material on LaTeX.
It might be too much so just try it out and use it as a reference when you run into trouble.
>>
File: 1424200859530.jpg (116 KB, 537x800) Image search: [Google]
1424200859530.jpg
116 KB, 537x800
>>51284892
>If anyone has some free time and would like to help me you can add me on skype: branco.bryuneel :)
Fucking an hero, you dumb shit.
>>
>>51285170
Basicly I need to analyse the code, how the code works. But the main thing I want to automate is that for example I have a If statement in my code then i would automaticly use the add-in to make a table. And also name up all the variables that i used in the code
>>
>>51285288
I could only ask ;)
>>
>>51285317
Just make your homework assignment on your own, just like the rest of your class.
The anon that told you about LaTeX has helped more than enough.

This site isn't for spoonfeeding.
>>
File: output.png (53 KB, 589x495) Image search: [Google]
output.png
53 KB, 589x495
>>51285160
Just because I have nothing better to do, Here is a small example of how a document could be structured.

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}

\title{Your First Document}
\author{Anon}

\begin{document}

\maketitle

\section{Example}
This is an example of a document.
The syntax is very simple.
backslash ``$\backslash$'' is an escape character, and things after that will be read as an command.
Brackets ``[]'' is used for options for said commands.
Braces ``{}'' is used for arguments for commands.

\subsection{Figures and Tables}
If you want to insert a table or a figure make an environment as seen in table \ref{table_one}.

\begin{table}[h]
\centering
\begin{tabular}{lll}
\textbf{Name} & \textbf{Type} & \textbf{Range} \\
$var_a$ & char & $0 - 2^8$ \\
$var_b$ & float & $2^{-126} - 2^{127}$\\
\end{tabular}
\caption{Example table. Double backslash means newline. Ambersand means new cell.}
\label{table_one}
\end{table}

% This can easily be modular with \input{file} or \include{file}

\end{document}
>>
>>51285350
>This site isn't for spoonfeeding.
Now I feel silly for making >>51285406 the example for him.
>>
>>51285419
The OP is underage as well.
Kid, with a name like Branco Bruyneel you should really care more about your online privacy.
>>
>>51285456
Why would you worry about privacy if you have nothing to hide?
>>
>>51285484
Are you underage? This site is for 18+ only.
If what I found is right, you are underage and live in Lotenhulle.
>>
>>51285303
So basically all you really need to do is write a program that parses your source code file into a string?

void Main()
{
using (StreamReader sr = File.OpenText(@"C:\Project\MySourceFile.cs"))
{
string s = sr.ReadToEnd();
Console.WriteLine(s);
}
}


That's easy... but why? The whole point of having a compiler is to parse the source code and translate it to IL/binary format. Are you telling me you're going to write a program that tries to "understand the code" exactly like the compiler does? Sounds like a bad idea to me..

I'm sure you can find some tools out there that can analyze your code, do some more googling...
>>
File: flamenwerfer.jpg (34 KB, 398x334) Image search: [Google]
flamenwerfer.jpg
34 KB, 398x334
This is now a thread about German technology.
>>
File: stug.jpg (81 KB, 930x581) Image search: [Google]
stug.jpg
81 KB, 930x581
Thread replies: 23
Thread images: 6

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.