<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel>
	  <title>Ask MetaFilter posts tagged with c</title>
      <link>http://ask.metafilter.com/tags/c</link>
      <description>tag posts with c</description>
	  	  <pubDate>Tue, 02 Dec 2008 12:05:34 -0800</pubDate>
      <lastBuildDate>Tue, 02 Dec 2008 12:05:34 -0800</lastBuildDate>

      <language>en-us</language>
	  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
	  <ttl>60</ttl>	  
	<item>
	<title>Experienced programmer, novice designer. Please help!</title>
	<link>http://ask.metafilter.com/108216/Experienced-programmer-novice-designer-Please-help</link>	
	<description>Tips / resources for designing / implementing and application from the ground up? I am a fairly seasoned C# programmer from a systems admin perspective - I started with python and moved to C# for scripting purposes primarily, and lightweight development.&lt;br&gt;
&lt;br&gt;
What this leaves me lacking is ANY experience with design, forethought, and really truly planning out any application. &lt;br&gt;
&lt;br&gt;
And now a coworker and myself have something we&apos;d like to put together, but I&apos;m looking for resources, tips, advice, etc on how a novice should go about designing the application from the ground floor.&lt;br&gt;
&lt;br&gt;
What should I be looking into? Are there any worthwhile web resources? If not (I did not find much), are there any particularly good books out there?</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.108216</guid>
	<pubDate>Tue, 02 Dec 2008 12:05:34 -0800</pubDate>

<category>development</category>

<category>c</category>

<category>programming</category>

	<dc:creator>yarrr</dc:creator>
	</item>
	<item>
	<title>Redisassembleunobfuscate?</title>
	<link>http://ask.metafilter.com/107484/Redisassembleunobfuscate</link>	
	<description>Why aren&apos;t there assembly -&amp;gt; C or pseudocode tools? So, for my last lap in college, I&apos;m doing the dreaded binary bomb project, which is actually kind of cool. I&apos;m almost done (5/6), and hopefully should be able to finish soon.&lt;br&gt;
&lt;br&gt;
But anyway, looking all this GAS, I&apos;m wondering why there isn&apos;t a tool that generates equivalent C or C++ code... it seems absurdly simple in some respects to simply generate one of the many possibilities of C that can yield a given assembly procedure, but I must be missing something?</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.107484</guid>
	<pubDate>Sat, 22 Nov 2008 16:56:52 -0800</pubDate>

<category>assembly</category>

<category>c</category>

<category>coding</category>

<category>gas</category>

<category>gnu</category>

<category>assembler</category>

	<dc:creator>tmcw</dc:creator>
	</item>
	<item>
	<title>Live graphing in .NET, for free</title>
	<link>http://ask.metafilter.com/106284/Live-graphing-in-NET-for-free</link>	
	<description>What&apos;s the best way of adding a &quot;live&quot; graph to my .NET WinForms application, similar in behaviour to the scrolling CPU usage and pagefile graphs found in Task Manager? Must be free, not too ugly, and not too processor-intensive.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.106284</guid>
	<pubDate>Sat, 08 Nov 2008 07:05:53 -0800</pubDate>

<category>net</category>

<category>c</category>

<category>application</category>

<category>programming</category>

<category>graphing</category>

<category>graph</category>

<category>control</category>

	<dc:creator>matthewr</dc:creator>
	</item>
	<item>
	<title>C++</title>
	<link>http://ask.metafilter.com/105944/C</link>	
	<description>How can a program output a variable number of files in C++? For example, if a user enters 3, then 3 files would be created:&lt;br&gt;
&lt;br&gt;
file1.txt&lt;br&gt;
file2.txt&lt;br&gt;
file3.txt&lt;br&gt;
&lt;br&gt;
Can I do this without just having a bunch of if statements for each option the user could enter?</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.105944</guid>
	<pubDate>Tue, 04 Nov 2008 08:04:48 -0800</pubDate>

