instruction
stringlengths
0
30k
Whats the best way to securely publish a site post build?
|.net|windows|deployment|iis-6|
So, in your experience, whats the best way? Is there a secure way that's also scriptable/triggerable in a build automation tool? Edit: I should mention this is windows/.net and I'll be deploying to iis6
Well, AdExplorer runs on your Local Workstation (which is why I prefer it) and I believe that most users have read access to AD anyway because that's actually required for stuff to work, but I'm not sure about that.
Something that people don't tend to figure in his the time savings in Developer Hours between platforms. Take for example, a WISA app vrs a LAMP app, The initial cost of the enviroment may be a $2000 difference, but that is made up in just 20 developer hours. So, if by using .NET, you are able to trim 20 hours from development or maintenance of the project you have already made up the difference. There is never more apparent than when you need to scale the platform out and you suddenly realize you need to sink mountains of developer time into making a scripting language as fast as a compiled one.
Python: <http://diveintopython.org/> JS: [a re-introduction to JavaScript](http://developer.mozilla.org/en/A_re-introduction_to_JavaScript) is the introduction to the *language* (not the browser specifics) for programmers. Don't know a good tutorial on JS in browser.
Python: <http://diveintopython.org/> JS: [a re-introduction to JavaScript](http://developer.mozilla.org/en/A_re-introduction_to_JavaScript) is the introduction to the *language* (not the browser specifics) for programmers. Don't know a good tutorial on JS in browser. Great idea by the way!
I know a few of the developers on the Carleton University developed [Blindside Project][1]. They are actively developing a web conferencing and presentation tool for e-learning, with the intent of eventually offering university courses online. It's pretty fully featured software, and is meant to be installed as a server that can host many conference rooms at a time. It has voice, video, text, and a whiteboard/slideshow (that can use PowerPoint or OpenOffice slides I think) capability. One feature I think it neat is that students can 'raise their hands' in the class to ask the instructor a question, where they can take the floor for a moment. Check out the demo on the site (if it's not working anymore I'll nudge the developers). Another pro is that the clients only need to have flash installed. [1]: http://code.google.com/p/blindside/
I know a few of the developers on the Carleton University developed [Blindside Project][1]. They are actively developing an open-source web conferencing and presentation tool for e-learning, with the intent of eventually offering university courses online. It's pretty fully featured software, and is meant to be installed as a server that can host many conference rooms at a time. It has voice, video, text, and a whiteboard/slideshow (**Edit:** supports PDF at the moment) capability. One feature I think it neat is that students can 'raise their hands' in the class to ask the instructor a question, where they can take the floor for a moment. Check out the demo on the site (if it's not working anymore I'll nudge the developers). Another pro is that the clients only need to have flash installed. [1]: http://code.google.com/p/blindside/
I use and recommend [DreamHost][1] for both their prices and customer service. I've hosted several sites here and performance has always been good. $5.95 a month for their basic package. [1]: http://www.dreamhost.com/
I have no specific sites to suggest, but a typical hosting company will charge you less than $10 per month for service. A simple Google search will turn up lots of results for "comparison of web hosts": <http://www.google.com/search?hl=en&q=comparison+of+web+hosts&btnG=Google+Search>
As long as the name of the folder doesn't need to be meaningful, how about using a GUID for them?
You could generate a GUID for your temporary folder names.
Well, Amazon EC2 is only as bad as the amount of traffic you get. So the ideal situation is to monetize your site (ads, affiliate programs, etc) so that that more traffic you get, the more you pay Amazon, but the more you make...in theory of course. As for a budget of nothing...there's not really much you can do...hosting typically always costs something, but since you are using the LAMP stack, it's pretty cheap. For example, hosting on GoDaddy.com for 1year can be about $50-60 which is not too bad. I use dreamhost which costs about $80 per year, but I get MUCH more storage and bandwidth.
I've had to do this a few times, and there are only two options that I know of. Copy the file locally to the SQL Server, or on the SQL server create a mapped network drive to the share that contains the backup file.
You can use [GetTempFileName][1] to create a temporary **file**, then delete and re-create this file as a directory instead. Note: link didn't work, copy/paste from: http://msdn.microsoft.com/en-us/library/aa364991(VS.85).aspx [1]: http://msdn.microsoft.com/en-us/library/aa364991(VS.85).aspx
You have to use `System.IO.Path.GetTempFileName()` > Creates a uniquely named, zero-byte temporary file on disk and returns the full path of that file. You can use `System.IO.Path.GetDirectoryName(System.IO.Path.GetTempFileName())` to get only the temp folder information, and create your folders in there They are created in the windows temp folder and that's consider a best practice
I agree with pix0r. With your requirements of php5 and mysql it seems that for starting out Dreamhost would be a good recommendation. You can always move it over pretty easily to ec2 if it takes off. Dreamhost is great and cheap for a php5 mysql setup that gives you command line access. The problems come if you want to use some other web language/framework like RoR or Python/Django/Pylons. I know there are hacks to get things working, but last time I tried they were spotty at best and not supported by Dreamhost.
The syntax in PostgreSQL is: SELECT * FROM mytable ORDER BY somefield LIMIT 1 OFFSET 20; Apparently, the SQL standard is silent on the limit issue, which is why everyone implements it differently.
The syntax in PostgreSQL is: SELECT * FROM mytable ORDER BY somefield LIMIT 1 OFFSET 20; Apparently, the SQL standard is silent on the limit issue, which is why everyone implements it differently. Edit: Just to clarify - the example above selects the 21st row. "OFFSET 20" is telling Postgres to skip the first 20 records.
In my experience, you're probably better off using an embedded database. SQL, while less than perfect, is usually much easier than designing a file format that performs well and is reliable. I haven't used JavaDB, but I've had good luck with [H2][1] and [SQLite][2]. SQLite is a C library which means a little more work in terms of deployment. However, it has the benefit of storing the entire database in a single, cross-platform library. Basically, it is a pre-packaged, generic file format. SQLite has been so useful that I've even started using it instead of text files in scripts. Be careful using Hibernate if you're working with a small persistence problem. It adds a lot of complexity and library overhead. Hibernate is really nice if you're working with a large number of tables, but it will probably be cumbersome if you only need a few tables. [1]: http://www.h2database.com [2]: http://www.sqlite.org/
There's some stuff in the [Apache Portable Runtime][1] (APR) that I'd expect to be very solid. [1]: http://apr.apache.org/ "Apache Portable Runtime"
I think the query cache size is 0 by default, which is off. Edit your my.cnf file to give it at least a few megabytes. No PHP changes necessary :)
Regrading the preserve transparency, then yes like stated in other posts imagesavealpha() have to be set to true, to use the alpha flag imagealphablending() must be set to false else it doesn't work. Also I spotted two minor things in your code: 1. You don't need to call getimagesize() to get the width/height for imagecopyresmapled() 2. The $uploadWidth and $uploadHeight should be "-1" the value, since the cordinates starts at 0 and not 1, so it would copy them into an empty pixel. Replacing it with: imagesx($targetImage) - 1 and imagesy($targetImage) - 1, relativily should do :)
is the problem working out the placement of controls? i.e. you know font X and Y work on OS A and B, and give the layout you want with the text you're using on those systems? MeasureString method might help in working out your layout in a way that you weren't tied to specific fonts. float textWidth = graphics.MeasureString(someString, someFont).Width; (would a change in text alignment work? I might be misunderstanding the problem too)
You could consider some kind of single-sign-on software. I am unaware of any that are free and I've only ever used [SiteMinder][1] which is neither free nor good. [Crowd][2] may be better (but is again not [free][3]). [1]: http://ca.com/us/internet-access-control.aspx [2]: http://www.atlassian.com/software/crowd/default.jsp [3]: http://www.atlassian.com/software/crowd/pricing.jsp
PRQA have an excellent C++ coding standard based on books from Scott Meyers, Bjarne Stroustrop and Herb Sutter. It brings all this information together in one document. You can download a free copy from <http://www.codingstandard.com/>.
What's the answer to this Microsoft PDC challenge?
|pdc|encryption|
In [today's channel9.msdn.com video][1], the PDC guys posted a challenge to decipher this code: 2973853263233233753482843823642933243283 6434928432937228939232737732732535234532 9335283373377282333349287338449365335325 3283443783243263673762933373883363333472 8936639338428833535236433333237634438833 3275387394324354374325383293375366284282 3323383643473233852922933873933663333833 9228632439434936334633337636632933333428 9285333384346333346365364364365365336367 2873353883543533683523253893663653393433 8837733538538437838338536338232536832634 8284348375376338372376377364368392352393 3883393733943693253343433882852753933822 7533337432433532332332328232332332932432 3323323323323336323333323323323327323324 2873323253233233233892792792792792792792 7934232332332332332332332733432333832336 9344372376326339329376282344 Decipher it and win a t-shirt. (Lame, I know, was hoping for a free trip to the PDC.) I notice some interesting patterns in this code, such as the 332 pattern towards the end, but I'm at a loss as to where to go from here. They've said the answer is a text question. Any ideas on deciphering this code? [1]: http://channel9.msdn.com/posts/Dan/Countdown-to-PDC2008-By-Developers-for-Developers-Don-Box-and-Chris-Anderson/
The trouble with international standards is that pretty much noone uses them. I try where I can, but I am forced to use dd/mm/yyyy almost everywhere in real life, which means I am so used to it it's always a conscious process to use ISO-8601. For the majority of people who don't even try to use ISO-8601 it's even worse. If you can internationalize where you can, I think it's a great advantage.
Yes, you are right to lock at the VSZ. "ps u" will give you the VSZ and RSS, which are the virtual memory size and resident set size. The RSS is how much physical memory has been allocated to the process, and the VSZ is the virtual memory size of the process. If you have several copies of a program running, a lot of the memory in the VSZ will be shared between those processes.
Localising date format descriptors
|internationalization|.net|c#|vb.net|asp.net|globalization|date|
What is the best way to localise a date format descriptor? As anyone from a culture which does not use the mm/dd/yyyy format knows, it is annoying to have to enter dates in this format. The .NET framework provides some very good localisation support, so it's trivial to parse dates according to the users culture, but you often want to also display a helpful hint as to the format required (especially to distinguish between yy and yyyy which is interchangeable in most cultures). What is the best way to do this with results that make sense to most users (i.e. dd/M/yyy is confusing because of the change in case and the switching between two and one letters).
|.net|date|internationalization|globalization|
My first action would be as follows: 1. Build the binaries in "Release" version but creating debug info file (you will find this possibility in project settings). 2. Use Dr Watson as a defualt debugger (DrWtsn32 -I) on a machine on which you want to reproduce the problem. 3. Repdroduce the problem. Dr Watson will produce a dump that might be helpful in further analysis. Another try might be using WinDebug as a debugging tool which is quite powerful being at the same time also lightweight. Maybe these tools will allow you at least to narrow the problem to certain component. And are you sure that all the components of the project have correct runtime library settings (C/C++ tab, Code Generation category in VS 6.0 project settings)?
maybe [https://ci-bayes.dev.java.net/][1] or what about [http://www.cs.cmu.edu/~javabayes/Home/node2.html][2]? I never played with either. [1]: https://ci-bayes.dev.java.net/ [2]: http://www.cs.cmu.edu/~javabayes/Home/node2.html
Just use glTranslatef (or the DirectX equivalent) to draw a cube using the same code, but moving the relative point where you draw it. Maybe there's a better way to do it though, I'm fairly new to OpenGL. Be sure to set your viewpoint so you can see them all.
See this [blog post][1] where the author describes a method for overriding the default behavior for generating the ViewState and instead shows how to save it on the server Session object. > In ASP.NET 2.0, ViewState is saved by > a descendant of PageStatePersister > class. This class is an abstract class > for saving and loading ViewsState and > there are two implemented descendants > of this class in .Net Framework, named > HiddenFieldPageStatePersister and > SessionPageStatePersister. By default > HiddenFieldPageStatePersister is used > to save/load ViewState information, > but we can easily get the > SessionPageStatePersister to work and > save ViewState in Session object. Although I did not test his code, it seems to show exactly what you want: a way to gain access to ViewState code while still on the server, before postback. [1]: http://aspguy.wordpress.com/2008/07/09/reducing-the-page-size-by-storing-viewstate-on-server/
I'm not sure it's what you're thinking of, but you could do something similar with ssh tunneling. Let's say you wanted userA on 10.1.2.3/24 to connect a mysql server on userB's on 192.168.0.3/24. There's no direct network connectivity between the two networks, but both machines can connect to serverA on the public internet. userB runs this command: ssh -R localhost:13306:localhost:3306 username@serverA userA runs this command: ssh -L 3306:localhost:13306 username@serverA Now userA can use whatever tool they please to connect to mysql on localhost and the cxn will be tunneled through serverA and to the mysql daemon running on localhost on userB's machine. (hopefully no typos, typed with one hand as I hold my two day old daughter =))
@Joel you don't want to count on StackFrame. [In-lining][1] can ruin your day when you least expect it. But to the question: Either way doesn't really matter a whole lot. [1]: http://discuss.joelonsoftware.com/default.asp?dotnet.12.511358.10
I usually do what [Jack M](http://stackoverflow.com/questions/44176/searching-subversion-history-full-text#44226) says (use svn log --verbose) but I pipe to **grep** instead of less.
There's really nothing specific you need to learn to be an oracle devloper per se. Obviously you need to learn oracle sql syntax, and all the standard rdbms theory that goes along with database programming in general. The Java libs for database support are pretty easy to pick up and run with. I'm sure you can find a tutorial on the web by a quick google search. As for IDE I'd recommend Eclipse. It's a bit cumbersome at times, but the number of plug-ins available is staggering, and it has great refactoring and code completion support.
Jeff's article on <a href="http://www.codinghorror.com/blog/archives/001114.html">The Angle Bracket Tax</a> summarizes a number of alternatives (well, mainly YAML), and led me to the <a href="http://en.wikipedia.org/wiki/Lightweight_markup_language">wiki article on lightweight markup languages</a>.
How Can I Monitor Which Window Currently Has Keyboard Focus
|winapi|mfc|
Is there a way to track which window currently has keyboard focus. I could handle WM_SETFOCUS for every window but I'm wondering if there's an alternative, simpler method (i.e. a single message handler somewhere). I could use OnIdle() in MFC and call GetFocus() but that seems a little hacky.
I wouldn't dismiss plain text, like CSV or tab-delimited.
How about the Win32 [GetForegroundWindow][1]? [1]: http://msdn.microsoft.com/en-us/library/ms633505(VS.85).aspx
If you are doing enterprise software, a lot of users will have small monitors at low resolution. Or if they are old they will have it at a low res so they can see giant buttons ( I have seen an 800x600 on a 24"ish monitor). I have an old 15" monitor at a low resolution (800 x 600) so i can see what the program will look likes in less than idle conditions every now and then. I know that enterprise users pretty much have to accept what they are given but if you design a winform that doesn't fit into an 800x600 screen, it's not helping anyone.
I say pay the 50-80 bucks for a real host. The classic "you get what you pay for" is **very** true for hosting. This will save you time, time you can spend getting those $80.
Something like... using System.IO; string path = Path.GetTempPath() + Path.GetRandomFileName(); while (Directory.Exists(path)) path = Path.GetTempPath() + Path.GetRandomFileName(); Directory.CreateDirectory(path);
It may be helpful to know what kind of app we are talking about. Also what sort of traffic do you expect and to echo Adam's note what sort of business model (if any) do you have?
Internationalization in SSRS
|reporting-services|
What's the best way to handle translations for stock text in a SSRS. For instance - if I have a report that shows a grid of contents what's the best way to have the correct translation for the header of that grid show up, assuming the culture of the report is set correctly. Put another way - is it possible to do resources in a SSRS report, or am I stuck with storing all that text in the database and querying for it?
|reporting-services|internationalization|
Compiled PHP?
|php|caching|zend|
Does anybody have experience working with PHP accelerators such as [MMCache][1] or [Zend Accelerator][2]? I'd like to know if using either of these makes PHP comparable to _faster_ web-technologies. Also, are there trade offs for using these? [1]: http://turck-mmcache.sourceforge.net/ [2]: http://www.zend.com/en/
|php|caching|zend|scriptalert1script|
|php|caching|zend|
Java and c# interoperability
|c#|java|interop|
I have two programs one in c# and another one in Java. Those programs will, most probably, always run on the same machine. What would be the best way to let them talk to each other ?
Got a answer over at [MSDN Forums][1] > This is the default behavior when you have Office 2007 installed on your > development computer. You can modify > this behavior under Tools->Options. > For more informaiton, see the > following threads: > > http://forums.microsoft.com/Forums/ShowPost.aspx?PostID=3762143&SiteID=1 > > http://forums.microsoft.com/Forums/ShowPost.aspx?PostID=3742203&SiteID=1&mode=1 > > I hope this helps, > > McLean Schofield [1]: http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=3764492&SiteID=1 "MSDN Forums"
There are other ways to do it, but most of them involve effort on your part (or take performance from your app, or you have to block a thread to use them, etc). FindFirstChangeNotification is a bit complicated if you're not used to dealing with function pointers, etc, but it has the virtue of getting the OS to do the bulk of the work for you.
If you're running Sql Server 2005, you can write a custom aggregate function to handle this. C# version: using System; using System.Data; using System.Data.SqlClient; using System.Data.SqlTypes; using System.Text; using Microsoft.SqlServer.Server; [Serializable] [Microsoft.SqlServer.Server.SqlUserDefinedAggregate(Format.UserDefined,MaxByteSize=8000)] public class CSV:IBinarySerialize { private StringBuilder Result; public void Init() { this.Result = new StringBuilder(); } public void Accumulate(SqlString Value) { if (Value.IsNull) return; this.Result.Append(Value.Value).Append(","); } public void Merge(CSV Group) { this.Result.Append(Group.Result); } public SqlString Terminate() { return new SqlString(this.Result.ToString()); } public void Read(System.IO.BinaryReader r) { this.Result = new StringBuilder(r.ReadString()); } public void Write(System.IO.BinaryWriter w) { w.Write(this.Result.ToString()); } }
Take a look at [Hoard][1] if you are doing a lot of memory allocation. Roll your own [Lock Free List][2]. A good resource is here - it's in C# but the ideas are portable. Once you get used to how they work you start seeing other places where they can be used and not just in lists. [1]: http://www.hoard.org/ [2]: http://www.boyet.com/Articles/LockfreeFreeList.html
That's actually so that you don't try to put any odd "object" in your "ol" list variant (as `List<object>` would seem to allow) - because your code would crash then (because the list really is `List<string>` and will only accept String type objects). That's why you can't cast your variable to a more general specification. On Java it's the other way around, you don't have generics, and instead everything is List of object at runtime, and you really can stuff any strange object in your supposedly-strictly typed List. Search for "Reified generics" to see a wider discussion of java's problem...
On many unixen, you can get sort to sort by a particular column, or field. So by sorting the file by the ID, and then by the date, you no longer need to keep the associative array of when you last saw each ID at all. All the context is there in the order of the file. On my Mac, which has GNU sort, it's: sort -k 8 < input.txt > output.txt to sort on the ID field. You can sort on a second field too, by saying (e.g) 8,3 instead, but ONLY 2 fields. So a unix-style time_t timestamp might not be a bad idea in the file - it's easy to sort, and saves you all those date calculations. Also, (again at least in GNU awk), there is a [mktime function][1] that makes the time_t for you from the components. [1]: http://www.gnu.org/manual/gawk/html_node/Time-Functions.html
I would have a look at Team City http://www.jetbrains.com/teamcity/index.html I know some people who are looking in to this and they say good things about it. My companies build process is done in FinalBuilder so I'm going to be looking at their server soon.
I would have a look at Team City http://www.jetbrains.com/teamcity/index.html I know some people who are looking in to this and they say good things about it. My companies build process is done in FinalBuilder so I'm going to be looking at their server soon. CC is quite good in that you can have one CC server monitor another CC server so you could set up stuff like - when a build completes on your build server, your test server would wake up, boot up a virtual machine and deploy your application. Stuff like that.
I know a few of the developers on the Carleton University developed [Blindside Project][1]. They are actively developing an open-source web conferencing and presentation tool for e-learning, with the intent of eventually offering university courses online. It's pretty fully featured software, and is meant to be installed as a server that can host many conference rooms at a time. It has voice, video, text, and a whiteboard/slideshow (**Edit:** supports PDF at the moment) capability. One feature I think it neat is that students can 'raise their hands' in the class to ask the instructor a question, where they can take the floor for a moment. Check out the demo on the site (if it's not working anymore I'll nudge the developers). Another pro is that the clients only need to have flash installed. *I just logged onto the online demo and created this preview:* ![Blindside][2] [1]: http://code.google.com/p/blindside/ [2]: http://www.engsoc.org/~cfournie/blindside.png
Natural language date/time parser for .NET?
|.net|datetime|nlp|
Does anyone know of a .NET date/time parser similar to [Chronic for Ruby][1] (handles stuff like "tomorrow" or "3pm next thursday")? Note: I do write Ruby (which is how I know about Chronic) but this project must use .NET. [1]: http://chronic.rubyforge.org/
The [BlindSide][1] site also listed these other projects: - [ePresence][2] - [OpenMeetings][3] - [DimDim][4] - [WebHuddle][5] All opensource as well. [1]: http://code.google.com/p/blindside/ [2]: http://www.epresence.tv/ [3]: http://code.google.com/p/openmeetings [4]: http://www.dimdim.com/ [5]: http://www.webhuddle.com/
execute shortcuts like programs in powershell
|powershell|
Example: You have a shortcut <code>s</code> to <code>SomeProgram</code> in the current directory. In <code>cmd.exe</code>, you can type <code>s</code> and it will launch the program. In PowerShell, typing <code>s</code> gives: > <code>The term 's' is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again.</code> If you type <code>s.lnk</code> or <code>SomeProgram</code>, it runs the program just fine. How can I configure PowerShell to execute shortcuts just like programs?
Example: You have a shortcut `s` to `SomeProgram` in the current directory. In `cmd.exe`, you can type `s` and it will launch the program. In PowerShell, typing `s` gives: > `The term 's' is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again.` If you type `s.lnk` or `SomeProgram`, it runs the program just fine. How can I configure PowerShell to execute shortcuts just like programs?
I think if I were going to do this, I would use tags. It would be pretty easy to write a script that would tag both repositories with the same ID each time you upgraded the library and used it in the project. Then, if you need to roll back to a previous version, you just see what its most recent tag was, and roll the library back to that version. UPDATE: Sorry, I've been in Mercurial land for a while, and forgot that subversion doesn't directly support tagging. Assuming you use the usual subversion directory structure / /trunk /tags /branches you just need to run svn copy trunk/ tags/TagName on both repos, with the same tag name. Subversion is pretty good about smart copies, so you don't need to worry about disk space.
For the sake of completeness I will mention [Edifact][1] for which I wrote an interface a long time ago. [1]: http://en.wikipedia.org/wiki/EDIFACT
What is the best practice for estimating required time for development of the SDLC phases?
|project-management|time-management|
As project manager, your required to organize your time so that the project meets a deadline. Is there some sort of equation to use for estimating how long development will take for let's say the database (like time = sql storeprecedures * tables manipulated or something similar) or are you just stuck having to get the experience to get adequate estimations?
I think one possible situation where you *might* get a performance gain is if the enumerable type's size and the loop condition is a constant; for example: <pre><code>const int ArraySize = 10; int[] values = new int[ArraySize]; //... for (int i = 0; i < ArraySize; i++) { //... }</code></pre> In this case, depending on the complexity of the loop body, the compiler might be able to replace the loop with inline calls. I have no idea if the .NET compiler does this, and it's of limited utility if the size of the enumerable type is dynamic. One situation where <code>foreach</code> might perform better is with data structures like a linked list where random access means traversing the list; the enumerator used by <code>foreach</code> will probably iterate one item at a time, making each access O(1) and the full loop O(n), but calling the indexer means starting at the head and finding the item at the right index; O(N) each loop for O(n^2). Personally I don't usually worry about it and use <code>foreach</code> any time I need all items and don't care about the index of the item. If I'm not working with all of the items or I really need to know the index, I use <code>for</code>. The only time I could see it being a big concern is with structures like linked lists.
Connector/Net _is_ the native provider you are looking for. If you're having trouble using it then you should open a new question asking how to get it working with crystal reports. I don't use crystal reports, so I can't help you there myself.
You're question is a little bit too vague in order to give a proper answer... If you plan to query the Oracle Database from an External Java Program (Either within a Swing Application or an Application Server) then you need to learn 2 core APIs: - JDBC (Java Database Connectivity) - JPA (Java Persistence API) JDBC is the core API that allows a Java Program to interact with any RDBMS so you should at least know how it works so whenever you have to dig into low-level code, you will actually know what's happening. JPA is the latest Java API for Persistence which basically allows one to map Plain Old Java Object (AKA PoJo) to RDBMS Table Structures. There are multiple known implementation available but I would recommend Hibernate or TopLink as good starting points. After that, you can start to dig into other known frameworks like the Spring Framework for some other RDBMS related APIs.
The foreach sample roughly corresponds to this code: using(IEnumerator<Entity> e = entityList.GetEnumerator()) { while(e.MoveNext()) { Entity entity = e.Current; ... } } There are two costs here that a regular for loop does not have to pay: 1. The cost of allocating the enumerator object by entityList.GetEnumerator(). 2. The cost of two virtual methods calls (MoveNext and Current) for each element of the list.
|encryption|pdc|
In [today's channel9.msdn.com video][1], the PDC guys posted a challenge to decipher this code: 2973853263233233753482843823642933243283 6434928432937228939232737732732535234532 9335283373377282333349287338349365335325 3283443783243263673762933373883363333472 8936639338428833535236433333237634438833 3275387394324354374325383293375366284282 3323383643473233852922933873933663333833 9228632439434936334633337636632933333428 9285333384346333346365364364365365336367 2873353883543533683523253893663653393433 8837733538538437838338536338232536832634 8284348375376338372376377364368392352393 3883393733943693253343433882852753933822 7533337432433532332332328232332332932432 3323323323323336323333323323323327323324 2873323253233233233892792792792792792792 7934232332332332332332332733432333832336 9344372376326339329376282344 Decipher it and win a t-shirt. (Lame, I know, was hoping for a free trip to the PDC.) I notice some interesting patterns in this code, such as the 332 pattern towards the end, but I'm at a loss as to where to go from here. They've said the answer is a text question. Any ideas on deciphering this code? [1]: http://channel9.msdn.com/posts/Dan/Countdown-to-PDC2008-By-Developers-for-Developers-Don-Box-and-Chris-Anderson/
Why no favicon for my web page?
|firefox|ubuntu|
I've got a website that I've just uploaded onto the interwebs, and when using Firefox 3.0.1 on Ubuntu I don't see the favicon; Firefox 3.0.1 on WinXP shows it. Why isn't the favicon displaying under Ubuntu? It's a favicon.ico file in the root directory, not referenced in the meta tags; would it work better as a GIF?
I've got a website that I've just uploaded onto the interwebs, and when using Firefox 3.0.1 on Ubuntu I don't see the favicon; Firefox 3.0.1 on WinXP shows it. **Why** isn't the favicon displaying under Ubuntu? It's a favicon.ico file in the root directory, not referenced in the meta tags; would it work better as a GIF?
Why no favicon for my web site?
|firefox|ubuntu|favicon|