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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11,019,006 | 06/13/2012 16:09:17 | 700,663 | 04/10/2011 07:56:33 | 1,489 | 17 | How in the earth this counter can fail? | @property (atomic) int OtherGrabbingIndicator;
@synthesize OtherGrabbingIndicator = _OtherGrabbingIndicator;
-(void)GrabbingProcess:(void (^)())block;
{
self.OtherGrabbingIndicator +=1;
[self updateStatusAtList];
block();
//[self updateStatusAtList];
self.OtherGrabbingIndicator -=1;
}
That is the only place OtherGrabbingIndicator is ever added or removed. Because the property is atomic there is no way this fail.
Yet I often see the value ended up being -2
That doesn't make sense at all | objective-c | xcode4.3 | null | null | null | 06/13/2012 17:28:37 | not a real question | How in the earth this counter can fail?
===
@property (atomic) int OtherGrabbingIndicator;
@synthesize OtherGrabbingIndicator = _OtherGrabbingIndicator;
-(void)GrabbingProcess:(void (^)())block;
{
self.OtherGrabbingIndicator +=1;
[self updateStatusAtList];
block();
//[self updateStatusAtList];
self.OtherGrabbingIndicator -=1;
}
That is the only place OtherGrabbingIndicator is ever added or removed. Because the property is atomic there is no way this fail.
Yet I often see the value ended up being -2
That doesn't make sense at all | 1 |
9,040,673 | 01/27/2012 22:03:28 | 1,174,447 | 01/27/2012 21:39:58 | 1 | 0 | Get if User is logged in Facebook or not, Need to use with PHP | I want to Get if User is logged in Facebook or not, I have to output a PHP code if user is logged in, so please tell me any solution which can work with PHP.
Please help !! Thanks in Advance ..
I will wait for your reply! | php | facebook | status | logged | null | 01/27/2012 22:49:20 | too localized | Get if User is logged in Facebook or not, Need to use with PHP
===
I want to Get if User is logged in Facebook or not, I have to output a PHP code if user is logged in, so please tell me any solution which can work with PHP.
Please help !! Thanks in Advance ..
I will wait for your reply! | 3 |
11,323,656 | 07/04/2012 06:38:35 | 1,199,901 | 02/09/2012 14:50:15 | 6 | 0 | Face recognition in android | I want to create simple application for face recognition functionality.I am very confusion how to start the application.I have search so many time about face recognition but I have not got any solution.Please provide any link or source code. | android | opencv | javacv | null | null | 07/05/2012 15:26:52 | not a real question | Face recognition in android
===
I want to create simple application for face recognition functionality.I am very confusion how to start the application.I have search so many time about face recognition but I have not got any solution.Please provide any link or source code. | 1 |
595,491 | 02/27/2009 16:30:19 | 2,666 | 08/24/2008 07:53:48 | 1,390 | 71 | Best way to learn Java for someone with a solid C++ background? (books, etc.) | I've installed Eclipse and the JDK, gone through the "Hello World" tutorial, and read through the Eclipse docs (both about Eclipse itself and developing Java with Eclipse). I'm looking at the JUnit samples to better understand how Java works when it runs.
I'm at that point of confusion one gets when learning a new computer language that has newer paradigms, and I think it's partially due to my experience with C++.
Any suggestions on good Java books/tutorials/etc. for someone with a C/C++ background? | java | null | null | null | null | 09/30/2011 00:49:56 | not constructive | Best way to learn Java for someone with a solid C++ background? (books, etc.)
===
I've installed Eclipse and the JDK, gone through the "Hello World" tutorial, and read through the Eclipse docs (both about Eclipse itself and developing Java with Eclipse). I'm looking at the JUnit samples to better understand how Java works when it runs.
I'm at that point of confusion one gets when learning a new computer language that has newer paradigms, and I think it's partially due to my experience with C++.
Any suggestions on good Java books/tutorials/etc. for someone with a C/C++ background? | 4 |
11,332,884 | 07/04/2012 16:44:49 | 1,398,631 | 05/16/2012 12:41:15 | 22 | 1 | How to recover deleted/updated record in sql server or mysql? | I want to know that is there any way that I can can recover the deleted or updated record in the sqlserver and mysql as well.
Thanks
Nitesh Kumar | mysql | sql | sql-server | null | null | 07/05/2012 15:10:35 | off topic | How to recover deleted/updated record in sql server or mysql?
===
I want to know that is there any way that I can can recover the deleted or updated record in the sqlserver and mysql as well.
Thanks
Nitesh Kumar | 2 |
11,092,953 | 06/19/2012 00:38:02 | 638,321 | 02/03/2011 18:20:47 | 164 | 9 | Unnamed href link wrapped in two containers | I am trying to change the link of a basic <a>. It has no id. It is located in a header.aspx file that I cannot access directly. It is also the first grandchild element of a div with the id "SiteMenu". From that div I would like to use the following script. (I can put script refs in the footer and upload to the Theme dir):
`<script type="text/javascript">`
`document.getElementById("SiteMenu").childNodes[0].childNodes[0].href = "/search.aspx?keyword='+'&page=1";`
also tried:
`document.getElementById("SiteMenu").firstChild.childNodes[0].href = "/search.aspx?keyword='+'&page=1";`
`</script>`
The basic structure of the HTML is:
<div id="SiteMap">
<p>
<a href="/home.aspx">Home</a>
</p>
</div>
I'm no JS pro. From some things I read before posting here, it seems like childNodes.childNodes is an invalid way to search through node levels in JS (or the DOM?).
Is there some other way to manipulate the href of my <a> tag? | javascript | html | dom | null | null | null | open | Unnamed href link wrapped in two containers
===
I am trying to change the link of a basic <a>. It has no id. It is located in a header.aspx file that I cannot access directly. It is also the first grandchild element of a div with the id "SiteMenu". From that div I would like to use the following script. (I can put script refs in the footer and upload to the Theme dir):
`<script type="text/javascript">`
`document.getElementById("SiteMenu").childNodes[0].childNodes[0].href = "/search.aspx?keyword='+'&page=1";`
also tried:
`document.getElementById("SiteMenu").firstChild.childNodes[0].href = "/search.aspx?keyword='+'&page=1";`
`</script>`
The basic structure of the HTML is:
<div id="SiteMap">
<p>
<a href="/home.aspx">Home</a>
</p>
</div>
I'm no JS pro. From some things I read before posting here, it seems like childNodes.childNodes is an invalid way to search through node levels in JS (or the DOM?).
Is there some other way to manipulate the href of my <a> tag? | 0 |
8,801,341 | 01/10/2012 09:56:35 | 728,863 | 04/28/2011 08:21:45 | 801 | 45 | Whats wrong with if statement in shell script | Here is my statements:
print "Ss $# $2" >&3
if [ $# -eq 4 || $# -eq 3 ] && [ $2 != "d" ]
then
print "sss"
else
print "lol"
fi
The output is:
Ss 4 s
lol
Why is "sss" not being displayed? | shell | unix | null | null | null | null | open | Whats wrong with if statement in shell script
===
Here is my statements:
print "Ss $# $2" >&3
if [ $# -eq 4 || $# -eq 3 ] && [ $2 != "d" ]
then
print "sss"
else
print "lol"
fi
The output is:
Ss 4 s
lol
Why is "sss" not being displayed? | 0 |
3,712,826 | 09/14/2010 20:53:31 | 447,775 | 09/14/2010 20:45:48 | 1 | 0 | PHP based version control? | I wonder is there any PHP based version control like on .NET version. I found that on .NET there some of version control web based, like SourceGear Vault, Sublime, etc. Now I wonder is there any version control like that which based on PHP and MySQL. I've try to explore SourceGear Vault and found that even it use installer but it totally web based. The installer give setup on IIS, create .NET application on IIS, setup master database and source database. Vault connecting with webservice for versioning the file (it not use special protocol like SVN, etc.)
I've try to use Redmine which I don't know it a SVN server type or only SVN repository browser. But then I came a problem with it, I have shared hosting which capable of Ruby Rails, but Ruby Rails likely use latest version which not supported by Redmine. | php | svn | based | null | null | 09/14/2010 21:37:33 | off topic | PHP based version control?
===
I wonder is there any PHP based version control like on .NET version. I found that on .NET there some of version control web based, like SourceGear Vault, Sublime, etc. Now I wonder is there any version control like that which based on PHP and MySQL. I've try to explore SourceGear Vault and found that even it use installer but it totally web based. The installer give setup on IIS, create .NET application on IIS, setup master database and source database. Vault connecting with webservice for versioning the file (it not use special protocol like SVN, etc.)
I've try to use Redmine which I don't know it a SVN server type or only SVN repository browser. But then I came a problem with it, I have shared hosting which capable of Ruby Rails, but Ruby Rails likely use latest version which not supported by Redmine. | 2 |
875,148 | 05/17/2009 18:23:00 | 84,478 | 03/30/2009 06:51:36 | 87 | 0 | problems using the -ansi switch in MinGW 5.1.4 | I was reading about the flags used in gcc, and read a reccommendation to use `gcc -ansi -pedantic -Wall file1 [file2 [file3...]] -o output`. For the quality of my code's sake, to keep it standard, and get all the warnings about it.
Well, about compiling with -ansi...
If I include <stdlib.h>, gcc gives me this error:
`In file included from ansi.c:2:
C:/c/bin/../lib/gcc/mingw32/3.4.5/../../../../include/stdlib.h:317: error: syntax error before "double"`
That line in <stdlib.h> is this:
inline double __cdecl __MINGW_NOTHROW strtod (const char* __restrict__ __nptr, char** __restrict__ __endptr)
{ return __strtod(__nptr, __endptr); }
does `inline` not exist in C? Shouldn't a "standard" header be standard ansi? Should I just remove the inline or avoid compiling with stdlib.h (I can't really remember what's in stdlib right now)? | c | header | ansi | mingw | gcc | null | open | problems using the -ansi switch in MinGW 5.1.4
===
I was reading about the flags used in gcc, and read a reccommendation to use `gcc -ansi -pedantic -Wall file1 [file2 [file3...]] -o output`. For the quality of my code's sake, to keep it standard, and get all the warnings about it.
Well, about compiling with -ansi...
If I include <stdlib.h>, gcc gives me this error:
`In file included from ansi.c:2:
C:/c/bin/../lib/gcc/mingw32/3.4.5/../../../../include/stdlib.h:317: error: syntax error before "double"`
That line in <stdlib.h> is this:
inline double __cdecl __MINGW_NOTHROW strtod (const char* __restrict__ __nptr, char** __restrict__ __endptr)
{ return __strtod(__nptr, __endptr); }
does `inline` not exist in C? Shouldn't a "standard" header be standard ansi? Should I just remove the inline or avoid compiling with stdlib.h (I can't really remember what's in stdlib right now)? | 0 |
10,426,266 | 05/03/2012 06:32:40 | 1,339,876 | 04/17/2012 21:56:18 | 1 | 1 | ios colored loading bar | I am currently working on an app for iphone and I like to implement custom stuff in my apps. I was wondering how would I go about to implement a loading bar that changes it's colors randomly an appears only when something is loading. also, when you pull-to-refresh the bar "charges" it's colors based on how much you have pulled. if you have pulled all the way then it goes into loading mode.while loading, the bar the colors get dim and bright in a random way. the position of the colors don't change but they have different levels of brightness. I'm not able to post pictures but if my description is hard to understand please check such apps as Colors for facebook or Amen. Suggestions on this will be much appreciated. Thanks | ios | loading | custom-component | null | null | 05/03/2012 17:48:14 | not a real question | ios colored loading bar
===
I am currently working on an app for iphone and I like to implement custom stuff in my apps. I was wondering how would I go about to implement a loading bar that changes it's colors randomly an appears only when something is loading. also, when you pull-to-refresh the bar "charges" it's colors based on how much you have pulled. if you have pulled all the way then it goes into loading mode.while loading, the bar the colors get dim and bright in a random way. the position of the colors don't change but they have different levels of brightness. I'm not able to post pictures but if my description is hard to understand please check such apps as Colors for facebook or Amen. Suggestions on this will be much appreciated. Thanks | 1 |
7,882,966 | 10/24/2011 23:01:49 | 985,179 | 10/08/2011 08:32:52 | 14 | 0 | Substitute Array Elements with Hash Values | I am trying to code a Perl Script which will take the date in Pattern, October 24, 2011 and convert this to 10,24,2011.
In order to do this I have prepared a Hash which will have the Month Name as a Key and a Numerical value representing Month's position as a Value.
I will read the input string, use a regular expression to extract the month name from above format.
Replace this month name with a value which corresponds to the month as a key.
Here's the script I have coded so far, but it's not working for me.
@dates array will have every element in this format -> October 24, 2011.
%days=("January",01,"February",02,"March",03,"April",04,"May",05,"June",06,"July",07,"August",08,"September",09,"October",10,"November",11,"December",12);
@output = map{
$pattern=$_;
$pattern =~ s/(.*)\s/$days{$1};
} @dates;
foreach $output (@output)
{
print $output."\n";
}
Here's a little explanation of what I am trying to do with this code.
@output will have the new formatted array with the Month Name replaced by the corresponding Numerical representing it as defined in the Hash.
map function is used to transform the elements of the array on the fly.
a sequence of characters followed by space is the regular expression used to extract the Month Name from pattern, October 24, 2011.
This will be referenced by $1.
I look up the corresponding value for $1 in the hash using, $days{$1} | perl | date | hash | map | null | null | open | Substitute Array Elements with Hash Values
===
I am trying to code a Perl Script which will take the date in Pattern, October 24, 2011 and convert this to 10,24,2011.
In order to do this I have prepared a Hash which will have the Month Name as a Key and a Numerical value representing Month's position as a Value.
I will read the input string, use a regular expression to extract the month name from above format.
Replace this month name with a value which corresponds to the month as a key.
Here's the script I have coded so far, but it's not working for me.
@dates array will have every element in this format -> October 24, 2011.
%days=("January",01,"February",02,"March",03,"April",04,"May",05,"June",06,"July",07,"August",08,"September",09,"October",10,"November",11,"December",12);
@output = map{
$pattern=$_;
$pattern =~ s/(.*)\s/$days{$1};
} @dates;
foreach $output (@output)
{
print $output."\n";
}
Here's a little explanation of what I am trying to do with this code.
@output will have the new formatted array with the Month Name replaced by the corresponding Numerical representing it as defined in the Hash.
map function is used to transform the elements of the array on the fly.
a sequence of characters followed by space is the regular expression used to extract the Month Name from pattern, October 24, 2011.
This will be referenced by $1.
I look up the corresponding value for $1 in the hash using, $days{$1} | 0 |
8,834,141 | 01/12/2012 11:14:03 | 1,037,786 | 11/09/2011 13:50:31 | 19 | 1 | How to add images to scrollView with Imageview and the description of those images for iphone using Mono Touch? | I need to add (few) collection of images which are coming from server and also attach respective description of images to a label.These all things has to done with Scroll View because i need to scroll those images and while scrolling the images ,images have to change i done this but respective description also have to change.I am getting little confusion with this for Iphone using mono Touch.
Thank you in advance.
| iphone | monotouch | null | null | null | 01/12/2012 17:38:22 | not a real question | How to add images to scrollView with Imageview and the description of those images for iphone using Mono Touch?
===
I need to add (few) collection of images which are coming from server and also attach respective description of images to a label.These all things has to done with Scroll View because i need to scroll those images and while scrolling the images ,images have to change i done this but respective description also have to change.I am getting little confusion with this for Iphone using mono Touch.
Thank you in advance.
| 1 |
5,309,143 | 03/15/2011 08:28:38 | 614,089 | 02/12/2011 09:13:47 | 24 | 1 | how to find the expired date in php | hi i need to find whether the given date is passed or future.
$elapsedTime = new DateTime('2011-03-15 00:20:00');
$elapsedInt = $elapsedTime->diff( new DateTime() );
echo ( $elapsedInt->invert ? 'Future' : 'Past' ) . "<br/>";
i tried this code but i am getting error because my php version was 5,2.And i cant update.
can any one help me ?
| php | null | null | null | null | null | open | how to find the expired date in php
===
hi i need to find whether the given date is passed or future.
$elapsedTime = new DateTime('2011-03-15 00:20:00');
$elapsedInt = $elapsedTime->diff( new DateTime() );
echo ( $elapsedInt->invert ? 'Future' : 'Past' ) . "<br/>";
i tried this code but i am getting error because my php version was 5,2.And i cant update.
can any one help me ?
| 0 |
6,196,325 | 06/01/2011 04:35:49 | 191,997 | 10/18/2009 12:36:17 | 3,343 | 168 | What is the benefit of using sharp architecture? | I'm working in a project that use nhibernate as orm. Is there any benefit for me to use sharp architecture? what is these benefits? | c# | nhibernate | orm | sharp-architecture | null | 06/01/2011 04:52:26 | off topic | What is the benefit of using sharp architecture?
===
I'm working in a project that use nhibernate as orm. Is there any benefit for me to use sharp architecture? what is these benefits? | 2 |
9,317,450 | 02/16/2012 19:05:24 | 1,197,692 | 02/08/2012 16:30:28 | 11 | 1 | JQuery serialize of form not firing in IE | I am having a problem with a form that is inside of a jquery dialog not posting in IE.
It works fine in chrome and FF, sending data to my MVC controller, but send null values from IE.
I did get it to work one way though by calling an alert to display the serialize result. That causes the form to serialize correctly and the send values to the server.
$("<div id='formModal'><img src='../../Content/images/ajax-loader.gif' /></div>")
.addClass("dialog")
.attr("id", $(this).attr("data-dialog-id"))
.appendTo("body")
.dialog({
width: 800,
position: [300, 50],
title: $(this).attr("data-dialog-title"),
close: function () { $(this).dialog('destroy').remove(); window.location.reload(true); },
modal: true,
buttons: {
"Save": function () {
var formdata = $("#timeForm").serialize();
$.post("/TimeTracker/AddTime",
$("#timeForm").serialize());
alert(formdata);
$(this).dialog("close");
$(this).dialog("destroy");
window.location.reload(true);
return false;
},
Cancel: function () {
$(this).dialog("close");
$(this).dialog("destroy");
}
}
})
.load(this.href);
Once I remove the alert, the form no longer has serialized values.
Is this an error in my JQuery scripting? Or something else? | jquery | mvc | internet-explorer | null | null | null | open | JQuery serialize of form not firing in IE
===
I am having a problem with a form that is inside of a jquery dialog not posting in IE.
It works fine in chrome and FF, sending data to my MVC controller, but send null values from IE.
I did get it to work one way though by calling an alert to display the serialize result. That causes the form to serialize correctly and the send values to the server.
$("<div id='formModal'><img src='../../Content/images/ajax-loader.gif' /></div>")
.addClass("dialog")
.attr("id", $(this).attr("data-dialog-id"))
.appendTo("body")
.dialog({
width: 800,
position: [300, 50],
title: $(this).attr("data-dialog-title"),
close: function () { $(this).dialog('destroy').remove(); window.location.reload(true); },
modal: true,
buttons: {
"Save": function () {
var formdata = $("#timeForm").serialize();
$.post("/TimeTracker/AddTime",
$("#timeForm").serialize());
alert(formdata);
$(this).dialog("close");
$(this).dialog("destroy");
window.location.reload(true);
return false;
},
Cancel: function () {
$(this).dialog("close");
$(this).dialog("destroy");
}
}
})
.load(this.href);
Once I remove the alert, the form no longer has serialized values.
Is this an error in my JQuery scripting? Or something else? | 0 |
3,276,235 | 07/18/2010 16:08:22 | 388,056 | 07/09/2010 19:13:42 | 23 | 2 | relation between access specifiers and using initializer lists for POD types in c++0x. | take two following classes:
class Test1{
public:
Test1(char in1,char in2):char1(in1),char2(in2){}
char char1;
char char2;
};
class Test2{
public:
Test1(char in1,char in2):char1(in1),char2(in2){}
private:
char char1;
char char2;
};
I know in c++0x both of these classes are considered as POD types and we can initialize objects of them using initializer lists as below:
Test1 obj1={'a','b'};//valid in c++0x
Test2 obj2={'a','b'};//valid in c++0x
But I wonder what the technical reason is that when we have different access specifiers in a class like below, it's not possible to use initializer list for initializing objects of that class and that class is not considered as a POD type ?
class Test{
public:
Test1(char in1,char in2):char1(in1),char2(in2){}
char char1;
private:
char char2;
};
Test obj={'a','b'};//invalid in c++0x | c++ | initialization | c++0x | initializer-list | null | null | open | relation between access specifiers and using initializer lists for POD types in c++0x.
===
take two following classes:
class Test1{
public:
Test1(char in1,char in2):char1(in1),char2(in2){}
char char1;
char char2;
};
class Test2{
public:
Test1(char in1,char in2):char1(in1),char2(in2){}
private:
char char1;
char char2;
};
I know in c++0x both of these classes are considered as POD types and we can initialize objects of them using initializer lists as below:
Test1 obj1={'a','b'};//valid in c++0x
Test2 obj2={'a','b'};//valid in c++0x
But I wonder what the technical reason is that when we have different access specifiers in a class like below, it's not possible to use initializer list for initializing objects of that class and that class is not considered as a POD type ?
class Test{
public:
Test1(char in1,char in2):char1(in1),char2(in2){}
char char1;
private:
char char2;
};
Test obj={'a','b'};//invalid in c++0x | 0 |
10,277,478 | 04/23/2012 08:53:54 | 1,350,865 | 04/23/2012 08:45:35 | 1 | 0 | How to make street-view kind thing of my local place for my website | I wanted to put 'street-view' of my local place on my website. I dont know how it will be done. What I imagine is thist- I should have a panormic camera which take pictures regularly as I move along the roads as well as save the GPS cordinates of the points from where each picture is taken. Now I should have a software which automatically generates a street view by taking these pictures as input. Is this the way it will do or its done some other way. Anyway pls tell me how it will be done. | java | null | null | null | null | 04/23/2012 11:57:43 | not a real question | How to make street-view kind thing of my local place for my website
===
I wanted to put 'street-view' of my local place on my website. I dont know how it will be done. What I imagine is thist- I should have a panormic camera which take pictures regularly as I move along the roads as well as save the GPS cordinates of the points from where each picture is taken. Now I should have a software which automatically generates a street view by taking these pictures as input. Is this the way it will do or its done some other way. Anyway pls tell me how it will be done. | 1 |
3,648,952 | 09/06/2010 04:11:57 | 430,416 | 08/25/2010 07:54:40 | 88 | 6 | Is there an alternative to Auth / Acl component for CakePHP? | It's just too complicated to use. | authentication | cakephp | null | null | null | null | open | Is there an alternative to Auth / Acl component for CakePHP?
===
It's just too complicated to use. | 0 |
5,740,279 | 04/21/2011 06:15:33 | 718,386 | 04/21/2011 06:15:33 | 1 | 0 | web framework and scalability | I would to know if the choice of a web framework (ruby on rails, django,...) impacts in the performance (number of handling connection and resource usage) of the web application ?
If the answer is yes, is there a framework that scale better among other? | frameworks | resources | scalability | usage | null | 04/21/2011 06:24:39 | not constructive | web framework and scalability
===
I would to know if the choice of a web framework (ruby on rails, django,...) impacts in the performance (number of handling connection and resource usage) of the web application ?
If the answer is yes, is there a framework that scale better among other? | 4 |
309,819 | 11/21/2008 19:05:15 | 5,291 | 09/08/2008 21:37:17 | 1,355 | 22 | CSS Conventions / Code Layout Models | Has there been any attempt and creating a formalized method for organizing CSS code? Before I go and make up my own strategy for keeping things readable, I'm wondering what else is out there. Goggle hasn't been very helpful, as I'm not entirely sure what terms to search for.
I'm thinking more along the lines of indenting/spacing, when to use new lines, naming conventions, etc.
Any ideas? | css | coding-style | conventions | null | null | 05/17/2012 15:12:44 | not constructive | CSS Conventions / Code Layout Models
===
Has there been any attempt and creating a formalized method for organizing CSS code? Before I go and make up my own strategy for keeping things readable, I'm wondering what else is out there. Goggle hasn't been very helpful, as I'm not entirely sure what terms to search for.
I'm thinking more along the lines of indenting/spacing, when to use new lines, naming conventions, etc.
Any ideas? | 4 |
9,189,980 | 02/08/2012 08:39:21 | 843,653 | 07/13/2011 23:11:23 | 18 | 0 | how to create a secured mysql server only for data processing | I wanna create a secured server (mysql server) only for data processing.
for example:
client passes in a xml file from HTTP POST, and the server receive it and parse the xml, then store data into database. or the client make HTTP request, and server calculate the result, and return a xml to the client.
thanks | data | processing | null | null | null | null | open | how to create a secured mysql server only for data processing
===
I wanna create a secured server (mysql server) only for data processing.
for example:
client passes in a xml file from HTTP POST, and the server receive it and parse the xml, then store data into database. or the client make HTTP request, and server calculate the result, and return a xml to the client.
thanks | 0 |
7,749,560 | 10/13/2011 04:45:41 | 92,678 | 04/19/2009 05:19:09 | 1 | 0 | How can I find the max attribute across records in ruby? | I have several records with several attributes (A, B, C, D).
I want to be able to find which record has the higher value for a given attribute, such as D.
How do I do that?
| ruby | max | min | null | null | null | open | How can I find the max attribute across records in ruby?
===
I have several records with several attributes (A, B, C, D).
I want to be able to find which record has the higher value for a given attribute, such as D.
How do I do that?
| 0 |
11,616,720 | 07/23/2012 16:37:33 | 1,177,983 | 01/30/2012 11:49:49 | 1 | 0 | how to run ssh on embedded linux | I want to run ssh on qtopia (on my friendlyarm), my own distribution is ubuntu, so I cannot copy and paste the ssh binary file into the device
If I can copy and paste a binary file, where can I access, If I must compile the ssh, how is it possible in my ubuntu?? | embedded-linux | null | null | null | null | 07/24/2012 00:21:05 | off topic | how to run ssh on embedded linux
===
I want to run ssh on qtopia (on my friendlyarm), my own distribution is ubuntu, so I cannot copy and paste the ssh binary file into the device
If I can copy and paste a binary file, where can I access, If I must compile the ssh, how is it possible in my ubuntu?? | 2 |
11,670,293 | 07/26/2012 13:23:41 | 1,284,186 | 03/21/2012 18:22:04 | 52 | 0 | Replace only whole word, not substrings with PHP | my problem is for example: I have the words "brasil" and "brasil-carinhoso", I want to replace only "brasil" to nothing, so if I have this list: "pac pac pac brasil brasil-carinhoso pac brasil", if I try to use this:
//$_GET['exclusion_tags'] is 'brazil'
//$tags_maior is the string: "pac pac pac brasil brasil-carinhoso pac brasil"
$tags_maior = preg_replace('/\b'.$_GET['exclusion_tags'].'\b/u', "", $tags_maior);
When I use str_replace or preg_replace like this I get "pac pac pac -carinhoso pac" and I need to get "pac pac pac brasil-carinhoso pac"
Thanks in advance
| php | null | null | null | null | 07/26/2012 20:46:55 | not a real question | Replace only whole word, not substrings with PHP
===
my problem is for example: I have the words "brasil" and "brasil-carinhoso", I want to replace only "brasil" to nothing, so if I have this list: "pac pac pac brasil brasil-carinhoso pac brasil", if I try to use this:
//$_GET['exclusion_tags'] is 'brazil'
//$tags_maior is the string: "pac pac pac brasil brasil-carinhoso pac brasil"
$tags_maior = preg_replace('/\b'.$_GET['exclusion_tags'].'\b/u', "", $tags_maior);
When I use str_replace or preg_replace like this I get "pac pac pac -carinhoso pac" and I need to get "pac pac pac brasil-carinhoso pac"
Thanks in advance
| 1 |
1,825,892 | 12/01/2009 12:27:21 | 176,434 | 09/21/2009 07:23:43 | 36 | 2 | Best json parser for qt? | I'm using QT for Symbian and need a simple json parser. I need to be able to go from json to Qt-variant and the other way around. Is there a simple json parser that I can use? I don't want to write my own. What is the best way to go?
Thanks! | qt | json | parsing | null | null | 09/12/2011 11:53:58 | not constructive | Best json parser for qt?
===
I'm using QT for Symbian and need a simple json parser. I need to be able to go from json to Qt-variant and the other way around. Is there a simple json parser that I can use? I don't want to write my own. What is the best way to go?
Thanks! | 4 |
4,050,222 | 10/29/2010 08:31:18 | 203,262 | 11/05/2009 08:22:24 | 2,475 | 39 | What are the conceptual changes that came from C to .net | 5-6 years ago when i was in school, I had C as my programming language. And at that time, I read about struct and little bit about Classes.
At that time I had a concept that under struct we cannot declare functions and other such things.
Structure only allows value types and themself are also value types. And I was living under that same old age concepts.
3 days earlier when I had some conversation with my collegues they proved that struct can also contain function definations, constuctors any many more things against my thinking of
public struct abc
{
int a;
long b;
.... //No function nothing else can come here. Only variables
};
But in .net I saw DateTime Struct and it had functions constructors and everything against my years old concepts.
Then what makes difference between `classes and struct` if every thing can be done in struct.
I am sure there would be some big differences, due to which struct are still coming with .net rather than obsoleting it.
What are those differences.
And what other such concepts could a one have that changed everything.
| .net | programming-languages | concepts | null | null | 10/31/2010 04:45:43 | not a real question | What are the conceptual changes that came from C to .net
===
5-6 years ago when i was in school, I had C as my programming language. And at that time, I read about struct and little bit about Classes.
At that time I had a concept that under struct we cannot declare functions and other such things.
Structure only allows value types and themself are also value types. And I was living under that same old age concepts.
3 days earlier when I had some conversation with my collegues they proved that struct can also contain function definations, constuctors any many more things against my thinking of
public struct abc
{
int a;
long b;
.... //No function nothing else can come here. Only variables
};
But in .net I saw DateTime Struct and it had functions constructors and everything against my years old concepts.
Then what makes difference between `classes and struct` if every thing can be done in struct.
I am sure there would be some big differences, due to which struct are still coming with .net rather than obsoleting it.
What are those differences.
And what other such concepts could a one have that changed everything.
| 1 |
5,238,251 | 03/08/2011 20:59:46 | 179,609 | 09/26/2009 22:36:14 | 60 | 3 | Deleting buffer from vim session | Am I not deleting buffers properly before saving my session? It seems to glom onto every buffer I've had opened. I use gvim with the standard `:tabe` and `:tabnew` commands.
1. Clean start of gvim
1. I open a number of tabs with `:tabe`, do some work
7. `:mksession! ~/session` to save my session state
5. Don't need buffer #14, `:14bd`
1. `:ls` confirms #14 was deleted
2. `:mksession! ~/session` to save session again
4. Done work for the day, `:qa`
1. Load up gvim the next day, `:so ~/session`
1. Buffer 14 still exists!!
3. ???
1. NO PROFIT
| windows | vim | null | null | null | null | open | Deleting buffer from vim session
===
Am I not deleting buffers properly before saving my session? It seems to glom onto every buffer I've had opened. I use gvim with the standard `:tabe` and `:tabnew` commands.
1. Clean start of gvim
1. I open a number of tabs with `:tabe`, do some work
7. `:mksession! ~/session` to save my session state
5. Don't need buffer #14, `:14bd`
1. `:ls` confirms #14 was deleted
2. `:mksession! ~/session` to save session again
4. Done work for the day, `:qa`
1. Load up gvim the next day, `:so ~/session`
1. Buffer 14 still exists!!
3. ???
1. NO PROFIT
| 0 |
9,087,292 | 01/31/2012 21:34:54 | 1,181,397 | 01/31/2012 21:25:50 | 1 | 0 | ASP.NET nullexception error | ASP.NET w/ C#
I'm collecting data from 5 textboxes.
After data is input, a submit button is clicked to send the data to be displayed on another form, and hopefully save it to a database.
Upon clicking 'submit'
I get NullReferenceException was unhandled by user code
this is highlighted in that form's code behind...
if (clsDataLayer.SavePersonnel(Server.MapPath("PayrollSystem_DB.mdb"),
Session["FirstName"].ToString,
Session["LastName"].ToString,
Session["PayRate"].ToString,
Session["StartDate"].ToString,
Session["EndDate"].ToString()))
any ideas? I'm not very experienced. Thanks in advance!!
| asp.net | null | null | null | null | null | open | ASP.NET nullexception error
===
ASP.NET w/ C#
I'm collecting data from 5 textboxes.
After data is input, a submit button is clicked to send the data to be displayed on another form, and hopefully save it to a database.
Upon clicking 'submit'
I get NullReferenceException was unhandled by user code
this is highlighted in that form's code behind...
if (clsDataLayer.SavePersonnel(Server.MapPath("PayrollSystem_DB.mdb"),
Session["FirstName"].ToString,
Session["LastName"].ToString,
Session["PayRate"].ToString,
Session["StartDate"].ToString,
Session["EndDate"].ToString()))
any ideas? I'm not very experienced. Thanks in advance!!
| 0 |
5,414,743 | 03/24/2011 04:26:17 | 402,610 | 07/26/2010 18:23:17 | 136 | 4 | Connecting EFTPOS machine to POS Java | We are trying to link the EFTPOS Machines at our stores to the POS, so as
staff do not have to enter the sale amount manually in the EFTPOS machine,
but is done automatically through the POS sale amount. Does anyone know a
way in which this can be done? Any help would be appreciated.
The EFTPOS machine providers gave a client software which communicates using TCP/IP. All i need to do is establish a connection to the tat port and send messages. But i am not sure how to do that ? If anyone has done this before throw some light on it plz.. | java | tcp | null | null | null | 03/24/2011 13:31:31 | off topic | Connecting EFTPOS machine to POS Java
===
We are trying to link the EFTPOS Machines at our stores to the POS, so as
staff do not have to enter the sale amount manually in the EFTPOS machine,
but is done automatically through the POS sale amount. Does anyone know a
way in which this can be done? Any help would be appreciated.
The EFTPOS machine providers gave a client software which communicates using TCP/IP. All i need to do is establish a connection to the tat port and send messages. But i am not sure how to do that ? If anyone has done this before throw some light on it plz.. | 2 |
4,757,675 | 01/21/2011 10:26:08 | 645,232 | 01/21/2011 10:22:19 | 1 | 0 | portlet (JSF) with ajax - Websphere Portal 7, RAD 8 | I want created a portlet (JSF) with ajax but doesn't render.
The example I tried this example of IBM http://www.ibm.com/developerworks/rational/library/06/1205_kats_rad2/, but not run in WebSphere Portal only in WAS. (New Dynamic Web Project)
I search in many forums, and solution is change "Classloader mode" from "PARENT_FIRST" to "PARENT_LAST", i cant find this Classloader in project file, I tried change in server but a wasn't work.
Please give me a simple example who I created a portlet JSF with AJAX or who change Classloader mode to resolve this problem.
Greetings, João Sousa | ajax | jsf | websphere | portlet | portal | null | open | portlet (JSF) with ajax - Websphere Portal 7, RAD 8
===
I want created a portlet (JSF) with ajax but doesn't render.
The example I tried this example of IBM http://www.ibm.com/developerworks/rational/library/06/1205_kats_rad2/, but not run in WebSphere Portal only in WAS. (New Dynamic Web Project)
I search in many forums, and solution is change "Classloader mode" from "PARENT_FIRST" to "PARENT_LAST", i cant find this Classloader in project file, I tried change in server but a wasn't work.
Please give me a simple example who I created a portlet JSF with AJAX or who change Classloader mode to resolve this problem.
Greetings, João Sousa | 0 |
3,674,341 | 09/09/2010 06:42:26 | 1,427,536 | 03/09/2010 10:03:02 | 288 | 0 | ok so JQuery is cool and all but is it really wise to use it in your project ? | I am new to web development..learning asp.net..used some JQuery script so just wondering if it causes some performance issues or anything like that..Is it ok rather safe to use it ?
| asp.net | jquery | null | null | null | 09/09/2010 07:24:12 | not constructive | ok so JQuery is cool and all but is it really wise to use it in your project ?
===
I am new to web development..learning asp.net..used some JQuery script so just wondering if it causes some performance issues or anything like that..Is it ok rather safe to use it ?
| 4 |
9,859,904 | 03/25/2012 11:52:17 | 445,114 | 09/11/2010 14:05:11 | 304 | 17 | NVIDIA GTX 570 vs. 590 for Matlab | I'm considering buying a GPU to accelerate my Matlab code performance.
My final choices are GTX 570 or GTX 590.
Is the GTX 590 performance (for computing, not games) worth the extra cost?
My main use will be for optimization problems (gradient descent, etc.).
Thanks. | performance | matlab | gpu | null | null | 03/25/2012 12:27:37 | not constructive | NVIDIA GTX 570 vs. 590 for Matlab
===
I'm considering buying a GPU to accelerate my Matlab code performance.
My final choices are GTX 570 or GTX 590.
Is the GTX 590 performance (for computing, not games) worth the extra cost?
My main use will be for optimization problems (gradient descent, etc.).
Thanks. | 4 |
8,530,173 | 12/16/2011 05:27:53 | 880,413 | 08/05/2011 10:59:15 | 314 | 1 | HTML Select + limit number of options visible | ![enter image description here][1]
[1]: http://i.stack.imgur.com/LYm09.png
I have the select shown in the graphic for a Join Day.
It shows 20 visible days and has 21 to 31 not visible but you can scroll down to them.
Because of the layout of the page the select goes up instead of down - looks strange.
With this in mind can I limit the number of visible select options to say 10?
Eg: show 01 to 10 and have 11 to 31 hidden but available for selection.
can this be done?
thx
| html | select | null | null | null | null | open | HTML Select + limit number of options visible
===
![enter image description here][1]
[1]: http://i.stack.imgur.com/LYm09.png
I have the select shown in the graphic for a Join Day.
It shows 20 visible days and has 21 to 31 not visible but you can scroll down to them.
Because of the layout of the page the select goes up instead of down - looks strange.
With this in mind can I limit the number of visible select options to say 10?
Eg: show 01 to 10 and have 11 to 31 hidden but available for selection.
can this be done?
thx
| 0 |
7,942,645 | 10/30/2011 00:51:43 | 1,020,270 | 10/30/2011 00:10:52 | 1 | 0 | The guessing game program in python | here is the guessing game problem and i am stuck and could not get the answer.
So where a user has 5 tries to guess a number generated by the program. The program needs
to quit when the user guessed the number correctly or exhausted the number of tries.
import random
num = random.randint(0, 99)
tries = 5
isGuessed = False
while not isGuessed and tries > 0:
tries = tries - 1
entry = input("Enter an integer greater than or equal to 0 and less than 100: ")
guess = int(entry)
if guess < num:
print("Your guess is lower than a number.")
print("You have %d guesses left" % tries)
if guess > num:
print("Your guess is higher than a number.")
print("You have %d guesses left" % tries)
if num == guess:
print("You got it!")
break
if tries < 1:
print("Sorry - you lost :(")
Please help me asap.
Thanks
| python | null | null | null | null | 10/30/2011 00:54:32 | not a real question | The guessing game program in python
===
here is the guessing game problem and i am stuck and could not get the answer.
So where a user has 5 tries to guess a number generated by the program. The program needs
to quit when the user guessed the number correctly or exhausted the number of tries.
import random
num = random.randint(0, 99)
tries = 5
isGuessed = False
while not isGuessed and tries > 0:
tries = tries - 1
entry = input("Enter an integer greater than or equal to 0 and less than 100: ")
guess = int(entry)
if guess < num:
print("Your guess is lower than a number.")
print("You have %d guesses left" % tries)
if guess > num:
print("Your guess is higher than a number.")
print("You have %d guesses left" % tries)
if num == guess:
print("You got it!")
break
if tries < 1:
print("Sorry - you lost :(")
Please help me asap.
Thanks
| 1 |
7,882,438 | 10/24/2011 21:52:03 | 1,011,730 | 10/24/2011 21:45:48 | 1 | 0 | Pass data from an Activity to a Class | i have problems with my game. I have an Main Activity that's shows a surfaceview where i draw my game. Now i want to pass data from my Main Activity to a Class but everytime i try this i got an Error and in the LogCat i see that the error happens on the line where i pass the data. here my Code
MainActivity:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.main);
}
public boolean onTouchEvent(MotionEvent event) {
currentX = event.getX();
currentY = event.getY();
if(event.getAction() == MotionEvent.ACTION_DOWN){
touchDisplay = true;
banka = new Banka(currentX, currentY, touchDisplay);
}
if(event.getAction() == MotionEvent.ACTION_UP){
touchDisplay = false;
banka = new Banka(currentX, currentY, touchDisplay);
}
return super.onTouchEvent(event);
}
Class that received the data:
public class Banka {
public GameView gameView;
public float currentX = 0;
public float currentY = 0;
public boolean touchDownTrue = false;
public Banka (float x, float y, boolean touch){
this.currentX = x;
this.currentY = y;
this.touchDownTrue = touch;
gameView.isReady();
} | java | android | activity | null | null | null | open | Pass data from an Activity to a Class
===
i have problems with my game. I have an Main Activity that's shows a surfaceview where i draw my game. Now i want to pass data from my Main Activity to a Class but everytime i try this i got an Error and in the LogCat i see that the error happens on the line where i pass the data. here my Code
MainActivity:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.main);
}
public boolean onTouchEvent(MotionEvent event) {
currentX = event.getX();
currentY = event.getY();
if(event.getAction() == MotionEvent.ACTION_DOWN){
touchDisplay = true;
banka = new Banka(currentX, currentY, touchDisplay);
}
if(event.getAction() == MotionEvent.ACTION_UP){
touchDisplay = false;
banka = new Banka(currentX, currentY, touchDisplay);
}
return super.onTouchEvent(event);
}
Class that received the data:
public class Banka {
public GameView gameView;
public float currentX = 0;
public float currentY = 0;
public boolean touchDownTrue = false;
public Banka (float x, float y, boolean touch){
this.currentX = x;
this.currentY = y;
this.touchDownTrue = touch;
gameView.isReady();
} | 0 |
6,016,503 | 05/16/2011 11:10:22 | 155,196 | 08/12/2009 16:08:13 | 888 | 30 | User Experience Design | I would like to learn about User Experience Designing.
Can someone suggest some books or course that i can go through to learn and ace Usability to a certain level. | books | usability | null | null | null | 05/16/2011 15:00:30 | off topic | User Experience Design
===
I would like to learn about User Experience Designing.
Can someone suggest some books or course that i can go through to learn and ace Usability to a certain level. | 2 |
9,781,689 | 03/20/2012 05:18:39 | 840,992 | 06/16/2010 14:38:24 | 90 | 24 | stop me before I reinvent the wheel (iOS > php > sql) | I have an iOS app in development where users can create and upload images. They can also view and rate images created by other users. (I know, dazzling functionality! ;-)
I've got the basics roughed out and functional, and can write the client side stuff to step through making the sql queries to get a list of the most recent *n* images, and then the next most recent, etc. but I'm thinking there must be some open source project for working with this sort of boilerplate db functionality.
In other words, I'm looking for the basic functionality of a "comment" type retrieval system that I can then hack/customize to suit my needs.
| php | mysql | ios | null | null | 03/20/2012 05:53:56 | not a real question | stop me before I reinvent the wheel (iOS > php > sql)
===
I have an iOS app in development where users can create and upload images. They can also view and rate images created by other users. (I know, dazzling functionality! ;-)
I've got the basics roughed out and functional, and can write the client side stuff to step through making the sql queries to get a list of the most recent *n* images, and then the next most recent, etc. but I'm thinking there must be some open source project for working with this sort of boilerplate db functionality.
In other words, I'm looking for the basic functionality of a "comment" type retrieval system that I can then hack/customize to suit my needs.
| 1 |
10,605,626 | 05/15/2012 17:09:34 | 1,396,708 | 05/15/2012 16:32:11 | 1 | 0 | Open source ZFS NAS - FreeNAS 8.0 vs OpenSolaris(w/ZFS) | I would like to setup a NAS for a small office network for use as backup and file archiving. Any thoughts on which is better:
Some background info: Planning on using an old dell PowerEdge 2300 server with SCSI backplane and Dell PERC Raid adapter.
1) FreeNAS 8.x with ZFS option
or
2) OpenSolaris x86 configured as a file server with hard drives formated with ZFS
Cheers! | nas | opensolaris | zfs | null | null | 06/18/2012 03:36:27 | off topic | Open source ZFS NAS - FreeNAS 8.0 vs OpenSolaris(w/ZFS)
===
I would like to setup a NAS for a small office network for use as backup and file archiving. Any thoughts on which is better:
Some background info: Planning on using an old dell PowerEdge 2300 server with SCSI backplane and Dell PERC Raid adapter.
1) FreeNAS 8.x with ZFS option
or
2) OpenSolaris x86 configured as a file server with hard drives formated with ZFS
Cheers! | 2 |
2,899,904 | 05/24/2010 20:02:58 | 304,532 | 03/29/2010 19:40:41 | 42 | 0 | How do IPC generate security holes | Please some explanations and examples on how Inter-process communications can generate security holes
Thank you in advance | ipc | null | null | null | null | 05/25/2010 09:38:08 | not a real question | How do IPC generate security holes
===
Please some explanations and examples on how Inter-process communications can generate security holes
Thank you in advance | 1 |
5,896,451 | 05/05/2011 10:46:31 | 536,041 | 08/12/2010 17:45:29 | 23 | 0 | writing if else conditions in htaccess file | I am trying to rewrite with htaccess need to use if else block or any other for rewriting following url:
for this url http://domain.kp/subdirecory/productname i am able to rewrite perfectly but when i am trying to rewrite for only http://domain.kp/subdirecory/ it rewrites with below given route parameter, but route parameter should be considered while we have a product name in url.
please help if anybody has come across this type of issue
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^([^?]*) index.php**?_route_=$1** [L,QSA]
| .htaccess | mod-rewrite | url-rewriting | apache2 | null | null | open | writing if else conditions in htaccess file
===
I am trying to rewrite with htaccess need to use if else block or any other for rewriting following url:
for this url http://domain.kp/subdirecory/productname i am able to rewrite perfectly but when i am trying to rewrite for only http://domain.kp/subdirecory/ it rewrites with below given route parameter, but route parameter should be considered while we have a product name in url.
please help if anybody has come across this type of issue
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^([^?]*) index.php**?_route_=$1** [L,QSA]
| 0 |
7,788,115 | 10/16/2011 23:37:53 | 610,380 | 02/09/2011 20:34:16 | 212 | 21 | Class inheritance: recreate base class items (or instance) from a property of the inherited class | - I have a class A that is inherited from B.
- A as some readonly properties that I want to modify from B
- Hiding those properties with new is not a suitable option, cause the base class has some functions that use its own properties...
- Can't use the override keyword, cause the properties are not marked as abstract, virtual nor override
So I'd like to know whether from the inherited class (B) I can totally recreate the actual instance of my object to access those readonly properties.
For example, for a class inheriting Tuple, if it was possible I would do something like this:
public new T3 Item3
{
get { return item3; }
set
{
item3 = value;
base = new Tuple<T1, T2, T3>(Item1, Item2, Item3); // Not valid
}
}
I can't see how to do this?
| c# | class | inheritance | properties | override | null | open | Class inheritance: recreate base class items (or instance) from a property of the inherited class
===
- I have a class A that is inherited from B.
- A as some readonly properties that I want to modify from B
- Hiding those properties with new is not a suitable option, cause the base class has some functions that use its own properties...
- Can't use the override keyword, cause the properties are not marked as abstract, virtual nor override
So I'd like to know whether from the inherited class (B) I can totally recreate the actual instance of my object to access those readonly properties.
For example, for a class inheriting Tuple, if it was possible I would do something like this:
public new T3 Item3
{
get { return item3; }
set
{
item3 = value;
base = new Tuple<T1, T2, T3>(Item1, Item2, Item3); // Not valid
}
}
I can't see how to do this?
| 0 |
11,166,198 | 06/23/2012 02:01:19 | 1,476,241 | 06/23/2012 01:54:14 | 1 | 0 | Java Source Code Analyzer Open-Source | I'm looking for Java Source Code Analyzer Open-Source tool in eclipse. Anybody know one? Thanks! | java | eclipse | source-code | code-analysis | null | 06/24/2012 13:21:08 | not constructive | Java Source Code Analyzer Open-Source
===
I'm looking for Java Source Code Analyzer Open-Source tool in eclipse. Anybody know one? Thanks! | 4 |
4,060,112 | 10/30/2010 18:32:13 | 239,527 | 12/28/2009 11:32:18 | 330 | 9 | Set the variables only once on Actionscript 3 game? | I'm trying to create a simple game. I've set up a layer "actionscript", where I put all the code in. Then I have a image, instance name is "player". Here's my code:
stage.addEventListener(KeyboardEvent.KEY_DOWN,KeyDown);
var power = 5;
var friction = 0.95;
var xspeed = 0;
var yspeed = 0;
function KeyDown(keyEvent:KeyboardEvent) {
if(keyEvent.keyCode==37) { //left
xspeed -= power;
}
if(keyEvent.keyCode==39) { //right
xspeed += power;
}
xspeed *= friction;
player.x += xspeed;
//trace(keyEvent.keyCode.toString());
}
Suddenly, the script resets `xspeed` (and `yspeed`) every time so the speed cannot go up or down. How to prevent this?
I'm trying my wings in Actionscript, so I would like to have some tips and help :)
Martti Laine | actionscript-3 | actionscript | null | null | null | null | open | Set the variables only once on Actionscript 3 game?
===
I'm trying to create a simple game. I've set up a layer "actionscript", where I put all the code in. Then I have a image, instance name is "player". Here's my code:
stage.addEventListener(KeyboardEvent.KEY_DOWN,KeyDown);
var power = 5;
var friction = 0.95;
var xspeed = 0;
var yspeed = 0;
function KeyDown(keyEvent:KeyboardEvent) {
if(keyEvent.keyCode==37) { //left
xspeed -= power;
}
if(keyEvent.keyCode==39) { //right
xspeed += power;
}
xspeed *= friction;
player.x += xspeed;
//trace(keyEvent.keyCode.toString());
}
Suddenly, the script resets `xspeed` (and `yspeed`) every time so the speed cannot go up or down. How to prevent this?
I'm trying my wings in Actionscript, so I would like to have some tips and help :)
Martti Laine | 0 |
9,495,284 | 02/29/2012 07:43:00 | 1,151,302 | 01/16/2012 06:09:02 | 1 | 0 | how to parse body of the message in android? | I want to parse "thank you for using your HDFC bank Credit card ending 1364 for rs.7195.00 in MUMBAI at CLEARTRIP TRAVEL SERVI on 2012-02-24:11:10:50." this message body how to do it in android. | android | null | null | null | null | 03/10/2012 17:49:23 | too localized | how to parse body of the message in android?
===
I want to parse "thank you for using your HDFC bank Credit card ending 1364 for rs.7195.00 in MUMBAI at CLEARTRIP TRAVEL SERVI on 2012-02-24:11:10:50." this message body how to do it in android. | 3 |
111,097 | 09/21/2008 14:07:24 | 17,759 | 09/18/2008 14:33:34 | 85 | 6 | Best solution to stop Kontiki's KHOST.EXE from loading automatically at start-up on Windows XP? | Essentially, whenever the **[40D][1]** application is run it sets up **khost.exe** to automatically start-up with Windows. This is annoying as it increases my boot up time by a couple of minutes and I don't even use the P2P aspect of 4OD anyway.
The registry keys that are set are:
Command: C:\Program Files\Kontiki\KHost.exe -all
Description: kdx
Location: HKU\S-1-5-21-1757981266-1960408961-839522115-1003\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
Name: kdx
Setting ID:
User: LAPTOP\Me
Command: "C:\Program Files\Kontiki\KHost.exe" -all
Description: 4oD
Location: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
Name: 4oD
Setting ID:
User: All Users
I'm assuming some kind of **start-up** or **shut-down** **script** to delete these registry keys would be the best solution, but I'm not that up with **.vbs** or **.bat** scripting or where I'd put them to automatically run at an appropriate time.
I know there is a **[TV On-Demand Monitor application][2]**, but I don't really need to be running yet another process, just to delete the registry keys.
[1]: http://www.channel4.com/4od/index.html
[2]: http://odmonitor.blogspot.com/ | windows | vbs | scripting | batch | registry | null | open | Best solution to stop Kontiki's KHOST.EXE from loading automatically at start-up on Windows XP?
===
Essentially, whenever the **[40D][1]** application is run it sets up **khost.exe** to automatically start-up with Windows. This is annoying as it increases my boot up time by a couple of minutes and I don't even use the P2P aspect of 4OD anyway.
The registry keys that are set are:
Command: C:\Program Files\Kontiki\KHost.exe -all
Description: kdx
Location: HKU\S-1-5-21-1757981266-1960408961-839522115-1003\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
Name: kdx
Setting ID:
User: LAPTOP\Me
Command: "C:\Program Files\Kontiki\KHost.exe" -all
Description: 4oD
Location: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
Name: 4oD
Setting ID:
User: All Users
I'm assuming some kind of **start-up** or **shut-down** **script** to delete these registry keys would be the best solution, but I'm not that up with **.vbs** or **.bat** scripting or where I'd put them to automatically run at an appropriate time.
I know there is a **[TV On-Demand Monitor application][2]**, but I don't really need to be running yet another process, just to delete the registry keys.
[1]: http://www.channel4.com/4od/index.html
[2]: http://odmonitor.blogspot.com/ | 0 |
5,397,275 | 03/22/2011 20:15:54 | 97,382 | 04/28/2009 21:36:53 | 45 | 2 | Missing semi-colon in JavaScript causing "'foo' is undefined" error in IE9 | I just spent about four hours tracking down this problem. I know what is causing it but don't know why and the "why" is bugging me.
I have the following .js file:
function funcA() {
}
function funcB() {
do {
} while (1 = 1) return 0
}
I also have the following HTML page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></title>
<script src="JScript1.js" type="text/javascript"></script>
</head>
<body>
<script type="text/javascript">
new funcA();
</script>
</body>
</html>
When I load the page in IE9 I get an error that "'funcA' is undefined." I can get rid of the run-time error by do **any one** of the following:
- Turning on Compatibility View in IE9
- Removing the DOCTYPE from the page
- Adding a semi-colon after the while and before the return in the JavaScript (i.e. while (1 = 1); return 0)
Can anyone help me understand what exactly is going on here? | javascript | internet-explorer-9 | null | null | null | null | open | Missing semi-colon in JavaScript causing "'foo' is undefined" error in IE9
===
I just spent about four hours tracking down this problem. I know what is causing it but don't know why and the "why" is bugging me.
I have the following .js file:
function funcA() {
}
function funcB() {
do {
} while (1 = 1) return 0
}
I also have the following HTML page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></title>
<script src="JScript1.js" type="text/javascript"></script>
</head>
<body>
<script type="text/javascript">
new funcA();
</script>
</body>
</html>
When I load the page in IE9 I get an error that "'funcA' is undefined." I can get rid of the run-time error by do **any one** of the following:
- Turning on Compatibility View in IE9
- Removing the DOCTYPE from the page
- Adding a semi-colon after the while and before the return in the JavaScript (i.e. while (1 = 1); return 0)
Can anyone help me understand what exactly is going on here? | 0 |
11,668,812 | 07/26/2012 11:59:03 | 1,554,488 | 07/26/2012 11:34:43 | 1 | 0 | How can I install a .exe program using Python | I am unable to install a .exe from python script | python | null | null | null | null | 07/26/2012 13:47:44 | not a real question | How can I install a .exe program using Python
===
I am unable to install a .exe from python script | 1 |
1,685,480 | 11/06/2009 04:51:54 | 72,721 | 03/02/2009 09:24:09 | 6 | 1 | Dashboard with re-arrangeable dashboard elements in Silverlight? | I need to create a dashboard with re-arrangeable/re-positionable dashboard elements (similar to iGoogle) using Silverlight. The dashboard elements are typically tables of data. The user should be able to dynamically add and remove dashboard elements. The user should also be able to use drag and drop to reposition the dashboard elements.
I've been looking around for Silverlight controls which I can reuse but haven't found any yet. Any ideas? Or do I have to roll my own? | silverlight-3.0 | usercontrols | dashboard | null | null | 02/04/2012 14:56:43 | not constructive | Dashboard with re-arrangeable dashboard elements in Silverlight?
===
I need to create a dashboard with re-arrangeable/re-positionable dashboard elements (similar to iGoogle) using Silverlight. The dashboard elements are typically tables of data. The user should be able to dynamically add and remove dashboard elements. The user should also be able to use drag and drop to reposition the dashboard elements.
I've been looking around for Silverlight controls which I can reuse but haven't found any yet. Any ideas? Or do I have to roll my own? | 4 |
8,810,052 | 01/10/2012 20:27:30 | 1,140,885 | 01/10/2012 13:05:44 | 35 | 0 | How to use Interface with VCL Classes - Part 2? | continue with my previous investigation regarding the use of Interface with VCL.
http://stackoverflow.com/questions/8804577/how-to-implement-identical-methods-with-2-and-more-classes
http://stackoverflow.com/questions/8805768/how-to-use-interface-with-vcl-classes
I would like to have a code example to demonstrate where and how the two work together.
Or what is the classic benefit/usage of the two:
ISomething = interface
['{EFE0308B-A85D-4DF3-889C-40FBC8FE84D0}']
...
end;
TSomeThing = class(TSomeVCLObject, ISomething)
...
end;
| delphi | delphi-7 | null | null | null | 01/12/2012 04:49:14 | not a real question | How to use Interface with VCL Classes - Part 2?
===
continue with my previous investigation regarding the use of Interface with VCL.
http://stackoverflow.com/questions/8804577/how-to-implement-identical-methods-with-2-and-more-classes
http://stackoverflow.com/questions/8805768/how-to-use-interface-with-vcl-classes
I would like to have a code example to demonstrate where and how the two work together.
Or what is the classic benefit/usage of the two:
ISomething = interface
['{EFE0308B-A85D-4DF3-889C-40FBC8FE84D0}']
...
end;
TSomeThing = class(TSomeVCLObject, ISomething)
...
end;
| 1 |
7,691,310 | 10/07/2011 18:21:53 | 926,064 | 09/02/2011 21:54:01 | 1 | 0 | Why itsn't "myObject ??= defaultValue;" possible in C#? | Why itsn't "myObject ??= defaultValue;" possible ?
Would be very nice ! | c# | null | null | null | null | 10/07/2011 18:24:55 | not a real question | Why itsn't "myObject ??= defaultValue;" possible in C#?
===
Why itsn't "myObject ??= defaultValue;" possible ?
Would be very nice ! | 1 |
11,480,322 | 07/14/2012 01:38:14 | 477,228 | 10/15/2010 17:23:17 | 1,024 | 19 | wireshark network topology | Does anyone know of a programme that can take a wireshark (pcap) trace and turn it into a visual network topology?
I have 3 pcap files with "ALOT" of data and I really want to see if I can make sense of some things.
I played with things like network miner but nothing that can give a visual cue to the data. For instance ![enter image description here][1]
[1]: http://i.stack.imgur.com/sYxFn.jpg | networking | trace | wireshark | pcap | topology | 07/16/2012 02:09:27 | off topic | wireshark network topology
===
Does anyone know of a programme that can take a wireshark (pcap) trace and turn it into a visual network topology?
I have 3 pcap files with "ALOT" of data and I really want to see if I can make sense of some things.
I played with things like network miner but nothing that can give a visual cue to the data. For instance ![enter image description here][1]
[1]: http://i.stack.imgur.com/sYxFn.jpg | 2 |
9,600,687 | 03/07/2012 11:33:24 | 1,233,618 | 02/26/2012 09:18:38 | 11 | 0 | Communicating between C++ and C#? | I want to use both C++ and C# in my application.
C# for GUI design and C++ for processing.
But I don't have any knowledge about this. How to communicate between them.
I don't know where I have to begin and research.
Someone can tell me the overview about this technology? And if someone have document about this topic, please give it to me.
I'm using Visual Studio 2010 for development.
Many thanks,
T&TGroup | c# | c++ | visual-studio | null | null | null | open | Communicating between C++ and C#?
===
I want to use both C++ and C# in my application.
C# for GUI design and C++ for processing.
But I don't have any knowledge about this. How to communicate between them.
I don't know where I have to begin and research.
Someone can tell me the overview about this technology? And if someone have document about this topic, please give it to me.
I'm using Visual Studio 2010 for development.
Many thanks,
T&TGroup | 0 |
8,786,169 | 01/09/2012 09:23:47 | 529,649 | 12/03/2010 17:00:01 | 1,156 | 65 | PHP: Would you wrap PDO or Extended it? | My question is fairly clear. and I really would like to hear some reasons for the answer.
Additional information:
- I don't use any kind of FW.
- Of course PHP > 5.3. | php | pdo | good-design | code-quality | null | 01/09/2012 09:38:24 | not constructive | PHP: Would you wrap PDO or Extended it?
===
My question is fairly clear. and I really would like to hear some reasons for the answer.
Additional information:
- I don't use any kind of FW.
- Of course PHP > 5.3. | 4 |
4,913,469 | 02/06/2011 13:06:33 | 310,291 | 03/02/2010 15:22:39 | 2,062 | 15 | Can true Agile really work since most programmers just use mainstream frameworks ? | This is the definition of the concept of Emergence in complexity theory:
http://en.wikipedia.org/wiki/Emergence
In philosophy, systems theory, science, and art, emergence is the way complex systems and patterns arise out of a multiplicity of relatively simple interactions. Emergence is central to the theories of integrative levels and of complex systems.
Agile spirit is about implementing this, except I rarely saw in practice programmers or even software architects do any work to really build their own frameworks, they just use existing mainstream ones and assemble in a way that for me could be ultimately automated through tools like BPM.
So can true Agility work except for the mass ? | java | .net | architecture | frameworks | agile | 02/06/2011 13:29:18 | not constructive | Can true Agile really work since most programmers just use mainstream frameworks ?
===
This is the definition of the concept of Emergence in complexity theory:
http://en.wikipedia.org/wiki/Emergence
In philosophy, systems theory, science, and art, emergence is the way complex systems and patterns arise out of a multiplicity of relatively simple interactions. Emergence is central to the theories of integrative levels and of complex systems.
Agile spirit is about implementing this, except I rarely saw in practice programmers or even software architects do any work to really build their own frameworks, they just use existing mainstream ones and assemble in a way that for me could be ultimately automated through tools like BPM.
So can true Agility work except for the mass ? | 4 |
287,035 | 11/13/2008 14:19:05 | 11,356 | 09/16/2008 07:22:35 | 678 | 32 | How do I declaratively insert a property value of a page into it's rendering? | I would like to have an aspx page that contains something like....
<form id="form1" runas=server >
Hello <%= Me.UserName() %>
</form>
and a code-behind something like...
Public Class Somepage
inherits SomeOtherPage
Private Readonly Property UserName() as String
Get
return "Rory"
End Get
End Property
End Class
I have tried this code but the aspx errors claiming that UserName is not declared.
**What is the proper way to do this?**
| aspnet | inline | properties | declarative | null | null | open | How do I declaratively insert a property value of a page into it's rendering?
===
I would like to have an aspx page that contains something like....
<form id="form1" runas=server >
Hello <%= Me.UserName() %>
</form>
and a code-behind something like...
Public Class Somepage
inherits SomeOtherPage
Private Readonly Property UserName() as String
Get
return "Rory"
End Get
End Property
End Class
I have tried this code but the aspx errors claiming that UserName is not declared.
**What is the proper way to do this?**
| 0 |
10,276,804 | 04/23/2012 07:55:37 | 1,023,687 | 11/01/2011 12:31:37 | 266 | 28 | Some data has lost when sending it to ASMX web service | I have an ASMX web service which has a Method to accept data as string. It is actually the Json as string. But when we send data its size is large, but when we receive data on Web service end, its size is smaller. The data has lost somewhere in between and not receiving the complete string..
i have also used the following tag in web.config of services, but it not works
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2000000000" />
</requestFiltering>
</security>
And, when i invoke the method on local browser and sends the data, the asmx service receive the same amount of data..
Any help or suggestion will be highly appreciated... | c# | asp.net | .net | web | asmx | 04/23/2012 14:33:16 | not a real question | Some data has lost when sending it to ASMX web service
===
I have an ASMX web service which has a Method to accept data as string. It is actually the Json as string. But when we send data its size is large, but when we receive data on Web service end, its size is smaller. The data has lost somewhere in between and not receiving the complete string..
i have also used the following tag in web.config of services, but it not works
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2000000000" />
</requestFiltering>
</security>
And, when i invoke the method on local browser and sends the data, the asmx service receive the same amount of data..
Any help or suggestion will be highly appreciated... | 1 |
5,644,655 | 04/13/2011 05:04:33 | 475,349 | 09/08/2010 13:04:04 | 189 | 1 | problem in showing data from url in a list in android | I am developing an android application where i have to parse data from url and show in a list
Can anyone help me how to proceed
Thanks in advance
Tushar | android | null | null | null | null | null | open | problem in showing data from url in a list in android
===
I am developing an android application where i have to parse data from url and show in a list
Can anyone help me how to proceed
Thanks in advance
Tushar | 0 |
10,702,504 | 05/22/2012 12:57:48 | 1,119,139 | 12/28/2011 10:50:17 | 53 | 0 | Sharding and indexes | I want to shard my database but I'm not professional in this topic. So here are my considerations. Though sharding key is excellent index for directing requests to the right nodes, what about the rest of indexes that will be defined upon my tables? I want requests referencing those indexes to be delivered to the right nodes as well so that only one node process the request. As far as I understand for this purpose some centralized index nodes must exist. So my question is whether this functionality is already present in RDBMS like MYSQL or should I use other special products. | mysql | index | sharding | null | null | null | open | Sharding and indexes
===
I want to shard my database but I'm not professional in this topic. So here are my considerations. Though sharding key is excellent index for directing requests to the right nodes, what about the rest of indexes that will be defined upon my tables? I want requests referencing those indexes to be delivered to the right nodes as well so that only one node process the request. As far as I understand for this purpose some centralized index nodes must exist. So my question is whether this functionality is already present in RDBMS like MYSQL or should I use other special products. | 0 |
11,011,032 | 06/13/2012 08:34:18 | 1,445,911 | 06/09/2012 07:41:04 | 1 | 1 | Scissor Function in iphone App | Hiii Everyone i m developing a Photo Collage App in iPhone and i want to use scissor functionality in my app so any one have idea how to get this fun. in my app and if anyone know about any open Source API to provide Scissor functionality..... | iphone | objective-c | ios | image | null | 06/13/2012 09:15:03 | not a real question | Scissor Function in iphone App
===
Hiii Everyone i m developing a Photo Collage App in iPhone and i want to use scissor functionality in my app so any one have idea how to get this fun. in my app and if anyone know about any open Source API to provide Scissor functionality..... | 1 |
4,368,583 | 12/06/2010 16:26:23 | 376,212 | 06/25/2010 11:38:10 | 19 | 2 | List Category And Subcategory under it Select with PHP | How could I list Category And Subcategory under it Select with PHP
with unlimited subcat like Cat3 under Cat2 under Cat1
I will put more info later | php | html | select | tags | null | 12/06/2010 17:19:14 | not a real question | List Category And Subcategory under it Select with PHP
===
How could I list Category And Subcategory under it Select with PHP
with unlimited subcat like Cat3 under Cat2 under Cat1
I will put more info later | 1 |
52,176 | 09/09/2008 15:33:58 | 5,413 | 09/09/2008 13:34:06 | 1 | 0 | What are the core mathematical concepts a good developer should know? | Since Graduating from a very small school in 2006 with a badly shaped & outdated program (I'm a foreigner & didnt know any better school at the time) i've come to realize that i missed a lot of basic concepts from a mathematical & software perspective that are mostly the foundations of other higher concepts.
i.e. i tried to listen/watch the open courseware from MIT on [Introduction to Algorithms](http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-046JFall-2005/CourseHome/) but quickly realized i was missing several mathematical concepts to better understand to course.
So what are the core mathematical concepts a good software engineer should know? and what are the possible books/sites you will recommend me? | language-agnostic | algorithm | books | math | null | 01/24/2012 07:58:58 | not constructive | What are the core mathematical concepts a good developer should know?
===
Since Graduating from a very small school in 2006 with a badly shaped & outdated program (I'm a foreigner & didnt know any better school at the time) i've come to realize that i missed a lot of basic concepts from a mathematical & software perspective that are mostly the foundations of other higher concepts.
i.e. i tried to listen/watch the open courseware from MIT on [Introduction to Algorithms](http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-046JFall-2005/CourseHome/) but quickly realized i was missing several mathematical concepts to better understand to course.
So what are the core mathematical concepts a good software engineer should know? and what are the possible books/sites you will recommend me? | 4 |
6,605,697 | 07/07/2011 04:09:35 | 832,801 | 07/07/2011 04:09:35 | 1 | 0 | How can show append div automatic in other computer | i want to make like facebook comment i need show append div any where?
how can it possible please reply me fast
Thanks for help | jquery-ajax | null | null | null | null | 03/21/2012 02:50:56 | not a real question | How can show append div automatic in other computer
===
i want to make like facebook comment i need show append div any where?
how can it possible please reply me fast
Thanks for help | 1 |
9,906,653 | 03/28/2012 11:34:50 | 909,813 | 08/24/2011 14:19:05 | 31 | 2 | Outlook 2010 envelope icon appears in task bar although there are no unread emails | I am using outlook 2010 SP1 and there some rules that move specific emails from inbox to sun-folders and set the email message as read; the rule works OK, but the envelope icon appears in the task bar although there is no any unread email in inbox or sub-folders.
The envelope icon disappears only when I exit Outlook then re-open it again.
Outlook version: 14.0.6112 (32-bit) SP1
OS: Windows 7 Ultimate SP1
| email | windows-7 | outlook-2010 | envelope | read-unread | 04/23/2012 00:51:33 | off topic | Outlook 2010 envelope icon appears in task bar although there are no unread emails
===
I am using outlook 2010 SP1 and there some rules that move specific emails from inbox to sun-folders and set the email message as read; the rule works OK, but the envelope icon appears in the task bar although there is no any unread email in inbox or sub-folders.
The envelope icon disappears only when I exit Outlook then re-open it again.
Outlook version: 14.0.6112 (32-bit) SP1
OS: Windows 7 Ultimate SP1
| 2 |
11,564,781 | 07/19/2012 16:01:04 | 1,538,402 | 07/19/2012 15:38:16 | 1 | 0 | Keeping IE Open | I would like to create a Powershell script that will re-open IE each time it is closed.
Do {
$ie = New-Object -Com InternetExplorer.Application
$ie.Navigate(www.google.com)
$ie.Visible = $true
}
While (?)
I plan on using Start-Sleep to give the application time to fully open and so it doesn't keep spawning processes like mad, but I haven't been able to find out which value links to finding out if the window has been closed. Perhaps I'm going about this wrong. | powershell | internet-explorer-8 | null | null | null | null | open | Keeping IE Open
===
I would like to create a Powershell script that will re-open IE each time it is closed.
Do {
$ie = New-Object -Com InternetExplorer.Application
$ie.Navigate(www.google.com)
$ie.Visible = $true
}
While (?)
I plan on using Start-Sleep to give the application time to fully open and so it doesn't keep spawning processes like mad, but I haven't been able to find out which value links to finding out if the window has been closed. Perhaps I'm going about this wrong. | 0 |
9,669,530 | 03/12/2012 15:03:54 | 702,948 | 04/11/2011 20:59:45 | 790 | 35 | Drag and Drop file path to Java Swing JTextField | Using [this question][1], I created the class below, which handles drag and drop of files to a JTextField. The point of the application is to be able to drag a file into the text field, and have the text field's text set to the file's path (you can see the goal in the code pretty clearly).
My problem is the below code does not compile. The compilation error states `Cannot refer to non-final variable myPanel inside an inner class defined in a different method`. I haven't worked much with inner classes, so can seomeone show me how to resolve the error and get the code to behave as designed?
Code:
import java.awt.datatransfer.DataFlavor;
import java.awt.dnd.DnDConstants;
import java.awt.dnd.DropTarget;
import java.awt.dnd.DropTargetDropEvent;
import java.io.File;
import java.util.List;
import javax.swing.*;
public class Test {
public static void main(String[] args) {
JTextArea myPanel = new JTextArea();
myPanel.setDropTarget(new DropTarget() {
public synchronized void drop(DropTargetDropEvent evt) {
try {
evt.acceptDrop(DnDConstants.ACTION_COPY);
List<File> droppedFiles = (List<File>) evt
.getTransferable().getTransferData(
DataFlavor.javaFileListFlavor);
for (File file : droppedFiles) {
/*
* NOTE:
* When I change this to a println,
* it prints the correct path
*/
myPanel.setText(file.getAbsolutePath());
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
});
JFrame frame = new JFrame();
frame.add(myPanel);
frame.setVisible(true);
}
}
[1]: http://stackoverflow.com/questions/811248/how-can-i-use-drag-and-drop-in-swing-to-get-file-path | java | swing | drag-and-drop | null | null | null | open | Drag and Drop file path to Java Swing JTextField
===
Using [this question][1], I created the class below, which handles drag and drop of files to a JTextField. The point of the application is to be able to drag a file into the text field, and have the text field's text set to the file's path (you can see the goal in the code pretty clearly).
My problem is the below code does not compile. The compilation error states `Cannot refer to non-final variable myPanel inside an inner class defined in a different method`. I haven't worked much with inner classes, so can seomeone show me how to resolve the error and get the code to behave as designed?
Code:
import java.awt.datatransfer.DataFlavor;
import java.awt.dnd.DnDConstants;
import java.awt.dnd.DropTarget;
import java.awt.dnd.DropTargetDropEvent;
import java.io.File;
import java.util.List;
import javax.swing.*;
public class Test {
public static void main(String[] args) {
JTextArea myPanel = new JTextArea();
myPanel.setDropTarget(new DropTarget() {
public synchronized void drop(DropTargetDropEvent evt) {
try {
evt.acceptDrop(DnDConstants.ACTION_COPY);
List<File> droppedFiles = (List<File>) evt
.getTransferable().getTransferData(
DataFlavor.javaFileListFlavor);
for (File file : droppedFiles) {
/*
* NOTE:
* When I change this to a println,
* it prints the correct path
*/
myPanel.setText(file.getAbsolutePath());
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
});
JFrame frame = new JFrame();
frame.add(myPanel);
frame.setVisible(true);
}
}
[1]: http://stackoverflow.com/questions/811248/how-can-i-use-drag-and-drop-in-swing-to-get-file-path | 0 |
10,212,772 | 04/18/2012 15:31:02 | 1,074,896 | 12/01/2011 07:08:08 | 176 | 0 | Full Screen Mode of Android Gallery | Do Android Gallery have full screen mode(I mean after clicking on the image of galley I will get the full screen gallery)? | android | null | null | null | null | 04/19/2012 15:59:40 | off topic | Full Screen Mode of Android Gallery
===
Do Android Gallery have full screen mode(I mean after clicking on the image of galley I will get the full screen gallery)? | 2 |
11,520,433 | 07/17/2012 10:17:53 | 962,122 | 09/24/2011 00:01:40 | 55 | 0 | ZK - Tree not refreshing after data change | I have a problem regarding model binding with the new tree binding mechanism of ZK6.
First, here's my code:
Zul:
<div id="win" apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('mira.web.composer.PermissionDesignerModel')"
style="width:98%; text-align:center;" vflex="1">
<tree id="permissionTree" width="100%" model="@bind(vm.treeModel)"
style="text-align:left;" vflex="2">
<treecols>
<treecol label="Item" width="400px" />
<treecol label="Typ" />
<treecol label="Ausgabe" />
<treecol label="Einfügen" width="100px" />
</treecols>
<template name="model" var="node">
<treeitem open="@bind(node.open)">
<treerow>
<treecell>
<textbox value="@bind(node.data.name)" />
</treecell>
<treecell>
<combobox mold="rounded" readonly="true"
model="@load(vm.allAttributeTypes)"
selectedIndex="@bind(node.data.attType)">
<template name="model">
<comboitem label="@load(each.name)"
value="@load(each.id)" />
</template>
</combobox>
</treecell>
<treecell>
<checkbox label="Ausgabe"
checked="@bind(node.data.isOutput)" />
</treecell>
<treecell>
<button label="Einfügen"
onClick="@command('insertNode', node=node)" />
</treecell>
</treerow>
</treeitem>
</template>
</tree>
The model:
public class PermissionDesignerModel {
ClassPathResource res = new ClassPathResource("/beans.xml");
BeanFactory beanFactory = new XmlBeanFactory(res);
private PermissionTreeModel treeModel;
@Command
public void insertNode(@BindingParam("node") PermissionTreeNode node) {
node.setOpen(false);
}
public PermissionTreeModel getTreeModel() throws ParseException {
if (treeModel == null) {
PermissiontreeBuilder builder = new PermissiontreeBuilder(Container
.getCurrentProduct().getProductId());
PermissionTreeNode root = builder.getRoot();
setTreeModel(new PermissionTreeModel(root));
}
return treeModel;
}
public void setTreeModel(PermissionTreeModel treeModel) {
this.treeModel = treeModel;
}
}
The insertNode() method is called correctly, and I get the appropriate node with content in it, but when I change the data of the node (or the open-attribute), nothing happens in the UI. Do I have to call some special bind() method or something for the model-changes to take effect in the tree? | java | zk | null | null | null | null | open | ZK - Tree not refreshing after data change
===
I have a problem regarding model binding with the new tree binding mechanism of ZK6.
First, here's my code:
Zul:
<div id="win" apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('mira.web.composer.PermissionDesignerModel')"
style="width:98%; text-align:center;" vflex="1">
<tree id="permissionTree" width="100%" model="@bind(vm.treeModel)"
style="text-align:left;" vflex="2">
<treecols>
<treecol label="Item" width="400px" />
<treecol label="Typ" />
<treecol label="Ausgabe" />
<treecol label="Einfügen" width="100px" />
</treecols>
<template name="model" var="node">
<treeitem open="@bind(node.open)">
<treerow>
<treecell>
<textbox value="@bind(node.data.name)" />
</treecell>
<treecell>
<combobox mold="rounded" readonly="true"
model="@load(vm.allAttributeTypes)"
selectedIndex="@bind(node.data.attType)">
<template name="model">
<comboitem label="@load(each.name)"
value="@load(each.id)" />
</template>
</combobox>
</treecell>
<treecell>
<checkbox label="Ausgabe"
checked="@bind(node.data.isOutput)" />
</treecell>
<treecell>
<button label="Einfügen"
onClick="@command('insertNode', node=node)" />
</treecell>
</treerow>
</treeitem>
</template>
</tree>
The model:
public class PermissionDesignerModel {
ClassPathResource res = new ClassPathResource("/beans.xml");
BeanFactory beanFactory = new XmlBeanFactory(res);
private PermissionTreeModel treeModel;
@Command
public void insertNode(@BindingParam("node") PermissionTreeNode node) {
node.setOpen(false);
}
public PermissionTreeModel getTreeModel() throws ParseException {
if (treeModel == null) {
PermissiontreeBuilder builder = new PermissiontreeBuilder(Container
.getCurrentProduct().getProductId());
PermissionTreeNode root = builder.getRoot();
setTreeModel(new PermissionTreeModel(root));
}
return treeModel;
}
public void setTreeModel(PermissionTreeModel treeModel) {
this.treeModel = treeModel;
}
}
The insertNode() method is called correctly, and I get the appropriate node with content in it, but when I change the data of the node (or the open-attribute), nothing happens in the UI. Do I have to call some special bind() method or something for the model-changes to take effect in the tree? | 0 |
7,632,692 | 10/03/2011 08:34:19 | 976,322 | 10/03/2011 08:30:03 | 1 | 0 | Mono.Math.BigInteger is inaccessible due to its protection level | So I'm working on a program in C# using ideone and I'm working with Mono for the first time. I'm trying to use the BigInteger class (Mono.Math.BigInteger) but I keep getting errors. Here's me code below. What is going on and how do I fix it? Thanks.
using System;
using Mono.Math;
public class TFIB
{
public static int Main()
{
const int FIB_SEQUENCE_SIZE = 300;
BigInteger[] FibonacciSequence = new BigInteger[FIB_SEQUENCE_SIZE];
// Calculate Fibonacci Sequence
FibonacciSequence[0] = 0;
FibonacciSequence[1] = 1;
for (int i = 2; i < FIB_SEQUENCE_SIZE; i++)
{
FibonacciSequence[i] = FibonacciSequence[i - 1] + FibonacciSequence[i - 2];
}
while (true)
{
string[] tokenInput = Console.ReadLine().Split(' ');
Mono.Math.BigInteger lowerBound = Mono.Math.BigInteger.Parse(tokenInput[0]);
BigInteger upperBound = BigInteger.Parse(tokenInput[1]);
if (lowerBound == 0 && upperBound == 0)
{
break; // ending sequence found
}
else
{
// find the number of fibonacci sequences
int numbersInRange = 0;
for (int i = 0; i < FIB_SEQUENCE_SIZE; i++)
{
if (FibonacciSequence[i] >= lowerBound)
{
if (FibonacciSequence[i] <= upperBound)
{
numbersInRange++;
}
else
{
continue; // there is nothing more to find
}
}
}
Console.WriteLine(numbersInRange);
}
}
return 0;
}
}
These are the errors I'm getting:
prog.cs(9,13): error CS0122: `Mono.Math.BigInteger' is inaccessible due to its protection level
/usr/lib/mono/2.0/mscorlib.dll (Location of the symbol related to previous error)
prog.cs(9,23): error CS0122: `Mono.Math.BigInteger[]' is inaccessible due to its protection level
/usr/lib/mono/2.0/mscorlib.dll (Location of the symbol related to previous error)
prog.cs(23,27): error CS0122: `Mono.Math.BigInteger' is inaccessible due to its protection level
/usr/lib/mono/2.0/mscorlib.dll (Location of the symbol related to previous error)
prog.cs(24,17): error CS0122: `Mono.Math.BigInteger' is inaccessible due to its protection level
/usr/lib/mono/2.0/mscorlib.dll (Location of the symbol related to previous error)
Compilation failed: 4 error(s), 0 warnings | c# | mono | biginteger | null | null | null | open | Mono.Math.BigInteger is inaccessible due to its protection level
===
So I'm working on a program in C# using ideone and I'm working with Mono for the first time. I'm trying to use the BigInteger class (Mono.Math.BigInteger) but I keep getting errors. Here's me code below. What is going on and how do I fix it? Thanks.
using System;
using Mono.Math;
public class TFIB
{
public static int Main()
{
const int FIB_SEQUENCE_SIZE = 300;
BigInteger[] FibonacciSequence = new BigInteger[FIB_SEQUENCE_SIZE];
// Calculate Fibonacci Sequence
FibonacciSequence[0] = 0;
FibonacciSequence[1] = 1;
for (int i = 2; i < FIB_SEQUENCE_SIZE; i++)
{
FibonacciSequence[i] = FibonacciSequence[i - 1] + FibonacciSequence[i - 2];
}
while (true)
{
string[] tokenInput = Console.ReadLine().Split(' ');
Mono.Math.BigInteger lowerBound = Mono.Math.BigInteger.Parse(tokenInput[0]);
BigInteger upperBound = BigInteger.Parse(tokenInput[1]);
if (lowerBound == 0 && upperBound == 0)
{
break; // ending sequence found
}
else
{
// find the number of fibonacci sequences
int numbersInRange = 0;
for (int i = 0; i < FIB_SEQUENCE_SIZE; i++)
{
if (FibonacciSequence[i] >= lowerBound)
{
if (FibonacciSequence[i] <= upperBound)
{
numbersInRange++;
}
else
{
continue; // there is nothing more to find
}
}
}
Console.WriteLine(numbersInRange);
}
}
return 0;
}
}
These are the errors I'm getting:
prog.cs(9,13): error CS0122: `Mono.Math.BigInteger' is inaccessible due to its protection level
/usr/lib/mono/2.0/mscorlib.dll (Location of the symbol related to previous error)
prog.cs(9,23): error CS0122: `Mono.Math.BigInteger[]' is inaccessible due to its protection level
/usr/lib/mono/2.0/mscorlib.dll (Location of the symbol related to previous error)
prog.cs(23,27): error CS0122: `Mono.Math.BigInteger' is inaccessible due to its protection level
/usr/lib/mono/2.0/mscorlib.dll (Location of the symbol related to previous error)
prog.cs(24,17): error CS0122: `Mono.Math.BigInteger' is inaccessible due to its protection level
/usr/lib/mono/2.0/mscorlib.dll (Location of the symbol related to previous error)
Compilation failed: 4 error(s), 0 warnings | 0 |
7,789,338 | 10/17/2011 04:20:14 | 655,814 | 06/05/2010 17:53:34 | 351 | 5 | Publish apps on android market | I am an Indian Android applications developer. I want to publish my apps on the android market.Is there any restrictions for Indians to publish apps. Do I need an American bank account for that.
If not can anyone please explain the requirements and procedure for that. | android | null | null | null | null | 10/17/2011 16:09:22 | off topic | Publish apps on android market
===
I am an Indian Android applications developer. I want to publish my apps on the android market.Is there any restrictions for Indians to publish apps. Do I need an American bank account for that.
If not can anyone please explain the requirements and procedure for that. | 2 |
4,027,063 | 10/26/2010 19:02:32 | 487,754 | 10/26/2010 14:45:05 | 1 | 0 | how to convert html to postscript using c++ programming | hey i need to convert html to post script using c++ on linux(note:no scripting launages) | c++ | null | null | null | null | 10/26/2010 19:27:46 | not a real question | how to convert html to postscript using c++ programming
===
hey i need to convert html to post script using c++ on linux(note:no scripting launages) | 1 |
11,589,965 | 07/21/2012 06:20:32 | 1,542,170 | 07/21/2012 04:39:26 | 1 | 1 | color animation in wp7 while audio aplayback | actually,I want to match my audio with the text present,so I want to change colour of my text character by character?am using method of Colour animation but its changing,the colour of whole text at once?
| windows-phone-7.1 | null | null | null | null | 07/22/2012 21:43:35 | not a real question | color animation in wp7 while audio aplayback
===
actually,I want to match my audio with the text present,so I want to change colour of my text character by character?am using method of Colour animation but its changing,the colour of whole text at once?
| 1 |
5,502,448 | 03/31/2011 15:36:48 | 489,048 | 10/27/2010 15:36:54 | 38 | 2 | Google Web Toolkit, Eclipse, external project | I use eclipse for first time now. I made a small project that does some reflection on a class.
Then my problem is that I don;t understand what is the steps needed, to add this project to a GWT Simple Hello World Project.
On one side, I don;t have any ant in the reflection project created in Eclipse! But it compiles.
Then trying in some "myriad" ways to add a reference to the GWT, I take back a question similar to this : "external jar did you forget to inherit a required module?"
On the other side, I don;t see also nowhere any build.xml so to generate some jar and plug it somehow to the GWT.
Bottom liine, how can I add a reference to the GWT of my project ? | gwt | reflection | reference | external | null | null | open | Google Web Toolkit, Eclipse, external project
===
I use eclipse for first time now. I made a small project that does some reflection on a class.
Then my problem is that I don;t understand what is the steps needed, to add this project to a GWT Simple Hello World Project.
On one side, I don;t have any ant in the reflection project created in Eclipse! But it compiles.
Then trying in some "myriad" ways to add a reference to the GWT, I take back a question similar to this : "external jar did you forget to inherit a required module?"
On the other side, I don;t see also nowhere any build.xml so to generate some jar and plug it somehow to the GWT.
Bottom liine, how can I add a reference to the GWT of my project ? | 0 |
1,598,438 | 10/21/2009 02:30:32 | 8,677 | 09/15/2008 16:34:44 | 457 | 19 | Is there a more painless way to call Win32 from C#? | Every few months I find myself needing to call Win32 from C#. Though I've done it a dozen times, I've usually forgotten the exact machinations, so I poke around the web or old code and figure out what DllImport statements I need, etc.
Am I alone?
Is there a sanctioned "Win32" class that has the requisite declarations for the entire Win32 API? Seems like there ought to be. Maybe I'm missing something. | c# | dllimport | interop | null | null | null | open | Is there a more painless way to call Win32 from C#?
===
Every few months I find myself needing to call Win32 from C#. Though I've done it a dozen times, I've usually forgotten the exact machinations, so I poke around the web or old code and figure out what DllImport statements I need, etc.
Am I alone?
Is there a sanctioned "Win32" class that has the requisite declarations for the entire Win32 API? Seems like there ought to be. Maybe I'm missing something. | 0 |
2,851,856 | 05/17/2010 18:54:25 | 247,184 | 01/09/2010 18:42:25 | 9 | 0 | NHibernate Query Analyzer | Could anyone please describe how to use NHibernate Query Analyzer? I downloaded it and trying to build it but it fails, I am not quite sure how to use it.
I am using nHibernate with Sybase and WCF.
Any help is greatly appreciated.
Thanks | nhibernate | query | analyzer | null | null | null | open | NHibernate Query Analyzer
===
Could anyone please describe how to use NHibernate Query Analyzer? I downloaded it and trying to build it but it fails, I am not quite sure how to use it.
I am using nHibernate with Sybase and WCF.
Any help is greatly appreciated.
Thanks | 0 |
2,490,672 | 03/22/2010 08:00:57 | 249,928 | 01/13/2010 15:31:03 | 28 | 1 | PCI compliant in the cloud | The requirements for PCI standards include installing a firewall, restrict physical access to servers, using and regularly updating antivirus and malware software etc as [outlined here][1]
If you host your application in the cloud , how can you ensure that you meet these PCI requirements
[1]: http://en.wikipedia.org/wiki/Payment_Card_Industry_Data_Security_Standard | cloud | cloud-hosting | hosting | standards | null | 09/06/2011 23:07:04 | off topic | PCI compliant in the cloud
===
The requirements for PCI standards include installing a firewall, restrict physical access to servers, using and regularly updating antivirus and malware software etc as [outlined here][1]
If you host your application in the cloud , how can you ensure that you meet these PCI requirements
[1]: http://en.wikipedia.org/wiki/Payment_Card_Industry_Data_Security_Standard | 2 |
10,003,493 | 04/04/2012 00:47:16 | 859,913 | 07/24/2011 03:39:29 | 8 | 1 | Using Apple's Reachability legal? | I have an application that requires a Wi-Fi connection to the network, and thus needs to test for a Wi-Fi Connection.
I have found apple's Reachability.h/.m files which provide exactly what I need.
My question is; Can I use these supplied .h/.m files in a submitted application to the app store? If Free or a charged application? Or will the application be rejected on a legal basis for using apples code?
I apologise if this seems a noob question, it is the first time I have come across this issue! | objective-c | ios | wifi | legal | reachability | 04/04/2012 02:08:17 | off topic | Using Apple's Reachability legal?
===
I have an application that requires a Wi-Fi connection to the network, and thus needs to test for a Wi-Fi Connection.
I have found apple's Reachability.h/.m files which provide exactly what I need.
My question is; Can I use these supplied .h/.m files in a submitted application to the app store? If Free or a charged application? Or will the application be rejected on a legal basis for using apples code?
I apologise if this seems a noob question, it is the first time I have come across this issue! | 2 |
11,700,197 | 07/28/2012 10:28:46 | 1,253,270 | 03/06/2012 21:11:57 | 1 | 0 | Dell Poweredge SC1425 Fan Control-Overload | yesterday ive got a new(new for me :D) U1 server Dell PowerEdge SC1425, i put on him win2003 x64 - registered & updated!
i search in google about the fan control, software for it- no success!
fans are doubled san ace 40, 2 are fails.
and only with six(cpus)+one(chassis) fans my head blowup for rapidly time...
before booting on bios image of dell company the fans are slowed down but if after load all going at maximun- why?
i think more information its not needed, but ill post; 2x2.80 Xeon/8GB Ram/320GB HDD/Bios A03
ps; there in bios is no config for fans or cpu clock or some normal option.. its verry cutted.
[< Image Of Everest-IMPMI >][1]
[1]: http://img405.imageshack.us/img405/7961/20748201.png
Please if someone know how to slow down some of them... write it. | dell | null | null | null | null | 07/28/2012 12:29:06 | off topic | Dell Poweredge SC1425 Fan Control-Overload
===
yesterday ive got a new(new for me :D) U1 server Dell PowerEdge SC1425, i put on him win2003 x64 - registered & updated!
i search in google about the fan control, software for it- no success!
fans are doubled san ace 40, 2 are fails.
and only with six(cpus)+one(chassis) fans my head blowup for rapidly time...
before booting on bios image of dell company the fans are slowed down but if after load all going at maximun- why?
i think more information its not needed, but ill post; 2x2.80 Xeon/8GB Ram/320GB HDD/Bios A03
ps; there in bios is no config for fans or cpu clock or some normal option.. its verry cutted.
[< Image Of Everest-IMPMI >][1]
[1]: http://img405.imageshack.us/img405/7961/20748201.png
Please if someone know how to slow down some of them... write it. | 2 |
6,099,411 | 05/23/2011 15:32:14 | 684,534 | 03/30/2011 18:53:05 | 151 | 0 | Advanced file type guesser | How does (exactly) utility like UNIX `file` command guess the file type?
Are there any source-codes?
Best, James
| c++ | c | linux | null | null | 05/23/2011 16:08:40 | off topic | Advanced file type guesser
===
How does (exactly) utility like UNIX `file` command guess the file type?
Are there any source-codes?
Best, James
| 2 |
10,564,786 | 05/12/2012 14:56:05 | 1,386,432 | 05/10/2012 07:27:07 | 1 | 0 | PHP Parse Multi-Lingual XML | I have the following Sample XML:
<?xml version="1.0"?>
<languages>
<en>
<title>Title</title>
<content>Content</content>
<header>Header</header>
<content>Content</content>
</en>
<it>
<title>Titolo</title>
<box>Testo formato</box>
<content>Contenuto</content>
</it>
</languages>
Basically more languages can be added. The nodes between `<en>` and `</en>`, `<it>` and `</it>` can vary.
I need to create a PHP script to read a domain, read part of the language of the domain, get the children nodes and replace the node name with html elements.
Ex. if the domain is http://domain.com/it/about, I get the following:
<title>Titolo</title>
<box>Testo formato</box>
<content>Contenuto</content>
and then output them as the following in the html page:
<h1>Titolo</h1>
<div class="box">Testo formato</div>
<p>Contenuto</p>
Anyone got a good tutorial or tips about how to do this? | php | xml | php5 | xml-parsing | null | 05/18/2012 12:58:56 | not a real question | PHP Parse Multi-Lingual XML
===
I have the following Sample XML:
<?xml version="1.0"?>
<languages>
<en>
<title>Title</title>
<content>Content</content>
<header>Header</header>
<content>Content</content>
</en>
<it>
<title>Titolo</title>
<box>Testo formato</box>
<content>Contenuto</content>
</it>
</languages>
Basically more languages can be added. The nodes between `<en>` and `</en>`, `<it>` and `</it>` can vary.
I need to create a PHP script to read a domain, read part of the language of the domain, get the children nodes and replace the node name with html elements.
Ex. if the domain is http://domain.com/it/about, I get the following:
<title>Titolo</title>
<box>Testo formato</box>
<content>Contenuto</content>
and then output them as the following in the html page:
<h1>Titolo</h1>
<div class="box">Testo formato</div>
<p>Contenuto</p>
Anyone got a good tutorial or tips about how to do this? | 1 |
11,556,993 | 07/19/2012 08:39:33 | 1,492,648 | 06/30/2012 06:24:57 | 19 | 0 | use same object for different files in php | I have two files say file1.php and file2.php. I have one php file named form in which class form has been defined.
I have created an object in file1.php as follow:
require_once('form.php');
$x=$_GET['field'];
$form = new Form("", "");
$personal = new Block("");
$address = new TextArea("address", $x, "", 3, 30);
$personal->add($address);
$form->add($personal);
echo $form;
now i want to use this object $form and $personal in another file file2.php which is as follow:
$personal = new Block("");
$name = new Text("name",$x);
$personal->add($name);
$form->add($personal);
echo $form;
how can i use these objects in php. please help.
| php | null | null | null | null | null | open | use same object for different files in php
===
I have two files say file1.php and file2.php. I have one php file named form in which class form has been defined.
I have created an object in file1.php as follow:
require_once('form.php');
$x=$_GET['field'];
$form = new Form("", "");
$personal = new Block("");
$address = new TextArea("address", $x, "", 3, 30);
$personal->add($address);
$form->add($personal);
echo $form;
now i want to use this object $form and $personal in another file file2.php which is as follow:
$personal = new Block("");
$name = new Text("name",$x);
$personal->add($name);
$form->add($personal);
echo $form;
how can i use these objects in php. please help.
| 0 |
7,371,244 | 09/10/2011 10:59:53 | 380,038 | 04/26/2010 11:40:00 | 728 | 9 | Using Self.* as default value for a method | def save_file(self, outputfilename = self.image_filename):
self.file.read(outputfilename)
....
gives `NameError: name 'self' is not defined`in the first line. It seems that Python doesn't accept How can I rewrite the code, so that I does not violate the rules?
...
Please feel free to add tags or change the title. | python | null | null | null | null | null | open | Using Self.* as default value for a method
===
def save_file(self, outputfilename = self.image_filename):
self.file.read(outputfilename)
....
gives `NameError: name 'self' is not defined`in the first line. It seems that Python doesn't accept How can I rewrite the code, so that I does not violate the rules?
...
Please feel free to add tags or change the title. | 0 |
266,476 | 11/05/2008 20:14:09 | 18,891 | 09/19/2008 14:20:24 | 87 | 11 | Is there a public secure FTP site for testing? | I'm working on automating a process that downloads a file from a secure FTP server. I've had problems with the vendor's security certificate and I want to find a clean secure FTP server to test against. Does anyone know if there is a publicly available secure FTP site that can be used to test programs against? | ftp | sftp | testing | null | null | 02/28/2012 22:02:27 | not constructive | Is there a public secure FTP site for testing?
===
I'm working on automating a process that downloads a file from a secure FTP server. I've had problems with the vendor's security certificate and I want to find a clean secure FTP server to test against. Does anyone know if there is a publicly available secure FTP site that can be used to test programs against? | 4 |
8,213,896 | 11/21/2011 15:08:01 | 1,058,012 | 11/21/2011 14:52:04 | 1 | 0 | who knows the Iframe no password and account ? | Hello everybody I have a question about iframe how to set no password and account.
I will build a website and set a iframe on a page but that website has to authenticate.
I don't want someone can't watch when they enter this page. | html | null | null | null | null | 11/21/2011 15:43:33 | not a real question | who knows the Iframe no password and account ?
===
Hello everybody I have a question about iframe how to set no password and account.
I will build a website and set a iframe on a page but that website has to authenticate.
I don't want someone can't watch when they enter this page. | 1 |
4,700,510 | 01/15/2011 15:52:59 | 576,823 | 01/15/2011 15:51:40 | 1 | 0 | Creating a win32 application. | I am creating a PHONEBOOK application ,which when opened creates another process using win32 api,which needs to be displayed in the active processes.
Now.. mY doubt is ...the create process code would be wrtten using win32 api...How would i create a gui application of phone book??...Using win32 api to create Gui is very difficult...i am using visual C++ 2008 ...Can i create a CLR -->windows form application ..to create the forms for my phonebook,and then incorporate the win32 api code to createprocess within that application? | winapi | createprocess | null | null | null | 01/16/2011 05:23:40 | not a real question | Creating a win32 application.
===
I am creating a PHONEBOOK application ,which when opened creates another process using win32 api,which needs to be displayed in the active processes.
Now.. mY doubt is ...the create process code would be wrtten using win32 api...How would i create a gui application of phone book??...Using win32 api to create Gui is very difficult...i am using visual C++ 2008 ...Can i create a CLR -->windows form application ..to create the forms for my phonebook,and then incorporate the win32 api code to createprocess within that application? | 1 |
9,683,646 | 03/13/2012 12:03:25 | 156,458 | 08/14/2009 12:31:05 | 3,455 | 2 | When to use array and when to use cell array in Matlab? | In Matlab, I was trying to put anonymous functions in an array:
>> a=[@(k)0.1/(k+1) @(k)0.1/(k+1)^0.501]
??? Error using ==> horzcat
Nonscalar arrays of function handles are not allowed; use cell arrays
instead.
So I wonder what kinds of elements are allowed in an array, and in a cell array?
For example, I know that in an array, the elements can be numerical or strings. What else?
Thanks and regards! | matlab | null | null | null | null | null | open | When to use array and when to use cell array in Matlab?
===
In Matlab, I was trying to put anonymous functions in an array:
>> a=[@(k)0.1/(k+1) @(k)0.1/(k+1)^0.501]
??? Error using ==> horzcat
Nonscalar arrays of function handles are not allowed; use cell arrays
instead.
So I wonder what kinds of elements are allowed in an array, and in a cell array?
For example, I know that in an array, the elements can be numerical or strings. What else?
Thanks and regards! | 0 |
10,454,819 | 05/04/2012 19:13:31 | 1,077,601 | 12/02/2011 14:48:24 | 757 | 72 | Facebook SDK didLoad:result = null | I have a Facebook singleton and request this to get a profile picture:
[[[FacebookScorer sharedInstance] facebook] requestWithGraphPath:@"me/picture?type=normal" andDelegate:self];
Now in facebooks delegate method didLoadRawResponce I actually receive the profile picture and can display, but in the didLoad:(id)result method the result is null!
I believe the didLoad method is called once the result has been parsed, so why do I not get anything back from it? | ios | xcode | cocoa-touch | facebook-graph-api | null | null | open | Facebook SDK didLoad:result = null
===
I have a Facebook singleton and request this to get a profile picture:
[[[FacebookScorer sharedInstance] facebook] requestWithGraphPath:@"me/picture?type=normal" andDelegate:self];
Now in facebooks delegate method didLoadRawResponce I actually receive the profile picture and can display, but in the didLoad:(id)result method the result is null!
I believe the didLoad method is called once the result has been parsed, so why do I not get anything back from it? | 0 |
3,453,670 | 08/10/2010 21:39:59 | 1,385,366 | 03/25/2010 08:54:03 | 26 | 2 | Xdebug loaded correctly in Ubuntu but var_dump/error handling not being over-ridden | I have recently upgraded to Ubuntu 10.04 and as usual installed xdebug from the package manager. I've never had a problem after that with getting the formatted error messages and var_dumps to show up but this time they don't.
I ran phpinfo() and it is definitely loading it, and I even tried running some of the custom xdebug functions and all is working fine, but when I do a var_dump it comes up as though xdebug isn't installed. Any ideas why this is happening? | php | xdebug | null | null | null | null | open | Xdebug loaded correctly in Ubuntu but var_dump/error handling not being over-ridden
===
I have recently upgraded to Ubuntu 10.04 and as usual installed xdebug from the package manager. I've never had a problem after that with getting the formatted error messages and var_dumps to show up but this time they don't.
I ran phpinfo() and it is definitely loading it, and I even tried running some of the custom xdebug functions and all is working fine, but when I do a var_dump it comes up as though xdebug isn't installed. Any ideas why this is happening? | 0 |
1,063,497 | 06/30/2009 12:52:10 | 64,253 | 02/09/2009 17:33:09 | 1 | 0 | Hidden Features of Erlang | In the spirit of:
* Hidden Features of C#
* Hidden Features of Java
* Hidden Features of ASP.NET
* Hidden Features of Python
* Hidden Features of HTML
* and other Hidden Features questions
What are the hidden features of Erlang that every Erlang developer should be aware of?
One hidden feature per answer, please. | erlang | null | null | null | null | 08/01/2011 14:21:33 | not constructive | Hidden Features of Erlang
===
In the spirit of:
* Hidden Features of C#
* Hidden Features of Java
* Hidden Features of ASP.NET
* Hidden Features of Python
* Hidden Features of HTML
* and other Hidden Features questions
What are the hidden features of Erlang that every Erlang developer should be aware of?
One hidden feature per answer, please. | 4 |
3,967,554 | 10/19/2010 10:50:10 | 480,362 | 10/19/2010 10:41:08 | 1 | 0 | Dismiss UIACTIONSHEET before device rotate! | In portaint Actionsheet show in tabbar. In landscape - in window. I heed do remove UIActionSheet from tabbar before rotate, for after rotate show in wondow.
Inside `– willRotateToInterfaceOrientation:duration` dismiss action sheet dont work.
Please help me! | iphone | rotation | uiactionsheet | dismiss | null | null | open | Dismiss UIACTIONSHEET before device rotate!
===
In portaint Actionsheet show in tabbar. In landscape - in window. I heed do remove UIActionSheet from tabbar before rotate, for after rotate show in wondow.
Inside `– willRotateToInterfaceOrientation:duration` dismiss action sheet dont work.
Please help me! | 0 |
1,442,504 | 09/18/2009 03:50:44 | 158,175 | 08/18/2009 04:43:07 | 22 | 1 | Parsing HTTP status code | I am using PHP to parse the numeric portion of the HTTP status code response. Given a standard "HTTP/1.1 200 OK" response, I'd use:
$data = explode(' ', "HTTP/1.1 200 OK");
$code = $data[1];
I'm not an expert on HTTP. Would I ever encounter a response where the code is not at the position of $data[1] as in the above example? I just want to be sure that this method of delimiting the response code will always work for any response.
Thanks, Brian | http | header | php | http-status-codes | null | null | open | Parsing HTTP status code
===
I am using PHP to parse the numeric portion of the HTTP status code response. Given a standard "HTTP/1.1 200 OK" response, I'd use:
$data = explode(' ', "HTTP/1.1 200 OK");
$code = $data[1];
I'm not an expert on HTTP. Would I ever encounter a response where the code is not at the position of $data[1] as in the above example? I just want to be sure that this method of delimiting the response code will always work for any response.
Thanks, Brian | 0 |
11,316,432 | 07/03/2012 17:52:27 | 1,459,451 | 06/15/2012 18:01:20 | 15 | 2 | How do I view a report in WPF? | How do I view a report in WPF without a third party app?
VB.NET, Visual Studio 2010. | wpf | report | null | null | null | 07/27/2012 14:57:36 | not a real question | How do I view a report in WPF?
===
How do I view a report in WPF without a third party app?
VB.NET, Visual Studio 2010. | 1 |
2,808,023 | 05/11/2010 04:13:07 | 234,867 | 12/18/2009 22:11:01 | 1 | 1 | Best Books for Learning to Test Software | I have read a lot of programming books, many mention testing of various kinds. I have never really gotten into the topic of testing, but I realize how extremely important it is. Anyone know of some good books that provide a thorough exploration of this topic? | books | testing | null | null | null | 09/26/2011 14:12:32 | not constructive | Best Books for Learning to Test Software
===
I have read a lot of programming books, many mention testing of various kinds. I have never really gotten into the topic of testing, but I realize how extremely important it is. Anyone know of some good books that provide a thorough exploration of this topic? | 4 |
9,710,945 | 03/14/2012 22:00:09 | 938,731 | 09/11/2011 01:02:04 | 21 | 0 | Creating Server Application | Okay, this is what I'm trying to do:
* I want to have 5-10 clients (programmed in C++) each sending 1 text file every 2 min to my server. The server extracts info from the text files and places them in the database.
* I have a few clients (using a browser) that need to view the data as it comes in. They may have to login. The data has to be kept up to date as the server receives new information. Probably a 10 second delay from the time the new data is inserted to the time the browser clients view it.
* I have a week to complete this and am familiar with C++, sql, and some php. So far I've installed WAMP on my computer.
Any advice on how to create this project? | php | c++ | mysql | apache | wamp | 03/14/2012 22:09:24 | not a real question | Creating Server Application
===
Okay, this is what I'm trying to do:
* I want to have 5-10 clients (programmed in C++) each sending 1 text file every 2 min to my server. The server extracts info from the text files and places them in the database.
* I have a few clients (using a browser) that need to view the data as it comes in. They may have to login. The data has to be kept up to date as the server receives new information. Probably a 10 second delay from the time the new data is inserted to the time the browser clients view it.
* I have a week to complete this and am familiar with C++, sql, and some php. So far I've installed WAMP on my computer.
Any advice on how to create this project? | 1 |
2,264,687 | 02/15/2010 08:20:13 | 152,986 | 08/08/2009 14:32:04 | 128 | 3 | Get Flash CS4 Intelisense to recognize Objects on stage? | When I create an object of a movieclip in code I get the flash intlesense to pop up in Flash CS4 Actions panel which is very helpful but if I simply place a moveclip on the stage then give it an object name in the options the Flash intlesense does not pop up in my code.
Anyway to get Flash intlisense to work with objects placed on the stage from the library? | flash | flash-cs4 | actionscript-3 | null | null | null | open | Get Flash CS4 Intelisense to recognize Objects on stage?
===
When I create an object of a movieclip in code I get the flash intlesense to pop up in Flash CS4 Actions panel which is very helpful but if I simply place a moveclip on the stage then give it an object name in the options the Flash intlesense does not pop up in my code.
Anyway to get Flash intlisense to work with objects placed on the stage from the library? | 0 |
5,505,846 | 03/31/2011 20:23:56 | 173,432 | 09/14/2009 22:45:13 | 809 | 13 | How to stop or pause php execution? | I want to do some basic debugging with print_r. When PHP hits that line I want it to stop or end whatever people usually do so I can see the output.
Thanks | php | null | null | null | null | null | open | How to stop or pause php execution?
===
I want to do some basic debugging with print_r. When PHP hits that line I want it to stop or end whatever people usually do so I can see the output.
Thanks | 0 |
10,605,676 | 05/15/2012 17:13:18 | 888,473 | 08/10/2011 17:44:02 | 4 | 0 | Programmatically created view crashing | Patients: Two controllers -- ViewController and (modally presented) RecorderViewController
Symptoms: After the RecorderViewController is modally presented, it does some work. After being dismissed, the program crashes with EXC_BAD_ACCESS
In AppDelegate.m:
@synthesize window = _window;
@synthesize controller = _controller;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions
{
// Override point for customization after application launch.
self.controller = [ViewController alloc];
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.rootViewController = self.controller;
[self.window makeKeyAndVisible];
return YES;
}
In ViewController.m
#import "ViewController.h"
#import "RecorderViewController.h"
@interface ViewController ()
@end
@implementation ViewController
@synthesize presentModalButton;
- (void)loadView
{
self.view = [[UIView alloc] initWithFrame:[UIScreen mainScreen].applicationFrame];
self.presentModalButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
self.presentModalButton.frame = CGRectMake(0, self.view.frame.size.height/2, 100, 50);
[self.presentModalButton addTarget:self action:@selector(goToRecorderButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:self.presentModalButton];
}
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (IBAction)goToRecorderButtonPressed:(id)sender {
RecorderViewController *recorderVC = [RecorderViewController alloc];
[self presentModalViewController:recorderVC animated:YES];
}
- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
self.presentModalButton = nil;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}
@end
| ios | ios5 | null | null | null | null | open | Programmatically created view crashing
===
Patients: Two controllers -- ViewController and (modally presented) RecorderViewController
Symptoms: After the RecorderViewController is modally presented, it does some work. After being dismissed, the program crashes with EXC_BAD_ACCESS
In AppDelegate.m:
@synthesize window = _window;
@synthesize controller = _controller;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions
{
// Override point for customization after application launch.
self.controller = [ViewController alloc];
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.rootViewController = self.controller;
[self.window makeKeyAndVisible];
return YES;
}
In ViewController.m
#import "ViewController.h"
#import "RecorderViewController.h"
@interface ViewController ()
@end
@implementation ViewController
@synthesize presentModalButton;
- (void)loadView
{
self.view = [[UIView alloc] initWithFrame:[UIScreen mainScreen].applicationFrame];
self.presentModalButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
self.presentModalButton.frame = CGRectMake(0, self.view.frame.size.height/2, 100, 50);
[self.presentModalButton addTarget:self action:@selector(goToRecorderButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:self.presentModalButton];
}
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (IBAction)goToRecorderButtonPressed:(id)sender {
RecorderViewController *recorderVC = [RecorderViewController alloc];
[self presentModalViewController:recorderVC animated:YES];
}
- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
self.presentModalButton = nil;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}
@end
| 0 |
6,117,664 | 05/24/2011 22:27:08 | 757,613 | 05/17/2011 14:55:56 | 1 | 0 | UIImage imageNamed | Im trying to use a url as a UIImage in the OpenFlow API.
NSString *imageUrl = [[[newsEntries objectAtIndex:0] objectForKey: @"still"] retain];
NSURL *url2 = [NSURL URLWithString:imageUrl];
NSData *photoData = [NSData dataWithContentsOfURL:url2];
UIImage *imageUI = [UIImage imageWithData:photoData]
UIImageView *myImage = [UIImageView initWithFrame:imageUI];
[(AFOpenFlowView *)self.view setImage:[UIImage imageNamed:myImage]];
[imageUr release];
[(AFOpenFlowView *)self.view setNumberOfImages:3];
I have tried it like this, but no succes. The only way i got this API working was using the imageNamed type. The initwithData has no succes...
So how can i change this NSString to finally become a imageNamed method?
| iphone | null | null | null | null | null | open | UIImage imageNamed
===
Im trying to use a url as a UIImage in the OpenFlow API.
NSString *imageUrl = [[[newsEntries objectAtIndex:0] objectForKey: @"still"] retain];
NSURL *url2 = [NSURL URLWithString:imageUrl];
NSData *photoData = [NSData dataWithContentsOfURL:url2];
UIImage *imageUI = [UIImage imageWithData:photoData]
UIImageView *myImage = [UIImageView initWithFrame:imageUI];
[(AFOpenFlowView *)self.view setImage:[UIImage imageNamed:myImage]];
[imageUr release];
[(AFOpenFlowView *)self.view setNumberOfImages:3];
I have tried it like this, but no succes. The only way i got this API working was using the imageNamed type. The initwithData has no succes...
So how can i change this NSString to finally become a imageNamed method?
| 0 |
6,003,041 | 05/14/2011 16:07:38 | 753,770 | 05/14/2011 16:07:38 | 1 | 0 | How to reuse server side class in JAX-WS client? | I have a class on server side: ForumEntry, and I have a web service which returns a list of ForumEntry:
@WebService(name="ForumGeneral",serviceName="ForumGeneralService")
public class ForumGeneralService {
@WebMethod
public List<ForumEntry> getLatestTopics(String keyword,int count){
...
}
}
When using wsimport to generate webservice client, it finishes fine, but a new ForumEntry type's created based on the web service. That makes sense, as a nature of web service is that client and server sides are decoupled.
But what if I want to reuse the server side ForumEntry and avoid a client side dummy class being created?
I found a post: http://jamablog.blogspot.com/2007/08/how-to-make-jax-ws-client-reuse_22.html.
Follow the idea, I added jaxb annotations to my server side ForumEntry class:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "forumEntry", propOrder = {
"forumId",
"forumName",
})
public class ForumEntry
then used schemagen to generate the episode file, then passing it to wsimport using -b parameter. But I got problem as the generated episode file has entries for 'forumEntry':
[ERROR] SCD "~forumEntry" didnt match any schema component
I guess it means 'forumEntry's not showing up in WSDL, which is right:
<message name="getLatestTopics">
<part name="parameters" element="tns:getLatestTopics"></part>
</message>
<message name="getLatestTopicsResponse">
<part name="parameters" element="tns:getLatestTopicsResponse"></part>
</message>
So how do all parts fit together here, to reuse the server side class? | jaxb | jax-ws | null | null | null | null | open | How to reuse server side class in JAX-WS client?
===
I have a class on server side: ForumEntry, and I have a web service which returns a list of ForumEntry:
@WebService(name="ForumGeneral",serviceName="ForumGeneralService")
public class ForumGeneralService {
@WebMethod
public List<ForumEntry> getLatestTopics(String keyword,int count){
...
}
}
When using wsimport to generate webservice client, it finishes fine, but a new ForumEntry type's created based on the web service. That makes sense, as a nature of web service is that client and server sides are decoupled.
But what if I want to reuse the server side ForumEntry and avoid a client side dummy class being created?
I found a post: http://jamablog.blogspot.com/2007/08/how-to-make-jax-ws-client-reuse_22.html.
Follow the idea, I added jaxb annotations to my server side ForumEntry class:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "forumEntry", propOrder = {
"forumId",
"forumName",
})
public class ForumEntry
then used schemagen to generate the episode file, then passing it to wsimport using -b parameter. But I got problem as the generated episode file has entries for 'forumEntry':
[ERROR] SCD "~forumEntry" didnt match any schema component
I guess it means 'forumEntry's not showing up in WSDL, which is right:
<message name="getLatestTopics">
<part name="parameters" element="tns:getLatestTopics"></part>
</message>
<message name="getLatestTopicsResponse">
<part name="parameters" element="tns:getLatestTopicsResponse"></part>
</message>
So how do all parts fit together here, to reuse the server side class? | 0 |
11,047,918 | 06/15/2012 09:22:51 | 1,458,263 | 06/15/2012 09:15:07 | 1 | 0 | Need help in Struts? | I am new to Struts framework.. Don't know anything about Struts.
I searched on internet, I checked one site also name "roseindia" but they people start explaining things like you know the basic things about Struts.
Can anybody provide me any good links or book, from where I can start Struts as a "Beginner"
Thanks in Advance :)
| struts2 | struts | null | null | null | 06/15/2012 22:05:39 | not a real question | Need help in Struts?
===
I am new to Struts framework.. Don't know anything about Struts.
I searched on internet, I checked one site also name "roseindia" but they people start explaining things like you know the basic things about Struts.
Can anybody provide me any good links or book, from where I can start Struts as a "Beginner"
Thanks in Advance :)
| 1 |
11,631,540 | 07/24/2012 13:07:04 | 884,521 | 08/08/2011 17:24:32 | 624 | 15 | PHP download youtube video in different format | I would like to build an on-line application which is for download youtube videos in different format and different resolution in `php` or any other language.
Thanks in advance :) | php | jquery | ajax | json | php5 | 07/24/2012 13:16:21 | not a real question | PHP download youtube video in different format
===
I would like to build an on-line application which is for download youtube videos in different format and different resolution in `php` or any other language.
Thanks in advance :) | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.