<category>C</category>

	<dc:creator>londontomasbird</dc:creator>
	</item>
	<item>
	<title>Where can I find an honest, intelligent, organized community of folks looking for freelance .NET programmers?</title>
	<link>http://ask.metafilter.com/103522/Where-can-I-find-an-honest-intelligent-organized-community-of-folks-looking-for-freelance-NET-programmers</link>	
	<description>Where can I find an honest, intelligent, organized community of folks looking for freelance .NET programmers? I&apos;m looking to supplement my day job with freelance C# programming.  I have about 15 hours per week free, so I&apos;m looking for smallish projects (perhaps 45-90 hours per project..) to fill in my spare time.  &lt;br&gt;
&lt;br&gt;
I&apos;m a clean, efficient and thorough programmer, with excellent references looking to work for honest, intelligent, organized people.  Can you point me in the direction of a quality freelance software development community?</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.103522</guid>
	<pubDate>Mon, 06 Oct 2008 07:38:56 -0800</pubDate>

<category>freelance</category>

<category>net</category>

<category>c</category>

<category>project</category>

<category>programming</category>

	<dc:creator>Glendale</dc:creator>
	</item>
	<item>
	<title>0xUNDERSTAND</title>
	<link>http://ask.metafilter.com/102802/0xUNDERSTAND</link>	
	<description>Are there any scripting / cli-compatible languages which decently provide or at least pretend to provide bit-math? So, I&apos;m in one of my last CS courses in college, and it involves a whole lot of bit-mangling. Writing, testing C code is all right, but I kind of want to tinker in my free time to get a deeper understanding, and I&apos;d love some language that lets me use something like irb/python/hugs/etc to quickly test bit expressions (your usual ^, |, &amp;amp;, !, etc)&lt;br&gt;
&lt;br&gt;
Is there anything? I kind of remember a C++ CLI a while ago, but I can&apos;t figure out where it is.&lt;br&gt;
&lt;br&gt;
Thanks!</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.102802</guid>
	<pubDate>Sat, 27 Sep 2008 11:42:15 -0800</pubDate>

<category>c</category>

<category>cli</category>

<category>bit</category>

<category>bitmath</category>

<category>computer</category>

<category>science</category>

<category>cs</category>

	<dc:creator>tmcw</dc:creator>
	</item>
	<item>
	<title>When to use C# keywords</title>
	<link>http://ask.metafilter.com/102525/When-to-use-C-keywords</link>	
	<description>Help me understand keywords in C# functions. I am trying to quickly learn asp.net/c# and have a php background. I am trying to understand the basic approach to C# keywords like public, protected, private, instance, static, declared, inherited, etc. When I write a basic function how do I decide which ones to use if any? I do know you use void when you don&apos;t need a value returned. Functions seemed a lot easier in php.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.102525</guid>
	<pubDate>Wed, 24 Sep 2008 07:30:59 -0800</pubDate>

<category>c</category>

<category>aspnet</category>

	<dc:creator>zobot</dc:creator>
	</item>
	<item>
	<title>Obfuscator for compiled lbraries?</title>
	<link>http://ask.metafilter.com/101451/Obfuscator-for-compiled-lbraries</link>	
	<description>Is there such a thing as an obfuscator for compiled libraries? This sounds like a weird question, and one that&apos;s easily answered with a minute on the Google, but hear me out:&lt;br&gt;
