instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
My database application is going to be deployed at multiple sites in different time zones. I need a T-SQL function that will determine the UTC timestamp of midnight on January 1 of the current year for YTD calculations. All of the data is stored in UTC timestamps. For example, Chicago is UTC-6 with Daylight Savings Ti...
In T-SQL, the challenge of calculating the UTC timestamp of midnight on January 1 of the current year while accounting for daylight saving time (DST) is not straightforward, especially since T-SQL does not provide built-in support for determining time zone offsets or DST changes directly. However, you can achieve this...
28,399
[ { "from": "human", "value": "My database application is going to be deployed at multiple sites in different time zones.\nI need a T-SQL function that will determine the UTC timestamp of midnight on January 1 of the current year for YTD calculations. All of the data is stored in UTC timestamps.\nFor example...
By default the SQL Server comes with the Langauge set to "English (United States)", setting the date format to mm/dd/yy instead of the date format I want it in, which is Australian and has a date format such as dd/mm/yy. Is there an option in the Server Management Studio / Configuration tools where I can set the locale...
SQL Server's default language setting does indeed affect the way dates are formatted, and it can be set to different languages or locales. However, changing the server's default language requires careful consideration, as it can impact all connections to the SQL Server. ### Option 1: Change the Default Language for a ...
31,855
[ { "from": "human", "value": "By default the SQL Server comes with the Langauge set to \"English (United States)\", setting the date format to mm/dd/yy instead of the date format I want it in, which is Australian and has a date format such as dd/mm/yy.\nIs there an option in the Server Management Studio / Co...
I would like to use the django contrib.admin pages to edit my models, but call individual change page from my own views, an then return there after user clicks "save". Ideally this should happen by appending the return URL to the admin page's url (as in "...?_return_url=) Any hints?
To achieve the goal of editing Django models through custom views while utilizing the Django admin's change page for your models, you can follow these general steps: 1. **Create Custom Views**: Create your own view in which you will handle the logic for redirecting to the Django admin's change page. 2. **Construct th...
27,938
[ { "from": "human", "value": "I would like to use the django contrib.admin pages to edit my models, but call individual change page from my own views, an then return there after user clicks \"save\".\nIdeally this should happen by appending the return URL to the admin page's url (as in \"...?_return_url=)\nA...
My junk mail folder has been filling up with messages composed in what appears to be the Cyrillic alphabet. If a message body or a message subject is in Cyrillic, I want to permanently delete it. On my screen I see Cyrillic characters, but when I iterate through the messages in VBA within Outlook, the "Subject" propert...
When dealing with email messages in Outlook using VBA, you may encounter issues with character encodings, especially if the messages are formatted in a way that the Outlook VBA environment doesn't handle correctly. If you're unable to see Cyrillic characters correctly and only see question marks, you will have to rely ...
27,949
[ { "from": "human", "value": "My junk mail folder has been filling up with messages composed in what appears to be the Cyrillic alphabet. If a message body or a message subject is in Cyrillic, I want to permanently delete it.\nOn my screen I see Cyrillic characters, but when I iterate through the messages in...
I have a query where i have a date column (time) which tells about "IN" & "OUT" timing of the people attendance by this single column My queries are :- 1) How to get the daily attendance of each employee 2) How to come to know if the employee is present less than 5 hours Please let me know the queries in SQL server.
To address your requirements, let's assume you have a table named `Attendance` with the following columns: - `EmployeeID`: The identifier for the employee. - `Time`: The date and time indicating when the employee clocked in and out. For the sake of this example, we assume that the `Time` column will have entries mar...
27,168
[ { "from": "human", "value": "I have a query where i have a date column (time) which tells about \"IN\" & \"OUT\" timing of the people attendance by this single column\nMy queries are :-\n1) How to get the daily attendance of each employee\n2) How to come to know if the employee is present less than 5 hours\...
I'm looking for a code library that converts ANSI escape sequences into HTML color, via plain tags or CSS. For example, something that would convert this: ESC[00mESC[01;34mbinESC[00m ESC[01;34mcodeESC[00m ESC[01;31mdropbox-lnx.x86-0.6.404.tar.gzESC[00m ESC[00mfooESC[00m Into this: <span style="color:blue">bin</span> <...
Yes, there are several libraries in Python, Ruby, and Perl that can help you convert ANSI escape sequences to HTML. Below are examples for each of these programming languages: ### Python You can use the `colored` package in combination with a small function to convert ANSI codes to HTML: ```python import re def ans...
25,798
[ { "from": "human", "value": "I'm looking for a code library that converts ANSI escape sequences into HTML color, via plain tags or CSS. For example, something that would convert this:\nESC[00mESC[01;34mbinESC[00m\nESC[01;34mcodeESC[00m\nESC[01;31mdropbox-lnx.x86-0.6.404.tar.gzESC[00m\nESC[00mfooESC[00m\nIn...
I'm not a fan of the Designer, I prefer to code straight to the ASPX page. However, since a reformat (and leading up to the reformat), the designer.cs files have not been updating correctly when manually coding to the .aspx file. This means my code behinds are not recognizing new controls and throwing compiler errors. ...
If you are encountering issues where the `designer.cs` file is not updating properly after making changes to the `.aspx` file manually, here are several strategies you can try to resolve the problem: ### 1. Clean and Rebuild the Project Sometimes the designer files can get out of sync due to build issues. Try cleaning...
27,837
[ { "from": "human", "value": "I'm not a fan of the Designer, I prefer to code straight to the ASPX page. However, since a reformat (and leading up to the reformat), the designer.cs files have not been updating correctly when manually coding to the .aspx file. This means my code behinds are not recognizing ne...
I'm getting a whole bunch of linker errors in Visual studios for methods I'm not even calling directly. I'm a java developer by day, but I have a project I need to do in C++, intended to run on windows machines. Hence, I'm stuck messing about with Visual Studio. Bascally, I have an os project that I added an accessor m...
The linker errors you are encountering (`LNK2019` and `LNK2001`) typically indicate that the linker cannot find the implementation for one or more symbols that were declared, suggesting that your project is missing necessary libraries, or that there may be configuration issues. Here are several steps to help you troub...
28,517
[ { "from": "human", "value": "I'm getting a whole bunch of linker errors in Visual studios for methods I'm not even calling directly. I'm a java developer by day, but I have a project I need to do in C++, intended to run on windows machines. Hence, I'm stuck messing about with Visual Studio.\nBascally, I hav...
As part of the way we handle support for our clients for an enterprise application, we have them backup their database, I restore it on our server, do some maintenance, backup it up, and have them restore it on their server. This works very well, but I usually have to reset the users permissions for that database. Bu...
It sounds like you're dealing with a frustrating permissions issue. Here are several troubleshooting steps you can take to identify and potentially resolve the problem with the database user not being able to connect: 1. **Connection String:** Double-check the connection string used by the DTS packages to ensure it is...
31,298
[ { "from": "human", "value": "As part of the way we handle support for our clients for an enterprise application, we have them backup their database, I restore it on our server, do some maintenance, backup it up, and have them restore it on their server. This works very well, but I usually have to reset the...
I'm trying to build a new .NET C++ project from scratch. I am planning to mix managed and unmanaged code in this project. this forum thread IDataObject : ambiguous symbol error answers a problem I've seen multiple times. Post #4 states "Move all 'using namespace XXXX' from .h to .cpp" this looks like a good idea but no...
When working with C++/CLI in a mixed managed/unmanaged environment, you may run into issues with ambiguous symbols due to namespace conflicts. The suggestion to move `using namespace` directives from header files to implementation files (the `.cpp` files) is a good practice, especially to reduce potential conflicts in ...
24,818
[ { "from": "human", "value": "I'm trying to build a new .NET C++ project from scratch. I am planning to mix managed and unmanaged code in this project.\nthis forum thread\nIDataObject : ambiguous symbol error answers a problem I've seen multiple times.\nPost #4 states\n\"Move all 'using namespace XXXX' from ...
I have a question about using os.execvp in Python. I have the following bit of code that's used to create a list of arguments: args = [ "java" , classpath , "-Djava.library.path=" + lib_path() , ea , "-Xmx1000m" , "-server" , "code_swarm" , params ] When I outpu...
The issue you're experiencing arises from how `os.execvp()` handles its arguments compared to how the command line is parsed by the shell. When you use `os.execvp()`, you are providing the arguments as a list directly to the process, while when you paste the command into the shell or use `os.system()`, the shell itsel...
28,942
[ { "from": "human", "value": "I have a question about using os.execvp in Python. I have the following bit of code that's used to create a list of arguments:\n\nargs = [ \"java\"\n , classpath\n , \"-Djava.library.path=\" + lib_path()\n , ea\n , \"-Xmx1000m\"\n , \"-server\"\n ...
Is it possible to import csv data into mysql and automatically create the column names, as in can I create just the table, or must I create the table names as well? Is it possible to check for duplicate entries upon importing? I have an identifier field, but dont know how to make it so it will not be imported twice. Ho...
### Importing CSV Data into MySQL **1. Automatically Creating Column Names:** When importing CSV data into MySQL, you typically need to create the table schema (i.e., specify the column names and data types) beforehand. However, you can create a temporary table with a generic structure and then dynamically adjust it b...
26,173
[ { "from": "human", "value": "Is it possible to import csv data into mysql and automatically create the column names, as in can I create just the table, or must I create the table names as well?\nIs it possible to check for duplicate entries upon importing? I have an identifier field, but dont know how to ma...
I'd like to post some form variables into a classic ASP page. I don't want to have to alter the classic ASP pages, because of the amount of work that would need to be done, and the amount of pages that consume them. The classic ASP page expects form variables Username and Userpassword to be submitted to them. username ...
To submit the form variables from ASP.NET to a classic ASP page while maintaining the required parameter names (`UserName` and `Userpassword`), you can use the `HttpWebRequest` class to programmatically send a POST request to the classic ASP page. This way, you don't have to manipulate the names of the controls in your...
27,101
[ { "from": "human", "value": "I'd like to post some form variables into a classic ASP page. I don't want to have to alter the classic ASP pages, because of the amount of work that would need to be done, and the amount of pages that consume them.\nThe classic ASP page expects form variables Username and Userp...
Good morgning, I would like to be able to analyze text where I am writting whatever the application I am. Example, If I am here, typing in this TextArea, I would like to be able to get the text, same way if I were in the Subject Textbox in my Outlook. I have search Google without success, maybe it's because it require ...
Good morning! Yes, it is possible to capture text input from various applications in C# using the Windows API, specifically through the use of Win32 API calls. However, this can get quite complex and may require elevated permissions due to accessing other processes. Here’s a general approach you can take to achieve t...
14,007
[ { "from": "human", "value": "Good morgning,\nI would like to be able to analyze text where I am writting whatever the application I am. Example, If I am here, typing in this TextArea, I would like to be able to get the text, same way if I were in the Subject Textbox in my Outlook.\nI have search Google with...
How can you get a raw socket in Perl, and then what's the best way to built a packet for use with it?
Creating and using raw sockets in Perl involves utilizing the `Socket` module, which provides the necessary functions for dealing with sockets. Raw sockets allow you to craft and send your own packets, which is useful for purposes such as network scanning, protocol testing, or implementing certain types of network tool...
25,156
[ { "from": "human", "value": "How can you get a raw socket in Perl, and then what's the best way to built a packet for use with it?\n" }, { "from": "gpt", "value": "Creating and using raw sockets in Perl involves utilizing the `Socket` module, which provides the necessary functions for dealing wi...
I am building a desktop application. Our analysis says it would be better built with a RCP. Should I use the eclipse or netbeans platform to build my application . Some of the factors to consider are Performance Look and Feel Popularity among target users (developers/testers) License (has to be some FOSS) The applica...
Choosing between the Eclipse Rich Client Platform (RCP) and the NetBeans Platform for your desktop application is a significant decision. Both have their strengths and weaknesses based on the criteria you've provided. Here’s an analysis of each platform according to your factors: ### Performance - **Eclipse RCP**: Gen...
25,857
[ { "from": "human", "value": "I am building a desktop application. Our analysis says it would be better built with a RCP. Should I use the eclipse or netbeans platform to build my application . Some of the factors to consider are\n\nPerformance\nLook and Feel\nPopularity among target users (developers/tester...
I just upgraded to Eclipse 3.4 for the second time and I think its for good now. The first time (right when it was released) was too buggy for me to stomach (mainly the PDT 2.0 plug-in); but now it seems to be all worked out. My problem is the Javascript validator. If I define a class in one JS file in my project, then...
It sounds like you're experiencing several issues with the JavaScript validation in Eclipse 3.4, particularly with the PDT (PHP Development Tools) and JavaScript features. Here are some suggestions to address the problems you're encountering: ### 1. **Handling Undefined Classes/Types:** The JavaScript validator can so...
27,920
[ { "from": "human", "value": "I just upgraded to Eclipse 3.4 for the second time and I think its for good now. The first time (right when it was released) was too buggy for me to stomach (mainly the PDT 2.0 plug-in); but now it seems to be all worked out.\nMy problem is the Javascript validator. If I define ...
I am sure this is easy stuff for all the readers of this website but this kind of problem is difficult for me. I have a website http://www.areacatracha.com that doesn't show up properly in Internet Explorer. Other browser display it normally. Can anyone help me? Any suggestions about how to start fixing these kinds ...
Cross-browser compatibility issues can indeed be frustrating, especially when a website works well in some browsers but not in others like Internet Explorer (IE). Here are some steps you can take to identify and fix these issues: ### 1. **Check Browser Compatibility** - First, ensure that your website is compatible...
29,329
[ { "from": "human", "value": "I am sure this is easy stuff for all the readers of this website but this kind of problem is difficult for me. \nI have a website http://www.areacatracha.com that doesn't show up properly in Internet Explorer. Other browser display it normally. \nCan anyone help me?\nAny sugges...
I don't use Eclipse as an IDE, and have no interest in doing so. However, I do like its source-level debugging. Is there any way I can use it to debug a C++ Linux app without going through the ritual of creating a project? (In effect, can I just use it like a frontend to gdb?) If not, what are the steps I need to fol...
If you want to use Eclipse as a frontend to `gdb` for debugging your C++ Linux application without going through the full project creation ritual, you can do so to some extent, but it's generally not as straightforward. Eclipse is primarily designed to work with projects, and its debugging capabilities are closely tied...
25,360
[ { "from": "human", "value": "I don't use Eclipse as an IDE, and have no interest in doing so. However, I do like its source-level debugging.\nIs there any way I can use it to debug a C++ Linux app without going through the ritual of creating a project? (In effect, can I just use it like a frontend to gdb?...
I'm looking to create a Visual Studio 2008 template that will create a basic project and based on remove certain files/folders based on options the user enters. Right now, I have followed some tutorials online which have let me create the form to query the user and pass the data into an IWizard class, but I don't know ...
Creating a Visual Studio 2008 project template that allows for selective inclusion of files and code sections based on user input is achievable, but it does require a bit of work. Here's a step-by-step approach to guide you through the process: ### Step 1: Create Your Project Template Start by creating your project i...
28,505
[ { "from": "human", "value": "I'm looking to create a Visual Studio 2008 template that will create a basic project and based on remove certain files/folders based on options the user enters.\nRight now, I have followed some tutorials online which have let me create the form to query the user and pass the dat...
UPDATE: i updated the code and problem description to reflect my changes. I know now that i'm trying a Socket operation on nonsocket. or that my fd_set is not valid since: select returns -1 and WSAGetLastError()returns 10038. But i can't seem to figure out what it is. Platform is Windows. I have not posted the WSAS...
The issue you are encountering relates to the use of `select()` on a file descriptor that is not a socket. In Windows, the `select()` function is primarily designed to work with sockets and not regular file descriptors such as those returned by `_popen()`. The `WSAGetLastError()` returning `10038` indicates that an op...
24,832
[ { "from": "human", "value": "UPDATE: i updated the code and problem description to reflect my changes. \nI know now that i'm trying a Socket operation on nonsocket. or that my fd_set is not valid since:\nselect returns -1 and \nWSAGetLastError()returns 10038. \nBut i can't seem to figure out what it is. Pl...
I want to draw spinner controls, such as those found on a NumericUpDown, on a custom component. If I want to draw a drop-down button, I can use ComboBoxRenderer. Is there an equivalent of ComboBoxRenderer for NumericUpDown?
In Windows Forms, there isn't a dedicated `NumericUpDownRenderer` class like `ComboBoxRenderer` that provides specific drawing methods for the `NumericUpDown` control. However, you can manually create a custom drawing logic to render the up and down buttons of a numeric up-down control. You typically have to draw the...
29,044
[ { "from": "human", "value": "I want to draw spinner controls, such as those found on a NumericUpDown, on a custom component. If I want to draw a drop-down button, I can use ComboBoxRenderer. Is there an equivalent of ComboBoxRenderer for NumericUpDown?\n" }, { "from": "gpt", "value": "In Windo...
I am trying to encrypt the appSettings and connectionStrings section in App.config file of the console application. For some reason section.SectionInformation.IsProtected is always returning true. static void Main(string[] args) { EncryptSection("connectionStrings", "DataProtectionConfigurationProvider"); } priv...
The behavior you're experiencing with `section.SectionInformation.IsProtected` returning `true` suggests that the section is already encrypted or protected when you're checking it. There are a few things to consider and check: 1. **Section Already Encrypted**: If the `App.config` has already been encrypted, `IsProtect...
28,999
[ { "from": "human", "value": "I am trying to encrypt the appSettings and connectionStrings section in App.config file of the console application. For some reason section.SectionInformation.IsProtected is always returning true. \nstatic void Main(string[] args)\n{\n EncryptSection(\"connectionStrings\", \"...
I'm trying to use the Grid from WPFToolkit, but I'm getting the error: DisplayDataMapping.xaml (9,89): errorMC1000: Unknown build error, 'Could not load type 'System.Windows.Controls.Primitives.MultiSelector' from assembly 'PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad...
The error message you're encountering indicates that there is an issue with loading the `MultiSelector` type from the `PresentationFramework` assembly, which is part of the WPF framework. This is likely caused by a version mismatch or an incorrect setup of the WPF Toolkit in your project. Here are some steps you can t...
28,304
[ { "from": "human", "value": "I'm trying to use the Grid from WPFToolkit, but I'm getting the error:\nDisplayDataMapping.xaml (9,89):\n errorMC1000: Unknown build error, \n 'Could not load type 'System.Windows.Controls.Primitives.MultiSelector' from assembly \n 'PresentationFramework, Version=3.0.0....
I'm creating a low level keyboard hook in c# using SetWindowsHookEx, question is how can I make the on keyboard event function run on a thread other from the main thread? Also I currently don't have a thread other then the main thread, so how can I create one that will halt until a keyboard hook event will occur?
To create a low-level keyboard hook in C# and run the event handler on a separate thread, you'll need to follow a series of steps. First, you should set up your keyboard hook using `SetWindowsHookEx`. Then, you'll create a thread that waits for keyboard events, allowing you to run your event handler on that thread. He...
17,743
[ { "from": "human", "value": "I'm creating a low level keyboard hook in c# using SetWindowsHookEx, question is how can I make the on keyboard event function run on a thread other from the main thread? Also I currently don't have a thread other then the main thread, so how can I create one that will halt unti...
What are the major difference between bindable LINQ and continuous LINQ? •Bindable LINQ: www.codeplex.com/bindablelinq •Continuous LINQ: www.codeplex.com/clinq One more project was added basing on the provided feedback: •Obtics: obtics.codeplex.com
Bindable LINQ and Continuous LINQ are both extensions of LINQ (Language Integrated Query) designed to facilitate querying and binding data in different ways, especially in dynamic or changing data scenarios. Here’s a breakdown of the major differences between them, including a brief mention of Obtics: ### Bindable LIN...
29,839
[ { "from": "human", "value": "What are the major difference between bindable LINQ and continuous LINQ?\n•Bindable LINQ: www.codeplex.com/bindablelinq\n•Continuous LINQ: www.codeplex.com/clinq\nOne more project was added basing on the provided feedback:\n•Obtics: obtics.codeplex.com\n" }, { "from": "g...
I have experimented with a sigmoid and logarithmic fade out for volume over a period of about half a second to cushion pause and stop and prevent popping noises in my music applications. However neither of these sound "natural". And by this I mean, they sound botched. Like an amateur engineer was in charge of the sound...
When it comes to creating natural-sounding volume fades, the key is to take into account how human perception of sound works. As you noted, our perception of loudness is logarithmic, and achieving a smooth, natural fade often requires using an exponential curve to more closely match that perception. ### Suggested Appr...
30,077
[ { "from": "human", "value": "I have experimented with a sigmoid and logarithmic fade out for volume over a period of about half a second to cushion pause and stop and prevent popping noises in my music applications.\nHowever neither of these sound \"natural\". And by this I mean, they sound botched. Like an...
I am making GUI (login window). When the password is correct, the login window must call other window. Is there a way in PerlTk to call another window rather than using subwindow? use strict; use Tk; my $mw = MainWindow->new; $mw->geometry("300x150"); $mw->configure(-background=>'gray',-foreground=>'red'); $mw->title...
In PerlTk, you can create a new window after a successful login by initializing another `MainWindow` or a `Toplevel` window within the `push_button` subroutine. Here’s how you can modify your existing script to achieve this: 1. Keep the original login window for user input. 2. Upon successful login (correct password),...
27,929
[ { "from": "human", "value": "I am making GUI (login window). When the password is correct, the login window must call other window. Is there a way in PerlTk to call another window rather than using subwindow?\nuse strict;\n\nuse Tk;\n\nmy $mw = MainWindow->new;\n$mw->geometry(\"300x150\");\n$mw->configure(-...
I have read about a technique involving writing to disk a rendered dynamic page and using that when it exists using mod_rewrite. I was thinking about cleaning out the cached version every X minutes using a cron job. I was wondering if this was a viable option or if there were better alternatives that I am not aware of....
Using a technique where you write rendered dynamic pages to disk and serve those cached files when they exist is a valid approach to improving performance, especially if you're on a shared hosting environment and don't have access to advanced caching mechanisms like `mod_cache`. Here are some considerations for your ap...
30,038
[ { "from": "human", "value": "I have read about a technique involving writing to disk a rendered dynamic page and using that when it exists using mod_rewrite. I was thinking about cleaning out the cached version every X minutes using a cron job.\nI was wondering if this was a viable option or if there were b...
I have a Java application set up as a service to do data-mining against ~3GB of data every few hours. I would like this to occur 100% in memory. Ideally I want the application to be isolated from everything; I want it to construct the database, do the mining I need, and tear down the database when it's done. However ...
In HSQLDB, you can create an in-memory database that does not persist any data to disk and also does not create log files. To achieve this, you can follow these steps: 1. **Use a specific URL to create an in-memory database**: You can specify the database URL as `jdbc:hsqldb:mem:mydb` which creates an in-memory databa...
29,761
[ { "from": "human", "value": "I have a Java application set up as a service to do data-mining against ~3GB of data every few hours. I would like this to occur 100% in memory. Ideally I want the application to be isolated from everything; I want it to construct the database, do the mining I need, and tear d...
I'm pretty new to the idea of recursion and this is actually my first attempt at writing a recursive method. I tried to implement a recursive function Max that passes an array, along with a variable that holds the array's size in order to print the largest element. It works, but it just doesn't feel right! I have als...
Your implementation of a recursive method to find the maximum element in an array works, but there are several areas for improvement. I will go over some common issues and provide suggestions to enhance your code. ### Key Issues and Improvements: 1. **Use of Static Variables**: - The use of static variables (`curr...
26,942
[ { "from": "human", "value": "I'm pretty new to the idea of recursion and this is actually my first attempt at writing a recursive method. \nI tried to implement a recursive function Max that passes an array, along with a variable that holds the array's size in order to print the largest element. \nIt works,...
I am writing a C library that reads a file into memory. It skips the first 54 bytes of the file (header) and then reads the remainder as data. I use fseek to determine the length of the file, and then use fread to read in the file. The loop runs once and then ends because the EOF is reached (no errors). At the end, byt...
It looks like you are reading a binary file in C, and you've correctly identified a common source of confusion when working with file modes. Let's break down your code and see if we can clarify your issue. ### Key Points 1. **File Mode**: When opening binary files on Windows, it's crucial to use the `"rb"` mode inste...
27,287
[ { "from": "human", "value": "I am writing a C library that reads a file into memory. It skips the first 54 bytes of the file (header) and then reads the remainder as data. I use fseek to determine the length of the file, and then use fread to read in the file.\nThe loop runs once and then ends because the E...
The simple HTML below displays differently in Firefox and WebKit-based browsers (I checked in Safari, Chrome and iPhone). In Firefox both border and text have the same color (#880000), but in Safari the text gets a bit lighter (as if it had some transparency applied to it). Can I somehow fix this (remove this transpare...
The issue you're encountering is likely due to how WebKit-based browsers (like Safari and Chrome) handle the `color` property of disabled form elements. By default, these browsers often render disabled inputs with a lighter text color to indicate that the input is not editable. To ensure consistent styling across brow...
29,470
[ { "from": "human", "value": "The simple HTML below displays differently in Firefox and WebKit-based browsers (I checked in Safari, Chrome and iPhone).\nIn Firefox both border and text have the same color (#880000), but in Safari the text gets a bit lighter (as if it had some transparency applied to it).\nCa...
I have a collection of Boost unit tests I want to run as a console application. When I'm working on the project and I run the tests I would like to be able to debug the tests, and I would like to have the console stay open after the tests run. I see that if I run in release mode the console window stays up after the pr...
To accomplish your goal of running Boost unit tests within Visual Studio while keeping the console window open after the tests finish and capturing output in the Visual Studio output window, you can follow these steps: ### Method 1: Modify Project Properties 1. **Change Output Type**: - Right-click on your project...
28,414
[ { "from": "human", "value": "I have a collection of Boost unit tests I want to run as a console application.\nWhen I'm working on the project and I run the tests I would like to be able to debug the tests, and I would like to have the console stay open after the tests run.\nI see that if I run in release mo...
I am an advocate of ORM-solutions and from time to time I am giving a workshop about Hibernate. When talking about framework-generated SQL, people usually start talking about how they need to be able to use "hints", and this is supposedly not possible with ORM frameworks. Usually something like: "We tried Hibernate. It...
SQL hints are special directives that you can add to your SQL statements to influence the behavior of the database query optimizer. They allow you to provide the database with specific instructions on how to execute a query more efficiently, especially in cases where the optimizer may not choose the best execution plan...
28,676
[ { "from": "human", "value": "I am an advocate of ORM-solutions and from time to time I am giving a workshop about Hibernate.\nWhen talking about framework-generated SQL, people usually start talking about how they need to be able to use \"hints\", and this is supposedly not possible with ORM frameworks.\nUs...
This is a very complicated question concerning how to serialize data via a web service call, when the data is not-strongly typed. I'll try to lay it out as best possible. Sample Storage Object: [Serializable] public class StorageObject { public string Name { get; set; } public string Birthday { get; set; } publi...
To meet your requirements of serializing the `OtherInfo` as key-value pairs while preserving the WSDL schema, and ensuring easy access from both PHP and C#, you can use a custom serialization approach with a dictionary-like structure. This approach allows you to keep the flexibility of name-value pairs (NVP) while reta...
26,744
[ { "from": "human", "value": "This is a very complicated question concerning how to serialize data via a web service call, when the data is not-strongly typed. I'll try to lay it out as best possible.\nSample Storage Object:\n[Serializable]\npublic class StorageObject {\n public string Name { get; set; }\n...
What is the best way of storing data out to a file on a network, which will be later read in again programmatically. Target platform for the program is Linux (Fedora), but it will need to write out a file to a Windows (XP) machine This needs to be in C++, there will be a high number of write / read events so it needs t...
Given your requirements and constraints, it seems you need an efficient way to append variable-sized blocks of data to a single file and then search through that file for specific entries based on criteria like data type and timestamp. Since you've ruled out the use of a database for simplicity reasons, here are some r...
26,966
[ { "from": "human", "value": "What is the best way of storing data out to a file on a network, which will be later read in again programmatically. Target platform for the program is Linux (Fedora), but it will need to write out a file to a Windows (XP) machine\nThis needs to be in C++, there will be a high n...
I'm working on a real time application implemented using in a SOA-style (read loosely coupled components connected via some messaging protocol - JMS, MQ or HTTP). The architect who designed this system opted to use JMS to connect the components. This system is real time so there no need to queue up messages should one...
You're raising some valid points regarding the use of JMS versus HTTP web services in a real-time application that doesn't require guaranteed delivery or transactional integrity. Let's break down some of the considerations: ### Advantages of Using JMS 1. **Asynchronous Messaging**: JMS is inherently asynchronous, whi...
25,374
[ { "from": "human", "value": "I'm working on a real time application implemented using in a SOA-style (read loosely coupled components connected via some messaging protocol - JMS, MQ or HTTP).\nThe architect who designed this system opted to use JMS to connect the components. This system is real time so the...
Here is a hum-dinger of a problem that I have not found an answer for. I am using the ASP.NET ajax control toolkit controls on a few pages, which by nature want to load script resources via WebResource.axd. This is all well and good for some applications, but each call to WebResource.axd requires an HTTP request. Most...
It looks like you've made some great progress in optimizing the performance of your ASP.NET Ajax applications by reducing the number of HTTP requests made to `WebResource.axd`. Here are a couple of approaches you can consider to further improve performance or to provide alternatives for other developers who may be faci...
30,503
[ { "from": "human", "value": "Here is a hum-dinger of a problem that I have not found an answer for. \nI am using the ASP.NET ajax control toolkit controls on a few pages, which by nature want to load script resources via WebResource.axd. This is all well and good for some applications, but each call to WebR...
I am building an application using Spring MVC. I want to make certain changes to my Model for every Controller in the application. In particular, I want to insert certain extra data into the model which will be present for all pages of the application. I could do this several ways: just add the data at the end of every...
You can achieve this elegantly in a Spring MVC application by using an `Interceptor`. Interceptors allow you to add common behavior for every request to your application, such as modifying the Model before rendering a view. Here's how you can do it: ### Step 1: Create an Interceptor You can create an interceptor that...
29,802
[ { "from": "human", "value": "I am building an application using Spring MVC. I want to make certain changes to my Model for every Controller in the application. In particular, I want to insert certain extra data into the model which will be present for all pages of the application.\nI could do this several w...
I have an existing SQL Server 2005 database that contains data encrypted using a Symmetric key. The symmetric key is opened using a password. I am working on an upgrade to the front end applications that use this database, which include adding dozens of new tables, stored procedures, UDFs, etc. and dozens of modificat...
Copying an SQL Server database that contains encrypted data can be a bit complex, especially when dealing with symmetric keys. Here are some options to consider, along with their implications: ### 1. **Backup and Restore Method** - **Description**: Take a backup of the existing database and restore it to a new databas...
22,207
[ { "from": "human", "value": "I have an existing SQL Server 2005 database that contains data encrypted using a Symmetric key. The symmetric key is opened using a password. I am working on an upgrade to the front end applications that use this database, which include adding dozens of new tables, stored proce...
Has anyone noticed that if you retrieve HTML from the clipboard, it gets the encoding wrong and injects weird characters? For example, executing a command like this: string s = (string) Clipboard.GetData(DataFormats.Html) Results in stuff like: <FONT size=-2>  <A href="/advanced_search?hl=en">Advanced Search</A><BR...
Yes, what you're experiencing is a common issue when dealing with text copied from the clipboard, particularly when the encoding isn't handled properly. The characters like "Â" that you're seeing are often the result of a mismatch between the expected character encoding (e.g., UTF-8) and the actual encoding of the clip...
26,784
[ { "from": "human", "value": "Has anyone noticed that if you retrieve HTML from the clipboard, it gets the encoding wrong and injects weird characters?\nFor example, executing a command like this:\nstring s = (string) Clipboard.GetData(DataFormats.Html)\n\nResults in stuff like:\n<FONT size=-2>  <A href=\"...
I'd like to develop an ecommerce site where I could allow others to sell items, things like pictures, videos, flash, etc. I want to be able to keep a percentage, and pay the rest back to the seller. Is there anything available, DotNetNuke, etc. that would do this or help get this started. If not what's a good way to ap...
Creating an eCommerce platform where others can sell their digital products (like pictures, videos, etc.) is a great idea. There are a number of existing platforms and technologies that can help you get started with minimal upfront costs, and also allow for future scalability. Here are some approaches you can consider:...
30,052
[ { "from": "human", "value": "I'd like to develop an ecommerce site where I could allow others to sell items, things like pictures, videos, flash, etc. I want to be able to keep a percentage, and pay the rest back to the seller.\nIs there anything available, DotNetNuke, etc. that would do this or help get th...
All, As part of an application I'm writing I need to have a HTTP PUT webservice which accepts incoming imagedata, which will by analyzed, validated, and added to a local file store. My issue arises after the size validation as the $_SERVER['CONTENT_LENGTH'] has a > 0 value, and this value is identical to the test fi...
It sounds like you are trying to read incoming data from a PUT request in PHP but are encountering an issue with `php://input` returning an empty string. Here are a few suggestions to help troubleshoot and resolve the issue: 1. **Check Request Method**: Ensure that your request is indeed a PUT request and that it is b...
29,916
[ { "from": "human", "value": "All,\nAs part of an application I'm writing I need to have a HTTP PUT webservice which accepts incoming imagedata, which will by analyzed, validated, and added to a local file store.\nMy issue arises after the size validation as the \n\n$_SERVER['CONTENT_LENGTH']\n\nhas a > 0 va...
Since I keep showing up late for answering questions tagged php where i actually know the answer i figured i'd try asking a question myself. I've been working on so many complete rewrites of a custom template engine in php for so long and so many times that i thought i'd ask for opinions. In short, this is the most imp...
It's great to see that you're diving deep into building your own template engine and MVC framework in PHP! Creating a custom solution can be a rewarding challenge, especially if you're looking to learn and tailor the experience to your needs. Here are some suggestions and "must-have" functionalities that you might cons...
24,411
[ { "from": "human", "value": "Since I keep showing up late for answering questions tagged php where i actually know the answer i figured i'd try asking a question myself.\nI've been working on so many complete rewrites of a custom template engine in php for so long and so many times that i thought i'd ask fo...
I've installed the Windows XAMPP package on three separate computers, 2 running Windows Vista 32 bit ( 1 Ultimate / 1 Home Premium ) and 1 running Windows Vista 64 Home Premium. After enabling xdebug in php.ini and restarting apache, viewing the default XAMPP localhost index causes apache to crash in the same way every...
It seems that you encountered a common issue related to the `php_xdebug.dll` extension in your XAMPP installation. Given that enabling the extension caused Apache to crash, you might be experiencing compatibility issues between the version of Xdebug you are using and your PHP version or configuration. Here are some st...
28,429
[ { "from": "human", "value": "I've installed the Windows XAMPP package on three separate computers, 2 running Windows Vista 32 bit ( 1 Ultimate / 1 Home Premium ) and 1 running Windows Vista 64 Home Premium.\nAfter enabling xdebug in php.ini and restarting apache, viewing the default XAMPP localhost index ca...
I've got a large number of integer arrays. Each one has a few thousand integers in it, and each integer is generally the same as the one before it or is different by only a single bit or two. I'd like to shrink each array down as small as possible to reduce my disk IO. Zlib shrinks it to about 25% of its original s...
Given the nature of your data, where the integers in your arrays are generally similar or differ by small values, you might want to consider a few specialized approaches that could improve compression over standard libraries like zlib. Here are some strategies and libraries that might help: 1. **Delta Encoding**: Sinc...
30,333
[ { "from": "human", "value": "I've got a large number of integer arrays. Each one has a few thousand integers in it, and each integer is generally the same as the one before it or is different by only a single bit or two. I'd like to shrink each array down as small as possible to reduce my disk IO. \nZlib...
We have a custom service that writes to a DB (SQL 2005). This is a full 64-bit environment (DB, .NET service). On one of our servers we crash every morning when we have a spike in our volume of data. On another server we run fine. The only differences that I've been able to notice between the two machines is that t...
The issue you are experiencing with the crash of your custom service that writes to the database appears to be related to the specific environment on the server experiencing the crash. Here are a few troubleshooting steps and considerations you might find helpful: 1. **Analyze the Error Logs**: The crash log you provi...
28,788
[ { "from": "human", "value": "We have a custom service that writes to a DB (SQL 2005). This is a full 64-bit environment (DB, .NET service). On one of our servers we crash every morning when we have a spike in our volume of data. On another server we run fine. The only differences that I've been able to ...
I'm using a std::map (VC++ implementation) and it's a little slow for lookups via the map's find method. The key type is std::string. Can I increase the performance of this std::map lookup via a custom key compare override for the map? For example, maybe std::string < compare doesn't take into consideration a simple s...
When you're dealing with performance-critical scenarios in C++ with a `std::map` that has relatively few elements (less than 15), the inherent overhead of the tree-based structure of a `std::map` may not be justified. Here are some suggestions to improve performance for your use case: ### 1. Custom Comparator You can...
27,350
[ { "from": "human", "value": "I'm using a std::map (VC++ implementation) and it's a little slow for lookups via the map's find method. \nThe key type is std::string.\nCan I increase the performance of this std::map lookup via a custom key compare override for the map? For example, maybe std::string < compare...
I'm stuck in .NET 2.0 Windows Forms. It doesn't look like the ability to select multiple nodes exists in the standard TreeView control. I'm trying to do this for a context menu selection. So check boxes aren't an acceptable UI paradigm here. What's the best way to provide that very necessary functionality?
While the standard `TreeView` control in .NET 2.0 does not support multi-selection out of the box, you can implement a workaround to achieve the desired behavior. The idea is to simulate the multi-selection functionality by tracking selected nodes manually. Here’s a way to implement this: 1. **Custom Selection Logic*...
29,143
[ { "from": "human", "value": "I'm stuck in .NET 2.0 Windows Forms.\nIt doesn't look like the ability to select multiple nodes exists in the standard TreeView control.\nI'm trying to do this for a context menu selection. So check boxes aren't an acceptable UI paradigm here.\nWhat's the best way to provide th...
Does anyone know how to get the MS Office 2007 .NET C# Interop libraries to work with Vista? I have a .NET C# application that I have setup to run as a Windows service. This program will open up a Word or Excel template depending on the situation and modify its contents and then save the document back out. All of ...
Running Office Interop from a Windows Service can be tricky, especially on newer operating systems like Windows Server 2008 and Vista, due to several factors such as security permissions and the lack of a user interface (UI) context. Here are some steps and considerations that might help you resolve your issue: 1. **S...
28,210
[ { "from": "human", "value": "Does anyone know how to get the MS Office 2007 .NET C# Interop libraries to work with Vista? \nI have a .NET C# application that I have setup to run as a Windows service. This program will open up a Word or Excel template depending on the situation and modify its contents and...
Why does using Fiddler break my site sometimes on page transitions. After a server side redirect -- in the http response (as found in Fiddler) I get this: Object moved Object moved to here. The site is an ASP.NET 1.1 / VB.NET 1.1 [sic] site. Why doesnt Fiddler just go there for me? i dont get it. I'm fine with this i...
The behavior you're observing with Fiddler and the "Object moved" message is related to how HTTP redirections work and how Fiddler handles them. ### What Happens During a Server-Side Redirect? 1. **HTTP Response**: When a server-side redirect occurs, the server sends a specific HTTP status code (like 301 or 302) alon...
28,249
[ { "from": "human", "value": "Why does using Fiddler break my site sometimes on page transitions.\nAfter a server side redirect -- in the http response (as found in Fiddler) I get this:\nObject moved\nObject moved to here.\n\nThe site is an ASP.NET 1.1 / VB.NET 1.1 [sic] site. \nWhy doesnt Fiddler just go th...
How do I solve the error: Unable to read WSDL from URL: https://workflowtest.site.edu/_vti_bin/Lists.asmx?WSDL. Error: 401 Unauthorized. I can successfully view the WSDL from the browser using the same user account. I'm not sure which authentication is being used (Basic or Integrated). How would I find that out? Th...
The error you're encountering (`401 Unauthorized`) suggests that the ColdFusion code is attempting to access the WSDL at the provided URL without the proper authentication. Here's how to troubleshoot and resolve this issue: ### Step 1: Determine the Authentication Method To determine which authentication method is bei...
21,782
[ { "from": "human", "value": "How do I solve the error:\n\nUnable to read WSDL from URL: https://workflowtest.site.edu/_vti_bin/Lists.asmx?WSDL.\n Error: 401 Unauthorized.\n\nI can successfully view the WSDL from the browser using the same user account.\nI'm not sure which authentication is being used (Basi...
In the recent project, we had an issue with the performance of few queries that relied heavily on ordering the results by datetime field (MSSQL 2008 database). When we executed the queries with ORDER BY RecordDate DESC (or ASC) the queries executed 10x slower than without that. Ordering by any other field didn't produc...
Converting a datetime field to an integer representation for performance reasons can be a valid strategy in certain situations, but it comes with trade-offs. Here's a detailed look at the pros and cons of this approach: ### Pros 1. **Performance Improvement**: Integer comparisons (like sorting) are generally faster t...
28,605
[ { "from": "human", "value": "In the recent project, we had an issue with the performance of few queries that relied heavily on ordering the results by datetime field (MSSQL 2008 database).\nWhen we executed the queries with ORDER BY RecordDate DESC (or ASC) the queries executed 10x slower than without that....
In MySQL 5.0 why does the following error occur when trying to create a view with a subquery in the FROM clause? ERROR 1349 (HY000): View's SELECT contains a subquery in the FROM clause If this is a limitation of the MySQL engine, then why haven't they implemented this feature yet? Also, what are some good workaround...
The error you are encountering when trying to create a view that includes a subquery in the FROM clause in MySQL 5.0 is due to a limitation in that version of MySQL. As you've noted, MySQL does not allow the creation of views that contain subqueries in the FROM clause. This limitation is present in several versions of ...
28,897
[ { "from": "human", "value": "In MySQL 5.0 why does the following error occur when trying to create a view with a subquery in the FROM clause?\n\nERROR 1349 (HY000): View's SELECT contains a subquery in the FROM clause\n\nIf this is a limitation of the MySQL engine, then why haven't they implemented this fea...
While LOC (# lines of code) is a problematic measurement of a code's complexity, it is the most popular one, and when used very carefully, can provide a rough estimate of at least relative complexities of code bases (i.e. if one program is 10KLOC and another is 100KLOC, written in the same language, by teams of roughly...
When it comes to counting lines of code (LOC) for the purpose of estimating complexity, I have a nuanced approach that balances practical needs with the characteristics of the codebase being analyzed. ### Counting Comments 1. **Include Comments**: I prefer to include comments in the LOC count because they serve an ess...
31,801
[ { "from": "human", "value": "While LOC (# lines of code) is a problematic measurement of a code's complexity, it is the most popular one, and when used very carefully, can provide a rough estimate of at least relative complexities of code bases (i.e. if one program is 10KLOC and another is 100KLOC, written ...
Inside a service, what is the best way to determine a special folder path (e.g., "My Documents") for a specific user? SHGetFolderPath allows you to pass in a token, so I am assuming there is some way to impersonate the user whose folder you are interested in. Is there a way to do this based just on a username? If not, ...
To determine a special folder path, like "My Documents," for a specific user account in a Windows service context, you can indeed use `SHGetFolderPath` (or its modern replacement, `SHGetKnownFolderPath`). However, if you're operating in a Windows service and need to access another user's folder based on their username,...
19,297
[ { "from": "human", "value": "Inside a service, what is the best way to determine a special folder path (e.g., \"My Documents\") for a specific user? SHGetFolderPath allows you to pass in a token, so I am assuming there is some way to impersonate the user whose folder you are interested in.\nIs there a way t...
I've inherited a .NET application that pulls together about 100 dlls built by two teams or purchased from vendors. I would like to quickly identify whether a given dll is a .NET assembly or a COM component. I realize that I could just invoke ildasm on each dll individually and make a note if the dll does not have a val...
To automate the identification of whether a given DLL is a .NET assembly or a COM component, you can use a combination of .NET libraries and tools to streamline the process. Below are some methods you can use to quickly identify the type of DLLs: ### 1. **Using Reflection:** You can use .NET Reflection to determine i...
26,586
[ { "from": "human", "value": "I've inherited a .NET application that pulls together about 100 dlls built by two teams or purchased from vendors. I would like to quickly identify whether a given dll is a .NET assembly or a COM component. I realize that I could just invoke ildasm on each dll individually and m...
I have a lot of buttons and by clicking on different button, different image and text would appear. I can achieve what I want, but the code is just so long and it seems very repetitive. For example: var aaClick = false; $("aa").observe('click', function() { unclick(); $('characterPic').writeAttri...
Yes, you can certainly simplify your code by creating a generic function that handles the click, mouseover, and mouseout events for all buttons. This way, you avoid repetition and make it much easier to add new buttons in the future. Here's how you can refactor your code: ```javascript var currentButton = null; func...
31,568
[ { "from": "human", "value": "I have a lot of buttons and by clicking on different button, different image and text would appear. I can achieve what I want, but the code is just so long and it seems very repetitive.\nFor example:\n var aaClick = false;\n $(\"aa\").observe('click', function() {\n ...
I have a data tables with this type of setup. Table A AID AName --------------------- 1 A_Name1 2 A_Name2 3 A_Name3 Table B BID BName --------------------- 10 B_Name1 20 B_Name2 30 B_Name3 Table C AID BID --------------------- 1 10 2 10 2 20 2 30 3 ...
You can achieve the equivalent functionality of your SQL query using LINQ by performing a left outer join and filtering the results accordingly. Below is an example of how you could implement this in C# using LINQ, assuming you have classes that represent each of your tables (`A`, `B`, and `C`), and collections that co...
20,938
[ { "from": "human", "value": "I have a data tables with this type of setup.\nTable A\nAID AName\n---------------------\n1 A_Name1\n2 A_Name2\n3 A_Name3\n\nTable B\nBID BName\n---------------------\n10 B_Name1\n20 B_Name2\n30 B_Name3\n\nTable C\nAID BID\n----------...
Basically I'm converting local dates stored in the database into UTC. But I've read somewhere that daylight saving rules have changed in 2007. So does the Date.ToUniversalTime() function still work correctly. Basically the dates before 2007(when the new rules came into effect) would be converted correctly but the dates...
You're correct in your understanding of the potential issues when converting local times to UTC, particularly with respect to historical daylight saving time (DST) rules. In .NET, the `DateTime.ToUniversalTime()` method will take into account the current timezone's daylight saving rules at the time the method is called...
30,775
[ { "from": "human", "value": "Basically I'm converting local dates stored in the database into UTC. But I've read somewhere that daylight saving rules have changed in 2007. So does the Date.ToUniversalTime() function still work correctly. Basically the dates before 2007(when the new rules came into effect) w...
Visual Studio makes calling a web service easy, trying to figure out what is going on under the covers is difficult. How can I see the actual XML generated from my .Net app when making a call to a web service?
To see the actual XML generated by your .NET application when calling a web service, you can use several methods to inspect the outgoing requests. Here are a few approaches: ### 1. **Use WCF Diagnostics (for WCF services)** If your application is using Windows Communication Foundation (WCF) to call the web service, yo...
25,741
[ { "from": "human", "value": "Visual Studio makes calling a web service easy, trying to figure out what is going on under the covers is difficult.\nHow can I see the actual XML generated from my .Net app when making a call to a web service?\n" }, { "from": "gpt", "value": "To see the actual XML g...
We're looking to automate our deployment of Web Applications, particularly when going from local development to a remote server. Our current stack is LAMP remotely, MAMP locally, but I'm interested in general what people are using for this task regardless of their environment? I'm not just talking about moving files ar...
Automating the deployment of web applications is a common challenge, and there are various tools and practices you can employ to streamline the process, regardless of the underlying environment. Below are some approaches and tools widely used for deployment automation that encompass not just file transfers but also dat...
21,119
[ { "from": "human", "value": "We're looking to automate our deployment of Web Applications, particularly when going from local development to a remote server.\nOur current stack is LAMP remotely, MAMP locally, but I'm interested in general what people are using for this task regardless of their environment?\...
I am attempting to compare files in a directory using SML. Using the TextIO library is fairly easy but I need to compare the files at the bit level. That is, a binary compare. I am using a function similar to this: fun listDir (s) = let fun loop (ds) = (case OS.FileSys.readDir (ds) of "" => [] before OS.Fil...
In Standard ML (SML), to perform a binary comparison of files at the bit level, you'll need to read the contents of the files as binary data rather than as text. The `TextIO` library is indeed more suited for text processing, so you'll want to use the `BinaryIO` library for this purpose. Here’s a general outline of h...
24,519
[ { "from": "human", "value": "I am attempting to compare files in a directory using SML. Using the TextIO library is fairly easy but I need to compare the files at the bit level. That is, a binary compare. I am using a function similar to this:\nfun listDir (s) = let\n fun loop (ds) = (case OS.FileSys.rea...
Intro: I successfully implemented a WCF Service hosted in a Windows Service a few days ago. The community here at StackOverflow helped me with the WSDL exposure here. I thank you once again. However recently I found out that there is another potential client for this service this time located on the same machine as the...
You're correct that named pipes are generally the best choice for inter-process communication on the same machine because they are efficient and offer lower latency compared to other binding options. ### MEX and Named Pipes The MetaData Exchange (MEX) endpoint is important when you're adding a service reference becau...
28,448
[ { "from": "human", "value": "Intro:\nI successfully implemented a WCF Service hosted in a Windows Service a few days ago. The community here at StackOverflow helped me with the WSDL exposure here. I thank you once again. However recently I found out that there is another potential client for this service th...
Is there a way to disable LINQ's object tracking features, without also disabling lazy-loaded child associations? I'm using LINQ2SQL in a set of integration tests. I'm only using LINQ to verify changes in the database, so I want it to act like a simple data access layer rather than a full ORM. To do this,I set set the ...
In LINQ to SQL, if you want to disable object tracking without completely disabling lazy loading for related entities, unfortunately, you're limited in options because setting `ObjectTrackingEnabled` to `false` indeed disables lazy loading features as well. However, there are a couple of strategies you can consider to...
30,306
[ { "from": "human", "value": "Is there a way to disable LINQ's object tracking features, without also disabling lazy-loaded child associations?\nI'm using LINQ2SQL in a set of integration tests. I'm only using LINQ to verify changes in the database, so I want it to act like a simple data access layer rather ...
In C++, what's the generic way to convert any floating point value (float) to fixed point (int, 16:16 or 24:8)? EDIT: For clarification, fixed-point values have two parts to them: an integer part and a fractional part. The integer part can be represented by a signed or unsigned integer data type. The fractional part ...
To convert a floating point value to a fixed-point representation in C++, you can follow a generic approach that handles both 16:16 and 24:8 formats. Here's how you can implement this in a clear and concise manner: ### Fixed-Point Conversion 1. **16:16 Fixed-Point Representation**: - The first 16 bits represent th...
26,258
[ { "from": "human", "value": "In C++, what's the generic way to convert any floating point value (float) to fixed point (int, 16:16 or 24:8)?\nEDIT: For clarification, fixed-point values have two parts to them: an integer part and a fractional part. The integer part can be represented by a signed or unsigne...
I need to make some reflective method calls in Java. Those calls will include methods that have arguments that are primitive types (int, double, etc.). The way to specify such types when looking up the method reflectively is int.class, double.class, etc. The challenge is that I am accepting input from an outside source...
You can indeed dynamically obtain `Class` references for both primitive types and their corresponding wrapper classes in Java. While using `Class.forName()` works for reference types (like `java.lang.String`), primitive types require a different approach. Here's a simple way to achieve this by mapping the string repre...
23,023
[ { "from": "human", "value": "I need to make some reflective method calls in Java. Those calls will include methods that have arguments that are primitive types (int, double, etc.). The way to specify such types when looking up the method reflectively is int.class, double.class, etc.\nThe challenge is that I...
I am a SQL Server user . I am on a project that is using oracle (which I rarely use) I need to create an ODBC connection so I can access the some data via MS Access I have a application on my machine called oraHome90. It seems to allow a configuration of something called a listener in a “net configuration utility”, I ...
It sounds like you're on the right track, but the error you're encountering (ORA-12154: TNS: Could not resolve service name) usually indicates a problem with the TNS configuration. Here's a step-by-step guide to help you set up the ODBC connection and troubleshoot the issue: ### Step 1: Configure TNS Names 1. **Open t...
28,852
[ { "from": "human", "value": "I am a SQL Server user .\nI am on a project that is using oracle (which I rarely use) \nI need to create an ODBC connection so I can access the some data via MS Access\nI have a application on my machine called oraHome90. It seems to allow a configuration of something called a l...
I have a certain POJO which needs to be persisted on a database, current design specifies its field as a single string column, and adding additional fields to the table is not an option. Meaning, the objects need to be serialized in some way. So just for the basic implementation I went and designed my own serialized fo...
When you're required to serialize a Java POJO into a single string for storage in a database, there are several approaches you can consider that strike a balance between performance, ease of use, and avoiding issues like delimiter conflicts. Here are some options: ### 1. JSON Serialization Using JSON is a popular choi...
25,373
[ { "from": "human", "value": "I have a certain POJO which needs to be persisted on a database, current design specifies its field as a single string column, and adding additional fields to the table is not an option.\nMeaning, the objects need to be serialized in some way. So just for the basic implementatio...
Let's say I have a table that has a column of XML type data. Within SQL, I can execute the following statement: select top 10 *, Content.value('(/root/item/value)[1]', 'float') as Value from xmltabletest where Content.value('(/root/item/MessageType)[1]', 'int') = 1 The result set contains only the ...
Yes, you can achieve similar functionality using LINQ to SQL by leveraging SQL Server's XML capabilities and mapping those to your LINQ queries. However, since you're working with .NET 3.5 and LINQ to SQL, there are certain limitations in terms of direct XML querying capabilities as compared to raw SQL. While LINQ to ...
28,993
[ { "from": "human", "value": "Let's say I have a table that has a column of XML type data. Within SQL, I can execute the following statement:\nselect top 10 *,\n Content.value('(/root/item/value)[1]', 'float') as Value\nfrom xmltabletest\nwhere Content.value('(/root/item/MessageType)[1]', ...
So my list looks something like this: <div="list"> <ul> <li class="page item">Parent 1 <ul> <li class="page item">Child of Parent 1 and Parent of Grandchild <ul> <li class="page item">Grandchild</li> </ul> </li> </ul> </li> </ul> </div> This is ...
To add an arrow icon to only the child pages that are also parents in your nested unordered list structure, you can use jQuery to target the appropriate list items and add a new class to them. Here’s how you can achieve this: 1. **Identify Parent Children**: You want to target list items (`<li>`) that contain another ...
30,210
[ { "from": "human", "value": "So my list looks something like this: \n<div=\"list\">\n <ul>\n <li class=\"page item\">Parent 1\n <ul>\n <li class=\"page item\">Child of Parent 1 and Parent of Grandchild\n <ul>\n <li class=\"page item\">Grandchild</li>\n </ul>\n ...
in Erlang I have a supervisor-tree of processes, containing one that accepts tcp/ip connections. For each incoming connection I spawn a new process. Should this process be added to the supervisor tree or not? Regards, Steve
In Erlang, when designing a supervision tree for managing processes, it's important to consider the lifecycle and fault tolerance of the processes you are spawning. When it comes to handling TCP/IP connections: 1. **Connection Processes**: Each time you accept a new TCP connection, it's common to spawn a new process t...
24,007
[ { "from": "human", "value": "in Erlang I have a supervisor-tree of processes, containing one that accepts tcp/ip connections. For each incoming connection I spawn a new process. Should this process be added to the supervisor tree or not?\nRegards,\n Steve\n" }, { "from": "gpt", "value": "In Erla...
Perhaps this question is not very clear but I didn't find better words for the heading, which describes the problem I like to deal with shortly. I want to restrict access from a java desktop application to postgres. The background: Suppose you have 2 apps running and the first Application has to do some complex calcul...
Your approach of using a server-side Java application as a proxy to handle CRUD operations for a PostgreSQL database, while implementing a locking mechanism, is an interesting and viable solution. Here are some thoughts on the key aspects of your approach: ### 1. **Locking Mechanism:** - **Implementation**: You can...
24,307
[ { "from": "human", "value": "Perhaps this question is not very clear but I didn't find better words for the heading, which describes the problem I like to deal with shortly.\nI want to restrict access from a java desktop application to postgres. \nThe background:\nSuppose you have 2 apps running and the fir...
I am working on a co-workers website, and he mistakenly put up a gridview that shows a TypeID instead of the TypeName. I want to put the actual NAME of the type, instead of it's arbitrary ID number, like he has it. I see he has two "ObjectDataSource"'s on the page -- one for Type and one for Item. Items contains the...
Yes, you can achieve this by utilizing the two ObjectDataSources on the page—one for the types and another for the items—and using a technique known as "data binding" to display the type names instead of the type IDs in your GridView. However, you cannot directly bind two different data sources to a single column of th...
29,327
[ { "from": "human", "value": "I am working on a co-workers website, and he mistakenly put up a gridview that shows a TypeID instead of the TypeName. I want to put the actual NAME of the type, instead of it's arbitrary ID number, like he has it. I see he has two \"ObjectDataSource\"'s on the page -- one for...
I have a XML schema that I will need to create Java classes for. It is not a particularly large schema, I'd say it will result in around 20 classes. I am trying to weigh up whether to use an automatic binding program (like the one supplied in JAXB or JiBX) or whether to manually write my own classes and use something l...
When deciding whether to use an automatic binding program like JAXB or JiBX to generate Java classes from your XML schema versus manually writing your own classes and using a library like XStream, there are several factors to consider. Below are the advantages and disadvantages of each approach: ### Using an Automatic...
27,421
[ { "from": "human", "value": "I have a XML schema that I will need to create Java classes for. It is not a particularly large schema, I'd say it will result in around 20 classes. I am trying to weigh up whether to use an automatic binding program (like the one supplied in JAXB or JiBX) or whether to manually...
I have a website built in PHP 4 with a framework made by hand by me. The code is 3 years old and I am limited (well it requires a lot of effort to make changes). I decided to do new version of this website. My knowledge has since increased, and now I know that a lot of frameworks exist and that IOC is there and ORM too...
Deciding whether to continue with PHP or switch to .NET for your web application is a significant choice that involves weighing multiple factors. Here are some aspects to consider for each option: ### Staying with PHP 1. **Familiarity and Existing Codebase**: You already have a codebase, and since you built it yourse...
28,089
[ { "from": "human", "value": "I have a website built in PHP 4 with a framework made by hand by me. The code is 3 years old and I am limited (well it requires a lot of effort to make changes).\nI decided to do new version of this website. My knowledge has since increased, and now I know that a lot of framewor...
I haven´t experience in making setup, but I all ready make mine but now I need help because when I made a new version I want that the user double click the shortcut and it do the update if there are any. The application is in c#. Could you help?
Sure! To enable your C# application to automatically check for and perform updates when the user double-clicks a shortcut, you can implement an update mechanism using a combination of a server-side version check and a client-side update process. Below are the steps to set this up. ### Step 1: Versioning Your Applicati...
27,716
[ { "from": "human", "value": "I haven´t experience in making setup, but I all ready make mine but now I need help because when I made a new version I want that the user double click the shortcut and it do the update if there are any.\nThe application is in c#.\nCould you help?\n" }, { "from": "gpt", ...
I want to port a project from sybase to oracle. I need to port the tables scripts (around 30) and some data in meta data tables(100 rows 2/3 tables). What will the best tool for this work?
When porting a project from Sybase to Oracle, particularly for migrating table scripts and some metadata data, there are several tools and approaches you can consider: ### 1. **Oracle SQL Developer** - **Features**: Oracle SQL Developer provides a migration workbench that can help in migrating from various databases, ...
27,932
[ { "from": "human", "value": "I want to port a project from sybase to oracle. I need to port the tables scripts (around 30) and some data in meta data tables(100 rows 2/3 tables). What will the best tool for this work?\n" }, { "from": "gpt", "value": "When porting a project from Sybase to Oracle,...
I need to store large amounts of metering data in a database. A record consists of an id that identifies the data's source, a timestamp and a value. The records are later retrieved via the id and their timestamp. According to my previous experience (I am developing the successor of an application that's been in product...
When considering how to optimize the storage of large amounts of metering data, there are several strategies you can employ to balance between minimizing excess data in chunks and maximizing the likelihood of retrieving all necessary data in a single read operation. Here are some approaches to consider: ### 1. Time Bu...
27,575
[ { "from": "human", "value": "I need to store large amounts of metering data in a database. A record consists of an id that identifies the data's source, a timestamp and a value. The records are later retrieved via the id and their timestamp.\nAccording to my previous experience (I am developing the successo...
I am currently trying to import a semi-colon delimited text file into a database in c# using OleDb where I don't know the type (SQL Server, Access, Oracle, MySQL, postgreSQL, etc.) Currently I'm reading in the file as a database using the Jet text reader then creating a prepared insert statement, populating the fields...
When importing large datasets into a database, performance can often be a bottleneck, especially if you’re using a row-by-row insert approach. Since you're currently using OleDb with a prepared insert statement, which can be slow for millions of rows, here are some strategies you can consider to improve the performance...
25,171
[ { "from": "human", "value": "I am currently trying to import a semi-colon delimited text file into a database in c# using OleDb where I don't know the type (SQL Server, Access, Oracle, MySQL, postgreSQL, etc.) Currently I'm reading in the file as a database using the Jet text reader then creating a prepare...
I am hoping to find a resource for lining up input elements in a HTML page. I find it difficult to get a select element and a text box to be the same width even when using the width style attribute, and it is even more difficult across browsers. Finally, file inputs seem impossible to get to the same width cross browse...
Aligning input elements like text boxes, select elements, and file inputs across browsers can indeed be tricky due to varying default styles. Here are some tips and a basic CSS approach to help you achieve consistent widths for your form elements: ### General Tips 1. **CSS Reset/Normalization**: Use a CSS reset or no...
28,438
[ { "from": "human", "value": "I am hoping to find a resource for lining up input elements in a HTML page. I find it difficult to get a select element and a text box to be the same width even when using the width style attribute, and it is even more difficult across browsers. Finally, file inputs seem impossi...
Suppose there is a fully populated array of data String[n][3] myData. I want to do this: for (String[] row : myData) { SQL = "update mytable set col3 = row[2] where col1 = row[0] and col2=row[1];" } Obviously I've left a lot out, but I want to express the idea as succinctly as possible. Is there a simple way of...
To update multiple records in a single command in MS-SQL Server, you can use the `UPDATE` statement with a `JOIN` or `CASE` statement. Here's how you could approach both solutions for your scenario: ### Simple Way: Using a Temporary Table 1. Create a temporary table to hold your data. 2. Insert your data into this te...
21,743
[ { "from": "human", "value": "Suppose there is a fully populated array of data String[n][3] myData.\nI want to do this:\nfor (String[] row : myData)\n{\n SQL = \"update mytable set col3 = row[2]\n where col1 = row[0] and col2=row[1];\" \n}\n\nObviously I've left a lot out, but I want to express the idea ...
What is people's prefered method of storing application configuration data in a database. From having done this in the past myself, I've utilised two ways of doing it. You can create a table where you store key/value pairs, where key is the name of the config option and value is its value. Pro's of this is adding new ...
Your experience with storing application configuration data in a database is a common scenario, and both methods you've outlined have their pros and cons. There are also some alternative approaches and considerations that you might find useful: ### 1. JSON/BLOB Storage - **Description**: Store the configuration data a...
27,734
[ { "from": "human", "value": "What is people's prefered method of storing application configuration data in a database. From having done this in the past myself, I've utilised two ways of doing it.\n\nYou can create a table where you store key/value pairs, where key is the name of the config option and value...
I just posted the question how-to-determine-why-the-browser-keeps-trying-to-load-a-page and discovered that my problem is with Gravatar. I also noticed that StackOverflow is suffering from the same outage. Does anyone know of a graceful way to determine if Gravatar, or any third party website for that matter, is up...
To handle situations where a third-party service like Gravatar is down, you can implement several strategies to check the service's availability before attempting to load resources from it. Here are a few approaches you can consider: ### 1. **Using a Simple Ping or Health Check** You can perform a simple `HEAD` reque...
29,285
[ { "from": "human", "value": "I just posted the question how-to-determine-why-the-browser-keeps-trying-to-load-a-page and discovered that my problem is with Gravatar. \nI also noticed that StackOverflow is suffering from the same outage. \nDoes anyone know of a graceful way to determine if Gravatar, or any...
I have a problem I'm trying to solve involving interfaceing a C++ program with Excel (an import interface, specifically). The SheetSelectionChange sounds like it will get me most of the way to where I need to be, but I can't find any good documentation or examples on registering the event, using its Range parameter wh...
Interfacing a C++ program with Excel can indeed be done through COM (Component Object Model), and handling events such as `SheetSelectionChange` requires a few steps to set up correctly. Below is a general outline on how to register and handle the `SheetSelectionChange` event using raw COM, without relying on wrapper c...
22,309
[ { "from": "human", "value": "I have a problem I'm trying to solve involving interfaceing a C++ program with Excel (an import interface, specifically). The SheetSelectionChange sounds like it will get me most of the way to where I need to be, but I can't find any good documentation or examples on registerin...
I've been developing a Smalltalk variant for just the fun of it and I wonder what would be a fellow stackoverflowers choice when it comes to targeting a back-end. These were my current considerations: .NET, JVM: These two VM's are mainly for statically typed languages and I assume it would be quite hard to target such ...
It's great to hear about your Smalltalk variant project! Each of the options you've mentioned has its pros and cons, and the best choice largely depends on your specific goals for the project. Here’s a breakdown of some of the options you've considered: 1. **.NET and JVM**: - While it's true that both platforms ar...
29,096
[ { "from": "human", "value": "I've been developing a Smalltalk variant for just the fun of it and I wonder what would be a fellow stackoverflowers choice when it comes to targeting a back-end. These were my current considerations:\n.NET, JVM: These two VM's are mainly for statically typed languages and I ass...
I am fairly new to WPF and I am having a problem with inheriting from a user control. I created a User Control and now I need to inherit from that control and add some more functionality. Has anyone does this sort of thing before? Any help would be greatly appreciated. Thank you
Inheriting from a User Control in WPF is a common scenario, and it allows you to create a more specialized version of a control with additional functionality. Here's a step-by-step guide on how to do this effectively. ### Step 1: Create the Base User Control First, create a User Control that you want to inherit from....
28,856
[ { "from": "human", "value": "I am fairly new to WPF and I am having a problem with inheriting from a user control.\nI created a User Control and now I need to inherit from that control and add some more functionality.\nHas anyone does this sort of thing before? Any help would be greatly appreciated.\nThank...
I'm looking for a .NET library or command line tool that would allow me to extract thumbnails from FLV files (AVI would be nice too, but not required). Something that would allow me to extract a frame maybe 15% into the movie would suffice. If it could extract a few frames, let's say one frame per minute, and make an a...
For your requirements of extracting thumbnails from FLV and AVI files, as well as potentially creating an animated GIF, you can consider the following .NET libraries and command line tools: ### 1. **FFmpeg** FFmpeg is a powerful command-line tool that can handle almost any video format, including FLV and AVI. You can ...
26,700
[ { "from": "human", "value": "I'm looking for a .NET library or command line tool that would allow me to extract thumbnails from FLV files (AVI would be nice too, but not required). Something that would allow me to extract a frame maybe 15% into the movie would suffice. If it could extract a few frames, let'...
There are literally thousands of locations where an application is running (.net desktop app),and a requirement is to have the updates to their database (diff from the last upload) to be sent to a central server that will store all the locations data. What options do I have in coming up with a solution? One idea is to ...
Your scenario involves a distributed architecture where multiple locations need to send updates to a central server efficiently. Here are several options and considerations for your solution: ### 1. **XML File Upload** - **Description**: As you mentioned, you could generate an XML file that contains only the updated r...
23,757
[ { "from": "human", "value": "There are literally thousands of locations where an application is running (.net desktop app),and a requirement is to have the updates to their database (diff from the last upload) to be sent to a central server that will store all the locations data.\nWhat options do I have in ...
Microsoft has come out with this fairly new technology that I am considering using for a .NET 3.5 application. I am curious, is anyone using this technology already? I am worried that the use of the secure virtual machine will negatively affect performance. Also, the way Microsoft advertises the product, it seems as...
It sounds like you're referring to a technology such as Microsoft Azure's Confidential Computing or similar secure virtual machine offerings. Here are a few considerations based on your concerns: ### Performance Concerns 1. **Overhead**: Secure VMs often introduce some overhead due to the additional security features,...
27,474
[ { "from": "human", "value": "Microsoft has come out with this fairly new technology that I am considering using for a .NET 3.5 application. I am curious, is anyone using this technology already? I am worried that the use of the secure virtual machine will negatively affect performance. Also, the way Micr...
How do I connect to an SQL Server remotely and administer my database objects? I need to connect to my database located on the web hosting company's server. I have the server name, IP address, my database username & password. I have an installation of SQL Server 2000 in my machine. Can I use SQL Server Enterprise Mana...
Connecting to a remote SQL Server, especially when using an older version like SQL Server 2000, can be a straightforward process if you have the required credentials and settings correctly configured. Here is a step-by-step guide on how to connect to your SQL Server remotely using SQL Server Enterprise Manager: ### St...
25,728
[ { "from": "human", "value": "How do I connect to an SQL Server remotely and administer my database objects? I need to connect to my database located on the web hosting company's server. I have the server name, IP address, my database username & password. I have an installation of SQL Server 2000 in my machi...
I am trying to learn how to do certain source control tasks with VSS and MSBuildCommunityTasks, like how to use tasks like GetVSS and VssLabel? Docs don't make this clear. And when I poke a stick at it to see if the error messages can tell me anything, it isn't really very clear what to do then, either. Let me show ...
It looks like you are facing issues related to the MSBuildCommunityTasks and the SourceSafe (VSS) interoperability in your project. The error message indicates that the `Microsoft.VisualStudio.SourceSafe.Interop` assembly is missing, which is a common requirement when working with Visual SourceSafe via MSBuild tasks. ...
26,721
[ { "from": "human", "value": "I am trying to learn how to do certain source control tasks with VSS and MSBuildCommunityTasks, like how to use tasks like GetVSS and VssLabel? Docs don't make this clear. And when I poke a stick at it to see if the error messages can tell me anything, it isn't really very cle...
Can you have custom client-side javascript Validation for standard ASP.NET Web Form Validators? For instance use a asp:RequiredFieldValidator leave the server side code alone but implement your own client notification using jQuery to highlight the field or background color for example.
Yes, you can implement custom client-side validation for standard ASP.NET Web Form Validators while leaving the server-side validation intact. This can be achieved using jQuery or plain JavaScript to provide a more interactive user experience without altering the behavior of the ASP.NET validators. Here’s a basic appr...
20,510
[ { "from": "human", "value": "Can you have custom client-side javascript Validation for standard ASP.NET Web Form Validators?\nFor instance use a asp:RequiredFieldValidator leave the server side code alone but implement your own client notification using jQuery to highlight the field or background color for ...
What is the "best" tool for creating deployment packages/jobs/stuff for all "enterprise level" deployments..... GAC, COM+, Credentials, App pools, Web sites, registry entries, etc... It would be best if there is a way to "tokenize" the credentials and registry entries so that we can enter the appropriate credentials fo...
For managing enterprise-level deployments that involve a variety of components like GAC, COM+, credentials, app pools, web sites, registry entries, and other configurations, there are several tools and frameworks that can help streamline this process with features such as tokenization for credentials, audit logging, re...
26,521
[ { "from": "human", "value": "What is the \"best\" tool for creating deployment packages/jobs/stuff for all \"enterprise level\" deployments.....\nGAC, COM+, Credentials, App pools, Web sites, registry entries, etc... It would be best if there is a way to \"tokenize\" the credentials and registry entries so ...
This might be a old question: Why does IEnumerable<T> inherit from IEnumerable? This is how .NET do, but it brings a little trouble. Every time I write a class implements IEumerable<T>, I have to write two GetEnumerator() functions, one for IEnumerable<T> and the other for IEnumerable. And, IList<T> doesn't inherit fro...
The design of `IEnumerable<T>` inheriting from `IEnumerable` in .NET is rooted in a few key principles and considerations regarding type safety, backward compatibility, and the architecture of collections in .NET. ### Key Reasons for the Design: 1. **Type Safety**: - By having `IEnumerable<T>` derive from `IEnume...
30,373
[ { "from": "human", "value": "This might be a old question: Why does IEnumerable<T> inherit from IEnumerable?\nThis is how .NET do, but it brings a little trouble. Every time I write a class implements IEumerable<T>, I have to write two GetEnumerator() functions, one for IEnumerable<T> and the other for IEnu...
I have to preface this with the fact that I love jQuery as a JavaScript language extension and YUI as a rich set of free controls. So here is my question, is there going to be any problems down the line if I mix jQuery and YUI together in an MVC app I am working on. I want to use jQuery for the heavy lifting on the DO...
Mixing jQuery and YUI in the same application can certainly be done, and many developers have experience doing so, especially in internal applications where the focus is more on functionality than on keeping the codebase entirely consistent with one framework. However, there are some considerations and potential pitfal...
27,974
[ { "from": "human", "value": "I have to preface this with the fact that I love jQuery as a JavaScript language extension and YUI as a rich set of free controls. So here is my question, is there going to be any problems down the line if I mix jQuery and YUI together in an MVC app I am working on.\nI want to ...
Calling addChild with an empty string as the value (or even with whitespace) seems to cause a redundant SimpleXml node to be added inside the node instead of adding just the node with no value. Here's a quick demo of what happens: [description] => !4jh5jh1uio4jh5ij14j34io5j! And here's with an empty string: [descripti...
When using SimpleXML in PHP, adding an empty string or whitespace as a value to a node can result in a child node being created that is effectively empty, which is not the desired behavior when you want to omit the node altogether. Here are a few possible approaches to handle this situation more effectively than using ...
29,663
[ { "from": "human", "value": "Calling addChild with an empty string as the value (or even with whitespace) seems to cause a redundant SimpleXml node to be added inside the node instead of adding just the node with no value.\nHere's a quick demo of what happens:\n[description] => !4jh5jh1uio4jh5ij14j34io5j!\n...
Classic ASP had 'server side includes' so that one could easily design a generic layout for the header, footer, left or right side bar. In ASP.NET, I think we must use 'Page Templates'. Although most people say that it is easy to use, I find it rather complicated, as we must copy the whole HTML code inside the 'Render'...
In ASP.NET, while using Page Templates (like user controls or master pages) is common, there are indeed simpler methods to include shared layout components such as headers, footers, or sidebars without embedding all the HTML directly in a render function. Below are several alternatives that you might find helpful: ###...
29,146
[ { "from": "human", "value": "Classic ASP had 'server side includes' so that one could easily design a generic layout for the header, footer, left or right side bar.\nIn ASP.NET, I think we must use 'Page Templates'. Although most people say that it is easy to use, I find it rather complicated, as we must co...
I have a very large file that looks like this (see below). I have two basic choices of regex to use on it (I know there may be others but I'm really trying to compare Greedy and Negated Char Class) methods. ftp: [^\D]{1,} ftp: (\d)+ ftp: \d+ Note: what if I took off the parense around the \d? Now + is greedy which fo...
When comparing the efficiency of the three regex patterns you provided for matching numbers in a very large file, it's important to consider how each one operates under the hood. ### 1. Patterns Overview - `ftp: [^\D]{1,}`: This uses a negated character class. It matches one or more characters that are *not* non-digi...
22,270
[ { "from": "human", "value": "I have a very large file that looks like this (see below). I have two basic choices of regex to use on it (I know there may be others but I'm really trying to compare Greedy and Negated Char Class) methods.\nftp: [^\\D]{1,}\nftp: (\\d)+\nftp: \\d+\n\nNote: what if I took off th...