instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
this is my old code protected override bool OnPreAction(string actionName, System.Reflection.MethodInfo methodInfo) { if ("|Register|RegisterPage|Login|LoginPage|Logout|Service".ToLower().Contains(actionName.ToLower())) { return base.OnPreAction(actionName, methodInfo); } ...
Your code seems to be part of a framework for handling actions in a web application, likely written in C#. The `OnPreAction` method is being overridden to perform authentication checks before executing specific actions. Here’s a breakdown of your code and some suggestions for improvements: ### Breakdown of Your Code: ...
28,584
[ { "from": "human", "value": "this is my old code\n\n protected override bool OnPreAction(string actionName, System.Reflection.MethodInfo methodInfo)\n {\n if (\"|Register|RegisterPage|Login|LoginPage|Logout|Service\".ToLower().Contains(actionName.ToLower()))\n {\n return base....
Are there any good team-chat websites, preferably in Python, ideally with CherryPy or Trac? This is similar to https://stackoverflow.com/questions/46612/whats-a-good-freeware-collaborative-ie-multiuser-instant-messenger#46660, but a few primary differences: 1) I very much want to host the server. 2) I don't care if Smi...
There are a few Python-based solutions for team chat that you can host yourself. Although they may not fit every specification perfectly, they provide a good start for what you're looking for. Here are a few options: ### 1. **Django Channels with Django** - **Description**: Django Channels extends Django to handle Web...
28,818
[ { "from": "human", "value": "Are there any good team-chat websites, preferably in Python, ideally with CherryPy or Trac?\nThis is similar to https://stackoverflow.com/questions/46612/whats-a-good-freeware-collaborative-ie-multiuser-instant-messenger#46660, but a few primary differences:\n1) I very much want...
For general code, do I really need to dispose an object? Can I just ignore it for the most part or is it a good idea to always dispose an object when your 100% sure you don't need it anymore?
In general programming, the need to dispose of an object depends on several factors, including the programming language you're using, the type of objects, and how memory management is handled in that environment. Here's a breakdown of key concepts: ### 1. **Garbage-Collected Languages (e.g., C#, Java, Python)** In la...
28,145
[ { "from": "human", "value": "For general code, do I really need to dispose an object? Can I just ignore it for the most part or is it a good idea to always dispose an object when your 100% sure you don't need it anymore? \n" }, { "from": "gpt", "value": "In general programming, the need to dis...
This query is related to this one I asked yesterday. I have a radio button list on my asp.net page defined as follows: <asp:RadioButtonList ID="rdlSortBy" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow" AutoPostBack="True" > <asp:ListItem Selected="True">Name</asp:ListItem> <asp:ListI...
The issue you're experiencing stems from the way you're trying to prevent the postback in your JavaScript function. In your current implementation, the `onclick` event handler is not preventing the postback even if the validations fail. In JavaScript, returning `false` from an event handler typically prevents the defa...
28,223
[ { "from": "human", "value": "This query is related to this one I asked yesterday.\nI have a radio button list on my asp.net page defined as follows: \n<asp:RadioButtonList ID=\"rdlSortBy\" runat=\"server\" RepeatDirection=\"Horizontal\" RepeatLayout=\"Flow\" AutoPostBack=\"True\" >\n <asp:ListItem ...
I want to create a model, that will set editable=False on creation, and editable=True on editing item. I thought it should be something like this: home = models.ForeignKey(Team, editable=lambda self: True if self.id else False) But it doesn't work. Maybe something with overriding the init can help me, but i don't su...
In Django, the `editable` attribute of model fields is static and cannot be dynamically set based on the instance state (like whether an object is being created or edited). However, you can achieve the desired behavior by customizing the Django admin interface. To set a field as editable only upon editing (and not dur...
30,311
[ { "from": "human", "value": "I want to create a model, that will set editable=False on creation, and editable=True on editing item. I thought it should be something like this: \n home = models.ForeignKey(Team, editable=lambda self: True if self.id else False)\n\nBut it doesn't work. Maybe something with ove...
How would you write a non-recursive algorithm to compute n!?
You can compute \( n! \) (n factorial) using a non-recursive (iterative) algorithm. The factorial of a non-negative integer \( n \) is the product of all positive integers up to \( n \). Here's a simple iterative algorithm to compute \( n! \): ### Algorithm 1. Initialize a variable `result` to 1. This will hold the f...
33,104
[ { "from": "human", "value": "How would you write a non-recursive algorithm to compute n!?\n" }, { "from": "gpt", "value": "You can compute \\( n! \\) (n factorial) using a non-recursive (iterative) algorithm. The factorial of a non-negative integer \\( n \\) is the product of all positive intege...
I have a CMFCRibbonStatusBar in my mainframe to which I add a CMFCRibbonButtonsGroup which again has a CMFCRibbonButton. This button has the same ID as a menu entry. Creating the button is done as follows: CMFCRibbonButtonsGroup* pBGroup = new CMFCRibbonButtonsGroup(); CMFCToolBarImages images; images.SetImageSize(CSi...
To add tooltips to a `CMFCRibbonButton` that serves as a status indicator in your `CMFCRibbonStatusBar`, you can implement the following steps. The goal is to set a tooltip that updates when the status changes and displays when the user hovers over the button. 1. **Enable Tooltips for the Ribbon Button**: Ensure that ...
27,495
[ { "from": "human", "value": "I have a CMFCRibbonStatusBar in my mainframe to which I add a CMFCRibbonButtonsGroup which again has a CMFCRibbonButton. This button has the same ID as a menu entry.\nCreating the button is done as follows:\nCMFCRibbonButtonsGroup* pBGroup = new CMFCRibbonButtonsGroup();\n\nCMFC...
How would you maintain the legacy applications that: Has no unit tests have big methods with a lot of duplicated logic have have No separation of concern have a lot of quick hacks and hard coded strings have Outdated and wrong documentation Requirements are not properly documented! This has actually resulted in disput...
Maintaining a legacy application with the issues you've outlined can be challenging, but with a systematic approach, you can start to address these problems progressively. Here's a strategy you can follow: ### 1. **Assessment and Documentation** #### a. Code Audit - **Understand the Current State**: Perform a thoroug...
28,024
[ { "from": "human", "value": "How would you maintain the legacy applications that:\n\nHas no unit tests have big methods\nwith a lot of duplicated logic have\nhave No separation of concern\nhave a lot of quick hacks and hard coded\nstrings\nhave Outdated and wrong\ndocumentation\nRequirements are not properl...
What control type should I use - Image, MediaElement, etc.?
The control type you should use depends on the specific requirements of your application and the context in which you need to display or manipulate the content. Here's a breakdown of common control types and when to use them: 1. **Image**: - **Use When**: You need to display a static image (e.g., JPG, PNG, GIF). ...
28,402
[ { "from": "human", "value": "What control type should I use - Image, MediaElement, etc.?\n" }, { "from": "gpt", "value": "The control type you should use depends on the specific requirements of your application and the context in which you need to display or manipulate the content. Here's a brea...
I am using an asp:Calander and I have an object that has a beginning date and an ending date. I need to get all the dates between these two dates and place them in an array so i can then render corresponding dates on the calander with different CSS
To achieve this, you need to generate an array containing all the dates between the specified beginning and ending dates. Once you have this array, you can use it to render the dates on the ASP.NET Calendar control with different CSS. Here's a step-by-step guide on how to do this: ### Step 1: Generate the Array of Da...
21,794
[ { "from": "human", "value": "I am using an asp:Calander and I have an object that has a beginning date and an ending date. I need to get all the dates between these two dates and place them in an array so i can then render corresponding dates on the calander with different CSS\n" }, { "from": "gpt",...
How do i take a HTML site that currently has no doctype declaration and make it W3C compliant?
To make an HTML site W3C compliant by adding a doctype declaration, you can follow these steps: ### 1. Understand the Purpose of Doctype A doctype declaration informs the web browser about the version of HTML being used, which helps with proper rendering of the page. Without a doctype, browsers may enter "quirks mode,...
26,833
[ { "from": "human", "value": "How do i take a HTML site that currently has no doctype declaration and make it W3C compliant?\n" }, { "from": "gpt", "value": "To make an HTML site W3C compliant by adding a doctype declaration, you can follow these steps:\n\n### 1. Understand the Purpose of Doctype...
How do I sort the columns in a winforms datagrid control into alphabetical order? Thanks
To sort the columns in a WinForms DataGridView control into alphabetical order, you can follow these steps: 1. **Ensure Your Data is Bound**: Ensure that your DataGridView is bound to a data source (like a `DataTable`, `List`, etc.). 2. **Sort the Data**: You can sort the data in the underlying data source or use the...
24,647
[ { "from": "human", "value": "How do I sort the columns in a winforms datagrid control into alphabetical order?\nThanks\n" }, { "from": "gpt", "value": "To sort the columns in a WinForms DataGridView control into alphabetical order, you can follow these steps:\n\n1. **Ensure Your Data is Bound**:...
We are looking to store transactional data in SharePoint lists. The lists will easily grow to 100,000+ items. How would the query performance be compared with queries on a database table with these columns? Queries: Select by Id Select Where ColumnValue = X Group By OrderId Group By Date The SP List will be 6 columns...
When considering the performance of queries on SharePoint lists compared to database tables, several factors come into play, especially given your mention of lists potentially growing to over 100,000 items. Below, I provide a comparison based on your specific queries and the structure of your data. ### 1. **Select by ...
26,092
[ { "from": "human", "value": "\nWe are looking to store transactional data in SharePoint lists. The lists will easily grow to 100,000+ items.\nHow would the query performance be compared with queries on a database table with these columns?\n\nQueries:\nSelect by Id\nSelect Where ColumnValue = X\nGroup By Ord...
We have a weird intermittent problem with saving from Word 2007 to our SharePoint 2007 (MOSS) document libraries that gives a dialog box that never goes away - it is titled "Content Types" and the message "Getting list of available content types..." with a green progress-type bar that keeps scrolling. It happens a lot ...
It sounds like you're experiencing a frustrating and intermittent issue with saving documents from Word 2007 to SharePoint 2007, and you've already gathered a fair amount of information regarding the problem. Since this has been identified as a known issue by Microsoft, and a hotfix was targeted for release in February...
31,994
[ { "from": "human", "value": "We have a weird intermittent problem with saving from Word 2007 to our SharePoint 2007 (MOSS) document libraries that gives a dialog box that never goes away - it is titled \"Content Types\" and the message \"Getting list of available content types...\" with a green progress-typ...
I'm new to Flex, and I'm trying to write a simple application. I have a file with an image and I want to display this image on a Graphics. How do I do this? I tried [Embed]-ding it and adding as a child to the component owning the Graphics', but I'm getting a "Type Coercion failed: cannot convert ... to mx.core.IUIComp...
Welcome to Flex! To display an image on a Graphics object, you need to follow a slightly different approach than just embedding the image and trying to add it as a child to a Graphics component. Here's how you can properly display an embedded image using Flex. ### Step 1: Embed the Image First, you need to embed the i...
28,097
[ { "from": "human", "value": "I'm new to Flex, and I'm trying to write a simple application. I have a file with an image and I want to display this image on a Graphics. How do I do this? I tried [Embed]-ding it and adding as a child to the component owning the Graphics', but I'm getting a \"Type Coercion fai...
I have created a class for a dashboard item which will hold information such as placement on the dashboard, description, etc. I am currently using a pair of Collections to hold those dashboard items contained in the "library" and those items showing on the dashboard itself. I have been asked to make this dashboard mu...
Certainly! If you're looking to create a structure that allows you to manage multiple dashboard item collections (one for each tab), a collection of collections would be a great approach. You can create a `Dictionary` or a `Map` where the key is the tab name (or tab identifier) and the value is a collection of dashboa...
27,107
[ { "from": "human", "value": "I have created a class for a dashboard item which will hold information such as placement on the dashboard, description, etc. I am currently using a pair of Collections to hold those dashboard items contained in the \"library\" and those items showing on the dashboard itself. ...
I have a Excel Sheet(Say OG.xls) which has some data already in it with some 5000 rows with headings in the first row and Upto "AN" Columns. This No of rows(5000) doesn't change for a whole year. Now i have 5 XL files(Say A,B,C,D,E) and the data from these files has to be appended to this OG file just starting from 500...
To achieve your goal of appending data from multiple Excel files to a master Excel file (`OG.xls`), you can use Python with the `pandas` library. This library makes it easy to manipulate data in Excel files, and you can also use the `openpyxl` or `xlsxwriter` libraries to handle Excel file reading and writing. Below i...
26,039
[ { "from": "human", "value": "I have a Excel Sheet(Say OG.xls) which has some data already in it with some 5000 rows with headings in the first row and Upto \"AN\" Columns.\nThis No of rows(5000) doesn't change for a whole year.\nNow i have 5 XL files(Say A,B,C,D,E) and the data from these files has to be ap...
I am experiencing some strange behavior of embedded audio (wav file) on HTML page. I've got a page https://server.com/listen-to-sound, and a Wav file embedded in it via <EMBED/> tag, like this: <embed src='https://server.com/path-to-sound' hidden="true" autostart="true" /> The page https://server.com/listen-to-sound i...
It sounds like you're experiencing a challenging problem with audio playback in Internet Explorer 6 (IE6), which is known for its quirks and compatibility issues. Below are some suggestions and considerations that may help you troubleshoot the issue: ### 1. **Check the MIME Type** Ensure that the server hosting the WA...
29,045
[ { "from": "human", "value": "I am experiencing some strange behavior of embedded audio (wav file) on HTML page.\nI've got a page https://server.com/listen-to-sound, and a Wav file embedded in it via <EMBED/> tag, like this:\n<embed src='https://server.com/path-to-sound' hidden=\"true\" autostart=\"true\" />...
Using reflection on a method definition I would like to find out if the original method was defined with 'params' on the last parameter. So can I discover if the original definition was this... public void MyMethod(int x, params object[] args); ...and not this... public void MyMethod(int x, object[] args); My code ha...
To check if a method is defined with the `params` keyword in C#, you can use reflection to examine the parameters of the method. Specifically, you can check the `ParameterInfo` for the method to see if the last parameter is decorated with the `ParameterModifier` to indicate that it is a `params` parameter. Here's a st...
26,437
[ { "from": "human", "value": "Using reflection on a method definition I would like to find out if the original method was defined with 'params' on the last parameter. So can I discover if the original definition was this...\npublic void MyMethod(int x, params object[] args);\n\n...and not this...\npublic voi...
I'm working with a VB6 code base and I'm interested in beginning to generate documentation for future development efforts. I'm traditionally a Java developer and I've gotten quite used to the Javadoc system for generating such documentation. I found VB.DOC but from what I can see it's meant for a .NET environment. Are ...
Generating documentation for a VB6 codebase can be a bit more challenging compared to modern languages like Java, especially since VB6 does not have a standardized documentation system like Javadoc. However, there are still some tools and methods you can use to create documentation for your VB6 projects: 1. **VB6 Docu...
31,895
[ { "from": "human", "value": "I'm working with a VB6 code base and I'm interested in beginning to generate documentation for future development efforts. I'm traditionally a Java developer and I've gotten quite used to the Javadoc system for generating such documentation. I found VB.DOC but from what I can se...
While using Vim (at home and at work), I often find myself doing similar things repeatedly. For example, I may turn a bunch of CSV text into a series of SQL inserts. I've been using Vim for years, but only recently have I tried to seriously think about how I could improve my productivity while using it. My question is....
Certainly! Vim is a powerful tool for text manipulation, and you can improve your productivity by automating repetitive tasks. Here are some ways to store and execute commonly used command sequences in Vim, as well as how to share them with your coworkers: ### 1. **Vim Functions and Mappings** You can create custom V...
26,987
[ { "from": "human", "value": "While using Vim (at home and at work), I often find myself doing similar things repeatedly. For example, I may turn a bunch of CSV text into a series of SQL inserts. I've been using Vim for years, but only recently have I tried to seriously think about how I could improve my pro...
I've downloaded a tutorial that had fonts included in the source. When I try to build the project, I always get the following error message: Error 1 The font family "Joystick" could not be found. Please ensure the requested font is installed, and is a TrueType or OpenType font. The font was added via the con...
The error message you're encountering indicates that the application cannot find the specified font family, "Joystick." Here are several steps you can take to troubleshoot and resolve the issue: 1. **Verify Font Installation**: - Ensure that the "Joystick" font is properly installed on your system. You can check th...
31,508
[ { "from": "human", "value": "I've downloaded a tutorial that had fonts included in the source. When I try to build the project, I always get the following error message:\n\nError 1 The font family \"Joystick\"\n could not be found. Please ensure the\n requested font is installed, and is a\n TrueType o...
I'm at a client doing some quick fixes to their access application. It was a while I had a go with access, but I'm recovering quickly. However, I've discovered an interesting problem: For some reports, I get a "Record is deleted" error. I've checked the reports, and it seems like there's a problem with one table. When ...
It sounds like you've encountered a common issue in Microsoft Access databases where corruption can occur, leading to records showing as "#deleted". This is often indicative of a corruption in the database, particularly if you're unable to delete the record normally. Since you've found that simply using the compact/re...
31,696
[ { "from": "human", "value": "I'm at a client doing some quick fixes to their access application. It was a while I had a go with access, but I'm recovering quickly. However, I've discovered an interesting problem:\nFor some reports, I get a \"Record is deleted\" error. I've checked the reports, and it seems ...
i would like to release a snapshot project 'foo-1.0-SNAPSHOT' using the maven release plugin. The project depends on a 3rd party module 'bar-1.0-SNAPSHOT' which is not released yet. I use the option 'allowTimestampedSnapshots' in my project's pom.xml to allow timestamped snapshots but i assume that the 3rd party module...
When it comes to releasing a Maven project that depends on other SNAPSHOT versions, it can be a bit tricky, especially if those SNAPSHOT versions are not available in a remote repository. Unfortunately, the Maven Release Plugin typically does not support releasing a project with unresolved SNAPSHOT dependencies. Theref...
28,230
[ { "from": "human", "value": "i would like to release a snapshot project 'foo-1.0-SNAPSHOT' using the maven release plugin. The project depends on a 3rd party module 'bar-1.0-SNAPSHOT' which is not released yet.\nI use the option 'allowTimestampedSnapshots' in my project's pom.xml to allow timestamped snapsh...
I have multiple Network Interface Cards on my computer, each with its own IP address. When I use gethostbyname(gethostname()) from Python's (built-in) socket module, it will only return one of them. How do I get the others?
When you use `gethostbyname(gethostname())`, it only returns the primary IP address associated with the hostname of your machine. To retrieve all the IP addresses associated with the different Network Interface Cards (NICs) on your system, you can use the `socket` module in conjunction with the `netifaces` module (or o...
30,661
[ { "from": "human", "value": "I have multiple Network Interface Cards on my computer, each with its own IP address.\nWhen I use gethostbyname(gethostname()) from Python's (built-in) socket module, it will only return one of them. How do I get the others?\n" }, { "from": "gpt", "value": "When you...
I have Perl code which relies on Term::ReadKey to get the terminal width. My installation is missing this module, so I want to provide a default if the module isn't present rather than throw an exception. How can I conditionally use an optional module, without knowing ahead of time whether it is available. # but only i...
You can conditionally load the `Term::ReadKey` module in Perl using the `eval` block to catch any exceptions that may occur when attempting to `use` the module. If the module is not available, you can then provide a default behavior. Here’s how you can implement this: ```perl my $term_width; # Try to load the Term::R...
33,572
[ { "from": "human", "value": "I have Perl code which relies on Term::ReadKey to get the terminal width. My installation is missing this module, so I want to provide a default if the module isn't present rather than throw an exception.\nHow can I conditionally use an optional module, without knowing ahead of ...
In Python map() works on any data that follows the sequence protocol. It does The Right Thing^TM whether I feed it a string or a list or even a tuple. Can't I have my cake in OCaml too? Do I really have no other choice but to look at the collection type I'm using and find a corresponding List.map or an Array.map or a...
In OCaml, the approach to mapping over collections is indeed more explicit than in Python, where the `map()` function works seamlessly on various iterable types. In OCaml, each collection type has its specific mapping function, such as `List.map`, `Array.map`, etc. This design choice emphasizes the strong type system a...
29,324
[ { "from": "human", "value": "In Python map() works on any data that follows the sequence protocol. It does The Right Thing^TM whether I feed it a string or a list or even a tuple.\nCan't I have my cake in OCaml too? Do I really have no other choice but to look at the collection type I'm using and find a c...
I need to get all the dates present in the date range using SQL Server 2005
In SQL Server 2005, you can generate a list of all dates within a specific date range by using a Common Table Expression (CTE) or a recursive query. Below is an example of how you can achieve this. ### Example of Generating Dates using a Recursive CTE ```sql DECLARE @StartDate DATETIME DECLARE @EndDate DATETIME -- D...
33,185
[ { "from": "human", "value": "I need to get all the dates present in the date range using SQL Server 2005\n" }, { "from": "gpt", "value": "In SQL Server 2005, you can generate a list of all dates within a specific date range by using a Common Table Expression (CTE) or a recursive query. Below is ...
I'm familiar with the issue behind ORA-01775: looping chain of synonyms, but is there any trick to debugging it, or do I just have to "create or replace" my way out of it? Is there a way to query the schema or whatever to find out what the current definition of a public synonym is? Even more awesome would be a grap...
The ORA-01775 error indicates that there is a loop in the chain of synonyms in your Oracle database. This usually happens when a synonym refers to another synonym, creating a circular reference. Debugging this can be a bit tedious, but there are ways to identify the issue without having to `CREATE OR REPLACE` your way ...
29,443
[ { "from": "human", "value": "I'm familiar with the issue behind ORA-01775: looping chain of synonyms, but is there any trick to debugging it, or do I just have to \"create or replace\" my way out of it? \nIs there a way to query the schema or whatever to find out what the current definition of a public syn...
Given two integers a and b, how would I go about calculating the repeating decimal of a / b? This can be in any language; whatever it's easiest for you to express it in.
To calculate the repeating decimal of a fraction \( \frac{a}{b} \), you can use a method that involves long division to determine both the non-repeating and repeating parts of the decimal. Below is a Python implementation that illustrates this process: ```python def calculate_repeating_decimal(a, b): # Handle the ...
26,481
[ { "from": "human", "value": "Given two integers a and b, how would I go about calculating the repeating decimal of a / b? This can be in any language; whatever it's easiest for you to express it in.\n" }, { "from": "gpt", "value": "To calculate the repeating decimal of a fraction \\( \\frac{a}{b...
Let's imagine I got this: index.php generates form with unpredictable number of inputs with certain IDs/Names and different values that can be edited by user and saved by script.php <form action="script.php" method="post"> <input id="1" name="1" type="text" value="1"/> <input id="24" name="24" type="text" value="2233"/...
Yes, you can handle the form data submitted from `index.php` in `script.php` to get an associative array of all inputs that were generated by the form. When the form is submitted, all the inputs will be sent as key-value pairs in the `$_POST` array. The key will be the input's name (or id, since they are the same in yo...
29,715
[ { "from": "human", "value": "Let's imagine I got this:\nindex.php generates form with unpredictable number of inputs with certain IDs/Names and different values that can be edited by user and saved by script.php\n<form action=\"script.php\" method=\"post\">\n<input id=\"1\" name=\"1\" type=\"text\" value=\"...
I'm fairly new to Castle Windsor and am looking into the in's and out's of the logging facility. It seems fairly impressive but the only thing i can't work out is where Windsor sets the Logger property on my classes. As in the following code will set Logger to the nullLogger if the class hasn't been setup yet but when ...
In Castle Windsor, the dependency injection container automatically resolves dependencies based on the configuration and registrations you've defined. This includes properties, which is how your `Logger` property gets set. When you resolve an instance of a class from the Windsor container, it looks for dependencies th...
26,801
[ { "from": "human", "value": "I'm fairly new to Castle Windsor and am looking into the in's and out's of the logging facility. It seems fairly impressive but the only thing i can't work out is where Windsor sets the Logger property on my classes. As in the following code will set Logger to the nullLogger if ...
My goal is to integrate testing into my development environment (as post-build step). I don't want to interfere with the DLLs that are generated in debug and release, so i plan to create new configurations for the project. But i don't want to compile every source file i have twice - once for the DLL, once for the test ...
To achieve your goal of integrating testing into your development environment in Visual Studio 2005 without recompiling your source files for both DLLs and unit tests, you can follow these steps: ### 1. Use Shared Object Files In Visual Studio, you can set up your project to use a common output directory for object fi...
28,224
[ { "from": "human", "value": "My goal is to integrate testing into my development environment (as post-build step). I don't want to interfere with the DLLs that are generated in debug and release, so i plan to create new configurations for the project. But i don't want to compile every source file i have twi...
I've got a DB table where we store a lot of MD5 hashes (and yes I know that they aren't 100% unique...) where we have a lot of comparison queries against those strings. This table can become quite large with over 5M rows. My question is this: Is it wise to keep the data as hexadecimal strings or should I convert the he...
When dealing with MD5 hashes in a database, you have several options for how to store these values: as hexadecimal strings, binary data, or numeric types (like decimal). Each option has its own advantages and disadvantages, particularly when considering performance for querying, storage efficiency, and data integrity. ...
31,135
[ { "from": "human", "value": "I've got a DB table where we store a lot of MD5 hashes (and yes I know that they aren't 100% unique...) where we have a lot of comparison queries against those strings.\nThis table can become quite large with over 5M rows.\nMy question is this: Is it wise to keep the data as hex...
Seems like a simple problem: I have an SVN repo inside our firewall. I have an SVN repo outside our firewall. I have users inside, and outside, the firewall. (no VPN isn't an option :( that'd be too easy) machines inside the firewall CAN talk to the outside SVN server. But not the other way. the outside SVN is a temp...
It looks like you've arrived at a reasonable solution by leveraging Git as an intermediary between the two SVN repositories. This approach is indeed practical, especially given your constraints with direct connectivity and the requirement to synchronize changes between two repositories. Below is a more detailed breakdo...
16,813
[ { "from": "human", "value": "Seems like a simple problem:\n\nI have an SVN repo inside our firewall. \nI have an SVN repo outside our firewall.\nI have users inside, and outside, the firewall. (no VPN isn't an option :( that'd be too easy)\nmachines inside the firewall CAN talk to the outside SVN server. Bu...
You launch a java program from a console (maybe using a .bat script). I don't want the console to remain visible, I want to hide it. Is there a simple way to do this ? Without JNI ?
To launch a Java program from a batch script (.bat) without keeping the console window visible, you can use a small trick involving the Windows `start` command combined with the `java` command. Here’s how you can do this: 1. **Create a new batch file** (for example, `run_hidden.bat`) with the following content: ```ba...
32,430
[ { "from": "human", "value": "You launch a java program from a console (maybe using a .bat script).\nI don't want the console to remain visible, I want to hide it.\nIs there a simple way to do this ? Without JNI ?\n" }, { "from": "gpt", "value": "To launch a Java program from a batch script (.bat...
I am running a Solr instance on Jetty and when I search using the Solr admin panel, it returns the entire document. What should I do to get only specified fields from each Solr document returned by the search?
To control which fields are returned in the search results when using Apache Solr, you need to specify the `fl` (field list) parameter in your search request. This parameter allows you to select only the specific fields you want to retrieve from your Solr documents. Here's how you can do this: 1. **Using the Solr Admi...
32,792
[ { "from": "human", "value": "I am running a Solr instance on Jetty and when I search using the Solr admin panel, it returns the entire document. What should I do to get only specified fields from each Solr document returned by the search?\n" }, { "from": "gpt", "value": "To control which fields ...
I've got a VB.NET class that is invoked with a context menu extension in Internet Explorer. The code has access to the object model of the page, and reading data is not a problem. This is the code of a test function...it changes the status bar text (OK), prints the page HTML (OK), changes the HTML by adding a text and...
The issue you are encountering is likely related to how Internet Explorer handles updates to the DOM when you are manipulating the HTML through your VB.NET class. While the changes you are making in the HTMLDocument object (like adding text) might be reflected in the HTML structure you see in your message box, those ch...
27,726
[ { "from": "human", "value": "I've got a VB.NET class that is invoked with a context menu extension in Internet Explorer. \nThe code has access to the object model of the page, and reading data is not a problem. This is the code of a test function...it changes the status bar text (OK), prints the page HTML (...
We're using CruiseControl.NET to manage our builds and we're in the process of obtaining a new build server. I've been tasked with coming up with the spec for the new server. This server will need to run multiple builds concurrently and as effeciently as possible. What would you consider the ideal spec for this server?...
When specifying a build server for CruiseControl.NET or any CI/CD pipeline, it's important to consider the following components: CPU, RAM, Storage, Network, and Operating System. Here's a breakdown of the ideal specifications: ### Ideal Specifications for a Build Server 1. **CPU**: - **Cores**: Aim for a multi-cor...
28,998
[ { "from": "human", "value": "We're using CruiseControl.NET to manage our builds and we're in the process of obtaining a new build server. I've been tasked with coming up with the spec for the new server.\nThis server will need to run multiple builds concurrently and as effeciently as possible.\nWhat would y...
Before few days I was at some IT conference here in Belgrade. On Agenda was a topic about MySql, and clustering in MySql, and the guys from MySql said that they have the best solution for cluster split brain problem, does anyone know something about this, is this true or just a marketing trick?
The "split-brain" problem is a common issue in distributed systems, including database clusters, where two or more nodes in a cluster lose communication with each other and independently continue to operate. This can lead to data inconsistency, as each node may have diverging states. MySQL provides several solutions f...
32,692
[ { "from": "human", "value": "Before few days I was at some IT conference here in Belgrade. On Agenda was a topic about MySql, and clustering in MySql, and the guys from MySql said that they have the best solution for cluster split brain problem, does anyone know something about this, is this true or just a...
In Java, we can always use an array to store object reference. Then we have an ArrayList or HashTable which is automatically expandable to store objects. But does anyone know a native way to have an auto-expandable array of object references? Edit: What I mean is I want to know if the Java API has some class with the a...
In Java, the `ArrayList` class serves as a native way to create an auto-expandable array that can hold object references. It is part of the Java Collections Framework and provides dynamic array capabilities. While you may have initially thought of `ArrayList` as storing objects directly, it's important to understand th...
32,352
[ { "from": "human", "value": "In Java, we can always use an array to store object reference. Then we have an ArrayList or HashTable which is automatically expandable to store objects. But does anyone know a native way to have an auto-expandable array of object references?\nEdit: What I mean is I want to know...
I'm using subsonic o/rm to generate my data classes. But the active record and active list classes it generates don't work over WCF. I have to manually write the data contract classes, and this is fairly tedious work for all the properties. Is there any way to automatically generate data contract classes for WCF servic...
Yes, there are ways to automatically generate data contract classes for WCF services, which can help you avoid the tedious manual work of creating them. Here are some strategies you can consider: ### 1. Use `svcutil.exe` The `svcutil.exe` tool can generate client-side proxy classes and data contracts from a WCF servi...
29,049
[ { "from": "human", "value": "I'm using subsonic o/rm to generate my data classes. But the active record and active list classes it generates don't work over WCF. I have to manually write the data contract classes, and this is fairly tedious work for all the properties. Is there any way to automatically gene...
This question is a follow up to: Why can’t I call a method outside of an anonymous class of the same name This previous question answer why, but now I want to know if javac should find run(int bar)? (See previous question to see why run(42) fails) If it shouldn't, is it due to a spec? Does it produce ambiguous code? ...
In your code snippet, the behavior you're observing is rooted in Java's scoping rules for methods and how the compiler resolves method calls within different contexts, particularly inside anonymous inner classes. To understand why `run(42)` fails to compile while `foo(42)` succeeds, we need to delve into Java's method...
29,868
[ { "from": "human", "value": "This question is a follow up to:\nWhy can’t I call a method outside of an anonymous class of the same name\nThis previous question answer why, but now I want to know if javac should find run(int bar)? (See previous question to see why run(42) fails)\nIf it shouldn't, is it due ...
Is there an easy way to rename a group of files already contained in a directory, using Python? Example: I have a directory full of *.doc files and I want to rename them in a consistent way. X.doc -> "new(X).doc" Y.doc -> "new(Y).doc"
Yes, you can easily rename a group of files in a directory using Python. You can use the `os` module for file operations, including renaming files. Below is a simple script that demonstrates how to rename all `.doc` files in a specified directory to the new format you described. Here's an example Python script: ```py...
30,945
[ { "from": "human", "value": "Is there an easy way to rename a group of files already contained in a directory, using Python?\nExample: I have a directory full of *.doc files and I want to rename them in a consistent way.\n\nX.doc -> \"new(X).doc\"\nY.doc -> \"new(Y).doc\"\n\n" }, { "from": "gpt", ...
In Eclipse 3.4.1 using JDK1.6.0_10 how can I activate a warning on a missing @Override annotation on a method that implements an interface method? In the Preferences window this option: Java > Compiler > Errors / Warnings > Annotations > Missing '@Override' annotation works fine for missing annotations on method...
In Eclipse 3.4.1, the option to activate warnings for missing `@Override` annotations applies to methods overriding superclass methods, but there is no built-in setting specifically for methods that implement interface methods. This is a limitation in that version of Eclipse. However, you can still enforce the use of ...
33,338
[ { "from": "human", "value": "In Eclipse 3.4.1 using JDK1.6.0_10 how can I activate a warning on a missing @Override annotation on a method that implements an interface method? \nIn the Preferences window this option:\n\nJava > Compiler > Errors / Warnings >\n Annotations > Missing '@Override'\n annotation...
I got some problems with finding a bug in php/mysql application, and I wonder if I can do something like this: UPDATE table SET userid='2' WHERE userid='1' - > Can I update something I state in WHERE?
In SQL, the `UPDATE` statement allows you to modify existing records in a table, and the `WHERE` clause specifies which records should be updated. However, you cannot directly use an expression involving the same field in the `SET` clause as a condition in the `WHERE` clause in the same update statement. That said, yo...
29,728
[ { "from": "human", "value": "I got some problems with finding a bug in php/mysql application, and I wonder if I can do something like this: UPDATE table SET userid='2' WHERE userid='1' - > Can I update something I state in WHERE?\n" }, { "from": "gpt", "value": "In SQL, the `UPDATE` statement al...
We are migrating a web applicatin from vs05 to vs08. This application is using Telerik web controls. After I converted the project, and run, I get the exception: "A control is already associated with the element". I traced it down to a use control that has Telerik RadCombo box on it. However, I don't see anything out o...
Migrating a web application from Visual Studio 2005 to Visual Studio 2008 can introduce a variety of issues, especially when dealing with third-party controls like Telerik's RadComboBox. The exception message "A control is already associated with the element" typically indicates that the server-side control is being re...
30,620
[ { "from": "human", "value": "We are migrating a web applicatin from vs05 to vs08. This application is using Telerik web controls. After I converted the project, and run, I get the exception: \"A control is already associated with the element\". I traced it down to a use control that has Telerik RadCombo box...
I am looking for lightweight messaging framework in Java. My task is to process events in a SEDA’s manner: I know that some stages of the processing could be completed quickly, and others not, and would like to decouple these stages of processing. Let’s say I have components A and B and processing engine (be this conta...
If you're looking for a lightweight messaging framework in Java that supports a SEDA (Staged Event Driven Architecture) pattern and meets your requirements for basic features like message serialization and simple routing, there are a few options you might consider: 1. **Disruptor**: - The Disruptor is a high-perfo...
31,466
[ { "from": "human", "value": "I am looking for lightweight messaging framework in Java. My task is to process events in a SEDA’s manner: I know that some stages of the processing could be completed quickly, and others not, and would like to decouple these stages of processing.\nLet’s say I have components A ...
I'm writing a program in C# that runs in the background and allows users to use a hotkey to switch keyboard layouts in the active window. (Windows only supports CTRL+SHIFT and ALT+SHIFT) I'm using RegisterHotKey to catch the hotkey, and it's working fine. The problem is that I can't find any API to change the keyboard...
To change the keyboard layout for a different thread in Windows, you can use the `PostMessage` API to send messages to the desired window. The key to accomplishing this is to send the `WM_INPUTLANGCHANGE` message, which notifies the target thread that the input language (keyboard layout) has changed. Here's how to app...
29,530
[ { "from": "human", "value": "I'm writing a program in C# that runs in the background and allows users to use a hotkey to switch keyboard layouts in the active window. (Windows only supports CTRL+SHIFT and ALT+SHIFT)\nI'm using RegisterHotKey to catch the hotkey, and it's working fine.\nThe problem is that ...
I can currently to the following: class SubClass extends SuperClass { function __construct() { parent::__construct(); } } class SuperClass { function __construct() { // this echoes "I'm SubClass and I'm extending SuperClass" echo 'I\'m '.get_class($this).' and I\'m extending '.__CLASS__; } } I wou...
In PHP, you can determine the filename of the subclass dynamically within the constructor of the superclass. One way to achieve this is by utilizing the `get_class` and `ReflectionClass` to obtain the file name of the subclass. Here's how you can do it: ```php class SuperClass { function __construct() { ...
31,752
[ { "from": "human", "value": "I can currently to the following:\nclass SubClass extends SuperClass {\n function __construct() {\n parent::__construct();\n }\n}\n\nclass SuperClass {\n function __construct() {\n // this echoes \"I'm SubClass and I'm extending SuperClass\"\n echo 'I\\'m '.get_class...
This article here suggests to use -XX:+UseParNewGC "To enable a parallel young generation GC with the concurrent GC". My confusion is that in order to enable both parallel and concurrent GC, should I use -XX:+UseParNewGC or use both -XX:+UseParNewGC and -XX:+UseConcMarkSweepGC ? PS I am using JVM 6.
In JVM 6, if you want to enable both a parallel young generation garbage collection (GC) and a concurrent mark-sweep garbage collection for the old generation, you should use both options: - `-XX:+UseParNewGC`: This option enables the parallel young generation garbage collector. - `-XX:+UseConcMarkSweepGC`: This optio...
34,917
[ { "from": "human", "value": "This article here suggests to use -XX:+UseParNewGC \"To enable a parallel young generation GC with the concurrent GC\". \nMy confusion is that in order to enable both parallel and concurrent GC, should I\n\nuse -XX:+UseParNewGC or\nuse both -XX:+UseParNewGC and -XX:+UseConcMark...
I am working on a sidebar AddIn for Microsoft Outlook using Visual Studio Tools for Office. However, I can't figure out how to get rid of the header outlook puts on my sidebar when I show it in Outlook. Here is a screenshot showing the header, which contains the text "Sidebar Program": Sidebar Screenshot. I would pre...
Unfortunately, when using the `CustomTaskPane` in Outlook, there are limitations regarding the appearance of the task pane, including the header and the borders. Outlook adds the header and border around `CustomTaskPane` controls by default, and there is no supported way to remove them using the provided APIs. However...
31,888
[ { "from": "human", "value": "I am working on a sidebar AddIn for Microsoft Outlook using Visual Studio Tools for Office. However, I can't figure out how to get rid of the header outlook puts on my sidebar when I show it in Outlook. Here is a screenshot showing the header, which contains the text \"Sidebar...
I'm a bit surprised I haven't found a good open source library for performing common network tasks. There are a few very good commercial libraries, but they're too expensive to use on an open source project. Anyone know of any?
There are several open-source libraries that can help you perform common network tasks, depending on your programming language and specific needs. Here are some popular options across different languages: ### Python 1. **Requests**: A simple and elegant HTTP library for making requests. Great for REST APIs. - GitHu...
27,322
[ { "from": "human", "value": "I'm a bit surprised I haven't found a good open source library for performing common network tasks. There are a few very good commercial libraries, but they're too expensive to use on an open source project. \nAnyone know of any?\n" }, { "from": "gpt", "value": "Ther...
What reason is there for C# or java having lambdas? Neither language is based around them, it appears to be another coding method to do the same thing that C# already did. I'm not being confrontational, if there is a reason I would like to know the reason why. For the purpose of full disclosure I am a Java programmer w...
Your question raises an interesting point about the evolution of programming languages and the incorporation of functional programming concepts like lambdas. Both C# and Java have evolved to include lambda expressions, which may seem redundant at first glance, especially if you are accustomed to their existing construc...
21,956
[ { "from": "human", "value": "What reason is there for C# or java having lambdas? Neither language is based around them, it appears to be another coding method to do the same thing that C# already did.\nI'm not being confrontational, if there is a reason I would like to know the reason why. For the purpose o...
I'm checking out the Delphi 2009 Trial, but run into problems with the generics stuff right away. The following code does not compile, and I haven't the slightest idea why it's giving me E2015 for the Equals() method: type TPrimaryKey<T> = class(TObject) strict private fValue: T; public constructor Create...
The issue you're encountering is due to Delphi's type constraints with generics. In Delphi, when you use generics, the compiler needs to know that the types you're working with can be compared. However, `T` is a type parameter that doesn't have any inherent properties, such as equality. In your case, the comparison `T...
30,654
[ { "from": "human", "value": "I'm checking out the Delphi 2009 Trial, but run into problems with the generics stuff right away.\nThe following code does not compile, and I haven't the slightest idea why it's giving me E2015 for the Equals() method:\ntype\n TPrimaryKey<T> = class(TObject)\n strict private\n...
We don't need multiuser. Just relational. Our app currently uses Access but Access isn't exactly zero-administration because it's prone to corruption. Is SQLite rock, rock solid, pure zero-administration? Or...is there a way to configure SQL Server as a desktop engine so that it is pure zero admin? Or...is...
SQLite is indeed a solid choice for a zero-administration relational database, and it is designed to be lightweight and embedded, making it suitable for single-user applications. Here are some key points to consider regarding SQLite and SQL Server, along with alternatives: ### SQLite - **Zero-Administration**: SQLite ...
32,493
[ { "from": "human", "value": "We don't need multiuser. Just relational. Our app currently uses Access but Access isn't exactly zero-administration because it's prone to corruption.\nIs SQLite rock, rock solid, pure zero-administration? \nOr...is there a way to configure SQL Server as a desktop engine...
When debugging web sites that I'm working on, I tend to use Attach to Process rather than F5 to start debugging (since the site's already on in Firefox). However, occasionally when doing so, I'll get the following error: EXECUTE permission denied on object 'sp_sdidebug', database 'master', owner 'dbo'. I know this i...
In Visual Studio 2008, the behavior for the "Attach to Process" option can be adjusted, but it doesn't have a straightforward way to set a global default to always exclude T-SQL debugging. However, you can streamline your workflow a bit by following these steps: 1. **Select the Correct Debugger Type**: When you go...
32,508
[ { "from": "human", "value": "When debugging web sites that I'm working on, I tend to use Attach to Process rather than F5 to start debugging (since the site's already on in Firefox). However, occasionally when doing so, I'll get the following error:\n\nEXECUTE permission denied on object 'sp_sdidebug', dat...
Is there a way for me to serialize an object in .NET without the XML Namespaces automatically serializing also? It seems that by default .NET believes the XSI and XSD namespaces should be included, but I don't want them there.
Yes, you can serialize an object in .NET without including the XML namespaces (such as `xsi` and `xsd`). By default, the `XmlSerializer` adds these namespaces when you serialize an object with complex types. However, you can control this behavior by specifying a custom `XmlSerializerNamespaces`. Here's how you can ach...
31,950
[ { "from": "human", "value": "Is there a way for me to serialize an object in .NET without the XML Namespaces automatically serializing also? It seems that by default .NET believes the XSI and XSD namespaces should be included, but I don't want them there.\n" }, { "from": "gpt", "value": "Yes, y...
I just started creating my data-access layer using LinqToSql. Everybody is talking about the cool syntax and I really like Linq in general. But when I saw how your classes get generated if you drag some tables on the LinqContext I was amazed: So much code which nobody would need?! So I looked how other people used Lin...
It's great to hear that you're diving into LINQ to SQL and exploring its capabilities! You're correct that the code generation from the LINQ to SQL designer can sometimes produce a lot of boilerplate code, which may not align perfectly with your domain model or architectural preferences. Here are a few strategies and a...
30,059
[ { "from": "human", "value": "I just started creating my data-access layer using LinqToSql. Everybody is talking about the cool syntax and I really like Linq in general. \nBut when I saw how your classes get generated if you drag some tables on the LinqContext I was amazed: So much code which nobody would ne...
This article describes a way, in C#, to allow the addition of arbitrary value types which have a + operator defined for them. In essence it allows the following code: public T Add(T val1, T val2) { return val1 + val2; } This code does not compile as there is no guarantee that the T type has a definition for the '+'...
In C and C++, you can achieve a similar effect of allowing arbitrary value types that support addition by using templates and operator overloading in C++. However, since C does not support operator overloading or templates, the solution would be limited to C++. Here's a step-by-step approach to how you can implement th...
31,201
[ { "from": "human", "value": "This article describes a way, in C#, to allow the addition of arbitrary value types which have a + operator defined for them. In essence it allows the following code:\npublic T Add(T val1, T val2)\n{\n return val1 + val2;\n}\n\nThis code does not compile as there is no guarant...
I am primary a web developer but I do have a very good understanding of C++ and C#. However, recently I have writing a GUI application and I have started to get lost in how to handle the relationship between my controller and view logic. In PHP it was very easy - and I could write my own MVC pattern with my eyes closed...
When designing a GUI application, especially in a language like C# or C++, implementing a clear separation between your controller and view components can greatly enhance maintainability and scalability. Here's a general guide on how to effectively separate your controller from your view, drawing on concepts from the M...
25,854
[ { "from": "human", "value": "I am primary a web developer but I do have a very good understanding of C++ and C#. However, recently I have writing a GUI application and I have started to get lost in how to handle the relationship between my controller and view logic. In PHP it was very easy - and I could wri...
How would I drag and drop something into a static control? It looks like I need to create a sub class of COleDropTarget and include that as a member variable in a custom CStatic. That doesn't appear to be working though. When I try and drag something onto the Static control I get the drop denied cursor.
To enable drag-and-drop functionality on a `CStatic` control in an MFC application, you need to follow a few steps to set up your custom control and handle the OLE drop target correctly. Here's a step-by-step guide to achieve this: ### 1. Create a Custom Static Control First, create a custom static control by derivin...
21,426
[ { "from": "human", "value": "How would I drag and drop something into a static control? It looks like I need to create a sub class of COleDropTarget and include that as a member variable in a custom CStatic. That doesn't appear to be working though. When I try and drag something onto the Static control I...
i met a problem with iphone simulator application directory, when i run the application everytime, the name of application directory was changed each of time,can anyone tell me how to keep a static application directory ?
When you run an application in the iOS Simulator, each build of the application creates a new app instance, leading to a different application directory each time due to the inclusion of a unique identifier (UUID) in the directory path. Unfortunately, you cannot set a static application directory for an app running in ...
33,156
[ { "from": "human", "value": "i met a problem with iphone simulator application directory, when i run the application everytime, the name of application directory was changed each of time,can anyone tell me how to keep a static application directory ?\n" }, { "from": "gpt", "value": "When you run...
Given that these two examples are equivalent, which do you think is preferrable? Without explicit modifier public class MyClass { string name = "james"; public string Name { get { return name; } set { name = value; } } void SomeMethod() { ... } } With explicit modifier public class ...
The choice between using explicit access modifiers (like `private`) and relying on default access modifiers in your classes often comes down to code readability, maintainability, and team or project conventions. Here are some points to consider for each approach: ### Without Explicit Modifier (Implicit `private`) **P...
32,397
[ { "from": "human", "value": "Given that these two examples are equivalent, which do you think is preferrable?\nWithout explicit modifier\npublic class MyClass\n{\n\n string name = \"james\";\n\n public string Name {\n get { return name; }\n set { name = value; }\n }\n\n void SomeMe...
I have a simple question. Is there a way ( using reflections I suppose ) to iterate all the static values of a class? For instance class Any { static int one = 1; static int two = 2; static int three = 3; public static void main( String [] args ) { for( int i : magicMethod( Any.class ) ){ ...
Yes, you can use Java Reflection to iterate over the static fields of a class and retrieve their values. Here's how you can implement the `magicMethod` to achieve that: ```java import java.lang.reflect.Field; class Any { static int one = 1; static int two = 2; static int three = 3; public static void...
32,411
[ { "from": "human", "value": "I have a simple question. Is there a way ( using reflections I suppose ) to iterate all the static values of a class?\nFor instance \nclass Any {\n static int one = 1;\n static int two = 2;\n static int three = 3;\n\n public static void main( String [] args ) {\n ...
I am building a utility page for a web app that I am working on. I have an element that I want to use as a "console" of sorts. I get entries for the console via Ajax calls (using prototype's Ajax.PeriodicalUpdater). The problem I'm having is that when I insert new lines to the bottom of the "console", the scrollbar s...
To ensure that the scrollbar of your console stays at the bottom when new entries are added, you can modify your `onComplete` function to set the `scrollTop` after the new content has been fully added. Here are a few options to achieve this using Prototype and regular JavaScript: ### Option 1: Use `setTimeout` to Dela...
26,464
[ { "from": "human", "value": "I am building a utility page for a web app that I am working on. I have an element that I want to use as a \"console\" of sorts.\nI get entries for the console via Ajax calls (using prototype's Ajax.PeriodicalUpdater).\nThe problem I'm having is that when I insert new lines to...
Do I really have to learn Objective-C to develop solid Mac Apps? As Mac users tend to use only applications that have a nice (native) GUI, i don't think that Mono and GTK+ or any Java GUI (Swing) will fit their needs. There are projects like Cocoa#, PyObjC and RubyCocoa, but are they ready for primetime? So do I really...
You don't necessarily have to learn Objective-C to develop solid Mac apps, especially if you prefer using a dynamic language. While Objective-C has been the traditional language for macOS development (particularly with Cocoa), Apple has since introduced Swift, which is a modern, powerful, and more user-friendly languag...
31,173
[ { "from": "human", "value": "Do I really have to learn Objective-C to develop solid Mac Apps?\nAs Mac users tend to use only applications that have a nice (native) GUI, i don't think that Mono and GTK+ or any Java GUI (Swing) will fit their needs.\nThere are projects like Cocoa#, PyObjC and RubyCocoa, but a...
I recently convinced a customer to upgrade to Internet Explorer 7 but now she is having an issue printing. When printing emails from her webmail in IE6 they would print at 75% and fit on a single page. Now with IE7 they added the "Shirnk to Fit" option which is the default. This doesn't work as expected and makes her p...
In Internet Explorer 7, the default "Shrink to Fit" option can sometimes lead to unexpected printing results, as you've noted. Unfortunately, there is no built-in setting in IE7 to change the default scaling option from "Shrink to Fit" to a fixed percentage like 75%. However, you can suggest a few workarounds to your ...
30,758
[ { "from": "human", "value": "I recently convinced a customer to upgrade to Internet Explorer 7 but now she is having an issue printing. When printing emails from her webmail in IE6 they would print at 75% and fit on a single page. Now with IE7 they added the \"Shirnk to Fit\" option which is the default. Th...
I want to get the last result returned from this query. How do I do this? Last and LastOrDefault aren't supported by Linq to Sql. var docs = (from d in db.Documents where d.Version > 1 orderby d.DocumentID select new ...
In LINQ to SQL, since `Last()` and `LastOrDefault()` are not supported directly, you can achieve the desired result by ordering the collection and then using `Take()` along with `SingleOrDefault()` or `FirstOrDefault()`. Here’s how you can do it: 1. Order the results in descending order to get the last result on the t...
33,389
[ { "from": "human", "value": "I want to get the last result returned from this query. How do I do this? Last and LastOrDefault aren't supported by Linq to Sql. \n var docs = (from d in db.Documents \n where d.Version > 1\n orderby d.DocumentID\n ...
I have a bunch of images that need to rotate in and out one at a time every 2 seconds with fancy JQuery fadeIn and fadeOut. I have all the images in the HTML to pre-load them and a setInterval timer that fades the current image out, then fades the next image in. Problem is that sometimes when you are clicking or scro...
Your code is almost there, but you're encountering issues with overlapping animations due to how `setInterval` works. When you click or scroll, the `setInterval` can continue to trigger `changeImage()` every 2 seconds, potentially resulting in multiple animations running at once. To avoid this, you should: 1. Use `set...
29,632
[ { "from": "human", "value": "I have a bunch of images that need to rotate in and out one at a time every 2 seconds with fancy JQuery fadeIn and fadeOut. I have all the images in the HTML to pre-load them and a setInterval timer that fades the current image out, then fades the next image in. Problem is tha...
I have a directory full of files and I need to pull the headers and footers off of them. They are all variable length so using head or tail isn't going to work. Each file does have a line I can search for, but I don't want to include the line in the results. It's usually *** Start (more text here) And ends with *** ...
You can accomplish this task using a combination of `awk` or `sed` in a simple script that processes each file in your directory. Below are two examples using `awk` and `sed`. Each will remove the header and footer based on the specified patterns. ### Using `awk` Here is a one-liner using `awk` that searches for the ...
32,965
[ { "from": "human", "value": "I have a directory full of files and I need to pull the headers and footers off of them. They are all variable length so using head or tail isn't going to work. Each file does have a line I can search for, but I don't want to include the line in the results.\nIt's usually \n*** ...
We are managing our development with Subversion over HTTPS, Bugzilla, and Mediawiki. Some of our developers have expressed an interest in migrating to Trac, so I have to evaluate what the cost of doing so would be. For both the wiki and bugzilla, we would need to either migrate the existing data into Trac or a way t...
Migrating to Trac can streamline your development workflow, but it does come with some challenges, especially when dealing with existing data in Bugzilla and MediaWiki. Here's an overview of the methods available for importing or integrating these systems with Trac, along with some potential solutions and resources. #...
29,874
[ { "from": "human", "value": "We are managing our development with Subversion over HTTPS, Bugzilla, and Mediawiki. Some of our developers have expressed an interest in migrating to Trac, so I have to evaluate what the cost of doing so would be. \nFor both the wiki and bugzilla, we would need to either migr...
I've incorporated LIBPNG and ZLIB into my C software for a microcontroller project due to their nicely liberal license which permits such use without requiring me to disclose any of my code (it's very similar to BSD/MIT/APACHE, but with no attribution requirement). I'd like to look at using lossy image compression to s...
Hi Adam, For lossy image compression libraries that are compatible with your licensing requirements, here are a few options you might consider: 1. **stb_image and stb_image_write**: - While `stb_image` is mainly for reading images, you can use `stb_image_write.h` for writing PNG, BMP, or TGA formats. For lossy JPE...
29,319
[ { "from": "human", "value": "I've incorporated LIBPNG and ZLIB into my C software for a microcontroller project due to their nicely liberal license which permits such use without requiring me to disclose any of my code (it's very similar to BSD/MIT/APACHE, but with no attribution requirement).\nI'd like to ...
For simplicity lets say I have two flex mxml pages. form.mxml button.mxml If the form.mxml page had the following code, it should work fine: <custom:SelectView dSource="{_thedata}" id="form" visible="false"> </custom:SelectView> <mx:LinkButton label="Show" id="lbShow" click="form.visible=true;> <mx:LinkButton label="...
In a Flex application, when you have separate MXML components (like `form.mxml` and `button.mxml`), communication between them can be achieved in a few ways, depending on your application's structure. Below are the steps to allow `button.mxml` to affect the visibility of an element in `form.mxml`. ### Approach 1: Usin...
27,036
[ { "from": "human", "value": "For simplicity lets say I have two flex mxml pages. \nform.mxml\nbutton.mxml\nIf the form.mxml page had the following code, it should work fine:\n<custom:SelectView dSource=\"{_thedata}\" id=\"form\" visible=\"false\">\n</custom:SelectView>\n\n<mx:LinkButton label=\"Show\" id=\"...
I work on a large project in Delphi 5. Today, after merging two branches of the app together, one of the hundreds of units, UnitMain (the main form's unit, would you guess) stopped recognizing the Application global. This is a rather bizarre problem - I could get the program to compile by defining Application: TApplica...
It sounds like you've encountered a rather unusual issue after merging branches of your Delphi project. The problem with the `Application` global variable not being recognized in `UnitMain` may be related to several factors. Here are a few suggestions that might help you troubleshoot and resolve the issue: 1. **Check ...
30,912
[ { "from": "human", "value": "I work on a large project in Delphi 5.\nToday, after merging two branches of the app together, one of the hundreds of units, UnitMain (the main form's unit, would you guess) stopped recognizing the Application global.\nThis is a rather bizarre problem - I could get the program t...
Ok, this is possibly borderline-subjective, but I wonder where one would put a simple class that does something within an ASP.net MVC project? I mean a class like the Base36 De/Encoder, that is neither Model nor Controller. Should this always go into a separate Class Library Assembly, or do such Classes have a place wi...
Your question touches on an important aspect of software architecture and organization in ASP.NET MVC projects. The placement of utility classes, such as a Base36 De/Encoder, can indeed vary based on the project's needs, team practices, and personal preference. Here are some guidelines to consider when deciding where t...
29,778
[ { "from": "human", "value": "Ok, this is possibly borderline-subjective, but I wonder where one would put a simple class that does something within an ASP.net MVC project? I mean a class like the Base36 De/Encoder, that is neither Model nor Controller. Should this always go into a separate Class Library Ass...
If I query a table with a condition on the key field as in: var user = from u in dc.Users where u.UserName == usn select u; I know that I will either get zero results or one result. Should I still go ahead and retrieve the results using a for-each or is there another prefe...
When querying a table with a unique key condition, such as retrieving a user by their username (assuming that the username is unique), you can use methods that are designed for such scenarios to make your code cleaner and more efficient. Instead of using a `foreach` loop to retrieve the results, you might prefer to use...
32,857
[ { "from": "human", "value": "If I query a table with a condition on the key field as in:\n var user = from u in dc.Users\n where u.UserName == usn\n select u;\n\nI know that I will either get zero results or one result. Should I still go ahead and retrieve the resu...
How can I find out if pictures on my page are loaded from browser's cache or from a remote server to which their <img src=.../> points to?
To determine whether images on your web page are loaded from the browser's cache or from a remote server, you can follow these steps: ### Method 1: Using Developer Tools in the Browser Most modern web browsers have built-in developer tools that allow you to inspect network activity. Here's how to do it: 1. **Open De...
32,820
[ { "from": "human", "value": "How can I find out if pictures on my page are loaded from browser's cache or from a remote server to which their <img src=.../> points to?\n" }, { "from": "gpt", "value": "To determine whether images on your web page are loaded from the browser's cache or from a remo...
I am working on a project to enhance our production debugging capabilities. Our goal is to reliably produce a minidump on any unhandled exception, whether the exception is managed or unmanaged, and whether it occurs on a managed or unmanaged thread. We use the excellent ClrDump library for this currently, but it does ...
To reliably capture unhandled exceptions in a WinForms application using a structured exception handler (SEH), you must consider how the CLR (Common Language Runtime) interacts with both managed and unmanaged code, especially in the context of Windows Forms applications which have their own message loop and exception h...
29,402
[ { "from": "human", "value": "I am working on a project to enhance our production debugging capabilities. Our goal is to reliably produce a minidump on any unhandled exception, whether the exception is managed or unmanaged, and whether it occurs on a managed or unmanaged thread.\nWe use the excellent ClrDum...
Say I have an input file, and a target directory. How do I determine if the input file is on the same hard-drive (or partition) as the target directory? What I want to do is the copy a file if it's on a different, but move it if it's the same. For example: target_directory = "/Volumes/externalDrive/something/" input_fo...
To determine whether the `input_file` is on the same hard drive (or partition) as the `target_directory`, you can use the `os.path` module along with `os.stat` to get the device information for both paths. The device ID will tell you whether two paths are on the same partition. Here's how you can implement the `same_p...
31,692
[ { "from": "human", "value": "Say I have an input file, and a target directory. How do I determine if the input file is on the same hard-drive (or partition) as the target directory?\nWhat I want to do is the copy a file if it's on a different, but move it if it's the same. For example:\ntarget_directory = \...
What solutions are out there for getting through a corporate proxy using NTLM authentication? Anything that isn't a browser fails. I've tried NTLMAPS, without success.
If you're trying to get through a corporate proxy that requires NTLM authentication and have found that traditional methods, like NTLMAPS, have not worked for you, here are some other solutions you can consider: 1. **cntlm**: This is a popular and lightweight proxy that can be used to authenticate with NTLM. You can c...
29,501
[ { "from": "human", "value": "What solutions are out there for getting through a corporate proxy using NTLM authentication? Anything that isn't a browser fails. \nI've tried NTLMAPS, without success.\n" }, { "from": "gpt", "value": "If you're trying to get through a corporate proxy that requires ...
I'd like to do the same in C#. Is there anyway of using properties in C# with parameters in the same way I've done with the parameter 'Key' in this VB.NET example? Private Shared m_Dictionary As IDictionary(Of String, Object) = New Dictionary(Of String, Object) Public Shared Property DictionaryElement(ByVal Key As S...
In C#, you can achieve similar functionality to your VB.NET code using an indexer. An indexer allows you to use an instance of a class like an array, enabling you to access elements using a key or index. Here's how you can implement it in C#: ```csharp using System; using System.Collections.Generic; public class Your...
30,683
[ { "from": "human", "value": "I'd like to do the same in C#. Is there anyway of using properties in C# with parameters in the same way I've done with the parameter 'Key' in this VB.NET example?\n\nPrivate Shared m_Dictionary As IDictionary(Of String, Object) = New Dictionary(Of String, Object)\n\n\nPublic Sh...
There's an option to hide the version so it will display only nginx, but is there a way to hide that too so it will not show anything or change the header?
Yes, you can hide the server version in Nginx and also change or hide the "Server" header completely. This can help improve security by obscuring the specific web server technology you are using. Here’s how you can do it: ### 1. Hide the Nginx Version To hide the Nginx version, you can set the `server_tokens` directi...
28,716
[ { "from": "human", "value": "There's an option to hide the version so it will display only nginx, but is there a way to hide that too so it will not show anything or change the header?\n" }, { "from": "gpt", "value": "Yes, you can hide the server version in Nginx and also change or hide the \"Se...
What would be the best way to avoid SQL injection on the C#.net platform. Please post an C# implementation if you have any.
SQL injection is a serious security vulnerability that allows an attacker to interfere with the queries that an application makes to its database. To prevent SQL injection in C#, the best practices include: 1. **Use Parameterized Queries**: This is the most effective way to protect against SQL injection. By using para...
29,852
[ { "from": "human", "value": "What would be the best way to avoid SQL injection on the C#.net platform.\nPlease post an C# implementation if you have any.\n" }, { "from": "gpt", "value": "SQL injection is a serious security vulnerability that allows an attacker to interfere with the queries that ...
I've created a MATLAB class, something like: classdef myclass properties x_array = []; end methods function increment(obj,value) obj.x_array = [obj.x_array ; value); end end end The problem is, the property x_array is never modified when I invoke the increment() function: ex: >>s = mycla...
You're correct in your understanding that MATLAB uses a concept known as "value copy" for class instances by default. This means that when you call a method on an instance of a class, a copy of that instance is made, and any changes you make to that copy won't affect the original instance. To change this behavior, you ...
31,009
[ { "from": "human", "value": "I've created a MATLAB class, something like:\nclassdef myclass\n\n properties\n x_array = [];\n end\n\n methods\n function increment(obj,value)\n obj.x_array = [obj.x_array ; value);\n end\n end\nend\n\nThe problem is, the property x_array is never modified ...
I want to move a legacy Java web application (J2EE) to a scripting language - any scripting language - in order to improve programming efficiency. What is the easiest way to do this? Are there any automated tools that can convert the bulk of the business logic?
Moving a legacy Java web application (J2EE) to a scripting language can be a significant undertaking, and while there are some tools that can help automate parts of this process, there is generally no fully automated solution that can convert a complex Java application into another language without some manual interven...
29,550
[ { "from": "human", "value": "I want to move a legacy Java web application (J2EE) to a scripting language - any scripting language - in order to improve programming efficiency.\nWhat is the easiest way to do this? Are there any automated tools that can convert the bulk of the business logic?\n" }, { ...
In VB6 you can do this: Dim a As Variant a = Array(1, 2, 3) Can you do a similar thing in VB.NET with specific types, like so?: Dim a() As Integer a = Array(1, 2, 3)
In VB.NET, you cannot directly use the `Array` function to create an array of a specific type like you can in VB6. However, you can achieve similar functionality using the `Array.CreateInstance` method or by using an array literal. Here are two common ways to initialize an array of specific types in VB.NET: ### Using...
30,757
[ { "from": "human", "value": "In VB6 you can do this:\nDim a As Variant\na = Array(1, 2, 3)\nCan you do a similar thing in VB.NET with specific types, like so?:\nDim a() As Integer\na = Array(1, 2, 3)\n" }, { "from": "gpt", "value": "In VB.NET, you cannot directly use the `Array` function to crea...
Using Python I want to be able to draw text at different angles using PIL. For example, imagine you were drawing the number around the face of a clock. The number 3 would appear as expected whereas 12 would we drawn rotated counter-clockwise 90 degrees. Therefore, I need to be able to draw many different strings at ma...
To draw text at different angles using the Python Imaging Library (PIL), you can use the `ImageDraw` module along with the `ImageFont` module. Below is an example of how you can achieve this by rotating the text before drawing it onto an image. This way, you can specify the angle at which to draw your text. Here’s a c...
26,940
[ { "from": "human", "value": "Using Python I want to be able to draw text at different angles using PIL.\nFor example, imagine you were drawing the number around the face of a clock. The number 3 would appear as expected whereas 12 would we drawn rotated counter-clockwise 90 degrees.\nTherefore, I need to b...
I'm absolutely in love with the way GWT does RPC. Is there anything similar for Java SE you have experience with that: Is not spring Doesn't require a Java EE/Servlet container to run the server side Is not RMI that comes with Java SE
If you're looking for a way to perform remote procedure calls (RPC) in a Java SE environment without relying on Spring, a Java EE/Servlet container, or RMI, there are several alternatives you can explore: 1. **gRPC**: gRPC is a high-performance, open-source universal RPC framework created by Google. It uses Protocol B...
26,713
[ { "from": "human", "value": "I'm absolutely in love with the way GWT does RPC. Is there anything similar for Java SE you have experience with that:\n\nIs not spring\nDoesn't require a Java EE/Servlet container to run the server side\nIs not RMI that comes with Java SE\n\n" }, { "from": "gpt", "v...
I am not new to *nix, however lately I have been spending a lot of time at the prompt. My question is what are the advantages of using KornShell (ksh) or Bash Shell? Where are the pitfalls of using one over the other? Looking to understand from the perspective of a user, rather than purely scripting.
Both KornShell (ksh) and Bash (Bourne Again SHell) are powerful Unix shells that provide command-line user interfaces and scripting capabilities. Here are some advantages, pitfalls, and considerations for both from a user's perspective: ### Advantages of Using KornShell (ksh): 1. **Enhanced Features**: - **Job Con...
14,235
[ { "from": "human", "value": "I am not new to *nix, however lately I have been spending a lot of time at the prompt. My question is what are the advantages of using KornShell (ksh) or Bash Shell? Where are the pitfalls of using one over the other? \nLooking to understand from the perspective of a user, rathe...
How do you stay up-to-date when it comes to new software versions? Above all, I mean minor updates (new version for your Joomla-Installation, forum-software, FTP-Client, ...). Versiontracker, RSS-Feeds, Newsletter... what else? Anyone wrote a script crawling websites for new versions or something similar?
Staying up-to-date with minor software updates is essential for maintaining security, performance, and functionality. Here are several effective strategies to help you keep track of new software versions: 1. **Official Websites and Blogs**: Regularly check the official websites or blogs of the software you use. Many o...
31,111
[ { "from": "human", "value": "How do you stay up-to-date when it comes to new software versions? Above all, I mean minor updates (new version for your Joomla-Installation, forum-software, FTP-Client, ...).\nVersiontracker, RSS-Feeds, Newsletter... what else? Anyone wrote a script crawling websites for new ve...
From Wikipedia: RSA SecurID is a mechanism developed by RSA Security for performing two-factor authentication for a user to a network resource. I just read about this device, and it seems interesting to me. However, I'm not sure how (or even if) software (networked or non-networked) can utilize this method of authentic...
### Overview of RSA SecurID and Two-Factor Authentication **What is RSA SecurID?** RSA SecurID is a widely used two-factor authentication (2FA) technology developed by RSA Security. It enhances security by requiring users to provide two forms of identification before accessing a network resource. This typically combin...
26,415
[ { "from": "human", "value": "From Wikipedia: RSA SecurID is a mechanism developed by RSA Security for performing two-factor authentication for a user to a network resource.\nI just read about this device, and it seems interesting to me. However, I'm not sure how (or even if) software (networked or non-netwo...
I've been kicking around this idea for a while and would like to read your thoughts. I'd like to create a .NET service to send and track email messages. My rough ideas: Within various applications, serialize instances of .NET email (System.Net.Mail.MailMessage) objects and put them into a database or file system queue...
Your idea for creating a .NET service to send and track email messages is an interesting project and certainly feasible. Here are some thoughts on your idea, including potential approaches, issues you might encounter, and suggestions for off-the-shelf solutions: ### Getting Started 1. **Design the Architecture**: -...
29,601
[ { "from": "human", "value": "I've been kicking around this idea for a while and would like to read your thoughts.\nI'd like to create a .NET service to send and track email messages.\nMy rough ideas:\n\nWithin various applications, serialize instances of .NET email (System.Net.Mail.MailMessage) objects and ...
We want to run a daemon that exposes itself via ASMX, using Mono 2.0 (or later). Instead of dealing with the ASP.NET hosting APIs, we're thinking about just starting a daemon thread in the Application_Start event. XSP2 shouldn't restart the appdomain, so our daemon will be safe. Are there any downsides to this (besides...
Running a daemon thread in the `Application_Start` event of an ASP.NET application hosted in XSP (or any other ASP.NET-compatible web server) can certainly work, but there are several important considerations and potential downsides to be aware of: 1. **Thread Management**: Managing a long-running thread can introduce...
28,918
[ { "from": "human", "value": "We want to run a daemon that exposes itself via ASMX, using Mono 2.0 (or later). Instead of dealing with the ASP.NET hosting APIs, we're thinking about just starting a daemon thread in the Application_Start event. XSP2 shouldn't restart the appdomain, so our daemon will be safe....
Why doesn't this work? DECLARE @temp table (ShipNo int, Supplier varchar(10) ) INSERT INTO @temp VALUES (1,'CFA') INSERT INTO @temp VALUES (1, 'TFA') INSERT INTO @temp VALUES (2, 'LRA') INSERT INTO @temp VALUES (2, 'LRB') INSERT INTO @temp VALUES (3, 'ABC') INSERT INTO @temp VALUES (4, 'TFA') Declare @OrderBy varcha...
The issue you are encountering is related to how SQL Server handles the data types in the `ORDER BY` clause of the `ROW_NUMBER()` function. In your case, you have defined a `CASE` expression that returns either a `varchar` (from the `Supplier` column) or an `int` (from the `ShipNo` column). SQL Server needs to ensure ...
33,969
[ { "from": "human", "value": "Why doesn't this work?\nDECLARE @temp table\n(ShipNo int,\n Supplier varchar(10)\n)\n\nINSERT INTO @temp VALUES (1,'CFA')\nINSERT INTO @temp VALUES (1, 'TFA')\nINSERT INTO @temp VALUES (2, 'LRA')\nINSERT INTO @temp VALUES (2, 'LRB')\nINSERT INTO @temp VALUES (3, 'ABC')\nINSERT I...
I'm working on a WPF application and is using the Model-View-ViewModel pattern. The application consists of two modules at the moment: Left Panel to browse a tree and select a node Main Panel to show the content of the selected tree node. I want to keep these two modules seperated, but when I select a node in the Lef...
It sounds like you're on the right track by implementing a simple event service to facilitate loose coupling between your Left Panel and Main Panel in your WPF application. Since you're looking for a lightweight publish/subscribe model without introducing additional dependencies or LINQ, here’s a simple implementation ...
30,346
[ { "from": "human", "value": "I'm working on a WPF application and is using the Model-View-ViewModel pattern.\nThe application consists of two modules at the moment:\n\nLeft Panel to browse a tree and select a node\nMain Panel to show the content of the selected tree node.\n\nI want to keep these two modules...
I have a problem with the CrystalReportsViewer's toolbar that puzzles me. Let's say I have a report that consists of five pages. If I click the next button, I get to page two as expected, but if I press it again, page two reloads! I can click the last page button and get to the last page, but if I try to go to the pr...
It sounds like you are experiencing a navigation issue with the CrystalReportsViewer after migrating to Windows Server 2008. There are several potential causes for this issue, and some steps you can take to troubleshoot and potentially resolve it. ### Possible Causes and Solutions 1. **Compatibility with Windows Serv...
29,318
[ { "from": "human", "value": "I have a problem with the CrystalReportsViewer's toolbar that puzzles me. Let's say I have a report that consists of five pages.\n\nIf I click the next button, I get to page two as expected, but if I press it again, page two reloads! \nI can click the last page button and get to...
I'm looking for a .NET Add-in that reads in the contents of the Current Document window, lists the header declaration of all Regions, Subs, Functions, and Module Level Variables, and provides a simple Move Up/Move Down buttons to rearrange their order.
Creating a .NET Add-in for a development environment like Visual Studio or an Office application that reads the contents of the current document and provides functionality to manipulate code structure is a multi-step process. Below, I will outline the basic structure and components you might need to implement this func...
26,887
[ { "from": "human", "value": "I'm looking for a .NET Add-in that reads in the contents of the Current Document window, lists the header declaration of all Regions, Subs, Functions, and Module Level Variables, and provides a simple Move Up/Move Down buttons to rearrange their order.\n" }, { "from": "g...
Any ideas on how i get MVP working with Silverlight? How Do I get around the fact there is no load event raised? This the view I have: public partial class Person: IPersonView { public event RoutedEventHandler Loaded; public Person() { new PersonPresenter(this); ...
In Silverlight, there isn't a built-in `Loaded` event for user controls like you might find in WPF or other XAML-based frameworks. However, there are various ways you can handle initialization or loading of data in an MVVM or MVP (Model-View-Presenter) pattern. Here are a few strategies you could use to effectively get...
27,052
[ { "from": "human", "value": "Any ideas on how i get MVP working with Silverlight? How Do I get around the fact there is no load event raised?\nThis the view I have:\n public partial class Person: IPersonView\n {\n public event RoutedEventHandler Loaded;\n\n public Person()\n {\n ...
I am getting the following errors: PHP Warning: Module 'ldap' already loaded in Unknown on line 0 PHP Warning: Module 'mysql' already loaded in Unknown on line 0 when running the following command at the command line: php -c /etc/php.ini /path/to/script.php /etc/php.ini is the same php.ini that shown in phpinfo(). ...
The warnings you are encountering indicate that the `ldap` and `mysql` modules are being loaded multiple times in your PHP configuration. This typically happens when there are duplicate entries in your `php.ini` file or if multiple configuration files are loading the same modules. Here are a few steps you can take to ...
29,913
[ { "from": "human", "value": "I am getting the following errors:\nPHP Warning: Module 'ldap' already loaded in Unknown on line 0\nPHP Warning: Module 'mysql' already loaded in Unknown on line 0\n\nwhen running the following command at the command line:\nphp -c /etc/php.ini /path/to/script.php\n\n/etc/php.i...