&lt;br&gt;
My company ships a Java application has to be activated (via internet or phone) within 30 days, or it stops running.  About a year ago, we got wind of the fact that someone had started distributing a version that had been run through cavaj, and had been declawed by replacing the authentication routine with a simple &quot;return true;&quot;.  Thinking we could avoid that kind of shenaniganry down the road, I moved all the code handling authentication (which is essentially a state machine that relies on a system call to determine how long it&apos;s been installed) into a compiled C++ library, with a JNI call out to it for every function that involves sensitive content (we decrypt content at runtime based on user credentials). &lt;br&gt;
&lt;br&gt;
That seemed like it was bullet-proof to all but the most dedicated of attacks, and I didn&apos;t figure anyone would want to invest the time it would take to decompile the library and step through the logic it uses to determine activation status.  Turns out I was wrong... someone posted a modified DLL last week which declaws the activation check by replacing every conditional branch in the critical subroutine with NO-OPs, so the 30 day timer stops running.  We&apos;re re-vamping most of the security features, and generally locking down everything we can with CRC checks and calls home whenever it&apos;s possible, but the final step I wanted to put into place would be making the sensitive functions really difficult to understand by stepping through them with a debugger.  Since performance isn&apos;t hugely critical, I&apos;d love for some easy way to make the function call go jumping merrily from hither to yon, building string variables that are never used, swapping registers and memory addresses, and generally creating the most complicated, ever-shifting memory environment that we can manage.  Since it&apos;s probably a 15-year-old JavaScript hack who&apos;s decompiling the binaries, this might be enough of a deterrent to keep him from even trying to break the next version, and even if it&apos;s not, it ought to make it damned near impossible to figure out which variables are the important ones.&lt;br&gt;
&lt;br&gt;
Is there a tool that latches onto your compiler and does that for you, based on not-crazy input source?  All I&apos;ve been able to find is source code obfuscators, which don&apos;t really help--I need something that complicates the actual compiled code.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.101451</guid>
	<pubDate>Thu, 11 Sep 2008 08:39:34 -0800</pubDate>

<category>obfuscator</category>

<category>c</category>

<category>dll</category>

	<dc:creator>Mayor West</dc:creator>
	</item>
	<item>
	<title>SHA Hash Issue</title>
	<link>http://ask.metafilter.com/95971/SHA-Hash-Issue</link>	
	<description>Is there a way to convert between two different types of SHA Hashes? Hey there..I am pretty sure I&apos;m going to be S.O.L. here, but I thought I&apos;d ask anyway.  My DB is storing our users passwords in a SHA256 Hash.  I need to also access a database that is storing the same passwords in a SHA1 Hash.  The application is written in C# and I can convert the passwords into SHA1 and SHA256 no problem but...&lt;br&gt;
My database(256) already has a bunch of passwords stored and we need to populate the other database(1) with these passwords in the other Hash format.&lt;br&gt;
So..Is there a way to take a password stored as a SHA256 Hash and convert it to a SHA1 Hash?  Or am I about to reset all of the passwords in my system to accommodate accessing this other database which is using the different hash algorithm.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.95971</guid>
	<pubDate>Mon, 07 Jul 2008 17:02:55 -0800</pubDate>

<category>SHAHash</category>

<category>C</category>

<category>Database</category>

	<dc:creator>smithygreg</dc:creator>
	</item>
	<item>
	<title>Help me contribute to the OSS community</title>
	<link>http://ask.metafilter.com/95695/Help-me-contribute-to-the-OSS-community</link>	
	<description>What is a good open-source project to get involved in? I&apos;d like to do some work for an open-source project, to help the community and sharpen my skills. Due to time constraints my work on this is going to be sporadic, so it would have to be something that doesn&apos;t require daily or even weekly input. This would preferably be in Java or Python, with C a distant third. What OSS projects do you guys think are interesting or a good cause?</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.95695</guid>
	<pubDate>Thu, 03 Jul 2008 12:09:13 -0800</pubDate>

<category>programming</category>

<category>OSS</category>

<category>projects</category>

<category>opensource</category>

<category>coding</category>

<category>java</category>

<category>c</category>

<category>python</category>

	<dc:creator>Who_Am_I</dc:creator>
	</item>
	<item>
	<title>Mysterious network errors</title>
	<link>http://ask.metafilter.com/95078/Mysterious-network-errors</link>	
	<description>Why am I getting these mysterious network errors in my C# app? When using a StreamReader to read from a file across the network, I&apos;m getting a &quot;The specified network name is no longer available&quot; when using a ReadBlock(buffer, 0, buffer.Length) method call. What&apos;s puzzling is that my buffer is &lt;i&gt;partially&lt;/i&gt; filled when the exception is thrown. Similarly, when I&apos;m writing the data to alternate file streams at the destination file share, I&apos;m getting weird &quot;permission denied&quot; errors. These errors do not show up at all under a reduced load.&lt;br&gt;
