Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Comsav - CSV Parser and Reader

Simple release, not much to explain, it parses the data and its easy to fetch the values per column or index. The parser knows if the value is a float or date,
if no headers are found it will auto name the columns or if the value is an unkown type, it wil be saved as an 'Unkown' record type.
The parser also auto-detects what type of EOL (end of line) is used, it be Unix, Mac or Windows.


Code
Imports Comsav

Using doc As Document = Document.Parse(".\Sample.csv")

            Dim a As Double() = doc.GetValuesAtColumn(Of Double)("Column Name")    '// Fetch values at column using name
            Dim b As DateTime() = doc.GetValuesAtColumn(Of DateTime)(0)     '// Fetch values at column using index

End Using

Github: https://github.com/TheBarret/Comsav


Enjoy! -B
This can be very handy for importing data into applications from external sources.
Thanks.
[Image: PVoDiqS.png]
Code
Return String.Format("{0}", Me.Value.ToString)

wat
(Jan 19, 2018 03:57 AM)Ninja Wrote:  
Code
Return String.Format("{0}", Me.Value.ToString)

wat

Apart from the ToString call, what's wrong with it?
[Image: PVoDiqS.png]
(Jan 19, 2018 06:02 AM)Cecilia Wrote:  Apart from the ToString call, what's wrong with it?

Why not return Me.Value.ToString, or just String.Format("{0}", Me.Value)?
(Jan 19, 2018 09:37 AM)Ninja Wrote:  Why not return Me.Value.ToString, or just String.Format("{0}", Me.Value)?

Yes. I do agree with the latter.
He probably did it for expansion later on.
[Image: PVoDiqS.png]
Naturly ninja, you look for lice in the head. With known barret's level of programming, I'am sure he forgot to implement or delete something.

Thank you barret for all of your work.
Thanks. i might actually use it for some statements i get in the email. Would run it as macro and input data i need directly into my records.
[Image: V9Gredc.png]
(Jan 20, 2018 02:50 AM)sh@rp Wrote:  Naturly ninja, you look for lice in the head. With known barret's level of programming, I'am sure he forgot to implement or delete something.

Thank you barret for all of your work.

Shouldn't someone who thinks he is such a great programmer be able to defend that one tiny line of code? The argument was as easy as Cecilia said; "probably for expansion later on". All Barret does is jump straight to passive aggressive insults. He never ever defended his code. I try to bait him into doing so, but all he does is insult me, and people suck his dick for it.
Ninja has a point lol. Why the hell did you return string.format? return the variable itself. String.format is not needed
Just stop the arguing over stupid semantics...
Once again, Washi is right:
Spoiler (Click to View)
[Image: PVoDiqS.png]
(Jan 28, 2018 03:37 PM)Cecilia Wrote:  Just stop the arguing over stupid semantics...
Once again, Washi is right:
Spoiler (Click to View)

Everyone overlooks my point though I state it multiple times. I try to get Barret to defend his code, but he never does. I want to know why he did what he did, but he replies with petty insults or passive aggressiveness instead of ever defending his code. Not once have I seen him defend his code. A good programmer who knows what he is doing should give an argument as to why he did what he did, or admit a mistake if he made one. But not Barret, no, he rather insults me and gets his dick sucked.
(Jan 20, 2018 05:57 AM)Ninja Wrote:  Shouldn't someone who thinks he is such a great programmer be able to defend that one tiny line of code? The argument was as easy as Cecilia said; "probably for expansion later on". All Barret does is jump straight to passive aggressive insults. He never ever defended his code. I try to bait him into doing so, but all he does is insult me, and people suck his dick for it.

But do you not think you are a great programmer? You did not defend your use of ToLower(). That's One tiny bit of code. You then made a sarcastic remark/insult that had nothing to do with the current discussion.

Top it off you minus repped me because that's all you can do. You really are more confused than scooby doo.

Forgot to put you on ignore. Won't make that same mistake twice Mr I pretend to of graduated.

Barret, I will attempt to be a little more helpful. Because unless I'm confused that is the whole point of this forum.

You should be using ToString if you simply want to convert a single value to a String. You should use String.Format if you want to insert a specific formatted value into a longer String.
(Jan 28, 2018 05:03 PM)Ninja Wrote:  Everyone overlooks my point though I state it multiple times. I try to get Barret to defend his code, but he never does. I want to know why he did what he did, but he replies with petty insults or passive aggressiveness instead of ever defending his code. Not once have I seen him defend his code. A good programmer who knows what he is doing should give an argument as to why he did what he did, or admit a mistake if he made one. But not Barret, no, he rather insults me and gets his dick sucked.

I am simply observing that once again the majority of the thread replies are focused not on the content of the OP but of the author.
Aside from one line of code (which was sorted in the first few replies) the majority are just us arguing again over defending/not defending code/attacking people instead of code/all the crap.

Perhaps we should stop this?
(I say we should)

Let's just play happy families.
(Jan 19, 2018 09:37 AM)Ninja Wrote:  Why not return Me.Value.ToString, or just String.Format("{0}", Me.Value)?

get a life seriously, woaw. it doesn't affect the actual compiled program anyway.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C] by HackersFeb 28, 2024 09:00 AM 4 215 Feb 28, 2024 09:00 AM
Last Post: Hackers
[C#] by GuillyianJul 11, 2022 05:19 AM 5 228 Jul 11, 2022 05:19 AM
Last Post: MavenGradle
[Python] by MomentumAug 24, 2021 03:54 PM 3 202 Aug 24, 2021 03:54 PM
Last Post: Momentum