General discussion

Locked

C# my biggest challenge

By StefanProdan ·
Tags: Off Topic
blog root

This conversation is currently closed to new comments.

23 total posts (Page 1 of 3)   01 | 02 | 03   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -

C# Api for UCL algorithm

by StefanProdan In reply to C# my biggest challenge

UCL is a portable lossless data compression library written in ANSI C by Markus F.X.J. Oberhumer, it can be found on his <a href="http://www.oberhumer.com/opensource/ucl/">site</a>.  <span>When I first tried the System.IO.Compression of the new 2.0 Framework I was not happy, the compression is ok with text input but nothing more. So in looking for a new compression algorithm beside<a href="http://www.icsharpcode.net/OpenSource/SharpZipLib/Default.aspx"> #ziplib</a> I?ve found oberhumer.com. I must say that for me it was a great thing the algorithms that oberhumer made are much faster and with a better compression ration then all free or commercial algorithms. I am not a C or C++ programmer but I can understand the logic, so I decided to make a C# Api, an interface between the C library and my .NET applications. For now I?ve used Ucl in a SOA project, with web services and windows services that are made for sql data replication. The data is archived and then encrypted with Ucl before sending it on the web. The Api is not fully done, still beta but with some help and free time I'll finish it. In my next posts I'll share some code and ideas.</span>

Collapse -

Deploy SQL databases easy with Installer class - C# Programming

by StefanProdan In reply to C# my biggest challenge

<div xmlns="http://www.w3.org/1999/xhtml">Check out my 2ed article on code project,I hope will help people in making deployment easer...
<br />
<a href="http://www.codeproject.com/useritems/sqlscriptinstall.asp">The Code Project - Deploy sql databases easy with Installer class - C# Programming</a>
<br />
</div><p><div class="blogdisclaim"><a href="http://alephdev.blogspot.com/2005/04/deploy-sql-databases-easy-with.html">This post originally appeared on an external website</a></div>

Collapse -

Download details: Microsoft SQL Server 2000 Service Pack 4

by StefanProdan In reply to C# my biggest challenge

<div xmlns="http://www.w3.org/1999/xhtml">
<a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=8E2DFC8D-C20E-4446-99A9-B7F0213F8BC5&displaylang=en">Microsoft SQL Server 2000 Service Pack 4</a>
<br />better memory management and 64-bit support.. Go and get it</div><p><div class="blogdisclaim"><a href="http://alephdev.blogspot.com/2005/05/download-details-microsoft-sql-server.html">This post originally appeared on an external website</a></div>

Collapse -

Outlook RSS News Aggregator for Microsoft Outlook - Get RSS Newsfeeds and Podcasts Delivered Right Where You Live Microsoft Outlook

by StefanProdan In reply to C# my biggest challenge

<div xmlns="http://www.w3.org/1999/xhtml">
<a href="http://www.yousoftware.com/subscribe/">Outlook RSS News Aggregator for Microsoft Outlook</a>
<br />best RSS plugin for Outlook from yousoftware.com
<br />
</div><p><div class="blogdisclaim"><a href="http://alephdev.blogspot.com/2005/05/outlook-rss-news-aggregator-for.html">This post originally appeared on an external website</a></div>

Collapse -

Secure Deletion of files

by StefanProdan In reply to C# my biggest challenge