&lt;br&gt;
I have no doubt that these exceptions are due to the fact that I have several dozen instances of my app running, each of which is using a couple hundred threads that are potentially reading from the same file share simultaneously. But I need to know what the actual root cause of this problem is, so I can solve or work around it. &lt;br&gt;
&lt;br&gt;
I&apos;ve taken the obvious step of throttling my thread pool, and there is retry logic in the code, but I&apos;d still like to know what&apos;s going on so I can prevent this from happening. The error message I&apos;m getting is not very helpful.&lt;br&gt;
&lt;br&gt;
Am I bumping up against Windows limits on open file handles?&lt;br&gt;
&lt;br&gt;
Thanks!</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.95078</guid>
	<pubDate>Thu, 26 Jun 2008 07:59:22 -0800</pubDate>

<category>windows</category>

<category>files</category>

<category>net</category>

<category>c</category>

	<dc:creator>mpls2</dc:creator>
	</item>
	<item>
	<title>Scripter needs to learn a &quot;real&quot; language.</title>
	<link>http://ask.metafilter.com/93840/Scripter-needs-to-learn-a-real-language</link>	
	<description>Help a Perl/Python guy learn C# I want to learn C#/ASP.NET.  The problem is that I&apos;m a scripter by heart (Perl/Python/PHP/Javascript).    I learn by coming up with an idea for a program and figuring out how to do it (via docs, reference).  I like the O&apos;reilly &quot;Cookbook&quot; series.&lt;br&gt;
&lt;br&gt;
Every time I read a C#/ASP.NET book, I look at the examples and think, &quot;I could write this faster and simpler in Perl&quot;.    Does anyone have ideas/resources/examples/books/projects that would be good for C# but bad in a scripting language?   I need some motivation/enlightenment!&lt;br&gt;
&lt;br&gt;
I&apos;ve been trying to learn C# on and off for the past year or so, help!</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.93840</guid>
	<pubDate>Wed, 11 Jun 2008 16:37:46 -0800</pubDate>

<category>programming</category>

<category>c</category>

<category>scripting</category>

<category>learn</category>

	<dc:creator>wongcorgi</dc:creator>
	</item>
	<item>
	<title>I wish that Bobby Fischer taught more</title>
	<link>http://ask.metafilter.com/93746/I-wish-that-Bobby-Fischer-taught-more</link>	
	<description>Give me &lt;a href=&quot;http://www.amazon.com/Bobby-Fischer-Teaches-Chess/dp/0553263153&quot;&gt;Bobby Fischer Teaches Chess&lt;/a&gt; for reading code. My university programming courses taught me to write code, but my internship has shown me that I&apos;m still terrible at reading it. I&apos;d like a book in the style of chess tactics trainers, full of what&apos;s-wrong-with-this snippets, preferably in C or C++.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.93746</guid>
	<pubDate>Tue, 10 Jun 2008 18:05:03 -0800</pubDate>

<category>programming</category>

<category>C</category>

<category>troubleshooting</category>

<category>debugging</category>

	<dc:creator>tylermoody</dc:creator>
	</item>
	<item>
	<title>Best book for a beginner to learn C? </title>
	<link>http://ask.metafilter.com/92096/Best-book-for-a-beginner-to-learn-C</link>	
	<description>Best book for a beginner to learn C? I&apos;ve never learned a programming language, but I&apos;m hoping to learn C over the summer. My friend, a computer science student, is going to teach me as he learns it. We would like a textbook or reference book or work book of some kind. What would be a good choice? I&apos;ve heard the K and R &apos;C Programming Language&apos; is considered the &apos;bible&apos; of C programming, but I am wondering if this would be an appropriate choice for a beginner. &lt;br&gt;
