instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I am using ActiveReports with ASP.NET but I think answer for any similar reporting component will do. I have two resultset to merge and show in a single report, like: Table 1: Name Job Start End Jack Some service 1992 1997 Jack Some Sales Exp 1998 2007 Jane Some programming 2000 2003 Table 2: N...
To achieve the desired layout in ActiveReports while handling two separate data tables (one for job history and another for training history), you can make use of grouping and sub-reports effectively. Here's a step-by-step guide on how to set up your report design: ### Step 1: Prepare Your Data Since you mentioned th...
29,918
[ { "from": "human", "value": "I am using ActiveReports with ASP.NET but I think answer for any similar reporting component will do.\nI have two resultset to merge and show in a single report, like:\nTable 1:\n\nName Job Start End\nJack Some service 1992 1997\nJack Some Sales Exp 1998 200...
Can you recommend a good MySQL stored procedure debugger? Extra points if it is open source, and works in linux :)
Certainly! One of the popular open-source tools for debugging MySQL stored procedures is **MySQL Workbench**. While MySQL Workbench is primarily known as a graphical interface for database design and administration, it also includes a SQL editor and debugging capabilities for stored procedures. ### MySQL Workbench Fea...
35,469
[ { "from": "human", "value": "Can you recommend a good MySQL stored procedure debugger?\nExtra points if it is open source, and works in linux :)\n" }, { "from": "gpt", "value": "Certainly! One of the popular open-source tools for debugging MySQL stored procedures is **MySQL Workbench**. While My...
Please help! Background info I have a WPF application which accesses a SQL Server 2005 database. The database is running locally on the machine the application is running on. Everywhere I use the Linq DataContext I use a using { } statement, and pass in a result of a function which returns a SqlConnection object which ...
From the code snippet and description you provided, it looks like you are using the `using` statement correctly for both the `DataContext` and `SqlCommand`. However, the issue might stem from how you're managing the `SqlConnection` and its lifecycle when passing it to the `DataContext`. Here are some points to consid...
28,618
[ { "from": "human", "value": "Please help!\nBackground info\nI have a WPF application which accesses a SQL Server 2005 database. The database is running locally on the machine the application is running on.\nEverywhere I use the Linq DataContext I use a using { } statement, and pass in a result of a function...
EDIT: Modified title and added update. UPDATE: We no longer believe this is a 64bit vs 32bit problem. We have found that the only people that were seeing this, were people that were set in the farm policy as "full control." (Not acting as System Account) Once we tested regular users, we found none had the problem. R...
It looks like you're encountering a User Profile issue related to your SharePoint farm after introducing 64-bit front-end servers. Since you've already ruled out the 32-bit vs. 64-bit architecture as the primary cause and narrowed down the problem to users with "Full Control" permissions in the farm policy, here are a ...
30,092
[ { "from": "human", "value": "EDIT: Modified title and added update.\nUPDATE:\nWe no longer believe this is a 64bit vs 32bit problem. We have found that the only people that were seeing this, were people that were set in the farm policy as \"full control.\" (Not acting as System Account) Once we tested reg...
C++: Since a struct is a class with everything "public", are default -ctors created and called? The reason I ask is to understand the overhead, if any, that C++ may have over C, when structs are used. An opinion I have heard is that classes have some overhead that structs don't, in C++, but I question this.
In C++, both `struct` and `class` are fundamentally the same in that they can contain data members and member functions. The primary difference is the default access level: members of a `struct` are `public` by default, while members of a `class` are `private` by default. ### Default Constructors Yes, if you define a...
33,616
[ { "from": "human", "value": "C++: Since a struct is a class with everything \"public\", are default -ctors created and called?\nThe reason I ask is to understand the overhead, if any, that C++ may have over C, when structs are used. An opinion I have heard is that classes have some overhead that structs don...
I have let's say two pc's.PC-a and PC-b which both have the same application installed with java db support.I want from time to time to copy the data from the database on PC-a to database to PC-b and vice-versa so the two PC's to have the same data all the time. Is there an already implemented API in the database layer...
To achieve synchronization between two databases on different PCs, there are several strategies you can employ, but most standard databases, including those using Java DB (also known as Apache Derby), do not come with built-in APIs specifically for syncing databases between two different instances. Here are some common...
33,862
[ { "from": "human", "value": "I have let's say two pc's.PC-a and PC-b which both have the same application installed with java db support.I want from time to time to copy the data from the database on PC-a to database to PC-b and vice-versa so the two PC's to have the same data all the time.\nIs there an alr...
Is it possible to make a POST request from Ruby with open-uri?
The `open-uri` library in Ruby is primarily designed for making GET requests and does not directly support making POST requests. If you need to make a POST request, you can use the `Net::HTTP` library, which is included in the Ruby standard library. Here’s an example of how to make a POST request using `Net::HTTP`: `...
33,825
[ { "from": "human", "value": "Is it possible to make a POST request from Ruby with open-uri?\n" }, { "from": "gpt", "value": "The `open-uri` library in Ruby is primarily designed for making GET requests and does not directly support making POST requests. If you need to make a POST request, you ca...
Or if any body knows of an alternative control that does? It would be handy to serve up content to the WebBrowser control that has embedded images & other resources from a database without having a dependency on these resources being hosted on a webserver or to create temporary files on the local file system. Mhtml sup...
The WebBrowser control in .NET does have some limitations, particularly when it comes to serving up complex HTML content with embedded resources (like images) directly through the `DocumentText` property. While MHTML does support embedding resources, the WebBrowser control doesn't render it properly through `DocumentTe...
34,026
[ { "from": "human", "value": "Or if any body knows of an alternative control that does?\nIt would be handy to serve up content to the WebBrowser control that has embedded images & other resources from a database without having a dependency on these resources being hosted on a webserver or to create temporary...
FORTRAN provides several functions to convert a double precision number to an integral value. The method used for truncation/rounding differs. I am converting complex scientific algorithms which use these. According to FORTRAN documentation: aint(x) returns the integral value between x and 0, nearest x. anint(x) retu...
Sure! Let's clarify the distinctions between the FORTRAN functions you've mentioned and provide you with implementations in C#. 1. **`aint(x)`**: This function returns the integral part of `x` towards zero. In C#, you can achieve this behavior with a simple cast to `int`, which performs truncation. 2. **`anint(x)`**...
29,500
[ { "from": "human", "value": "FORTRAN provides several functions to convert a double precision number to an integral value. The method used for truncation/rounding differs. I am converting complex scientific algorithms which use these.\nAccording to FORTRAN documentation:\naint(x) returns the integral valu...
Any python libs for parsing Bind zone files? Basically something that will aid in adding/removing zones and records. This needs to work even if someone modifies the zone file by hand so overwriting the zone files every time is not a solution.
Yes, there are several Python libraries that can help you parse BIND zone files and facilitate adding or removing zones and records. Here are a few notable ones: 1. **dnspython**: - Website: [dnspython](https://dnspython.org/) - dnspython is primarily a DNS toolkit, but it includes utilities for parsing zone fil...
32,501
[ { "from": "human", "value": "Any python libs for parsing Bind zone files? \nBasically something that will aid in adding/removing zones and records.\nThis needs to work even if someone modifies the zone file by hand so overwriting the zone files every time is not a solution. \n" }, { "from": "gpt", ...
I need to write a Stored procedure in SQL server whose data returned will be used to generate a XML file. My XML file to be in structure of <root> <ANode></ANode> <BNode></BNode> <CNode> <C1Node> <C11Node></C11Node> <C12Node></C12Node> </C1Node> <C2Node> <C21Node></C21Node> <C22Node></C22Node> ...
To create a stored procedure in SQL Server that generates an XML file structure as you've described, you can follow these general steps: 1. **Select ANode and BNode**: Use a simple `SELECT` statement to get the values for `ANode` and `BNode`. 2. **Select values for CNode and its child nodes**: Depending on your schem...
32,088
[ { "from": "human", "value": "I need to write a Stored procedure in SQL server whose data returned will be used to generate a XML file.\nMy XML file to be in structure of \n<root>\n<ANode></ANode>\n<BNode></BNode>\n<CNode>\n <C1Node>\n <C11Node></C11Node>\n <C12Node></C12Node>\n </C1Node>\n <C2Node>...
Say I have a struct "s" with an int pointer member variable "i". I allocate memory on the heap for i in the default constructor of s. Later in some other part of the code I pass an instance of s by value to some function. Am I doing a shallow copy here? Assume I didn't implement any copy constructors or assignment ...
Yes, you are indeed doing a shallow copy in this scenario. When you pass an instance of the struct `s` by value to a function, the default copy mechanism is employed, which performs a member-wise copy of the struct's contents. Here's how it works: 1. **Shallow Copy**: Since you did not implement a custom copy construc...
33,501
[ { "from": "human", "value": "Say I have a struct \"s\" with an int pointer member variable \"i\". I allocate memory on the heap for i in the default constructor of s. Later in some other part of the code I pass an instance of s by value to some function. Am I doing a shallow copy here? Assume I didn't i...
I am looking to set full trust for a single web part, is this possible? manifest.xml maybe?
In SharePoint, specifically in SharePoint Framework (SPFx), granting full trust to a single web part is not a supported approach. SPFx is designed with security in mind, and it runs in a sandboxed environment that restricts permissions and access to the SharePoint environment. This is to ensure that web parts do not co...
32,556
[ { "from": "human", "value": "I am looking to set full trust for a single web part, is this possible? manifest.xml maybe?\n" }, { "from": "gpt", "value": "In SharePoint, specifically in SharePoint Framework (SPFx), granting full trust to a single web part is not a supported approach. SPFx is des...
I am writing an .NET wrapper API for the Netflix API. At this point I can choose to represent URLs as either strings or URI objects. Seems to me there is a good case for both. So if you were using an API, which would you prefer?
When designing a .NET wrapper API for the Netflix API, choosing between strings and URI objects for representing URLs has its own advantages and disadvantages. Here are some considerations for both options: ### Using Strings: **Advantages:** 1. **Simplicity:** Strings are simple to use and can be easily manipulated. T...
32,425
[ { "from": "human", "value": "I am writing an .NET wrapper API for the Netflix API.\nAt this point I can choose to represent URLs as either strings or URI objects. Seems to me there is a good case for both.\nSo if you were using an API, which would you prefer?\n" }, { "from": "gpt", "value": "Whe...
I have a GridView where one column is bound to an object property containing a nullable integer. I set SortExpression to the name of the property, and sorting works perfectly as long as all rows contain a value. If any rows contain null, however, I get an exception: System.InvalidOperationException : Failed to compare ...
To handle sorting in a `GridView` where one of the columns is bound to a nullable integer property, you can customize the sorting behavior to manage `null` values appropriately. The exception you're encountering occurs because the default comparison logic does not handle `null` values. Here's how you can customize the...
29,309
[ { "from": "human", "value": "I have a GridView where one column is bound to an object property containing a nullable integer. I set SortExpression to the name of the property, and sorting works perfectly as long as all rows contain a value. If any rows contain null, however, I get an exception:\nSystem.Inva...
I would like to be able to spawn a linux process that would only have access to stdin, stdout, and stderr (nothing more and nothing less). Can I do this at the process level itself? I am also implicitly stating (oxymoron) that I don't want the spawned process to be able to change the "thing" that the other end of the s...
To achieve a process in Linux that only has access to standard input (stdin), standard output (stdout), and standard error (stderr) while preventing it from altering those streams or creating any new pipes, there are multiple approaches you can consider. Here are a few strategies: ### 1. **Using `chroot` and `setuid` ...
30,482
[ { "from": "human", "value": "I would like to be able to spawn a linux process that would only have access to stdin, stdout, and stderr (nothing more and nothing less). Can I do this at the process level itself? I am also implicitly stating (oxymoron) that I don't want the spawned process to be able to chang...
I'm uisng the WPF Web Browser control and when it fires the Navigating event, the event args always contain NavigationMode.New. It should be set to NavigationMode.Back if the user chooses to 'Go Back' from the web control. So its off to the COM ActiveX control underneath to determine the direction of navigation. I've...
In WPF, the Web Browser control uses the Internet Explorer rendering engine, which does not directly expose the navigation history or mode (such as "Back" or "Forward") in a way that is straightforward to access through the Navigating event. When you invoke the Navigating event, the NavigationMode is always set to Navi...
30,651
[ { "from": "human", "value": "I'm uisng the WPF Web Browser control and when it fires the Navigating event, the event args always contain NavigationMode.New. It should be set to NavigationMode.Back if the user chooses to 'Go Back' from the web control.\nSo its off to the COM ActiveX control underneath to de...
I am just getting started with expression trees so I hope this makes sense. I am trying to create an expression tree to represent: t => t.SomeProperty.Contains("stringValue"); So far I have got: private static Expression.Lambda<Func<string, bool>> GetContainsExpression<T>(string propertyName, string propertyValue)...
You're on the right track with building an expression tree. To create an expression that represents a call to the `String.Contains` method, you'll want to use `Expression.Call` to reference the `Contains` method correctly. Here's a complete example of how to build your expression tree for `t => t.SomeProperty.Contain...
32,290
[ { "from": "human", "value": "I am just getting started with expression trees so I hope this makes sense. I am trying to create an expression tree to represent:\nt => t.SomeProperty.Contains(\"stringValue\");\n\nSo far I have got:\n private static Expression.Lambda<Func<string, bool>> GetContainsExpressio...
I'm using asp.net membership, and need to make a call to Membership.GetUser() while I have another open SQL connection, but my code dies at that call. I have MultipleActiveResultSets=True in the connection string that is used by both my code and the Membership provider. It appears that the Membership class is ignorin...
Using ASP.NET Membership with Multiple Active Result Sets (MARS) can sometimes lead to issues if the membership provider is not properly configured to use the same connection string with MARS. Here are a few suggestions to help you resolve the issue: 1. **Check Connection Strings**: Ensure that the connection string u...
33,613
[ { "from": "human", "value": "I'm using asp.net membership, and need to make a call to Membership.GetUser() while I have another open SQL connection, but my code dies at that call. I have MultipleActiveResultSets=True in the connection string that is used by both my code and the Membership provider. It app...
There exists a very good talk about C# vs. Java where H.Mössenböck compares the two languages. That's from 2003, C# 2.0 compared with Java 1.5. Can be found in German here: http://dotnet.jku.at/ What good resources exist, where actual language versions are compared? Or maybe post a comparison right here? My interests a...
Comparing Java 6 and C# 3.0 is an interesting topic, as both languages were developed with similar goals but have unique features and syntactic styles that can influence a developer's choice. Below, I provide a comparison based on various aspects of the languages, highlighting advantages and disadvantages. ### Languag...
29,523
[ { "from": "human", "value": "There exists a very good talk about C# vs. Java where H.Mössenböck compares the two languages. That's from 2003, C# 2.0 compared with Java 1.5.\nCan be found in German here: http://dotnet.jku.at/\nWhat good resources exist, where actual language versions are compared?\nOr maybe ...
At the moment my code looks like this: # Assign values for saving to the db $data = array( 'table_of_contents' => $_POST['table_of_contents'], 'length' => $_POST['length'] ); # Check for fields that may not be set if ( isset($_POST['lossless_copy']) ) { $data = array( 'lossless_copy' => $_POST['lossl...
Yes, there is a more efficient way to handle this by iterating over the expected fields and conditionally adding them to the `$data` array only if they are set in the `$_POST` array. This can significantly reduce the amount of repetitive code and make it cleaner and easier to maintain. Here’s an example of how you cou...
34,801
[ { "from": "human", "value": "At the moment my code looks like this:\n# Assign values for saving to the db\n$data = array(\n 'table_of_contents' => $_POST['table_of_contents'],\n 'length' => $_POST['length']\n);\n\n# Check for fields that may not be set\nif ( isset($_POST['lossless_copy']) )\n{\n $da...
What is the object name of the Kde bar that provide buttons to hide/unhide widgets? I can't find on kde official API references. It's used in program like Kate, Kdevelop. Here the screenshot of the bar of Kate bottom: http://emilio.plugs.it/bar.png alt text http://emilio.plugs.it/bar.png
The bar you are referring to is commonly known as the **"Dock Widgets"** or **"Docking Area"** in KDE applications. Specifically, in frameworks like Qt and KDE, the functionality to show/hide these widgets is typically managed using the `QDockWidget` class. In applications like Kate or KDevelop, these dock widgets pro...
36,575
[ { "from": "human", "value": "What is the object name of the Kde bar that provide buttons to hide/unhide widgets? I can't find on kde official API references. It's used in program like Kate, Kdevelop. Here the screenshot of the bar of Kate bottom: \nhttp://emilio.plugs.it/bar.png\nalt text http://emilio.plug...
What I'm looking for is a basic equivalent of JavaScript's Array::join() whereby you pass in a separator character and uses that in its return string of all the subscripts. I could certainly write my own function using a StringBuilder or whatnot, but there must be something built into the .NET BCL. EDIT: Array of anyt...
In .NET, you can achieve similar functionality to JavaScript's `Array::join()` using `string.Join()`, but as you pointed out, `string.Join()` works specifically with strings. However, you can leverage `LINQ` to convert your array of any type to strings by calling `ToString()` on each element before joining them. Here’...
30,738
[ { "from": "human", "value": "What I'm looking for is a basic equivalent of JavaScript's Array::join() whereby you pass in a separator character and uses that in its return string of all the subscripts. I could certainly write my own function using a StringBuilder or whatnot, but there must be something bui...
Heres a tricky one . . I have a webpage (called PageA) that has a header and then simply includes an iframe. Lets call the page within the iframe PageB. PageB simply has a bunch of thumbnails but there are a lot so you have to scroll down on PageA to view them all. When i scroll down to the bottom of the pageB and c...
Yes, you can achieve this by adding some JavaScript to your iframe's `PageB`. The idea is to communicate from the iframe to the parent window (which is `PageA`) to scroll to the top when a thumbnail is clicked. Here's how you can do it: ### Step 1: Update PageB In `PageB`, add an event listener to the thumbnail link...
34,133
[ { "from": "human", "value": "Heres a tricky one . .\nI have a webpage (called PageA) that has a header and then simply includes an iframe. Lets call the page within the iframe PageB. PageB simply has a bunch of thumbnails but there are a lot so you have to scroll down on PageA to view them all. \nWhen i s...
My company starts a new project next week. We have planned to develop the application with eclipse rcp. The build process should be fully automated, so we're prepared to set up a continuous integration environment (e.g. Continuum). For the build-automation-part I intended to use maven2, because I want use its dependenc...
Setting up a Maven-based build process for an Eclipse RCP (Rich Client Platform) project can be a bit complex, especially if you're new to both Eclipse RCP and Maven. However, with some guidance, you can establish a solid foundation. Below are the best practices, common traps, and resources to help you through the proc...
19,372
[ { "from": "human", "value": "My company starts a new project next week. We have planned to develop the application with eclipse rcp. The build process should be fully automated, so we're prepared to set up a continuous integration environment (e.g. Continuum). For the build-automation-part I intended to use...
Using answers to this question, I have been able to populate a select box based on the selection of another select box. ( I posted my answer here) Pulling the data from an array structure built server-side, stored in a .js file and referenced in the html page. Now I would like to add a third select box. If I had 3 sets...
To create a structured array for your car data, you can use a combination of nested objects and arrays, which allows you to reference each level of the hierarchy (make, model, and options) easily. Below, I'll provide a refined structure for your `cars` array and show you how to populate the select boxes based on user s...
26,726
[ { "from": "human", "value": "Using answers to this question, I have been able to populate a select box based on the selection of another select box. ( I posted my answer here) Pulling the data from an array structure built server-side, stored in a .js file and referenced in the html page.\nNow I would like ...
In a visual studio project I have three layers, Data Layer, Business Layer and Presentation Layer. In the Data Layer I have a few XSLT's that transform some objects into an email, all works fine but I have discovered that the XSLTs do not get built/copied when building. I have currently, created a folder in the deplo...
Yes, it's common to encounter issues where certain files, like XSLT files in your case, are not included in the build process and thus do not get copied to the output directory. You can resolve this by modifying the properties of the XSLT files in Visual Studio to ensure they are copied during the build. Here’s how to ...
31,043
[ { "from": "human", "value": "In a visual studio project I have three layers, Data Layer, Business Layer and Presentation Layer. \nIn the Data Layer I have a few XSLT's that transform some objects into an email, all works fine but I have discovered that the XSLTs do not get built/copied when building. \nI ha...
I have form area in my view. If I click button A, I want to submit to /Books/1 and if I click button B, I want to submit to /Books/2 How do I achieve this with MVC?
In an ASP.NET MVC application, you can achieve the desired behavior by using JavaScript to dynamically change the form's action URL based on which button is clicked. Below is a step-by-step guide on how you can implement this: 1. **Create the View**: Define a form with two buttons in your Razor view. ```html @{ V...
26,997
[ { "from": "human", "value": "I have form area in my view. If I click button A, I want to submit to /Books/1 and if I click button B, I want to submit to /Books/2\nHow do I achieve this with MVC?\n" }, { "from": "gpt", "value": "In an ASP.NET MVC application, you can achieve the desired behavior ...
How to 'group by' a query using an alias, for example: select count(*), (select * from....) as alias_column from table group by alias_column I get 'alias_column' : INVALID_IDENTIFIER error message. Why? How to group this query?
In SQL, when you use an alias in the `SELECT` clause, that alias is not available to be used in the `GROUP BY` clause of the same query. The SQL parser processes the `GROUP BY` clause before it processes the `SELECT` clause. As a result, you cannot directly reference the alias in the `GROUP BY`. To achieve the desired...
34,152
[ { "from": "human", "value": "How to 'group by' a query using an alias, for example:\nselect count(*), (select * from....) as alias_column \nfrom table \ngroup by alias_column\n\nI get 'alias_column' : INVALID_IDENTIFIER error message. Why? How to group this query?\n" }, { "from": "gpt", "value":...
Is there a way to force the flash garbage collector to clean up freed memory? I've seen that it takes a lot of time for flash to clean up not referenced memory...
In Adobe Flash, the garbage collection process is generally managed automatically by the Flash Player runtime. While you cannot directly "force" the garbage collector to run at a specific time, there are a few strategies you can employ to encourage it to perform more efficiently: 1. **Minimize References**: Ensure tha...
34,165
[ { "from": "human", "value": "Is there a way to force the flash garbage collector to clean up freed memory? I've seen that it takes a lot of time for flash to clean up not referenced memory...\n" }, { "from": "gpt", "value": "In Adobe Flash, the garbage collection process is generally managed aut...
I'm currently developing an application using a MySQL database. The database-structure is still in flux and changes while development progresses (I change my local copy, leaving the one on the test-server alone). Is there a way to compare the two instances of the database to see if there were any changes? While current...
Yes, managing changes in your MySQL database schema between different environments (like development, testing, and production) is a common challenge, and there are several tools and approaches you can use to handle this effectively. Here are a few options, along with some explanations: ### 1. **Schema Comparison Tools...
31,115
[ { "from": "human", "value": "I'm currently developing an application using a MySQL database.\nThe database-structure is still in flux and changes while development progresses (I change my local copy, leaving the one on the test-server alone).\nIs there a way to compare the two instances of the database to s...
One of the frequent causes of memory leaks in .Net are event handlers which are never removed from their source objects. Will this WCF code cause a memory leak, or will the lambda go out of scope too, allowing both the proxy class and the handler to be GCed? void AMethod() { WCFClient proxy; proxy = new WCFCli...
In the provided WCF code, you are subscribing to an event using a lambda expression as the event handler. Here's a breakdown of whether this will cause a memory leak: 1. **Event Subscription**: When you subscribe to the `RemoteOperationCompleted` event with a lambda expression, you are effectively creating a delegate ...
33,413
[ { "from": "human", "value": "One of the frequent causes of memory leaks in .Net are event handlers which are never removed from their source objects. \nWill this WCF code cause a memory leak, or will the lambda go out of scope too, allowing both the proxy class and the handler to be GCed?\nvoid AMethod()\n{...
I am trying to embed multiple external websites into one web page. Using an IFRAME works ok, but once you get past 10 embedded iframes, the memory fottprint starts to get too big. So I was thinking, is it possible via ajax/javascript, to re-use the same iframe to load the collection of websites one after enother, and ...
Embedding multiple external websites within a single webpage using iframes can lead to performance issues, as you’ve noticed. However, there are a few considerations and potential solutions regarding your approach to reusing a single iframe with AJAX/JavaScript. ### Security Restrictions 1. **Same-Origin Policy**: Th...
29,543
[ { "from": "human", "value": "I am trying to embed multiple external websites into one web page. Using an IFRAME works ok, but once you get past 10 embedded iframes, the memory fottprint starts to get too big.\nSo I was thinking, is it possible via ajax/javascript, to re-use the same iframe to load the coll...
I created a new SharePoint portal for testing purposes using a manually added HOSTS record. I have it all tested and want to expose it to the outside world using a URL from our DNS. I can't seem to find a straight forward way to change the URL of a SharePoint portal. Does anyone know where this setting is? Thanks.
Changing the URL of a SharePoint site or portal involves a few steps, and the exact process can vary depending on whether you are using SharePoint Online or SharePoint Server (on-premises). Below are the steps for both scenarios: ### For SharePoint Online If you're using SharePoint Online (part of Microsoft 365), cha...
30,435
[ { "from": "human", "value": "I created a new SharePoint portal for testing purposes using a manually added HOSTS record. I have it all tested and want to expose it to the outside world using a URL from our DNS.\nI can't seem to find a straight forward way to change the URL of a SharePoint portal. Does any...
Need a way to allow sorting except for last item with in a list. Tried using the cancel option but it didn't work and I don't think that's what its for. I think a solution may be with events but would like your take on it. In practice the list is dynamically generated and relies on tag and relative referencing not id...
To allow sorting of a list while preventing the last item from being sorted, you can use the jQuery UI Sortable plugin's `cancel` option. You can dynamically set this option by using the `helper` and `start` events to determine if the item being sorted is the last item. Below is a sample code implementation that allo...
34,282
[ { "from": "human", "value": "Need a way to allow sorting except for last item with in a list. \nTried using the cancel option but it didn't work and I don't think that's what its for.\nI think a solution may be with events but would like your take on it.\nIn practice the list is dynamically generated and r...
I have a datagridview where the users can select which subset of columns to view. The problem I am having is that when I change the columns being displayed, the column widths are only being determined by the width of the Header Cells, not the data in it. I do have each column set to AutoSizeMode = AllCells. If a new r...
When you change the visibility of columns in a DataGridView and you want to ensure that the column widths are properly adjusted to fit the contents of the cells, you may need to manually trigger a resize of the columns after modifying their visibility. Setting `AutoSizeMode` to `AllCells` does not automatically recalcu...
33,486
[ { "from": "human", "value": "I have a datagridview where the users can select which subset of columns to view. \nThe problem I am having is that when I change the columns being displayed, the column widths are only being determined by the width of the Header Cells, not the data in it.\nI do have each column...
I have some user generated content I'm trying to render on my site. The rich text box editor I'm using renders font changes using <font /> tags, which are overridden by CSS on the page. Does anyone know if there is a way to allow rules defined using the <font /> tag to show through? UPDATE Since changing the control I'...
It looks like you've implemented a jQuery solution to handle the `<font>` tags by converting their attributes into inline CSS styles. This is a practical workaround given the constraints you have with the rich text editor. However, there are a few potential improvements you can consider to make your code cleaner and mo...
32,524
[ { "from": "human", "value": "I have some user generated content I'm trying to render on my site. The rich text box editor I'm using renders font changes using <font /> tags, which are overridden by CSS on the page.\nDoes anyone know if there is a way to allow rules defined using the <font /> tag to show thr...
As part of my overall development practices review I'm looking at how best to streamline and automate our ASP.net web development practices. At the moment, our process goes something like this: Designer builds frontend as static HTML/CSS on a network share. This gets tweaked until signed off. (e.g. http://myserver/acm...
Managing configuration in ASP.NET applications is crucial for minimizing errors across different environments (development, staging, production) and ensuring a smoother deployment process. Here are several strategies you can adopt to streamline your ASP.NET development practices, particularly focusing on configuration ...
33,609
[ { "from": "human", "value": "As part of my overall development practices review I'm looking at how best to streamline and automate our ASP.net web development practices.\nAt the moment, our process goes something like this:\n\nDesigner builds frontend as static HTML/CSS on a network share. This gets tweaked...
I have problem in some JavaScript that I am writing where the Switch statement does not seem to be working as expected. switch (msg.ResultType) { case 0: $('#txtConsole').val("Some Val 0"); break; case 1: $('#txtConsole').val("Some Val 1"); break; case 2: $('#txtConsole').text("Some Val 2"); ...
Based on the code you've shared, it appears that the `switch` statement should work correctly for `msg.ResultType`, assuming `msg.ResultType` is indeed an integer value (0, 1, or 2). If the control is skipping directly to the end and not executing any of the `case` blocks, there may be a few possibilities for what coul...
34,121
[ { "from": "human", "value": "I have problem in some JavaScript that I am writing where the Switch statement does not seem to be working as expected.\nswitch (msg.ResultType) {\n case 0:\n $('#txtConsole').val(\"Some Val 0\");\n break;\n case 1:\n $('#txtConsole').val(\"Some Val 1\");\n break;\...
I've recently switch to MVP pattern with a Passive View approach. I feel it very comfortable to work with when the view interface exposes only basic clr types, such as string mapped to TextBoxes, IDictionary mapped to DropDownLists, IEnumerable mapped to some grids, repeaters. However, this last approach works only wh...
Your dilemma with implementing the MVP (Model-View-Presenter) pattern, particularly the Passive View approach, is a common challenge when dealing with multi-column grids in a UI context. Let's evaluate your two proposed solutions and explore some alternatives that maintain the integrity of the MVP pattern. ### Solutio...
27,324
[ { "from": "human", "value": "I've recently switch to MVP pattern with a Passive View approach. I feel it very comfortable to work with when the view interface exposes only basic clr types, such as string mapped to TextBoxes, IDictionary mapped to DropDownLists, IEnumerable mapped to some grids, repeaters.\...
What's the best way to connect to a Informix database from .Net? I'm developing a client-server application based on a legacy Informix DB which used to be connected by JDBC. I need it, from the most important to the least: To be fast DB server changes not needed No ODBC and no dependencies, other than de .Net Framewor...
Connecting to an Informix database from .NET, particularly under the constraints you've mentioned (fast, no DB server changes, and no ODBC), is best accomplished using the Informix .NET provider provided by IBM. This provider is optimized for Informix databases and will allow you to connect directly without needing ODB...
22,715
[ { "from": "human", "value": "What's the best way to connect to a Informix database from .Net?\nI'm developing a client-server application based on a legacy Informix DB which used to be connected by JDBC.\nI need it, from the most important to the least:\n\nTo be fast\nDB server changes not needed\nNo ODBC a...
It's possible, but is it appropriate to use SHFileOperation within a Windows service? All those SHxxx API functions in shell32.dll seem to have been written with user level programs in mind. Can I be certain SHFileOperation won't display GUI ever?
Using `SHFileOperation` in a Windows service is not recommended. While it is technically possible to call this function from a service, there are several important considerations: 1. **User Context**: Windows services run in a different user context than regular user applications. Most shell operations expect a user c...
30,527
[ { "from": "human", "value": "It's possible, but is it appropriate to use SHFileOperation within a Windows service? All those SHxxx API functions in shell32.dll seem to have been written with user level programs in mind. Can I be certain SHFileOperation won't display GUI ever?\n" }, { "from": "gpt"...
currently i have jdbc code with the following basic stucture: get Connection (do the next 4 lines several times, never closing statement) get statement get result set process result set close result set close connection It occurred to me after writing this code that i need to close the statement. 1 what are the ef...
Not closing JDBC resources such as statements and result sets can lead to various issues, including resource leaks and potential performance problems. Let's address your questions in detail: ### 1. Effects of Not Closing the Statement If you don't close the `Statement` objects, several issues can arise: - **Resource...
31,019
[ { "from": "human", "value": "currently i have jdbc code with the following basic stucture:\nget Connection\n(do the next 4 lines several times, never closing statement)\nget statement\nget result set\nprocess result set\nclose result set \nclose connection \nIt occurred to me after writing this code that ...
I need to compare large count of PDF files for it optical content. Because the PDF files was created on different platforms and with different versions of the software there are structural differences. For example: the chunking of text can be different the write order can be different the position can be differ some p...
To compare the optical content of a large number of PDF files while accounting for differences in structure, you can follow a systematic approach that combines various tools and techniques. Here’s a general framework for how to proceed: ### 1. **Use Optical Character Recognition (OCR):** - Utilize OCR software to c...
28,106
[ { "from": "human", "value": "I need to compare large count of PDF files for it optical content. Because the PDF files was created on different platforms and with different versions of the software there are structural differences. For example:\n\nthe chunking of text can be different\nthe write order can be...
HI, I am trying to write a query in vba and to save its result in a report. I am a beginner. this is what i have tried can somebody correct me Dim cn As New ADODB.Connection, rs As New ADODB.Recordset Dim sql As String Set cn = CurrentProject.Connection sql = "Select * from table1 where empno is 0" rs.Open sql, cn ...
To save the results of your query in a report in VBA, you generally need to bind the recordset to a report or create a temporary table first and then create the report based on that table. ### Saving Query Results in a Report You can create a report based on a recordset, but you need to define the report first in you...
26,443
[ { "from": "human", "value": "HI,\nI am trying to write a query in vba and to save its result in a report.\nI am a beginner. this is what i have tried \ncan somebody correct me\nDim cn As New ADODB.Connection, rs As New ADODB.Recordset\nDim sql As String\n\nSet cn = CurrentProject.Connection\nsql = \"Select ...
I'm writing a construct in PHP where a parser determins which function to call dynamically, kind of like this: // The definition of what to call $function_call_spec = array( "prototype" => "myFunction", "parameters" => array( "first_par" => "Hello", ...
Yes, you can achieve dynamic function calls with parameters in PHP using the `call_user_func_array()` function. This function allows you to call a function with an array of parameters. This way, you can pass your parameters dynamically without explicitly specifying each one. Here’s how you can modify your code to use ...
31,056
[ { "from": "human", "value": "I'm writing a construct in PHP where a parser determins which function to call dynamically, kind of like this:\n// The definition of what to call\n$function_call_spec = array( \"prototype\" => \"myFunction\", \n \"parameters\" => array( \"first_par\"...
Scenario: The task I have at hand is to enable a single-signon solution between different organizations/websites. I start as an authenticated user on one organization's website, convert specific information into an Xml document, encrypt the document with triple des, and send that over as a post variable to the second o...
To achieve the scenario you've described, you can create a process where you programmatically POST the encrypted XML data to the second organization's website while also redirecting the user's browser to that destination. Here’s how you can do that in ASP.NET 2.0 WebForms. ### Steps to Implement the Solution 1. **Cre...
31,907
[ { "from": "human", "value": "Scenario:\nThe task I have at hand is to enable a single-signon solution between different organizations/websites. I start as an authenticated user on one organization's website, convert specific information into an Xml document, encrypt the document with triple des, and send th...
I'm working on a code base in which we have several configurable types. One of those types is 64 bit integer. When we compile for platforms that have no native 64 bit integer type, we simple represent 64 bit integers using a struct similar to typedef struct { unsigned int hi, lo; } int64; In order to make this typ...
You've correctly identified the challenge of creating a type-safe wrapper around your `int64` type for representing time, while still leveraging the existing operations defined for `int64`. You want to maintain readability and also allow flexibility for future changes in how time is represented. One common approach to...
32,288
[ { "from": "human", "value": "I'm working on a code base in which we have several configurable types. One of those types is 64 bit integer. When we compile for platforms that have no native 64 bit integer type, we simple represent 64 bit integers using a struct similar to\ntypedef struct {\n unsigned int ...
I know there is a WeakHashMap in java.util, but since it uses WeakReferences for everything, which is only referenced by this Map, referenced objects will get lost on the next GC cycle. So it's nearly useless if you want to cache random data, which is very likely to be requested again without being Hard-linked the rest...
You're correct that `WeakHashMap` in Java uses `WeakReferences`, which allows the entries in the map to be collected by the garbage collector (GC) when they are no longer strongly reachable. This behavior can indeed make `WeakHashMap` unsuitable for caching, as entries can be removed from the map too eagerly. While Ja...
31,671
[ { "from": "human", "value": "I know there is a WeakHashMap in java.util, but since it uses WeakReferences for everything, which is only referenced by this Map, referenced objects will get lost on the next GC cycle. So it's nearly useless if you want to cache random data, which is very likely to be requested...
I want to pass a reference type by value to a method in C#. Is there a way to do it. In C++, I could always rely on the copy constructor to come into play if I wanted to pass by Value. Is there any way in C# except: 1. Explicitly creating a new object 2. Implementing IClonable and then calling Clone method. Here's a sm...
In C#, reference types (like classes) are passed by reference by default, which means that if you pass an object of a reference type to a method, you're actually passing a reference to the same object, not a copy of the object itself. This can lead to unintended side effects, as modifications to the object within the m...
31,962
[ { "from": "human", "value": "I want to pass a reference type by value to a method in C#. Is there a way to do it.\nIn C++, I could always rely on the copy constructor to come into play if I wanted to pass by Value. Is there any way in C# except:\n1. Explicitly creating a new object\n2. Implementing IClonabl...
I am trying to come up with such a solution that the user is going to enter the URL of a web-service and it is going to be tested. Although what I want is a URL change, I guarantee the Service Description is always going to be the same (except the wsdl:service tag of course which contains the soap:address); I just want...
To create a solution that allows users to input a URL for a web service and test it while ensuring that the service description remains consistent (except for the `wsdl:service` tag), you can follow a structured approach. Below is a high-level outline of how you can implement this solution, including code snippets and ...
31,708
[ { "from": "human", "value": "I am trying to come up with such a solution that the user is going to enter the URL of a web-service and it is going to be tested.\nAlthough what I want is a URL change, I guarantee the Service Description is always going to be the same (except the wsdl:service tag of course whi...
I want something that can check if a string is "SELECT", "INSERT", etc. I'm just curious if this exists.
Yes, you can easily check if a string matches a specific set of SQL keywords (like "SELECT", "INSERT", etc.) using various programming languages. Below are examples in Python, JavaScript, and Java. ### Python Example ```python def is_sql_command(command): sql_commands = {"SELECT", "INSERT", "UPDATE", "DELETE", "C...
29,303
[ { "from": "human", "value": "I want something that can check if a string is \"SELECT\", \"INSERT\", etc. I'm just curious if this exists.\n" }, { "from": "gpt", "value": "Yes, you can easily check if a string matches a specific set of SQL keywords (like \"SELECT\", \"INSERT\", etc.) using vario...
I have a blank test app created in VS 2005 as ASP.NET application. MSDN says that By default, ASP.NET does not use impersonation, and your code runs using the ASP.NET application's process identity. And I have the following web.config <configuration> <appSettings/> <connectionStrings/> <system.web> ...
It looks like you're encountering a common issue with impersonation in ASP.NET. Let's break down the behavior you're observing. ### Key Points: 1. **Impersonation Settings**: - Your `web.config` has `<identity impersonate="false"/>`, which is indeed the default behavior in ASP.NET. When impersonation is disabled, ...
30,772
[ { "from": "human", "value": "I have a blank test app created in VS 2005 as ASP.NET application. MSDN says that \n\nBy default, ASP.NET does not use impersonation, and your code runs using the ASP.NET application's process identity.\n\nAnd I have the following web.config\n<configuration>\n\n <appSettings/...
I'm working on a small bugtracking system which shows a list of bugs. For the overview I want to use a grid - now I only need a style. Of course I won't copy the whole style from anyone else, but I just want to know which type of styles you like. Do you have any other great style? What do you think about the styles on...
Creating a visually appealing and functional grid for your bug-tracking system is important for user experience. Here are a few styles and design principles that you might consider: ### General Style Preferences 1. **Clean and Minimalistic**: - Use ample white space to reduce clutter. - Simple lines and border...
33,260
[ { "from": "human", "value": "I'm working on a small bugtracking system which shows a list of bugs. For the overview I want to use a grid - now I only need a style. \nOf course I won't copy the whole style from anyone else, but I just want to know which type of styles you like. Do you have any other great st...
I'd like to create a script to manipulate Apache2 configuration directly, reading and writing its properties (like adding a new VirtualHost, changing settings of one that already exists). Are there any libs out there, for Perl, Python or Java that automates that task?
Yes, there are libraries and modules in Perl, Python, and Java that can help you manipulate Apache2 configurations programmatically. Below are some options for each language: ### Python 1. **apacheconfig**: - A Python library designed for working with Apache configuration files. It allows you to read, modify, and ...
30,792
[ { "from": "human", "value": "I'd like to create a script to manipulate Apache2 configuration directly, reading and writing its properties (like adding a new VirtualHost, changing settings of one that already exists).\nAre there any libs out there, for Perl, Python or Java that automates that task?\n" }, ...
I just pasted some generated javadoc into an eclipse project, to discover none of the HTML is compliant. There is even cases of closing tags that were never opened. Is there some way to fix this? Maybe a "be compliant" option...
When working with Javadoc in an Eclipse project, issues with HTML compliance can indeed occur if the generated documentation is not formatted correctly. Unfortunately, Eclipse itself does not have a built-in feature to automatically fix HTML compliance issues in Javadoc comments. However, there are several steps you ca...
29,589
[ { "from": "human", "value": "I just pasted some generated javadoc into an eclipse project, to discover none of the HTML is compliant.\nThere is even cases of closing tags that were never opened.\nIs there some way to fix this? Maybe a \"be compliant\" option...\n" }, { "from": "gpt", "value": "W...
What would be the best way to write log statements to a file or database in an iPhone application? Ideally, NSLog() output could be redirected to a file using freopen(), but I've seen several reports that it doesn't work. Does anyone have this going already or have any ideas how this might best be done? Thanks!
Redirecting `NSLog()` output to a file in an iPhone application can be challenging, especially since using `freopen()` is often discouraged due to the unpredictable behavior on iOS. Instead, you can use other methods to achieve file logging or log messages to a database. Here’s how to implement logging efficiently: ##...
31,828
[ { "from": "human", "value": "What would be the best way to write log statements to a file or database in an iPhone application?\nIdeally, NSLog() output could be redirected to a file using freopen(), but I've seen several reports that it doesn't work. Does anyone have this going already or have any ideas h...
I'm trying to substitute something in a string in python and am having some trouble. Here's what I'd like to do. For a given comment in my posting: "here are some great sites that i will do cool things with! https://stackoverflow.com/it's a pig & http://google.com" I'd like to use python to make the strings like this:...
You're on the right track with using regular expressions to find URLs in your string and then replace them with the desired HTML format. However, you can simplify your code by using a function for substitution that handles the replacement inline. Here's a modified version of your code to achieve what you want: ```py...
33,277
[ { "from": "human", "value": "I'm trying to substitute something in a string in python and am having some trouble. Here's what I'd like to do.\nFor a given comment in my posting:\n\"here are some great sites that i will do cool things with! https://stackoverflow.com/it's a pig & http://google.com\"\n\nI'd li...
I use SQLite for a number of application on the desktop and PDA. Most operations are readonly, as SQLite functions as a data store for reference material in my applications. Basically, I am looking for suggestions on improving performance in a scenario where you know the access to the data is only read-only. Maybe via ...
Improving the performance of SQLite in a read-only scenario, especially on constrained devices like PDAs, involves several strategies, primarily revolving around SQLite's configuration, query optimization, and database design. Here are some specific suggestions: ### 1. PRAGMA Settings You can use various PRAGMA statem...
30,919
[ { "from": "human", "value": "I use SQLite for a number of application on the desktop and PDA. Most operations are readonly, as SQLite functions as a data store for reference material in my applications.\nBasically, I am looking for suggestions on improving performance in a scenario where you know the access...
I have always found this to be a very useful feature in Visual Studio. For those who don't know about it, it allows you to edit code while you are debugging a running process, re-compile the code while the binary is still running and continue using the application seamlessly with the new code, without the need to rest...
The feature you’re referring to is called **Edit and Continue** in Visual Studio. It's a powerful tool that allows developers to make changes to their code while debugging a running application and see those changes take effect without needing to restart the application. Here's how it works and how it is generally impl...
30,000
[ { "from": "human", "value": "I have always found this to be a very useful feature in Visual Studio. For those who don't know about it, it allows you to edit code while you are debugging a running process, re-compile the code while the binary is still running and continue using the application seamlessly wi...
Here's the idea: you commit your code to a repository and call a web service (or enter the request through a web app) to have it compiled. The results are then pushed up to a FTP server, S3 bucket, etc. Is there anything like this out there on the public internet? TFS has a build queuing feature, but I'm thinking mor...
Yes, there are several services and platforms available on the public internet that allow you to automatically compile code hosted in repositories and manage builds without requiring extensive local setup. Here are some notable ones: 1. **GitHub Actions**: If your code is hosted on GitHub, GitHub Actions enables you t...
33,439
[ { "from": "human", "value": "Here's the idea: you commit your code to a repository and call a web service (or enter the request through a web app) to have it compiled. The results are then pushed up to a FTP server, S3 bucket, etc. Is there anything like this out there on the public internet?\nTFS has a b...
I'm looking for the easiest free SVN implementation I can find. I downloaded and installed VisualSVN Server - pretty easy. Installed TortioseSVN - pretty easy - both work together. Installed AnkhSVN, I can't get it to connect to the repository on the VisualSVN Server. Is there anything special I need to do to get AnkhS...
Getting AnkhSVN to work with VisualSVN Server can sometimes require a few extra steps to ensure proper configuration. Here are some troubleshooting tips and configuration steps that you can follow to help AnkhSVN connect to your VisualSVN Server: 1. **Check VisualSVN Server Configuration**: - Ensure that your Visua...
30,733
[ { "from": "human", "value": "I'm looking for the easiest free SVN implementation I can find.\nI downloaded and installed VisualSVN Server - pretty easy.\nInstalled TortioseSVN - pretty easy - both work together.\nInstalled AnkhSVN, I can't get it to connect to the repository on the VisualSVN Server.\nIs the...
I have a table ("venues") that stores all the possible venues a volunteer can work, each volunteer is assigned to work one venue each. I want to create a select drop down from the venues table. Right now I can display the venue each volunteer is assigned, but I want it to display the drop down box, with the venue alrea...
To populate the `<select>` dropdown with venues from the database and pre-select the venue associated with a specific volunteer (in this case, the one with ID 7), you'll need to retrieve the venue data and then loop through the results to create the options. You also need to check if the venue is the one assigned to th...
29,751
[ { "from": "human", "value": "I have a table (\"venues\") that stores all the possible venues a volunteer can work, each volunteer is assigned to work one venue each.\nI want to create a select drop down from the venues table.\nRight now I can display the venue each volunteer is assigned, but I want it to di...
TextMate may be the best editor out there, but is has a big disadvantage: it undoes each character typed instead of grouping characters. This makes a large undo tedious! Do you now any hacks, plugins or workarounds to fix this issue?
TextMate is a powerful text editor, but its default undo behavior, where each character typed is treated as a separate undo action, can be a nuisance for users who are accustomed to different behavior in other editors. Here are a few strategies and workarounds you can use to mitigate this issue: 1. **Use the "Save" Co...
30,822
[ { "from": "human", "value": "TextMate may be the best editor out there, but is has a big disadvantage: it undoes each character typed instead of grouping characters. This makes a large undo tedious!\nDo you now any hacks, plugins or workarounds to fix this issue?\n" }, { "from": "gpt", "value": ...
I can connect with a user who has permissions to set passwords. I'm able to change attributes, but I can't set the password. Found some instructions to set the attribute unicodePwd to \UNC:"*password*", but it says: Error: Modify: Unwilling To Perform. <53> Setting LDAP_OPT_ENCRYPT to 1 didn't work either. The port I...
The error you're encountering when trying to set the `unicodePwd` attribute usually indicates that the operation is being rejected by the server. This can happen for a few reasons, especially when it comes to setting passwords in an Active Directory (AD) environment via LDAP. Here are a few steps and considerations th...
31,321
[ { "from": "human", "value": "I can connect with a user who has permissions to set passwords. I'm able to change attributes, but I can't set the password.\nFound some instructions to set the attribute unicodePwd to \\UNC:\"*password*\", but it says:\n\nError: Modify: Unwilling To Perform. <53>\n\nSetting LDA...
Hi I'm looking into iPhone development, and Objective-C is not be my preferred language. As far as I can see at this moment Ruby cannot be used to talk to Cocoa Touch at the moment on the iPhone. So my question is, am I wrong? Can I use Ruby on the iPhone to develop Cocoa Touch applications. And what is the future look...
You are correct that Objective-C and Swift are the primary languages used for iOS development, particularly when it comes to leveraging Cocoa Touch and the broader iOS SDK. While there have been attempts to use Ruby for iOS development, they have not gained significant traction compared to more established languages. ...
32,060
[ { "from": "human", "value": "Hi I'm looking into iPhone development, and Objective-C is not be my preferred language. As far as I can see at this moment Ruby cannot be used to talk to Cocoa Touch at the moment on the iPhone.\nSo my question is, am I wrong? Can I use Ruby on the iPhone to develop Cocoa Touch...
This is really weird... When I open the following simple HTML document in Internet Explorer 7.0.5730.11 (on Windows Server 2003 Web Edition SP2) <html> <body> <p>+</p> </body> </html> it shows me a totally blank page. FWIW, this is just a trivial "repro" sample. In real HTML documents, I observed other, even m...
It does sound like you're encountering a peculiar and intermittent rendering issue in Internet Explorer 7, especially since it involves such a simple HTML structure. There are a few possible explanations and things you might consider: 1. **Rendering Mode**: Internet Explorer has different rendering modes (Quirks mode ...
26,211
[ { "from": "human", "value": "This is really weird... When I open the following simple HTML document in Internet Explorer 7.0.5730.11 (on Windows Server 2003 Web Edition SP2)\n<html>\n <body>\n <p>+</p>\n </body>\n</html>\n\nit shows me a totally blank page. FWIW, this is just a trivial \"repro\" sample...
What benchmark would test how well my hardware rates, for my ASP.NET, SQL Server, IIS product? I have two servers, one runs my code much faster than the other and I believe their configurations are close to equivalent and therefore I want to benchmark the two. I do not want this question to become one about the hardwar...
To benchmark the performance of your ASP.NET application running on SQL Server with IIS, you'll want to focus on metrics that are relevant to your specific application and its interactions with the database and web server. Here are some steps and tools that can help you create a meaningful benchmark: ### 1. Identify K...
32,730
[ { "from": "human", "value": "What benchmark would test how well my hardware rates, for my ASP.NET, SQL Server, IIS product?\nI have two servers, one runs my code much faster than the other and I believe their configurations are close to equivalent and therefore I want to benchmark the two.\nI do not want th...
As every Haxe developer knows, you could use haxe.Timer.delayed() to delay function call for some time. But this function doesn't exist for Neko at all. Is there a way to achieve the same results?
In Haxe, while `haxe.Timer.delayed()` is commonly used to delay function calls, it is not available for Neko. However, you can achieve similar functionality using Neko's built-in threading capabilities. The `haxe.Thread` class can be employed to create a delay by sleeping for a specified period before executing a funct...
34,146
[ { "from": "human", "value": "As every Haxe developer knows, you could use haxe.Timer.delayed() to delay function call for some time. But this function doesn't exist for Neko at all. Is there a way to achieve the same results?\n" }, { "from": "gpt", "value": "In Haxe, while `haxe.Timer.delayed()`...
Does anyone know if there is a plug-in for TFS that will print out our sprint backlog items in a format suitable for using on a Scrum Board, rather than us having to write them out by hand?
Yes, there are several options and plugins available for TFS (Team Foundation Server) that can help you print out your sprint backlog items in a format suitable for a Scrum board. Here are some suggestions: 1. **TFS Extensions Marketplace**: Check the TFS Extensions Marketplace for extensions specifically designed for...
31,480
[ { "from": "human", "value": "Does anyone know if there is a plug-in for TFS that will print out our sprint backlog items in a format suitable for using on a Scrum Board, rather than us having to write them out by hand?\n" }, { "from": "gpt", "value": "Yes, there are several options and plugins a...
I'm looking for a way to selectively apply a CSS class to individual rows in a GridView based upon a property of the data bound item. e.g.: GridView's data source is a generic list of SummaryItems and SummaryItem has a property ShouldHighlight. When ShouldHighlight == true the CSS for the associated row should be set t...
To selectively apply a CSS class to individual rows in a GridView based on a property of the bound data, you can use the `RowDataBound` event of the GridView. In this event, you can inspect the data item and apply the desired CSS class accordingly. Here's a step-by-step approach to achieve this: 1. **Define the CSS C...
30,567
[ { "from": "human", "value": "I'm looking for a way to selectively apply a CSS class to individual rows in a GridView based upon a property of the data bound item.\ne.g.:\nGridView's data source is a generic list of SummaryItems and SummaryItem has a property ShouldHighlight. When ShouldHighlight == true the...
Where I'm at there is a main system that runs on a big AIX mainframe. To facility reporting and operations there is nightly dump from the mainframe into SQL Server, such that each of our 50-ish clients is in their own database with identical schemas. This dump takes about 7 hours to finish each night, and there's not...
It sounds like you are in a complex situation with your nightly data processing. You've done a good job of analyzing the situation, and you've brought up several important points. Here are some suggestions and thoughts on optimizing your data loading process: ### 1. Indexing Strategy Since you found that indexing befo...
32,167
[ { "from": "human", "value": "Where I'm at there is a main system that runs on a big AIX mainframe. To facility reporting and operations there is nightly dump from the mainframe into SQL Server, such that each of our 50-ish clients is in their own database with identical schemas. This dump takes about 7 ho...
I have a requirement to allow a user of this ASP.NET web application to upload a specifically formatted Excel spreadsheet, fill arrays with data from the spreadsheet, and bind the arrays to a Oracle stored procedure for validation and insertion into the database. I must be able to read the data from the Excel spreadsh...
To read data from an uploaded Excel spreadsheet directly in memory without saving it to the server's hard disk, you can use a library like `EPPlus` or `NPOI`. These libraries allow you to read Excel files in memory and extract the data you need to process it, validate it, and then pass it to your Oracle stored procedur...
31,098
[ { "from": "human", "value": "I have a requirement to allow a user of this ASP.NET web application to upload a specifically formatted Excel spreadsheet, fill arrays with data from the spreadsheet, and bind the arrays to a Oracle stored procedure for validation and insertion into the database. I must be able...
I am teaching (with others) a relatively introductory course in computer science for IT professionals without a background in CS. Since I developed the course materials on automata and grammars, I am also responsible for teaching about compilers and compiler construction. Years ago, when I studied compilation in colleg...
It's great that you're teaching a course on automata, grammars, and compilers! Lex and Yacc have been foundational tools for teaching about lexical analysis and parsing, but there are now more modern alternatives that might be more relevant, especially given your students' proficiency in Java. ### Current Trends and ...
26,865
[ { "from": "human", "value": "I am teaching (with others) a relatively introductory course in computer science for IT professionals without a background in CS. Since I developed the course materials on automata and grammars, I am also responsible for teaching about compilers and compiler construction.\nYears...
When a script runs under Apache, I insert $_SERVER['SERVER_NAME'] value into an error reporting e-mail message. However, if a Web script forks a "worker" job with nohup php ..., $_SERVER['SERVER_NAME'] appears to be empty there. Thus, if an error occurs, it's reported without a host name. Can I reliably get the host na...
Yes, you can reliably get the host name in PHP without calling the Unix `hostname` command, even when running a script via `nohup` or as a separate worker process. Here are a few methods to achieve this: 1. **Using `gethostname()`**: This function returns the host name of the machine. This is suitable for getting the ...
32,324
[ { "from": "human", "value": "When a script runs under Apache, I insert $_SERVER['SERVER_NAME'] value into an error reporting e-mail message.\nHowever, if a Web script forks a \"worker\" job with nohup php ..., $_SERVER['SERVER_NAME'] appears to be empty there. Thus, if an error occurs, it's reported without...
I finally got my group to switch from SourceSafe to Subversion. Unfortunately, my manager still wants to use exclusive locks on every single file. So I set the svn:needs-lock property on every file and created a pre-commit hook to make sure the property stays set. We are running Subversion on a Linux server. Most of...
To generate a report of all files currently locked in your Subversion repository along with the users who have them locked, you can leverage the command line tools that come with Subversion. The `svn` command-line client can provide the necessary information for this task. Here's a step-by-step guide to achieve this: ...
33,440
[ { "from": "human", "value": "I finally got my group to switch from SourceSafe to Subversion. Unfortunately, my manager still wants to use exclusive locks on every single file. So I set the svn:needs-lock property on every file and created a pre-commit hook to make sure the property stays set.\nWe are runn...
I'm currently passing the pid on the command line to the child, but is there a way to do this in the Win32 API? Alternatively, can someone alleviate my fear that the pid I'm passing might belong to another process after some time if the parent has died?
In the Win32 API, passing the Process ID (PID) from a parent process to a child process can indeed be done through the command line or via various inter-process communication (IPC) methods. However, if you're concerned about the PID being reused by the system, it's important to understand how process IDs work in Window...
31,104
[ { "from": "human", "value": "I'm currently passing the pid on the command line to the child, but is there a way to do this in the Win32 API? Alternatively, can someone alleviate my fear that the pid I'm passing might belong to another process after some time if the parent has died?\n" }, { "from": ...
how can I save a java applet from a website so I can run it offline?
Saving a Java applet from a website and running it offline can be challenging due to various reasons, including security restrictions, dependencies on server-side resources, and the potential obsolescence of Java applets. However, if you still wish to proceed, here are some general steps you can follow: ### Step 1: Ch...
31,107
[ { "from": "human", "value": "how can I save a java applet from a website so I can run it offline?\n" }, { "from": "gpt", "value": "Saving a Java applet from a website and running it offline can be challenging due to various reasons, including security restrictions, dependencies on server-side re...
I'm trying to save the output of an vector image drawin in Java2D to an SWF file. There are great libraries for saving java2D output as things like SVG (BATIK) and PDF(itext) but I can't find one for SWF. Any ideas?
As of my last knowledge update in October 2023, there isn't a widely recognized library specifically for exporting Java2D graphics directly to SWF (Flash) format. However, you can consider the following approaches to achieve your goal: 1. **Convert to SVG or PDF then to SWF:** - Use libraries like **Apache Batik** ...
35,095
[ { "from": "human", "value": "I'm trying to save the output of an vector image drawin in Java2D to an SWF file. There are great libraries for saving java2D output as things like SVG (BATIK) and PDF(itext) but I can't find one for SWF. Any ideas?\n" }, { "from": "gpt", "value": "As of my last kno...
I have a custom UIView that generates a set of subviews and display them in rows and columns like tiles. What I am trying to achieve is to allow the user to touch the screen and as the finger move, the tiles beneath it disappears. The code below is the custom UIView that contains the tiles: - (id)initWithFrame:(CGRect...
Your approach to implementing the touch detection for hiding tiles is functional, but there are indeed more efficient ways to achieve the desired effect, especially when dealing with a dense set of tiles. Here are some suggestions to improve your implementation: ### Optimized Approach 1. **Reduce hitTest Overhead**: ...
29,105
[ { "from": "human", "value": "I have a custom UIView that generates a set of subviews and display them in rows and columns like tiles. What I am trying to achieve is to allow the user to touch the screen and as the finger move, the tiles beneath it disappears. \nThe code below is the custom UIView that conta...
My knowledge about implementing a parser is a bit rusty. I have no idea about the current state of research in the area, and could need some links regarding recent advances and their impact on performance. General resources about writing a parser are also welcome, (tutorials, guides etc.) since much of what I had lear...
It's great that you're looking to refresh your knowledge about parsers! Here’s a structured approach to help you out, focusing on general parser development resources, research advancements, parser generators like ANTLR, and specific guidance related to RDF/OWL/SKOS in N3 notation. ### General Resources on Writing Par...
25,182
[ { "from": "human", "value": "My knowledge about implementing a parser is a bit rusty.\nI have no idea about the current state of research in the area, and could need some links regarding recent advances and their impact on performance. \nGeneral resources about writing a parser are also welcome, (tutorials,...
I am creating an air application. How to create auto update in adobe Flex 3 air?
Creating an auto-update feature for an Adobe AIR application using Flex 3 involves several steps. You need to handle the versioning of your application and check for updates periodically or on application startup. Below is a general approach to implementing an auto-update feature: ### Steps to Implement Auto-Update in...
29,246
[ { "from": "human", "value": "I am creating an air application. How to create auto update in adobe Flex 3 air?\n" }, { "from": "gpt", "value": "Creating an auto-update feature for an Adobe AIR application using Flex 3 involves several steps. You need to handle the versioning of your application a...
I have to sort a number of integers, which can have values between 30.000.000 and 350.000.000. There will be between 0 and 65.535 integers, with the average count being 20.000. RAM usage is irrelevant and speed only is important. Later on i will also have to split them into groups, with the divide always being set when...
It's great that you've found a solution that works well for your use case! Your approach to sorting the integers and then creating buckets based on gaps is a solid strategy given your requirements. Let me summarize and enhance your method a bit more for clarity and potential optimization. ### Problem Breakdown 1. **So...
33,863
[ { "from": "human", "value": "I have to sort a number of integers, which can have values between 30.000.000 and 350.000.000. There will be between 0 and 65.535 integers, with the average count being 20.000. RAM usage is irrelevant and speed only is important.\nLater on i will also have to split them into gro...
I'm tryint to post to a ADO.NET Data Service but the parameters seems to get lost along the way. I got something like: [WebInvoke(Method="POST")] public int MyMethod(int foo, string bar) {...} and I make an ajax-call using prototype.js as: var args = {foo: 4, bar: "'test'"}; new Ajax.Requst(baseurl + 'MyMethod', met...
It looks like you're encountering an issue with the way the parameters are being sent in the POST request to your ADO.NET Data Service. ADO.NET Data Services typically expect parameters to be sent in a specific format when using POST, so let's go through a few key aspects to help resolve your issue. ### Adjusting Your...
34,348
[ { "from": "human", "value": "I'm tryint to post to a ADO.NET Data Service but the parameters seems to get lost along the way.\nI got something like:\n[WebInvoke(Method=\"POST\")]\npublic int MyMethod(int foo, string bar) {...}\n\nand I make an ajax-call using prototype.js as:\nvar args = {foo: 4, bar: \"'te...
Can anyone point me to the preferences page that has the setting of the DEBUG current line background color? I have changed almost all the colours to dark ones and still get annoyed by this almost white current line indicator while debugging (note that the current line indication in editing mode is OK).
To change the background color of the current line indicator while debugging in an IDE (such as IntelliJ IDEA, PyCharm, etc.), you will need to adjust your color scheme settings. Here’s how you can do that: 1. **Open Preferences/Settings**: - On Windows/Linux, go to `File > Settings`. - On macOS, go to `IntelliJ...
31,690
[ { "from": "human", "value": "Can anyone point me to the preferences page that has the setting of the DEBUG current line background color? I have changed almost all the colours to dark ones and still get annoyed by this almost white current line indicator while debugging (note that the current line indicatio...
When I get a reference to a System.Diagnostics.Process, how can I know if a process is currently running?
To determine if a `System.Diagnostics.Process` instance refers to a process that is currently running, you can use the `Process.HasExited` property. This property returns `true` if the associated process has exited, and `false` if it is still running. Here's an example of how you can check if a process is running: ``...
30,627
[ { "from": "human", "value": "When I get a reference to a System.Diagnostics.Process, how can I know if a process is currently running?\n" }, { "from": "gpt", "value": "To determine if a `System.Diagnostics.Process` instance refers to a process that is currently running, you can use the `Process....
I'm trying to figure out the best way to insert a record into a single table but only if the item doesn't already exist. The KEY in this case is an NVARCHAR(400) field. For this example, lets pretend it's the name of a word in the Oxford English Dictionary / insert your fav dictionary here. Also, i'm guessing i will ne...
You're right to be concerned about race conditions when trying to insert a new record into a table where uniqueness is enforced by a key constraint. When multiple processes attempt to insert the same value concurrently, it can lead to a constraint violation. Your idea of using a conditional insert (`INSERT ... SELECT ...
31,997
[ { "from": "human", "value": "I'm trying to figure out the best way to insert a record into a single table but only if the item doesn't already exist. The KEY in this case is an NVARCHAR(400) field. For this example, lets pretend it's the name of a word in the Oxford English Dictionary / insert your fav dict...
To use Google Analytics, you put some JavaScript code in your web page which will make an asynchronous request to Google when the page loads. From what I have read, this shouldn't block or slow down page load times if you include it directly before the end of your HTML Body. To verify this, I want to make the request ...
You are on the right track in wanting to defer the Google Analytics tracking request so that it doesn't interfere with the user experience on your login page. However, there are some important adjustments you need to make to your approach. The `setTimeout` function you proposed is slightly incorrect in its usage. The...
35,412
[ { "from": "human", "value": "To use Google Analytics, you put some JavaScript code in your web page which will make an asynchronous request to Google when the page loads.\nFrom what I have read, this shouldn't block or slow down page load times if you include it directly before the end of your HTML Body. T...
I'm converting functionality from an asp.net Gridview to a Listview. In the gridview when the selected item changed I would grab a value from a label in the selected row and write it to a different label outside of the gridview. Protected Sub grdModules_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.Ev...
In ASP.NET's ListView control, you can access the controls of the selected item by leveraging the `Item` property of the `ListView` that corresponds to the selected index. Here’s how you can update your `SelectedIndexChanged` method to properly find and use the label control from the selected item. Instead of using `F...
33,160
[ { "from": "human", "value": "I'm converting functionality from an asp.net Gridview to a Listview. In the gridview when the selected item changed I would grab a value from a label in the selected row and write it to a different label outside of the gridview.\nProtected Sub grdModules_SelectedIndexChanged(By...
Is it possible to have something like a JTextArea which will color some keywords based on some mappings I have ?
Yes, it is possible to create a JTextArea in Java that colors specific keywords based on a mapping you have. To achieve this, you can use a combination of `StyledDocument`, `Style`, and a `JTextPane` instead of a `JTextArea`. The `JTextPane` provides more flexibility for styling text, allowing you to apply different co...
26,602
[ { "from": "human", "value": "Is it possible to have something like a JTextArea which will color some keywords based on some mappings I have ?\n" }, { "from": "gpt", "value": "Yes, it is possible to create a JTextArea in Java that colors specific keywords based on a mapping you have. To achieve t...
I am currently working in C/C++ in a Unix environment and am new to Linux environments. I would like to learn about the Linux OS and learn C# as the next level of programming language for my career. I decided to put Ubuntu Linux on my laptop. But I am not sure whether we can write, compile and run C# programs in Linux ...
Absolutely, you can write, compile, and run C# programs in a Linux environment! Here are some options you can consider for developing C# on Ubuntu: ### 1. .NET Core / .NET 5+: Microsoft has developed .NET Core, which is a cross-platform framework that allows you to develop and run C# applications on different operatin...
33,513
[ { "from": "human", "value": "I am currently working in C/C++ in a Unix environment and am new to Linux environments. I would like to learn about the Linux OS and learn C# as the next level of programming language for my career.\nI decided to put Ubuntu Linux on my laptop. But I am not sure whether we can wr...
I'm new to ASP.NET MVC so this may be a stupid question. I have an account object that has many parameters. I've figured out a strategy to break this down into a "wizard"-like interface that will walk a user through collecting the required fields to create the initial business objects. It will then step through pages ...
It's great that you're exploring how to structure your ASP.NET MVC application effectively! When dealing with forms that have a lot of fields, especially in a "wizard"-like interface, you definitely want to avoid having controller actions with too many parameters. This not only keeps your code cleaner but also makes it...
32,305
[ { "from": "human", "value": "I'm new to ASP.NET MVC so this may be a stupid question.\nI have an account object that has many parameters. I've figured out a strategy to break this down into a \"wizard\"-like interface that will walk a user through collecting the required fields to create the initial busine...
Does the CCK api allow me to create a node type, from a custom module, with a bunch of fields that use CCK to store their state? If so can these fields be locked so that users may not alter them, but still allow the user to add more fields to the node type? Thanks
Yes, the CCK (Content Construction Kit) API in Drupal allows you to programmatically create content types (node types) and define fields associated with those content types. This can be done from within a custom module. ### Creating a Node Type with CCK Fields You can use the CCK API functions such as `node_type_save...
33,543
[ { "from": "human", "value": "Does the CCK api allow me to create a node type, from a custom module, with a bunch of fields that use CCK to store their state? If so can these fields be locked so that users may not alter them, but still allow the user to add more fields to the node type?\nThanks\n" }, { ...
Are there any alternatives to MS Access? Requirements: Portable Database file Integrated form development for data entry No compiling necessary. Can be modified on the fly. Two more requirements: Available for Linux or Windows Does not have to be free EDIT: Emphasised Integrated form development for data entry as ...
There are several alternatives to MS Access that meet your requirements for portable database files, integrated form development, and no need for compilation. Here are some options that are compatible with both Linux and Windows: 1. **LibreOffice Base**: - **Description**: Part of the LibreOffice suite, Base provid...
30,776
[ { "from": "human", "value": "Are there any alternatives to MS Access?\nRequirements:\n\nPortable Database file\nIntegrated form development for data entry\nNo compiling necessary. Can be modified on the fly.\n\n\nTwo more requirements:\n\nAvailable for Linux or Windows\n\nDoes not have to be free\nEDIT: Emp...
I have a binded DataGridView where depending on some BoundItem property value that line will be read only. What is the best way to implement this? Thanks
To make specific rows of a bound `DataGridView` read-only based on the value of a property in your bound data items, you can handle the `CellBeginEdit` event of the `DataGridView`. In this event, you can check the property of the current row's data item and decide whether to allow editing or not. Here's a step-by-step...
33,478
[ { "from": "human", "value": "I have a binded DataGridView where depending on some BoundItem property value that line will be read only. What is the best way to implement this?\nThanks\n" }, { "from": "gpt", "value": "To make specific rows of a bound `DataGridView` read-only based on the value of...
What ist most concise way to read the contents of a file or input stream in Java? Do I always have to create a buffer, read (at most) line by line and so on or is there a more concise way? I wish I could do just String content = new File("test.txt").readFully();
In Java, there are several concise ways to read the entire contents of a file into a `String`. While the traditional approach involves creating buffers and reading line by line, you can achieve this more succinctly using modern Java features such as `Files` from the `java.nio.file` package. Here’s a concise way to rea...
33,446
[ { "from": "human", "value": "What ist most concise way to read the contents of a file or input stream in Java? Do I always have to create a buffer, read (at most) line by line and so on or is there a more concise way? I wish I could do just\nString content = new File(\"test.txt\").readFully();\n\n" }, {...
The dynamic management views of SQL Server 2005 can give usage information about table indexes. Is there a similar method for getting usage information about column statistics? In specific, I'm curious if some of the older column statistics I've created are still being used. If not, I'd like to delete them.
In SQL Server 2005, you can use the `sys.dm_db_index_usage_stats` dynamic management views (DMVs) to get information about the usage of indexes, but there isn't a direct DMV that tracks the usage of column statistics specifically. However, you can infer whether column statistics are being used by examining the query e...
33,166
[ { "from": "human", "value": "The dynamic management views of SQL Server 2005 can give usage information about table indexes. Is there a similar method for getting usage information about column statistics? In specific, I'm curious if some of the older column statistics I've created are still being used. ...
I am attempting to create new membership users in an Ektron CMS400.NET-based website by through calls to the User web service API from a remote site. One of the methods I intend to utilize, AddMembershipUser has a remark in the documentation indicating "A user with administrator privileges must be logged in to perform ...
When working with the Ektron CMS400.NET-based web services, particularly for operations that require administrator privileges, you need to ensure that your session is authenticated properly and that the context in which you're making your API calls retains the admin user credentials. Here’s a general approach to achiev...
30,152
[ { "from": "human", "value": "I am attempting to create new membership users in an Ektron CMS400.NET-based website by through calls to the User web service API from a remote site. One of the methods I intend to utilize, AddMembershipUser has a remark in the documentation indicating \"A user with administrato...
What's the easiest way to get the data for a single table, delete a single table or break up the whole dump file into files each containing individual tables? I usually end up doing a lot of vi regex munging, but I bet there are easier ways to do these things with awk/perl, etc. The first page of Google results brings ...
If you're working with SQL dump files (typically generated by tools like `mysqldump` for MySQL databases), there are several ways to manipulate these files without resorting to manual regex munging in `vi`. Below are some solutions for each of your requirements using `awk`, `sed`, and other command-line tools. ### 1. ...
32,647
[ { "from": "human", "value": "What's the easiest way to get the data for a single table, delete a single table or break up the whole dump file into files each containing individual tables? I usually end up doing a lot of vi regex munging, but I bet there are easier ways to do these things with awk/perl, etc....
I was under the impression that the test methods in a unit test class would be executed in the order that they appear in the class file. Apparently this is not true. It also doesn't appear to be purely based off of alphabetical order either. How does MSTEST decide execution order? EDIT: I was able to track down the ans...
In MSTest, the execution order of test methods is not guaranteed to follow the order in which they appear in the class file or any specific alphabetical order. Instead, MSTest randomly orders the test methods for each test run by default. This behavior helps to identify dependencies between tests and to ensure that tes...
35,825
[ { "from": "human", "value": "I was under the impression that the test methods in a unit test class would be executed in the order that they appear in the class file. Apparently this is not true. It also doesn't appear to be purely based off of alphabetical order either. How does MSTEST decide execution orde...