PostId
int64 4
11.8M
| PostCreationDate
stringlengths 19
19
| OwnerUserId
int64 1
1.57M
| OwnerCreationDate
stringlengths 10
19
| ReputationAtPostCreation
int64 -55
461k
| OwnerUndeletedAnswerCountAtPostTime
int64 0
21.5k
| Title
stringlengths 3
250
| BodyMarkdown
stringlengths 5
30k
⌀ | Tag1
stringlengths 1
25
⌀ | Tag2
stringlengths 1
25
⌀ | Tag3
stringlengths 1
25
⌀ | Tag4
stringlengths 1
25
⌀ | Tag5
stringlengths 1
25
⌀ | PostClosedDate
stringlengths 19
19
⌀ | OpenStatus
stringclasses 5
values | unified_texts
stringlengths 32
30.1k
| OpenStatus_id
int64 0
4
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
75,650 | 09/16/2008 18:49:36 | 3,957 | 09/01/2008 02:50:44 | 372 | 22 | Best way to do Visual Studio post build deployment in a team environment? | I'm working in a team environment where each developer works from their local desktop and deploys to a virtual machine that they own on the network. What I'm trying to do is set up the Visual Studio solution so that when they build the solution each projects deployment is handled in the post-build event to that developers virtual machine.
What I'd really like to do is give ownership of those scripts to the individual developer as well so that they own their post build steps and they don't have to be the same for everyone.
A couple of questions:
- Is a post build event the place to execute this type of deployment operation? If not what is the best place to do it?
- What software, tools, or tutorials/blog posts are available to assist in developing an automatic deployment system that supports these scenarios? | visual-studio | build | deployment | team | null | null | open | Best way to do Visual Studio post build deployment in a team environment?
===
I'm working in a team environment where each developer works from their local desktop and deploys to a virtual machine that they own on the network. What I'm trying to do is set up the Visual Studio solution so that when they build the solution each projects deployment is handled in the post-build event to that developers virtual machine.
What I'd really like to do is give ownership of those scripts to the individual developer as well so that they own their post build steps and they don't have to be the same for everyone.
A couple of questions:
- Is a post build event the place to execute this type of deployment operation? If not what is the best place to do it?
- What software, tools, or tutorials/blog posts are available to assist in developing an automatic deployment system that supports these scenarios? | 0 |
75,652 | 09/16/2008 18:49:41 | 13,060 | 09/16/2008 16:51:49 | 21 | 1 | Is there a Firefox add-on to use vim to edit textboxes? | or "How do I answer questions on SO in Firefox using gVim inside the textboxes?" | firefox | vim | null | null | null | null | open | Is there a Firefox add-on to use vim to edit textboxes?
===
or "How do I answer questions on SO in Firefox using gVim inside the textboxes?" | 0 |
75,675 | 09/16/2008 18:52:49 | 6,068 | 09/12/2008 08:42:06 | 11 | 2 | How do I dump the data of some SQLite3 tables? | How do I dump the data, and only the data, not the schema, of some SQLite3 tables of a database (not all the tables)? | sql | sqlite | sqlite3 | null | null | null | open | How do I dump the data of some SQLite3 tables?
===
How do I dump the data, and only the data, not the schema, of some SQLite3 tables of a database (not all the tables)? | 0 |
75,677 | 09/16/2008 18:53:01 | 8,062 | 09/15/2008 15:04:57 | 26 | 4 | Converting a Uniform Distribution to a Normal Distribution | How can I convert a uniform distribution (as most random number generators produce, e.g. between 0.0 and 1.0) into a normal distribution, specifically with a mean and standard deviation of my choosing? | statistics | random | rng | normal-distribution | gaussian-distribution | null | open | Converting a Uniform Distribution to a Normal Distribution
===
How can I convert a uniform distribution (as most random number generators produce, e.g. between 0.0 and 1.0) into a normal distribution, specifically with a mean and standard deviation of my choosing? | 0 |
75,691 | 09/16/2008 18:54:13 | 13,337 | 09/16/2008 18:24:57 | 1 | 0 | how do i take picture from a digital camera attached to my computer throught USB cable using vb.net or asp.net or C#? | I am writing picture editing windows forms application using vb.net/c#. i have a client requirement to capture the photo from digital still camera attached to computer.
how can i capture a photo from USB connected digital still camera device in my windows application ?
| c# | vb.net | image-capture | null | null | null | open | how do i take picture from a digital camera attached to my computer throught USB cable using vb.net or asp.net or C#?
===
I am writing picture editing windows forms application using vb.net/c#. i have a client requirement to capture the photo from digital still camera attached to computer.
how can i capture a photo from USB connected digital still camera device in my windows application ?
| 0 |
75,693 | 09/16/2008 18:54:52 | 13,262 | 09/16/2008 17:56:04 | 1 | 1 | Is it possible to offline a disk in a raidz zfs pool? | When i try to offline a disk in a zfs raidz pool (the raidz pool is not mirrored), zfs says that the disk cannot be taken offline because it has no valid mirror.
Isn't one of the properties of raidz that it has a redundant disk (or even 2 disks in raidz2)...? | linux | filesystems | solaris | zfs | null | null | open | Is it possible to offline a disk in a raidz zfs pool?
===
When i try to offline a disk in a zfs raidz pool (the raidz pool is not mirrored), zfs says that the disk cannot be taken offline because it has no valid mirror.
Isn't one of the properties of raidz that it has a redundant disk (or even 2 disks in raidz2)...? | 0 |
75,696 | 09/16/2008 18:55:41 | 12,902 | 09/16/2008 16:09:20 | 61 | 5 | PostgreSQL 8.3 privileges not updated - wrong usage? | I'm having trouble granting privileges to another user in PostgreSQL 8.3. While the GRANT command gives me no error, the privileges do not show up. Do I need to "flush" them?
sirprize=# CREATE DATABASE testdb;
CREATE DATABASE
sirprize=# GRANT ALL PRIVILEGES ON DATABASE testdb TO testuser;
GRANT
sirprize=# \c testdb
You are now connected to database "testdb".
testdb=# \z
Access privileges for database "testdb"
Schema | Name | Type | Access privileges
--------+------+------+-------------------
(0 rows)
testdb=#
| authentication | postgresql | user | privileges | roles | null | open | PostgreSQL 8.3 privileges not updated - wrong usage?
===
I'm having trouble granting privileges to another user in PostgreSQL 8.3. While the GRANT command gives me no error, the privileges do not show up. Do I need to "flush" them?
sirprize=# CREATE DATABASE testdb;
CREATE DATABASE
sirprize=# GRANT ALL PRIVILEGES ON DATABASE testdb TO testuser;
GRANT
sirprize=# \c testdb
You are now connected to database "testdb".
testdb=# \z
Access privileges for database "testdb"
Schema | Name | Type | Access privileges
--------+------+------+-------------------
(0 rows)
testdb=#
| 0 |
75,700 | 09/16/2008 18:56:20 | 13,143 | 09/16/2008 17:21:16 | 8 | 1 | JPA Multiple Transaction Managers | i have one applicationContext.xml file, and it has two org.springframework.orm.jpa.JpaTransactionManager (each with its own persistence unit, different databases) configured in a Spring middleware custom application.
i want to use annotation based transactions (@Transactional), to not mess around with TransactionStatus commit, save, and rollback.
A coworker mentioned that something gets confused doing this when there are multiple transaction managers, even though the context file is set configured correctly (the references go to the correct persistence unit.
Anyone ever see an issue?
Thanks | jpatransactionmanager | null | null | null | null | null | open | JPA Multiple Transaction Managers
===
i have one applicationContext.xml file, and it has two org.springframework.orm.jpa.JpaTransactionManager (each with its own persistence unit, different databases) configured in a Spring middleware custom application.
i want to use annotation based transactions (@Transactional), to not mess around with TransactionStatus commit, save, and rollback.
A coworker mentioned that something gets confused doing this when there are multiple transaction managers, even though the context file is set configured correctly (the references go to the correct persistence unit.
Anyone ever see an issue?
Thanks | 0 |
75,701 | 09/16/2008 18:56:21 | 13,313 | 09/16/2008 18:15:56 | 1 | 1 | What happens to global variables declared in a DLL? | Let's say I write a DLL in C++, and declare a global object of a class with a non-trivial destructor. Will the destructor be called when the DLL is unloaded? | c++ | windows | dll | null | null | null | open | What happens to global variables declared in a DLL?
===
Let's say I write a DLL in C++, and declare a global object of a class with a non-trivial destructor. Will the destructor be called when the DLL is unloaded? | 0 |
75,704 | 09/16/2008 18:56:53 | 8,224 | 09/15/2008 15:28:05 | 1 | 0 | How do I check to see if a value is an integer in MySQL? | I see that within MySQL there are Cast() and Convert() functions to create integers from values, but is there any way to check to see if a value is an integer? Something like is_int() in PHP is what I am looking for.
Thanks!
Craig | mysql | null | null | null | null | null | open | How do I check to see if a value is an integer in MySQL?
===
I see that within MySQL there are Cast() and Convert() functions to create integers from values, but is there any way to check to see if a value is an integer? Something like is_int() in PHP is what I am looking for.
Thanks!
Craig | 0 |
75,705 | 09/16/2008 18:56:54 | 10,333 | 09/15/2008 22:28:36 | 81 | 1 | How to read/write dBase III files using C#/.NET ODBC or OLE? | I have searched for various techniques on how to read/write dBase III (dbf) files using OLEDB or ODBC with C#/.NET. I have tried almost all of the tecniques posted, but without success. Can someone point me in the right direction?
Thanks for your time. | c# | .net | dbf | dbase | null | null | open | How to read/write dBase III files using C#/.NET ODBC or OLE?
===
I have searched for various techniques on how to read/write dBase III (dbf) files using OLEDB or ODBC with C#/.NET. I have tried almost all of the tecniques posted, but without success. Can someone point me in the right direction?
Thanks for your time. | 0 |
75,712 | 09/16/2008 18:58:07 | 12,369 | 09/16/2008 14:07:29 | 1 | 1 | Grabbing Users with a specific value in their profile | I'm using membership and roles for authentication in my vb .net application. We have about 5 roles in the application with certain roles filling out a specific profile value. Example is the role is store and the profile value is store number. Obviously if you work for headquarters you don't have a store number so I don't care about it. Each store can also have more than 1 employee.
I need to get the users for a specific store number. Meaning I would only want the users that belong to store number 101 to show up that list. The way that we are doing this now is going through all the users and adding the users that fit the criteria into a sorted list. This functions but the problem is when you start passing about 3,000 users or so. It just becomes to slow to be any good.
How would you guys find a different way of doing it? I really don't want to do custom stored procedure or changing the underlying classes because I'm afraid of it all breaking on a later version of .net that they change membership and roles. | .net | membership | and | roles | null | null | open | Grabbing Users with a specific value in their profile
===
I'm using membership and roles for authentication in my vb .net application. We have about 5 roles in the application with certain roles filling out a specific profile value. Example is the role is store and the profile value is store number. Obviously if you work for headquarters you don't have a store number so I don't care about it. Each store can also have more than 1 employee.
I need to get the users for a specific store number. Meaning I would only want the users that belong to store number 101 to show up that list. The way that we are doing this now is going through all the users and adding the users that fit the criteria into a sorted list. This functions but the problem is when you start passing about 3,000 users or so. It just becomes to slow to be any good.
How would you guys find a different way of doing it? I really don't want to do custom stored procedure or changing the underlying classes because I'm afraid of it all breaking on a later version of .net that they change membership and roles. | 0 |
75,713 | 09/16/2008 18:58:08 | 6,542 | 09/15/2008 12:12:46 | 3 | 0 | WPF Can't Databind to an Interface? | I'm trying to bind controls in a WPF form to an interface and I get a runtime error that it can't find the interface's properties.
Here's the class I'm using as a datasource:
public interface IPerson
{
string UserId { get; set; }
string UserName { get; set; }
string Email { get; set; }
}
public class Person : EntityBase, IPerson
{
public virtual string UserId { get; set; }
public string UserName { get; set; }
public virtual string Email { get; set; }
}
Here's the XAML (an excerpt):
<TextBox Name="userIdTextBox" Text="{Binding UserId}" />
<TextBox Name="userNameTextBox" Text="{Binding UserName}" />
<TextBox Name="emailTextBox" Text="{Binding Email}" />
Here's the code behind (again, an excerpt):
var person = PolicyInjection.Wrap<IPerson>(new Person());
person.UserId = "jdoe";
person.UserName = "John Doe";
person.Email = "[email protected]";
this.DataContext = person;
Note that the class I'm using as the data source needs to be an entity because I'm using Policy Injection through the entlib's Policy Injection Application Block.
I'm getting this error at runtime:
System.Windows.Data Error: 16 : Cannot get 'Email' value (type 'String') from '' (type 'Person'). BindingExpression:Path=Email; DataItem='Person' (HashCode=22322349); target element is 'TextBox' (Name='emailTextBox'); target property is 'Text' (type 'String') TargetException:'System.Reflection.TargetException: Object does not match target type.
at System.Reflection.RuntimeMethodInfo.CheckConsistency(Object target)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
at MS.Internal.Data.PropertyPathWorker.GetValue(Object item, Int32 level)
at MS.Internal.Data.PropertyPathWorker.RawValue(Int32 k)' | wpf | null | null | null | null | null | open | WPF Can't Databind to an Interface?
===
I'm trying to bind controls in a WPF form to an interface and I get a runtime error that it can't find the interface's properties.
Here's the class I'm using as a datasource:
public interface IPerson
{
string UserId { get; set; }
string UserName { get; set; }
string Email { get; set; }
}
public class Person : EntityBase, IPerson
{
public virtual string UserId { get; set; }
public string UserName { get; set; }
public virtual string Email { get; set; }
}
Here's the XAML (an excerpt):
<TextBox Name="userIdTextBox" Text="{Binding UserId}" />
<TextBox Name="userNameTextBox" Text="{Binding UserName}" />
<TextBox Name="emailTextBox" Text="{Binding Email}" />
Here's the code behind (again, an excerpt):
var person = PolicyInjection.Wrap<IPerson>(new Person());
person.UserId = "jdoe";
person.UserName = "John Doe";
person.Email = "[email protected]";
this.DataContext = person;
Note that the class I'm using as the data source needs to be an entity because I'm using Policy Injection through the entlib's Policy Injection Application Block.
I'm getting this error at runtime:
System.Windows.Data Error: 16 : Cannot get 'Email' value (type 'String') from '' (type 'Person'). BindingExpression:Path=Email; DataItem='Person' (HashCode=22322349); target element is 'TextBox' (Name='emailTextBox'); target property is 'Text' (type 'String') TargetException:'System.Reflection.TargetException: Object does not match target type.
at System.Reflection.RuntimeMethodInfo.CheckConsistency(Object target)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
at MS.Internal.Data.PropertyPathWorker.GetValue(Object item, Int32 level)
at MS.Internal.Data.PropertyPathWorker.RawValue(Int32 k)' | 0 |
75,722 | 09/16/2008 18:59:07 | 8,701 | 09/15/2008 16:37:56 | 184 | 8 | Is there a better deterministic disposal pattern than nested "using"s in C#? | In C#, if I want to deterministically clean up non-managed resources, I can use the "using" keyword. But for multiple dependent objects, this ends up nesting further and further:
using (FileStream fs = new FileStream("c:\file.txt", FileMode.Open))
{
using (BufferedStream bs = new BufferedStream(fs))
{
using (StreamReader sr = new StreamReader(bs))
{
// use sr, and have everything cleaned up when done.
}
}
}
In C++, I'm used to being able to use destructors to do it like this:
{
FileStream fs("c:\file.txt", FileMode.Open);
BufferedStream bs(fs);
StreamReader sr(bs);
// use sr, and have everything cleaned up when done.
}
Is there a better way in C# to do this? Or am I stuck with the multiple levels of nesting? | c# | c++ | using | raii | null | null | open | Is there a better deterministic disposal pattern than nested "using"s in C#?
===
In C#, if I want to deterministically clean up non-managed resources, I can use the "using" keyword. But for multiple dependent objects, this ends up nesting further and further:
using (FileStream fs = new FileStream("c:\file.txt", FileMode.Open))
{
using (BufferedStream bs = new BufferedStream(fs))
{
using (StreamReader sr = new StreamReader(bs))
{
// use sr, and have everything cleaned up when done.
}
}
}
In C++, I'm used to being able to use destructors to do it like this:
{
FileStream fs("c:\file.txt", FileMode.Open);
BufferedStream bs(fs);
StreamReader sr(bs);
// use sr, and have everything cleaned up when done.
}
Is there a better way in C# to do this? Or am I stuck with the multiple levels of nesting? | 0 |
75,724 | 09/16/2008 18:59:19 | 1,120 | 08/12/2008 13:45:53 | 605 | 32 | Good primers on Cryptography | I'm wondering if anyone can recommend good primers on Cryptography and Crypto theory for someone with little or no prior experience in the area. I'll be honest and say it's something I've always found fascinating but having recently read Cryptonomicon I and had my interest resparked in the whole field.
I just did some searching on here and found [this question][1] which is close to what I'm after but is a bit more on the "applied" side of things in terms of hacking etc whereas I'm kind of looking for something that covers the basics and the history but on the theoretical side.
[1]: http://stackoverflow.com/questions/27827/what-are-good-books-about-security-hacking-and-computer-forensics | cryptography | books | recommendation | null | null | null | open | Good primers on Cryptography
===
I'm wondering if anyone can recommend good primers on Cryptography and Crypto theory for someone with little or no prior experience in the area. I'll be honest and say it's something I've always found fascinating but having recently read Cryptonomicon I and had my interest resparked in the whole field.
I just did some searching on here and found [this question][1] which is close to what I'm after but is a bit more on the "applied" side of things in terms of hacking etc whereas I'm kind of looking for something that covers the basics and the history but on the theoretical side.
[1]: http://stackoverflow.com/questions/27827/what-are-good-books-about-security-hacking-and-computer-forensics | 0 |
75,732 | 09/16/2008 19:00:21 | 12,930 | 09/16/2008 16:17:43 | 59 | 11 | Not using widths & padding/margins on the same element? | I've seen numerous people mentions that you shouldn't use widths and padding or margins on the same element with CSS. Why is that? | html | css | null | null | null | null | open | Not using widths & padding/margins on the same element?
===
I've seen numerous people mentions that you shouldn't use widths and padding or margins on the same element with CSS. Why is that? | 0 |
75,746 | 09/16/2008 19:01:27 | 12,975 | 09/16/2008 16:27:40 | 11 | 9 | Conditional operator assignment with nullable<value> types? |
EmployeeNumber =
string.IsNullOrEmpty(employeeNumberTextBox.Text)
? null
: Convert.ToInt32(employeeNumberTextBox.Text),
I often find myself wanting to do things like this (EmployeeNumber is a nullable<int> as it's a property on a LINQ-to-SQL dbml object where the column allows NULL values). Unfortunately, the compiler feels that "There is no implicit conversion between 'null' and 'int'", even though both types would be valid in an assignment operation to a nullable int on their own.<br />
Null coalescing operator is not an option as far as I can see because of the inline conversion that needs to happen on the .Text string if it's not null.<br />
As far as I know the only way to do this is to use an if statement and/or assign it in two steps. In this particular case I find that very frustrating because I wanted to use the object initializer syntax and this assignment would be in the initialization block...<br />
Anyone know a more elegant solution? | c# | conditional | operator | nullable | int | null | open | Conditional operator assignment with nullable<value> types?
===
EmployeeNumber =
string.IsNullOrEmpty(employeeNumberTextBox.Text)
? null
: Convert.ToInt32(employeeNumberTextBox.Text),
I often find myself wanting to do things like this (EmployeeNumber is a nullable<int> as it's a property on a LINQ-to-SQL dbml object where the column allows NULL values). Unfortunately, the compiler feels that "There is no implicit conversion between 'null' and 'int'", even though both types would be valid in an assignment operation to a nullable int on their own.<br />
Null coalescing operator is not an option as far as I can see because of the inline conversion that needs to happen on the .Text string if it's not null.<br />
As far as I know the only way to do this is to use an if statement and/or assign it in two steps. In this particular case I find that very frustrating because I wanted to use the object initializer syntax and this assignment would be in the initialization block...<br />
Anyone know a more elegant solution? | 0 |
75,747 | 09/16/2008 19:01:29 | 7,104 | 09/15/2008 13:10:33 | 13 | 1 | Sharepoint: Best way to display lists of non-Sharepoint content with "compatible" UI? | I've built a web part for Sharepoint that retrieves data from an external service. I'd like to display the items in a way that's UI-compatible with Sharepoint (fits in with its surroundings.)
I'm aware of the "DataFormWebPart" but was unable to get one working properly. It requires a valid DataSource and I was unable to build one from the results of a web service call... Part of the problem is that my web service wrappers don't expose the XML return info, rather I have a bunch of deserialized objects. There doesn't seem to be an easy way to turn actual objects into a datasource, or populate a "generic" datasource from object data.
I could use an SPGridView to get the same UI, but the grid control doesn't have much in the way of smarts -and- it forces every field into its own column. I'd prefer to render each list item as a single cell with complex rendering (for instance the way that StackOverflow shows its lists of questions.) I'd also like to get as much of the Sharepoint-standard UI as possible, such as the sorting, filtering, and paging controls.
So, first: Has anyone here written a Sharepoint control that does this, and if so do you have sample code to share? If not: am I overlooking some useful control, whether MS-supplied or available in an external library?
Thanks!
Steve | sharepoint | xslt | list | webparts | null | null | open | Sharepoint: Best way to display lists of non-Sharepoint content with "compatible" UI?
===
I've built a web part for Sharepoint that retrieves data from an external service. I'd like to display the items in a way that's UI-compatible with Sharepoint (fits in with its surroundings.)
I'm aware of the "DataFormWebPart" but was unable to get one working properly. It requires a valid DataSource and I was unable to build one from the results of a web service call... Part of the problem is that my web service wrappers don't expose the XML return info, rather I have a bunch of deserialized objects. There doesn't seem to be an easy way to turn actual objects into a datasource, or populate a "generic" datasource from object data.
I could use an SPGridView to get the same UI, but the grid control doesn't have much in the way of smarts -and- it forces every field into its own column. I'd prefer to render each list item as a single cell with complex rendering (for instance the way that StackOverflow shows its lists of questions.) I'd also like to get as much of the Sharepoint-standard UI as possible, such as the sorting, filtering, and paging controls.
So, first: Has anyone here written a Sharepoint control that does this, and if so do you have sample code to share? If not: am I overlooking some useful control, whether MS-supplied or available in an external library?
Thanks!
Steve | 0 |
75,752 | 09/16/2008 19:01:43 | 13,196 | 09/16/2008 17:35:55 | 1 | 0 | What is the most straightforward way to pad empty dates in sql results (on either mysql or perl end)? | I'm building a quick csv from a mysql table with a query like:
select DATE(date),count(date) from table group by DATE(date) order by date asc;
and just dumping them to a file in perl over a:
while(my($date,$sum) = $sth->fetchrow) {
print CSV "$date,$sum\n"
}
There are date gaps in the data, though:
| 2008-08-05 | 4 |
| 2008-08-07 | 23 |
I would like to pad the data to fill in the missing days with zero-count entries.
I slapped together a really awkward (and almost certainly buggy) workaround with an array of days-per-month and some math, but there has to be something more straightforward either on the mysql or perl side.
Any genius ideas/slaps in the face for why me am being so dumb? | perl | mysql | calendar | datediff | null | null | open | What is the most straightforward way to pad empty dates in sql results (on either mysql or perl end)?
===
I'm building a quick csv from a mysql table with a query like:
select DATE(date),count(date) from table group by DATE(date) order by date asc;
and just dumping them to a file in perl over a:
while(my($date,$sum) = $sth->fetchrow) {
print CSV "$date,$sum\n"
}
There are date gaps in the data, though:
| 2008-08-05 | 4 |
| 2008-08-07 | 23 |
I would like to pad the data to fill in the missing days with zero-count entries.
I slapped together a really awkward (and almost certainly buggy) workaround with an array of days-per-month and some math, but there has to be something more straightforward either on the mysql or perl side.
Any genius ideas/slaps in the face for why me am being so dumb? | 0 |
75,759 | 09/16/2008 19:02:09 | 4,110 | 09/01/2008 20:20:54 | 21 | 4 | enums in ruby | What's the best way to implement the enum idiom in Ruby? I'm looking for something which I can use (almost) like the Java/C# enums. | ruby | null | null | null | null | null | open | enums in ruby
===
What's the best way to implement the enum idiom in Ruby? I'm looking for something which I can use (almost) like the Java/C# enums. | 0 |
75,763 | 09/16/2008 19:02:30 | 13,432 | 09/16/2008 19:02:30 | 1 | 0 | how can I debug a process 1.exe runnng under another process 2.exe. | 1.exe doesnt' give enough time for me to launch IDE and attach 1.exe to the debugger to break into. | visual | studio | 2005 | null | null | null | open | how can I debug a process 1.exe runnng under another process 2.exe.
===
1.exe doesnt' give enough time for me to launch IDE and attach 1.exe to the debugger to break into. | 0 |
75,777 | 09/16/2008 19:03:49 | 12,597 | 09/16/2008 14:53:25 | 1 | 2 | What is the .NET Control.Margin property for? | i assumed that the C# margin property had a meaning like in CSS - the spacing around the outside of the control. But Margin values seem to be ignored to matter what values i enter.
Then i read on the SDK:
> Setting the Margin property on a
> docked control has no effect on the
> distance of the control from the the
> edges of its container.
Given that i'm placing controls on forms, and perhaps docking them, what does the Margin property get me? | c# | control | margin | null | null | null | open | What is the .NET Control.Margin property for?
===
i assumed that the C# margin property had a meaning like in CSS - the spacing around the outside of the control. But Margin values seem to be ignored to matter what values i enter.
Then i read on the SDK:
> Setting the Margin property on a
> docked control has no effect on the
> distance of the control from the the
> edges of its container.
Given that i'm placing controls on forms, and perhaps docking them, what does the Margin property get me? | 0 |
75,785 | 09/16/2008 19:04:39 | 7,301 | 09/15/2008 13:29:50 | 51 | 2 | How do you do AppBar docking (to screen edge, like WinAmp) in WPF? | Is there any complete guidance on doing AppBar docking (such as locking to the screen edge) in WPF? I understand there are InterOp calls that need to be made, but I'm looking for either a proof of concept based on a simple WPF form, or a componentized version that can be consumed.
Related resources:
- <http://www.codeproject.com/KB/dotnet/AppBar.aspx>
- <http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/05c73c9c-e85d-4ecd-b9b6-4c714a65e72b/>
| c# | wpf | appbar | dock | docking | null | open | How do you do AppBar docking (to screen edge, like WinAmp) in WPF?
===
Is there any complete guidance on doing AppBar docking (such as locking to the screen edge) in WPF? I understand there are InterOp calls that need to be made, but I'm looking for either a proof of concept based on a simple WPF form, or a componentized version that can be consumed.
Related resources:
- <http://www.codeproject.com/KB/dotnet/AppBar.aspx>
- <http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/05c73c9c-e85d-4ecd-b9b6-4c714a65e72b/>
| 0 |
75,786 | 09/16/2008 19:04:43 | 13,360 | 09/16/2008 18:34:22 | 1 | 0 | Eclipse - How can I change a 'Project Facet' from Tomcat 6 to Tomcat 5.5? | (Eclipse 3.4, Ganymede)
I have an existing Dynamic Web Application project in Eclipse. When I created the project, I specified 'Default configuration for Apache Tomcat v6' under the 'Configuration' drop down.
It's a month or 2 down the line, and I would now like to change the configuration to Tomcat 'v5.5'. (This will be the version of Tomcat on the production server.)
I have tried the following steps (without success):
- I selected `Targeted Runtimes` under the Project `Properties`
The `Tomcat v5.5` option was disabled and The UI displayed this message:
`If the runtime you want to select is not displayed or is disabled you may need to uninstall one or more of the currently installed project facets.`
- I then clicked on the `Uninstall Facets...` link.
Under the `Runtimes` tab, only `Tomcat 6` displayed.
For `Dynamic Web Module`, I selected version `2.4` in place of `2.5`.
Under the `Runtimes` tab, `Tomcat 5.5` now displayed.
The UI also displayed this message:
`Cannot change version of project facet Dynamic Web Module to 2.4.`
The `Finish` button was disabled - so I reached a dead-end.
I CAN successfully create a NEW Project with a Tomcat v5.5 configuration. For some reason, though, it will not let me downgrade' an existing Project.
As a work-around, I created a new Project and copied the source files from the old Project. Nonetheless, the work-around was fairly painful and somewhat clumsy.
Can anyone explain how I can 'downgrade' the Project configuration from 'Tomcat 6' to 'Tomcat 5'? Or perhaps shed some light on why this happened?
Thanks
Pete
| eclipse | tomcat | v5.5 | v6 | null | null | open | Eclipse - How can I change a 'Project Facet' from Tomcat 6 to Tomcat 5.5?
===
(Eclipse 3.4, Ganymede)
I have an existing Dynamic Web Application project in Eclipse. When I created the project, I specified 'Default configuration for Apache Tomcat v6' under the 'Configuration' drop down.
It's a month or 2 down the line, and I would now like to change the configuration to Tomcat 'v5.5'. (This will be the version of Tomcat on the production server.)
I have tried the following steps (without success):
- I selected `Targeted Runtimes` under the Project `Properties`
The `Tomcat v5.5` option was disabled and The UI displayed this message:
`If the runtime you want to select is not displayed or is disabled you may need to uninstall one or more of the currently installed project facets.`
- I then clicked on the `Uninstall Facets...` link.
Under the `Runtimes` tab, only `Tomcat 6` displayed.
For `Dynamic Web Module`, I selected version `2.4` in place of `2.5`.
Under the `Runtimes` tab, `Tomcat 5.5` now displayed.
The UI also displayed this message:
`Cannot change version of project facet Dynamic Web Module to 2.4.`
The `Finish` button was disabled - so I reached a dead-end.
I CAN successfully create a NEW Project with a Tomcat v5.5 configuration. For some reason, though, it will not let me downgrade' an existing Project.
As a work-around, I created a new Project and copied the source files from the old Project. Nonetheless, the work-around was fairly painful and somewhat clumsy.
Can anyone explain how I can 'downgrade' the Project configuration from 'Tomcat 6' to 'Tomcat 5'? Or perhaps shed some light on why this happened?
Thanks
Pete
| 0 |
75,798 | 09/16/2008 19:05:48 | 13,436 | 09/16/2008 19:05:48 | 1 | 0 | Django -vs- Grails -vs- ??? | I'm wondering if there's such a thing as Django-like ease of web app development combined with good deployment, debugging and other tools?
Django is a very productive framework for building content-heavy sites; the best I've tried and a breath of fresh air compared to some of the Java monstrosities out there. However it's written in Python which means there's little real support in the way of deployment/packaging, debugging, profilers and other tools that make building and maintaining applications much easier.
Ruby has similar issues and although I do like Ruby **much** better than I like Python, I get the impression that Rails is roughly in the same boat at Django when it comes to managing/supporting the app.
Has anyone here tried both Django and Grails (or other web frameworks) for non-trivial projects? How did they compare? | python | django | frameworks | null | null | null | open | Django -vs- Grails -vs- ???
===
I'm wondering if there's such a thing as Django-like ease of web app development combined with good deployment, debugging and other tools?
Django is a very productive framework for building content-heavy sites; the best I've tried and a breath of fresh air compared to some of the Java monstrosities out there. However it's written in Python which means there's little real support in the way of deployment/packaging, debugging, profilers and other tools that make building and maintaining applications much easier.
Ruby has similar issues and although I do like Ruby **much** better than I like Python, I get the impression that Rails is roughly in the same boat at Django when it comes to managing/supporting the app.
Has anyone here tried both Django and Grails (or other web frameworks) for non-trivial projects? How did they compare? | 0 |
75,805 | 09/16/2008 19:06:25 | 832 | 08/09/2008 06:51:40 | 3,977 | 253 | ASP.NET Custom Controls - Alternatives to PostBack? | On my journey into the depths of custom ASP.NET control development I am obviously getting my head around the ASP.NET PostBack model and how it affects control development.
I understand that controls have no "lifetime" in ASP.NET, and therefore must be re-initialized on each and every page load. We overcome this by persisting the objects values/parameters to the ViewState.
Many articles I read therefore suggest not using PostBack since this can add considerable overhead to the Page. **I am not looking for how to disable it, I know that.**
What I am looking for is:
**What alternatives to we have to using the PostBack model to initialize controls?**
I know we *could* use the QueryString, but that seems awfully messy, and obviously unreliable.
**Ideally you could give me an overview of the architecture/design of a different approach and the pro's/con's of it..**
Many thanks ^_^ | asp.net | viewstate | postback | custom-server-controls | null | null | open | ASP.NET Custom Controls - Alternatives to PostBack?
===
On my journey into the depths of custom ASP.NET control development I am obviously getting my head around the ASP.NET PostBack model and how it affects control development.
I understand that controls have no "lifetime" in ASP.NET, and therefore must be re-initialized on each and every page load. We overcome this by persisting the objects values/parameters to the ViewState.
Many articles I read therefore suggest not using PostBack since this can add considerable overhead to the Page. **I am not looking for how to disable it, I know that.**
What I am looking for is:
**What alternatives to we have to using the PostBack model to initialize controls?**
I know we *could* use the QueryString, but that seems awfully messy, and obviously unreliable.
**Ideally you could give me an overview of the architecture/design of a different approach and the pro's/con's of it..**
Many thanks ^_^ | 0 |
75,809 | 09/16/2008 19:07:06 | 4,308 | 09/02/2008 19:27:46 | 197 | 8 | partial commits with subversion | Given the case I made **two independent changes** in *one* file: eg. added a new method and changed another method.
I often don't want to commit both changes as **one** commit, but as **two** independent commits.
On a git repository I would use the **Interactive Mode** of [git-add(1)][1] to split the *hunk* into smaller ones.
What's the easiest way to do this with Subversion? (Maybe even using an Eclipse plug-in)
[1]: http://linux.die.net/man/1/git-add | svn | git | null | null | null | null | open | partial commits with subversion
===
Given the case I made **two independent changes** in *one* file: eg. added a new method and changed another method.
I often don't want to commit both changes as **one** commit, but as **two** independent commits.
On a git repository I would use the **Interactive Mode** of [git-add(1)][1] to split the *hunk* into smaller ones.
What's the easiest way to do this with Subversion? (Maybe even using an Eclipse plug-in)
[1]: http://linux.die.net/man/1/git-add | 0 |
75,819 | 09/16/2008 19:07:49 | 12,073 | 09/16/2008 13:06:38 | 1 | 0 | SQL Query - Use Like only if no exact match exists? | I'm having an issue with a query that currently uses
LEFT JOIN weblog_data AS pwd ON (pwd.field_id_41 != '' AND pwd.field_id_41 LIKE CONCAT('%', ewd.field_id_32, '%'))
however I'm discovering that I need it to only use that if there is no exact match first. What's happening is that the query is double dipping due to the use of LIKE, so if it tests for an exact match first then it will avoid the double dipping issue. Can anyone provide me with any further guidance? | sql | query | leftjoin | null | null | null | open | SQL Query - Use Like only if no exact match exists?
===
I'm having an issue with a query that currently uses
LEFT JOIN weblog_data AS pwd ON (pwd.field_id_41 != '' AND pwd.field_id_41 LIKE CONCAT('%', ewd.field_id_32, '%'))
however I'm discovering that I need it to only use that if there is no exact match first. What's happening is that the query is double dipping due to the use of LIKE, so if it tests for an exact match first then it will avoid the double dipping issue. Can anyone provide me with any further guidance? | 0 |
75,848 | 09/16/2008 19:10:07 | 1,459,442 | 09/16/2008 19:10:07 | 1 | 0 | Using Spry inside Java Server Faces framework | I'm trying to insert a spry accordian into an already existing jsf page using Dreamweaver, does anyone know if this is possible? I've already tried several things, and only the labels show up. | java | jsf | dreamweaver | null | null | null | open | Using Spry inside Java Server Faces framework
===
I'm trying to insert a spry accordian into an already existing jsf page using Dreamweaver, does anyone know if this is possible? I've already tried several things, and only the labels show up. | 0 |
75,857 | 09/16/2008 19:10:34 | 12,332 | 09/16/2008 13:59:57 | 31 | 9 | How can MyISAM tables be used more safely? | I like InnoDB's safety, consistency, and self-checking.
But I need MyISAM's speed and light weight.
How can I make MyISAM less prone to corruption due to crashes, bad data, etc.? It takes forever to go through a check (either CHECK TABLE or myisamchk).
I'm not asking for transactional security -- that's what InnoDB is for. But I do want a database I can restart quickly rather than hours (or days!) later.
| mysql | myisam | innodb | database-integrity | null | null | open | How can MyISAM tables be used more safely?
===
I like InnoDB's safety, consistency, and self-checking.
But I need MyISAM's speed and light weight.
How can I make MyISAM less prone to corruption due to crashes, bad data, etc.? It takes forever to go through a check (either CHECK TABLE or myisamchk).
I'm not asking for transactional security -- that's what InnoDB is for. But I do want a database I can restart quickly rather than hours (or days!) later.
| 0 |
75,862 | 09/16/2008 19:11:43 | 907 | 08/10/2008 09:41:10 | 81 | 9 | mount nfsroot on loopback | I have a nfs-root boot image that I want to test by mounting on my local file system. How can I do this ? | linux | nfsroot | null | null | null | null | open | mount nfsroot on loopback
===
I have a nfs-root boot image that I want to test by mounting on my local file system. How can I do this ? | 0 |
75,863 | 09/16/2008 19:11:44 | 13,281 | 09/16/2008 18:02:24 | 3 | 2 | What are the best resources for designing user interfaces? | Specifically, what are some GUI resources based on case studies that suggest best practices on a scientific basis rather than a subjective one? | user-interface | gui | case-study | null | null | 10/02/2011 00:44:50 | not constructive | What are the best resources for designing user interfaces?
===
Specifically, what are some GUI resources based on case studies that suggest best practices on a scientific basis rather than a subjective one? | 4 |
75,886 | 09/16/2008 19:14:49 | 2,915 | 08/25/2008 23:15:12 | 3,872 | 162 | C# driver development? | Before I jump headlong into C#...
I've always felt that C, or maybe C++, was best for developing drivers on Windows. I'm not keen on the idea of developing a driver on a .NET machine.
But .NET seems to be the way MS is heading for applications development, and so I'm now wondering:
- Are people are using C# to develop drivers?
- Do you have to do a lot of API hooks, or does C# have the facilities to interface with the kernel without a lot of hackery?
- Can anyone speak to the reliability and safety of running a C# program closer to Ring 0 than would normally be the case?
I want my devices to be usable in C#, and if driver dev in C# is mature that's obviously the way to go, but I don't want to spend a lot of effort there if it's not recommended.
- What are some good resources to get started, say, developing a simple virtual serial port driver?
-Adam | c# | kernel | drivers | devices | null | null | open | C# driver development?
===
Before I jump headlong into C#...
I've always felt that C, or maybe C++, was best for developing drivers on Windows. I'm not keen on the idea of developing a driver on a .NET machine.
But .NET seems to be the way MS is heading for applications development, and so I'm now wondering:
- Are people are using C# to develop drivers?
- Do you have to do a lot of API hooks, or does C# have the facilities to interface with the kernel without a lot of hackery?
- Can anyone speak to the reliability and safety of running a C# program closer to Ring 0 than would normally be the case?
I want my devices to be usable in C#, and if driver dev in C# is mature that's obviously the way to go, but I don't want to spend a lot of effort there if it's not recommended.
- What are some good resources to get started, say, developing a simple virtual serial port driver?
-Adam | 0 |
75,891 | 09/16/2008 19:15:18 | 13,466 | 09/16/2008 19:14:21 | 1 | 0 | Algorithm for finding similar images | I need an algorithm that can determine whether two images are 'similar' and recognizes similar patterns of color, brightness, shape etc.. I might need some pointers as to what parameters the human brain uses to 'categorize' images. ..
I have looked at hausdorff based matching but that seems mainly for matching transformed objects and patterns of shape. | algorithm | image-comparison | math | null | null | null | open | Algorithm for finding similar images
===
I need an algorithm that can determine whether two images are 'similar' and recognizes similar patterns of color, brightness, shape etc.. I might need some pointers as to what parameters the human brain uses to 'categorize' images. ..
I have looked at hausdorff based matching but that seems mainly for matching transformed objects and patterns of shape. | 0 |
75,906 | 09/16/2008 19:17:03 | 13,477 | 09/16/2008 19:17:03 | 1 | 0 | How to transform a WPF file to a video (AVI, WMV, etc.) | I have a simple WPF (XAML) file that has some animated shapes and text. The animation has no interactive behavior. I want to record this animation as a video file that I later intend to use as the "intro" screen to a screencast.
What I think I need: C# code that takes an input XAML file and spits out a high quality WMV at (for example at 24fps).
Possible alternatives I have investigated already
1. Record with screen recording software like Camtasia Studio. This works but the animations are not as smooth especially when the animation has a lot of transitions or movement
2. Use hardware like DVI2USB by Epiphan Systems. Costs too much; haven't tried it.
3. Record TV output (S-Video, etc.) using a DVR Card - Low quality and low-resolution.
| wpf | video | xaml | animation | record | null | open | How to transform a WPF file to a video (AVI, WMV, etc.)
===
I have a simple WPF (XAML) file that has some animated shapes and text. The animation has no interactive behavior. I want to record this animation as a video file that I later intend to use as the "intro" screen to a screencast.
What I think I need: C# code that takes an input XAML file and spits out a high quality WMV at (for example at 24fps).
Possible alternatives I have investigated already
1. Record with screen recording software like Camtasia Studio. This works but the animations are not as smooth especially when the animation has a lot of transitions or movement
2. Use hardware like DVI2USB by Epiphan Systems. Costs too much; haven't tried it.
3. Record TV output (S-Video, etc.) using a DVR Card - Low quality and low-resolution.
| 0 |
75,909 | 09/16/2008 19:17:29 | 7,450 | 09/15/2008 13:45:44 | 11 | 3 | How to stop CAS security assertions from a FullTrust assembly | I have a FullTrust assembly, Assembly A, which calls a 3rd party component, Assembly B. Is there any way I can, via A.dll.config or in A's code, prevent any CAS assertions from propagating up the stack to Assembly B, which does not have FullTrust?
I do not want to alter the machine's security policy, if possible.
| .net | cas | fulltrust | null | null | null | open | How to stop CAS security assertions from a FullTrust assembly
===
I have a FullTrust assembly, Assembly A, which calls a 3rd party component, Assembly B. Is there any way I can, via A.dll.config or in A's code, prevent any CAS assertions from propagating up the stack to Assembly B, which does not have FullTrust?
I do not want to alter the machine's security policy, if possible.
| 0 |
75,924 | 09/16/2008 19:18:59 | 1,336 | 08/14/2008 15:06:49 | 200 | 13 | Text on a ProgressBar in WPF | This may be a no-brainer for the WPF cognoscenti, but I'd like to know if there's a simple way to put text on the WPF ProgressBar. To me, an empty progress bar looks naked. That's screen real estate that could carry a message about **what** is in progress, or even just add numbers to the representation. Now, WPF is all about containers and extensions and I'm slowly wrapping my mind around that, but since I don't see a "Text" or "Content" property, I'm thinking I'm going to have to add something to the container that is my progress bar. Is there a technique or two out there that is more natural than my original WinForms impulses will be? What's the best, most WPF-natural way to add text to that progress bar? | .net | wpf | controls | progress-bar | null | null | open | Text on a ProgressBar in WPF
===
This may be a no-brainer for the WPF cognoscenti, but I'd like to know if there's a simple way to put text on the WPF ProgressBar. To me, an empty progress bar looks naked. That's screen real estate that could carry a message about **what** is in progress, or even just add numbers to the representation. Now, WPF is all about containers and extensions and I'm slowly wrapping my mind around that, but since I don't see a "Text" or "Content" property, I'm thinking I'm going to have to add something to the container that is my progress bar. Is there a technique or two out there that is more natural than my original WinForms impulses will be? What's the best, most WPF-natural way to add text to that progress bar? | 0 |
75,935 | 09/16/2008 19:20:18 | 3,113 | 08/26/2008 17:56:39 | 8 | 3 | Using xsd to generate XML in .net | I'm working in a .net application where we need to generate XML files on the fly based on the dataset retrieved from the db. XML schema should be based on a xsd provided. I would like to know is there any way to bind or associate a dataset or each datarow with the xsd. I dont know whether it can be done at all or i may be thinking usage of XSDs at a wrong perspective. If i'm wrong please correct me and let me know of the best way to associate a data retrieved from db to a predefined schema.Thanks.
Update: If my perspective on xsd is wrong please shed some light on how xsds are used(or perhaps point me to some useful links). | .net | xml | xsd | null | null | null | open | Using xsd to generate XML in .net
===
I'm working in a .net application where we need to generate XML files on the fly based on the dataset retrieved from the db. XML schema should be based on a xsd provided. I would like to know is there any way to bind or associate a dataset or each datarow with the xsd. I dont know whether it can be done at all or i may be thinking usage of XSDs at a wrong perspective. If i'm wrong please correct me and let me know of the best way to associate a data retrieved from db to a predefined schema.Thanks.
Update: If my perspective on xsd is wrong please shed some light on how xsds are used(or perhaps point me to some useful links). | 0 |
75,937 | 09/16/2008 19:20:22 | 13,461 | 09/16/2008 19:12:35 | 1 | 0 | How to import homepath into c program using gcc | I am using gcc for windows. The OS is windows XP.
How do I import the homepath variable into my c program so I can write to c:\%homepath%\desktop? I would like to use something similar to:
fd = fopen("C:\\%%homepath%%\\desktop\\helloworld.txt","w");
| c | gcc | null | null | null | null | open | How to import homepath into c program using gcc
===
I am using gcc for windows. The OS is windows XP.
How do I import the homepath variable into my c program so I can write to c:\%homepath%\desktop? I would like to use something similar to:
fd = fopen("C:\\%%homepath%%\\desktop\\helloworld.txt","w");
| 0 |
75,943 | 09/16/2008 19:20:45 | 4,243 | 09/02/2008 13:58:45 | 1 | 0 | How do you execute a dynamically loaded JavaScript block? | I'm working on a web page where I'm making an AJAX call that returns a chunk of HTML like:
<div>
<!-- some html -->
<script type="text/javascript">
/** some javascript */
</script>
</div>
I'm inserting the whole thing into the DOM, but the JavaScript isn't being run. Is there a way to run it?
Some details: I can't control what's in the script block (so I can't change it to a function that could be called), I just need the whole block to be executed. I can't call eval on the response because the JavaScript is within a larger block of HTML. I could do some kind of regex to separate out the JavaScript and then call eval on it, but that's pretty yucky. Anyone know a better way? | javascript | ajax | null | null | null | null | open | How do you execute a dynamically loaded JavaScript block?
===
I'm working on a web page where I'm making an AJAX call that returns a chunk of HTML like:
<div>
<!-- some html -->
<script type="text/javascript">
/** some javascript */
</script>
</div>
I'm inserting the whole thing into the DOM, but the JavaScript isn't being run. Is there a way to run it?
Some details: I can't control what's in the script block (so I can't change it to a function that could be called), I just need the whole block to be executed. I can't call eval on the response because the JavaScript is within a larger block of HTML. I could do some kind of regex to separate out the JavaScript and then call eval on it, but that's pretty yucky. Anyone know a better way? | 0 |
75,947 | 09/16/2008 19:21:19 | 4,898 | 09/06/2008 13:39:41 | 1 | 0 | How can I make Internet Explorer not change the colors in my PNG images | When using PNG files (made with Paint.NET) as background images on my web site, IE7 is changing the colors and actually displaying a darker version of my images, as seen [here][1]. In this image, the dark background and background image should be both #001122, and the medium background and background image #004466. But IE7 changes the images to #000C1A and #003A5B respectively. No problem with FF3.
[1]: http://twitpic.com/bud1 "IE7 dithering"
| html | internet-explorer-7 | png | null | null | null | open | How can I make Internet Explorer not change the colors in my PNG images
===
When using PNG files (made with Paint.NET) as background images on my web site, IE7 is changing the colors and actually displaying a darker version of my images, as seen [here][1]. In this image, the dark background and background image should be both #001122, and the medium background and background image #004466. But IE7 changes the images to #000C1A and #003A5B respectively. No problem with FF3.
[1]: http://twitpic.com/bud1 "IE7 dithering"
| 0 |
75,959 | 09/16/2008 19:22:33 | 1,300 | 08/14/2008 12:59:41 | 13 | 3 | How to Implement Persistence Ignorance with Entity Framework | I have used the Entity Framework to start a fairly simple sample project. In the project, I have created a new Entity Data Model from a SQL Server 2000 database. I am able to query the data using LINQ to Entities and display values on the screen.
I have an Oracle database with an extremely similar schema (I am trying to be exact but I do not know all the details of Oracle). I would like my project to be able to run on both the SQL Server and Oracle data stores with minimal effort. I was hoping that I could simply change the configuration string of my Entity Data Model and the Entity Framework would take care of the rest. However, it appears that will not work at seamlessly as I thought.
Has anyone done what I am trying to do? Again, I am trying to write an application that can query (and update) data from a SQL Server or Oracle database with minimal effort using the Entity Framework. The secondary goal is to not have to re-compile the application when switching back and forth between data stores. If I have to "Update Model from Database" that might be ok because I wouldn't have to recompile, but I'd prefer not to have to go this route. Does anyone know of any steps that might be necessary? | entity-framework | linq-to-entities | oracle | null | null | null | open | How to Implement Persistence Ignorance with Entity Framework
===
I have used the Entity Framework to start a fairly simple sample project. In the project, I have created a new Entity Data Model from a SQL Server 2000 database. I am able to query the data using LINQ to Entities and display values on the screen.
I have an Oracle database with an extremely similar schema (I am trying to be exact but I do not know all the details of Oracle). I would like my project to be able to run on both the SQL Server and Oracle data stores with minimal effort. I was hoping that I could simply change the configuration string of my Entity Data Model and the Entity Framework would take care of the rest. However, it appears that will not work at seamlessly as I thought.
Has anyone done what I am trying to do? Again, I am trying to write an application that can query (and update) data from a SQL Server or Oracle database with minimal effort using the Entity Framework. The secondary goal is to not have to re-compile the application when switching back and forth between data stores. If I have to "Update Model from Database" that might be ok because I wouldn't have to recompile, but I'd prefer not to have to go this route. Does anyone know of any steps that might be necessary? | 0 |
75,976 | 09/16/2008 19:24:24 | 730 | 08/08/2008 12:40:04 | 248 | 37 | How/When to abandon the use of Arrays in c#.net? | I've always been told that adding an element to an array happens like this:
> An empty copy of the array+1element is
> created and then the data from the
> original array is copied into it then
> the new data for the new element is
> then loaded
If this is true, then using an array within a scenario that requires a lot of element activity is contra-indicated due to memory and cup utilization, correct?
If that is the case, shouldn't you try to avoid using an array as much as possible when you will be adding a lot of elements? Should you use iStringMap instead? If so, what happens if you need more than 2 dimensions AND need to add a lot of element additions do you just take the performance hit or is there something else that should be used?
| arrays | c# | theory | .net | null | null | open | How/When to abandon the use of Arrays in c#.net?
===
I've always been told that adding an element to an array happens like this:
> An empty copy of the array+1element is
> created and then the data from the
> original array is copied into it then
> the new data for the new element is
> then loaded
If this is true, then using an array within a scenario that requires a lot of element activity is contra-indicated due to memory and cup utilization, correct?
If that is the case, shouldn't you try to avoid using an array as much as possible when you will be adding a lot of elements? Should you use iStringMap instead? If so, what happens if you need more than 2 dimensions AND need to add a lot of element additions do you just take the performance hit or is there something else that should be used?
| 0 |
75,978 | 09/16/2008 19:24:31 | 2,748 | 08/24/2008 21:16:15 | 1 | 1 | Accessing App.config in a location different from the binary | In a .NET Win console application, I would like to access an App.config file in a location different from the console application binary. For example, how can C:\bin\Text.exe get its settings from C:\Test.exe.config? | c# | null | null | null | null | null | open | Accessing App.config in a location different from the binary
===
In a .NET Win console application, I would like to access an App.config file in a location different from the console application binary. For example, how can C:\bin\Text.exe get its settings from C:\Test.exe.config? | 0 |
75,980 | 09/16/2008 19:24:34 | 1,341 | 08/14/2008 15:30:17 | 464 | 14 | Best practice: escape, or encodeURI / encodeURIComponent | When encoding a query string to be sent to a web server - what is the best practice to use from javascript:
Use escape:
escape("% +&=");
OR
use encodeURI() / encodeURIComponent()
encodeURI("http://www.google.com?var1=value1&var2=value2");
encodeURIComponent("var1=value1&var2=value2");
| javascript | encoding | query-string | null | null | null | open | Best practice: escape, or encodeURI / encodeURIComponent
===
When encoding a query string to be sent to a web server - what is the best practice to use from javascript:
Use escape:
escape("% +&=");
OR
use encodeURI() / encodeURIComponent()
encodeURI("http://www.google.com?var1=value1&var2=value2");
encodeURIComponent("var1=value1&var2=value2");
| 0 |
76,002 | 09/16/2008 19:27:31 | 3,279 | 08/27/2008 16:46:21 | 1,413 | 52 | Git pack file entry format | My understanding of the Git pack file format is something like:
![alt text][1]
[1]: http://content.screencast.com/users/aggieben/folders/Jing/media/dc42fabf-6fd6-47f3-9244-446b9ec04494/2008-09-16_1424.png
Where the table is 32-bits wide, and the first three 32-bit words are the pack file header. The last row of 32 bits are the first 4 bytes of an entry. As I understand it, the size of the entry is specified by consecutive bytes with the MSB set, followed by compressed data.
In the first byte whose MSB is not set, is the MSB part of the compressed data, or is it a gap? If it's part of the compressed data, how can you guarantee that when the data is compressed that bit won't be set? | untagged | null | null | null | null | null | open | Git pack file entry format
===
My understanding of the Git pack file format is something like:
![alt text][1]
[1]: http://content.screencast.com/users/aggieben/folders/Jing/media/dc42fabf-6fd6-47f3-9244-446b9ec04494/2008-09-16_1424.png
Where the table is 32-bits wide, and the first three 32-bit words are the pack file header. The last row of 32 bits are the first 4 bytes of an entry. As I understand it, the size of the entry is specified by consecutive bytes with the MSB set, followed by compressed data.
In the first byte whose MSB is not set, is the MSB part of the compressed data, or is it a gap? If it's part of the compressed data, how can you guarantee that when the data is compressed that bit won't be set? | 0 |
76,029 | 09/16/2008 19:30:00 | 13,277 | 09/16/2008 18:01:28 | 6 | 0 | How do you measure downstream bandwidth per user? | In a Linux-based system (specifically, Ubuntu Server 8.04), how can you measure downstream bandwidth on a per-user basis? Optimally, I would like a method that provides data directly instead of having to run another process and parse its output. I have a technique for measuring per-user upstream bandwidth by setting up one iptables filter per user and checking their counters at regular intervals, but this doesn't seem to be supported for downstream connections, which I assume is because iptables checks packets before they are routed to a process. | linux | bandwidth | upstream | outbound | null | null | open | How do you measure downstream bandwidth per user?
===
In a Linux-based system (specifically, Ubuntu Server 8.04), how can you measure downstream bandwidth on a per-user basis? Optimally, I would like a method that provides data directly instead of having to run another process and parse its output. I have a technique for measuring per-user upstream bandwidth by setting up one iptables filter per user and checking their counters at regular intervals, but this doesn't seem to be supported for downstream connections, which I assume is because iptables checks packets before they are routed to a process. | 0 |
76,042 | 09/16/2008 19:31:29 | 8,530 | 09/15/2008 16:15:44 | 81 | 8 | Java 1.6 JDK took, VisualVM | Has anyone used the new Java 1.6 JDK tool, [VisualVM][1], to profile a production application and how does the application perform while being profiled?
The documentation say that it is designed for both Production and Development use, but based on previous profiling experience, with other profiling tools, I am hesitant.
[1]: https://visualvm.dev.java.net/ | java | profiling | null | null | null | null | open | Java 1.6 JDK took, VisualVM
===
Has anyone used the new Java 1.6 JDK tool, [VisualVM][1], to profile a production application and how does the application perform while being profiled?
The documentation say that it is designed for both Production and Development use, but based on previous profiling experience, with other profiling tools, I am hesitant.
[1]: https://visualvm.dev.java.net/ | 0 |
76,044 | 09/16/2008 19:31:38 | 13,355 | 09/16/2008 18:32:39 | 11 | 5 | Is there a way to productively do Silverlight development without buying VS2008? | It seems that Microsoft wants Silverlight to take off, yet I cannot find an easy way to develop in it without buying Visual Studio 2008. Has anyone out there found a way to get the silverlight development environment in the express editions of Visual Studio? Any other tools? | silverlight | visual-studio-express | null | null | null | null | open | Is there a way to productively do Silverlight development without buying VS2008?
===
It seems that Microsoft wants Silverlight to take off, yet I cannot find an easy way to develop in it without buying Visual Studio 2008. Has anyone out there found a way to get the silverlight development environment in the express editions of Visual Studio? Any other tools? | 0 |
76,047 | 09/16/2008 19:32:37 | 3,445 | 08/28/2008 15:44:18 | 141 | 5 | OCR Web Service | I am searching for an OCR web service (eventually open source, preferably free) that simply receives an image and returns the text of the image in writing.
I've looked at [tesseract][1], [OCRopus][2] and [GOCR][3] but the only open server I could find is [WeOCR][4]. Unfortunately the detection rates (at least during my tests) are sub-par and the speed is not much better.
Does anyone have any experience with OCR web services? I guess the license of tesseract allows the operation of such a service, are there any out there?
[1]: http://code.google.com/p/tesseract-ocr/
[2]: http://code.google.com/p/ocropus/
[3]: http://jocr.sourceforge.net/
[4]: http://weocr.ocrgrid.org/ | web-services | ocr | tesseract | null | null | 07/03/2012 14:22:57 | not constructive | OCR Web Service
===
I am searching for an OCR web service (eventually open source, preferably free) that simply receives an image and returns the text of the image in writing.
I've looked at [tesseract][1], [OCRopus][2] and [GOCR][3] but the only open server I could find is [WeOCR][4]. Unfortunately the detection rates (at least during my tests) are sub-par and the speed is not much better.
Does anyone have any experience with OCR web services? I guess the license of tesseract allows the operation of such a service, are there any out there?
[1]: http://code.google.com/p/tesseract-ocr/
[2]: http://code.google.com/p/ocropus/
[3]: http://jocr.sourceforge.net/
[4]: http://weocr.ocrgrid.org/ | 4 |
76,065 | 09/16/2008 19:35:34 | 13,519 | 09/16/2008 19:35:34 | 1 | 0 | How do I pass a variable to a mysql script? | I know that with mysql you can write SQL statements into a .sql file and run the file from the mysql command line like this:
mysql> source script.sql
How do I pass a variable to the script? For example, if I want to run a script that retrieves all the employees in a department, I want to be able to pass in the number of the department as a variable. | mysql | scripting | variables | null | null | null | open | How do I pass a variable to a mysql script?
===
I know that with mysql you can write SQL statements into a .sql file and run the file from the mysql command line like this:
mysql> source script.sql
How do I pass a variable to the script? For example, if I want to run a script that retrieves all the employees in a department, I want to be able to pass in the number of the department as a variable. | 0 |
76,074 | 09/16/2008 19:36:41 | 1,204 | 08/13/2008 13:02:12 | 108 | 6 | How can I delete a service in Windows? | I have a couple old services that I want to completely uninstall. How can I do this? | windows | sysadmin | service | administration | null | null | open | How can I delete a service in Windows?
===
I have a couple old services that I want to completely uninstall. How can I do this? | 0 |
76,076 | 09/16/2008 19:36:50 | 13,405 | 09/16/2008 18:49:48 | 1 | 0 | Computationally efficient three dimensional arrays in C | I am trying to solve numerically a set of partial differential equations in three dimensions. In each of the equations the next value of the unknown in a point depends on the current value of each unknown in the closest points.
To write an efficient code I need to keep the points close in the three dimensions close in the (one-dimensional) memory space, so that each value is called from memory just once.
I was thinking of using octtrees, but I was wondering if someone knows a better method. | c | arrays | numerical | multidimensional | null | null | open | Computationally efficient three dimensional arrays in C
===
I am trying to solve numerically a set of partial differential equations in three dimensions. In each of the equations the next value of the unknown in a point depends on the current value of each unknown in the closest points.
To write an efficient code I need to keep the points close in the three dimensions close in the (one-dimensional) memory space, so that each value is called from memory just once.
I was thinking of using octtrees, but I was wondering if someone knows a better method. | 0 |
76,079 | 09/16/2008 19:37:06 | 13,337 | 09/16/2008 18:24:57 | 1 | 0 | how to put an .net application in system tray when minimized? | can anyone please suggest a **good code example** of vb.net/c# code to put the application in system tray when minized. | system | system-tray | null | null | null | null | open | how to put an .net application in system tray when minimized?
===
can anyone please suggest a **good code example** of vb.net/c# code to put the application in system tray when minized. | 0 |
76,080 | 09/16/2008 19:37:07 | 10,973 | 09/16/2008 03:36:05 | 36 | 6 | How do you reliably get the Quick Launch folder in XP and Vista? | We need to reliably get the Quick Launch folder for both All and Current users under both Vista and XP. I'm developing in C++, but this is probably more of a general Windows API question.
For reference, here is code to get the Application Data folder under both systems:
HRESULT hres;
CString basePath;
hres = SHGetSpecialFolderPath(this->GetSafeHwnd(), basePath.GetBuffer(MAX_PATH), CSIDL_APPDATA, FALSE);
basePath.ReleaseBuffer();
I suspect this is just a matter of knowing which sub-folder Microsoft uses.
Under Windows XP, the app data subfolder is:
Microsoft\Internet Explorer\Quick Launch
Under Vista, it appears that the sub-folder has been changed to:
Roaming\Microsoft\Internet Explorer\Quick Launch
but I'd like to make sure that this is the correct way to determine the correct location. | windows | vc++ | null | null | null | null | open | How do you reliably get the Quick Launch folder in XP and Vista?
===
We need to reliably get the Quick Launch folder for both All and Current users under both Vista and XP. I'm developing in C++, but this is probably more of a general Windows API question.
For reference, here is code to get the Application Data folder under both systems:
HRESULT hres;
CString basePath;
hres = SHGetSpecialFolderPath(this->GetSafeHwnd(), basePath.GetBuffer(MAX_PATH), CSIDL_APPDATA, FALSE);
basePath.ReleaseBuffer();
I suspect this is just a matter of knowing which sub-folder Microsoft uses.
Under Windows XP, the app data subfolder is:
Microsoft\Internet Explorer\Quick Launch
Under Vista, it appears that the sub-folder has been changed to:
Roaming\Microsoft\Internet Explorer\Quick Launch
but I'd like to make sure that this is the correct way to determine the correct location. | 0 |
76,083 | 09/16/2008 19:37:27 | 9,169 | 09/15/2008 17:56:35 | 1 | 0 | Parsing SQL in .NET | I'm trying to build a .NET Managed data provider and I need to be able to parse SQL commands.
What are good, free (as in beer) objects to do this? - I haven't seen any standard .NET assemblies for this yet.
Thanks,
Eli. | .net | sql | null | null | null | null | open | Parsing SQL in .NET
===
I'm trying to build a .NET Managed data provider and I need to be able to parse SQL commands.
What are good, free (as in beer) objects to do this? - I haven't seen any standard .NET assemblies for this yet.
Thanks,
Eli. | 0 |
76,092 | 09/16/2008 19:38:29 | 10,703 | 09/16/2008 01:08:24 | 205 | 9 | What are some Real-Time Operating Systems for 32-bit processors? | What RTOS have you used or recommend for 32-bit processors.
I'm interested in mainstream processors here: PowerPC, Pentium, ARM, MIPS
A link to a web site would be a nice bonus.
Let's conduct this as a poll. Please only provide one selection per answer and mod up if you agree with a selection already present. | operating-system | rtos | polls | embedded | null | 05/05/2012 13:43:02 | not constructive | What are some Real-Time Operating Systems for 32-bit processors?
===
What RTOS have you used or recommend for 32-bit processors.
I'm interested in mainstream processors here: PowerPC, Pentium, ARM, MIPS
A link to a web site would be a nice bonus.
Let's conduct this as a poll. Please only provide one selection per answer and mod up if you agree with a selection already present. | 4 |
76,096 | 09/16/2008 19:38:45 | 64,673 | 09/16/2008 19:31:39 | 1 | 0 | Undo with GTK TextView | I'm trying to keep dependencies to a minimum for a program I contribute to, it's a small text editor.
GTK Textview doesn't seem to come with a built-in undo function. Is there any reference implementation I've been missing on so far? Is everyone writing their own undo function for their TextView widgets?
I'll be happy about any sample code - most happy about python sample code, as our project is in python. | python | text-editor | gtk | undo | null | null | open | Undo with GTK TextView
===
I'm trying to keep dependencies to a minimum for a program I contribute to, it's a small text editor.
GTK Textview doesn't seem to come with a built-in undo function. Is there any reference implementation I've been missing on so far? Is everyone writing their own undo function for their TextView widgets?
I'll be happy about any sample code - most happy about python sample code, as our project is in python. | 0 |
76,134 | 09/16/2008 19:42:33 | 8,409 | 09/15/2008 15:57:22 | 11 | 2 | How do I reverse-project 2D points into 3D? | I have 4 2D points in screen-space, and I need to reverse-project them back into 3D space. I know that each of the 4 points is a corner of a 3D-rotated rigid rectangle, and I know the size of the rectangle. How can I get 3D coordinates from this?
I am not using any particular API, I'm just looking for basic math to do this. | reverseprojection | 2d | 3d | geometry | math | null | open | How do I reverse-project 2D points into 3D?
===
I have 4 2D points in screen-space, and I need to reverse-project them back into 3D space. I know that each of the 4 points is a corner of a 3D-rotated rigid rectangle, and I know the size of the rectangle. How can I get 3D coordinates from this?
I am not using any particular API, I'm just looking for basic math to do this. | 0 |
76,179 | 09/16/2008 19:47:36 | 4,092 | 09/01/2008 18:30:58 | 121 | 2 | How to determine if the user's browser can view PDF files | What's the best way for determining whether the user's browser can view PDF files?
Ideally, it shouldn't matter on the browser or the operating system.
Is there a specific way of doing it in ASP.NET, or would the answer be just JavaScript? | asp.net | javascript | browser | pdf | null | null | open | How to determine if the user's browser can view PDF files
===
What's the best way for determining whether the user's browser can view PDF files?
Ideally, it shouldn't matter on the browser or the operating system.
Is there a specific way of doing it in ASP.NET, or would the answer be just JavaScript? | 0 |
76,184 | 09/16/2008 19:48:11 | 13,281 | 09/16/2008 18:02:24 | 6 | 3 | PHP Tutorial for OpenId and OAuth | Is there a good tutorial for implementing OpenId and OAuth together in PHP? All of the OpenId tutorials I've seen on the official OpenId site haven't been as helpful or as simple as they could have been. I don't think I've seen any tutorials on using both of them together. (For OpenId, I'd want to be both a provider and a consumer.) | php | openid | oauth | tutorials | null | null | open | PHP Tutorial for OpenId and OAuth
===
Is there a good tutorial for implementing OpenId and OAuth together in PHP? All of the OpenId tutorials I've seen on the official OpenId site haven't been as helpful or as simple as they could have been. I don't think I've seen any tutorials on using both of them together. (For OpenId, I'd want to be both a provider and a consumer.) | 0 |
76,194 | 09/16/2008 19:48:44 | 13,501 | 09/16/2008 19:25:29 | 1 | 0 | Should protected attributes always be banned ? | I seldom use inheritance, but when I do, I never use protected attributes because I think it breaks the encapsulation of the inherited classes.
Do you use protected attributes ? what do you use them for ?
| oop | null | null | null | null | null | open | Should protected attributes always be banned ?
===
I seldom use inheritance, but when I do, I never use protected attributes because I think it breaks the encapsulation of the inherited classes.
Do you use protected attributes ? what do you use them for ?
| 0 |
76,204 | 09/16/2008 19:49:32 | 258 | 08/04/2008 07:59:04 | 36 | 3 | How do I get an attribute value when using an XSLT with unknown namespaceI am currently having to use the local-name() function in my XLST to get the element values. However I need to get an attribute from one such element and I don't know how to do | I am currently having to use the local-name() function in my XLST to get the element values. However I need to get an attribute from one such element and I don't know how to do this when the namespaces are annoymous (hence need for local-name() function).
Here is a sample of the xml:
<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom'>
<id>some id</id>
<title>some title</title>
<updated>2008-09-11T15:53:31+01:00</updated>
<link rel='self' href='http://www.somefeedurl.co.uk'/>
<author>
<name>some author</name>
<uri>http://someuri.co.uk</uri>
</author>
<generator uri='http://aardvarkmedia.co.uk/'>AardvarkMedia script</generator>
<entry>
<id>http://soemaddress.co.uk/branded3/80406</id>
<title type='html'>My Ttile</title>
<link rel='alternate' href='http://www.someurl.co.uk'/>
<updated>2008-02-13T00:00:00+01:00</updated>
<published>2002-09-11T14:16:20+01:00</published>
<category term='mycategorytext' label='restaurant'>Test</category>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<div class='vcard'>
<p class='fn org'>some title</p>
<p class='adr'>
<abbr class='type' title='POSTAL'></abbr>
<span class='street-address'>54 Some Street</span>,
<span class='locality'></span>,
<span class='country-name'>UK</span>
</p>
<p class='tel'>
<span class='value'>0123456789</span>
</p>
<div class='geo'>
<span class='latitude'>51.99999</span>, <span class='longitude'>-0.123456</span>
</div>
<p class='note'>
<span class='type'>Review</span>
<span class='value'>
Some content
</span>
</p>
<p class='note'>
<span class='type'>Overall rating</span>
<span class='value'>8</span>
</p>
</div>
</div>
</content>
<category term='cuisine-54' label='Spanish'/>
<Point xmlns='http://www.w3.org/2003/01/geo/wgs84_pos#'>
<lat>51.123456789</lat><long>-0.11111111</long>
</Point>
</entry>
</feed>
This is xslt
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:wgs="http://www.w3.org/2003/01/geo/wgs84_pos#" exclude-result-prefixes="atom wgs">
<xsl:output method="xml" indent="yes"/>
<xsl:key name="uniqueVenuesKey" match="entry" use="id"/>
<xsl:key name="uniqueCategoriesKey" match="entry" use="category/@term"/>
<xsl:template match="/">
<locations>
<!-- Get all unique venues -->
<xsl:for-each select="/*[local-name()='feed']/*[local-name()='entry']">
<xsl:variable name="CurrentVenueKey" select="*[local-name()='id']" ></xsl:variable>
<xsl:variable name="CurrentVenueName" select="*[local-name()='title']" ></xsl:variable>
<xsl:variable name="CurrentVenueAddress1" select="*[local-name()='content']/*[local-name()='div']/*[local-name()='div']/*[local-name()='p'][@class='adr']/*[local-name()='span'][@class='street-address']" ></xsl:variable>
<xsl:variable name="CurrentVenueCity" select="*[local-name()='content']/*[local-name()='div']/*[local-name()='div']/*[local-name()='p'][@class='adr']/*[local-name()='span'][@class='locality']" ></xsl:variable>
<xsl:variable name="CurrentVenuePostcode" select="*[local-name()='postcode']" ></xsl:variable>
<xsl:variable name="CurrentVenueTelephone" select="*[local-name()='telephone']" ></xsl:variable>
<xsl:variable name="CurrentVenueLat" select="*[local-name()='Point']/*[local-name()='lat']" ></xsl:variable>
<xsl:variable name="CurrentVenueLong" select="*[local-name()='Point']/*[local-name()='long']" ></xsl:variable>
<xsl:variable name="CurrentCategory" select="WHATDOIPUTHERE"></xsl:variable>
<location>
<locationName>
<xsl:value-of select = "$CurrentVenueName" />
</locationName>
<category>
<xsl:value-of select = "$CurrentCategory" />
</category>
<description>
<xsl:value-of select = "$CurrentVenueName" />
</description>
<venueAddress>
<streetName>
<xsl:value-of select = "$CurrentVenueAddress1" />
</streetName>
<town>
<xsl:value-of select = "$CurrentVenueCity" />
</town>
<postcode>
<xsl:value-of select = "$CurrentVenuePostcode" />
</postcode>
<wgs84_latitude>
<xsl:value-of select = "$CurrentVenueLat" />
</wgs84_latitude>
<wgs84_longitude>
<xsl:value-of select = "$CurrentVenueLong" />
</wgs84_longitude>
</venueAddress>
<venuePhone>
<phonenumber>
<xsl:value-of select = "$CurrentVenueTelephone" />
</phonenumber>
</venuePhone>
</location>
</xsl:for-each>
</locations>
</xsl:template>
</xsl:stylesheet>
I'm trying to replace the $CurrentCategory variable the appropriate code to display *mycategorytext*
Thanks in advance | xml | xslt | namespaces | null | null | null | open | How do I get an attribute value when using an XSLT with unknown namespaceI am currently having to use the local-name() function in my XLST to get the element values. However I need to get an attribute from one such element and I don't know how to do
===
I am currently having to use the local-name() function in my XLST to get the element values. However I need to get an attribute from one such element and I don't know how to do this when the namespaces are annoymous (hence need for local-name() function).
Here is a sample of the xml:
<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom'>
<id>some id</id>
<title>some title</title>
<updated>2008-09-11T15:53:31+01:00</updated>
<link rel='self' href='http://www.somefeedurl.co.uk'/>
<author>
<name>some author</name>
<uri>http://someuri.co.uk</uri>
</author>
<generator uri='http://aardvarkmedia.co.uk/'>AardvarkMedia script</generator>
<entry>
<id>http://soemaddress.co.uk/branded3/80406</id>
<title type='html'>My Ttile</title>
<link rel='alternate' href='http://www.someurl.co.uk'/>
<updated>2008-02-13T00:00:00+01:00</updated>
<published>2002-09-11T14:16:20+01:00</published>
<category term='mycategorytext' label='restaurant'>Test</category>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<div class='vcard'>
<p class='fn org'>some title</p>
<p class='adr'>
<abbr class='type' title='POSTAL'></abbr>
<span class='street-address'>54 Some Street</span>,
<span class='locality'></span>,
<span class='country-name'>UK</span>
</p>
<p class='tel'>
<span class='value'>0123456789</span>
</p>
<div class='geo'>
<span class='latitude'>51.99999</span>, <span class='longitude'>-0.123456</span>
</div>
<p class='note'>
<span class='type'>Review</span>
<span class='value'>
Some content
</span>
</p>
<p class='note'>
<span class='type'>Overall rating</span>
<span class='value'>8</span>
</p>
</div>
</div>
</content>
<category term='cuisine-54' label='Spanish'/>
<Point xmlns='http://www.w3.org/2003/01/geo/wgs84_pos#'>
<lat>51.123456789</lat><long>-0.11111111</long>
</Point>
</entry>
</feed>
This is xslt
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:wgs="http://www.w3.org/2003/01/geo/wgs84_pos#" exclude-result-prefixes="atom wgs">
<xsl:output method="xml" indent="yes"/>
<xsl:key name="uniqueVenuesKey" match="entry" use="id"/>
<xsl:key name="uniqueCategoriesKey" match="entry" use="category/@term"/>
<xsl:template match="/">
<locations>
<!-- Get all unique venues -->
<xsl:for-each select="/*[local-name()='feed']/*[local-name()='entry']">
<xsl:variable name="CurrentVenueKey" select="*[local-name()='id']" ></xsl:variable>
<xsl:variable name="CurrentVenueName" select="*[local-name()='title']" ></xsl:variable>
<xsl:variable name="CurrentVenueAddress1" select="*[local-name()='content']/*[local-name()='div']/*[local-name()='div']/*[local-name()='p'][@class='adr']/*[local-name()='span'][@class='street-address']" ></xsl:variable>
<xsl:variable name="CurrentVenueCity" select="*[local-name()='content']/*[local-name()='div']/*[local-name()='div']/*[local-name()='p'][@class='adr']/*[local-name()='span'][@class='locality']" ></xsl:variable>
<xsl:variable name="CurrentVenuePostcode" select="*[local-name()='postcode']" ></xsl:variable>
<xsl:variable name="CurrentVenueTelephone" select="*[local-name()='telephone']" ></xsl:variable>
<xsl:variable name="CurrentVenueLat" select="*[local-name()='Point']/*[local-name()='lat']" ></xsl:variable>
<xsl:variable name="CurrentVenueLong" select="*[local-name()='Point']/*[local-name()='long']" ></xsl:variable>
<xsl:variable name="CurrentCategory" select="WHATDOIPUTHERE"></xsl:variable>
<location>
<locationName>
<xsl:value-of select = "$CurrentVenueName" />
</locationName>
<category>
<xsl:value-of select = "$CurrentCategory" />
</category>
<description>
<xsl:value-of select = "$CurrentVenueName" />
</description>
<venueAddress>
<streetName>
<xsl:value-of select = "$CurrentVenueAddress1" />
</streetName>
<town>
<xsl:value-of select = "$CurrentVenueCity" />
</town>
<postcode>
<xsl:value-of select = "$CurrentVenuePostcode" />
</postcode>
<wgs84_latitude>
<xsl:value-of select = "$CurrentVenueLat" />
</wgs84_latitude>
<wgs84_longitude>
<xsl:value-of select = "$CurrentVenueLong" />
</wgs84_longitude>
</venueAddress>
<venuePhone>
<phonenumber>
<xsl:value-of select = "$CurrentVenueTelephone" />
</phonenumber>
</venuePhone>
</location>
</xsl:for-each>
</locations>
</xsl:template>
</xsl:stylesheet>
I'm trying to replace the $CurrentCategory variable the appropriate code to display *mycategorytext*
Thanks in advance | 0 |
76,206 | 09/16/2008 19:49:52 | 2,915 | 08/25/2008 23:15:12 | 3,872 | 162 | Quick C# prototype program with simple DB | Okay, I've seen but haven't programmed in C# before. You can assume I'm competent in C++, and advanced in C (for what good that'll do me). I understand inheritance, polymorphism, etc so OO concepts aren't going to be a huge problem.
Let's say I've been given a task to prototype a quick and dirty program that won't be much different than what I could do in access in a short time.
- It'll have a DB with 5-6 tables (mostly small, a few with have several thousand rows but only 4 or so columns, etc)
- I'll need to have forms generated dynamically from one of the DBs
- The results of the forms will be stored in another table
- The DB isn't multiuser
Basically your run of the mill access app... except without access. I'm sure I can muddle my way through and create horrendously bad code, but I'm equally sure lots of people here can give me a push in the right direction (tutorials, wizards, info, differences and killers moving from C/C++ to C#, etc).
Is there a simple DB I can plug in to get started aside from mdb, or is that the best choice for this particular nail? I'm aiming for a quick and dependency-less install.
Thanks!
-Adam | c# | db | prototype | null | null | null | open | Quick C# prototype program with simple DB
===
Okay, I've seen but haven't programmed in C# before. You can assume I'm competent in C++, and advanced in C (for what good that'll do me). I understand inheritance, polymorphism, etc so OO concepts aren't going to be a huge problem.
Let's say I've been given a task to prototype a quick and dirty program that won't be much different than what I could do in access in a short time.
- It'll have a DB with 5-6 tables (mostly small, a few with have several thousand rows but only 4 or so columns, etc)
- I'll need to have forms generated dynamically from one of the DBs
- The results of the forms will be stored in another table
- The DB isn't multiuser
Basically your run of the mill access app... except without access. I'm sure I can muddle my way through and create horrendously bad code, but I'm equally sure lots of people here can give me a push in the right direction (tutorials, wizards, info, differences and killers moving from C/C++ to C#, etc).
Is there a simple DB I can plug in to get started aside from mdb, or is that the best choice for this particular nail? I'm aiming for a quick and dependency-less install.
Thanks!
-Adam | 0 |
76,208 | 09/16/2008 19:50:06 | 11,063 | 09/16/2008 04:28:20 | 1 | 1 | Good way to time SQL queries when using Linq to SQL | Is there a good way to time SQL queries when using Linq to SQL? I really like logging feature, but it would be great if you could somehow also time that query. Any ideas? | .net | linq | optimization | linq-to-sql | logging | null | open | Good way to time SQL queries when using Linq to SQL
===
Is there a good way to time SQL queries when using Linq to SQL? I really like logging feature, but it would be great if you could somehow also time that query. Any ideas? | 0 |
76,210 | 09/16/2008 19:50:20 | 64 | 08/01/2008 14:27:12 | 312 | 19 | Production, Test, Developer Environments vs Security | What are current practices for enabling developers to build systems that contain private data? Can anyone point to a "best practices" guide for that sort of thing?
We have a Catch-22 here in that developers need to write applications that go against systems that have data that is considered "private." The IT administration would like for us developers to not have access to the data (ie. provide a schema or data structure, but not data itself) whereas most developers (myself included) would like to have access to the production data since not having a representative dataset can lead to bad assumptions (eg. the format of data) and bugs later on.
Does anyone have any formalized "best practices" for this type of thing? Especially official guildines from some "BigCo" (eg. Microsoft, IBM) might help since it is needed to convince management. | security | null | null | null | null | null | open | Production, Test, Developer Environments vs Security
===
What are current practices for enabling developers to build systems that contain private data? Can anyone point to a "best practices" guide for that sort of thing?
We have a Catch-22 here in that developers need to write applications that go against systems that have data that is considered "private." The IT administration would like for us developers to not have access to the data (ie. provide a schema or data structure, but not data itself) whereas most developers (myself included) would like to have access to the production data since not having a representative dataset can lead to bad assumptions (eg. the format of data) and bugs later on.
Does anyone have any formalized "best practices" for this type of thing? Especially official guildines from some "BigCo" (eg. Microsoft, IBM) might help since it is needed to convince management. | 0 |
76,214 | 09/16/2008 19:50:35 | 4,110 | 09/01/2008 20:20:54 | 24 | 5 | Windows Mobile 6 J2SE-scale JVM implementation | Does anybody have experience of a decent J2SE (preferably at least Java JDK 1.5-level) Java Virtual Machine for Windows Mobile 6? If you know of any CLDC VMs, I'm also interested because even that would be better than what we [currently have][1] for the platform.
[1]: http://www.nsicom.com/Default.aspx?tabid=138 | windows-mobile | java-me | java | null | null | null | open | Windows Mobile 6 J2SE-scale JVM implementation
===
Does anybody have experience of a decent J2SE (preferably at least Java JDK 1.5-level) Java Virtual Machine for Windows Mobile 6? If you know of any CLDC VMs, I'm also interested because even that would be better than what we [currently have][1] for the platform.
[1]: http://www.nsicom.com/Default.aspx?tabid=138 | 0 |
76,217 | 09/16/2008 19:50:58 | 13,455 | 09/16/2008 19:11:02 | 1 | 1 | What (good) Java RADIUS server libraries are out there? | I've only been able to find two thus far, namely <a href="http://tinyradius.sourceforge.net/">TinyRadius</a>, which itself discourages production use and <a href="http://www.axlradius.com/">AXL</a>, which is pay-only.
<a href="http://coova.org/wiki/index.php/JRadius">JRadius</a> seems tied to <a href="http://freeradius.org/">FreeRADIUS</a>, which isn't a library and will need a lot of cajoling to function like one.
| java | hammer | radius | null | null | null | open | What (good) Java RADIUS server libraries are out there?
===
I've only been able to find two thus far, namely <a href="http://tinyradius.sourceforge.net/">TinyRadius</a>, which itself discourages production use and <a href="http://www.axlradius.com/">AXL</a>, which is pay-only.
<a href="http://coova.org/wiki/index.php/JRadius">JRadius</a> seems tied to <a href="http://freeradius.org/">FreeRADIUS</a>, which isn't a library and will need a lot of cajoling to function like one.
| 0 |
76,223 | 09/16/2008 19:51:21 | 7,008 | 09/15/2008 12:59:57 | 1 | 0 | Get Last Friday of Month in Java | I am working on a project where the requirement is to have a date calculated as being the last Friday of a given month. I think I have a solution that only uses standard Java, but I was wondering if anyone knew of anything more concise or efficient. Below is what I tested with for this year:
for (int month = 0; month < 13; month++) {
GregorianCalendar d = new GregorianCalendar();
d.set(d.MONTH, month);
System.out.println("Last Week of Month in " + d.getDisplayName(d.MONTH, Calendar.LONG, Locale.ENGLISH) + ": " + d.getLeastMaximum(d.WEEK_OF_MONTH));
d.set(d.DAY_OF_WEEK, d.FRIDAY);
d.set(d.WEEK_OF_MONTH, d.getActualMaximum(d.WEEK_OF_MONTH));
while (d.get(d.MONTH) > month || d.get(d.MONTH) < month) {
d.add(d.WEEK_OF_MONTH, -1);
}
Date dt = d.getTime();
System.out.println("Last Friday of Last Week in " + d.getDisplayName(d.MONTH, Calendar.LONG, Locale.ENGLISH) + ": " + dt.toString());
}
| java | calendar | date | null | null | null | open | Get Last Friday of Month in Java
===
I am working on a project where the requirement is to have a date calculated as being the last Friday of a given month. I think I have a solution that only uses standard Java, but I was wondering if anyone knew of anything more concise or efficient. Below is what I tested with for this year:
for (int month = 0; month < 13; month++) {
GregorianCalendar d = new GregorianCalendar();
d.set(d.MONTH, month);
System.out.println("Last Week of Month in " + d.getDisplayName(d.MONTH, Calendar.LONG, Locale.ENGLISH) + ": " + d.getLeastMaximum(d.WEEK_OF_MONTH));
d.set(d.DAY_OF_WEEK, d.FRIDAY);
d.set(d.WEEK_OF_MONTH, d.getActualMaximum(d.WEEK_OF_MONTH));
while (d.get(d.MONTH) > month || d.get(d.MONTH) < month) {
d.add(d.WEEK_OF_MONTH, -1);
}
Date dt = d.getTime();
System.out.println("Last Friday of Last Week in " + d.getDisplayName(d.MONTH, Calendar.LONG, Locale.ENGLISH) + ": " + dt.toString());
}
| 0 |
76,227 | 09/16/2008 19:52:25 | 12,981 | 09/16/2008 16:29:59 | 56 | 3 | What are some games with fairly simple heuristics to evaluate positions? | I'm teaching a kid programming, and am introducing some basic artificial intelligence concepts at the moment. To begin with we're going to implement a tic-tac-toe game that searches the entire game tree and as such plays perfectly. Once we finish that I want to apply the same concepts to a game that has too many positions to evaluate every single one, so that we need to implement a heuristic to evaluate intermediate positions.
The best thing I could think of was [Dots and Boxes][1]. It has the advantage that I can set the board size arbitrarily large to stop him from searching the entire tree, and I can make a very basic scoring function be the number of my boxes minus the number of opponent boxes. Unfortunately this means that for most of the beginning of the game every position will be evaluated equivalently with a score of 0, because it takes quite a few moves before players actually start making boxes.
Does anyone have any better ideas for games? (Or a better scoring function for dots and boxes)?
[1]: http://en.wikipedia.org/wiki/Dots-and-boxes | teaching | artificial-intelligence | heuristics | null | null | null | open | What are some games with fairly simple heuristics to evaluate positions?
===
I'm teaching a kid programming, and am introducing some basic artificial intelligence concepts at the moment. To begin with we're going to implement a tic-tac-toe game that searches the entire game tree and as such plays perfectly. Once we finish that I want to apply the same concepts to a game that has too many positions to evaluate every single one, so that we need to implement a heuristic to evaluate intermediate positions.
The best thing I could think of was [Dots and Boxes][1]. It has the advantage that I can set the board size arbitrarily large to stop him from searching the entire tree, and I can make a very basic scoring function be the number of my boxes minus the number of opponent boxes. Unfortunately this means that for most of the beginning of the game every position will be evaluated equivalently with a score of 0, because it takes quite a few moves before players actually start making boxes.
Does anyone have any better ideas for games? (Or a better scoring function for dots and boxes)?
[1]: http://en.wikipedia.org/wiki/Dots-and-boxes | 0 |
76,254 | 09/16/2008 19:55:17 | 5,446 | 09/09/2008 16:05:23 | 11 | 2 | access to auto increment identity field after SQL insert in java | Any advise on how to read auto incrementing identity field assigned to newly created record from call through java.sql.Statement.executeUpdate ?
I know how to do this in SQL for several DB platforms, but would like to know what database independent interfaces exist in java.sql to do this, and any input on peoples' experience with this across DB platforms.
| java | sql | null | null | null | null | open | access to auto increment identity field after SQL insert in java
===
Any advise on how to read auto incrementing identity field assigned to newly created record from call through java.sql.Statement.executeUpdate ?
I know how to do this in SQL for several DB platforms, but would like to know what database independent interfaces exist in java.sql to do this, and any input on peoples' experience with this across DB platforms.
| 0 |
76,258 | 09/16/2008 19:55:34 | 9,640 | 09/15/2008 19:26:15 | 1 | 0 | IIS Authentication across servers | My production environment involves a pair of IIS 6 web servers, one running legacy .NET 1.1 applications and the other running .NET 2.0 applications. We cannot install .NET 2.0 alongside 1.1 on the same machine because it is a tightly-regulated 'Validated System' and would present a bureaucratic nightmare to revalidate.
Websites on both servers use Basic Authentication against Active Directory user accounts.
Is it possible for a web application on the 1.1 server to securely redirect a user to a page served on the 2.0 server, without requiring users to re-authenticate? | .net | iis6 | asp.net-2.0 | asp.net-1.1 | null | null | open | IIS Authentication across servers
===
My production environment involves a pair of IIS 6 web servers, one running legacy .NET 1.1 applications and the other running .NET 2.0 applications. We cannot install .NET 2.0 alongside 1.1 on the same machine because it is a tightly-regulated 'Validated System' and would present a bureaucratic nightmare to revalidate.
Websites on both servers use Basic Authentication against Active Directory user accounts.
Is it possible for a web application on the 1.1 server to securely redirect a user to a page served on the 2.0 server, without requiring users to re-authenticate? | 0 |
76,267 | 09/16/2008 19:56:59 | 12,484 | 09/16/2008 14:32:04 | 11 | 3 | Hardware solutions for adding a third monitor to a laptop? | My primary development machine at work is a laptop. I currently run with two monitors, which the machine natively supports (an external monitor connected via the laptop's VGA or DVI port, plus the laptop's own attached screen).
I'd like to add a third monitor to my setup. What are some good hardware solutions for adding a third monitor, given that I can't add an additional internal PCI-E/PCI card to my machine?
(If anyone would care to offer hardware-specific solutions, my machine is a Lenovo Thinkpad T60 running Windows XP SP2.) | hardware | multiple-monitors | laptop | null | null | 08/02/2011 17:45:06 | off topic | Hardware solutions for adding a third monitor to a laptop?
===
My primary development machine at work is a laptop. I currently run with two monitors, which the machine natively supports (an external monitor connected via the laptop's VGA or DVI port, plus the laptop's own attached screen).
I'd like to add a third monitor to my setup. What are some good hardware solutions for adding a third monitor, given that I can't add an additional internal PCI-E/PCI card to my machine?
(If anyone would care to offer hardware-specific solutions, my machine is a Lenovo Thinkpad T60 running Windows XP SP2.) | 2 |
76,274 | 09/16/2008 19:57:58 | 13,552 | 09/16/2008 19:48:30 | 1 | 0 | Is it possible to indirectly load a value type on the stack | In Microsoft IL, to call a method on a value type you need an indirect reference. Lets say we have an ILGenerator named "il" and that currently we have a Nullable<int> on top of the stack, if we want to check whether it has a value then we could emit the following:
var local = il.DeclareLocal(typeof(Nullable<int>));
il.Emit(OpCodes.Stloc, local);
il.Emit(OpCodes.Ldloca, local);
var method = typeof(Nullable<int>).GetMethod("get_HasValue");
il.EmitCall(OpCodes.Call, method, null);
However it would be nice to skip saving it as a local variable, and simply call the method on the address of the variable already on the stack, something like:
il.Emit(/* not sure */);
var method = typeof(Nullable<int>).GetMethod("get_HasValue");
il.EmitCall(OpCodes.Call, method, null);
The ldind family of instructions looks promising (particularly ldind_ref) but I can't find sufficient documentation to know whether this would cause boxing of the value, which I suspect it might.
I've had a look at the C# compiler output, but it uses local variables to achieve this, which makes me believe the first way may be the only way. Anyone have any better ideas? | cil | reflection.emit | null | null | null | null | open | Is it possible to indirectly load a value type on the stack
===
In Microsoft IL, to call a method on a value type you need an indirect reference. Lets say we have an ILGenerator named "il" and that currently we have a Nullable<int> on top of the stack, if we want to check whether it has a value then we could emit the following:
var local = il.DeclareLocal(typeof(Nullable<int>));
il.Emit(OpCodes.Stloc, local);
il.Emit(OpCodes.Ldloca, local);
var method = typeof(Nullable<int>).GetMethod("get_HasValue");
il.EmitCall(OpCodes.Call, method, null);
However it would be nice to skip saving it as a local variable, and simply call the method on the address of the variable already on the stack, something like:
il.Emit(/* not sure */);
var method = typeof(Nullable<int>).GetMethod("get_HasValue");
il.EmitCall(OpCodes.Call, method, null);
The ldind family of instructions looks promising (particularly ldind_ref) but I can't find sufficient documentation to know whether this would cause boxing of the value, which I suspect it might.
I've had a look at the C# compiler output, but it uses local variables to achieve this, which makes me believe the first way may be the only way. Anyone have any better ideas? | 0 |
76,275 | 09/16/2008 19:58:05 | 9,882 | 09/15/2008 20:19:32 | 1 | 0 | How can I kill a process, using VBScript, started by a particular user. | I have multiple users running attachemate on a Windows 2003 server. I want to kill attachemate.exe started by user_1 without killing attachemate.exe started by user_2.
I want to use VBScript. | vbscript | windows-server-2003 | kill | null | null | null | open | How can I kill a process, using VBScript, started by a particular user.
===
I have multiple users running attachemate on a Windows 2003 server. I want to kill attachemate.exe started by user_1 without killing attachemate.exe started by user_2.
I want to use VBScript. | 0 |
76,291 | 09/16/2008 19:59:25 | 5,542 | 09/10/2008 11:35:17 | 11 | 5 | Find minimal necessary java classpath | Is there a tool to detect unneeded jar-files?
For instance say that I have myapp.jar, which I can launch with a classpath containing hibernate.jar, junit.jar and easymock.jar. But actually it will work fine using only hibernate.jar, since the code that calls junit.jar is not reachable.
I realize that reflection might complicate things, but I could live with a tool that ignored reflection. Except for that it seems like a relatively simple problem to solve. | java | jar | dependencies | null | null | null | open | Find minimal necessary java classpath
===
Is there a tool to detect unneeded jar-files?
For instance say that I have myapp.jar, which I can launch with a classpath containing hibernate.jar, junit.jar and easymock.jar. But actually it will work fine using only hibernate.jar, since the code that calls junit.jar is not reachable.
I realize that reflection might complicate things, but I could live with a tool that ignored reflection. Except for that it seems like a relatively simple problem to solve. | 0 |
76,300 | 09/16/2008 20:00:16 | 13,581 | 09/16/2008 20:00:16 | 1 | 0 | What's the best way to return variables from a syncExec? | In my SWT Java app I often want to return information from inside a Display.syncExec() call. The best way I've found so far to do this is:
ArrayList<Integer> result = new ArrayList<Integer>();
GUI.display().syncExec(new Runnable(){ public void run() {
MessageBox mb = /* ... */;
/* set up messagebox */
result.add(mb.open());
}});
if (SWT.OK == result.get(0)) { /* ... */ }
I think this is allowed because ArrayList is thread-safe, but is there a better container I should be using, or an easier way altogether? | swt | java | multithreading | null | null | null | open | What's the best way to return variables from a syncExec?
===
In my SWT Java app I often want to return information from inside a Display.syncExec() call. The best way I've found so far to do this is:
ArrayList<Integer> result = new ArrayList<Integer>();
GUI.display().syncExec(new Runnable(){ public void run() {
MessageBox mb = /* ... */;
/* set up messagebox */
result.add(mb.open());
}});
if (SWT.OK == result.get(0)) { /* ... */ }
I think this is allowed because ArrayList is thread-safe, but is there a better container I should be using, or an easier way altogether? | 0 |
76,314 | 09/16/2008 20:01:49 | 2,312 | 08/21/2008 15:19:59 | 52 | 6 | Open Java *.Class Files | I'm trying to figure out what a Java applet's Class file is doing under the hood. Opening it up w/ Notepad or Textpad just shows a bunch of gobbley-gook.
Any way to wrangle it back into a somewhat readable format so's I can try to figure out what it's doing?
* Environment == Windows w/ VS 2008 installed. | java | windows | applet | class | null | null | open | Open Java *.Class Files
===
I'm trying to figure out what a Java applet's Class file is doing under the hood. Opening it up w/ Notepad or Textpad just shows a bunch of gobbley-gook.
Any way to wrangle it back into a somewhat readable format so's I can try to figure out what it's doing?
* Environment == Windows w/ VS 2008 installed. | 0 |
76,324 | 09/16/2008 20:02:38 | 6,244 | 09/13/2008 07:26:29 | 11 | 2 | Easy expanation of setting up Openssl on Windows. | I really want to get the google Calendar Api up an running. I found a [great article](http://www.ibm.com/developerworks/library/x-googleclndr/) about how to get started. I downloaded the Zend GData classes. I have php 5 running on my dev box and all the exetensions should be loading.
I cant get openssl running and recieve the following error when I try to run any of the example page which should connect to my Google Calendar.
Uncaught exception 'Zend_Gdata_App_HttpException' with message 'Unable to Connect to ssl://www.google.com:443. Error #24063472: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?'
I have looked in many places to try to get OpenSSL running on my machine and installed.
Does anyone know of a simple failsafe tutorial to get this combination up and running? | php | openssl | google-calendar | gdata-api | null | null | open | Easy expanation of setting up Openssl on Windows.
===
I really want to get the google Calendar Api up an running. I found a [great article](http://www.ibm.com/developerworks/library/x-googleclndr/) about how to get started. I downloaded the Zend GData classes. I have php 5 running on my dev box and all the exetensions should be loading.
I cant get openssl running and recieve the following error when I try to run any of the example page which should connect to my Google Calendar.
Uncaught exception 'Zend_Gdata_App_HttpException' with message 'Unable to Connect to ssl://www.google.com:443. Error #24063472: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?'
I have looked in many places to try to get OpenSSL running on my machine and installed.
Does anyone know of a simple failsafe tutorial to get this combination up and running? | 0 |
76,325 | 09/16/2008 20:02:42 | 889 | 08/10/2008 08:04:03 | 240 | 11 | Move Active Directory Group to Another OU using Powershell | How do I move an active directory group to another organizational unit using Powershell?
ie.
I would like to move the group "IT Department" from
(CN=IT Department, OU=Technology Department, OU=Departments,DC=Company,DC=ca)
to
(CN=IT Department, OU=Temporarily Moved Groups, DC=Company,DC=ca) | powershell | activedirectory | null | null | null | null | open | Move Active Directory Group to Another OU using Powershell
===
How do I move an active directory group to another organizational unit using Powershell?
ie.
I would like to move the group "IT Department" from
(CN=IT Department, OU=Technology Department, OU=Departments,DC=Company,DC=ca)
to
(CN=IT Department, OU=Temporarily Moved Groups, DC=Company,DC=ca) | 0 |
76,327 | 09/16/2008 20:03:08 | 13,582 | 09/16/2008 20:00:23 | 1 | 0 | How can I prevent Java from creating hsperfdata files? | I'm writing a Java application that runs on Linux (using Sun's JDK). It keeps creating /tmp/hsperfdata_username directories, which I would like to prevent. Is there any way to stop java from creating these files? | java | hsperfdata | null | null | null | null | open | How can I prevent Java from creating hsperfdata files?
===
I'm writing a Java application that runs on Linux (using Sun's JDK). It keeps creating /tmp/hsperfdata_username directories, which I would like to prevent. Is there any way to stop java from creating these files? | 0 |
76,328 | 09/16/2008 20:03:18 | 13,195 | 09/16/2008 17:35:49 | 1 | 0 | Is there a way to emulate PHP5's __call() magic method in PHP4 ? | PHP5 has a "magic method" `__call()`that can be defined on any class that is invoked when an undefined method is called -- it is roughly equivalent to Ruby's `method_missing` or Perl's `AUTOLOAD`. Is it possible to do something like this in older versions of PHP? | php4 | delegation | --call | null | null | null | open | Is there a way to emulate PHP5's __call() magic method in PHP4 ?
===
PHP5 has a "magic method" `__call()`that can be defined on any class that is invoked when an undefined method is called -- it is roughly equivalent to Ruby's `method_missing` or Perl's `AUTOLOAD`. Is it possible to do something like this in older versions of PHP? | 0 |
76,334 | 09/16/2008 20:03:33 | 12,713 | 09/16/2008 15:22:48 | 1 | 0 | Compile-time LCM / GCD in C | Does anyone know a mechanism to calculate at compile-time the LCM (Least Common Multiple) and/or GCD (Greatest Common Denominator) of at least two number in C (not C++, I know that template magic is available there)?
I generally use GCC and recall that it can calculate certain values at compile-time when all inputs are known (ex: sin, cos, etc...).
I'm looking for how to do this in GCC (preferably in a manner that other compilers could handle) and hope the same mechanism would work in Visual Studio. | c | gcc | vc++ | null | null | null | open | Compile-time LCM / GCD in C
===
Does anyone know a mechanism to calculate at compile-time the LCM (Least Common Multiple) and/or GCD (Greatest Common Denominator) of at least two number in C (not C++, I know that template magic is available there)?
I generally use GCC and recall that it can calculate certain values at compile-time when all inputs are known (ex: sin, cos, etc...).
I'm looking for how to do this in GCC (preferably in a manner that other compilers could handle) and hope the same mechanism would work in Visual Studio. | 0 |
76,346 | 09/16/2008 20:04:35 | 1,219 | 08/13/2008 13:44:47 | 2,902 | 169 | Why does Sql Server keep executing after raiserror when xact_abort is on? | I just got surprised by something in TSQL. I thought that if xact_abort was on, calling something like
raiserror('Something bad happened', 16, 1);
would stop execution of the stored procedure (or any batch).
But my ADO.NET error message just proved the opposite. I got both the raiserror error message in the exception message, plus the next thing that broke after that.
This is my workaround (which is my habit anyway), but it doesn't seem like it should be necessary:
if @somethingBadHappened
begin;
raiserror('Something bad happened', 16, 1);
return;
end;
The docs say this:
> When SET XACT_ABORT is ON, if a Transact-SQL statement raises a run-time error, the entire transaction is terminated and rolled back.
Does that mean I must be using an explicit transaction? | sql | mssql | tsql | null | null | null | open | Why does Sql Server keep executing after raiserror when xact_abort is on?
===
I just got surprised by something in TSQL. I thought that if xact_abort was on, calling something like
raiserror('Something bad happened', 16, 1);
would stop execution of the stored procedure (or any batch).
But my ADO.NET error message just proved the opposite. I got both the raiserror error message in the exception message, plus the next thing that broke after that.
This is my workaround (which is my habit anyway), but it doesn't seem like it should be necessary:
if @somethingBadHappened
begin;
raiserror('Something bad happened', 16, 1);
return;
end;
The docs say this:
> When SET XACT_ABORT is ON, if a Transact-SQL statement raises a run-time error, the entire transaction is terminated and rolled back.
Does that mean I must be using an explicit transaction? | 0 |
76,349 | 09/16/2008 20:04:53 | 13,556 | 09/16/2008 19:50:32 | 1 | 0 | Edit source code when debugging | I have VS2005 and I am currently trying to debug an ASP.net web application. I want to change some code around in the code behind file, but every time I stop at a break point and try to edit something I get the following error message: "Changes are not allowed when the debugger has been attached to an already running process or the code being debugged is optimized."
I'm pretty sure I have all the "Edit and Continue" options enabled. Any suggestions? | asp.net | debugging | null | null | null | null | open | Edit source code when debugging
===
I have VS2005 and I am currently trying to debug an ASP.net web application. I want to change some code around in the code behind file, but every time I stop at a break point and try to edit something I get the following error message: "Changes are not allowed when the debugger has been attached to an already running process or the code being debugged is optimized."
I'm pretty sure I have all the "Edit and Continue" options enabled. Any suggestions? | 0 |
76,350 | 09/16/2008 20:04:59 | 11,063 | 09/16/2008 04:28:20 | 1 | 1 | Free/cheap PowerDesigner alternative? | We are using PowerDesigner at work for database modelling. But there is a hell of a price tag on that piece of software. And frankly, all I use is physical diagrams for MS SQL, which is about 1% of what PD knows.
Are there any good alternatives? I know about Visio and MS SQL Diagrams, but looking for other options. | sql | sql-server | database | modeling | null | null | open | Free/cheap PowerDesigner alternative?
===
We are using PowerDesigner at work for database modelling. But there is a hell of a price tag on that piece of software. And frankly, all I use is physical diagrams for MS SQL, which is about 1% of what PD knows.
Are there any good alternatives? I know about Visio and MS SQL Diagrams, but looking for other options. | 0 |
76,359 | 09/16/2008 20:06:18 | 13,320 | 09/16/2008 18:17:53 | 1 | 1 | binding variables to parameters in ADOdb for PHP | does binding variables to parameters in ADOdb for PHP prevent SQL injection in any way? I thought ADOdb also did data sanitation or escaping within the same functionality by default. Or am I just confusing it with Code Igniter's built-in processes? | php | sql-injection | binding | adodb | parameters | null | open | binding variables to parameters in ADOdb for PHP
===
does binding variables to parameters in ADOdb for PHP prevent SQL injection in any way? I thought ADOdb also did data sanitation or escaping within the same functionality by default. Or am I just confusing it with Code Igniter's built-in processes? | 0 |
76,395 | 09/16/2008 20:09:58 | 7,028 | 09/15/2008 13:02:20 | 264 | 25 | Code generators vs. ORMs vs. Stored Procedures | In what domains do each of these software architectures shine or fail?
Which key requirements would prompt you to choose one over the other?
Please assume that you have developers available who can do good object oriented code as well as good database development.
Also, please avoid holy wars :) all three technologies have pros and cons, I'm interested in where is most appropriate to use which. | language-agnostic | orm | stored-procedures | code-generation | open-question | null | open | Code generators vs. ORMs vs. Stored Procedures
===
In what domains do each of these software architectures shine or fail?
Which key requirements would prompt you to choose one over the other?
Please assume that you have developers available who can do good object oriented code as well as good database development.
Also, please avoid holy wars :) all three technologies have pros and cons, I'm interested in where is most appropriate to use which. | 0 |
76,403 | 09/16/2008 20:10:49 | 4,337 | 09/02/2008 22:43:39 | 2,069 | 149 | How to prevent an Insert query from enrolling into a Distributed Transaction? | I have a SQL Insert query inside a stored proc, for inserting rows into a **linked server** table.
Since this stored proc is getting called within a transaction, I would like to avoid Distributed Transaction Coordinator from getting involved.
Is there any way I can do that (like a hint) for the SQL statement? | sql-server | msdtc | null | null | null | null | open | How to prevent an Insert query from enrolling into a Distributed Transaction?
===
I have a SQL Insert query inside a stored proc, for inserting rows into a **linked server** table.
Since this stored proc is getting called within a transaction, I would like to avoid Distributed Transaction Coordinator from getting involved.
Is there any way I can do that (like a hint) for the SQL statement? | 0 |
76,408 | 09/16/2008 20:11:22 | 11,234 | 09/16/2008 06:27:05 | 78 | 19 | which of these scripting languages is more appropriate for pen-testing? | First of all , I want to avoid a flame-war on languages . The languages to choose from are Perl,Python and Ruby . I want to mention that I'm confortable with all of them,but the problem is that I can't focus just on one .
If for example , I see a cool perl module , I have to try it out . If I see a nice python app,I have to know how it's made . If I see a ruby DSL or some ruby voodoo , I'm hooked on ruby for a while .
Right now I'm working as a java developer , but plan on taking CEH in the near future . My question is : for tool writing and exploit development , which language do you find to be the most appropriate ?
Again , I don't want to cause a flame-war or any trouble , I just want honest oppinions from scripters that know what they're doing .
One more thing:maybe some of you will ask "Why settle on one language?" . To answer this : I would like to choose only one language , in order to try to master it .
Thanks ! | python | ruby | security | perl | null | null | open | which of these scripting languages is more appropriate for pen-testing?
===
First of all , I want to avoid a flame-war on languages . The languages to choose from are Perl,Python and Ruby . I want to mention that I'm confortable with all of them,but the problem is that I can't focus just on one .
If for example , I see a cool perl module , I have to try it out . If I see a nice python app,I have to know how it's made . If I see a ruby DSL or some ruby voodoo , I'm hooked on ruby for a while .
Right now I'm working as a java developer , but plan on taking CEH in the near future . My question is : for tool writing and exploit development , which language do you find to be the most appropriate ?
Again , I don't want to cause a flame-war or any trouble , I just want honest oppinions from scripters that know what they're doing .
One more thing:maybe some of you will ask "Why settle on one language?" . To answer this : I would like to choose only one language , in order to try to master it .
Thanks ! | 0 |
76,411 | 09/16/2008 20:11:29 | 410 | 08/05/2008 13:55:13 | 338 | 9 | How to cycle through delimited tokens with a Regular Expression? | How can I create a regular expression that will grab delimited text from a string? For example, given a string like
text ###token1### text text ###token2### text text
I want a regex that will pull out ###token1###. | regex | null | null | null | null | null | open | How to cycle through delimited tokens with a Regular Expression?
===
How can I create a regular expression that will grab delimited text from a string? For example, given a string like
text ###token1### text text ###token2### text text
I want a regex that will pull out ###token1###. | 0 |
76,412 | 09/16/2008 20:11:42 | 317 | 08/04/2008 15:43:28 | 435 | 20 | Expose DependencyProperty | When developing WPF UserControls, what is the best way to expose a DependencyProperty of a child control as a DependencyProperty of the UserControl? The following example shows how I would currently expose the Text property of a TextBox inside a UserControl. Surely there is a better / simpler way to accomplish this?
<UserControl x:Class="WpfApplication3.UserControl1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel Background="LightCyan">
<TextBox Margin="8" Text="{Binding Text, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" />
</StackPanel>
</UserControl>
using System;
using System.Windows;
using System.Windows.Controls;
namespace WpfApplication3
{
public partial class UserControl1 : UserControl
{
public static DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(UserControl1), new PropertyMetadata(null));
public string Text
{
get { return GetValue(TextProperty) as string; }
set { SetValue(TextProperty, value); }
}
public UserControl1() { InitializeComponent(); }
}
}
| wpf | data-binding | usercontrols | null | null | null | open | Expose DependencyProperty
===
When developing WPF UserControls, what is the best way to expose a DependencyProperty of a child control as a DependencyProperty of the UserControl? The following example shows how I would currently expose the Text property of a TextBox inside a UserControl. Surely there is a better / simpler way to accomplish this?
<UserControl x:Class="WpfApplication3.UserControl1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel Background="LightCyan">
<TextBox Margin="8" Text="{Binding Text, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" />
</StackPanel>
</UserControl>
using System;
using System.Windows;
using System.Windows.Controls;
namespace WpfApplication3
{
public partial class UserControl1 : UserControl
{
public static DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(UserControl1), new PropertyMetadata(null));
public string Text
{
get { return GetValue(TextProperty) as string; }
set { SetValue(TextProperty, value); }
}
public UserControl1() { InitializeComponent(); }
}
}
| 0 |
76,420 | 09/16/2008 20:12:52 | 13,289 | 09/16/2008 18:06:27 | 21 | 6 | Best php/ruby/python e-commerce solution | I'm looking for an easy to skin and customize e-commerce package.
I've been reading good reviews about [Magento](http://magentocommerce.com/), but it seems to have [problems with performance](http://www.htmlist.com/development/magento-ecommerce-review-platform-perils-and-impressions-three-months-in/). I've tried [osCommerce](http://oscommerce.com/) before and found it to be pretty painful to modify, but I hear [zenCart](http://zencart.com/) is better... but the latest release of zenCart is nearly a year old, so not sure how up to date it is at this point.
I tried hosted e-commerce with [Shopify](http://shopify.com/), and while very easy to use and template, its customization options are a bit limited (the templating language doesn't even support basic logic operations, which makes it pretty inflexible).
I'm almost ready to try writing my own in rails using [ActiveMerchant](http://activemerchant.org/), but while that will give me ultimate in customization, it's going to take much longer when I have to reinvent the wheel.
I'd be happy with a php, ruby or python based system, I know enough of those languages to be able to customize the system if I need to as long as it's well-organized and documented code.
Anybody have experience with something they'd recommend, or conversely, recommend staying away from? | python | php | ruby | e-commerce | shopping-cart | 11/30/2011 13:47:55 | not constructive | Best php/ruby/python e-commerce solution
===
I'm looking for an easy to skin and customize e-commerce package.
I've been reading good reviews about [Magento](http://magentocommerce.com/), but it seems to have [problems with performance](http://www.htmlist.com/development/magento-ecommerce-review-platform-perils-and-impressions-three-months-in/). I've tried [osCommerce](http://oscommerce.com/) before and found it to be pretty painful to modify, but I hear [zenCart](http://zencart.com/) is better... but the latest release of zenCart is nearly a year old, so not sure how up to date it is at this point.
I tried hosted e-commerce with [Shopify](http://shopify.com/), and while very easy to use and template, its customization options are a bit limited (the templating language doesn't even support basic logic operations, which makes it pretty inflexible).
I'm almost ready to try writing my own in rails using [ActiveMerchant](http://activemerchant.org/), but while that will give me ultimate in customization, it's going to take much longer when I have to reinvent the wheel.
I'd be happy with a php, ruby or python based system, I know enough of those languages to be able to customize the system if I need to as long as it's well-organized and documented code.
Anybody have experience with something they'd recommend, or conversely, recommend staying away from? | 4 |
76,424 | 09/16/2008 20:13:04 | 578 | 08/06/2008 22:07:45 | 68 | 12 | How to remove xmlns attribute with .NET XML API | XmlElement.Attributes.Remove* methods are working fine for arbitrary attributes resulting in the removed attributes being removed from XmlDocument.OuterXml property. Xmlns attribute however is different. Here is an example:
XmlDocument doc = new XmlDocument();
doc.InnerXml = @"<Element1 attr1=""value1"" xmlns=""http://mynamespace.com/"" attr2=""value2""/>";
doc.DocumentElement.Attributes.RemoveNamedItem("attr2");
Console.WriteLine("xmlns attr before removal={0}", doc.DocumentElement.Attributes["xmlns"]);
doc.DocumentElement.Attributes.RemoveNamedItem("xmlns");
Console.WriteLine("xmlns attr after removal={0}", doc.DocumentElement.Attributes["xmlns"]);
The resulting output is
xmlns attr before removal=System.Xml.XmlAttribute
xmlns attr after removal=
<Element1 attr1="value1" xmlns="http://mynamespace.com/" />
The attribute seems to be removed from the Attributes collection, but it is not removed from XmlDocument.OuterXml.
I guess it is because of the special meaning of this attribute.
The question is how to remove the xmlns attribute using .NET XML API.
Obviously I can just remove the attribute from a String representation of this, but I wonder if it is possible to do the same thing using the API.
| .net | xml | api | xmlns | null | null | open | How to remove xmlns attribute with .NET XML API
===
XmlElement.Attributes.Remove* methods are working fine for arbitrary attributes resulting in the removed attributes being removed from XmlDocument.OuterXml property. Xmlns attribute however is different. Here is an example:
XmlDocument doc = new XmlDocument();
doc.InnerXml = @"<Element1 attr1=""value1"" xmlns=""http://mynamespace.com/"" attr2=""value2""/>";
doc.DocumentElement.Attributes.RemoveNamedItem("attr2");
Console.WriteLine("xmlns attr before removal={0}", doc.DocumentElement.Attributes["xmlns"]);
doc.DocumentElement.Attributes.RemoveNamedItem("xmlns");
Console.WriteLine("xmlns attr after removal={0}", doc.DocumentElement.Attributes["xmlns"]);
The resulting output is
xmlns attr before removal=System.Xml.XmlAttribute
xmlns attr after removal=
<Element1 attr1="value1" xmlns="http://mynamespace.com/" />
The attribute seems to be removed from the Attributes collection, but it is not removed from XmlDocument.OuterXml.
I guess it is because of the special meaning of this attribute.
The question is how to remove the xmlns attribute using .NET XML API.
Obviously I can just remove the attribute from a String representation of this, but I wonder if it is possible to do the same thing using the API.
| 0 |
76,438 | 09/16/2008 20:14:30 | 7,524 | 09/15/2008 13:54:23 | 104 | 7 | The best way to make a new site known? | You have a cool new idea on a revolutionary new internet site (e.g. one that makes ebay look obsolete or something that might make you surpass google). However how would you start to make it known in the net as the best idea is worthless as long as nobody knows it and uses it.
What's your recommendation? Online Ads? Spaming blogs? But it should not be evil. Not everybody has a reputation like Joel to start up a new site and immediately get hundreds of users. | website | null | null | null | null | 04/05/2012 13:06:19 | off topic | The best way to make a new site known?
===
You have a cool new idea on a revolutionary new internet site (e.g. one that makes ebay look obsolete or something that might make you surpass google). However how would you start to make it known in the net as the best idea is worthless as long as nobody knows it and uses it.
What's your recommendation? Online Ads? Spaming blogs? But it should not be evil. Not everybody has a reputation like Joel to start up a new site and immediately get hundreds of users. | 2 |
76,455 | 09/16/2008 20:16:02 | 300,930 | 09/16/2008 16:50:13 | 1 | 1 | How do you change the color of the border on a group box? | In C#.NET I am trying to programmatically change the color of the border in a group box. | c# | gui | controls | groupbox | null | null | open | How do you change the color of the border on a group box?
===
In C#.NET I am trying to programmatically change the color of the border in a group box. | 0 |
76,464 | 09/16/2008 20:16:39 | 13,100 | 09/16/2008 17:04:32 | 1 | 0 | Creating a DNN Module that uses a end-user modifyable template | I'd like to create a module in DNN that, similar to the Announcements control, offers a template that the portal admin can modify for formatting. I have a control that currently uses a Repeater control with templates. Is there a way to override the contents of the repeater ItemTemplate, HeaderTemplate, and FooterTemplate properties? | asp.net | dotnetnuke | module | null | null | null | open | Creating a DNN Module that uses a end-user modifyable template
===
I'd like to create a module in DNN that, similar to the Announcements control, offers a template that the portal admin can modify for formatting. I have a control that currently uses a Repeater control with templates. Is there a way to override the contents of the repeater ItemTemplate, HeaderTemplate, and FooterTemplate properties? | 0 |
76,467 | 09/16/2008 20:16:50 | 10,136 | 09/15/2008 21:22:50 | 11 | 1 | What programming screencasts/podcast resources do you know? | Just as the title says, if you know any resource, answer here.
Personally I'm more0interested in screencasts more than podcasts, because english is not my mother tonge, so visual clues help a lot:
[NetBeans TV Screencasts][1]
[DimeCasts.NET][2]
[Apple Developer Connection (iTunes)][3]
[1]: http://www.netbeans.tv/screencasts/
[2]: http://dimecasts.net/
[3]: http://developer.apple.com/adconitunes/overview.html | language-agnostic | null | null | null | null | 09/18/2011 02:58:59 | not constructive | What programming screencasts/podcast resources do you know?
===
Just as the title says, if you know any resource, answer here.
Personally I'm more0interested in screencasts more than podcasts, because english is not my mother tonge, so visual clues help a lot:
[NetBeans TV Screencasts][1]
[DimeCasts.NET][2]
[Apple Developer Connection (iTunes)][3]
[1]: http://www.netbeans.tv/screencasts/
[2]: http://dimecasts.net/
[3]: http://developer.apple.com/adconitunes/overview.html | 4 |
76,482 | 09/16/2008 20:18:26 | 2,582 | 08/23/2008 04:50:45 | 28 | 1 | Powershell: Setting Encoding for Get-Content Pipeline | I have a file saved as UCS-2 Little Endian I want to change the encoding so I ran the following code:
cat tmp.log -encoding UTF8 > new.log
The resulting file is still in UCS-2 Little Endian. Is this because the pipeline is always in that format? Is there an easy way to pipe this to a new file as UTF8? | powershell | encoding | null | null | null | null | open | Powershell: Setting Encoding for Get-Content Pipeline
===
I have a file saved as UCS-2 Little Endian I want to change the encoding so I ran the following code:
cat tmp.log -encoding UTF8 > new.log
The resulting file is still in UCS-2 Little Endian. Is this because the pipeline is always in that format? Is there an easy way to pipe this to a new file as UTF8? | 0 |
76,484 | 09/16/2008 20:18:35 | 3,619 | 08/29/2008 15:08:14 | 292 | 46 | How to tell if a process is running on a mobile device | I have the handle of process 'A' on a Pocket PC 2003 device. I need to determine if that process is still running from process 'B'. Process 'B' is written in Embedded Visual C++ 4.0. | mobile | processes | native | pocketpc | evc | null | open | How to tell if a process is running on a mobile device
===
I have the handle of process 'A' on a Pocket PC 2003 device. I need to determine if that process is still running from process 'B'. Process 'B' is written in Embedded Visual C++ 4.0. | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.