Things to bear in mind:&lt;br&gt;
1) my friend will be creating &apos;lessons&apos; from whatever book we choose. We&apos;d like it to be thorough and start from the basics, but density is not necessarily an issue. That said, I&apos;d like the text to be readable for both of us. &lt;br&gt;
2) Although I have never programmed anything before, when I was younger, I dabbled in a bit of Flash so I&apos;m reasonably ok with computers, and I have some background in math and logic. I don&apos;t know if this will help.&lt;br&gt;
&lt;br&gt;
Thanks for your recommendations.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.92096</guid>
	<pubDate>Wed, 21 May 2008 22:44:12 -0800</pubDate>

<category>C</category>

<category>programming</category>

<category>programminglanguage</category>

<category>computers</category>

	<dc:creator>asparagrass</dc:creator>
	</item>
	<item>
	<title>Convert old Borland to new Visual Studio?</title>
	<link>http://ask.metafilter.com/89970/Convert-old-Borland-to-new-Visual-Studio</link>	
	<description>CompilerFilter:  I&apos;ve got an old project that was written with Borland C++ 5.0 for Windows.  I&apos;ve been tasked with porting this project to Visual Studio 2005.  Easy way to do this?  
It&apos;s a fairly simple old program, but we don&apos;t want to be dragging around old compilers anymore, and we&apos;re finally going to be working on improvements for it.  Obviously, just trying to load the &quot;workspace file&quot; doesn&apos;t work, and I&apos;m not that knowledgeable about the differences between Borland and Microsoft&apos;s C-plus-pluses.&lt;br&gt;
If I could find a way to load the project into VS2005, even if it spits out a million compiler errors, that would be a start.&lt;br&gt;
Is there any way to do it?</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.89970</guid>
	<pubDate>Mon, 28 Apr 2008 07:35:17 -0800</pubDate>

<category>borland</category>

<category>visualstudio</category>

<category>microsoft</category>

<category>c</category>

<category>compilers</category>

<category>cplusplus</category>

	<dc:creator>jozxyqk</dc:creator>
	</item>
	<item>
	<title>Custom header row in .NET datagrid?</title>
	<link>http://ask.metafilter.com/89107/Custom-header-row-in-NET-datagrid</link>	
	<description>How do I insert a row of identical drop-down lists into the top of my .NET datagrid? I have a DataGrid whose source is an excel spreadsheet. My GUI needs to allow a user to select an option from a drop-down above each column. I&apos;d like this row to be a part of the grid so that everything lines up all pretty-like. &lt;br&gt;
