instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I'm developing multi-language support for our web app. We're using Django's helpers around the gettext library. Everything has been surprisingly easy, except for the question of how to handle sentences that include significant HTML markup. Here's a simple example: Please <a href="/login/">log in</a> to continue. Here ...
Handling multi-language support in applications that include significant HTML markup can be tricky, as you've highlighted. Here are some additional approaches you might consider, along with a discussion of their pros and cons: 1. **Using Template Tags or Filters**: - You can create a custom template tag or filter t...
45,126
[ { "from": "human", "value": "I'm developing multi-language support for our web app. We're using Django's helpers around the gettext library. Everything has been surprisingly easy, except for the question of how to handle sentences that include significant HTML markup. Here's a simple example:\nPlease <a hre...
How much code documentation in your .NET source is too much? Some background: I inherited a large codebase that I've talked about in some of the other questions I've posted here on SO. One of the "features" of this codebase is a God Class, a single static class with >3000 lines of code encompassing several dozen static...
When it comes to code documentation, especially in a large codebase, striking the right balance is crucial. Too little documentation can lead to misunderstandings, while too much can create clutter, making it difficult to navigate the code. Here are some guidelines to help you decide how much documentation to include i...
45,690
[ { "from": "human", "value": "How much code documentation in your .NET source is too much?\nSome background: I inherited a large codebase that I've talked about in some of the other questions I've posted here on SO. One of the \"features\" of this codebase is a God Class, a single static class with >3000 lin...
I am creating an application that manages multiple instances of an external utility, supplying each with data and fetching results. But I'm facing a problem writing unit tests. How to test if the target method actually starts a process (set via a property) when called? I have tried: Make the class execute an external ...
Testing whether a method starts a process can be challenging because it involves external dependencies (the actual process). Instead of relying on the execution of an external process, a more effective approach would be to use mocking techniques to isolate your unit tests from those dependencies. To achieve this, you ...
46,298
[ { "from": "human", "value": "I am creating an application that manages multiple instances of an external utility, supplying each with data and fetching results.\nBut I'm facing a problem writing unit tests.\nHow to test if the target method actually starts a process (set via a property) when called?\nI have...
This is a really basic question but this is the first time I've used MATLAB and I'm stuck. I need to simulate a simple series RC network using 3 different numerical integration techniques. I think I understand how to use the ode solvers, but I have no idea how to enter the differential equation of the system. Do I need...
Absolutely, I can help you with that! To simulate a simple series RC circuit using MATLAB, you'll indeed need to represent the differential equation as a function that MATLAB can use with its ODE solvers. Here's a step-by-step guide: ### Step 1: Create the ODE Function You can create a function file (an .m file) that...
48,709
[ { "from": "human", "value": "This is a really basic question but this is the first time I've used MATLAB and I'm stuck.\nI need to simulate a simple series RC network using 3 different numerical integration techniques. I think I understand how to use the ode solvers, but I have no idea how to enter the diff...
I am trying to adapt a simple WPF application to use the Model-View-ViewModel pattern. On my page I have a couple of animations: <Page.Resources> <Storyboard x:Name="storyboardRight" x:Key="storyboardRight"> <DoubleAnimation x:Name="da3" Storyboard.TargetName="labelR...
To adapt your WPF application to use the MVVM pattern with your storyboard animations, you'll need to leverage commands and data binding. Below are the general steps to achieve this: 1. **Define a Command in Your ViewModel**: This command will trigger the animation when executed. 2. **Use an EventTrigger or a Behavio...
45,143
[ { "from": "human", "value": "I am trying to adapt a simple WPF application to use the Model-View-ViewModel pattern. On my page I have a couple of animations:\n<Page.Resources>\n <Storyboard x:Name=\"storyboardRight\"\n x:Key=\"storyboardRight\">\n <DoubleAnimation x:Name=\"da3\"\n ...
I have a data bound ListBox that uses a custom ItemTemplate to display my stuff. The ItemTemplate has a 4x2 grid that contains different elements. Now I want my users to be able to get at different pieces of data, depending on the subitem they double click - so if they double click the image in row 0, column 0, they ge...
Yes, you can handle the double-click event on the individual elements within your `ItemTemplate` in the `ListBox` without having to create a custom control. You can do this by leveraging the `PreviewMouseDoubleClick` event and handling it in your `ListBox` to identify which element was clicked. Here's a step-by-step s...
45,758
[ { "from": "human", "value": "I have a data bound ListBox that uses a custom ItemTemplate to display my stuff. The ItemTemplate has a 4x2 grid that contains different elements. Now I want my users to be able to get at different pieces of data, depending on the subitem they double click - so if they double cl...
What is the preferred way to create a background task for a Rails application? I've heard of Starling/Workling and the good ol' script/runner, but I am curious which is becoming the defacto way to manage this need? Thanks! Clarification: I like the idea of Rake in Background, but the problem is, I need something that i...
In modern Rails applications, the preferred way to manage background tasks is to use a dedicated background job framework. While you mentioned tools like Starling and Workling, the landscape of background processing in Ruby on Rails has evolved, and several options are now widely adopted. ### Popular Background Job Fr...
48,918
[ { "from": "human", "value": "What is the preferred way to create a background task for a Rails application? I've heard of Starling/Workling and the good ol' script/runner, but I am curious which is becoming the defacto way to manage this need?\nThanks!\nClarification: I like the idea of Rake in Background, ...
The log file from a JVM crash contains all sorts of useful information for debugging, such as shared libraries loaded and the complete environment. Can I force the JVM to generate one of these programmatically; either by executing code that crashes it or some other way? Or alternatively access the same information anot...
Yes, you can programmatically force the JVM to generate a crash log or access similar information through various approaches. Here are a few methods you could consider: ### 1. **Force a JVM Crash** You can intentionally crash the JVM to generate a fatal error log (hs_err_pid.log) by invoking an action that would typic...
47,720
[ { "from": "human", "value": "The log file from a JVM crash contains all sorts of useful information for debugging, such as shared libraries loaded and the complete environment. Can I force the JVM to generate one of these programmatically; either by executing code that crashes it or some other way? Or alter...
I'm using .net's PrintPreviewDialog and whenever it's generating a preview, it locks up my GUI in the background and makes it look like it has crashed until the preview is finished. Seeing how the .net's page progress window that pops up isn't a dialog, the back ground can be selected which then comes to the front in a...
The issue you're experiencing is related to the fact that the printing and previewing operations are blocking the UI thread. When these operations are executed, they prevent the GUI from updating or responding to user input, leading to the freezing effect you're seeing. To resolve this, you need to run the printing and...
48,666
[ { "from": "human", "value": "I'm using .net's PrintPreviewDialog and whenever it's generating a preview, it locks up my GUI in the background and makes it look like it has crashed until the preview is finished. Seeing how the .net's page progress window that pops up isn't a dialog, the back ground can be se...
I'm planning to use MS entity framework for new web apps (come on EF v2!). So does it make sense to plan ahead by adding timestamp columns to all entity tables in existing and future databases, to support concurrency checks? Is there any reason why it would be a bad idea to have a timestamp column in every table? Note ...
Adding timestamp columns (also known as rowversion in SQL Server) to your entity tables to support optimistic concurrency is a common and generally good practice, especially when using an Object-Relational Mapper (ORM) like Entity Framework. Here are some considerations to help you decide whether it's a good fit for yo...
49,290
[ { "from": "human", "value": "I'm planning to use MS entity framework for new web apps (come on EF v2!).\nSo does it make sense to plan ahead by adding timestamp columns to all entity tables in existing and future databases, to support concurrency checks? Is there any reason why it would be a bad idea to hav...
what's the easiest way to bulk load my iTunes library xml into an existing SQL Server database?
To bulk load your iTunes library XML into an existing SQL Server database, you can follow these general steps: ### Step 1: Export iTunes Library to XML 1. Open iTunes. 2. Go to `File` > `Library` > `Export Library`. 3. Save the XML file to a known location. ### Step 2: Prepare the SQL Server Database Make sure your S...
45,205
[ { "from": "human", "value": "what's the easiest way to bulk load my iTunes library xml into an existing SQL Server database?\n" }, { "from": "gpt", "value": "To bulk load your iTunes library XML into an existing SQL Server database, you can follow these general steps:\n\n### Step 1: Export iTune...
I'm importing some data from another test/bug tracking tool into tfs, and I would like to convert it's description, which is in simple HTML, so a plain string, where the 'layout' of the HTML is preserved. For example: <body> <ol> <li>Log on with user Acme &amp; Co.</li> <li>Navigate to the details tab</li> ...
You can achieve the desired transformation using a combination of HTML parsing and string manipulation. Libraries such as `BeautifulSoup` in Python are quite effective for this type of task. Here's how you can use it to convert your simple HTML into plain text while preserving the layout and translating HTML entities: ...
48,337
[ { "from": "human", "value": "I'm importing some data from another test/bug tracking tool into tfs, and I would like to convert it's description, which is in simple HTML, so a plain string, where the 'layout' of the HTML is preserved.\nFor example:\n<body>\n <ol>\n <li>Log on with user Acme &amp; Co.</li...
Consider this example table (assuming SQL Server 2005): create table product_bill_of_materials ( parent_product_id int not null, child_product_id int not null, quantity int not null ) I'm considering a composite primary key containing the two product_id columns (I'll definitely want a unique constraint) as...
When designing a table in SQL Server, especially for performance considerations involving primary keys and indexing, there are several key factors to consider. ### 1. Composite Primary Key as Clustered Index **Clustered Index:** In SQL Server, a clustered index determines the physical order of data in the table. A ta...
49,724
[ { "from": "human", "value": "Consider this example table (assuming SQL Server 2005):\ncreate table product_bill_of_materials\n(\n parent_product_id int not null,\n child_product_id int not null,\n quantity int not null\n)\n\nI'm considering a composite primary key containing the two product_id colu...
How can we get the network interface name (i.e. the one that appears in the "Network connections" dialog) given the device description (i.e. the string that appears in the "Device Properties -> Connect using:" textbox)? We must do it in pure C/C++ language, or through some of the standard command line tools (e.g. netsh...
To retrieve the network interface name given a device description in pure C or C++, you can utilize the Windows API to enumerate network adapters and their associated properties. The function `GetAdaptersAddresses` from the IP Helper API (iphlpapi.dll) is particularly useful as it provides access to information about t...
47,438
[ { "from": "human", "value": "How can we get the network interface name (i.e. the one that appears in the \"Network connections\" dialog) given the device description (i.e. the string that appears in the \"Device Properties -> Connect using:\" textbox)?\nWe must do it in pure C/C++ language, or through some ...
Is there a way to create a link in a JSP page to a Microsoft Word document that you can edit and have it post back automatically to the server? I'm using Websphere Portal. Thank you!
Creating a link in a JSP page that opens a Microsoft Word document for editing and automatically posts back to the server can be quite complex due to the nature of how web browsers and desktop applications interact. However, I can outline a general approach to achieve something similar, keeping in mind that this might ...
49,295
[ { "from": "human", "value": "Is there a way to create a link in a JSP page to a Microsoft Word document that you can edit and have it post back automatically to the server? \nI'm using Websphere Portal. Thank you!\n" }, { "from": "gpt", "value": "Creating a link in a JSP page that opens a Micro...
I have a composite control with a declaration like this: class ATL_NO_VTABLE CFooCtrl : public CComObjectRootEx<CComSingleThreadModel>, public IDispatchImpl<CFooCtrl, &IID_IFooCtrl, &LIBID_FooLib>, public CComCompositeControl<CFooCtrl>, public IPers...
In ATL composite controls, handling of Windows messages can sometimes be tricky due to message reflection and how messages propagate through the message map. Here are some things you might consider to resolve the issue of not receiving certain messages like `WM_KEYDOWN`, `WM_KEYUP`, and `WM_MOUSEWHEEL` in your `CFooCtr...
49,558
[ { "from": "human", "value": "I have a composite control with a declaration like this:\n class ATL_NO_VTABLE CFooCtrl : \n\n public CComObjectRootEx<CComSingleThreadModel>,\n public IDispatchImpl<CFooCtrl, &IID_IFooCtrl, &LIBID_FooLib>,\n public CComComposite...
I am converting a VB6 to C# and I want to make my data structure that holds values and relationships more efficient. In VB I have a collection of values and another collection of relationships between those values with priorities for those relationships. I also have an algorithm that when a set of values is passed to i...
When converting your VB6 code to C#, and aiming for efficiency in how you manage and query your data structure, you have a couple of good approaches to consider. Given your requirements for relationships, priorities, and the need to find the minimal number of relationships between values, a **Graph** representation may...
48,680
[ { "from": "human", "value": "I am converting a VB6 to C# and I want to make my data structure that holds values and relationships more efficient. In VB I have a collection of values and another collection of relationships between those values with priorities for those relationships. I also have an algorithm...
How do you perform databinding against the MonthCalendar.SelectionRange property? Given the property is of type 'SelectionRange' which is a class I am not sure how to go about it. Any examples would be much appreciated.
Binding data to the `SelectionRange` property of a `MonthCalendar` control in WinForms can be a bit tricky since `SelectionRange` is a class that contains two `DateTime` properties (`Start` and `End`). However, you can create a custom property in your data model and implement the INotifyPropertyChanged interface to fac...
48,502
[ { "from": "human", "value": "How do you perform databinding against the MonthCalendar.SelectionRange property? Given the property is of type 'SelectionRange' which is a class I am not sure how to go about it. Any examples would be much appreciated.\n" }, { "from": "gpt", "value": "Binding data t...
I've got an old classic asp/sql server app which is constantly throwing 500 errors/timeouts even though the load is not massive. Some of the DB queries are pretty intensive but nothing that should be causing it to fall over. Are there any good pieces of software I can install on my server which will show up precisely w...
To diagnose and resolve performance issues in your classic ASP/SQL Server application, you can use a variety of tools that help identify bottlenecks in both the application code and the database queries. Here are some software options you can consider: ### For Monitoring ASP Performance: 1. **Application Performance ...
45,314
[ { "from": "human", "value": "I've got an old classic asp/sql server app which is constantly throwing 500 errors/timeouts even though the load is not massive. Some of the DB queries are pretty intensive but nothing that should be causing it to fall over.\nAre there any good pieces of software I can install o...
I want to restrict entry of new item into sharepoint calendar list with the same from and to dates for the same created user. Let me know this can done, accessing sharepoint object model with C#. Environment WSS3.0, MOSS 2007, C# Thanks
To restrict the entry of new items into a SharePoint calendar list when the same user tries to create events with overlapping dates, you can utilize the SharePoint Object Model in a custom event receiver. Here’s how you can do it in a SharePoint 2007 environment (WSS 3.0 / MOSS 2007): ### Steps to Create an Event Rece...
47,554
[ { "from": "human", "value": "I want to restrict entry of new item into sharepoint calendar list with the same from and to dates for the same created user. Let me know this can done, accessing sharepoint object model with C#.\nEnvironment WSS3.0, MOSS 2007, C#\nThanks\n" }, { "from": "gpt", "valu...
I would like to separate my application into three tiers to use a service layer. I would also like to use the same domain model in both the UI tier, and the business layer tier because I control both ends. This makes sense, but I would also like to use Castles Active Record for the Data Access layer. Because of this I ...
Separating concerns in a multi-tier application architecture is a good practice for maintainability and testability. The challenge you mentioned arises from the fact that Active Record combines data access logic with your domain model, which can make it difficult to cleanly separate layers. Here are several strategies ...
48,574
[ { "from": "human", "value": "I would like to separate my application into three tiers to use a service layer. I would also like to use the same domain model in both the UI tier, and the business layer tier because I control both ends.\nThis makes sense, but I would also like to use Castles Active Record for...
I'm using Java and I'm coding a chess engine. I'm trying to find the index of the first 1 bit and the index of the last 1 bit in a byte. I'm currently using Long.numberOfTrailingZeros() (or something like that) in Java, and would like to emulate that functionality, except with bytes. Would it be something like: byte b ...
To find the index of the first (rightmost) and last (leftmost) `1` bit in a byte, it's essential to understand how bit manipulation works in Java and how to apply techniques to extract bit positions efficiently. ### Finding the Index of the First `1` Bit The first `1` bit (the least significant `1` bit) in a byte can...
48,098
[ { "from": "human", "value": "I'm using Java and I'm coding a chess engine.\nI'm trying to find the index of the first 1 bit and the index of the last 1 bit in a byte.\nI'm currently using Long.numberOfTrailingZeros() (or something like that) in Java, and would like to emulate that functionality, except with...
When you have parent-child tables and you wish to use a DetailsView to edit the data how do you do it using a SqlDataSource? For example, if you have a Person and an Employee table (where an employee is the child table and the Person is parent table - an employee derives from a person). Person P_ID FirstName LastNam...
To create a `DetailsView` that allows editing and inserting data into both the `Person` and `Employee` tables using a `SqlDataSource`, you can follow these steps: ### Step 1: Set Up Your ASP.NET Page 1. **Add a `SqlDataSource`** to your page that will handle the insert and update operations. You will need one `SqlDat...
43,532
[ { "from": "human", "value": "When you have parent-child tables and you wish to use a DetailsView to edit the data how do you do it using a SqlDataSource?\nFor example, if you have a Person and an Employee table (where an employee is the child table and the Person is parent table - an employee derives from a...
My application is already developed and now we are going to change the connection string whatever stored in the session object (Bcoz of Distributed Database Management System (DDBMS)) Problem is here..... In that application There are so many **ObjectDataSource** which are initialize with the using .XSD file. which...
To modify the connection string used by the `ObjectDataSource` in your application to utilize a connection string stored in a session variable, you will generally need to follow these steps: ### Steps to Change the Connection String 1. **Retrieve the Connection String from Session**: First, ensure you have the desire...
45,188
[ { "from": "human", "value": "My application is already developed and now we are going to change the connection string whatever stored in the session object (Bcoz of Distributed Database Management System (DDBMS))\nProblem is here.....\n\nIn that application There are so many **ObjectDataSource** which are\n...
What is the best way to implement a 2D grid of radio buttons so that only one option in each column and one option in each row can be selected?
To implement a 2D grid of radio buttons where only one option in each column and one option in each row can be selected, you need to ensure that the radio buttons are grouped correctly. Here's a general approach to achieve this using HTML and JavaScript. ### HTML Structure You can create a grid using a table or a ser...
44,311
[ { "from": "human", "value": "What is the best way to implement a 2D grid of radio buttons so that only one option in each column and one option in each row can be selected?\n" }, { "from": "gpt", "value": "To implement a 2D grid of radio buttons where only one option in each column and one optio...
So I am doing a lot of high performance network programming using Boost::Asio (or just Asio if you will), and have a pretty solid grasp of the essentials of both TCP and UDP protocols. I am wondering though, because I still don't consider myself an expert in networking despite my knowledge, what is a good way to frame ...
Networking programming, especially when focusing on high-performance applications, involves a set of essential concepts and practices that developers should grasp to create efficient and robust systems. While there may not be a single essay that captures all of this knowledge in a neatly packaged form like the "what ev...
47,277
[ { "from": "human", "value": "So I am doing a lot of high performance network programming using Boost::Asio (or just Asio if you will), and have a pretty solid grasp of the essentials of both TCP and UDP protocols. I am wondering though, because I still don't consider myself an expert in networking despite m...
How can I test my website in multiple versions of firefox? I have v2 installed. Now no matter where or how many times I install FF3, it always executes ff2.. I checked the interweb and it seems there used to be a MultiFireFox tool that could run several versions. It was for apple and I'm on windows. Furthermore all the...
Testing your website in multiple versions of Firefox can be a challenge, especially if you're looking for a solution on Windows. Here are some methods you can use to run multiple versions of Firefox on your system: ### 1. **Using Firefox Portable Versions** You can use portable versions of Firefox, which allow you to ...
47,610
[ { "from": "human", "value": "How can I test my website in multiple versions of firefox?\nI have v2 installed. Now no matter where or how many times I install FF3, it always executes ff2..\nI checked the interweb and it seems there used to be a MultiFireFox tool that could run several versions. It was for ap...
I have a table with about 45 columns and as more data goes in, the longer it takes for the inserts to happen. I have increased the size of the data and log files, reduced the fill factor on all the indexes on that table, and still slower and slower insert times. Any ideas would be GREATLY appreciated.
When dealing with performance issues related to inserts in a table with many columns, especially when it seems to be getting slower over time, there are several strategies and optimizations you can consider: 1. **Index Optimization**: - **Reduce Nonclustered Indexes**: Ensure that you don't have too many noncluster...
46,201
[ { "from": "human", "value": "I have a table with about 45 columns and as more data goes in, the longer it takes for the inserts to happen. I have increased the size of the data and log files, reduced the fill factor on all the indexes on that table, and still slower and slower insert times. Any ideas woul...
Here I had build a HTML page with an iFrame. I had an id within the iFrame src page. Is it possible to access the id from my current page through JavaScript. Please help me.
Accessing an element inside an iframe from the parent document is subject to the same-origin policy enforced by web browsers for security reasons. The same-origin policy restricts how a document or script loaded from one origin can interact with resources from another origin. ### Same-Origin Policy If the iframe sour...
45,187
[ { "from": "human", "value": "Here I had build a HTML page with an iFrame. I had an id within the iFrame src page. Is it possible to access the id from my current page through JavaScript.\nPlease help me.\n" }, { "from": "gpt", "value": "Accessing an element inside an iframe from the parent docum...
We are using verisign's time stamp service currently, but every so often the time stamp server becomes unavailable - mostly due to our ISP failing. We now timestamp everything we build, even simple dev builds as we had a lot of trouble with Vista not running the unsigned/unstamped files properly. Can we setup a time st...
Setting up your own timestamping service can certainly help mitigate the issues you’ve faced with the availability of third-party services like VeriSign's. A self-hosted timestamping authority allows you to control the availability of the service and ensure that your builds are timestamped consistently without relying ...
49,489
[ { "from": "human", "value": "We are using verisign's time stamp service currently, but every so often the time stamp server becomes unavailable - mostly due to our ISP failing.\nWe now timestamp everything we build, even simple dev builds as we had a lot of trouble with Vista not running the unsigned/unstam...
In an ActionScript 2 project I can create a new MovieClip, right-click on it on the library and select "Component Definition" to add parameters that can be referenced inside the MovieClip. This parameters can be easily changed in the MovieClips's properties. Now, I'm working on an ActionScript 3 project but haven't bee...
In ActionScript 3, the way you handle component parameters and properties is a bit different compared to ActionScript 2. When you define a parameter (or property) for a MovieClip in the Component Definition dialog, it does not automatically create a variable that you can directly access by name like in AS2. Instead, yo...
46,748
[ { "from": "human", "value": "In an ActionScript 2 project I can create a new MovieClip, right-click on it on the library and select \"Component Definition\" to add parameters that can be referenced inside the MovieClip. This parameters can be easily changed in the MovieClips's properties.\nNow, I'm working ...
I'm increasingly becoming aware that there must be major differences in the ways that regular expressions will be interpreted by browsers. As an example, a co-worker had written this regular expression, to validate that a file being uploaded would have a PDF extension: ^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))(.pdf)$ ...
The behavior you're observing is not so much a quirk of the `asp:FileUpload` and `RegularExpressionValidator` controls in ASP.NET, but rather a reflection of how regular expressions are interpreted and applied in different contexts. Here are some important points to consider regarding your situation and the differences...
46,621
[ { "from": "human", "value": "I'm increasingly becoming aware that there must be major differences in the ways that regular expressions will be interpreted by browsers.\nAs an example, a co-worker had written this regular expression, to validate that a file being uploaded would have a PDF extension:\n^(([a-z...
Using asp.net, I need to generate a snapshot of an youtube video. I have access to the code that youtube generates for integrating their vids into other sites. Basically what I want to do is what HTML Snapshot does, take a picture of some html, but I`m only interested in the video. How can I approach this in asp.net, (...
Generating a snapshot of a YouTube video directly in ASP.NET is not straightforward, as YouTube does not provide a direct API to capture video snapshots. However, there are a few approaches you can consider: ### 1. Using YouTube's Thumbnail Images YouTube generates thumbnail images for every video, which you can use ...
41,253
[ { "from": "human", "value": "Using asp.net, I need to generate a snapshot of an youtube video.\nI have access to the code that youtube generates for integrating their vids into other sites.\nBasically what I want to do is what HTML Snapshot does, take a picture of some html, but I`m only interested in the v...
Since silverlight does not have any support for DataSets/DataTables, what would be the best approach if I wanted to consume a table of data from a database? A bit like this: user action in silverlight -> get data from server -> display in GridView The thing is, I do NOT know how many and which columns the data will hav...
Since Silverlight does not support DataSets or DataTables directly, you need to use an alternative approach to dynamically bind data to a DataGrid when you do not know the structure of the data in advance. Here are some viable strategies: ### 1. Use a Dynamic Data Structure Instead of trying to bind directly to a Dat...
44,017
[ { "from": "human", "value": "Since silverlight does not have any support for DataSets/DataTables, what would be the best approach if I wanted to consume a table of data from a database?\nA bit like this:\nuser action in silverlight -> get data from server -> display in GridView\nThe thing is, I do NOT know ...
I'm looking for a reliable design for handling assignments that have asynchronous requests involved. To further clarify, I have a class which handles Data Management. It is a singleton and contains a lot of top level data for me which is used throughout my iPhone application. A view controller might do something such a...
To handle asynchronous requests elegantly in your singleton data manager (`MySingleton`), you can use a completion handler pattern to notify your view controllers when the data is ready. This avoids blocking the main thread, ensures a responsive user interface, and elegantly manages the asynchronous nature of networkin...
47,402
[ { "from": "human", "value": "I'm looking for a reliable design for handling assignments that have asynchronous requests involved. To further clarify, I have a class which handles Data Management. It is a singleton and contains a lot of top level data for me which is used throughout my iPhone application.\nA...
How do I achieve the equivalent of the LVIS_CUT style for a listview item? It looks like it's not exposed by the framework? Should I P/Invoke? Edit: LVIS_CUT is a Win32 style that affects the look of the item: It grays the item image. You can see it in action in Windows Explorer: Select a file and type Ctrl+X. TIA.
The `LVIS_CUT` style in a Win32 ListView control is used to visually indicate that an item has been "cut" (similar to the cut operation in many applications), which is represented by graying out the item image. Unfortunately, this specific visual style is not directly exposed in the managed .NET Framework ListView cont...
46,009
[ { "from": "human", "value": "How do I achieve the equivalent of the LVIS_CUT style for a listview item? It looks like it's not exposed by the framework? Should I P/Invoke?\nEdit: LVIS_CUT is a Win32 style that affects the look of the item: It grays the item image. You can see it in action in Windows Explore...
I'm developing a PHP website that uses url routing. I'd like the site to be directory independent, so that it could be moved from http://site.example.com/ to http://example.com/site/ without having to change every path in the HTML. The problem comes up when I'm linking to files which are not subject to routing, like cs...
Creating a directory-independent PHP website that handles static assets like CSS, JavaScript, and images efficiently is a common challenge. Here are some strategies to make this task easier while keeping your code clean and maintainable: ### 1. Use an Absolute URL for Static Assets One of the most effective ways to m...
48,366
[ { "from": "human", "value": "I'm developing a PHP website that uses url routing. I'd like the site to be directory independent, so that it could be moved from http://site.example.com/ to http://example.com/site/ without having to change every path in the HTML. The problem comes up when I'm linking to files ...
Can you use a Spring-WS WebserviceTemplate for calling a webservice and avoid that it generates a SOAP-envelope? That is, the message already contains an SOAP-Envelope and I don't want that the WebserviceTemplate wraps another one around it. :-) The reason I want this is that I'd like to call a webservice that uses ws-...
In Spring-WS, the `WebServiceTemplate` is designed to handle SOAP messages, including wrapping them with the appropriate SOAP envelope when sending requests. However, if you already have a full SOAP envelope (including WS-Security headers) and you don't want `WebServiceTemplate` to modify it, you will need to bypass th...
44,244
[ { "from": "human", "value": "Can you use a Spring-WS WebserviceTemplate for calling a webservice and avoid that it generates a SOAP-envelope? That is, the message already contains an SOAP-Envelope and I don't want that the WebserviceTemplate wraps another one around it. :-)\nThe reason I want this is that I...
Is there any best practice data model for authentication/authorization scheme?
When designing an authentication and authorization scheme, it's important to follow best practices in data modeling to ensure security, scalability, and maintainability. Here are some best practices to consider when creating a data model for authentication and authorization: ### 1. **Separation of Concerns** - **Us...
47,805
[ { "from": "human", "value": "Is there any best practice data model for authentication/authorization scheme?\n" }, { "from": "gpt", "value": "When designing an authentication and authorization scheme, it's important to follow best practices in data modeling to ensure security, scalability, and ma...
Can anyone please help me to get the keycodes for the arrow keys in c# .net keypress events? Can you help me to get out of this check point? best regards, Arun.
In C# .NET, when you are handling key events, particularly in Windows Forms or WPF applications, you may want to capture the arrow keys. However, it is important to note that the `KeyPress` event is typically used for character keys (i.e., keys that produce a character output), and arrow keys do not produce a character...
49,935
[ { "from": "human", "value": "Can anyone please help me to get the keycodes for the arrow keys in c# .net keypress events? Can you help me to get out of this check point?\nbest regards,\nArun.\n" }, { "from": "gpt", "value": "In C# .NET, when you are handling key events, particularly in Windows F...
Which MVC-framework is the best option (performance/ease of development) for a web application, that will have + 2 million visits per week. Basically the site is a search engine,but also there will be large amounts of XML parsing, and high db traffic. We are using Java, over Jboss 4.2.3x, with PG as DB, and Solr for th...
For a web application expected to handle over 2 million visits per week and involving significant XML parsing and high database traffic, you want to select an MVC framework that balances performance, ease of development, and scalability. Here are some options to consider, along with their pros and cons: ### 1. **Sprin...
48,941
[ { "from": "human", "value": "Which MVC-framework is the best option (performance/ease of development) for a web application, that will have + 2 million visits per week.\nBasically the site is a search engine,but also there will be large amounts of XML parsing, and high db traffic.\nWe are using Java, over J...
In my iPhone application I have a table view. When user taps any row, information about that element will open. All information comes from an XML file, size unknown; some information may contain images. I tried to do it using a multiline label and image view, both inside an UISrollView, but I couldn't get scrolling. ...
To achieve the desired functionality in your iPhone application, there are several key aspects to consider, including scrolling, zooming, and adding hyperlinks. Below are the solutions and recommendations for each of these aspects: ### 1. Scrolling with UIScrollView To enable scrolling for content that exceeds the scr...
44,068
[ { "from": "human", "value": "In my iPhone application I have a table view. When user taps any row, information about that element will open. All information comes from an XML file, size unknown; some information may contain images.\nI tried to do it using a multiline label and image view, both inside an UI...
When restoring a full DB backup to a different SQL Server 2005 Express server, I receive the following message: The file or filegroup "mydatabase_log" cannot be selected for this operation. RESTORE DATABASE is terminating abnormally. (Microsoft SQL Server, Error: 3219) I've checked the restore options to make...
The error message you're encountering indicates that there is an issue with the file or filegroup during the restore operation. Here are several steps you can take to resolve the problem when restoring a full database backup to a different SQL Server 2005 Express server: ### 1. Check the Logical and Physical File Name...
49,346
[ { "from": "human", "value": "When restoring a full DB backup to a different SQL Server 2005 Express server, I receive the following message:\n\nThe file or filegroup \"mydatabase_log\"\n cannot be selected for this operation.\n RESTORE DATABASE is terminating\n abnormally. (Microsoft SQL Server,\n Error...
Newbie question. I have a NSMutableArray that holds multiple objects (objects that stores Bezier paths and related variables e.g. path colour etc.) These are properly released whenever the relevant -dealloc method is called. Each object is instantiated with +alloc/-init and added to the array. After adding them to the ...
Your question makes perfect sense, and it's a common issue when implementing an undo/redo mechanism. In Objective-C, when you remove an object from an `NSMutableArray`, it doesn't release the object; it just decreases the count of references in the array. Since you are managing memory manually, you need to ensure that ...
49,091
[ { "from": "human", "value": "Newbie question.\nI have a NSMutableArray that holds multiple objects (objects that stores Bezier paths and related variables e.g. path colour etc.) These are properly released whenever the relevant -dealloc method is called. Each object is instantiated with +alloc/-init and add...
I know with python and a couple other languages there is a way to safely make install a newer generational version of a language onto a machine, but after digging through PHP5's configure & makefile the only thing I've seen is the prefix dir option and the ini scan path. Ideally I'd like php5 to have its own lib/bin su...
To install PHP 5 alongside PHP 4 on a CentOS 5 system, you can follow a method that involves building PHP 5 from source with a custom prefix to avoid conflicts with the existing PHP 4 installation. Here’s a step-by-step guide: ### Step 1: Install Dependencies Ensure you have the necessary development tools and librar...
46,249
[ { "from": "human", "value": "I know with python and a couple other languages there is a way to safely make install a newer generational version of a language onto a machine, but after digging through PHP5's configure & makefile the only thing I've seen is the prefix dir option and the ini scan path.\nIdeall...
I want to display documents on my website. The server is hosted on a Debian machine. I was thinking I can allow the upload of support documents then use a Linux app or PHP app to convert the doc into PDF and display that in an HTML page. Are there any APIs or binaries that allow me to do this?
Yes, there are several options available to convert documents to PDF on a Debian server, and you can do this using either command-line tools or PHP libraries. Here are a few approaches you can consider: ### 1. Command-Line Tools **LibreOffice or OpenOffice:** You can use LibreOffice in headless mode to convert docume...
48,428
[ { "from": "human", "value": "I want to display documents on my website. The server is hosted on a Debian machine. I was thinking I can allow the upload of support documents then use a Linux app or PHP app to convert the doc into PDF and display that in an HTML page. Are there any APIs or binaries that allow...
I have a C#.net winform program which runs with a SQL Server database. I am using LINQ-to-SQL. Is it possible to rollback the call to one or more stored procedures inside a transaction within my program using LINQ-to-SQL? Initially I thought it would make sense to manage the transaction inside the stored procedure ...
Yes, you can manage transactions in your C# WinForms application using LINQ-to-SQL. If you want to call multiple stored procedures and ensure that they all succeed or fail as a unit, you can do this by using the `TransactionScope` class, which allows you to create a transaction context in your application. Here’s a ba...
49,484
[ { "from": "human", "value": "I have a C#.net winform program which runs with a SQL Server database. I am using LINQ-to-SQL. Is it possible to rollback the call to one or more stored procedures inside a transaction within my program using LINQ-to-SQL? \nInitially I thought it would make sense to manage th...
One of the core fields present on several of my app's major database tables needs to be changed from varchar(5) to varchar(8). The list of stored procedures that depend on these tables is extremely long, not to mention the changes that would have to be made in my Data Access Layer (ASP.NET 2.0 DataSet with TableAdapter...
Changing a column type in SQL Server 2005 and ensuring that the changes propagate throughout your application can be a complex task, especially if you're using a Data Access Layer (DAL) that heavily relies on stored procedures and strongly-typed datasets. Here’s a step-by-step approach to accomplish this safely: ### 1...
49,208
[ { "from": "human", "value": "One of the core fields present on several of my app's major database tables needs to be changed from varchar(5) to varchar(8). The list of stored procedures that depend on these tables is extremely long, not to mention the changes that would have to be made in my Data Access Lay...
What guidlines do you use when deciding whether to let a method dodge an exception (ie: let the exception propogate up) or handle it once the exception is recieved? Here is an example of what I am trying to ask If I have three methods method1,2,3 and 3. Method1 calls Method2 which Calls Method3. and the exception is on...
Deciding whether to let an exception propagate or handle it immediately involves several guidelines and considerations. Here are some key factors to keep in mind: ### 1. **Separation of Concerns** - **Cohesion:** Each method should handle exceptions that are relevant to its specific context or domain. If `method3` ...
46,284
[ { "from": "human", "value": "What guidlines do you use when deciding whether to let a method dodge an exception (ie: let the exception propogate up) or handle it once the exception is recieved?\nHere is an example of what I am trying to ask\nIf I have three methods method1,2,3 and 3. Method1 calls Method2 w...
What is the C# optimised version of the following, without using .Net's Timespan or DateTime. How would I NUnit test it? TimeSpan ts = Date1 - Date2; int numberOfDays = ts.Days;
If you want to calculate the number of days between two dates without using .NET's `TimeSpan` or `DateTime`, you can work with the raw representation of dates using an integer format (e.g., year, month, day) or by counting days based on a specific calendar system. Here’s an optimized version of the code using basic ar...
42,687
[ { "from": "human", "value": "What is the C# optimised version of the following, without using .Net's Timespan or DateTime. How would I NUnit test it? \nTimeSpan ts = Date1 - Date2;\nint numberOfDays = ts.Days;\n\n" }, { "from": "gpt", "value": "If you want to calculate the number of days between...
I'm looking for a tool that I could potentially use in combination with WatiN that would allow me to more or less measure both the response time of an interaction and also the filesize of the same interaction in combination with WatiN. Let's say, I make a google request. That's great, we've all seen that example, but w...
To achieve your goal of measuring response times and file sizes programmatically when using WatiN (a web automation library for .NET), you can consider using the following approaches and tools: ### 1. **FiddlerCore** FiddlerCore is a .NET library that allows you to capture HTTP(S) traffic programmatically. You can use...
48,431
[ { "from": "human", "value": "I'm looking for a tool that I could potentially use in combination with WatiN that would allow me to more or less measure both the response time of an interaction and also the filesize of the same interaction in combination with WatiN. Let's say, I make a google request. That's ...
How do you manage your database connections in your ASP.Net application? My understanding tells me the "best" way is to open a connection, make a query, close the connection - and do that multiple times because connection pooling makes the cost negligable. The problem comes when I have a DAL where each method looks aft...
You're touching on some important concepts regarding database connection management in ASP.NET applications, particularly when dealing with connection pooling and transaction handling. Let's break down your concerns and explore best practices and alternatives for handling connections, especially in the context of a Dat...
49,355
[ { "from": "human", "value": "How do you manage your database connections in your ASP.Net application?\nMy understanding tells me the \"best\" way is to open a connection, make a query, close the connection - and do that multiple times because connection pooling makes the cost negligable.\nThe problem comes ...
There was a library of dynamic LINQ extensions methods released as a sample with Visual Studio 2008. I'd like to extend it with a join method. The code below fails with a parameter miss match exception at run time. Where is the problem? public static IQueryable Join(this IQueryable outer, IEnumerable inner, ...
The issue you're encountering is likely due to the incorrect type inference in the `Join` method signature. When you're calling `Expression.Call` to invoke the `Queryable.Join` method, you need to ensure that the types of the lambda expressions you create match the expected types of the parameters for the `Queryable.Jo...
49,612
[ { "from": "human", "value": "There was a library of dynamic LINQ extensions methods released as a sample with Visual Studio 2008. I'd like to extend it with a join method. The code below fails with a parameter miss match exception at run time. Where is the problem?\npublic static IQueryable Join(this IQuery...
I have a third-party library in my SVN repository and I'd like to associate source/javadoc with it locally in Eclipse. I.e., there should be some local setting (for example, an entry in the local.properties file) that associates the source/javadoc with the JAR file, but which doesn't introduce local dependencies into t...
In Eclipse, associating source and Javadoc with a JAR file while keeping your local configurations outside of the repository can indeed be a bit tricky, especially if you want to avoid adding local dependencies into the version-controlled `.classpath`. Unfortunately, Eclipse does not directly support loading Path Varia...
49,773
[ { "from": "human", "value": "I have a third-party library in my SVN repository and I'd like to associate source/javadoc with it locally in Eclipse. I.e., there should be some local setting (for example, an entry in the local.properties file) that associates the source/javadoc with the JAR file, but which do...
I have a web service which returns tab delimited data (see sample below). I need to parse this into an array or similar so I can create a navigation view of it. I've managed to perform the web request and could parse an XML file, but my knowledge of Objective-C is small. 433 Eat 502 Not Fussed 442 British 4...
To parse a tab-delimited string in Objective-C, you can follow these steps to split the data into an array and then create a structure that reflects the hierarchy of your navigation view. Given the sample input you provided, the structure seems to be that you have categories (e.g., "Eat", "Drink") with subcategories ...
48,129
[ { "from": "human", "value": "I have a web service which returns tab delimited data (see sample below).\nI need to parse this into an array or similar so I can create a navigation view of it.\nI've managed to perform the web request and could parse an XML file, but my knowledge of Objective-C is small.\n433 ...
I have the following xsl that sorts my xml alphabetically: <xsl:template match="/"> <xsl:apply-templates /> </xsl:template> <xsl:key name="rows-by-title" match="Row" use="translate(substring(@Title,1,1),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')" /> <xsl:variable name="StartRow" select="string('&lt;...
To break the table row every 4 columns in your XSLT output, you can keep track of the number of rows processed and create a new table row (`<tr>`) when the count reaches 4. You can achieve this using an `<xsl:if>` condition combined with the `<xsl:choose>` element or by leveraging the `position()` function in a `for-ea...
48,684
[ { "from": "human", "value": "I have the following xsl that sorts my xml alphabetically:\n<xsl:template match=\"/\">\n <xsl:apply-templates />\n</xsl:template> \n\n<xsl:key name=\"rows-by-title\" match=\"Row\" use=\"translate(substring(@Title,1,1),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')\"...
I have a really simple class with two methods; One that will be called and the other that it will call. The idea is to call the OuterMockMethod method BUT mock the InnerMockMethod. Right now I can only seem to mock the OuterMockMethod method. public class MockClass : IMockInterface { public virtual MockC...
To achieve the desired behavior where you want to mock `InnerMockMethod` while calling `OuterMockMethod`, you need to ensure that the mocking framework you are using (in this case, Rhino Mocks) is able to correctly intercept the call to `InnerMockMethod`. This can typically be done using a combination of mocking and se...
48,435
[ { "from": "human", "value": "I have a really simple class with two methods; One that will be called and the other that it will call. The idea is to call the OuterMockMethod method BUT mock the InnerMockMethod. Right now I can only seem to mock the OuterMockMethod method.\npublic class MockClass : IMockInt...
I have an application (ASP.NET 3.5) that allows users to rerun a particular process if required. The process inserts records into an MS SQL table. I have the insert in a Try / Catch and ignore the catch if a record already exists (the error in the Title would be valid). This worked perfectly using ADO but after I conve...
The issue you're experiencing with LINQ to SQL likely stems from how the `DataContext` manages the state of objects and tracks changes. When you insert a new record using the same `DataContext` instance multiple times without reinitializing it, the context keeps track of all objects that have been added or modified. ...
47,534
[ { "from": "human", "value": "I have an application (ASP.NET 3.5) that allows users to rerun a particular process if required. The process inserts records into an MS SQL table. I have the insert in a Try / Catch and ignore the catch if a record already exists (the error in the Title would be valid). This wor...
I'm creating a custom subclass of NSPopUpButton and NSPopUpButtonCell to display a lone icon on top of the button instead of the usual text. To do this I'm overriding - (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView in my button cell subclass to draw my icon at the appropriate size and loc...
To ensure that your custom `NSPopUpButtonCell` correctly redraws when the mouse is over the button, you need to handle mouse events and trigger the appropriate updates to the button's appearance. Here's a general approach you can follow: 1. **Track Mouse Events**: Override the necessary mouse event methods in your `NS...
47,541
[ { "from": "human", "value": "I'm creating a custom subclass of NSPopUpButton and NSPopUpButtonCell to display a lone icon on top of the button instead of the usual text.\nTo do this I'm overriding \n- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView\n\nin my button cell subclass to...
I would like to use an SQL Server table as an action queue. So whenever the table is non-empty, I'd like some sort of notification to my VDF application, in order to avoid constantly polling the database. VDF relies on using stdcall, the standard calling convention for the Win 32 API, or COM/ActiveX. Another solution t...
To implement a notification mechanism for your SQL Server table so that your Visual DataFlex (VDF) application can react to changes without continuously polling, you can consider the following approaches: ### 1. SQL Server Notification with Query Notifications SQL Server provides a feature called **Query Notification...
48,479
[ { "from": "human", "value": "I would like to use an SQL Server table as an action queue. So whenever the table is non-empty, I'd like some sort of notification to my VDF application, in order to avoid constantly polling the database. VDF relies on using stdcall, the standard calling convention for the Win 3...
Does Java 6 consume more memory than you expect for largish applications? I have an application I have been developing for years, which has, until now taken about 30-40 MB in my particular test configuration; now with Java 6u10 and 11 it is taking several hundred while active. It bounces around a lot, anywhere between...
It sounds like you're encountering some interesting behavior with your Java application running on Java 6. Here are a few factors that could contribute to the high memory usage and page faults you're observing: 1. **Native Memory Usage**: Java applications can utilize native memory beyond just the heap and perm-gen sp...
49,050
[ { "from": "human", "value": "Does Java 6 consume more memory than you expect for largish applications?\nI have an application I have been developing for years, which has, until now taken about 30-40 MB in my particular test configuration; now with Java 6u10 and 11 it is taking several hundred while active. ...
i have the following jquery code. basically i will have several overlapped divs and a list of links on the right of all those overlapped divs. when hovering over a link, the link's assigned div will fade in. I have the following code and it works (it uses the default windows' sample pictures), but if someone can think...
Certainly! You can optimize your jQuery code by consolidating the logic into a single event handler that takes advantage of data attributes. This will follow the DRY (Don't Repeat Yourself) principle and make your code more maintainable. Here's how you can refactor your code: ```html <!DOCTYPE html> <html lang="en"> ...
42,545
[ { "from": "human", "value": "i have the following jquery code. \nbasically i will have several overlapped divs and a list of links on the right of all those overlapped divs. when hovering over a link, the link's assigned div will fade in.\nI have the following code and it works (it uses the default windows'...
I am using my own custom authentication with IIS, and I want the server on every page load (no matter what type of file) to first check the Application variable to see if the user is authenticated and authorized to see the site. In global.asax this could be: void Application_Start(Object Sender, EventArgs e) { if(App...
In ASP.NET, the `Global.asax` file is intended to handle application-wide events for a single web application, which means it cannot be customized on a per-directory basis. Since you have multiple sub-applications or sub-roots, there are several alternatives you can consider to handle your custom authentication for eac...
49,978
[ { "from": "human", "value": "I am using my own custom authentication with IIS, and I want the server on every page load (no matter what type of file) to first check the Application variable to see if the user is authenticated and authorized to see the site. In global.asax this could be:\nvoid Application_St...
I need to convert my Sandcastle Help File Builder (SHFB) output that is a Web site (HTML) to Media wiki format Find a way to transfer/include the converted pages directly into the MediaWiki we have set up. Any ideas? we have over 1000 pages of HTML files inthe Website (output of SHFB). I thought of using a html...
Converting a large collection of HTML files from Sandcastle Help File Builder (SHFB) output to MediaWiki format and then importing them into your MediaWiki installation can be accomplished in a few steps. Here's a structured approach to tackle both parts of your requirement: ### Part 1: Convert HTML to MediaWiki Forma...
47,288
[ { "from": "human", "value": "I need to \n\nconvert my Sandcastle Help File\nBuilder (SHFB) output that is a Web\nsite (HTML) to Media wiki format \nFind a way to transfer/include the\nconverted pages directly into the\nMediaWiki we have set up.\n\nAny ideas? we have over 1000 pages of HTML files inthe W...
Does anyone of you know, if and if so, how can I check, with my application code, if a server has ssl enabled or not?
Yes, you can check if a server has SSL (Secure Sockets Layer) enabled by attempting to make a secure connection using HTTPS and handling the results. The approach you take depends on the programming language and the libraries you're using. Below are examples in different programming languages: ### Python You can use ...
44,075
[ { "from": "human", "value": "Does anyone of you know, if and if so, how can I check, with my application code, if a server has ssl enabled or not?\n" }, { "from": "gpt", "value": "Yes, you can check if a server has SSL (Secure Sockets Layer) enabled by attempting to make a secure connection usin...
In contrast to most software development organizations, our little research group within a university department consists of a professor and a flow of grad and undergrad students, it's hard to retain any working knowledge beyond the research itself. Our backgrounds vary, and rarely involves much computer science backg...
It's great to hear about your research group's enthusiasm for software development! Given your context—a rotating cast of students with varied backgrounds—it sounds like adopting a version control system that emphasizes ease of use and clear workflows would be beneficial. Let's explore some options and practices: ### ...
47,152
[ { "from": "human", "value": "In contrast to most software development organizations, our little research group within a university department consists of a professor and a flow of grad and undergrad students, it's hard to retain any working knowledge beyond the research itself. Our backgrounds vary, and ra...
Are there techniques for comparing the same data stored in different schemas? The situation is something like this. If I have a db with schema A and it stores data for a feature in say, 5 tables. Schema A -> Schema B is done during an upgrade process. During the upgrade process some transformation logic is applied and ...
When comparing data stored in different schemas, especially when some transformation logic is involved, there are several techniques and tools that can help automate the process. Here’s how you can approach this challenge using Python and some relevant libraries: ### 1. Understand Transformation Logic Before doing any...
48,745
[ { "from": "human", "value": "Are there techniques for comparing the same data stored in different schemas? The situation is something like this. If I have a db with schema A and it stores data for a feature in say, 5 tables. Schema A -> Schema B is done during an upgrade process. During the upgrade process ...
Inspired by the question What’s the simplest way to call Http GET url using Delphi? I really would like to see a sample of how to use POST. Preferably to receive XML from the call. Added: What about including an image or other file in the post data?
To make an HTTP POST request in Delphi and receive XML in response, you can use the `TIdHTTP` component from the Indy library, which is included in Delphi. Below is a simple example demonstrating how to perform a POST request and how to include an image or file in the post data. ### Simple POST Request to Receive XML ...
46,275
[ { "from": "human", "value": "Inspired by the question What’s the simplest way to call Http GET url using Delphi?\nI really would like to see a sample of how to use POST. Preferably to receive XML from the call.\nAdded: What about including an image or other file in the post data?\n" }, { "from": "gp...
Has anybody tried duplicating Ruby on Rails' layout functionality with Apache Tiles 2 ? I'm trying to integrate Tiles 2 with Spring. I have a previously written custom view resolver for the Spring framework that does this quite nicely, but I'm upgrading to Spring Webflow 2 and I need to be able to integrate Tiles 2
Yes, integrating Apache Tiles 2 with Spring, especially when working with Spring Web Flow, is a common scenario. Apache Tiles provides a templating framework that can help manage layout and composite views in a manner similar to what Ruby on Rails offers. Here are some steps and considerations that can help you achiev...
46,865
[ { "from": "human", "value": "Has anybody tried duplicating Ruby on Rails' layout functionality with Apache Tiles 2 ? I'm trying to integrate Tiles 2 with Spring. I have a previously written custom view resolver for the Spring framework that does this quite nicely, but I'm upgrading to Spring Webflow 2 and ...
So I just spent 5 hours troubleshooting a problem which turned out to be due not only to the old unreliable ISNUMERIC but it looks like my problem only appears when the UDF in which ISNUMERIC is declared WITH SCHEMABINDING and is called within a stored proc (I've got a lot of work to do to distill it down into a test c...
Certainly! The `ISNUMERIC()` function in SQL Server can be problematic because it returns true for some non-numeric values (like currency symbols and certain other characters) that you might not want to consider as valid numbers. Instead, you can create more reliable functions to check for specific numeric types. Here...
48,340
[ { "from": "human", "value": "So I just spent 5 hours troubleshooting a problem which turned out to be due not only to the old unreliable ISNUMERIC but it looks like my problem only appears when the UDF in which ISNUMERIC is declared WITH SCHEMABINDING and is called within a stored proc (I've got a lot of wo...
I just finished reading a book on scala. What strikes me is that every single example in the whole book was numerical in some form or another. Like a lot of programmers, the only math I use is from discrete and combinatorial mathematics, and usually that's not math I program in an explicit way. I'm really missing some ...
Functional programming (FP) offers a wide range of compelling use cases beyond numerical computations. Here are several areas where functional programming shines, particularly with Scala's capabilities: 1. **Data Transformation and Manipulation**: - **ETL Processes**: FP is well-suited for Extract, Transform, Load ...
47,964
[ { "from": "human", "value": "I just finished reading a book on scala. What strikes me is that every single example in the whole book was numerical in some form or another.\nLike a lot of programmers, the only math I use is from discrete and combinatorial mathematics, and usually that's not math I program in...
In my web app I use several asmx (Web Services) from the same provider, they have one for this, other for that, but all require a SOAP Header with Authentication. It is simple to add the Authentication: public static SoCredentialsHeader AttachCredentialHeader() { SoCredentialsHeader ch = new SoCredentialsHeader(); ...
Yes, you can use a generic method to achieve this, allowing you to create a single function that can work with various types of credential headers from different web services. This design pattern is often referred to as the **Generics** pattern, which can help you avoid code duplication and make your code more maintain...
49,979
[ { "from": "human", "value": "In my web app I use several asmx (Web Services) from the same provider, they have one for this, other for that, but all require a SOAP Header with Authentication.\nIt is simple to add the Authentication:\npublic static SoCredentialsHeader AttachCredentialHeader()\n{\n SoCrede...
You may have seen JavaScript sliders before: http://dev.jquery.com/view/tags/ui/1.5b2/demos/ui.slider.html What I'm envisioning is a circular slider. It would consist of a draggable button at one point on the circle -- and that button can be dragged anywhere along the ring. The value depends on what position the button...
Creating a circular slider in JavaScript involves a combination of HTML, CSS, and JavaScript for the functionality. Below is a simple example that demonstrates how to create a circular slider that allows a user to drag a button around a circle. This example makes use of basic DOM manipulation and event handling to achi...
44,928
[ { "from": "human", "value": "You may have seen JavaScript sliders before:\nhttp://dev.jquery.com/view/tags/ui/1.5b2/demos/ui.slider.html\nWhat I'm envisioning is a circular slider. It would consist of a draggable button at one point on the circle -- and that button can be dragged anywhere along the ring. Th...
How do I set tab ordering in WPF? I have an ItemsControl with some items expanded and some collapsed and would like to skip the collapsed ones when I'm tabbing. Any ideas?
In WPF, setting tab order for items in an `ItemsControl`, especially when some items are collapsed and should be skipped, can be a bit tricky. You can achieve this by leveraging the `TabIndex` property and manipulating the logical tree of your items. Here's a general approach you can follow: ### Approach 1. **Set `Ta...
44,370
[ { "from": "human", "value": "How do I set tab ordering in WPF? I have an ItemsControl with some items expanded and some collapsed and would like to skip the collapsed ones when I'm tabbing.\nAny ideas?\n" }, { "from": "gpt", "value": "In WPF, setting tab order for items in an `ItemsControl`, esp...
Is there anyone who has used or looked into using Jitterbit as well as BizTalk? If so, what are some pros and cons of each, and which one did you go with as your final solution? Specifically, I'm looking for SAP integration, but any input would be appreciated.
Both Jitterbit and BizTalk are integration platforms that offer various capabilities for connecting different applications, including SAP. Here are some pros and cons of each, along with considerations for your final decision: ### Jitterbit #### Pros: 1. **Ease of Use**: Jitterbit is known for its user-friendly inter...
49,610
[ { "from": "human", "value": "Is there anyone who has used or looked into using Jitterbit as well as BizTalk? If so, what are some pros and cons of each, and which one did you go with as your final solution?\nSpecifically, I'm looking for SAP integration, but any input would be appreciated.\n" }, { "...
I have a mx:Canvas element that contains several mx:Panel elements. I want to be able to draw a line connecting two such mx:Panel's in such a way that the line continues to connect the two mx:Panels when one or both get dragged around. It seems like something that should be trivial to do, but I haven't been able to fig...
To achieve a dynamic line that connects two `mx:Panel` elements, updating the line's position as the panels are dragged, you need to handle the drag events of the panels and redraw the line continuously. Here's a basic approach to implement this using ActionScript and Flex: 1. **Create the Panels**: Set up your `mx:...
47,186
[ { "from": "human", "value": "I have a mx:Canvas element that contains several mx:Panel elements. I want to be able to draw a line connecting two such mx:Panel's in such a way that the line continues to connect the two mx:Panels when one or both get dragged around. It seems like something that should be triv...
I have a windows application that I want to run as a windows service - how can I do this ?
Running a Windows application as a Windows service involves a few steps, and the approach can vary based on the type of application you have (e.g., console application, GUI application). Here's a general overview of how to achieve this: ### 1. Create a Windows Service Wrapper If your application is not designed to run...
44,334
[ { "from": "human", "value": "I have a windows application that I want to run as a windows service - how can I do this ?\n" }, { "from": "gpt", "value": "Running a Windows application as a Windows service involves a few steps, and the approach can vary based on the type of application you have (e...
I have a list of items (blue nodes below) which are categorized by the users of my application. The categories themselves can be grouped and categorized themselves. The resulting structure can be represented as a Directed Acyclic Graph (DAG) where the items are sinks at the bottom of the graph's topology and the top ca...
You've outlined an interesting problem involving a Directed Acyclic Graph (DAG), where you want to perform specific operations. Let's break down your queries and analyze potential strategies for each. ### 1. Finding all items below a particular node Your initial approach of traversing from the target node and collecti...
45,971
[ { "from": "human", "value": "I have a list of items (blue nodes below) which are categorized by the users of my application. The categories themselves can be grouped and categorized themselves.\nThe resulting structure can be represented as a Directed Acyclic Graph (DAG) where the items are sinks at the bot...
I'm coming from a .net background and want to know the accepted way of creating a method that returns a boolean and modifies a string that was passed in via parameter. I understand Strings are immutable in Java so the below snippet will always produce an empty string. I am constrained to return boolean only. Exceptions...
In Java, since strings are immutable, you cannot modify a `String` that is passed to a method because any modification will result in a new string being created, leaving the original string unchanged. To achieve the desired effect of modifying a string while also returning a boolean, you can use a mutable wrapper class...
49,458
[ { "from": "human", "value": "I'm coming from a .net background and want to know the accepted way of creating a method that returns a boolean and modifies a string that was passed in via parameter. I understand Strings are immutable in Java so the below snippet will always produce an empty string. I am const...
this is my log output INFO main digestemails - process inbox INFO main digestemails - checking for emails in c:\development\DCMail\email\KN-Source INFO main digestemails - digesting 003d01c95a7b_3446880_0202fea9@xxxx.com.eml INFO main digestemails - extracting attachments INFO main digestemails - no attachments or no a...
To include a timestamp in your log messages using Log4j, you will need to adjust the `ConversionPattern` in your Log4j configuration file to include the date and time. Here’s how you can modify the configuration for both the console appender and the rolling file appender to include the date and time: ### Updated log4j...
49,115
[ { "from": "human", "value": "this is my log output\nINFO main digestemails - process inbox\nINFO main digestemails - checking for emails in c:\\development\\DCMail\\email\\KN-Source\nINFO main digestemails - digesting 003d01c95a7b_3446880_0202fea9@xxxx.com.eml\nINFO main digestemails - extracting attachment...
I've inherited an ASP.NET application built on top of webforms, and the application suffers from having all of its business logic embedded in the codebehind. As a result, this application can't be unit tested. I want to break out the functionality of every form into an MVC style, but I've found that ASP.NET resists eve...
Refactoring an ASP.NET Web Forms application to an MVC-like architecture can indeed be challenging due to the nature of the ASP.NET lifecycle and the way page controls and postbacks work. However, you can adopt a strategy that allows you to separate concerns while accommodating the Web Forms lifecycle. Here’s a step-by...
48,520
[ { "from": "human", "value": "I've inherited an ASP.NET application built on top of webforms, and the application suffers from having all of its business logic embedded in the codebehind. As a result, this application can't be unit tested.\nI want to break out the functionality of every form into an MVC styl...
I am running a Visual Studio Load Test using an Agent on one of our servers. This server has two CPU and I have a licence for the Test Agent to use both. My question is how do I configure the Test Agent service to use the second cpu?
To configure the Visual Studio Test Agent to utilize multiple CPUs for load testing, you typically don’t need to manually specify CPU usage, as the Windows operating system and the .NET framework will automatically leverage the available CPUs for executing the tests. However, you can ensure that your Test Agent is set ...
46,965
[ { "from": "human", "value": "I am running a Visual Studio Load Test using an Agent on one of our servers. This server has two CPU and I have a licence for the Test Agent to use both. \nMy question is how do I configure the Test Agent service to use the second cpu?\n" }, { "from": "gpt", "value":...
I am sharding my data into multiple mysql databases, but sometimes I will need to gather information from multiple shards. How can I query multiple mysql databases in parallel in php? I've seen some examples of asynchronous curl requests and shell_exec, but is there a more direct way?
Yes, you can query multiple MySQL databases in parallel in PHP without needing to resort to asynchronous cURL requests or shell_exec. PHP has the ability to handle concurrent database connections and queries using `mysqli` or `PDO`. Here are a few approaches you can consider: ### 1. Using `mysqli` with `multi_query` ...
46,024
[ { "from": "human", "value": "I am sharding my data into multiple mysql databases, but sometimes I will need to gather information from multiple shards. How can I query multiple mysql databases in parallel in php?\nI've seen some examples of asynchronous curl requests and shell_exec, but is there a more dir...
I used this code to upload the picture. I got this code from stackoverflow. I am still unable to upload the image. I changed the db connection settings in table settings 2. I made the table but I am not sure whether the properties of the table I created are correct. <html> <head><title>Store Some Binary File to a DB</t...
Your code has several issues and outdated functions which may prevent it from working properly. Here are some suggestions to fix your upload functionality and also to help you retrieve and display the image. ### Step 1: Update the Code to Use MySQLi or PDO The `mysql_*` functions you are using are deprecated and rem...
44,463
[ { "from": "human", "value": "I used this code to upload the picture. I got this code from stackoverflow. I am still unable to upload the image. I changed the db connection settings in table settings 2. I made the table but I am not sure whether the properties of the table I created are correct.\n<html>\n<he...
I have a very simple Update statement that will update mail server settings and network credentials info... Query works fine when I run it in Access but C# keeps giving me the error stating that my SQL Syntax is wrong ... I have a dataaccess layer (dal class) and Update instance method pasted belows ... But the problem...
It looks like the SQL update query you are constructing in your ASP.NET code is missing a crucial component, which is a `WHERE` clause. When you run an `UPDATE` statement in SQL, you typically need to specify which rows to update; otherwise, it may cause an error or update all rows unintentionally. Here's how your SQL...
48,958
[ { "from": "human", "value": "I have a very simple Update statement that will update mail server settings and network credentials info... Query works fine when I run it in Access but C# keeps giving me the error stating that my SQL Syntax is wrong ... I have a dataaccess layer (dal class) and Update instance...
I currently have a user control that is used on both an /Address/Edit and an /Address/Create page. This user control simply has the following code in it to submit a new address to the system: <% using (Html.BeginForm()) { %> <table> <tr> <td>Street Address</td> ...
Yes, you can modify your user control to render the list of addresses as hyperlinks that, when clicked, will populate the address field in the form and submit the form. To achieve this, you'll need to use JavaScript to handle the click events on the hyperlinks, which will update the address textbox with the selected ...
48,980
[ { "from": "human", "value": "I currently have a user control that is used on both an /Address/Edit and an /Address/Create page. This user control simply has the following code in it to submit a new address to the system:\n<% \n using (Html.BeginForm())\n {\n%>\n <table>\n <tr>\n ...
I need to scrape data from a windows application to run a query in another program. Does anyone know of a good starting point for me to do this in .NET?
Scraping data from a Windows application can be a bit tricky, as it often depends on how the application is built and the technologies it uses. However, there are several approaches you can take in .NET. Here’s a general guide to get you started: ### 1. **Identify the Application Type** - Determine if the applicati...
48,920
[ { "from": "human", "value": "I need to scrape data from a windows application to run a query in another program. Does anyone know of a good starting point for me to do this in .NET?\n" }, { "from": "gpt", "value": "Scraping data from a Windows application can be a bit tricky, as it often depends...
Finding windows FastCGI help is proving very difficult. Any help would be greatly apprciated. The concept of FastCGi is that the process survives a request allowing you to maintain state between calls. This means you do not have the overhead of opening databases etc between calls. Apart from that, FastCGI is fully mul...
It seems you're seeking assistance with FastCGI on Windows, specifically regarding its implementation and usage. FastCGI can indeed be a bit challenging, especially when it comes to setting it up with a Windows server environment, and you have noted important aspects of FastCGI, such as state persistence and multiplexi...
45,455
[ { "from": "human", "value": "Finding windows FastCGI help is proving very difficult. \nAny help would be greatly apprciated.\nThe concept of FastCGi is that the process survives a request allowing you to maintain state between calls. This means you do not have the overhead of opening databases etc between c...
I have this in my xsd: <xsd:simpleType name="line_action"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="add"/> <xsd:enumeration value="delete"/> <xsd:enumeration value="remove"/> <xsd:enumeration value="suspend"/> <xsd:enumeration value="restore"/> <x...
To achieve your goal of extending the `basic_option` while also restricting the `action` attribute to only allow specific values (in this case, `add` and `remove`), you should consider using a combination of extension and restriction. Unfortunately, XML Schema (XSD) does not allow you to directly change the type of an ...
49,832
[ { "from": "human", "value": "I have this in my xsd:\n\n\n<xsd:simpleType name=\"line_action\">\n <xsd:restriction base=\"xsd:string\">\n <xsd:enumeration value=\"add\"/>\n <xsd:enumeration value=\"delete\"/>\n <xsd:enumeration value=\"remove\"/>\n <xsd:enumeration value=\"susp...
Basically I need to insert a bunch of data to an Excel file. Creating an OleDB connection appears to be the fastest way but I've seen to have run into memory issues. The memory used by the process seems to keep growing as I execute INSERT queries. I've narrowed them down to only happen when I output to the Excel fil...
When working with OleDB connections to write data to an Excel file, memory issues can sometimes arise, particularly when handling large volumes of data. Here are some strategies and considerations to help mitigate memory usage and improve performance when inserting records into an Excel file: ### 1. Optimize Connectio...
40,261
[ { "from": "human", "value": "Basically I need to insert a bunch of data to an Excel file. Creating an OleDB connection appears to be the fastest way but I've seen to have run into memory issues. The memory used by the process seems to keep growing as I execute INSERT queries. I've narrowed them down to o...
There are multiple ways to fill an NSTableView up with data through either bindings, delegates, or data sources. What is the best way to go about filling up the tableview with data that is changed pretty frequently from an XML-RPC server? I'm targeting Mac OS X 10.5 only and there are lots of examples on how to do it,...
Filling an `NSTableView` with frequently changing data from an XML-RPC server requires a robust solution to ensure that the data is updated efficiently and that the UI remains responsive. Below are some recommended approaches you can consider for handling this scenario on macOS 10.5: ### Approach 1: Use a Data Source ...
48,169
[ { "from": "human", "value": "There are multiple ways to fill an NSTableView up with data through either bindings, delegates, or data sources.\nWhat is the best way to go about filling up the tableview with data that is changed pretty frequently from an XML-RPC server? I'm targeting Mac OS X 10.5 only and t...
Is it possible to modify a UIActionSheet with a custom UIView? I have a preferences cell in one of my tables which would benefit greatly from a modal window appearing with a UIDatePicker. Having it appear as an Alert would be fantastic as well. Ideally it would be nice to get the free animation that comes in play with ...
In iOS, the `UIActionSheet` has been deprecated since iOS 8 and replaced by `UIAlertController` for alerts and action sheets. While `UIAlertController` provides a convenient way to show alerts, it doesn't support adding custom views directly into it. However, you can achieve a similar effect by creating your own custo...
49,113
[ { "from": "human", "value": "Is it possible to modify a UIActionSheet with a custom UIView? I have a preferences cell in one of my tables which would benefit greatly from a modal window appearing with a UIDatePicker. Having it appear as an Alert would be fantastic as well. Ideally it would be nice to get th...
I have been searching for info on this to no avail. The context of why i need this is another question I asked here. More specifically, does creating/updating/deleting files in App_Data cause a pool recycle? If someone could provide a detailed list of what causes a recycle, that would be great. UPDATE: As two users alr...
In ASP.NET, application pools and AppDomains play an important role in managing the runtime environment for your web applications. Understanding what causes an application pool recycle and what causes an AppDomain recycle can help you troubleshoot issues and optimize your application’s performance. ### Reasons for App...
48,021
[ { "from": "human", "value": "I have been searching for info on this to no avail. The context of why i need this is another question I asked here. More specifically, does creating/updating/deleting files in App_Data cause a pool recycle?\nIf someone could provide a detailed list of what causes a recycle, tha...
I am building a Web service using WCF as a way to provide access to data within my VB.Net application. When building web services hosted on IIS, there is a helpful test page as part of the service that allows the webservice to be invoked with parameters there and then. It's very helpful for testing. Is there a way to c...
Yes, WCF services can be configured to provide a test interface similar to the one provided for traditional ASMX web services. While WCF does not come with a built-in test page like ASMX services, you can still achieve this by enabling the WCF service help page, which provides a UI for testing your service methods. To...
44,879
[ { "from": "human", "value": "I am building a Web service using WCF as a way to provide access to data within my VB.Net application.\nWhen building web services hosted on IIS, there is a helpful test page as part of the service that allows the webservice to be invoked with parameters there and then. It's ver...
My users will import through cut and paste a large string that will contain company names. I have an existing and growing MYSQL database of companies names, each with a unique company_id. I want to be able to parse through the string and assign to each of the user-inputed company names a fuzzy match. Right now, just d...
To achieve efficient fuzzy matching of company names from user input against a growing MySQL database, there are several strategies and techniques you can employ. Here’s a breakdown of approaches that can help with both speed and accuracy: ### 1. Use Soundex for Indexing Soundex is a phonetic algorithm for indexing n...
47,436
[ { "from": "human", "value": "My users will import through cut and paste a large string that will contain company names. \nI have an existing and growing MYSQL database of companies names, each with a unique company_id.\nI want to be able to parse through the string and assign to each of the user-inputed com...
i need a report and i should use pivot table for it.Report will be group by categories .It is not good to use case when statement because there are many categories.u can think Northwind Database as sample and All Categories will be shown as Columns and Report will show customers preference among Categories.I dont know ...
Certainly! To create a report that shows customer preferences among categories from the Northwind database using a pivot table, you can follow these steps. This approach avoids the use of a `CASE WHEN` statement and instead utilizes SQL Server's `PIVOT` functionality. ### Step-by-Step Solution 1. **Understand Your Da...
45,375
[ { "from": "human", "value": "i need a report and i should use pivot table for it.Report will be group by categories .It is not good to use case when statement because there are many categories.u can think Northwind Database as sample and All Categories will be shown as Columns and Report will show customers...
I can't find any post regarding the cache on logout so I'm going to ask this question. If there is a similar question. Please let me know. I have a Logout page that basically call FormAuthentications signout method then redirect the user to the login page. It work fine but the problem is user can click on the browser's...
When implementing a logout feature in a web application, it’s important to ensure that users cannot navigate back to sensitive pages after logging out. You’re correct that simply calling the `FormsAuthentication.SignOut` method and redirecting to the login page may not be sufficient, as browsers can cache pages, allowi...
49,429
[ { "from": "human", "value": "I can't find any post regarding the cache on logout so I'm going to ask this question. If there is a similar question. Please let me know.\nI have a Logout page that basically call FormAuthentications signout method then redirect the user to the login page. It work fine but the ...
I am very new to grails.I am doing one sample project for image uploading and displaying.Right now my project uploads the images and stores into the images directory.Now i want to display all the images stored in the "image" directory. I dont know how to write the gsp code for display all images. For displaying the ima...
In your Grails application, if you have a list of image filenames stored in `imageList`, you can modify your GSP code to display all the images stored in the "images" directory by using the dynamic variable in the `src` attribute of the `<img>` tag. Assuming `imageList` contains the filenames of the images, you can m...
44,408
[ { "from": "human", "value": "I am very new to grails.I am doing one sample project for image uploading and displaying.Right now my project uploads the images and stores into the images directory.Now i want to display all the images stored in the \"image\" directory.\nI dont know how to write the gsp code fo...
I'm using the Belltown theme in a sharepoint portal and there are some styles that I want to change change in the Belltown stylesheet. I thought that I could just edit the theme.css file located at: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\THEMES\BELLTOWN and restart the web ser...
When working with SharePoint and trying to modify the styles of a theme like Belltown, simply editing the `theme.css` file may not always yield the desired results due to caching and how SharePoint manages its themes. Here are a few steps and considerations to make sure your changes take effect: 1. **Clear Browser Cac...
47,835
[ { "from": "human", "value": "I'm using the Belltown theme in a sharepoint portal and there are some styles that I want to change change in the Belltown stylesheet. I thought that I could just edit the theme.css file located at:\nC:\\Program Files\\Common Files\\Microsoft Shared\\web server extensions\\12\\...
I have a Panel with a collection of controls in it. How can I get the index of a specific control when iterating through them? I'm using foreach to iterate, but there's no Index property. Should I use for x = 0... and return x when my match is made, or what?
If you're iterating through a collection of controls in a Panel and you want to find the index of a specific control, there are a couple of approaches you can take. Since you're using a `foreach` loop, it doesn't provide an index directly. However, you can use a `for` loop to access the index directly or maintain your ...
49,580
[ { "from": "human", "value": "I have a Panel with a collection of controls in it. How can I get the index of a specific control when iterating through them? I'm using foreach to iterate, but there's no Index property. Should I use for x = 0... and return x when my match is made, or what?\n" }, { "...