instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I am developing a cocoa application that will be making heavy use of both web services and a standard dbms (most likely MySQL) and I am wondering if anyone has a good option for a database library or ORM solution they have used. CoreData is not an option due to the need to support a standard DBMS and to be able to mod...
Hi Paul, It's great to hear that you're working on a Cocoa application! Since you need to support a standard DBMS like MySQL and require the ability to modify data outside of your application, you'll want a solid database library or ORM that allows for flexibility and ease of use. Here are a few options that might su...
36,906
[ { "from": "human", "value": "I am developing a cocoa application that will be making heavy use of both web services and a standard dbms (most likely MySQL) and I am wondering if anyone has a good option for a database library or ORM solution they have used. CoreData is not an option due to the need to supp...
Having a fully internationalised application is a necessity if you want to sell worldwide. In Java we're using resource bundles and that solves things for static text codeside. But what do you do about text that is stored in the database? Starting with static definitions, to user modifiable objects, ending with user en...
Internationalizing an application that interacts with a database involves several considerations, especially when dealing with text stored in a database. Here's a comprehensive approach to address internationalization for different types of data: static definitions, user-modifiable objects, and user-entered data. ### ...
36,683
[ { "from": "human", "value": "Having a fully internationalised application is a necessity if you want to sell worldwide.\nIn Java we're using resource bundles and that solves things for static text codeside.\nBut what do you do about text that is stored in the database? Starting with static definitions, to u...
I am writing a sort of screen-recording app for Windows and wish to know when and which regions of the screen/active window have changed. Is there a Windows API I can hook to get notified of screen changes? Or would I need to manually write something like this? :( I always figured that Remote Desktop used some sort of ...
To detect changes in regions of the screen or an active window in a Windows application, you have a few options, but there isn't a direct API specifically for detecting screen changes like you might find in Remote Desktop Protocol (RDP). Here are a few approaches you could consider: ### 1. **Using GDI Hooks** You can ...
34,479
[ { "from": "human", "value": "I am writing a sort of screen-recording app for Windows and wish to know when and which regions of the screen/active window have changed.\nIs there a Windows API I can hook to get notified of screen changes?\nOr would I need to manually write something like this? :(\nI always fi...
When designing a file format for recording binary data, what attributes would you think the format should have? So far, I've come up with the following important points: have some "magic bytes" at the beginning, to be able to recognize the files (in my specific case, this should also help to distinguish the files from...
When designing a file format for recording binary data, there are several additional attributes and considerations you can incorporate to make the format more robust, future-proof, and easier to work with. Here are some suggestions beyond the ones you've already identified: 1. **Data Structure Definition**: Include a ...
38,431
[ { "from": "human", "value": "When designing a file format for recording binary data, what attributes would you think the format should have? So far, I've come up with the following important points:\n\nhave some \"magic bytes\" at the beginning, to be able to recognize the files (in my specific case, this s...
I am trying to build an automated build system. It took me a little while to change a working wii generic makefile to a working win32 (using mingw32) makefile. my make is here http://pastie.org/319482 The weird effect is, if i remove the a preceding the paths in ABS_INCL (line 31) the build doesnt work and complains ab...
It sounds like you are encountering a couple of issues with your Makefile and the build process for a Win32 environment using MinGW. Let's break down the two problems you're facing. ### 1. ABS_INCL and Header File Issues The issue with the `ABS_INCL` variable likely stems from the way include paths are being set and ...
35,781
[ { "from": "human", "value": "I am trying to build an automated build system. It took me a little while to change a working wii generic makefile to a working win32 (using mingw32) makefile.\nmy make is here http://pastie.org/319482\nThe weird effect is, if i remove the a preceding the paths in ABS_INCL (line...
I know in a lot of asynchronous communication, the packet begins starts with a start bit. But a start bit is just a 1 or 0. How do you differentiate a start bit from the end bit from the last packet? Ex. If I choose my start bit to be 0 and my end bit to be 1. and I receive 0 (data stream A) 1 0 (data stream B) 1, wha...
You raise an important point about distinguishing between start and end bits in asynchronous communication. Let's break down the concepts and address your concerns. ### Start and End Bits In many asynchronous communication protocols, a start bit indicates the beginning of a data frame, while an end bit signifies its c...
38,717
[ { "from": "human", "value": "I know in a lot of asynchronous communication, the packet begins starts with a start bit.\nBut a start bit is just a 1 or 0. How do you differentiate a start bit from the end bit from the last packet?\nEx.\nIf I choose my start bit to be 0 and my end bit to be 1.\nand I receive...
I've got a solution containing multiple projects. I'm only changing the code in one of them, but every time I hit Ctrl+Shift+B, Visual Studio rebuilds all of the others. I want it to build the other projects, so this is good. What's not good is that, normally, it would see that there was nothing to do. I have a wonky d...
In Visual Studio, resolving issues related to project dependencies and rebuilds can sometimes be tricky, especially in complex solutions with multiple projects. Here are some strategies and tools you can use to investigate and potentially resolve the issue you're experiencing: ### 1. **Visual Studio Output Window** Wh...
33,504
[ { "from": "human", "value": "I've got a solution containing multiple projects. I'm only changing the code in one of them, but every time I hit Ctrl+Shift+B, Visual Studio rebuilds all of the others.\nI want it to build the other projects, so this is good. What's not good is that, normally, it would see that...
I have a VS2005 windows service where I have the need to use 'useUnsafeHeaderParsing' as per documentation from MSDN. As this is a library used within my windows service, I do not have a web.config to add httpwebrequest element and set useUnsafeHeaderParsing to true. How would I go about achieving this in code. I tried...
To enable `useUnsafeHeaderParsing` for an application that doesn't have a `web.config` file (like a Windows Service in .NET Framework), you can configure it programmatically by using the `ServicePointManager` class. Unfortunately, `useUnsafeHeaderParsing` is a setting that you normally apply in the configuration file....
38,223
[ { "from": "human", "value": "I have a VS2005 windows service where I have the need to use 'useUnsafeHeaderParsing' as per documentation from MSDN.\nAs this is a library used within my windows service, I do not have a web.config to add httpwebrequest element and set useUnsafeHeaderParsing to true.\nHow would...
This exception is consistently thrown on a SOAP Request which takes almost three minutes to receive and is 2.25 megs in size. When scouring the web I find all sorts of posts which all seem to be about setting headers on the Request, some want me to not send the "Expect:" header, some want me to send the "Keep-Alive:" ...
It sounds like you're experiencing a timeout or network-related issue with your SOAP request. Given the details you've provided, let's explore some possible solutions to troubleshoot and resolve the issue: ### 1. **Timeout Settings** Even though you have set `executionTimeout` to 900 seconds (15 minutes), consider che...
35,708
[ { "from": "human", "value": "This exception is consistently thrown on a SOAP Request which takes almost three minutes to receive and is 2.25 megs in size. \nWhen scouring the web I find all sorts of posts which all seem to be about setting headers on the Request, some want me to not send the \"Expect:\" hea...
Is there a way to CSS style an InfoPath 2007 form rendered by Forms Server 2007? It seems to be somewhat of a "black box", but the formatting options in the Infopath client are pretty limited.
Styling an InfoPath 2007 form rendered by Forms Server 2007 using CSS can be a bit challenging due to the way InfoPath renders its forms in a browser. However, there are some approaches you can take to apply custom styles to your InfoPath forms: ### 1. **Using XSLT to Modify the Form's Rendering**: While InfoPath does...
36,997
[ { "from": "human", "value": "Is there a way to CSS style an InfoPath 2007 form rendered by Forms\nServer 2007? It seems to be somewhat of a \"black box\", but the formatting options in the Infopath client are pretty limited.\n" }, { "from": "gpt", "value": "Styling an InfoPath 2007 form rendered...
I can't figure this out. Capistrano keeps giving me this error: ** [out :: myserver.net] Missing the Rails 2.1.1 gem. Please `gem install -v=2.1.1 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest vers...
It seems like you're dealing with a version mismatch issue, and there are a few things that could be causing this problem. Here are some steps you can take to troubleshoot and potentially resolve the issue: 1. **Check Rails Versions on Server**: First, log in to your server and check what Rails versions are actually i...
38,141
[ { "from": "human", "value": "I can't figure this out. Capistrano keeps giving me this error:\n ** [out :: myserver.net] Missing the Rails 2.1.1 gem. Please `gem install -v=2.1.1 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment ou...
I work in an organization that relies heavily on technology standards. For the most past this is great and helps provide direction to developers and helps them move across teams really easily. However in the past year I have discovered more effective ways of doing things using new technologies and I am struggling to g...
Yes, many professionals have faced similar challenges when trying to introduce new technologies and processes into organizations with established standards. Here are some strategies you can employ to effectively advocate for change: 1. **Build a Business Case**: Clearly articulate the benefits of adopting the new tech...
36,634
[ { "from": "human", "value": "I work in an organization that relies heavily on technology standards. For the most past this is great and helps provide direction to developers and helps them move across teams really easily.\nHowever in the past year I have discovered more effective ways of doing things using...
What on earth is a caret in the context of a CSplitterWnd class? I can't find any documentation relating explicitly to CSplitterWnds... EDIT: Specifically, what do these functions actually do: CWnd * pCurView = m_wndSplitter2.GetPane(2, 0); pCurView->ShowCaret() pCurView->HideCaret() EDIT2: Please note, I know what a ...
In the context of the `CSplitterWnd` class in the Microsoft Foundation Class (MFC) library, a caret is a visual indicator that shows where user input (like typing) will occur in a text-based control (like an edit control). The `ShowCaret()` and `HideCaret()` functions are used to control the visibility of that caret. ...
36,395
[ { "from": "human", "value": "What on earth is a caret in the context of a CSplitterWnd class? I can't find any documentation relating explicitly to CSplitterWnds...\nEDIT: Specifically, what do these functions actually do:\nCWnd * pCurView = m_wndSplitter2.GetPane(2, 0);\npCurView->ShowCaret()\npCurView->Hi...
I was just wondering what the best way to do this is and if it could be bypassed. These are my thoughts. I have a bunch of links that when clicked open up a detail panel underneath which displays more information. This is done ajaxy. The thing is however...if the user is not logged in it should take them to the login p...
Implementing a system where a detail panel opens based on the user's login status can be done in various ways, but security is a crucial concern. Here are some considerations and recommendations to ensure your implementation is secure and reliable: ### Client-Side Check (Not Secure) You mentioned sending the user's lo...
36,034
[ { "from": "human", "value": "I was just wondering what the best way to do this is and if it could be bypassed.\nThese are my thoughts.\nI have a bunch of links that when clicked open up a detail panel underneath which displays more information. This is done ajaxy. The thing is however...if the user is not l...
So for the second day in a row, someone has wiped out an entire table of data as opposed to the one row they were trying to delete because they didn't have the qualified where clause. I've been all up and down the mgmt studio options, but can't find a confirm option. I know other tools for other databases have it.
It sounds like you're experiencing issues with accidental data deletions in SQL Server due to missing or incorrect `WHERE` clauses. Unfortunately, SQL Server Management Studio (SSMS) does not have a built-in confirmation dialog for delete operations, which can lead to accidental mass deletions. Here are a few strategi...
37,775
[ { "from": "human", "value": "So for the second day in a row, someone has wiped out an entire table of data as opposed to the one row they were trying to delete because they didn't have the qualified where clause.\nI've been all up and down the mgmt studio options, but can't find a confirm option. I know ot...
I have a large db with many tables and sprocs, and I want to find and see, for example, if there is a table with a name that has "setting" as part of it. I'm not very familiar with SqlServer's System Databases like master, msdb etc., I know there is a way to query one of those dbs to get what I need back, does someone...
Hi Ray, You can use the system catalog views in SQL Server to search for tables (or other objects) that contain specific keywords in their names. In your case, if you want to find tables with "setting" in their name, you can query the `INFORMATION_SCHEMA.TABLES` view or the `sys.objects` and `sys.tables` catalog views...
37,521
[ { "from": "human", "value": "I have a large db with many tables and sprocs, and I want to find and see, for example, if there is a table with a name that has \"setting\" as part of it. I'm not very familiar with SqlServer's System Databases like master, msdb etc., I know there is a way to query one of thos...
I'd like to know how to have a desktop application signed as a product from my company. I'm not sure of the details.I think the process is I have to purchase a certificate from a company like verisign Thanks
To have your desktop application signed as a product from your company, you'll need to follow a few key steps, including obtaining a code signing certificate from a trusted Certificate Authority (CA). Here’s an overview of the process: ### 1. **Choose a Certificate Authority (CA)** - Research and select a trusted C...
38,476
[ { "from": "human", "value": "I'd like to know how to have a desktop application signed as a product from my company. I'm not sure of the details.I think the process is I have to purchase a certificate from a company like verisign\nThanks\n" }, { "from": "gpt", "value": "To have your desktop appl...
I'm trying to find a way with javascript to highlight the text the user selects when they click some odd highlight button (as in <span style="background-color:yellow">highlighted text</span>). It only has to work with either WebKit or Firefox, but it seems to be well nigh impossible because it has to work in the follow...
Highlighting user-selected text in the way you're describing can indeed be a bit challenging due to the complexities of handling selections that span multiple elements, particularly when dealing with nested or mixed content. However, it is possible to achieve this with JavaScript by using the `Selection` and `Range` AP...
36,232
[ { "from": "human", "value": "I'm trying to find a way with javascript to highlight the text the user selects when they click some odd highlight button (as in <span style=\"background-color:yellow\">highlighted text</span>). It only has to work with either WebKit or Firefox, but it seems to be well nigh impo...
The software base I am developing for uses a signficant amount of yacc which I don't need to deal with. Some times I think it would be helpful in understanding some problems I find but most of the time I can get away with my complete ignorance of yacc. My question are there enough new projects out there that still use ...
Yacc (Yet Another Compiler Compiler) has been a foundational tool in the development of parsers for programming languages and other structured data formats. While it has a long history and remains relevant in some contexts, its use has diminished in favor of newer tools and libraries that are often easier to work with ...
39,808
[ { "from": "human", "value": "The software base I am developing for uses a signficant amount of yacc which I don't need to deal with. Some times I think it would be helpful in understanding some problems I find but most of the time I can get away with my complete ignorance of yacc.\nMy question are there eno...
This may or may not be a multi-interface problem, but I'm doing something like this: var mockInterface1 = new Mock<IInterface1>(); var mockInterface2 = mockInterface1.As<IInterface2>(); mockInterface1.Expect( foo => foo.Foo(It.IsAny<IInterface3>() ) ); ... otherObject.DoSomething( (IInterface1)mockInterface2.Object )...
The error you're encountering, `System.BadImageFormatException`, often indicates that there is a mismatch between the architectures of the assemblies involved in your application. This can happen in a few different scenarios, typically related to 32-bit vs 64-bit configurations. Here are some steps and considerations t...
37,099
[ { "from": "human", "value": "This may or may not be a multi-interface problem, but I'm doing something like this:\nvar mockInterface1 = new Mock<IInterface1>();\nvar mockInterface2 = mockInterface1.As<IInterface2>();\nmockInterface1.Expect( foo => foo.Foo(It.IsAny<IInterface3>() ) );\n\n...\n\notherObject.D...
We're looking into transport/protocol solutions and were about to do various performance tests, so I thought I'd check with the community if they've already done this: Has anyone done server performance tests for simple echo services as well as serialization/deserialization for various messages sizes comparing EJB3, Th...
While I can't provide real-time or community-sourced data, I can offer insights on typical benchmarks and performance comparisons of EJB3, Thrift, Protocol Buffers, and JSON based on existing literature and anecdotal evidence. Here are some points to consider for your performance tests: ### Echo Service Performance Te...
35,075
[ { "from": "human", "value": "We're looking into transport/protocol solutions and were about to do various performance tests, so I thought I'd check with the community if they've already done this:\nHas anyone done server performance tests for simple echo services as well as serialization/deserialization for...
Is there a way to execute SQL custom functions with Enterpise Library? I've tried Database.ExecuteScalar() but for some reason it returns null. This is my function: Database db = DatabaseFactory.CreateDatabase("ConnectionString"); DbCommand cmd = db.GetStoredProcCommand("FunctionName"); db.AddInParameter(cmd, "Value1",...
When using the Enterprise Library's Data Access Application Block, the `ExecuteScalar` method is commonly used with stored procedures that return a single value. However, when working with SQL functions, you need to ensure that the SQL function is being invoked correctly. ### Common Issues to Check: 1. **Function Syn...
38,003
[ { "from": "human", "value": "Is there a way to execute SQL custom functions with Enterpise Library? I've tried Database.ExecuteScalar() but for some reason it returns null.\nThis is my function:\nDatabase db = DatabaseFactory.CreateDatabase(\"ConnectionString\");\nDbCommand cmd = db.GetStoredProcCommand(\"F...
I'm currently working on an asp.net-mvc content management system. It would be incredibly useful to be able to deploy nested applications e.g. /shop to have a separate app inside. Or even another instance of the cms. I've found some information around talking about limiting the inheritance of the web.config but I've no...
Deploying nested applications in ASP.NET MVC can indeed be challenging, especially when it comes to the `web.config` inheritance and routing issues. However, it is possible to set up a nested application within your main application, allowing you to have separate applications (like a shop or another CMS instance) under...
34,733
[ { "from": "human", "value": "I'm currently working on an asp.net-mvc content management system. It would be incredibly useful to be able to deploy nested applications e.g. /shop to have a separate app inside. Or even another instance of the cms.\nI've found some information around talking about limiting the...
Using OpenXML SDK, I want to insert basic HTML snippets into a Word document. How would you do this: Manipulating XML directly ? Using an XSLT ? using AltChunk ? Moreover, C# or VB examples are more than welcome :)
To insert basic HTML snippets into a Word document using the OpenXML SDK, you can utilize the `AltChunk` feature. This allows you to embed HTML content into a Word document without manually manipulating XML directly or using XSLT. ### Here's a step-by-step guide using C#: 1. **Create the HTML File**: You first need ...
24,471
[ { "from": "human", "value": "Using OpenXML SDK, I want to insert basic HTML snippets into a Word document.\nHow would you do this:\n\nManipulating XML directly ?\nUsing an XSLT ?\nusing AltChunk ?\n\nMoreover, C# or VB examples are more than welcome :)\n" }, { "from": "gpt", "value": "To insert ...
I have an array (arr) of elements, and a function (f) that takes 2 elements and returns a number. I need a permutation of the array, such that f(arr[i], arr[i+1]) is as little as possible for each i in arr. (and it should loop, ie. it should also minimize f(arr[arr.length - 1], arr[0])) Also, f works sort of like a dis...
To solve the problem of finding a permutation of the array that minimizes the sum of distances defined by the function \( f \) between consecutive elements (including the wrap-around case), we can utilize a heuristic approach. Given the constraint of real-time calculation and the potential size of the array (up to 30),...
37,352
[ { "from": "human", "value": "I have an array (arr) of elements, and a function (f) that takes 2 elements and returns a number.\nI need a permutation of the array, such that f(arr[i], arr[i+1]) is as little as possible for each i in arr. (and it should loop, ie. it should also minimize f(arr[arr.length - 1],...
In SQL Server 2005, I want a user, called LimitedUser, to only be able to run one proc: GRANT EXEC ON [usp_RunETL] TO [LimitedUser] However, that proc needs to be able to do everything -- UPDATE, DELETE, INSERT, EXEC.. everything. How do I do that without having to give all those permissions to LimitedUser?
In SQL Server 2005, you can achieve the desired permissions for `LimitedUser` while allowing them to execute the stored procedure `usp_RunETL` that performs operations requiring elevated permissions by utilizing the `EXECUTE AS` clause within the stored procedure. Here’s how you can do that: 1. **Create a Role with ...
30,649
[ { "from": "human", "value": "In SQL Server 2005, I want a user, called LimitedUser, to only be able to run one proc: \nGRANT EXEC ON [usp_RunETL] TO [LimitedUser]\nHowever, that proc needs to be able to do everything -- UPDATE, DELETE, INSERT, EXEC.. everything. How do I do that without having to give all t...
Where can I download the rails migration file for country, state and city table
To create a Rails migration for country, state, and city tables, you can write the migration files manually since there isn't an official "download" for these files. However, you can easily generate them with the necessary structure. Below is an example of how you can create these tables in a Rails application. ### St...
38,384
[ { "from": "human", "value": "Where can I download the rails migration file for country, state and city table\n" }, { "from": "gpt", "value": "To create a Rails migration for country, state, and city tables, you can write the migration files manually since there isn't an official \"download\" fo...
I currently have a web app that has 3 front ends (depending on what URL you go to) that shares very little code between the 3 front ends. My directory structure looks like this: \app1 \includes \html \app2 \includes \html \app3 \includes \html \crons \libs \logs \setup \db \shared \globa...
It sounds like you are at a critical junction in your development process where refactoring your project structure can have substantial benefits in terms of maintainability, scalability, and collaboration. Here are some considerations and steps you can take to break up your current SVN repository into smaller, more man...
36,910
[ { "from": "human", "value": "I currently have a web app that has 3 front ends (depending on what URL you go to) that shares very little code between the 3 front ends. My directory structure looks like this:\n\\app1\n \\includes\n \\html\n\\app2\n \\includes\n \\html\n\\app3\n \\includes\n ...
I've a dialog which contains a Qt TabWidget with a number of tabs added. I'd like to hide one of the tabs. _mytab->hide() doesn't work. I don't want to just delete the tab and all its widgets from the .ui file because other code relies on the widgets within the tab. However, it would be fine to generate the tab ...
In Qt 3.3, there is no direct method to hide a tab in a `QTabWidget` once it has been added. However, you can achieve the desired effect by disabling the tab or using the tab's index to manipulate the tab widget. Here's a couple of methods you could use: ### Method 1: Disable the Tab You can disable the specific tab, ...
37,177
[ { "from": "human", "value": "I've a dialog which contains a Qt TabWidget with a number of tabs added. \nI'd like to hide one of the tabs. \n_mytab->hide() \n\ndoesn't work. I don't want to just delete the tab and all its widgets from the .ui file because other code relies on the widgets within the tab. H...
I have a data acquisition program written in C++ (Visual Studio 6.0). Some clients would like to control the software from their own custom software or LabView. I would like to come up with a simple API with a dll I can distribute to them and would like some tips on how to get started. This is going to be VERY basic...
Creating a simple API for your data acquisition (DAQ) program in C++ using a DLL is a great way to allow external applications, like custom software or LabVIEW, to interact with your program. Here are some steps and tips to help you get started: ### Step 1: Define Your API First, outline the commands and functionalit...
37,403
[ { "from": "human", "value": "I have a data acquisition program written in C++ (Visual Studio 6.0). Some clients would like to control the software from their own custom software or LabView. I would like to come up with a simple API with a dll I can distribute to them and would like some tips on how to get...
I've decided to reimplement the datetime picker, as a standard datetime picker isn't nullable. The user wants to start with a blank field and type (not select) the date. I've created a user control to do just that, but if the user control is near the edge of the form, it will be cut off on the form boundry. The standar...
To achieve the same behavior as the standard DateTimePicker control, where the calendar pops up over the form boundaries, you will need to manually control the placement and the behavior of the calendar dropdown in your custom user control. Here are some steps you can follow to make sure the calendar display isn't cut ...
35,069
[ { "from": "human", "value": "I've decided to reimplement the datetime picker, as a standard datetime picker isn't nullable. The user wants to start with a blank field and type (not select) the date.\nI've created a user control to do just that, but if the user control is near the edge of the form, it will b...
Earlier I asked this question How to correctly unit test my DAL?, one thing left unanswered for me is if to really test my DAL is to have a Test DB, then what is the role of mocking vs. a testing DB? To add on this, another person suggested to "use transactions and rollback at the end of the unit test, so the db is cle...
When it comes to unit testing your Data Access Layer (DAL), both mocking and using a test database can be valid approaches, and each has its own advantages and use cases. Let’s break down the roles of mocking and using a test database, along with the transaction rollback approach. ### Mocking **Role of Mocking:** - **...
36,720
[ { "from": "human", "value": "Earlier I asked this question How to correctly unit test my DAL?, one thing left unanswered for me is if to really test my DAL is to have a Test DB, then what is the role of mocking vs. a testing DB?\nTo add on this, another person suggested to \"use transactions and rollback at...
I'm reading data from a device which measures distance. My sample rate is high so that I can measure large changes in distance (i.e. velocity) but this means that, when the velocity is low, the device delivers a number of measurements which are identical (due to the granularity of the device). This results in a 'steppe...
To smooth the distance measurements from your device and calculate velocity and acceleration in C#, you can use a technique called moving average filtering, which helps to reduce noise and smooth out the stepped curve caused by repeated measurements. Here’s a structured approach to achieve this: ### 1. Smooth the Dist...
30,015
[ { "from": "human", "value": "I'm reading data from a device which measures distance. My sample rate is high so that I can measure large changes in distance (i.e. velocity) but this means that, when the velocity is low, the device delivers a number of measurements which are identical (due to the granularity ...
I'm working on a web app that needs an ActiveX control to function. It installs just fine when the user has admin privileges, but fails to load otherwise. Is this by design and if so, is this documented somewhere? (preferably MSDN)
ActiveX controls are designed to run in the Internet Explorer environment, and their behavior can vary based on security settings, user privileges, and the way they are installed. When it comes to installation and execution, it is indeed the case that certain ActiveX controls may require administrative privileges to in...
40,004
[ { "from": "human", "value": "I'm working on a web app that needs an ActiveX control to function. It installs just fine when the user has admin privileges, but fails to load otherwise. Is this by design and if so, is this documented somewhere? (preferably MSDN)\n" }, { "from": "gpt", "value": "Ac...
I have a BasePage class which all other pages derive from: public class BasePage This BasePage has a constructor which contains code which must always run: public BasePage() { // Important code here } I want to force derived classes to call the base constructor, like so: public MyPage : base() { // Page s...
In C#, when you define a constructor in a base class, derived classes must call it explicitly or implicitly. By default, if a derived class does not call the base constructor, the compiler automatically calls the parameterless base constructor. Therefore, there is no way to prevent derived classes from not calling the ...
38,945
[ { "from": "human", "value": "I have a BasePage class which all other pages derive from:\npublic class BasePage\n\nThis BasePage has a constructor which contains code which must always run:\npublic BasePage()\n{\n // Important code here\n}\n\nI want to force derived classes to call the base constructor, l...
Way back in the days when "delicious" was just "del.icio.us", I had assumed that everyone had finally caught on that Ontology is overrated. So why am I still having to roll my own tagging system using sqlite and a bunch of ruby scripts in order to address this obvious deficiency on my own local machine? I can tag on-l...
It's a common frustration that many users experience when looking for a robust local tagging system for personal organization. While online services often offer excellent tagging and categorization capabilities, local solutions can be less satisfying or even absent altogether. Here are some possible approaches and too...
40,042
[ { "from": "human", "value": "Way back in the days when \"delicious\" was just \"del.icio.us\", I had assumed that everyone had finally caught on that Ontology is overrated. \nSo why am I still having to roll my own tagging system using sqlite and a bunch of ruby scripts in order to address this obvious defi...
I'm trying to inject a dynamic where clause in my Linq to SQL query and I get an overload exception. The same expression work when added in the query proper? qry.Where(Function(c) c.CallDate < Date.Now.AddDays(-1)) Any thoughts on how to this to work? The exception reads: Overload resolution failed because no access...
The issue you're facing appears to be related to the delegate signature expected by the `Where` method in your LINQ query. Based on the error message, the expression you are using in the `Where` clause is not matching the expected delegate signature. Here's the relevant line you shared: ```vb qry.Where(Function(c) c....
38,979
[ { "from": "human", "value": "I'm trying to inject a dynamic where clause in my Linq to SQL query and I get an overload exception. The same expression work when added in the query proper?\n qry.Where(Function(c) c.CallDate < Date.Now.AddDays(-1))\n\nAny thoughts on how to this to work?\nThe exception reads:...
Ok, I am new to JQuery, I have a modal that has a asp:Literal control in it. The literal is controled by whatever link is clicked to activate the modal. So, I had hoped it would be as easy as giving the literal value onClick of the link but that's not it. I'm hoping: the value of the literal is set on the page load so...
To dynamically change the value of the `asp:Literal` control (`litModal`) in your modal when a link is clicked, you have a couple of options. You can either set the value directly using jQuery after the link is clicked, or you can update the value using an ASP.NET UpdatePanel to handle the postback and update the conte...
36,326
[ { "from": "human", "value": "Ok, I am new to JQuery, I have a modal that has a asp:Literal control in it. The literal is controled by whatever link is clicked to activate the modal. So, I had hoped it would be as easy as giving the literal value onClick of the link but that's not it. \nI'm hoping: the value...
I have a wrap panel that is dynamically populated with Label and TextBox control. The display will be something like this: Label 1 [textbox] Label 4 [textbox] Label 2 [textbox] Label 5 [textbox] Label 3 [textbox] and so on... How can I setup the wrap panel so that it displays the controls like above? Also...
To achieve a layout using a WrapPanel where you want to arrange `Label` and `TextBox` controls dynamically, while keeping the layout responsive and preventing controls from being cut off, you can follow these steps. This example assumes you're using WPF (Windows Presentation Foundation). ### Step 1: Define the WrapPan...
35,356
[ { "from": "human", "value": "I have a wrap panel that is dynamically populated with Label and TextBox control. The display will be something like this: \nLabel 1 [textbox] Label 4 [textbox]\nLabel 2 [textbox] Label 5 [textbox] \nLabel 3 [textbox] \nand so on... \nHow can I setup the wrap panel so t...
I have the following code that creates two objects (ProfileManager and EmployerManager) where the object EmployerManager is supposed to inherit from the object ProfileManager. However, when I do alert(pm instanceof ProfileManager); it returns false. function ProfileFactory(profileType) { switch(profileType) { ...
It's great that you're diving into Object-Oriented JavaScript! However, it looks like there's a small issue in your code with how inheritance is set up. The problem stems from how you're trying to establish the relationship between `ProfileManager` and `EmployerManager`. Here’s how you can correctly set up inheritance...
36,167
[ { "from": "human", "value": "I have the following code that creates two objects (ProfileManager and EmployerManager) where the object EmployerManager is supposed to inherit from the object ProfileManager. \nHowever, when I do alert(pm instanceof ProfileManager); it returns false.\nfunction ProfileFactory(pr...
I've created a simple httpModule, registered it on GAC and added it to the global web.config. I've made some changes to the module, updated the version and changed it also on the web.config. What happens is that i keep getting the old version. I've restarted the computer, removed it from the GAC, deleted the consumer a...
It sounds like you've already taken some good steps in troubleshooting the issue with your HTTP module, but let's go through a few additional possibilities and steps to help resolve the problem. 1. **Confirm GAC Removal:** Make sure that the old version of your HTTP module is completely removed from the Global Assembl...
38,412
[ { "from": "human", "value": "I've created a simple httpModule, registered it on GAC and added it to the global web.config.\nI've made some changes to the module, updated the version and changed it also on the web.config.\nWhat happens is that i keep getting the old version. I've restarted the computer, remo...
I've got a few methods that should call System.exit() on certain inputs. Unfortunately, testing these cases causes JUnit to terminate! Putting the method calls in a new Thread doesn't seem to help, since System.exit() terminates the JVM, not just the current thread. Are there any common patterns for dealing with this? ...
When dealing with methods that call `System.exit()` in Java, it can indeed be problematic for unit testing, as `System.exit()` terminates the entire JVM, including the JUnit test runner. Here are a few common strategies to address this issue: ### 1. Use a Wrapper for System.exit() Instead of directly calling `System....
36,020
[ { "from": "human", "value": "I've got a few methods that should call System.exit() on certain inputs. Unfortunately, testing these cases causes JUnit to terminate! Putting the method calls in a new Thread doesn't seem to help, since System.exit() terminates the JVM, not just the current thread. Are there an...
Has anybody used or seen a website that uses FlapJax to function, rather than just as a demo? I'm curious to see how they operate / how difficult they were to write. List one example per answer.
One example of a website that has used FlapJax is **Lively**. It was a project from Microsoft that showcased a rich, interactive web experience leveraging FlapJax for dynamic content updates. The complexity of writing applications using FlapJax can vary depending on the features you want to implement, but the framework...
42,544
[ { "from": "human", "value": "Has anybody used or seen a website that uses FlapJax to function, rather than just as a demo? I'm curious to see how they operate / how difficult they were to write.\nList one example per answer.\n" }, { "from": "gpt", "value": "One example of a website that has used...
I have a .NET 1.1 application (VB.NET 1.1 shopping cart) into which a user authenticates. I want to 'bolt on' a Flex application but dont want to have to have the user reauthenticate. They shouldn't know it is a separate application. I want to use WebServices (C# 3.5) over some kind of secure channel. My main question ...
To integrate your Flex application with your existing .NET 1.1 application while maintaining the user’s authenticated session, you'll need to establish a mechanism that allows the Flex client to communicate with your Web Services in a secure and session-aware manner. Here are a few approaches you might consider: ### 1...
36,620
[ { "from": "human", "value": "I have a .NET 1.1 application (VB.NET 1.1 shopping cart) into which a user authenticates.\nI want to 'bolt on' a Flex application but dont want to have to have the user reauthenticate. They shouldn't know it is a separate application.\nI want to use WebServices (C# 3.5) over som...
I currently don't know any thing about web services, except that they are used to allow an application to share its functions. Where & how to start? Does any book on web services work with me if I use PHP as my programming language? Does anyone know any IRC channel for help? Does anyone know of a directory for tutor...
Getting started with web services can be quite rewarding, especially as they play a crucial role in modern application development. Here’s a guide to help you embark on your learning journey: ### 1. Understanding the Basics Before diving into PHP specifically, it's important to understand some fundamental concepts of ...
38,456
[ { "from": "human", "value": "I currently don't know any thing about web services, except that they are used to allow an application to share its functions.\n\nWhere & how to start? \nDoes any book on web services work with me if I use PHP as my programming language?\nDoes anyone know any IRC channel for hel...
I am working on lock free structure with g++ compiler. It seems that with -o1 switch, g++ will change the execution order of my code. How can I forbid g++'s optimization on certain part of my code while maintain the optimization to other part? I know I can split it to two files and link them, but it looks ugly.
If you want to prevent the g++ compiler from optimizing certain parts of your code while still applying optimizations to the rest of your code, you can use the `volatile` keyword or some specific compiler attributes or pragmas to control the optimization. Here are a few approaches you might consider: ### 1. Use `vola...
37,559
[ { "from": "human", "value": "I am working on lock free structure with g++ compiler. It seems that with -o1 switch, g++ will change the execution order of my code. How can I forbid g++'s optimization on certain part of my code while maintain the optimization to other part? I know I can split it to two files ...
I want to be good in Data Structures and Analysis esp. in Java. I often find myself very weak. What should I do to be good in it? Any good mental exercises?
Improving your skills in Data Structures and Analysis, especially in Java, involves a mix of theoretical knowledge, practical coding, and problem-solving. Here’s a structured approach to help you become proficient: ### 1. Understand the Fundamentals - **Study the Basics**: Begin with understanding fundamental data st...
31,558
[ { "from": "human", "value": "I want to be good in Data Structures and Analysis esp. in Java. I often find myself very weak. What should I do to be good in it? Any good mental exercises?\n" }, { "from": "gpt", "value": "Improving your skills in Data Structures and Analysis, especially in Java, in...
I need to warn users about unsaved changes before they leave a page (a pretty common problem). window.onbeforeunload = handler This works but it raises a default dialog with an irritating standard message that wraps my own text. I need to either completely replace the standard message, so my text is clear, or (even be...
Unfortunately, modern web browsers restrict how you can handle the `onbeforeunload` event due to security and user experience reasons. As a result, you cannot replace the default dialog or use custom modal dialogs. The browser displays a standard dialog that warns users about unsaved changes, and you can't modify its c...
38,228
[ { "from": "human", "value": "I need to warn users about unsaved changes before they leave a page (a pretty common problem).\nwindow.onbeforeunload = handler\n\nThis works but it raises a default dialog with an irritating standard message that wraps my own text. I need to either completely replace the standa...
In my Ruby on Rails app, I have a User table and a Foo table. I also have a User_Foo table that stores the cross reference data. I have everything wired up for my views to work as I want, however, now I need to make sure that the same Foo doesn't get assigned to my User more than once. What's the best way to do this? I...
To ensure that a `Foo` record is not assigned to the same `User` more than once in a many-to-many relationship (like in your case with the `User_Foo` join table), you can indeed use validation in Rails, but you'll want to do so in a way that enforces uniqueness based on the combination of `user_id` and `foo_id`. Here'...
38,397
[ { "from": "human", "value": "In my Ruby on Rails app, I have a User table and a Foo table. I also have a User_Foo table that stores the cross reference data.\nI have everything wired up for my views to work as I want, however, now I need to make sure that the same Foo doesn't get assigned to my User more th...
We have an R Server (R is a programming language used in statistical analysis) that basically takes a script and a csv file, processes some data and returns results as text. I need to write a service on the R server so that .net clients (could be .Net Windows Forms, or ASP.Net) can connect to the R server, submit the ...
To build a service that allows .NET clients to connect to your R Server, submit scripts and CSV files, and retrieve results, you have a couple of choices in terms of technology and architecture. Let's break this down into key considerations: ### 1. Choosing the Right Technology Stack There are several ways to communi...
36,726
[ { "from": "human", "value": "We have an R Server\n (R is a programming language used in statistical analysis) that basically takes a script and a csv file, processes some data and returns results as text.\nI need to write a service on the R server so that .net clients (could be .Net Windows Forms, or ASP.Ne...
Is there a way of getting the websites absolute URL (http://www.domain.com/) using Java? because I've googled a bit but I only come across with having to make 2 or 3 classes to create that function =/ Update: The thing is I am trying to create a crawler that will give me some information and among that I'd like to get ...
To get the absolute URL of a webpage in Java, you can use the `java.net.URL` class, which provides a way to handle URLs more easily. If you're creating a web crawler, you might want to make HTTP requests and parse the response, and libraries like `Jsoup` can help with that. However, if you're just looking to retrieve t...
38,847
[ { "from": "human", "value": "Is there a way of getting the websites absolute URL (http://www.domain.com/) using Java? because I've googled a bit but I only come across with having to make 2 or 3 classes to create that function =/\nUpdate:\nThe thing is I am trying to create a crawler that will give me some ...
I have a time represented as the number of seconds elapsed since midnight, January 1, 1970, UTC (the results of an earlier call to time()). How do I add one day to this time? Adding 24 * 60 * 60 works in most cases, but fails if the daylight saving time comes on or off in between. In other words, I mostly want to add 2...
It appears that you're encountering issues related to how time zones and daylight saving time (DST) are handled in your Cygwin environment, particularly when using `localtime` and `mktime`. Let's clarify the correct approach and suggest a way that should work consistently across environments. When you're trying to add...
36,754
[ { "from": "human", "value": "I have a time represented as the number of seconds elapsed since midnight, January 1, 1970, UTC (the results of an earlier call to time()). How do I add one day to this time?\nAdding 24 * 60 * 60 works in most cases, but fails if the daylight saving time comes on or off in betwe...
I used to use the implicit call of toString when wanting some debug info about an object, because in case of the object is null it does not throw an Exception. For instance: System.out.println("obj: "+obj); instead of: System.out.println("obj: "+obj.toString()); Is there any difference apart from the null case? Can...
Great question! The difference between using the implicit call of `toString` via string concatenation (`"obj: " + obj`) and explicitly calling `toString()` (`"obj: " + obj.toString()`) goes beyond just handling null values. Let's break down the key points. ### Implicit Call of `toString` When you use string concatena...
39,830
[ { "from": "human", "value": "I used to use the implicit call of toString when wanting some debug info about an object, because in case of the object is null it does not throw an Exception.\nFor instance: \nSystem.out.println(\"obj: \"+obj);\n\ninstead of:\nSystem.out.println(\"obj: \"+obj.toString());\n\nI...
We want to allow "normal" href links to other webpages, but we don't want to allow anyone to sneak in client-side scripting. Is searching for "javascript:" within the HREF and onclick/onmouseover/etc. events good enough? Or are there other things to check?
Searching for "javascript:" in the href attribute and inspecting attributes like `onclick`, `onmouseover`, etc., is a good start, but it's not foolproof. Here are some additional considerations and checks you should implement to ensure better security against client-side scripting attacks: 1. **Whitelist URLs**: Consi...
39,380
[ { "from": "human", "value": "We want to allow \"normal\" href links to other webpages, but we don't want to allow anyone to sneak in client-side scripting.\nIs searching for \"javascript:\" within the HREF and onclick/onmouseover/etc. events good enough? Or are there other things to check?\n" }, { ...
What? I have a DLGTEMPLATE loaded from a resource DLL, how can I change the strings assigned to the controls at runtime programmatically? I want to be able to do this before the dialog is created, such that I can tell that the strings on display came from the resource DLL, and not from calls to SetWindowText when the d...
Modifying a `DLGTEMPLATE` in memory to change the strings associated with its controls can be done by accessing the resource directly before the dialog is created. This involves parsing the `DLGTEMPLATE` structure and replacing the string offsets with new strings. Below is a basic example in C++ that demonstrates how t...
31,125
[ { "from": "human", "value": "What?\nI have a DLGTEMPLATE loaded from a resource DLL, how can I change the strings assigned to the controls at runtime programmatically?\nI want to be able to do this before the dialog is created, such that I can tell that the strings on display came from the resource DLL, and...
Using VB.net (.net 2.0) I have a string in this format: record1_field1,record1_field2,record2_field3,record2_field1,record2_field2, etc... I wonder what the best (easiest) way is to get this into an xml? I can think of 2 ways: Method 1: - use split to get the items in an array - loop through array and build an xml str...
Yes, the two methods you've outlined are both valid approaches to converting a delimited string into XML in VB.NET, particularly for .NET 2.0. Let's explore them further and add one more approach for consideration. ### Method 1: String Concatenation This approach uses `String.Split` to break the input string into fie...
34,190
[ { "from": "human", "value": "Using VB.net (.net 2.0)\nI have a string in this format:\nrecord1_field1,record1_field2,record2_field3,record2_field1,record2_field2,\n\netc...\nI wonder what the best (easiest) way is to get this into an xml?\nI can think of 2 ways:\nMethod 1:\n- use split to get the items in a...
Within the GUI of VSS it is possible to view the history of an item 'including' or 'excluding' the labels. I'm trying to do the same thing but from the command line but I just can't see which switch I need to use in order to 'exclude' labels (by default they are included). e.g. I'm running:- ss.exe HISTORY -I- $/Sourc...
To exclude labels from the history in Visual SourceSafe (VSS) via the command line, you can use the `-N` switch with the `ss HISTORY` command. The `-N` option is used to not display labels in the output. Here's how your command would look: ```bash ss.exe HISTORY -I- -N $/Source/Path/FileName.txt ``` This command sho...
41,590
[ { "from": "human", "value": "Within the GUI of VSS it is possible to view the history of an item 'including' or 'excluding' the labels. \nI'm trying to do the same thing but from the command line but I just can't see which switch I need to use in order to 'exclude' labels (by default they are included).\ne....
I have expanders that contain text boxes, the text boxes use the wpf validation stuff to draw a red box around them ( text boxes are wrapped in Adorner Decorators to make sure I don't get empty red boxes everywhere when the expanders are collapsed) I want to indicate in the header of the expander that it has contents t...
You can achieve this in XAML by using a combination of DataTriggers and a custom property to track whether any child validation has errors. However, since you need to check all children for validation errors, you’ll need to implement a way to propagate the validation state up to the Expander's header. Here's one appro...
36,695
[ { "from": "human", "value": "I have expanders that contain text boxes, the text boxes use the wpf validation stuff to draw a red box around them ( text boxes are wrapped in Adorner Decorators to make sure I don't get empty red boxes everywhere when the expanders are collapsed)\nI want to indicate in the hea...
Following on from the question asked by Mykroft Best way to handle input from a keyboard “wedge” Best way to handle input from a keyboard "wedge". I need to write a class that intercepts key strokes, if the input is determined to be from the keyboard wedge (as described in the above post) the data will be directed to ...
To handle input from a keyboard wedge (such as a barcode scanner that emulates keyboard input), you'll need to intercept keystrokes at a low level. This typically involves using Windows API functions for global keyboard hooks. Below are steps to accomplish this in a .NET application, along with code examples. ### 1. I...
32,940
[ { "from": "human", "value": "Following on from the question asked by Mykroft\nBest way to handle input from a keyboard “wedge” \nBest way to handle input from a keyboard \"wedge\".\nI need to write a class that intercepts key strokes, if the input is determined to be from the keyboard wedge (as described in...
I'm working with Analysis Services and I have run into a compatibility issue. Here is my situation. I have 3 machines: Server2005: This machine has SQL Server, Analysis Services and Visual Studio, all in 2005 versions. Client2008: This machine has Visual Studio 2008. Client2005: This machine has Visual Studio 2005 W...
It sounds like you're dealing with a challenging compatibility issue between different versions of SQL Server Analysis Services and Visual Studio. Here are some troubleshooting steps and considerations that might help you resolve the issue with processing the cube: 1. **Data Source Connection**: Double-check the Data ...
39,113
[ { "from": "human", "value": "I'm working with Analysis Services and I have run into a compatibility issue. Here is my situation. I have 3 machines:\n\nServer2005: This machine has SQL Server, Analysis Services and Visual Studio, all in 2005 versions.\nClient2008: This machine has Visual Studio 2008.\nClien...
I am taking my first foray into PHP programming and need to configure the environment for the first time. Can I use PHP with the built in VS web server or do I need to (and I hope not) use IIS locally? In addition, any pointers on pitfalls to be avoided would be great. Many thanks. Update: I should have made the questi...
It seems like you're working on integrating PHP functionality into an existing ASP.NET MVC application, which adds some complexity to your development environment setup. Let's address your main questions and provide guidance on how to proceed. ### Using PHP with ASP.NET MVC 1. **PHP and VS Web Server**: The built-in ...
37,446
[ { "from": "human", "value": "I am taking my first foray into PHP programming and need to configure the environment for the first time. Can I use PHP with the built in VS web server or do I need to (and I hope not) use IIS locally?\nIn addition, any pointers on pitfalls to be avoided would be great.\nMany th...
I have an application that uses window.open() to generate dynamic popups. Unfortunately, I've had trouble creating the content of the new windows using the standard DOM functions (createElement, appendChild), and I've gone to using document.write() to generate the page. Concretely, how can I go from this: function writ...
To create a popup using the DOM methods rather than `document.write()`, you can build the content of the popup using standard DOM manipulation methods such as `createElement`, `appendChild`, and setting properties like `innerText` or `innerHTML`. Here's how you can modify your `writePopup` function: ```javascript func...
37,971
[ { "from": "human", "value": "I have an application that uses window.open() to generate dynamic popups. Unfortunately, I've had trouble creating the content of the new windows using the standard DOM functions (createElement, appendChild), and I've gone to using document.write() to generate the page.\nConcret...
So I have a snazzy custom route for login # routes.rb map.login '/login', :controller => 'sessions', :action => 'new' Visit www.asite.com/login and you're there. As is custom with failed login, however, we'll do the following in our action. Note what happens on failed login. # sessions_controller.rb def create ...
Yes, you can handle the login failure while preserving the original URL (i.e., `/login`) instead of showing the ugly URL (like `/session`). This can be achieved by using the `render` method more effectively. When you render a template, Rails will respond with the URL of the action that triggered the render. To fix thi...
35,948
[ { "from": "human", "value": "So I have a snazzy custom route for login\n# routes.rb\nmap.login '/login', :controller => 'sessions', :action => 'new'\n\nVisit www.asite.com/login and you're there. As is custom with failed login, however, we'll do the following in our action. Note what happens on failed log...
Possible Duplicate: Asp.net Usercontrol LoadControl Issue In ASP.NET 2.0 it is my understanding that although the API existed for loading a user control by type, it didn't actually work. Or at least I never managed to get it to work, and I know from blogs that others have had similar issues. So I use a wrapper type...
In ASP.NET 2.0, you are correct that the `LoadControl(Type t, object[] params)` overload did not behave as expected for loading user controls with parameters. This has been a point of confusion for many developers, as the documentation suggested it should work, but in practice, it often resulted in issues or did not fu...
38,601
[ { "from": "human", "value": "\nPossible Duplicate:\nAsp.net Usercontrol LoadControl Issue \n\nIn ASP.NET 2.0 it is my understanding that although the API existed for loading a user control by type, it didn't actually work. \nOr at least I never managed to get it to work, and I know from blogs that others ha...
Let's say you have a text file like this one: http://www.gutenberg.org/files/17921/17921-8.txt Does anyone has a good algorithm, or open-source code, to extract words from a text file? How to get all the words, while avoiding special characters, and keeping things like "it's", etc... I'm working in Java. Thanks
Certainly! You can extract words from a text file in Java by reading the file and using regular expressions to filter out the special characters while retaining contractions like "it's". Below is a simple algorithm and example code to achieve this. ### Steps: 1. Read the contents of the text file. 2. Use a regular exp...
36,851
[ { "from": "human", "value": "Let's say you have a text file like this one:\nhttp://www.gutenberg.org/files/17921/17921-8.txt\nDoes anyone has a good algorithm, or open-source code, to extract words from a text file?\nHow to get all the words, while avoiding special characters, and keeping things like \"it's...
I have a C# application where i want to implement a logic for a programm which will open the word document and go to a certain place in the page and create a Table and put values in that. Can any one tell me how to implement this. I am using Visual studio 2005
To manipulate Word documents in a C# application, you can use the `Microsoft.Office.Interop.Word` namespace, which allows you to automate and interact with Microsoft Word. Here’s a step-by-step guide to create a table in a Word document at a specific location using Visual Studio 2005: ### Step 1: Add Reference to Mic...
34,896
[ { "from": "human", "value": "I have a C# application where i want to implement a logic for a programm which will open the word document and go to a certain place in the page and create a Table and put values in that. Can any one tell me how to implement this. I am using Visual studio 2005 \n" }, { "...
Why isn't modelbinding working on a DropDown? What am I doing wrong? To illustrate my problem, I did the following: Created a new asp.net MVC project (beta1) Created the following class: HomeViewData : ViewDataDictionary +List : SelectList Added a viewdata to the HomeController class as following Homecontroller: Con...
It looks like you're encountering an issue with model binding in ASP.NET MVC when using a `DropDownList`. From your code and description, there are a couple of potential issues and points to clarify: 1. **Property Name Matching**: The name used in your DropDownList should match the property in your `HomeViewData` clas...
38,473
[ { "from": "human", "value": "Why isn't modelbinding working on a DropDown?\nWhat am I doing wrong?\nTo illustrate my problem, I did the following:\nCreated a new asp.net MVC project (beta1)\nCreated the following class:\nHomeViewData : ViewDataDictionary \n+List : SelectList\n\nAdded a viewdata to the Home...
I'm just trying to get a general idea of what views are used for in RDBMSes. That is to say, I know what a view is and how to make one. I also know what I've used them for in the past. But I want to make sure I have a thorough understanding of what a view is useful for and what a view shouldn't be useful for. More s...
Great questions! Let's dive into the utility of views in relational database management systems (RDBMSes) and explore their benefits, potential pitfalls, and comparative use with table-valued functions. ### What is a View Useful For? 1. **Simplification of Complex Queries**: Views can encapsulate complex queries, all...
29,693
[ { "from": "human", "value": "I'm just trying to get a general idea of what views are used for in RDBMSes. That is to say, I know what a view is and how to make one. I also know what I've used them for in the past.\nBut I want to make sure I have a thorough understanding of what a view is useful for and wh...
Lots of people have things that their systems do for them or for their teams. Source control post-commit hooks are a standard example: have an automated build system that checks out the latest source, compiles, tests, and packages it is a back-office hack that most of us probably use. What other cool things have you do...
There are many innovative and useful "back-office hacks" and automation techniques that teams and individuals use to enhance productivity, ensure quality, and streamline workflows. Here are some interesting examples: 1. **Automated Code Review Bots**: Tools like SonarQube or CodeClimate can automatically analyze code ...
31,846
[ { "from": "human", "value": "Lots of people have things that their systems do for them or for their teams. Source control post-commit hooks are a standard example: have an automated build system that checks out the latest source, compiles, tests, and packages it is a back-office hack that most of us probabl...
What's the best way to kill a process and all its child processes from a Perl script? It should run at least under Linux and Solaris, and not require installation of any additional packages. My guess would be to get a list of all processes and their parents by parsing files in /proc or by parsing the output of ps (neit...
To kill a process along with all its child processes in a Perl script running on Linux and Solaris without relying on external packages, you can use the `/proc` filesystem on Linux and `ps` on Solaris to gather process information. Below is a way to achieve this: 1. **Identify the Process ID (PID)** of the process you...
38,471
[ { "from": "human", "value": "What's the best way to kill a process and all its child processes from a Perl script? It should run at least under Linux and Solaris, and not require installation of any additional packages.\nMy guess would be to get a list of all processes and their parents by parsing files in ...
I want to take a description of a RSS feed located in $the_content and cut it off after 2 full sentences (or 200 words and then the next full sentence) using preg_split. I tried a couple times, but I'm way off. I know what I want to do, but I can't seem to even start on something to make this work. Thanks!
To accomplish your task of truncating a string to two full sentences or 200 words (whichever is shorter), you can use PHP's `preg_split` function. Here’s a general approach you can take to achieve this. We will assume that `$the_content` contains your RSS feed description. Here’s a complete example: ```php <?php fun...
39,280
[ { "from": "human", "value": "I want to take a description of a RSS feed located in $the_content and cut it off after 2 full sentences (or 200 words and then the next full sentence) using preg_split.\nI tried a couple times, but I'm way off. I know what I want to do, but I can't seem to even start on somethi...
I have read around 4-5 books on design patterns, but still I don't feel I have come closer to intermediate level in design patterns? How should I go studying design patterns? Is there any good book for design patterns? I know this will come only with experience but there must be some way to master these?
It's great that you've already read several books on design patterns! Achieving a deeper understanding often requires both theory and practice. Here are some strategies and resources that can help you advance your knowledge and application of design patterns: ### Strategies for Studying Design Patterns: 1. **Practica...
37,568
[ { "from": "human", "value": "I have read around 4-5 books on design patterns, but still I don't feel I have come closer to intermediate level in design patterns? \nHow should I go studying design patterns?\nIs there any good book for design patterns?\nI know this will come only with experience but there ...
I've been using vim, but after reading this question was wondering what is being used in the linux world.
In the Linux world, a variety of text editors are used, each catering to different preferences and workflows. Here are some of the most popular ones: 1. **Vim**: A highly configurable and powerful text editor that is often favored by programmers and system administrators due to its efficiency and the availability of m...
40,219
[ { "from": "human", "value": "I've been using vim, but after reading this question was wondering what is being used in the linux world. \n" }, { "from": "gpt", "value": "In the Linux world, a variety of text editors are used, each catering to different preferences and workflows. Here are some of ...
I'm building some functional tests for a web site using Selenium, and I'm stuck on a bizarre browser issue where the page never seems to finish loading. The status bar reads either "Transferring data from..." or "Read...". Since the page never finishes loading, my selenium tests timeout. The issue only seems to happen...
This issue with your Selenium tests where Firefox seems to hang indefinitely during page loading can indeed be quite frustrating. Here are some steps and considerations you can take to help troubleshoot and potentially resolve the problem: ### 1. **Disable Flash / sIFR Temporarily** Since you mentioned using Flash and...
34,985
[ { "from": "human", "value": "I'm building some functional tests for a web site using Selenium, and I'm stuck on a bizarre browser issue where the page never seems to finish loading. The status bar reads either \"Transferring data from...\" or \"Read...\".\nSince the page never finishes loading, my selenium...
How to programmatically recycle a dllhost.exe process in COM+?
Recycling a `dllhost.exe` process in COM+ can be useful to ensure that your COM+ applications are refreshed without restarting the entire server or COM+ application. Recycling is often done to reclaim resources or to refresh the state of the application. You can accomplish this using several methods, including leveragi...
37,576
[ { "from": "human", "value": "How to programmatically recycle a dllhost.exe process in COM+?\n" }, { "from": "gpt", "value": "Recycling a `dllhost.exe` process in COM+ can be useful to ensure that your COM+ applications are refreshed without restarting the entire server or COM+ application. Recyc...
I'm doing this system Stacked and I am creating the search function. And in that process it occurs to me that maybe AR/nHibernate Expression.Like (and siblings) might maybe not be 100% "safe" in that you can create stuff like; "\r\ndrop database xxx;---" and similar things...? I would expect them to be safe, but I am n...
When using ORM frameworks like NHibernate or Entity Framework with their query-building capabilities (such as `Expression.Like`), they typically provide a level of abstraction that helps to prevent SQL injection attacks. This is because these frameworks use parameterized queries to interact with the database, which mea...
39,928
[ { "from": "human", "value": "I'm doing this system Stacked and I am creating the search function. And in that process it occurs to me that maybe AR/nHibernate Expression.Like (and siblings) might maybe not be 100% \"safe\" in that you can create stuff like;\n\"\\r\\ndrop database xxx;---\" and similar thing...
When trying to work with Qt's signal/slot mechanisms over more than one level of inheritance, I ran into a problem: When my class does not directly inherit from QObject, signals and slots don't seem to work any more. The output of the following program illustrates the case: require 'Qt' class A < Qt::Object signals ...
The behavior you're observing stems from the way Qt's signal/slot mechanism interacts with Ruby's object model, specifically regarding class instantiation and signal emission during construction. In your program, when you create an instance of `A` and emit `mySignal()`, the `mySlot()` method is triggered. At this poin...
39,068
[ { "from": "human", "value": "When trying to work with Qt's signal/slot mechanisms over more than one level of inheritance, I ran into a problem: When my class does not directly inherit from QObject, signals and slots don't seem to work any more.\nThe output of the following program illustrates the case:\nre...
Say you have a string, but you don't know what it contains. And you want to replace all occurences of a particular word or part of a word with a formatted version of the same word. For example, I have a string that contains "lorem ipsum" and i want to replace the entire word that contains "lo" with "lorem can" so that ...
You can achieve this by using Python's regular expressions module (`re`). This allows you to identify and replace whole words in a string that contain a specified substring. Here's a function that does exactly what you're looking for: ```python import re def replace_word_containing(substring, replacement, text): ...
39,621
[ { "from": "human", "value": "Say you have a string, but you don't know what it contains. And you want to replace all occurences of a particular word or part of a word with a formatted version of the same word.\nFor example, I have a string that contains \"lorem ipsum\" and i want to replace the entire word ...
all! Typing from Italy This little piece of code works if the matrix size is less then 800 and fails with a segmentation fault for higher sizes.... I have tried it with gcc 4.3.2 compiler in linux and macosx and VisualStudio compiler in windows. Seemsthe problem is in the stack size..... how can I increase it ? How can...
The issue you are encountering is likely due to the large size of the arrays you're trying to allocate on the stack. In C, local variables (like your arrays `A`, `B`, and `C`) are typically allocated on the stack, and the stack size is limited. When your matrix size exceeds a certain limit (which can vary by system), a...
36,484
[ { "from": "human", "value": "all! Typing from Italy\nThis little piece of code works if the matrix size is less then 800 and fails with a segmentation fault for higher sizes....\nI have tried it with gcc 4.3.2 compiler in linux and macosx and VisualStudio compiler in windows.\nSeemsthe problem is in the sta...
I'm trying to build a hoverable Jquery tooltip. This tooltip should appear when I hover over some element, and stay put if I choose to hover over the tooltip itself too. The tooltip should disappear only if I hover away from the original element or from the tooltip body. Based on an example I found, I managed to create...
Your tooltip implementation using jQuery is functional, but there are indeed areas for improvement. Below are suggestions addressing your concerns and providing enhancements for better performance, readability, and functionality. ### Key Improvements 1. **Single Method for Tooltip Behavior**: Instead of extending jQue...
30,838
[ { "from": "human", "value": "I'm trying to build a hoverable Jquery tooltip.\nThis tooltip should appear when I hover over some element, and stay\nput if I choose to hover over the tooltip itself too.\nThe tooltip should disappear only if I hover away from the original\nelement or from the tooltip body.\nBa...
Starting with asp.net 2.0 the debug=true in the compilation section of the web.config file is deciding if the website/webservice will be compiled with debug information or not. But the compilation output is a lot of "gibberish" under the ASP.Net Temporary files. Only wiht publish i can get a clean output to be properly...
To achieve the goal of publishing a clean output that includes debug information on a remote production web server, you can follow these steps: 1. **Create a Web Deployment Package**: Instead of using the "Publish" option directly in Visual Studio, create a web deployment package. This package can contain both the cle...
39,788
[ { "from": "human", "value": "Starting with asp.net 2.0 the debug=true in the compilation section of the web.config file is deciding if the website/webservice will be compiled with debug information or not. But the compilation output is a lot of \"gibberish\" under the ASP.Net Temporary files. Only wiht publ...
I have an application that has many different types of objects that each persist themselves back to the db. This has worked fine so far without transactions and I'm not looking to go hog wild adding them. But there is an occasional need to start a transaction before a whole collection of the objects start updating to e...
To handle the requirement of updating a collection of objects while ensuring the updates are wrapped in a transaction, you can consider a few different approaches depending on the specifics of your application, the database you're using, and how your object persistence is structured. Here are several approaches to impl...
36,017
[ { "from": "human", "value": "I have an application that has many different types of objects that each persist themselves back to the db. This has worked fine so far without transactions and I'm not looking to go hog wild adding them. But there is an occasional need to start a transaction before a whole coll...
The following questions are about XML serialization/deserialization and schema validation for a .net library of types which are to be used for data exchange. First question, if I have a custom xml namespace say "http://mydomain/mynamespace" do I have to add a [XmlRoot(Namespace = "http://mydomain/mynamespace")] to ev...
Let's go through your questions one by one: ### 1. Default XML Namespace for the Whole Assembly In .NET, you cannot set a default XML namespace for the entire assembly directly through attributes like `[XmlRoot]`. You have to specify the `Namespace` attribute on each class that should be serialized with a specific XM...
36,144
[ { "from": "human", "value": "The following questions are about XML serialization/deserialization and schema validation for a .net library of types which are to be used for data exchange.\n\nFirst question, if I have a custom xml namespace say \"http://mydomain/mynamespace\" do I have to add a\n[XmlRoot(Name...
I am using JQuery to post with AJAX to another ASP page. Do I need this ASP page to return a full html page. Or can I just have it send back a value ( I just need a status ) . Here is my function. $.ajax({ url: "X.asp", cache: false, type: "POST", data: queryString, success: function...
You don't need to return a full HTML page from your ASP page when using AJAX. You can return a simple value, such as a status message or a JSON object, and then process that response in your JavaScript code. For example, if you only want to return a simple status message like "success" or "error", you can do that dire...
39,446
[ { "from": "human", "value": "I am using JQuery to post with AJAX to another ASP page. Do I need this ASP page to return a full html page. Or can I just have it send back a value ( I just need a status ) . Here is my function.\n $.ajax({\n url: \"X.asp\",\n cache: false,\n type: \"POST\",\...
I want to know how to set a Publishing page content through the code (MOSS 2007). This is how I've created the page: PublishingPage page = publishingWeb.GetPublishingPages().Add("MyPage.aspx", pageLayout); SPFile pageFile = page.ListItem.File; page.Title = "My Page"; page.Update(); But my attempts ...
To set the content of a Publishing Page in Microsoft Office SharePoint Server (MOSS) 2007, you will typically need to work with the page's field values after creating the page. The PublishingPage class provides methods to interact with the content fields of the page. Below is an example of how to set the content of va...
38,955
[ { "from": "human", "value": "I want to know how to set a Publishing page content through the code (MOSS 2007).\nThis is how I've created the page:\nPublishingPage page = publishingWeb.GetPublishingPages().Add(\"MyPage.aspx\", pageLayout);\nSPFile pageFile = page.ListItem.File;\npage.Title = \"My Page\"; ...
I am used to using Atlas. Recently i have started transitioning to jQuery and sometimes prototype. The project that i'm currently working on is using prototype. In Prototype, is there an easy way to get the browser name and version? I've looked over the API documentation and can't seem to find it.
In Prototype, there isn't a built-in method specifically for detecting the browser name and version directly like you might find in some other libraries. However, you can use the `navigator.userAgent` property, which is standard in JavaScript, to obtain information about the browser. Here is a simple function you can ...
34,599
[ { "from": "human", "value": "I am used to using Atlas. Recently i have started transitioning to jQuery and sometimes prototype. The project that i'm currently working on is using prototype.\nIn Prototype, is there an easy way to get the browser name and version? I've looked over the API documentation and ca...
I have an application that detects if there is another instance of the app running and exits if one is found. This part seems to work reliably. My app takes a command-line argument that I would like to pass to the already running instance. I have the following code so far: Project1.dpr program Project1; uses ... A...
You are correct in your assessment that you need to handle the message sent from one instance of your application to another properly. The two options you mentioned (sending the message to the application's main form or handling it at the application level) are both valid approaches. Below, I'll elaborate on both optio...
37,598
[ { "from": "human", "value": "I have an application that detects if there is another instance of the app running and exits if one is found. This part seems to work reliably. My app takes a command-line argument that I would like to pass to the already running instance. I have the following code so far:\nProj...
I've written a web service using ASP.NET (in C#) and I'm attempting to write an example PHP client using NuSOAP. Where I'm tripped up on are examples of how to do this; some show soapval being used (and I don't quite understand the parameters - for example passing false as string types, etc.), while others are just us...
To successfully call your ASP.NET web service from PHP using NuSOAP, you need to structure your parameters correctly according to the expected SOAP request. In your case, the `DoSomething` method expects a complex type for `parameters`, which consists of an array of `Param` objects. Each `Param` has two child elements:...
32,797
[ { "from": "human", "value": "I've written a web service using ASP.NET (in C#) and I'm attempting to write an example PHP client using NuSOAP. Where I'm tripped up on are examples of how to do this; some show soapval being used (and I don't quite understand the parameters - for example passing false as stri...
Let's say I have a List object and an iterator for that list. Now I sort the list with java.util.Collections.sort() What happens to the iterator? Is its behavior still defined and can it still be used? If not, can I prevent destroying the iterators for the list? I know, this problem could be circumvented by changin...
In Java, when you sort a `List` using `java.util.Collections.sort()`, the behavior of any existing iterators for that list becomes undefined. According to the Java documentation, specifically the `List` interface, if the list is structurally modified (which includes sorting), any iterators for that list become invalid....
39,179
[ { "from": "human", "value": "Let's say I have a List object and an iterator for that list.\nNow I sort the list with java.util.Collections.sort()\n\nWhat happens to the iterator? \nIs its behavior still defined and can it still be used? \nIf not, can I prevent destroying the iterators for the list?\n\nI kno...
Short: how does modelbinding pass objects from view to controller? Long: First, based on the parameters given by the user through a search form, some objects are retrieved from the database. These objects are given meta data that are visible(but not defining) to the customer (e.g: naming and pricing of the objects diff...
In ASP.NET MVC, model binding is the mechanism that maps form data from an HTTP request to action method parameters in a controller. When you want to pass complex objects from a view to a controller, the default model binding relies on the structure of your form and the naming conventions of your HTML elements. ### Co...
35,122
[ { "from": "human", "value": "Short: how does modelbinding pass objects from view to controller?\nLong:\nFirst, based on the parameters given by the user through a search form, some objects are retrieved from the database.\nThese objects are given meta data that are visible(but not defining) to the customer ...
Is there a way to limit the rows returned at the Oracle datasource level in a Tomcat application? It seems maxRows is only available if you set it on the datasource in the Java code. Putting maxRows="2" on the datasource doesn't apply. Is there any other way limit the rows returned? Without a code change?
In an Oracle database, the concept of limiting the number of rows returned is typically handled at the SQL query level rather than at the datasource configuration level. The `maxRows` property is indeed a feature of the JDBC API that can be set programmatically in Java code for a specific statement but is not something...
38,430
[ { "from": "human", "value": "Is there a way to limit the rows returned at the Oracle datasource level in a Tomcat application?\nIt seems maxRows is only available if you set it on the datasource in the Java code. Putting maxRows=\"2\" on the datasource doesn't apply.\nIs there any other way limit the rows r...
I've heard that enabling Link-Time Code Generation (the /LTCG switch) can be a major optimization for large projects with lots of libraries to link together. My team is using it in the Release configuration of our solution, but the long compile-time is a real drag. One change to one file that no other file depends on t...
Link-Time Code Generation (LTCG) can indeed provide significant performance optimizations for large projects, particularly those with many libraries and complex dependencies. LTCG allows the compiler to analyze the entire program's code at once, optimizing across module boundaries, which can lead to better inlining, de...
34,862
[ { "from": "human", "value": "I've heard that enabling Link-Time Code Generation (the /LTCG switch) can be a major optimization for large projects with lots of libraries to link together. My team is using it in the Release configuration of our solution, but the long compile-time is a real drag. One change to...
I'm writing my first Windows CE app using the .NET Compact Framework v3.5. I need the app to be able to do an HTTP POST to a URL. It appears that the .NET CF does not have System.Web. So, I could use some guidence on how to accomplish and HTTP Posts using the .Net CF. Thanks, Greg
To perform an HTTP POST request in a Windows CE application using the .NET Compact Framework (CF) v3.5, you can utilize the `HttpWebRequest` class available in the `System.Net` namespace. Here's a step-by-step guide on how to accomplish this. ### Steps to Perform an HTTP POST 1. **Add the Required Namespace**: Make s...
37,041
[ { "from": "human", "value": "I'm writing my first Windows CE app using the .NET Compact Framework v3.5.\nI need the app to be able to do an HTTP POST to a URL.\nIt appears that the .NET CF does not have System.Web.\nSo, I could use some guidence on how to accomplish and HTTP Posts using the .Net CF.\nThanks...
Today i stumbled upon an interesting performance problem with a stored procedure running on Sql Server 2005 SP2 in a db running on compatible level of 80 (SQL2000). The proc runs about 8 Minutes and the execution plan shows the usage of an index with an actual row count of 1.339.241.423 which is about factor 1000 high...
The issue you are encountering is indeed a well-known phenomenon in SQL Server called "parameter sniffing." Here's a deeper insight into what's happening and some potential solutions: ### Understanding Parameter Sniffing When you execute a stored procedure that uses parameters, SQL Server optimizes the execution plan...
36,291
[ { "from": "human", "value": "Today i stumbled upon an interesting performance problem with a stored procedure running on Sql Server 2005 SP2 in a db running on compatible level of 80 (SQL2000).\nThe proc runs about 8 Minutes and the execution plan shows the usage of an index with an actual row count of 1.3...
Please tell me if it is possible to do the following: create an instance of a specific class in Java pass it to JRuby to do something with it continue using the "modified" version in Java May you provide a small working example? EDIT: It turns out that embedding was the simplest way to achieve this. More information ...
Yes, you can create an instance of a specific class in Java, pass it to JRuby, allow JRuby to modify it, and then continue using the modified version in Java. This can be achieved by embedding JRuby in your Java application. Below is a small working example demonstrating this process. ### Example Steps 1. **Create a ...
37,651
[ { "from": "human", "value": "Please tell me if it is possible to do the following:\n\ncreate an instance of a specific class in Java\npass it to JRuby to do something with it\ncontinue using the \"modified\" version in Java\n\nMay you provide a small working example?\nEDIT: It turns out that embedding was t...
I've read only good things about Merb, but the documentation on the website is basically the api reference, and right now there is no books already published. Any resources about Merb? I guess that I'll start to read the code, but it'd be nice to have another sources of information
Merb, which stands for "M Erb", was a Ruby web framework that aimed to provide a lightweight alternative to Ruby on Rails. While it gained some popularity for its modularity and performance, development for Merb largely ceased after it was merged with Ruby on Rails around version 3.0. If you're looking for resources to...
39,143
[ { "from": "human", "value": "I've read only good things about Merb, but the documentation on the website is basically the api reference, and right now there is no books already published. \nAny resources about Merb?\nI guess that I'll start to read the code, but it'd be nice to have another sources of infor...
Does anyone have any experience with doing this? I'm working on a Java decompiler right now in C++, but would like a higher level language to do the actual transformations of the internal trees. I'm curious if the overhead of marshaling data between languages is worth the benefit of a more expressive and language for...
It's not uncommon to mix programming languages within a project, especially when you want to leverage the strengths of different languages to solve specific problems. In your case, using C++ for performance-critical parts of your Java decompiler while relying on a higher-level language like Haskell for transformations ...
36,433
[ { "from": "human", "value": "Does anyone have any experience with doing this? I'm working on a Java decompiler right now in C++, but would like a higher level language to do the actual transformations of the internal trees. I'm curious if the overhead of marshaling data between languages is worth the bene...
What is the best way to randomize the order of a generic list in C#? I've got a finite set of 75 numbers in a list I would like to assign a random order to, in order to draw them for a lottery type application.
In C#, a common way to randomize the order of items in a list is to use the Fisher-Yates shuffle algorithm (also known as the Knuth shuffle). This algorithm efficiently randomizes the order of elements in a list in O(n) time complexity. Here’s how you can implement this in C#: 1. Create a list of your numbers. 2. Use...
39,010
[ { "from": "human", "value": "What is the best way to randomize the order of a generic list in C#? I've got a finite set of 75 numbers in a list I would like to assign a random order to, in order to draw them for a lottery type application.\n" }, { "from": "gpt", "value": "In C#, a common way to ...
How can an automatic installer for .NET 2.0 application be created for Windows 98? I mean for application and also for .NET 2.0 if missing. I tried to do it by creating a setup project for Visual Studio 2008, but I didn't succeed. I installed IE6 SP1 manually, but Installer still crashed. Windows Installer 2.0 is inst...
Creating an automatic installer for a .NET 2.0 application on Windows 98 can be challenging due to the limitations of the operating system and the dependencies of .NET Framework 2.0. Here are steps to create an installer that handles both the .NET Framework and your application: ### Steps to Create an Installer for .N...
36,636
[ { "from": "human", "value": "How can an automatic installer for .NET 2.0 application be created for Windows 98? \nI mean for application and also for .NET 2.0 if missing.\nI tried to do it by creating a setup project for Visual Studio 2008, but I didn't succeed.\nI installed IE6 SP1 manually, but Installer ...
I am not that hot at regular expressions and it has made my little mind melt some what. I am trying to find all the tables names in a query. So say I have the query: SELECT one, two, three FROM table1, table2 WHERE X=Y I would like to pull out "table1, table2" or "table1" and "table2" But what if there is no where st...
Regular expressions can certainly help you extract table names from SQL queries, although they can get complex due to the various SQL syntax possibilities. For your requirement to extract table names from a `SELECT` statement that may end with different clauses (like `WHERE`, `GROUP BY`, or `ORDER BY`), a regex pattern...
36,137
[ { "from": "human", "value": "I am not that hot at regular expressions and it has made my little mind melt some what.\nI am trying to find all the tables names in a query. So say I have the query:\nSELECT one, two, three FROM table1, table2 WHERE X=Y\n\nI would like to pull out \"table1, table2\" or \"table...