&lt;br&gt;
The best option I&apos;ve found is to manually create all the rows and columns and bind that to the grid. Another option was to use a repeater of datalists instead. Is there a simpler or better way? (I&apos;m using C#)</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.89107</guid>
	<pubDate>Thu, 17 Apr 2008 13:39:31 -0800</pubDate>

<category>net</category>

<category>c</category>

<category>datagrid</category>

<category>datalist</category>

<category>html</category>

<category>aspx</category>

	<dc:creator>TimeTravelSpeed</dc:creator>
	</item>
	<item>
	<title>Canon developer&apos;s toolkit in C++</title>
	<link>http://ask.metafilter.com/88724/Canon-developers-toolkit-in-C</link>	
	<description>Anyone here have any experience with programming using the Canon camera control toolkit? (EDSDK2.3, C++, for windows) It&apos;s a developer&apos;s toolkit and comes with a sample application that compiles and runs, but the dang thing is so abstracted into GUI OOP land that I can&apos;t find an entry point for issuing commands in the code.&lt;br&gt;
&lt;br&gt;
I&apos;m trying to make a command line tool, that takes exposure and aperture arguments, shoots and leaves. I can&apos;t even find the main().</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.88724</guid>
	<pubDate>Mon, 14 Apr 2008 04:17:38 -0800</pubDate>

<category>canon</category>

<category>cameras</category>

<category>c</category>

<category>software</category>

<category>developer</category>

<category>oop</category>

<category>windows</category>

	<dc:creator>StickyCarpet</dc:creator>
	</item>
	<item>
	<title>How do you deal with Chinese characters that can&apos;t be represented in 16 bits?</title>
	<link>http://ask.metafilter.com/87888/How-do-you-deal-with-Chinese-characters-that-cant-be-represented-in-16-bits</link>	
	<description>How are people dealing with &amp;gt;16 bit Unicode code points?  Specifically, in languages like Java, C# and C++, which assume 16 bit characters (I believe), how are you supporting &lt;a href=&quot;http://en.wikipedia.org/wiki/GB_18030&quot;&gt;GB 18030&lt;/a&gt;?  I would suspect that the various languages&apos; methods like substring(), charAt(), operator[], etc can&apos;t be safely used in China.   If your wstring, say, contains a Chinese string, then .size() doesn&apos;t tell you how many characters are in it, right?

On a related note, what interesting Chinese characters require more than &amp;gt;16 bits?  I&apos;m thinking about making a short presentation for my co-workers on this subject and I&apos;d like to have some interesting examples.

(Oh, and I&apos;m going to run any examples by my Chinese colleagues first, so don&apos;t bother trying to make me say &quot;penis&quot; or something in front of my co-workers :-))</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.87888</guid>
	<pubDate>Fri, 04 Apr 2008 08:48:52 -0800</pubDate>

<category>unicode</category>

<category>chinese</category>

<category>c</category>

<category>java</category>

<category>i18n</category>

<category>l10n</category>

	<dc:creator>bonecrusher</dc:creator>
	</item>
	<item>
	<title>ASP Development question: Install a printer on the client&apos;s machine?</title>
	<link>http://ask.metafilter.com/86371/ASP-Development-question-Install-a-printer-on-the-clients-machine</link>	
	<description>ASP.Net development question.  Can I map to a printer on the client&apos;s machine from a web page? I&apos;m trying to build a web page that installs printer drivers by clicking on an icon.  This is something I saw a consulting company show off years ago, and I&apos;ve wanted ever since.  They had a web page that showed floor plan of their offices with little printer icons located wherever physical printers were located.  Click on the icon and that printer is added to your Windows client, and set as the default printer.&lt;br&gt;
&lt;br&gt;
I think the consulting company was using some native component of Novell -- which is what they were trying to sell us at the time.  I&apos;m trying to recreate this in an ASP.Net page, and have had no luck.  Google hasn&apos;t found me anything promising.  Anyone have any idea?&lt;br&gt;
My original thought was to shell out the command &quot;RunDll32.EXE  printui.dll,PrintUIEntry /in /n \\\\server\\printer&quot;.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.86371</guid>
	<pubDate>Mon, 17 Mar 2008 12:29:40 -0800</pubDate>

<category>ASPnet</category>

<category>C</category>

<category>VBNet</category>

<category>Printers</category>

<category>Programming</category>

	<dc:creator>Eddie Mars</dc:creator>
	</item>
	<item>
	<title>What is, and what is the purpose of this part of a laptop power adapter?</title>
	<link>http://ask.metafilter.com/86281/What-is-and-what-is-the-purpose-of-this-part-of-a-laptop-power-adapter</link>	
	<description>What is, and what is the purpose of this part of a laptop power adapter? I took it apart and there was just some sort of metal or ceramic material wrapped around the cord.  I though it was a magnet at first, but it didn&apos;t stick to the fridge...&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.imagebucket.net/bucket/23336/LaptopAC-Adapte.jpg&quot;&gt;Link&lt;/a&gt;</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.86281</guid>
	<pubDate>Sun, 16 Mar 2008 14:25:28 -0800</pubDate>

<category>computer</category>

<category>laptop</category>

<category>C</category>

<category>power</category>

