instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
Anyone know how to get the position of a node using XPath? Say I have the following xml: <a> <b>zyx</b> <b>wvu</b> <b>tsr</b> <b>qpo</b> </a> I can use the following xpath query to select the third <b> node (<b>tsr</b>): a/b[.='tsr'] Which is all well and good but I want to return the ordinal position...
In XPath 1.0, there's no direct way to get the position of a node using an expression like `position()`. However, you can achieve your goal by using the `preceding-sibling` axis. Your approach is correct! You can count the number of preceding sibling nodes to determine the position of the desired node. Here's how you ...
34,073
[ { "from": "human", "value": "Anyone know how to get the position of a node using XPath?\nSay I have the following xml:\n<a>\n <b>zyx</b>\n <b>wvu</b>\n <b>tsr</b>\n <b>qpo</b>\n</a>\n\nI can use the following xpath query to select the third <b> node (<b>tsr</b>):\na/b[.='tsr']\n\nWhich is all we...
It doesn't look like basic javascript but nor can I use JQuery commands like $('myId'). Is this or similar functions documented anywhere? For reason I don't want to go into, I am not able to use 3rd party libraries like JQuery but if some powerful javascript extensions come with asp then I would like to know about them...
It sounds like you might be working in an environment or framework that offers its own JavaScript extensions or utilities. While you have mentioned ASP (Active Server Pages), it is not typically associated with any built-in JavaScript libraries or frameworks; rather, it runs on the server side. However, if you are usin...
35,194
[ { "from": "human", "value": "It doesn't look like basic javascript but nor can I use JQuery commands like $('myId'). Is this or similar functions documented anywhere?\nFor reason I don't want to go into, I am not able to use 3rd party libraries like JQuery but if some powerful javascript extensions come wit...
What new features in java 7 is going to be implemented? And what are they doing now?
Java 7, officially released in July 2011, introduced several new features and enhancements to the Java programming language and its ecosystem. Here are some of the key features included in Java 7: ### New Features in Java 7 1. **Project Coin**: A collection of small language changes aimed at improving productivity an...
28,383
[ { "from": "human", "value": "What new features in java 7 is going to be implemented?\nAnd what are they doing now?\n" }, { "from": "gpt", "value": "Java 7, officially released in July 2011, introduced several new features and enhancements to the Java programming language and its ecosystem. Here ...
I've been playing with Seam (2.0.2.SP1) for a few weeks, and I have most of the basics nailed down, but I haven't come up with a decent solution to the following. Suppose I have a form at /foo.xhtml, with a rewrite rule such that URLs like /foo.seam?id=<fooId> are converted to /foo/<fooId>. There's a commandButton on ...
In Seam, the behavior you're encountering is common when working with form submissions and validation. By default, if validation errors occur, the framework stays on the same page and does not trigger any navigation rules. However, you can implement a strategy to handle validation errors and redirect appropriately. On...
30,976
[ { "from": "human", "value": "I've been playing with Seam (2.0.2.SP1) for a few weeks, and I have most of the basics nailed down, but I haven't come up with a decent solution to the following.\nSuppose I have a form at /foo.xhtml, with a rewrite rule such that URLs like /foo.seam?id=<fooId> are converted to ...
I’m writing a test that expects to receive an event from an object that it is calling. Specifically, I am calling out to an object that connects to an AIX machine via SSH (using the open source Granados project), then disconnecting, and I want to make sure I receive the OnConnectionClosed event that is being raised dur...
It sounds like you are encountering a classic issue with threading in unit tests, particularly when dealing with events that are raised on different threads. The behavior you're experiencing—where the test passes in debug mode but fails when run normally—is a common symptom of timing issues related to how the events ar...
31,607
[ { "from": "human", "value": "I’m writing a test that expects to receive an event from an object that it is calling. Specifically, I am calling out to an object that connects to an AIX machine via SSH (using the open source Granados project), then disconnecting, and I want to make sure I receive the OnConnec...
Is there a better way to do this? string[] s = {"zero", "one", "two", "three", "four", "five"}; var x = s .Select((a,i) => new {Value = a, Index = i}) .Where(b => b.Value.StartsWith("t")) .Select(c => c.Index); i.e. I'm looking for a more efficient or more elegant way to get the positions of the items matching the c...
Yes, there is a more concise and potentially more efficient way to achieve this in C#. Instead of using multiple LINQ operations, you can combine the filtering and indexing in a single `Select` operation, which can reduce overhead. Here’s how you can do it: ```csharp string[] s = { "zero", "one", "two", "three", "four...
35,558
[ { "from": "human", "value": "Is there a better way to do this?\nstring[] s = {\"zero\", \"one\", \"two\", \"three\", \"four\", \"five\"};\n\nvar x = \ns\n.Select((a,i) => new {Value = a, Index = i})\n.Where(b => b.Value.StartsWith(\"t\"))\n.Select(c => c.Index);\n\ni.e. I'm looking for a more efficient or m...
I am trying to detect Blackberry user agents in my app, which works fine in my development version. But nothing happens when I redeploy the app in production. application_helper.rb def blackberry_user_agent? request.env["HTTP_USER_AGENT"] && request.env["HTTP_USER_AGENT"][/(Blackberry)/] end application.html.e...
It sounds like you are experiencing an issue where the `HTTP_USER_AGENT` is not being set correctly in your production environment with Nginx and Mongrel. Here are a few things you can check and try to troubleshoot and resolve the issue: ### 1. Check Nginx Configuration Ensure that your Nginx configuration is properl...
32,296
[ { "from": "human", "value": "I am trying to detect Blackberry user agents in my app, which works fine in my development version. But nothing happens when I redeploy the app in production.\napplication_helper.rb\n def blackberry_user_agent?\n request.env[\"HTTP_USER_AGENT\"] && request.env[\"HTTP_USER_AG...
Installed Tomcat 6 on WinXP 64. It installed just fine. But when I try to launch it ( from Windows Services) I get the following error : "Can not start an the Apache Tomcat Service on Local computer." error 216:0xd8
The error code "216:0xd8" indicates that there is a problem with the service you are trying to start, which could be due to several reasons. Here are some steps you can follow to troubleshoot and resolve the issue with Apache Tomcat 6 on Windows XP 64-bit: ### 1. Check Java Installation Make sure that you have the cor...
31,408
[ { "from": "human", "value": "Installed Tomcat 6 on WinXP 64. It installed just fine. But when I try to launch it ( from Windows Services) I get the following error : \n\"Can not start an the Apache Tomcat Service on Local computer.\"\n error 216:0xd8\n" }, { "from": "gpt", "value": "The error co...
SQL Server 2008 has new geo data types. One thing I am wondering though is that if I have a table with geocoded addresses in it, can I write a query to display all records within a certain distance. For example, many websites have the option to search for items within a certain distance such as 50 miles and would like ...
Yes, SQL Server 2008 introduced the `geometry` and `geography` data types which allow you to store and manipulate spatial data. If you have a table with geocoded addresses and want to find all records within a certain distance from a specified point, you can indeed do this using the `geography` type. Here’s how you ca...
31,423
[ { "from": "human", "value": "SQL Server 2008 has new geo data types. One thing I am wondering though is that if I have a table with geocoded addresses in it, can I write a query to display all records within a certain distance. For example, many websites have the option to search for items within a certain ...
Is there a way to copy an entire directory to the output directory in a console application in C#.NET? I know for files you can right click them, properties and mark copy to output directory. But I'm not going to do that for 20.000 files... Thx, Lieven Cardoen aka Johlero
Yes, you can copy an entire directory (including all its contents) to the output directory in a C# console application by modifying your project file (`.csproj`). You can do this without having to manually set properties for each individual file. Here's how you can set this up: 1. **Edit the `.csproj` file**: Open...
32,969
[ { "from": "human", "value": "Is there a way to copy an entire directory to the output directory in a console application in C#.NET?\nI know for files you can right click them, properties and mark copy to output directory. But I'm not going to do that for 20.000 files...\nThx, Lieven Cardoen aka Johlero\n" ...
In my java application, I need to create a comment box for the users to add comments. Moreover, I need to provide the user with the provision for resizing and dragging the comment box. For this, I need to show a boundary around the comment box as in the case of comment box in Microsoft Excel which I have shown below: ...
Creating a resizable and draggable comment box in a Java application can be accomplished using Java Swing. You can use a `JPanel` to create the comment box and then draw the dotted boundary around it. To allow users to resize and drag the comment box, you can handle mouse events. Here's a step-by-step approach to achi...
28,658
[ { "from": "human", "value": "In my java application, I need to create a comment box for the users to add comments. Moreover, I need to provide the user with the provision for resizing and dragging the comment box. For this, I need to show a boundary around the comment box as in the case of comment box in Mi...
I have a solution with many projects. There is actually a Core project and a few plugins. I changed OutputPath for all plugins so all binaries end up in the Core bin\debug folder. (this is necessary as the Core do not have a reference on plugins, hence it does not "include" plugins binaries when it is compiled.) So bas...
This issue appears to be related to how Visual Studio interprets relative paths for the output directories of your projects. When you set the `OutputPath` for your plugins to `..\Core\bin\debug`, Visual Studio may be resolving that relative path based on the location of the solution file, which leads to the creation of...
34,851
[ { "from": "human", "value": "I have a solution with many projects. There is actually a Core project and a few plugins. I changed OutputPath for all plugins so all binaries end up in the Core bin\\debug folder. (this is necessary as the Core do not have a reference on plugins, hence it does not \"include\" p...
I've just started with opengl but I ran into some strange behaviour. Below I posted code that runs well in xp but on vista it renders just black screen. Sorry for posting unusally (as for this board) long code. Is there something very specific to open gl in vista? Thanks. #include<windows.h> #include<gl\gl.h> #include<...
It seems you're encountering an issue with rendering in OpenGL when moving from Windows XP to Windows Vista. Here are a few potential reasons and suggestions to troubleshoot and resolve the issue. ### 1. **OpenGL Context Creation** Make sure that you are checking for errors when creating the OpenGL context. You shoul...
32,194
[ { "from": "human", "value": "I've just started with opengl but I ran into some strange behaviour.\nBelow I posted code that runs well in xp but on vista it renders just black screen.\nSorry for posting unusally (as for this board) long code.\nIs there something very specific to open gl in vista? Thanks.\n#i...
This has got to be something I just missed, but how do I add a tool tip to a label? I saw something on the web about handling the mouse hover event, but how would I even handle it in code?
Adding a tooltip to a label can vary depending on the technology or framework you are using (for example, Windows Forms, WPF, HTML/CSS/JavaScript, etc.). Since you didn’t specify, I’ll provide examples for two common scenarios: Windows Forms and WPF in C#. ### Windows Forms In Windows Forms, you can use the `ToolTip`...
33,630
[ { "from": "human", "value": "This has got to be something I just missed, but how do I add a tool tip to a label?\nI saw something on the web about handling the mouse hover event, but how would I even handle it in code?\n" }, { "from": "gpt", "value": "Adding a tooltip to a label can vary dependi...
After searching online, the best solution I've found so far is to just make a symbolic link in either "/Library/logs/" or "~/Library/logs/" to get it to show up in the Console application. I'm wondering if it would be possible to add a new directory or log file to the "root" level directly under the "LOG FILES" section...
To add a new directory or log file that appears in the "LOG FILES" section of the Console application on macOS, you typically have to place your log files in specific system-defined locations or use existing logging frameworks that integrate with macOS's unified logging system. Here’s a general approach to achieve that...
25,466
[ { "from": "human", "value": "After searching online, the best solution I've found so far is to just make a symbolic link in either \"/Library/logs/\" or \"~/Library/logs/\" to get it to show up in the Console application.\nI'm wondering if it would be possible to add a new directory or log file to the \"roo...
When I create a TFS report of a query with the Excel integration features (we are using Excel 2003), Excel resets formatting of all cells after clicking the "Refresh" button in the TFS Toolbar. Our team likes to print this report and drag it into our weekly meeting as it accurately lists all our open tasks. Bad formatt...
It sounds like you're encountering a common issue with the TFS (Team Foundation Server) Excel integration, especially with the older Excel 2003 version. When refreshing data, Excel can reset cell formatting, which can be frustrating for users who want to maintain their custom styles for reporting purposes. Here are a f...
34,692
[ { "from": "human", "value": "When I create a TFS report of a query with the Excel integration features (we are using Excel 2003), Excel resets formatting of all cells after clicking the \"Refresh\" button in the TFS Toolbar.\nOur team likes to print this report and drag it into our weekly meeting as it accu...
In C# I sometimes wish I could make special methods for certain "instantiations" of generic classes. UPDATE: The following code is just a dumb example of a more abstract problem - don't focus too much on time series, just the principles of "adding extra methods" for certain T. Example: class Timeseries<T> { ... ...
It sounds like you're looking for a way to extend a generic class with additional methods that apply only to a specific type, specifically `double` in your case, while still benefiting from the features of generics and maintaining object-oriented design principles. Here are a few potential approaches you can consider: ...
34,211
[ { "from": "human", "value": "In C# I sometimes wish I could make special methods for certain \"instantiations\" of generic classes.\nUPDATE: The following code is just a dumb example of a more abstract problem - don't focus too much on time series, just the principles of \"adding extra methods\" for certain...
I am using a machine on which I do not have root access and would like to access files on a Samba server in random access mode. I know I can transfer the files in their entirety using smbclient but the files are very large (>1GB) and I would rather just treat them as remote files on which I can do random access. The pr...
Yes, you can achieve random access to files on a Samba server without needing root access or mounting the Samba shares. One way to do this is to use `smbclient` in conjunction with the `smbget` command or similar user-level tools that provide random access capabilities. Here's how you can work around the limitation: #...
33,025
[ { "from": "human", "value": "I am using a machine on which I do not have root access and would like to access files on a Samba server in random access mode. I know I can transfer the files in their entirety using smbclient but the files are very large (>1GB) and I would rather just treat them as remote file...
Is it possible to develop custom PLAF themes for Swing? I would appreciate constructive suggestions in this topic Thanks
Yes, it is indeed possible to develop custom PLAF (Look and Feel) themes for Swing in Java. Swing's architecture allows you to create custom Look and Feel implementations or modify existing ones. Here are some constructive suggestions to help you get started on developing custom PLAF themes for Swing: ### 1. Understan...
31,917
[ { "from": "human", "value": "Is it possible to develop custom PLAF themes for Swing?\nI would appreciate constructive suggestions in this topic\nThanks\n" }, { "from": "gpt", "value": "Yes, it is indeed possible to develop custom PLAF (Look and Feel) themes for Swing in Java. Swing's architectur...
Pretty much what the title says. Is there a way to add files to a vsnet project from inside Vim? I work in a group of devs, and all of our code has solutions and projects as you would expect. I would like to use Vim, and was hoping for a way to maintain those project files when I added or removed files without having t...
Yes, you can manage Visual Studio project files from Vim with a bit of scripting and manual adjustments. While Vim itself doesn't provide built-in support for modifying Visual Studio project files directly, you can automate some tasks with command line utilities or scripts. Here’s a way you can approach adding or remov...
31,563
[ { "from": "human", "value": "Pretty much what the title says. Is there a way to add files to a vsnet project from inside Vim? I work in a group of devs, and all of our code has solutions and projects as you would expect. I would like to use Vim, and was hoping for a way to maintain those project files when ...
An existing Java site is designed to run under "/" on tomcat and there are many specific references to fixed absolute paths like "/dir/dir/page". Want to migrate this to Java EE packaging, where the site will need to run under a context-root e.g. "/dir/dir/page" becomes "/my-context-root/dir/dir/page" Now, the context-...
Migrating a large code base to accommodate a new context root while minimizing changes can be challenging, especially when it involves many hardcoded URLs in HTML and Java code. Here are some alternative approaches and strategies you might consider: 1. **Use a URL Rewriting Tool**: Rather than implementing a custom se...
24,382
[ { "from": "human", "value": "An existing Java site is designed to run under \"/\" on tomcat and there are many specific references to fixed absolute paths like \"/dir/dir/page\".\nWant to migrate this to Java EE packaging, where the site will need to run under a context-root e.g. \"/dir/dir/page\" becomes \...
My application uses an event tap to capture keyboard events, and I'd like to know which device (i.e. which keyboard) each event comes from. Is there an sort of device-identifying information along with the CGEvent that a tap gets? I've looked at NSEvent's methods, and the various CGEventField keys, but none of them see...
When using the event tap in macOS to capture keyboard events, it's true that CGEvents do not directly provide device-identifying information such as which specific keyboard generated the event. The standard event fields do not include a unique identifier for the device. However, you can use a workaround to distinguish...
31,936
[ { "from": "human", "value": "My application uses an event tap to capture keyboard events, and I'd like to know which device (i.e. which keyboard) each event comes from. Is there an sort of device-identifying information along with the CGEvent that a tap gets? I've looked at NSEvent's methods, and the variou...
I display flash objects by pointing the Movie and Src params, as well as the embed-tag's src attribute to an HttpHandler with a filename as QueryString. <OBJECT codeBase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7.0.19.0" classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width="468"...
The issue you're experiencing when upgrading from Flash Player 9 to Flash Player 10 likely stems from security changes introduced in Flash Player 10, particularly around how Flash handles loading content from different locations and how it deals with HTTP requests for SWF files. Here are some considerations and potent...
33,054
[ { "from": "human", "value": "I display flash objects by pointing the Movie and Src params, as well as the embed-tag's src attribute to an HttpHandler with a filename as QueryString.\n<OBJECT codeBase=\"https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7.0.19.0\" classid=clsid:D27C...
In particular what strengths does it have over caching features of Asp.net
When comparing the caching features of ASP.NET with those of other frameworks or technologies, several strengths of ASP.NET's caching mechanisms can be highlighted. Below are some of the strengths that ASP.NET offers: 1. **Built-in Caching Mechanisms**: ASP.NET provides several built-in caching options, such as: - ...
29,541
[ { "from": "human", "value": "In particular what strengths does it have over caching features of Asp.net\n" }, { "from": "gpt", "value": "When comparing the caching features of ASP.NET with those of other frameworks or technologies, several strengths of ASP.NET's caching mechanisms can be highlig...
I've got an application that's using string.compare(string,string) to sort some values. The thing I can't figure out is why "1022" compares as less than "10-23" and "10-23" compares as less than "1024". Is there something specific to the value of "-" that causes this result? Will that overload of string.compare give ...
The behavior you are observing when using `string.Compare` to sort the values "1022", "10-23", and "1024" can be explained by understanding how string comparison works in programming, particularly in C#. ### String Comparison Basics 1. **Lexicographical Comparison**: String comparison is performed lexicographically, ...
31,348
[ { "from": "human", "value": "I've got an application that's using string.compare(string,string) to sort some values. The thing I can't figure out is why \"1022\" compares as less than \"10-23\" and \"10-23\" compares as less than \"1024\".\nIs there something specific to the value of \"-\" that causes this...
Is it possible to disable the options dialog box for a .net console application? Or somehow keep the user from changing the console properties?
In a .NET console application, you don't have direct control over the console window's properties or the ability to completely disable the options dialog box (like the one that allows users to change the font, color, or layout of the console). However, there are some strategies you can employ to limit user modification...
30,436
[ { "from": "human", "value": "Is it possible to disable the options dialog box for a .net console application? Or somehow keep the user from changing the console properties?\n" }, { "from": "gpt", "value": "In a .NET console application, you don't have direct control over the console window's pr...
Possible Duplicate: How can I register a global hot key to say CTRL+SHIFT+(LETTER) using WPF and .NET 3.5? I'd like to have multiple global hotkeys in my new app (to control the app from anywhere in windows), and all of the given sources/solutions I found on the web seem to provide with a sort of a limping solution ...
To implement global hotkeys in a WPF application, you can use the Windows API. Below is a step-by-step guide that demonstrates how to register multiple global hotkeys in a WPF app without creating annoying delays. ### Step 1: Import Required Namespaces Add the following namespaces to your code file: ```csharp using ...
5,924
[ { "from": "human", "value": "\nPossible Duplicate:\nHow can I register a global hot key to say CTRL+SHIFT+(LETTER) using WPF and .NET 3.5? \n\nI'd like to have multiple global hotkeys in my new app (to control the app from anywhere in windows), and all of the given sources/solutions I found on the web seem ...
In MSBuild, I would like to call a task that extracts all the files in all the project in a specific solution and hold these files in a property that can be passed around to other tasks (for processing etc.) I was thinking something along the lines of: <ParseSolutionFile SolutionFile="$(TheSolutionFile)"> <Output Tas...
In MSBuild, there isn't a built-in task specifically designed to parse a solution file and extract all the project files directly. You'll need to create a custom MSBuild task to achieve this functionality. ### Custom Task Creation To create your own MSBuild task to parse the solution file and extract all project file...
30,894
[ { "from": "human", "value": "In MSBuild, I would like to call a task that extracts all the files in all the project in a specific solution and hold these files in a property that can be passed around to other tasks (for processing etc.)\nI was thinking something along the lines of:\n<ParseSolutionFile Solut...
Hopefully this won't be taken as asking the same question twice... So I'm working on a Flash website (in AS2) which has an outer index swf which loads sub swf files using loadMovie("subfoo1.swf", placeToShowSwf). These in turn load an xml file which tells it what content to load. Everything works peachy, but we'd like ...
You're on the right track with both of your proposed solutions, and they reflect a common challenge when working with ActionScript 2 and loading SWF files. Here are some detailed suggestions for implementing both solutions: ### Solution 1: Using a Constructor-like Approach While SWF files don't have constructors in th...
29,021
[ { "from": "human", "value": "Hopefully this won't be taken as asking the same question twice...\nSo I'm working on a Flash website (in AS2) which has an outer index swf which loads sub swf files using loadMovie(\"subfoo1.swf\", placeToShowSwf). These in turn load an xml file which tells it what content to l...
Why are inline closures so rarely used in Actionscript? They are very powerful and I think quite readable. I hardly ever see anyone using them so maybe I'm just looking at the wrong code. Google uses them in their Google Maps API for Flash samples, but I think thats the only place I've seen them. I favor them because y...
Inline closures (also known as anonymous functions or lambdas) are indeed a powerful feature in ActionScript 3 (AS3) that allow you to define functions without having to give them a name. They can capture the local scope, making them handy for callbacks, event handlers, or any situation where you want to encapsulate fu...
28,038
[ { "from": "human", "value": "Why are inline closures so rarely used in Actionscript? They are very powerful and I think quite readable. I hardly ever see anyone using them so maybe I'm just looking at the wrong code. Google uses them in their Google Maps API for Flash samples, but I think thats the only pla...
I have the following regex that does a great job matching urls: ((https?|ftp|gopher|telnet|file|notes|ms-help):((//)|(\\\\))+[\w\d:#@%/;$()~_?\+-=\\\.&]*)` However, it does not handle urls without a prefix, ie. stackoverflow.com or www.google.com do not match. Anyone know how I can modify this regex to not care if t...
To modify your regex to match both complete URLs (with a protocol) and bare domain names (without a protocol), you can adjust your regex to allow for optional prefixes while still enforcing some structure on the domain part. Here’s an updated regex pattern that should work for your requirements: ```regex ((https?|ftp...
35,255
[ { "from": "human", "value": "I have the following regex that does a great job matching urls: \n((https?|ftp|gopher|telnet|file|notes|ms-help):((//)|(\\\\\\\\))+[\\w\\d:#@%/;$()~_?\\+-=\\\\\\.&]*)`\n\nHowever, it does not handle urls without a prefix, ie. stackoverflow.com or www.google.com do not match. An...
I'm putting a crontab job for updating with apt-get once a day (running Debian Lenny, there are updates almost daily). But almost all examples i've seen of this cron job invoke the -d flag. This elicits 4 questions: Why should I only download the packages and not install them? Doesn't this defeat the purpose of runni...
Great questions! Let's go through each of them. 1. **Why should I only download the packages and not install them?** The `-d` flag in `apt-get` tells the system to download the packages without actually installing them. The main reason to do this is to ensure that you can review the updates before they are applied...
34,682
[ { "from": "human", "value": "I'm putting a crontab job for updating with apt-get once a day (running Debian Lenny, there are updates almost daily). But almost all examples i've seen of this cron job invoke the -d flag. \nThis elicits 4 questions:\n\nWhy should I only download the\npackages and not install t...
i get the following error when trying to run a flex application (which has been working fine!). I was playing around with some different setttings trying to optimize the compiled size. I've put these settings back to the defaults as much as I thought but still getting issues. I remember getting this error before but ca...
The `VerifyError: Error #1014: Class IAutomationObject could not be found` error in a Flex application usually indicates that there is a missing class or that the class loader is unable to find the required classes at runtime. This can happen for various reasons, particularly after making changes to the application set...
34,871
[ { "from": "human", "value": "i get the following error when trying to run a flex application (which has been working fine!). I was playing around with some different setttings trying to optimize the compiled size. I've put these settings back to the defaults as much as I thought but still getting issues.\nI...
I have an MFC application that uses several MFC extension DLL's. I want this app (and several other similar apps) to be able to access some parts of the .net framework. I wrote a C# library to do the .net work I want and was hoping to be able to write an MFC dll to hide all the C++/CLI code from my apps. The apps would...
When working with MFC applications and attempting to use C++/CLI as a bridge to .NET libraries, there are a few potential pitfalls that could lead to crashes, especially when the managed/unmanaged boundary is involved. Below are some common causes and troubleshooting steps that you can take to diagnose and fix the issu...
31,821
[ { "from": "human", "value": "I have an MFC application that uses several MFC extension DLL's. I want this app (and several other similar apps) to be able to access some parts of the .net framework. I wrote a C# library to do the .net work I want and was hoping to be able to write an MFC dll to hide all the ...
Does anyone have any experience of developing external tools for SSMS 2005. Ideally I would like to be able to interact with the query windows directly, for example, taking the query text from the window to perform some processing on it. Any pointers in the right direction would be great. Thanks in advance
Developing external tools for SQL Server Management Studio (SSMS) 2005 can be a bit challenging because of its limited extensibility compared to later versions. However, you can leverage the Visual Studio integration and the Visual Studio SDK to create add-ins that can interact with SSMS. Below are some pointers to get...
34,418
[ { "from": "human", "value": "Does anyone have any experience of developing external tools for SSMS 2005. \nIdeally I would like to be able to interact with the query windows directly, for example, taking the query text from the window to perform some processing on it.\nAny pointers in the right direction w...
I have successfully been able to rename a table and drop all constraints on that table with foreign key relationships and build they all back up. However, now I am at a point where the PK_tblFoo exists in more than one place (when I transfer the table to another DB). Renaming the table does not rename the primary key. ...
Renaming a primary key constraint in SQL can depend on the specific database system you're using. However, in most relational database management systems (RDBMS), there isn't a direct way to "cascade" rename a primary key constraint when you rename a table. You'll need to rename the primary key constraint manually. Bel...
33,738
[ { "from": "human", "value": "I have successfully been able to rename a table and drop all constraints on that table with foreign key relationships and build they all back up. However, now I am at a point where the PK_tblFoo exists in more than one place (when I transfer the table to another DB). Renaming th...
I'm writing tests for a business method that invokes some DAO classes to perform operations over a database. This method, firstly retrieves a JDBC connection from a DataSource object, The same connection is passed to all DAO instances, so I can use it to control the transaction. So, if everything works properly, I must...
To test whether `commit()` is invoked on a JDBC `Connection` object in a scenario like yours, you can use JMock in combination with some design strategies. Since the `Connection` object isn't directly accessible from your business method, you can use dependency injection or a wrapper to enable easier testing. ### Sugg...
30,481
[ { "from": "human", "value": "I'm writing tests for a business method that invokes some DAO classes to perform operations over a database.\nThis method, firstly retrieves a JDBC connection from a DataSource object, The same connection is passed to all DAO instances, so I can use it to control the transaction...
I'm looking for a method to obtain the current logged in user's full Active Direcory LDAP path. e.g. LDAP://CN=john.smith,OU=UK,OU=Sales,DC=Company,DC=local
To obtain the full Active Directory LDAP path of the currently logged-in user, you can use PowerShell, which has built-in support for querying Active Directory. Here’s a straightforward method to get the LDAP path: 1. **Open PowerShell**: You can do this by searching for "PowerShell" in the Start menu. 2. **Run the ...
33,687
[ { "from": "human", "value": "I'm looking for a method to obtain the current logged in user's full Active Direcory LDAP path. e.g. \nLDAP://CN=john.smith,OU=UK,OU=Sales,DC=Company,DC=local\n\n" }, { "from": "gpt", "value": "To obtain the full Active Directory LDAP path of the currently logged-in ...
I have this bit of script to widen a text box on mouseover and shorten it on mouseoff. The problem I am having is that Internet Explorer doesn't seem to extend it's hover over the options of a select box. This means in IE I can click the select, have the options drop down, but if I try to select one, they vanish and th...
The behavior you're encountering in Internet Explorer is due to the fact that the select element's dropdown (when opened) is considered a separate control. This means that moving your mouse to select an option effectively takes it off the select element itself, causing the mouseout event to trigger. To work around thi...
29,958
[ { "from": "human", "value": "I have this bit of script to widen a text box on mouseover and shorten it on mouseoff.\nThe problem I am having is that Internet Explorer doesn't seem to extend it's hover over the options of a select box.\nThis means in IE I can click the select, have the options drop down, but...
I have a CListCtrl object in my C++ MFC app for Windows Mobile 6. When I call listctrl.GetNextItem(0, LVNI_ABOVE) I should therefore get back -1 (no item above first item), but if (and only if) the list has exactly one item, the call returns 0, even though MSDN says "The specified item itself is excluded from the searc...
The behavior you're experiencing with `CListCtrl::GetNextItem` returning `0` when there is exactly one item in the list control is indeed a bit counterintuitive and can be seen as a bug or an inconsistency in the implementation of the control in certain versions of the MFC (Microsoft Foundation Classes) libraries, part...
35,569
[ { "from": "human", "value": "I have a CListCtrl object in my C++ MFC app for Windows Mobile 6. When I call listctrl.GetNextItem(0, LVNI_ABOVE) I should therefore get back -1 (no item above first item), but if (and only if) the list has exactly one item, the call returns 0, even though MSDN says \"The specif...
I have a Zend Framework application structure as below: /application /library /Zend /Core /Filter /MyFilter.php /Validator /MyValidator.php I would like to put custom filters and validators in their respective folders and have them loaded automatically when used. However...
To accomplish the automatic loading of custom filters and validators in your Zend Framework application, you can make use of the `Zend_Loader` class along with a naming convention and autoloading feature provided by Zend Framework. This will ensure that your custom classes are loaded when referenced without needing to ...
29,677
[ { "from": "human", "value": "I have a Zend Framework application structure as below:\n/application\n/library\n /Zend\n /Core\n /Filter\n /MyFilter.php\n /Validator\n /MyValidator.php\n\nI would like to put custom filters and validators in their respective folders an...
Can anyone explain why following code won't compile? At least on g++ 4.2.4. And more interesting, why it will compile when I cast MEMBER to int? #include <vector> class Foo { public: static const int MEMBER = 1; }; int main(){ vector<int> v; v.push_back( Foo::MEMBER ); // undefined referen...
The issue you're encountering is related to how the C++ standard handles `static const` member variables in classes and how your specific compiler (g++ 4.2.4) resolves them. ### Understanding the Problem 1. **Static Const Member**: In C++, a `static const` integer member inside a class is treated differently from a r...
34,415
[ { "from": "human", "value": "Can anyone explain why following code won't compile? At least on g++ 4.2.4.\nAnd more interesting, why it will compile when I cast MEMBER to int?\n#include <vector>\n\nclass Foo { \npublic: \n static const int MEMBER = 1; \n};\n\nint main(){ \n vector<int> v; \n v....
Recently our company has started measuring the cyclomatic complexity (CC) of the functions in our code on a weekly basis, and reporting which functions have improved or worsened. So we have started paying a lot more attention to the CC of functions. I've read that CC could be informally calculated as 1 + the number of...
Let's analyze the cyclomatic complexity (CC) of each of the code fragments you provided, using the informal calculation method you mentioned (1 + the number of decision points). ### 1. First Code Fragment ```csharp for (int i = 0; i < 3; i++) Console.WriteLine("Hello"); Console.WriteLine("Hello"); Console.WriteL...
31,355
[ { "from": "human", "value": "Recently our company has started measuring the cyclomatic complexity (CC) of the functions in our code on a weekly basis, and reporting which functions have improved or worsened. So we have started paying a lot more attention to the CC of functions.\nI've read that CC could be ...
I have a requirement to produce a Web User Control (in C#) which will exhibit different behaviour when clicked depending on whether the shift (or control) key is pressed at the time. The control itself will contain an ImageButton and/or Hyperlink. Is this possible? Basically, if the logged in user is an Admin then I ne...
Yes, it is indeed possible to create a Web User Control in C# that changes its behavior based on whether certain keys (like Shift or Control) are pressed when the control is clicked. You can accomplish this by using JavaScript to detect key presses and then handle the click event accordingly. Here’s how you can implem...
33,372
[ { "from": "human", "value": "I have a requirement to produce a Web User Control (in C#) which will exhibit different behaviour when clicked depending on whether the shift (or control) key is pressed at the time. The control itself will contain an ImageButton and/or Hyperlink.\nIs this possible?\nBasically, ...
I need to unzip a compressed file on the fly in my program. It works when I try it on my own linux computer, but for some reason the school computers fail whenever I tell them to do it. To unzip I'm using the following command: zcat /file/address/file.tar.gz and get the error: /file/address/file.tar.gz.Z: No such ...
The issue you're facing seems to stem from the fact that `zcat` expects a `.Z` file by default, which is typically the extension for files compressed with the old UNIX compress utility. For `.tar.gz` files (which are gzipped tar archives), you should be using `gunzip` or `zcat` specifically for gzip files. If your goa...
35,757
[ { "from": "human", "value": "I need to unzip a compressed file on the fly in my program. It works when I try it on my own linux computer, but for some reason the school computers fail whenever I tell them to do it. To unzip I'm using the following command:\n zcat /file/address/file.tar.gz\n\nand get the e...
Sorry, that title just hurts. I'm wondering if there is a Linq to collections extension method that collapses the following code segment into a single line: public IEnumerable<Child> GetAllChildren(IEnumerable<Parent> parents){ var result = new List<Child>(); foreach(Parent parent in parents) foreach(Child c...
Yes, you can use LINQ to simplify both of those methods into a single line. Here’s how you can achieve this for each example: ### For the first example (getting children from parents): You can use `SelectMany` to flatten the collections: ```csharp public IEnumerable<Child> GetAllChildren(IEnumerable<Parent> parents)...
35,785
[ { "from": "human", "value": "Sorry, that title just hurts. I'm wondering if there is a Linq to collections extension method that collapses the following code segment into a single line:\npublic IEnumerable<Child> GetAllChildren(IEnumerable<Parent> parents){\n\n var result = new List<Child>();\n\n foreach...
When trying to invoke a method on an external webservice (over the Internet) it throws me "The remote server returned an error: (407) Proxy Authentication Required." To solve this, I used the following code to set the proxy we use in the office: //Set the system proxy with valid server address or IP and port. System.Ne...
To dynamically retrieve proxy settings instead of hardcoding them, you can use the `WebRequest.DefaultWebProxy` to get the default proxy settings configured in your system. Here's how you can achieve that: 1. **Use `WebRequest.GetSystemWebProxy`:** This method retrieves the system's configured proxy settings, allowing...
35,485
[ { "from": "human", "value": "When trying to invoke a method on an external webservice (over the Internet) it throws me\n\"The remote server returned an error: (407) Proxy Authentication Required.\"\nTo solve this, I used the following code to set the proxy we use in the office:\n//Set the system proxy with ...
I'm trying to create a database scripter tool for a local database I'm using. I've been able to generate create scripts for the tables, primary keys, indexes, and foreign keys, but I can't find any way to generate create scripts for the table defaults. For indexes, it's as easy as foreach (Index index in table.Indexes...
In SQL Server, defaults are associated with columns, and they can be accessed via the `Column` object rather than directly from the `Table` object. While generating create scripts for defaults is not as straightforward as for indexes, you can still retrieve them by iterating over the columns in a table and checking for...
31,275
[ { "from": "human", "value": "I'm trying to create a database scripter tool for a local database I'm using.\nI've been able to generate create scripts for the tables, primary keys, indexes, and foreign keys, but I can't find any way to generate create scripts for the table defaults.\nFor indexes, it's as eas...
In a prior question, I asked about using xbuild to compile a solution file, only to be told it doesn't work for that. NAnt seems a little out of date. What other options are there? I need something that supports dependencies across multiple projects.
If you're looking for alternatives to `xbuild` and `NAnt` for building .NET projects and solutions with support for dependencies across multiple projects, here are several options to consider: 1. **MSBuild**: This is the build engine for Visual Studio and is the most recommended tool for building .NET projects. It ful...
34,252
[ { "from": "human", "value": "In a prior question, I asked about using xbuild to compile a solution file, only to be told it doesn't work for that. NAnt seems a little out of date. What other options are there? I need something that supports dependencies across multiple projects.\n" }, { "from": "...
Is it possible to inspect the return value of a function in gdb assuming the return value is not assigned to a variable?
Yes, in GDB (the GNU Debugger), you can inspect the return value of a function even if it is not assigned to a variable. Here’s how you can do this: 1. **Set a breakpoint**: First, you need to set a breakpoint at the location where the function returns. You can do this by using the `break` command followed by the func...
31,316
[ { "from": "human", "value": "Is it possible to inspect the return value of a function in gdb assuming the return value is not assigned to a variable?\n" }, { "from": "gpt", "value": "Yes, in GDB (the GNU Debugger), you can inspect the return value of a function even if it is not assigned to a va...
I recently saw an announcement and article outlining the release of the first Python 3.0 release candidate. I was wondering whether there were any commercial, free, open source etc. IDE's that support its syntax.
As of October 2023, several integrated development environments (IDEs) and code editors support Python 3.0 and its syntax. Here are some popular options: 1. **PyCharm**: A powerful IDE specifically designed for Python development. It has both a free Community Edition and a paid Professional Edition. PyCharm fully supp...
34,946
[ { "from": "human", "value": "I recently saw an announcement and article outlining the release of the first Python 3.0 release candidate. I was wondering whether there were any commercial, free, open source etc. IDE's that support its syntax.\n" }, { "from": "gpt", "value": "As of October 2023, s...
What are the best algorithms for sorting data in C#? Is there one sorting algorithm that can handle 80% of sorts well? Please give code examples if applicable.
In C#, several sorting algorithms are available, and the choice of algorithm depends on the size and nature of the dataset you're working with. Some commonly used sorting algorithms include: 1. **Quick Sort**: Generally very efficient for large datasets and has an average time complexity of \(O(n \log n)\). 2. **Merge...
31,589
[ { "from": "human", "value": "What are the best algorithms for sorting data in C#? \nIs there one sorting algorithm that can handle 80% of sorts well? \nPlease give code examples if applicable.\n" }, { "from": "gpt", "value": "In C#, several sorting algorithms are available, and the choice of al...
I am using Telerik controls in my webforms and want to serialize object on the client. Since I am getting a stackoverflow error with Sys.Serialization.JavaScriptSerializer.deserialize I wanted to try JSON. With both JSON and and the MS library I get "Sys.Application is undefined." Has anyone encountered this what did...
The issue you're facing seems to stem from a few potential problems, particularly related to how JavaScript is handling the serialization and the context in which you're trying to access the `Sys` namespace from Telerik's ASP.NET AJAX framework. Here are some steps and workarounds you can consider to resolve the `Sys....
25,802
[ { "from": "human", "value": "I am using Telerik controls in my webforms and want to serialize object on the client. Since I am getting a stackoverflow error with Sys.Serialization.JavaScriptSerializer.deserialize I wanted to try JSON. With both JSON and and the MS library I get \"Sys.Application is undefi...
I'm writing code to do Xml serialization. With below function. public static string SerializeToXml(object obj) { XmlSerializer serializer = new XmlSerializer(obj.GetType()); using (StringWriter writer = new StringWriter()) { serializer.Serialize(writer, obj); return writer.ToString(); } ...
The requirement for a parameterless constructor in XML serialization is rooted in how the `XmlSerializer` creates instances of the objects being serialized and deserialized. Here’s a breakdown of the reasons: 1. **Instantiation During Deserialization**: When deserializing XML back into an object, the `XmlSerializer` n...
31,675
[ { "from": "human", "value": "I'm writing code to do Xml serialization. With below function.\npublic static string SerializeToXml(object obj)\n{\n XmlSerializer serializer = new XmlSerializer(obj.GetType());\n using (StringWriter writer = new StringWriter())\n {\n serializer.Serialize(writer,...
I'm running an application (web service) in tomcat with TLS enabled (with certificates both for the client and the server). I want that my application will be able to send audit message (logging) when TLS handshake fails. For example I want to log when: the client certificate is expired, the client certificate is unkn...
To log TLS handshake failures in a web application running on Apache Tomcat, you will not have direct access to the TLS layer, as Tomcat abstracts the network handling, including the TLS handshake. However, you can use the following approaches to capture and log such events: ### 1. Using a Custom `Valve` Apache Tomca...
32,085
[ { "from": "human", "value": "I'm running an application (web service) in tomcat with TLS enabled (with certificates both for the client and the server).\nI want that my application will be able to send audit message (logging) when TLS handshake fails. For example I want to log when:\n\nthe client certificat...
I am desiging a new website for my company and I am trying to implement switch navigation which is what I have used on all my sites in the past. <?php switch($x) { default: include("inc/main.php"); break; case "products": include("inc/products.php"); break; } ?> For some reason when I go to index.php?x=products not...
The issue you're experiencing with your PHP code likely stems from the fact that the variable `$x` is not being set properly or is not available in the context where you're using it. In PHP, the query parameters from the URL can be accessed through the `$_GET` superglobal array. Here's how you can modify your code to ...
32,003
[ { "from": "human", "value": "I am desiging a new website for my company and I am trying to implement switch navigation which is what I have used on all my sites in the past.\n<?php\nswitch($x) {\n\ndefault:\ninclude(\"inc/main.php\");\nbreak;\n\ncase \"products\":\ninclude(\"inc/products.php\");\nbreak;\n\n...
I have a Java method which starts up a Process with ProcessBuilder, and pipes its output into a byte array, and then returns its byte array when the process is finished. Pseudo-code: ProcessBuilder b = new ProcessBuilder("my.exe") Process p = b.start(); ... // get output from process, close process What would be the b...
Your approach of using an interface to decouple the logic of starting a process from the implementation details is indeed a solid design practice and aligns with the Dependency Inversion Principle, one of the SOLID principles of object-oriented design. By introducing an interface, you allow for better testability and f...
33,106
[ { "from": "human", "value": "I have a Java method which starts up a Process with ProcessBuilder, and pipes its output into a byte array, and then returns its byte array when the process is finished.\nPseudo-code:\nProcessBuilder b = new ProcessBuilder(\"my.exe\")\nProcess p = b.start();\n... // get output f...
How can I set Resharper to wrap, say, the generated equality members with regions when selected from the Alt+Insert menu? Thanks
In ReSharper, you can customize the generated members, including wrapping them in regions, but this isn't a direct feature available through the GUI. However, you can achieve this by customizing the code generation templates. Here's how you can wrap generated equality members with regions: 1. **Open ReSharper Options...
32,622
[ { "from": "human", "value": "How can I set Resharper to wrap, say, the generated equality members with regions when selected from the Alt+Insert menu?\nThanks\n" }, { "from": "gpt", "value": "In ReSharper, you can customize the generated members, including wrapping them in regions, but this isn'...
It's possible to write Markdown content with invalid syntax. Invalid means that the BlueCloth library fails to parse the content and throws an exception. The markdown helper in Rails doesn't catch any BlueCloth exceptions and because of that the complete page fails to render (500 Server Error page is rendered instead)....
Yes, it's definitely possible to validate Markdown syntax at the model level before saving to the database in a Rails application. By doing this, you can prevent users from saving invalid Markdown content and avoid exceptions that cause server errors when trying to render the content. Here’s how you can implement Mark...
33,760
[ { "from": "human", "value": "It's possible to write Markdown content with invalid syntax. Invalid means that the BlueCloth library fails to parse the content and throws an exception. The markdown helper in Rails doesn't catch any BlueCloth exceptions and because of that the complete page fails to render (50...
I know there has been previous talk on here about screencasting tools/apps, however I thought I would be more specific in what I am after in the hope that it can help me and others :) I am looking at trialling some screencasts on my blog. There are numerous reasons for this (hopefully being more helpful to readers, imp...
There are several free screencasting tools that you can use to get started on your blog. Here’s a list of some popular options, along with their features: 1. **OBS Studio (Open Broadcaster Software)**: - **Platform**: Windows, macOS, Linux - **Features**: Open-source and highly customizable, allows for both scre...
32,504
[ { "from": "human", "value": "I know there has been previous talk on here about screencasting tools/apps, however I thought I would be more specific in what I am after in the hope that it can help me and others :)\nI am looking at trialling some screencasts on my blog. There are numerous reasons for this (ho...
I am new to creating Java web applications and came across this problem when trying to interact with my database (called ccdb) through my application: java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost/ccdb/ My application runs on JBoss and uses Hibernate to interact with the MySQL database. I h...
The error message `java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost/ccdb/` typically indicates that the JDBC driver for MySQL is not available in the classpath at runtime when your application is trying to establish a connection to the database. Here are some steps and considerations to help ...
29,486
[ { "from": "human", "value": "I am new to creating Java web applications and came across this problem when trying to interact with my database (called ccdb) through my application:\njava.sql.SQLException: No suitable driver found for jdbc:mysql://localhost/ccdb/\nMy application runs on JBoss and uses Hiberna...
I am implementing replication for a project I am developing, and would like to replicate changes in the Write database to the Read database. While this isn't a problem, I want to tune one database for reading from, and the other to writing to, so they would have different settings. Is there any resource/guide which wil...
Implementing replication while tuning databases for specific workloads is an important aspect of database architecture. Here are some concepts and areas you should consider exploring to effectively implement this setup: ### 1. **Database Replication Strategies** - **Master-Slave Replication**: Understand how master...
29,066
[ { "from": "human", "value": "I am implementing replication for a project I am developing, and would like to replicate changes in the Write database to the Read database.\nWhile this isn't a problem, I want to tune one database for reading from, and the other to writing to, so they would have different setti...
Hi I'm trying to get some practice with Linked Lists. I Defined an Object class called Student: public class Student { protected string Student_Name; protected int Student_ID; protected int Student_Mark; protected char Student_Grade; public Student() // default Constructor { ...
You're on the right track with your implementation of a linked list in C#. Below, I'll help you fill in the methods you mentioned: inserting, deleting, traversing, and finding nodes in the linked list. Additionally, I will correct some minor issues in your code, such as typos. Let's begin by refining your classes and ...
25,293
[ { "from": "human", "value": "Hi I'm trying to get some practice with Linked Lists.\nI Defined an Object class called Student:\npublic class Student\n{\n protected string Student_Name;\n protected int Student_ID;\n protected int Student_Mark;\n protected char Student_Grade;\n\n p...
I'm trying to bind a datasource to a repeater, for instance, to a web service (.asmx from a different website) on page load. The webservice returns a DataSet from an sql call. What is the best way to go about doing this?
To bind a data source (like a DataSet returned from a web service) to a Repeater control in ASP.NET, you typically follow these steps: 1. **Consume the Web Service**: You'll call the web service and get the DataSet returned. 2. **Bind the DataSet to the Repeater**: You'll set the `DataSource` of the Repeater to the Da...
27,512
[ { "from": "human", "value": "I'm trying to bind a datasource to a repeater, for instance, to a web service (.asmx from a different website) on page load. The webservice returns a DataSet from an sql call. What is the best way to go about doing this?\n" }, { "from": "gpt", "value": "To bind a da...
I've got a chain of aspects that are being executed in some cases but not in others. The stack typically looks something like this w/o giving an context information. There doesn't appear to be any logging that I can enable either. Thanks for any help on this. GeneratedMethodAccessor163.invoke(Object, Object[]) line:...
It appears that you are dealing with a chain of method invocations where aspects (possibly Spring AOP aspects) are expected to execute in certain cases but not in others. Given the stack trace you provided, it seems like you're working with CGLIB proxies and AspectJ advice. Here are a few considerations to help you tr...
33,645
[ { "from": "human", "value": "I've got a chain of aspects that are being executed in some cases but not in others. The stack typically looks something like this w/o giving an context information. There doesn't appear to be any logging that I can enable either. Thanks for any help on this.\nGeneratedMethod...
In Visual Studio, How do I show all classes inherited from a base class? For example, in ASP.NET MVC there are several 'ActionResult' types -- and they all inherit from / implement the base class ActionResult. It looks like unless you just 'know' that View and Json are valid ActionResult types, there is no way you ...
Yes, Visual Studio does provide a way to view all classes that inherit from a specific base class, and there are tools that can help with this as well. Here's how you can do it within Visual Studio and using ReSharper: ### Using Visual Studio 1. **Object Browser**: - Open the Object Browser by navigating to `View`...
34,303
[ { "from": "human", "value": "In Visual Studio, How do I show all classes inherited from a base class? \nFor example, in ASP.NET MVC there are several 'ActionResult' types -- and they all inherit from / implement the base class ActionResult. \nIt looks like unless you just 'know' that View and Json are val...
I know they're using a jQuery plugin, but I can't seem to find which one they used. In particular, what I'm looking for is autocomplete with exactly the same functionality as SO's autocomplete, where it will perform an AJAX command with each new word typed in and allow you to select one from a dropdown.
If you're looking for an autocomplete functionality similar to what Stack Overflow uses, you might want to consider using a few popular jQuery autocomplete plugins that are well-suited for AJAX calls and have the capability to display a dropdown of suggestions. Here are some options: 1. **jQuery UI Autocomplete**: ...
34,166
[ { "from": "human", "value": "I know they're using a jQuery plugin, but I can't seem to find which one they used. In particular, what I'm looking for is autocomplete with exactly the same functionality as SO's autocomplete, where it will perform an AJAX command with each new word typed in and allow you to se...
Ok, I'm developing an application that has been in pretty much continous development over the last 16 years, from C in DOS, through various flavours of C++ and now is largely based around C++ with MFC and StingRay GUIs and various other SDKs. While I use VS 2005 for the release builds, I still use MSVC 6 for much of th...
Your situation is certainly a common one among developers who have been working with C++ and MFC for a long time. The desire for rapid development tools that help streamline repetitive tasks can be very important, especially when you're working with legacy code or frameworks. Here's a breakdown of your questions: ### ...
14,635
[ { "from": "human", "value": "Ok, I'm developing an application that has been in pretty much continous development over the last 16 years, from C in DOS, through various flavours of C++ and now is largely based around C++ with MFC and StingRay GUIs and various other SDKs.\nWhile I use VS 2005 for the release...
Is there a way to use a foreach loop to iterate through a collection backwards or in a completely random order?
In most programming languages, a `foreach` loop is designed to iterate through a collection in the order that the collection is structured (usually from the first element to the last). However, if you want to iterate backwards or in a random order, you'll need to use some additional steps. Here's how you can achieve bo...
30,859
[ { "from": "human", "value": "Is there a way to use a foreach loop to iterate through a collection backwards or in a completely random order?\n" }, { "from": "gpt", "value": "In most programming languages, a `foreach` loop is designed to iterate through a collection in the order that the collecti...
When I access a wrong call to a sql server data into my application in classical ASP I get this message in my entire site: Service Unavailable. It stopped. My site is in a remote host. Don´t know what to do. What can I tell to the "support team" of them to fix that?
When you encounter a "Service Unavailable" error on your classical ASP site after making an incorrect SQL Server call, it generally indicates that the server hosting your application is experiencing issues. Here are some steps you can take and suggestions on what to communicate to the support team of your hosting provi...
33,746
[ { "from": "human", "value": "When I access a wrong call to a sql server data into my application in classical ASP I get this message in my entire site: Service Unavailable. It stopped. My site is in a remote host. Don´t know what to do. What can I tell to the \"support team\" of them to fix that?\n" }, ...
It's easy to bind something to the SelectedIndex of the ListBox, but I want every item in the ListBox be able to bind to it's index in the list. Might sound weird, so here's what I'm trying to do: <DataTemplate x:Key="ScenarioItemTemplate"> <Border Margin="8,2,8,2" Background="#FF3C3B3B" BorderBrush="#FF797...
To bind each item's index in a `ListBox` to a property of a control within its `DataTemplate`, you can use a combination of `ItemsControl.AlternationIndex` and `Binding` in XAML. The `AlternationIndex` property provides a way to access the index of items within an `ItemsControl` (like a `ListBox`). Here's how you can...
33,335
[ { "from": "human", "value": "It's easy to bind something to the SelectedIndex of the ListBox,\nbut I want every item in the ListBox be able to bind to it's index in the list.\nMight sound weird, so here's what I'm trying to do:\n<DataTemplate x:Key=\"ScenarioItemTemplate\">\n<Border\n Margin=\"8,2,8,2\"\...
I could write myself a helper class that does this when given a functor, but I was wondering if there's a better approach, or if there's something already in the standard library (seems like there should be). Answers I've found on StackOverflow are all for C# which doesn't help me. Thanks
It seems like you're looking for a way to create or manage functors (or callable objects) in a programming language, and you might be exploring the capabilities of a standard library that could provide this functionality. However, your question is somewhat vague in terms of which programming language you are referring ...
33,483
[ { "from": "human", "value": "I could write myself a helper class that does this when given a functor, but I was wondering if there's a better approach, or if there's something already in the standard library (seems like there should be).\nAnswers I've found on StackOverflow are all for C# which doesn't help...
I have a large Java app that is split up into multiple projects. Each project has its own folder in a Subversion repository like so: AccountingCore trunk branches tags Common trunk branches tags WebCommon trunk branches tags etc... I want to start using git-svn locally instead of subversion. This may be a stupi...
Hi Tony, No question is stupid, especially when it comes to version control and repository management! Unfortunately, `git-svn` does not natively support checking out multiple projects from a Subversion repository all at once in a single command, as it operates on a per-repository basis. However, you can streamline th...
34,445
[ { "from": "human", "value": "I have a large Java app that is split up into multiple projects. Each project has its own folder in a Subversion repository like so:\nAccountingCore\n\ntrunk\nbranches\ntags\n\nCommon\n\ntrunk\nbranches\ntags\n\nWebCommon\n\ntrunk\nbranches\ntags\n\netc...\nI want to start usin...
Here i need to create a site that should support all Internet accessible mobiles. May i use javascript, in Some forum they told that javascript doesn't work's in mobile phones. Suggest me clear, In mobile phone javascript work or not ? Thanks
Yes, JavaScript works on mobile phones. In fact, most modern mobile browsers, including those on iOS (Safari) and Android (Chrome, Firefox, etc.), fully support JavaScript. Here are some points to consider: 1. **Browser Compatibility**: Mobile browsers generally support the same JavaScript standards as desktop brows...
34,892
[ { "from": "human", "value": "Here i need to create a site that should support all Internet accessible mobiles.\nMay i use javascript, in Some forum they told that javascript doesn't work's in mobile phones.\nSuggest me clear, In mobile phone javascript work or not ?\nThanks\n" }, { "from": "gpt", ...
I'm looking for Python code that removes C and C++ comments from a string. (Assume the string contains an entire C source file.) I realize that I could .match() substrings with a Regex, but that doesn't solve nesting /*, or having a // inside a /* */. Ideally, I would prefer a non-naive implementation that properly han...
To remove C and C++ comments from a string while correctly handling nested comments and various edge cases, we can implement a state machine approach instead of relying solely on regex. This will allow us to better manage the complexity introduced by nested comments and mixed types of comments (single-line and multi-li...
28,572
[ { "from": "human", "value": "I'm looking for Python code that removes C and C++ comments from a string. (Assume the string contains an entire C source file.)\nI realize that I could .match() substrings with a Regex, but that doesn't solve nesting /*, or having a // inside a /* */.\nIdeally, I would prefer a...
I would like to use Python to script an application that advertises itself as providing an OLE component. How should I get started? I don't yet know what methods I need to call on the COMponents I will be accessing. Should I use win32com to load those components, and then start pressing 'tab' in IPython?
Creating an OLE (Object Linking and Embedding) component in Python is indeed possible using the `pywin32` package, which provides access to the Windows COM (Component Object Model) interfaces. Here’s how you can get started with this process. ### Step 1: Install Required Packages First, make sure you have Python insta...
34,373
[ { "from": "human", "value": "I would like to use Python to script an application that advertises itself as providing an OLE component. How should I get started?\nI don't yet know what methods I need to call on the COMponents I will be accessing. Should I use win32com to load those components, and then start...
Does anyone know how to programmatically capture the sound that is being played (that is, everything that is coming from the sound card, not the input devices such as a microphone).
To capture sound programmatically from the system's audio output (what you hear from the speakers) rather than from input devices like a microphone, you can use different libraries and APIs depending on your operating system and programming language. Here are some options: ### For Windows 1. **Audio Loopback with WAS...
31,478
[ { "from": "human", "value": "Does anyone know how to programmatically capture the sound that is being played (that is, everything that is coming from the sound card, not the input devices such as a microphone).\n" }, { "from": "gpt", "value": "To capture sound programmatically from the system's ...
Is it expensive? I am developing an HtmlHelper that renders directly to Response.Output in order to save unnecesary string creation and I need to choose between: <% Validator.RenderClient(Response.Output); %> and <% Validator.RenderClient(); %> and get the textWriter from HttpContext.Current.Response
When considering the two options you mentioned for rendering a client-side validator in an ASP.NET application, you are essentially deciding between: 1. Directly passing the `Response.Output` to the `RenderClient` method. 2. Calling `RenderClient` without parameters and then obtaining the `TextWriter` from `HttpContex...
35,200
[ { "from": "human", "value": "Is it expensive?\nI am developing an HtmlHelper that renders directly to Response.Output in order to save unnecesary string creation and I need to choose between: \n<% Validator.RenderClient(Response.Output); %>\n\nand\n<% Validator.RenderClient(); %>\n\nand get the textWriter f...
I know the standard way of using the null coalescing operator in C# is to set default values. string nobody = null; string somebody = "Bob Saget"; string anybody = ""; anybody = nobody ?? "Mr. T"; // Returns Mr. T anybody = somebody ?? "Mr. T"; // Returns "Bob Saget" But what else can ?? be used for? It doesn't see...
The null coalescing operator (`??`) in C# serves a specific purpose and is particularly useful when dealing with nullable types or situations where you want to provide a default value for potentially null references. While it may seem less versatile than the ternary operator (`?:`), it has its own unique advantages and...
32,418
[ { "from": "human", "value": "I know the standard way of using the null coalescing operator in C# is to set default values.\nstring nobody = null;\nstring somebody = \"Bob Saget\";\nstring anybody = \"\";\n\nanybody = nobody ?? \"Mr. T\"; // Returns Mr. T\nanybody = somebody ?? \"Mr. T\"; // Returns \"Bob ...
I realise this is not the ideal place to ask about this in terms of searchability, but I've got a page whose JavaScript code throws "Stack overflow in line 0" errors when I look at it in Internet Explorer. The problem is quite clearly not in line 0, but somewhere in the list of stuff that I'm writing to the document. E...
The "Stack overflow in line 0" error in Internet Explorer can be quite frustrating, especially since it doesn't give you a clear indication of where the issue lies. This error usually occurs due to a recursive function call that does not have a proper base case, leading to infinite recursion. However, there are several...
32,747
[ { "from": "human", "value": "I realise this is not the ideal place to ask about this in terms of searchability, but I've got a page whose JavaScript code throws \"Stack overflow in line 0\" errors when I look at it in Internet Explorer.\nThe problem is quite clearly not in line 0, but somewhere in the list ...
I have a file containing 250 million website URLs, each with an IP address, page title, country name, server banner (e.g. "Apache"), response time (in ms), number of images and so on. At the moment, these records are in a 25gb flat file. I'm interested in generating various statistics from this file, such as: number o...
Processing and analyzing a large dataset like 250 million website URLs with their associated metadata requires a robust approach to ensure efficiency, scalability, and maintainability. Here are various tools and platforms you could use, along with a proposed architecture to achieve your goals: ### Recommended Tools an...
28,599
[ { "from": "human", "value": "I have a file containing 250 million website URLs, each with an IP address, page title, country name, server banner (e.g. \"Apache\"), response time (in ms), number of images and so on. At the moment, these records are in a 25gb flat file.\nI'm interested in generating various s...
I have a VB.NET application which needs to generate reports (invoices) which contains optional images. The images are going to be loaded into 1 of 6 places on the report, but will reside on the client PC (deployed with the application). I've been trying to access the ICROleObject object, which is what's placed onto t...
To generate reports with optional images in a VB.NET application using Crystal Reports, you need to utilize the right approach for dealing with images in the Crystal Report. Here's a general guideline on how to embed images and manage their visibility in your reports. ### Steps to Add Optional Images in Crystal Report...
33,377
[ { "from": "human", "value": "I have a VB.NET application which needs to generate reports (invoices) which contains optional images. The images are going to be loaded into 1 of 6 places on the report, but will reside on the client PC (deployed with the application). I've been trying to access the ICROleObj...
In The Guerilla Guide to Interviewing Joel says that guys who want to get things done, but are not smart will do stupid things like using a visitor design pattern where a simple array would be sufficient. I find it hard to detect, if the design pattern suggested by the Gang of Four should be applied. Therefore, I would...
Detecting when to apply design patterns from the Gang of Four (GoF) can be challenging, and it often depends on the complexity, requirements, and future scalability of your software. Below are some guidelines and examples that illustrate when a simple approach might suffice, when to consider GoF patterns, and when to r...
30,149
[ { "from": "human", "value": "In The Guerilla Guide to Interviewing Joel says that guys who want to get things done, but are not smart will do stupid things like using a visitor design pattern where a simple array would be sufficient.\nI find it hard to detect, if the design pattern suggested by the Gang of ...
I have some code in .Net to draw some text content using GDI+. I used GraphicsUnit.Point to size the text. It's working wonderfully on-screen, and even if Print it. I've been asked to make a system that generates a PDF, and I got ComponentOne's PDF control. It has got similar interface to GDI+. The problem is: Font siz...
When working with text rendering in GDI+ and converting it to a PDF generation library like ComponentOne's PDF control, you might encounter issues due to differences in how font sizes and metrics are handled. In GDI+, the `GraphicsUnit.Point` units correspond to points, where 1 point is equal to 1/72 of an inch. In c...
30,444
[ { "from": "human", "value": "I have some code in .Net to draw some text content using GDI+. I used GraphicsUnit.Point to size the text. It's working wonderfully on-screen, and even if Print it.\nI've been asked to make a system that generates a PDF, and I got ComponentOne's PDF control. It has got similar i...
How can I achieve a cool looking photo gallery page? I don't know Flash, but can learn, and thought about a random collage that 'pulls out' a photo that you hover over. It's for a photographer, so no thumbnails, grids, etc.
Creating a visually striking photo gallery page without relying on traditional thumbnails or grids can be an exciting challenge! Here are some suggestions on how to achieve a cool-looking photo gallery that features a random collage with hover effects, and you don't need to use Flash. Instead, you can achieve this with...
30,871
[ { "from": "human", "value": "How can I achieve a cool looking photo gallery page? I don't know Flash, but can learn, and thought about a random collage that 'pulls out' a photo that you hover over.\nIt's for a photographer, so no thumbnails, grids, etc.\n" }, { "from": "gpt", "value": "Creating...
When I connect to a MySQL database using PDO, the way I need to connect is: $pdoConnection = new PDO("mysql:host=hostname;dbname=databasename",user,password); But, for PostgreSQL, the DSN is more standard (IMO): $pdoConnection = new PDO("pgsql:host=hostname;dbname=databasename;user=username;password=thepassword"); Is...
The difference in how the Data Source Name (DSN) is constructed for MySQL and PostgreSQL in PDO (PHP Data Objects) primarily stems from historical conventions and how these database systems have been designed and integrated into PHP. 1. **Historical Context**: MySQL and PostgreSQL have different origins and developmen...
35,551
[ { "from": "human", "value": "When I connect to a MySQL database using PDO, the way I need to connect is:\n$pdoConnection = new PDO(\"mysql:host=hostname;dbname=databasename\",user,password);\n\nBut, for PostgreSQL, the DSN is more standard (IMO):\n$pdoConnection = new PDO(\"pgsql:host=hostname;dbname=databa...
I have been tasked to implement a WCF service that makes use of NetMsmqBinding. I wrote the service and it works fine. The problem is that in the last minute they told me that there will be no Active Directory integration. So I don't know how to configure the security of the service. There is a VPN tunnel between the s...
To secure your WCF service using NetMsmqBinding without Active Directory integration, you can implement a custom security mechanism that leverages message signing and encryption. Here’s a step-by-step guide on how to achieve this: ### Step 1: Use Message Security with NetMsmqBinding In your WCF service configuration,...
31,292
[ { "from": "human", "value": "I have been tasked to implement a WCF service that makes use of NetMsmqBinding. I wrote the service and it works fine. The problem is that in the last minute they told me that there will be no Active Directory integration. So I don't know how to configure the security of the ser...
When creating a new build in Team Foundation Server, I get the following error when attempting to run the new build: The path C:\Build\ProductReleases\FullBuildv5.4.2x\Sources is already mapped to workspace BuildServer_23. I am unable to see a workspace by that name in the workspaces dialog.
The error you're encountering indicates that the build agent's workspace is already mapped to the specified path, but you are unable to see this workspace in the workspaces dialog. This can happen for a few reasons, including: 1. **Agent Configuration Issues**: The workspace may be configured at the build agent level,...
33,481
[ { "from": "human", "value": "When creating a new build in Team Foundation Server, I get the following error when attempting to run the new build:\n\nThe path\n C:\\Build\\ProductReleases\\FullBuildv5.4.2x\\Sources\n is already mapped to workspace\n BuildServer_23.\n\nI am unable to see a workspace by tha...
I'm having difficulty parsing some JSON data returned from my server using jQuery.ajax() To perform the AJAX I'm using: $.ajax({ url: myUrl, cache: false, dataType: "json", success: function(data){ ... }, error: function(e, xhr){ ... } }); And if I return an array of items then it works fine: [...
It sounds like you're encountering an issue with how the server is returning the JSON data when it's a single object. When jQuery's `$.ajax()` requests data with a `dataType` of `"json"`, it expects a properly formatted JSON response. If there's any issue with the format, such as an extra comma, a missing brace, or the...
31,122
[ { "from": "human", "value": "I'm having difficulty parsing some JSON data returned from my server using jQuery.ajax()\nTo perform the AJAX I'm using:\n$.ajax({\n url: myUrl,\n cache: false,\n dataType: \"json\",\n success: function(data){\n ...\n },\n error: function(e, xhr){\n ...\n }\n}); \n...
I am creating a joomla plugin and want to load an array of images after the page has loaded. To do that, I'm currently using mootools.js to call myserver URL, obtain the JSON response and parse the response into javascript variables that represent each image url. It works great, but mootools.js is appropriately named...
If you're looking for a lightweight alternative to MooTools for making AJAX calls and handling JSON in Joomla, you might consider using vanilla JavaScript (without any library) or a minimal library like Axios or Fetch API. ### Option 1: Using Fetch API (Native JavaScript) The Fetch API is built into modern browsers a...
35,084
[ { "from": "human", "value": "I am creating a joomla plugin and want to load an array of images after the page has loaded. To do that, I'm currently using mootools.js to call myserver URL, obtain the JSON response and parse the response into javascript variables that represent each image url. It works grea...
Is there a library method to copy all the properties between two (already present) instances of the same class, in Python? I mean, something like Apache Commons' PropertyUtilsBean.copyProperties()
In Python, there is no built-in library method that directly replicates Apache Commons' `PropertyUtilsBean.copyProperties()`, but you can achieve similar functionality using various methods. Below are a few approaches to copy properties between two instances of the same class: ### 1. Using `vars()` or `__dict__` You ...
24,778
[ { "from": "human", "value": "Is there a library method to copy all the properties between two (already present) instances of the same class, in Python?\nI mean, something like Apache Commons' PropertyUtilsBean.copyProperties()\n" }, { "from": "gpt", "value": "In Python, there is no built-in libr...
How can I set the location (as it's picked up in CoreLocation services) in the iPhone Simulator?
To set the location in the iPhone Simulator using Core Location services, you can follow these steps: 1. **Open the iPhone Simulator**: Launch your iOS Simulator through Xcode. You can do this by running your app or selecting "Open Developer Tool" from the Xcode menu and then choosing "Simulator". 2. **Select a Simul...
30,710
[ { "from": "human", "value": "How can I set the location (as it's picked up in CoreLocation services) in the iPhone Simulator? \n" }, { "from": "gpt", "value": "To set the location in the iPhone Simulator using Core Location services, you can follow these steps:\n\n1. **Open the iPhone Simulator*...
The requirements for my document management system were: Must be secure from theft by simple copying of directories, files etc. Must be secure against traditional virus infection (infection of physical file) Must be fast to retrieve The repository must not be visible to casual (directory) browsing users etc. I have d...
Storing documents as binary large objects (BLOBs) in a PostgreSQL database can be a robust solution that meets many of your requirements. However, there are several potential risks and considerations to keep in mind to ensure the long-term effectiveness and security of your document management system. Here are some poi...
32,348
[ { "from": "human", "value": "The requirements for my document management system were:\n\nMust be secure from theft by simple copying of directories, files etc.\nMust be secure against traditional virus infection (infection of physical file)\nMust be fast to retrieve\nThe repository must not be visible to ca...
I have an ASP.NET site that has been running perfectly for a long time, nothing's changed recently. From one hour to the next I started receiving an IndexOutOfRangeException in a line where I do a LINQ query like this: var form = SqlDB.GetTable<ORMB.Form, CDB>() .Where(f => f.FormID == formID) .Single(); ORMB....
It sounds like you are encountering a threading issue related to the internal handling of the `SqlConnectionManager` when using LINQ to SQL. The `IndexOutOfRangeException` you are experiencing does indeed suggest that there may be a race condition when multiple threads attempt to modify the internal state of a collecti...
32,815
[ { "from": "human", "value": "I have an ASP.NET site that has been running perfectly for a long time, nothing's changed recently. From one hour to the next I started receiving an IndexOutOfRangeException in a line where I do a LINQ query like this:\nvar form = SqlDB.GetTable<ORMB.Form, CDB>()\n .Where(f =...
Is there a way to write log4j logging events to a log file that is also being written to by other applications. The other applications could be non-java applications. What are the drawbacks? Locking issues? Formatting?
Writing log4j logging events to a log file that is also being written to by other applications, including non-Java applications, is technically possible, but it comes with several drawbacks and challenges. Here are some of the key considerations: ### 1. **File Locking Issues:** - **Concurrent Access:** Many operati...
34,378
[ { "from": "human", "value": "Is there a way to write log4j logging events to a log file that is also being written to by other applications. The other applications could be non-java applications. What are the drawbacks? Locking issues? Formatting?\n" }, { "from": "gpt", "value": "Writing log4j l...
I need to export multiple data tables to Excel on the clients machine, each to their own sheet. If it was just one sheet, I'd use the Excel/csv content type, but I've heard something about an XML format that can represent an entire workbook. I don't want to go down the Packaging and .xlsx route, so I need standard .x...
Yes, Excel can indeed open XML files that define a multi-sheet workbook, but it's worth noting that this approach is less common today than exporting to the more modern `.xlsx` format. However, if you specifically want to use the `.xls` format without delving into the complexities of the newer packaging approach, you c...
30,188
[ { "from": "human", "value": "I need to export multiple data tables to Excel on the clients machine, each to their own sheet. If it was just one sheet, I'd use the Excel/csv content type, but I've heard something about an XML format that can represent an entire workbook. I don't want to go down the Packagi...
I may be in the minority here, but I very much enjoy Perl's formats. I especially like being able to wrap a long piece of text within a column ("~~ ^<<<<<<<<<<<<<<<<" type stuff). Are there any other programming languages that have similar features, or libraries that implement similar features? I am especially inte...
You're right that Perl's formats feature is quite unique and offers a powerful way to format output, especially for fixed-width text. While not every language has a direct equivalent of Perl's formats, there are several languages and libraries that offer similar capabilities for formatting text. ### Ruby Libraries 1....
31,057
[ { "from": "human", "value": "I may be in the minority here, but I very much enjoy Perl's formats. I especially like being able to wrap a long piece of text within a column (\"~~ ^<<<<<<<<<<<<<<<<\" type stuff). Are there any other programming languages that have similar features, or libraries that implem...
I have good knowledge on C++ (not C) and recently bought a Symbian-based phone. This gave me reasons to start learning on how to program this beast. I have searched for Symbian programming tutorials but there is so much knowledge that it is hard to choose best for startup. So I'm asking for hints, tips on where to star...
Getting started with Symbian programming can be a bit daunting given its unique architecture and development environment. Here are some tips and resources to help you kick-start your journey: ### 1. **Understand the Symbian Architecture** - Familiarize yourself with the overall architecture of the Symbian OS. Key c...
27,090
[ { "from": "human", "value": "I have good knowledge on C++ (not C) and recently bought a Symbian-based phone.\nThis gave me reasons to start learning on how to program this beast.\nI have searched for Symbian programming tutorials but there is so much knowledge that it is hard to choose best for startup.\nSo...
What is your favorite, lossless image format for games (namely 2d games)? And why? Some things to take into consideration are size on disk, overhead for converting to a usable format, and features of the format (ie alpha support). There is no best answer, but be sure to back yours up the best you can!
When it comes to lossless image formats for 2D games, **PNG (Portable Network Graphics)** is often my favorite choice, and here's why: ### 1. **Lossless Compression**: - PNG uses lossless compression, meaning that images retain their original quality without any degradation, which is crucial for maintaining the cla...
29,531
[ { "from": "human", "value": "What is your favorite, lossless image format for games (namely 2d games)? And why?\nSome things to take into consideration are size on disk, overhead for converting to a usable format, and features of the format (ie alpha support).\nThere is no best answer, but be sure to back y...
I am having an ajax tab control in my page each tab contains some 15 controls. My tab container has some 10 tabs. Its take some time load in my web page. Please let me know how to reduce the page loading time. or anyother suggestions Since the number of database calls are less. The controls are read only displays.
Optimizing the loading time of a web page, especially with AJAX tab controls, can involve several strategies. Here are some suggestions to improve the performance: 1. **Lazy Loading**: - Instead of loading all the tabs' contents at once, consider loading only the active tab's content initially. Load the contents of...
32,235
[ { "from": "human", "value": "I am having an ajax tab control in my page each tab contains some 15 controls. My tab container has some 10 tabs.\nIts take some time load in my web page. Please let me know how to reduce the page loading time. or anyother suggestions\nSince the number of database calls are less...