|
Thanks! We learned basic XSLT in our course (although I am not sure there is much to it to be honest) but applying it for other stuff is kind of fun. Going to check out the System.ServiceModel.SyndicationFeed. I got something sort of working with this Ektron system, bit ghetto but it displays titles, links to the "blog" post and all.
|
# ? Feb 14, 2012 18:35 |
|
|
# ? May 13, 2024 22:35 |
|
I checked the OP but it's 3+ years old, and I think there are newer .Nets than that, could someone recommend a book to learn C# from?
|
# ? Feb 14, 2012 19:24 |
|
Vintersorg posted:Thanks! We learned basic XSLT in our course (although I am not sure there is much to it to be honest) but applying it for other stuff is kind of fun. XSLT isn't fun. Its kind of like loving a retard, without the nut.
|
# ? Feb 14, 2012 20:22 |
|
Crankit posted:I checked the OP but it's 3+ years old, and I think there are newer .Nets than that, could someone recommend a book to learn C# from? I might get some grief, but I had a great learning experience (albeit from a truly beginner standpoint) with Head First C#
|
# ? Feb 14, 2012 20:32 |
|
Crankit posted:I checked the OP but it's 3+ years old, and I think there are newer .Nets than that, could someone recommend a book to learn C# from? I enjoyed Programming C#
|
# ? Feb 14, 2012 20:37 |
|
wwb posted:XSLT isn't fun. Its kind of like loving a retard, without the nut. As long as you keep it simple it's okay. Basic poo poo like: <xsl:if test="position() < 5"> <!-- display news items here --> </xsl:if> Anything more complicated and i'd rather use something else.
|
# ? Feb 14, 2012 21:37 |
|
Crankit posted:I checked the OP but it's 3+ years old, and I think there are newer .Nets than that, could someone recommend a book to learn C# from? I've heard reasonable things about Visual C# 2010 Step By Step. It's basically the official Microsoft beginner C# book for .NET 4.
|
# ? Feb 14, 2012 21:50 |
|
XSLT is actually really neat from a multi-platform/transformation perspective.
|
# ? Feb 15, 2012 00:13 |
|
Once you stop treating xslt like it should be a programming language it's pretty useful.
|
# ? Feb 15, 2012 00:59 |
|
I'm running into a bit of trouble with a multi-threaded program. I'm getting completely random results (+- 100) with this bit of code:code:
code:
Does anyone have an idea why countAllHits will end up being 9900 +-, when it should be 10,000 on the dot? It's totally screwing up my status update so I don't know when it's finished running e(clarify): finishedHits will be 10,000, countAllHits will not be 10,000. Nearly immediately after finishedHits is incremented, a new threadpool call is made, which nearly immediately increments countAllHits as well. Knyteguy fucked around with this message at 04:15 on Feb 16, 2012 |
# ? Feb 16, 2012 04:07 |
|
Not too familiar with C# threading so I could be wrong, but I think you need to lock around "countAllHits++;". It seems like a single operation but it's actually several (loading the value, incrementing it, and storing it back), so if a thread gets interrupted in the middle of those three steps the value will end up being wonky. Edit: You should really lock around any operation where a thread changes a variable accessible by other threads. Some classes have this locking baked into their methods but definitely not the primitive value types. Eggnogium fucked around with this message at 04:16 on Feb 16, 2012 |
# ? Feb 16, 2012 04:14 |
|
Eggnogium posted:Not too familiar with C# threading so I could be wrong, but I think you need to lock around "countAllHits++;". It seems like a single operation but it's actually several (loading the value, incrementing it, and storing it back), so if a thread gets interrupted in the middle of those three steps the value will end up being wonky. Thanks that did it I'll have to lock down the other vars as well, I'm sure that's been causing some issues that I just haven't noticed yet.
|
# ? Feb 16, 2012 04:24 |
|
Knyteguy posted:Thanks that did it I'll have to lock down the other vars as well, I'm sure that's been causing some issues that I just haven't noticed yet. If you're doing this just to learn, look into using the Task Parallel Library. It's really powerful and will make your life a hell of a lot easier. http://msdn.microsoft.com/en-us/library/dd537609.aspx New Yorp New Yorp fucked around with this message at 04:38 on Feb 16, 2012 |
# ? Feb 16, 2012 04:35 |
|
Knyteguy posted:Thanks that did it I'll have to lock down the other vars as well, I'm sure that's been causing some issues that I just haven't noticed yet. The Interlocked class has methods to perform increment atomically without locking.
|
# ? Feb 16, 2012 04:37 |
|
Sedro posted:No offense but it looks like you're totally over your head. That code you posted is full of horrors. You should really learn the threading concepts instead of just sprinkling mutex locks everywhere. Thanks I'll take a look at that. I've also used a bit of Parallel.ForEach but the program actually ended up slowing down. Because this is my first 'real' program, I'm not very worried about anything other than it working (which it is, besides some thread issues). If you think this part is bad though, you would probably get a headache from my regex list parsing . However besides the Interlocked class, do you mind mentioning a few of these 'horrors' so I can see where I can improve? If you get a chance. Knyteguy fucked around with this message at 05:29 on Feb 16, 2012 |
# ? Feb 16, 2012 05:27 |
|
http://www.albahari.com/threading/ - Threading in C#.
|
# ? Feb 16, 2012 05:30 |
|
FrantzX posted:http://www.albahari.com/threading/ - Threading in C#. Seconding that as something which helped me a lot.
|
# ? Feb 16, 2012 10:27 |
|
Knyteguy posted:Thanks I'll take a look at that. I've also used a bit of Parallel.ForEach but the program actually ended up slowing down. Because this is my first 'real' program, I'm not very worried about anything other than it working (which it is, besides some thread issues). That's probably because you should really only use Parallel.ForEach when you're trying to parallelize a processor-intensive task. What you're doing isn't heavy at all, so the overhead of creating new threads is outweighing the benefit you get from parallelizing it. If your goal is to keep the UI thread responsive, use a BackgroundWorker or look into doing your blocking operation asynchronously -- asynchronous programming doesn't necessarily use an additional thread.
|
# ? Feb 16, 2012 13:59 |
|
I dunno if I'm missing it or not, but does anyone know if Codeplex has some way of generating documentation from code comments? It's a bit rough having to write up all their wiki pages manually.
|
# ? Feb 16, 2012 14:25 |
|
PhonyMcRingRing posted:I dunno if I'm missing it or not, but does anyone know if Codeplex has some way of generating documentation from code comments? It's a bit rough having to write up all their wiki pages manually. There's ghostdoc, which will generate method/class summaries from the method/class names, and Sandcastle will generate MSDN-style docs. http://sandcastle.codeplex.com/
|
# ? Feb 16, 2012 14:27 |
|
Recommend me a PDF API for c#. Our current tool is years out of date and I have a bunch of web forms that will need archiving in our imaging system, which prefers PDF. A little spend is OK, but free/ OS is preferred.
|
# ? Feb 16, 2012 16:44 |
|
Knyteguy posted:Thanks that did it I'll have to lock down the other vars as well, I'm sure that's been causing some issues that I just haven't noticed yet. You should also not lock code:
|
# ? Feb 16, 2012 17:11 |
|
FrantzX posted:http://www.albahari.com/threading/ - Threading in C#. Wow, this was great. Thank you.
|
# ? Feb 16, 2012 17:36 |
|
boo_radley posted:Recommend me a PDF API for c#. Our current tool is years out of date and I have a bunch of web forms that will need archiving in our imaging system, which prefers PDF. A little spend is OK, but free/ OS is preferred. PDFSharp!
|
# ? Feb 16, 2012 18:22 |
|
Ithaqua posted:PDFSharp!
|
# ? Feb 16, 2012 18:27 |
|
Oh wow, every PDF generating tool looks 90% the same and it results in tons of ugly as gently caress code. Gonna check out PDFSharp now, looks promising if samey.
|
# ? Feb 16, 2012 19:48 |
|
boo_radley posted:Oh wow, every PDF generating tool looks 90% the same and it results in tons of ugly as gently caress code. Gonna check out PDFSharp now, looks promising if samey. Let me know what you find out, I did the same research about 2 years ago and came up with nothing that didn't suck rear end or cost far too much for the crap it output (looking at you Adobe).
|
# ? Feb 16, 2012 22:15 |
|
My research concluded the best option was to print an RTF document to a PDF "printer".
|
# ? Feb 16, 2012 22:22 |
|
edit; one big giant derp
Sab669 fucked around with this message at 22:41 on Feb 16, 2012 |
# ? Feb 16, 2012 22:37 |
|
boo_radley posted:Recommend me a PDF API for c#. Our current tool is years out of date and I have a bunch of web forms that will need archiving in our imaging system, which prefers PDF. A little spend is OK, but free/ OS is preferred. PFSharp did what i needed which was. Underlay a background image that is a form and then put text overtop like its printing out properly on the form.
|
# ? Feb 17, 2012 01:08 |
|
I suspect I will be very active in this thread and stackoverflow in the near future as I start my dream personal project. I'm planning on using C# to write a weather simulator, based on input data from the major computer models available for public consumption. (please tell me I'm not nuts for attempting this) aBagorn fucked around with this message at 16:02 on Feb 17, 2012 |
# ? Feb 17, 2012 16:00 |
|
Are you planning on using it to become a supervillain?
|
# ? Feb 17, 2012 16:14 |
|
Gravy Jones posted:Are you planning on using it to become a supervillain? Of course. In reality, no. I just want the program to grab the data from the computer models based on a user inputted date range and then output a simulation of weather conditions (for an inputted location (street address converted to lat/long) ) during that timeframe. Just your average weather junkie aBagorn fucked around with this message at 17:14 on Feb 17, 2012 |
# ? Feb 17, 2012 16:56 |
|
Writing physical simulators is fun, good luck! Make sure you check out the Task Parallel Library and stuff like Parallel.For before you start. Those tools will let you partition your simulation domain into chunks that can run on different processor cores for maximum speed (and occasionally hilarious bugs if you do it wrong).
|
# ? Feb 17, 2012 17:43 |
|
Knyteguy posted:However besides the Interlocked class, do you mind mentioning a few of these 'horrors' so I can see where I can improve? If you get a chance. code:
code:
code:
code:
code:
|
# ? Feb 17, 2012 18:18 |
|
So, I'm releasing my first open source project: Detergent. It's an (almost)unobtrusive cascading dropdown library for MVC3. I spent a fair amount of time trying to make this the easiest thing to use, so it should only take about 5 seconds to get the hang of(I hope!). The jQuery script itself can run independently of the MVC, too.
|
# ? Feb 18, 2012 00:25 |
|
Sweet. Have you made a nuget package? They do your traction wonders . . .
|
# ? Feb 18, 2012 01:15 |
|
wwb posted:Sweet. Have you made a nuget package? They do your traction wonders . . . Not yet, though I'm thinking about it. Probably not jumping on that right away, though.
|
# ? Feb 18, 2012 01:20 |
|
*Sob* I had to start work on a Webforms UserControl today. It was a humbling experience. Actually, it's a 'web part' for Kentico CMS. So there's a couple layers of classes (god knows what they do), but it eventually boils down a UserControl. So on the ascx I declared a drop down list code:
code:
Except, when I enter the dropdownlist_selectedindexchanged event handler, I don't appear to have any viewstate. No, selected index, nada nothing. ViewState is enabled for the dropdownlist, the user control it's container and the page. I had an identical problem with a Repeater that I did much the same thing to, when I entered a Button click event handler that I wanted to iterate over the repeater with. What am I forgetting?
|
# ? Feb 18, 2012 06:24 |
|
|
# ? May 13, 2024 22:35 |
|
Ok, what do you guys consider to be the best map API, Google or otherwise, for .NET?
|
# ? Feb 18, 2012 14:10 |