instruction
stringlengths
0
30k
|c#|.net|winforms|
Say I have a `Textbox` nested within a `TabControl`. When the form loads I would like to focus on that textbox (by default the focus is set to the tabControl). Simply calling `textbox1.focus()` in the `Load` event of the form does not appear to work. I have been able to focus it by doing the following: private void frmMainLoad(object sender, EventArgs e) { foreach (TabPage tab in this.tabControl1.TabPages) { this.tabControl1.SelectedTab = tab; } } **My question is:** **Is there a more elegant way to do this?**
I am not sure if this helps, but take a look at [Increased Performance Using FILE_FLAG_SEQUENTIAL_SCAN][1]. > SUMMARY > > There is a flag for CreateFile() > called FILE_FLAG_SEQUENTIAL_SCAN which > will direct the Cache Manager to > access the file sequentially. > > Anyone reading potentially large files > with sequential access can specify > this flag for increased performance. > This flag is useful if you are reading > files that are "mostly" sequential, > but you occasionally skip over small > ranges of bytes. [1]: http://support.microsoft.com/default.aspx?scid=kb;EN-US;98756
In jQuery `event.target` always refers to the element that triggered the event, where `'event'` is the parameter passes to the function. <http://docs.jquery.com/Events_(Guide)> $(document).ready(function() { $("a").click(function(event) { alert(event.target.id); }); }); Note also that `'this'` will also work, but that it is not a jQuery object, so if you wish to use a jQuery function on it then you must refer to it as `'$(this)'`, e.g.: $(document).ready(function() { $("a").click(function(event) { // this.append wouldn't work $(this).append(" Clicked"); }); });
Programming to interfaces provides several benefits: 1. Required for GoF type patterns, such as the visitor pattern 2. Allows for alternate implementations. For example, multiple data access object implementations may exist for a single interface that abstracts the database engine in use (AccountDaoMySQL and AccountDaoOracle may both implement AccountDao) 3. A Class may implement multiple interfaces. Java does not allow multiple inheritance of concrete classes. 4. Abstracts implementation details. Interfaces may include only public API methods, hiding implementation details. Benefits include a cleanly documented public API and well documented contracts. 5. Used heavily by modern dependency injection frameworks, such as http://www.springframework.org/. 6. In Java, interfaces can be used to create dynamic proxies - http://java.sun.com/j2se/1.5.0/docs/api/java/lang/reflect/Proxy.html. This can be used very effectively with frameworks such as Spring to perform Aspect Oriented Programming. Aspects can add very useful functionality to Classes without directly adding java code to those classes. Examples of this functionality include logging, auditing, performance monitoring, transaction demarcation, etc. http://static.springframework.org/spring/docs/2.5.x/reference/aop.html. 7. Mock implementations, unit testing - When dependent classes are implementations of interfaces, mock classes can be written that also implement those interfaces. The mock classes can be used to facilitate unit testing.
|c++|windows|video|
I would like to open a small video file and map every frames in memory (to apply some custom filter). I don't want to handle the video codec, I would rather let the library handle that for me. I've tried to use Direct Show with the SampleGrabber filter (using this sample http://msdn.microsoft.com/en-us/library/ms787867(VS.85).aspx), but I only managed to grab some frames (not every frames!). I'm quite new in video software programming, maybe I'm not using the best library, or I'm doing it wrong. I've pasted a part of my code (mainly a modified copy/paste from the msdn example), unfortunately it doesn't grabb the 25 first frames as expected... [...] hr = pGrabber->SetOneShot(TRUE); hr = pGrabber->SetBufferSamples(TRUE); pControl->Run(); // Run the graph. pEvent->WaitForCompletion(INFINITE, &evCode); // Wait till it's done. // Find the required buffer size. long cbBuffer = 0; hr = pGrabber->GetCurrentBuffer(&cbBuffer, NULL); for( int i = 0 ; i < 25 ; ++i ) { pControl->Run(); // Run the graph. pEvent->WaitForCompletion(INFINITE, &evCode); // Wait till it's done. char *pBuffer = new char[cbBuffer]; hr = pGrabber->GetCurrentBuffer(&cbBuffer, (long*)pBuffer); AM_MEDIA_TYPE mt; hr = pGrabber->GetConnectedMediaType(&mt); VIDEOINFOHEADER *pVih; pVih = (VIDEOINFOHEADER*)mt.pbFormat; [...] } [...] Is there somebody, with video software experience, who can advise me about code or other simpler library? Thanks Edit: Msdn links seems not to work ([see the bug][1]) [1]: http://stackoverflow.uservoice.com/pages/general/suggestions/19963
Set up an email alias for the team on the mail server, and enter this when subscribing to the mail. Try the [Team Foundation Server Event Subscription Tool][1]. This allows you to send emails to any address when any TFS event occurs. [1]: http://www.codeplex.com/tfseventsubscription
C# string concatenation and string interning
|c#|
When performing string concatentation of an existing string in the intern pool, is a new string entered into the intern pool or is a reference returned to the existing string in the intern pool? According to this article, String.Concat and StringBuilder will insert new string instances into the intern pool? [http://community.bartdesmet.net/blogs/bart/archive/2006/09/27/4472.aspx][1] Can anyone explain how concatenation works with the intern pool? [1]: http://community.bartdesmet.net/blogs/bart/archive/2006/09/27/4472.aspx
|c#|.net|
If you create new strings, they will not automatically be put into the intern pool, unless you concatenate constants compile-time, in which case the compiler will create one string result and intern that as part of the JIT process.
Matt Sheppard's answer is great (mod up), but I would take account these factors when thinking about a spindle: 1. Structure : does it obviously break into pieces, or are you making tradeoffs? 2. Usage : how will the data be analyzed/retrieved/grokked? 3. Lifetime : how long is the data useful? 4. Size : how much data is there? Huge advantage of CSV files over RDBMSes is that they can be easy to condense and move around to practically any other machine. We do large data transfers, and everything's simple enough we just use one big CSV file. To reduce repetition, you could use something like [YAML](http://yaml.org). I'm not sure I'd store anything like JSON or XML, unless you had significant relationship requirements. As far as not-mentioned alternatives, don't discount [Hadoop](http://hadoop.apache.org/core/), which is an open source implementation of MapReduce. This should work well if you have a TON of loosely structured data that needs to be analyzed, and you want to be in a scenario where you can just add 10 more machines to handle data processing. I've never worked with a "clustering" RDBMS.
How to track if browser is Silverlight enabled
|silverlight|browser|tracking|google-analytics|
I'm trying to get some stats on how many of the visitors to our website have Silverlight enabled browsers. We currently use Google Analytics for the rest of our stats so ideally we'd like to just add 'Silverlight enabled' tracking in with the rest of our Google Analytics stats. But if it has to get written out to a DB etc then so be it. Nikhil has [some javascript](http://www.nikhilk.net/Silverlight-Analytics.aspx) to Silverlight tracking to Google Analytics. I have tried this code but Google Analytics doesn't pick it up. Does anyone have any other ideas/techniques? Thanks in advance for any help/ideas.
You can use [SQL Management Objects](http://msdn.microsoft.com/en-us/library/ms162557.aspx) to perform this. These are the same objects that Management Studio uses to execute queries. I believe Server.ConnectionContext.ExecuteNonQuery() will perform what you need.
This is what I knocked together to solve my immediate problem. private void ExecuteBatchNonQuery(string sql, SqlConnection conn) { string sqlBatch = string.Empty; SqlCommand cmd = new SqlCommand(string.Empty, conn); conn.Open(); sql += "\nGO"; // make sure last batch is executed. try { foreach (string line in sql.Split(new string[2] { "\n", "\r" }, StringSplitOptions.RemoveEmptyEntries)) { if (line.ToUpperInvariant().Trim() == "GO") { cmd.CommandText = sqlBatch; cmd.ExecuteNonQuery(); } else { sqlBatch += line + "\n"; } } } finally { conn.Close(); } } It requires GO commands to be on their own line, and will not detect block-comments, so this sort of thing will get split, and cause an error: ExecuteBatchNonQuery(@" /* GO */", conn);
This is what I knocked together to solve my immediate problem. private void ExecuteBatchNonQuery(string sql, SqlConnection conn) { string sqlBatch = string.Empty; SqlCommand cmd = new SqlCommand(string.Empty, conn); conn.Open(); sql += "\nGO"; // make sure last batch is executed. try { foreach (string line in sql.Split(new string[2] { "\n", "\r" }, StringSplitOptions.RemoveEmptyEntries)) { if (line.ToUpperInvariant().Trim() == "GO") { cmd.CommandText = sqlBatch; cmd.ExecuteNonQuery(); sqlBatch = string.Empty; } else { sqlBatch += line + "\n"; } } } finally { conn.Close(); } } It requires GO commands to be on their own line, and will not detect block-comments, so this sort of thing will get split, and cause an error: ExecuteBatchNonQuery(@" /* GO */", conn);
Scope out SmarterTrack from SmarterTools: http://www.smartertools.com/SmarterTrack/Features/Customer-Service-Software-Web-Interface.aspx or http://tinyurl.com/59pjme
My answer [from a different][1] post: Stored Procedures are *MORE* maintainable because: - You don't have to recompile your C# app whenever you want to change some SQL - You end up reusing SQL code. Code repetition is the *worst* thing you can do when you're trying to build a maintainable application! What happens when you find a logic error that needs to be corrected in multiple places? You're more apt to forget to change that last spot where you copy & pasted your code. In my opinion, the performance & security gains are an added plus. **You can still write insecure/inefficient SQL stored procedures.** > Easier to port to another DB - no procs to port It's not very hard to script out all your stored procedures for creation in another DB. In fact - it's *easier* than exporting your tables because there are no primary/foreign keys to worry about. [1]: http://stackoverflow.com/questions/15142/what-are-the-pros-and-cons-to-keeping-sql-in-stored-procs-versus-code#15206
Depends what your goal is. If you want to retrieve a list of items and it happens once during your application's entire run for example, it's probably not worth the effort of using a stored procedure. On the other hand, a query that runs repeatedly and takes a (relatively) long time to execute is an excellent candidate for database storage, since the performance will be better. If your application lives almost entirely within the database, stored procedures are a no-brainer. If you're writing a desktop application to which the database is only tangentially important, ad-hoc queries may be a better option, as it [keeps all of your code in one place][1]. @Terrapin: I think your assertion that the fact that you don't have to recompile your app to make modifications makes stored procedures a better option is a non-starter. There may be reasons to choose stored procedures over ad-hoc queries, but in the absence of anything else compelling, the compile issue seems like laziness rather than a real reason. [1]: http://stackoverflow.com/questions/22818/where-to-put-your-code-database-vs-application
How complex HTML are we talking about? Simple HTML, like &lt;b&gt; and &lt;i&gt; is supported in text fields if you use the <code>htmlText</code> property. You can also attach a CSS style sheet to the text field for more styling. Have a look at TextField in the Flash API documentation (I'm sure you can just google it).
Normally, ViewState should be decryptable if you have the machine-key, right? After all, ASP.net needs to decrypt it, and that is certainly not a black box.
There are persuasive arguments for both - stored procedures are all located in a central repository, but are (potentially) hard to migrate and ad hoc queries are easier to debug as they are with your code, but they can also be harder to find in the code. The argument that stored procedures are more efficient doesn't hold water anymore. [link text][1] Doing a google for Stored Procedure vs Dynamic Query will show decent arguments either way and probably best for you to make your own decision... [1]: http://weblogs.asp.net/fbouma/archive/2003/05/14/7008.aspx
I think Silverlight is most advantageous for companies that have .NET developers but noone with designer experience. Skill sets will be easier to find as far as finding C# or VB developers vs finding ActionScript guru's. However there is the trade off: Design experience is an investment not only in Designers with artistic skill, but also in the knowledge and tools provided by Adobe. You can nearly guarantee that a professional designer uses a mac and has experience with Adobe tools. Right now the Silverlight designer tools are half baked and can be a headache. For instance Blend errors when trying to render any xaml containing an IValueConverter, this is problematic. I have no idea what the Adobe developer experience is, I'm sure it is as hairy. So at this stage of the game it comes down to human resources: If you have .NET experience and little invested in Design skills go Silverlight. If you have Design experience and skill set go with Flex.
Even more important, there are FILE_FLAG_WRITE_THROUGH and FILE_FLAG_NO_BUFFERING. MSDN has a nice article on them both: http://support.microsoft.com/kb/99794
Here's a good article on tagging Database schemas: http://www.pui.ch/phred/archives/2005/04/tags-database-schemas.html along with performance tests: http://www.pui.ch/phred/archives/2005/06/tagsystems-performance-tests.html Note that the conclusions there are very specific to MySQL, which (at least in 2005 at the time that was written) had very poor full text indexing characteristics.
How do you recommend implementing tags or tagging
|tags|
I've heard of a few ways to implement tagging; using a mapping table between TagID and ItemID (makes sense to me, but does it scale?), adding a fixed number of possible TagID columns to ItemID (seems like a bad idea), Keeping tags in a text column that's comma separated (sounds crazy but could work). I've even heard someone recommend a sparse matrix, but then how do the tag names grow gracefully? Am I missing a best practice for tags?
|database|tags|
|database|tags|folksonomy|
|database|tags|
|database|tags|tagging|
winmerge is a good visual diff program
If you dont mind using a tool, ESEUTIL worked great for me. You can check out this [blog][1] entry comparing Buffered and NonBuffered IO functions and from where to get ESEUTIL. copying some text from the technet blog: *So looking at the definition of buffered I/O above, we can see where the perceived performance problems lie - in the file system cache overhead. Unbuffered I/O (or a raw file copy) is preferred when attempting to copy a large file from one location to another when we do not intend to access the source file after the copy is complete. This will avoid the file system cache overhead and prevent the file system cache from being effectively flushed by the large file data. Many applications accomplish this by calling CreateFile() to create an empty destination file, then using the ReadFile() and WriteFile() functions to transfer the data. CreateFile() - The CreateFile function creates or opens a file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, or named pipe. The function returns a handle that can be used to access an object. ReadFile() - The ReadFile function reads data from a file, and starts at the position that the file pointer indicates. You can use this function for both synchronous and asynchronous operations. WriteFile() - The WriteFile function writes data to a file at the position specified by the file pointer. This function is designed for both synchronous and asynchronous operation. For copying files around the network that are very large, my copy utility of choice is ESEUTIL which is one of the database utilities provided with Exchange.* [1]: http://blogs.technet.com/askperf/archive/2007/05/08/slow-large-file-copy-issues.aspx
I have a web application running on a Gentoo-based LAMP stack. My customers buy the software as a service and I host everything. They can export their data if they want. However, there is some demand for on-site deployment inside the clients' own networks. For some of these scenarios, there would be a requirement for some particular OS, typically something like Windows Server 2003, but possibly other Linux distros as well. Currently, because I host the system, there is no built-in license management in the app. I bill based on user accounts and data capacity (it's a processing and analysis app for metering data) and I just set up whatever the client pays for and the client can't setup those things himself. Even without on-site installation, that should be changed for better scalability anyway. I am looking for a license managment framework and/or typical approaches that you have implemented yourselves or have seen to work well elsewhere. My requirements are: - "safe enough" rather than "military grade" - very much non-obtrusive - prevent the owner of a license from running the system in multiple plants when he has only licensed one - make the number of user accounts and the data capacity both reasonably tamper-proof and easy to up- / downgrade - work without an Internet connection (having a completely self-contained system would be the main point of opting for the on-site solution), though it might be acceptable if there has to be a temporary connection during installation From a user's point of view, I am quite satisfied with the license management in FogBugz, it seems Joel Spolsky is satisfied with it from a vendor's point of view, and it is cross-platform, so it would make a great reference of what I'm aiming at.
I have a web application running on a Gentoo-based LAMP stack. My customers buy the software as a service and I host everything. However, there is some demand for on-site deployment inside the clients' own networks. Currently, because I host the system, there is no built-in license management in the app. I bill based on user accounts and data capacity (it's a processing and analysis app for metering data) and I just set up whatever the client pays for and the client can't setup those things himself. Even without on-site installation, that should be changed for better scalability anyway. I am looking for a license managment framework and/or typical approaches that you have implemented yourselves or have seen to work well elsewhere. My requirements are: - "safe enough" rather than "military grade" - very much non-obtrusive - prevent the owner of a license from running the system in multiple plants when he has only licensed one - make the number of user accounts and the data capacity both reasonably tamper-proof and easy to up- / downgrade - work without an Internet connection (having a completely self-contained system would be the main point of opting for the on-site solution), though it might be acceptable if there has to be a temporary connection during installation For some of the on-site scenarios, there would be a requirement for some particular OS, typically some version of Windows Server, but various Linux distros are getting more popular as well, especially in the public sector. From a user's point of view, I am quite satisfied with the license management in FogBugz, it seems Joel Spolsky is satisfied with it from a vendor's point of view, and it is cross-platform, so it would make a great reference of what I'm aiming at.
You can pass it into the TextBox call as a parameter. Name:<br/> <%= Html.TextBox("txtName", "20", new { @class = "hello" }) %> This line will create a text box with the value 20 and assign the class attribute with the value hello. I put the @ character in front of the class, because class is a reserved keyword. If you want to add other attributes, just separate the key/value pairs with commas.
use the htmlAttributes parameter with anonymous type, like tihs: <%=Html.TextBox("txtName","20", new { @class = "test"}) %>
For threaded apps, you can often get away with ConcurrentHashMap- depends on your performance requirements.
You'll get what you want with YAML. But there is a little problem with your string. YAML expects that there's a space behind the comma. So we need this str = "[[this, is], [a, nested], [array]]" Code: require 'yaml' str = "[[this, is],[a, nested],[array]]" ### transform your string in a valid YAML-String str.gsub!(/(\,)(\S)/, "\\1 \\2") YAML::load(str) # => [["this", "is"], ["a", "nested"], ["array"]]
The "GO" batch separator keyword is actually used by SQL Management Studio itself, so that it knows where to terminate the batches it is sending to the server, and it is not passed to SQL server. You can even change the keyword in Management Studio, should you so desire.
The on-demand version of Fogbugz is a pretty cheap option for just a few people, and works really well. We did that for a while before moving it inhouse.
I've used fogbugz for over 12 months now and more and more I'm finding one of the most valuable features is the in built email support. I've got an on demand account and I'm finding more and more that I don't even check my email in the morning as all my business correspondence is put straight into fogbugz.
IDE for use on a Java-enabled smart phone?
|ide|
Is there an IDE that I can load on a Blackberry, E71, or an iPhone?
If you don't mind running a Microscoft Windows Based Script then this jscript will work OK. just save it as a .js file and run it. var fso, f, fileCount; var ForReading = 1, ForWriting = 2; var filename = "c:\\testfile.txt"; fso = new ActiveXObject("Scripting.FileSystemObject"); //create file if its not found if (! fso.FileExists(filename)) { f = fso.OpenTextFile(filename, ForWriting, true); f.Write("0"); f.Close(); } f = fso.OpenTextFile(filename, ForReading); fileCount = parseInt(f.ReadAll()); //make sure the input is a whole number if (isNaN(fileCount)) { fileCount = 0; } fileCount = fileCount + 1; f = fso.OpenTextFile(filename, ForWriting, true); f.Write(fileCount);
If you don't mind running a Microscoft Windows Based Script then this jscript will work OK. just save it as a .js file and run it from dos with "wscript c:/script.js". var fso, f, fileCount; var ForReading = 1, ForWriting = 2; var filename = "c:\\testfile.txt"; fso = new ActiveXObject("Scripting.FileSystemObject"); //create file if its not found if (! fso.FileExists(filename)) { f = fso.OpenTextFile(filename, ForWriting, true); f.Write("0"); f.Close(); } f = fso.OpenTextFile(filename, ForReading); fileCount = parseInt(f.ReadAll()); //make sure the input is a whole number if (isNaN(fileCount)) { fileCount = 0; } fileCount = fileCount + 1; f = fso.OpenTextFile(filename, ForWriting, true); f.Write(fileCount); f.Close();
I think Silverlight is most advantageous for companies that have .NET developers but noone with designer experience. Skill sets will be easier to find as far as finding C# or VB developers vs finding ActionScript guru's. However there is the trade off: Design experience is an investment not only in Designers with artistic skill, but also in the knowledge and tools provided by Adobe. You can nearly guarantee that a professional designer uses a mac and has experience with Adobe tools. Right now the Silverlight designer tools are half baked and can be a headache. For instance Blend errors when trying to render any xaml containing an IValueConverter, this is problematic. I have no idea what the Adobe developer experience is, I'm sure it is as hairy. So at this stage of the game it comes down to human resources: If you have .NET experience and little invested in Design skills go Silverlight. Programming skills/tools will be transferable. If you have Design experience and skill set go with Flex. Designer skills/tools will be transferable. Either way both client platforms require communication with services to get data, so you will always leverage your existing programing expertise on the back end.
I think Silverlight is most advantageous for companies that have .NET developers but noone with designer experience. Skill sets will be easier to find as far as finding C# or VB developers vs finding ActionScript guru's. However there is the trade off: Design experience is an investment not only in Designers with artistic skill, but also in the knowledge and tools provided by Adobe. You can nearly guarantee that a professional designer uses a mac and has experience with Adobe tools. Right now the Silverlight designer tools are half baked and can be a headache. For instance Blend errors when trying to render any xaml containing an IValueConverter, this is problematic. I have no idea what the Adobe developer experience is, I'm sure it is as hairy. So at this stage of the game it comes down to human resources: If you have .NET experience and little invested in Design skills go Silverlight. Programming skills/tools will be transferable. If you have Design experience and skill set go with Flex. Designer skills/tools will be transferable. Either way both client platforms require communication with services to get data, so you will always leverage your existing programing expertise on the back end. Paraphrased [Jon's][1] opinion from a different point of view: I think you should look at Flex as a long-term play, just as Adobe seems to be doing. There's an obvious balance on when to use Silverlight vs. Flex when you're concerned about reach and install base, but here are more reasons Flex is a good direction to move in: 1. Second mover advantage - Just as Adobe built a "better Java Applet" with Flash, they're able to look at how you'd design a runtime from scratch, today. They have the advantage of knowing how people use the web today, something the inventors of existing client platforms could never have accurately guessed. .NET can add features, but they can't realistically chuck the platform and start over. 2. Designer familiarity - While Flex/AIR is a new programing model, it's not entirely unfamiliar to designers. They'll "get" the way Flex works a lot more quickly than they'll understand firing up a new design environment with new feature poor tools and new animation paradigms. 3. Being rid of the RGB color model in Silverlight- .NET was originally built for windows and it is at the core of how it works. Flex ditched a long time ago for an design-centric model. 4. All your tools run on your mac. Nuff said. 5. Cool features - Silverlight still has some catching up to do with Flash on some obvious features (like webcam / mic integration, or 3d / graphics acceleration). [1]: http://stackoverflow.com/users/5/jon-galloway
Reduce ASP.NET menu control size (without 3rd party libraries)
|asp.net|size|
I have a fairly simple ASP.NET 2.0 menu control using a sitemap file and security trimmings. There are only 21 menu options, but the results HTML of the menu is a whopping 14k. The site is hosted on our company's intranet and must be serverd to people worldwide on limited bandwidth, so I'd like to reduce the size of the menus. What is the best way to do this? Does anybody have a good reference? I have the following constraints: - The solution cannot reference any 3rd part DLL files (getting approval would be a nightmare) - Must work with IE 6 CSS and JavaScript are fine, as long as they work with IE 6.
|asp.net|menu|size|
SQL, Auxiliary table of numbers
|sql-server|sql|query|number|
For certain types of sql queries, an auxiliary table of numbers can be very useful. It may be created as a table with as many rows as you need for a particular task or as a user defined function that returns the number of rows required in each query. What is the optimal way to create such a function?
|sql|sql-server|query|numbers|
Datatable vs Dataset
|sql|dataset|datatable|
I current use a datatable to get results from a database which I can use in my code. However, many example on the web show using a dataset instead and accessing the tables through the collections method. Is there any advantage, performance wise or otherwise, of using datasets or datatables as a storage method for sql results?
|sql|dataset|datatable|
Calling base Methods When Overriding Page Level Events
|asp.net|events|webform|
In my code behind I wire up my events like so: protected override void OnInit(EventArgs e) { base.OnInit(e); btnUpdateUser.Click += btnUpateUserClick; } I've done it this way because that's what I've seen in examples. Does the base.OnInit() method need to be called? Will it be implicitly be called? Is it better to call it at the beginning of the method or at the end? What would be an example where confusion over the base method can get you in trouble?
|asp.net|events|webforms|
Creating a UserControl Programmaticly within a repeater?
|asp.net|webforms|user-controls|
I have a a repeater that is bound to some data. I bind to the ItemDataBound event, and I am attempting to programmaticly create a UserControl: In a nutshell: void rptrTaskList_ItemDataBound(object sender, RepeaterItemEventArgs e) { CCTask task = (CCTask)e.Item.DataItem; if (task is ExecTask) { ExecTaskControl foo = new ExecTaskControl(); e.Item.Controls.Add(foo); } } The problem is that while the binding works, the user control is not rendered to the main page. Any ideas?
|html|webdevelopment|
|html|
Firebug for IE
|ie|internet-explorer|firebug|webdevelopment|debugging|
Trying to fix JavaScript bugs is huge pain as is determining the styles applied to an element. Firebug makes these issues a lot easier when working on Firefox, but when do you do when the code works fine on Firefox but IE is complaining?
|debugging|webdevelopment|internet-explorer|ie|firebug|
Trying to fix JavaScript bugs is huge pain as is determining the styles applied to an element. Firebug makes these issues a lot easier when working on Firefox, but what do you do when the code works fine on Firefox but IE is complaining?
|webdevelopment|debugging|internet-explorer|firebug|
|debugging|internet-explorer|firebug|
Progressive Enhancement
|ajax|webdevelopment|progressiveenhancement|
Jeff mentioned the concept of 'Progressive Enhancement' when talking about using JQuery to write stackoverflow. After a quick Google, I found a couple of high-level discussions about it. Can anyone recommend a good place to start as a programmer. Specifically, I have been writing web apps in PHP and would like to use YUI to improve the pages I am writing, but a lot of them seem very JavaScript based, with most of the donkey work being done using JavaScript. To me, that seems a bit overkill, since viewing the site without Javascript will probably break most of it. Anyone have some good places to start using this idea, I don't really care about the language. Ideally, I would like to see how you start creating the static HTML first, and then adding the YUI (or whatever Ajax framework) to it so that you get the benefits of a richer client?
What is Progressive Enhancement?
|ajax|progressive-enhancement|
What are comon exploits (web) i should know about?
|webdevelopment|testing|
I'm pretty green still when it comes to web programing, I've spent most of my time on client applications. So I'm curious about the common exploits I should fear/test for in my site.
|webdevelopment|testing|security|
What common web exploits should I know about?
I'm pretty green still when it comes to web programming, I've spent most of my time on client applications. So I'm curious about the common exploits I should fear/test for in my site.
Is there some way to show HTML content inside Flash?
|adobe|flash|html|
I want to show HTML content inside FLASH. Is there some way to do this?
|javascript|html|flash|adobe|
I want to show HTML content inside FLASH. Is there some way to do this? I am talking about full blown HTML (with JavaScript if possible)
Unfortunately, we can't rely on the columns of the excel doc to stay in a particular format as the users will be pasting data into it regularly. I don't want the app to crash if we're relying on a certain datatype for a column. prefixing with ' would work, is there a reasonable way to do that programatically once the data already exists in the excel doc?
Procs for the reasons mentioned by others and also it is easier to tune a proc with profiler or parts of a proc. This way you don't have to tell someone to run his app to find out what is being sent to SQL server If you do use ad-hoc queries make sure that they are parameterized