Open source code snippet repository [closed] - c#

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Does anyone know of a good and simple open source code snippet repository? Ive seen many that are free services, but I want to host it myself. A few google searches just find the free services.

I use Wordpress with WP-Syntax plug-in for that. Selfhosted, easy, and all done by couple clicks :)

Can you clarify what you mean? Do you want one for your own personal use (what is wrong with the built in snippet management in visual studio? Are you looking for examples of design patterns? In that case maybe check java2s or the portland pattern repository. For snippets such as looping constructs, try catches, etc i love Coderush templates.
That being said, my personal opinion is that snippets are as evil as copy-paste. What you probably want is to refactor so that there is no duplicate code. And if you need to share code between projects - some sort of core library might be the way to go.
Edit: In the comments below you specify that you want snippets available via web. I don't have anything to recommend thats exactly like that but you should look into storing your snippets in visual studio and syncing them using LiveMesh. I know of several people that do something similar and they like it.
OOoooor...what's wrong with just a wordpress blog? You can set it to private access only. You get tagging, searching, syntax highlighting (via the google syntax highlight plugin) and a nearly 0 fuss setup.

http://code.google.com or sourceforge not good enough? Also, there is GitHub if you preffer git to svn.
Granted, it's not for short snippets, mainly, but you could easely use it for that.
Edit
Reading again your question and your comments, what you really want is an existing, open source, system to hold short pieces of text made in c#?
I'd guess you'd have to do that yourself, I know of no project to do just that :S

I'm also trying to understand what you mean.
As the top commenter said, there's visual studio. Or there's Github but that's for more of version control and can have some annoying sides when trying to organise things.
There's also Snippet Repo which you can post snippets, favourite other people's stuff. I guess it's like a social code repository.

I'd still suggest using existing sites. I often use Google Codesearch when I'm looking for existing examples of how to use a function or boilerplate code (just watch licenses of the code you are borrowing from...)
But it sounds like you're looking to host a pastebin.
pastebin.com has source code available.
Other variations are available, and wikipedia has a good comparison of pastebin software.

git + gitosis + gitweb
I have a repository specifically for small one-off scripts I'm unlikely to change or expand. Doing something similar for a personal library doesn't seem unreasonable. You want to manage source code; that's what source control is for.

Krugle has an excellent base and allows for quick searching and filtering.
Active State has a some good snippets with excellent reasoning and documentation.
Take a look into OpenGrok in conjunction with a SVN setup.

Related

C# Hide external dlls [duplicate]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I release a bunch of tools for free, but recently I have began to sell an application, that has private research, and people have been able to get my source code, and one person publically released my entire source. I spent a lot of time on this program, just to have someone crack it, and release my entire source.
How can I go about protecting my program? I have tried HWID, but people are still able to crack it. I know I am limited by C#, but it the most convenient to use. I just need a way to protect my programs from people trying to do this.
You could have a look at the many obfuscation tools that are out there, for example these:
http://gapotchenko.com/eazfuscator.net
http://orangeheap.blogspot.nl
http://confuser.codeplex.com (succeeded by https://yck1509.github.io/ConfuserEx/ and then again by https://github.com/XenocodeRCE/neo-ConfuserEx)
http://ntoolbox.com)
Well, the problem with languages like C#/Java is that they are generally much easier to de-obfuscate. The way to secure this is generally to put this stuff into a webservice, but you said you couldn't really do that. What about porting specific non-trivial functions over to a language like C, and obfuscate that. Your C# program could then use reflection to make calls to this external/unmanaged dll. It would increase the difficulty for de-obfuscating, but the problem is that if someone wants it bad enough, they can figure it out as it is client-side.
It may be that legal action is the only real solution here, but this is not a site for legal advice, and I am not qualified to give it if it were.
Additionally, this could be a business decision. Consider Making your software open-source and post a donation link. I am also not qualified to give business advice, but this is worth considering. It may actually increase your revenue, not to mention the other benefits that come with releasing open-source software.
There's Dotfuscator (http://www.preemptive.com/products/dotfuscator/overview). But the best solution in some cases is to offer what you do as a web site (Software as a Service).
Consider this tool for example to convert VB to C#: http://converter.telerik.com/
Or this tool to format JSON: http://jsonformatter.curiousconcept.com/
This may or may not work for you. I don't know what the nature of the software you're trying to protect is.
No, your code needs to contain the information needed to decrypt itself, its an impossible problem to solve.
Your best solution is to put your intellectual property on a server in the cloud that only you have access to. Give your customers a unique login, audit their access to check for abuse, off load as much grunt work onto your customers machines, but keep your algorithms locked into the cloud.

Best way to add developer documentation to your Visual Studio projects [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
Basically, the question is: Where (and in which format) should I store textual developer documentation associated with my Visual Studio projects?
To elaborate: XML comments are great, but they don't cover all use cases. Sometimes, you'd like to describe the class architecture of the project at a high level, add usage notes to your library or just leave any other kind of message to future generations of developers working on this project.
I'd like to add these documents directly as files into the Visual Studio project, to ensure (a) that they are available to the developer without further searching and (b) they are version controlled (using the same svn/git/whatever repository as the source code).
Currently, I add a folder _Documentation to the project and use text files, but I'm not sure if this is the best solution. Visual Studio does not have an option for automatically word-wrapping text1, and manually fixing line breaks after each change is annoying. On the other hand, Word documents don't work well with version control, and TeX is too much of a hassle to set up and teach on each developer PC.
Is there a well-established best practice for this?
1 I know that there's Edit/Advanced/Word-Wrap, but this only affects the display, not the file itself.
I just had the same issue - only I noticed that I was able to add a HTML-file. Once opened, simply switch to "Design" at the bottom of the screen.
You may want to change Build Action from 'Content' to 'None'
As it is a hard-coded HTML document, it is also possible to use inline pictures (e.g. a diagram)
Also for my purpose (programming guide, architecture description. database use examples) I opted to create a separate project (_Documentation) as a Windows Forms, as this will allow me (or a new programmer) to have a running example.
I use GhostDoc (visual studio add-on) for documentation of my project as I add classes, methods, properties etc: http://visualstudiogallery.msdn.microsoft.com/46A20578-F0D5-4B1E-B55D-F001A6345748
You have the option, in XML comments, to include a lot of data that you can then pick up with a tool like Sandcastle (site) and turn into an actual MSDN-style reference site.
I tend to use this method and just write long XML comments (MSDN comment tags) (where appropriate) using the <para></para> to generate paragraphs and explain any patterns, business reasons or architectural information necessary to future modifiers/developers. I also use it to give usage examples.
A good batch of tests (well written and named) can also really illuminate the purpose of code, acting as a spec.
I hope that might be a little informative in your research :)
XML Comments is best for documenting the particular method and not ideal for writing long conceptual content. Long XML comments could adversely affect code readability.
I liked Conceptual topic documentation feature of Sandcastle, we can create and store Conceptual documentation whether functional or architecture related and merge it with Code documentation (XML Comments). Markups which you can use in writing the conceptual topics are extendable which means we can even adhere to Enterprise templates.

Where can I find a nice .NET Tab Control for free? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm doing this application in C# using the free Krypton Toolkit but the Krypton Navigator is a paid product which is rather expensive for me and this application is being developed on my free time and it will be available to the public for free.
So, I'm looking for a free control to integrate better into my Krypton application because the default one doesn't quite fit and it will be different depending on the OS version...
Any suggestions?
P.S: I know I could owner-draw it but I'm trying not to have that kind of work... I prefer something already done if it exists for free.
EDIT:
I just found exactly what I wanted:
http://www.angelonline.net/CodeSamples/Lib_3.5.0.zip
If you need an updated lib with Office 2010 Palettes: http://www.angelonline.net/CodeSamples/Lib_4.2.0.zip
My first suggestion would be to talk to Phil at ComponentFactory. I find him to be a very reasonable fellow. Maybe he can give you a special deal or make a design suggestion on how to customize the existing tab control.
But your's is more of a design/subjective question that, I think, would benefit from a screenshot to better communicate the design challenge you need to "integrate better". Saying "the default one doesn't quite fit" is pretty vague.
After that, people will have a better starting point for making suggestions. In the mean time, I would look at the WindowsClient.NET control gallery.
I don't know of any open source or free tab controls, but I wonder why you don't just use the framework's tab control. Is there something you are trying to do that the Forms.TabControl doesn't do?
Download the Flat Tab Control (.NET) from Code Project. Takes about 30 seconds to get this working, and it gets you away from the default Windows tab control look and feel. But it's not Kryptonized.
See this post on a slick custom Kryptonized Tab Control based on the Flat Tab control you built in Step 1. You can download the control assembly on this downloads page (it's a little hard to find). So far as I know, the source code isn't available, however, Reflector can be of use here if you're curious as to how the Krypton-theming was done.
Replace the Flat Tab display logic (Paint, etc.) with Krypton-aware display logic. This is straightforward, because there's not a lot of code to the Flat Tab control.
If anyone is looking for the latest version of the AC.ExtendedRenderer.ToolKit which is mentioned in other posts, then the following links point to the central source of them. However the website is dead....even WaybackMachine can't help us get to the DLLs :(!
http://web.archive.org/web/20130725145918/http://www.advancedcomputing.ch/Downloads/tabid/62/Default.aspx
The latest I have been able to find is 4.1.6b here:
http://web.ticino.com/angelo/CodeSamples/Lib_4.1.6b.zip
If anyone knows where the later versions can be downloaded, please let us know.
EDIT:
The Component Factory Krypton components were migrated to https://github.com/ComponentFactory/Krypton
You could look at the Magic TabControl project over at CodeProject.

User Interface Design Tool [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm searching for a User Interface Design tool to visualize a possible GUI in a documentation. I must not generate code. I know that Microsoft Visio provides a functionality. But are there any alternatives?
Which software do you use for visualizing a GUI?
PS. Another well-known tool is The Pencil Project.
An awesome and easy one is balsamiq: http://www.balsamiq.com/
I also quite like Axure.
Give a look to Firefox Pencil Extension, is a basic tool for GUI prototyping and simple sketching....
I am posting here a summary of recommendations based on my 10-years experience as a UX designer/information architect. The original article can be found here:
[Best prototyping tools out there? A review of Axure, Justinmind, and other UX tools] (http://www.humaneinterface.net/best-prototyping-tools/)
With interfaces becoming more and more dynamic, interactive prototypes are the best way to provide an in-depth, contextual and responsive documentation. If you are a professional designer, I’d recommend using either Axure RP Pro or Justinmind Prototyper for both static, low-fidelity prototypes and more sophisticated, interactive ones. Both offer rather affordable licenses.
If you are not a professional designer and you are looking for a tool that is cheap and allows to create static wireframes once in a while, I’d recommend Moqups as a quick prototyping tool. I prefer it over Balsamiq. WireframeSketcher is also an interesting alternative.
If you are looking for something not as complex as Axure/Justinmind but more powerful than Moqups/Balsamiq, you could also consider Infragistics’ Indigo Studio (which can import static mockups from Balsamiq and make them interactive) and Protoshare. Both of them, and in particular Indigo Studio, offer price plans that are not so convenient, and considering the limited set of functionality, I wouldn’t recommend them as a first choice. A third option is UXpin, which boasts the most elegant, clean and user-friendly interface I’ve seen so far, in the whole landscape of the UX tools available today.
For mobile prototyping, you can use both Axure and Justinmind if you want full control, the second seems to be a better choice at the time of writing (even though I did not test it directly). If you are looking for an easy way to build prototypes that are not too complex, you can consider the above mentioned Indigo Studio, or the more affordable Proto.io.
If your client is an organization that can afford a very expensive license, you can also consider iRise, a very comprehensive design platform for enterprises.
If you need to design static diagrams to represent user journeys, you might consider tools such as Draw.io or LucidChart, but Axure still provides decent diagramming tools that can reference to portions of your prototype. Justinmind seems a bit limited. Microsoft Visio (now part of Office 365 as a web app, and therefore also available on a Mac) is still great if you need maximum flexibility and want to draw very elegant flowcharts.
Keep an eye on JQuery UI components, even if you are not going to incorporate javascript libraries into your prototype. If you like to code directly, but you don’t necessarily need to reuse your code, you can also consider using CSS frameworks in combination with WYSIWYG editors such as Jetstrap.
Use paper to play with origami rather than prototyping.
You may want to have a look at Joel's article The Iceberg Secret, Revealed, as well as the articles discussion.
I don't know wether this is relevant to yout task, but since reading it I definitely prefer to use handdrawns sketches of a UI if I want to present it to a customer. (A 'Pencil Project' in the true sense of the meaning ;-)
If you are in Linux you might try Glade.
Take a look at the tools mentioned in the answers to this question:
Prototyping Tools for non-programmers - Expression?
I'd still recommend Balsamiq Mockups. The resulting GUI mockups look like sketches, making it a great tool for communicating the idea that this is not the final GUI, but merely a visualization of GUI concepts.
The "must not" seems odd... if you use an IDE designer to throw some controls down, but don't use the code, is that sufficient?
Or use "blend" - that generates xaml, which is just layout - no code.
justinmind prototyper may work for you. It gives you an HTML to check how an interface will work.

Home Automation Library [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm a C# developer looking to get into home automation as a hobby. I have done a little research, but was wondering if anyone knows of a good .NET library that supports Insteon hardware. I'd rather use Insteon than X10 due to reliability issues.
My ultimate objective at this point is to have a simple home automation server (maybe lights and climate control) with a secure ASP.NET web application interface. I'm more interested in actually building it and learning about it rather than finding an existing solution.
Thanks for any suggestions or comments.
Edit:
Thanks for the help, everyone.
Does anyone have experience with Z-wave technology? Seems promising - appears to be higher quality hardware, includes a core library, supports .NET, etc. ControlThink appears to have a pretty good controller and SDK.
Here's an interesting application to consider: Stall Status: Know Before You Go
We found there really wasn't much developer support for Insteon unless you wanted to buy their SDK and agree to their rather heavy-handed license agreement. Rather than go that route, we wrote our own .NET library called FluentDwelling and we open-sourced it. You can find a download link, and some get-you-started code samples if you follow that link.
The source code comes with a full suite of unit tests (requires NUnit, also free), so you can add improvements and make changes if you like.
I would avoid X10 like the plague. Between things like modern TV's and power strips, bridged power junction boxes and just plain strange wiring, X10 signals tend to just "disappear" and never get to their destination.
If you really want to give X10 a shot, I've got a box of X10 stuff in the garage that was worth $250+ new and it's all completely useless in my house, so you can have it. Some of it worked in my old house, but it won't so much as turn a light on 2 outlets away where I live now.
X10 is viewed by most modern electronics as "noise" on the line (which, technically, it is) and something to be filtered out rather than passed along or left alone.
I can't remember if it covers the specific technologies you mention but you should definately check out this episode of .NET Rocks. They talk about all the different stuff you can do with home automation and a lot about how to do it. I believe one of the main points was that Microsoft Robotics Studio was a good tool to use, as it uses a lot of the same abstractions as you would otherwise use.
I know it's been a long time since this post was made, however I was wondering if you'd picked a route, and what you've ended up doing with home automation since.
I've been doing this kind of stuff with many of the technologies available, but I've always done it on top of a product called homeseer. .net plug-ins and vb.net and c# scripting can be done on top of this foundation. I've been thinking of rolling my own similar to what you were describing. Any thoughts, tips, decisions you've made etc?
A bit off topic, but listen to the latest episode of dot net rocks, one of the finalists of my .net story built an home automation solution that really made me want to dive into home automation again.
Totally awsome solution.
http://www.dotnetrocks.com/default.aspx?showNum=518
I think this would bee a place to start
insteon sdk
Some research via Google looking for an Insteon SDK only yields stuff from way back in 2005. There's only information on serial port interfaces (no USB) and the only language mentioned is something called DockLight scripting that also looks like it hasn't been updated since 2005.
X10, on the other hand, boasts support for C++, VisualBasic, VB Script, and JavaScript. No .Net listed, but VisualBasic/VB Script likely implies a COM object you can easily import for use in C#. They're also much more USB friendly, and the kit costs 1/4 of the Insteon kit ($50 vs $200).
If you were actually building a product I would understand the reliability concern. But since this is a home project I think you'll have much better luck with X10.
you can try C-bus by Clipsal(schneider) it's free.

Categories

Resources