instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
Is it possible to export a picture with custom animation from PowerPoint to an animated gif?
Yes, it is possible to export a picture with custom animation from PowerPoint to an animated GIF, though the process has some limitations. Here’s how you can do it: 1. **Create Your Animation**: First, create your custom animation in PowerPoint as you normally would. Add all the elements and set up the animations as y...
39,148
[ { "from": "human", "value": "Is it possible to export a picture with custom animation from PowerPoint to an animated gif?\n" }, { "from": "gpt", "value": "Yes, it is possible to export a picture with custom animation from PowerPoint to an animated GIF, though the process has some limitations. He...
Is it possible for a python script to open its own source file and overwrite it? The idea was to have a very simple and very dirty way for a python script to download an update of itself so that the next time it is run it would be an updated version.
Yes, it is technically possible for a Python script to open its own source file, read its content, and overwrite it with new data. However, this approach can be risky and is generally discouraged for a few reasons: 1. **Safety**: If the script fails while trying to overwrite itself, you might end up with a corrupted f...
39,055
[ { "from": "human", "value": "Is it possible for a python script to open its own source file and overwrite it?\nThe idea was to have a very simple and very dirty way for a python script to download an update of itself so that the next time it is run it would be an updated version.\n" }, { "from": "gp...
A C-program is placing what it considers to be 64-bit unsigned integers into a column in a Postgres database that is typed as int8. To Postgres, int8 is always 'signed int8' (no such thing to it as 'unsigned int8'). So the Ruby program I have shows numbers retrieved from Postgres in the upper half of that space as nega...
In Ruby, you can convert a negative integer that is stored as a signed 64-bit integer (like what PostgreSQL represents as `int8`) to an unsigned 64-bit integer by adding `2**64` to the negative value. This is because Ruby integers are signed by default, so a negative number can be converted to its corresponding unsigne...
38,886
[ { "from": "human", "value": "A C-program is placing what it considers to be 64-bit unsigned integers into a column in a Postgres database that is typed as int8.\nTo Postgres, int8 is always 'signed int8' (no such thing to it as 'unsigned int8').\nSo the Ruby program I have shows numbers retrieved from Postg...
I have a DTS job that is using the MSXML2.XMLHTTP3.0 object to generate a post request to an ASP.NET application. Under the covers, the ASP.NET application is using System.Reflection to acquire some assembly information and I receive the following exception: System.Web.HttpException Error Code: -2147467259 Message ...
The error message you're encountering indicates that the session state is not enabled for the ASP.NET application, rather than being related to authentication issues like Active Directory credentials. Here's a breakdown of the problem and some steps to resolve it: ### Understanding the Error 1. **Session State Disabl...
36,768
[ { "from": "human", "value": "I have a DTS job that is using the MSXML2.XMLHTTP3.0 object to generate a post request to an ASP.NET application. Under the covers, the ASP.NET application is using System.Reflection to acquire some assembly information and I receive the following exception:\n\nSystem.Web.HttpE...
I need some help with what is probably a newbie question in terms of modifying phpBB. I have a whole system developed in PHP, and I would like to integrate phpBB so that people can navigate into the forums and post seamlessly, without logging in again. Now, using the phpBB users table as the users table for my system (...
Integrating phpBB with your existing PHP application so that users can navigate the forums without needing to log in again involves a few steps. Since you want to keep your existing user system as the primary one, you will need to handle the login and user synchronization manually. Here’s a guide to help you with this ...
36,627
[ { "from": "human", "value": "I need some help with what is probably a newbie question in terms of modifying phpBB.\nI have a whole system developed in PHP, and I would like to integrate phpBB so that people can navigate into the forums and post seamlessly, without logging in again.\nNow, using the phpBB use...
I haven't played with CSS for too long a time and am without references at the moment. My question should be fairly easy but googling isn't bringing up a sufficient answer. So, adding to the collective knowledge... |#header---------------------------------------------------------------| | ...
To achieve the layout you described, you can use CSS to set up a flexbox or grid layout for the `#sub-title` container. This will ensure that `#sub-left` and `#sub-right` stay within the bounds of `#sub-title`. Here’s how you can set it up: ### HTML Structure ```html <div id="header"> <h1>TITLE</h1> </div> <div id...
38,420
[ { "from": "human", "value": "I haven't played with CSS for too long a time and am without references at the moment. My question should be fairly easy but googling isn't bringing up a sufficient answer. So, adding to the collective knowledge...\n|#header-------------------------------------------------------...
I currently have 2 domain names that I want to setup different websites for. I am currently looking at using some free hosting that works well for my current needs but doesn't give me any way to point "mydomain.com" to the actual site. Instead I have to give users a longer, harder to remember url. My proposed solution ...
Yes, you can certainly set up an ASP.NET application to handle domain redirection based on the incoming request URL. This can be done by inspecting the `Request` object in your ASP.NET application to determine which domain was used to access the site. Here’s a simple example to illustrate how you can implement this in...
37,122
[ { "from": "human", "value": "I currently have 2 domain names that I want to setup different websites for. I am currently looking at using some free hosting that works well for my current needs but doesn't give me any way to point \"mydomain.com\" to the actual site. Instead I have to give users a longer, ha...
I've noticed that the bog-standard ProgressBar in .NET 2.0 (Winforms) does show up as the fancy animated glowing bar in Vista; however, using the ProgressBarRenderer (as one generally has to when trying to draw a progress bar in an owner-drawn list view, grid view, or other such control) just gives the visual style wit...
Creating an animated progress bar in an owner-drawn control while maintaining performance can indeed be a challenging task. As you've noted, the standard `ProgressBar` in .NET automatically handles the animation, but when you draw it manually using `ProgressBarRenderer`, you lose that built-in functionality. Here are ...
37,306
[ { "from": "human", "value": "I've noticed that the bog-standard ProgressBar in .NET 2.0 (Winforms) does show up as the fancy animated glowing bar in Vista; however, using the ProgressBarRenderer (as one generally has to when trying to draw a progress bar in an owner-drawn list view, grid view, or other such...
How can I get a full list of Groups in my Active Directory?
To get a full list of groups in your Active Directory (AD), you can use several methods depending on your environment and the tools available to you. Below are some common methods to achieve this. ### 1. **Using PowerShell** If you have access to a Windows machine with the Active Directory module installed, you can u...
38,289
[ { "from": "human", "value": "How can I get a full list of Groups in my Active Directory?\n" }, { "from": "gpt", "value": "To get a full list of groups in your Active Directory (AD), you can use several methods depending on your environment and the tools available to you. Below are some common me...
My dev team is getting ready to start a new project. The shop has been a "VB shop" since the days of VB3, but the prevailing opinion now is that we're a ".NET shop" and since C# was created specifically for .NET, whereas VB.NET was a retrofit, we've decided to move forward writing C# only. The controversy revolves arou...
The Microsoft.VisualBasic namespace was created to help developers transition from Visual Basic 6 (VB6) to VB.NET and to provide some backward compatibility. However, it's important to understand the nature of the Microsoft.VisualBasic namespace and its contents in the context of .NET development, especially regarding ...
35,415
[ { "from": "human", "value": "My dev team is getting ready to start a new project. The shop has been a \"VB shop\" since the days of VB3, but the prevailing opinion now is that we're a \".NET shop\" and since C# was created specifically for .NET, whereas VB.NET was a retrofit, we've decided to move forward w...
Suppose I have three classes. It is valid to instantiate A, but there are also special cases B and D which subclass A, adding additional information. How would I do the mapping files for this in (fluent) NHibernate? public class A { public int ID { get; set;} public string CommonProperty1 { get; set; } pub...
In NHibernate, when you are working with inheritance and mapping classes, you generally want to utilize one of the inheritance strategies provided by NHibernate. The most common strategies are **Table-Per-Class Hierarchy** (also known as Table Inheritance), **Table-Per-Subclass** (also known as Class Table Inheritance)...
37,145
[ { "from": "human", "value": "Suppose I have three classes. It is valid to instantiate A, but there are also special cases B and D which subclass A, adding additional information.\nHow would I do the mapping files for this in (fluent) NHibernate?\npublic class A\n{\n public int ID { get; set;}\n publi...
I was trying to follow some instructions today, and it starts with the comment REM In SQLPlus I manually copy in each line and execute it. That's nice, I don't have SQLPlus, I have SQLDeveloper. The lines that were pasted in were of the type: @\\server\dir\dir\dir\commandfile1.txt; COMMIT; ...etc. It didn't like...
Yes, you can execute similar commands in SQL Developer, but it does have some differences compared to SQLPlus. Here are the steps you can follow to run the commands and scripts you mentioned in SQL Developer: ### Running Scripts in SQL Developer 1. **Open SQL Developer**: Start SQL Developer and connect to your datab...
37,599
[ { "from": "human", "value": "I was trying to follow some instructions today, and it starts with the comment \n\nREM In SQLPlus I manually copy in each line and execute it.\n\nThat's nice, I don't have SQLPlus, I have SQLDeveloper. The lines that were pasted in were of the type:\n\n@\\\\server\\dir\\dir\\d...
How do I prevent code from executing in the SelectedValueChange event of a combobox when the combobox is being loaded for the first time? I need the code to execute when the user has selected a new value.
To prevent the code in the `SelectedValueChanged` event of a ComboBox from executing when the ComboBox is being loaded for the first time, you can use a boolean flag that indicates whether the ComboBox is currently being initialized. Here's how you can implement this: 1. **Declare a Boolean Flag**: Create a boolean va...
39,257
[ { "from": "human", "value": "How do I prevent code from executing in the SelectedValueChange event of a combobox when the combobox is being loaded for the first time? I need the code to execute when the user has selected a new value.\n" }, { "from": "gpt", "value": "To prevent the code in the `S...
Possible Duplicate: Are memory leaks ever ok? I read somewhere that there are special cases when memory leaks are needed and actually a good thing in some rare circumstances. But i can't remember what was it exactly! Does anyone know or remember such an argument? Thanks, Adi
While memory leaks are generally considered a bad practice in software development because they can lead to increased memory consumption and ultimately crash applications, there are rare scenarios where what might appear as a memory leak is acceptable or even beneficial. Here are a few examples: 1. **Long-lived Applic...
38,785
[ { "from": "human", "value": "\nPossible Duplicate:\nAre memory leaks ever ok? \n\nI read somewhere that there are special cases when memory leaks are needed and actually a good thing in some rare circumstances. But i can't remember what was it exactly!\nDoes anyone know or remember such an argument?\nThanks...
How do you organize installing different programs if these programs use the same DLLs which require registration. The problem: if the user uninstalls the program that is installed later the other program will stop working as the registry entries now point to the missing DLLs. One possible solution is placing the comm...
When dealing with multiple programs that share the same DLLs, it's important to manage these shared components carefully to avoid issues related to registration and uninstallation. Here are some strategies to organize the installation of these programs and handle shared DLLs effectively: ### 1. Centralized Installatio...
37,310
[ { "from": "human", "value": "How do you organize installing different programs if these programs use the same DLLs which require registration. \nThe problem: if the user uninstalls the program that is installed later the other program will stop working as the registry entries now point to the missing DLLs. ...
Ok... I'm new to WPF, but I kind of know how to do things using DataTriggers and Converters. But, what I want to seems a little more complex than that. Let me give you the details: The DataContext for the ListView control is an IList of objects (object=Room). These are the available rooms. I've got another control (...
To achieve your goal of displaying an image in a `ListViewItem` based on whether its corresponding `Room` object matches the `Room` object bound to the `TextBox`, you can use a `DataTrigger` within your `DataTemplate`. To do this, you'll need to create a way to access the value of the `TextBox` from within the `ListVie...
34,974
[ { "from": "human", "value": "Ok... I'm new to WPF, but I kind of know how to do things using DataTriggers and Converters.\nBut, what I want to seems a little more complex than that. Let me give you the details:\nThe DataContext for the ListView control is an IList of objects (object=Room). These are the a...
Here are the domain model classes: public abstract class BaseClass { ... } public class ChildClass : BaseClass { ... } Note that the parent class is abstract and this is what gives me some difficulties when comes the time to map with fluent nhibernate. My discriminator is a byte (tinyint in the DB). Because it is not...
When using Fluent NHibernate to map an abstract base class with a discriminator column that is not a string, you can encounter challenges, especially when trying to define a discriminator value for the base class. The error you're experiencing indicates that NHibernate is unable to format the discriminator value for th...
39,675
[ { "from": "human", "value": "Here are the domain model classes:\npublic abstract class BaseClass\n{\n...\n}\n\npublic class ChildClass : BaseClass\n{\n...\n}\n\nNote that the parent class is abstract and this is what gives me some difficulties when comes the time to map with fluent nhibernate. My discrimina...
There are two pictureboxes with two different images. If I click on one picture box, the image in it should be cleared. To make the matters worse, both of the picture boxes have only one common event handler. How can I know which picturebox generated the event? I would appreciate source code in C++-CLI I need to know w...
In C++/CLI, you can identify which `PictureBox` generated the click event by using the `sender` parameter inside your event handler. The `sender` parameter is of type `System::Object^`, so you need to cast it to the appropriate type (`PictureBox^`) before you can work with it. Here's an example that illustrates how to ...
38,779
[ { "from": "human", "value": "There are two pictureboxes with two different images.\nIf I click on one picture box, the image in it should be cleared.\nTo make the matters worse, both of the picture boxes have only one common event handler.\nHow can I know which picturebox generated the event? I would apprec...
I am having a real problem at work with a highly ingrained developer obsessed with ms access. Users moan about random crashes, locking errors, freeze's, the application slowing down (especially in 2007) but seem to be very resistant to moving it. Most of the time they blame the computer and can't be convinced it's the ...
Transitioning from a technology like MS Access to more robust solutions can be challenging, especially when team members are resistant to change due to familiarity and comfort with the existing system. Here are several arguments and strategies you can use to convince stakeholders that it's time to make the move: ### 1...
36,624
[ { "from": "human", "value": "I am having a real problem at work with a highly ingrained developer obsessed with ms access. Users moan about random crashes, locking errors, freeze's, the application slowing down (especially in 2007) but seem to be very resistant to moving it. Most of the time they blame the ...
I'm currently writing an object dumper (allowing different dumping strategies). Of course, I would like to write unit tests to verify that what I will develop will match all the features that I expect. However, I cannot imagine how I will perform the testing on this solution. I have thought about creating a set of obje...
Creating unit tests for an object dumper can indeed be challenging, especially when you want to verify access to properties during the dumping process. One effective approach is to use mock objects or create test doubles that can track access to their properties. Below, I’ll outline a strategy you can adopt to achieve ...
35,960
[ { "from": "human", "value": "I'm currently writing an object dumper (allowing different dumping strategies).\nOf course, I would like to write unit tests to verify that what I will develop will match all the features that I expect.\nHowever, I cannot imagine how I will perform the testing on this solution.\...
I am sure there are many developers out here who have team spread across different time zones. What are some of the challenges people face and whats the best way to tackle them?
Managing a development team spread across different time zones presents a unique set of challenges. Here are some common issues and strategies to address them: ### Challenges 1. **Communication Delays**: - Different working hours can lead to delays in responses to questions or issues, slowing down progress. 2. **...
37,569
[ { "from": "human", "value": "I am sure there are many developers out here who have team spread across different time zones. What are some of the challenges people face and whats the best way to tackle them?\n" }, { "from": "gpt", "value": "Managing a development team spread across different time...
I have a program in which the user adds multiple objects to a scene. These objects are all represented as a classes. Now I want the user to be able to save the scenario, so it can be loaded again. Is there some genereic save method I can use, or do I have to write my own that saves the values of all properties and suc...
It's great to hear you're planning on using XML serialization to save your objects! This approach will allow you to easily store and retrieve the properties of your objects without having to write custom save/load logic for each class. Here's a general outline of how to implement this: ### 1. Define Serializable Class...
37,397
[ { "from": "human", "value": "I have a program in which the user adds multiple objects to a scene. These objects are all represented as a classes. \nNow I want the user to be able to save the scenario, so it can be loaded again.\nIs there some genereic save method I can use, or do I have to write my own that...
I'm trying to load an external swf movie then adding the ability to drag it around the stage, however whenever I try to do this I just hit a dead end. Are there any limitations on what you can set be draggable or clickable? An example of what I'm doing is below: public function loadSwf(url:String, swfUniqueName:String)...
It sounds like you're trying to make an external SWF movie draggable within a parent container (like the stage) in ActionScript 3. The problem you're encountering is likely due to how mouse events are handled in loaded SWF files. Here are some suggestions and modifications to help you get the dragging functionality wor...
36,573
[ { "from": "human", "value": "I'm trying to load an external swf movie then adding the ability to drag it around the stage, however whenever I try to do this I just hit a dead end. Are there any limitations on what you can set be draggable or clickable? An example of what I'm doing is below:\npublic function...
I'm trying to switch on and off the Rotate 180 degree setting for an HP Laserjet printer (4200/ 4350) using a duplexer unit. The Business has a requirement to "print on both sides", for maximum control I'd like to be able to manipulate at print time (through print macros) whether or not duplex printing is enabled for e...
Controlling the "Rotate 180 degrees" option on HP LaserJet printers when using duplex printing can be a bit tricky since it may not be readily available as a direct option in every print dialog or driver setting. However, here are several approaches you can take to manage this setting effectively within your print macr...
39,028
[ { "from": "human", "value": "I'm trying to switch on and off the Rotate 180 degree setting for an HP Laserjet printer (4200/ 4350) using a duplexer unit.\nThe Business has a requirement to \"print on both sides\", for maximum control I'd like to be able to manipulate at print time (through print macros) whe...
/dev/md1 6068992 5204648 551080 91% / I have 91% taken and am trying to discover what files are taking up space. I'm using linux. Does any one know the command? thanks
You can use the `du` (disk usage) command to find out which files and directories are taking up space on your Linux system. Here are a few useful commands: 1. **Basic Disk Usage Command:** This command will show the disk usage of all directories in your current directory in a human-readable format: ```bash d...
40,142
[ { "from": "human", "value": "/dev/md1 6068992 5204648 551080 91% /\nI have 91% taken and am trying to discover what files are taking up space. I'm using linux. Does any one know the command?\nthanks\n" }, { "from": "gpt", "value": "You can use the `du` (disk usage) command ...
Lets say I have a single object of type Car which I want to render as HTML: class Car { public int Wheels { get; set; } public string Model { get; set; } } I don't want to use the ASP.NET Repeater or ListView controls to bind because it seems too verbose. I just have the one object. But I still want to be able to ...
If you're looking for a way to render a single object in ASP.NET Web Forms while still utilizing the data binding syntax, a good solution is to use the `DataBinder.Eval` method along with a simple `Placeholder` control. This allows you to bind your single `Car` object and keep the syntax you desire without the overhead...
35,997
[ { "from": "human", "value": "Lets say I have a single object of type Car which I want to render as HTML:\nclass Car {\n public int Wheels { get; set; }\n public string Model { get; set; }\n}\n\nI don't want to use the ASP.NET Repeater or ListView controls to bind because it seems too verbose. I just have ...
I have a requirement to create a simple database in Access to collect some user data that will be loaded into another database for further reporting. There will be a module in the Access db that when invoked by the user (probably by clicking a button) will output a query to a delimited file. The user also needs a mec...
Creating a simple database in Microsoft Access to collect user data and exporting it to a delimited file, followed by transferring that file to a remote server using SFTP, can be achieved by following a few steps. Below is a guide on how to accomplish this. ### Step 1: Create the Database and Form in Access 1. **Crea...
31,434
[ { "from": "human", "value": "I have a requirement to create a simple database in Access to collect some user data that will be loaded into another database for further reporting. There will be a module in the Access db that when invoked by the user (probably by clicking a button) will output a query to a d...
Are event handlers fired in the order that they attached to the event? If not, can I enforce some kind of order onto the event handlers such that they are called in a specific order?
In JavaScript, when multiple event handlers are attached to the same event on a single DOM element, they are generally called in the order they were attached. This means that if you attach event handlers sequentially, the first one you attach will be the first one to be executed when the event occurs. ### Example: ```...
37,743
[ { "from": "human", "value": "Are event handlers fired in the order that they attached to the event? If not, can I enforce some kind of order onto the event handlers such that they are called in a specific order?\n" }, { "from": "gpt", "value": "In JavaScript, when multiple event handlers are att...
I am getting a lot of errors when starting RAD7. The server doesn't respond to class changes. Sometimes the server won't start. Sometimes RAD will not acknowledge modules that I added to the server. It is kind of buggy. I know there is metadata in the workspace, are there safe ways to clean the metadata or RAD in g...
When you experience issues with Rational Application Developer (RAD) such as server responsiveness, class changes not reflecting, or difficulty in recognizing new modules, it may be necessary to clean up metadata or perform other maintenance tasks. Here are some steps you can take to troubleshoot and resolve issues wit...
37,896
[ { "from": "human", "value": "I am getting a lot of errors when starting RAD7. The server doesn't respond to class changes. Sometimes the server won't start. Sometimes RAD will not acknowledge modules that I added to the server. It is kind of buggy.\nI know there is metadata in the workspace, are there s...
If I have the following code, Foo *f = new Foo(); vector<Foo*> vect; vect.push_back(f); // do stuff vect.erase(f); Did I create a memory leak? I guess so, but the word erase gives the feeling that it is deleting it. Writing this, I am wondering if it is not a mistake to put a pointer in a STL vector. What do you thi...
Yes, your code does indeed create a memory leak. In your code, you allocate memory for a `Foo` object using `new Foo()`, which means you are responsible for deleting that memory later. When you add the pointer `f` to the `vect`, you are storing the pointer, but when you call `vect.erase(f)`, you are trying to erase th...
37,997
[ { "from": "human", "value": "If I have the following code,\nFoo *f = new Foo();\nvector<Foo*> vect;\nvect.push_back(f);\n// do stuff\nvect.erase(f);\n\nDid I create a memory leak? \nI guess so, but the word erase gives the feeling that it is deleting it. \nWriting this, I am wondering if it is not a mistake...
I'm trying to read a value from a file and use it in a subsequent command. I have a file called AppServer.pid which contains the process id of my app server (just the number, it's not a properties file or anything like that). The app server is hanging, so I want to take this value and pass it to the kill command. So my...
Yes, you can achieve this using a Windows batch script. You can use the `FOR /F` command to read the value from the `AppServer.pid` file and store it in a variable. Then, you can use that variable in your `taskkill` command. Here’s how you can do it: ```batch @echo off setlocal rem Read the PID from the AppServer.pid...
39,718
[ { "from": "human", "value": "I'm trying to read a value from a file and use it in a subsequent command.\nI have a file called AppServer.pid which contains the process id of my app server (just the number, it's not a properties file or anything like that).\nThe app server is hanging, so I want to take this v...
A friend of mine asked me today if there is any open-source or commercially available Webmail/Email "engine". When I asked her what she meant by engine, I got a list of features her boss asked for - Web interface to login & access e-mails Ability to send/receive/forward e-mails using the web interface Ability to com...
There are several open-source and commercially available webmail/email engines that you can consider based on your friend's requirements. Since you're inclined towards using ASP.NET, here are some suggestions that can work well with that platform and meet the listed features: ### Open-Source Options 1. **RainLoop**: ...
38,076
[ { "from": "human", "value": "A friend of mine asked me today if there is any open-source or commercially available Webmail/Email \"engine\". When I asked her what she meant by engine, I got a list of features her boss asked for - \n\nWeb interface to login & access e-mails\nAbility to send/receive/forward e...
I'm trying to create a cube with a single measure. This measure is a distinct count of a "name" column. The cube works perfectly if the measure is set to "count" type. However when I set distinct count I get this error: "Errors in the OLAP storage engine: The sort order specified for distinct count records is incorrect...
The error you are encountering in your OLAP cube when trying to set a distinct count on a non-numeric column (like a "name" column) is a common issue related to how the underlying storage engine handles distinct counts. ### Understanding Distinct Count and OLAP Limitations 1. **Distinct Count Requirement**: While dis...
38,499
[ { "from": "human", "value": "I'm trying to create a cube with a single measure. This measure is a distinct count of a \"name\" column. The cube works perfectly if the measure is set to \"count\" type. However when I set distinct count I get this error:\n\"Errors in the OLAP storage engine: The sort order sp...
I am using cherrypy as a webserver. It gives good performance for my application but there is a very big problem with it. cherrypy crashes after couple of hours stating that it could not create a socket as there are too many files open: [21/Oct/2008:12:44:25] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('0...
The issue you're experiencing with CherryPy crashing due to "too many open files" is likely caused by sockets not being properly closed after a client disconnects, resulting in many sockets being in the `CLOSE_WAIT` state. This is often indicative of a problem on the server side where it is not correctly handling the t...
37,308
[ { "from": "human", "value": "I am using cherrypy as a webserver. It gives good performance for my application but there is a very big problem with it. cherrypy crashes after couple of hours stating that it could not create a socket as there are too many files open:\n[21/Oct/2008:12:44:25] ENGINE HTTP Server...
Given test.txt containing: test message I want to end up with: testing a message I think the following should work, but it doesn't: Get-Content test.txt |% {$_-replace "t`r`n", "ting`r`na "} How can I do a find and replace where what I'm finding contains CRLF?
Your current approach has a few issues with how you are trying to perform the replace operation in PowerShell. The string you're trying to replace includes a CRLF sequence, but your syntax doesn't correctly specify that. Additionally, you want to replace "test" with "testing" and "message" with "a message" correctly. ...
38,978
[ { "from": "human", "value": "Given test.txt containing:\ntest\nmessage\n\nI want to end up with:\ntesting\na message\n\nI think the following should work, but it doesn't:\nGet-Content test.txt |% {$_-replace \"t`r`n\", \"ting`r`na \"}\n\nHow can I do a find and replace where what I'm finding contains CRLF?\...
What's the quickest/neatest way to calculate the next anniversary of someone's birthday. For example, if I knew a person was born on 31st January, 1990, and today is the 10th February 2000, their next anniversary will be 31st January, 2001. February 29th should roll onto March 1st (e.g. if they were born on February 29...
Your function is a solid starting point! It checks for leap years and handles the birthday on February 29th correctly, while also rolling over to the next anniversary date based on the current date. To enhance readability and maintainability, here’s a refactored version of your function with comments for clarity: ```...
39,094
[ { "from": "human", "value": "What's the quickest/neatest way to calculate the next anniversary of someone's birthday.\nFor example, if I knew a person was born on 31st January, 1990, and today is the 10th February 2000, their next anniversary will be 31st January, 2001.\nFebruary 29th should roll onto March...
Does anyone have any experience with running C++ applications that use the boost libraries on uclibc-based systems? Is it even possible? Which C++ standard library would you use? Is uclibc++ usable with boost?
Running C++ applications that utilize the Boost libraries on uClibc-based systems is definitely possible, although there are a few considerations to keep in mind. Here’s an overview of the key points related to your questions: ### 1. Compatibility with uClibc uClibc is a lightweight implementation of the standard C li...
36,162
[ { "from": "human", "value": "Does anyone have any experience with running C++ applications that use the boost libraries on uclibc-based systems? Is it even possible? Which C++ standard library would you use? Is uclibc++ usable with boost?\n" }, { "from": "gpt", "value": "Running C++ applicati...
How do you parse a CSV file using gawk? Simply setting FS="," is not enough, as a quoted field with a comma inside will be treated as multiple fields. Example using FS="," which does not work: file contents: one,two,"three, four",five "six, seven",eight,"nine" gawk script: BEGIN { FS="," } { for (i=1; i<=NF; i++) p...
To properly parse a CSV file that may contain quoted fields with commas using `gawk`, you can use a more sophisticated approach than simply setting the `FS` variable. A common method is to use a regular expression to capture the fields, taking care to handle quoted fields correctly. Here's an example of how you could ...
36,923
[ { "from": "human", "value": "How do you parse a CSV file using gawk? Simply setting FS=\",\" is not enough, as a quoted field with a comma inside will be treated as multiple fields.\nExample using FS=\",\" which does not work:\nfile contents:\none,two,\"three, four\",five\n\"six, seven\",eight,\"nine\"\n\n...
I'm designing a database table which will hold filenames of uploaded files. What is the maximum length of a filename in NTFS as used by Windows XP or Vista?
In NTFS (New Technology File System), which is used by Windows XP, Vista, and later versions of Windows, the maximum length for a filename is 255 characters. However, it's important to remember that the full path length (which includes the drive letter, folder names, and the filename itself) is limited to 260 character...
41,761
[ { "from": "human", "value": "I'm designing a database table which will hold filenames of uploaded files. What is the maximum length of a filename in NTFS as used by Windows XP or Vista?\n" }, { "from": "gpt", "value": "In NTFS (New Technology File System), which is used by Windows XP, Vista, and...
I have a C# .NET application with which I've created a custom image display control. Each image display represents its own display context and draws the image using glDrawPixels (Yes I know it would be better to use textures, I plan to in the futures but this app is already too far along and my time is limited). I am n...
The issue you're experiencing with the simultaneous redrawing of your custom image display controls could stem from how the rendering context is handled and the way you are invoking the `Invalidate()` method. In WinForms and similar UI frameworks, the rendering is often single-threaded, so invoking the `Invalidate()` m...
37,719
[ { "from": "human", "value": "I have a C# .NET application with which I've created a custom image display control. Each image display represents its own display context and draws the image using glDrawPixels (Yes I know it would be better to use textures, I plan to in the futures but this app is already too ...
I've got a Clr user defined type that takes a string of values sepertated by a comma. I'm losing a little bit of precision when converting to this type, I've narrowed it down to this line of code: cast(cast(nlinkjt as nvarchar(100)) + ',' +cast(avglrwf as nvarchar(100)) + ',' + cast(avglrwfjt as nvarchar(100)) as dbo.C...
It appears you're trying to convert floating-point values to strings in SQL Server without losing precision. The SQL Server `CAST` and `CONVERT` functions may truncate the precision of floating-point numbers when converting them to string representations. To maintain full precision, you can use the `STR` function or fo...
36,781
[ { "from": "human", "value": "I've got a Clr user defined type that takes a string of values sepertated by a comma.\nI'm losing a little bit of precision when converting to this type, I've narrowed it down to this line of code:\ncast(cast(nlinkjt as nvarchar(100)) + ',' +cast(avglrwf as nvarchar(100)) + ',' ...
Imagine I have a process that starts several child processes. The parent needs to know when a child exits. I can use waitpid, but then if/when the parent needs to exit I have no way of telling the thread that is blocked in waitpid to exit gracefully and join it. It's nice to have things clean up themselves, but it may ...
You're right to consider various approaches for handling child process termination notifications in a multithreaded environment, especially when trying to avoid the complexities that come with signal handlers. Let's go through your options and analyze them in more detail: ### 1. **Using `waitpid` with `WNOHANG` and Sl...
33,601
[ { "from": "human", "value": "Imagine I have a process that starts several child processes. The parent needs to know when a child exits.\nI can use waitpid, but then if/when the parent needs to exit I have no way of telling the thread that is blocked in waitpid to exit gracefully and join it. It's nice to ha...
I have a dll that contains a dot net assembly - common intermediate language. The problem is that it's lacking documentation and I need to figure out the api like available classes, properties and methods, correct parameters to pass etc. Whats the best way to do this. I need some sort of viewer/inspector but I couldn't...
To inspect a .NET assembly (DLL) that is in Common Intermediate Language (CIL) format, you can use several tools and approaches that can help you explore the types, methods, properties, and other elements within the assembly. Here are some of the best tools and methods for this task: ### 1. **ILSpy** - **Overview**: I...
38,414
[ { "from": "human", "value": "I have a dll that contains a dot net assembly - common intermediate language. The problem is that it's lacking documentation and I need to figure out the api like available classes, properties and methods, correct parameters to pass etc.\nWhats the best way to do this. I need so...
I'm looking for a good Java obfuscator. I've done initial research into the following Java obfuscators: proguard, yguard, retroguard, dasho, allatori, jshrink, smokescreen, jobfuscate, marvin, jbco, jode, javaguard, jarg, joga, cafebabe, donquixote, mwobfu, bbmug, zelix klassmaster, sandmark, jcloak, thicket, blufuscat...
Choosing a good Java obfuscator depends on your specific needs, including ease of use, level of obfuscation, integration with your build process, and whether you're looking for a free or commercial solution. Here's an overview of some of the obfuscators you mentioned along with a few recommendations: 1. **ProGuard**: ...
36,929
[ { "from": "human", "value": "I'm looking for a good Java obfuscator.\nI've done initial research into the following Java obfuscators: proguard, yguard, retroguard, dasho, allatori, jshrink, smokescreen, jobfuscate, marvin, jbco, jode, javaguard, jarg, joga, cafebabe, donquixote, mwobfu, bbmug, zelix klassma...
I need rich UI designer for editing the web.config for ASP.net application. From the designer We can edit the tags in config files It may be any windows application going to edit my config files.
Creating or finding a rich UI designer specifically for editing `web.config` files in an ASP.NET application can be helpful, especially if you're looking for a more user-friendly way to manage configurations. While there are several options available, here are a few approaches you might consider: ### 1. Visual Studio'...
37,938
[ { "from": "human", "value": "I need rich UI designer for editing the web.config for ASP.net application.\nFrom the designer We can edit the tags in config files\nIt may be any windows application going to edit my config files.\n" }, { "from": "gpt", "value": "Creating or finding a rich UI design...
I'm quite new to subject of writting stored function for mySQL database, hence i'm not sure if what i'm trying to do here is possible at all. I need a function that will return a column from random row from a table. I don't want to use ORDER BY RAND() method to do that, rather i would do this like this: DECLARE MAX_CO...
It looks like you're trying to create a stored function in MySQL that selects a random row from a table without using `ORDER BY RAND()`, which is often inefficient for large datasets. However, MySQL stored functions have some restrictions, particularly regarding the execution of statements and variable handling. Here...
34,727
[ { "from": "human", "value": "I'm quite new to subject of writting stored function for mySQL database, hence i'm not sure if what i'm trying to do here is possible at all. \nI need a function that will return a column from random row from a table. I don't want to use ORDER BY RAND() method to do that, rather...
I'am working on a PHP + MySQL Social Networking application, now i need to setup different access control (read,create,edit,delete) for global (all items) and/or self items (item which created by themselves) for each module to group or specific user. Does anyone has suggestions in doing this (table structures, etc)? ...
Your current approach of implementing an access control list (ACL) system is quite common in social networking applications and has several strengths. However, there are ways to optimize and improve upon your design. Here's a refined approach to your access control system along with some suggestions for the table struc...
34,941
[ { "from": "human", "value": "I'am working on a PHP + MySQL Social Networking application, now i need to setup different access control (read,create,edit,delete) for global (all items) and/or self items (item which created by themselves) for each module to group or specific user.\nDoes anyone has suggestions...
The developer environment db server is SqlServer 2005 (developer edition) Is there any way to make sure my SQL Queries will run in SqlServer 2000? This database is set to Compatibility level "SQL Server 2000 (80)" but some queries that run without problems in the development system can not run in the Test Server (SqlSe...
When working with SQL Server 2005 while targeting SQL Server 2000, there are several factors to consider to ensure that your queries run correctly in both environments. Here are some strategies you can use: ### 1. **Compatibility Level** You mentioned that the database is set to a compatibility level of "SQL Server 20...
38,250
[ { "from": "human", "value": "The developer environment db server is SqlServer 2005 (developer edition)\nIs there any way to make sure my SQL Queries will run in SqlServer 2000?\nThis database is set to Compatibility level \"SQL Server 2000 (80)\" but some queries that run without problems in the development...
I have an app that I'm writing a little wizard for. It automated a small part of the app by moving the mouse to appropriate buttons, menus and clicking them so the user can watch. So far it moves the mouse to a tree item and sends a right-click. That pops up a menu via TrackPopupMenu. Next I move the mouse to the ap...
When working with popup menus in Windows, it can indeed be tricky to send the correct input to select a menu item, particularly if you're using a separate thread for your automation tasks. Since you're moving the mouse and simulating clicks, here are some suggestions on how to effectively select an item from a popup me...
37,857
[ { "from": "human", "value": "I have an app that I'm writing a little wizard for. It automated a small part of the app by moving the mouse to appropriate buttons, menus and clicking them so the user can watch.\nSo far it moves the mouse to a tree item and sends a right-click. That pops up a menu via TrackP...
I am creating a installer in .NET and using custom actions for controlling installation. Now there is certain conditions which I need to check and based on those I have to continue install OR rollback the installation. How can I forcefully rollback the Setup from custom actions?
To forcefully rollback an installation in a .NET installer using custom actions, you can use the `MsiSetProperty` function or set the return value of your custom action appropriately to indicate a failure. When the custom action returns a failure, Windows Installer will automatically roll back the installation. Here's...
36,685
[ { "from": "human", "value": "I am creating a installer in .NET and using custom actions for controlling installation. Now there is certain conditions which I need to check and based on those I have to continue install OR rollback the installation.\nHow can I forcefully rollback the Setup from custom actions...
Env.: Vista SP1, SQL Server Express 2005 I'm able to connect to my localhost SQL Server using SQL Server Management Studio, using Windows authentication and, to the best of my knowledge, all default parameters, including network protocol. Now I try to connect using sqlcmd.exe to no avail: C:\Program Files\Microsoft SQL...
The issue you're encountering when trying to connect to your SQL Server Express instance using `sqlcmd.exe` seems related to the way you're specifying the server name. Here are several points to consider: 1. **Server Name Format**: When using `sqlcmd`, the server name should be specified in a different format. Instead...
39,479
[ { "from": "human", "value": "Env.: Vista SP1, SQL Server Express 2005\nI'm able to connect to my localhost SQL Server using SQL Server Management Studio, using Windows authentication and, to the best of my knowledge, all default parameters, including network protocol.\nNow I try to connect using sqlcmd.exe ...
I have created UITableCellView class called NoteCell. The header defines the following: #import <UIKit/UIKit.h> #import "Note.h" @interface NoteCell : UITableViewCell { Note *note; UILabel *noteTextLabel; } @property (nonatomic, retain) UILabel *noteTextLabel; - (Note *)note; - (void)setNote:(Note *)newNot...
The issue you're experiencing with the `UILabel` not being set correctly in your `NoteCell` class could be due to the fact that the `noteTextLabel` property is not properly initialized. Here's a checklist and some suggestions to help you resolve the issue: 1. **Initialization of UILabel**: Make sure that you have init...
37,019
[ { "from": "human", "value": "I have created UITableCellView class called NoteCell. The header defines the following:\n#import <UIKit/UIKit.h>\n#import \"Note.h\"\n\n@interface NoteCell : UITableViewCell {\n Note *note;\n UILabel *noteTextLabel; \n}\n\n@property (nonatomic, retain) UILabel *noteTextLa...
Update: Since development machine has moved to Vista, i now automatically test as a standard user. And with XP being phased out, this question isn't so relavent anymore. Since the Windows 2000 logo requirements, Microsoft has been requiring that applications run as standard user. Like everyone else i always ran my des...
It sounds like you're grappling with the challenges of ensuring your applications are compatible with standard user permissions, particularly on Windows XP. The shift in focus to testing applications under standard user contexts is indeed crucial for ensuring broader compatibility, especially as operating systems evolv...
39,901
[ { "from": "human", "value": "Update: Since development machine has moved to Vista, i now automatically test as a standard user. And with XP being phased out, this question isn't so relavent anymore.\n\nSince the Windows 2000 logo requirements, Microsoft has been requiring that applications run as standard u...
Do we create services when we write programs, or are they commodities? Are we like window-washers in that our programs(actions) provide some services to the users? OR: are we like carpenters in that our programs(products) are sold and used by their new owners? Or should this be seen in different aspects: The act of pro...
Your questions touch on complex and nuanced issues that bridge the realms of software development, intellectual property, ethics, and legal standards. Let’s explore each of the points you've raised. ### 1. Services vs. Commodities The distinction between whether software is a service or a commodity often depends on t...
37,045
[ { "from": "human", "value": "Do we create services when we write programs, or are they commodities?\nAre we like window-washers in that our programs(actions) provide some services to the users?\nOR: are we like carpenters in that our programs(products) are sold and used by their new owners?\nOr should this ...
Here's the scenario: You have an ASP.Net application supported by a Microsoft SQL Server database, and for this example there won't be any caching. For each page in your web application, what's more efficient: Attempting to condense everything you need into one (or a few) stored procedure calls that return multiple tab...
Your question touches on an important aspect of application design, specifically in relation to performance and efficiency when interacting with a database. When designing an ASP.NET application that communicates with a Microsoft SQL Server database, there are several factors to consider when deciding whether to use mu...
37,879
[ { "from": "human", "value": "Here's the scenario:\nYou have an ASP.Net application supported by a Microsoft SQL Server database, and for this example there won't be any caching.\nFor each page in your web application, what's more efficient:\nAttempting to condense everything you need into one (or a few) sto...
I'm exploring the NavBar example from the iPhone dev center. More specifically, I'm trying to understand where the MainViewController object is instantiated and I simply can't find where this is happening. The only references to the MainViewController class is in AppDelegate, where there is a forward declaration and #i...
In iOS development, especially when working with Interface Builder and nib files (or Storyboards), it can sometimes be challenging to track down where objects are instantiated, as they may not be explicitly created in code. In the case of the `MainViewController` in the NavBar example, it is indeed likely that the ob...
35,721
[ { "from": "human", "value": "I'm exploring the NavBar example from the iPhone dev center.\nMore specifically, I'm trying to understand where the MainViewController object is instantiated and I simply can't find where this is happening.\nThe only references to the MainViewController class is in AppDelegate, ...
I have a 3-leveled hierarchy of entities: Customer-Order-Line, which I would like to retrieve in entirety for a given customer, using ISession.Get(id). I have the following XML fragments: customer.hbm.xml: <bag name="Orders" cascade="all-delete-orphan" inverse="false" fetch="join"> <key column="CustomerID" /> <one...
It looks like you've run into a common issue with Hibernate (or NHibernate, in your case) when dealing with collections in a hierarchy of entities. The problem you're facing with NHibernate returning duplicate `Order` entities arises from the way the `bag` collection type is treated. As you've discovered, switching fro...
39,795
[ { "from": "human", "value": "I have a 3-leveled hierarchy of entities: Customer-Order-Line, which I would like to retrieve in entirety for a given customer, using ISession.Get(id). I have the following XML fragments:\ncustomer.hbm.xml:\n<bag name=\"Orders\" cascade=\"all-delete-orphan\" inverse=\"false\" f...
I would like to automate the deployment of my SSIS and SSAS artifacts to remote development SQL Server 2005 & 2008 instances on a scheduled basis. What would be the best solution for this? I am using TFS 2008 as the source control system, so I'd like to integrate the solution with MSBuild and a scheduled Team Build....
To automate the deployment of your SSIS (SQL Server Integration Services) and SSAS (SQL Server Analysis Services) artifacts to remote SQL Server instances on a scheduled basis, while also integrating with TFS 2008 and MSBuild, you can follow the steps below: ### Steps for Automating SSIS and SSAS Deployment 1. **Prep...
36,473
[ { "from": "human", "value": "I would like to automate the deployment of my SSIS and SSAS artifacts to remote development SQL Server 2005 & 2008 instances on a scheduled basis. \nWhat would be the best solution for this? I am using TFS 2008 as the source control system, so I'd like to integrate the solutio...
I have two branches, the main branch(black) and a feature branch(yellow). As you can see, since the feature branch was forked, it was kept up to date fetching changes from main: alt text http://azkotoki.org/images/stackoverflow/tgh-reintegrate1.gif When I reintegrate back the feature branch to the main one, the log win...
The issue you're facing with the graph in TortoiseHg (or any version control tool, for that matter) is a common one when you frequently merge updates from the main branch into a feature branch. Each merge introduces a new "merge commit," and when you merge the feature branch back into the main branch, all those merge p...
37,131
[ { "from": "human", "value": "I have two branches, the main branch(black) and a feature branch(yellow).\nAs you can see, since the feature branch was forked, it was kept up to date fetching changes from main:\nalt text http://azkotoki.org/images/stackoverflow/tgh-reintegrate1.gif\nWhen I reintegrate back the...
I'm developing a small utility application that needs to detect whether another one has one of its MDI child windows open (it's an off-the-shelf Win32 business application over which I have neither source code nor control). From my app, I would like to be able to poll or detect when a particular MDI Child window is op...
To detect whether a specific MDI child window is open in a Win32 application, you can use the Windows API to enumerate through the windows and their properties. While .NET does not provide built-in methods for directly interacting with Windows' GUI components at a low level, you can leverage platform invocation (P/Invo...
34,481
[ { "from": "human", "value": "I'm developing a small utility application that needs to detect whether another one has one of its MDI child windows open (it's an off-the-shelf Win32 business application over which I have neither source code nor control). \nFrom my app, I would like to be able to poll or detec...
I've been preaching both to my colleagues and here on SO about the goodness of using parameters in SQL queries, especially in .NET applications. I've even gone so far as to promise them as giving immunity against SQL injection attacks. But I'm starting to wonder if this really is true. Are there any known SQL injection...
You are correct in advocating for the use of parameterized queries as a means of mitigating SQL injection attacks. Parameterized queries help ensure that user input is treated as data rather than executable code, which is a fundamental safeguard against many forms of SQL injection. However, while parameterized queries...
39,991
[ { "from": "human", "value": "I've been preaching both to my colleagues and here on SO about the goodness of using parameters in SQL queries, especially in .NET applications. I've even gone so far as to promise them as giving immunity against SQL injection attacks.\nBut I'm starting to wonder if this really ...
I have a unit test that works fine locally but when uploaded to TeamCity build server fails with "The process cannot access the file because it is being used by another process." Before I do anything in the Test I check in the setup if the file exists and if so try to delete it. This fails with the same error message...
It's not uncommon to encounter file access issues in CI/CD environments like TeamCity, especially if multiple tests or processes are trying to access the same file concurrently. Here are some suggestions to help you troubleshoot and potentially resolve the issue: ### 1. **Check for Parallel Test Execution** Make sure ...
38,362
[ { "from": "human", "value": "I have a unit test that works fine locally but when uploaded to TeamCity build server fails with \"The process cannot access the file because it is being used by another process.\"\n\nBefore I do anything in the Test\nI check in the setup if the file\nexists and if so try to de...
What does RESTful Authentication mean and how does it work? I can't find a good overview on Google. My only understanding is that you pass the session key (remeberal) in the URL, but this could be horribly wrong.
RESTful authentication refers to a method of managing user authentication in a RESTful (Representational State Transfer) web service. In RESTful services, the primary means of communicating is through stateless HTTP requests, where the server does not maintain a session for each client. Instead, authentication is typic...
37,815
[ { "from": "human", "value": "What does RESTful Authentication mean and how does it work? I can't find a good overview on Google. My only understanding is that you pass the session key (remeberal) in the URL, but this could be horribly wrong.\n" }, { "from": "gpt", "value": "RESTful authenticat...
I hope this is the right place to ask[1], but I've read a lot of good comments on other topics here so I'll just ask. At the moment I'm searching for a topic for my dissertation (Ph.d in non-german countries I think), which must have to do something with parallelism or concurrency, etc. but otherwise I'm quite free to ...
Hi Michael, It's great to see your enthusiasm for exploring topics in parallelism and concurrency! Here are some potential dissertation topics that might align with your interests in parallel functional programming languages and virtual machines, while also steering clear of areas already well-trodden: 1. **Concurren...
36,399
[ { "from": "human", "value": "I hope this is the right place to ask[1], but I've read a lot of good comments on other topics here so I'll just ask. At the moment I'm searching for a topic for my dissertation (Ph.d in non-german countries I think), which must have to do something with parallelism or concurren...
Let's say I'm developing an application that installs COM component and installer registers them. This works great. Now the software is required to run from a memory stick. How can I register my libraries runtime and make sure, that the registry is cleaned up after running the application?
Running a COM component from a memory stick (USB drive) introduces some challenges, especially regarding registration and cleanup of registry entries. Here’s a general approach to achieve this: ### 1. **Dynamic Registration:** Instead of relying on static registration during installation, you can dynamically regist...
35,986
[ { "from": "human", "value": "Let's say I'm developing an application that installs COM component and installer registers them. This works great.\nNow the software is required to run from a memory stick. How can I register my libraries runtime and make sure, that the registry is cleaned up after running the ...
This is kind of a brainteaser question, since the code works perfectly fine as-is, it just irritates my aesthetic sense ever so slightly. I'm turning to Stack Overflow because my own brain is failing me right now. Here's a snippet of code that looks up an address using the Google Maps JS API and places a marker on a ma...
Certainly! You can refactor the code to eliminate the redundancy and make it handle an arbitrary number of backup addresses. One way to achieve this is by creating a function that will handle the geocoding process. This function can be called recursively for each address until a valid point is found or all addresses ha...
39,023
[ { "from": "human", "value": "This is kind of a brainteaser question, since the code works perfectly fine as-is, it just irritates my aesthetic sense ever so slightly. I'm turning to Stack Overflow because my own brain is failing me right now.\nHere's a snippet of code that looks up an address using the Goog...
I'm looking for suggestions for a PHP: calendar control/widget that I can embed on a web page to enable users to select dates. A datepicker. calendar software that will provide weekly calendar view, similar to what Microsoft Outlook provides. It should display days of the week in columns and rows representing timesl...
Here are a few suggestions for a PHP datepicker and a calendar widget that can meet your requirements: ### PHP Datepicker Widgets 1. **jQuery UI Datepicker** - **Description:** A lightweight and simple datepicker that can easily be embedded in a PHP application. It's easy to customize and can be integrated with va...
38,876
[ { "from": "human", "value": "I'm looking for suggestions for a PHP:\n\ncalendar control/widget that I can embed on a web page to enable users to select dates. A datepicker.\ncalendar software that will provide weekly calendar view, similar to what Microsoft Outlook provides. It should display days of the ...
I try to build a gui (Swing) for a simple java application. The application should have a start window like a menu. From there I would like to navigate to several other windows. My question is what is the best-practice to achieve such a navigation? Should I build several JFrames and switch the visibility of them on/of...
When building a GUI application in Java using Swing, the best practice for managing navigation between different views is to use a single `JFrame` with multiple `JPanel` components. Here’s why this approach is generally favored: 1. **Resource Efficiency**: Creating and destroying multiple `JFrame` instances can be res...
38,159
[ { "from": "human", "value": "I try to build a gui (Swing) for a simple java application. The application should have a start window like a menu. From there I would like to navigate to several other windows. \nMy question is what is the best-practice to achieve such a navigation? Should I build several JFram...
I am trying my hardest to define a list of CodeAnalysisRules that should be omitted from the Code Analysis tools when MSBuild executes my TFSBuild.proj file. But each time I test it, my list of Code Analysis Rules to exclude are ignored and Team Build just simply honors the Code Analysis Rules settings for each project...
In Team Foundation Server (TFS) 2008, when you want to configure a shared set of Code Analysis rules to exclude for all projects in your TFSBuild.proj file, you need to ensure you're properly specifying the rules in the build process. Below is an example that illustrates how to achieve this. ### Example TFSBuild.proj ...
34,465
[ { "from": "human", "value": "I am trying my hardest to define a list of CodeAnalysisRules that should be omitted from the Code Analysis tools when MSBuild executes my TFSBuild.proj file.\nBut each time I test it, my list of Code Analysis Rules to exclude are ignored and Team Build just simply honors the Cod...
I am looking for a good menu to use in an ASP.NET. I am currently using the asp menu. I need it to work in IE 6,7,8, Firefox and Safari. I also need it to not add a lot of overhead to the page client-side. I need to be able to load it from the database.
When creating a menu for an ASP.NET application that needs to support multiple browsers like IE 6, 7, 8, Firefox, and Safari, while ensuring minimal client-side overhead, you might want to consider using a combination of server-side rendering and simple JavaScript/CSS for presentation and interactivity. Here's a gener...
36,163
[ { "from": "human", "value": "I am looking for a good menu to use in an ASP.NET. I am currently using the asp menu. I need\nit to work in IE 6,7,8, Firefox and Safari. I also need it to not add a lot of overhead to the page client-side. I need to be able to load it from the database.\n" }, { "from": ...
In my models, there are lots of attributes and methods that perform some calculation based on the model instance's attributes. I've been having the methods return nil if the attributes that the calculations depend on are nil. As a consequence of this design decision, I'm doing a lot of nil checks before displaying th...
This is a common design dilemma in object-oriented programming, especially when dealing with calculations that might depend on attributes that can be `nil`. Here are some considerations and patterns that can help you decide between returning `nil` or `0`, as well as alternatives to reduce the number of checks in your v...
34,671
[ { "from": "human", "value": "In my models, there are lots of attributes and methods that perform some calculation based on the model instance's attributes. I've been having the methods return nil if the attributes that the calculations depend on are nil. As a consequence of this design decision, I'm doing...
I've been trying to solve this for weeks... My Goal is to search my inbox for the following messages: Hello Hi Hey Im using three files to do this for me. The first, a .forward file in my $HOME "|IFS=' '&&exec usr/bin/procmail||exit 75 #username" And these two are in my ~/.procmail directory .procmailrc VERBOSE=off ...
It sounds like you're working hard to set up Procmail to filter your email based on specific criteria. Let's troubleshoot the components one by one to see where things might be going wrong. ### 1. Check Procmail Installation Ensure that Procmail is installed correctly on your system. You can check this by running: ``...
35,839
[ { "from": "human", "value": "I've been trying to solve this for weeks...\nMy Goal is to search my inbox for the following messages:\nHello\nHi\nHey\n\nIm using three files to do this for me. The first, a .forward file in my $HOME\n\"|IFS=' '&&exec usr/bin/procmail||exit 75 #username\"\n\nAnd these two are i...
I have problem with labels inside a fieldset (feedback form). It is correctly shown in Firefox, Opera, IE6, but it looks ugly in IE7 See this page here. You can also find pg.css (main ccs file), ie6.css, ie.css. HTML code: <fieldset> <legend>Вы можете отправить нам вопрос прямо с этой страницы, заполнив форму</lege...
It sounds like you're encountering layout issues in Internet Explorer 7, particularly with the way form labels and a border are rendered. Here are some suggestions to address the problems you've outlined: ### 1. Labels inside Fieldset The layout of labels may be affected by the `float` property. Here's a modified app...
36,474
[ { "from": "human", "value": "I have problem with labels inside a fieldset (feedback form). It is correctly shown in Firefox, Opera, IE6, but it looks ugly in IE7 See this page here.\nYou can also find pg.css (main ccs file), ie6.css, ie.css.\nHTML code:\n<fieldset>\n <legend>Вы можете отправить нам вопро...
This question is about "best use" scenarios in projects with ORMs like NHibernate, Subsonic, Linq2SQL, etc... All of these tools generate basic entity classes, some with attributes, others without. Do people use these classes as their business classes? Or is there wholesale copying of data from ORM generated classes ...
When working with Object-Relational Mappers (ORMs) like NHibernate, Subsonic, or Linq2SQL, there are several approaches regarding how to handle the generated entity classes and their relationship to business logic. Here are some common practices and considerations: ### 1. **Use Generated Classes as Business Classes** ...
39,089
[ { "from": "human", "value": "This question is about \"best use\" scenarios in projects with ORMs like NHibernate, Subsonic, Linq2SQL, etc...\nAll of these tools generate basic entity classes, some with attributes, others without. Do people use these classes as their business classes? Or is there wholesale...
IDE: Microsoft Visual Studio Professional 2008 Language: C# Background: I have one form and two groupboxes that are going to be used as preference catagory groupboxes. My problem is that everytime I drag one groupbox on top of the other (hide/show groupboxes upon listview catagory select), the base groupbox auto-parent...
In Microsoft Visual Studio 2008, when you drag one `GroupBox` over another in the designer, it can lead to an unintended behavior where the dragged `GroupBox` becomes a child of the other one. This is because Visual Studio interprets the drag action as a desire to nest the controls. Unfortunately, there is no direct se...
39,232
[ { "from": "human", "value": "IDE: Microsoft Visual Studio Professional 2008\nLanguage: C#\nBackground:\nI have one form and two groupboxes that are going to be used as preference catagory groupboxes. My problem is that everytime I drag one groupbox on top of the other (hide/show groupboxes upon listview cat...
We're implementing a hosted Windows SharePoint Services 3.0 system and I need to limit the number of users that a customer can give access to a site collection. A customer should be able to manage his entire site collection. He should just not be able to delete the site collection itself or add more than a given number...
In Windows SharePoint Services (WSS) 3.0, while you can set storage quotas and manage site collection settings, there is no built-in feature to directly limit the number of users that a customer can add to their site collection. However, you can implement some custom solutions and strategies to achieve this objective. ...
38,984
[ { "from": "human", "value": "We're implementing a hosted Windows SharePoint Services 3.0 system and I need to limit the number of users that a customer can give access to a site collection.\nA customer should be able to manage his entire site collection. He should just not be able to delete the site collect...
I need to create a code editor for my own simple language: className.MethodName(parameterName = 2, ... ) I've created the appropriate grammar and autogenerate parser using ANTLR tool. Now I would like to have an autocomplete for class, method, variables and parameter names. This list should be context dependent, f.e. f...
Your approach to using ANTLR to parse the code for autocompletion is valid, but you're right that parsing incomplete code can lead to challenges. Here are several strategies that you can implement to provide context-dependent autocompletion while gracefully handling incomplete or erroneous code: ### 1. **Use a Partial...
36,751
[ { "from": "human", "value": "I need to create a code editor for my own simple language:\nclassName.MethodName(parameterName = 2, ... )\nI've created the appropriate grammar and autogenerate parser using ANTLR tool. Now I would like to have an autocomplete for class, method, variables and parameter names. Th...
Is there a way to use these operators to input and output binary data? The reason I want to do this is that it makes the code readable. Ex: infile >> filedecrypter >> metadataparser >> audiodecoder >> effects >> soundplayer;
Yes, you can use operators to input and output binary data in C++ by overloading the stream insertion (`>>`) and extraction (`<<`) operators. This approach can indeed enhance the readability of your code, especially when working with a series of data transformations or processing steps. Here’s a general outline of how...
35,858
[ { "from": "human", "value": "Is there a way to use these operators to input and output binary data? The reason I want to do this is that it makes the code readable. \nEx: infile >> filedecrypter >> metadataparser >> audiodecoder >> effects >> soundplayer;\n" }, { "from": "gpt", "value": "Yes, yo...
I want to use a "spin button control" (also known as an up-down control) in my Delphi Win 32 application (I'm using Delphi 2007). The aim is to have a control that looks like in Microsoft Office: image of up/down control in Powerpoint. http://img167.imageshack.us/my.php?image=updownzn8.png I found this on the Microsof...
In Delphi 2007, the built-in `TSpinEdit` control may not meet your design requirements, particularly if you're looking for a more polished, Office-like appearance. However, you can use the Windows Common Controls to implement a more visually appealing spin button control. Here’s a method to achieve that using the `Crea...
35,693
[ { "from": "human", "value": "I want to use a \"spin button control\" (also known as an up-down control) in my Delphi Win 32 application (I'm using Delphi 2007). \nThe aim is to have a control that looks like in Microsoft Office:\nimage of up/down control in Powerpoint. http://img167.imageshack.us/my.php?ima...
System.Diagnostics.Process.Start() is throwing intermittent System.ComponentModel.Win32Exception: No application is associated with the specified file for this operation. The file is a .doc file. They are always able to open it manually (double-click). What could be the problem? Thanks
The error you're encountering when using `System.Diagnostics.Process.Start()` to open `.doc` files intermittently is often linked to how the operating system handles file associations, or it may be due to environmental factors. Here are several potential causes and solutions to consider: ### Potential Causes 1. **Fil...
36,747
[ { "from": "human", "value": "System.Diagnostics.Process.Start() is throwing intermittent System.ComponentModel.Win32Exception: No application is associated with the specified file for this operation.\nThe file is a .doc file.\nThey are always able to open it manually (double-click).\nWhat could be the probl...
I'm building a full-screen demo where I need to simulate a YouTube video. I dragged a video that plays an external .flv file. It works fine if the stage isn't set to full-screen. But I need to set the stage to full-screen like this: stage.displayState = StageDisplayState.FULL_SCREEN; stage.scaleMode = StageScaleMode.NO...
It sounds like you're trying to play an external FLV video in full-screen mode using Flash CS3, and you're encountering a black screen when the video should play. Here are some steps and considerations that might help you solve the issue: 1. **Set Up Video Properly:** Ensure that the video is set up correctly in yo...
38,962
[ { "from": "human", "value": "I'm building a full-screen demo where I need to simulate a YouTube video. I dragged a video that plays an external .flv file.\nIt works fine if the stage isn't set to full-screen. But I need to set the stage to full-screen like this:\nstage.displayState = StageDisplayState.FULL_...
There doesn't seem to be much info on this topic so I'm going to outline my specific problem then maybe we can shape the question and the answer into something a bit more universal. I have this rewrite rule RewriteEngine On RewriteBase /bookkeepers/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-...
It sounds like the issue you're experiencing arises from how the trailing slash is being handled in your rewrite rules. When you have a trailing slash, it's being appended to the `franchise` variable, resulting in the value `kings-lynn/` instead of `kings-lynn`. This may also affect how relative paths for your CSS and ...
37,448
[ { "from": "human", "value": "There doesn't seem to be much info on this topic so I'm going to outline my specific problem then maybe we can shape the question and the answer into something a bit more universal.\nI have this rewrite rule\nRewriteEngine On\nRewriteBase /bookkeepers/\nRewriteCond %{REQUEST_FIL...
I have an application that needs to hit the ActiveDirectory to get user permission/roles on startup of the app, and persist throughout. I don't want to hit AD on every form to recheck the user's permissions, so I'd like the user's role and possibly other data on the logged-in user to be globally available on any form ...
When designing a Windows application that needs to manage user permissions and roles from Active Directory (AD), it's important to find a balance between performance and maintainability. You rightly want to avoid frequent hits to the AD while ensuring that user properties are easily accessible across different forms in...
36,462
[ { "from": "human", "value": "I have an application that needs to hit the ActiveDirectory to get user permission/roles on startup of the app, and persist throughout. \nI don't want to hit AD on every form to recheck the user's permissions, so I'd like the user's role and possibly other data on the logged-in ...
We use a base entity with properties such as version (datetime needed for NHibernate) and guid (as key). It also has an Id (int) field with two functions. Firstly to relate to legacy application key if there is one. Secondly as a shorthand code: for instance files are sometimes created based on these which would look...
When considering whether to up-type your `Id` field from `int` to `Int64` (also known as `long` in C#), there are several factors to weigh beyond just performance. Here are some considerations that might influence your decision: ### 1. **Data Type Size and Memory Usage:** - **Memory Usage:** An `int` occupies 4 byt...
37,421
[ { "from": "human", "value": "We use a base entity with properties such as version (datetime needed for NHibernate) and guid (as key).\nIt also has an Id (int) field with two functions. Firstly to relate to legacy application key if there is one. Secondly as a shorthand code: for instance files are sometim...
I have HTML that includes symbols such as the Trademark "TM" as superscript (™). In normal HTML, I would use "&trade;" or &#153; to display the Trademark TM. However, I can find no way to import HTML like this into Flex and have it displayed correctly. I am having similar issues with the <li> tag. My HTML: <p>This info...
To display HTML content including special characters and tags like `<li>` in a Flex application without having to hardcode it, you can follow a few approaches. Since you're looking to keep your content external and avoid using `<iframe>`, here are a couple of methods you can consider: ### 1. Loading and Parsing HTML w...
36,321
[ { "from": "human", "value": "I have HTML that includes symbols such as the Trademark \"TM\" as superscript (™). In normal HTML, I would use \"&trade;\" or &#153; to display the Trademark TM. However, I can find no way to import HTML like this into Flex and have it displayed correctly. I am having similar is...
Say each row in a table has data pertaining to one particular user. The user has a password to access the system. How do I encrypt a column of data using InnoDB so that no one other than the user who's data it is can read the data ? I was thinking of something like using one of the MySQL encryption functions (say AES) ...
You’re on the right track thinking about encrypting user-specific data with a key derived from the user's password. However, you also correctly identified the challenge of handling password changes and potential data loss. Let's go through a design that addresses these points: ### Steps for User-Specific Data Encrypti...
36,857
[ { "from": "human", "value": "Say each row in a table has data pertaining to one particular user. The user has a password to access the system.\nHow do I encrypt a column of data using InnoDB so that no one other than the user who's data it is can read the data ? I was thinking of something like using one of...
Today I ran XtUnit at a part of my unit testing framework to to rollback database changes created while running a test case. This is a skeleton of how I have used it. The Test case ran successfully but the database state changed as a result. using NUnit.Framework; using TeamAgile.ApplicationBlocks.Interception; using...
It sounds like you are trying to use the `DataRollBack` attribute to ensure that any database changes made during your unit test are rolled back after the test completes. However, if the database state is still changing despite using `DataRollBack`, there could be several factors causing this issue. Here are some step...
37,445
[ { "from": "human", "value": "Today I ran XtUnit at a part of my unit testing framework to to rollback database changes created while running a test case. This is a skeleton of how I have used it. The Test case ran successfully but the database state changed as a result. \nusing NUnit.Framework;\nusing Team...
My function is pretty much a standard search function... I've included it below. In the function I have 1 line of code responsible for weeding out Repart NTFS points. if (attributes.ToString().IndexOf("ReparsePoint") == -1) The problem is now I am getting an error Access to the path 'c:\System Volume Information' is...
The error you're experiencing, "Access to the path 'c:\System Volume Information' is denied," indicates that your code is attempting to access a directory that requires elevated permissions (usually administrator privileges). In Windows, the `System Volume Information` directory is used by the operating system to store...
39,462
[ { "from": "human", "value": "My function is pretty much a standard search function... I've included it below.\nIn the function I have 1 line of code responsible for weeding out Repart NTFS points. \nif (attributes.ToString().IndexOf(\"ReparsePoint\") == -1)\n\nThe problem is now I am getting an error \nAcce...
I have a database of strings (arbitrary length) which holds more than one million items (potentially more). I need to compare a user-provided string against the whole database and retrieve an identical string if it exists or otherwise return the closest fuzzy match(es) (60% similarity or better). The search time should...
Building an efficient solution for comparing a user-provided string against a large database of strings and returning either an exact or fuzzy match can be challenging, especially with a dataset of over one million items. Here are some strategies and suggestions to optimize your approach: ### 1. **Use a Suitable Data ...
36,040
[ { "from": "human", "value": "I have a database of strings (arbitrary length) which holds more than one million items (potentially more).\nI need to compare a user-provided string against the whole database and retrieve an identical string if it exists or otherwise return the closest fuzzy match(es) (60% sim...
The question is actually about stack overflows in C. I have an assigment that I can not get done for the life of me, I've looked at everything in the gdb and I just cant figure it. The question is the following: int i,n; void confused() { printf("who called me"); exit(0); } void shell_call(char *c) { pri...
The challenge you are facing revolves around manipulating the stack to control the parameters that get passed to the `shell_call` function after successfully redirecting the flow of execution to it. Since you're working with a vulnerable function that can be exploited using a stack overflow, let’s break down how you ca...
33,748
[ { "from": "human", "value": "The question is actually about stack overflows in C. \nI have an assigment that I can not get done for the life of me, I've looked at everything in the gdb and I just cant figure it.\nThe question is the following:\nint i,n;\n\nvoid confused()\n{\n printf(\"who called me\");\...
I have to read a txt file with lines formated like this: 1: (G, 2), (F, 3) 2: (G, 2), (F, 3) 3: (F, 4), (G, 5) 4: (F, 4), (G, 5) 5: (F, 6), (c, w) 6: (p, f), (G, 7) 7: (G, 7), (G, 7) w: (c, w), (c, w) Each line will feed a struct with its data (the 5 numbers or letters in it). What's the best way to read the line and...
To read and parse the lines in your text file efficiently and cleanly, you can use functions from the C standard library that are better suited for this purpose than manually checking each character with `fgetc`. Specifically, `fscanf` or `sscanf` can help you parse the structured data directly. Here’s a simple approac...
33,756
[ { "from": "human", "value": "I have to read a txt file with lines formated like this:\n\n1: (G, 2), (F, 3)\n2: (G, 2), (F, 3)\n3: (F, 4), (G, 5)\n4: (F, 4), (G, 5)\n5: (F, 6), (c, w)\n6: (p, f), (G, 7)\n7: (G, 7), (G, 7)\nw: (c, w), (c, w)\n\nEach line will feed a struct with its data (the 5 numbers or lett...
I've worked with designing databases for a loooong time, and these days I'm working in C# too. OO makes sense to me, but I don't feel that I have a good grounding in the deep theory of OO design. In database land, there's a lot of theory around how to design the structure of a database, the main notion being normalisa...
You're on the right track by recognizing that there isn't a singular "Grand Theory of OO Design" like normalization in databases, but rather a set of principles and guidelines that can help steer you toward good object-oriented design. Here are some of the fundamental concepts and principles that are often referenced i...
29,112
[ { "from": "human", "value": "I've worked with designing databases for a loooong time, and these days I'm working in C# too. OO makes sense to me, but I don't feel that I have a good grounding in the deep theory of OO design.\nIn database land, there's a lot of theory around how to design the structure of a...
I've downloaded the source for SubSonic via SVN. When I try to open the project in Visual Studio 2008, it converts the solution, loads all the projects then disappears without an error message. Subsequent loads of the solution do the same. If I run devenv /safemode and then open the project it works fine, but I can't u...
It looks like you're encountering a fatal execution engine error when trying to open the SubSonic project in Visual Studio 2008, which can often indicate an issue with the installed environment, extensions, or specific project configurations. Here are some steps you can take to help track down and resolve the issue: 1...
37,798
[ { "from": "human", "value": "I've downloaded the source for SubSonic via SVN. When I try to open the project in Visual Studio 2008, it converts the solution, loads all the projects then disappears without an error message. Subsequent loads of the solution do the same. If I run devenv /safemode and then open...
I am using a microcontroller with a C51 core. I have a fairly timeconsuming and large subroutine that needs to be called every 500ms. An RTOS is not being used. The way I am doing it right now is that I have an existing Timer interrupt of 10 ms. I set a flag after every 50 interrupts that is checked for being true in ...
To ensure that a subroutine is called exactly every 500 ms without an RTOS, you have a few options. However, the challenge here is that your subroutine takes a variable amount of time to execute, which can lead to timing inaccuracies when using a flag-based approach with a 10 ms timer interrupt. Here's one approach th...
31,748
[ { "from": "human", "value": "I am using a microcontroller with a C51 core. I have a fairly timeconsuming and large subroutine that needs to be called every 500ms. An RTOS is not being used. \nThe way I am doing it right now is that I have an existing Timer interrupt of 10 ms. I set a flag after every 50 int...
I've done a good bit of research to find an upload component for .NET that I can use to upload large files, has a progress bar, and can resume the upload of large files. I've come across some components like AjaxUploader, SlickUpload, and PowUpload, to name a few. Each of these options cost money and only PowUpload d...
Yes, it is indeed possible to implement resumable file uploads in .NET without relying on Flash, Java, or Silverlight. You can achieve this with standard HTML5 APIs and JavaScript for the front end, along with a .NET backend (using an `HttpHandler` or an ASP.NET controller) to handle the uploads. ### 1. Resumable File...
34,606
[ { "from": "human", "value": "I've done a good bit of research to find an upload component for .NET that I can use to upload large files, has a progress bar, and can resume the upload of large files. I've come across some components like AjaxUploader, SlickUpload, and PowUpload, to name a few. Each of thes...
I must confess I'm somewhat of an OOP skeptic. Bad pedagogical and laboral experiences with object orientation didn't help. So I converted into a fervent believer in Visual Basic (the classic one!). Then one day I found out C++ had changed and now had the STL and templates. I really liked that! Made the language useful...
Your skepticism about inheritance in object-oriented programming (OOP) is shared by many developers, especially those who have experienced the pitfalls of deep inheritance hierarchies or the fragility of tightly coupled systems. The preference for composition over inheritance has indeed gained traction, especially afte...
31,432
[ { "from": "human", "value": "I must confess I'm somewhat of an OOP skeptic. Bad pedagogical and laboral experiences with object orientation didn't help. So I converted into a fervent believer in Visual Basic (the classic one!).\nThen one day I found out C++ had changed and now had the STL and templates. I r...
How can I create a scheduled task to run a PHP file? Yes, I filled out everything in the scheduled task, but it still doesn't work. Run: "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\WEB\4w_website\save.php" Start in: "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\WEB\4w_website" It jus...
To run a PHP file using Windows Task Scheduler, you need to call the PHP interpreter explicitly, rather than trying to run the PHP file directly. When you double-click on a `.php` file, Windows tries to open it with the associated application (like Notepad), which is why you're seeing that behavior. Here's how you can...
37,911
[ { "from": "human", "value": "How can I create a scheduled task to run a PHP file?\nYes, I filled out everything in the scheduled task, but it still doesn't work.\n\nRun: \"C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\WEB\\4w_website\\save.php\"\nStart in: \"C:\\Program Files\\Apache Sof...
I am reworking some ui in an application written by freelance .Net developers from another country. I am not going to go into how bad the code is and entangled the code with structure content and presentation are... But one of the things I notice is that menu for accessing the parts of the app is made with Button co...
Using `Button` controls to navigate between different parts of an application is not uncommon in ASP.NET Web Forms applications, particularly when server-side actions are required. However, there are several considerations to keep in mind when transitioning from `Button` controls to `LinkButton` controls or `Link` cont...
34,808
[ { "from": "human", "value": "I am reworking some ui in an application written by freelance .Net developers from another country. \nI am not going to go into how bad the code is and entangled the code with structure content and presentation are... \nBut one of the things I notice is that menu for accessing ...
I'm about to get started converting a C# based desktop app to be web based. For a couple of reasons, I would like to cut the GUI from the logic via a web service. Microsoft has asmx files, WCF, and probably something new at PDC next week. Data can be passed via SOAP, REST, JSON, and probably 12 other ways as well. C...
When converting your C# desktop application to a web-based architecture and separating the GUI from the business logic via a web service, here are the recommended technologies and frameworks you should consider in the .NET ecosystem: ### 1. **ASP.NET Core** - **What it is**: ASP.NET Core is a modern, high-performan...
36,535
[ { "from": "human", "value": "I'm about to get started converting a C# based desktop app to be web based. For a couple of reasons, I would like to cut the GUI from the logic via a web service. Microsoft has asmx files, WCF, and probably something new at PDC next week. Data can be passed via SOAP, REST, JS...
What's the most common way to deal with a series of block elements that need to be on a line (if javascript needs to be able to modify their widths, for example)? What are the pros and cons to applying float:left to each of them vs. using positioning to place them?
When dealing with a series of block elements that need to appear in a single line, you generally have a couple of common approaches: using `float:left` or `display: inline-block` or using CSS Grid or Flexbox. Below, I'll specifically compare using `float:left` and positioning, particularly `absolute` or `relative` posi...
36,239
[ { "from": "human", "value": "What's the most common way to deal with a series of block elements that need to be on a line (if javascript needs to be able to modify their widths, for example)? What are the pros and cons to applying float:left to each of them vs. using positioning to place them?\n" }, { ...