instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I need a standard, Microsoft delivered, encryption library that works for both .NET 2.0 and C++. What would you suggest?
We find that AES is only offered in .NET 3.5 (and available in C++)
We find that Rijndael is used in .NET 2.0 but not available in the standard C++ libraries.
If I am wrong (very good chance), can yo... | You're correct that AES (which is the advanced form of Rijndael) was introduced in .NET 3.5, while .NET 2.0 includes the Rijndael algorithm. Unfortunately, there isn't a built-in standard encryption library from Microsoft that directly supports both .NET 2.0 and C++ in a way that includes the Rijndael implementation av... | 38,732 | [
{
"from": "human",
"value": "I need a standard, Microsoft delivered, encryption library that works for both .NET 2.0 and C++. What would you suggest?\nWe find that AES is only offered in .NET 3.5 (and available in C++)\nWe find that Rijndael is used in .NET 2.0 but not available in the standard C++ librarie... |
Are there any things to be careful about when defining the method_missing method in Ruby? I'm wondering whether there are some not-so-obvious interactions from inheritance, exception throwing, performance, or anything else.
| Yes, when overriding `method_missing` in Ruby, there are several important considerations to keep in mind to avoid common pitfalls. Here are some points to be aware of:
1. **Performance Overhead**:
- `method_missing` can lead to performance issues. Every time a method is called that does not exist, Ruby will invoke... | 35,354 | [
{
"from": "human",
"value": "Are there any things to be careful about when defining the method_missing method in Ruby? I'm wondering whether there are some not-so-obvious interactions from inheritance, exception throwing, performance, or anything else.\n"
},
{
"from": "gpt",
"value": "Yes, when... |
I have a JQuery slider that's working pretty well, but for some reason it's not passing the tenths value.
$(document).ready(function(){
$("#scoreSlider").slider({
'steps': 40,
'min': 1.0,
'max': 5.0,
'startValue': 3,
'slide': function(e, ui){
... | It looks like you are using a jQuery UI slider but want to achieve a decimal value (tenths) on the slider. By default, the jQuery UI slider uses whole numbers, and the steps you have defined will not allow it to slide in tenths without some additional configuration.
To achieve the desired behavior, you can modify the ... | 41,844 | [
{
"from": "human",
"value": "I have a JQuery slider that's working pretty well, but for some reason it's not passing the tenths value.\n$(document).ready(function(){\n $(\"#scoreSlider\").slider({\n 'steps': 40,\n 'min': 1.0, \n 'max': 5.0,\n 'startValue': ... |
I am working on localization for an app where custom patterns are used to format the date-time.
one example is:
dd-MM HH:mm
I need to get localized versions of this custom format for dates, so that I get the date using numbers, and the time, basically using the local order (dd MM or MM dd) and the local seperator for ... | Localization can indeed be tricky when you want to retain custom formats while still adhering to local conventions. Your need to extract localized date and time formats while omitting certain parts (like the year) adds an extra layer of complexity.
Here’s a potential approach you can take to dynamically format dates ... | 36,445 | [
{
"from": "human",
"value": "I am working on localization for an app where custom patterns are used to format the date-time.\none example is: \ndd-MM HH:mm\nI need to get localized versions of this custom format for dates, so that I get the date using numbers, and the time, basically using the local order (... |
At the XmlSerializer constructor line the below causes an InvalidOperationException which also complains about not having a default accesor implemented for the generic type.
Queue<MyData> myDataQueue = new Queue<MyData>();
// Populate the queue here
XmlSerializer mySerializer =
new XmlSerializer(myDataQueue.GetTyp... | The `InvalidOperationException` you're encountering is likely due to the way the `XmlSerializer` handles generic types and how it expects types to be structured. In particular, the `XmlSerializer` requires that the type being serialized (in this case, `Queue<MyData>`) has a default constructor (i.e., a constructor with... | 36,574 | [
{
"from": "human",
"value": "At the XmlSerializer constructor line the below causes an InvalidOperationException which also complains about not having a default accesor implemented for the generic type.\nQueue<MyData> myDataQueue = new Queue<MyData>();\n\n// Populate the queue here\n\n\nXmlSerializer mySeri... |
I am implementing a very simple file database. I have 2 basic operations:
void Insert(const std::string & i_record)
{
//create or append to the file
m_fileStream.open(m_fileName.c_str(), std::ios::out | std::ios::app);
if (m_fileStream.is_open())
{
m_fileStream << i_record << "\n";
}
m... | The issue you're facing arises from how you're handling the file stream and the reading process in your `SelectAll` method. Specifically, you're using `eof()` to control the loop, which can lead to attempting to read past the end of the file and triggering the fail bit.
Here's a breakdown of why this happens:
1. Afte... | 38,514 | [
{
"from": "human",
"value": "I am implementing a very simple file database. I have 2 basic operations: \nvoid Insert(const std::string & i_record)\n{\n //create or append to the file\n m_fileStream.open(m_fileName.c_str(), std::ios::out | std::ios::app);\n\n if (m_fileStream.is_open())\n {\n ... |
I use lazy connection to connect to my DB within my DB object. This basically means that it doesn't call mysql_connect() until the first query is handed to it, and it subsequently skips reconnecting from then on after.
Now I have a method in my DB class called disconnectFromDB() which pretty much calls mysql_close() an... | When it comes to managing database connections, particularly with MySQL, there are several considerations regarding when to connect, disconnect, and how to balance performance against resource management. Here are some thoughts regarding your specific questions about lazy connections, disconnecting from the database, a... | 40,363 | [
{
"from": "human",
"value": "I use lazy connection to connect to my DB within my DB object. This basically means that it doesn't call mysql_connect() until the first query is handed to it, and it subsequently skips reconnecting from then on after.\nNow I have a method in my DB class called disconnectFromDB(... |
I am having a problem which seems really daft. I must be missing something silly. We have a PGP keyring that is on one of our production servers. The user account it belongs to is not allowed to be logged on as interactively for security. Our problem is we sometimes need to add new keys and can not do this easily. ... | It looks like you're trying to automate the PGP key installation process by sending input to a command-line tool. The issue here is that PGP is expecting user input to confirm actions, and sometimes command-line tools manage standard input/output differently depending on how they are designed.
Here are a few suggestio... | 36,366 | [
{
"from": "human",
"value": "I am having a problem which seems really daft. I must be missing something silly. We have a PGP keyring that is on one of our production servers. The user account it belongs to is not allowed to be logged on as interactively for security. Our problem is we sometimes need to ... |
$sourcePath = 'images/'; // Path of original image
$sourceUrl = '';
$sourceName = 'photo1.jpg'; // Name of original image
$thumbPath = 'thumbs/'; // Writeable thumb path
$thumbUrl = 'thumbs/';
$thumbName = "test_thumb.jpg"; // Tip: Name dynamically
$thumbWidth = 100; // Intended dimension of thumb
// Beyond this point... | It sounds like you are encountering issues with the image quality and the aspect ratio while resizing the thumbnail. The squashing and color inversion could be due to a few factors in your code.
Here’s a revised version of your code that addresses the issues:
1. **Aspect Ratio**: Preserve the aspect ratio of the orig... | 40,029 | [
{
"from": "human",
"value": "$sourcePath = 'images/'; // Path of original image\n$sourceUrl = '';\n$sourceName = 'photo1.jpg'; // Name of original image\n$thumbPath = 'thumbs/'; // Writeable thumb path\n$thumbUrl = 'thumbs/';\n$thumbName = \"test_thumb.jpg\"; // Tip: Name dynamically\n$thumbWidth = 100; // ... |
I have been looking at improving my ASP.NET page performance. Is it worth changing autoeventwireup from true to false and adding event handlers, or is the performance penalty very small?
This is an ASP.NET 2.0 project.
| In ASP.NET 2.0, the `AutoEventWireup` property determines whether the ASP.NET runtime automatically wires up events to their corresponding event handlers based on naming conventions (e.g., `Page_Load` for the `Load` event). Setting `AutoEventWireup` to `true` simplifies the code, as you don't need to manually connect e... | 40,587 | [
{
"from": "human",
"value": "I have been looking at improving my ASP.NET page performance. Is it worth changing autoeventwireup from true to false and adding event handlers, or is the performance penalty very small?\nThis is an ASP.NET 2.0 project.\n"
},
{
"from": "gpt",
"value": "In ASP.NET 2.0... |
Is there a way to increase the font-size in the Firefox extension Firebug?
| Firebug was a popular web development tool for Firefox, but it has been discontinued since 2017. If you are using an older version of Firefox that still supports Firebug, you may find that the ability to increase the font size directly within Firebug's interface is limited.
However, you can try the following methods:
... | 41,879 | [
{
"from": "human",
"value": "Is there a way to increase the font-size in the Firefox extension Firebug?\n"
},
{
"from": "gpt",
"value": "Firebug was a popular web development tool for Firefox, but it has been discontinued since 2017. If you are using an older version of Firefox that still suppor... |
Given a jQuery result set, how do you convert that back into plain HTML?
<div class="abc">
foo <strong>FOO</strong>
</div>
<div class="def">
bar
</div>
--
var $mySet = $('div');
Given $mySet, how would you go about returning to the plain HTML above?
| To convert a jQuery result set back into plain HTML, you can use the `html()` method or the `prop()` method on the jQuery object.
Here’s how you can do it:
1. **Using `get()` with the `map()` function**: You can extract the HTML from each element in the jQuery object and join them together.
```javascript
var $mySet... | 41,633 | [
{
"from": "human",
"value": "Given a jQuery result set, how do you convert that back into plain HTML?\n<div class=\"abc\">\n foo <strong>FOO</strong>\n</div>\n<div class=\"def\">\n bar\n</div>\n\n--\nvar $mySet = $('div');\n\nGiven $mySet, how would you go about returning to the plain HTML above?\n"
... |
Background
We have a web application in which several developers have written several .js files that manipulate the DOM and the problem of duplicate function names has crept into our application.
Question
Can anyone recommend a tool that will warn us when we accidentally write a web page with two javascript functions w... | Detecting duplicate function names in JavaScript files can be challenging, especially in large web applications. However, there are several tools and methods you can use to identify these issues:
1. **ESLint**: This is a widely-used static code analysis tool for identifying problematic patterns in JavaScript code. You... | 39,595 | [
{
"from": "human",
"value": "Background\nWe have a web application in which several developers have written several .js files that manipulate the DOM and the problem of duplicate function names has crept into our application.\nQuestion\nCan anyone recommend a tool that will warn us when we accidentally writ... |
I think this must be simple but I can't get it right...
I have an MxM triangular matrix, the coefficients of which are stored in a vector, row by row.
For example:
M = [ m00 m01 m02 m03 ]
[ m11 m12 m13 ]
[ m22 m23 ]
[ m33 ]
is stored as
coef[ m00 m01 m02 m03 m11 m12 m13 m... | To find the row and column indices for a given index `i` in a zero-based triangular matrix representation, you can derive algebraic expressions without needing iterative loops.
### 1. Finding Row Index
For a triangular matrix of size `M`, the number of elements in the rows are as follows:
- Row 0 has 1 element
- Row... | 34,380 | [
{
"from": "human",
"value": "I think this must be simple but I can't get it right...\nI have an MxM triangular matrix, the coefficients of which are stored in a vector, row by row. \nFor example:\nM = [ m00 m01 m02 m03 ] \n [ m11 m12 m13 ]\n [ m22 m23 ]\n [ m33 ]\n\n... |
Is the jQuery intellisense plugin available for Visual Studio now?
| As of my last update in October 2023, jQuery IntelliSense support in Visual Studio can typically be achieved without a specific plugin. Visual Studio generally provides IntelliSense for jQuery if the jQuery library is properly referenced in your project. To enable this, you can follow these steps:
1. **Install jQuery ... | 43,357 | [
{
"from": "human",
"value": "Is the jQuery intellisense plugin available for Visual Studio now?\n"
},
{
"from": "gpt",
"value": "As of my last update in October 2023, jQuery IntelliSense support in Visual Studio can typically be achieved without a specific plugin. Visual Studio generally provide... |
I have a JLabel which has an e-mail address in it. I used HTML formatting on the JLabel, so it appears as a link. However, you are not able to click the link. In fact, you cannot select any of the text in the label. Is there a property that I can set on the JLabel to allow the user to at least select the text of the e-... | To achieve the desired functionality of making the email address clickable and allowing text selection in a `JLabel`, you need to enhance the JLabel to handle mouse events and implement the email link functionality. The default `JLabel` does not support text selection or clickable links out of the box.
Here's a way to... | 38,455 | [
{
"from": "human",
"value": "I have a JLabel which has an e-mail address in it. I used HTML formatting on the JLabel, so it appears as a link. However, you are not able to click the link. In fact, you cannot select any of the text in the label. Is there a property that I can set on the JLabel to allow the u... |
I wonder how many of you have implemented one of computer science's "classical algorithms" like Dijkstra's algorithm or data structures (e.g. binary search trees) in a real world, not academic project?
Is there a benefit to our dayjobs in knowing these algorithms and data structures when there are tons of libraries, fr... | Implementing classical algorithms and data structures like Dijkstra's algorithm or binary search trees in real-world projects can be beneficial for several reasons, even when there are libraries and frameworks available:
1. **Understanding Underlying Principles**: Knowledge of these algorithms and data structures help... | 40,989 | [
{
"from": "human",
"value": "I wonder how many of you have implemented one of computer science's \"classical algorithms\" like Dijkstra's algorithm or data structures (e.g. binary search trees) in a real world, not academic project?\nIs there a benefit to our dayjobs in knowing these algorithms and data str... |
What are the actual performance differences between Int64 and Int32 on 32 and 64 bit MS Windows?
It would also be great to see some actual timings of Int64 vs Int32 on each of the two operating system variants. XP or Vista would also be interesting.
See also this question about memcpy performance.
| When comparing `Int32` (32-bit integers) and `Int64` (64-bit integers) on 32-bit and 64-bit MS Windows systems, the performance differences typically stem from how these data types are handled by the CPU and the operating system's architecture.
### Performance Differences
1. **Memory Size**:
- `Int32` occupies 4 ... | 39,460 | [
{
"from": "human",
"value": "What are the actual performance differences between Int64 and Int32 on 32 and 64 bit MS Windows?\nIt would also be great to see some actual timings of Int64 vs Int32 on each of the two operating system variants. XP or Vista would also be interesting.\n\nSee also this question a... |
I need to hit a website through a state specific IP Address. Any suggestions on how to do this?
| To access a website through a state-specific IP address, you can use a few different methods. Here are some options:
1. **VPN Services**: Many Virtual Private Network (VPN) providers offer the ability to choose specific locations for your IP address. Look for a VPN that allows you to select specific states. Some popul... | 40,958 | [
{
"from": "human",
"value": "I need to hit a website through a state specific IP Address. Any suggestions on how to do this?\n"
},
{
"from": "gpt",
"value": "To access a website through a state-specific IP address, you can use a few different methods. Here are some options:\n\n1. **VPN Services... |
I am trying to cobble together a scene that basically consists of:
A 2D image of the earth (think NASA satellite photography) that has been rotated into a view similar to this and,
Cylindrical tubes that I want place at specific lat/lon coordinates.
I have managed to setup the 2d image as depicted in the link above, ... | It sounds like you're trying to achieve a 3D visualization using a 2D image of the Earth and placing cylindrical tubes based on latitude and longitude coordinates. Here are some general steps and OpenGL concepts you might find useful to accomplish this with PyOpenGL.
### Steps to Create Your Scene
1. **Load Your Eart... | 36,069 | [
{
"from": "human",
"value": "I am trying to cobble together a scene that basically consists of:\n\nA 2D image of the earth (think NASA satellite photography) that has been rotated into a view similar to this and,\nCylindrical tubes that I want place at specific lat/lon coordinates.\n\nI have managed to setu... |
I want to use Oracle exception to handle errors that might happen in the code below. If a user provides the book ID and/or employee ID that doesn't exist in the database, NO_DATA_FOUND exception will be raised. Thus, how can I know which statement raises this exception.
CREATE OR REPLACE PROCEDURE TEST_EXCEPTION
(
... | To handle the `NO_DATA_FOUND` exception and determine which SELECT statement caused it, you can use an approach that involves specific flag variables or multiple exception handlers. Below are two different approaches to handle this situation:
### Approach 1: Using Flags
You can set a flag before each SELECT statement... | 39,532 | [
{
"from": "human",
"value": "I want to use Oracle exception to handle errors that might happen in the code below. If a user provides the book ID and/or employee ID that doesn't exist in the database, NO_DATA_FOUND exception will be raised. Thus, how can I know which statement raises this exception.\nCREATE... |
I have a web service I'm trying to load test. I created a program that spawns threads to simulate multiple users connecting to the service and making a request. Each thread makes "some number" of requests before it dies. Each new request is made as soon as it is ready - there is little to no delay between getting a ... | It sounds like you are experiencing connection limits, resource exhaustion, or potential deadlocks when trying to simulate a higher number of concurrent users with your web service. Here are some potential reasons for the behavior you are seeing:
### Possible Issues
1. **Connection Limits**: Most servers and web appl... | 38,614 | [
{
"from": "human",
"value": "I have a web service I'm trying to load test. I created a program that spawns threads to simulate multiple users connecting to the service and making a request. Each thread makes \"some number\" of requests before it dies. Each new request is made as soon as it is ready - the... |
I'm working on our back-end encoder service which does an awful lot of video transcoding, and a very small amount of joining of video files.
The transcoding is done using the On2 Flix engine for Windows which works very well, but unfortunately it isn't able to join files (at least as far as I can ascertain - neither t... | Given your requirements for a video joining API that can handle 3GP and MP4 files, while also providing a higher-level interface than low-level APIs, here are some recommendations you might find helpful:
1. **FFmpeg with FFmpeg.AutoGen**:
- **Overview**: FFmpeg is a powerful multimedia framework that can encode, de... | 38,173 | [
{
"from": "human",
"value": "I'm working on our back-end encoder service which does an awful lot of video transcoding, and a very small amount of joining of video files. \nThe transcoding is done using the On2 Flix engine for Windows which works very well, but unfortunately it isn't able to join files (at l... |
I have a legacy db that I am mapping with Nhibernate.
And in several locations a list och strigs or domain objects are mapped as a delimited string in the database. Either 'string|string|string' in the value type cases and like 'domainID|domainID|domainID' in the references type cases.
I know I can create a dummy prope... | Yes, implementing a custom `IUserType` is indeed a suitable approach for handling the mapping of delimited strings in your legacy database to collections of domain objects or lists of strings using NHibernate.
By implementing `IUserType`, you can encapsulate the logic required to convert between the delimited string r... | 38,355 | [
{
"from": "human",
"value": "I have a legacy db that I am mapping with Nhibernate.\nAnd in several locations a list och strigs or domain objects are mapped as a delimited string in the database. Either 'string|string|string' in the value type cases and like 'domainID|domainID|domainID' in the references typ... |
I just got my azure invitation code...yay!
Are there any official samples for windows azure + MS asp.net MVC?
I still don't get the storage providers and services that come with Azure, it's a bit confusing. I don't think MS have done a very good of explaining it.
| Congratulations on getting your Azure invitation code! Azure can indeed be a bit overwhelming at first, especially with the various services and storage options available. Here’s a breakdown of some official resources and concepts that may help clarify things for you.
### Official Samples for ASP.NET MVC on Azure
1. ... | 38,986 | [
{
"from": "human",
"value": "I just got my azure invitation code...yay!\nAre there any official samples for windows azure + MS asp.net MVC?\nI still don't get the storage providers and services that come with Azure, it's a bit confusing. I don't think MS have done a very good of explaining it.\n"
},
{
... |
I'm developing an application with a team in .Net (C++) and provide a COM interface to interact with python and other languages.
What we've found is that pushing data through COM turns out to be pretty slow.
I've considered several alternatives:
dumping data to a file and sending the file path through com
Shared Memor... | Passing data between components in different languages and environments can indeed present performance challenges, especially when using COM, which can introduce overhead. Here are some considerations for each alternative you've mentioned, along with a recommendation based on performance, ease of implementation, and ma... | 40,257 | [
{
"from": "human",
"value": "I'm developing an application with a team in .Net (C++) and provide a COM interface to interact with python and other languages.\nWhat we've found is that pushing data through COM turns out to be pretty slow.\nI've considered several alternatives:\n\ndumping data to a file and s... |
What are possible causes for a large number of sleeping connections to a MySQL Server? I'm using CodeIgniter with persistent connections disabled.
| A large number of sleeping connections in a MySQL server can be attributed to several factors, especially in the context of a web application built with CodeIgniter. Here are some possible causes and considerations:
1. **Connection Management**:
- Even if persistent connections are disabled, CodeIgniter may establi... | 33,971 | [
{
"from": "human",
"value": "What are possible causes for a large number of sleeping connections to a MySQL Server? I'm using CodeIgniter with persistent connections disabled.\n"
},
{
"from": "gpt",
"value": "A large number of sleeping connections in a MySQL server can be attributed to several f... |
I need a 2d political map of the world on which I will draw icons, text, and lines that move around. Users will interact with the map, placing and moving the icons, and they will zoom in and out of the map.
The Google Maps interface isn't very far from what I need, but this is NOT web related; it's a Windows MFC appli... | For your requirements of creating an interactive 2D political map in a Windows MFC application, you have several options that are higher level than using low-level graphics libraries like SDL. Here are a few suggestions:
1. **Qt with QGraphicsView**:
- **Description**: Qt is a widely-used C++ framework for applicat... | 38,641 | [
{
"from": "human",
"value": "I need a 2d political map of the world on which I will draw icons, text, and lines that move around. Users will interact with the map, placing and moving the icons, and they will zoom in and out of the map.\nThe Google Maps interface isn't very far from what I need, but this is... |
I have an idea about what it is. My question is :-
1.) If i program my code which is amenable to Tail Call optimization(Last statement in a function[recursive function] being a function call only, no other operation there) then do i need to set any optimization level so that compiler does TCO. In what mode of optimizat... | Your questions about Tail Call Optimization (TCO) cover a few important areas in compiler behavior. Let's address each one.
### 1.) TCO and Optimization Levels
- **Optimization Levels**: Tail Call Optimization is generally part of a broader set of optimizations that compilers perform. For many compilers, like GCC and ... | 37,807 | [
{
"from": "human",
"value": "I have an idea about what it is. My question is :-\n1.) If i program my code which is amenable to Tail Call optimization(Last statement in a function[recursive function] being a function call only, no other operation there) then do i need to set any optimization level so that co... |
Has there been any attempt and creating a formalized method for organizing CSS code? Before I go and make up my own strategy for keeping things readable, I'm wondering what else is out there. Google hasn't been very helpful, as I'm not entirely sure what terms to search for.
I'm thinking more along the lines of indenti... | Absolutely, organizing CSS code can be challenging, and there are several established methodologies and conventions that can help keep your stylesheets readable and maintainable. Here are some popular approaches and guidelines you might consider:
### 1. **BEM (Block Element Modifier)**
BEM is a popular naming convent... | 36,257 | [
{
"from": "human",
"value": "Has there been any attempt and creating a formalized method for organizing CSS code? Before I go and make up my own strategy for keeping things readable, I'm wondering what else is out there. Google hasn't been very helpful, as I'm not entirely sure what terms to search for.\nI'... |
I want a query that returns a list of all the (user) stored procedures in a database by name, with the number of lines of code for each one.
i.e.
sp_name lines_of_code
-------- -------------
DoStuff1 120
DoStuff2 50
DoStuff3 30
Any ideas how to do this?
| You can achieve this in SQL Server by querying the `sys.sql_modules` system catalog view along with `sys.objects` to get the user-defined stored procedures and their definitions. You can then calculate the number of lines of code for each stored procedure by splitting the definition into lines.
Here's an example SQL q... | 41,036 | [
{
"from": "human",
"value": "I want a query that returns a list of all the (user) stored procedures in a database by name, with the number of lines of code for each one.\ni.e.\nsp_name lines_of_code\n-------- -------------\nDoStuff1 120\nDoStuff2 50\nDoStuff3 30\n\nAny ideas how to do this?\... |
How do I add extra data into an atom feed that does not map into the standard entry nodes (title, link, id, updated, summary)? Is it possible to add my own custom xml here and still be compliant with the spec?
| Yes, you can add extra data to an Atom feed by using custom XML elements in your feed entries. The Atom Syndication Format specification allows for the inclusion of extension elements, which can be used to add additional information that doesn't fit within the standard entry nodes (title, link, id, updated, summary).
... | 41,587 | [
{
"from": "human",
"value": "How do I add extra data into an atom feed that does not map into the standard entry nodes (title, link, id, updated, summary)? Is it possible to add my own custom xml here and still be compliant with the spec?\n"
},
{
"from": "gpt",
"value": "Yes, you can add extra d... |
I am using jQuery to try and trigger a method when an ASP.NET (2.0) dropdown list's change event is handled by jQuery. The problem is that the drop down list is located inside a gridview and even then only when a user has decided to edit a row within that gridview.
I think I have it picking up the object using an ASP c... | It looks like you're trying to attach a jQuery change event to a dropdown list that exists inside an editable GridView in ASP.NET, and you want to ensure that it only gets applied when a row is being edited. Given the complexities of mixing server-side code and client-side jQuery, let's simplify the approach to ensure ... | 38,621 | [
{
"from": "human",
"value": "I am using jQuery to try and trigger a method when an ASP.NET (2.0) dropdown list's change event is handled by jQuery. The problem is that the drop down list is located inside a gridview and even then only when a user has decided to edit a row within that gridview.\nI think I ha... |
I have a table like this:
Column | Type | Modifiers
---------+------+-----------
country | text |
food_id | int |
eaten | date |
And for each country, I want to get the food that is eaten most often. The best I can think of (I'm using postgres) is:
CREATE TEMP TABLE counts AS
SELECT country, food_id, ... | Yes, you can achieve this more directly by using window functions in PostgreSQL. Specifically, you can use the `ROW_NUMBER()` window function to assign a rank to each food item based on the count of how often it has been eaten for each country. Here's a more streamlined version of your query:
```sql
WITH food_counts A... | 41,493 | [
{
"from": "human",
"value": "I have a table like this:\n Column | Type | Modifiers \n---------+------+-----------\n country | text | \n food_id | int | \n eaten | date | \n\nAnd for each country, I want to get the food that is eaten most often. The best I can think of (I'm using postgres) is:\nCREATE T... |
As I've only ever used Visual Studio for .NET development, I would like to expand my horizons and see what else there is on offer as an alternative to it. So what in your opinion is the best alternative to Visual Studio? Is there a viable alternative?
| Absolutely, there are several viable alternatives to Visual Studio, depending on your development needs, preferences, and the languages or frameworks you plan to work with. Here are some popular alternatives:
1. **JetBrains Rider**:
- **Best for**: .NET development
- Rider is a powerful IDE from JetBrains specif... | 37,228 | [
{
"from": "human",
"value": "As I've only ever used Visual Studio for .NET development, I would like to expand my horizons and see what else there is on offer as an alternative to it. So what in your opinion is the best alternative to Visual Studio? Is there a viable alternative?\n"
},
{
"from": "gp... |
Visual Studio tries to be helpful by showing all the nested tags where the cursor is (the display at the bottom of the code window, next to the "Desgn | Split | Source" options), but I never use it, and it seems to slow things down when I'm just trying to cursor past large blocks of code. Is there any way to turn this ... | Yes, you can disable the display of nested tags in Visual Studio to help improve performance when navigating through large blocks of code. Here are the steps to turn off this feature:
1. **Open Visual Studio.**
2. **Go to Tools > Options** in the menu bar.
3. In the Options dialog, expand the **Text Editor** section.
... | 43,642 | [
{
"from": "human",
"value": "Visual Studio tries to be helpful by showing all the nested tags where the cursor is (the display at the bottom of the code window, next to the \"Desgn | Split | Source\" options), but I never use it, and it seems to slow things down when I'm just trying to cursor past large blo... |
I want to build an application that will allow my customers to send marketing information by e-mail. This will be a carefully monitored tool used for legitimate bulk mailing only. It's going to have all of the necessary 'unsubscribe' functionality etc.
The solution will be built using VB.NET.
My question relates to the... | Your approach to building an email marketing application using VB.NET and a multi-threaded service to send emails through your own SMTP server is a sound idea. Using `System.Net.Mail` for sending emails is convenient for many scenarios, but there are several factors to consider when sending bulk emails to ensure perfor... | 40,091 | [
{
"from": "human",
"value": "I want to build an application that will allow my customers to send marketing information by e-mail. This will be a carefully monitored tool used for legitimate bulk mailing only. It's going to have all of the necessary 'unsubscribe' functionality etc.\nThe solution will be buil... |
I've created a batch job that running in 32bit mode as it using 32bit COM objectes, this need to connect to SharePoint to make updates to list.
It works in my development environment as it is full 32bit. But in my test and prodution environment we use 64bit SharePoint and this is what I get from SPSite:
System.IO.FileN... | The error you're encountering typically indicates that your 32-bit application cannot communicate properly with the 64-bit SharePoint environment. SharePoint has specific requirements regarding the architecture of the applications that interact with it, especially when dealing with the object model. Here are some steps... | 34,335 | [
{
"from": "human",
"value": "I've created a batch job that running in 32bit mode as it using 32bit COM objectes, this need to connect to SharePoint to make updates to list.\nIt works in my development environment as it is full 32bit. But in my test and prodution environment we use 64bit SharePoint and this ... |
I'm trying to make a BEA Portal website XHTML compliant, because this has been written in the contract with the client, and I'm stuck on this problem: BEA renders <meta> and <link> tags without the closing slash, i.e. <link/> and <meta/> as it is required by XHTML.
When I look at the documentation from BEA it seems tha... | When working with BEA (now Oracle WebLogic) and aiming to ensure XHTML compliance, specifically with `<meta>` and `<link>` tags, you are correct that XHTML requires self-closing tags. The challenge here is that BEA’s rendering might not automatically comply with this requirement.
### 1. Configuration via skin.properti... | 38,074 | [
{
"from": "human",
"value": "I'm trying to make a BEA Portal website XHTML compliant, because this has been written in the contract with the client, and I'm stuck on this problem: BEA renders <meta> and <link> tags without the closing slash, i.e. <link/> and <meta/> as it is required by XHTML.\nWhen I look ... |
I have a form action that needs to have its value set from a variable. I need to set the variable once and it will be reflected many times throughout the DOM.
So:
variable = "somthing.html";
...
| You can achieve this by using JavaScript to set a variable that holds the URL (like "something.html") and then apply that variable to all relevant form action attributes in your HTML. Below is an example of how you can do this:
### HTML
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<me... | 41,769 | [
{
"from": "human",
"value": "I have a form action that needs to have its value set from a variable. I need to set the variable once and it will be reflected many times throughout the DOM.\nSo:\nvariable = \"somthing.html\";\n...\n\n"
},
{
"from": "gpt",
"value": "You can achieve this by using J... |
I am using the MFC class CSocket. Nothing complicated - open a connection to a server and send a short message. The code works fine when I link with MFC in a DLL. However, the call to CSocket::Create() crashes when I link to MFC in a static library.
I would like to use MFC in a static library since it simplifies dis... | When using the MFC class `CSocket` and experiencing crashes with `CSocket::Create()` while linking with MFC in a static library, it can be due to several potential reasons. Here are some suggestions and best practices to troubleshoot and resolve the issue:
### 1. Ensure Proper Initialization
When using MFC in a stati... | 39,912 | [
{
"from": "human",
"value": "I am using the MFC class CSocket. Nothing complicated - open a connection to a server and send a short message. The code works fine when I link with MFC in a DLL. However, the call to CSocket::Create() crashes when I link to MFC in a static library.\nI would like to use MFC i... |
I want to know when an image has finished loading. Is there a way to do it with a callback?
If not, is there a way to do it at all?
| Yes, you can determine when an image has finished loading in JavaScript using the `onload` event. This event is triggered when the image has completely loaded. You can use a callback function to handle what happens once the image is fully loaded. Here's a simple example of how you can do this:
```html
<!DOCTYPE html>
... | 40,195 | [
{
"from": "human",
"value": "I want to know when an image has finished loading. Is there a way to do it with a callback?\nIf not, is there a way to do it at all?\n"
},
{
"from": "gpt",
"value": "Yes, you can determine when an image has finished loading in JavaScript using the `onload` event. Thi... |
I'm trying to implement this JavaScript code on blogspot (which parses XML code, some code works better than others)
</head><body>
<div class="navbar section" id="navbar"><div class="widget Navbar" id="Navbar1"><script type="text/javascript">
function setAttributeOnload(object, attribute, val) {
if(window.ad... | Certainly! To modify the JavaScript code so that it replaces a different image when hovering over an image, you can achieve this by adding an event listener to the image that listens for the mouseover and mouseout events.
Here's how you can do it:
1. Define the images that you want to switch.
2. Use the `mouseover` ... | 38,632 | [
{
"from": "human",
"value": "I'm trying to implement this JavaScript code on blogspot (which parses XML code, some code works better than others)\n </head><body>\n<div class=\"navbar section\" id=\"navbar\"><div class=\"widget Navbar\" id=\"Navbar1\"><script type=\"text/javascript\">\n function setAttrib... |
This is for my DB class. I am new to OO, been a procedural lad for some time, so I'm still a bit murky.
My first idea was using a bunch of setter functions/methods.. but after writing a whole bunch, I thought about using PHP's define function, like so.
define('MYSQL_USERNAME', 'jimbo');
Is this an accepted practice? W... | Welcome to the world of Object-Oriented Programming (OOP)! It's great that you're exploring new techniques to improve your code. Let's clarify the best practices for managing configuration and state within your classes in PHP.
### Using Constants
Using the `define` function to declare constants for configuration valu... | 39,797 | [
{
"from": "human",
"value": "This is for my DB class. I am new to OO, been a procedural lad for some time, so I'm still a bit murky.\nMy first idea was using a bunch of setter functions/methods.. but after writing a whole bunch, I thought about using PHP's define function, like so.\ndefine('MYSQL_USERNAME',... |
A cancer CT picture is stored inside a unsigned short array (1-dimensional).
I have the location information of the cancer region inside the picture, but the coordinates (x,y) are in superpixel (128x128 unsigned short). My task is to highlight this region.
I already solved this one by converting superpixel coordinate... | It sounds like you want to work with a large 1D array that represents a 2D image (in your case, a cancer CT scan) and you want to simplify the way you access regions of this image defined by superpixels (128x128 blocks). Your goal is to avoid the need for multiple nested loops for accessing and manipulating these super... | 36,721 | [
{
"from": "human",
"value": "A cancer CT picture is stored inside a unsigned short array (1-dimensional).\nI have the location information of the cancer region inside the picture, but the coordinates (x,y) are in superpixel (128x128 unsigned short). My task is to highlight this region. \nI already solved t... |
I have a Git repository I store random things in. Mostly random scripts, text files, websites I've designed and so on.
There are some large binary files I have deleted over time (generally 1-5MB), which are sitting around increasing the size of the repository, which I don't need in the revision history.
Basically I wan... | To achieve your goal of finding large binary files in your Git repository and potentially removing them, you can use a combination of Git commands and scripts. The process will involve identifying large files in the repository history and then using `git filter-branch` to remove them if needed.
Here's a step-by-step g... | 39,727 | [
{
"from": "human",
"value": "I have a Git repository I store random things in. Mostly random scripts, text files, websites I've designed and so on.\nThere are some large binary files I have deleted over time (generally 1-5MB), which are sitting around increasing the size of the repository, which I don't nee... |
Is their a way to use a non-member non-friend function on an object using the same "dot" notation as member functions?
Can I pull a (any) member out of a class, and have users use it in the same way they always have?
Longer Explanation:
Scott Meyers, Herb Sutter, et all, argue that non-member non-friend functions are a... | Your question raises an interesting point about the design and use of interfaces in C++ with regards to member functions and non-member functions. The crux of your concern seems to be about the syntactical inconsistency that arises when some operations (like `insert`) are called as member functions using the dot notati... | 39,487 | [
{
"from": "human",
"value": "Is their a way to use a non-member non-friend function on an object using the same \"dot\" notation as member functions?\nCan I pull a (any) member out of a class, and have users use it in the same way they always have?\nLonger Explanation:\nScott Meyers, Herb Sutter, et all, ar... |
Is there an easy way to chase down table/stored procedure/function dependencies in SQL Server 2005+? I've inherited a giant application with lots of tables and even more stored procedures and functions that are long and interlinked.
At the end of the day is there a way to build a dependency tree? Ideally what I'm l... | Chasing down dependencies in SQL Server, especially in larger applications, can be a challenging task. However, SQL Server does provide some built-in functionality as well as some techniques you can use to identify and visualize these dependencies more effectively. Here are some options you can consider:
### Built-in ... | 39,003 | [
{
"from": "human",
"value": "Is there an easy way to chase down table/stored procedure/function dependencies in SQL Server 2005+? I've inherited a giant application with lots of tables and even more stored procedures and functions that are long and interlinked. \nAt the end of the day is there a way to bu... |
I see parallels between MEF and Lua. Both allow you to register methods and deploy as you need. Are both MEF and Lua forms of IoC / Dependency Injection?
| While MEF (Managed Extensibility Framework) and Lua share some similarities in terms of flexibility and extensibility, they serve different purposes and are not both considered forms of Inversion of Control (IoC) or Dependency Injection (DI).
### MEF (Managed Extensibility Framework)
- **Purpose**: MEF is a framework... | 41,117 | [
{
"from": "human",
"value": "I see parallels between MEF and Lua. Both allow you to register methods and deploy as you need. Are both MEF and Lua forms of IoC / Dependency Injection? \n"
},
{
"from": "gpt",
"value": "While MEF (Managed Extensibility Framework) and Lua share some similarities i... |
I want to register to get notified of all Java changes in Eclipse. I can do this by calling JavaCore.addElementChangedListener(). However, I don't want my plugin to be loaded until org.eclipse.jdt.core is loaded. My hack attempt to do this was declare a dummy extension to an org.eclipse.jdt.core extension point, but it... | To ensure that your plugin is loaded when the `org.eclipse.jdt.core` plugin is loaded, you can use the `Require-Bundle` directive in your `MANIFEST.MF` file. This directive allows you to specify that your plugin depends on another plugin, which in this case is `org.eclipse.jdt.core`.
Here’s how you can do it:
1. **De... | 39,582 | [
{
"from": "human",
"value": "I want to register to get notified of all Java changes in Eclipse. I can do this by calling JavaCore.addElementChangedListener(). However, I don't want my plugin to be loaded until org.eclipse.jdt.core is loaded. My hack attempt to do this was declare a dummy extension to an org... |
If have a set of classes that all implement an interface.
interface IMyinterface<T>
{
int foo(T Bar);
}
I want to shove them all in a list and enumerate through them.
List<IMyinterface> list
foreach(IMyinterface in list)
// etc...
but the compiler wants to know what T is. Can I do this? How can I overcome... | To achieve what you're trying to do, you can use covariance or a common base type for the generic type parameter `T`. However, it's important to note that C# does not allow you to use a non-variant generic interface directly (i.e., `IMyInterface` is not covariant because of the input parameter). Here's how you can work... | 37,764 | [
{
"from": "human",
"value": "If have a set of classes that all implement an interface. \ninterface IMyinterface<T>\n{\n int foo(T Bar);\n}\n\nI want to shove them all in a list and enumerate through them. \n List<IMyinterface> list\n foreach(IMyinterface in list)\n // etc... \n\nbut the compiler wants ... |
If I've got a variable that contains the fully-qualified name of a file (for example, a project file), should it be called projectFile, projectFileName or projectPath? Or something else?
| The naming of a variable that holds the fully-qualified name of a file can depend on the context of your code and the conventions you are following. Here are some considerations for each of your suggestions:
1. **projectFile**: This name could imply that the variable represents a file object or an instance of a file-r... | 40,995 | [
{
"from": "human",
"value": "If I've got a variable that contains the fully-qualified name of a file (for example, a project file), should it be called projectFile, projectFileName or projectPath? Or something else?\n"
},
{
"from": "gpt",
"value": "The naming of a variable that holds the fully-q... |
I'm trying to set up a basic test of HMAC-SHA-256 hashing but I'm having problems with the engine setup. Ideally I would like to set up only the HMAC-SHA-algorithm but so far I haven't even gotten the general case where load all the algorithms to work. Currently I'm getting segfaults on the row where I try to set the d... | It looks like you are trying to implement HMAC-SHA-256 hashing using OpenSSL in C, but there are a few issues in your code that might cause segmentation faults and logical errors. I will walk you through some corrections and improvements.
1. **Using the Correct Key and Data Lengths:** Ensure that you are using the cor... | 34,118 | [
{
"from": "human",
"value": "I'm trying to set up a basic test of HMAC-SHA-256 hashing but I'm having problems with the engine setup. Ideally I would like to set up only the HMAC-SHA-algorithm but so far I haven't even gotten the general case where load all the algorithms to work. Currently I'm getting segf... |
I'm experiencing a bug with a published flash movie. When I embed the movie in an HTML page (with SWFObject 2.1), and assing it the wmode param value of 'transparent', all my functions based on the MouseWheel event stop working. The movie is based on AS2. Anyone familiar with this bug?
| The issue you're experiencing with the MouseWheel event in a Flash movie when setting the `wmode` parameter to `transparent` is a well-documented behavior in Flash, particularly in AS2. When the `wmode` is set to `transparent` (or `opaque`), it can interfere with mouse event handling, including the MouseWheel event.
H... | 36,590 | [
{
"from": "human",
"value": "I'm experiencing a bug with a published flash movie. When I embed the movie in an HTML page (with SWFObject 2.1), and assing it the wmode param value of 'transparent', all my functions based on the MouseWheel event stop working. The movie is based on AS2. Anyone familiar with th... |
I would like to shorten very long descriptions to the available table column width. I have the column width information in pixels. Now I would like to convert this measure to the number of characters, so I can shorten the text to the specified number.
I doesn't have to be 100% correct, a near assumption will also work.... | To convert column width in pixels to an approximate number of characters, you can follow these steps:
1. **Determine the Average Width of Characters:** Different fonts and sizes have different widths for characters. A common approach is to use an average character width. For example:
- In a typical monospaced font ... | 41,908 | [
{
"from": "human",
"value": "I would like to shorten very long descriptions to the available table column width. I have the column width information in pixels. Now I would like to convert this measure to the number of characters, so I can shorten the text to the specified number.\nI doesn't have to be 100% ... |
How can I pass a variable number of args to a yield.
I don't want to pass an array (as the following code does), I'd actually like to pass them as a programmatic number of args to the block.
def each_with_attributes(attributes, &block)
results[:matches].each_with_index do |match, index|
yield self[index], attribu... | In Ruby, if you want to yield a variable number of arguments to a block without passing them as an array, you can use the splat operator (`*`) in the `yield` statement. This allows you to pass a variable number of arguments based on the attributes you're collecting.
Here's how you can modify your `each_with_attributes... | 41,881 | [
{
"from": "human",
"value": "How can I pass a variable number of args to a yield.\nI don't want to pass an array (as the following code does), I'd actually like to pass them as a programmatic number of args to the block.\ndef each_with_attributes(attributes, &block)\n results[:matches].each_with_index do |... |
Can I use a query in MSSQL to get the .mdf and .ldf filename/location for a specific database?
| Yes, you can retrieve the file locations of the .mdf (data file) and .ldf (log file) for a specific database in SQL Server using a query. You can use the `sys.master_files` system view, which contains information about all database files in the SQL Server instance.
Here’s a sample query to get the file names and their... | 42,573 | [
{
"from": "human",
"value": "Can I use a query in MSSQL to get the .mdf and .ldf filename/location for a specific database?\n"
},
{
"from": "gpt",
"value": "Yes, you can retrieve the file locations of the .mdf (data file) and .ldf (log file) for a specific database in SQL Server using a query. Y... |
I'm using Tomcat 5.5 as my servlet container. My web application deploys via .jar and has some resource files (textual files with strings and configuration parameters) located under its WEB-INF directory. Tomcat 5.5 runs on ubuntu linux. The resource file is read with a file reader:
fr = new FileReader("messages.proper... | Reading resource files in a web application deployed on Tomcat can be tricky, especially when you're not using the appropriate methods to access files within the web application's directory structure. The issue you're encountering with intermittent failure to read the file likely stems from how you're trying to locate ... | 39,884 | [
{
"from": "human",
"value": "I'm using Tomcat 5.5 as my servlet container. My web application deploys via .jar and has some resource files (textual files with strings and configuration parameters) located under its WEB-INF directory. Tomcat 5.5 runs on ubuntu linux. The resource file is read with a file rea... |
I have a html div layered on top of an interactive flash movie, but when the mouse moves over the div, it can't interact with the flash (the view changes as the mouse moves or is clicked). Is there a way to have the flash recieve the mouse movements and clicks but leaving the html visible?
I can't modify the flash SWF ... | To allow mouse interactions to pass through an HTML `div` while keeping it visible, you can use the CSS property `pointer-events`. By setting `pointer-events: none;` on the `div`, it will allow mouse events to pass through to the underlying Flash content. Here's how you can do it:
```html
<div id="overlay" style="posi... | 40,792 | [
{
"from": "human",
"value": "I have a html div layered on top of an interactive flash movie, but when the mouse moves over the div, it can't interact with the flash (the view changes as the mouse moves or is clicked). Is there a way to have the flash recieve the mouse movements and clicks but leaving the ht... |
I'm looking for a library or source code that provides guard methods such as checking for null arguments. Obviously this is rather simple to build, but I'm wondering if there are any out there for .NET already. A basic Google search didn't reveal much.
| In the .NET ecosystem, there are several libraries and techniques that provide guard methods for argument validation, including checks for null arguments. While you can certainly implement your own, using an established library can save time and help maintain consistency across your codebase. Here are a few options:
#... | 41,654 | [
{
"from": "human",
"value": "I'm looking for a library or source code that provides guard methods such as checking for null arguments. Obviously this is rather simple to build, but I'm wondering if there are any out there for .NET already. A basic Google search didn't reveal much.\n"
},
{
"from": "g... |
I've got a reasonably simple query (this time) that I need ALL the results back from (I'm storing them in an Excel spreadsheet). The query itself times out the server, so how do I go about running it without that happening?
| When dealing with SQL queries that are causing server timeouts, especially when retrieving a large amount of data, there are several strategies you can employ to mitigate the issue:
1. **Optimize the Query**:
- Ensure your query is efficient. Check if you can optimize it by:
- Adding appropriate indexes to you... | 39,588 | [
{
"from": "human",
"value": "I've got a reasonably simple query (this time) that I need ALL the results back from (I'm storing them in an Excel spreadsheet). The query itself times out the server, so how do I go about running it without that happening?\n"
},
{
"from": "gpt",
"value": "When deal... |
Rails has an awesome way of looking up column names and expected datatypes from the DB, alleviating a lot of programming.
I'm trying to build something like this in C#.NET, because we have large tables that are ever changing. I'll be adding parameters like so:
SqlParameter param = new SqlParameter("parametername", *Sql... | In C#.NET, if you want to dynamically determine the SQL data types of the columns in a database table (similar to how Rails interacts with the database), you can use ADO.NET's `SqlConnection` and `SqlCommand` classes to query the database's schema.
One approach is to use the `INFORMATION_SCHEMA` views in SQL Server to... | 38,581 | [
{
"from": "human",
"value": "Rails has an awesome way of looking up column names and expected datatypes from the DB, alleviating a lot of programming.\nI'm trying to build something like this in C#.NET, because we have large tables that are ever changing. I'll be adding parameters like so:\nSqlParameter par... |
I have a database that i'm dealing with which is updated every few hours remotely (not on any specific time span) and i have no control over the administration of it. I have web clients connecting to it to view information contained within it. These clients (coded using PHP and Javascript) might be checking the databas... | To reduce the number of times your PHP and JavaScript clients query the database, while ensuring they still have access to updated information, you can implement several strategies. Here are some suggestions:
### 1. Caching Mechanism
Implement a caching system to store the results of expensive database queries tempor... | 38,434 | [
{
"from": "human",
"value": "I have a database that i'm dealing with which is updated every few hours remotely (not on any specific time span) and i have no control over the administration of it. I have web clients connecting to it to view information contained within it. These clients (coded using PHP and ... |
I have an XML configuration file with a collection of strings like so:
<SomeSetting>value</SomeSetting>
<SomeOtherSetting>value</SomeOtherSetting>
<TypesOfThings>
<Thing>Type 1</Thing>
<Thing>Type 2</Thing>
<Thing>Type 3</Thing>
</TypesOfThings>
These 'Things' become options in the front end of the app for the u... | In .NET, to deserialize XML into a collection directly using attributes, you usually have to define a specific class for the items in the collection if you want to use strong typing. However, in your case, if you want to directly read the `Thing` elements as strings into a `List<string>`, you can achieve this by implem... | 36,570 | [
{
"from": "human",
"value": "I have an XML configuration file with a collection of strings like so:\n<SomeSetting>value</SomeSetting>\n<SomeOtherSetting>value</SomeOtherSetting>\n<TypesOfThings>\n <Thing>Type 1</Thing>\n <Thing>Type 2</Thing>\n <Thing>Type 3</Thing>\n</TypesOfThings>\n\nThese 'Things' be... |
Does anybody know a good place to find things about game development for windows mobile?
thanks!
| Certainly! Here are some resources and platforms where you can find information about game development for Windows Mobile:
1. **Microsoft Documentation**: Microsoft's official documentation for Windows app development includes sections on game development. You can find guides, APIs, and sample code.
- [Windows App ... | 41,771 | [
{
"from": "human",
"value": "Does anybody know a good place to find things about game development for windows mobile?\nthanks!\n"
},
{
"from": "gpt",
"value": "Certainly! Here are some resources and platforms where you can find information about game development for Windows Mobile:\n\n1. **Micro... |
Given a columns' index, how can you get an Excel column name?
The problem is trickier than it sounds because it's not just base-26. The columns don't wrap over like normal digits would. Even the Microsoft Support Example doesn't scale beyond ZZZ.
Disclaimer: This is some code I had done a while back, and it came across... | Converting a column index to an Excel column name is a common task in programming and can be done with a straightforward algorithm. Excel columns use a base-26 numbering system but with a twist: instead of starting at 0 (like base-26 would normally), it starts at 1, and there's no "zero" digit.
Here's how to convert ... | 40,752 | [
{
"from": "human",
"value": "Given a columns' index, how can you get an Excel column name?\nThe problem is trickier than it sounds because it's not just base-26. The columns don't wrap over like normal digits would. Even the Microsoft Support Example doesn't scale beyond ZZZ.\nDisclaimer: This is some code ... |
Does anyone know in .Net 2.0 - .Net 3.5 how to load a jpeg into a System.Windows.Forms.WebControl as a byte-array and with the right mimetypes set so it will show?
Something like:
webBrowser1.DocumentStream = new MemoryStream(File.ReadAllBytes("mypic.jpg"));
webBrowser1.DocumentType = "application/jpeg";
The webBrowse... | In .NET Framework 2.0 to 3.5, the `WebBrowser` control does not directly support setting MIME types for loading content. It is primarily designed to render HTML pages, and while it can display images and other content types, it does not provide a property like `DocumentType` for this purpose.
However, you can work aro... | 40,508 | [
{
"from": "human",
"value": "Does anyone know in .Net 2.0 - .Net 3.5 how to load a jpeg into a System.Windows.Forms.WebControl as a byte-array and with the right mimetypes set so it will show?\nSomething like:\nwebBrowser1.DocumentStream = new MemoryStream(File.ReadAllBytes(\"mypic.jpg\"));\nwebBrowser1.Doc... |
What are some common, real world examples of using the Builder Pattern? What does it buy you? Why not just use a Factory Pattern?
| The Builder Pattern is a design pattern that provides a flexible solution for constructing complex objects. It is particularly useful when an object requires multiple optional parameters, or when it needs to be created in a step-by-step process. Here are some common real-world examples where the Builder Pattern is util... | 38,858 | [
{
"from": "human",
"value": "What are some common, real world examples of using the Builder Pattern? What does it buy you? Why not just use a Factory Pattern?\n"
},
{
"from": "gpt",
"value": "The Builder Pattern is a design pattern that provides a flexible solution for constructing complex obj... |
I've got a table with checkbox-style cells, and I can't figure out how to get these buttons to take on the titles that they're supposed to. Should the data source be an array of strings? An array of dictionaries (string/boolean)? An array of NSButtonCells? None of these seem to work =/
| It sounds like you're working with a table view that contains checkbox-style cells in a macOS application, likely using AppKit. Here’s a brief overview of how you might structure your data source and handle checkbox titles in the cells.
### Data Source Structure
1. **Array of Dictionaries**: The most flexible way to ... | 36,863 | [
{
"from": "human",
"value": "I've got a table with checkbox-style cells, and I can't figure out how to get these buttons to take on the titles that they're supposed to. Should the data source be an array of strings? An array of dictionaries (string/boolean)? An array of NSButtonCells? None of these seem to ... |
How does one execute some VBA code periodically, completely automated?
| To execute VBA code periodically in Excel (or other Office applications), you can use the following approaches:
### 1. Using Application.OnTime Method
The `Application.OnTime` method allows you to schedule a procedure to run at a specific time or after a set interval. Here’s how you can set it up:
#### Step 1: Creat... | 32,190 | [
{
"from": "human",
"value": "How does one execute some VBA code periodically, completely automated?\n"
},
{
"from": "gpt",
"value": "To execute VBA code periodically in Excel (or other Office applications), you can use the following approaches:\n\n### 1. Using Application.OnTime Method\n\nThe `A... |
I want to be able to link to sharepoint documents without having to refer to the document name which may change.
Is there anyway to programmatically add a unique key to the meta-data and then somehow use this in a link?
| Yes, you can programmatically add unique keys to the metadata of SharePoint documents and then use those keys to construct links to the documents. Here's a general approach you can take:
### Step 1: Add a Unique Key to the Document Metadata
You can create a custom metadata field in SharePoint to store a unique key (e... | 39,898 | [
{
"from": "human",
"value": "I want to be able to link to sharepoint documents without having to refer to the document name which may change. \nIs there anyway to programmatically add a unique key to the meta-data and then somehow use this in a link?\n"
},
{
"from": "gpt",
"value": "Yes, you can... |
all files in ~/Cipher/nsdl/crypto can be found here
java files compiled with gcj, see compile.sh
nmint@nqmk-mint ~/Cipher/nsdl/crypto $ echo test | ./cryptTest encrypt deadbeefdeadbeefdeadbeefdeadbeef deadbeef Blowfish CBC > test
null
Exception in thread "main" java.lang.IllegalStateException: cipher is not for encrypt... | The error you are encountering, specifically `java.lang.IllegalStateException: cipher is not for encrypting or decrypting`, indicates that the `Cipher` objects (`ecipher` or `dcipher`) are not properly initialized before you attempt to use them in the `encrypt` or `decrypt` methods.
Here are some steps to help you tro... | 37,894 | [
{
"from": "human",
"value": "all files in ~/Cipher/nsdl/crypto can be found here\njava files compiled with gcj, see compile.sh\nnmint@nqmk-mint ~/Cipher/nsdl/crypto $ echo test | ./cryptTest encrypt deadbeefdeadbeefdeadbeefdeadbeef deadbeef Blowfish CBC > test\nnull\nException in thread \"main\" java.lang.I... |
I'm trying to write an algorithm that will find the set of all vertices in a graph with degree smaller than their neighbors. My initial approach is to find the degree of each vertex, then work through the list, comparing the degree of each vertex with the degree(s) of its neighbors. Unfortunately, this looks like it co... | Your approach to finding vertices in a graph with a degree smaller than all of their neighbors is reasonable, but it can indeed be optimized. Here’s a more efficient way to accomplish this:
1. **Construct the Graph**: Ensure you have a way to efficiently access both the degree of each vertex and its neighbors. An adja... | 39,103 | [
{
"from": "human",
"value": "I'm trying to write an algorithm that will find the set of all vertices in a graph with degree smaller than their neighbors. My initial approach is to find the degree of each vertex, then work through the list, comparing the degree of each vertex with the degree(s) of its neighb... |
I have something like this:
<node TEXT=" txt A "/>
<node TEXT="
txt X
"/>
<node>
<html>
<p>
txt Y
</p>
</html>
</node>
<node TEXT="txt B"/>
and i want to use XSLT to get this:
txt A
txt X
txt Y
txt B
I want to strip all useless whitespaces and linebreaks of @TEXT's and CDATA's. ... | You can achieve the desired output using XSLT by applying templates to process the nodes and strip the unnecessary whitespace. Below is an example of how to write an XSLT stylesheet that will transform the provided XML input into the desired output format:
### XML Input
```xml
<root>
<node TEXT=" txt A "/>
... | 40,370 | [
{
"from": "human",
"value": "I have something like this:\n<node TEXT=\" txt A \"/>\n<node TEXT=\"\n\n txt X\n\n\"/>\n<node>\n <html>\n <p>\n txt Y\n </p>\n </html>\n</node>\n<node TEXT=\"txt B\"/>\n\nand i want to use XSLT to get this:\ntxt A\ntxt X\ntxt Y\ntxt B\n\nI want to ... |
I´m creating a PDA app and I need to upload/download a lot of small files and my idea is to gather them in an uncompressed zip file.
The question is: It´s a good idea to read those files from the zip without separating them? How can I do so? Or is it better to unzip them? Since the files are not compressed my simple mi... | Using a ZIP file to manage a large number of small files in your PDA app can be a good idea for several reasons, including easier management, reduced file system overhead, and potentially better performance when transferring files over a network.
### Advantages of Using a ZIP File
1. **Single File Management**: Instea... | 39,351 | [
{
"from": "human",
"value": "I´m creating a PDA app and I need to upload/download a lot of small files and my idea is to gather them in an uncompressed zip file.\nThe question is: It´s a good idea to read those files from the zip without separating them? How can I do so? Or is it better to unzip them? Since... |
1) I have a ReportViewer control on a page that's linked to a ServerReport (I'm using ASP.NET 2.0). The report displays fine, but the 'Export' link is present but disabled and the 'Select a format' drop down list (that's normally visible when you view the report in Reporting Services) isn't there. Any ideas? The ShowEx... | It sounds like you are encountering two separate issues with the ReportViewer control in your ASP.NET application. Let's address them one by one:
### 1) Export Controls Disabled
If the `Export` link is disabled and the `Select a format` dropdown list is not visible in your ReportViewer control, here are a few things t... | 36,785 | [
{
"from": "human",
"value": "1) I have a ReportViewer control on a page that's linked to a ServerReport (I'm using ASP.NET 2.0). The report displays fine, but the 'Export' link is present but disabled and the 'Select a format' drop down list (that's normally visible when you view the report in Reporting Ser... |
I need a simple app to edit database tables. Are there any code generators that will generate winforms in c#? I have CodeSmith, are there any templates around that would help in doing this?
| Yes, there are several code generators and templates available that can help you create WinForms applications in C# for editing database tables. Since you already have CodeSmith, you can certainly leverage it to create a simple application to manipulate database records.
### 1. **Using CodeSmith:**
CodeSmith is a pow... | 39,669 | [
{
"from": "human",
"value": "I need a simple app to edit database tables. Are there any code generators that will generate winforms in c#? I have CodeSmith, are there any templates around that would help in doing this?\n"
},
{
"from": "gpt",
"value": "Yes, there are several code generators and... |
How do I learn PLC programming? Would it differ greatly for different brands of PLCs? Is ladder programming the same as PLC programming?
| Learning PLC (Programmable Logic Controller) programming can be a rewarding experience, especially if you're interested in industrial automation and control systems. Here are some steps and considerations to help you get started:
### Steps to Learn PLC Programming
1. **Understand the Basics of PLCs**:
- Familiariz... | 36,396 | [
{
"from": "human",
"value": "How do I learn PLC programming? Would it differ greatly for different brands of PLCs? Is ladder programming the same as PLC programming?\n"
},
{
"from": "gpt",
"value": "Learning PLC (Programmable Logic Controller) programming can be a rewarding experience, especiall... |
I've got a whole host of values stored in a .net 2.0 hashtable. What I would really like to find is a way to, essentially, do a SQL select statement on the table.
Meaning, I'd like to get a list of keys whose associated values match a very simple text pattern (along the lines of "starts with a number".)
The final goa... | Certainly! In .NET 2.0, you can work with a `Hashtable` to find keys based on a condition on their associated values. Since you want to filter based on a text pattern (in this case, values that start with a number), you can do so using a simple loop and conditional checks.
Here's how you can achieve that:
1. Iterate ... | 39,789 | [
{
"from": "human",
"value": "I've got a whole host of values stored in a .net 2.0 hashtable. What I would really like to find is a way to, essentially, do a SQL select statement on the table.\nMeaning, I'd like to get a list of keys whose associated values match a very simple text pattern (along the lines... |
I added a get_absolute_url function to one of my models.
def get_absolute_url(self):
return '/foo/bar'
The admin site picks it up and adds a "view on site" link to the detail page for that object (when I put a real URL there instead of "/foo/bar").
The problem is instead of going to http://localhost:8000/foo/bar,... | The issue you’re facing stems from how Django constructs URLs. When you provide a URL like `'/foo/bar'` in the `get_absolute_url` method, Django treats it as a relative URL. When generating the link, it uses the site domain configured in your settings, which in your case is defaulting to `example.com`.
To resolve this... | 41,764 | [
{
"from": "human",
"value": "I added a get_absolute_url function to one of my models.\ndef get_absolute_url(self):\n return '/foo/bar' \n\nThe admin site picks it up and adds a \"view on site\" link to the detail page for that object (when I put a real URL there instead of \"/foo/bar\").\nThe problem is ... |
I'm building a simple Flex applicaton where I want to show a line chart, then display some information in a little popup box when user mouses over a line.
| To create a simple Flex application that shows a line chart and displays information in a popup when the user mouses over the line, you can follow these steps:
### Step 1: Set Up Your Flex Environment
Make sure you have the Flex SDK installed and your development environment set up. You can use Flash Builder, Intelli... | 36,155 | [
{
"from": "human",
"value": "I'm building a simple Flex applicaton where I want to show a line chart, then display some information in a little popup box when user mouses over a line.\n"
},
{
"from": "gpt",
"value": "To create a simple Flex application that shows a line chart and displays inform... |
I would like my python script to search through a directory in SVN, locate the files ending with a particular extension (eg. *.exe), and copy these files to a directory that has been created in my C drive. How can I do this? I'm new to Python so a detailed response and/or point in the right direction would be very much... | To create a Python script that searches through a directory in SVN for files with a specific extension (like `.exe`), and then copies those files to a designated directory on your C drive, you can use the `os` and `shutil` modules. Below are detailed steps, including code snippets to help you get started.
### Step-by-... | 39,337 | [
{
"from": "human",
"value": "I would like my python script to search through a directory in SVN, locate the files ending with a particular extension (eg. *.exe), and copy these files to a directory that has been created in my C drive. How can I do this? I'm new to Python so a detailed response and/or point ... |
I can't seem to find in the SDK how to programatically sense the mute button/switch on the iPhone. When my app plays background music, it responds properly to the volume button without me having any code to follow that but, when I use the mute switch, it just keeps playing away.
How do I test the position of mute?
(NO... | As of my last update, the iOS SDK does not provide a way to programmatically check the state of the mute switch (also known as the Ring/Silent switch) on the iPhone. This limitation is by design, as Apple prioritizes user privacy and prevents developers from accessing certain hardware states that could affect user expe... | 40,882 | [
{
"from": "human",
"value": "I can't seem to find in the SDK how to programatically sense the mute button/switch on the iPhone. When my app plays background music, it responds properly to the volume button without me having any code to follow that but, when I use the mute switch, it just keeps playing away... |
I have created a small flash CS4 project that has a few custom components ( AS 3), communicating with each other.
Is it possible to make a FLA file that points to these components in source format (as .AS files), without compiling these components separately 1st and copying to /flash/components folder?
I want an easy... | Yes, you can definitely create a Flash CS4 (ActionScript 3.0) project that uses custom components without having to compile them separately first and without having to copy them to the `/flash/components` folder. This is a common workflow during development and debugging, and you can achieve this by following these ste... | 39,835 | [
{
"from": "human",
"value": "I have created a small flash CS4 project that has a few custom components ( AS 3), communicating with each other.\nIs it possible to make a FLA file that points to these components in source format (as .AS files), without compiling these components separately 1st and copying t... |
During development I have to "clear cache" in Firefox all the time in order to make it use the latest version of JavaScript files.
Is there some kind of setting (about:config) to turn off caching completely for JavaScript files? Or, if not, for all files?
| Yes, you can adjust settings in Firefox to reduce caching during development. While there isn't a specific setting in `about:config` that allows you to completely turn off caching for JavaScript files alone, you can modify caching behavior for all files. Here's how to do that:
### Method 1: Disable Cache in Developer ... | 40,402 | [
{
"from": "human",
"value": "During development I have to \"clear cache\" in Firefox all the time in order to make it use the latest version of JavaScript files.\nIs there some kind of setting (about:config) to turn off caching completely for JavaScript files? Or, if not, for all files?\n"
},
{
"fro... |
I'm developing an invisible Java Applet, that will be controlled entirely from JavaScript.
I can call the applet's Java methods easily, and I can call JavaScript methods from within the applet by using netscape.javascript.JSObject.getWindow(this).call().
But in order to register a JavaScript callback in the applet, I g... | In Java Applets, you cannot directly pass JavaScript function references as Java method parameters because JavaScript functions are not Java objects and Java does not have a direct equivalent for JavaScript function objects. However, you can achieve the desired functionality using a workaround that involves storing the... | 39,432 | [
{
"from": "human",
"value": "I'm developing an invisible Java Applet, that will be controlled entirely from JavaScript.\nI can call the applet's Java methods easily, and I can call JavaScript methods from within the applet by using netscape.javascript.JSObject.getWindow(this).call().\nBut in order to regist... |
In a PHP script I want to get just the URL of the top result of a Google search and redirect to it. I could scrape it but is there a better way?
| Scraping Google search results directly is against Google's Terms of Service and can lead to your IP being blocked or banned from accessing their services. Instead, it’s better to use the Google Custom Search API, which is a legitimate way to get search results programmatically.
Here's how you can set up a PHP script ... | 38,143 | [
{
"from": "human",
"value": "In a PHP script I want to get just the URL of the top result of a Google search and redirect to it. I could scrape it but is there a better way?\n"
},
{
"from": "gpt",
"value": "Scraping Google search results directly is against Google's Terms of Service and can lead... |
Does anyone have experience with developing for Sharepoint 2003 using Visual Studio 2008?
I need to upgrade to VS2008 because of Vista issues but need to support Sharepoint 2003 webparts. The webparts are all pretty simple. Will I be able to support those webparts using VS2008?
| Developing SharePoint 2003 web parts using Visual Studio 2008 can be a bit tricky, but it is possible with some workarounds. Here are some key points to consider:
1. **Compatibility**: SharePoint 2003 is built on .NET Framework 1.1, while Visual Studio 2008 primarily targets .NET Framework 2.0 and above. This means th... | 40,646 | [
{
"from": "human",
"value": "Does anyone have experience with developing for Sharepoint 2003 using Visual Studio 2008?\nI need to upgrade to VS2008 because of Vista issues but need to support Sharepoint 2003 webparts. The webparts are all pretty simple. Will I be able to support those webparts using VS2008?... |
How would you format/indent this piece of code?
int ID = Blahs.Add( new Blah( -1, -2, -3) );
or
int ID = Blahs.Add( new Blah(
1,2,3,55
)
);
Edit:
My class has lots of parameters actually, so that might effect your response.
| When formatting code, especially when dealing with function calls that have long parameter lists, clarity and readability should be the primary goals. Here are a couple of options for how you could format your code, particularly when you have many parameters.
### Option 1: Aligning Parameters Vertically
This format a... | 42,564 | [
{
"from": "human",
"value": "How would you format/indent this piece of code?\nint ID = Blahs.Add( new Blah( -1, -2, -3) );\n\nor\nint ID = Blahs.Add( new Blah(\n1,2,3,55\n) \n); \n\n\nEdit:\nMy class has lots of parameters actually, so that might effect your response.\n"
},
{
"from": "gpt",... |
I need a serviceable shell for MSYS. This is my current dilemma:
The default rxvt.exe has a scroll bar and copy and paste, but doesn't send control characters or arrow keys to a running program in the shell (like interpreters/debuggers). This is a real thorn when using the Haskell interpreter ghci.
The other shell s... | If you're looking for a better shell experience on MSYS for Haskell development, there are several options you might consider that can help you resolve the issues with control characters and user interface features like scrollbars and copy-paste. Here are a few suggestions:
### 1. **Use `mintty`**
Mintty is a terminal... | 37,839 | [
{
"from": "human",
"value": "I need a serviceable shell for MSYS. This is my current dilemma: \nThe default rxvt.exe has a scroll bar and copy and paste, but doesn't send control characters or arrow keys to a running program in the shell (like interpreters/debuggers). This is a real thorn when using the H... |
I am writing a java program that needs a file open dialog. The file open dialog isn't difficult, I'm hoping to use a JFileChooser. My problem is that I would like to have a dual pane JFrame (consisting of 2 JPanels). The left panel would have a JList, and the right panel would have a file open dialog.
When I use J... | The `JFileChooser` is designed to be a modal dialog, which means that it opens on top of other windows and requires user input before returning control to the application. Unfortunately, `JFileChooser` cannot be embedded directly into a `JPanel` like a regular component. However, you can create a custom file selection ... | 38,059 | [
{
"from": "human",
"value": "I am writing a java program that needs a file open dialog. The file open dialog isn't difficult, I'm hoping to use a JFileChooser. My problem is that I would like to have a dual pane JFrame (consisting of 2 JPanels). The left panel would have a JList, and the right panel woul... |
I have a page with a few fields and a runtime-generated image on it. The contents of this page are inside an UpdatePanel. There is a button to take the user to a secondary page, which has a button that calls javascript:history.go(-1) when clicked.
The problem is, the first page does a full request instead of a postback... | To retain the values of your fields across navigation while using an UpdatePanel and maintaining the functionality you require, you can consider the following approaches:
### 1. **Use Local Storage or Session Storage:**
You can store the field values in local storage or session storage before navigating to the seconda... | 36,188 | [
{
"from": "human",
"value": "I have a page with a few fields and a runtime-generated image on it. The contents of this page are inside an UpdatePanel. There is a button to take the user to a secondary page, which has a button that calls javascript:history.go(-1) when clicked.\nThe problem is, the first page... |
I've got a list of items in an order to show in asp.net -- each item (row) will have 3 textboxes so the user can both view and change that piece of data (shipping cost, handling cost, price).
What would be one "recommended" way to accomplish this? With a repeater, I assume I'd then have to loop through the form values... | In this scenario, both the `Repeater` and `GridView` controls can be used to display and edit the data. However, my recommendation would lean towards using the `GridView` control due to its built-in functionality and ease of use for handling data binding, editing, and updating.
### Reasons to Choose GridView:
1. **Bu... | 33,312 | [
{
"from": "human",
"value": "I've got a list of items in an order to show in asp.net -- each item (row) will have 3 textboxes so the user can both view and change that piece of data (shipping cost, handling cost, price).\nWhat would be one \"recommended\" way to accomplish this? With a repeater, I assume I... |
For example, will the first piece of code perform a full search twice, or is it smart enough to cache results if no DOM changes have occurred?
if ($("#navbar .heading").text() > "") {
$("#navbar .heading").hide();
}
and
var $heading = $("#navbar .heading");
if ($heading.text() > "") {
$heading.hide();
}
If the ... | In jQuery, the way you write your code can impact performance, especially when it comes to DOM manipulation and element selection.
### First Code Snippet:
```javascript
if ($("#navbar .heading").text() > "") {
$("#navbar .heading").hide();
}
```
In this snippet, the jQuery selector `$("#navbar .heading")` is called... | 42,591 | [
{
"from": "human",
"value": "For example, will the first piece of code perform a full search twice, or is it smart enough to cache results if no DOM changes have occurred?\nif ($(\"#navbar .heading\").text() > \"\") {\n $(\"#navbar .heading\").hide();\n}\n\nand \nvar $heading = $(\"#navbar .heading\");\n\n... |
Would I expect to see any performance gain by building my native C++ Client and Server into 64 bit code?
What sort of applications benefit from having a 64 bit specific build?
I'd imagine anything that makes extensive use of long would benefit, or any application that needs a huge amount of memory (i.e. more than 2Gb)... | Building your native C++ client and server into 64-bit code can provide several performance gains and advantages, but it depends on the specific use case and the architecture of your applications. Here are some points to consider regarding the potential benefits and the types of applications that may benefit from 64-bi... | 38,914 | [
{
"from": "human",
"value": "Would I expect to see any performance gain by building my native C++ Client and Server into 64 bit code?\nWhat sort of applications benefit from having a 64 bit specific build? \nI'd imagine anything that makes extensive use of long would benefit, or any application that needs a... |
So I am trying to accomplish something like this:
SELECT * FROM table WHERE status_id IN (1,3,4);
using Zend_Db_Select... can't find how to do it :( Is it at all possible?
| Yes, you can accomplish this using `Zend_Db_Select`. You can use the `where` method to construct a condition that checks if `status_id` is in the specified list. Here's how you can do it:
```php
// Assuming you have an instance of your database adapter
$dbAdapter = new Zend_Db_Adapter(/* your config */);
// Create a ... | 40,990 | [
{
"from": "human",
"value": "So I am trying to accomplish something like this:\nSELECT * FROM table WHERE status_id IN (1,3,4);\n\nusing Zend_Db_Select... can't find how to do it :( Is it at all possible?\n"
},
{
"from": "gpt",
"value": "Yes, you can accomplish this using `Zend_Db_Select`. You c... |
Can someone show me a regex to select #OnlinePopup_AFE53E2CACBF4D8196E6360D4DDB6B70 its okay to assume #OnlinePopup
~DCTM~dctm://aicpcudev/37004e1f8000219e?DMS_OBJECT_SPEC=RELATION_ID#OnlinePopup_AFE53E2CACBF4D8196E6360D4DDB6B70_11472026_1214836152225_6455280574472127786
| You can use the following regex pattern to match the specific identifier `#OnlinePopup_AFE53E2CACBF4D8196E6360D4DDB6B70` in the provided string:
```regex
#OnlinePopup_[A-F0-9]{32}
```
### Explanation:
- `#OnlinePopup_`: Matches the literal string `#OnlinePopup_`.
- `[A-F0-9]{32}`: Matches exactly 32 characters that a... | 41,954 | [
{
"from": "human",
"value": "Can someone show me a regex to select #OnlinePopup_AFE53E2CACBF4D8196E6360D4DDB6B70 its okay to assume #OnlinePopup\n~DCTM~dctm://aicpcudev/37004e1f8000219e?DMS_OBJECT_SPEC=RELATION_ID#OnlinePopup_AFE53E2CACBF4D8196E6360D4DDB6B70_11472026_1214836152225_6455280574472127786\n\n"
... |
How to Read Schema of Flat File using Reflection in C#
The brief overview that I have is- There's some server which is storing the data as flat files and I have to push data from SQL Server to these flat files. For that I need to know their schema.
I have no idea about this, any help would be great.
| To read the schema of a flat file using reflection in C#, you first need to understand that a flat file typically refers to a plain text file which holds data in a structured format (like CSV, TSV, or fixed-width fields). The schema in this context would mean understanding the structure of this flat file, such as the f... | 36,096 | [
{
"from": "human",
"value": "How to Read Schema of Flat File using Reflection in C#\nThe brief overview that I have is- There's some server which is storing the data as flat files and I have to push data from SQL Server to these flat files. For that I need to know their schema.\nI have no idea about this, a... |
I have a list of tables i.e. student, teacher, staff, dept. and so on and each of these tables have comments specific to them. Now one record in a table can have one or many comments that shows it's a one to many relation from any table to comments table. I don't know what the best way is to relate comments table to ea... | In order to efficiently manage a one-to-many relationship between your main entities (such as student, teacher, staff, etc.) and a comments table, while avoiding the issues you've outlined, you can consider the following approach:
### Option 1: Polymorphic Association
Instead of adding foreign keys in the comments ta... | 39,739 | [
{
"from": "human",
"value": "I have a list of tables i.e. student, teacher, staff, dept. and so on and each of these tables have comments specific to them. Now one record in a table can have one or many comments that shows it's a one to many relation from any table to comments table. I don't know what the b... |
If i were developing a screensaver using a windows.form in C# how would i support multiple monitors? obviously i need a way to enumerate the monitors and maybe create forms for them too or just fade to black? Has anyone solved this?
Any insight would be helpful, what's the best approach?
| Developing a screensaver for multiple monitors in a Windows Forms application using C# can be an interesting challenge. Here’s a general approach to achieve this, along with some insights and best practices.
### Steps to Create a Multi-Monitor Screensaver
1. **Enumerate Monitors**:
Use the `System.Windows.Forms.Sc... | 35,703 | [
{
"from": "human",
"value": "If i were developing a screensaver using a windows.form in C# how would i support multiple monitors? obviously i need a way to enumerate the monitors and maybe create forms for them too or just fade to black? Has anyone solved this?\nAny insight would be helpful, what's the best... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.