instruction
stringlengths
0
30k
Each looping construct serves a different purpose. for - This is used to loop for a specific number of iterations. foreach - This is used to loop through all of the values in a collection. while - This is used to loop until you meet a condition. Of the three, "while" will most likely provide the best performance in most situations. Of course, if you do something like the following, you are basically rewriting the "for" loop (common misuse of while). $count = 0; do { ... $count++; } while ($count < 10); They all have different basic purposes, but they can also be used in somewhat the same way. It completely depends on the specific problem that you are trying to solve.
You may also be interested in using joins on updates, which is possible as well. Update someTable Set someValue = 4 From someTable s Inner Join anotherTable a on s.id = a.id Where a.id = 4 -- Only updates someValue in someTable who has a foreign key on anotherTable with a value of 4. Edit: If the values you are updating aren't coming from somewhere else in the database, you'll need to issue multiple update queries.
Acceptable for invalid XHTML?
|xhtml|markup|
I've noticed a lot of sites, SO included, use XHTML as their mark-up language and then fail to adhere to the spec. Just browsing the source for SO there are missing closing tags for paragraphs, invalid elements, etc. So should tools (and developers) use the XHTML doctype if they are going to produce invalid mark up? And should browsers be more firm in their acceptance of poor mark-up? And before anyone shouts hypocrite, my blog has one piece of invalid mark-up involving the captha (or it did the last time I checked) which involves styling the noscript tag.
UPDATE tableName SET col1='000' WHERE id='3' OR id='5' This should achieve what you'r looking for. Just add more id's. I have tested it.
It depends. I had that [issue with my blog][1] where a YouTube video caused invalid XHTML, but it rendered fine. On the other hand, I have a "Valid XHTML" link, and a combination of a "Valid XHTML" claim and invalid XHTML is not professional. As SO does not claim to be valid, I think it's acceptable, but personally if I were Jeff i would be bothered and try to fix it even if it looks good in modern browsers, but some people rather just move on and actually get things done instead of fixing non-existent bugs. [1]: http://www.stum.de/2008/02/29/valid-xhtml-and-youtube-embedding/
This doesn't specifically answer your question, because I'm not sure in any clients exist in OSX, but I generally just Remote Desktop into the server and work through that. Another option is VMWare Fusion (which is much better than Parallels in my opinion) + XP + SQL Server Management Studio.
So long as it works in IE, FF, Safari, (insert other browser here) you should be okay. Validation isn't as important as having it render correctly in multiple browsers. Just because it is valid, doesn't mean it'll work in IE properly, for instance. Run Google Analytics or similar on your site and see what kind of browsers your users are using and then judge which browsers you need to support the most and worry about the less important ones when you have the spare time to do so.
I wouldn't use XHTML at all just to save myself the philosophical stress. It's not like any browsers are treating it like XHTML anyway. Browsers will reject poor mark-up if the page is sent as application/xhtml+xml, but they rarely are. This is fine. I would be more concerned about things like inline use of CSS and JavaScript with Stack Overflow, just because they make maintenance harder.
I say, if it renders OK, then it doesn't matter if it's pixel perfect. It takes a while to get a site up and running the way you want it, going back and making changes is going to change the way the page renders slightly, then you have to fix *those* problems. Now, I'm not saying you should built sloppy web pages, but I see no reason to fix what ain't broke. Browsers aren't going to drop support for error correction anytime in the near future.
Does anyone know of a web based IDE?
|web-ide|
Does anyone know of a web based IDE (Like VS, Eclipse, IDEA)? Besides [ECCO][1]? [1]: http://ecco.sourceforge.net/
The XmlSerializer or the DataContractSerializer in .net 3.x will do the job for you.
I'd use [Reflection](http://java.sun.com/docs/books/tutorial/reflect/index.html), since I don't like the idea of changing the access to package on the declared method just for the sake of testing. However, I usually just test the public methods which should also ensure the the private methods are working correctly.
I'd use [Reflection](http://java.sun.com/docs/books/tutorial/reflect/index.html), since I don't like the idea of changing the access to package on the declared method just for the sake of testing. However, I usually just test the public methods which should also ensure the the private methods are working correctly. **Edit:** > you can't use reflection to get private methods from outside the owner class, the private modifier affects reflection also This is not true. You most certainly can, as mentioned in this [answer](http://stackoverflow.com/questions/34571/whats-the-best-way-of-unit-testing-private-methods#34658).
Try **SOAP4R** - [SOAP4R][1] - [Getting Started with SOAP4R][2] [1]: http://dev.ctor.org/soap4r [2]: http://markthomas.org/2007/09/12/getting-started-with-soap4r/
Try **SOAP4R** - [SOAP4R][1] - [Getting Started with SOAP4R][2] And I just heard about this on the Rails Envy Podcast (ep 31): - [WS-Deathstar SOAP walkthrough ][3] [1]: http://dev.ctor.org/soap4r [2]: http://markthomas.org/2007/09/12/getting-started-with-soap4r/ [3]: http://hideoustriumph.wordpress.com/2008/05/05/ws-deathstar-for-the-rest-of-us/
How do I loop through result objects in Flex?
|apache-flex|actionscript-3|actionscript|
I am having problems manually looping through xml data that is received via an HTTPService call, the xml looks something like this: <pre> <code> &lt;DataTable&gt; &lt;Row&gt; &lt;text&gt;foo&lt;/text&gt; &lt;/Row&gt; &lt;Row&gt; &lt;text&gt;bar&lt;/text&gt; &lt;/Row&gt; &lt;/DataTable&gt; </code> </pre> When the webservie result event is fired I do something like this: <pre> <code> for(var i:int=0;i&lt;event.result.DataTable.Row.length;i++) { if(event.result.DataTable.Row[i].text == "foo") mx.controls.Alert.show('foo found!'); } </code> </pre> This code works then there is more then 1 "Row" nodes returned, however it seems that if there is only one "Row" node then the event.DataTable.Row object is not an error and the code subsequently breaks. What is the proper way to loop through the HTTPService result object? Do I need to convert it to some type of XMLList collection or an ArrayCollection? I have tried setting the resultFormat to "e4x" and that has yet to fix the problem... Thanks
The web application in question uses an Oracle database. The main functionality the application delivers is in reporting, where a user can get PDFs of reports at a high level and drill down to lower levels of supporting details. As the number of supporting detail records has grown into the millions, the performance of the system has significantly degraded. For now, the bottleneck seems to be in the logic hitting the DB and the DB performance, not the view/presentation of the data. Partioning, indexing, and running stats are things that have been done on the DB side to try to help improve performance. While they've helped, they haven't solved the issue. Changing the DB model is being explored. The development team is brainstorming different ideas... Any recommended strategies for improving the performance of a data-driven web application? Any personal experience in overcoming hurdles like this in the past?
How have you tackled web application performance improvement?
My development team works on a web application (JSP reports, HTML, JavaScript) that uses an Oracle database (PL/SQL). The main functionality the application delivers is in reporting, where a user can get PDFs of reports at a high level and drill down to lower levels of supporting details. As the number of supporting detail records has grown into the millions, the performance of the system has significantly degraded. Based on our current analysis, the bottleneck seems to be in the logic hitting the DB and the DB performance, not the view/presentation of the data. Partioning, indexing, explain plans, and running statistics are things that have been done on the DB side to try to help improve performance. While they've helped, they haven't solved the issue satisfactorily. Changing the DB model is being explored. The development team is brainstorming different ideas... Any recommended strategies for improving the performance of a data-driven web application? Any personal experience in overcoming hurdles like this in the past?
What Strategies Have You Employed To Improve Web Application Performance?
What strategies have you employed to improve web application performance?
|performance|oracle-database|web-applications|
My development team works on a web application (JSP reports, HTML, JavaScript) that uses an Oracle database (PL/SQL). The main functionality the application delivers is in reporting, where a user can get PDFs of reports at a high level and drill down to lower levels of supporting details. As the number of supporting detail records has grown into the millions, the performance of the system has significantly degraded. Based on our current analysis of the metrics, the bottleneck seems to be in the logic hitting the DB and the DB performance, not the view/presentation of the data. Partioning, indexing, explain plans, and running statistics are things that have been done on the DB side to try to help improve performance. While they've helped, they haven't solved the issue satisfactorily. Changing the DB model is being explored. The development team is brainstorming different ideas... Any recommended strategies for improving the performance of a data-driven web application? Any personal experience in overcoming hurdles like this in the past?
Use the INSTR() function to find the position of the word in the string, and then use SUBSTRING() function to select a portion of characters before and after the position. You'd have to look out that your SUBSTRING instruction don't use negative values or you'll get weird results. Try that, and report back.
An extension method? They're the answer to everything you know! ;) public static class DateTimeExtensions { public static DateTime StartOfWeek(this DateTime dt, DayOfWeek startOfWeek) { int diff = dt.DayOfWeek - startOfWeek; if (diff < 0) { diff += 7; } return dt.AddDays(-1 * diff).Date; } } Which is used thusly: DateTime dt = DateTime.Now.StartOfWeek(DayOfWeek.Monday); DateTime dt = DateTime.Now.StartOfWeek(DayOfWeek.Sunday);
A little more verbose and culture-aware: System.Globalization.CultureInfo ci = System.Threading.Thread.CurrentThread.CurrentCulture; DayOfWeek fdow = ci.DateTimeFormat.FirstDayOfWeek; DayOfWeek today = DateTime.Now.DayOfWeek; DateTime sow = DateTime.Now.AddDays(-(today - fdow)).Date;
One might want to consider the use of an LDAP server in the place of a traditional SQL database if the application data is heavily key/value oriented and hierarchical in nature.
on linux, you can look in the directory /proc/$PID to get information about that process. In fact, if the directory exists, the process is running.
What are the endlines of you batch? If the code hangs on ReadLine, then the problem might be that it's unable to read the batch file…
DateTime t = DateTime.Now; t -= new TimeSpan ((int) t.DayOfWeek, t.Hour, t.Minute, t.Second); Would give you midnight on the 1st Sunday of the week, DateTime t = DateTime.Now; t -= new TimeSpan ((int) t.DayOfWeek - 1, t.Hour, t.Minute, t.Second); gives you the 1st Monday at midnight
Depends! ;) For example there is [ADODB's Active Record implementation][1], then there is Zend_Db_DataTable and [Doctrine][2]. Those are the ones I know of, I am sure there are more implementations. Out of those three I'd recommend Doctrine. Last time I checked Adodb carried a lot of extra weight for PHP4 and Zend_Db_* is generally not known to be the best in terms of completeness and performance (most likely due to its young age). Doctrine aside from Active Table and the general database abstraction thing (aka DBAL) has so many things (e.g. migrations) which make it worth checking out, so if you haven't set your mind on a DBAL yet, you need to check it out. [1]: http://phplens.com/lens/adodb/docs-active-record.htm [2]: http://www.phpdoctrine.org/
You can use [Zend Cache][1] to cache results of your queries among other things. [1]: http://framework.zend.com/manual/en/zend.cache.html
Whilst not strictly ActiveRecord, [Zend_Db_Table][1] is pretty good. [1]: http://framework.zend.com/manual/en/zend.db.table.html
How to implement mouse dragging in Visual Basic?
I would say that it depends: if you find that using Glade you can build the apps you want or need to make than that's absolutely fine. If however you actually want to learn how GTK works or you have some non-standard UI requirements you will **have** to dig into GTK internals (which are not that complicated). Personally I'm usually about 5 minutes into a rich client when I need some feature or customization that is simply impossible through a designer such as Glade or [Stetic][1]. Perhaps it's just me. Nevertheless it is still useful for me to bootstrap window design using a graphical tool. My recommendation: if making rich clients using GTK is going to be a significant part of your job/hobby then learn GTK as well since you **will** need to write that code someday. P.S. I personally find [Stetic][2] to be superior to Glade for design work, if a little bit more unstable. [1]: http://www.mono-project.com/Stetic [2]: http://www.mono-project.com/Stetic
One of the issues with the resolving at run time is that you make it really hard for the opcode caches (like APC). Still, for now, doing something like you describe in your question is a valid way if you need a certain amount of indirection when instanciating stuff. As long as you don't do something like $classname = 'SomeClassName'; for ($x = 0; $x < 100000; $x++){ $object = new $classname; } you are probably fine :-) (my point being: Dynamically looking up a class here and then doesn't hurt. If you do it often, it will). Also, be sure that $classname can never be set from the outside - you'd want to have some control over what exact class you will be instantiating.
I've never heard of it, but [from their blog][1]: > Aqua Connect Terminal Server uses the VNC (Virtual Network Computing) protocol to send data between Mac OS X and the client application. Now, if someone *does* know of a non-VNC solution, I'd be happy to hear it. [1]: http://www.aquaconnect.net/?p=170
If you want to maintain the order you can do something like this: var unique = new List<T>(); var hs = new HashSet<T>(); foreach (T t in list) if (hs.Add(t)) unique.Add(t); Or the Linq way: var hs = new HashSet<T>(); list.All( x => hs.Add(x) ); Otherwise just put it all in a HashSet.
If you don't care about the order you can just shove the items into a `HashSet`, if you *do* want to maintain the order you can do something like this: var unique = new List<T>(); var hs = new HashSet<T>(); foreach (T t in list) if (hs.Add(t)) unique.Add(t); Or the Linq way: var hs = new HashSet<T>(); list.All( x => hs.Add(x) );
If you don't care about the order you can just shove the items into a `HashSet`, if you *do* want to maintain the order you can do something like this: var unique = new List<T>(); var hs = new HashSet<T>(); foreach (T t in list) if (hs.Add(t)) unique.Add(t); Or the Linq way: var hs = new HashSet<T>(); list.All( x => hs.Add(x) ); **Edit:** The `HashSet` method is `O(N)` time and `O(N)` space while sorting and then making unique (as suggested by @[lassevk](http://stackoverflow.com/questions/47752/remove-duplicates-from-a-listt-in-c#47755) and others) is `O(N*lgN)` time and `O(1)` space so it's not so clear to me (as it was at first glance) that the sorting way is inferior (my apologies for the temporary down vote...)
|security|testing|
How to Test Web Code
|webdevelopment|
Does anyone have some good hints for writing test code for database-backend development where there is a heavy dependency on state. Specifically, I want to write tests for code that retrieve records from the database, but the answers will depend on the data in the database (which may change over time). Do people usually make a separate development system with a 'frozen' database so that any given function should always return the exact same result set? I am quite sure this is not a new issue, so I would be very interested to learn from other people's experience. Are there good articles out there that discuss this issue of web-based development in general? I usually write PHP code, but I would expect all of these issues are largely language and framework agnostic.
|webdevelopment|testing|database|
|database|testing|webdevelopment|
Does anyone have some good hints for writing test code for database-backend development where there is a heavy dependency on state? Specifically, I want to write tests for code that retrieve records from the database, but the answers will depend on the data in the database (which may change over time). Do people usually make a separate development system with a 'frozen' database so that any given function should always return the exact same result set? I am quite sure this is not a new issue, so I would be very interested to learn from other people's experience. Are there good articles out there that discuss this issue of web-based development in general? I usually write PHP code, but I would expect all of these issues are largely language and framework agnostic.
How to Test Web Code?
|database|testing|
How can I detect if a browser is blocking an popup?
|webdevelopment|
Occasionally, I've come across a webpage that tries to pop open a new window (for user input, or something important), but the popup blocker prevents this from happening. What methods can the calling window use to make sure the new window launched properly?
|untagged|
When is a file just a file?
|bestpractices|webdevelopment|
So, you're writing a web application and you have several areas of the site where the user can upload files. My basic working method for this is to store the actual file on the server, and have a database table that connects the stored filename to the record it relates to. My question is this: Should there be a different table for each "type" of file? Also, should the files be stored in context-related locations on the server, or all together? Some examples: user profile photos, job application CVs, related documents on CMS pages, etc.
I don't understand why everyone get caught up trying to make their websites fit the standard when some browsers sill have problems properly rendering standard code. I've been in web design for something like 10 years and I stopped double codding (read: hacking css), and changing stupid stuff just so I could put a button on my site. I believe that using a < div> will cause you to be invalid regardless, and it get a bit harder to do any major JavaScript/AJAX without it.
One more thing that i don't see in previos answers: In Java the primitive wrappers classes like Integer, Double, Float, Boolean... and String are suposed to be invariant, so that when you pass an instance of those classes the invoked method couldn't alter your data in any way, in oposición with most of other classes, which internal data could be altered by its public methods. So that this classes only has 'getter' methods, no 'setters', besides the constructor. In a java program String literals are stored in a separate portion of heap memory, only a instance for literal, to save memory reusing those instances
There are so many standards and they are so badly "enforced" or supported that I don't think it matters. Don't get me wrong, I think there should be standards but because they are not enforced, nobody follows them and it's a massive downward spiral.
Yes, that's possible - you can use INSERT ... ON DUPLICATE KEY UPDATE. Using your example: INSERT INTO table (id,Col1,Col2) VALUES (1,1,1),(2,2,3),(3,9,3),(4,10,12) ON DUPLICATE KEY UPDATE Col1=VALUES(Col1),Col2=VALUES(Col2);
Though I believe in striving for valid XHTML and CSS, it's often hard to do for a number of reasons. - First, some of the content could be loaded via AJAX. Sometimes, fragments are not properly inserted into the existing DOM. - The HTML that you are viewing may not have all been produced in the same document. For example, the page could be made of up components, or templates, and then thrown together right before the browser renders it. This isn't an excuse, but you can't assume that the HTML you're seeing was hand coded all at once. - What if some of the code generated by Markdown is invalid? You can't blame Stack Overflow for not producing valid code. - Lastly, the purpose of the DOCTYPE is not to simply say "Hey, I'm using valid code" but it's also to give the browser a heads up what you're trying to do so that it can at least come close to correctly parsing that information. I don't think that most developers specify a DOCTYPE and then explicitly fail to adhere to it.
For 99.999% of the sites out there, it really won't matter. The only time I've had it matter, I ran the HTML input through HTMLTidy to XHTML-ize it, and then ran my processing on it. Pretty much, it's the old programmer's axiom: trust no input.
[UNION][1] should be your friend: SELECT Column1 FROM table WHERE idColumn = 1 UNION ALL SELECT Column2 FROM table WHERE idColumn = 1 UNION ALL SELECT Column3 FROM table WHERE idColumn = 1 but it can [also be your foe][2] on large result sets. [1]: http://msdn.microsoft.com/en-us/library/ms180026.aspx [2]: http://blog.falafel.com/2006/01/20/TSQLTipAvoidUNION.aspx
We have a very similar setup to the OP. Developers develop in VM's with private DB's. [Developers will soon be committing into private branches] Testing is run on different machines ( actually in in VM's hosted on a server) [Will soon be run by Hudson CI server] Test by loading the reference dump into the db. Apply the developers schema patches then apply the developers data patches Then run unit and system tests. Production is deployed to customers as installers. What we do: We take a schema dump of our sandbox DB. Then a sql data dump. We diff that to the previous baseline. that pair of deltas is to upgrade n-1 to n. we configure the dumps and deltas. So to install version N CLEAN we run the dump into an empty db. To patch, apply the intervening patches. ( Juha mentioned Rail's idea of having a table recording the current DB version is a good one and should make installing updates less fraught. ) Deltas and dumps have to be reviewed before beta test. I can't see any way around this as I've seen developers insert test accounts into the DB for themselves.
Just an idea, but couldn't you use Regex to quickly strip out the characters and then compare against that like @Matt Hamilton suggested? Maybe even set up a view (not sure of mysql on views) that would hold all phone numbers stripped by regex to a plain phone number?
Before you head down this road towards your own eventual insanity, you should take a look at this (or one day repeat it): http://thedailywtf.com/Articles/The-Mythical-Business-Layer.aspx Persisting objects in a database is not a good idea. It kills all the good things that a database is designed to do.
Also, have a look at [Attached Events][1] and see if you can attach your event to every Page in your app. Might be easier than a custom intermediary class. [1]: http://msdn.microsoft.com/en-us/library/bb613550.aspx
[Heroku][1] - Ruby on Rails (RoR) [AppJet][2] - Javascript [CodeIDE][3] - Multi-Language [1]: http://heroku.com/ [2]: http://appjet.com/ [3]: http://www.codeide.com/
Saving Perl Windows Environment Keys UPCASES them
|perl|hash|key|env|
I have a framework written in Perl that sets a bunch of environment variables to support interprocess (typically it is sub process) communication. We keep a sets of key/value pairs in XML-ish files. We tried to make the key names camel-case somethingLikeThis. This all works well. Recently we have had occasion to pass control (chain) processes from Windows to UNIX. When we spit out the %ENV hash to a file from Windows the somethingLikeThis key becomes SOMETHINGLIKETHIS. When the Unix process picks up the file and reloads the environment and looks up the value of $ENV{somethingLikeThis} it does not exist since UNIX is case sensitive (from the Windows side the same code works fine). We have since gone back and changed all the keys to UPPERCASE and solved the problem, but that was tedious and caused pain to the users. Is there a way to make Perl on Windows preserve the character case of the keys of the environment hash? -Jeff
- Any personal experience in overcoming web application performance hurdles? - Any recommended strategies for improving the performance of a data-driven web application? My development team works on a web application (JSP reports, HTML, JavaScript) that uses an Oracle database (PL/SQL). The key functionality the application delivers is in reporting, where a user can get PDFs of reports at a high level and drill down to lower levels of supporting details. As the number of supporting detail records has grown into the millions, the performance of the system has significantly degraded. Based on our current analysis of the metrics, the bottleneck seems to be in the logic hitting the DB and the DB performance. Changing the DB model and re-doing some of the server side logic is currently being explored. Partioning, indexing, explain plans, and running statistics are things that have been done on the DB side to try to help improve performance. While they've helped, they haven't solved the issue satisfactorily. The toughest part in analyzing performance data is that the database and web servers are remotely administered by a different part of the IT organization, so the developers don't have regular, full access to see what's going on (especially in the production environment, which is not mirrored exactly in any other development/testing environment).
[ASP.NET ERROR] The request was aborted: Could not create SSL/TLS secure channel.
|asp.net|https|web-application|
I'm posting this on behalf of a co-worker. He gets a "The request was aborted: Could not create SSL/TLS secure channel" error while using a WebRequest object to make an HTTPS request. Th funny thing is that this only happens after a while, and is temporarily fixed when the application is restarted, which suggests that something is being filled to capacity or something. Has anyone seen this kind of thing before?
|asp.net|web-applications|https|
ASP.Net: why is my button's click/command events not binding in a repeater?
|asp.net|vb.net|.net-2.0|repeater|button|
Here's the code from the ascx that has the repeater: <asp:Repeater ID="ListOfEmails" runat="server" > <HeaderTemplate><h3>A sub-header:</h3></HeaderTemplate> <ItemTemplate> [Some other stuff is here] <asp:Button ID="removeEmail" runat="server" Text="X" ToolTip="remove" /> </ItemTemplate> </asp:Repeater> And in the codebehind for the repeater's databound and events: Protected Sub ListOfEmails_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles ListOfEmails.ItemDataBound If (e.Item.ItemType = ListItemType.Item) Or (e.Item.ItemType = ListItemType.AlternatingItem) Then Dim removeEmail As Button = CType(e.Item.FindControl("removeEmail"), Button) removeEmail.CommandArgument = e.Item.ItemIndex.ToString() AddHandler removeEmail.Click, AddressOf removeEmail_Click AddHandler removeEmail.Command, AddressOf removeEmail_Command End If End Sub Sub removeEmail_Click(ByVal sender As Object, ByVal e As System.EventArgs) Response.Write("<h1>click</h1>") End Sub Sub removeEmail_Command(ByVal sender As Object, ByVal e As CommandEventArgs) Response.Write("<h1>command</h1>") End Sub Neither the click or command is getting called, what am I doing wrong?
|user-controls|drag-and-drop|vb|
I need to create a quick-n-dirty knob control in Visual Basic 2005 Express, the value of which is incremented/decremented by "grabbing" it with the mouse and moving the cursor up/down. Because the knob itself doesn't move, I need to keep tracking the mouse movement outside of the rectangle of the control. I use a Label with an ImageList to implement this (I have a list of 127 bitmaps representing the knob in various positions). Which events should I react to?
listing items and displaying the data on one of the items.
|asp.net|3.5|
I use asp.net 3.5 and have also begun looking at 3.5 sp1 I like the clean urls that mvc tends to have but use asp.net webforms for my primary development. I normally use a url rewriter in order to accomplish this type stuff. When I say clean urls I mean like /products to get a list of products and /products/Product_One to look at the info about product called Product_One. I've used this on sites where the listing is on one page and when you pick the item it goes to a different page that shows the info about the item selected. but I also like the way that the update panel works and changing stuff on screen with out flashing the screen. When I do this I tend to have a list on the left with the different items that are selectable and then have on the left the data about the selected item, then I use an update panel so that when the item on the left is selected it's data shows up on the left without flashing. I need opinions on what you all think of the two different methods of displaying a list and seeing the item that is selected's data? What do you all do? Is there another way of doing this? Is it possible to combine the update panel method and the nice urls? (i.e. change the url to match the url that would get you to the current displayed data even though the update panel was used, and add to the history the new clean url for the current page)
Listing Items and Displaying Data Inline
|asp.net|.net-3.5|
I use asp.net 3.5 and have also begun looking at 3.5 sp1 I like the clean urls that mvc tends to have but use asp.net webforms for my primary development. I normally use a url rewriter in order to accomplish this type stuff. When I say clean urls I mean like /products to get a list of products and /products/Product_One to look at the info about product called Product_One. I've used this on sites where the listing is on one page and when you pick the item it goes to a different page that shows the info about the item selected. but I also like the way that the update panel works and changing stuff on screen with out flashing the screen. When I do this I tend to have a list on the left with the different items that are selectable and then have on the left the data about the selected item, then I use an update panel so that when the item on the left is selected it's data shows up on the left without flashing. I need opinions on what you all think of the two different methods of displaying a list and seeing the item that is selected's data. 1) Which is better in your opinion? 2) What do you all do to display a list and show the data on one of the items? 3) Is there another way of doing this? 4) Is it possible to combine the update panel method and the nice urls? (i.e. change the url to match the url that would get you to the current displayed data even though the update panel was used, and add to the history the new clean url for the current page)
I would go with your first solution. This allows the user to focus on entering their credit card details. You can then transfer them to another webpage which asks or provides them further information relating to the Google Map.
If you have a fixed set of columns and you know what they are, you can basically do a series of subselects `(SELECT Column1 AS ResultA FROM TableA) as R1` and join the subselects. All this in a single query.
while I agree with the sentiment of "if it renders fine then don't worry about it" statement, however it's good for follow a standard, even though it may not be fully supported right now. you can still use Table for layout, but it's not good for a reason.
NetBeans is definitely recommended if you like IDEs. It has a lot of [Ruby features](http://www.netbeans.org/features/ruby/index.html) and there's a [Ruby only](http://download.netbeans.org/netbeans/6.1/final/) download.
i can be wrong because i'm autodidact, but i NEVER user public properties in my Java clases, they are allways private or protected, so that outside code must access by getters/setters. it's better for mainteance / modification purposes. And for inside class code... if getter method is trivial i use the property directly, but i allways use the setter methods because i could easily add code to fire events if i wish
Block user access to internals of a site using HTTP_REFERER
|security|apache|mod-rewrite|http-referer|