instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
So I have xml that looks like this:
<todo-list>
<id type="integer">#{id}</id>
<name>#{name}</name>
<description>#{description}</description>
<project-id type="integer">#{project_id}</project-id>
<milestone-id type="integer">#{milestone_id}</milestone-id>
<position type="integer">#{position}</position>
<... | To deserialize the provided XML structure into C# objects using .NET's serialization library, you can utilize the `XmlSerializer`. This approach allows you to define C# classes that match the XML structure and then easily convert between XML and your C# objects.
Here's a step-by-step guide on how to achieve this:
###... | 36,614 | [
{
"from": "human",
"value": "So I have xml that looks like this:\n\n<todo-list>\n <id type=\"integer\">#{id}</id>\n <name>#{name}</name>\n <description>#{description}</description>\n <project-id type=\"integer\">#{project_id}</project-id>\n <milestone-id type=\"integer\">#{milestone_id}</milestone-id>\... |
I'm tyring to convert a MSVC project from VS 2005 to VS 2008. It contains a IDL file that outputs a header and stubs used for RPC. The VS 2005 project uses MIDL.exe version 6.00.0366. The VS 2008 project uses MIDL.exe version 7.00.0500.
Here's the problem: MIDL v6 outputs the following prototype for me to implement i... | To achieve the output from MIDL v7 that matches the prototypes generated by MIDL v6, you can make use of the `#[uuid(...)]` or `#[version(...)]` attributes in your IDL file and also use some compiler directives to instruct the MIDL compiler on how to handle the RPC functions.
Here are a few steps and suggestions to gu... | 41,173 | [
{
"from": "human",
"value": "I'm tyring to convert a MSVC project from VS 2005 to VS 2008. It contains a IDL file that outputs a header and stubs used for RPC. The VS 2005 project uses MIDL.exe version 6.00.0366. The VS 2008 project uses MIDL.exe version 7.00.0500.\nHere's the problem: MIDL v6 outputs the... |
Access can open DBF (dBase) files, but instead of physically converting the data into MDB format, it has the ability to link to the DBF table itself. This way the DBF is "linked" to the MDB.
Is it possible to attach a DBF file in such manner using C#?
Edit: I would like to use Jet and avoid using MS Access directly.
| Yes, you can link to a DBF file in a similar way to how Access does it, using C# with the OLE DB provider for dBase files. By using the `Microsoft.Jet.OLEDB.4.0` provider, you can connect to the DBF file and treat it as if it were part of your application, without physically converting it to an MDB file.
Here's how yo... | 37,398 | [
{
"from": "human",
"value": "Access can open DBF (dBase) files, but instead of physically converting the data into MDB format, it has the ability to link to the DBF table itself. This way the DBF is \"linked\" to the MDB.\nIs it possible to attach a DBF file in such manner using C#?\nEdit: I would like to u... |
Is it possible in PHP to do something like this? How would you go about writing a function? Here is an example. The order is the most important thing.
$customer['address'] = '123 fake st';
$customer['name'] = 'Tim';
$customer['dob'] = '12/08/1986';
$customer['dontSortMe'] = 'this value doesnt need to be sorted';
And I... | Yes, you can achieve this in PHP by writing a custom function to sort an associative array according to a specified order of keys. You can create a function called `sortArrayByArray`, which will take two arguments: the associative array that you want to sort and an array containing the keys in the desired order.
Here’... | 42,444 | [
{
"from": "human",
"value": "Is it possible in PHP to do something like this? How would you go about writing a function? Here is an example. The order is the most important thing.\n$customer['address'] = '123 fake st';\n$customer['name'] = 'Tim';\n$customer['dob'] = '12/08/1986';\n$customer['dontSortMe'] = ... |
I'm looking to improve my PHP coding and am wondering what PHP-specific techniques other programmers use to improve productivity or workaround PHP limitations.
Some examples:
Class naming convention to handle namespaces: Part1_Part2_ClassName maps to file Part1/Part2/ClassName.php
if ( count($arrayName) ) // handles $... | Improving your PHP coding skills can certainly enhance your productivity and make your code cleaner and more maintainable. Here are some PHP-specific techniques and best practices that can help you:
### 1. Autoloading with PSR-4
Implementing autoloading in PHP can drastically reduce the amount of code you need to writ... | 40,645 | [
{
"from": "human",
"value": "I'm looking to improve my PHP coding and am wondering what PHP-specific techniques other programmers use to improve productivity or workaround PHP limitations.\nSome examples:\n\nClass naming convention to handle namespaces: Part1_Part2_ClassName maps to file Part1/Part2/ClassNa... |
The title basically spells it out. What interfaces have you written that makes you proud and you use a lot. I guess the guys that wrote IEnumerable<T> and not least IQueryable<T> had a good feeling after creating those.
| While I don't have personal experiences or emotions, I can certainly highlight some important and impactful interfaces in programming that many developers respect and are proud of due to their utility and widespread use. Here are a few notable ones:
1. **IEnumerable<T>**: This interface is foundational in .NET for rep... | 41,153 | [
{
"from": "human",
"value": "The title basically spells it out. What interfaces have you written that makes you proud and you use a lot. I guess the guys that wrote IEnumerable<T> and not least IQueryable<T> had a good feeling after creating those.\n"
},
{
"from": "gpt",
"value": "While I don't ... |
I use Eclipse (3.4) and my class compiles without warning or errors.
My project uses an external jar file.
Where do I need to put this external jar file in order not to get a java.lang.NoClassDefFoundError when using this class from another project (not in Eclipse)?
I could just extract the jar into the project folder,... | To avoid getting a `java.lang.NoClassDefFoundError` when using your class from another project (not in Eclipse), you'll need to make sure that the external JAR file is included in your classpath when you run your Java application.
Here's how you can manage the external JAR file for use outside of Eclipse:
1. **Locati... | 43,510 | [
{
"from": "human",
"value": "I use Eclipse (3.4) and my class compiles without warning or errors.\nMy project uses an external jar file.\nWhere do I need to put this external jar file in order not to get a java.lang.NoClassDefFoundError when using this class from another project (not in Eclipse)?\nI could j... |
As in the topic...
I was thinking about something like "in memory changes".
On recent blogs by Jaroslaw Kowalski i have found similar approach
but i was thinking about sth much simpler
| It sounds like you're interested in a concept related to "in-memory changes," which typically refers to making modifications to data that are stored in memory (as opposed to being written directly to disk or a database). This can be useful in various scenarios, such as application performance optimization, real-time da... | 42,024 | [
{
"from": "human",
"value": "As in the topic...\nI was thinking about something like \"in memory changes\".\nOn recent blogs by Jaroslaw Kowalski i have found similar approach\nbut i was thinking about sth much simpler \n"
},
{
"from": "gpt",
"value": "It sounds like you're interested in a conc... |
I have a form I am submitting via AJAX (using prototype and the built-in rails 'form_remote_tag' helper).
What I would like is to update one div (a status area) if there are form validation errors but a different div (the div where the form lives) if the submit goes through sucessfully.
My code looks something like thi... | You can achieve the desired behavior without relying on HTTP error statuses. Instead, you can handle the responses for both success and error cases by sending back different data from your Rails controller.
Here's a suggested approach:
1. **Modify your Rails controller**: Make sure that your `import` action can respo... | 40,905 | [
{
"from": "human",
"value": "I have a form I am submitting via AJAX (using prototype and the built-in rails 'form_remote_tag' helper).\nWhat I would like is to update one div (a status area) if there are form validation errors but a different div (the div where the form lives) if the submit goes through suc... |
I've created a login submit form in HTML but for some reason autocompletion does not work in firefox.
This is what happens in Firefox:
- I give username and password and click on the login button
- Firefox prompts me if I would like to remember the password. I press 'remember' and login works.
- I log out and return to... | To ensure that the autocomplete feature works correctly in Firefox (and other browsers), there are several best practices you can follow when creating your login form. Here are some modifications and suggestions for your code:
### Updated HTML Form
```html
<form name="login_form" id="login_form" autocomplete="on" ons... | 42,406 | [
{
"from": "human",
"value": "I've created a login submit form in HTML but for some reason autocompletion does not work in firefox.\nThis is what happens in Firefox:\n- I give username and password and click on the login button\n- Firefox prompts me if I would like to remember the password. I press 'remember... |
In the library, right-click on a movieclip that you have written an ActionScript class for and select "Linkage...". Notice that the "Base class" field is not empty (it can't be). It's likely to be flash.display.MovieClip, but it could be something else, depending on what your class inherits from. This base class field ... | The requirement for the Base class field in both the ActionScript file and the Linkage dialog in Flash CS3 can be somewhat confusing, but there are reasons for it.
1. **Consistency**: The Base class field in the Linkage dialog is intended to ensure that the MovieClip in the Library is correctly associated with the cla... | 43,349 | [
{
"from": "human",
"value": "In the library, right-click on a movieclip that you have written an ActionScript class for and select \"Linkage...\". Notice that the \"Base class\" field is not empty (it can't be). It's likely to be flash.display.MovieClip, but it could be something else, depending on what you... |
Is there a simple attribute or data contract that I can assign to a function parameter that prevents null from being passed in C#/.NET? Ideally this would also check at compile time to make sure the literal null isn't being used anywhere for it and at run-time throw ArgumentNullException.
Currently I write something l... | In C#, you can leverage the existing nullability feature introduced in C# 8.0, which allows you to specify whether a reference type can be null. By enabling nullable reference types in your project, you can make use of compile-time checks to prevent null values from being assigned to reference type parameters.
### Ena... | 38,387 | [
{
"from": "human",
"value": "Is there a simple attribute or data contract that I can assign to a function parameter that prevents null from being passed in C#/.NET? Ideally this would also check at compile time to make sure the literal null isn't being used anywhere for it and at run-time throw ArgumentNul... |
I am implementing a Comment box facility in my application which user can resize using mouse. This comment box contains a scrollpane which instead contains a JEditorPane in which user can insert comment. I have added the editor pane inside a scroll pane for the following reason:
auto scolling of jeditorpane
When the us... | It sounds like you're experiencing a layout issue when resizing the components in your Java Swing application. Given that you're using Java 1.4.2, there are some limitations and peculiarities with layout management and component sizing that you need to consider.
Here are a few suggestions to help you manage the resizi... | 40,806 | [
{
"from": "human",
"value": "I am implementing a Comment box facility in my application which user can resize using mouse. This comment box contains a scrollpane which instead contains a JEditorPane in which user can insert comment. I have added the editor pane inside a scroll pane for the following reason:... |
I have set of names and addresses that have been entered into and excel spreadsheet, but the problem is that the many people that entered the addresses entered them in many different non-standard formats. I want to scrub the addresses before transferring all of of them to my database. Looking around, all I really fou... | Yes, there are several free and open-source tools and libraries that can help you scrub and standardize addresses before transferring them to your database. Here are a few options you might consider:
1. **libpostal**:
- **Description**: A C library that can parse and normalize street addresses around the world. It ... | 41,948 | [
{
"from": "human",
"value": "I have set of names and addresses that have been entered into and excel spreadsheet, but the problem is that the many people that entered the addresses entered them in many different non-standard formats. I want to scrub the addresses before transferring all of of them to my da... |
I don't know what commands to enter into the setup.py file when compiling a python program to use my icons. Can anyone help me?
Thanks in advance.
| To include icons or any other non-Python files in a Python package, you'll typically use the `setuptools` library and modify your `setup.py` file accordingly. Below are the steps to set up your `setup.py` file to include icons:
1. **Directory Structure**: Make sure your directory structure is set up correctly. For exa... | 40,349 | [
{
"from": "human",
"value": "I don't know what commands to enter into the setup.py file when compiling a python program to use my icons. Can anyone help me? \nThanks in advance.\n"
},
{
"from": "gpt",
"value": "To include icons or any other non-Python files in a Python package, you'll typically ... |
I've created a .NET solution with two projects:
ToyData (Visual Basic Class Library)
ToyOne (Visual Basic WPF Application)
The ToyData project contains Toy.edmx, an ADO.NET Entity Data Model generated from a database called Toy.
The ToyOne project contains this Window1.xaml.vb file:
1 Imports ToyData
2
3 Clas... | The error you’re encountering suggests that the connection string for your Entity Framework context (`ToyEntities`) is not configured properly in your application. Here are a few things you should check and do to resolve this issue:
### 1. Check Connection String in App.config
Since you are using a WPF application (`... | 42,989 | [
{
"from": "human",
"value": "I've created a .NET solution with two projects:\n\nToyData (Visual Basic Class Library)\nToyOne (Visual Basic WPF Application)\n\nThe ToyData project contains Toy.edmx, an ADO.NET Entity Data Model generated from a database called Toy.\nThe ToyOne project contains this Window1.x... |
I need to implement an WCF WS Addressing enabled web service that performs a long running process based on the method's arguments.
The client does not need to wait for the result, because it will be delivered directly to a database table. However, the web method does need to return a 'tracking id' number (a GUID actua... | Implementing a WCF service that supports WS-Addressing and handles long-running processes can be a bit complex, but I'll guide you through a simplified version of how you could set this up. Below are the basic steps you would take to implement such a service, along with a code sample.
### Step 1: Create a WCF Service
... | 34,610 | [
{
"from": "human",
"value": "I need to implement an WCF WS Addressing enabled web service that performs a long running process based on the method's arguments.\nThe client does not need to wait for the result, because it will be delivered directly to a database table. However, the web method does need to r... |
Hello, I am currently working on the student association's website. The student's association owns a couple of rooms and we want to build an online form which allows a student to book the room for a specific time, and we want to have a timetable to show which times are currently booked.
Thanks a lot!
| That sounds like a great project! Here’s a step-by-step guide to help you create an online room booking system for your student association’s website:
### Step 1: Define Your Requirements
1. **Room Information**:
- List the rooms available for booking.
- Define the maximum capacity for each room.
2. **Booking ... | 36,823 | [
{
"from": "human",
"value": "Hello, I am currently working on the student association's website. The student's association owns a couple of rooms and we want to build an online form which allows a student to book the room for a specific time, and we want to have a timetable to show which times are currently... |
I'm building an ORM library with reuse and simplicity in mind; everything goes fine except that I got stuck by a stupid inheritance limitation. Please consider the code below:
class BaseModel {
/*
* Return an instance of a Model from the database.
*/
static public function get (/* varargs */) {
... | In PHP, the issue you're facing is related to how you can obtain the class name of a calling child class from a static context. When you use `get_class()` within a static method, it returns the class name of the class where that method is defined (which, in your case, is `BaseModel`). You want to get the class name of ... | 41,467 | [
{
"from": "human",
"value": "I'm building an ORM library with reuse and simplicity in mind; everything goes fine except that I got stuck by a stupid inheritance limitation. Please consider the code below:\nclass BaseModel {\n /*\n * Return an instance of a Model from the database.\n */\n stati... |
I'm building an ogre3d tutorial based on this setup
http://www.ogre3d.org/wiki/index.php/SettingUpAnApplication#XCode
I've followed all steps as it says. It compiled perfectly.
But on run this happened:
*-*-* OGRE Initialising
*-*-* Version 1.6.0 (Shoggoth)
Creating resource group Bootstrap
An exception has occurred: O... | It looks like you are running into an issue with OGRE trying to access a resource that should be packaged in `OgreCore.zip`, but it can't find or open it due to an incorrect path. The error message suggests that the application is looking for the zip file at a specific path that includes `/Users/steve/projects/...`, wh... | 41,820 | [
{
"from": "human",
"value": "I'm building an ogre3d tutorial based on this setup\nhttp://www.ogre3d.org/wiki/index.php/SettingUpAnApplication#XCode\nI've followed all steps as it says. It compiled perfectly.\nBut on run this happened:\n*-*-* OGRE Initialising\n*-*-* Version 1.6.0 (Shoggoth)\nCreating resour... |
I have a string, lets say "123|ABC|test|12345|FF" and I want to xor the ascii value of each character and print the result in hex.
What is the simplest way?
| You can achieve this by iterating over each character in the string, obtaining its ASCII value, performing a cumulative XOR operation on these values, and then converting the final result to hexadecimal format. Below is a simple Python script to do this:
```python
def xor_string_to_hex(input_string):
# Initialize ... | 44,633 | [
{
"from": "human",
"value": "I have a string, lets say \"123|ABC|test|12345|FF\" and I want to xor the ascii value of each character and print the result in hex.\nWhat is the simplest way?\n"
},
{
"from": "gpt",
"value": "You can achieve this by iterating over each character in the string, obtai... |
I am trying to run a macro when I double click on Visio shapes.
I want to pass the shape object to the VBA macro so that I could do something in the macro depending on the id of the Shape object.
Is it possible to pass the parameter to VBA macro. If yes, please let me know how?
Thanks.
| Yes, it is possible to run a macro in Visio when you double-click a shape and pass the shape object as a parameter to the VBA macro. You can achieve this by using an event procedure within the Visio environment.
Here’s how you can do it:
### Step 1: Create Your Macro
1. Open Visio and press `ALT + F11` to open the V... | 42,063 | [
{
"from": "human",
"value": "I am trying to run a macro when I double click on Visio shapes. \nI want to pass the shape object to the VBA macro so that I could do something in the macro depending on the id of the Shape object.\nIs it possible to pass the parameter to VBA macro. If yes, please let me know ho... |
I am trying to send an anonymous object over a web service. Is there anyway I can do this without manually creating a class and casting it to that class? Currently its throwing an exception saying Anonymous object could not be serialized.
// Some code has been removed here to simplify the example.
[WebMethod(EnableSess... | In C#, anonymous types are not accessible outside the method where they are created, which is why you're facing issues with serialization in the context of a web service. Instead of using anonymous types, you can define a simple class to encapsulate the properties you need to return. This allows for better clarity and ... | 42,771 | [
{
"from": "human",
"value": "I am trying to send an anonymous object over a web service. Is there anyway I can do this without manually creating a class and casting it to that class? Currently its throwing an exception saying Anonymous object could not be serialized.\n// Some code has been removed here to s... |
Has anyone had any luck customizing the feed animation? Ideally I would like a left-right marquee animation.
Any thoughts would be appreciated.
| Customizing a feed animation to create a left-right marquee effect can be achieved using CSS and JavaScript (or jQuery) depending on your setup. Here's a basic example to help you get started:
### HTML Structure
First, create a basic structure for your feed:
```html
<div class="marquee">
<div class="marquee-conten... | 40,857 | [
{
"from": "human",
"value": "Has anyone had any luck customizing the feed animation? Ideally I would like a left-right marquee animation. \nAny thoughts would be appreciated.\n"
},
{
"from": "gpt",
"value": "Customizing a feed animation to create a left-right marquee effect can be achieved using... |
Microsoft released the source for Oxite, their blogging engine that's intended to help .NET developers learn ASP.NET MVC. They also released the source for the Mix site, which was built with Oxite.
Microsoft says that developers can build applications with Oxite, since it has a lot of built-in features like trackbacks,... | As an AI, I don't have personal preferences or the ability to learn in the same way humans do. However, I can provide insights on using Oxite to learn ASP.NET MVC!
Oxite can be a valuable resource for .NET developers looking to understand the ASP.NET MVC framework. Here are some reasons why it could be useful:
1. **R... | 42,405 | [
{
"from": "human",
"value": "Microsoft released the source for Oxite, their blogging engine that's intended to help .NET developers learn ASP.NET MVC. They also released the source for the Mix site, which was built with Oxite.\nMicrosoft says that developers can build applications with Oxite, since it has a... |
This code is causing a memory leak for me, and I'm not sure why.
[EDIT] Included code from here into question:
#include "src/base.cpp"
typedef std::map<std::string, AlObj*, std::less<std::string>,
gc_allocator<std::pair<const std::string, AlObj*> > > KWARG_TYPE;
AlInt::AlInt(int val) {
this->value = val;
... | The code you provided suggests that you are creating objects in a loop without ever releasing or deleting them. This is indeed a common cause of memory leaks, even if you are using a custom garbage collector (gc) or a specific allocator (gc_allocator). Let’s take a closer look at your setup function and the overall mem... | 40,559 | [
{
"from": "human",
"value": "This code is causing a memory leak for me, and I'm not sure why.\n[EDIT] Included code from here into question:\n#include \"src/base.cpp\"\n\ntypedef std::map<std::string, AlObj*, std::less<std::string>, \n gc_allocator<std::pair<const std::string, AlObj*> > > KWARG_TYPE;\n\nAl... |
I know how to use the DrawImage() method of the Graphics object to copy from a rectangular source region to a rectangular destination region, and how to copy to a paralellogram region defined by a three-element Point[] array.
Is there any way in .NET to copy from a rectangular source region to a 4-sided non-rectangular... | In .NET, the `Graphics.DrawImage()` method supports copying images to a parallelogram defined by three points, but does not support non-rectangular polygons defined by four points or more directly. However, you can achieve this by using a combination of drawing methods available in the `Graphics` class.
To copy from a... | 42,344 | [
{
"from": "human",
"value": "I know how to use the DrawImage() method of the Graphics object to copy from a rectangular source region to a rectangular destination region, and how to copy to a paralellogram region defined by a three-element Point[] array.\nIs there any way in .NET to copy from a rectangular ... |
I want to create a library with a modified version of printf and then call LD_PRELOAD so when my program calls printf it uses my version. Can someone explain to me how to use LD_PRELOAD and if there is a something special I need to do in my code or my library?
| Using `LD_PRELOAD` allows you to load a shared library before any other libraries when running a program. This is particularly useful for overriding existing functions in libraries such as `printf`. Below, I'll guide you through the steps to create a modified version of `printf` and use `LD_PRELOAD` to override the ori... | 37,702 | [
{
"from": "human",
"value": "I want to create a library with a modified version of printf and then call LD_PRELOAD so when my program calls printf it uses my version. Can someone explain to me how to use LD_PRELOAD and if there is a something special I need to do in my code or my library? \n"
},
{
"... |
I have double (or float) variables that might be "empty", as in holding no valid value. How can I represent this condition with the built in types float and double?
One option would be a wrapper that has a float and a boolean, but that can´t work, as my libraries have containers that store doubles and not objects that ... | You have several options to represent "empty" or "invalid" states for `float` or `double` variables in C++. Here are some common approaches:
### 1. Use NaN (Not a Number)
Using `NaN` can be a suitable solution. In C++, you can create a NaN value using the `std::numeric_limits` class. While it's true that NaN has spec... | 39,796 | [
{
"from": "human",
"value": "I have double (or float) variables that might be \"empty\", as in holding no valid value. How can I represent this condition with the built in types float and double?\nOne option would be a wrapper that has a float and a boolean, but that can´t work, as my libraries have contain... |
Is there an equivalent to the Java File method isDirectory() in MFC? I tried using this :
static bool isDirectory(CString &path) {
return GetFileAttributes(path) & FILE_ATTRIBUTE_DIRECTORY;
}
but it doesn't seem to work.
| Yes, your method for checking if a path is a directory in MFC (Microsoft Foundation Classes) is on the right track, but there's a small issue with how you're checking the attributes.
The `GetFileAttributes` function returns a value that can be used to determine the attributes of the specified file or directory. Howeve... | 43,474 | [
{
"from": "human",
"value": "Is there an equivalent to the Java File method isDirectory() in MFC? I tried using this :\n\nstatic bool isDirectory(CString &path) {\n return GetFileAttributes(path) & FILE_ATTRIBUTE_DIRECTORY; \n}\n\nbut it doesn't seem to work.\n"
},
{
"from": "gpt",
"value": "... |
I'm using Crystal Reports in vs2008, so I'm using datasets with procedures to get the data from the db, my escenario is the following:
In the same Crystal Report, I have to show two reports, basically using the sames datasets, and the same database, but they are different queries (have grouping and summing instead)
Is... | In Crystal Reports, you can display multiple reports using the same datasets (or data source) but different queries. Here are a few methods you can consider for your scenario:
### 1. **Subreports:**
Subreports are a common way to include multiple reports within a single Crystal Report. Here’s how you can set it up:
... | 40,310 | [
{
"from": "human",
"value": "I'm using Crystal Reports in vs2008, so I'm using datasets with procedures to get the data from the db, my escenario is the following: \nIn the same Crystal Report, I have to show two reports, basically using the sames datasets, and the same database, but they are different quer... |
I am developing a game for the web. The map of this game will be a minimum of 2000km by 2000km. I want to be able to encode elevation and terrain type at some level of granularity - 100m X 100m for example.
For a 2000km by 2000km map storing this information in 100m2 buckets would mean 20000 by 20000 elements or a ... | When designing a game with a large map where only small sections are actively used or displayed, you can optimize how you store and retrieve terrain and elevation data. Here are several approaches you can consider:
### 1. **Chunking / Tiling**
Instead of storing all 400 million records as individual entries, you can g... | 41,049 | [
{
"from": "human",
"value": "I am developing a game for the web. The map of this game will be a minimum of 2000km by 2000km. I want to be able to encode elevation and terrain type at some level of granularity - 100m X 100m for example. \nFor a 2000km by 2000km map storing this information in 100m2 bucket... |
I have run into an issue with WPF and Commands that are bound to a Button inside the DataTemplate of an ItemsControl. The scenario is quite straight forward. The ItemsControl is bound to a list of objects, and I want to be able to remove each object in the list by clicking a Button. The Button executes a Command, and t... | The issue you are encountering is related to how WPF processes command bindings and their parameters. In WPF, the `CanExecute` method of a command can be called before the `CommandParameter` is set, leading to the `null` value you see. Here are several strategies you can employ to address this issue:
### 1. Use a `Rel... | 40,111 | [
{
"from": "human",
"value": "I have run into an issue with WPF and Commands that are bound to a Button inside the DataTemplate of an ItemsControl. The scenario is quite straight forward. The ItemsControl is bound to a list of objects, and I want to be able to remove each object in the list by clicking a But... |
This may apply to other mobile operating environments than just Symbian... However, the issue is that when changing a text area field I'd like to update a count as I type. This is easy to accomplish in most browsers with something like this on the textarea tag:
onkeyup="document.getElementById('size').innerHTML=this.va... | It sounds like you’re running into the limitations of the event handling in the Symbian mobile browser. Indeed, older mobile browsers often have different behaviors compared to modern desktop and mobile browsers, which can lead to frustrating experiences when trying to implement features that rely on real-time user inp... | 43,693 | [
{
"from": "human",
"value": "This may apply to other mobile operating environments than just Symbian... However, the issue is that when changing a text area field I'd like to update a count as I type. This is easy to accomplish in most browsers with something like this on the textarea tag:\nonkeyup=\"docume... |
I want to develop Java apps, real quick, what IDE should I choose?
| If you want to develop Java applications quickly, there are several Integrated Development Environments (IDEs) that you can consider. Here are the most popular ones:
1. **IntelliJ IDEA**:
- **Pros**: Great for beginners and experienced developers alike, strong code completion, powerful refactoring tools, and excell... | 42,005 | [
{
"from": "human",
"value": "I want to develop Java apps, real quick, what IDE should I choose?\n"
},
{
"from": "gpt",
"value": "If you want to develop Java applications quickly, there are several Integrated Development Environments (IDEs) that you can consider. Here are the most popular ones:\n... |
I'm trying to highlight the search results but I want to include the surrounding text that is limited by the enclosing tags.
So if the $term is "cool" the preg_replace should end up with:
<div><span style="background: #f00">My hair cut so cool!</span></div>
Unfortunately my regex doesn't seem to capture the surroundin... | To achieve the desired result of highlighting a search term while preserving the surrounding text within any HTML tags, you'll need to adjust your regex pattern to ensure that it captures the whole element containing the term and replaces it accordingly.
Given that your requirement is to highlight the search term whil... | 43,421 | [
{
"from": "human",
"value": "I'm trying to highlight the search results but I want to include the surrounding text that is limited by the enclosing tags.\nSo if the $term is \"cool\" the preg_replace should end up with:\n<div><span style=\"background: #f00\">My hair cut so cool!</span></div>\n\nUnfortunatel... |
In LinqToSql, it is lovely easy to load a row, change a column, and submit the changes to the database:
using (MyDataContext wdc = new MyDataContext())
{
Article article = wdc.Article.First(p => p.ID == id);
article.ItemsInStock = itemsinstock;
wdc.SubmitChanges();
}
The only drawback: Article is huge. T... | Yes, in LINQ to SQL, if you want to update a single column without loading the entire object, you can use the `Table<T>` collection's `Attach` method. This allows you to attach a new instance of your entity with just the key and the property you want to update. Then, you can set the `EntityState` to `Modified` for the ... | 43,467 | [
{
"from": "human",
"value": "In LinqToSql, it is lovely easy to load a row, change a column, and submit the changes to the database:\nusing (MyDataContext wdc = new MyDataContext())\n{ \n Article article = wdc.Article.First(p => p.ID == id);\n article.ItemsInStock = itemsinstock;\n wdc.SubmitChang... |
I have written a small app that retrieves data from the National Digital Forecast Database NDFD, and am currently receiving the XML response correctly. I have noticed that although I can use the WSDL2Java tool in order to create the interface in order to request the weather data, when I actually use the interface to g... | When working with SOAP web services, the typical way to handle responses is through generated classes that correspond to the data types defined in the WSDL (Web Services Description Language). The WSDL you are using should define the data structures for the weather data, allowing you to work with objects rather than ra... | 37,317 | [
{
"from": "human",
"value": "I have written a small app that retrieves data from the National Digital Forecast Database NDFD, and am currently receiving the XML response correctly. I have noticed that although I can use the WSDL2Java tool in order to create the interface in order to request the weather dat... |
I need to allow the vertical scrollbar in a multiselect listbox (VB6) however, when the control is disabled, I can't scroll.
I would think there is an API to allow this, but my favorite VB6 site (MVPS VB.NET) does not have a way.
I toyed with pretending it was disabled, and ignore the clicks... but to do that with VB6 ... | In VB6, if you want to allow a vertical scrollbar in a multiselect listbox while keeping the control disabled, you're right that by default, a disabled control doesn't allow any interaction, including scrolling.
To achieve the desired effect, one approach is to keep the ListBox enabled but visually simulate a disabled... | 41,427 | [
{
"from": "human",
"value": "I need to allow the vertical scrollbar in a multiselect listbox (VB6) however, when the control is disabled, I can't scroll.\nI would think there is an API to allow this, but my favorite VB6 site (MVPS VB.NET) does not have a way.\nI toyed with pretending it was disabled, and ig... |
I'm pretty new to HQL (well, nHibernate in general) and am currently building a simple app to learn more about it.
I've run into problems trying to express the following SQL as HQL though, and would be very grateful for any ideas.
Here's the query:
select * from parent p
where p.id in (select p.parentid from child c wh... | Welcome to learning HQL and NHibernate! Let's break down your SQL query and translate it into HQL.
### SQL Explanation
Your SQL query can be broken down into two main parts:
1. You are selecting all records from the `parent` table where the `id` is in a list of parent IDs obtained from the `child` table where `creat... | 43,330 | [
{
"from": "human",
"value": "I'm pretty new to HQL (well, nHibernate in general) and am currently building a simple app to learn more about it.\nI've run into problems trying to express the following SQL as HQL though, and would be very grateful for any ideas.\nHere's the query:\nselect * from parent p\nwhe... |
I'm building a custom web part for SharePoint and I'm trying to use the default styles so when people theme the site, it will theme with it.
I've found a couple of decent sites that show the different styles like:
http://www.sharepointcustomization.com/resources/tipstricks/wss_cssguide.htm
but I'm looking for something... | When building custom web parts for SharePoint, it's important to use the default CSS styles so that your components will respect the site's theming. While the site you've referenced provides some useful information, there are other resources that may be more comprehensive and visually oriented.
Here are a few suggesti... | 41,689 | [
{
"from": "human",
"value": "I'm building a custom web part for SharePoint and I'm trying to use the default styles so when people theme the site, it will theme with it.\nI've found a couple of decent sites that show the different styles like:\nhttp://www.sharepointcustomization.com/resources/tipstricks/wss... |
I've created a Visual Basic WPF Application project that contains Toy.edmx, an ADO.NET Entity Data Model generated from a database called Toy.
Its Window1.xaml.vb file looks like this:
1 Class Window1
2
3 Private Sub Window1_Loaded( _
4 ByVal sender As System.Object, _
5 ByVal e As System.Window... | When working with the Entity Framework in a WPF application, it’s important to understand how LINQ to Entities translates queries into SQL. The problem you're experiencing occurs because LINQ to Entities cannot translate the custom method `IsWashington()` into SQL, as it does not have knowledge of your method.
To exte... | 43,131 | [
{
"from": "human",
"value": "I've created a Visual Basic WPF Application project that contains Toy.edmx, an ADO.NET Entity Data Model generated from a database called Toy.\nIts Window1.xaml.vb file looks like this:\n\n1 Class Window1\n2 \n3 Private Sub Window1_Loaded( _\n4 ByVal sender As Sy... |
I'm trying to gauge the possibility of a patch to WebKit which would allow all rendered graphics to be rendered onto a fully transparent background.
The desired effect is to render web content without any background at all, it should appear to float over the desktop (or whatever is displayed behind the browser window).... | Rendering web content with a fully transparent background is a challenging task, but it's not impossible. You are correct that certain applications, including macOS Dashboard widgets, use similar techniques to achieve transparency. Below are some insights and suggestions that may help you in your quest to implement thi... | 40,929 | [
{
"from": "human",
"value": "I'm trying to gauge the possibility of a patch to WebKit which would allow all rendered graphics to be rendered onto a fully transparent background.\nThe desired effect is to render web content without any background at all, it should appear to float over the desktop (or whateve... |
I have a jar file that has a file named "client.ts" in (when viewing in ZipGenius) "/com/something/messaging". When I do
JarFile jarFile = new JarFile("Client.jar");
JarEntry zipFile = jarFile.getJarEntry("client.ts");
It can't find the "client.ts" file. If I package the file in "/resources/" instead it can find it. ... | The issue you're experiencing with `JarFile.getJarEntry()` not finding "client.ts" likely stems from how you're specifying the path to the entry in the JAR file.
When you're using `jarFile.getJarEntry("client.ts")`, you're searching for an entry at the root level of the JAR file. However, since "client.ts" is located... | 41,816 | [
{
"from": "human",
"value": "I have a jar file that has a file named \"client.ts\" in (when viewing in ZipGenius) \"/com/something/messaging\". When I do \nJarFile jarFile = new JarFile(\"Client.jar\");\nJarEntry zipFile = jarFile.getJarEntry(\"client.ts\");\n\nIt can't find the \"client.ts\" file. If I pac... |
I want to style the last TD in a table without using a CSS class on the particular TD.
<table>
<tbody>
<tr>
<td>One</td>
<td>Two</td>
<td>Three</td>
<td>Four</td>
<td>Five</td>
</tr>
</tbody>
</table>
table td
{
border: 1px solid black;
}
I want the TD containing the text... | To style the last `<td>` in your table without using a CSS class, you can use the `:last-child` pseudo-class selector. Here's how you can achieve that:
```html
<table>
<tbody>
<tr>
<td>One</td>
<td>Two</td>
<td>Three</td>
<td>Four</td>
<td>Five</td>
</tr>
</tbody>
</table>
<s... | 44,415 | [
{
"from": "human",
"value": "I want to style the last TD in a table without using a CSS class on the particular TD.\n<table>\n <tbody>\n <tr>\n <td>One</td>\n <td>Two</td>\n <td>Three</td>\n <td>Four</td>\n <td>Five</td>\n </tr>\n </tbody>\n</table>\n\ntable td \n{ \n borde... |
I have created a VB.Net lending application for a cooperative that caters to widows. The application tracks the members' loans and payments, and is also used as an accounting system. In my first release, the users felt that showing a messagebox every time an error occurs is very annoying. My solution is to output error... | It's great that you've taken user feedback into account and made adjustments to your VB.Net lending application. However, using a label control to display errors could have its own set of issues. Here are some considerations and alternative approaches that might improve the user experience while providing the necessary... | 42,659 | [
{
"from": "human",
"value": "I have created a VB.Net lending application for a cooperative that caters to widows. The application tracks the members' loans and payments, and is also used as an accounting system. In my first release, the users felt that showing a messagebox every time an error occurs is very... |
In the setup method to a JUnit test case I'm working on I need it to run a sql script on my database before each test case, and then a rollback afterwards.
I have tried using a tokenizer, which added each SQL command to a batch and then executing them. But I can't get working.
So my question is if there is some standar... | In JUnit, there isn’t a built-in standard method specifically for executing SQL scripts and handling rollback directly, but you can achieve this functionality by using transaction management in conjunction with a framework like Spring. Here’s a common approach that you can use with JUnit, Spring, and a database:
### U... | 41,892 | [
{
"from": "human",
"value": "In the setup method to a JUnit test case I'm working on I need it to run a sql script on my database before each test case, and then a rollback afterwards.\nI have tried using a tokenizer, which added each SQL command to a batch and then executing them. But I can't get working.\... |
I have an onclick handler for an <a> element (actually, it's a jQuery-created handler, but that's not important). It looks like this:
function handleOnClick() {
if(confirm("Are you sure?")) {
return handleOnClickConfirmed();
}
return false;
}
From this function, the this object is accessable as th... | To ensure that `handleOnClickConfirmed` retains the same `this` context as `handleOnClick`, you can use the `bind` method, which creates a new function with a specified `this` value. Here’s how you can modify your existing function:
```javascript
function handleOnClick() {
if(confirm("Are you sure?")) {
//... | 41,351 | [
{
"from": "human",
"value": "I have an onclick handler for an <a> element (actually, it's a jQuery-created handler, but that's not important). It looks like this:\nfunction handleOnClick() {\n if(confirm(\"Are you sure?\")) {\n return handleOnClickConfirmed();\n }\n return false;\n}\n\nFrom... |
I'm hearing that some people believe storing info on the server in a session is a bad idea, that its not secure.
As a result, in a multi-page business process function, the application is writing data to a db, then retrieving the info when its needed.
Is there something necessarily unsafe about storing private info in ... | Storing sensitive information in a session is a common practice in web development, and when done correctly, it can be secure. However, there are potential risks and considerations that you should be aware of. Here’s a breakdown of the concerns and best practices regarding session storage:
### Security Concerns
1. **... | 40,807 | [
{
"from": "human",
"value": "I'm hearing that some people believe storing info on the server in a session is a bad idea, that its not secure.\nAs a result, in a multi-page business process function, the application is writing data to a db, then retrieving the info when its needed.\nIs there something necess... |
This piece of T-SQL is deprecated in 2005:
BACKUP LOG [DB_NAME] WITH TRUNCATE_ONLY
I don't need to keep a backup the log for my db - but I do not want the piece of code to stop working if we port to SQL2008 or successive versions in future.
Cheers
| To address your need while avoiding the deprecated command `BACKUP LOG [DB_NAME] WITH TRUNCATE_ONLY`, you can use the `DBCC SHRINKFILE` command to effectively remove inactive portions of the transaction log without creating a backup. However, keep in mind that this doesn't replace the need for proper log backups if you... | 40,779 | [
{
"from": "human",
"value": "This piece of T-SQL is deprecated in 2005:\nBACKUP LOG [DB_NAME] WITH TRUNCATE_ONLY\n\nI don't need to keep a backup the log for my db - but I do not want the piece of code to stop working if we port to SQL2008 or successive versions in future.\nCheers\n"
},
{
"from": "g... |
I have a WSDL file defining the interface for a web service and I want to implement that service (i.e. producer/server code) using C#, ASP.Net and Visual Studio 2005. Setting up a Web Reference as consumer of a web service is a breeze, but as a producer isn't as obvious.
In the java world there is wsdltojava. Is there ... | Yes, in the .NET world, there is a similar tool called "wsdl.exe" that you can use to generate server-side code from a WSDL file. However, in Visual Studio 2005, the process of creating a web service based on a WSDL file might not be as straightforward as in some other environments. Below are the steps to implement a w... | 40,756 | [
{
"from": "human",
"value": "I have a WSDL file defining the interface for a web service and I want to implement that service (i.e. producer/server code) using C#, ASP.Net and Visual Studio 2005. Setting up a Web Reference as consumer of a web service is a breeze, but as a producer isn't as obvious.\nIn the... |
Every time I start Visual Studio 2008, the first time I try to run the project I get the error CS0006 The metadata file ... could not be found. If I do a rebuild of the complete solution it works.
Some information about the solution:
I'm building in debug mode and Visual Studio complains about not finding dll:s in the... | The issue you're experiencing with the "CS0006: The metadata file ... could not be found" error typically arises when Visual Studio tries to build a project before its dependencies have been successfully built. Since you mentioned that you have multiple projects in your solution, this is likely a problem with the proje... | 41,197 | [
{
"from": "human",
"value": "Every time I start Visual Studio 2008, the first time I try to run the project I get the error CS0006 The metadata file ... could not be found. If I do a rebuild of the complete solution it works.\nSome information about the solution:\n\nI'm building in debug mode and Visual Stu... |
I'm now to this point of my project that I need to design my database (Oracle).
Usually for the status and countries tables I don’t use a numeric primary key, for example
STATUS (max 6)
AC --> Active
DE --> Deleted
COUNTRIES (total 30)
UK --> United Kingdom
IT --> Italy
GR --> Greece
These tables are static, not upda... | Using VARCHAR(2) as primary keys for your STATUS and COUNTRIES tables is a valid design choice, especially considering your use case where these tables are static and unlikely to change. However, there are several factors to consider regarding performance when querying with joins, especially with your large dataset.
#... | 39,085 | [
{
"from": "human",
"value": "I'm now to this point of my project that I need to design my database (Oracle).\nUsually for the status and countries tables I don’t use a numeric primary key, for example\nSTATUS (max 6)\nAC --> Active\nDE --> Deleted\n\nCOUNTRIES (total 30)\nUK --> United Kingdom\nIT --> Italy... |
I have the following input:
<node TEXT="txt">
<node TEXT="txt">
<node TEXT="txt"/>
<node TEXT="txt"/>
</node>
<node TEXT="txt"/>
</node>
<node TEXT="txt"/>
I am currently using:
<xsl:number level="multiple" count="node" format="1"/>
within an XSTL script to receive the following output:
1 txt
1.1 txt
1.... | To achieve the desired output using XSLT, you can define a recursive template that creates a list structure based on the depth of the nodes. Here is an example of how you can implement this:
```xml
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" />
<!-... | 39,140 | [
{
"from": "human",
"value": "I have the following input:\n<node TEXT=\"txt\">\n <node TEXT=\"txt\">\n <node TEXT=\"txt\"/>\n <node TEXT=\"txt\"/>\n </node>\n <node TEXT=\"txt\"/>\n</node>\n<node TEXT=\"txt\"/>\n\nI am currently using:\n<xsl:number level=\"multiple\" count=\"node\" format=\"1\"/>\n\... |
I've got a JDialog which contains a series of JPanels in a CardLayout. Some of these panels contain JTables which I would like to be resized in line with any resizing of the JDialog. I am not sure how to achieve this and any help would be greatly appreciated.
At present the tables simply remain their current size and... | To achieve resizing of `JTable` components inside a `JDialog` that uses a `CardLayout`, you need to ensure that the layout manager and the components are set up to allow for resizing. The `CardLayout` itself does not provide automatic resizing of its components; however, by managing the layout of the component within e... | 34,339 | [
{
"from": "human",
"value": "I've got a JDialog which contains a series of JPanels in a CardLayout. Some of these panels contain JTables which I would like to be resized in line with any resizing of the JDialog. I am not sure how to achieve this and any help would be greatly appreciated. \nAt present the t... |
I'm having an issue with CruiseControl.net where the web dashboard just won't work in IIS. I have tried switching ASP.Net between 64 and 32 bit modes and reinstalling cruise control, but nothing seems to work. Has anyone else had issues with CruiseControl.Net on 64 bit platforms?
Cheers,
Jamie
[Edit]
Thought I should c... | It sounds like you're dealing with a common issue when running CruiseControl.NET in an IIS environment, especially on a 64-bit platform. A 404 error can occur for various reasons, so let's go through some troubleshooting steps to see if we can resolve the issue:
### 1. Check IIS Configuration
Make sure your IIS config... | 40,003 | [
{
"from": "human",
"value": "I'm having an issue with CruiseControl.net where the web dashboard just won't work in IIS. I have tried switching ASP.Net between 64 and 32 bit modes and reinstalling cruise control, but nothing seems to work. Has anyone else had issues with CruiseControl.Net on 64 bit platforms... |
Edit:
Of course my real code doesn't look exactly like this. I tried to write semi-pseudo code to make it more clear of whay I wanted to do.
Looks like it just messed things up instead.
So, what I actually would like to do is this:
Method<Interface1>();
Method<Interface2>();
Method<Interface3>();
...
Well ... I though... | To achieve what you're trying to do, you can use reflection to invoke your generic method with each interface type you find in a specified namespace. Since C# doesn't allow using a variable directly as a type argument for a generic method, you'll need to use `MethodInfo` to call the method dynamically.
Here's an examp... | 41,896 | [
{
"from": "human",
"value": "Edit:\nOf course my real code doesn't look exactly like this. I tried to write semi-pseudo code to make it more clear of whay I wanted to do.\nLooks like it just messed things up instead.\nSo, what I actually would like to do is this:\nMethod<Interface1>();\nMethod<Interface2>()... |
During our build process we run aspnet_compiler.exe against our websites to make sure that all the late-bound stuff in ASP.NET/MVC actually builds (I know nothing about ASP.NET but am assured this is necessary to prevent finding the failures at runtime).
Our sites are fairly large in size, with a few hundred pages/view... | Pre-compiling large ASP.NET applications can indeed be slow, particularly when using the `aspnet_compiler.exe`. Here are some factors that could contribute to the slow performance you're experiencing, as well as some suggestions to potentially speed up the process:
### Factors Contributing to Slow Performance
1. **Co... | 40,453 | [
{
"from": "human",
"value": "During our build process we run aspnet_compiler.exe against our websites to make sure that all the late-bound stuff in ASP.NET/MVC actually builds (I know nothing about ASP.NET but am assured this is necessary to prevent finding the failures at runtime).\nOur sites are fairly la... |
I'm compiling some MATLAB functions into a C DLL. The exported mlf functions return a boolean value representing whether the function succeeded or not. When the return value is false, I want to find out the error information. I couldn't find a way to do that! (other than compiling and exporting the lasterror() function... | In the context of compiling MATLAB functions into a C DLL, you typically do not have direct access to the error management facilities of MATLAB from C. When you call MATLAB functions from C and they return false, indicating an error, you need a way to retrieve the error information.
As you mentioned, one common approa... | 42,104 | [
{
"from": "human",
"value": "I'm compiling some MATLAB functions into a C DLL. The exported mlf functions return a boolean value representing whether the function succeeded or not. When the return value is false, I want to find out the error information. I couldn't find a way to do that! (other than compili... |
I have a console application. In XP, I can use SetConsoleCtrlHandler() to register a callback that receives CTRL_LOGOFF_EVENT, CTRL_C_EVENT and a few others. It works great. When the callback is called I can cleanup before I return from the call. Problem is, SetConsoleCtrlHanlder() is not supported in Vista. Now wha... | The function `SetConsoleCtrlHandler()` is indeed supported in Windows Vista, as well as in Windows XP. You might be confused about its compatibility, but it works correctly across multiple versions of Windows, including Vista, 7, 8, 10, and later versions.
If you're experiencing issues with it, make sure you're check... | 42,462 | [
{
"from": "human",
"value": "I have a console application. In XP, I can use SetConsoleCtrlHandler() to register a callback that receives CTRL_LOGOFF_EVENT, CTRL_C_EVENT and a few others. It works great. When the callback is called I can cleanup before I return from the call. Problem is, SetConsoleCtrlHanld... |
I have a table in Access 2003 VBA with 164 columns but the data I get has 181 column and it is possible that it will get bigger in the future.
I need to know how to resize my table an to add extra colums during the runtime
I know how to check how many colums I need so I just need to know how to resize my own table.
th... | In Access VBA, you can dynamically add columns to a table using the `ALTER TABLE` SQL statement. Here's how you can resize your table and add extra columns during runtime:
1. **Determine the Columns to Add**: First, you need to determine how many and what type of columns you need to add to your existing table. You men... | 40,887 | [
{
"from": "human",
"value": "I have a table in Access 2003 VBA with 164 columns but the data I get has 181 column and it is possible that it will get bigger in the future.\nI need to know how to resize my table an to add extra colums during the runtime \nI know how to check how many colums I need so I just ... |
What is and how can it be used in C#.
Can you use the same concept in Python/Perl?
| It seems like your question may be missing a specific concept to discuss in C#. However, I'll provide an overview of a few common programming concepts that are relevant to C# and can also be applied in Python and Perl.
### 1. Object-Oriented Programming (OOP)
**C# Usage:**
C# is a fully object-oriented language that ... | 39,444 | [
{
"from": "human",
"value": "What is and how can it be used in C#.\nCan you use the same concept in Python/Perl?\n"
},
{
"from": "gpt",
"value": "It seems like your question may be missing a specific concept to discuss in C#. However, I'll provide an overview of a few common programming concepts... |
There is a number of commercial products out there, that give you a windows based installers for configuring your app and the back end SQL Server DB. Typically it will ask if you want to connect to the DB with Windows or SQL Server authentication. Most of them make a recommendation to use Windows Auth and then configur... | Using Windows Authentication for connecting to SQL Server is indeed more secure than using SQL Server Authentication. However, the specific configuration of granting the `Network Service` account `db_owner` rights poses some inherent risks and considerations that need to be addressed for a production environment.
### ... | 40,768 | [
{
"from": "human",
"value": "There is a number of commercial products out there, that give you a windows based installers for configuring your app and the back end SQL Server DB. Typically it will ask if you want to connect to the DB with Windows or SQL Server authentication. Most of them make a recommendat... |
<document.write("<SCR"+"IPT TYPE='text/javascript' SRC='"+"http"+(window.location.protocol.indexOf('https:')==0?'s':'')+"://"+gDomain+"/"+gDcsId+"/wtid.js"+"'><\/SCR"+"IPT>");
I need to escape the string above in order to add the whole thing to a StringBuilder but so far I must be missing something because string term... | To properly escape the JavaScript code so that you can include it in a `StringBuilder`, you'll need to escape any double quotes, backslashes, and newlines as necessary.
Here's how you can do it in C#:
```csharp
StringBuilder sb = new StringBuilder();
sb.Append("<document.write(\"<SCR\" + \"IPT TYPE='text/javascript'... | 44,780 | [
{
"from": "human",
"value": "<document.write(\"<SCR\"+\"IPT TYPE='text/javascript' SRC='\"+\"http\"+(window.location.protocol.indexOf('https:')==0?'s':'')+\"://\"+gDomain+\"/\"+gDcsId+\"/wtid.js\"+\"'><\\/SCR\"+\"IPT>\");\n\nI need to escape the string above in order to add the whole thing to a StringBuilde... |
I want to select records that are 1 month old or newer.
The query is: SELECT * FROM foobar WHERE created_at > DATE_SUB(curdate(), INTERVAL 1 MONTH)
Using Propel in Symfony, I do:
$c = new Criteria
$c->add(FoobarPeer::CREATED_AT, "DATE_SUB(curdate(), INTERVAL 1 MONTH)", Criteria::GREATER_THAN);
What Propel generat... | In Propel, when you want to execute a SQL function like `DATE_SUB()` in a criteria query, you have to be aware that Propel does not directly parse MySQL functions in the way you are attempting. Instead, you can use the `Criteria::CUSTOM` option, but there are also other ways to achieve your desired functionality withou... | 43,130 | [
{
"from": "human",
"value": "I want to select records that are 1 month old or newer.\nThe query is: SELECT * FROM foobar WHERE created_at > DATE_SUB(curdate(), INTERVAL 1 MONTH)\nUsing Propel in Symfony, I do:\n\n$c = new Criteria\n $c->add(FoobarPeer::CREATED_AT, \"DATE_SUB(curdate(), INTERVAL 1 MONTH)\",... |
I am looking for a way to slide a UIPickerView (and UIDatePickerView) up over a view (UITableView in particular) when a particular button press takes place.
I understand how to get the events for clicks into the UITableView, but there doesn't seem to be a good way to have the UIPickerView slide up on top of it...
All t... | To achieve the effect of sliding a `UIPickerView` or `UIDatePicker` up over a `UITableView` when a button is pressed, you can use animations along with updating the frame of the picker view or using constraints if you are working with Auto Layout.
Here’s a step-by-step approach to implement this:
### Step 1: Setting ... | 40,151 | [
{
"from": "human",
"value": "I am looking for a way to slide a UIPickerView (and UIDatePickerView) up over a view (UITableView in particular) when a particular button press takes place.\nI understand how to get the events for clicks into the UITableView, but there doesn't seem to be a good way to have the U... |
Hopefully (but not necessarily) one that is independent of language or framework?
| It sounds like you're looking for a general programming or software development principle or concept that can be applied across various languages and frameworks. Here are a few such principles that are widely recognized:
1. **DRY (Don't Repeat Yourself)**: This principle encourages reducing code duplication. Instead o... | 42,061 | [
{
"from": "human",
"value": "Hopefully (but not necessarily) one that is independent of language or framework?\n"
},
{
"from": "gpt",
"value": "It sounds like you're looking for a general programming or software development principle or concept that can be applied across various languages and fr... |
I've heard that you need to get a Mac if you want to develop iPhone apps. Is this true?
Is it possible to develop iPhone apps using Linux? If yes, what do I need and where do I download the necessary tools?
| Yes, traditionally, developing iPhone apps requires a Mac. This is primarily because Apple's official development environment, Xcode, is only available for macOS. Xcode includes all the tools needed to develop, test, and submit apps to the App Store.
However, it is technically possible to develop iPhone apps using Lin... | 41,563 | [
{
"from": "human",
"value": "I've heard that you need to get a Mac if you want to develop iPhone apps. Is this true? \nIs it possible to develop iPhone apps using Linux? If yes, what do I need and where do I download the necessary tools?\n"
},
{
"from": "gpt",
"value": "Yes, traditionally, devel... |
When trying to compile a file that include winnt.h via windows.h, I get the following error:
MyGl.cpp
..\microsoft sdks\windows\v6.0a\include\winnt.h(964) : error C2988: unrecognizable template declaration/definition
..\microsoft sdks\windows\v6.0a\include\winnt.h(964) : error C2059: syntax error : '&'
They point to t... | The error messages you are encountering suggest that the compiler is having trouble interpreting the template declaration within the `winnt.h` file. This typically happens due to a few possible reasons, particularly concerning the environment configuration or the way the preprocessor directives are defined.
Here are s... | 40,631 | [
{
"from": "human",
"value": "When trying to compile a file that include winnt.h via windows.h, I get the following error:\nMyGl.cpp\n..\\microsoft sdks\\windows\\v6.0a\\include\\winnt.h(964) : error C2988: unrecognizable template declaration/definition\n..\\microsoft sdks\\windows\\v6.0a\\include\\winnt.h(9... |
Im adding textboxes (not a fixed number of textboxes) dynamically to a form on ASP.NET page, how do i read back data from these textboxes?
| When adding textboxes dynamically in an ASP.NET web form, it's important to handle the data correctly when the page posts back. Since dynamically added controls are not part of the page's control tree during the initial rendering, you'll need to recreate them on every postback in order to access their values. Here's ho... | 38,676 | [
{
"from": "human",
"value": "Im adding textboxes (not a fixed number of textboxes) dynamically to a form on ASP.NET page, how do i read back data from these textboxes?\n"
},
{
"from": "gpt",
"value": "When adding textboxes dynamically in an ASP.NET web form, it's important to handle the data cor... |
My client gets a sec_error_unknown_issuer error message when visiting https://mediant.ipmail.nl with Firefox.
I can't reproduce the error myself. I installed FF on a Vista and a XP machine and had no problems. FF on Ubuntu also works fine.
Does anyone get the same error and does anyone have some clues for me so I can t... | The `SEC_ERROR_UNKNOWN_ISSUER` error in Firefox typically indicates that the browser does not recognize the certificate issuer, which usually happens due to a few possible reasons. Here are some steps you can take to investigate and resolve the issue:
1. **Certificate Chain**: Ensure that the complete certificate chai... | 42,355 | [
{
"from": "human",
"value": "My client gets a sec_error_unknown_issuer error message when visiting https://mediant.ipmail.nl with Firefox.\nI can't reproduce the error myself. I installed FF on a Vista and a XP machine and had no problems. FF on Ubuntu also works fine.\nDoes anyone get the same error and do... |
If a line of text is wrapped to an additional line, how do I determine programmatically the point in the string where it was broken.
Example: Input string = "This is a test of a wrapped line of text".
Based on the width of the richTextBox it could display:
This is a test of a wrapped line of
... | Determining where a line of text is wrapped in a `RichTextBox` can be tricky, especially since the content of the `RichTextBox` is often rendered based on its layout properties, font styles, and more. To programmatically find the wrapped point in a string, you can follow a method using the `FormattedText` class in WPF ... | 39,996 | [
{
"from": "human",
"value": "If a line of text is wrapped to an additional line, how do I determine programmatically the point in the string where it was broken.\nExample: Input string = \"This is a test of a wrapped line of text\".\n Based on the width of the richTextBox it could display:\n\n\n ... |
I've been asked to measure the performance of a fortran program that solves differential equations on a multi-CPU system. My employer insists that I measure FLOP/s (Floating operations per second) and compare the results with benchmarks (LINPACK) but I am not convinced that it's the way to go, simply because no one can... | A Floating Point Operation (FLOP) is indeed often defined as a single operation that involves floating-point arithmetic, typically including basic operations such as addition, subtraction, multiplication, and division. In many contexts, especially in high-performance computing (HPC), a common simplification is to consi... | 41,226 | [
{
"from": "human",
"value": "I've been asked to measure the performance of a fortran program that solves differential equations on a multi-CPU system. My employer insists that I measure FLOP/s (Floating operations per second) and compare the results with benchmarks (LINPACK) but I am not convinced that it's... |
I've never actually used greasemonkey, but I was considering using it.
Considering that GreaseMonkey allows you to let random people on the Internet change the behavior of your favorite websites, how safe can it be?
Can they steal my passwords? Look at my private data? Do things I didn't want to do?
How safe is Greasem... | Greasemonkey is a popular userscript manager for Firefox that allows users to install scripts that modify the behavior and appearance of web pages. While it offers powerful customization options, there are some safety and security considerations to keep in mind when using it:
### Security Risks:
1. **Malicious Scripts... | 43,417 | [
{
"from": "human",
"value": "I've never actually used greasemonkey, but I was considering using it.\nConsidering that GreaseMonkey allows you to let random people on the Internet change the behavior of your favorite websites, how safe can it be?\nCan they steal my passwords? Look at my private data? Do thin... |
I want to integrate some existing Perl code with ASP.NET. I see plenty examples of accessing Perl from .NET but nothing on the reverse. Has anyone had any experience attempting to do this or does everyone just recreate their existing Perl functionality in one fell swoop?
For more detail, I have some functionality alrea... | Integrating existing Perl code with an ASP.NET application can be a challenging task, but it is feasible. Here are some strategies to achieve this, allowing you to leverage your existing Perl functionality while maintaining the ASP.NET environment.
### Options for Integration:
1. **Using CGI (Common Gateway Interface... | 38,941 | [
{
"from": "human",
"value": "I want to integrate some existing Perl code with ASP.NET. I see plenty examples of accessing Perl from .NET but nothing on the reverse. Has anyone had any experience attempting to do this or does everyone just recreate their existing Perl functionality in one fell swoop?\nFor mo... |
We have a dotnet web service that a java using customer wants to connect to. What is the best technology for them to use? Axis or Metro, or something else?
| When a Java client needs to connect to a .NET web service, there are several technologies available to facilitate the integration. The choice between Axis, Metro, or other options depends on a few factors, including the specific web service protocol being used (SOAP or REST), ease of use, and compatibility with the .NE... | 37,822 | [
{
"from": "human",
"value": "We have a dotnet web service that a java using customer wants to connect to. What is the best technology for them to use? Axis or Metro, or something else?\n"
},
{
"from": "gpt",
"value": "When a Java client needs to connect to a .NET web service, there are several... |
I want to offload a block of code in my main process to child process to make it run concurrently. I also want to have the PID of the spawned child process so I can monitor and kill it if necessary.
| To offload a block of code to a child process in Python and ensure that you can monitor and control that child process, you can use the `multiprocessing` module. This module allows you to create new processes, and you can easily obtain the PID of the child process for monitoring and control.
Below is an example that d... | 43,396 | [
{
"from": "human",
"value": "I want to offload a block of code in my main process to child process to make it run concurrently. I also want to have the PID of the spawned child process so I can monitor and kill it if necessary.\n"
},
{
"from": "gpt",
"value": "To offload a block of code to a chi... |
What is the maxiimum boost factor value for a word in Lucene.Net?
I believe default value is 1.0f
Thanks!
| In Lucene.Net, the maximum boost factor for a word or term is not explicitly defined in the documentation, and there is no hard-coded maximum value imposed by the library itself. You can set the boost factor to any positive float value, but in practice, extremely high values may lead to unrealistic scoring and ranking ... | 45,015 | [
{
"from": "human",
"value": "What is the maxiimum boost factor value for a word in Lucene.Net?\nI believe default value is 1.0f\nThanks!\n"
},
{
"from": "gpt",
"value": "In Lucene.Net, the maximum boost factor for a word or term is not explicitly defined in the documentation, and there is no har... |
Dendrogram is not a regular diagram. Should I use any component from javax.swing.* library, or just draw it with java.awt.Graphics?
| To create a dendrogram in a Java application, you can choose between using Java's AWT (Abstract Window Toolkit) for custom drawing using `Graphics` or leveraging Swing components from the `javax.swing` library. The choice depends on your specific requirements and preferences. Here's a brief overview of both approaches:... | 39,252 | [
{
"from": "human",
"value": "Dendrogram is not a regular diagram. Should I use any component from javax.swing.* library, or just draw it with java.awt.Graphics?\n"
},
{
"from": "gpt",
"value": "To create a dendrogram in a Java application, you can choose between using Java's AWT (Abstract Window... |
Does anyone know how to disable authenticode signature verification in a .NET executable (to avoid slow startup) without using an application config file? In other words, do this:
<configuration>
<runtime>
<generatePublisherEvidence enabled="false"/>
</runtime>
</configuration>
without an app.config. I... | Disabling Authenticode signature verification in a .NET application without using an application configuration file is not supported directly by the .NET runtime. The `<generatePublisherEvidence enabled="false"/>` setting in the application configuration file allows you to disable publisher evidence generation, which c... | 42,098 | [
{
"from": "human",
"value": "Does anyone know how to disable authenticode signature verification in a .NET executable (to avoid slow startup) without using an application config file? In other words, do this:\n<configuration>\n <runtime>\n <generatePublisherEvidence enabled=\"false\"/>\n </runt... |
I would like to create a simple program (in Java) which edits text files - particularly one which performs inserting arbitrary pieces of text at random positions in a text file. This feature is part of a larger program I am currently writing.
Reading the description about java.util.RandomAccessFile, it appears that any... | To insert text into a file without overwriting the existing content, you can use a two-step approach in Java. Since inserting text requires shifting the existing content, you'll read the original content, perform the insertion, and then write the modified content back to the file.
Here’s a simple example of how you ca... | 40,487 | [
{
"from": "human",
"value": "I would like to create a simple program (in Java) which edits text files - particularly one which performs inserting arbitrary pieces of text at random positions in a text file. This feature is part of a larger program I am currently writing.\nReading the description about java.... |
Writing a python script and it needs to find out what language a block of code is written in. I could easily write this myself, but I'd like to know if a solution already exists.
Pygments is insufficient and unreliable.
| If Pygments isn't meeting your needs for language detection, there are several other libraries and approaches you can explore to determine the programming language of a block of code:
1. **Language Detection Libraries**:
- **Guesslang**: This is a Python package that can guess the programming language of a code sni... | 41,925 | [
{
"from": "human",
"value": "Writing a python script and it needs to find out what language a block of code is written in. I could easily write this myself, but I'd like to know if a solution already exists.\nPygments is insufficient and unreliable.\n"
},
{
"from": "gpt",
"value": "If Pygments i... |
Is it possible to do a "C like" fork in java, using an new independent jvm process ?
How?
| In Java, you cannot directly create a process that behaves like the `fork` system call in C, where a child process is created as a duplicate of the parent process with a separate memory space. However, you can achieve similar behavior by starting a new independent Java Virtual Machine (JVM) process using the `ProcessBu... | 41,456 | [
{
"from": "human",
"value": "Is it possible to do a \"C like\" fork in java, using an new independent jvm process ?\nHow?\n"
},
{
"from": "gpt",
"value": "In Java, you cannot directly create a process that behaves like the `fork` system call in C, where a child process is created as a duplicate... |
This is something that made me doubt for a while so I thought it would be a good idea to post it here to find some insight, it's a relational database modeling problem/doubt
I have the following problem:
I have "questions" that must be in an specific "state", and all changes of state must be audited.
I've found two sol... | It sounds like you're considering how to design a relational database schema to track the state of questions and the auditing of state changes. Given your description, there are a couple of potential approaches (Option A and Option B, as you mentioned) to model this.
Here’s a breakdown of the two approaches, based on ... | 41,366 | [
{
"from": "human",
"value": "This is something that made me doubt for a while so I thought it would be a good idea to post it here to find some insight, it's a relational database modeling problem/doubt\nI have the following problem:\nI have \"questions\" that must be in an specific \"state\", and all chang... |
Is there anything we can do either in code (ASP/JavaScript) or in Excel so that the comma separated values end up in separate columns in Excel?
| Yes, you can achieve this in both Excel and via code (ASP/JavaScript) by ensuring that the data is structured correctly when imported or processed. Below are methods for both scenarios:
### Method 1: Using Excel Features
If you have a list of comma-separated values in a single cell in Excel and you want to split them ... | 40,509 | [
{
"from": "human",
"value": "Is there anything we can do either in code (ASP/JavaScript) or in Excel so that the comma separated values end up in separate columns in Excel?\n"
},
{
"from": "gpt",
"value": "Yes, you can achieve this in both Excel and via code (ASP/JavaScript) by ensuring that the... |
My current code is this:
int volume = Alert.getVolume(); // reads 100
Alert.setVolume(0);
It DOESN'T change the volume setting, like it would be supposed to do
Even calling Alert.mute(true); doesn't produce any good effect.
Audio.setVolume(0); also doesn't work!
I am running this on a Curve 8310. I have another softw... | It seems like you're trying to control the volume on a BlackBerry Curve 8310, but your current approach isn't working as expected. Here are a few things you might want to consider or try out:
1. **Permissions**: Make sure that your application has the necessary permissions to modify system settings like volume. Check ... | 40,610 | [
{
"from": "human",
"value": "My current code is this:\nint volume = Alert.getVolume(); // reads 100\nAlert.setVolume(0);\n\nIt DOESN'T change the volume setting, like it would be supposed to do \nEven calling Alert.mute(true); doesn't produce any good effect.\nAudio.setVolume(0); also doesn't work!\nI am ru... |
Yes, like those pretty buttons on the iPhone. ;)
I've been searching and reading for days now and everytime I find something that will get me close (like CreateRoundRectRgn), it blows up because Windows Mobile 6 GDI+ doesn't support it.
I can do the whole owner draw thing and such. But how do I curve those hard corn... | Creating rounded buttons in Windows Mobile 6 using native Win32 APIs can be a bit tricky since you're limited in terms of graphics capabilities, especially when GDI+ isn't available. However, you can still achieve rounded buttons through a combination of custom drawing and managing bitmaps.
Here’s a step-by-step appro... | 40,476 | [
{
"from": "human",
"value": "Yes, like those pretty buttons on the iPhone. ;)\nI've been searching and reading for days now and everytime I find something that will get me close (like CreateRoundRectRgn), it blows up because Windows Mobile 6 GDI+ doesn't support it.\nI can do the whole owner draw thing an... |
I can query the AD and find all the IIS sites and their virtual directories, now I need to be able to update those home directories and save the changes.
After I fetch the directory entry I can display the site path using $site.Path, however setting it doesn't seem to have any effect. It never changes the actual store... | To update the home directory of an IIS site using PowerShell and ADSI, you need to ensure you are modifying the correct property and calling the appropriate method for committing changes. In IIS, the home directory of an application or website is typically set through the `PhysicalPath` property, not `Path`.
Here's ho... | 42,611 | [
{
"from": "human",
"value": "I can query the AD and find all the IIS sites and their virtual directories, now I need to be able to update those home directories and save the changes.\nAfter I fetch the directory entry I can display the site path using $site.Path, however setting it doesn't seem to have any ... |
I'm looking for a bare bones simple example C app for unpacking a zip file using zlib. It must support fairly new version of .zip and must have source right down to the zlib calls.
| Certainly! Below is a simple example of a C application that uses the `zlib` library to unpack a `.zip` file. This example demonstrates how to read a `.zip` file, extract its contents, and handle basic `.zip` structures. Note that while `zlib` can handle decompression, it doesn't natively handle the ZIP file format its... | 39,748 | [
{
"from": "human",
"value": "I'm looking for a bare bones simple example C app for unpacking a zip file using zlib. It must support fairly new version of .zip and must have source right down to the zlib calls.\n"
},
{
"from": "gpt",
"value": "Certainly! Below is a simple example of a C applicati... |
I've been seeing that expression for over 10 years now. I've been trying to think what it's good for. Since I see it mostly in #defines, I assume it's good for inner scope variable declaration and for using breaks (instead of gotos.)
Is it good for anything else? Do you use it?
| The expression you're referring to sounds like the use of the "compound statement" in C and C++ using the `{ ... }` braces, often found in `#define` macros. This pattern is particularly useful for controlling variable scope and improving code readability. Here are a few important uses for it:
1. **Limited Scope**: Whe... | 41,614 | [
{
"from": "human",
"value": "I've been seeing that expression for over 10 years now. I've been trying to think what it's good for. Since I see it mostly in #defines, I assume it's good for inner scope variable declaration and for using breaks (instead of gotos.)\nIs it good for anything else? Do you use it?... |
I'm building a CMS in ASP.NET MVC and want to allow users to pick which page they want to be displayed by default when the user first visits the site.
I set my default route in Global.asax, like so (for example):
routes.MapRoute(
"Default", // Route name
... | In ASP.NET MVC, the routing table is established when the application starts, typically during the `Application_Start` event in the `Global.asax`. Once the application is running, changing the default route dynamically based on some condition (like user preferences stored in a database) isn't directly possible because ... | 39,540 | [
{
"from": "human",
"value": "I'm building a CMS in ASP.NET MVC and want to allow users to pick which page they want to be displayed by default when the user first visits the site. \nI set my default route in Global.asax, like so (for example):\nroutes.MapRoute(\n \"Default\", ... |
I have div containing a list of flash objects. The list is long so I've set the div height to 400 and overflow to auto.
This works fine on FF but on IE6 only the first 5 flash objects that are visible work. The rest of the flash objects that are initially outside the viewable area are empty when I scroll down. The swf... | It sounds like you're running into a known issue with how Internet Explorer 6 handles Flash objects when they are hidden initially (using `display: none` or `visibility: hidden`) and then made visible later on. This behavior can lead to issues where the Flash content doesn't render correctly when it comes into view.
H... | 41,382 | [
{
"from": "human",
"value": "I have div containing a list of flash objects. The list is long so I've set the div height to 400 and overflow to auto. \nThis works fine on FF but on IE6 only the first 5 flash objects that are visible work. The rest of the flash objects that are initially outside the viewable ... |
I'm using Cruise Control .Net 1.4 for Continuous integration and have installed it on my Windows 2000 desktop. I have Nant 0.85 for the Build. My Source control is in Borland Starteam 2005. I have the .Net 2003 framework installed which I use for creating VB.Net windows applications. I have installed CCNet and I think ... | It appears that your CruiseControl.NET (CCNet) configuration is set up to poll for changes every 120 seconds, which is not quite immediate. To get CCNet to react to changes in StarTeam as soon as they happen, you’ll want to make sure you have the following points covered:
### 1. Trigger Type
The `intervalTrigger` you... | 36,151 | [
{
"from": "human",
"value": "I'm using Cruise Control .Net 1.4 for Continuous integration and have installed it on my Windows 2000 desktop. I have Nant 0.85 for the Build. My Source control is in Borland Starteam 2005. I have the .Net 2003 framework installed which I use for creating VB.Net windows applicat... |
I am trying to execute a stored procedured from a linked database in MS SQL 2005. The linked database is a db2 database on a iseries server. I am using the iSeries IBMDASQL service provider. I am able to query the stored procedure without problems using a simple vbscript and ado. When I try to execute the same stor... | The issue you're facing with executing the stored procedure in SQL Server through a linked server to DB2 can stem from several potential problems. Let's break down the approach and consider a few troubleshooting steps and corrections.
### Key Points to Consider:
1. **Stored Procedure Result Set**: Make sure that the ... | 41,162 | [
{
"from": "human",
"value": "I am trying to execute a stored procedured from a linked database in MS SQL 2005. The linked database is a db2 database on a iseries server. I am using the iSeries IBMDASQL service provider. I am able to query the stored procedure without problems using a simple vbscript and ... |
In OOP languages like C# or VB.NET, if I make the properties or methods in a super class protected I can't access them in my Form - they can only be accessed in my class that inherits from that super class.
To access those properties or methods I need to make them public, which defeats encapsulation, or re-write them i... | In object-oriented programming, the concept of encapsulation and the visibility of class members (properties and methods) are important considerations. In C#, members marked as `protected` are accessible only within their own class and by derived classes, but not by external classes such as forms or other non-derived c... | 40,455 | [
{
"from": "human",
"value": "In OOP languages like C# or VB.NET, if I make the properties or methods in a super class protected I can't access them in my Form - they can only be accessed in my class that inherits from that super class.\nTo access those properties or methods I need to make them public, which... |
I am working on a very simple player written in MXML+ActionScript whose functions are exported to be called by a simple Javascript in an HTML page.
Both codes are provided below.
For the mp3 "path" all is working perfectly for playing, pausing, resuming and stopping...
For the m4a "path", starting is working well, stop... | The issue you're facing with the M4A files in your Flash player can stem from a few factors related to how streaming media works in ActionScript and the limitations of using Flash with certain audio formats. Let’s go through some potential issues and how you can address them:
### Issues with Resuming M4A Playback
1. ... | 42,107 | [
{
"from": "human",
"value": "I am working on a very simple player written in MXML+ActionScript whose functions are exported to be called by a simple Javascript in an HTML page.\nBoth codes are provided below.\nFor the mp3 \"path\" all is working perfectly for playing, pausing, resuming and stopping...\nFor ... |
I have a JAX-RPC web service that I am attempting to consume using Spring. This is my first time using Spring to consume a web service, so right now I'm just trying to get it to integrate with the JAX-RPC web service as a test.
The web service has several dozen operations in it, but for right now I only care about one.... | When consuming a JAX-RPC web service using Spring, it’s important to ensure that your configuration is compatible with the specific service setup and follows the required patterns for RPC-style web services. The error messages you're encountering suggest a few common pitfalls, particularly related to the RPC vs documen... | 34,873 | [
{
"from": "human",
"value": "I have a JAX-RPC web service that I am attempting to consume using Spring. This is my first time using Spring to consume a web service, so right now I'm just trying to get it to integrate with the JAX-RPC web service as a test.\nThe web service has several dozen operations in it... |
Is there a Linux version of Oracle XE?
I could not find any info on Oracles official site.
| Yes, Oracle provides a version of Oracle Database Express Edition (XE) for Linux. As of my last update, Oracle XE 18c was available for Linux, and you can download it directly from the Oracle website.
To find the latest version of Oracle XE for Linux:
1. Go to the [Oracle Database Express Edition download page](https... | 45,132 | [
{
"from": "human",
"value": "Is there a Linux version of Oracle XE?\nI could not find any info on Oracles official site.\n"
},
{
"from": "gpt",
"value": "Yes, Oracle provides a version of Oracle Database Express Edition (XE) for Linux. As of my last update, Oracle XE 18c was available for Linux,... |
I looking for a way to programmatically start a VOIP call using the SIP stack on a S60 Symbian mobile phone.
Some of the later S60 devices have a built-in SIP client. Is it also possible to access the SIP stack using some S60 library on those devices. Or does anyone know of an external SIP stack that can be used on S6... | To programmatically start a VoIP call using the SIP stack on a Symbian S60 mobile phone, you have a few options to consider:
1. **Using the Built-in SIP Client**:
Many S60 devices come with a built-in SIP client that you can utilize. You would typically use the Symbian C++ APIs, specifically the `CSipClient` and r... | 42,515 | [
{
"from": "human",
"value": "I looking for a way to programmatically start a VOIP call using the SIP stack on a S60 Symbian mobile phone. \nSome of the later S60 devices have a built-in SIP client. Is it also possible to access the SIP stack using some S60 library on those devices. Or does anyone know of an... |
I'm working on a Youtube userstyle script that displays comments side by side with the video so you can watch the video and read the comments at the same time (what a marvelous idea - duh). You can see in the screenshots how far I've got. That means I only care about Firefox, and that CSS3 goes.
The problem I have is t... | To achieve the desired layout where the `rightnav` div floats to the right, the `main` div takes the remaining space, and the `footer` is positioned below both, you need to use some CSS adjustments. Specifically, you should remove the `position: absolute;` from the `rightnav` and ensure that the `footer` uses the `clea... | 39,817 | [
{
"from": "human",
"value": "I'm working on a Youtube userstyle script that displays comments side by side with the video so you can watch the video and read the comments at the same time (what a marvelous idea - duh). You can see in the screenshots how far I've got. That means I only care about Firefox, an... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.