<div xmlns="http://www.w3.org/1999/xhtml">Here it is a safe method based on the .NET Random class:<br />
<br />
<pre style=" font-family: Courier New; font-size: 14;">
<span style="color: Green; font-family: Courier New; font-size: 14px; background-color: White">/// <summary><br />/// Secure Deletion method<br />/// </summary><br />/// <param name="strFilename"><br />/// the path of the file to be erased<br />/// </param><br />/// <param name="nTimes"><br />/// number of times to run the erase algorithm<br />/// </param><br />
</span>
<span style="color: Blue; font-family: Courier New; font-size: 14px; background-color: White">public</span> <span style="color: Blue; font-family: Courier New; font-size: 14px; background-color: White">static</span> <span style="color: Blue; font-family: Courier New; font-size: 14px; background-color: White">void</span> EraseFile(<span style="color: Blue; font-family: Courier New; font-size: 14px; background-color: White">string</span> strFilename, <span style="color: Blue; font-family: Courier New; font-size: 14px; background-color: White">int</span> nTimes)<br />{<br /> <span style="color: Blue; font-family: Courier New; font-size: 14px; background-color: White">if</span> (!File.Exists(strFilename))<br /> {<br /> throw <span style="color: Blue; font-family: Courier New; font-size: 14px; background-color: White">new</span> <br /> ArgumentException(<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"The file does not exist"</span>);<br /> }<br /> <span style="color: Blue; font-family: Courier New; font-size: 14px; background-color: White">while</span> (nTimes >= 0)<br /> {<br /> FileStream fs <span style="color: Red; font-family: Courier New; font-size: 14px; background-color: White">=</span> File.OpenWrite(strFilename);<br /> <span style="color: Blue; font-family: Courier New; font-size: 14px; background-color: White">int</span> nBytesInFile <span style="color: Red; font-family: Courier New; font-size: 14px; background-color: White">=</span> (<span style="color: Blue; font-family: Courier New; font-size: 14px; background-color: White">int</span>)fs.Length;<br />
<br /> Random random <span style="color: Red; font-family: Courier New; font-size: 14px; background-color: White">=</span> <span style="color: Blue; font-family: Courier New; font-size: 14px; background-color: White">new</span> Random();<br /> Byte[] b <span style="color: Red; font-family: Courier New; font-size: 14px; background-color: White">=</span> <span style="color: Blue; font-family: Courier New; font-size: 14px; background-color: White">new</span> Byte[nBytesInFile];<br /> random.NextBytes(b);<br />
<br /> <span style="color: Blue; font-family: Courier New; font-size: 14px; background-color: White">for</span> (<span style="color: Blue; font-family: Courier New; font-size: 14px; background-color: White">int</span> i <span style="color: Red; font-family: Courier New; font-size: 14px; background-color: White">=</span> 0; i < nBytesInFile; i++)<br /> {<br /> fs.WriteByte(b);<br /> }<br /> fs.Close();<br />
<br /> nTimes--;<br /> }<br />}</pre>
</div><p><div class="blogdisclaim"><a href="http://alephdev.blogspot.com/2005/05/secure-deletion-of-files.html">This post originally appeared on an external website</a></div>

Collapse -

.NET to Java for Linux

by StefanProdan In reply to C# my biggest challenge

<div xmlns="http://www.w3.org/1999/xhtml">
<a href="http://dev.mainsoft.com/">Grasshopper</a>
<br />Mainsoft announced the release of "Grasshopper," a free Visual Studio .Net plug-in, which enables developers to create applications for Linux.<br />Grasshopper is a Visual Studio .NET plug-in, which enables you to use C# or Visual Basic .NET to develop cross-platform ASP.NET applications that run on Linux and any platform running Apache Tomcat.<br />This is something you must see :)</div><p><div class="blogdisclaim"><a href="http://alephdev.blogspot.com/2005/05/net-to-java-for-linux.html">This post originally appeared on an external website</a></div>

Collapse -

Generics since 2001

by StefanProdan In reply to C# my biggest challenge

<div xmlns="http://www.w3.org/1999/xhtml">It took 4 years to put the ideea into the languge, here is the document that started all <a href="http://research.microsoft.com/~dsyme/papers/generics.pdf">PDF</a>. Thanks to Don Syme and Andrew Kennedy for this great ideea.</div><p><div class="blogdisclaim"><a href="http://alephdev.blogspot.com/2005/05/generics-since-2001.html">This post originally appeared on an external website</a></div>

Collapse -

SQL Server 2005 - June CTP

by StefanProdan In reply to C# my biggest challenge

<div xmlns="http://www.w3.org/1999/xhtml">
<a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=DC02CBB3-D688-4663-9103-37C83E044D59&displaylang=en">SQL Server 2005 Enterprise Edition Download- June CTP</a>
<br />Running the same TPC-C comparison against Oracle, SQL Server 2005 was shown to outperform Oracle by 7 percent and provide a 37 percent cost savings. <br />Well 2005 is the year of Microsoft .NET 2.0 revolution :)</div><p><div class="blogdisclaim"><a href="http://alephdev.blogspot.com/2005/06/sql-server-2005-june-ctp.html">This post originally appeared on an external website</a></div>

Collapse -

Ucl Archive Schema

by StefanProdan In reply to C# my biggest challenge