<category>adapter</category>

	<dc:creator>jjbb</dc:creator>
	</item>
	<item>
	<title>Is writing a bad C++ program better than writing it in Perl?</title>
	<link>http://ask.metafilter.com/85968/Is-writing-a-bad-C-program-better-than-writing-it-in-Perl</link>	
	<description>Does compiled vs. interpreted code make a difference if the structure of the algorithm is the same (ie, ugly and slow)? Should I take the extra effort of writing a small program in C++ or just do it in Perl...? I need to write a script that will search for a pattern of characters (let&apos;s say 5 letters, followed by a dash, followed by 3 letters -- or something like that) in EVERY file (of certain types) on the computer.&lt;br&gt;
&lt;br&gt;
Whether I write it in Perl or in C++, it would look the same, I think. &lt;br&gt;
&lt;br&gt;
I would create a list of all the applicable files on the computer and loop through them one by one. Then, for each file, I would get each line and search it for my pattern.  O(n^2), right?&lt;br&gt;
&lt;br&gt;
This seems to be pretty easy to do in Perl, which I have used a lot, but more of a headache to getting it working in C++. However, the only reason I am leaning towards C++ is because this script has to run on at least 100 machines...so something that is faster would be better. &lt;br&gt;
&lt;br&gt;
But if the algorithm is fundamentally the same for both, does it make a difference? Should I just do it in Perl? What about things like memory management and the computer resources being all used up making the machine unusable while the program/script is running? (i.e., these other things besides the actual running time of the program?)&lt;br&gt;
&lt;br&gt;
Thank you for your insight into this.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.85968</guid>
	<pubDate>Wed, 12 Mar 2008 14:13:27 -0800</pubDate>

<category>C</category>

<category>perl</category>

<category>compiled</category>

<category>interpreted</category>

	<dc:creator>omair</dc:creator>
	</item>
	<item>
	<title>How do I create PowerPoint slides using .NET?</title>
	<link>http://ask.metafilter.com/82767/How-do-I-create-PowerPoint-slides-using-NET</link>	
	<description>How do I create PowerPoint slides using .NET? I&apos;d like to output the results of an XSLT transformation to a PPT slide using a template. I know you can basically install Office on your server and use automation, but that seems like a scalability problem and I&apos;m unclear how the licensing for that works. Doesn&apos;t MS just provide a server-side framework for this? Is there a cheaper/simpler alternative to &lt;a href=&quot;http://www.aspose.com/Products/Aspose.Slides/&quot;&gt;Aspose Slides&lt;/a&gt;?&lt;br&gt;
&lt;br&gt;
I&apos;m using .NET 2.0/C#.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.82767</guid>
	<pubDate>Mon, 04 Feb 2008 09:42:48 -0800</pubDate>

<category>programming</category>

<category>net</category>

<category>c</category>

<category>powerpoint</category>

	<dc:creator>mkultra</dc:creator>
	</item>
	<item>
	<title>Calling unmanaged DLL functions from C#</title>
	<link>http://ask.metafilter.com/79680/Calling-unmanaged-DLL-functions-from-C</link>	
	<description>How can I work with an unmanaged C++ API from within C#? I have C++ functions with the following prototypes:&lt;br&gt;
&lt;br&gt;
&lt;pre&gt;extern &quot;C&quot; __declspec(dllexport) HFSUniStr255 GetFolderList(char *path);&lt;br&gt;
extern &quot;C&quot; __declspec(dllexport) void GetFile(char *path, UInt64* offset, UInt64* length);&lt;/pre&gt;&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
The HFSUniStr255 typedef is the following struct:&lt;br&gt;
&lt;br&gt;
&lt;pre&gt;struct HFSUniStr255 {&lt;br&gt;
    UInt16  length;&lt;br&gt;
    UInt16 unicode[255];&lt;br&gt;
};&lt;/pre&gt;&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
Where a UInt16 is an unsigned 16-bit integer. The two functions take a pointer to a char array and the former returns the above struct and the latter writes 64-bit integer values to the locations indicated by the parameter pointers offset and length.&lt;br&gt;
&lt;br&gt;
My question is this: how on Earth do I work with these in managed C# code? I&apos;m trying to follow examples like &lt;a href=&quot;http://www.digcode.com/default.aspx?page=ed51cde3-d979-4daf-afae-fa6192562ea9&amp;article=cfd2e407-d20f-4dfc-8c34-e7d29c771b05&quot;&gt;this&lt;/a&gt; to no avail. In C# I have defined the following:&lt;br&gt;
&lt;br&gt;
&lt;pre&gt;        [StructLayout(LayoutKind.Sequential, Pack = 1)]&lt;br&gt;
        public struct HFSUniStr255&lt;br&gt;
        {&lt;br&gt;
            [MarshalAs(UnmanagedType.U2)]&lt;br&gt;
            public UInt16 length;&lt;br&gt;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=255)]&lt;br&gt;
            public UInt16[] unicode;&lt;br&gt;
        }&lt;br&gt;
