PostId int64 13 11.8M | PostCreationDate stringlengths 19 19 | OwnerUserId int64 3 1.57M | OwnerCreationDate stringlengths 10 19 | ReputationAtPostCreation int64 -33 210k | OwnerUndeletedAnswerCountAtPostTime int64 0 5.77k | Title stringlengths 10 250 | BodyMarkdown stringlengths 12 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 47 30.1k | OpenStatus_id int64 0 4 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3,574,570 | 08/26/2010 11:19:38 | 112,407 | 05/26/2009 06:34:54 | 1,743 | 213 | LINQ query and IDisposable | I'm currently writing a piece of code that does some searches which returns IDisposable objects (DirectoryEntry to be specific from an ADAM instance) and I end up with code similar to
using(var entry = (from result in results
let entry = result.GetDirectoryEntry()
where entry != null
select entry).Last())
{
//blah blah
}
but who is then responsible for Disposing the objects not returned by the above query? or more to the point is the above code actually missing a call to Dispose() for all other entries than the last? | .net | linq | idisposable | null | null | null | open | LINQ query and IDisposable
===
I'm currently writing a piece of code that does some searches which returns IDisposable objects (DirectoryEntry to be specific from an ADAM instance) and I end up with code similar to
using(var entry = (from result in results
let entry = result.GetDirectoryEntry()
where entry != null
select entry).Last())
{
//blah blah
}
but who is then responsible for Disposing the objects not returned by the above query? or more to the point is the above code actually missing a call to Dispose() for all other entries than the last? | 0 |
7,119,203 | 08/19/2011 08:56:46 | 860,747 | 07/25/2011 00:39:48 | 1 | 0 | How to destory Fragment? | I have a one Activity.
Activity has 2 Fragment.
Fragment A is Menu.
Fragment B is Detail.
I try to Make other Fragment C in Fragment B.
so, There are 3 Fragment in Activity.
And I try to Replace Fragment B to Fragment D.
I guess Fragment B and C is dead.
BUT these Fragments is alive. Just Fragments are onDestroyView() state.
I want onDestroy() or onDetach().
What i to do for Fragments.onDestroy() or onDetach().
i can`t destroy or change the Activity.
| android | android-fragments | null | null | null | null | open | How to destory Fragment?
===
I have a one Activity.
Activity has 2 Fragment.
Fragment A is Menu.
Fragment B is Detail.
I try to Make other Fragment C in Fragment B.
so, There are 3 Fragment in Activity.
And I try to Replace Fragment B to Fragment D.
I guess Fragment B and C is dead.
BUT these Fragments is alive. Just Fragments are onDestroyView() state.
I want onDestroy() or onDetach().
What i to do for Fragments.onDestroy() or onDetach().
i can`t destroy or change the Activity.
| 0 |
7,915,716 | 10/27/2011 12:18:22 | 716,448 | 04/20/2011 04:44:44 | 31 | 0 | recommend a book about java io and java nio | I want to dive into java io and java nio, I am looking for some good materials to study. Do you have some good advice to me , good io blogs ,good io books, or good io skills ,whatever.
Thanks in advance | java | books | io | null | null | 10/27/2011 12:39:15 | not constructive | recommend a book about java io and java nio
===
I want to dive into java io and java nio, I am looking for some good materials to study. Do you have some good advice to me , good io blogs ,good io books, or good io skills ,whatever.
Thanks in advance | 4 |
9,621,846 | 03/08/2012 17:13:00 | 234,495 | 12/18/2009 11:44:43 | 52 | 0 | What kind of DataStructures can enable parallel processing | Binary Tree:
For example, if we need to process Tree datastructure parallely. We can spawn one thread to process left node, and another thread to process right node. Now both can independently run on the same data strucuture.
It is certainly not possible to have same kind of parallelism for linked list.
I am thinking, if there are any other data structures, that gives us the flexibility for acheiving parallelism similar to a binary tree ? | c++ | c | multithreading | parallel-processing | null | null | open | What kind of DataStructures can enable parallel processing
===
Binary Tree:
For example, if we need to process Tree datastructure parallely. We can spawn one thread to process left node, and another thread to process right node. Now both can independently run on the same data strucuture.
It is certainly not possible to have same kind of parallelism for linked list.
I am thinking, if there are any other data structures, that gives us the flexibility for acheiving parallelism similar to a binary tree ? | 0 |
6,993,588 | 08/09/2011 08:50:40 | 362,214 | 05/26/2010 10:47:24 | 349 | 7 | Delphi, Winhttp, Google Login, Fusion Tables | This is the continue of my previous question:
http://stackoverflow.com/questions/6943626/delphi-webbrowser-google-login-fusiontable
But the test with WinHTTP also failed as TWebBrowser based test...
And this is one question as you wish... :-)
I have one table what is NOW PUBLIC, but when we will buy non-free account it will be changed to private kind.
I created a simple WinHTTP test, but this also failed.
I can login, I got the "Auth" tag, but the next "private" request returns 401 error.
procedure TForm1.BitBtn1Click(Sender: TObject);
var
WinHttpReq, temp : variant;
URL, s : String;
params : TStringList;
authtoken, query, posts : string;
begin
URL := 'https://www.google.com/accounts/ClientLogin';
WinHttpReq := CreateOleObject('WinHttp.WinHttpRequest.5.1');
params := TStringList.Create;
try
params.Values['accountType'] := 'GOOGLE';
params.Values['Email'] := csEmail;
params.Values['Passwd'] := csPwd;
params.Values['service'] := 'fusiontables';
params.Values['source'] := csSource;
posts := EncodeParamsToURL(params);
finally
params.Free;
end;
URL := URL + '?' + posts;
WinHttpReq.Open('POST', URL, false);
WinHttpReq.Send();
s := WinHttpReq.ResponseText;
Memo1.Lines.Text := s;
params := TStringList.Create;
try
params.Text := s;
authtoken := params.Values['Auth'];
Edit1.Text := authtoken;
finally
params.Free;
end;
//query := URLEncode('SHOW TABLES');
query := URLEncode('select * from 1236965');
url := 'http://www.google.com/fusiontables/api/query?sql=' + query;
WinHttpReq.Open('POST', URL, false);
WinHttpReq.setRequestHeader('Authorization', 'GoogleLogin auth="' + authToken + '"');
WinHttpReq.Send();
s := WinHttpReq.ResponseText;
Memo1.Lines.Text := s;
end;
When I made "select", I got the rows.
But when I want to see the tablenames, I get 401 error...
I'm not sure what cause this error.
a.) The free account don't have enough rights to access it privately
b.) I set the header wrong
c.) I set the csSource wrong (I set it "MyCompanyName-Test-1.0")
d.) Other thing I don't know what...
Can anybody help me how to login and access the data successfully?
Thanks:
dd | delphi | google | private | fusion | winhttp | null | open | Delphi, Winhttp, Google Login, Fusion Tables
===
This is the continue of my previous question:
http://stackoverflow.com/questions/6943626/delphi-webbrowser-google-login-fusiontable
But the test with WinHTTP also failed as TWebBrowser based test...
And this is one question as you wish... :-)
I have one table what is NOW PUBLIC, but when we will buy non-free account it will be changed to private kind.
I created a simple WinHTTP test, but this also failed.
I can login, I got the "Auth" tag, but the next "private" request returns 401 error.
procedure TForm1.BitBtn1Click(Sender: TObject);
var
WinHttpReq, temp : variant;
URL, s : String;
params : TStringList;
authtoken, query, posts : string;
begin
URL := 'https://www.google.com/accounts/ClientLogin';
WinHttpReq := CreateOleObject('WinHttp.WinHttpRequest.5.1');
params := TStringList.Create;
try
params.Values['accountType'] := 'GOOGLE';
params.Values['Email'] := csEmail;
params.Values['Passwd'] := csPwd;
params.Values['service'] := 'fusiontables';
params.Values['source'] := csSource;
posts := EncodeParamsToURL(params);
finally
params.Free;
end;
URL := URL + '?' + posts;
WinHttpReq.Open('POST', URL, false);
WinHttpReq.Send();
s := WinHttpReq.ResponseText;
Memo1.Lines.Text := s;
params := TStringList.Create;
try
params.Text := s;
authtoken := params.Values['Auth'];
Edit1.Text := authtoken;
finally
params.Free;
end;
//query := URLEncode('SHOW TABLES');
query := URLEncode('select * from 1236965');
url := 'http://www.google.com/fusiontables/api/query?sql=' + query;
WinHttpReq.Open('POST', URL, false);
WinHttpReq.setRequestHeader('Authorization', 'GoogleLogin auth="' + authToken + '"');
WinHttpReq.Send();
s := WinHttpReq.ResponseText;
Memo1.Lines.Text := s;
end;
When I made "select", I got the rows.
But when I want to see the tablenames, I get 401 error...
I'm not sure what cause this error.
a.) The free account don't have enough rights to access it privately
b.) I set the header wrong
c.) I set the csSource wrong (I set it "MyCompanyName-Test-1.0")
d.) Other thing I don't know what...
Can anybody help me how to login and access the data successfully?
Thanks:
dd | 0 |
19,551 | 08/21/2008 09:53:59 | 1,007 | 08/11/2008 12:50:43 | 140 | 7 | How to plan your learning process efficiently? | I wonder is there a good strategy to use when you're about to start learning completely new stuff.
For example, you want to learn LISP and you know nothing about functional programming and you've been always working with imperative languages, or you want to learn Aspect-Oriented programming and have no clue what's all about.
There are usually plenty of books and tutorials on the subject but you aren't sure there most of them are of any good.
So, how should you plan your learning process in order to get on the right track or to realize that isn't the right thing for you without wasting much time? Or how to grasp the essential concepts of a new technology?
I'm pretty sure there are lot of people who would change the way they learned their first programming language.
There are some questions which look like this one ([1][1],[2][2],[3][3]), but I think I'm trying to ask more general question here.
[1]: http://stackoverflow.com/questions/19347/what-is-the-best-way-to-go-from-javac-to-c
[2]: http://stackoverflow.com/questions/14599/aspnet-model-view-controller-mvc-where-do-i-start-from
[3]: http://stackoverflow.com/questions/1576/what-should-a-longtime-windows-user-know-when-starting-to-use-linux
| self-improvement | null | null | null | null | 03/01/2012 19:48:18 | not constructive | How to plan your learning process efficiently?
===
I wonder is there a good strategy to use when you're about to start learning completely new stuff.
For example, you want to learn LISP and you know nothing about functional programming and you've been always working with imperative languages, or you want to learn Aspect-Oriented programming and have no clue what's all about.
There are usually plenty of books and tutorials on the subject but you aren't sure there most of them are of any good.
So, how should you plan your learning process in order to get on the right track or to realize that isn't the right thing for you without wasting much time? Or how to grasp the essential concepts of a new technology?
I'm pretty sure there are lot of people who would change the way they learned their first programming language.
There are some questions which look like this one ([1][1],[2][2],[3][3]), but I think I'm trying to ask more general question here.
[1]: http://stackoverflow.com/questions/19347/what-is-the-best-way-to-go-from-javac-to-c
[2]: http://stackoverflow.com/questions/14599/aspnet-model-view-controller-mvc-where-do-i-start-from
[3]: http://stackoverflow.com/questions/1576/what-should-a-longtime-windows-user-know-when-starting-to-use-linux
| 4 |
10,342,596 | 04/26/2012 23:01:13 | 1,359,887 | 04/26/2012 22:55:28 | 1 | 0 | Using jQuery replace and regex to replace string | I'm currently using the .replace function to replace a specific string on the page. Given that I don't know where the current string is located so I can't select it, my code looks something like this:
`$('body').html( $('body').html().replace(regex, 'sometext') );`
So if the page originally looked like this:
`<div class="a">Hello</div>`
It now looks like this:
`<div class="a">sometext</div>`
Is there a way to do it without using `$('body').html( $('body').html().replace() )`?
Thanks! | javascript | jquery | html | regex | null | null | open | Using jQuery replace and regex to replace string
===
I'm currently using the .replace function to replace a specific string on the page. Given that I don't know where the current string is located so I can't select it, my code looks something like this:
`$('body').html( $('body').html().replace(regex, 'sometext') );`
So if the page originally looked like this:
`<div class="a">Hello</div>`
It now looks like this:
`<div class="a">sometext</div>`
Is there a way to do it without using `$('body').html( $('body').html().replace() )`?
Thanks! | 0 |
9,121,277 | 02/02/2012 22:56:39 | 1,186,320 | 02/02/2012 22:44:14 | 1 | 0 | A very basic Haskell query | I've rather wondered into the world of Haskell with no prior background of anything to do with this. Reason being that I'm come across a puzzle that I'm trying to solve that seems to be based around haskell code. I believe that what I'm after is an integer.
What I'm trying to do is the following
let a = \x -> x (\y z -> (\y z -> (\y z -> (\y z -> (\y z -> (\y z -> (\y z -> (\y z -> (\y z -> (\y z -> (\y z -> (\y z -> y (y z)) (\x -> y (y (y (y (y (y (y x))))))) z) (\x -> y (y (y (y (y (y (y (y (y x))))))))) z) y (y z)) (\x -> y (y (y (y x)))) z) y (y z)) (\x -> y (y (y (y x)))) z) (\x -> y (y (y (y (y x))))) z) y (y z)) (\x -> y (y (y (y (y (y (y (y x)))))))) z) (\x -> y (y (y (y (y (y (y (y x)))))))) z) (\x -> y (y (y (y (y (y (y (y x)))))))) z) (\y z -> (\y z -> (\y z -> (\y z -> (\y z -> (\y z -> (\y z -> (\y z -> y (y z)) (\x -> y (y (y (y (y (y (y (y (y x))))))))) z) y (y z)) (\x -> y (y (y (y (y x))))) z) (\x -> y (y (y (y (y (y x)))))) z) y (y z)) (\x -> y (y x)) z) (\x -> y (y (y (y (y (y x)))))) z)
a (1+) 0
This returns the following error message
<interactive>:1:4:
No instance for (Num
(((t20 -> t20) -> t20 -> t20) -> (t20 -> t20) -> t20 -> t20))
arising from the literal `1'
Possible fix:
add an instance declaration for
(Num (((t20 -> t20) -> t20 -> t20) -> (t20 -> t20) -> t20 -> t20))
In the first argument of `(+)', namely `1'
In the first argument of `a', namely `(1 +)'
In the expression: a (1 +) 0
<interactive>:1:8:
No instance for (Num (t20 -> t20))
arising from the literal `0'
Possible fix: add an instance declaration for (Num (t20 -> t20))
In the second argument of `a', namely `0'
In the expression: a (1 +) 0
In an equation for `it': it = a (1 +) 0
Simple question - what do I need to do to make this work?
Please bear in mind that I have very little idea about this at the moment. I would massively appreciate any help that anybody could give me! | haskell | null | null | null | null | null | open | A very basic Haskell query
===
I've rather wondered into the world of Haskell with no prior background of anything to do with this. Reason being that I'm come across a puzzle that I'm trying to solve that seems to be based around haskell code. I believe that what I'm after is an integer.
What I'm trying to do is the following
let a = \x -> x (\y z -> (\y z -> (\y z -> (\y z -> (\y z -> (\y z -> (\y z -> (\y z -> (\y z -> (\y z -> (\y z -> (\y z -> y (y z)) (\x -> y (y (y (y (y (y (y x))))))) z) (\x -> y (y (y (y (y (y (y (y (y x))))))))) z) y (y z)) (\x -> y (y (y (y x)))) z) y (y z)) (\x -> y (y (y (y x)))) z) (\x -> y (y (y (y (y x))))) z) y (y z)) (\x -> y (y (y (y (y (y (y (y x)))))))) z) (\x -> y (y (y (y (y (y (y (y x)))))))) z) (\x -> y (y (y (y (y (y (y (y x)))))))) z) (\y z -> (\y z -> (\y z -> (\y z -> (\y z -> (\y z -> (\y z -> (\y z -> y (y z)) (\x -> y (y (y (y (y (y (y (y (y x))))))))) z) y (y z)) (\x -> y (y (y (y (y x))))) z) (\x -> y (y (y (y (y (y x)))))) z) y (y z)) (\x -> y (y x)) z) (\x -> y (y (y (y (y (y x)))))) z)
a (1+) 0
This returns the following error message
<interactive>:1:4:
No instance for (Num
(((t20 -> t20) -> t20 -> t20) -> (t20 -> t20) -> t20 -> t20))
arising from the literal `1'
Possible fix:
add an instance declaration for
(Num (((t20 -> t20) -> t20 -> t20) -> (t20 -> t20) -> t20 -> t20))
In the first argument of `(+)', namely `1'
In the first argument of `a', namely `(1 +)'
In the expression: a (1 +) 0
<interactive>:1:8:
No instance for (Num (t20 -> t20))
arising from the literal `0'
Possible fix: add an instance declaration for (Num (t20 -> t20))
In the second argument of `a', namely `0'
In the expression: a (1 +) 0
In an equation for `it': it = a (1 +) 0
Simple question - what do I need to do to make this work?
Please bear in mind that I have very little idea about this at the moment. I would massively appreciate any help that anybody could give me! | 0 |
8,626,492 | 12/24/2011 19:33:20 | 1,114,815 | 12/24/2011 19:17:44 | 1 | 0 | I Want Horizontal Scroll Bar When Window is Resize | I am an Electronic Engineer by profession but know some CSS and HTML.I manage a website http://www.sjpub.org which have a flash display. I notice that when the browser window is re-size, the text overflow across the picture and the flash display budge out from the display window because it can not be re-size.
I want a situation where by when the window is re-size to a particular width (width of the flash display) or any arbitrary width, horizontal scroll-bar will appear to prevent the text from overflow and the flash display from budging out the window.I have tried several trick on CSS and read various post but the problem remain unsolved.
I will be more than happy if I can get help from this forum.
I can provide the CSS if requested or use Mozilla firebug.
Thanks
Sylvester | html | css | null | null | null | 12/25/2011 19:42:17 | not a real question | I Want Horizontal Scroll Bar When Window is Resize
===
I am an Electronic Engineer by profession but know some CSS and HTML.I manage a website http://www.sjpub.org which have a flash display. I notice that when the browser window is re-size, the text overflow across the picture and the flash display budge out from the display window because it can not be re-size.
I want a situation where by when the window is re-size to a particular width (width of the flash display) or any arbitrary width, horizontal scroll-bar will appear to prevent the text from overflow and the flash display from budging out the window.I have tried several trick on CSS and read various post but the problem remain unsolved.
I will be more than happy if I can get help from this forum.
I can provide the CSS if requested or use Mozilla firebug.
Thanks
Sylvester | 1 |
8,408,482 | 12/06/2011 23:38:37 | 339,463 | 05/12/2010 15:23:22 | 221 | 10 | Has anyone heard that JQuery mobile is developing something to take the place of Phonegap? | I was just wondering since this seems like a natural progression. That eventually, JQ mobile would just include everything that phoneGap does within its own library so you wouldn't need both.
Anyone? | jquery-mobile | null | null | null | null | 12/07/2011 16:20:00 | not constructive | Has anyone heard that JQuery mobile is developing something to take the place of Phonegap?
===
I was just wondering since this seems like a natural progression. That eventually, JQ mobile would just include everything that phoneGap does within its own library so you wouldn't need both.
Anyone? | 4 |
4,094,086 | 11/04/2010 05:18:18 | 468,932 | 10/07/2010 10:05:03 | 25 | 0 | drawRect is not being called | I need to draw an image in a rectangle so for that am using drawRect method.i observed that it is not being called.The output i can see only the blank screen.Am using MAC OS and i need to test the App in Iphone OS 3+.Please can anyone solve my problem.Here is my code:
-(IBAction)calling
{
int a=0;
a=a+1;
[self.view setNeedsDisplay]; //InRect:CGRectMake(78, 43, 200, 138)];
}
- (void)drawRect:(CGRect)rect {
UIImage *myImage = [UIImage imageNamed:@"btbp.jpg"];
CGRect imageRect = CGRectMake(10, 10, 300, 400);
[myImage drawInRect:imageRect];
[self.view setNeedsDisplay];
[myImage release];
}
i donno where i was wrong:(
| objective-c | xcode | drawrect | null | null | null | open | drawRect is not being called
===
I need to draw an image in a rectangle so for that am using drawRect method.i observed that it is not being called.The output i can see only the blank screen.Am using MAC OS and i need to test the App in Iphone OS 3+.Please can anyone solve my problem.Here is my code:
-(IBAction)calling
{
int a=0;
a=a+1;
[self.view setNeedsDisplay]; //InRect:CGRectMake(78, 43, 200, 138)];
}
- (void)drawRect:(CGRect)rect {
UIImage *myImage = [UIImage imageNamed:@"btbp.jpg"];
CGRect imageRect = CGRectMake(10, 10, 300, 400);
[myImage drawInRect:imageRect];
[self.view setNeedsDisplay];
[myImage release];
}
i donno where i was wrong:(
| 0 |
759,532 | 04/17/2009 08:30:35 | 3,137 | 08/26/2008 23:31:53 | 501 | 37 | What do you say to express the first succesful running of a program? | Yesterday, I had a moment of excitement when my LDAP client (pure C Win32) module successful retrieved data from Active Directory for the very first time.
It was more than a smoke test -- I had all ready run a few of those, and it was well less than even feature complete code. Some data was mangled - so it wasn't even code I would show someone else.
But it ran! It worked! (mostly) And now, I just have to massage it into shape. Saying "First data" sounds lame.
An astronomer might refer to 'First light'. A shipbuilder might 'launch'. An ancient Greek philosopher might have had a bathtub moment.
Is there such an expression for coding? What would you say?
| language-agnostic | polls | null | null | null | 10/26/2011 11:24:30 | not constructive | What do you say to express the first succesful running of a program?
===
Yesterday, I had a moment of excitement when my LDAP client (pure C Win32) module successful retrieved data from Active Directory for the very first time.
It was more than a smoke test -- I had all ready run a few of those, and it was well less than even feature complete code. Some data was mangled - so it wasn't even code I would show someone else.
But it ran! It worked! (mostly) And now, I just have to massage it into shape. Saying "First data" sounds lame.
An astronomer might refer to 'First light'. A shipbuilder might 'launch'. An ancient Greek philosopher might have had a bathtub moment.
Is there such an expression for coding? What would you say?
| 4 |
846,576 | 05/11/2009 02:53:02 | 98,188 | 04/30/2009 02:26:07 | 94 | 3 | Is there a C++ function to turn off the compute? | Is there a C++ function to turn off the computer? And since I doubt there is one (in the standard library, at least), what's the windows function that I can call from C++?
Basically, whats the code to turn of a windows xp computer in c++? | application-shutdown | windows | c++ | null | null | null | open | Is there a C++ function to turn off the compute?
===
Is there a C++ function to turn off the computer? And since I doubt there is one (in the standard library, at least), what's the windows function that I can call from C++?
Basically, whats the code to turn of a windows xp computer in c++? | 0 |
1,830,298 | 12/02/2009 02:29:41 | 221,906 | 12/01/2009 07:33:50 | 8 | 0 | Index safety when using C# indexers? | I'm coding a Vector class in C# and felt that indexers would be a good addition. Do I need to worry about the index being out of range?
Perhaps a code sample would be clearer:
class Vector3f
{
public Vector3f(float x, float y, float z)
{
this.X = x;
this.Y = y;
this.Z = z;
}
public float X {get; set;}
public float Y {get; set;}
public float Z {get; set;}
public float this[int pos]
{
get
{
switch (pos)
{
case 0: return this.X; break;
case 1: return this.Y; break;
case 2: return this.Z; break;
}
}
set
{
switch (pos)
{
case 0: this.X = value; break;
case 1: this.Y = value; break;
case 2: this.Z = value; break;
}
}
}
}
Should I put a `default` case in my `switch` statements? What should it do? | c# | null | null | null | null | null | open | Index safety when using C# indexers?
===
I'm coding a Vector class in C# and felt that indexers would be a good addition. Do I need to worry about the index being out of range?
Perhaps a code sample would be clearer:
class Vector3f
{
public Vector3f(float x, float y, float z)
{
this.X = x;
this.Y = y;
this.Z = z;
}
public float X {get; set;}
public float Y {get; set;}
public float Z {get; set;}
public float this[int pos]
{
get
{
switch (pos)
{
case 0: return this.X; break;
case 1: return this.Y; break;
case 2: return this.Z; break;
}
}
set
{
switch (pos)
{
case 0: this.X = value; break;
case 1: this.Y = value; break;
case 2: this.Z = value; break;
}
}
}
}
Should I put a `default` case in my `switch` statements? What should it do? | 0 |
10,964,211 | 06/09/2012 20:06:21 | 1,019,687 | 10/29/2011 11:14:53 | 162 | 1 | Powershell: Converting HTML table to XML or CSV | I want to be able to read a HTML table in Powershell and then export to XML or CSV. What the easiest way to achieve this? | html | xml | powershell | null | null | 06/11/2012 12:32:14 | not a real question | Powershell: Converting HTML table to XML or CSV
===
I want to be able to read a HTML table in Powershell and then export to XML or CSV. What the easiest way to achieve this? | 1 |
7,522,093 | 09/22/2011 22:11:45 | 912,443 | 08/25/2011 15:23:05 | 56 | 3 | ASP.NET, C#, IIS, Start Up | I am a total Noob to to .NET. I have all my files, folders, master pages, and code behind pages in my directory... I have been building it on a local development environment that was set up by the person who was here before me. I do not know much about what the specs of the environment are.
I just tried transferring all of my files over to the server we will be running off of and I am getting a "500 - Internal server error"...
I am thinking I am missing something real basic. What can I do with my Web.config file to get rid of this error and make the page viewable?
I know the 500 error is very common and could mean alot of things, but just the most basic problem, what are you thinking?
Thanks,
Chris | c# | asp.net | iis7 | web-config | null | 09/23/2011 06:26:58 | not a real question | ASP.NET, C#, IIS, Start Up
===
I am a total Noob to to .NET. I have all my files, folders, master pages, and code behind pages in my directory... I have been building it on a local development environment that was set up by the person who was here before me. I do not know much about what the specs of the environment are.
I just tried transferring all of my files over to the server we will be running off of and I am getting a "500 - Internal server error"...
I am thinking I am missing something real basic. What can I do with my Web.config file to get rid of this error and make the page viewable?
I know the 500 error is very common and could mean alot of things, but just the most basic problem, what are you thinking?
Thanks,
Chris | 1 |
7,642,328 | 10/04/2011 01:06:35 | 498,863 | 11/05/2010 22:34:26 | 53 | 0 | JBACI java compile error | im trying to sample the following code:
program AlienGame;
{ Shoot down a red alien spacecraft with a green or blue missile. }
{ Uses graphics and non-blocking read. }
#include "gdefs.pm"
#include "iodefs.pm"
const
AlienHead = 1; { Graphics handles }
AlienBody = 2;
Missile1Head = 3;
Missile1Body = 4;
Missile2Head = 5;
Missile2Body = 6;
MaxX = 500; { Size of screen }
AlienStartX = 30; { Initial positions of graphics objects }
MissileStartY = 400;
Missile1StartX = 400;
Missile2StartX = 300;
AlienDelta = 20; { Deltas for moving graphics objects }
MissileDelta = -20;
AlienRowSize = 40; { Step for initial location of alien }
var
S: binarysem := 1; { Protect variables and screen }
Shoot1: binarysem := 0; { Shoot first missile }
Shoot2: binarysem := 0; { Shoot second missile }
Exploded: binarysem := 0; { Missile has exploded }
AlienX, AlienY: integer;
{ Current position of alien }
HitAlien: boolean; { Has alien been hit ? }
Hits: integer := 0; { Number of aliens hit }
function abs(I: integer) : integer;
begin
if I < 0 then abs := -I else abs := I
end;
procedure Alien;
begin
AlienX := AlienStartX; AlienY := random(8) * AlienRowSize;
wait(S);
Create(AlienBody, RECTANGLE, RED, AlienX, AlienY, 30, 30);
Create(AlienHead, CIRCLE, RED, AlienX+30, AlienY, 30, 30);
signal(S);
while true do
begin
HitAlien := false;
while (AlienX < MaxX) and not HitAlien do
begin
wait(S);
MoveBy(AlienHead, AlienDelta, 0);
MoveBy(AlienBody, AlienDelta, 0);
AlienX := AlienX + AlienDelta;
signal(S);
end;
AlienX := AlienStartX; AlienY := random(8) * AlienRowSize;
wait(S);
MoveTo(AlienBody, AlienX, AlienY);
MoveTo(AlienHead, AlienX+30, AlienY);
signal(S);
end;
end;
procedure Missile1;
var MissileX, MissileY: integer;
begin
MissileX := Missile1StartX; MissileY := MissileStartY;
wait(S);
Create(Missile1Body, RECTANGLE, BLUE, MissileX, MissileY, 30, 50);
Create(Missile1Head, TRIANGLE, BLUE, MissileX+15, MissileY-30, 30, 30);
signal(S);
while true do
begin
wait(Shoot1);
while (MissileY > 0) and not HitAlien do
begin
wait(S);
HitAlien := (abs(MissileY - AlienY) < 50) and
(abs(AlienX - MissileX) < 50);
moveby(Missile1Head, 0, MissileDelta);
moveby(Missile1Body, 0, MissileDelta);
signal(S);
MissileY := MissileY + MissileDelta;
if HitAlien then
begin
hits := hits + 1;
writeln('Hits = ', hits);
MakeVisible(Missile1Head, 0);
MakeVisible(Missile1Body, 0);
end
end;
signal(Exploded);
MissileX := Missile1StartX; MissileY := MissileStartY;
wait(S);
MoveTo(Missile1Body, MissileX, MissileY);
MoveTo(Missile1Head, MissileX+15, MissileY-30);
signal(S);
end;
end;
procedure Missile2;
var MissileX, MissileY: integer;
begin
MissileX := Missile2StartX; MissileY := MissileStartY;
wait(S);
Create(Missile2Body, RECTANGLE, GREEN, MissileX, MissileY, 30, 50);
Create(Missile2Head, TRIANGLE, GREEN, MissileX+15, MissileY-30, 30, 30);
signal(S);
while true do
begin
wait(Shoot2);
while (MissileY > 0) and not HitAlien do
begin
wait(S);
HitAlien := (abs(MissileY - AlienY) < 50) and
(abs(AlienX - MissileX) < 50);
moveby(Missile2Head, 0, MissileDelta);
moveby(Missile2Body, 0, MissileDelta);
signal(S);
MissileY := MissileY + MissileDelta;
if HitAlien then
begin
hits := hits + 1;
writeln('Hits = ', hits);
MakeVisible(Missile2Head, 0);
MakeVisible(Missile2Body, 0);
end
end;
signal(Exploded);
MissileX := Missile2StartX; MissileY := MissileStartY;
wait(S);
MoveTo(Missile2Body, MissileX, MissileY);
MoveTo(Missile2Head, MissileX+15, MissileY-30);
signal(S);
end;
end;
procedure Launcher;
var C: char;
Missiles: integer;
begin
Missiles := 0;
while true do
begin
C := GetChar;
if C <= 'm' then signal(Shoot1) else signal(Shoot2);
Missiles := Missiles + 1;
writeln('Missiles shot = ', Missiles);
wait(Exploded);
end;
end;
begin
cobegin
Missile1; Missile2; Launcher; Alien;
coend;
end.
and i get the following in terminal:
root@pochi-ThinkPad-T61:/home/pochi/ProgramasJBACI# java -jar jbaci.jar
I/O error from: /usr/bin/bapas alien.pm java.io.IOException: Cannot run program "/usr/bin/bapas" (in directory "/home/pochi/ProgramasJBACI/examples"): java.io.IOException: error=2, No such file or directory
btw im compiling with JBACI
tnx for help
this isnt homework I need to know why i cant compile right... did i set a path wrong??
also i followed this instructions: in spanish....
http://inform.pucp.edu.pe/~inf232/Semestre-2007-2/Laboratorio-4/index.htm | java | c | operating-system | semaphore | null | 10/04/2011 21:43:29 | too localized | JBACI java compile error
===
im trying to sample the following code:
program AlienGame;
{ Shoot down a red alien spacecraft with a green or blue missile. }
{ Uses graphics and non-blocking read. }
#include "gdefs.pm"
#include "iodefs.pm"
const
AlienHead = 1; { Graphics handles }
AlienBody = 2;
Missile1Head = 3;
Missile1Body = 4;
Missile2Head = 5;
Missile2Body = 6;
MaxX = 500; { Size of screen }
AlienStartX = 30; { Initial positions of graphics objects }
MissileStartY = 400;
Missile1StartX = 400;
Missile2StartX = 300;
AlienDelta = 20; { Deltas for moving graphics objects }
MissileDelta = -20;
AlienRowSize = 40; { Step for initial location of alien }
var
S: binarysem := 1; { Protect variables and screen }
Shoot1: binarysem := 0; { Shoot first missile }
Shoot2: binarysem := 0; { Shoot second missile }
Exploded: binarysem := 0; { Missile has exploded }
AlienX, AlienY: integer;
{ Current position of alien }
HitAlien: boolean; { Has alien been hit ? }
Hits: integer := 0; { Number of aliens hit }
function abs(I: integer) : integer;
begin
if I < 0 then abs := -I else abs := I
end;
procedure Alien;
begin
AlienX := AlienStartX; AlienY := random(8) * AlienRowSize;
wait(S);
Create(AlienBody, RECTANGLE, RED, AlienX, AlienY, 30, 30);
Create(AlienHead, CIRCLE, RED, AlienX+30, AlienY, 30, 30);
signal(S);
while true do
begin
HitAlien := false;
while (AlienX < MaxX) and not HitAlien do
begin
wait(S);
MoveBy(AlienHead, AlienDelta, 0);
MoveBy(AlienBody, AlienDelta, 0);
AlienX := AlienX + AlienDelta;
signal(S);
end;
AlienX := AlienStartX; AlienY := random(8) * AlienRowSize;
wait(S);
MoveTo(AlienBody, AlienX, AlienY);
MoveTo(AlienHead, AlienX+30, AlienY);
signal(S);
end;
end;
procedure Missile1;
var MissileX, MissileY: integer;
begin
MissileX := Missile1StartX; MissileY := MissileStartY;
wait(S);
Create(Missile1Body, RECTANGLE, BLUE, MissileX, MissileY, 30, 50);
Create(Missile1Head, TRIANGLE, BLUE, MissileX+15, MissileY-30, 30, 30);
signal(S);
while true do
begin
wait(Shoot1);
while (MissileY > 0) and not HitAlien do
begin
wait(S);
HitAlien := (abs(MissileY - AlienY) < 50) and
(abs(AlienX - MissileX) < 50);
moveby(Missile1Head, 0, MissileDelta);
moveby(Missile1Body, 0, MissileDelta);
signal(S);
MissileY := MissileY + MissileDelta;
if HitAlien then
begin
hits := hits + 1;
writeln('Hits = ', hits);
MakeVisible(Missile1Head, 0);
MakeVisible(Missile1Body, 0);
end
end;
signal(Exploded);
MissileX := Missile1StartX; MissileY := MissileStartY;
wait(S);
MoveTo(Missile1Body, MissileX, MissileY);
MoveTo(Missile1Head, MissileX+15, MissileY-30);
signal(S);
end;
end;
procedure Missile2;
var MissileX, MissileY: integer;
begin
MissileX := Missile2StartX; MissileY := MissileStartY;
wait(S);
Create(Missile2Body, RECTANGLE, GREEN, MissileX, MissileY, 30, 50);
Create(Missile2Head, TRIANGLE, GREEN, MissileX+15, MissileY-30, 30, 30);
signal(S);
while true do
begin
wait(Shoot2);
while (MissileY > 0) and not HitAlien do
begin
wait(S);
HitAlien := (abs(MissileY - AlienY) < 50) and
(abs(AlienX - MissileX) < 50);
moveby(Missile2Head, 0, MissileDelta);
moveby(Missile2Body, 0, MissileDelta);
signal(S);
MissileY := MissileY + MissileDelta;
if HitAlien then
begin
hits := hits + 1;
writeln('Hits = ', hits);
MakeVisible(Missile2Head, 0);
MakeVisible(Missile2Body, 0);
end
end;
signal(Exploded);
MissileX := Missile2StartX; MissileY := MissileStartY;
wait(S);
MoveTo(Missile2Body, MissileX, MissileY);
MoveTo(Missile2Head, MissileX+15, MissileY-30);
signal(S);
end;
end;
procedure Launcher;
var C: char;
Missiles: integer;
begin
Missiles := 0;
while true do
begin
C := GetChar;
if C <= 'm' then signal(Shoot1) else signal(Shoot2);
Missiles := Missiles + 1;
writeln('Missiles shot = ', Missiles);
wait(Exploded);
end;
end;
begin
cobegin
Missile1; Missile2; Launcher; Alien;
coend;
end.
and i get the following in terminal:
root@pochi-ThinkPad-T61:/home/pochi/ProgramasJBACI# java -jar jbaci.jar
I/O error from: /usr/bin/bapas alien.pm java.io.IOException: Cannot run program "/usr/bin/bapas" (in directory "/home/pochi/ProgramasJBACI/examples"): java.io.IOException: error=2, No such file or directory
btw im compiling with JBACI
tnx for help
this isnt homework I need to know why i cant compile right... did i set a path wrong??
also i followed this instructions: in spanish....
http://inform.pucp.edu.pe/~inf232/Semestre-2007-2/Laboratorio-4/index.htm | 3 |
11,501,128 | 07/16/2012 09:06:16 | 1,520,537 | 07/12/2012 10:51:19 | 1 | 0 | Shopping cart price rule calculate on Subtotal+Shipping & Handling Chargers | magento shopping cart price rules calculate on Subtotal.
when using the “Percent of Product Price discount” method.
i want to calculate it on (Subtotal+Shipping & Handling Chargers)
how can i solve my problem…
Thank you! | php | magento | null | null | null | 07/16/2012 19:00:53 | not a real question | Shopping cart price rule calculate on Subtotal+Shipping & Handling Chargers
===
magento shopping cart price rules calculate on Subtotal.
when using the “Percent of Product Price discount” method.
i want to calculate it on (Subtotal+Shipping & Handling Chargers)
how can i solve my problem…
Thank you! | 1 |
5,035,018 | 02/17/2011 21:41:18 | 423,278 | 08/17/2010 19:46:56 | 127 | 7 | Why this powershell code returns whole objects insted of just selected properties ? | Why this powershell code returns whole objects insted of just selected properties ?
I want to get only name and SID for each user not whole Microsoft.ActiveDirectory.Management.ADAccount object with bounch of properties.
PS C:\> Get-ADUser -filter * -SearchBase "OU=mailOnly,DC=test,DC=demo,DC=local" -server test.demo.local -properties SID,Name
Best regards, Primoz. | powershell | active-directory | powershell-v2.0 | null | null | null | open | Why this powershell code returns whole objects insted of just selected properties ?
===
Why this powershell code returns whole objects insted of just selected properties ?
I want to get only name and SID for each user not whole Microsoft.ActiveDirectory.Management.ADAccount object with bounch of properties.
PS C:\> Get-ADUser -filter * -SearchBase "OU=mailOnly,DC=test,DC=demo,DC=local" -server test.demo.local -properties SID,Name
Best regards, Primoz. | 0 |
11,585,338 | 07/20/2012 18:53:56 | 1,069,254 | 11/28/2011 11:44:42 | 309 | 9 | Is adding lots of methods going to decrease performance? | I know that use a method instead of doing everything line after line is much more clear, so let's just put this assumption apart.
I was asking myself if doing the same thing calling a method take more time (for the call to the method) or not, imagining that the bytecode generated is the same. | java | performance | null | null | null | null | open | Is adding lots of methods going to decrease performance?
===
I know that use a method instead of doing everything line after line is much more clear, so let's just put this assumption apart.
I was asking myself if doing the same thing calling a method take more time (for the call to the method) or not, imagining that the bytecode generated is the same. | 0 |
7,800,342 | 10/17/2011 22:27:33 | 1,000,054 | 10/17/2011 22:07:41 | 1 | 0 | WHERE clause fails with certain string literals | I have a database table that stores error messages, and I want to run various queries on them. First, I get an overall count by grouping them like this:
select MessageText, COUNT(*) from MessageLog group by MessageText
And the result is:
1 Input string was not in a correct format 4
2 Value cannot be null. Parameter name: Int 8
3 Value cannot be null. Parameter name: String 1
Now, if I try to select messages by the text string, some of them return no results even though the messages exist. For example,
select * from MessageLog where MessageText = 'Value cannot be null. Parameter name: Int'
does not return any results, even though the previous query shows there are 8 of them. What is it about this string that fails to match?
| sql | where-clause | null | null | null | null | open | WHERE clause fails with certain string literals
===
I have a database table that stores error messages, and I want to run various queries on them. First, I get an overall count by grouping them like this:
select MessageText, COUNT(*) from MessageLog group by MessageText
And the result is:
1 Input string was not in a correct format 4
2 Value cannot be null. Parameter name: Int 8
3 Value cannot be null. Parameter name: String 1
Now, if I try to select messages by the text string, some of them return no results even though the messages exist. For example,
select * from MessageLog where MessageText = 'Value cannot be null. Parameter name: Int'
does not return any results, even though the previous query shows there are 8 of them. What is it about this string that fails to match?
| 0 |
9,512,836 | 03/01/2012 08:25:07 | 1,164,683 | 01/23/2012 10:04:03 | 18 | 0 | How to open a .log file in notepad in java? | One of my log files are stored in a specified path in server. There is one button in webpage by clicking I want to open that log file in notepad from any other machine. How can I do it in java? | java | notepad++ | null | null | null | 03/01/2012 08:37:21 | too localized | How to open a .log file in notepad in java?
===
One of my log files are stored in a specified path in server. There is one button in webpage by clicking I want to open that log file in notepad from any other machine. How can I do it in java? | 3 |
3,155,038 | 07/01/2010 04:11:14 | 366,845 | 06/15/2010 02:04:40 | 6 | 0 | DataMapper Associations, simple code, weird error | I'm just begining to use DataMappers associations, just to test things out have a very simple table structure, and it's is borking.
require 'dm-core'
require 'dm-migrations'
DataMapper.setup( :default, "sqlite3://#{Dir.pwd}/dbtest.db" )
class Account
include DataMapper::Resource
property :id, Serial
has 1, :userprofile, :model =>"UserProfile"
end
class UserProfile
include DataMapper::Resource
property :id, Serial
belongs_to :Account
end
DataMapper.finalize #whether I have this before or after auto migrate the result is the same
DataMapper.auto_migrate!
This should just work, nice and simple, DM is working for everything else(I'e already been using it plenty).
Here is the result when I run this code, anyone know what the problem is?:
DataObjects::SyntaxError: duplicate column name: account_id (code: 1, sql state: , query: CREATE TABLE "user_profiles" ("id" INTEGER NOT NULL PRIMARY
KEY AUTOINCREMENT, "account_id" INTEGER NOT NULL, "account_id" INTEGER NOT NULL), uri: sqlite3://d/Borrow/dbtest.db)
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.0/lib/dm-migrations/adapters/dm-do-adapter.rb:92:in `execute_non_query'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.0/lib/dm-migrations/adapters/dm-do-adapter.rb:92:in `create_model_storage'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.0/lib/dm-migrations/adapters/dm-do-adapter.rb:90:in `each'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.0/lib/dm-migrations/adapters/dm-do-adapter.rb:90:in `create_model_storage'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-do-adapter-1.0.0/lib/dm-do-adapter/adapter.rb:260:in `with_connection'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.0/lib/dm-migrations/adapters/dm-do-adapter.rb:85:in `create_model_storage'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.0/lib/dm-migrations/auto_migration.rb:79:in `create_model_storage'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.0/lib/dm-migrations/auto_migration.rb:175:in `auto_migrate_up!'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.0/lib/dm-migrations/auto_migration.rb:130:in `auto_migrate!'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.0/lib/dm-migrations/auto_migration.rb:45:in `send'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.0/lib/dm-migrations/auto_migration.rb:45:in `repository_execute'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-core-1.0.0/lib/dm-core/model/descendant_set.rb:33:in `each'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-core-1.0.0/lib/dm-core/model/descendant_set.rb:33:in `each'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.0/lib/dm-migrations/auto_migration.rb:44:in `repository_execute'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.0/lib/dm-migrations/auto_migration.rb:22:in `auto_migrate!' | ruby | datamapper | null | null | null | null | open | DataMapper Associations, simple code, weird error
===
I'm just begining to use DataMappers associations, just to test things out have a very simple table structure, and it's is borking.
require 'dm-core'
require 'dm-migrations'
DataMapper.setup( :default, "sqlite3://#{Dir.pwd}/dbtest.db" )
class Account
include DataMapper::Resource
property :id, Serial
has 1, :userprofile, :model =>"UserProfile"
end
class UserProfile
include DataMapper::Resource
property :id, Serial
belongs_to :Account
end
DataMapper.finalize #whether I have this before or after auto migrate the result is the same
DataMapper.auto_migrate!
This should just work, nice and simple, DM is working for everything else(I'e already been using it plenty).
Here is the result when I run this code, anyone know what the problem is?:
DataObjects::SyntaxError: duplicate column name: account_id (code: 1, sql state: , query: CREATE TABLE "user_profiles" ("id" INTEGER NOT NULL PRIMARY
KEY AUTOINCREMENT, "account_id" INTEGER NOT NULL, "account_id" INTEGER NOT NULL), uri: sqlite3://d/Borrow/dbtest.db)
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.0/lib/dm-migrations/adapters/dm-do-adapter.rb:92:in `execute_non_query'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.0/lib/dm-migrations/adapters/dm-do-adapter.rb:92:in `create_model_storage'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.0/lib/dm-migrations/adapters/dm-do-adapter.rb:90:in `each'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.0/lib/dm-migrations/adapters/dm-do-adapter.rb:90:in `create_model_storage'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-do-adapter-1.0.0/lib/dm-do-adapter/adapter.rb:260:in `with_connection'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.0/lib/dm-migrations/adapters/dm-do-adapter.rb:85:in `create_model_storage'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.0/lib/dm-migrations/auto_migration.rb:79:in `create_model_storage'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.0/lib/dm-migrations/auto_migration.rb:175:in `auto_migrate_up!'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.0/lib/dm-migrations/auto_migration.rb:130:in `auto_migrate!'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.0/lib/dm-migrations/auto_migration.rb:45:in `send'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.0/lib/dm-migrations/auto_migration.rb:45:in `repository_execute'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-core-1.0.0/lib/dm-core/model/descendant_set.rb:33:in `each'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-core-1.0.0/lib/dm-core/model/descendant_set.rb:33:in `each'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.0/lib/dm-migrations/auto_migration.rb:44:in `repository_execute'
from d:/Ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.0/lib/dm-migrations/auto_migration.rb:22:in `auto_migrate!' | 0 |
2,136,206 | 01/25/2010 22:35:32 | 220,363 | 11/28/2009 05:49:00 | 1 | 0 | Receiving error message: "The installed product does not match the installation source(s)" | I have written a .NET C# application and have created an installer in Visual Studio 2008. Everything works fine. The application uses an external config file (not app.config). The application is written such that when the config file is deleted, the defaults for the application are restored and a new config file is created. This behaviour is part of the requirements of the system and cannot be changed.
When the file is deleted, however, the next attempt to run the application results in the following error message:
"The installed product does not match the installation source(s)"
And the system brings up an installer program.
I'm figuring that there is some sort of configuration in the install project that can turn this behavior off, but I cannot find any documentation or parameters to change this behavior.
Any ideas? | .net | visual-studio | installer | null | null | null | open | Receiving error message: "The installed product does not match the installation source(s)"
===
I have written a .NET C# application and have created an installer in Visual Studio 2008. Everything works fine. The application uses an external config file (not app.config). The application is written such that when the config file is deleted, the defaults for the application are restored and a new config file is created. This behaviour is part of the requirements of the system and cannot be changed.
When the file is deleted, however, the next attempt to run the application results in the following error message:
"The installed product does not match the installation source(s)"
And the system brings up an installer program.
I'm figuring that there is some sort of configuration in the install project that can turn this behavior off, but I cannot find any documentation or parameters to change this behavior.
Any ideas? | 0 |
6,567,790 | 07/04/2011 05:59:28 | 15,531 | 09/17/2008 10:11:45 | 312 | 13 | xforms outside a browser - specifically .NET WPF app | Looking for examples of rendering / filling out arbitrary forms defined by XForms (or some similar alternative) inside a WPF desktop app.
Are there any .NET implementations of XForms (almost everything I can find is in Java or running in a web browser)?
Is there are better way of defining forms for use in the .NET world? | .net | wpf | xforms | null | null | null | open | xforms outside a browser - specifically .NET WPF app
===
Looking for examples of rendering / filling out arbitrary forms defined by XForms (or some similar alternative) inside a WPF desktop app.
Are there any .NET implementations of XForms (almost everything I can find is in Java or running in a web browser)?
Is there are better way of defining forms for use in the .NET world? | 0 |
2,205,316 | 02/05/2010 05:58:29 | 266,799 | 02/05/2010 05:58:29 | 1 | 0 | java code to create dynamic methods at runtime | I have a dynamic list of variables for which I need to create getter and setter on the fly i.e. during runtime.
| dynamic | methods | creation | null | null | null | open | java code to create dynamic methods at runtime
===
I have a dynamic list of variables for which I need to create getter and setter on the fly i.e. during runtime.
| 0 |
3,849,074 | 10/03/2010 08:17:22 | 465,055 | 10/03/2010 08:17:22 | 1 | 0 | How to export/download table from mysql database using C#? | I want to export a table from a mysql database to a txt or csv file like the way you can in phpmyadmin . I currently use the code below but after the program has been running for a few hours it will throw an "tried to read past the stream" error.
MySqlConnection connection = new MySqlConnection(MyConString);
MySqlCommand command = connection.CreateCommand();
connection.Open();
command.CommandText = "SELECT * FROM mytable";
MySqlDataReader result = command.ExecuteReader();
if (result != null)
while (result.Read())
{
string thisrow = "";
for (int i = 0; i < result.FieldCount; i++)
thisrow += result.GetValue(i).ToString() + ",";
pass = Regex.Replace(thisrow, @"\W*", "");
if (!hshTable.ContainsKey(pass)) hshTable.Add(pass, pass);
}
connection.Close();
is there a command like `myquerystring = "LOAD DATA LOCAL INFILE 'C:/mysqltable.txt' INTO TABLE mytable FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'";`
that instead of loading a file to the database it downloads the table instead? | c# | .net | mysql | null | null | null | open | How to export/download table from mysql database using C#?
===
I want to export a table from a mysql database to a txt or csv file like the way you can in phpmyadmin . I currently use the code below but after the program has been running for a few hours it will throw an "tried to read past the stream" error.
MySqlConnection connection = new MySqlConnection(MyConString);
MySqlCommand command = connection.CreateCommand();
connection.Open();
command.CommandText = "SELECT * FROM mytable";
MySqlDataReader result = command.ExecuteReader();
if (result != null)
while (result.Read())
{
string thisrow = "";
for (int i = 0; i < result.FieldCount; i++)
thisrow += result.GetValue(i).ToString() + ",";
pass = Regex.Replace(thisrow, @"\W*", "");
if (!hshTable.ContainsKey(pass)) hshTable.Add(pass, pass);
}
connection.Close();
is there a command like `myquerystring = "LOAD DATA LOCAL INFILE 'C:/mysqltable.txt' INTO TABLE mytable FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'";`
that instead of loading a file to the database it downloads the table instead? | 0 |
5,964,694 | 05/11/2011 13:02:34 | 513,057 | 11/19/2010 04:21:57 | 901 | 103 | Why php over python in webdevelopment | I am wondering, why everyone opt for php and asp.net for web development. Eventhough python has number of libraries and frameworks for web development. For statistics you can have a look [here..][1]
[1]: http://trends.builtwith.com/framework/PHP | python | null | null | null | null | 05/11/2011 13:12:21 | not constructive | Why php over python in webdevelopment
===
I am wondering, why everyone opt for php and asp.net for web development. Eventhough python has number of libraries and frameworks for web development. For statistics you can have a look [here..][1]
[1]: http://trends.builtwith.com/framework/PHP | 4 |
10,869,974 | 06/03/2012 11:35:31 | 1,428,237 | 05/31/2012 11:13:18 | 21 | 0 | control on backtracking | Assume that backtracking is done as shown below. Each end point show success or fail.
Ex:
foo(X, search_key).
Backtracking :
Root
/ | \
/ | \
/ | \
/|\ | \
/ | \ | /|\
/ f f | / | \
/ | f | f
f g f
Abbreviation f : fail
g show first character of name
Unless no other way is found, I will not prefer to use g as argument in my next function.However, in this example, since no other way is found, I must use g as an argument in my next function.
How can I do that ? | prolog | null | null | null | null | null | open | control on backtracking
===
Assume that backtracking is done as shown below. Each end point show success or fail.
Ex:
foo(X, search_key).
Backtracking :
Root
/ | \
/ | \
/ | \
/|\ | \
/ | \ | /|\
/ f f | / | \
/ | f | f
f g f
Abbreviation f : fail
g show first character of name
Unless no other way is found, I will not prefer to use g as argument in my next function.However, in this example, since no other way is found, I must use g as an argument in my next function.
How can I do that ? | 0 |
3,115,888 | 06/25/2010 06:00:19 | 273,212 | 02/11/2010 02:04:56 | 182 | 4 | Perl basic questions | 1. In Unix shell script we check the exit of the previous command by checking the whether the value of $! equal to zero. How can i do it in perl.
2. when i do a perl -V i am able to see some paths listed in @INC. How do i add new paths to @INC.
3. In GetOptions function how can i set the order of argument. If i want -email to be in first argument. If it's given as second argument it should fail.
GetOptions( 'nemail' => sub { $ENV{EMAIL} = "Y" }
, 'arg' => \$help );
4. What is the difference between .pl and .pm extension? When i need to use .pm extension?
5. when i use use File::Copy; where does the code is located. which enviromental variable does it when i have "use" | perl | null | null | null | null | 06/27/2010 05:34:55 | not a real question | Perl basic questions
===
1. In Unix shell script we check the exit of the previous command by checking the whether the value of $! equal to zero. How can i do it in perl.
2. when i do a perl -V i am able to see some paths listed in @INC. How do i add new paths to @INC.
3. In GetOptions function how can i set the order of argument. If i want -email to be in first argument. If it's given as second argument it should fail.
GetOptions( 'nemail' => sub { $ENV{EMAIL} = "Y" }
, 'arg' => \$help );
4. What is the difference between .pl and .pm extension? When i need to use .pm extension?
5. when i use use File::Copy; where does the code is located. which enviromental variable does it when i have "use" | 1 |
11,682,679 | 07/27/2012 06:39:00 | 785,349 | 06/06/2011 04:20:32 | 1,285 | 28 | Migrate SQL Server 2008 to MySQL 5 | We have a database running on `SQL Server 2008` that I want to migrate to `MySQL 5`. What are the tools needed to migrate live data from the sever to MySQL without doing any SQL coding.
- Is there a utility that will convert from a running SQL Server 2008 to a runnung MySQL server on a machine?
- How about the stored procedures made with SQL Server 2008, can it be automatically converted? | mysql | sql | sql-server | null | null | 07/28/2012 20:11:46 | off topic | Migrate SQL Server 2008 to MySQL 5
===
We have a database running on `SQL Server 2008` that I want to migrate to `MySQL 5`. What are the tools needed to migrate live data from the sever to MySQL without doing any SQL coding.
- Is there a utility that will convert from a running SQL Server 2008 to a runnung MySQL server on a machine?
- How about the stored procedures made with SQL Server 2008, can it be automatically converted? | 2 |
6,493,326 | 06/27/2011 13:08:34 | 813,547 | 06/24/2011 06:10:51 | 35 | 1 | OPERATING SYSTEMS AND IN NEED OF ADVICES ABOUT THE ARM CONTROLLER | People say Operating system is the software that controls the hardware
I dont understand what it really is.
For instance
We are writing a code for a calculator
It takes control of the LCD and KEYPAD
We write the code to bring the interface between LCD and KEYPAD
But people dont call these as Operating system
They say its a normal code.
what really a Operating system mean
I have tried it on google and everywhere
They just say its a software that controls hardware
Can anyone clear my doubt?
and i want to make wonders in micro controllers
I made some good tasks on 8051
I want to learn ARM
But there are many versions to go through
I dont know where to start ARM 7 or ARM 9
Can anyone give me some suggestion about these.
And any good sites regarding the ARM 7 or ARM 9 to the beginners.
And any free IDE to work on the ARM
I dont know how to make the things
I believe here leading experts are teamed up
And give good advices
And i know you do it again to me
If you dont mind give me some link where i can download the ARM IDE and the TUTORIALS to beginners | arm | microcontroller | embedded | null | null | 06/27/2011 14:39:06 | not a real question | OPERATING SYSTEMS AND IN NEED OF ADVICES ABOUT THE ARM CONTROLLER
===
People say Operating system is the software that controls the hardware
I dont understand what it really is.
For instance
We are writing a code for a calculator
It takes control of the LCD and KEYPAD
We write the code to bring the interface between LCD and KEYPAD
But people dont call these as Operating system
They say its a normal code.
what really a Operating system mean
I have tried it on google and everywhere
They just say its a software that controls hardware
Can anyone clear my doubt?
and i want to make wonders in micro controllers
I made some good tasks on 8051
I want to learn ARM
But there are many versions to go through
I dont know where to start ARM 7 or ARM 9
Can anyone give me some suggestion about these.
And any good sites regarding the ARM 7 or ARM 9 to the beginners.
And any free IDE to work on the ARM
I dont know how to make the things
I believe here leading experts are teamed up
And give good advices
And i know you do it again to me
If you dont mind give me some link where i can download the ARM IDE and the TUTORIALS to beginners | 1 |
11,209,590 | 06/26/2012 14:26:58 | 1,480,339 | 06/25/2012 14:53:16 | 1 | 0 | as2, and "e; in textfile stops reading text | I have a textfile, that is loaded into a swf through a flashvars:
- The data is stored in Mysql,
- The data is stored using coldfusion and cfquery
- the data is read out into a textfile by coldfusion
- the data is loaded into the swf by passing the filename to flashvars, then being read into the actionscript.
the problem is, all the text is initialized until the first
"e;
and I'm not sure how to escape this, and at what point I should.
I am storing the original text using coldfusion, and have it set the data to html edit format
#HTMLEditFormat(form.content)# />
The boy grinned as he led back to the trail.
"A big un, Granser," he chuckled
Below is the full actionscript
// This will be the starting position of the textbox
var starting_ypos:Number;
// Load the Flashvars into the script
text1.text = myVariable;
text2.int = mySecondVariable;
// Make a load vars object
my_data = new LoadVars();
// This will be how fast the text box will scroll
var scroll_speed:Number = text2.int;
// Make my on load function
my_data.onLoad = function() {
// Fix the double space issue
var my_text = unescape(this.content).split("\r\n");
my_text = my_text.join("\n");
my_text = my_text.split("\r");
my_text = my_text.join("\n");
// Set the text in the text box
scroll_text.Text = my_text;
// Set the autosize
scroll_text.autoSize = true;
// Set the starting_ypos
starting_ypos = scroll_text._y;
};
// Load the external text file
my_data.load(text1.text);
// Start the scrolling
this.onEnterFrame = function() {
// Check for hit test with the mask and the mouse
if(!mask_mc.hitTest(_root._xmouse, _root._ymouse)) {
// Check to see if we are in the mask
if(mask_mc.hitTest(scroll_text)) {
// Move the textbox
scroll_text._y -= scroll_speed;
} else {
// Reset the text box
stop();
}
}
}
// Simple stop command
stop(); | mysql | coldfusion | actionscript-2 | flashvars | null | null | open | as2, and "e; in textfile stops reading text
===
I have a textfile, that is loaded into a swf through a flashvars:
- The data is stored in Mysql,
- The data is stored using coldfusion and cfquery
- the data is read out into a textfile by coldfusion
- the data is loaded into the swf by passing the filename to flashvars, then being read into the actionscript.
the problem is, all the text is initialized until the first
"e;
and I'm not sure how to escape this, and at what point I should.
I am storing the original text using coldfusion, and have it set the data to html edit format
#HTMLEditFormat(form.content)# />
The boy grinned as he led back to the trail.
"A big un, Granser," he chuckled
Below is the full actionscript
// This will be the starting position of the textbox
var starting_ypos:Number;
// Load the Flashvars into the script
text1.text = myVariable;
text2.int = mySecondVariable;
// Make a load vars object
my_data = new LoadVars();
// This will be how fast the text box will scroll
var scroll_speed:Number = text2.int;
// Make my on load function
my_data.onLoad = function() {
// Fix the double space issue
var my_text = unescape(this.content).split("\r\n");
my_text = my_text.join("\n");
my_text = my_text.split("\r");
my_text = my_text.join("\n");
// Set the text in the text box
scroll_text.Text = my_text;
// Set the autosize
scroll_text.autoSize = true;
// Set the starting_ypos
starting_ypos = scroll_text._y;
};
// Load the external text file
my_data.load(text1.text);
// Start the scrolling
this.onEnterFrame = function() {
// Check for hit test with the mask and the mouse
if(!mask_mc.hitTest(_root._xmouse, _root._ymouse)) {
// Check to see if we are in the mask
if(mask_mc.hitTest(scroll_text)) {
// Move the textbox
scroll_text._y -= scroll_speed;
} else {
// Reset the text box
stop();
}
}
}
// Simple stop command
stop(); | 0 |
3,623,363 | 09/02/2010 02:03:19 | 117,069 | 06/04/2009 05:02:17 | 3,745 | 208 | Flashdevelop + haxe -- repeated "An I/O error has occured" errors | I'm getting small dialog boxes that pop up saying `I/O Error occurred`. What causes this, and how should I fix this? | io | flashdevelop | haxe | null | null | null | open | Flashdevelop + haxe -- repeated "An I/O error has occured" errors
===
I'm getting small dialog boxes that pop up saying `I/O Error occurred`. What causes this, and how should I fix this? | 0 |
6,794,744 | 07/22/2011 18:55:43 | 516,908 | 11/23/2010 02:46:18 | 60 | 1 | sqlite3 gem on Mac OS X Lion... fail! | I just upgraded my Mac to Lion but unfortunately I had to re-setup my Rails development environment. With the following versions of software:
ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]
Rails 3.0.9
sqlite3 3.7.5
When I run the command:
sudo gem install sqlite3
It throws following exception:
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb mkmf.rb
can't find header files for ruby at
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
And the it adds:
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/sqlite3-1.3.3 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/sqlite3-1.3.3/ext/sqlite3/gem_make.out
Did anyone dive into Lion yet..
Thanks | ruby | ruby-on-rails-3 | rubygems | null | null | null | open | sqlite3 gem on Mac OS X Lion... fail!
===
I just upgraded my Mac to Lion but unfortunately I had to re-setup my Rails development environment. With the following versions of software:
ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]
Rails 3.0.9
sqlite3 3.7.5
When I run the command:
sudo gem install sqlite3
It throws following exception:
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb mkmf.rb
can't find header files for ruby at
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
And the it adds:
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/sqlite3-1.3.3 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/sqlite3-1.3.3/ext/sqlite3/gem_make.out
Did anyone dive into Lion yet..
Thanks | 0 |
3,826,721 | 09/29/2010 23:50:01 | 460,052 | 09/27/2010 23:58:17 | 11 | 0 | Are there any operating systems that have zero C, zero C++ and zero assembly code? | If so, please list some of them. Thanks | operating-system | null | null | null | null | 09/30/2010 00:51:40 | not a real question | Are there any operating systems that have zero C, zero C++ and zero assembly code?
===
If so, please list some of them. Thanks | 1 |
10,513,961 | 05/09/2012 10:07:24 | 1,384,229 | 05/09/2012 09:43:43 | 1 | 0 | How Do I Check How Much Credits My App Has Earned? | I just launched an app yesterday and made a test buy with my profile, but I am not very sure where to look to view my app earnings for this test buy. The closest I came was looking in: Apps >> MY APP NAME >> Insights >>Credits. but the the only information I see there is for SPEND, CHARGEBACKS, REFUNDS.
Can anyone please tell me if this SPEND info/graph is the money my app has earned?
And then the graph does not show the test purchase I made, assuming this SPEND info is my app earnings. so does it mean I did something wrong? Or does mean it takes a while before your earnings show up in your account profile, for it has been maybe some 7-9 hours since i made the best buy.
Thanks all. | application | facebook-credits | null | null | null | 07/09/2012 15:21:18 | off topic | How Do I Check How Much Credits My App Has Earned?
===
I just launched an app yesterday and made a test buy with my profile, but I am not very sure where to look to view my app earnings for this test buy. The closest I came was looking in: Apps >> MY APP NAME >> Insights >>Credits. but the the only information I see there is for SPEND, CHARGEBACKS, REFUNDS.
Can anyone please tell me if this SPEND info/graph is the money my app has earned?
And then the graph does not show the test purchase I made, assuming this SPEND info is my app earnings. so does it mean I did something wrong? Or does mean it takes a while before your earnings show up in your account profile, for it has been maybe some 7-9 hours since i made the best buy.
Thanks all. | 2 |
168,298 | 10/03/2008 18:44:43 | 7,205 | 09/15/2008 13:20:33 | 4 | 4 | Will Learning C++ Help for Building Fast/No-Additional-Requirements Desktop Applications? | Will learning C++ help me build native applications with good speed? Will it help me as a programmer, and what are the other benefits?
The reason why I want to learn C++ is because I'm disappointed with the UI performances of applications built on top of JVM and .NET. They feel slow, and start slow too. Of course, a really bad programmer can create a slower and sluggish application using C++ too, but I'm not considering that case.
One of my favorite Windows utility application is [Launchy][1]. And in the Readme.pdf file, the author of the program wrote this:
> 0.6 This is the first C++ release. As I became frustrated with C#’s large
> .NET framework requirements and users
> lack of desire to install it, I
> decided to switch back to the faster
> language.
I totally agree with the author of Launchy about the .NET framework requirement or even a JRE requirement for desktop applications. Let alone the specific version of them. And some of the best and my favorite desktop applications don't need .NET or Java to run. They just run after installing. Are they mostly built using C++? Is C++ the only option for good and fast GUI based applications?
And, I'm also very interested in hearing the other benefits of learning C++.
[1]: http://launchy.net/ | c++ | gui | language | native | null | 07/04/2012 15:50:07 | not constructive | Will Learning C++ Help for Building Fast/No-Additional-Requirements Desktop Applications?
===
Will learning C++ help me build native applications with good speed? Will it help me as a programmer, and what are the other benefits?
The reason why I want to learn C++ is because I'm disappointed with the UI performances of applications built on top of JVM and .NET. They feel slow, and start slow too. Of course, a really bad programmer can create a slower and sluggish application using C++ too, but I'm not considering that case.
One of my favorite Windows utility application is [Launchy][1]. And in the Readme.pdf file, the author of the program wrote this:
> 0.6 This is the first C++ release. As I became frustrated with C#’s large
> .NET framework requirements and users
> lack of desire to install it, I
> decided to switch back to the faster
> language.
I totally agree with the author of Launchy about the .NET framework requirement or even a JRE requirement for desktop applications. Let alone the specific version of them. And some of the best and my favorite desktop applications don't need .NET or Java to run. They just run after installing. Are they mostly built using C++? Is C++ the only option for good and fast GUI based applications?
And, I'm also very interested in hearing the other benefits of learning C++.
[1]: http://launchy.net/ | 4 |
7,643,563 | 10/04/2011 05:16:01 | 952,324 | 09/19/2011 09:11:40 | 8 | 0 | Unable to take screenshots in mac | Here i developing iphone application. I want to take iphone simulator screen shots. But i cant take screen shots and anything. I also searched in web. I pressing Cmd+shift+3 ,cmd+shift+4 or using grab. Everything i used. But cant take screen shots. How to solve pls help me. | iphone | osx | null | null | null | 10/04/2011 07:14:15 | off topic | Unable to take screenshots in mac
===
Here i developing iphone application. I want to take iphone simulator screen shots. But i cant take screen shots and anything. I also searched in web. I pressing Cmd+shift+3 ,cmd+shift+4 or using grab. Everything i used. But cant take screen shots. How to solve pls help me. | 2 |
9,148,908 | 02/05/2012 11:37:41 | 305,532 | 03/30/2010 22:07:22 | 149 | 16 | What is the best CI server for a PHP web application? | I had a look at [Travis CI](http://www.travis-ci.org) - which seems to be utterly complex to setup, [Jenkins](http://www.jenkins-ci.org) - with which I'm fairly familiar, but still seems a bit too much for some PHP development, and [Xinc](http://code.google.com/p/xinc) - which hasn't the SCM backend I need (Mercurial). Still, I haven't yet found the one CI server that hasn't any downside, so far my mind tends to go for Jenkins. Have I overseen anything important in the area?
My requirements:
- Checkout / update via Mercurial
- Test runs on commit / scheduled
- PHPUnit-compatible
- Notifications via Mail (Jabber would be a plus)
- Integration of Code Coverage results
Thanks,
Thomas. | php | continuous-integration | phpunit | null | null | 02/05/2012 12:11:04 | not constructive | What is the best CI server for a PHP web application?
===
I had a look at [Travis CI](http://www.travis-ci.org) - which seems to be utterly complex to setup, [Jenkins](http://www.jenkins-ci.org) - with which I'm fairly familiar, but still seems a bit too much for some PHP development, and [Xinc](http://code.google.com/p/xinc) - which hasn't the SCM backend I need (Mercurial). Still, I haven't yet found the one CI server that hasn't any downside, so far my mind tends to go for Jenkins. Have I overseen anything important in the area?
My requirements:
- Checkout / update via Mercurial
- Test runs on commit / scheduled
- PHPUnit-compatible
- Notifications via Mail (Jabber would be a plus)
- Integration of Code Coverage results
Thanks,
Thomas. | 4 |
3,322,534 | 07/23/2010 21:30:29 | 83,897 | 03/28/2009 02:01:50 | 835 | 11 | Can this company claim ownership of my personal project? | I have been working on a project in my personal time that has nothing at all to do with my main job. I work on it after work, on the trolley to work, and on the trolley from work. I store all my source code in my own personal repository on my personal server in my apartment.
While at work, I use the same computer which I purchased to do my main job. I do not ever work on my personal project at work. I have, however, pushed commits to my Mercurial repository over ssh (hg push ssh://hostname:22//path/to/repository) immediately after arriving at work, just so things were backed up.
I also talked to one of my team members for under 5 minutes on a couple occasions about whether he would be interested in helping with the project on his own time, completely separate from his main work.
My question is, could the company claim any ownership of the project?
This is my last week at this company. Would it be worthwhile to have my boss sign something that says they agree to not claim any ownership of the project? | legal | copyright | ownership | null | null | 07/23/2010 22:22:26 | off topic | Can this company claim ownership of my personal project?
===
I have been working on a project in my personal time that has nothing at all to do with my main job. I work on it after work, on the trolley to work, and on the trolley from work. I store all my source code in my own personal repository on my personal server in my apartment.
While at work, I use the same computer which I purchased to do my main job. I do not ever work on my personal project at work. I have, however, pushed commits to my Mercurial repository over ssh (hg push ssh://hostname:22//path/to/repository) immediately after arriving at work, just so things were backed up.
I also talked to one of my team members for under 5 minutes on a couple occasions about whether he would be interested in helping with the project on his own time, completely separate from his main work.
My question is, could the company claim any ownership of the project?
This is my last week at this company. Would it be worthwhile to have my boss sign something that says they agree to not claim any ownership of the project? | 2 |
9,984,898 | 04/02/2012 22:49:03 | 1,286,527 | 03/22/2012 17:03:03 | 161 | 17 | Would you make this method Static or not? | During a code review I presented a method quickly to the team that I had made static and one person agreed that there was no reason for it to not be static and a person disagreed saying that he would not make it static because it wasn't necessary and just to be on the safe side for future modifications and testing.
So I did quite a bit of research and obviously it's a specialized case but I would like to know what you would do in this situation and why?
(Its basically a helper method I call from a few different methods, a very low traffic page. More for my knowledge and learning on Static.)
private IEnumerable<Category> GetCategoryByID(int id, Context context)
{
var categoryQuery = from selectAllProc in context.SelectAll_sp()
where selectAllProc.CategoryID == id
select selectAllProc;
return categoryQuery;
} | c# | .net | linq-to-sql | static | null | 04/03/2012 03:38:24 | not constructive | Would you make this method Static or not?
===
During a code review I presented a method quickly to the team that I had made static and one person agreed that there was no reason for it to not be static and a person disagreed saying that he would not make it static because it wasn't necessary and just to be on the safe side for future modifications and testing.
So I did quite a bit of research and obviously it's a specialized case but I would like to know what you would do in this situation and why?
(Its basically a helper method I call from a few different methods, a very low traffic page. More for my knowledge and learning on Static.)
private IEnumerable<Category> GetCategoryByID(int id, Context context)
{
var categoryQuery = from selectAllProc in context.SelectAll_sp()
where selectAllProc.CategoryID == id
select selectAllProc;
return categoryQuery;
} | 4 |
4,759,500 | 01/21/2011 06:28:37 | 584,040 | 01/21/2011 06:12:23 | 1 | 0 | How do I use Admob on the Android OS? | Using AdMob, how can I give an advertisement in an Android Application? | android | admob | null | null | null | null | open | How do I use Admob on the Android OS?
===
Using AdMob, how can I give an advertisement in an Android Application? | 0 |
9,498,504 | 02/29/2012 11:42:43 | 1,240,121 | 02/29/2012 11:35:28 | 1 | 0 | On change the text field alert and not on click of button | There is one create category button and once user click on create account and input text in text field and BLUR there should be alert that "Click save to save categories". if user click on save button alert should not come.
I am trying to use blur function but when user click on save button there is also alert for that , what is the best possible way to ignore alert on click of Save button.
<button type="submit" class="button" >Save</button>
<input type="text" name="category_name">
$("input[name=category_name]").change(function(){
alert("Click save to save categories");
})** | javascript | jquery | html | null | null | null | open | On change the text field alert and not on click of button
===
There is one create category button and once user click on create account and input text in text field and BLUR there should be alert that "Click save to save categories". if user click on save button alert should not come.
I am trying to use blur function but when user click on save button there is also alert for that , what is the best possible way to ignore alert on click of Save button.
<button type="submit" class="button" >Save</button>
<input type="text" name="category_name">
$("input[name=category_name]").change(function(){
alert("Click save to save categories");
})** | 0 |
7,263,799 | 08/31/2011 21:41:32 | 84,952 | 03/31/2009 04:34:52 | 1,519 | 12 | Why does OS X not have a default package manager? | Debian has APT. Red Hat has RPM. FreeBSD has Ports. NetBSD has pkgsrc. Mac OS X has MacPorts, Fink, and Homebrew, but those are all third-party package managers. Why does OS X not have a default package manager? | packaging | osx | package-managers | null | null | 08/31/2011 21:48:12 | off topic | Why does OS X not have a default package manager?
===
Debian has APT. Red Hat has RPM. FreeBSD has Ports. NetBSD has pkgsrc. Mac OS X has MacPorts, Fink, and Homebrew, but those are all third-party package managers. Why does OS X not have a default package manager? | 2 |
7,451,381 | 09/16/2011 23:36:19 | 399,772 | 07/23/2010 00:35:54 | 427 | 12 | MongoDB, how to update a part of an array only? |
I have a document in MongoDB which holds some meta info like the date updated and the _id, and an array of addresses.
{
"_id": {
"$oid": "4e73a30466ca1a1f56000001"
},
"updated": 1316215062,
"address": [
{
"street": "Rotenturmstrasse 8",
"postcode": "1020",
"phone": "Vienna",
"altitude": -1,
"geolocation": [
"11.367464",
"47.204876"
]
}
]
}
Now there could be multiple addresses. I am creating an object for an address which needs to be updated and saving it to the database. This is what the new object to be inserted looks like:
new_object = {
:_id=>BSON::ObjectId('4e73a30466ca1a1f56000001'),
:updated=>1316215099,
:address=>[
nil,
nil,
{
:street=>"Reumannplatz 8",
:postcode=>"1020",
:phone=>"Vienna",
:altitude=>-1,
:geolocation=>[
"12.367464",
"48.204876"
]
}
]
}
Upon calling `db.venues.save(new_object)` what I would like the document to end up looking like is:
{
:_id=>BSON::ObjectId('4e73a30466ca1a1f56000001'),
:updated=>1316215099,
:address=>[ {
"street": "Rotenturmstrasse 8",
"postcode": "1020",
"phone": "Vienna",
"altitude": -1,
"geolocation": [
"11.367464",
"47.204876"
]
},
nil,
{
:street=>"Reumannplatz 8",
:postcode=>"1020",
:phone=>"Vienna",
:altitude=>-1,
:geolocation=>[
"12.367464",
"48.204876"
]
}
]
}
Instead it overwrites the entire array and ends up like this:
{
:_id=>BSON::ObjectId('4e73a30466ca1a1f56000001'),
:updated=>1316215099,
:address=>[
nil,
nil,
{
:street=>"Reumannplatz 8",
:postcode=>"1020",
:phone=>"Vienna",
:altitude=>-1,
:geolocation=>[
"12.367464",
"48.204876"
]
}
]
}
What's the way to do it? I am trying to avoid multiple queries. Would it make things easier if the address array in the database was a hash instead? | ruby | mongodb | null | null | null | null | open | MongoDB, how to update a part of an array only?
===
I have a document in MongoDB which holds some meta info like the date updated and the _id, and an array of addresses.
{
"_id": {
"$oid": "4e73a30466ca1a1f56000001"
},
"updated": 1316215062,
"address": [
{
"street": "Rotenturmstrasse 8",
"postcode": "1020",
"phone": "Vienna",
"altitude": -1,
"geolocation": [
"11.367464",
"47.204876"
]
}
]
}
Now there could be multiple addresses. I am creating an object for an address which needs to be updated and saving it to the database. This is what the new object to be inserted looks like:
new_object = {
:_id=>BSON::ObjectId('4e73a30466ca1a1f56000001'),
:updated=>1316215099,
:address=>[
nil,
nil,
{
:street=>"Reumannplatz 8",
:postcode=>"1020",
:phone=>"Vienna",
:altitude=>-1,
:geolocation=>[
"12.367464",
"48.204876"
]
}
]
}
Upon calling `db.venues.save(new_object)` what I would like the document to end up looking like is:
{
:_id=>BSON::ObjectId('4e73a30466ca1a1f56000001'),
:updated=>1316215099,
:address=>[ {
"street": "Rotenturmstrasse 8",
"postcode": "1020",
"phone": "Vienna",
"altitude": -1,
"geolocation": [
"11.367464",
"47.204876"
]
},
nil,
{
:street=>"Reumannplatz 8",
:postcode=>"1020",
:phone=>"Vienna",
:altitude=>-1,
:geolocation=>[
"12.367464",
"48.204876"
]
}
]
}
Instead it overwrites the entire array and ends up like this:
{
:_id=>BSON::ObjectId('4e73a30466ca1a1f56000001'),
:updated=>1316215099,
:address=>[
nil,
nil,
{
:street=>"Reumannplatz 8",
:postcode=>"1020",
:phone=>"Vienna",
:altitude=>-1,
:geolocation=>[
"12.367464",
"48.204876"
]
}
]
}
What's the way to do it? I am trying to avoid multiple queries. Would it make things easier if the address array in the database was a hash instead? | 0 |
10,389,072 | 04/30/2012 19:02:18 | 985,695 | 10/08/2011 18:52:47 | 20 | 0 | Position of Game AI in world | I have a question about controlling position of AI character in games.
in most games animations of player are inplace so position of character is in our hands.
but when look at AI animations, they are not in place. for example when an ai moves forward his animation moves one step in localspace. if we want to loop
this animation, after one step character go back to first place.
we need ai moves forward in the world.
my question is : how to update position of ai character in world space?
thanks. | animation | artificial-intelligence | null | null | null | 05/02/2012 21:25:33 | not a real question | Position of Game AI in world
===
I have a question about controlling position of AI character in games.
in most games animations of player are inplace so position of character is in our hands.
but when look at AI animations, they are not in place. for example when an ai moves forward his animation moves one step in localspace. if we want to loop
this animation, after one step character go back to first place.
we need ai moves forward in the world.
my question is : how to update position of ai character in world space?
thanks. | 1 |
9,422,726 | 02/23/2012 22:53:11 | 445,953 | 09/13/2010 04:22:07 | 574 | 14 | get_file_content not working for https | I am using php and google's new [CSE][1] in my website . The URL for request is like
https://www.googleapis.com/customsearch/v1?key=INSERT-YOUR-KEY&cx=017576662512468239146:omuauf_lfve&q=lectures
The connection is https and file_get_content() is getting failed. How can i get it working?
Since i need to host the site on some external web-hosting servers, I am in need of solution which don't alter php configuration file or work with default options found on most of web-hosting sites.
[1]: http://code.google.com/apis/customsearch/v1/overview.html | php | php5 | google-cse | null | null | null | open | get_file_content not working for https
===
I am using php and google's new [CSE][1] in my website . The URL for request is like
https://www.googleapis.com/customsearch/v1?key=INSERT-YOUR-KEY&cx=017576662512468239146:omuauf_lfve&q=lectures
The connection is https and file_get_content() is getting failed. How can i get it working?
Since i need to host the site on some external web-hosting servers, I am in need of solution which don't alter php configuration file or work with default options found on most of web-hosting sites.
[1]: http://code.google.com/apis/customsearch/v1/overview.html | 0 |
3,452,028 | 08/10/2010 18:10:14 | 341,868 | 05/15/2010 10:34:31 | 33 | 2 | how to perform clustering using java | Is it possible to perform clustering by this two values (word,frequency count) using java
great,55
readable,45
give,12
hesitate,90
tribute,13
If possible, please suggest any ideas. It's very urgent.
Thanks in advance | java | null | null | null | null | 08/10/2010 19:37:31 | not a real question | how to perform clustering using java
===
Is it possible to perform clustering by this two values (word,frequency count) using java
great,55
readable,45
give,12
hesitate,90
tribute,13
If possible, please suggest any ideas. It's very urgent.
Thanks in advance | 1 |
58,489 | 09/12/2008 08:14:11 | 2,954 | 08/26/2008 08:53:06 | 759 | 38 | Are BPM solutions worth the investment in money, time and effort? | This is more an architecture related question than a programming one, but I think it might be useful to developers given that I have been wondering this myself for some time.
I have no experience with Business Process Management tools use or implementation. (The closest thing I have used is BizTalk server, but I know that it is not really a full BPM product, but a document based integration platform with some process orchestration features).
Recently, several of our clients have been asking for BPM-based development projects, and most of the time I discover that some BPM vendor has been giving them some of those 'look how amazing is my product' demos, where they show 'how easily' you can modify your business process flow just by 'dragging and dropping' shapes around and those kind of things.
Obviously, vendors don't say anything about **how you first need to have running your well designed processes on the BPM so you can actually make that kind of magic happen**.
My clients suddenly see a new light thinking that BPM technology will finally fix the typical problems common to almost any IT department: applications that are hard to maintain, missing deadlines when implementing changes to support new business needs, etc.
None of them have finished implementing BPM, so I have no a real world reference to know what is such think like.
I honestly believe that many of those problems only should need solutions based on development process improvement, better analysis of future needs and better project management skills. Heck, even better programmers and designers.
So, my question is:
Is BPM really something that can deliver such great value to the typical enterprise line-of-business application and help having less maintenance problems and more flexibility? Or you are just acquiring yet another component that will suffer the same fate and problems as every other piece of software in your platform?
In other words, what are BPM products good for? What should an organization have in place before trying to implement a BPM platform in order to succeed?
| architecture | bpm | business | null | null | 05/06/2012 23:06:12 | not constructive | Are BPM solutions worth the investment in money, time and effort?
===
This is more an architecture related question than a programming one, but I think it might be useful to developers given that I have been wondering this myself for some time.
I have no experience with Business Process Management tools use or implementation. (The closest thing I have used is BizTalk server, but I know that it is not really a full BPM product, but a document based integration platform with some process orchestration features).
Recently, several of our clients have been asking for BPM-based development projects, and most of the time I discover that some BPM vendor has been giving them some of those 'look how amazing is my product' demos, where they show 'how easily' you can modify your business process flow just by 'dragging and dropping' shapes around and those kind of things.
Obviously, vendors don't say anything about **how you first need to have running your well designed processes on the BPM so you can actually make that kind of magic happen**.
My clients suddenly see a new light thinking that BPM technology will finally fix the typical problems common to almost any IT department: applications that are hard to maintain, missing deadlines when implementing changes to support new business needs, etc.
None of them have finished implementing BPM, so I have no a real world reference to know what is such think like.
I honestly believe that many of those problems only should need solutions based on development process improvement, better analysis of future needs and better project management skills. Heck, even better programmers and designers.
So, my question is:
Is BPM really something that can deliver such great value to the typical enterprise line-of-business application and help having less maintenance problems and more flexibility? Or you are just acquiring yet another component that will suffer the same fate and problems as every other piece of software in your platform?
In other words, what are BPM products good for? What should an organization have in place before trying to implement a BPM platform in order to succeed?
| 4 |
10,066,022 | 04/08/2012 20:00:20 | 856,790 | 07/21/2011 20:10:51 | 1,365 | 80 | How do I perform a merge sort based on the property of an object (rather than an Array)? | ##Background
Using JavaScript, I need to sort a large JSON object based on a given property of that object. **I am assuming that a merge sort is the fastest approach**. If this is not the fastest approach, please tell me what is. There are myriad examples online of a merge sort against an array, but very little with objects. Here is a sample object:
fruitForSale = {
1: {"type":"orange","UnitPrice":0.20},
2: {"type":"banana","UnitPrice":0.30},
3: {"type":"pear","UnitPrice":0.10},
4: {"type":"apple","UnitPrice":0.50},
5: {"type":"peach","UnitPrice":0.70}
}
##Question
Using a merge sort (or faster algorithm), how would I sort the `fruitForSale` object so that I end up with an object sorted by 'type':
fruitForSale = {
4: {"type":"apple","UnitPrice":0.50},
2: {"type":"banana","UnitPrice":0.30},
1: {"type":"orange","UnitPrice":0.20},
5: {"type":"peach","UnitPrice":0.70},
3: {"type":"pear","UnitPrice":0.10}
}
NOTE: The original `keys` (1,2,3,4 & 5) would need to stay assigned to their respective object, so a key of `1` should always match with `{"type":"orange","UnitPrice":0.20}` and a key of `2` will always match with `{"type":"banana","UnitPrice":0.30}` and so on.
Thanks! | javascript | algorithm | search | sorting | null | null | open | How do I perform a merge sort based on the property of an object (rather than an Array)?
===
##Background
Using JavaScript, I need to sort a large JSON object based on a given property of that object. **I am assuming that a merge sort is the fastest approach**. If this is not the fastest approach, please tell me what is. There are myriad examples online of a merge sort against an array, but very little with objects. Here is a sample object:
fruitForSale = {
1: {"type":"orange","UnitPrice":0.20},
2: {"type":"banana","UnitPrice":0.30},
3: {"type":"pear","UnitPrice":0.10},
4: {"type":"apple","UnitPrice":0.50},
5: {"type":"peach","UnitPrice":0.70}
}
##Question
Using a merge sort (or faster algorithm), how would I sort the `fruitForSale` object so that I end up with an object sorted by 'type':
fruitForSale = {
4: {"type":"apple","UnitPrice":0.50},
2: {"type":"banana","UnitPrice":0.30},
1: {"type":"orange","UnitPrice":0.20},
5: {"type":"peach","UnitPrice":0.70},
3: {"type":"pear","UnitPrice":0.10}
}
NOTE: The original `keys` (1,2,3,4 & 5) would need to stay assigned to their respective object, so a key of `1` should always match with `{"type":"orange","UnitPrice":0.20}` and a key of `2` will always match with `{"type":"banana","UnitPrice":0.30}` and so on.
Thanks! | 0 |
7,817,382 | 10/19/2011 06:30:20 | 905,721 | 08/22/2011 10:49:50 | 26 | 1 | error with replace_html | I have the following code in the controller.
I am populating a drop down box dynamically based on the selection from another drop down box.
def update_releases
project = Project.find(params[:project_id])
releases = project.releases
puts "releases==#{releases}"
render :update do |page|
page.replace_html 'releases', :partial => 'releases', :object => releases
page.replace_html 'cycles', :partial => 'cycles', :object => cycles
end
I am getting an error element doesn't support this property" as a pop up on chaning the selection in the drop down box. Please help me out here. | jquery | ruby-on-rails | null | null | null | null | open | error with replace_html
===
I have the following code in the controller.
I am populating a drop down box dynamically based on the selection from another drop down box.
def update_releases
project = Project.find(params[:project_id])
releases = project.releases
puts "releases==#{releases}"
render :update do |page|
page.replace_html 'releases', :partial => 'releases', :object => releases
page.replace_html 'cycles', :partial => 'cycles', :object => cycles
end
I am getting an error element doesn't support this property" as a pop up on chaning the selection in the drop down box. Please help me out here. | 0 |
2,938,722 | 05/30/2010 13:04:19 | 348,380 | 05/23/2010 17:06:42 | 31 | 2 | Fastest Linux IDE with Find&Replace | I'm looking for a fast IDE for Linux that has Find&Replace. I'm currently using Geany and I've tried NetBeans, and Aptana doesn't have a PHP plugin for 2.0. I prefer one that has a sense of projects. Does anyone have any suggestions? | php | ide | netbeans | aptana | geany | 09/01/2011 13:28:20 | not constructive | Fastest Linux IDE with Find&Replace
===
I'm looking for a fast IDE for Linux that has Find&Replace. I'm currently using Geany and I've tried NetBeans, and Aptana doesn't have a PHP plugin for 2.0. I prefer one that has a sense of projects. Does anyone have any suggestions? | 4 |
5,033,886 | 02/17/2011 19:56:41 | 11,027 | 09/16/2008 04:06:52 | 2,693 | 228 | Generate ASP.Net Membership Password Hash in Pure T-SQL | I'm attempting to create a pure t-sql representation of the default SHA-1 password hashing in the ASP.Net Membership system. Ideally, what I would get would be this:
UserName Password GeneratedPassword
cbehrens 34098kw4D+FKJ== 34098kw4D+FKJ==
Note: that's bogus base-64 text there. I've got base64_encode and decode functions that round-trip correctly. Here's my attempt, which doesn't work:
SELECT UserName, Password, dbo.base64_encode(HASHBYTES('SHA1', dbo.base64_decode(PasswordSalt) + 'testud01')) As TestPassword FROM aspnet_Users U JOIN aspnet_membership M ON U.UserID = M.UserID
I've tried a number of variations on the theme, to no avail. I need to do this in pure T-Sql; involving a console app or something like that will double the work. | asp.net | tsql | sql-server-2008 | hash | asp.net-membership | null | open | Generate ASP.Net Membership Password Hash in Pure T-SQL
===
I'm attempting to create a pure t-sql representation of the default SHA-1 password hashing in the ASP.Net Membership system. Ideally, what I would get would be this:
UserName Password GeneratedPassword
cbehrens 34098kw4D+FKJ== 34098kw4D+FKJ==
Note: that's bogus base-64 text there. I've got base64_encode and decode functions that round-trip correctly. Here's my attempt, which doesn't work:
SELECT UserName, Password, dbo.base64_encode(HASHBYTES('SHA1', dbo.base64_decode(PasswordSalt) + 'testud01')) As TestPassword FROM aspnet_Users U JOIN aspnet_membership M ON U.UserID = M.UserID
I've tried a number of variations on the theme, to no avail. I need to do this in pure T-Sql; involving a console app or something like that will double the work. | 0 |
7,864 | 08/11/2008 15:30:30 | 751 | 08/08/2008 14:26:58 | 31 | 1 | Why all the Active Record hate? | As I learn more and more about OOP, and start to implement various design patterns, I keep coming back to cases where people are hating on [Active Record][1].
Often, people say that it doesn't scale well (citing Twitter as their prime example) -- but nobody actually explains ***why*** it doesn't scale well; and / or how to achieve the pros of AR without the cons (via a similar but different pattern?)
Hopefully this won't turn into a holy war about design patterns -- all I want to know is ****specifically**** what's wrong with Active Record.
If it doesn't scale well, why not?
What other problems does it have?
[1]: http://en.wikipedia.org/wiki/Active_record_pattern | designpatterns | oop | activerecord | null | null | 12/17/2011 01:17:11 | not constructive | Why all the Active Record hate?
===
As I learn more and more about OOP, and start to implement various design patterns, I keep coming back to cases where people are hating on [Active Record][1].
Often, people say that it doesn't scale well (citing Twitter as their prime example) -- but nobody actually explains ***why*** it doesn't scale well; and / or how to achieve the pros of AR without the cons (via a similar but different pattern?)
Hopefully this won't turn into a holy war about design patterns -- all I want to know is ****specifically**** what's wrong with Active Record.
If it doesn't scale well, why not?
What other problems does it have?
[1]: http://en.wikipedia.org/wiki/Active_record_pattern | 4 |
3,861,296 | 10/05/2010 06:28:36 | 446,208 | 09/13/2010 10:47:29 | 10 | 0 | How to select Row in QTableView ? | i am new QT. i used QTableView. Please see the picture.
http://i.stack.imgur.com/BTtO7.png
in the image left side it's automatically putting row number. i noted in Red color. i need to remove the entire column. how to do that.
next my problem is, if i click any cell, only that cell selecting. i need to select entire row ,like i noted in pink color. example if i click the " testApp-copy.itr" cell then the entire should select.
Please help me to fix this. | qt | null | null | null | null | null | open | How to select Row in QTableView ?
===
i am new QT. i used QTableView. Please see the picture.
http://i.stack.imgur.com/BTtO7.png
in the image left side it's automatically putting row number. i noted in Red color. i need to remove the entire column. how to do that.
next my problem is, if i click any cell, only that cell selecting. i need to select entire row ,like i noted in pink color. example if i click the " testApp-copy.itr" cell then the entire should select.
Please help me to fix this. | 0 |
10,682,315 | 05/21/2012 09:05:39 | 1,244,671 | 03/02/2012 08:48:13 | 350 | 1 | Whether Ribbon tool bar button will work in Home page tab of Tridion? | I implemented a Ribbon tool bar button for Format page of Tridion 2011 sp1 version. Now my requirement is to move the Ribbon button to Home page - Edit Group and make it work. For that I changed pageid to "FormatPage" and groupid to "EditGroup". It is enabled in home page. For Format page RTFfield I used "FaCommand". For Home page simple text field which command need to be used? Please help in this issue. Thanks in advance. | tridion | tridion-2011 | null | null | null | null | open | Whether Ribbon tool bar button will work in Home page tab of Tridion?
===
I implemented a Ribbon tool bar button for Format page of Tridion 2011 sp1 version. Now my requirement is to move the Ribbon button to Home page - Edit Group and make it work. For that I changed pageid to "FormatPage" and groupid to "EditGroup". It is enabled in home page. For Format page RTFfield I used "FaCommand". For Home page simple text field which command need to be used? Please help in this issue. Thanks in advance. | 0 |
1,378,009 | 09/04/2009 08:41:06 | 121,859 | 06/12/2009 08:48:37 | 25 | 3 | How to use the ASP .NET AJAX Toolkit Tab with a Grid View inside | I have already search for some time over the net on how to create an ASP .NET AJAX toolkit tab control which uses GridView inside, could anyone point me on how to do this?
Right now, our GUI team has already made a static tab control which is quite properly designed. I do not know how to use the tab with this. Any tutorial or link on using this combination could really help.
I am already converting back the GUI to a MultiView simulated tab control because I do not know how to access the tab control. anyway, I am just worried i would destroy the GUI made by GUI team in this process.
Thanks. | asp.net | asp.net-ajax | tabcontrol | multiview | datagridview | null | open | How to use the ASP .NET AJAX Toolkit Tab with a Grid View inside
===
I have already search for some time over the net on how to create an ASP .NET AJAX toolkit tab control which uses GridView inside, could anyone point me on how to do this?
Right now, our GUI team has already made a static tab control which is quite properly designed. I do not know how to use the tab with this. Any tutorial or link on using this combination could really help.
I am already converting back the GUI to a MultiView simulated tab control because I do not know how to access the tab control. anyway, I am just worried i would destroy the GUI made by GUI team in this process.
Thanks. | 0 |
7,643,724 | 10/04/2011 05:40:54 | 180,309 | 09/28/2009 12:07:50 | 424 | 6 | Selecting appropriate logic programming language | In my research I need to use a logic programming in Multiagent system simulation.
I need to select a language and simulation/visualization environment for my experiment. I was thinking of using pyke (python based logic programming language) or Prolog/Mercury. But I have no idea how to visualize the system then. I have separately searched for MAS simulation software and found Netlogo, Mason, breve (can interpret python, so maybe pyke will do?) and others. Now I am confused with all this choices, so I wanted to ask if anyone has done anything similar and what can you suggest? | programming-languages | prolog | logic | visualization | multi-agent | 10/04/2011 20:36:35 | not constructive | Selecting appropriate logic programming language
===
In my research I need to use a logic programming in Multiagent system simulation.
I need to select a language and simulation/visualization environment for my experiment. I was thinking of using pyke (python based logic programming language) or Prolog/Mercury. But I have no idea how to visualize the system then. I have separately searched for MAS simulation software and found Netlogo, Mason, breve (can interpret python, so maybe pyke will do?) and others. Now I am confused with all this choices, so I wanted to ask if anyone has done anything similar and what can you suggest? | 4 |
10,513,326 | 05/09/2012 09:29:12 | 1,202,257 | 02/10/2012 14:44:39 | 23 | 1 | C - Freeing a pointer to pointer | In my code I allocate a number of 2-dimensional arrays that I need to free up. However, every time I think I've grasped the concept of pointers, they keep surprising me by not doing what I expect them to ;)
So can anyone tell me how to deal with this situation?:
This is how I allocate memory for my pointers:
typedef struct HRTF_ {
kiss_fft_cpx freqDataL[NFREQ]
kiss_fft_cpx freqDataR[NFREQ]
int nrSamples;
char* fname;
} HRTF;
HRTF **_pHRTFs = NUL;
int _nHRTFs = 512;
_pHRTFs = (HRTF**) malloc( sizeof(HRTF*) *_nHRTFs );
int i = _nHRTFs;
while( i > 0 )
_pHRTFs[--i] = (HRTF*) malloc( sizeof( HRTF ) );
// Load data into HRTF struct
And here's how I think I should be freeing the used memory:
if( _pHRTFs != NULL )
{
__DEBUG( "Free mem used for HRTFs" );
for( i = 0; i < _nHRTFs; ++i )
{
if( _pHRTFs[i] != NULL )
{
char buf[64];
sprintf( buf, "Freeing mem for HRTF #%d", i );
__DEBUG( buf );
free( _pHRTFs[i] );
}
}
__DEBUG( "Free array containing HRTFs" );
free( _pHRTFs );
}
Freeing the individual `_pHRTFs[i]`'s works, but the last `free( _pHRTFs )` gives me a segmentation fault. Why?
Thanks in advance!
Jonas | c | pointers | malloc | free | null | 05/09/2012 11:54:55 | too localized | C - Freeing a pointer to pointer
===
In my code I allocate a number of 2-dimensional arrays that I need to free up. However, every time I think I've grasped the concept of pointers, they keep surprising me by not doing what I expect them to ;)
So can anyone tell me how to deal with this situation?:
This is how I allocate memory for my pointers:
typedef struct HRTF_ {
kiss_fft_cpx freqDataL[NFREQ]
kiss_fft_cpx freqDataR[NFREQ]
int nrSamples;
char* fname;
} HRTF;
HRTF **_pHRTFs = NUL;
int _nHRTFs = 512;
_pHRTFs = (HRTF**) malloc( sizeof(HRTF*) *_nHRTFs );
int i = _nHRTFs;
while( i > 0 )
_pHRTFs[--i] = (HRTF*) malloc( sizeof( HRTF ) );
// Load data into HRTF struct
And here's how I think I should be freeing the used memory:
if( _pHRTFs != NULL )
{
__DEBUG( "Free mem used for HRTFs" );
for( i = 0; i < _nHRTFs; ++i )
{
if( _pHRTFs[i] != NULL )
{
char buf[64];
sprintf( buf, "Freeing mem for HRTF #%d", i );
__DEBUG( buf );
free( _pHRTFs[i] );
}
}
__DEBUG( "Free array containing HRTFs" );
free( _pHRTFs );
}
Freeing the individual `_pHRTFs[i]`'s works, but the last `free( _pHRTFs )` gives me a segmentation fault. Why?
Thanks in advance!
Jonas | 3 |
11,205,144 | 06/26/2012 10:15:40 | 1,444,298 | 06/08/2012 10:18:16 | 6 | 0 | Moving data from several rows to columns in excel 2010 macosx | My problem is the following. I have an excel sheet with the content as follows:
---A--- ---B--- ---C--- ---D--- ---E--- ---F---
text1 text2 text3 text4
text5
text6
text7 text8 text9 text10
text11
text12
text13 text14 text15 text16
and so on... I want to move text5 and text6 to E and F for row1 and do the same for text11 and text12 in row 4 so the output looks as follows:
---A--- ---B--- ---C--- ---D--- ---E--- ---F---
text1 text2 text3 text4 text5 text6
text7 text8 text9 text10 text12 text13
text13 text14 text15 text16 text17 text18
i have tried to copy data referenced to a cell position but it only works when I copy each two cells, not for the whole. I have tried to traspose the data but that will traspose everything.
any idea? | osx | excel | data | columns | rows | 06/26/2012 12:29:54 | off topic | Moving data from several rows to columns in excel 2010 macosx
===
My problem is the following. I have an excel sheet with the content as follows:
---A--- ---B--- ---C--- ---D--- ---E--- ---F---
text1 text2 text3 text4
text5
text6
text7 text8 text9 text10
text11
text12
text13 text14 text15 text16
and so on... I want to move text5 and text6 to E and F for row1 and do the same for text11 and text12 in row 4 so the output looks as follows:
---A--- ---B--- ---C--- ---D--- ---E--- ---F---
text1 text2 text3 text4 text5 text6
text7 text8 text9 text10 text12 text13
text13 text14 text15 text16 text17 text18
i have tried to copy data referenced to a cell position but it only works when I copy each two cells, not for the whole. I have tried to traspose the data but that will traspose everything.
any idea? | 2 |
5,722,189 | 04/19/2011 20:20:00 | 715,925 | 04/19/2011 20:12:54 | 1 | 0 | MFC Unclickable Button (Running away from cursor on MouseMove) | How would i make a button that will change it's position on MouseMove Event if the cursor is close enough to the center of the button in MFC ? | c++ | mfc | null | null | null | null | open | MFC Unclickable Button (Running away from cursor on MouseMove)
===
How would i make a button that will change it's position on MouseMove Event if the cursor is close enough to the center of the button in MFC ? | 0 |
10,139,422 | 04/13/2012 10:48:56 | 909,822 | 08/24/2011 14:24:41 | 19 | 8 | MySQL and PhpMyAdmin config.inc.php Password issue on MAMP | This is a very strange issue that is similar to a few other people issue that has been going on for a while with MAMP.
I recently upgraded to MAMP2 and followed the instruction for the new phpMyAdmin and it work for a while but recently whenever I try to connect to MySQL I always get this error:
Error: Could not connect to MySQL server!
/Applications/MAMP/Library/bin/mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect
So I changed the password to the correct one and changed all the files as per advised on this forum topic: http://forum.mamp.info/viewtopic.php?f=2&t=11974.
But it did not work at all. I realized that there was two phpMyAdmin folder on my Mac one which is in
/Applications/MAMP/Library/bin/phpMyAdmin
and the other one in
Library/Application Support/appsolute/MAMP PRO/phpMyAdmin
In the first folder the config.inc.php as the correct credential for the user, however the second as root for both username and password. Obviously I tried to changed that but to no avail, the file is somehow always reverted to the default credential.
Did someone ever had this issue? is there a way to solve this? | mysql | passwords | phpmyadmin | config | mamp | null | open | MySQL and PhpMyAdmin config.inc.php Password issue on MAMP
===
This is a very strange issue that is similar to a few other people issue that has been going on for a while with MAMP.
I recently upgraded to MAMP2 and followed the instruction for the new phpMyAdmin and it work for a while but recently whenever I try to connect to MySQL I always get this error:
Error: Could not connect to MySQL server!
/Applications/MAMP/Library/bin/mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect
So I changed the password to the correct one and changed all the files as per advised on this forum topic: http://forum.mamp.info/viewtopic.php?f=2&t=11974.
But it did not work at all. I realized that there was two phpMyAdmin folder on my Mac one which is in
/Applications/MAMP/Library/bin/phpMyAdmin
and the other one in
Library/Application Support/appsolute/MAMP PRO/phpMyAdmin
In the first folder the config.inc.php as the correct credential for the user, however the second as root for both username and password. Obviously I tried to changed that but to no avail, the file is somehow always reverted to the default credential.
Did someone ever had this issue? is there a way to solve this? | 0 |
6,087,342 | 05/22/2011 10:29:55 | 754,479 | 05/15/2011 13:08:53 | 21 | 0 | Display/Hide a HTML form after getting a value from a PHP include file | What I need to accomplish is to see if a User actually has an existing valid product in his shopping history before he can review on a product. What i want to be able to achieve is to display the review form if he meets the criteria, or not show it at all if he doesnt. My php script is as follows :
<?php
session_start();
//Remove the item from the cart
$username="root";
$password="sexy";
$database="mysql";
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM Orders where username='".$_SESSION['username']."'";
$result=mysql_query($query);
$num=mysql_numrows($result);
$i=0;
$canreview = "false";
while ($i < $num) {
$orderid = mysql_result($result,$i,"order_id");
$query2="SELECT * FROM Orderlines where order_id='".$orderid."' AND product_id='".$_SESSION['reviewfruit']."'";
$result2=mysql_query($query2);
$num2 = mysql_numrows($result2);
if($num2 > 0){
$canreview = "true";
}
$i++;
}
echo $canreview;
//Re-organize the cart
//array_unshift ($_SESSION['SHOPPING_CART'], array_shift ($_SESSION['SHOPPING_CART']));
//Clear the URL variables
mysql_close();
?>
and my html form is as follows :
<form id="form1" name="form1" action="" method="POST">
<fieldset class="review">
<table border=0.2>
<thead>
<tr>
<th>Rating</th>
<th>Comment</th>
</tr>
</thead>
<tr width=1024>
<td><select id = "Rating" name="Rating">
<option value="Please Choose">Please Choose</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select>
</td>
<td>
<textarea id="Comment" name="Comment" rows=3 width=300 ></textarea>
</td>
</tr>
<tr>
<td><div id="errorRating"></div></td>
<td><div id="errorComment"></div></td>
</tr>
<input type="hidden" id="Product_id" name="Product_id" value="<?php echo $primarykey;?>" />
</table>
<input type="button" value="Submit Review" name="submit" id="submit">
<div id="errorDb"></div>
</fieldset>
</form>
What I want to know is how I can use my $canreview variable from my php script to show the form.
Any help is appreciated!!
| php | javascript | mysql | html | null | 05/22/2011 10:48:13 | too localized | Display/Hide a HTML form after getting a value from a PHP include file
===
What I need to accomplish is to see if a User actually has an existing valid product in his shopping history before he can review on a product. What i want to be able to achieve is to display the review form if he meets the criteria, or not show it at all if he doesnt. My php script is as follows :
<?php
session_start();
//Remove the item from the cart
$username="root";
$password="sexy";
$database="mysql";
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM Orders where username='".$_SESSION['username']."'";
$result=mysql_query($query);
$num=mysql_numrows($result);
$i=0;
$canreview = "false";
while ($i < $num) {
$orderid = mysql_result($result,$i,"order_id");
$query2="SELECT * FROM Orderlines where order_id='".$orderid."' AND product_id='".$_SESSION['reviewfruit']."'";
$result2=mysql_query($query2);
$num2 = mysql_numrows($result2);
if($num2 > 0){
$canreview = "true";
}
$i++;
}
echo $canreview;
//Re-organize the cart
//array_unshift ($_SESSION['SHOPPING_CART'], array_shift ($_SESSION['SHOPPING_CART']));
//Clear the URL variables
mysql_close();
?>
and my html form is as follows :
<form id="form1" name="form1" action="" method="POST">
<fieldset class="review">
<table border=0.2>
<thead>
<tr>
<th>Rating</th>
<th>Comment</th>
</tr>
</thead>
<tr width=1024>
<td><select id = "Rating" name="Rating">
<option value="Please Choose">Please Choose</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select>
</td>
<td>
<textarea id="Comment" name="Comment" rows=3 width=300 ></textarea>
</td>
</tr>
<tr>
<td><div id="errorRating"></div></td>
<td><div id="errorComment"></div></td>
</tr>
<input type="hidden" id="Product_id" name="Product_id" value="<?php echo $primarykey;?>" />
</table>
<input type="button" value="Submit Review" name="submit" id="submit">
<div id="errorDb"></div>
</fieldset>
</form>
What I want to know is how I can use my $canreview variable from my php script to show the form.
Any help is appreciated!!
| 3 |
7,387,512 | 09/12/2011 12:02:57 | 919,514 | 08/30/2011 10:36:04 | 1 | 6 | Alternative to MarkupExtension override in Silverlight | I'm using MarkupExtension inheritance in my WPF app, which I'd like to port under Silverlight.
I've made a "Locale" markup extension which can be used like this in xaml
<TextBlock Text="{ui:Locale aRandomId,'My default translation'}" />
In fact, this MarkupExtension is binding the property its applied on to the string "My default translation", or, if found, to a sentence stored in a database named "aRandomId".
This MarkupExtension allows me to dynamicaly change my UI's locale (the markupextension is registering to a weak event 'LocaleChanged' which triggers update of every property bound with it)
**As we cannot inherit from MarkupExtension in Silverlight, I'd like to know if there is some mechanism which could replace it.**
Thanks.
*PS : I can provide the source of this MarkupExtension if needed.* | c# | wpf | silverlight | markup-extensions | null | null | open | Alternative to MarkupExtension override in Silverlight
===
I'm using MarkupExtension inheritance in my WPF app, which I'd like to port under Silverlight.
I've made a "Locale" markup extension which can be used like this in xaml
<TextBlock Text="{ui:Locale aRandomId,'My default translation'}" />
In fact, this MarkupExtension is binding the property its applied on to the string "My default translation", or, if found, to a sentence stored in a database named "aRandomId".
This MarkupExtension allows me to dynamicaly change my UI's locale (the markupextension is registering to a weak event 'LocaleChanged' which triggers update of every property bound with it)
**As we cannot inherit from MarkupExtension in Silverlight, I'd like to know if there is some mechanism which could replace it.**
Thanks.
*PS : I can provide the source of this MarkupExtension if needed.* | 0 |
8,029,179 | 11/06/2011 18:10:18 | 1,032,564 | 11/06/2011 18:00:30 | 1 | 0 | void pointer to functions | I know this code works for integers, but I want to do the same for floats and strings using C:
int intComp(const void *v1, const void *v2)
{
int i1, i2;
i1 = *(int*)v1;
i2 = *(int*)v2;
return i1 - i2;
}
This is what am I trying to do for floats:
int floatComp(const void *v1, const void* v2)
{
int f1, f2;
f1 = *(float*)v1;
f2 = *(float*)v2;
return (int)(f1 - f2);
}
This is what am I trying to do for strings:
int strComp(const void *v1,const void* v2)
{
char **s1 = (char**)v1,**s2 = (char**)v2;
// s1 y s2 instead of void pointers
return strcmp(*s1, *s2);
} | c | pointers | void | null | null | 11/08/2011 08:10:55 | not a real question | void pointer to functions
===
I know this code works for integers, but I want to do the same for floats and strings using C:
int intComp(const void *v1, const void *v2)
{
int i1, i2;
i1 = *(int*)v1;
i2 = *(int*)v2;
return i1 - i2;
}
This is what am I trying to do for floats:
int floatComp(const void *v1, const void* v2)
{
int f1, f2;
f1 = *(float*)v1;
f2 = *(float*)v2;
return (int)(f1 - f2);
}
This is what am I trying to do for strings:
int strComp(const void *v1,const void* v2)
{
char **s1 = (char**)v1,**s2 = (char**)v2;
// s1 y s2 instead of void pointers
return strcmp(*s1, *s2);
} | 1 |
6,520,362 | 06/29/2011 12:06:26 | 476,024 | 10/14/2010 16:35:57 | 673 | 5 | How can i change the background color of a table cell with multiple sections? | I have a table view with multiple sections and don't know how to change the background color when i touch that row.
I've found this link about table cells but it is addressed to tables with only one section :
[changing cell background on click on cell in iphone][1].
cell.selectedBackgroundView = [[ UIView alloc] init];
[cell.selectedBackgroundView setBackgroundColor:[UIColor purpleColor]];
if i use the code from this link, cells that are rounded (the first and last in every section) will have a rectangle on finger over which doesn't look good.
How can i make this rectangle curved around the edges for the first and last row in every section ?
[1]: http://stackoverflow.com/questions/2598062/changing-cell-background-on-click-on-cell-in-iphone | objective-c | ios | uitableview | uitableviewcell | null | null | open | How can i change the background color of a table cell with multiple sections?
===
I have a table view with multiple sections and don't know how to change the background color when i touch that row.
I've found this link about table cells but it is addressed to tables with only one section :
[changing cell background on click on cell in iphone][1].
cell.selectedBackgroundView = [[ UIView alloc] init];
[cell.selectedBackgroundView setBackgroundColor:[UIColor purpleColor]];
if i use the code from this link, cells that are rounded (the first and last in every section) will have a rectangle on finger over which doesn't look good.
How can i make this rectangle curved around the edges for the first and last row in every section ?
[1]: http://stackoverflow.com/questions/2598062/changing-cell-background-on-click-on-cell-in-iphone | 0 |
11,279,165 | 07/01/2012 02:35:38 | 930,190 | 09/06/2011 07:52:01 | 139 | 4 | the source of the df | I have the whole source of the android.
And now,i want to know how the android implement the commands of the system,like,df.Any one can show me the directory of the implemented source of the commands,like df?
thx
| android | linux | android-emulator | android-ndk | null | 07/01/2012 14:22:54 | not a real question | the source of the df
===
I have the whole source of the android.
And now,i want to know how the android implement the commands of the system,like,df.Any one can show me the directory of the implemented source of the commands,like df?
thx
| 1 |
7,870,154 | 10/23/2011 23:51:58 | 442,399 | 12/14/2009 10:43:17 | 26 | 1 | Compile XCode Projects online | I'm using the mosync library for develop iPhone applications. It generates the Xcode project ,
now I need to compile it to make it run on a iphone. So for that I need a mac.
do anybody know somewhere online to find online compiler which do that with a web based interface?
--thanks in advance-- | iphone | c++ | null | null | null | null | open | Compile XCode Projects online
===
I'm using the mosync library for develop iPhone applications. It generates the Xcode project ,
now I need to compile it to make it run on a iphone. So for that I need a mac.
do anybody know somewhere online to find online compiler which do that with a web based interface?
--thanks in advance-- | 0 |
6,373,444 | 06/16/2011 14:21:10 | 766,863 | 05/23/2011 23:18:29 | 36 | 0 | jquery click event reference with [this] | I have some hyperlinks and when user clicks on any of them I want to direct the user to that particular link. I am accessing the href attribute with jquery. Below is the code.
<a href="http://www.google.com" class="class-name">link1</a>
<a href="http://www.facebook.com" class="class-name">link1</a>
<a href="http://www.yahoo.com" class="class-name">link1</a>
Now I want to access the URL with jQuery I am using the below code:
$(document).ready(function() {
$('.class-name').click(function(){
var linkHref=$("this.redirectLink").attr('href');
alert(linkHref);
$('.redirect').attr('href',linkHref);
});
But I am getting "undefined" in the alert.
All your help is highly appreciated. | javascript | jquery | null | null | null | null | open | jquery click event reference with [this]
===
I have some hyperlinks and when user clicks on any of them I want to direct the user to that particular link. I am accessing the href attribute with jquery. Below is the code.
<a href="http://www.google.com" class="class-name">link1</a>
<a href="http://www.facebook.com" class="class-name">link1</a>
<a href="http://www.yahoo.com" class="class-name">link1</a>
Now I want to access the URL with jQuery I am using the below code:
$(document).ready(function() {
$('.class-name').click(function(){
var linkHref=$("this.redirectLink").attr('href');
alert(linkHref);
$('.redirect').attr('href',linkHref);
});
But I am getting "undefined" in the alert.
All your help is highly appreciated. | 0 |
4,837,002 | 01/29/2011 12:57:25 | 294,000 | 03/15/2010 13:39:52 | 473 | 132 | I don't like MDD but like UML - why should I use MDD if I think this is useless ? | I am a java software developer/architect and I like UML.
Saying that I also hate the java generated code.
I don't see any value trying to generate the skeleton of my application because creating empty classes is really easy and I don't need a tool to do that. I also can't reuse the generated code because the way it is generated makes it impossible to reuse. The main problem for me is that my requirements changed so quickly that I need to be able to implement the new demand immediately into an existing code. My problem is that if I generate my code from my model and then manually code inside the generated code, I can't generate again a code using a model because my modification would be erased or if not I will have to manually copy each peace that has been added. Just an enormous job for few result. I therefore don't use anymore MDD but still use a lot UML.
**My question is:** Could UML be successful in a project without this stupid MDD code generation ?
I am asking this question because I have a new boss who wants to introduce full MDD process with IBM RSA and today I prefer to have live code and model synchronization or merge with Omondo.
Why to change something that is working well ?
Why to systematically generate code from a model while I can do it directly in the code and just merge it later with the model ?
Why to get crap database code generation which can not even be deployed while I can add stereotype in order to get java annotation and use them with hibernate to generate my database.
One of the reason for boss's change is to get a better project documentation in HTML format. I doubt of it and think he is looking ofr more control on delivery and don't know what to,invent !!
Another reason is to use a large and stable company. Have a full model available which could be deployed in any other language. This is why for me MDD is stupid because it is impossible to deploy on any platform any server, any database just from a model. So why to waste my time ?
Please give me some arguments in order to come back at next meeting and crash this stupid new MDD fan who wants to reorganize the way we work today !
| uml | null | null | null | null | 04/11/2011 00:44:00 | not constructive | I don't like MDD but like UML - why should I use MDD if I think this is useless ?
===
I am a java software developer/architect and I like UML.
Saying that I also hate the java generated code.
I don't see any value trying to generate the skeleton of my application because creating empty classes is really easy and I don't need a tool to do that. I also can't reuse the generated code because the way it is generated makes it impossible to reuse. The main problem for me is that my requirements changed so quickly that I need to be able to implement the new demand immediately into an existing code. My problem is that if I generate my code from my model and then manually code inside the generated code, I can't generate again a code using a model because my modification would be erased or if not I will have to manually copy each peace that has been added. Just an enormous job for few result. I therefore don't use anymore MDD but still use a lot UML.
**My question is:** Could UML be successful in a project without this stupid MDD code generation ?
I am asking this question because I have a new boss who wants to introduce full MDD process with IBM RSA and today I prefer to have live code and model synchronization or merge with Omondo.
Why to change something that is working well ?
Why to systematically generate code from a model while I can do it directly in the code and just merge it later with the model ?
Why to get crap database code generation which can not even be deployed while I can add stereotype in order to get java annotation and use them with hibernate to generate my database.
One of the reason for boss's change is to get a better project documentation in HTML format. I doubt of it and think he is looking ofr more control on delivery and don't know what to,invent !!
Another reason is to use a large and stable company. Have a full model available which could be deployed in any other language. This is why for me MDD is stupid because it is impossible to deploy on any platform any server, any database just from a model. So why to waste my time ?
Please give me some arguments in order to come back at next meeting and crash this stupid new MDD fan who wants to reorganize the way we work today !
| 4 |
10,416,307 | 05/02/2012 14:56:26 | 1,010,934 | 10/24/2011 13:27:11 | 8 | 0 | repaint doesnt clear the panel before repainting | i got a JPanel where a triangle is painted.
when someone clicks on a button the triangle should be repainted with new parameters. the problem is the old triangle is still ther and the new one is messed up with part of the textfield underneath.
public class Vermessung {
private static void eingabe(){
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setSize(screen.height/2, screen.height/4*3);
JPanel jp = new JPanel();
jp.setLayout(new BoxLayout(jp, BoxLayout.PAGE_AXIS));
//Eingabebereich
JPanel eingabebereich = new JPanel(new GridLayout(3, 1));
JPanel abc = new JPanel(new GridLayout(4, 2));
abc.add(new JLabel("Strecke"));
abc.add(new JLabel("Gemessener Wert in [m]"));
abc.add(new JLabel("a:"));
abc.add(tfa);
abc.add(new JLabel("b:"));
abc.add(tfb);
abc.add(new JLabel("c:"));
abc.add(tfc);
//AusgabeBereich
JPanel ausgabe = new JPanel(new GridLayout(2, 3));
ausgabe.add(new JLabel("p [m]"));
ausgabe.add(new JLabel("q [m]"));
ausgabe.add(new JLabel("h [m]"));
ausgabe.add(P);
ausgabe.add(Q);
ausgabe.add(H);
P.setEditable(false);
Q.setEditable(false);
H.setEditable(false);
//Buttons mit Listenern
JPanel buttons = new JPanel(new FlowLayout());
JButton ok = new JButton("OK");
JButton cancel = new JButton("beenden");
ActionListener al = new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
//Textfelder auslesen
TextfelderAuslesen();
//bei gueltiger Eingabe Höhe Berechnen
if(berechenbar){
berechnungPQ();
berechnungH();
P.setText(String.valueOf(p));
Q.setText(String.valueOf(q));
H.setText(String.valueOf(h));
sketch.update(vec);
sketch.repaint();
}else{
}
}
};
ok.addActionListener(al);
ActionListener beenden = new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
System.exit(0);
}
};
cancel.addActionListener(beenden);
buttons.add(ok);
buttons.add(cancel);
//Fensteraufbau
sketch.setPreferredSize(new Dimension(screen.height/2, screen.height/2));
jp.add(sketch);
eingabebereich.add(abc);
eingabebereich.add(ausgabe);
eingabebereich.add(buttons);
eingabebereich.setPreferredSize(new Dimension(screen.height/4, screen.height/4));
jp.add(eingabebereich);
f.add(jp);
f.setVisible(true);
}
}
public class Zeichnung extends JPanel{
public void paint(Graphics g){
zeichneDreieck(g);
}
private void zeichneDreieck(Graphics g){
berechneLaengen();
g.setColor(new Color(255,0,0));
g.drawLine(30, 30, ca, 30);
g.drawString("c", ca/2, 20);
g.drawLine(ca, 30, qa, ha);
g.drawString("a", (ca-pa/2), ha/2);
g.drawLine(qa, ha, 30, 30);
g.drawString("b", (qa/2), ha/2);
g.setColor(new Color(0,0,0));
g.drawLine(qa, ha, qa, 30);
g.drawString("h", qa+5, ha/2);
}
}
| java | swing | jpanel | null | null | null | open | repaint doesnt clear the panel before repainting
===
i got a JPanel where a triangle is painted.
when someone clicks on a button the triangle should be repainted with new parameters. the problem is the old triangle is still ther and the new one is messed up with part of the textfield underneath.
public class Vermessung {
private static void eingabe(){
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setSize(screen.height/2, screen.height/4*3);
JPanel jp = new JPanel();
jp.setLayout(new BoxLayout(jp, BoxLayout.PAGE_AXIS));
//Eingabebereich
JPanel eingabebereich = new JPanel(new GridLayout(3, 1));
JPanel abc = new JPanel(new GridLayout(4, 2));
abc.add(new JLabel("Strecke"));
abc.add(new JLabel("Gemessener Wert in [m]"));
abc.add(new JLabel("a:"));
abc.add(tfa);
abc.add(new JLabel("b:"));
abc.add(tfb);
abc.add(new JLabel("c:"));
abc.add(tfc);
//AusgabeBereich
JPanel ausgabe = new JPanel(new GridLayout(2, 3));
ausgabe.add(new JLabel("p [m]"));
ausgabe.add(new JLabel("q [m]"));
ausgabe.add(new JLabel("h [m]"));
ausgabe.add(P);
ausgabe.add(Q);
ausgabe.add(H);
P.setEditable(false);
Q.setEditable(false);
H.setEditable(false);
//Buttons mit Listenern
JPanel buttons = new JPanel(new FlowLayout());
JButton ok = new JButton("OK");
JButton cancel = new JButton("beenden");
ActionListener al = new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
//Textfelder auslesen
TextfelderAuslesen();
//bei gueltiger Eingabe Höhe Berechnen
if(berechenbar){
berechnungPQ();
berechnungH();
P.setText(String.valueOf(p));
Q.setText(String.valueOf(q));
H.setText(String.valueOf(h));
sketch.update(vec);
sketch.repaint();
}else{
}
}
};
ok.addActionListener(al);
ActionListener beenden = new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
System.exit(0);
}
};
cancel.addActionListener(beenden);
buttons.add(ok);
buttons.add(cancel);
//Fensteraufbau
sketch.setPreferredSize(new Dimension(screen.height/2, screen.height/2));
jp.add(sketch);
eingabebereich.add(abc);
eingabebereich.add(ausgabe);
eingabebereich.add(buttons);
eingabebereich.setPreferredSize(new Dimension(screen.height/4, screen.height/4));
jp.add(eingabebereich);
f.add(jp);
f.setVisible(true);
}
}
public class Zeichnung extends JPanel{
public void paint(Graphics g){
zeichneDreieck(g);
}
private void zeichneDreieck(Graphics g){
berechneLaengen();
g.setColor(new Color(255,0,0));
g.drawLine(30, 30, ca, 30);
g.drawString("c", ca/2, 20);
g.drawLine(ca, 30, qa, ha);
g.drawString("a", (ca-pa/2), ha/2);
g.drawLine(qa, ha, 30, 30);
g.drawString("b", (qa/2), ha/2);
g.setColor(new Color(0,0,0));
g.drawLine(qa, ha, qa, 30);
g.drawString("h", qa+5, ha/2);
}
}
| 0 |
11,513,285 | 07/16/2012 22:06:52 | 1,526,556 | 07/15/2012 06:34:01 | 1 | 0 | Having trouble loop through a list <set <pair > > | Here is how I declared my list. it.next() appears to be returning my set when it should be returning a pair (which is a string,int pair) in one of my lists. Any ideas? The parentheses outside of Pair should be <>
List <..HashSet.. (Pair) > addresses = new ArrayList < HashSet (Pair) > ();
I'm trying...
for (int i = 0; i < 100; i++) {
Iterator it = (addresses.get(i)).iterator();
while (it.hasNext()){
String m = it.next().getFirst()); //getFirst returns a string
}
} | java | null | null | null | null | null | open | Having trouble loop through a list <set <pair > >
===
Here is how I declared my list. it.next() appears to be returning my set when it should be returning a pair (which is a string,int pair) in one of my lists. Any ideas? The parentheses outside of Pair should be <>
List <..HashSet.. (Pair) > addresses = new ArrayList < HashSet (Pair) > ();
I'm trying...
for (int i = 0; i < 100; i++) {
Iterator it = (addresses.get(i)).iterator();
while (it.hasNext()){
String m = it.next().getFirst()); //getFirst returns a string
}
} | 0 |
9,772,086 | 03/19/2012 14:33:54 | 1,278,780 | 03/19/2012 14:27:54 | 1 | 0 | How to check the account yahoo? | Does the yahoo support to check account yahoo (API or service from yahoo or something else ?)
Ex: username@yahoo.com pass
and return the result is the status of account (available or die) | yahoo-api | null | null | null | null | 03/19/2012 15:10:39 | not a real question | How to check the account yahoo?
===
Does the yahoo support to check account yahoo (API or service from yahoo or something else ?)
Ex: username@yahoo.com pass
and return the result is the status of account (available or die) | 1 |
4,095,435 | 11/04/2010 09:49:13 | 497,007 | 11/04/2010 09:42:43 | 1 | 0 | calling priority of polymorphism function with char* argument and bool argument in C++ | The following is the code snippet.
#include <stdio.h>
void bar(char* ptr) {
printf("bar(char*) is called\n");
}
void bar(bool ptr) {
printf("bar(bool) is called\n");
}
int main() {
const char* str = "abc";
bar(str);
return 0;
}
When bar() is passed a const char* parameter, why bar(bool) is called? Shouldn't bar(char*) be called?
| c++ | polymorphism | null | null | null | null | open | calling priority of polymorphism function with char* argument and bool argument in C++
===
The following is the code snippet.
#include <stdio.h>
void bar(char* ptr) {
printf("bar(char*) is called\n");
}
void bar(bool ptr) {
printf("bar(bool) is called\n");
}
int main() {
const char* str = "abc";
bar(str);
return 0;
}
When bar() is passed a const char* parameter, why bar(bool) is called? Shouldn't bar(char*) be called?
| 0 |
11,168,465 | 06/23/2012 09:42:39 | 1,476,621 | 06/23/2012 09:40:04 | 1 | 0 | Is it possible to capture the playing audio with Java? | I was wondering if it's possible to capture playing audio on the audio output hardware with a simple Java program, and then write it to an outputstream for example.
Is it? | java | audio | capture | outputstream | null | null | open | Is it possible to capture the playing audio with Java?
===
I was wondering if it's possible to capture playing audio on the audio output hardware with a simple Java program, and then write it to an outputstream for example.
Is it? | 0 |
6,405,890 | 06/20/2011 00:18:01 | 805,846 | 06/20/2011 00:18:01 | 1 | 0 | Set body left margin using Javascript | **Setting the body elements left margin using javascript does not work, it doesn't move?**
I dont know why this doesn't work? If I set the left margin using CSS it works but not when I do it in javascript, why?
<html>
<head>
<style type="text/css">
<!--
body { margin-left: 0px; } /* set margin to anything so I can change it in JS*/
-->
</head>
<body>
<div id="test" style="background-color: blue;"> blah </div>
<script type="text/javascript">
<!--
var APP_WIDTH = 555;
var scrWidth = 760; //getScreenSize()["width"];
var xOffset = Math.abs( Math.floor( (scrWidth/2)-(APP_WIDTH/2) ) );
document.getElementsByTagName("body")[0].style.margin.left = xOffset + "px"; // doesn't move the div inside body?
alert( xOffset + "px" );
-->
</script>
</body>
</html> | javascript | html | css | null | null | null | open | Set body left margin using Javascript
===
**Setting the body elements left margin using javascript does not work, it doesn't move?**
I dont know why this doesn't work? If I set the left margin using CSS it works but not when I do it in javascript, why?
<html>
<head>
<style type="text/css">
<!--
body { margin-left: 0px; } /* set margin to anything so I can change it in JS*/
-->
</head>
<body>
<div id="test" style="background-color: blue;"> blah </div>
<script type="text/javascript">
<!--
var APP_WIDTH = 555;
var scrWidth = 760; //getScreenSize()["width"];
var xOffset = Math.abs( Math.floor( (scrWidth/2)-(APP_WIDTH/2) ) );
document.getElementsByTagName("body")[0].style.margin.left = xOffset + "px"; // doesn't move the div inside body?
alert( xOffset + "px" );
-->
</script>
</body>
</html> | 0 |
7,992,189 | 11/03/2011 08:51:51 | 1,015,924 | 10/27/2011 06:06:48 | 4 | 0 | how to access remainders through code in android? | i my application i want to access the remainders(ex:birth day) information.
can any one suggest me.if you have any sample code could you please share it.
Thanks in advance.
| android | null | null | null | null | 04/19/2012 13:41:50 | not a real question | how to access remainders through code in android?
===
i my application i want to access the remainders(ex:birth day) information.
can any one suggest me.if you have any sample code could you please share it.
Thanks in advance.
| 1 |
244,316 | 10/28/2008 18:26:51 | 852 | 08/09/2008 15:15:30 | 1,366 | 48 | Reader/Writer Locks in C++ | I'm looking for a good reader/writer lock in C++. We have a use case of a single infrequent writer and many frequent readers and would like to optimize for this. Preferable I would like a cross-platform solution, however a Windows only one would be acceptable. | c++ | multithreading | locking | null | null | null | open | Reader/Writer Locks in C++
===
I'm looking for a good reader/writer lock in C++. We have a use case of a single infrequent writer and many frequent readers and would like to optimize for this. Preferable I would like a cross-platform solution, however a Windows only one would be acceptable. | 0 |
10,346,532 | 04/27/2012 07:29:43 | 822,580 | 06/30/2011 07:49:40 | 75 | 17 | Mobile Jquery popup is not working | I had spent 3 hours and go through many answers but not successful, I do't know where I am missing something
mobile jquery popup is not opened when i click the link here [fiddle link](http://jsfiddle.net/sulemanahmad/SaJgU/)
please any idea | jquery | mobile | jquery-mobile | null | null | null | open | Mobile Jquery popup is not working
===
I had spent 3 hours and go through many answers but not successful, I do't know where I am missing something
mobile jquery popup is not opened when i click the link here [fiddle link](http://jsfiddle.net/sulemanahmad/SaJgU/)
please any idea | 0 |
4,374,226 | 12/07/2010 07:21:02 | 450,601 | 09/17/2010 12:53:09 | 39 | 1 | how to create gui with text links and tabs | hiii i want to create a UI like http://www.ndtv.com/static/images/iphone/motorola_droid.jpg
in which extra links are below the tabs. how can we achieve this?? can anyone help me??
thanks in advance | android-ui | null | null | null | null | null | open | how to create gui with text links and tabs
===
hiii i want to create a UI like http://www.ndtv.com/static/images/iphone/motorola_droid.jpg
in which extra links are below the tabs. how can we achieve this?? can anyone help me??
thanks in advance | 0 |
5,769,586 | 04/24/2011 08:47:14 | 722,460 | 04/24/2011 08:47:14 | 1 | 0 | Dynamic vars MovieClips in AS3 | Hello I'm trying to do this (in as2 this worked but not in as3) I looked on google for 3 hours, but still don't found a solution (thans for your help) :
import flash.display.MovieClip;
var mcContainer:MovieClip = new MovieClip();
var mcImage0:MovieClip = new MovieClip();
var mcImage1:MovieClip = new MovieClip();
var mcImage2:MovieClip = new MovieClip();
var mcImage3:MovieClip = new MovieClip();
mcImage0.name = "Boy";
mcImage1.name = "Girl";
mcImage2.name = "Woman";
mcImage3.name = "Man";
var ArrayNamesOfMC:Array = new Array();
var i:int = 4;
while(i--) {
ArrayNamesOfMC.push(["mcImage"+i].name);
}
This donsn't work :
ArrayNamesOfMC.push(["mcImage"+i].name); | actionscript-3 | null | null | null | null | null | open | Dynamic vars MovieClips in AS3
===
Hello I'm trying to do this (in as2 this worked but not in as3) I looked on google for 3 hours, but still don't found a solution (thans for your help) :
import flash.display.MovieClip;
var mcContainer:MovieClip = new MovieClip();
var mcImage0:MovieClip = new MovieClip();
var mcImage1:MovieClip = new MovieClip();
var mcImage2:MovieClip = new MovieClip();
var mcImage3:MovieClip = new MovieClip();
mcImage0.name = "Boy";
mcImage1.name = "Girl";
mcImage2.name = "Woman";
mcImage3.name = "Man";
var ArrayNamesOfMC:Array = new Array();
var i:int = 4;
while(i--) {
ArrayNamesOfMC.push(["mcImage"+i].name);
}
This donsn't work :
ArrayNamesOfMC.push(["mcImage"+i].name); | 0 |
11,160,016 | 06/22/2012 16:08:24 | 1,475,357 | 06/22/2012 16:03:09 | 1 | 0 | Joomla 2.5 all links show the home page | I have joomla 2.5 it show many error.
1. All links even error page also showing home page.
2. Error message 'Unable to move file' when install extension.
3. Can't rewrite configuration.php | joomla | null | null | null | null | null | open | Joomla 2.5 all links show the home page
===
I have joomla 2.5 it show many error.
1. All links even error page also showing home page.
2. Error message 'Unable to move file' when install extension.
3. Can't rewrite configuration.php | 0 |
9,379,366 | 02/21/2012 14:35:16 | 494,581 | 11/02/2010 10:06:40 | 42 | 1 | writing if, elseif and else statements | I was wondering if anyone can help me to get this code working...?
<?php if (is_front_page() && get_option('of_slider_on_off') == 'true' ) { ?>
<?php require('featured-slider.php'); ?>
<?php }elseif (is_front_page() && get_option('of_slider_on_off') == 'false' ) { ?>
<?php require('featured-countdown.php'); { ?>
<?php }else {
echo '';
}
?>
| php | php5 | else | elseif | null | 04/04/2012 10:37:09 | not a real question | writing if, elseif and else statements
===
I was wondering if anyone can help me to get this code working...?
<?php if (is_front_page() && get_option('of_slider_on_off') == 'true' ) { ?>
<?php require('featured-slider.php'); ?>
<?php }elseif (is_front_page() && get_option('of_slider_on_off') == 'false' ) { ?>
<?php require('featured-countdown.php'); { ?>
<?php }else {
echo '';
}
?>
| 1 |
11,348,430 | 07/05/2012 16:15:00 | 283,322 | 03/01/2010 01:02:07 | 157 | 2 | wordpress plugin to add images to main navigation menu | Please advise about wordpress plugin to add multi states images to the main navigation menu
I need to be able to add images on top of text for normal, hover and current state.
Thanks
| php | css | wordpress | null | null | 07/06/2012 02:20:04 | not a real question | wordpress plugin to add images to main navigation menu
===
Please advise about wordpress plugin to add multi states images to the main navigation menu
I need to be able to add images on top of text for normal, hover and current state.
Thanks
| 1 |
10,117,867 | 04/12/2012 05:26:15 | 1,220,657 | 02/20/2012 09:30:38 | 1 | 0 | Basic page Vs Module in Drupal | I have very basic question about Drupal. Can you tell me when to use basic page and when to create a custom module?
Thanks,
Vishal | drupal-7 | null | null | null | null | 04/12/2012 23:55:22 | not constructive | Basic page Vs Module in Drupal
===
I have very basic question about Drupal. Can you tell me when to use basic page and when to create a custom module?
Thanks,
Vishal | 4 |
10,814,830 | 05/30/2012 10:52:18 | 1,340,675 | 04/18/2012 07:36:40 | 1 | 0 | How to send an array as a message body in mail server in iOS? | can any one send the useful information for sending the mail with array of content as message body in iOS, i am using MFMailCompose for sending message. | ios | xcode | mailserver | null | null | 06/02/2012 05:29:32 | not a real question | How to send an array as a message body in mail server in iOS?
===
can any one send the useful information for sending the mail with array of content as message body in iOS, i am using MFMailCompose for sending message. | 1 |
6,124,262 | 05/25/2011 12:11:19 | 767,700 | 05/24/2011 12:25:13 | 10 | 2 | Android ad placement question | Which do you all think is the best option, for both making money as well as keeping the user happy?
-ad banner pinned to top of application(see at all times, but shifts whole layout down)
-ad banner at bottom, but moves up with soft keyboard(see at all times, but intrusive)
-ad banner pinned at bottom of application(can only see when not using soft keyboard) | android | ads | null | null | null | 05/25/2011 13:29:59 | not constructive | Android ad placement question
===
Which do you all think is the best option, for both making money as well as keeping the user happy?
-ad banner pinned to top of application(see at all times, but shifts whole layout down)
-ad banner at bottom, but moves up with soft keyboard(see at all times, but intrusive)
-ad banner pinned at bottom of application(can only see when not using soft keyboard) | 4 |
3,780,737 | 09/23/2010 16:58:07 | 409,701 | 08/03/2010 13:36:38 | 77 | 8 | Add a custom button to a Django application's admin page | I have an application in Django with a routine which would be available only to the admin. I'm quite new to the python/django world, so maybe my question is trivial. What I want to do is add a button to perform the routine in this application's section of the admin app.
I'm quite confused from there, am I suppose to make a template for it, and if it's the case, how do I add a html template for an app in the admin. Or maybe there's a command to simply add a button?
Thanks for your time | python | django | django-admin | null | null | null | open | Add a custom button to a Django application's admin page
===
I have an application in Django with a routine which would be available only to the admin. I'm quite new to the python/django world, so maybe my question is trivial. What I want to do is add a button to perform the routine in this application's section of the admin app.
I'm quite confused from there, am I suppose to make a template for it, and if it's the case, how do I add a html template for an app in the admin. Or maybe there's a command to simply add a button?
Thanks for your time | 0 |
7,654,987 | 10/04/2011 22:59:53 | 277,671 | 02/20/2010 14:28:36 | 297 | 2 | Desktop SQL clients for PostgreSQL | Are there any desktop clients that I can use to connect to my web hosting PostgreSQL database?
This is so that I can run test queries without having to use the web interface. | sql | postgresql | desktop-application | null | null | 03/13/2012 15:19:39 | not constructive | Desktop SQL clients for PostgreSQL
===
Are there any desktop clients that I can use to connect to my web hosting PostgreSQL database?
This is so that I can run test queries without having to use the web interface. | 4 |
7,541,864 | 09/24/2011 20:56:11 | 536,504 | 12/09/2010 14:01:02 | 106 | 4 | Sorted output of a joined MySQL result in PHP | Doing an allnighter on a project and my mind is blank atm... Simple question really:
I have two MySQL tables, product and category. Each product belongs to exactly one category.
SELECT
p.uid as product_uid, p.name_NL as product_name, p.price as product_price,
c.uid as category_uid, c.name_NL as category_name
FROM
product p, category c
WHERE
p.category_uid = c.uid
This gives me a nice overview of all products in their respective category. My question is about **outputting this data** on the page. I'm aiming for this:
<h1>Category name</h1>
<p>Product in this category</p>
<p>Other product in this category</p>
<h1>Next category</h1>
<p>Product in next category</p>
My mind is completely blank right now. How would one go about doing this?
I would like to avoid doing subqueries (if possible).
Kind regards,
M
| php | mysql | join | output | null | null | open | Sorted output of a joined MySQL result in PHP
===
Doing an allnighter on a project and my mind is blank atm... Simple question really:
I have two MySQL tables, product and category. Each product belongs to exactly one category.
SELECT
p.uid as product_uid, p.name_NL as product_name, p.price as product_price,
c.uid as category_uid, c.name_NL as category_name
FROM
product p, category c
WHERE
p.category_uid = c.uid
This gives me a nice overview of all products in their respective category. My question is about **outputting this data** on the page. I'm aiming for this:
<h1>Category name</h1>
<p>Product in this category</p>
<p>Other product in this category</p>
<h1>Next category</h1>
<p>Product in next category</p>
My mind is completely blank right now. How would one go about doing this?
I would like to avoid doing subqueries (if possible).
Kind regards,
M
| 0 |
1,268,864 | 08/12/2009 21:36:31 | 41,360 | 11/27/2008 12:59:33 | 6,862 | 350 | What are the best JPEG compression tools? | When making a webpage every byte counts. Especially if the webpage is heavy on graphics, has large backgrounds, etc.
For that reason I want to find a good tool to compress my huge background files into as small JPEG files as possible, while still maintaining an acceptable quality.
I know that a lot of things depend on the compression algorithms used, and "80% quality" can differ from tool to tool. For example, there are several tools aimed at recompressing PNG files as best as possible. Unfortunately I cannot find any good tools for JPEGs with Google, because there just is too much "noise" in the search results.
Thus I turn to my fellow developers. What software do you know that maintans the best size/quality relation? | jpeg | compression | null | null | null | 09/11/2011 23:58:12 | not constructive | What are the best JPEG compression tools?
===
When making a webpage every byte counts. Especially if the webpage is heavy on graphics, has large backgrounds, etc.
For that reason I want to find a good tool to compress my huge background files into as small JPEG files as possible, while still maintaining an acceptable quality.
I know that a lot of things depend on the compression algorithms used, and "80% quality" can differ from tool to tool. For example, there are several tools aimed at recompressing PNG files as best as possible. Unfortunately I cannot find any good tools for JPEGs with Google, because there just is too much "noise" in the search results.
Thus I turn to my fellow developers. What software do you know that maintans the best size/quality relation? | 4 |
10,452,376 | 05/04/2012 16:06:59 | 1,375,364 | 05/04/2012 15:36:39 | 1 | 0 | jQuery.ajax event not firing properly in IE8 (except when Fiddler is loaded) | This is possibly the weirdest error I've ever encountered:
So I have a bundle of jQuery.ajax calls to a web service I threw together. It works great in Firefox and Chrome, but it does nothing in IE8 *unless* I have Fiddler running. (It's similar to the issue reported [here](http://stackoverflow.com/questions/1297673/jquery-ajax-not-working-remotely-on-ie), but I've tried the stuff mentioned to no avail.)
In these non-functional calls, it seems like it's building the jqXHR object like it should, but something is missing. Not sure what, though - I'm not super-intimate with the inner workings of jQuery, so stepping through the call in the debugger can only do so much for me.
Here's the call:
$.ajaxSetup({
type: "POST",
timeout: 30000,
contentType: "application/json; charset=utf-8"
});
$.ajax({
url: "/PSWS/UserManager.asmx/Login",
data: '{"emailAddress":"' + myEmailAddress + '","password":"' + myPassword + '","stayLoggedIn":' + (myStayLoggedIn ? 'true' : 'false') + '}',
success: function (response) {
if (!response.Success) {
alert(response.Message);
} else {
$(this).find('.message').remove();
$.fn.colorbox.close();
}
},
dataType: 'json',
error: function (jqXHR, textStatus, errorThrown) {
$(this).find('.message').remove();
$(this).prepend('<div class="message message_error">Error!<br/>' + jqXHR.status + ' - ' + jqXHR.statusText + '</div>');
}
});`
I wondered if something was wrong in my JSON, either in what's sent or what's received. I don't know of a way to capture this except through Fiddler, but it seems to be valid. Valid enough for its parser and JSONLint, anyway.
Sent:
`{"emailAddress":"test@example.com","password":"asdasdasd","stayLoggedIn":true}`
Received:
`{"__type":"PSUserManagerService.SystemResponse","Success":false,"Message":"Error logging in: Invalid username and/or password.","Subscriptions":null}` | jquery | ajax | json | web-services | internet-explorer-8 | null | open | jQuery.ajax event not firing properly in IE8 (except when Fiddler is loaded)
===
This is possibly the weirdest error I've ever encountered:
So I have a bundle of jQuery.ajax calls to a web service I threw together. It works great in Firefox and Chrome, but it does nothing in IE8 *unless* I have Fiddler running. (It's similar to the issue reported [here](http://stackoverflow.com/questions/1297673/jquery-ajax-not-working-remotely-on-ie), but I've tried the stuff mentioned to no avail.)
In these non-functional calls, it seems like it's building the jqXHR object like it should, but something is missing. Not sure what, though - I'm not super-intimate with the inner workings of jQuery, so stepping through the call in the debugger can only do so much for me.
Here's the call:
$.ajaxSetup({
type: "POST",
timeout: 30000,
contentType: "application/json; charset=utf-8"
});
$.ajax({
url: "/PSWS/UserManager.asmx/Login",
data: '{"emailAddress":"' + myEmailAddress + '","password":"' + myPassword + '","stayLoggedIn":' + (myStayLoggedIn ? 'true' : 'false') + '}',
success: function (response) {
if (!response.Success) {
alert(response.Message);
} else {
$(this).find('.message').remove();
$.fn.colorbox.close();
}
},
dataType: 'json',
error: function (jqXHR, textStatus, errorThrown) {
$(this).find('.message').remove();
$(this).prepend('<div class="message message_error">Error!<br/>' + jqXHR.status + ' - ' + jqXHR.statusText + '</div>');
}
});`
I wondered if something was wrong in my JSON, either in what's sent or what's received. I don't know of a way to capture this except through Fiddler, but it seems to be valid. Valid enough for its parser and JSONLint, anyway.
Sent:
`{"emailAddress":"test@example.com","password":"asdasdasd","stayLoggedIn":true}`
Received:
`{"__type":"PSUserManagerService.SystemResponse","Success":false,"Message":"Error logging in: Invalid username and/or password.","Subscriptions":null}` | 0 |
11,667,044 | 07/26/2012 10:07:54 | 1,539,919 | 07/20/2012 06:48:51 | 19 | 0 | How to Enable assert in java | getting in error at assertArrayEquals(expectedPos, sent.getPosTags().toArray());
how to fix it????
ArrayList<Range> gotRanges = new ArrayList<Range>();
Iterables.addAll(gotRanges, sent.getNpChunkRanges());
assertEquals(expectedLength, sent.getLength());
- **
- **assertArrayEquals(expectedPos, sent.getPosTags().toArray());
2. assertArrayEquals(expectedToks, sent.getTokens().toArray());**
**
assertEquals(expectedRanges, gotRanges); | java | assert | null | null | null | 07/26/2012 20:46:55 | not a real question | How to Enable assert in java
===
getting in error at assertArrayEquals(expectedPos, sent.getPosTags().toArray());
how to fix it????
ArrayList<Range> gotRanges = new ArrayList<Range>();
Iterables.addAll(gotRanges, sent.getNpChunkRanges());
assertEquals(expectedLength, sent.getLength());
- **
- **assertArrayEquals(expectedPos, sent.getPosTags().toArray());
2. assertArrayEquals(expectedToks, sent.getTokens().toArray());**
**
assertEquals(expectedRanges, gotRanges); | 1 |
3,421,499 | 08/06/2010 06:36:23 | 412,702 | 08/06/2010 06:17:39 | 1 | 0 | STRING palindrome | I need a detail code in java to check string palindrome without using API'S | java | null | null | null | null | 07/19/2012 02:04:54 | not a real question | STRING palindrome
===
I need a detail code in java to check string palindrome without using API'S | 1 |
3,800,918 | 09/27/2010 03:27:03 | 200,449 | 11/01/2009 10:59:52 | 110 | 13 | what is index and can non-clustered index be non-unique? | Subquestion to my question [1]:
All definitions of (MS SQL Server) index (that I could find) are ambiguous and all explanations, based on it, narrate something without defining terms.
What is the definition of index?
For ex., the most common definition of index from wiki (http://en.wikipedia.org/wiki/Index_(database) ) :
- 1) "A database index is a data structure that improves the speed of data retrieval operations on a database table at the cost of slower writes and increased storage space. Indexes can be created using one or more columns of a database table..."
- 2) "SQL server creates a clustered index on a primary key by default[1]. The data is present in random order, but the logical ordering is specified by the index. The data rows may be randomly spread throughout the table. The non-clustered index tree contains the index keys in sorted order, with the leaf level of the index containing the pointer to the page and the row number in the data page"
Well, it is ambiguous. One can understand under index:
- 1) an ordered data structure, a tree, containing intermediate and leaf nodes;
- 2) leaf node data containing values from indexed columns + "pointer to the page and the row number in the data page"
Can non-clustered index be non-unique, considering 2)? or, even, 1) ?
It doesn't seem so to me ...
But does TSQL imply existence of non-unique non-clustered index?
If yes, then What is understood by non-clustered index in "CREATE INDEX (Transact-SQL)"[2] and to what the argument UNIQUE is applied there?
Is it:
- 3) leaf node data containing values from indexed columns? i.e. like in 2) but without pointer + row number ) ?
If it is 3), then again question 1) arises - why to apply constraints to copy of real data in "index", instead of real data in-situ?
----
[1]
"UNIQUE argument for INDEX creation - what's for?"
http://stackoverflow.com/questions/3799095/unique-argument-for-index-creation-whats-for
[2]
[CREATE INDEX (Transact-SQL)]
http://msdn.microsoft.com/en-us/library/ms188783.aspx | sql-server | tsql | index | terminology | definition | null | open | what is index and can non-clustered index be non-unique?
===
Subquestion to my question [1]:
All definitions of (MS SQL Server) index (that I could find) are ambiguous and all explanations, based on it, narrate something without defining terms.
What is the definition of index?
For ex., the most common definition of index from wiki (http://en.wikipedia.org/wiki/Index_(database) ) :
- 1) "A database index is a data structure that improves the speed of data retrieval operations on a database table at the cost of slower writes and increased storage space. Indexes can be created using one or more columns of a database table..."
- 2) "SQL server creates a clustered index on a primary key by default[1]. The data is present in random order, but the logical ordering is specified by the index. The data rows may be randomly spread throughout the table. The non-clustered index tree contains the index keys in sorted order, with the leaf level of the index containing the pointer to the page and the row number in the data page"
Well, it is ambiguous. One can understand under index:
- 1) an ordered data structure, a tree, containing intermediate and leaf nodes;
- 2) leaf node data containing values from indexed columns + "pointer to the page and the row number in the data page"
Can non-clustered index be non-unique, considering 2)? or, even, 1) ?
It doesn't seem so to me ...
But does TSQL imply existence of non-unique non-clustered index?
If yes, then What is understood by non-clustered index in "CREATE INDEX (Transact-SQL)"[2] and to what the argument UNIQUE is applied there?
Is it:
- 3) leaf node data containing values from indexed columns? i.e. like in 2) but without pointer + row number ) ?
If it is 3), then again question 1) arises - why to apply constraints to copy of real data in "index", instead of real data in-situ?
----
[1]
"UNIQUE argument for INDEX creation - what's for?"
http://stackoverflow.com/questions/3799095/unique-argument-for-index-creation-whats-for
[2]
[CREATE INDEX (Transact-SQL)]
http://msdn.microsoft.com/en-us/library/ms188783.aspx | 0 |
10,581,125 | 05/14/2012 10:00:26 | 1,393,459 | 05/14/2012 09:54:38 | 1 | 0 | Add a Pagination option on JSP page with the help of JSTL | Can any one help me to do pagination by seeing below code. for pagination need to change on server side or simply need to if.. else... block on client side? please suggest me anyone as i am new to java
<tr>
<th>S/No</th>
<th>Transaction ID</th>
<th>app id</th>
<th>uta id</th>
<th>Company Name</th>
<th>Amount</th>
<th>Currency</th>
<th>Payment Mode</th>
<th>Request Time</th>
<th>Status</th>
<th>gateway Transaction ID</th>
<th>gateway Error Code</th>
<th>gateway Error Message</th>
</tr>
<%int i=1; %>
<c:forEach var="transactionDetails" items="${transactionDetailsList}">
<tr>
<td><%=i++ %></td>
<td><a href=/Contextroot/pay/DetailServlet?transactionid=<c:out value='${transactionDetails.transactionID}'/>><c:out value='${transactionDetails.transactionID}'/></a></td>
<td><c:out value='${transactionDetails.applicationID}'/></td>
<td><c:out value='${transactionDetails.utaID}'/></td>
<td><c:out value='${transactionDetails.company}'/></td>
<td><c:out value='${transactionDetails.amount}'/></td>
<td><c:out value='${transactionDetails.currency}'/></td>
<td><c:out value='${transactionDetails.paymentMode}'/></td>
<td><c:out value='${transactionDetails.requestTimeStamp}'/></td>
<td><c:out value='${transactionDetails.status}'/></td>
<td><c:out value='${transactionDetails.gatewayTransactionID}'/></td>
<td><c:out value='${transactionDetails.gatewayStatusCode}'/></td>
<td><c:out value='${transactionDetails.gatewayStatusMessage}'/></td></tr>
</c:forEach>
| java | null | null | null | null | 05/15/2012 12:26:20 | not a real question | Add a Pagination option on JSP page with the help of JSTL
===
Can any one help me to do pagination by seeing below code. for pagination need to change on server side or simply need to if.. else... block on client side? please suggest me anyone as i am new to java
<tr>
<th>S/No</th>
<th>Transaction ID</th>
<th>app id</th>
<th>uta id</th>
<th>Company Name</th>
<th>Amount</th>
<th>Currency</th>
<th>Payment Mode</th>
<th>Request Time</th>
<th>Status</th>
<th>gateway Transaction ID</th>
<th>gateway Error Code</th>
<th>gateway Error Message</th>
</tr>
<%int i=1; %>
<c:forEach var="transactionDetails" items="${transactionDetailsList}">
<tr>
<td><%=i++ %></td>
<td><a href=/Contextroot/pay/DetailServlet?transactionid=<c:out value='${transactionDetails.transactionID}'/>><c:out value='${transactionDetails.transactionID}'/></a></td>
<td><c:out value='${transactionDetails.applicationID}'/></td>
<td><c:out value='${transactionDetails.utaID}'/></td>
<td><c:out value='${transactionDetails.company}'/></td>
<td><c:out value='${transactionDetails.amount}'/></td>
<td><c:out value='${transactionDetails.currency}'/></td>
<td><c:out value='${transactionDetails.paymentMode}'/></td>
<td><c:out value='${transactionDetails.requestTimeStamp}'/></td>
<td><c:out value='${transactionDetails.status}'/></td>
<td><c:out value='${transactionDetails.gatewayTransactionID}'/></td>
<td><c:out value='${transactionDetails.gatewayStatusCode}'/></td>
<td><c:out value='${transactionDetails.gatewayStatusMessage}'/></td></tr>
</c:forEach>
| 1 |
4,059,306 | 10/30/2010 15:17:01 | 148,607 | 07/31/2009 17:02:43 | 757 | 100 | Why does java have no byte type suffix? | So java has a long type suffix for literals: (123L), a double type suffix (43.21D), a floating point suffix (1.234F). So ... why no byte type suffix? For example, when writing some testing code you MUST cast all your bytes when they are used as function parameters.
ByteBuffer b = ByteBuffer.allocate(100);
b.put((byte)3); // super annoying
b.put(3b); // if only
It is clear that using B or b would not work since it would conflict with the ability to specify a byte in hexadecimal or octal (a critical language feature). But some other letter, like Z z? or Y y (for bYte)?
| java | language-design | null | null | null | 10/30/2010 17:14:03 | not constructive | Why does java have no byte type suffix?
===
So java has a long type suffix for literals: (123L), a double type suffix (43.21D), a floating point suffix (1.234F). So ... why no byte type suffix? For example, when writing some testing code you MUST cast all your bytes when they are used as function parameters.
ByteBuffer b = ByteBuffer.allocate(100);
b.put((byte)3); // super annoying
b.put(3b); // if only
It is clear that using B or b would not work since it would conflict with the ability to specify a byte in hexadecimal or octal (a critical language feature). But some other letter, like Z z? or Y y (for bYte)?
| 4 |
8,628,177 | 12/25/2011 04:16:54 | 1,008,362 | 10/22/2011 09:33:13 | 1 | 0 | Why won't some jQuery code(s) work when isolated in unique <script> tags? | This question is not code specific. It is a very general question, prompted by something I've been observing while building this website, and it really puzzles me.
In the head section of the site I'm working on, I have all the jQuery codes that run the site, enclosed within document ready methods, which are in turn enclosed within <script> tags in the head section of the site. I usually put each code that performs a unique function, within unique script tags. But I began to notice that some of my jQ codes wouldn't work at all when isolated in their own unique document ready method. Then when I transposed this same code to a neighboring document ready method containing another unrealated code which already works, the said code works fine.
So the puzzle is, why wouldn't these codes work when isolated? Are there certain circumstances when this might be the case? Perhaps there is something fundamental about jQuery/javascript that i don't understand that's going on here. Has this been anyones's experience? Answers appreciated. | jquery | null | null | null | null | 12/28/2011 08:06:49 | not a real question | Why won't some jQuery code(s) work when isolated in unique <script> tags?
===
This question is not code specific. It is a very general question, prompted by something I've been observing while building this website, and it really puzzles me.
In the head section of the site I'm working on, I have all the jQuery codes that run the site, enclosed within document ready methods, which are in turn enclosed within <script> tags in the head section of the site. I usually put each code that performs a unique function, within unique script tags. But I began to notice that some of my jQ codes wouldn't work at all when isolated in their own unique document ready method. Then when I transposed this same code to a neighboring document ready method containing another unrealated code which already works, the said code works fine.
So the puzzle is, why wouldn't these codes work when isolated? Are there certain circumstances when this might be the case? Perhaps there is something fundamental about jQuery/javascript that i don't understand that's going on here. Has this been anyones's experience? Answers appreciated. | 1 |
1,051,649 | 06/26/2009 23:01:34 | 129,688 | 06/26/2009 23:01:34 | 1 | 0 | How to programmatically enable GPS in Android Cupcake | I'm currently writing an app in Android that works with the GPS, at the moment I'm able to work out whether the GPS is enabled, my problem is that I want to enable the GPS on app startup if it is disabled, how can I do this programmaticaly? | android | java | cupcake | gps | enable | null | open | How to programmatically enable GPS in Android Cupcake
===
I'm currently writing an app in Android that works with the GPS, at the moment I'm able to work out whether the GPS is enabled, my problem is that I want to enable the GPS on app startup if it is disabled, how can I do this programmaticaly? | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.