<div xmlns="http://www.w3.org/1999/xhtml">The zip file standard was too big for my project with to much data that I don't find useful, so I decided to do my own file. Here is the xml representation of the ucl archive structure:<br />
<br />
<pre style=" font-family: Courier New; font-size: 14;"><UclArchive><br /> <ArchiveHeader size=<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"11"</span>br /> <magicNumbers size=<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"2"</span>/magicNumbers><br /> <uclAlgorithm size=<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"1"</span>/uclAlgorithm><br /> <compressionLevel size=<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"1"</span>/compressionLevel><br /> <encrypted size=<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"1"</span>/encrypted><br /> <encrytionAlgorithm size=<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"1"</span>/encrytionAlgorithm><br /> <checksumAlgorithm size=<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"1"</span>/checksumAlgorithm><br /> <filesIndex size=<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"4"</span>/filesIndex><br /> </ArchiveHeader><br /> <FILE multiplication=<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"n"</span>br /> <FileHeader size=<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"8"</span> extrasize=<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"filename"</span>br /> <fileIndex size=<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"4"</span>/fileIndex><br /> <fileNameSize size=<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"4"</span>/fileNameSize><br /> <fileName size=<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"fileNameSize"</span>/fileName><br /> </FileHeader><br /> <BLOC multiplication=<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"n"</span>br /> <BlocHeader size=<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"8"</span>br /> <originalSize size=<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"4"</span>/originalSize><br /> <compressedSize size=<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"4"</span>/compressedSize><br /> </BlocHeader><br /> <DATA></DATA><br /> <BlocFooter size=<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"8"</span>/BlocFooter><br /> </BLOC><br /> <FileFooter size=<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"12"</span>br /> <checksum size=<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"4"</span>/checksum><br /> <totalLenght size=<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"8"</span>/totalLenght><br /> </FileFooter><br /> </FILE><br /> <ArchiveFooter size=<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"0"</span>/ArchiveFooter><br /></UclArchive></pre>
</div><p><div class="blogdisclaim"><a href="http://alephdev.blogspot.com/2005/08/ucl-archive-schema.html">This post originally appeared on an external website</a></div>

Collapse -

Serial protection based on machine ID

by StefanProdan In reply to C# my biggest challenge

<div xmlns="http://www.w3.org/1999/xhtml">
<pre style=" font-family: Courier New; font-size: 14;">
<span style="color: Blue; font-family: Courier New; font-size: 14px; background-color: White">using</span> System.Management;<br />
<span style="color: Green; font-family: Courier New; font-size: 14px; background-color: White">/// <summary><br />/// Returns the processor ID of the first<br />/// CPU found on the machine<br />/// </summary><br />
</span>
<span style="color: Blue; font-family: Courier New; font-size: 14px; background-color: White">public</span> <span style="color: Blue; font-family: Courier New; font-size: 14px; background-color: White">static</span> <span style="color: Blue; font-family: Courier New; font-size: 14px; background-color: White">string</span> CpuInfo()<br />{<br /> <span style="color: Blue; font-family: Courier New; font-size: 14px; background-color: White">string</span> cpuInfo <span style="color: Red; font-family: Courier New; font-size: 14px; background-color: White">=</span> String.Empty;<br /> ManagementClass managementClass <span style="color: Red; font-family: Courier New; font-size: 14px; background-color: White">=</span> <br /> <span style="color: Blue; font-family: Courier New; font-size: 14px; background-color: White">new</span> ManagementClass(<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"Win32_Processor"</span>);<br /> ManagementObjectCollection managementObjCol <span style="color: Red; font-family: Courier New; font-size: 14px; background-color: White">=</span> <br /> managementClass.GetInstances();<br />
<br /> <span style="color: Blue; font-family: Courier New; font-size: 14px; background-color: White">foreach</span>(ManagementObject managementObj <span style="color: Blue; font-family: Courier New; font-size: 14px; background-color: White">in</span> managementObjCol)<br /> {<br /> <span style="color: Blue; font-family: Courier New; font-size: 14px; background-color: White">if</span>(cpuInfo==String.Empty) <br /> {<br /> cpuInfo <span style="color: Red; font-family: Courier New; font-size: 14px; background-color: White">=</span> <br /> managementObj.Properties[<span style="color: #666666; font-family: Courier New; font-size: 14px; background-color: #ededed">"ProcessorId"</span&gt.Value.ToString();<br /> } <br /> }<br /> <span style="color: Blue; font-family: Courier New; font-size: 14px; background-color: White">return</span> cpuInfo;<br />}</pre>
</div><p><div class="blogdisclaim"><a href="http://alephdev.blogspot.com/2005/10/serial-protection-based-on-machine-id.html">This post originally appeared on an external website</a></div>

Back to After Hours Forum
23 total posts (Page 1 of 3)   01 | 02 | 03   Next

Related Discussions

Related Forums