instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
How can I do the Ruby method "Flatten" Ruby Method in C#. This method flattens a jagged array into a single-dimensional array. For example: s = [ 1, 2, 3 ] #=> [1, 2, 3] t = [ 4, 5, 6, [7, 8] ] #=> [4, 5, 6, [7, 8]] a = [ s, t, 9, 10 ] #=> [[1, 2, 3], [4, 5, 6, [7, 8]], 9, 10] a.flatten ...
In C#, you can implement a method to flatten a jagged array (an array containing other arrays) using recursion. Here’s how you can do it: ### Implementation We'll define a method called `Flatten` that takes an `IEnumerable<object>` as input. This way, it can handle any combination of integers and nested arrays. It wi...
19,253
[ { "from": "human", "value": "How can I do the Ruby method \"Flatten\" Ruby Method in C#. This method flattens a jagged array into a single-dimensional array.\nFor example:\ns = [ 1, 2, 3 ] #=> [1, 2, 3]\nt = [ 4, 5, 6, [7, 8] ] #=> [4, 5, 6, [7, 8]]\na = [ s, t, 9, 10 ] #=> [[1, 2, 3], [4,...
I've got a bunch of 3D vertex positions & need to generate a convex hull containing them; does anyone know of any QHull bindings for .NET? or native 3D Delaunay triangulation algorithms?
For generating a convex hull from a set of 3D vertex positions in .NET, you have a few options, including libraries that provide bindings for QHull and other geometric algorithms. ### QHull Bindings for .NET 1. **QHull.NET**: There are bindings available that allow you to use QHull directly in .NET. One such project ...
19,782
[ { "from": "human", "value": "I've got a bunch of 3D vertex positions & need to generate a convex hull containing them; does anyone know of any QHull bindings for .NET? or native 3D Delaunay triangulation algorithms?\n" }, { "from": "gpt", "value": "For generating a convex hull from a set of 3D v...
Is there a simple way to hook into the standard 'Add or Remove Programs' functionality using PowerShell to uninstall an existing application? Or to check if the application is installed?
Yes, you can use PowerShell to interact with the standard 'Add or Remove Programs' functionality to uninstall an application or check if an application is installed. Here’s how to do both: ### Checking if an Application is Installed To check if a specific application is installed, you can query the registry or use th...
17,969
[ { "from": "human", "value": "Is there a simple way to hook into the standard 'Add or Remove Programs' functionality using PowerShell to uninstall an existing application? Or to check if the application is installed?\n" }, { "from": "gpt", "value": "Yes, you can use PowerShell to interact with th...
Let's take the code int a, b, c; ... if ((a + b) > C) If we add the values of a and b and the sum exceeds the maximum value of an int, will the integrity of the comparison be compromised? I was thinking that there might be an implicit up cast or overflow bit check and that will be factored into the evaluation of this...
In C and C++, when you add two integers and the result exceeds the maximum value that can be stored in an `int`, an integer overflow occurs. The behavior of an integer overflow is undefined for signed integers in C and C++, which means that the compiler may produce unexpected results, and the integrity of the compariso...
20,503
[ { "from": "human", "value": "Let's take the code\nint a, b, c;\n...\nif ((a + b) > C)\n\nIf we add the values of a and b and the sum exceeds the maximum value of an int, will the integrity of the comparison be compromised? I was thinking that there might be an implicit up cast or overflow bit check and tha...
We are currently using BizTalk 2006 R2 to build Enterprise Integration solutions. We use BizTalk maps extensively, but when you build a solution in Visual Studio 2005, it produces the following warning against maps: Warning Double-click here to show/hide compiler links. In my opinion, these are not real warnings and ...
In Visual Studio, particularly with older versions like Visual Studio 2005 used for BizTalk 2006 R2, handling warnings can sometimes be a bit cumbersome, especially if they do not have associated warning numbers. Since you are dealing with a non-specific warning that does not show a number and appears to be tied to the...
16,401
[ { "from": "human", "value": "We are currently using BizTalk 2006 R2 to build Enterprise Integration solutions. We use BizTalk maps extensively, but when you build a solution in Visual Studio 2005, it produces the following warning against maps:\n\nWarning Double-click here to show/hide compiler links.\n\nIn...
Does the compiler optimize out any multiplications by 1? That is, consider: int a = 1; int b = 5 * a; Will the expression 5 * a be optimized into just 5? If not, will it if a is defined as: const int a = 1;
Yes, compilers typically optimize out multiplications by constant values, including multiplications by 1, especially in the context of simple expressions like the one you've provided. In your example: ```cpp int a = 1; int b = 5 * a; ``` In this case, since `a` is a variable (not a constant), the compiler may not n...
20,963
[ { "from": "human", "value": "Does the compiler optimize out any multiplications by 1? That is, consider:\nint a = 1;\nint b = 5 * a;\n\nWill the expression 5 * a be optimized into just 5? If not, will it if a is defined as:\nconst int a = 1;\n\n" }, { "from": "gpt", "value": "Yes, compilers typi...
I have a textbox whose input is being handled by jQuery. $('input.Search').bind("keyup", updateSearchTextbox); When I press Enter in the textbox, I get a postback, which messes everything up. How can I trap that Enter and ignore it? (Just to preempt one possible suggestion: The textbox has to be an <asp:textbox ... />...
To prevent the Enter key from causing a postback in an ASP.NET `<asp:TextBox>`, you can handle the `keydown` event and check if the pressed key is Enter. If it is, you can prevent the default action which would trigger the form submission (postback). You can do this by modifying your jQuery code as follows: ```javascr...
22,828
[ { "from": "human", "value": "I have a textbox whose input is being handled by jQuery.\n$('input.Search').bind(\"keyup\", updateSearchTextbox);\n\nWhen I press Enter in the textbox, I get a postback, which messes everything up. How can I trap that Enter and ignore it?\n(Just to preempt one possible suggestio...
Given that Chrome and Safari use webkit has anyone yet found anything that renders differently on Chrome than Safari? Is there any reason at the moment to test sites on both, or would testing Safari be sufficient for right now?
While Chrome and Safari both utilize the WebKit engine for rendering web pages, they are not identical, as Chrome uses a variant called Blink, which was forked from WebKit in 2013. This means that there can be differences in rendering, performance, and support for specific web standards or features. Here are a few poin...
20,420
[ { "from": "human", "value": "Given that Chrome and Safari use webkit has anyone yet found anything that renders differently on Chrome than Safari? Is there any reason at the moment to test sites on both, or would testing Safari be sufficient for right now?\n" }, { "from": "gpt", "value": "While...
Possible Duplicate: C#: How to enumerate an enum? The subject says all. I want to use that to add the values of an enum in a combobox. Thanks vIceBerg
To enumerate the values of an enum in C#, you can use the `Enum.GetValues` method. This allows you to retrieve all the values defined in the enum, which you can then add to a ComboBox. Here’s a step-by-step example: 1. Define your enum. 2. Use `Enum.GetValues` to get the enum values. 3. Add the values to a ComboBox. ...
20,418
[ { "from": "human", "value": "\nPossible Duplicate:\nC#: How to enumerate an enum? \n\nThe subject says all. I want to use that to add the values of an enum in a combobox.\nThanks\nvIceBerg\n" }, { "from": "gpt", "value": "To enumerate the values of an enum in C#, you can use the `Enum.GetValues`...
We plan to redesign, improve our (C#) application architecture. Anyone has some framework, hompage or book recommendations? Mainly concerning the business logic.
Redesigning and improving your application architecture, especially in terms of business logic, is a significant undertaking. Here are several frameworks, resources, and best practices to consider in the context of a C# application: ### Frameworks: 1. **ASP.NET Core**: - Great for building modern web applications ...
17,952
[ { "from": "human", "value": "We plan to redesign, improve our (C#) application architecture.\nAnyone has some framework, hompage or book recommendations?\nMainly concerning the business logic.\n" }, { "from": "gpt", "value": "Redesigning and improving your application architecture, especially in...
I would like to do some condition formatting of strings. I know that you can do some conditional formatting of integers and floats as follows: Int32 i = 0; i.ToString("$#,##0.00;($#,##0.00);Zero"); The above code would result in one of three formats if the variable is positive, negative, or zero. I would like to know...
C# does not directly support conditional formatting for strings in the way that it does for numeric types using format strings. However, you can achieve similar results by using a combination of conditional logic and string interpolation or format strings. In your case, you could streamline the logic using a single l...
21,818
[ { "from": "human", "value": "I would like to do some condition formatting of strings. I know that you can do some conditional formatting of integers and floats as follows:\nInt32 i = 0;\ni.ToString(\"$#,##0.00;($#,##0.00);Zero\");\n\nThe above code would result in one of three formats if the variable is po...
This snippet works well if I try to write in a user directory but as soon as I try to write in Program Files, it just executes silently and the file has not been copied (no exception). If I try to copy the file in C:\ or in C:\Windows I catch an UnauthorizedAccessException. Do you know another way to get the permission...
To write to protected directories such as `C:\Program Files`, your application needs elevated permissions (i.e., it needs to run as an administrator). Here's how you can modify your approach: ### Running as Administrator 1. **Modify Application Manifest**: If you're developing a Windows application, you can add an ap...
18,721
[ { "from": "human", "value": "This snippet works well if I try to write in a user directory but as soon as I try to write in Program Files, it just executes silently and the file has not been copied (no exception). If I try to copy the file in C:\\ or in C:\\Windows I catch an UnauthorizedAccessException.\nD...
.Net contains a nice control called DocumentViewer. it also offers a subcontrol for finding text in the loaded document (that's at least what it is supposed to do). When inserting FixedPage's objects as document source for the DocumentViewer, the find-functionality just does not find anything. Not even single letters. ...
The `DocumentViewer` control in WPF is designed to work primarily with `FlowDocument` and does not fully support text searching with `FixedPage` documents. When you use `FixedPage` as the document source, the find functionality does not work as expected because the `DocumentViewer` relies on a text flow structure that ...
16,403
[ { "from": "human", "value": ".Net contains a nice control called DocumentViewer. it also offers a subcontrol for finding text in the loaded document (that's at least what it is supposed to do).\nWhen inserting FixedPage's objects as document source for the DocumentViewer, the find-functionality just does no...
Java has some very good open source static analysis tools such as FindBugs, Checkstyle and PMD. Those tools are easy to use, very helpful, runs on multiple operating systems and free. Commercial C++ static analysis products are available. Although having such products are great, the cost is just way too much for stude...
Here are some additional open source static analysis tools for C++ that you might find useful: 1. **Clang Static Analyzer** Website: [Clang Static Analyzer](https://clang-analyzer.llvm.org/) Part of the LLVM project, the Clang Static Analyzer is a powerful tool for analyzing C and C++ code. It performs a flo...
19,329
[ { "from": "human", "value": "Java has some very good open source static analysis tools such as FindBugs, Checkstyle and PMD. Those tools are easy to use, very helpful, runs on multiple operating systems and free.\nCommercial C++ static analysis products are available. Although having such products are grea...
Is it possible to unsubscribe an anonymous method from an event? If I subscribe to an event like this: void MyMethod() { Console.WriteLine("I did it!"); } MyEvent += MyMethod; I can un-subscribe like this: MyEvent -= MyMethod; But if I subscribe using an anonymous method: MyEvent += delegate(){Console.WriteLine(...
In C#, when you subscribe an event using an anonymous method (such as a lambda expression or a delegate without a name), you create an instance of that delegate at the time of subscription. Since that instance is anonymous and not assigned to a variable, you have no reference to it afterwards. Therefore, you cannot uns...
16,448
[ { "from": "human", "value": "Is it possible to unsubscribe an anonymous method from an event?\nIf I subscribe to an event like this:\nvoid MyMethod()\n{\n Console.WriteLine(\"I did it!\");\n}\n\nMyEvent += MyMethod;\n\nI can un-subscribe like this:\nMyEvent -= MyMethod;\n\nBut if I subscribe using an ano...
I'm working on a project where I'm trying to avoid hard-coding DB IDs in a .NET service-oriented project. There are some instances where I need to set ID values through code but I don't want to just hard code the IDs since I've done that before and it lead to DB alignment nightmares when the auto-incrementing IDs were ...
To share ID constants across a web service in a .NET service-oriented architecture without hardcoding the values, while also avoiding the issues associated with enums not serializing their values, you have a few options to consider. Here are some approaches that can be effective for your situation: ### 1. **Static Cla...
17,335
[ { "from": "human", "value": "I'm working on a project where I'm trying to avoid hard-coding DB IDs in a .NET service-oriented project. There are some instances where I need to set ID values through code but I don't want to just hard code the IDs since I've done that before and it lead to DB alignment nightm...
If I have a datetime field, how do I get just records created later than a certain time, ignoring the date altogether? It's a logging table, it tells when people are connecting and doing something in our application. I want to find out how often people are on later than 5pm. (Sorry - it is SQL Server. But this coul...
To filter records based on the time portion of a datetime field in SQL Server, you can use the `CAST` or `CONVERT` functions to extract the time and compare it to a specified time (in your case, 5 PM). Here's how you can do it: ### Example SQL Query ```sql SELECT * FROM your_logging_table WHERE CAST(your_datetime_fie...
20,780
[ { "from": "human", "value": "If I have a datetime field, how do I get just records created later than a certain time, ignoring the date altogether?\nIt's a logging table, it tells when people are connecting and doing something in our application. I want to find out how often people are on later than 5pm. ...
How can I run background tasks on App Engine?
Google App Engine provides several options to run background tasks. Here are the most common approaches: ### 1. **Task Queues** Task queues are designed to handle background jobs or tasks asynchronously. You can enqueue tasks in a queue that will be processed later by worker instances. **How to use Task Queues:** - ...
17,875
[ { "from": "human", "value": "How can I run background tasks on App Engine?\n" }, { "from": "gpt", "value": "Google App Engine provides several options to run background tasks. Here are the most common approaches:\n\n### 1. **Task Queues**\nTask queues are designed to handle background jobs or ta...
An advantage by using Windows Authentication is that I do not need to provide a username and password to log into the server as the user currently logged into Windows. But in a specific case I would like to log into the SQL Server as another user, using the same Windows Authenticated ODBC connection. So, the question: ...
Using Windows Authentication for SQL Server typically means that the SQL Server will authenticate the currently logged-in Windows user. However, if you want to connect to SQL Server as a different Windows user without prompting for a username and password, you have a few options, although they do come with certain cave...
20,825
[ { "from": "human", "value": "An advantage by using Windows Authentication is that I do not need to provide a username and password to log into the server as the user currently logged into Windows. But in a specific case I would like to log into the SQL Server as another user, using the same Windows Authenti...
The only working method I found, several years ago, was : Generating ibm-ejb-jar-bnd.xmi and ibm-ejb-jar-ext.xmi for each session bean by using XDoclet (ejbdoclet task) Making a jar (without stubs) with task jar; ; Calling the binary EJBDEPLOY with this jar without stub in parameters. But I feel there must be a cl...
The process you've described for deploying EJBs using XDoclet and IBM's EJBDEPLOY tool is quite common but can indeed feel cumbersome. There are cleaner, more modern approaches to manage EJB deployments that you might consider. Here are a few alternatives: ### 1. **Use Maven with a Plugin** If you're not already usin...
19,667
[ { "from": "human", "value": "The only working method I found, several years ago, was : \n\nGenerating ibm-ejb-jar-bnd.xmi and ibm-ejb-jar-ext.xmi for each session bean by using XDoclet (ejbdoclet task)\nMaking a jar (without stubs) with task jar; ; \nCalling the binary EJBDEPLOY with this jar without stub i...
Just a small SVN "problem" here. I setup my own SVN server Setting up Subversion on Windows Now I made a rep in which all my projects will go. Now, I checked the rep out in a folder called "Projects". Now If I make a project and check it in, that project is revision 1. If I make a second project, and check it in, that ...
In Subversion (SVN), the revision numbering is global to the entire repository, which means that every commit increments the repository's revision number irrespective of which project or directory the commit is made to. Unfortunately, SVN does not support independent revision numbering for different projects within the...
18,740
[ { "from": "human", "value": "Just a small SVN \"problem\" here.\nI setup my own SVN server Setting up Subversion on Windows\nNow I made a rep in which all my projects will go.\nNow, I checked the rep out in a folder called \"Projects\".\nNow If I make a project and check it in, that project is revision 1. I...
I have Java 1.5.0 installed on a Mac OS machine. I have the Java Embedding Plugin 0.9.6.4 installed and java enabled on the preferences panel. When I go to http://java.com/en/download/help/testvm.xml the applet appears blank. Does anyone has an idea of what is happening?
When an applet appears blank in your browser, especially after following the instructions for testing Java installation, it usually indicates a compatibility issue or a configuration problem. Given that you are using Java 1.5.0 and the Java Embedding Plugin 0.9.6.4, here are some steps you can take to troubleshoot and ...
10,678
[ { "from": "human", "value": "I have Java 1.5.0 installed on a Mac OS machine. I have the Java Embedding Plugin 0.9.6.4 installed and java enabled on the preferences panel. When I go to http://java.com/en/download/help/testvm.xml the applet appears blank. Does anyone has an idea of what is happening?\n" },...
I am trying to get the yasnippet and pabbrev packages working together with emacs, but I cannot seem to get any love. How can I get them to play nicely together? The crux of the problem is that pabbrev and yasnippet are binding to the tab keys. Both packages seem to do this fallback when a match isn't found, but they...
To get `yasnippet` and `pabbrev` to work together harmoniously in Emacs, you will need to ensure that they do not interfere with each other’s behavior when using the `TAB` key. Here’s how you can approach this issue: 1. **Unbind TAB for Both Packages**: First, you can unbind the `TAB` key for both `yasnippet` and `pab...
19,300
[ { "from": "human", "value": "I am trying to get the yasnippet and pabbrev packages working together with emacs, but I cannot seem to get any love. How can I get them to play nicely together?\nThe crux of the problem is that pabbrev and yasnippet are binding to the tab keys. Both packages seem to do this f...
Is there a way in Delphi to get the currect application's exe size in one or two lines of code?
Yes, you can retrieve the current application's executable size in Delphi with just a couple of lines of code. Here's a simple way to do it using the `TFile` class from the `System.IOUtils` unit: ```delphi uses System.IOUtils; var ExeSize: Int64; begin ExeSize := TFile.GetSize(ParamStr(0)); // Now ExeSize con...
23,112
[ { "from": "human", "value": "Is there a way in Delphi to get the currect application's exe size in one or two lines of code?\n" }, { "from": "gpt", "value": "Yes, you can retrieve the current application's executable size in Delphi with just a couple of lines of code. Here's a simple way to do i...
I am looking for a way to take a user uploaded image that is currently put in a temporary location ex: /tmp/jkhjkh78 and create a php image from it, autodetecting the format. Is there a more clever way to do this than a bunch of try/catching with imagefromjpeg, imagefrompng, etc?
Yes, there is a more efficient way to handle image uploads and autodetect the format without relying heavily on try/catch statements. You can use the `getimagesize()` function, which retrieves the size and type of an image. Based on the MIME type returned, you can then use the appropriate `imagecreatefrom...()` functio...
17,881
[ { "from": "human", "value": "I am looking for a way to take a user uploaded image that is currently put in a temporary location ex: /tmp/jkhjkh78 and create a php image from it, autodetecting the format.\nIs there a more clever way to do this than a bunch of try/catching with imagefromjpeg, imagefrompng, et...
What advice would you have for someone who wants to start in the BI (Business Intelligence) domain? I where and what I should start with: Books, Blogs, WebCasts... What I should pay attention to and what I should stay away from. Are the Microsoft technologies worth while ?
Getting started in the Business Intelligence (BI) domain can be exciting and rewarding, as it combines data analysis, visualization, and strategic decision-making. Here’s a roadmap to help you navigate your entry into the field: ### 1. **Understanding the Basics of BI** - **Conceptual Framework**: Learn what BI ent...
16,899
[ { "from": "human", "value": "What advice would you have for someone who wants to start in the BI (Business Intelligence) domain? \nI where and what I should start with: Books, Blogs, WebCasts...\nWhat I should pay attention to and what I should stay away from.\nAre the Microsoft technologies worth while ?\n...
On an ASP.NET website, are static classes unique to each web request, or are they instantiated whenever needed and GCed whenever the GC decides to disposed of them? The reason I ask is because I've written some static classes before in C# and the behavior is different than I would have expected. I would have expected s...
In ASP.NET, static classes and static members are indeed shared across all requests. When you create a static class, it is not tied to an individual request; instead, it is loaded once per application domain, which means all requests to your application share the same instance of the static members and methods. This ca...
18,725
[ { "from": "human", "value": "On an ASP.NET website, are static classes unique to each web request, or are they instantiated whenever needed and GCed whenever the GC decides to disposed of them?\nThe reason I ask is because I've written some static classes before in C# and the behavior is different than I wo...
I use the following to get a list of project files that need to be compiled. Each project is stored in a subdirectory of the projects directory. <ItemGroup> <dprs Include="c:\projects\**\*.dpr" /> </ItemGroup> Is there a task that I can use to extract to extract the directory that each project file is in? I...
In MSBuild, you can achieve your goal of extracting the directory from each `.dpr` file without needing to write a custom task. You can use built-in properties and the `Transform` method to extract the directory paths of the `.dpr` files. Here's how you can do it: ```xml <Project xmlns="http://schemas.microsoft.com/de...
20,939
[ { "from": "human", "value": "I use the following to get a list of project files that need to be compiled. Each project is stored in a subdirectory of the projects directory.\n<ItemGroup>\n <dprs Include=\"c:\\projects\\**\\*.dpr\" /> \n</ItemGroup>\n\nIs there a task that I can use to extract to ext...
I have a poorly designed database. One of the most important tables has 11,000+ entries. We would like to expand our system, and I am wondering if this table grew to 5x its size, would this be a problem? It's 15360 kB in size... if that matters. I'm using phpMyAdmin, the server is a Fedora Linux box (nothing fancy), T...
When considering the growth of a database table, several factors come into play, especially when you're thinking about a potential increase to 55,000+ entries (5x the current size of 11,000+ entries). Here are some considerations regarding whether this could pose a problem: 1. **Size and Performance**: - Your curre...
19,798
[ { "from": "human", "value": "I have a poorly designed database. One of the most important tables has 11,000+ entries. We would like to expand our system, and I am wondering if this table grew to 5x its size, would this be a problem? It's 15360 kB in size... if that matters.\n\nI'm using phpMyAdmin, the serv...
Routines can have parameters, that's no news. You can define as many parameters as you may need, but too many of them will make your routine difficult to understand and maintain. Of course, you could use a structured variable as a workaround: putting all those variables in a single struct and passing it to the routine....
Determining when a parameter list is "too big" can be somewhat subjective and context-dependent. However, there are several guidelines and best practices to consider that can help you evaluate the complexity of your function's parameters: 1. **Cognitive Load**: As a general rule of thumb, if a function takes more than...
20,334
[ { "from": "human", "value": "Routines can have parameters, that's no news. You can define as many parameters as you may need, but too many of them will make your routine difficult to understand and maintain.\nOf course, you could use a structured variable as a workaround: putting all those variables in a si...
What are the best approaches / tools to test browser extensions? In my case I work on an IE Browser Helper Object (C#) which has a small UI of its own and a good deal of database interaction. Up till now we've used automated unit tests for testing our model/business objects but manual testing for the UI/scenario testin...
Testing browser extensions can be quite challenging due to their interaction with the browser environment and the complexity of UI components. Here are some best practices and tools you might consider for testing your Internet Explorer Browser Helper Object (BHO), as well as general guidance that applies to other brows...
12,288
[ { "from": "human", "value": "What are the best approaches / tools to test browser extensions?\nIn my case I work on an IE Browser Helper Object (C#) which has a small UI of its own and a good deal of database interaction. Up till now we've used automated unit tests for testing our model/business objects but...
I know I could just ask, but that would involve bureaucratic entanglements.
I understand your desire to avoid bureaucracy! How can I assist you more efficiently? Feel free to ask your question directly, and I'll do my best to provide the information you need.
24,865
[ { "from": "human", "value": "I know I could just ask, but that would involve bureaucratic entanglements.\n" }, { "from": "gpt", "value": "I understand your desire to avoid bureaucracy! How can I assist you more efficiently? Feel free to ask your question directly, and I'll do my best to provide ...
What version control systems have you used to manage projects developed with Visual Studio (2005)? What would you recommend and Why? What limitations have you found with your top rated version control system?
When managing projects developed with Visual Studio 2005, several version control systems can be utilized effectively. Here are some of the popular options along with recommendations and their limitations: ### 1. **Subversion (SVN)** - **Recommendation**: SVN is a centralized version control system that can be easi...
16,450
[ { "from": "human", "value": "What version control systems have you used to manage projects developed with Visual Studio (2005)? What would you recommend and Why? What limitations have you found with your top rated version control system? \n" }, { "from": "gpt", "value": "When managing projects ...
I am trying to open a report in Crystal Report 11 Designer (product version 11.5.8.826), but it seems to freeze up. This report use to work fine, but today the client could not load the report. I also tried to open the report on another developer's workstation, with the same result. Has this happened to anyone else?
It sounds frustrating to experience freezing issues with Crystal Reports, especially when it has been functioning properly in the past. Here are several steps you can take to troubleshoot and potentially resolve the issue: 1. **Check for Corruption**: Sometimes reports can become corrupted. If you have a backup of the...
20,666
[ { "from": "human", "value": "I am trying to open a report in Crystal Report 11 Designer (product version 11.5.8.826), but it seems to freeze up. This report use to work fine, but today the client could not load the report.\nI also tried to open the report on another developer's workstation, with the same re...
I've defined a view with the CCK and View 2 modules. I would like to quickly define a template specific to this view. Is there any tutorial or information on this? What are the files I need to modify? Here are my findings: (Edited) In fact, there are two ways to theme a view: the "field" way and the "node" way. In "ed...
You're on the right track with your findings about theming in Views, specifically when using the Views 2 module along with CCK in Drupal. Let’s summarize the key aspects of theming for both the "Node" and "Field" row styles, as well as outline the steps and files you might need to modify. ### Theming Views in Drupal ...
17,365
[ { "from": "human", "value": "I've defined a view with the CCK and View 2 modules. I would like to quickly define a template specific to this view. Is there any tutorial or information on this? What are the files I need to modify?\n\nHere are my findings: (Edited)\nIn fact, there are two ways to theme a view...
I want to use implicit linking in my project , and nmake really wants a .def file . The problem is , that this is a class , and I don't know what to write in the exports section . Could anyone point me in the right direction ? The error message is the following : NMAKE : U1073: don't know how to make 'DLLCLASS.def' P....
When you're working with implicit linking in a DLL and you need a `.def` file, you must specify which functions or classes to export. In the case of exporting a class, it's common to export the class itself and potentially its methods. ### Creating a `.def` file Here is a simple template for a `.def` file that you ca...
20,070
[ { "from": "human", "value": "I want to use implicit linking in my project , and nmake really wants a .def file . The problem is , that this is a class , and I don't know what to write in the exports section .\nCould anyone point me in the right direction ?\nThe error message is the following :\nNMAKE : U10...
I'm using the Ajax.Autocompleter class from the Prototype/Scriptaculous library which calls an ASP.NET WebHandler which creates an unordered list with list items that contain suggestions. Now I'm working on a page where you can add suggestions to a 'stop words' table, which means that if they occur in the table, they w...
To achieve the desired functionality of refreshing the suggestions after a stop word is added, while also ensuring that the previous or next suggestion is selected, you can follow these steps: 1. **Modify the `deleteWord` function** to handle the following: - Capture the clicked list item's position (index). - C...
15,249
[ { "from": "human", "value": "I'm using the Ajax.Autocompleter class from the Prototype/Scriptaculous library which calls an ASP.NET WebHandler which creates an unordered list with list items that contain suggestions.\nNow I'm working on a page where you can add suggestions to a 'stop words' table, which mea...
What is the best database schema to track role-based access controls for a web application? I am using Rails, but the RBAC plugin linked by Google looks unmaintained (only 300 commits to SVN; latest was almost a year ago). The concept is simple enough to implement from scratch, yet complex and important enough that it'...
When implementing Role-Based Access Control (RBAC) in a web application using Rails, it's important to have a flexible and scalable database schema. Below is a recommended database schema along with some considerations on how to implement RBAC effectively. ### Recommended Database Schema 1. **Users Table**: This tabl...
17,416
[ { "from": "human", "value": "What is the best database schema to track role-based access controls for a web application?\nI am using Rails, but the RBAC plugin linked by Google looks unmaintained (only 300 commits to SVN; latest was almost a year ago).\nThe concept is simple enough to implement from scratch...
This is a pretty-much theoretical question, but.. How much of an operating system could be written in a language like Python, Ruby, Perl, or Lisp, Haskell etc? It seems like a lot of the stuff like init.d could trivially be done in a scripting language. One of the firewall-device-OS's (m0n0wall) uses PHP for its system...
Theoretically, a significant portion of an operating system could be written in high-level scripting languages like Python, Ruby, Perl, Lisp, or Haskell. However, there are practical considerations that limit their use in certain critical components of an OS. Here’s a breakdown of how much could potentially be implemen...
17,552
[ { "from": "human", "value": "This is a pretty-much theoretical question, but..\nHow much of an operating system could be written in a language like Python, Ruby, Perl, or Lisp, Haskell etc?\nIt seems like a lot of the stuff like init.d could trivially be done in a scripting language. One of the firewall-dev...
I'm just starting up a new ATL/WTL project and I was wondering if the global _Module variable is still required? Back a few years when I started working with WTL it was required (at least for ATL 3.0) that you define a global variable such as: CAppModule _Module; To get ATL to work correctly. But recently I've read s...
In modern ATL and WTL projects, the use of the global `_Module` variable is still prevalent, particularly if your application involves COM components or services that require registration and proper initialization. The `_Module` variable is an instance of `CAppModule`, which is crucial for managing the lifetime of the ...
20,173
[ { "from": "human", "value": "I'm just starting up a new ATL/WTL project and I was wondering if the global _Module variable is still required? \nBack a few years when I started working with WTL it was required (at least for ATL 3.0) that you define a global variable such as:\nCAppModule _Module;\n\nTo get AT...
Just wondering why people like case sensitivity in a programming language? I'm not trying to start a flame war just curious thats all. Personally I have never really liked it because I find my productivity goes down when ever I have tried a language that has case sensitivity, mind you I am slowly warming up/getting use...
Case sensitivity in programming languages is a topic that has passionate proponents and critics. Here are some reasons why many developers appreciate case sensitivity: 1. **Clarity and Readability**: Case sensitivity can help differentiate between different variables, functions, or classes. For example, `userName`, `U...
20,604
[ { "from": "human", "value": "Just wondering why people like case sensitivity in a programming language? I'm not trying to start a flame war just curious thats all.\nPersonally I have never really liked it because I find my productivity goes down when ever I have tried a language that has case sensitivity, m...
How do you use the LEFT function (or an equivalent) on a SQL Server NTEXT column? Basically I'm building a GridView and I just want to return the first 100 or so characters from the Description column which is NTEXT.
In SQL Server, the `NTEXT` data type is deprecated, and it's recommended to use `NVARCHAR(max)` instead. However, if you're working with an `NTEXT` column and want to retrieve the first 100 characters, you cannot use the `LEFT` function directly on it since `NTEXT` does not support such string manipulation functions di...
22,280
[ { "from": "human", "value": "How do you use the LEFT function (or an equivalent) on a SQL Server NTEXT column?\nBasically I'm building a GridView and I just want to return the first 100 or so characters from the Description column which is NTEXT. \n" }, { "from": "gpt", "value": "In SQL Server, ...
I need a simple table with a user name and password field in MySQL. Since user names must be unique, it makes sense to me to make them the primary key. Is it better to use CHAR() or VARCHAR() as a primary key?
When designing a MySQL table for user names and passwords where the user name is a unique identifier (primary key), you can choose between using `CHAR()` or `VARCHAR()`. Each has its own advantages and considerations: ### CHAR vs. VARCHAR - **CHAR**: - Fixed length. When you define a `CHAR(n)`, it will always use ...
17,713
[ { "from": "human", "value": "I need a simple table with a user name and password field in MySQL. Since user names must be unique, it makes sense to me to make them the primary key.\nIs it better to use CHAR() or VARCHAR() as a primary key? \n" }, { "from": "gpt", "value": "When designing a MySQL...
I've never used the Global Temporary Tables however I have some questions how they will work in a php environment. How is data shared: Assuming persistent connections to oracle through php using oci8. Is the data tied to a database id? is it done based on the Apache httpd demons? Or is each individual request unique?...
Global Temporary Tables (GTTs) in Oracle are a useful feature for managing session-specific or transaction-specific data. Here's how they work in a PHP environment, particularly with persistent connections using the OCI8 extension. ### Data Sharing in PHP with Global Temporary Tables 1. **Persistence and Connection P...
13,346
[ { "from": "human", "value": "I've never used the Global Temporary Tables however I have some questions how they will work in a php environment.\nHow is data shared: Assuming persistent connections to oracle through php using oci8. Is the data tied to a database id? is it done based on the Apache httpd demo...
I'm probably asking for the world, but is there any Windows-based software for easily managing lots of tasks/projects and all the associated documents (spreadsheets, Word documents, other files) that can be quickly navigated/searched. I deal with probably 10-20 active projects and tasks, some lasting only a day or so,...
It sounds like you're looking for a comprehensive task and project management solution that also integrates well with file management in Windows. While there may not be a single application that fulfills every requirement you've mentioned, there are several options that could help streamline your workflow and improve o...
16,190
[ { "from": "human", "value": "I'm probably asking for the world, but is there any Windows-based software for easily managing lots of tasks/projects and all the associated documents (spreadsheets, Word documents, other files) that can be quickly navigated/searched. \nI deal with probably 10-20 active projects...
Like the title says, how do you create custom code snippets in Visual Studio 2008?
Creating custom code snippets in Visual Studio 2008 involves a few steps. Here's how you can do it: ### Step 1: Create a Code Snippet XML File 1. **Open a text editor** (like Notepad) and create a new file. 2. **Write the XML code** for your snippet. The basic structure of a code snippet looks like this: ```xml ...
18,845
[ { "from": "human", "value": "Like the title says, how do you create custom code snippets in Visual Studio 2008?\n" }, { "from": "gpt", "value": "Creating custom code snippets in Visual Studio 2008 involves a few steps. Here's how you can do it:\n\n### Step 1: Create a Code Snippet XML File\n\n1....
Is there a way to deploy a given war file on Tomcat server? I want to do this without using the web interface.
Yes, you can deploy a WAR file on a Tomcat server without using the web interface (Manager App) by following these steps: ### Method 1: Deploying Using the Command Line 1. **Copy the WAR File**: You can use the command line to copy the WAR file directly into the `webapps` directory of your Tomcat installation. Fo...
19,689
[ { "from": "human", "value": "Is there a way to deploy a given war file on Tomcat server? I want to do this without using the web interface.\n" }, { "from": "gpt", "value": "Yes, you can deploy a WAR file on a Tomcat server without using the web interface (Manager App) by following these steps:\n...
I want to let the users of my app, which is in turn an app container (app contains subapps), add java jars to their jython path. I let the subapp managers write thir own extensions in jython, but some of the functionality they want to add needs additional jars. For example, if they want to check a svn repo, they need t...
In Jython, you can indeed modify the `sys.path` to include directories that contain Python modules, but handling JAR files requires a different approach since Jython needs to load Java classes from those JARs. Here’s how you can add JAR files to the classpath dynamically at runtime. ### Steps to Add JARs to Jython Cla...
18,877
[ { "from": "human", "value": "I want to let the users of my app, which is in turn an app container (app contains subapps), add java jars to their jython path.\nI let the subapp managers write thir own extensions in jython, but some of the functionality they want to add needs additional jars. For example, if ...
Is it possible to convert UTF8 string in a std::string to std::wstring and vice versa in a platform independent manner? In a Windows application I would use MultiByteToWideChar and WideCharToMultiByte. However, the code is compiled for multiple OSes and I'm limited to standard C++ library.
Yes, it is possible to convert between `std::string` (which contains UTF-8 encoded strings) and `std::wstring` (which is typically used for wide character strings) in a platform-independent manner using standard C++ features. While `std::wstring` does not inherently support UTF-8, you can handle this using the C++ stan...
16,261
[ { "from": "human", "value": "Is it possible to convert UTF8 string in a std::string to std::wstring and vice versa in a platform independent manner? In a Windows application I would use MultiByteToWideChar and WideCharToMultiByte. However, the code is compiled for multiple OSes and I'm limited to standard C...
I'm writing a photo gallery webapp for a friend's wedding and they want a photo gallery for guests to submit the digital photos they take on the day. After evaluating all the options, I've decided the easiest thing for users would be to let them use a familiar interface (their email) and just have them send in the pic...
Setting up a system to automatically retrieve email attachments for your photo gallery web application is a great approach. You can utilize popular libraries in different programming languages to connect to your email mailbox, fetch emails, and process attachments. Here's a high-level overview of how you can achieve th...
13,864
[ { "from": "human", "value": "I'm writing a photo gallery webapp for a friend's wedding and they want a photo gallery for guests to submit the digital photos they take on the day. \nAfter evaluating all the options, I've decided the easiest thing for users would be to let them use a familiar interface (their...
I have a Microsoft Access database query that I'm trying to import into a Visual Studio 2005 dataset. When the query is formed using an NZ() function like this: SELECT NZ(tblComponentSpecs.nPurchaseCostQuantity, 0) AS Quantity FROM tblComponentSpecs; it appears under the Functions list in the Data Connection. However,...
In Microsoft Access, the way you construct your SQL queries can influence how the queries are categorized or represented when you connect to the database from an application like Visual Studio. 1. **NZ() Function:** - The `NZ()` function is a specialized function in Access designed to handle null values. When you c...
20,617
[ { "from": "human", "value": "I have a Microsoft Access database query that I'm trying to import into a Visual Studio 2005 dataset.\nWhen the query is formed using an NZ() function like this:\nSELECT NZ(tblComponentSpecs.nPurchaseCostQuantity, 0) AS Quantity\nFROM tblComponentSpecs;\n\nit appears under the F...
I'm trying to call a php webservice using WCF. I googled some public php services to see if I could replicate the error I was receiving and I created 2 different unit tests to demonstrate. The test that failed I get the following error: System.ServiceModel.ProtocolException: The content type text/xml; charset=ISO-8859...
The issue you're experiencing in your WCF client calling the PHP web service is primarily related to how the response content type is being handled. Let’s break down the key points and potential solutions: ### Understanding the Error The error message you’re seeing: ``` System.ServiceModel.ProtocolException: The con...
17,984
[ { "from": "human", "value": "I'm trying to call a php webservice using WCF. I googled some public php services to see if I could replicate the error I was receiving and I created 2 different unit tests to demonstrate. \nThe test that failed I get the following error:\nSystem.ServiceModel.ProtocolException: ...
I can get the executable location from the process, how do I get the icon from file? Maybe use windows api LoadIcon(). I wonder if there is .NET way...
To extract the icon from an executable file in .NET, you can use the `Icon.ExtractAssociatedIcon` method, which is a simple and straightforward way to get the icon associated with a file. Here's an example of how you can do this: ```csharp using System; using System.Drawing; using System.Drawing.Imaging; using System...
19,927
[ { "from": "human", "value": "I can get the executable location from the process, how do I get the icon from file?\nMaybe use windows api LoadIcon(). I wonder if there is .NET way...\n" }, { "from": "gpt", "value": "To extract the icon from an executable file in .NET, you can use the `Icon.Extrac...
My company currently has a transactional db running on Sql Server 2005. We are going to add a MySql (running on linux) reporting db. We'll need to get replication running from the MS-Sql db to the MySql db. It doesn't have to be real time but should be within a few minutes. I've got pretty good MSSql Dev skills and so-...
Setting up ongoing replication from SQL Server to MySQL is certainly feasible, and you have several options. Since you already have a good grasp of SQL Server and are looking for a way to implement this, here are a few suggestions: ### 1. SQL Server Integration Services (SSIS) Using SSIS is a solid approach. You can ...
15,776
[ { "from": "human", "value": "My company currently has a transactional db running on Sql Server 2005. We are going to add a MySql (running on linux) reporting db. We'll need to get replication running from the MS-Sql db to the MySql db. It doesn't have to be real time but should be within a few minutes.\nI'v...
The reason I want to do this is to make it easy to parse out instructions that are emailed to a bot, the kind of thing majordomo might do to parse commands like subscribing and unsubscribing. It turns out there are a lot of crazy formats and things to deal with, like quoted text, distinguishing between header and body...
Creating a parser for instructions sent via email can indeed be a complex task, given the variety of email formats and potential content. While Perl is a strong choice due to its text processing capabilities, you might also consider solutions in other languages like Python or Ruby, which have rich libraries for handlin...
15,085
[ { "from": "human", "value": "The reason I want to do this is to make it easy to parse out instructions that are emailed to a bot, the kind of thing majordomo might do to parse commands like subscribing and unsubscribing. It turns out there are a lot of crazy formats and things to deal with, like quoted tex...
I´m not sure if this is really a programming question, but it's related to what I'm doing which is... I'm developing a web site that will have a lot of .domain.com, and based on what contain, the web site will show diffrent content. Anyone knows how to do that? Maybe it requires changes in the DNS server.
To create a website that serves different content based on subdomains (e.g., `subdomain1.domain.com`, `subdomain2.domain.com`), you typically don't need to make any changes to your DNS server beyond setting up the necessary DNS records. The key steps you'll need to take are: ### 1. Configure DNS Records 1. **Wildcard...
17,485
[ { "from": "human", "value": "I´m not sure if this is really a programming question, but it's related to what I'm doing which is... I'm developing a web site that will have a lot of .domain.com, and based on what contain, the web site will show diffrent content.\nAnyone knows how to do that? Maybe it requir...
I have a simple "accordion" type page containing a list of H3 headers and DIV content boxes (each H3 is followed by a DIV). On this page I start with all DIVs hidden. When a H3 is clicked the DIV directly below (after) is revealed with jQuery's "slideDown" function while all other DIVs are hidden with the "slideUp" f...
You're correct that inline styles typically take precedence over styles defined in stylesheets. However, you can override inline styles using the `!important` declaration in your CSS. This is useful for your case where you want to make all DIVs visible when printing. Here’s a way to achieve what you want using CSS med...
19,248
[ { "from": "human", "value": "I have a simple \"accordion\" type page containing a list of H3 headers and DIV content boxes (each H3 is followed by a DIV). On this page I start with all DIVs hidden. When a H3 is clicked the DIV directly below (after) is revealed with jQuery's \"slideDown\" function while a...
I have a query to monitor SGA (non-)utilisation: select sum(bytes)/1024/1024 " SGA Free " from v$sgastat where name='free memory'; That's great, but I need more detail about what exactly is using the space. Essentially, I'm looking for clues to tell me more precisely what might be wrong with this (rather large applica...
Monitoring the System Global Area (SGA) can indeed help identify potential issues in your Oracle Database environment. To get more insight into what is using the SGA and help you understand its components better, you can leverage `v$sgastat` alongside other views and queries. ### Understanding `v$sgastat` The `v$sgas...
16,195
[ { "from": "human", "value": "I have a query to monitor SGA (non-)utilisation:\nselect sum(bytes)/1024/1024 \" SGA Free \" from v$sgastat where name='free memory';\n\nThat's great, but I need more detail about what exactly is using the space. Essentially, I'm looking for clues to tell me more precisely what ...
I want to enforce that date-times that are entered fall between 9am and 5pm. How do I enforce this with ORACLE CHECK constraints?
In Oracle, you can use a `CHECK` constraint to enforce that a date-time value falls within a specific range, such as between 9 AM and 5 PM. To do this, you would typically create a constraint on the table that holds the date-time column. Here’s how you can define such a constraint. Assuming you have a table named `you...
19,965
[ { "from": "human", "value": "I want to enforce that date-times that are entered fall between 9am and 5pm. How do I enforce this with ORACLE CHECK constraints?\n" }, { "from": "gpt", "value": "In Oracle, you can use a `CHECK` constraint to enforce that a date-time value falls within a specific r...
A friend and I are about to embark on creating a machine that performs some image comparison for sorting. I know about histogram comparison and am generally confident that a small grid of histograms per image precalculated and stored in columns in a database table will generally give us pretty good matches on the firs...
It's great to hear that you're embarking on a project involving image comparison for sorting. Let's break down your questions and considerations regarding histogram comparisons and Color Coherence Vectors (CCV). ### Existing Implementations 1. **C# Implementations of CCV**: - As of my last update, specific implem...
17,181
[ { "from": "human", "value": "A friend and I are about to embark on creating a machine that performs some image comparison for sorting. I know about histogram comparison and am generally confident that a small grid of histograms per image precalculated and stored in columns in a database table will generall...
I'm trying to get this simple PowerShell script working, but I think something is fundamentally wrong. ;-) ls | ForEach { "C:\Working\tools\custom-tool.exe" $_ } I basically want to get files in a directory, and pass them one by one as arguments to the custom tool.
It looks like you're trying to pass each file from a directory to a custom tool using PowerShell, but there's a small syntax issue in your script. You need to use the `-File` parameter in your `ls` command (which is an alias for `Get-ChildItem`) to make sure that you're working with files. Additionally, you need to mak...
18,411
[ { "from": "human", "value": "I'm trying to get this simple PowerShell script working, but I think something is fundamentally wrong. ;-)\nls | ForEach { \"C:\\Working\\tools\\custom-tool.exe\" $_ }\n\nI basically want to get files in a directory, and pass them one by one as arguments to the custom tool.\n" ...
Are there any good packages or methods for doing extensive CRUD (create-retrieve-update-delete) interfaces in the Turbogears framework. The FastDataGrid widget is too much of a black box to be useful and CRUDTemplate looks like more trouble than rolling my own. Ideas? Suggestions?
When working with TurboGears for implementing CRUD interfaces, you do have several options available, aside from FastDataGrid and CRUDTemplate, especially if you're looking for more control over your implementation. Here are some suggestions and methodologies you might find useful: 1. **Custom Controllers and Views**:...
19,023
[ { "from": "human", "value": "Are there any good packages or methods for doing extensive CRUD (create-retrieve-update-delete) interfaces in the Turbogears framework. The FastDataGrid widget is too much of a black box to be useful and CRUDTemplate looks like more trouble than rolling my own. Ideas? Suggestion...
I have a number of data classes representing various entities. Which is better: writing a generic class (say, to print or output XML) using generics and interfaces, or writing a separate class to deal with each data class? Is there a performance benefit or any other benefit (other than it saving me the time of writing...
When deciding whether to use a generic class with interfaces or to create separate classes for each data entity, you should consider several factors, including code maintainability, performance, flexibility, and scalability. Here are some points to help you make an informed decision: ### Generic Class with Interfaces ...
14,376
[ { "from": "human", "value": "I have a number of data classes representing various entities. \nWhich is better: writing a generic class (say, to print or output XML) using generics and interfaces, or writing a separate class to deal with each data class?\nIs there a performance benefit or any other benefit (...
I'm using wget to connect to a secure site like this: wget -nc -i inputFile where inputeFile consists of URLs like this: https://clientWebsite.com/TheirPageName.asp?orderValue=1.00&merchantID=36&programmeID=92&ref=foo&Ofaz=0 This page returns a small gif file. For some reason, this is taking around 2.5 minutes. When ...
There are several potential reasons why `wget` might be taking significantly longer than your web browser to retrieve a page or resource. Here are some factors to consider: 1. **HTTP Headers**: Browsers send different HTTP headers than `wget` by default. Some servers might have optimizations for browsers (like caching...
9,759
[ { "from": "human", "value": "I'm using wget to connect to a secure site like this:\nwget -nc -i inputFile\nwhere inputeFile consists of URLs like this:\nhttps://clientWebsite.com/TheirPageName.asp?orderValue=1.00&merchantID=36&programmeID=92&ref=foo&Ofaz=0\nThis page returns a small gif file. For some reas...
We've got some code that uses LoadLibrary and GetProcAddress to implement a plugin architecture for one of our products. We ensure that the DLL about to be loaded is signed with our code-signing key. We're changing the plugin architecture to use COM instead. Is there a way to enforce code-signing (preferably with our c...
When transitioning from a plugin architecture based on `LoadLibrary` and `GetProcAddress` to a COM-based architecture, enforcing code signing for COM objects is not as straightforward as it is for DLLs. However, there are ways to achieve similar security assurances. Here are a few strategies you might consider: ### 1....
18,182
[ { "from": "human", "value": "We've got some code that uses LoadLibrary and GetProcAddress to implement a plugin architecture for one of our products. We ensure that the DLL about to be loaded is signed with our code-signing key.\nWe're changing the plugin architecture to use COM instead. Is there a way to e...
I'm trying out the recorder of the latest Selenium IDE Firefox extension on win32/ff3. On one page, currently I have to hit Enter to go to the next page, but it's not on a submit button, it's captured manually. This is not picked up by the recorder. I know I can enter it manually myself after recording, but why isn't...
The Selenium IDE recorder is designed to capture interactions with web elements that are generally considered typical user actions, such as clicking buttons or links. However, when it comes to keyboard actions like pressing "Enter," the recorder may not capture them if they do not involve a direct interaction with an e...
20,383
[ { "from": "human", "value": "I'm trying out the recorder of the latest Selenium IDE Firefox extension on win32/ff3.\nOn one page, currently I have to hit Enter to go to the next page, but it's not on a submit button, it's captured manually. This is not picked up by the recorder. I know I can enter it manu...
Is it possible to connect PHP to a SQL Server Compact Edition database? What would be the best driver? I need it for a desktop application where SQL Server Express is too heavy.
Yes, it is possible to connect PHP to a SQL Server Compact Edition (SQL Server CE) database, although it's not as straightforward as connecting to other databases like MySQL or SQL Server Express. SQL Server Compact Edition is a lightweight, embedded database that is often used in desktop applications. Here are the opt...
19,513
[ { "from": "human", "value": "Is it possible to connect PHP to a SQL Server Compact Edition database? What would be the best driver?\n\nI need it for a desktop application where SQL Server Express is too heavy.\n" }, { "from": "gpt", "value": "Yes, it is possible to connect PHP to a SQL Server Co...
After using AS2 for several years, I'm getting started with writing applications in AS3 (Flash9/Flash10). I've come to the point where I need some full sets of GUI components, and I need to decide which set I'm going to use. Back in the AS2 days, the built in components included with flash were pretty crappy - bloated ...
When transitioning from AS2 to AS3 and looking for suitable GUI components, it's important to weigh the pros and cons of the options available to you. Let's evaluate the options you mentioned: ### 1. CS3 Components - **Pros:** - Comes with a variety of built-in components that are optimized for AS3. - Generally m...
15,798
[ { "from": "human", "value": "After using AS2 for several years, I'm getting started with writing applications in AS3 (Flash9/Flash10). I've come to the point where I need some full sets of GUI components, and I need to decide which set I'm going to use. Back in the AS2 days, the built in components included...
In our web-app we use PHP5.2.6 + PDO to connect to a SQL Server 2005 database and store Russian texts. Database collation is Cyrillic_General_CI_AS, table collation is Cyrillic_General_CI_AS, column type is NVARCHAR(MAX). We tried connecting to a database using two following schemes, both causing different problems. P...
To address your issues with connecting to SQL Server 2005 using PHP PDO while storing and retrieving Russian text, you need to consider a few important factors regarding character encoding, connection method, and data types. Here's a breakdown of your options and recommendations: ### Connection Method #### 1. Using `...
17,805
[ { "from": "human", "value": "In our web-app we use PHP5.2.6 + PDO to connect to a SQL Server 2005 database and store Russian texts.\nDatabase collation is Cyrillic_General_CI_AS, table collation is Cyrillic_General_CI_AS, column type is NVARCHAR(MAX).\nWe tried connecting to a database using two following s...
I'm fairly new to the AJAX methodologies (I only recently discovered jQuery a short time ago). I am interested to know if there is anyway to authenticate a user on a PHP setup; securely. Does jQuery have any special options to allow use of HTTPS (or any other way to encrypt my ajax call)? Yes, I could very well just po...
Welcome to the world of AJAX and jQuery! It’s great that you're diving into this. Securely authenticating users in a PHP setup while using AJAX can definitely be achieved. Here’s how you can approach it step-by-step, including handling the use of HTTPS and secure practices for authentication. ### 1. Use HTTPS First a...
15,595
[ { "from": "human", "value": "I'm fairly new to the AJAX methodologies (I only recently discovered jQuery a short time ago). I am interested to know if there is anyway to authenticate a user on a PHP setup; securely.\nDoes jQuery have any special options to allow use of HTTPS (or any other way to encrypt my ...
I'm looking for a plugin or way to simply go from any namespace, type, method, property, etc in my .Net code to the MSDN page that covers it via a context menu item or hyperlink-like mechanism. Does anyone know of anything that will do that? The "Go to Definition" option when you right click almost covers this, but ...
If you're using Visual Studio 2005 and are looking for a way to navigate to MSDN documentation directly from your code, there are a few options you might consider. Unfortunately, VS2005 is quite dated, and many modern extensions and tools might not support it. However, here are a few suggestions: ### 1. **Using the "H...
19,134
[ { "from": "human", "value": "I'm looking for a plugin or way to simply go from any namespace, type, method, property, etc in my .Net code to the MSDN page that covers it via a context menu item or hyperlink-like mechanism. Does anyone know of anything that will do that? \nThe \"Go to Definition\" option w...
I have a Ruby on Rails application that I'm writing where a user has the option to edit an invoice. They need to be able to reassign the order of the rows. Right now I have an index column in the db which is used as the default sort mechanism. I just exposed that and allowed the user to edit it. This is not very...
To implement drag-and-drop functionality for table rows in your Ruby on Rails application, you can use jQuery UI, which provides an easy way to make table rows sortable. Here’s a step-by-step approach to achieve this, including how to handle the reordering efficiently and using RJS (Rails' JavaScript responses). ### S...
16,035
[ { "from": "human", "value": "I have a Ruby on Rails application that I'm writing where a user has the option to edit an invoice. They need to be able to reassign the order of the rows. Right now I have an index column in the db which is used as the default sort mechanism. I just exposed that and allowed...
I create a header file from an IDL . The IDL file has been compiled in Visual C++ 2005 . The generated header file contains #define REQUIRED_RPCNDR_H_VERSION 475 . I tried to use this header file in Visual Studio 2003 , where rpcndr.h contains { #define RPCNDR_H_VERSION ( 450 ) // ...
When you encounter a version mismatch between the `rpcndr.h` headers in different versions of Visual Studio, there are a few potential solutions to work around the issue. However, do note that these solutions may not guarantee that your application will work correctly, as there may be other dependencies on the function...
19,669
[ { "from": "human", "value": "I create a header file from an IDL . The IDL file has been compiled in Visual C++ 2005 .\nThe generated header file contains #define REQUIRED_RPCNDR_H_VERSION 475 . \nI tried to use this header file in Visual Studio 2003 , where rpcndr.h contains \n{\n#define RPCNDR_H_VERSION ...
Assuming a MySQL datastore, when would you NOT want to use memcached in a Ruby on Rails app?
Using memcached in a Ruby on Rails application can significantly enhance performance by caching database query results, view fragments, and other data. However, there are scenarios where it may not be beneficial or necessary to use memcached: 1. **Simple Applications**: If your application is relatively simple with mi...
19,033
[ { "from": "human", "value": "Assuming a MySQL datastore, when would you NOT want to use memcached in a Ruby on Rails app?\n" }, { "from": "gpt", "value": "Using memcached in a Ruby on Rails application can significantly enhance performance by caching database query results, view fragments, and o...
Is it possible to convert an existing WPF Application to SilverLight automatically/with minimal effort?
Converting a WPF application to Silverlight is not a straightforward process, as both platforms have different capabilities, performance characteristics, and design principles. Silverlight is a lightweight, browser-based technology, while WPF is a full-fledged desktop application framework. However, here are some cons...
20,130
[ { "from": "human", "value": "Is it possible to convert an existing WPF Application to SilverLight automatically/with minimal effort?\n" }, { "from": "gpt", "value": "Converting a WPF application to Silverlight is not a straightforward process, as both platforms have different capabilities, perfo...
I've been reading a lot lately about the next release of Java possibly supporting closures. I feel like I have a pretty firm grasp on what closures are, but I can't think of a solid example of how they would make an Object-Oriented language "better". Can anyone give me a specific use-case where a closure would be nee...
Closures can significantly enhance the expressiveness and flexibility of an object-oriented language like Java, especially in scenarios involving functional programming concepts. Here's a specific use case where closures would be preferred: **event handling and callbacks**. ### Use Case: Event Handling Imagine you're...
18,830
[ { "from": "human", "value": "I've been reading a lot lately about the next release of Java possibly supporting closures. I feel like I have a pretty firm grasp on what closures are, but I can't think of a solid example of how they would make an Object-Oriented language \"better\". Can anyone give me a spe...
Does anyone know of a way to find out how much memory an instance of an object is taking? For example, if I have an instance of the following object: TestClass tc = new TestClass(); Is there a way to find out how much memory the instance tc is taking? The reason for asking, is that although C# has built in memory mana...
In C#, determining the exact memory usage of an individual object instance, such as `TestClass tc = new TestClass();`, can be challenging due to the way the .NET runtime manages memory. However, there are a few approaches you can use to estimate the memory footprint of an object. ### 1. Using the `System.Runtime.Inter...
15,532
[ { "from": "human", "value": "Does anyone know of a way to find out how much memory an instance of an object is taking?\nFor example, if I have an instance of the following object:\nTestClass tc = new TestClass();\n\nIs there a way to find out how much memory the instance tc is taking?\nThe reason for asking...
I can write a trivial script to do this but in my ongoing quest to get more familliar with unix I'd like to learn efficient methods using built in commands instead. I need to deal with very large files that have a variable number of header lines. the last header line consists of the text 'LastHeaderLine'. I wish to out...
You can efficiently achieve this using several built-in Unix commands such as `awk`, `sed`, or `tail`. Here are a few methods to output everything after the last header line that contains the text `LastHeaderLine`. ### Method 1: Using `awk` ```bash awk '/LastHeaderLine/ {found=1; next} found' yourfile.txt ``` - This c...
19,442
[ { "from": "human", "value": "I can write a trivial script to do this but in my ongoing quest to get more familliar with unix I'd like to learn efficient methods using built in commands instead.\nI need to deal with very large files that have a variable number of header lines. the last header line consists o...
I have a button on an ASP.NET wep application form and when clicked goes off and posts information a third party web service. I have an UpdateProgress associated with the button. how do disable/hide the button while the progress is visible (i.e. the server has not completed the operation) I am looking at doing this ...
To disable or hide a button in an ASP.NET web application while an operation is in progress, you can use a combination of JavaScript and the ASP.NET UpdateProgress control. Here's how you can achieve this: ### Step-by-Step Guide 1. **Add the UpdateProgress Control**: Ensure you have an `UpdateProgress` control associ...
16,275
[ { "from": "human", "value": "I have a button on an ASP.NET wep application form and when clicked goes off and posts information a third party web service. \nI have an UpdateProgress associated with the button. \nhow do disable/hide the button while the progress is visible (i.e. the server has not completed ...
I have an Excel application in which I want to present the user with a list of the Data Source Names (ie: DSN's), whereby s/he can choose what data source to use. Hopefully once I've got the list, I can easily access the DSN properties to connect to the appropriate database. Please note, I do not want to use a DSN-less...
To present a user with a list of Data Source Names (DSNs) in Excel and then use one of them to connect to a database, you can use VBA (Visual Basic for Applications). Here’s a step-by-step approach to achieve this: ### Step 1: Retrieve DSN Names You can retrieve the DSNs configured on the machine using the Windows Reg...
17,330
[ { "from": "human", "value": "I have an Excel application in which I want to present the user with a list of the Data Source Names (ie: DSN's), whereby s/he can choose what data source to use.\nHopefully once I've got the list, I can easily access the DSN properties to connect to the appropriate database.\nP...
I'm writing a Java Tree in which tree nodes could have children that take a long time to compute (in this case, it's a file system, where there may be network timeouts that prevent getting a list of files from an attached drive). The problem I'm finding is this: getChildCount() is called before the user specifically r...
You are encountering a common challenge when working with JTree and dynamic tree structures, particularly those where child nodes are expensive to compute or may result in errors during retrieval. The JTree framework requires `getChildCount()` to provide the number of children upfront, which can be problematic in your ...
16,295
[ { "from": "human", "value": "I'm writing a Java Tree in which tree nodes could have children that take a long time to compute (in this case, it's a file system, where there may be network timeouts that prevent getting a list of files from an attached drive).\nThe problem I'm finding is this:\n\ngetChildCoun...
It needs to be graphical. No sed, awk, grep, perl, whatever. I know how to use those and I do use them now, but I need to cherry-pick each replace in 300+ files. I want a tool where I can: type a search string type a replace string select a directory and file extension and it would recursively go into each file in th...
It looks like you've found a solution with Regexxer, which is great! Regexxer provides a graphical user interface for searching and replacing text in files, making it ideal for your needs. For others who may be looking for similar solutions, here are a few steps on how to download, compile, and install Regexxer, espec...
17,595
[ { "from": "human", "value": "It needs to be graphical. No sed, awk, grep, perl, whatever. I know how to use those and I do use them now, but I need to cherry-pick each replace in 300+ files.\nI want a tool where I can:\n\ntype a search string\ntype a replace string\nselect a directory and file extension\n\n...
I need a function to return a suffix for days when displaying text like the "th" in "Wednesday June 5th, 2008". It only need work for the numbers 1 through 31 (no error checking required) and English.
You can create a function in Python that returns the correct suffix for days (like "st", "nd", "rd", "th") based on the provided day of the month. Here's a simple implementation: ```python def get_day_suffix(day): if 11 <= day % 100 <= 13: # Special case for 11th, 12th, and 13th return 'th' else: ...
21,666
[ { "from": "human", "value": "I need a function to return a suffix for days when displaying text like the \"th\" in \"Wednesday June 5th, 2008\".\nIt only need work for the numbers 1 through 31 (no error checking required) and English.\n" }, { "from": "gpt", "value": "You can create a function in...
I'm running a SharePoint Application on a MOSS 2007 with a form based user authentication without using the MySite feature. So all the settings on the SSP administration site which only concern the user profile on the MySites should normally not affect the user profile of the application as these should be managed from...
In SharePoint MOSS 2007, the management of user profiles, especially when using Form-Based Authentication (FBA) and not leveraging My Sites, can be somewhat limited. Here's an overview of your options regarding user profile attributes, editability, and LDAP mappings. ### User Profile Attributes Management 1. **User L...
15,141
[ { "from": "human", "value": "I'm running a SharePoint Application on a MOSS 2007 with a form based user authentication without using the MySite feature. So all the settings on the SSP administration site which only concern the user profile on the MySites should normally not affect the user profile of the ap...
I'm making a report in Access 2003 that contains a sub report of related records. Within the sub report, I want the top two records only. When I add "TOP 2" to the sub report's query, it seems to select the top two records before it filters on the link fields. How do I get the top two records of only those records t...
To achieve the desired result of displaying only the top two records in a subreport based on related records filtered by the link fields, you need to modify your approach since the "TOP 2" clause operates on the entire dataset before any filtering by the link fields. Here's how you can do it: ### Approach 1: Use a Gr...
16,192
[ { "from": "human", "value": "I'm making a report in Access 2003 that contains a sub report of related records. Within the sub report, I want the top two records only. When I add \"TOP 2\" to the sub report's query, it seems to select the top two records before it filters on the link fields. How do I get ...
I there a simple way to append a new field to an existing open ADO RecordSet? fields.append() won't work if the RecordSet is open, and closing appears to kill the existing data. NB: I'm using Microsoft ActiveX DataObject 2.8 Library
In ADO (ActiveX Data Objects), once a `Recordset` is opened, you cannot directly append new fields to it using the `Fields.Append()` method. The `Fields` collection can only be modified when the `Recordset` is closed. Additionally, if you close the `Recordset` and then reopen it, you lose any unsaved data. If you need...
20,208
[ { "from": "human", "value": "I there a simple way to append a new field to an existing open ADO RecordSet? \nfields.append() won't work if the RecordSet is open, and closing appears to kill the existing data.\nNB: I'm using Microsoft ActiveX DataObject 2.8 Library\n" }, { "from": "gpt", "value":...
Can I programatically set the position of a WPF ListBox's scrollbar? By default, I want it to go in the center.
Yes, you can programmatically set the position of a WPF ListBox's scrollbar to start at the center of the content. To achieve this, you can use the `ScrollIntoView` method of the `ScrollViewer` associated with the `ListBox`. Here’s how you can do it: 1. First, ensure you have a ListBox in your XAML: ```xml <Lis...
18,368
[ { "from": "human", "value": "Can I programatically set the position of a WPF ListBox's scrollbar? By default, I want it to go in the center.\n" }, { "from": "gpt", "value": "Yes, you can programmatically set the position of a WPF ListBox's scrollbar to start at the center of the content. To ach...
I'm going to be building an application within the next six months that will be functioning as a 2-way video-conferencing system, as well as sharing some other data back and forth. I'll probably be using some sort of relatively expensive USB webcam, and am aware of the USB Video Class Device standard, which seems to t...
Building a two-way video conferencing system is an ambitious yet exciting project! Given the requirements and constraints you've mentioned, here are some technologies and frameworks that you can consider for developing your application: ### 1. Video Capture and USB Integration - **OpenCV**: This library is widely use...
17,488
[ { "from": "human", "value": "I'm going to be building an application within the next six months that will be functioning as a 2-way video-conferencing system, as well as sharing some other data back and forth. I'll probably be using some sort of relatively expensive USB webcam, and am aware of the USB Vide...
Let's say that I have two arrays (in Java), int[] numbers; and int[] colors; Each ith element of numbers corresponds to its ith element in colors. Ex, numbers = {4,2,1} colors = {0x11, 0x24, 0x01}; Means that number 4 is color 0x11, number 2 is 0x24, etc. I want to sort the numbers array, but then still have it so...
In Java, you can achieve this by using a simple approach without creating a new class. You can use a combination of sorting and indexing with a custom comparator. Although creating a separate class or using a Map would be a cleaner long-term solution, for a quick implementation, here’s how you could do it using the bui...
18,382
[ { "from": "human", "value": "Let's say that I have two arrays (in Java),\nint[] numbers; and int[] colors;\nEach ith element of numbers corresponds to its ith element in colors.\nEx, numbers = {4,2,1} \n colors = {0x11, 0x24, 0x01}; Means that number 4 is color 0x11, number 2 is 0x24, etc.\nI want to sor...
I'm hearing about a lot of companies that act like they're agile but the only agile thing they do is the Scrum process. Is this enough to be considered agile? Using Scrum alone seems like the perfect excuse for a bad manager to get more meetings more often. Should I be weary of such companies?
It's understandable to be skeptical of companies that claim to be "agile" solely based on their adoption of the Scrum framework. While Scrum is a popular methodology for implementing agile principles, simply using Scrum does not guarantee that an organization is truly agile. ### Key Points to Consider: 1. **Agile Pri...
16,215
[ { "from": "human", "value": "I'm hearing about a lot of companies that act like they're agile but the only agile thing they do is the Scrum process. Is this enough to be considered agile? Using Scrum alone seems like the perfect excuse for a bad manager to get more meetings more often. Should I be weary ...
I am writing a UDF for Excel 2007 which I want to pass a table to, and then reference parts of that table in the UDF. So, for instance my table called "Stock" may look something like this: Name            Cost            Items in Stock Teddy Bear    £10              10 Lollipops         20p              1000 I have a...
In Excel 2007, you cannot use structured table references (like `table[Cost]`) in a User Defined Function (UDF). However, you can pass the entire range of your table to the UDF as an argument and then access the specific columns by indexing into the range. Here's how you can write your UDF to calculate the total cost o...
17,887
[ { "from": "human", "value": "I am writing a UDF for Excel 2007 which I want to pass a table to, and then reference parts of that table in the UDF. So, for instance my table called \"Stock\" may look something like this:\n\nName            Cost            Items in Stock\nTeddy Bear    £10              10\nLo...
I have this web application that has grown to an unmanageable mess. I want to split it into a common "framework" part (that still includes web stuff like pages and images) and several modules that add extra functionality and screens. I want this refactoring to also be useful as a plugin system for third-party extensio...
Refactoring a monolithic web application into a modular architecture can be a complex task, but it can also lead to a cleaner, more maintainable codebase and the ability to easily extend functionality through plugins. Here’s a structured approach to achieving your goal using Tomcat as well as considerations for EJB and...
16,601
[ { "from": "human", "value": "I have this web application that has grown to an unmanageable mess. \nI want to split it into a common \"framework\" part (that still includes web stuff like pages and images) and several modules that add extra functionality and screens. I want this refactoring to also be useful...
I'm having performance oddities with Java2D. I know of the sun.java2d.opengl VM parameter to enable 3D acceleration for 2D, but even using that has some weird issues. Here are results of tests I ran: Drawing a 25x18 map with 32x32 pixel tiles on a JComponent Image 1 = .bmp format, Image 2 = A .png format Without -Dsun...
The performance inconsistencies you're experiencing with Java2D when using different image formats and types, especially with OpenGL acceleration, can be quite confusing. Let’s unpack the various aspects of this and answer your questions. ### 1. Image Formats and Performance The fact that `.BMP` and `.PNG` perform di...
18,901
[ { "from": "human", "value": "I'm having performance oddities with Java2D. I know of the sun.java2d.opengl VM parameter to enable 3D acceleration for 2D, but even using that has some weird issues. \nHere are results of tests I ran:\nDrawing a 25x18 map with 32x32 pixel tiles on a JComponent\nImage 1 = .bmp f...
I'm hand-maintaining an HTML document, and I'm looking for a way to automatically insert a link around text in a table. Let me illustrate: <table><tr><td class="case">123456</td></tr></table> I would like to automatically make every text in a TD with class "case" a link to that case in our bug tracking system (which, ...
You cannot use CSS pseudo-elements like `:before` or `:after` to insert links or repeat content dynamically based on the text content of an element. However, you can easily achieve this with a bit of JavaScript. Here's how you can do it: ### Using JavaScript You can use JavaScript to select all the `td` elements with...
18,174
[ { "from": "human", "value": "I'm hand-maintaining an HTML document, and I'm looking for a way to automatically insert a link around text in a table. Let me illustrate:\n<table><tr><td class=\"case\">123456</td></tr></table>\n\nI would like to automatically make every text in a TD with class \"case\" a link ...
I wish I were a CSS smarty .... How can you place a div container in the lower left-hand corner of the web page; taking into account the users scroll-position?
To place a div container in the lower left-hand corner of the web page, while ensuring it stays in that position regardless of the user's scroll position, you can use CSS with the `position` property set to `fixed`. This approach ensures that the div remains anchored to the viewport instead of the document. Here's a s...
19,872
[ { "from": "human", "value": "I wish I were a CSS smarty .... \nHow can you place a div container in the lower left-hand corner of the web page; taking into account the users scroll-position?\n" }, { "from": "gpt", "value": "To place a div container in the lower left-hand corner of the web page, ...
How can my app get a list of the True Type Fonts that are available on Linux. Is there a standard directory where they are stored across different distributions? Or some other standard way to locate them?
On Linux, TrueType Fonts (TTF) can be found in several standard directories, but the exact locations may vary slightly between different distributions. However, there are common directories where fonts are typically stored: 1. **System-wide directories**: - `/usr/share/fonts/` - This is a common directory for syste...
19,682
[ { "from": "human", "value": "How can my app get a list of the True Type Fonts that are available on Linux. \nIs there a standard directory where they are stored across different distributions? Or some other standard way to locate them?\n" }, { "from": "gpt", "value": "On Linux, TrueType Fonts (T...
I've been trying to retrieve the locations of all the page breaks on a given Excel 2003 worksheet over COM. Here's an example of the kind of thing I'm trying to do: Excel::HPageBreaksPtr pHPageBreaks = pSheet->GetHPageBreaks(); long count = pHPageBreaks->Count; for (long i=0; i < count; ++i) { Excel::HPageBreakPtr p...
The issue you're experiencing with retrieving horizontal page breaks from an Excel worksheet through COM may stem from the way you are trying to access the page breaks. In Excel's COM interface, the collections are usually 1-based, which means that you should index from 1 to `Count` when accessing items. However, the e...
19,768
[ { "from": "human", "value": "I've been trying to retrieve the locations of all the page breaks on a given Excel 2003 worksheet over COM. Here's an example of the kind of thing I'm trying to do:\nExcel::HPageBreaksPtr pHPageBreaks = pSheet->GetHPageBreaks();\nlong count = pHPageBreaks->Count;\nfor (long i=0...
I would like to know many minutes between 2 dates? Example : Now - tommorow at the exact time would return me 1440.
To calculate the number of minutes between two dates, you can follow this formula: 1. Convert both dates to a standard format (e.g., UNIX timestamp or total minutes from a fixed point). 2. Subtract the two values to find the difference. 3. If the result is in seconds, convert to minutes by dividing by 60. Here's how ...
23,047
[ { "from": "human", "value": "I would like to know many minutes between 2 dates?\nExample : Now - tommorow at the exact time would return me 1440.\n" }, { "from": "gpt", "value": "To calculate the number of minutes between two dates, you can follow this formula:\n\n1. Convert both dates to a stan...
I am building an app that talks to an Access database via OleDB/Jet. There is only a 32-bit Jet provider, no 64-bit provider, so the app needs to be running in 32-bit mode. My dev box is Vista 64, so I set the project to build for x86 instead of any cpu. That gets my app running and talking to the database. But now I w...
To run Gallio Icarus (or any .NET application) in 32-bit mode on a 64-bit machine, you have a couple of options you can explore. Since you're working with unit tests that interact with a 32-bit Access database using the Jet provider, ensuring everything is running in the same architecture is key. Here are some approach...
19,556
[ { "from": "human", "value": "I am building an app that talks to an Access database via OleDB/Jet. There is only a 32-bit Jet provider, no 64-bit provider, so the app needs to be running in 32-bit mode. My dev box is Vista 64, so I set the project to build for x86 instead of any cpu. That gets my app running...
I run into similar codes like this all the time in aspx pages: <asp:CheckBox Runat="server" ID="myid" Checked='<%# DataBinder.Eval(Container.DataItem, "column").Equals(1) %>'> I was wondering what other objects I have access to inside of that <%# %> tag. How come DataBinder.Eval() and Container.DataItem are not visibl...
In ASP.NET Web Forms, the `<%# %>` syntax is known as data binding expressions. These expressions are evaluated during the data binding phase of the control's lifecycle, typically when the data binding is being performed in a data-bound control like `GridView`, `ListView`, or `Repeater`. Let's break down your question:...
17,481
[ { "from": "human", "value": "I run into similar codes like this all the time in aspx pages:\n<asp:CheckBox Runat=\"server\" ID=\"myid\" Checked='<%# DataBinder.Eval(Container.DataItem, \"column\").Equals(1) %>'>\n\nI was wondering what other objects I have access to inside of that <%# %> tag. How come DataB...