&lt;br&gt;
        [DllImport(&quot;llio2.dll&quot;)]&lt;br&gt;
        public static extern void GetFile([MarshalAs(UnmanagedType.LPStr)] char[] path, [MarshalAs(UnmanagedType.U8)] UIntPtr offset, [MarshalAs(UnmanagedType.U8)] UIntPtr length);&lt;br&gt;
        [DllImport(&quot;llio2.dll&quot;)] &lt;br&gt;
        [return : MarshalAs(UnmanagedType.Struct)]&lt;br&gt;
        public static extern HFSUniStr255 GetFolderList([MarshalAs(UnmanagedType.LPStr)] char[] path);&lt;/pre&gt;&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
Despite this, I get errors telling me that I&apos;ve tried reading or writing protected memory and that the method&apos;s signature is not compatible with the PInvoke type. Any gurus in this area?</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.79680</guid>
	<pubDate>Fri, 28 Dec 2007 22:00:30 -0800</pubDate>

<category>c</category>

<category>programming</category>

<category>api</category>

<category>marshal</category>

<category>managed</category>

<category>unmanaged</category>

<category>nightmare</category>

	<dc:creator>PuGZ</dc:creator>
	</item>
	<item>
	<title>Anonymous Hep A, B, and HIV testing.</title>
	<link>http://ask.metafilter.com/78699/Anonymous-Hep-A-B-and-HIV-testing</link>	
	<description>I am looking for places that do anonymous testing for Hep B, Hep A and HIV. The county I live in tracks Hep B and HIV cases and I have no desire to enter into their records if I test positive. &lt;br&gt;
&lt;br&gt;
I&apos;ve found that my county health department does do anonymous HIV testing but their anonymous procedure leaves much to be desired and they don&apos;t offer an anonymous Hep B test. I&apos;ve already tried Planned Parenthood and my GP, they both just directed me back to the county health department. &lt;br&gt;
&lt;br&gt;
I&apos;m running short on ideas. &lt;br&gt;
&lt;br&gt;
I live in western Michigan and would be willing to drive a few hours to find this service.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.78699</guid>
	<pubDate>Sat, 15 Dec 2007 01:03:00 -0800</pubDate>

<category>Hep</category>

<category>A</category>

<category>C</category>

<category>HIV</category>

<category>testing</category>

<category>anonymous</category>

	<dc:creator>Anonymous</dc:creator>
	</item>
	<item>
	<title>where are the docs?</title>
	<link>http://ask.metafilter.com/74658/where-are-the-docs</link>	
	<description>How do I access the C documentation that&apos;s on my computer? I&apos;m running OSX 10.4.10 with all the devtools installed. Whenever I want to use a header file or one of the standard functions that I&apos;m not familiar with, I head to Google. I suspect that there are man pages for most everything that comes in a standard C environment, but how do I get to them?</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.74658</guid>
	<pubDate>Thu, 25 Oct 2007 12:43:52 -0800</pubDate>

<category>c</category>

<category>documentation</category>

	<dc:creator>tylermoody</dc:creator>
	</item>
	
	</channel>
</rss>

