instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I'm mocking about with plt-scheme's ffi and I have a C-function that returns a char ** (array of strings). If I declare my function as (_fun _pointer -> _pointer), how do I convert the result to a list of strings in scheme? Here are the relevant C-declarations: typedef char **MYSQL_ROW; /* return data as array of str...
To convert a `char **` (an array of strings) returned from your C function into a list of strings in Scheme using `plt-scheme's` FFI (Foreign Function Interface), you'll want to follow these steps: 1. **Call the C function** to get the `MYSQL_ROW` type, which is a `char **`. 2. **Interpret the `char **` as a pointer**...
15,053
[ { "from": "human", "value": "I'm mocking about with plt-scheme's ffi and I have a C-function that returns a char ** (array of strings). If I declare my function as (_fun _pointer -> _pointer), how do I convert the result to a list of strings in scheme?\nHere are the relevant C-declarations:\ntypedef char **...
I'm using the zlib.NET library to try and inflate files that are compressed by zlib (on a Linux box, perhaps). Here's what I'm doing: zlib.ZInputStream zinput = new zlib.ZInputStream(File.Open(path, FileMode.Open, FileAccess.Read)); while (stopByte != (data = zinput.ReadByte())) { // check data here } zinput.C...
It looks like you're trying to use the `zlib.NET` library to decompress data that you believe is compressed in the zlib format. Based on your description, it sounds like there might be a few potential issues causing the behavior you're observing. Let's break down some common mistakes and their solutions: ### 1. Ensure...
18,086
[ { "from": "human", "value": "I'm using the zlib.NET library to try and inflate files that are compressed by zlib (on a Linux box, perhaps). Here's what I'm doing:\nzlib.ZInputStream zinput =\n new zlib.ZInputStream(File.Open(path, FileMode.Open, FileAccess.Read));\n\nwhile (stopByte != (data = zinput.Re...
Mapping a collection of enums with NHibernate Specifically, using Attributes for the mappings. Currently I have this working mapping the collection as type Int32 and NH seems to take care of it, but it's not exactly ideal. The error I receive is "Unable to determine type" when trying to map the collection as of the typ...
When working with NHibernate and enums, you can certainly map them to your database using attributes, and it's often preferable to store them as strings rather than integers for better readability. The error you're encountering ("CEnumType is not mapped") suggests that NHibernate doesn't recognize your `CEnumType` cl...
4,966
[ { "from": "human", "value": "Mapping a collection of enums with NHibernate\nSpecifically, using Attributes for the mappings.\nCurrently I have this working mapping the collection as type Int32 and NH seems to take care of it, but it's not exactly ideal.\nThe error I receive is \"Unable to determine type\" w...
As per my understanding stateless session beans are used to code the business logic. They can not store data in their instance variables because their instance is shared by multiple requests. So they seem to be more like Singleton classes. However the difference is contain creates (or reuses from pool) the separate ins...
You are correct in your understanding that stateless session beans in the Java EE (Jakarta EE) environment are designed to handle business logic without maintaining any conversational state across method invocations. Here’s a deeper dive into why they are specified to be single-threaded and the reasoning behind it: ##...
8,701
[ { "from": "human", "value": "As per my understanding stateless session beans are used to code the business logic. They can not store data in their instance variables because their instance is shared by multiple requests. So they seem to be more like Singleton classes. However the difference is contain creat...
Is it possible to embed a pre-existing DLL into a compiled C# executable (so that you only have one file to distribute)? If it is possible, how would one go about doing it? Normally, I'm cool with just leaving the DLLs outside and having the setup program handle everything, but there have been a couple of people at wor...
Yes, it is possible to embed a pre-existing DLL into a compiled C# executable so that you have a single file to distribute. However, it requires some additional work since .NET does not natively support embedding and loading external DLLs directly from the executable. Here are some common methods to achieve this: ### ...
16,794
[ { "from": "human", "value": "Is it possible to embed a pre-existing DLL into a compiled C# executable (so that you only have one file to distribute)? If it is possible, how would one go about doing it?\nNormally, I'm cool with just leaving the DLLs outside and having the setup program handle everything, but...
How come one user in the local Administrators Group has no problem hitting http://localhost:8080/services/v1.0/Registration.asmx while other users in the local Administrators Group get 403 (access denied) errors (with nothing in the Event log)?
When one user in the local Administrators Group can access a specific URL (like `http://localhost:8080/services/v1.0/Registration.asmx`), while others encounter a 403 (Access Denied) error, several factors may be contributing to this issue. Here are some potential reasons and troubleshooting steps you can take: ### Po...
18,458
[ { "from": "human", "value": "How come one user in the local Administrators Group has no problem hitting http://localhost:8080/services/v1.0/Registration.asmx while other users in the local Administrators Group get 403 (access denied) errors (with nothing in the Event log)?\n" }, { "from": "gpt", ...
I am trying to extract a certain part of a column that is between delimiters. e.g. find foo in the following test 'esf :foo: bar So in the above I'd want to return foo, but all the regexp functions only return true|false, is there a way to do this in MySQL
In MySQL, you can use the `SUBSTRING_INDEX()` function in combination with other string functions to extract a substring between specific delimiters. Since you want to extract "foo" from the string `test 'esf :foo: bar`, you can achieve this by using the following query: ```sql SELECT TRIM(SUBSTRING_INDEX(SUBSTRI...
20,431
[ { "from": "human", "value": "I am trying to extract a certain part of a column that is between delimiters.\ne.g. find foo in the following\ntest 'esf :foo: bar\nSo in the above I'd want to return foo, but all the regexp functions only return true|false,\nis there a way to do this in MySQL\n" }, { "f...
I have an RFID reader connected to an Arduino board. I'd like to connect to it over its serial interface, and whenever the RFID reader omits a signal ( when it has read an (RF)ID ), I'd like to retrieve it in my C++ program. I already have the code for simply printing the RFID to serial from the Arduino. What I don't k...
To read RFID data from an Arduino connected via a serial interface in your C++ program on Linux, you'll want to set up a method to listen for incoming serial data without polling continuously. You can achieve this using a combination of non-blocking reads or by using a library that supports asynchronous serial communic...
16,214
[ { "from": "human", "value": "I have an RFID reader connected to an Arduino board. I'd like to connect to it over its serial interface, and whenever the RFID reader omits a signal ( when it has read an (RF)ID ), I'd like to retrieve it in my C++ program.\nI already have the code for simply printing the RFID ...
Basically what the title says. (Forgive me because I am a .NET newb) In my department, we have a server running .net 3.5 and ever since I got into this section I have been using LINQ. However, I am starting a personal project on a different server (obviously), so 2 questions: What do I need to get up and running with...
It's great that you're diving into LINQ and working on your personal project! Let's break down your questions one by one. ### 1. What do I need to get up and running with LINQ? To start using LINQ (Language Integrated Query) in your personal project, you need to have: - **.NET Framework**: LINQ was introduced in .NET...
18,333
[ { "from": "human", "value": "Basically what the title says. (Forgive me because I am a .NET newb)\nIn my department, we have a server running .net 3.5 and ever since I got into this section I have been using LINQ. However, I am starting a personal project on a different server (obviously), so 2 questions: ...
I have written a thumbnail provider following the interfaces specified on MSDN. However, I have been unable to figure out how to register it in a way that Vista actually calls into it. Has anyone gotten a thumbnail provider working for Vista? Sample code or links would be especially helpful.
To register a thumbnail provider in Windows Vista, you'll need to ensure that you properly implement the necessary COM interfaces and register your provider in the Windows Registry. Below are the steps to help you get your thumbnail provider working, along with some sample code and tips. ### Step 1: Implement the Thum...
17,642
[ { "from": "human", "value": "I have written a thumbnail provider following the interfaces specified on MSDN. However, I have been unable to figure out how to register it in a way that Vista actually calls into it. Has anyone gotten a thumbnail provider working for Vista? Sample code or links would be esp...
Is there a way to identify unused attributes/methods in Visual C++ 2008 Professional? If it's not possible by default, recommendations of 3rd-party tools are also much appreciated. Thanks, Florian Edit: nDepend only works for .NET assemblies. I'm looking for something that can be used with native C++ applications.
In Visual C++ 2008, there isn't a built-in tool specifically designed to identify unused attributes or methods in native C++ applications. However, you can use several approaches and third-party tools to help identify unused code: ### Approaches: 1. **Code Analysis with Visual Studio**: - Use the built-in code ana...
17,220
[ { "from": "human", "value": "Is there a way to identify unused attributes/methods in Visual C++ 2008 Professional? If it's not possible by default, recommendations of 3rd-party tools are also much appreciated.\nThanks,\nFlorian \nEdit: nDepend only works for .NET assemblies. I'm looking for something that ...
Is SSL secure enough for using sensitive data (like password) in query string? Is there any extra options to implement?
Using SSL (Secure Sockets Layer), or more accurately its successor TLS (Transport Layer Security), significantly enhances the security of data transmitted over the internet by encrypting the data sent between clients and servers. However, when it comes to sending sensitive data like passwords in a query string, there a...
17,799
[ { "from": "human", "value": "Is SSL secure enough for using sensitive data (like password) in query string?\nIs there any extra options to implement?\n" }, { "from": "gpt", "value": "Using SSL (Secure Sockets Layer), or more accurately its successor TLS (Transport Layer Security), significantly ...
To deploy a new version of our website we do the following: Zip up the new code, and upload it to the server. On the live server, delete all the live code from the IIS website directory. Extract the new code zipfile into the now empty IIS directory This process is all scripted, and happens quite quickly, but there ca...
Deploying a new version of your website with zero downtime can be achieved through several strategies. Here are a few approaches you can consider: ### 1. **Blue-Green Deployment** In a blue-green deployment, you maintain two identical environments: "blue" (the current version) and "green" (the new version). Here’s how...
15,648
[ { "from": "human", "value": "To deploy a new version of our website we do the following:\n\nZip up the new code, and upload it to the server.\nOn the live server, delete all the live code from the IIS website directory.\nExtract the new code zipfile into the now empty IIS directory\n\nThis process is all sc...
I refactored a slow section of an application we inherited from another company to use an inner join instead of a subquery like: WHERE id IN (SELECT id FROM ...) The refactored query runs about 100x faster. (~50 seconds to ~0.3) I expected an improvement, but can anyone explain why it was so drastic? The columns used ...
The significant performance difference you observed between using an `INNER JOIN` and a `WHERE id IN (SELECT id FROM ...)` subquery is likely due to how SQL engines optimize and execute these queries. Let's break down the explanation: ### Execution Plan Differences 1. **Subquery Execution**: - When you use a subq...
17,591
[ { "from": "human", "value": "I refactored a slow section of an application we inherited from another company to use an inner join instead of a subquery like:\nWHERE id IN (SELECT id FROM ...)\n\nThe refactored query runs about 100x faster. (~50 seconds to ~0.3) I expected an improvement, but can anyone expl...
Below is a rather simple function which counts how many files are on a machine. Called on "C:\", it takes about 5 seconds to run. Unless I haven't run it in a while or first run a ram-clearing program, in which case it takes 60 seconds or more. I wouldn't have thought it could be caching since I'm doing a new scan e...
The performance of the `countFiles` function you're using can be affected by various factors such as file system caching, disk speed, and the way your code interacts with the Windows API. Here are several strategies that might help improve the performance of your file counting function: ### 1. Reduce API Calls The fun...
15,310
[ { "from": "human", "value": "Below is a rather simple function which counts how many files are on a machine. Called on \"C:\\\", it takes about 5 seconds to run. Unless I haven't run it in a while or first run a ram-clearing program, in which case it takes 60 seconds or more. I wouldn't have thought it c...
In C# how do you detect is a specific drive is a Hard Drive, Network Drive, CDRom, or floppy?
In C#, you can use the `System.IO.DriveInfo` class to detect the type of a specific drive. The `DriveInfo` class provides methods and properties to obtain information about the drives on the computer, including whether a drive is a hard drive, network drive, CD-ROM, or floppy disk. Here's a sample code snippet that de...
17,065
[ { "from": "human", "value": "In C# how do you detect is a specific drive is a Hard Drive, Network Drive, CDRom, or floppy?\n" }, { "from": "gpt", "value": "In C#, you can use the `System.IO.DriveInfo` class to detect the type of a specific drive. The `DriveInfo` class provides methods and proper...
I think this is a fun engineering-level question. I need to design a control which displays a line chart. What I want to be able to do is use a designer to add multiple Pens which actually describe the data and presentation so that it ends up with Xaml something along these lines: <Chart> <Pen Name="SalesData" Color...
To achieve your goal of designing a control that displays a line chart with a collection of `Pen` items, extending `ItemsControl` would indeed be a suitable approach. Here’s a detailed explanation of how you can implement this, along with some insights on the properties and behaviors you might want to include. ### Ste...
13,820
[ { "from": "human", "value": "I think this is a fun engineering-level question.\nI need to design a control which displays a line chart. What I want to be able to do is use a designer to add multiple Pens which actually describe the data and presentation so that it ends up with Xaml something along these li...
I'm looking for tools that implement the distributed agent/service model ... I guess we could also call this grid or cloud computing, but I'm not sure the term is exactly analagous. A distributed agent model would be one where developers build agents that are dispatched to a framework and the framework executes the ag...
There are several frameworks and tools that align with the distributed agent/service model you're describing. While many of these frameworks focus on cloud and grid computing, they also emphasize dynamic distribution, persistent services, and streamlined deployment. Here are some notable options: 1. **Apache Mesos**: ...
16,988
[ { "from": "human", "value": "I'm looking for tools that implement the distributed agent/service model ... I guess we could also call this grid or cloud computing, but I'm not sure the term is exactly analagous. A distributed agent model would be one where developers build agents that are dispatched to a fr...
I have a subversion repository that contains a number so subfolders, corresponding to the various applications, configuration files, DLLs, etc (I'll call them 'modules') that make up my project. Now we are starting to "branch" into several related projects. That is, each high-level project will use a number of the mo...
The organization of your Subversion repository is crucial for maintainability, clarity, and ease of collaboration. Given your scenario with a smaller number of projects and a larger number of modules, it's important to weigh the pros and cons of each approach based on your team's needs. ### Option 1: Module-centric Or...
14,678
[ { "from": "human", "value": "I have a subversion repository that contains a number so subfolders, corresponding to the various applications, configuration files, DLLs, etc (I'll call them 'modules') that make up my project. Now we are starting to \"branch\" into several related projects. That is, each hig...
I generaly disable viewstate for my ASP.net controls unless I explicitly know I am going to require view state for them. I have found that this can significantly reduce the page size of the HTML generated. Is this good practice? When should be enabled or disabled?
Disabling ViewState in ASP.NET can indeed reduce the page size and improve performance, especially in scenarios where it is not necessary. Here's a breakdown of when to enable or disable ViewState and what practices to consider: ### When to Disable ViewState: 1. **No Need for Control State Persistence**: If the contr...
17,597
[ { "from": "human", "value": "I generaly disable viewstate for my ASP.net controls unless I explicitly know I am going to require view state for them. I have found that this can significantly reduce the page size of the HTML generated. \nIs this good practice? When should be enabled or disabled?\n" }, { ...
TypeWatch is a JQuery plugin that monitors the time between key strokes in a text input box. It allows for features like refreshing of search results as a user types their search terms, as demonstrated in the 'Users' page in Stack Overflow. If you are typing in the name of a user you wish to seach for and pause typ...
You can achieve a similar effect in Delphi by using the `TEdit` component along with a timer. The general idea is to handle the `OnChange` event of the `TEdit` control, start a timer when the user types, and if no additional keystrokes occur within a specified timeframe (e.g., 500 milliseconds), execute your desired ev...
14,932
[ { "from": "human", "value": "TypeWatch is a JQuery plugin that monitors the time between key strokes in a text input box. \nIt allows for features like refreshing of search results as a user types their search terms, as demonstrated in the 'Users' page in Stack Overflow. \nIf you are typing in the name of...
What are the differences between the free sql express 05 management studio and the licensed version?
SQL Server Express 2005 Management Studio, often referred to as SQL Server Management Studio (SSMS), has both free (Express) and licensed versions that come with SQL Server editions such as Standard or Enterprise. Here are the main differences between the free SQL Server Express version and the licensed versions: 1. *...
16,762
[ { "from": "human", "value": "What are the differences between the free sql express 05 management studio and the licensed version?\n" }, { "from": "gpt", "value": "SQL Server Express 2005 Management Studio, often referred to as SQL Server Management Studio (SSMS), has both free (Express) and lice...
When receiving a bug report or an it-doesnt-work message one of my initials questions is always what version? With a different builds being at many stages of testing, planning and deploying this is often a non-trivial question. I the case of releasing Java JAR (ear, jar, rar, war) files I would like to be able to look ...
To effectively manage versioning information in your Java JAR files using Ant and Subversion (SVN), you're on the right track with your proposed strategies. The goal is to ensure that any build artifact—like a JAR, WAR, or EAR—contains identifiable version information that can be easily referenced later, especially whe...
15,228
[ { "from": "human", "value": "When receiving a bug report or an it-doesnt-work message one of my initials questions is always what version? With a different builds being at many stages of testing, planning and deploying this is often a non-trivial question.\nI the case of releasing Java JAR (ear, jar, rar, w...
I have a Rails application for project management where there are Project and Task models. A project can have many tasks, but a task can also have many tasks, ad infinitum. Using nested resources, we can have /projects/1/tasks, /projects/1/tasks/new, /projects/1/tasks/3/edit etc. However, how do you represent the recur...
Your proposed design for handling recursive tasks in a Rails application is reasonable, but it does raise some considerations regarding clarity and usability in your URL structure. ### Proposed URL Structures: 1. **Using Nested Resources**: ```ruby map.resources :tasks do |t| t.resources :tasks end ...
15,459
[ { "from": "human", "value": "I have a Rails application for project management where there are Project and Task models. A project can have many tasks, but a task can also have many tasks, ad infinitum.\nUsing nested resources, we can have /projects/1/tasks, /projects/1/tasks/new, /projects/1/tasks/3/edit et...
Take the following C# class: c1 { event EventHandler someEvent; } If there are a lot of subscriptions to c1's someEvent event and I want to clear them all, what is the best way to achieve this? Also consider that subscriptions to this event could be/are lambdas/anonymous delegates. Currently my solution is to add a R...
Setting the event to `null` directly in your `ResetSubscriptions` method effectively removes all subscriptions to that event, including any lambda or anonymous delegates that may have been subscribed. However, this approach does have some considerations and potential consequences: ### Consequences of Setting Events to...
17,669
[ { "from": "human", "value": "Take the following C# class:\nc1 {\n event EventHandler someEvent;\n}\n\nIf there are a lot of subscriptions to c1's someEvent event and I want to clear them all, what is the best way to achieve this? Also consider that subscriptions to this event could be/are lambdas/anonymous ...
Does anyone know of any good C++ code that does this?
It seems that your question might be missing some specific details about what you need the C++ code to accomplish. If you could provide more context or clarify what functionality or feature you're looking for, I would be more than happy to assist you with relevant code examples or guidance!
21,989
[ { "from": "human", "value": "Does anyone know of any good C++ code that does this?\n" }, { "from": "gpt", "value": "It seems that your question might be missing some specific details about what you need the C++ code to accomplish. If you could provide more context or clarify what functionality o...
One of your team members has been appointed "technical lead" or "team lead" yet he is technically incompetent and lacks major leadership skills. By technically incompetent, I mean that the person doesn't know the difference between an abstract class and an interface, doesn't understand why coupling should be avoided, d...
Dealing with a technical lead who lacks necessary skills can be challenging, especially when it affects the team's morale and your passion for the profession. Here are some steps you might consider taking to address the situation constructively: 1. **Self-Reflection**: Before taking any action, assess your own feeling...
18,170
[ { "from": "human", "value": "One of your team members has been appointed \"technical lead\" or \"team lead\" yet he is technically incompetent and lacks major leadership skills.\nBy technically incompetent, I mean that the person doesn't know the difference between an abstract class and an interface, doesn'...
When the policy for a disk in Windows XP and Vista is set to enable write caching on the hard disk, is there a way to flush a file that has just been written, and ensure that it has been committed to disk? I want to do this programmatically in C++. Closing the file does perform a flush at the application level, but not...
To ensure that data written to a file in Windows XP and Vista is flushed to disk, bypassing any potential write caching, you can use the `FlushFileBuffers` function. This function forces the operating system to write the buffered data of a specified file to the disk. It's important to call this function after you have ...
15,007
[ { "from": "human", "value": "When the policy for a disk in Windows XP and Vista is set to enable write caching on the hard disk, is there a way to flush a file that has just been written, and ensure that it has been committed to disk?\nI want to do this programmatically in C++.\nClosing the file does perfor...
I'm a PHP developer and now I use Notepad++ for code editing, but lately I've been searching for an IDE to ease my work. I've looked into Eclipse, Aptana Studio and several others, but I'm not really decided, they all look nice enough but a bit complicated. I'm sure it'll all get easy once I get used to it, but I don't...
Given your requirements for an IDE that supports FTP, code highlighting, SVN, and additional languages like Ruby and JavaScript, here are a few recommendations: ### 1. **PhpStorm** - **FTP Support**: Yes, supports remote deployment over FTP/SFTP. - **Code Highlight**: Excellent syntax highlighting for PHP and other la...
10,079
[ { "from": "human", "value": "I'm a PHP developer and now I use Notepad++ for code editing, but lately I've been searching for an IDE to ease my work.\nI've looked into Eclipse, Aptana Studio and several others, but I'm not really decided, they all look nice enough but a bit complicated. I'm sure it'll all g...
An obvious answer is "an internal wiki". What are the pros and cons of a wiki used for software documentation? Any other suggestions? What are you using for your software documentation? Loren Segal - Unfortunately we don't have support for any doc tool to compile information from the source code comments but I agree it...
Using a wiki for software documentation can be a great choice, but like any tool, it has its pros and cons. Here's a breakdown: ### Pros of Using a Wiki for Software Documentation 1. **Collaboration**: Wikis are inherently collaborative. Multiple users can contribute, edit, and update documents, which is ideal for te...
14,869
[ { "from": "human", "value": "An obvious answer is \"an internal wiki\". What are the pros and cons of a wiki used for software documentation? Any other suggestions? What are you using for your software documentation?\nLoren Segal - Unfortunately we don't have support for any doc tool to compile information ...
I'm new to CodeIgniter, and I need some help. I'd like to implement the following: View a user's profile via: http://localhost/profile/johndoe Administrate a user's profile via: http://localhost/admin/profile/johndoe Be able to accomplish even further processing via: http://localhost/admin/profile/create ...and... h...
Welcome to CodeIgniter! To implement the desired routes for viewing and administrating user profiles in your application, you will need to set up a controller structure that can handle these URIs appropriately. Below, I will guide you through creating a `Profile` controller for both regular and admin functionality. ##...
13,470
[ { "from": "human", "value": "I'm new to CodeIgniter, and I need some help. I'd like to implement the following:\n\nView a user's profile via:\nhttp://localhost/profile/johndoe\n\nAdministrate a user's profile via:\nhttp://localhost/admin/profile/johndoe\n\nBe able to accomplish even further processing via:\...
I'm trying to convert some code that worked great in VB, but I can't figure out what objects to use in .Net. Dim oXMLHttp As XMLHTTP oXMLHttp = New XMLHTTP oXMLHttp.open "POST", "https://www.server.com/path", False oXMLHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" oXMLH...
In .NET, you can achieve this functionality using the `HttpClient` class, which is part of the `System.Net.Http` namespace. Below is a conversion of your VB code to .NET, using `HttpClient` to send an XML file to a server via a POST request and then storing the server's response. Here's how you can do it: 1. First, m...
17,084
[ { "from": "human", "value": "I'm trying to convert some code that worked great in VB, but I can't figure out what objects to use in .Net. \n Dim oXMLHttp As XMLHTTP\n oXMLHttp = New XMLHTTP\n oXMLHttp.open \"POST\", \"https://www.server.com/path\", False\n oXMLHttp.setRequestHeader \"Content-Ty...
Often WinDbg will enter a state where it is *Busy* performing an operation. Often this is due to some mistake I made trying to dt some_variable_itll_never_find or setting a break point somewhere without symbols or the 1000's of other mistakes I make fumbling around this tool. Is there a way to cancel the current oper...
Yes, in WinDbg, if you find that the debugger is busy and you want to cancel the current operation, you can use the following approaches: 1. **Break Command**: You can usually interrupt the current operation by pressing **Ctrl + Break** or **Ctrl + C**. This will send an interrupt signal to WinDbg, which should allow ...
21,195
[ { "from": "human", "value": "Often WinDbg will enter a state where it is *Busy* performing an operation. \nOften this is due to some mistake I made trying to dt some_variable_itll_never_find or setting a break point somewhere without symbols or the 1000's of other mistakes I make fumbling around this tool....
Short version: I'm wondering if it's possible, and how best, to utilise CPU specific instructions within a DLL? Slightly longer version: When downloading (32bit) DLLs from, say, Microsoft it seems that one size fits all processors. Does this mean that they are strictly built for the lowest common denominator (ie. the m...
Yes, it is indeed possible to utilize CPU-specific instructions within a DLL, and there are techniques that allow you to export a single interface while leveraging optimized code for different processors. Here’s a brief overview of how this can be achieved: ### 1. **Conditional Compilation**: You can use preprocessor ...
16,064
[ { "from": "human", "value": "Short version: I'm wondering if it's possible, and how best, to utilise CPU specific\ninstructions within a DLL?\nSlightly longer version:\nWhen downloading (32bit) DLLs from, say, Microsoft it seems that one size fits all processors.\nDoes this mean that they are strictly built...
In the Python documentation it says: A thread can be flagged as a "daemon thread". The significance of this flag is that the entire Python program exits when only daemon threads are left. The initial value is inherited from the creating thread. Does anyone have a clearer explanation of what that means or a practi...
Absolutely! Let's break down the concept of daemon threads in Python and clarify its use with an example. ### What is a Daemon Thread? In Python, a **daemon thread** is a thread that runs in the background and is not considered essential to the program's execution. When the main program exits, any daemon threads will...
17,174
[ { "from": "human", "value": "In the Python documentation\nit says:\n\nA thread can be flagged as a \"daemon thread\". The significance of this\n flag is that the entire Python program exits when only daemon threads\n are left. The initial value is inherited from the creating thread.\n\nDoes anyone have a ...
Given a typical class: struct Whatever { void Doit(); }; Whatever w; what is the best way to get the member function to be called by a C void* based callback such as pthread_create() or a signal handler ? pthread_t pid; pthread_create(&pid, 0, ... &w.Doit() ... );
To use a member function of a class as a callback with a `pthread_create` or a signal handler, you'll need to account for the fact that member functions have an implicit `this` pointer, which means they require an instance of the class to operate. One common approach is to use a static member function or a free functio...
18,032
[ { "from": "human", "value": "Given a typical class:\n\nstruct Whatever\n{\n void Doit();\n};\n\nWhatever w;\n\nwhat is the best way to get the member function to be called by a C void* based callback such as pthread_create() or a signal handler ?\n\npthread_t pid;\n\npthread_create(&pid, 0, ... &w.Doit()...
I am a bit confused in what the application controller should do? Because I see the functionality will also exists in your MVP pattern to make the decisions which form should be shown when a button is clicked? Are there any good examples for Windows Forms that uses the application controller pattern? There is a differ...
You are correct in observing that the Application Controller and the MVC Controller have different roles, and it's important to understand their distinct responsibilities, especially in the context of a Windows Forms application. ### Responsibilities of the Application Controller The Application Controller pattern is...
16,510
[ { "from": "human", "value": "I am a bit confused in what the application controller should do? Because I see the functionality will also exists in your MVP pattern to make the decisions which form should be shown when a button is clicked? Are there any good examples for Windows Forms that uses the applicat...
I am trying to build an OLAP datasource from a bunch of binary files, and our current model just isn't working. We are using SSAS as our analysis / reporting model for our results, but aren't able to get the performance we want out of SQL. Our main constraints are: The database is very large. We have huge dimensio...
Creating a custom OLAP data source for SSAS that can efficiently handle large volumes of binary data while overcoming the limitations you mentioned involves several considerations and strategies. Here’s a structured approach that you might find helpful: ### 1. Custom Data Processing Layer Since your data is in binary ...
14,655
[ { "from": "human", "value": "I am trying to build an OLAP datasource from a bunch of binary files, and our current model just isn't working. We are using SSAS as our analysis / reporting model for our results, but aren't able to get the performance we want out of SQL. \nOur main constraints are:\n\nThe da...
I have a c# object with a property called Gender which is declared as a char. private char _Gender; public char Gender { get{ return _Gender; } set{ _Gender = value; } } What string is returned/created when I call MyObject.Gender.ToString()? I ask because I am calling a webservice (which accepts a string rath...
In C#, when you call `ToString()` on a `char` type, it will return the string representation of that character. So if your `_Gender` field is set to a specific character (e.g., 'M' for male or 'F' for female), calling `MyObject.Gender.ToString()` will return that character as a string. However, if `_Gender` has not be...
16,404
[ { "from": "human", "value": "I have a c# object with a property called Gender which is declared as a char.\nprivate char _Gender;\npublic char Gender\n{\n get{ return _Gender; }\n set{ _Gender = value; }\n\n}\n\nWhat string is returned/created when I call MyObject.Gender.ToString()?\nI ask because I a...
Looking for a way to drive a Compact Framework app running on a CE device. All we basically need is to be able to write little scripts that press buttons and click on things. Anyone know of such a tool or it best to just hack one up ourselves?
To automate a Compact Framework application running on a Windows CE device, you have a few potential options, but most of them involve some degree of custom development. Here are some strategies you might consider: 1. **Custom Scripting Solution**: Writing your own automation tool could be a practical approach. You wo...
16,135
[ { "from": "human", "value": "Looking for a way to drive a Compact Framework app running on a CE device.\nAll we basically need is to be able to write little scripts that press buttons and click on things. Anyone know of such a tool or it best to just hack one up ourselves?\n" }, { "from": "gpt", ...
I have a ArrayList made up of different elements imported from a db, made up of strings, numbers, doubles and ints. Is there a way to use a reflection type technique to find out what each type of data each element holds? FYI: The reason that there is so many types of data is that this is a piece of java code being wr...
Yes, you can use Java's reflection capabilities to determine the types of the elements in an `ArrayList`. The reflection API allows you to inspect the runtime properties of classes, including their fields, methods, and also the types of objects. Here's how you can use reflection to determine the type of each element i...
18,535
[ { "from": "human", "value": "I have a ArrayList made up of different elements imported from a db, made up of strings, numbers, doubles and ints. Is there a way to use a reflection type technique to find out what each type of data each element holds? \nFYI: The reason that there is so many types of data is ...
Is there a way to deactivate the optimization for collocated objects that Weblogic uses by default for a specific EJB ? EDIT: Some context : We have a scheduler service that runs inside one node of the cluster. This is for historic reasons and cannot be changed at the moment. This service makes call to an EJB and we wo...
In Oracle WebLogic Server, the default behavior for EJBs is to optimize calls to collocated objects, which means that when a client on a particular WebLogic Server instance calls an EJB that is deployed on the same instance, WebLogic uses a direct local call for performance reasons. This can lead to the situation you d...
17,262
[ { "from": "human", "value": "Is there a way to deactivate the optimization for collocated objects that Weblogic uses by default for a specific EJB ?\nEDIT: Some context :\nWe have a scheduler service that runs inside one node of the cluster. This is for historic reasons and cannot be changed at the moment.\...
I find that most of microsoft's new programs are very hard to use. Microsoft Office 2007 (word especially) I find to be hard to use. Microsoft IIS 7.0 is a PAIN, I never remember which icon to click on, things are just to cluttered and hard to find. As a programmer, we have to design according to what people are used t...
Your frustrations with Microsoft Office 2007 and IIS 7.0 are shared by many users, especially when significant changes are made to software interfaces. Here are some insights into what Microsoft might be aiming for with its designs and how it can impact user experience: 1. **Ribbon Interface**: With Office 2007, Micro...
20,128
[ { "from": "human", "value": "I find that most of microsoft's new programs are very hard to use.\nMicrosoft Office 2007 (word especially) I find to be hard to use.\nMicrosoft IIS 7.0 is a PAIN, I never remember which icon to click on, things are just to cluttered and hard to find.\nAs a programmer, we have t...
I'm trying to do a custom button to my form (which has FormBorderStyle = none) using Visual Studio 2005. I have my 3 states button images in an ImageList linked to the button. this.btnClose.AutoSize = false; this.btnClose.BackColor = System.Drawing.Color.Transparent; this.btnClose.BackgroundImageLayout = System.Windows...
The gray background you are seeing when you hover over your custom button is likely caused by the default behavior of the button control when it is focused or hovered over. Since you have set the `FlatStyle` to `Flat`, you can suppress this background by overriding the button's `OnPaint` event to completely manage the ...
18,819
[ { "from": "human", "value": "I'm trying to do a custom button to my form (which has FormBorderStyle = none) using Visual Studio 2005. I have my 3 states button images in an ImageList linked to the button.\nthis.btnClose.AutoSize = false;\nthis.btnClose.BackColor = System.Drawing.Color.Transparent;\nthis.btn...
I'm trying to implement the following mod_rewrite rule: host.com/developer/ => host.com/developer/index.py host.com/developer/branchX => host.com/developer/index.py?branch=branchX host.com/developer/branchX/commitY => host.com/developer/index.py?branch=branchX&commit=commitY Currently, the appropriate config secti...
The issue you're encountering with your `mod_rewrite` rules is due to the fact that they are being applied multiple times during the internal redirect process. Once the request has been rewritten to `index.py`, it matches the first rule again, which causes another rewrite, resulting in an infinite loop. To prevent thi...
18,680
[ { "from": "human", "value": "I'm trying to implement the following mod_rewrite rule:\nhost.com/developer/ => host.com/developer/index.py \nhost.com/developer/branchX => host.com/developer/index.py?branch=branchX \nhost.com/developer/branchX/commitY => host.com/developer/index.py?branch=branchX&commit=comm...
What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations. I also would like only significant digits to be displayed -...
To achieve the desired rounding behavior (half-up rounding) and eliminate trailing zeros in Java, you can create a custom method that utilizes `BigDecimal`. The `BigDecimal` class allows for precise control over rounding modes and formatting. Here's how you can do it: 1. Use `BigDecimal` to perform the rounding with t...
18,234
[ { "from": "human", "value": "What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations.\nI also would like...
Recently, Lee Baldwin showed how to write a generic, variable argument memoize function. I thought it would be better to return a simpler function where only one parameter is required. Here is my total bogus attempt: local function memoize(f) local cache = {} if select('#', ...) == 1 then return function...
In Lua, there isn't a built-in way to determine the number of expected arguments for a function. The number of arguments a function can take is not explicitly defined within the function itself, as Lua functions are variadic by nature (they can accept any number of arguments). However, if you're looking for a way to ...
18,938
[ { "from": "human", "value": "Recently, Lee Baldwin showed how to write a generic, variable argument memoize function. I thought it would be better to return a simpler function where only one parameter is required. Here is my total bogus attempt:\nlocal function memoize(f)\n local cache = {}\n\n if sel...
I know I can compile individual source files, but sometimes -- say, when editing a header file used by many .cpp files -- multiple source files need to be recompiled. That's what Build is for. Default behavior of the "Build" command in VC9 (Visual C++ 2008) is to attempt to compile all files that need it. Sometimes t...
In Visual C++ 2008 (VC9), there isn't a direct option in the IDE to stop the build process at the first compile error automatically. The default behavior is indeed to continue compiling all projects, which can lead to numerous error messages if there are many files that fail due to a previous error. However, you can u...
19,959
[ { "from": "human", "value": "I know I can compile individual source files, but sometimes -- say, when editing a header file used by many .cpp files -- multiple source files need to be recompiled. That's what Build is for.\nDefault behavior of the \"Build\" command in VC9 (Visual C++ 2008) is to attempt to ...
Since I have started using this site, I keep hearing about the Boost library. I am wondering what are some of the major benefits of the Boost library (hence why should I use it) and how portable is the Boost library?
The Boost library is a collection of high-quality, peer-reviewed C++ libraries that extend the functionality of C++ and provide support for various tasks. Here are some of the major benefits of using the Boost library: ### Benefits of the Boost Library 1. **Rich Functionality**: Boost provides a wide range of librari...
17,510
[ { "from": "human", "value": "Since I have started using this site, I keep hearing about the Boost library. I am wondering what are some of the major benefits of the Boost library (hence why should I use it) and how portable is the Boost library?\n" }, { "from": "gpt", "value": "The Boost librar...
I am searching for an open source Java library to generate thumbnails for a given URL. I need to bundle this capability, rather than call out to external services, such as Amazon or websnapr. http://www.webrenderer.com/ was mentioned in this post: Server generated web screenshots, but it is a commercial solution. I'm ...
If you're looking for an open-source Java library to generate thumbnails from a given URL, here are some options you can consider: 1. **JBrowser**: - [JBrowser](https://github.com/jbrowser/jbrowser) is a Java wrapper around the Chromium engine that allows you to render HTML content and take screenshots. While it us...
17,175
[ { "from": "human", "value": "I am searching for an open source Java library to generate thumbnails for a given URL. I need to bundle this capability, rather than call out to external services, such as Amazon or websnapr.\nhttp://www.webrenderer.com/ was mentioned in this post: Server generated web screensh...
This has been driving me crazy. We have IIS (6) and windows 2008 and ActiveState Perl 5.10. For some reason whenever we do a warn or a carp it eventually corrupts the app pool. Of course, that's a pretty big deal since it means that our errors actually cause problems. This happened with the previous version of Perl ...
It sounds like you're encountering an issue with how Perl's `warn` and `carp` functions interact with IIS and the way they handle error output. This can sometimes lead to unexpected behavior, especially in a Windows environment. Here are a few suggestions that might help you troubleshoot and potentially resolve this is...
17,354
[ { "from": "human", "value": "This has been driving me crazy. We have IIS (6) and windows 2008 and ActiveState Perl 5.10. For some reason whenever we do a warn or a carp it eventually corrupts the app pool. Of course, that's a pretty big deal since it means that our errors actually cause problems.\nThis h...
Where do you store user-specific and machine-specific runtime configuration data for J2SE application? (For example, C:\Users\USERNAME\AppData\Roaming</em> on Windows and /home/username on Unix) How do you get these locations in the filesystem in platform-independent way?
In a Java application, you can store user-specific and machine-specific runtime configuration data in a platform-independent manner by leveraging the system properties provided by the Java Virtual Machine (JVM). The recommended way to find the appropriate directories for storing such configuration data is by using the ...
18,187
[ { "from": "human", "value": "Where do you store user-specific and machine-specific runtime configuration data for J2SE application?\n(For example, C:\\Users\\USERNAME\\AppData\\Roaming</em> on Windows and /home/username on Unix)\nHow do you get these locations in the filesystem in platform-independent way?\...
Im calling a locally hosted wcf service from silverlight and I get the exception below. Iv created a clientaccesspolicy.xml, which is situated in the route of my host. <?xml version="1.0" encoding="utf-8"?> <access-policy> <cross-domain-access> <policy> <allow-from http-request-headers="*"> <domain ...
The error you are encountering typically indicates a cross-domain issue when trying to access a WCF service from a Silverlight application. Here are some steps and checks you can take to troubleshoot and resolve the problem: ### 1. ClientAccessPolicy.xml Location Ensure that your `clientaccesspolicy.xml` file is locat...
15,720
[ { "from": "human", "value": "Im calling a locally hosted wcf service from silverlight and I get the exception below.\nIv created a clientaccesspolicy.xml, which is situated in the route of my host.\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<access-policy>\n <cross-domain-access>\n <policy>\n <al...
I found the Alert Service but it only seems to have methods for Getting and Deleting. How do I add a new alert?
To add a new alert in a system that provides an Alert Service with only methods for Getting and Deleting, you might need to look for other methods or endpoints within the API or service that are designated for creating or updating alerts. Here are some general steps to help you find the appropriate method: 1. **Check ...
20,529
[ { "from": "human", "value": "I found the Alert Service but it only seems to have methods for Getting and Deleting. How do I add a new alert?\n" }, { "from": "gpt", "value": "To add a new alert in a system that provides an Alert Service with only methods for Getting and Deleting, you might need ...
Sorry if this sounds like a really stupid question, but I need to make a link change colour when you are on the page it links to. For example, when you are on the "Questions" page of StackOverflow, the link at the top changes colour. How do you do this?
It's not a stupid question at all! What you're asking about is a common technique in web development called "active link highlighting" or "current page indication." There are various ways to implement this, and the method you choose may depend on your setup (whether you're using a static website, a web framework, etc.)...
17,979
[ { "from": "human", "value": "Sorry if this sounds like a really stupid question, but I need to make a link change colour when you are on the page it links to.\nFor example, when you are on the \"Questions\" page of StackOverflow, the link at the top changes colour. How do you do this?\n" }, { "from"...
I have a JComboBox and would like to have a separator in the list of elements. How do I do this in Java? A sample scenario where this would come in handy is when making a combobox for font-family-selection; similar to the font-family-selection-control in Word and Excel. In this case I would like to show the most-used-f...
In Java Swing, you can achieve the desired effect of having a separator in a `JComboBox` by using a custom renderer. A custom renderer will allow you to display different components and styles in the dropdown list of the `JComboBox`. Here's how you can create a `JComboBox` with a separator between "most-used fonts" and...
13,372
[ { "from": "human", "value": "I have a JComboBox and would like to have a separator in the list of elements. How do I do this in Java?\nA sample scenario where this would come in handy is when making a combobox for font-family-selection; similar to the font-family-selection-control in Word and Excel. In this...
In Scala, is it possible to get the string representation of a type at runtime? I am trying to do something along these lines: def printTheNameOfThisType[T]() = { println(T.toString) }
In Scala, you cannot directly get the string representation of a type parameter `T` at runtime, because type parameters are erased at runtime due to type erasure. However, you can achieve something similar by passing the type information explicitly, for example, by using a `ClassTag` or a `TypeTag`. Here is how you ca...
17,502
[ { "from": "human", "value": "In Scala, is it possible to get the string representation of a type at runtime? I am trying to do something along these lines:\ndef printTheNameOfThisType[T]() = {\n println(T.toString)\n}\n\n" }, { "from": "gpt", "value": "In Scala, you cannot directly get the str...
In Delphi 2009 I'm finding that any time I use TThread.CurrentThread in an application, I'll get an error message like the following when the application closes: Exception EAccessViolation in module ntdll.dll at 0003DBBA. Access violation at address 7799DBBA in module 'ntdll.dll'. Write of address 00000014. Unless it...
The issue you're experiencing with `TThread.CurrentThread` in Delphi 2009 is known and has been identified as a bug in that version of Delphi. Specifically, it relates to how Delphi 2009 handles thread termination and references to the current thread when the application is closing. When you call `TThread.CurrentThread...
16,782
[ { "from": "human", "value": "In Delphi 2009 I'm finding that any time I use TThread.CurrentThread in an application, I'll get an error message like the following when the application closes:\nException EAccessViolation in module ntdll.dll at 0003DBBA.\nAccess violation at address 7799DBBA in module 'ntdll.d...
What is the MIME type of javascript? More specifically, what is the right thing to put in the "type" attribute of a script tag? application/x-javascript and text/javascript seem to be the main contenders.
The correct MIME type for JavaScript is `application/javascript`. Historically, `text/javascript` was commonly used, and `application/x-javascript` was also recognized in the past. However, the modern and standardized MIME type is `application/javascript`. As a result, in HTML5, it is generally acceptable to omit t...
17,009
[ { "from": "human", "value": "What is the MIME type of javascript? \nMore specifically, what is the right thing to put in the \"type\" attribute of a script tag? application/x-javascript and text/javascript seem to be the main contenders.\n" }, { "from": "gpt", "value": "The correct MIME type for...
In the Google C++ Style Guide, there's a section on Operator Overloading that has a curious statement: Overloading also has surprising ramifications. For instance, you can't forward declare classes that overload operator&. This seems incorrect, and I haven't been able to find any code that causes GCC to have a ...
The statement from the Google C++ Style Guide regarding the overloading of the `operator&` and its impact on forward declarations is a bit nuanced. The core of the issue revolves around how operator overloading interacts with certain types of references and declarations in C++. When you overload the `operator&`, it ch...
20,439
[ { "from": "human", "value": "In the Google C++ Style Guide, there's a section on Operator Overloading that has a curious statement:\n\nOverloading also has surprising\n ramifications. For instance, you can't\n forward declare classes that overload\n operator&.\n\nThis seems incorrect, and I haven't been ...
Can someone give me some working examples of how you can create, add messages, read from, and destroy a private message queue from C++ APIs? I tried the MSDN pieces of code but i can't make them work properly. Thanks
Certainly! Below is a simple example of how to create, add messages, read from, and destroy a private message queue using the Windows API in C++. This example demonstrates the core functionality of creating a message queue, sending messages to it, receiving messages, and cleaning up afterwards. ### Requirements: - Win...
12,520
[ { "from": "human", "value": "Can someone give me some working examples of how you can create, add messages, read from, and destroy a private message queue from C++ APIs? I tried the MSDN pieces of code but i can't make them work properly.\nThanks\n" }, { "from": "gpt", "value": "Certainly! Below...
Does anyone have any examples or resources where i might find information on scrolling text which is too long to display in a button control? I'm thinking something along these lines. Display as much text will fit within the current rect with a '...' at the end to signify overflow. Pause for say 1 second then slowly ...
Creating a scrolling text effect that shows only part of a longer string in a button is a great idea for displaying trivia answers, and it can indeed be accomplished using the built-in animation frameworks on mobile devices. Below are some suggestions and resources on how to implement this, depending on the platform yo...
12,981
[ { "from": "human", "value": "Does anyone have any examples or resources where i might find information on scrolling text which is too long to display in a button control? I'm thinking something along these lines.\n\nDisplay as much text will fit within the current rect with a '...' at the end to signify ov...
I have been unable to receive UDP multicast under VxWorks 5.5. I've joined the multicast group: setsockopt(soc, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char *) &ipMreq, sizeof (ipMreq)); Similar code on an adjacent Windows machine does receive multicast. I am able to send multicast from VxWorks; ifShow() indicates the interfa...
It looks like you've already identified the key issue affecting your ability to receive UDP multicast on VxWorks 5.5 by needing to set a specific bit in the RealTek Ethernet driver's RX configuration register. However, for the benefit of those facing similar issues, let's go through a checklist and provide more context...
16,422
[ { "from": "human", "value": "I have been unable to receive UDP multicast under VxWorks 5.5. I've joined the multicast group:\nsetsockopt(soc, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char *) &ipMreq, sizeof (ipMreq));\n\nSimilar code on an adjacent Windows machine does receive multicast.\nI am able to send multicast...
A problem I ran into a while back I never found a good solution for... Say you have a working copy checked out from subversion at revision 7500, and the disk holding the current repository dies. You've got a backup of the repository at, say, revision 7450. It's easy to restore the repository backup, but any attempt to ...
When you have a working copy at a revision that is higher than your repository backup, you can get the working copy back in sync with the repository, but you’ll have to take a few steps to ensure you don’t lose any local changes. Here's a method to do it without having to check out a new working copy: 1. **Restore the...
18,189
[ { "from": "human", "value": "A problem I ran into a while back I never found a good solution for...\nSay you have a working copy checked out from subversion at revision 7500, and the disk holding the current repository dies. You've got a backup of the repository at, say, revision 7450. It's easy to restore ...
I am looking for a method to place some text onto the clipboard with VBScript. The VBScript in question will be deployed as part of our login script. I would like to avoid using anything that isn't available on a clean Windows XP system. Edit: In answer to the questions about what this is for. We wanted to encourage ...
To place text onto the clipboard using VBScript, you can utilize the `MSForms.DataObject` class, which is part of the Microsoft Forms 2.0 Object Library. However, note that this library may not be available by default on a clean Windows XP system without Microsoft Office installed. If you would like to proceed with t...
17,632
[ { "from": "human", "value": "I am looking for a method to place some text onto the clipboard with VBScript. The VBScript in question will be deployed as part of our login script. I would like to avoid using anything that isn't available on a clean Windows XP system.\nEdit:\nIn answer to the questions abou...
On my homepage I got: <ul id="login"> <li> <a id="loginswitch" href="./login-page">log-in</a> | </li> <li> <a id="signupswitch" href="./signup-page">sign-up</a> </li> </ul> Via MooTools, I get these anchor elements by id so that once they're clicked, a flashy div will popup below them that contains the login or si...
When you change the anchors' `href` attributes to `href="#"`, it changes the default behavior of the anchor elements when they are clicked. ### Default Behavior of Anchors 1. **Default Action**: When you click an anchor (`<a>`) element with a `href` attribute pointing to `#`, the browser tries to navigate to the top...
18,635
[ { "from": "human", "value": "On my homepage I got:\n<ul id=\"login\">\n <li> <a id=\"loginswitch\" href=\"./login-page\">log-in</a> | </li>\n <li> <a id=\"signupswitch\" href=\"./signup-page\">sign-up</a> </li>\n</ul>\n\nVia MooTools, I get these anchor elements by id so that once they're clicked, a flash...
I'd like to be able to do some drawing to the right of the menu bar, in the nonclient area of a window. Is this possible, using C++ / MFC?
Yes, it is possible to perform drawing in the non-client area of a window using C++ and the Microsoft Foundation Classes (MFC). The non-client area of a window includes areas such as the title bar, menu bar, borders, and scroll bars. To accomplish this, you will typically handle the `WM_NCPAINT` message, which is sent ...
15,710
[ { "from": "human", "value": "I'd like to be able to do some drawing to the right of the menu bar, in the nonclient area of a window. \nIs this possible, using C++ / MFC?\n" }, { "from": "gpt", "value": "Yes, it is possible to perform drawing in the non-client area of a window using C++ and the ...
I am re-designing an application for a ASP.NET CMS that I really don't like. I have made som improvements in performance only to discover that not only does this CMS use MS SQL but some users "simply" use MS Access database. The problem is that I have some tables which I inner join, that with the MS Access version are ...
Joining tables across multiple Access database files (MDBs) is not directly supported in the same way as it is in MS SQL Server. However, there are a few approaches you could take to achieve a similar result without fetching all data and performing the join programmatically. ### 1. **Linked Tables**: You can create li...
19,159
[ { "from": "human", "value": "I am re-designing an application for a ASP.NET CMS that I really don't like. I have made som improvements in performance only to discover that not only does this CMS use MS SQL but some users \"simply\" use MS Access database.\nThe problem is that I have some tables which I inne...
This is something that I always find a bit hard to explain to others: Why do XML namespaces exist? When should we use them and when should we not? What are the common pitfalls when working with namespaces in XML? Also, how do they relate to XML schemas? Should XSD schemas always be associated with a namespace?
XML namespaces are an important feature of XML that help to avoid naming conflicts, particularly when combining documents from different sources. Here's a deeper dive into your questions about XML namespaces: ### Why do XML namespaces exist? 1. **Avoiding Name Conflicts**: XML allows for a hierarchical data structure...
17,370
[ { "from": "human", "value": "This is something that I always find a bit hard to explain to others: \nWhy do XML namespaces exist? \nWhen should we use them and when should we not?\nWhat are the common pitfalls when working with namespaces in XML? \nAlso, how do they relate to XML schemas? Should XSD schemas...
I'm using Visual Studio 6.0 and Visual Basic 6.0. I have them integrated but when I check out a Project and then try to edit a module in that project it's locked and I have to manually right-click on it and do a Check Out to unlock it. I thought there was a way to have VSS automatically check out the file for editing. ...
In Visual Studio 6.0 and Visual Basic 6.0, you can enable automatic checkout of files from Visual SourceSafe (VSS) while editing, which can save you the hassle of manually checking out files each time you want to make changes. Here are the steps to enable this feature: 1. **Open Visual SourceSafe**: Make sure you h...
19,029
[ { "from": "human", "value": "I'm using Visual Studio 6.0 and Visual Basic 6.0.\nI have them integrated but when I check out a Project and then try to edit a module in that project it's locked and I have to manually right-click on it and do a Check Out to unlock it.\nI thought there was a way to have VSS aut...
I have an old project that was built using visual studio 2003 and I recompiled it with vs2005 recently. However, during runtime, I get the following error: list iterator not incrementable I traced the program to this function: void InputQueue::update() { list<PCB>::iterator iter; list<PCB>::iterator iterTemp; ...
The error message "list iterator not incrementable" typically occurs when you try to increment an iterator that is invalid or has reached the end of the list. In your code, there are a couple of points where this could happen: 1. **Iterator Modification**: You are modifying the list (via the `erase` function) while ...
19,073
[ { "from": "human", "value": "I have an old project that was built using visual studio 2003 and I recompiled it with vs2005 recently. However, during runtime, I get the following error:\nlist iterator not incrementable\nI traced the program to this function:\nvoid InputQueue::update()\n{\n list<PCB>::ite...
I'm looking to implement an ESB and wanted to get thoughts related to "how" my web services might change (WCF) or -- how my client apps that consume these services might "need to be revised" (-- other than a new service ref to the ESB path --) The device I'm working with specifically is the "WebSphere DataPower XML Sec...
Implementing an Enterprise Service Bus (ESB) introduces a variety of changes and considerations for your existing web services, particularly when using Windows Communication Foundation (WCF), and for the client applications that consume those services. Here are several key points to consider: ### Changes to WCF Servic...
12,918
[ { "from": "human", "value": "I'm looking to implement an ESB and wanted to get thoughts related to \"how\" my web services might change (WCF) or -- how my client apps that consume these services might \"need to be revised\" (-- other than a new service ref to the ESB path --)\nThe device I'm working with sp...
Is there a way to describe the module's data in a similar way that a docstring describes a module or a funcion? class MyClass(object): def my_function(): """This docstring works!""" return True my_list = [] """This docstring does not work!"""
In Python, you can describe the module's data or attributes using class-level docstrings (also known as class attributes documentation), but they don't work in the same way as function docstrings. However, you can use comments or define an attribute specifically for documentation purposes. Here’s how you can do it: 1....
19,939
[ { "from": "human", "value": "Is there a way to describe the module's data in a similar way that a docstring describes a module or a funcion?\nclass MyClass(object):\n def my_function():\n \"\"\"This docstring works!\"\"\"\n return True\n my_list = []\n \"\"\"This docstring does not wo...
Many websites have the concept of sending messages from user to user. When you send a message to another user, the message would show up in their inbox. You could respond to the message, and it would show up as a new entry in that message thread. You should be able to see if you've read a given message already, and...
Designing a messaging system that supports user-to-user messaging requires careful consideration of how to model the data, relationships, and functionalities. Below, I've outlined a basic design using classes (or entities) that could be represented in an object-oriented programming language, along with the relationship...
15,419
[ { "from": "human", "value": "Many websites have the concept of sending messages from user to user. When you send a message to another user, the message would show up in their inbox. You could respond to the message, and it would show up as a new entry in that message thread. \nYou should be able to see i...
My problem is that I want to have a server application (on a remote computer) to publish certain events to several client computers. The server and client communicate using .Net-Remoting so currently I am using remoted .Net-Events to get the functionality. But there is one drawback: when the server (the event publisher...
To implement loosely coupled events across a network using transient COM subscriptions, there are several considerations and configurations you'll need to make to ensure that the subscriptions work properly when the server and clients are communicating over different machines. 1. **Ensure Network Accessibility**: Firs...
12,545
[ { "from": "human", "value": "My problem is that I want to have a server application (on a remote computer) to publish certain events to several client computers. The server and client communicate using .Net-Remoting so currently I am using remoted .Net-Events to get the functionality. But there is one drawb...
Is it possible to create LIGHTWEIGHT transactions using TransactionScope() with SQL2000? Or if not, is there a workaround using CommitableTransaction and/or something similar? So the answer is, basically, "If you want local-to-1-server-transactions on SQL2000, don't use TransactionScope()".
You're correct in your assessment that `TransactionScope` is not suitable for lightweight transactions with SQL Server 2000 (SQL2000). `TransactionScope` is designed to support distributed transactions, which can add significant overhead and complexity, especially with older database systems like SQL Server 2000 that d...
18,149
[ { "from": "human", "value": "Is it possible to create LIGHTWEIGHT transactions using TransactionScope() with SQL2000? Or if not, is there a workaround using CommitableTransaction and/or something similar?\nSo the answer is, basically, \"If you want local-to-1-server-transactions on SQL2000, don't use Transa...
I am using VSTO with Excel 2007 to generate PivotTables and PivotCharts dynamically. I am having a problem when I need to have a PivotField in more than one column. To accomplish this I create a PivotTable in Excel and serialize its properties into an XML document, which I then use to rebuild the PivotTable. Ie: as a ...
Creating a PivotTable in Excel using VSTO (Visual Studio Tools for Office) and C# can indeed allow you to set up PivotFields in various ways. However, managing the same field in multiple roles (for example, having a field both as a column and as a value) requires a bit of manipulation in your code. Here's a step-by-s...
13,159
[ { "from": "human", "value": "I am using VSTO with Excel 2007 to generate PivotTables and PivotCharts dynamically.\nI am having a problem when I need to have a PivotField in more than one column. \nTo accomplish this I create a PivotTable in Excel and serialize its properties into an XML document, which I th...
Take any social website like Digg or Stack Overflow that somehow lets users reward points for stories, questions, etc.. What happens is quite similar to the process that lead to the rise of tabloid newspapers that feed only headlines and no content to its readers. Users are usually smart enough to figure out strategies...
Addressing the issues you mentioned about social websites like Stack Overflow requires a multifaceted approach that encompasses ranking algorithms, expert systems, social interaction controls, and information management. Here are some potential solutions to discourage low-value entries and promote more meaningful contr...
14,584
[ { "from": "human", "value": "Take any social website like Digg or Stack Overflow that somehow lets users reward points for stories, questions, etc..\nWhat happens is quite similar to the process that lead to the rise of tabloid newspapers that feed only headlines and no content to its readers.\nUsers are us...
I'm using the jQuery Form plugin to upload an image. I've assigned a fade animation to happen the beforeSubmit callback, but as I'm running locally, it doesn't have time to finish before the success function is called. I am using a callback function in my fade(); call to make sure that one fade completes, before the n...
The behavior you're experiencing is due to the asynchronous nature of AJAX calls and the way the jQuery Form plugin handles the `beforeSubmit` and `success` callbacks. The `beforeSubmit` function is indeed called before the AJAX request is made, but the AJAX request itself is non-blocking, which means that any animatio...
17,843
[ { "from": "human", "value": "I'm using the jQuery Form plugin to upload an image. I've assigned a fade animation to happen the beforeSubmit callback, but as I'm running locally, it doesn't have time to finish before the success function is called. \nI am using a callback function in my fade(); call to make ...
If any of you have worked with a cool tool for viewing/querying the SQL Transaction logs, please let me know. This should show all the transactional sql statements which are committed or rolled back. For Database files, if it has some additional graphical capabilities like showing the internal Binary Tree structure of ...
There are several tools available for viewing and querying SQL transaction logs that can help you analyze committed or rolled-back transactions. While finding a tool that offers both comprehensive transaction log analysis and visualization of database structures like binary trees can be challenging, here are a few opti...
17,933
[ { "from": "human", "value": "If any of you have worked with a cool tool for viewing/querying the SQL Transaction logs, please let me know. This should show all the transactional sql statements which are committed or rolled back.\nFor Database files, if it has some additional graphical capabilities like show...
First off, this question is ripped out from this question. I did it because I think this part is bigger than a sub-part of a longer question. If it offends, please pardon me. Assume that you have a algorithm that generates randomness. Now how do you test it? Or to be more direct - Assume you have an algorithm that shuf...
Testing the randomness of a shuffling algorithm, like the one that shuffles a deck of cards, requires a systematic approach. Since randomness is fundamentally a statistical property, we can use various statistical tests and techniques to evaluate the behavior of the algorithm over a series of shuffles. Here’s a structu...
17,059
[ { "from": "human", "value": "First off, this question is ripped out from this question. I did it because I think this part is bigger than a sub-part of a longer question. If it offends, please pardon me.\nAssume that you have a algorithm that generates randomness. Now how do you test it?\nOr to be more dire...
A large international company deploys a new web and MOTO (Mail Order and Telephone Order) handling system. Among other things you are tasked to design format for both order and customer identification numbers. What would be the best format in your opinion? Please list any assumptions and considerations. Accepted Answe...
When designing formats for order and customer identification numbers for a large international company deploying a new web and MOTO handling system, there are several key assumptions and considerations to keep in mind. Here’s a suggested approach: ### Assumptions: 1. **Global Operations**: The company operates in mul...
17,914
[ { "from": "human", "value": "A large international company deploys a new web and MOTO (Mail Order and Telephone Order) handling system. Among other things you are tasked to design format for both order and customer identification numbers.\nWhat would be the best format in your opinion? Please list any assum...
I've discovered that cElementTree is about 30 times faster than xml.dom.minidom and I'm rewriting my XML encoding/decoding code. However, I need to output XML that contains CDATA sections and there doesn't seem to be a way to do that with ElementTree. Can it be done?
Yes, while the standard `xml.etree.ElementTree` module (which you referred to as `cElementTree`) does not provide built-in support for CDATA sections directly, you can achieve this by manipulating the output. When using `ElementTree`, you can convert the elements to a string and manually replace certain parts with CD...
20,017
[ { "from": "human", "value": "I've discovered that cElementTree is about 30 times faster than xml.dom.minidom and I'm rewriting my XML encoding/decoding code. However, I need to output XML that contains CDATA sections and there doesn't seem to be a way to do that with ElementTree.\nCan it be done?\n" }, ...
Is there a way to reformat code, i.e. force correct indentation in FlashDevelop as you can do with CTRL-SHIFT-F in Eclipse?
Yes, FlashDevelop has a feature that allows you to reformat your code to correct the indentation. You can use the built-in code formatting features to do this. Here's how: 1. **Select the Code**: First, you can select the code that you want to format. If you want to format the entire document, there's no need to selec...
22,744
[ { "from": "human", "value": "Is there a way to reformat code, i.e. force correct indentation in FlashDevelop as you can do with CTRL-SHIFT-F in Eclipse?\n" }, { "from": "gpt", "value": "Yes, FlashDevelop has a feature that allows you to reformat your code to correct the indentation. You can use ...
I have been trying to work my way through Project Euler, and have noticed a handful of problems ask for you to determine a prime number as part of it. I know I can just divide x by 2, 3, 4, 5, ..., square root of X and if I get to the square root, I can (safely) assume that the number is prime. Unfortunately this solu...
Absolutely! Checking if a number is prime can be done more efficiently than checking all the numbers up to its square root. Here’s a straightforward algorithm you can use: ### Simple Prime Checking Algorithm 1. **Handle Small Numbers**: - If \( n \leq 1 \), it's not prime. - If \( n = 2 \) or \( n = 3 \), it's ...
16,883
[ { "from": "human", "value": "I have been trying to work my way through Project Euler, and have noticed a handful of problems ask for you to determine a prime number as part of it.\n\nI know I can just divide x by 2, 3, 4, 5, ..., square root of X and if I get to the square root, I can (safely) assume that t...
I'm trying to build the example described at http://support.microsoft.com/kb/178749/EN-US/ in order to build an application that programatically accesses Excel using Automation. I have Visual C++ 2005/Visual Studio 2005. Some of the instructions don't exactly match up (classwizard, mostly), but the general idea seem...
It appears you are facing multiple issues while trying to automate Excel using Visual C++ 2005 and the instructions from Microsoft Knowledge Base article 178749. Here are steps to help you troubleshoot and resolve the compile errors you're experiencing: ### Step 1: Ensure Proper Environment Setup 1. **Check Office In...
17,484
[ { "from": "human", "value": "I'm trying to build the example described at http://support.microsoft.com/kb/178749/EN-US/ in order to build an application that programatically accesses Excel using Automation. I have Visual C++ 2005/Visual Studio 2005. Some of the instructions don't exactly match up (classw...
If I'm making a simple grid based game, for example, I might have a few 2d lists. One might be for terrain, another might be for objects, etc. Unfortunately, when I need to iterate over the lists and have the contents of a square in one list affect part of another list, I have to do something like this. for i in range(...
Yes, there are definitely nicer and more Pythonic ways to iterate over multiple 2D lists and have the contents of one list affect another. Here are a few suggestions to improve your code: ### 1. Use `zip` for Parallel Iteration You can use the `zip` function to iterate over both lists in parallel. This approach will ...
17,527
[ { "from": "human", "value": "If I'm making a simple grid based game, for example, I might have a few 2d lists. One might be for terrain, another might be for objects, etc. Unfortunately, when I need to iterate over the lists and have the contents of a square in one list affect part of another list, I have t...
What applications/modules/dlls do I need on the Window CE 5.0 device in order to be able to attach Visual Studio 2005 to process running on the device ?
To debug a process running on a Windows CE 5.0 device using Visual Studio 2005, you need to ensure that the following components and configurations are in place: 1. **Platform Builder**: Ensure that you have the Windows CE 5.0 Platform Builder installed, as this includes the necessary debugging components. 2. **Remot...
20,768
[ { "from": "human", "value": "What applications/modules/dlls do I need on the Window CE 5.0 device in order to be able to attach Visual Studio 2005 to process running on the device ?\n" }, { "from": "gpt", "value": "To debug a process running on a Windows CE 5.0 device using Visual Studio 2005, y...
I'm trying to decide on the best way to store event times in a MySQL database. These should be as flexible as possible and be able to represent "single events" (starts at a certain time, does not necessarily need an end time), "all day" and "multi day" events, repeating events, repeating all day events, possibly "3rd S...
When designing a database schema to handle event times that can represent single events, all-day events, multi-day events, and more complex repeating events, it's important to balance flexibility with clarity. Below is a suggested schema that can accommodate your requirements: ### Suggested Database Schema #### 1. `e...
8,298
[ { "from": "human", "value": "I'm trying to decide on the best way to store event times in a MySQL database. These should be as flexible as possible and be able to represent \"single events\" (starts at a certain time, does not necessarily need an end time), \"all day\" and \"multi day\" events, repeating ev...
I'm trying to check if a service exists on a remote machine using the Microsoft.Sdc.Tasks.ServiceProcess.ControlService task. <ControlService MachineName="$(TargetMachineName)" Action="Exists" ServiceName="w3svc"> <Output PropertyName="W3ServiceExists" TaskParameter="ServiceExists" /> </ControlService> When I use...
The error you're encountering indicates that the `ServiceExists` parameter of the `ControlService` task is not marked as an output property. In the case of the `ControlService` task in the Microsoft.Sdc.Tasks library, the task doesn't provide a straightforward way to check if a service exists using the `Action="Exists"...
14,957
[ { "from": "human", "value": "I'm trying to check if a service exists on a remote machine using the Microsoft.Sdc.Tasks.ServiceProcess.ControlService task.\n<ControlService MachineName=\"$(TargetMachineName)\" Action=\"Exists\" ServiceName=\"w3svc\">\n <Output PropertyName=\"W3ServiceExists\" TaskParamet...
I'm new to jQuery so hopefully there is an easy answer to this. I have html similar to: <table id="dataTable"> <tr> <!-- I want this row --> <td>...</td> <tr> <tr> <td> <table> <tr> <!-- I do not want this row --> <td>...</td> </tr>...
If you want to select only the top-level `<tr>` elements in the `#dataTable` and avoid counting any nested rows (like those within a nested `<table>`), you can use the `:not()` selector in jQuery to exclude the nested rows. Here’s an example of how you can do that: ```javascript // Select only the top-level tr elemen...
21,337
[ { "from": "human", "value": "I'm new to jQuery so hopefully there is an easy answer to this.\nI have html similar to:\n<table id=\"dataTable\">\n <tr> <!-- I want this row -->\n <td>...</td>\n <tr>\n <tr>\n <td>\n <table>\n <tr> <!-- I do not want this row -->\...
Ok I give up, I've been trying to write a regexp in ant to replace the version number from something that I have in a properties file. I have the following: <?xml version="1.0" encoding="UTF-8"?> <feature id="some.feature.id" label="Some test feature" version="1.0.0" provide...
To specifically match and replace the `version` attribute in the `<feature>` tag without affecting the version attributes in the `<plugin>` tags, you can use a regular expression that combines lookbehind and lookahead assertions. Here’s how you can construct your regex: ### Regular Expression ```regex (?<=<feature[^>...
15,822
[ { "from": "human", "value": "Ok I give up, I've been trying to write a regexp in ant to replace the version number from something that I have in a properties file. I have the following:\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n <feature\n id=\"some.feature.id\"\n label=\"Some test ...
I have a setup project for my C# program, and this setup project has a Version in its properties. I'd like for the MSI file that is generated to have this Version embedded in it, so I can mouse over it in explorer and see what version the file is. I'm using VS2008. How can I do this?
To embed the version information into the MSI file generated by your setup project in Visual Studio 2008, you'll need to modify the properties of the setup project to include version information. Here’s how you can do it: ### Step 1: Set the Version in the Setup Project 1. **Open Your Setup Project:** - In Visual ...
17,006
[ { "from": "human", "value": "I have a setup project for my C# program, and this setup project has a Version in its properties. I'd like for the MSI file that is generated to have this Version embedded in it, so I can mouse over it in explorer and see what version the file is.\nI'm using VS2008. How can I do...
I have a class which is designed to spin up a background thread, from which calls will be made into a manager. This manager will be mocked for the purposes of unit test. The relevant fragment of code is: MockRepository mocks = new MockRepository(); ICacheManager manager = mocks.CreateMock<ICacheManager>(); Expect.On(...
The issue you're encountering is indeed a common one when dealing with multithreading in unit tests, especially when mocking with libraries like Rhino Mocks. The problem stems from the fact that the expected calls and actual calls to the mocked objects are tied to the thread they were created on, and in a multi-threade...
15,971
[ { "from": "human", "value": "I have a class which is designed to spin up a background thread, from which calls will be made into a manager. This manager will be mocked for the purposes of unit test. The relevant fragment of code is:\n MockRepository mocks = new MockRepository();\nICacheManager manager = moc...
I am using pipes to transfer information between two vxWorks tasks. Here is a code sample: Init() { fd = open("/pipe/mydev", O_RDWR, 0777); ... } taskRx() { ... len = read(fd, rxbuf, MAX_RX_LEN); ... } taskTx() { ... len = write(fd, txbuf, txLen); ... } If we send a message that is longer than M...
In VxWorks, when using pipes for inter-task communication, the behavior you’re observing when attempting to read more data than the buffer can accommodate can be attributed to how pipe buffering works. Here are a few things to consider that could explain why your second read doesn't receive any data: 1. **Pipe Bufferi...
18,820
[ { "from": "human", "value": "I am using pipes to transfer information between two vxWorks tasks.\nHere is a code sample:\n\nInit()\n{\n fd = open(\"/pipe/mydev\", O_RDWR, 0777);\n...\n}\n\ntaskRx()\n{\n ...\n len = read(fd, rxbuf, MAX_RX_LEN);\n ...\n}\ntaskTx()\n{\n ...\n len = write(fd, txbuf,...
I am writing a repository. Fetching objects is done through a DAO. Creating and updating objects is done through a Request object, which is given to a RequestHandler object (a la Command pattern). I didn't write the DAO, Request, or RequestHandler, so I can't modify them. I'm trying to write a test for this repository....
Given your situation, you have a few options to consider for testing your repository, each with its own trade-offs: ### 1. Mock the Request Object If the Request object is complex and not ready yet, creating a mock or fake for it might be the best solution. You can create a simple version of the Request that has the m...
16,484
[ { "from": "human", "value": "I am writing a repository. Fetching objects is done through a DAO. Creating and updating objects is done through a Request object, which is given to a RequestHandler object (a la Command pattern). I didn't write the DAO, Request, or RequestHandler, so I can't modify them.\nI'm t...
When creating a class library in C++, you can choose between dynamic (.dll, .so) and static (.lib, .a) libraries. What is the difference between them and when is it appropriate to use which?
When creating a class library in C++, the choice between dynamic (shared) libraries and static libraries depends on several factors, including how you intend to distribute and use the library, performance considerations, memory management, and the context of the application. Here's a breakdown of the differences betwee...
17,343
[ { "from": "human", "value": "When creating a class library in C++, you can choose between dynamic (.dll, .so) and static (.lib, .a) libraries. What is the difference between them and when is it appropriate to use which?\n" }, { "from": "gpt", "value": "When creating a class library in C++, the c...
After being through numerous forums available on the net for last 5 days, I am still not able to completely track down the browser close event. My requirement is to generate a popup message, when user tries to close the browser. I have called my javascript function on body 'onbeforeunload' event. And I have hardcoded t...
Detecting specific user actions like refreshing the page, navigating back, or closing the browser has its limitations due to the nature of web browsers and the design of JavaScript. However, you can still make some progress in your case using the `beforeunload` event. Here's how to approach your problem: ### Basic Id...
18,694
[ { "from": "human", "value": "After being through numerous forums available on the net for last 5 days, I am still not able to completely track down the browser close event. My requirement is to generate a popup message, when user tries to close the browser.\nI have called my javascript function on body 'onb...
Is there a good library to use for gathering user input in Linux from the mouse/keyboard/joystick that doesn't force you to create a visible window to do so? SDL lets you get user input in a reasonable way, but seems to force you to create a window, which is troublesome if you have abstracted control so the control ma...
For gathering user input on Linux without needing to create a visible window, you might want to explore the following options: 1. **Direct Input from `/dev/input`:** You can read raw input events directly from device files located in `/dev/input/`. This requires parsing the input events yourself but allows you to c...
18,481
[ { "from": "human", "value": "Is there a good library to use for gathering user input in Linux from the mouse/keyboard/joystick that doesn't force you to create a visible window to do so? SDL lets you get user input in a reasonable way, but seems to force you to create a window, which is troublesome if you ...
I have a web part that I've developed, and if I manually install the web part it is fine. However when I have packaged the web part following the instructions on this web site as a guide: http://www.theartofsharepoint.com/2007/05/how-to-build-solution-pack-wsp.html I get this error in the log files: 09/23/2008 14:13:03...
The error message you are encountering when trying to import your web part in SharePoint suggests that there may be an issue related to the web part's configuration or the way it was packaged into the WSP (Windows SharePoint Solution Package). Here are some steps you can take to troubleshoot and resolve the issue: ###...
16,732
[ { "from": "human", "value": "I have a web part that I've developed, and if I manually install the web part it is fine.\nHowever when I have packaged the web part following the instructions on this web site as a guide:\nhttp://www.theartofsharepoint.com/2007/05/how-to-build-solution-pack-wsp.html\nI get this...