I need an easy way to convert a List<int> to a string array.
I have:
var the_list = new List<int>();
the_list.Add(1);
the_list.Add(2);
the_list.Add(3);
string[] the_array = new string[the_list.Count];
for(var i = 0 ; i < the_array.Count; ++i)
the_array[i] = the_list[i].ToString();
...which looks to be very ugly to me.
Is…
It looks like they are converted to regular date types in the generated proxy object.
I'd like to optionally pass null values for these dates.
Other than switching to WCF (no time to learn it right now), what is the best way to handle this situation. It looks like I also cannot pass NULLABLE date types.
Here's an argument for SPs that I haven't heard. Flamers, be gentle with the down tick,
Since there is overhead associated with each trip to the database server, I would suggest that a POSSIBLE reason for placing your SQL in SPs over embedded code is that you are more insulated to change without taking a performance hit.
For example. Let's say…
I have several grids in my window. I have created a storyboard that moves them left by x pixels when a button is clicked. I want to make it so that when the button is clicked again those grids move another x pixels, however I'm unable to find out how to do this as it's not a common task on tutorials.
I have tried creating a second storyboard to…
Say I have a subdomain xxx.yyy.com running Apache. The files are stored in /home/someone/public_html/xxx.
What I want to do is redirect all requests to a domain name zzz.com which is using the same location for its files. (In other words, xxx.yyy.com and zzz.com are aliases for each other)
I just want people accessing zzz.com, so if someone…
I am looking at building an external site with a CMS, probably Drupal or ExpressionEngine. The problem is that our company already has a membership database that is designed to work with our existing enterprise software.
Migrating data from the database manually is not an option as modifications and new data must be accessible in real-time.…
I'm about to get a new job (unrelated to programming) where there's a lot of downtime. I'd like to get a mobile phone that I can stealthfully use to do some web development on. Basically editing and uploading php files.
Can anybody reccomend an phone suited to this purpose?
For example I have
interface ICommand {}
class MovePiece : ICommand {}
class Successful<CMD> where CMD : ICommand {}
and I want the following:
CovariantlyEqual(
typeof(Successful<ICommand>),
typeof(Successful<MovePiece>))
.ShouldEqualTrue()
Background
I'm maintaining a plugin for an application. I'm Using Visual C++ 2003.
The plugin is composed of several DLLs - there's the main DLL, that's the one that the application loads using LoadLibrary, and there are several utility DLLs that are used by the main DLL and by each other.
Dependencies generally look like this:
…
I want to have two collections of same class items in Activerecord.
How to map this?
class Project
{
[HasMany]
IList<Resource> Resources { get; set; }
[HasMany]
IList<Resource> DepartmentResources { get; set; }
}
public class Resource
{
[BelongsTo ???
}
Hello guys.
I'm having a strange issue here.
I have a 3 column datagrid that is filled by a connection with the database. So far so good.
I have an extra column, of checkbox type. I need to get it's value for perfoming a bulk operation on it. Here is the catch:
When all cells are selected, it works fine. But when an user…
I have two tables.
table_x:
id INT(11)
tag INT(11)
table_tags:
id INT(11)
name VARCHAR(255)
Then I use PHP to perform the following query:
SELECT * FROM table_x LEFT JOIN table_tags ON table_x.tag = table_tags.id
The only problem is: how do I access table_x.id and table_tags.id in the results?
Here is the…
I have fancybox setup on this wordpress site: http://melisayavas.com/web/
When a user click on the bottom link News subscription the ajax pop-up box appears but the overlay doesn't float over the main content.
This is the fancybox code that I used:
<script type="text/javascript">
$(document).ready(function() {
…
Okay. Now I give up. I have been playing with this for hours.
I have a variable name $data.
The variable contains these contents: (extracted by using var_export())
array (
'headers' =>
array (
'content-type' => 'multipart/alternative; boundary="_689e1a7d-7a0a-442a-bd6c-a1fb1dc2993e_"',
),
…
Here is some C++ code I'm playing around with:
#include <iostream>
#include <vector>
#define IN ,
#define FOREACH(x,y) for(unsigned int i=0;i<y.size();i++) { x=y[i];
#define ENDFOREACH }
using namespace std;
int main()
{
vector<int> ints;
ints.push_back(3);
…
Hi, could you help me please convert this SQL query to Linq to Entity query? Thank you
select distinct item, count(item) as count
from TableName
where ColumnName = @parameter and (ColumnName2 = @parameter2 OR ColumnName3 = @parameter3)
group by item order by item asc
I'm able to change the width/height of the grid using this, so why won't it work when I use (Grid.RenderTransform).TranslateTransform.X as such:
<Window.Triggers>
<EventTrigger RoutedEvent="Button.Click" SourceName="button">
<BeginStoryboard>
<Storyboard>
…
Sorry if this sounds like a dumb question but how do you time the execution of a java program? I'm not sure what class I should use to do this.
I'm kinda looking for something like:
//Some timer starts here
for (int i = 0; i < length; i++) {
// Do something
}
//End timer here
…
The short version of the question - why can't I do this? I'm restricted to .NET 3.5.
T[] genericArray;
// Obviously T should be float!
genericArray = new T[3]{ 1.0f, 2.0f, 0.0f };
// Can't do this either, why the hell not
genericArray = new float[3]{ 1.0f, 2.0f, 0.0f };
…
Our company decided to designate a contractor by adding an "X" in front of the employee number. But they aren't doing this in all systems.
Is this a dangerous thing to do and why?
I have two dictionaries with the same structure:
Dictionary<string, int> foo = new Dictionary<string, int>()
{
{"Table", 5 },
{"Chair", 3 },
{"Couch", 1 }
};
Dictionary<string, int> bar = new Dictionary<string, int>()
{
{"Table", 4 },…
I am currently having trouble getting rid of a sliver of white...
Here is an example page: http://m.stackoverflow.quickmediasolutions.com/view_question.php?id=97969&site=serverfault
As you can see, the answers have a sliver of white stuffed between the top of the 'button'…