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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4,366,753 | 12/06/2010 13:16:37 | 80,932 | 03/21/2009 19:08:42 | 1,094 | 60 | mysql: mysql_affected_rows() in C, what's the equivalent command in SQL? | after I perform an insert to a temporary table i would like to get the number of affected rows (how many rows i insert to the table).
what's the equivalent command of mysql_affected_rows() in SQL?
using Mysql Server 5.1
thanks | mysql-query | rows-affected | null | null | null | null | open | mysql: mysql_affected_rows() in C, what's the equivalent command in SQL?
===
after I perform an insert to a temporary table i would like to get the number of affected rows (how many rows i insert to the table).
what's the equivalent command of mysql_affected_rows() in SQL?
using Mysql Server 5.1
thanks | 0 |
10,281,404 | 04/23/2012 13:23:38 | 768,370 | 05/24/2011 19:11:05 | 35 | 0 | php rewrite rule | i know basicly how to use php rewrite engine, but...
this is my rewrite rule
the url is;
http://www.mypage.com/galeri.php?id=3
RewriteEngine On
RewriteRule ^galeri/([^/]*)$ /galeri.php?id=$1 [L]
and the result is;
http://www.mypage.com.tr/galeri/3
it works fine, but i have to change all url parameters inside the pages like;
from
<script type='text/javascript' src='js/jquery.min.js?ver=1.4.2'></script>//from this to...
<script type='text/javascript' src='http://mypage.com/js/jquery.min.js?ver=1.4.2'></script>
i'm sure there is an easy way to do this but how? | php | .htaccess | mod-rewrite | url-rewriting | null | null | open | php rewrite rule
===
i know basicly how to use php rewrite engine, but...
this is my rewrite rule
the url is;
http://www.mypage.com/galeri.php?id=3
RewriteEngine On
RewriteRule ^galeri/([^/]*)$ /galeri.php?id=$1 [L]
and the result is;
http://www.mypage.com.tr/galeri/3
it works fine, but i have to change all url parameters inside the pages like;
from
<script type='text/javascript' src='js/jquery.min.js?ver=1.4.2'></script>//from this to...
<script type='text/javascript' src='http://mypage.com/js/jquery.min.js?ver=1.4.2'></script>
i'm sure there is an easy way to do this but how? | 0 |
8,126,058 | 11/14/2011 18:09:18 | 273,657 | 02/15/2010 16:39:46 | 1,003 | 14 | Query insisting on columns in the 'Order By' clause match columns in the 'Group by' clause | A bit of an odd one this one. I am trying to run the following query joining 3 tables.
Select t3.id, t3.name, t3.phone_no, t1.reg_dtm, count(t1.reg_dtm)
from tableA t1, tableB t2, tableC t3
Where t1.id = t2.id
And t2.id = t3.id
Group by t3.id, t3.name, t3.phone_no, t1.reg_dtm
Order by t2.id, t1.reg_dtm
The above query returns the following error
ORA-00979: not a GROUP BY expression
But if i change it so that everything in the group by clause is in the order by clause then it works.
Select t3.id, t3.name, t3.phone_no, t1.reg_dtm, count(t1.reg_dtm)
from tableA t1, tableB t2, tableC t3
Where t1.id = t2.id
And t2.id = t3.id
Group by t3.id, t3.name, t3.phone_no, t1.reg_dtm
Order by t3.id, t3.name, t3.phone_no, t1.reg_dtm
What exactly is the reason for this?
I think the problem is possibly because t2.id shown in the `order by` statement on the first query is not part of the `group by` statement. If this is the cause then why does it matter? I have never experienced this before and didn't think that there was any relationship between the group by and the order by statements.
I tested the above on Oracle 10G as well as MySQL.
Thanks in advance | mysql | sql | oracle | oracle10g | null | null | open | Query insisting on columns in the 'Order By' clause match columns in the 'Group by' clause
===
A bit of an odd one this one. I am trying to run the following query joining 3 tables.
Select t3.id, t3.name, t3.phone_no, t1.reg_dtm, count(t1.reg_dtm)
from tableA t1, tableB t2, tableC t3
Where t1.id = t2.id
And t2.id = t3.id
Group by t3.id, t3.name, t3.phone_no, t1.reg_dtm
Order by t2.id, t1.reg_dtm
The above query returns the following error
ORA-00979: not a GROUP BY expression
But if i change it so that everything in the group by clause is in the order by clause then it works.
Select t3.id, t3.name, t3.phone_no, t1.reg_dtm, count(t1.reg_dtm)
from tableA t1, tableB t2, tableC t3
Where t1.id = t2.id
And t2.id = t3.id
Group by t3.id, t3.name, t3.phone_no, t1.reg_dtm
Order by t3.id, t3.name, t3.phone_no, t1.reg_dtm
What exactly is the reason for this?
I think the problem is possibly because t2.id shown in the `order by` statement on the first query is not part of the `group by` statement. If this is the cause then why does it matter? I have never experienced this before and didn't think that there was any relationship between the group by and the order by statements.
I tested the above on Oracle 10G as well as MySQL.
Thanks in advance | 0 |
6,296,095 | 06/09/2011 16:22:58 | 739,755 | 05/05/2011 10:49:20 | 13 | 0 | How to get rid of "The persisted entity with id XXX has a null version" in GWT ? | I am currently developing an app with GWT/RequestFactory and Hibernate/JPA as a peristence provider.
So I have started to modify my Entity classes, created EntityProxies, put the Version column with the corresponding mapping in orm.xml (sorry for annotations aficionados, I'm still doing it the old way), got hibernate generate database schema correctly but when I try to do things in it i have the exception :
@ProxyFor(XXXXX)
public interface UserProxy extends EntityProxy {
public Long getId();
public void setId(Long id);
public Integer getVersion();
public void setVersion(Integer version);
// removed ...
}
**`"The persisted entity with id XXX has a null version"`**
I have a look at the Database table, the version column is there ... **with a value**
so can somebody tell me what's wrong ? Any help would be appreciated ...
thanks a lot, | exception | gwt | version | requestfactory | null | null | open | How to get rid of "The persisted entity with id XXX has a null version" in GWT ?
===
I am currently developing an app with GWT/RequestFactory and Hibernate/JPA as a peristence provider.
So I have started to modify my Entity classes, created EntityProxies, put the Version column with the corresponding mapping in orm.xml (sorry for annotations aficionados, I'm still doing it the old way), got hibernate generate database schema correctly but when I try to do things in it i have the exception :
@ProxyFor(XXXXX)
public interface UserProxy extends EntityProxy {
public Long getId();
public void setId(Long id);
public Integer getVersion();
public void setVersion(Integer version);
// removed ...
}
**`"The persisted entity with id XXX has a null version"`**
I have a look at the Database table, the version column is there ... **with a value**
so can somebody tell me what's wrong ? Any help would be appreciated ...
thanks a lot, | 0 |
10,564,635 | 05/12/2012 14:34:49 | 1,328,809 | 04/12/2012 10:17:00 | 14 | 0 | virtual machine connection | I want to connect ubuntu virtual boxes with each other on a network. I want to use hadoop on it. So i need to put them in a network. It requires **ssh** to communicate. Can anyone help regarding it. | networking | virtualbox | null | null | null | 05/12/2012 15:00:08 | off topic | virtual machine connection
===
I want to connect ubuntu virtual boxes with each other on a network. I want to use hadoop on it. So i need to put them in a network. It requires **ssh** to communicate. Can anyone help regarding it. | 2 |
10,995,135 | 06/12/2012 10:48:53 | 1,450,950 | 06/12/2012 10:22:59 | 1 | 0 | EXC_BAD_ACCESS When NSSearchPathForDirectoriesInDomains in iOS5 | I'm developing an App that will update the UI every time a View "A" appear. I put the related code in the ViewWillAppear and this update will load some images in the document path of the app. Thus, I will load the related path in the section. And it works fine in the beginning, but if I navigate to another page (using navigationController to push page) and back to this page again several times, I will got an EXC_BAD_ACCESS. codes are below
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString* docPath = [paths objectAtIndex:0]; // EXC_BAD_ACCESS here
.....
And if I temporarily change the code by hard code the path like:
NSString* docPath = [NSString stringWithFormat:@"****/****/***/Documents"];
It will not crash.
I also tried to load the document path at ViewDidLoad and save the value to a variable which the property is (nonatomic, retain)
And in the ViewWillAppear, I load the path like:
NSString* docPath = self.documentPath;
but it will alos got an EXC_BAD_ACCESS at this line.
Before this line, I also tried to print the self.documentPath, and it will get the correct path string.
I really do not know why this would got this error message. Could anybody help me? Thanks!!
| iphone | ios | ios5 | null | null | null | open | EXC_BAD_ACCESS When NSSearchPathForDirectoriesInDomains in iOS5
===
I'm developing an App that will update the UI every time a View "A" appear. I put the related code in the ViewWillAppear and this update will load some images in the document path of the app. Thus, I will load the related path in the section. And it works fine in the beginning, but if I navigate to another page (using navigationController to push page) and back to this page again several times, I will got an EXC_BAD_ACCESS. codes are below
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString* docPath = [paths objectAtIndex:0]; // EXC_BAD_ACCESS here
.....
And if I temporarily change the code by hard code the path like:
NSString* docPath = [NSString stringWithFormat:@"****/****/***/Documents"];
It will not crash.
I also tried to load the document path at ViewDidLoad and save the value to a variable which the property is (nonatomic, retain)
And in the ViewWillAppear, I load the path like:
NSString* docPath = self.documentPath;
but it will alos got an EXC_BAD_ACCESS at this line.
Before this line, I also tried to print the self.documentPath, and it will get the correct path string.
I really do not know why this would got this error message. Could anybody help me? Thanks!!
| 0 |
9,061,501 | 01/30/2012 09:06:50 | 1,024,975 | 11/02/2011 05:15:53 | 1 | 0 | MatLab Programming Root Solver | Consider the cubic equation
ax3 + bx^2 + cx+d = 0
where
a, b, c, and d are real input coefficients. I was trying to develop a matlab program to find all roots of
equation (1). Your program
can not use the matlab built-in
functions
fzero and roots.
You should turn in a .m file cubicxxx.m which contains a matlab function of the form
function [rts,info] = cubicxxx(a,b,c,d)
where xxx is your student id, rts is the vector of roots and info is your output message.
Your program will be stress-tested against cubic equations that may have
1. random roots; or
2. very large or very small roots; or
3. multiple roots or nearly multiple roots; or
4. less than 3 roots or more than 3 roots.
You will receive credit for a test polynomial only if your program gets the number of roots
correctly, and only then will each correct root (accurate to within a relative error of at most 10^-10
as compared to the roots function in matlab) receive additional credit.
Do NOT use fzero or roots (both in lower case letters)
I will greatly appreciate if you could provide a draft of something that can simplify my analysis of this program. | matlab | null | null | null | null | 02/07/2012 09:40:11 | not constructive | MatLab Programming Root Solver
===
Consider the cubic equation
ax3 + bx^2 + cx+d = 0
where
a, b, c, and d are real input coefficients. I was trying to develop a matlab program to find all roots of
equation (1). Your program
can not use the matlab built-in
functions
fzero and roots.
You should turn in a .m file cubicxxx.m which contains a matlab function of the form
function [rts,info] = cubicxxx(a,b,c,d)
where xxx is your student id, rts is the vector of roots and info is your output message.
Your program will be stress-tested against cubic equations that may have
1. random roots; or
2. very large or very small roots; or
3. multiple roots or nearly multiple roots; or
4. less than 3 roots or more than 3 roots.
You will receive credit for a test polynomial only if your program gets the number of roots
correctly, and only then will each correct root (accurate to within a relative error of at most 10^-10
as compared to the roots function in matlab) receive additional credit.
Do NOT use fzero or roots (both in lower case letters)
I will greatly appreciate if you could provide a draft of something that can simplify my analysis of this program. | 4 |
8,244,846 | 11/23/2011 15:33:39 | 787,793 | 06/07/2011 15:42:46 | 128 | 4 | Build a web crawler in a desktop application (Final Year project suggestion) | I have a Final year project to do. I don't have any specific idea in my mind. I would certainly like to do internet based projects with AI implementation if possible.
I was just thinking if it is feasible to develop a desktop crawler that can extract images,videos from websites and stream in the same desktop application? The alternate way can be filtering the results from the results of google search. The web application can be optional but i would prefer desktop application.
Java or .Net would be preferable to me from programming aspect. I don't know if these platform are fine enough for a crawler. Any suggestion would be appreciated.
| java | .net | project | crawler | null | 11/24/2011 02:49:00 | off topic | Build a web crawler in a desktop application (Final Year project suggestion)
===
I have a Final year project to do. I don't have any specific idea in my mind. I would certainly like to do internet based projects with AI implementation if possible.
I was just thinking if it is feasible to develop a desktop crawler that can extract images,videos from websites and stream in the same desktop application? The alternate way can be filtering the results from the results of google search. The web application can be optional but i would prefer desktop application.
Java or .Net would be preferable to me from programming aspect. I don't know if these platform are fine enough for a crawler. Any suggestion would be appreciated.
| 2 |
1,663,956 | 11/02/2009 21:52:38 | 78,093 | 03/14/2009 17:41:45 | 610 | 14 | Drupal 5.x migrate content from one type to another | <p>I have a bunch of content in the page content type that I would like to migrate to a new custom content type. I don't need to add or remove fields or change the data stored in the content type at all, just straight copy them over. Is there a module to do this?</p> | drupal-5.x | content-management | null | null | null | null | open | Drupal 5.x migrate content from one type to another
===
<p>I have a bunch of content in the page content type that I would like to migrate to a new custom content type. I don't need to add or remove fields or change the data stored in the content type at all, just straight copy them over. Is there a module to do this?</p> | 0 |
6,315,861 | 06/11/2011 12:15:15 | 793,724 | 06/11/2011 05:54:31 | 1 | 0 | how apply Theme in dynamically master Page? | is there override PreInit in Master Page? or Inheritance of PreInit Possible in MasterPage? | c# | asp.net | null | null | null | null | open | how apply Theme in dynamically master Page?
===
is there override PreInit in Master Page? or Inheritance of PreInit Possible in MasterPage? | 0 |
8,705,424 | 01/02/2012 21:16:58 | 98,389 | 04/30/2009 09:14:47 | 3,379 | 93 | Under what circumstances is a change not written to a MongoDB database when safe mode is off? | I have safe mode turned off in my MongoDB database because none of the data being written is absolutely 100% mission critical and the gain in insertion speed is very important, but I would really prefer if all of the data is written to the database.
My understanding is that with journaling turned on and safe mode turned off, if the server crashes in the 100ms between when a write request is received and the data is output to the journal, the data can be lost.
If the data is successfully written to the journal, is it a pretty safe bet, even if the database is lagging due to heavy load, that the data will end up in the database when the database catches up and is able to process what's in the journal? Or is my understanding of what the journal does flawed? Are there any other circumstances under which inserted data may be lost?
What happens if I update a document a fraction of a second before another process attempts to read it, but the changes haven't been committed to the collection yet? Will the read block until the insert has completed? | mongodb | null | null | null | null | null | open | Under what circumstances is a change not written to a MongoDB database when safe mode is off?
===
I have safe mode turned off in my MongoDB database because none of the data being written is absolutely 100% mission critical and the gain in insertion speed is very important, but I would really prefer if all of the data is written to the database.
My understanding is that with journaling turned on and safe mode turned off, if the server crashes in the 100ms between when a write request is received and the data is output to the journal, the data can be lost.
If the data is successfully written to the journal, is it a pretty safe bet, even if the database is lagging due to heavy load, that the data will end up in the database when the database catches up and is able to process what's in the journal? Or is my understanding of what the journal does flawed? Are there any other circumstances under which inserted data may be lost?
What happens if I update a document a fraction of a second before another process attempts to read it, but the changes haven't been committed to the collection yet? Will the read block until the insert has completed? | 0 |
2,879,094 | 05/21/2010 01:44:52 | 15,609 | 09/17/2008 11:07:50 | 2,898 | 116 | jQuery click event still firing on filtered element | I'm trying to filter button events based on whether they have a CSS class assigned to them or not.
Assume I have a button like this:
<button id="save-button" class="ui-state-default ui-corner-all">Save</button>
I want to get jQuery to select all buttons that currently *do not* have a class of "ui-state-disabled". The selector I'm using looks like this:
$('#save-button:not(.ui-state-disabled)').click(function() {
...
});
When the button is clicked, I'll call a different function, do some stuff and then add the class 'ui-state-disabled' to the button. However the button still continues to accept click events.
I'm guessing this is because of two possible causes:
1. The event binder looks only at the initial state when binding the click event and doesn't recognise that a new class has been added later on
2. My filter ['... :not(.ui-state-disabled)] is not correct
Any observations? | jquery | events | css-selectors | null | null | null | open | jQuery click event still firing on filtered element
===
I'm trying to filter button events based on whether they have a CSS class assigned to them or not.
Assume I have a button like this:
<button id="save-button" class="ui-state-default ui-corner-all">Save</button>
I want to get jQuery to select all buttons that currently *do not* have a class of "ui-state-disabled". The selector I'm using looks like this:
$('#save-button:not(.ui-state-disabled)').click(function() {
...
});
When the button is clicked, I'll call a different function, do some stuff and then add the class 'ui-state-disabled' to the button. However the button still continues to accept click events.
I'm guessing this is because of two possible causes:
1. The event binder looks only at the initial state when binding the click event and doesn't recognise that a new class has been added later on
2. My filter ['... :not(.ui-state-disabled)] is not correct
Any observations? | 0 |
4,358,608 | 12/05/2010 11:42:56 | 531,160 | 12/05/2010 11:42:56 | 1 | 0 | PHP - imap/pop3 and Hotmail - Does anybody have working code ? | I'm trying almost 2 days with many different classes and codes to download emails from hotmail but still can't find any working code.
Does anybody have working code that can download emails from hotmail ?
Thanks | imap | hotmail | pop | null | null | 12/09/2010 03:26:46 | not a real question | PHP - imap/pop3 and Hotmail - Does anybody have working code ?
===
I'm trying almost 2 days with many different classes and codes to download emails from hotmail but still can't find any working code.
Does anybody have working code that can download emails from hotmail ?
Thanks | 1 |
9,861,996 | 03/25/2012 16:46:26 | 1,070,040 | 11/28/2011 19:54:51 | 1 | 4 | Generating Sequential Transaction ID's in Java | > Hi ,
>
> I want to generate Sequential Trnsaction ID's for employees to store in the Database
> ... I wrote the below jsp code(This ain't the code to insert Tx ID in the database) ..The code works fine .. When i use order by clause to see the latest transaction ..i'm not getting the expected transation ID...How can i make the transaction ID's unique , Sequential so that i can retrieve them in a particular sequence by using Order By clause?
>
> <%
>
String url = "jdbc:mysql://localhost:3306/";
> String dbName = "ystem";
> String driver = "com.mysql.jdbc.Driver";
> String userName = "root";
> String password = "";
> try {
> Class.forName(driver).newInstance();
> Connection conn = DriverManager.getConnection(url+dbName,userName,password);
> Statement stat=conn.createStatement();
> ResultSet rs=stat.executeQuery("select count(*) from `employee`");
> int x=0;
> UUID idOne = UUID.randomUUID();
> while(rs.next())
> {
>
> x=Integer.parseInt(rs.getString(1))+1;
>
> }
> out.println(idOne.toString().toUpperCase()+"-"+String.valueOf(x));
> stat.close(); conn.close();
> }
> catch(Exception x)
> {
> out.println(x.getMessage());
> }
> %>
| java | database | string | null | null | null | open | Generating Sequential Transaction ID's in Java
===
> Hi ,
>
> I want to generate Sequential Trnsaction ID's for employees to store in the Database
> ... I wrote the below jsp code(This ain't the code to insert Tx ID in the database) ..The code works fine .. When i use order by clause to see the latest transaction ..i'm not getting the expected transation ID...How can i make the transaction ID's unique , Sequential so that i can retrieve them in a particular sequence by using Order By clause?
>
> <%
>
String url = "jdbc:mysql://localhost:3306/";
> String dbName = "ystem";
> String driver = "com.mysql.jdbc.Driver";
> String userName = "root";
> String password = "";
> try {
> Class.forName(driver).newInstance();
> Connection conn = DriverManager.getConnection(url+dbName,userName,password);
> Statement stat=conn.createStatement();
> ResultSet rs=stat.executeQuery("select count(*) from `employee`");
> int x=0;
> UUID idOne = UUID.randomUUID();
> while(rs.next())
> {
>
> x=Integer.parseInt(rs.getString(1))+1;
>
> }
> out.println(idOne.toString().toUpperCase()+"-"+String.valueOf(x));
> stat.close(); conn.close();
> }
> catch(Exception x)
> {
> out.println(x.getMessage());
> }
> %>
| 0 |
1,239,761 | 08/06/2009 15:41:29 | 125,449 | 06/18/2009 22:56:28 | 183 | 12 | Strategy for Crowd Sourcing and Iterative Development | I've recently gotten involved with a crowd sourcing project. Two issues I've found, one more programming related than the other:
1) Do you guys recommend going through a closed beta testing period? Or encourage as many people as you can to use the site? What are ways of advertising to get the word out there?
2) Once you have your product launched, how often do you guys iterate on the public site? Do you only change the site once major bugs / features are fixed? Or do you update on a daily basis? I know that I should keep my current version separate from the version that is currently being used by the users -- what tools do people use to do this kind of development?
Thanks for any input,
Michael | crowdsourcing | iterating | null | null | null | 03/26/2012 20:56:47 | not constructive | Strategy for Crowd Sourcing and Iterative Development
===
I've recently gotten involved with a crowd sourcing project. Two issues I've found, one more programming related than the other:
1) Do you guys recommend going through a closed beta testing period? Or encourage as many people as you can to use the site? What are ways of advertising to get the word out there?
2) Once you have your product launched, how often do you guys iterate on the public site? Do you only change the site once major bugs / features are fixed? Or do you update on a daily basis? I know that I should keep my current version separate from the version that is currently being used by the users -- what tools do people use to do this kind of development?
Thanks for any input,
Michael | 4 |
3,740,425 | 09/18/2010 04:49:25 | 422,430 | 08/17/2010 04:39:57 | 11 | 1 | password protect asp.net application? | I have built an ASP.NET application that needs to be password protected. This application will be installed on multiple offline computers, and we need to make sure that when being installed it requires a password. But even if it requires a password, someone can easily copy the database and the published folder and duplicate the application on their system right?
I need a way to prevent this. Any ideas? It should only work on laptops that we have installed it on. | asp.net | security | copy-protection | null | null | 01/27/2012 18:28:41 | not a real question | password protect asp.net application?
===
I have built an ASP.NET application that needs to be password protected. This application will be installed on multiple offline computers, and we need to make sure that when being installed it requires a password. But even if it requires a password, someone can easily copy the database and the published folder and duplicate the application on their system right?
I need a way to prevent this. Any ideas? It should only work on laptops that we have installed it on. | 1 |
11,423,823 | 07/11/2012 00:14:19 | 103,807 | 05/08/2009 20:22:51 | 389 | 5 | How do I suppress all error messages in an iOS project? | I have included a static library subproject that has over 1000 warning messages that, after testing, appear to be inconsequential to the overall project. How can I suppress these messages for this subproject that I don't intend to touch? | ios | warnings | null | null | null | null | open | How do I suppress all error messages in an iOS project?
===
I have included a static library subproject that has over 1000 warning messages that, after testing, appear to be inconsequential to the overall project. How can I suppress these messages for this subproject that I don't intend to touch? | 0 |
3,584,735 | 08/27/2010 13:43:57 | 122,456 | 06/13/2009 13:24:48 | 73 | 1 | How to run xCode 3.2.2 project on xCode 3.2.3? | I have a iPhone project write on xCode 3.2.2 but i want run it on xCode 3.2.3! I try do it but it show me a message "error: There is no SDK with the name or path 'iphonesimulator3.1.2'
". Anybody can tell me how to run my project on xCode 3.2.3. Thanks :) | iphone | osx | ios | null | null | null | open | How to run xCode 3.2.2 project on xCode 3.2.3?
===
I have a iPhone project write on xCode 3.2.2 but i want run it on xCode 3.2.3! I try do it but it show me a message "error: There is no SDK with the name or path 'iphonesimulator3.1.2'
". Anybody can tell me how to run my project on xCode 3.2.3. Thanks :) | 0 |
10,990,532 | 06/12/2012 04:25:46 | 526,095 | 12/01/2010 05:23:02 | 622 | 6 | How to set the reference to avoid delete any returned objects in Sharepoint | I have the following question.
Can any one explain this?
A web part named mySampleWebpart is created. mySampleWebpart is used in a SharPoint site with URL
http://www.contoso.com/WP.
A reference to the current subsite of mySampleWebpart will be created.
How can the reference be created and at the same time avoid being forced to delete any returned objects?
| sharepoint | sharepoint2010 | null | null | null | 06/13/2012 22:46:17 | not a real question | How to set the reference to avoid delete any returned objects in Sharepoint
===
I have the following question.
Can any one explain this?
A web part named mySampleWebpart is created. mySampleWebpart is used in a SharPoint site with URL
http://www.contoso.com/WP.
A reference to the current subsite of mySampleWebpart will be created.
How can the reference be created and at the same time avoid being forced to delete any returned objects?
| 1 |
7,558,259 | 09/26/2011 16:35:30 | 511,273 | 11/17/2010 20:10:21 | 56 | 1 | What's the best way to send the resultant widestring data padded with xml | The following function produces a widestring to perfdata. How do I send that data to an echo server. I want the echo server to be able to handle single byte chars, too.
I'm using boost::asio.
RegQueryValueEx(hSubKey, TEXT("DisplayName"), NULL, NULL, (LPBYTE) PerfData, &cbData); | c++ | boost-asio | null | null | null | null | open | What's the best way to send the resultant widestring data padded with xml
===
The following function produces a widestring to perfdata. How do I send that data to an echo server. I want the echo server to be able to handle single byte chars, too.
I'm using boost::asio.
RegQueryValueEx(hSubKey, TEXT("DisplayName"), NULL, NULL, (LPBYTE) PerfData, &cbData); | 0 |
11,304,782 | 07/03/2012 05:05:56 | 1,497,751 | 07/03/2012 04:59:21 | 1 | 0 | your project contains error(s) please fix before running | I am developing a simple android application But when I run eclipse tell me the error:Your project contains error(s), please fix it before running it. I can't find any error in my project or there is not have error in my application. *there is red exclamatory mark under the project name.*
plz help me!! | android | null | null | null | null | 07/03/2012 15:15:34 | not a real question | your project contains error(s) please fix before running
===
I am developing a simple android application But when I run eclipse tell me the error:Your project contains error(s), please fix it before running it. I can't find any error in my project or there is not have error in my application. *there is red exclamatory mark under the project name.*
plz help me!! | 1 |
10,045,140 | 04/06/2012 14:49:40 | 671,805 | 03/22/2011 18:53:15 | 215 | 6 | One-vs-one SVM in MATLAB | I wish to implement multi-class SVM using one-vs-one method on fisheriris data in MATLAB.
How can I do so ? | matlab | svm | null | null | null | null | open | One-vs-one SVM in MATLAB
===
I wish to implement multi-class SVM using one-vs-one method on fisheriris data in MATLAB.
How can I do so ? | 0 |
5,614,247 | 04/10/2011 19:45:53 | 560,129 | 01/02/2011 03:50:18 | 187 | 9 | android to leopard board communication | I have an android xoom and a leopard board dm365 and I would like to stream images from the board to the tablet at a rate as close to real time as possible. The leopard board has a serial, ethernet, and microusb connection on it and can probobly do bluetooth with enough work. How should they connect and which libraries should I use in the android end to talk to the leopard biard,. | android | null | null | null | null | null | open | android to leopard board communication
===
I have an android xoom and a leopard board dm365 and I would like to stream images from the board to the tablet at a rate as close to real time as possible. The leopard board has a serial, ethernet, and microusb connection on it and can probobly do bluetooth with enough work. How should they connect and which libraries should I use in the android end to talk to the leopard biard,. | 0 |
655,235 | 03/17/2009 17:25:08 | 47,222 | 12/17/2008 22:09:54 | 158 | 9 | Is Root domain CNAME to other domain allowed by DNS RFC? | We are hosting the page of many of our customers. We want to be able to provide our customers with a subdomain of our own domain like customerpages.ourdomain.com so they can create a CNAME to this subdomain.
www.customer1.com CNAME customerpages.ourdomain.com. {This will work just fine.}
But the situation is I don't know if all our customers will be able to place the following CNAME
customer1.com CNAME customerpages.ourdomain.com
This last CNAME looks like it's against the RFC of DNS.
Any thoughts will be appreciated. | cname | dns | null | null | null | 10/24/2011 18:08:14 | off topic | Is Root domain CNAME to other domain allowed by DNS RFC?
===
We are hosting the page of many of our customers. We want to be able to provide our customers with a subdomain of our own domain like customerpages.ourdomain.com so they can create a CNAME to this subdomain.
www.customer1.com CNAME customerpages.ourdomain.com. {This will work just fine.}
But the situation is I don't know if all our customers will be able to place the following CNAME
customer1.com CNAME customerpages.ourdomain.com
This last CNAME looks like it's against the RFC of DNS.
Any thoughts will be appreciated. | 2 |
1,052,895 | 06/27/2009 14:19:32 | 51,387 | 01/04/2009 14:57:34 | 398 | 8 | Star rating in AJAX with Ruby On Rails | I think that acts_as_rateable seems to be quite obsolete and doesn't support AJAX.
I'm looking for a simple "5 star" rating system: is there any plugin or tutorial that can help? | ajax | rating | ruby-on-rails | null | null | 08/16/2011 01:15:37 | not constructive | Star rating in AJAX with Ruby On Rails
===
I think that acts_as_rateable seems to be quite obsolete and doesn't support AJAX.
I'm looking for a simple "5 star" rating system: is there any plugin or tutorial that can help? | 4 |
10,438,855 | 05/03/2012 20:28:08 | 290,835 | 10/16/2008 02:50:26 | 1,462 | 78 | writing file in %TEMP% fails silently | I have this function which writes to my log file. It is failing silently. In that there are no errors raised in this function, it just fails to create or write to the file. I'm trying to write to %TEMP%\myappname.log. It also fails in %USERPROFILE%\Desktop\myappname.log. Server is Windows Server 2008 R2 Standard.
I've encountered this with writing to the application folder with other programs so moved to writing to the %TEMP% directory and this solved it. But this system won't even let me write to the %TEMP% directory.
Public Function LogMessage(ByVal strInput As String, Optional ByVal blnDate As Boolean = False) As Boolean
Dim intFileNumber As Integer
On Error GoTo ErrorHandler
If g_lngLogLevel <> 1 Then
Exit Function
End If
If Len(g_strLogPath) = 0 Then
SetLogPath
End If
If blnDate Then
strInput = Format(Now, cstrLogDateFormat) & " : " & strInput
End If
intFileNumber = FreeFile
Open g_strLogPath For Append As #intFileNumber
Print #intFileNumber, strInput
Close #intFileNumber
LogMessage = True
Exit Function
ErrorHandler:
MsgBox _
"Error: " & Err.Number & vbCrLf & _
"Location: Module1.LogMessage" & vbCrLf & _
"Line: " & Erl & vbCrLf & _
Err.Description, vbExclamation + vbOKOnly
End Function
| vba | vb6 | windows-server-2008 | null | null | null | open | writing file in %TEMP% fails silently
===
I have this function which writes to my log file. It is failing silently. In that there are no errors raised in this function, it just fails to create or write to the file. I'm trying to write to %TEMP%\myappname.log. It also fails in %USERPROFILE%\Desktop\myappname.log. Server is Windows Server 2008 R2 Standard.
I've encountered this with writing to the application folder with other programs so moved to writing to the %TEMP% directory and this solved it. But this system won't even let me write to the %TEMP% directory.
Public Function LogMessage(ByVal strInput As String, Optional ByVal blnDate As Boolean = False) As Boolean
Dim intFileNumber As Integer
On Error GoTo ErrorHandler
If g_lngLogLevel <> 1 Then
Exit Function
End If
If Len(g_strLogPath) = 0 Then
SetLogPath
End If
If blnDate Then
strInput = Format(Now, cstrLogDateFormat) & " : " & strInput
End If
intFileNumber = FreeFile
Open g_strLogPath For Append As #intFileNumber
Print #intFileNumber, strInput
Close #intFileNumber
LogMessage = True
Exit Function
ErrorHandler:
MsgBox _
"Error: " & Err.Number & vbCrLf & _
"Location: Module1.LogMessage" & vbCrLf & _
"Line: " & Erl & vbCrLf & _
Err.Description, vbExclamation + vbOKOnly
End Function
| 0 |
10,587,166 | 05/14/2012 16:15:57 | 191,384 | 10/16/2009 18:53:08 | 67 | 2 | Ajax reports back a '1' for IE | I'm trying to create a functional page for parents who refuse to download anything except IE on to their machine(s). Anyhow, its a list and I just wanted some AJAX togglable buttons that were backed up by a database.
I'm not sure what's up but the below gets called and received fine in both firefox & chrome. No matter what I do in IE (any version) I can't get it to work. The onreadystatechange function always receives and reports "1" instead of "off" or "on" as it should. This originally threw me because I was just trying to send 1's and 0's.
Anyhow, IE doesn't actually commit any of the values, so I imagine there's something wrong with the attempt to get to the PHP page and receive a response. Sorry for being a n00b, but what can cause this?
Unfortunately, the web page has some sensitive info I don't want people to see, so sensored code below:
JAVASCRIPT FUNCTION:
function toggleResponded(i) {
var respondedHttp;
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
respondedHttp=new XMLHttpRequest();
} else {// code for IE6, IE5
respondedHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
alert("toggling responded for element: " + i);
respondedHttp.onreadystatechange = function() {
if(respondedHttp.readyState==4 && respondedHttp.status==200) {
var state = respondedHttp.responseText;
alert("Recieved: " + state);
if(state == "off") {
document.getElementById("respond"+i).className = "inLineOff";
document.getElementById("respond"+i).innerHTML = "No Response Yet";
document.getElementById("attend"+i).style.display="none";
document.getElementById("quantityCell"+i).style.display="none";
} else if(state == "on") {
document.getElementById("respond"+i).className = "inLineOn";
document.getElementById("respond"+i).innerHTML = "Responded";
document.getElementById("attend"+i).style.display="inline";
if(document.getElementById("attend"+i).innerHTML == "Attending") {
document.getElementById("quantityCell"+i).style.display="table-cell";
}
} else {
alert("error: " + state);
}
}
}
var name = peeps.people[i];
alert("toggling for: " + name);
alert("toggling as: " + encodeURIComponent(name));
var ops = "./quer.php?";
ops += "op=toggleResponded";
ops += "&name=" + encodeURIComponent(name);
alert("going to: " + ops);
respondedHttp.open("GET", ops, true);
respondedHttp.send();
}
PHP:
if(isset($_GET["op"])) {
switch($_GET["op"]) {
case "toggleResponded":
$name = mysql_real_escape_string(rawurldecode($_GET["name"]));
$database->executeStatement("SELECT * FROM table WHERE nameField='$name'");
$info = $database->nextResult();
$nval = 0;
if($info["Responded"] == 0) {
$nval = 1;
}
$database->executeStatement("UPDATE table SET field='$nval' WHERE nameField='$name'");
if($nval == 1) {
echo "on";
} else {
echo "off";
}
break; | php | javascript | ajax | internet-explorer | null | null | open | Ajax reports back a '1' for IE
===
I'm trying to create a functional page for parents who refuse to download anything except IE on to their machine(s). Anyhow, its a list and I just wanted some AJAX togglable buttons that were backed up by a database.
I'm not sure what's up but the below gets called and received fine in both firefox & chrome. No matter what I do in IE (any version) I can't get it to work. The onreadystatechange function always receives and reports "1" instead of "off" or "on" as it should. This originally threw me because I was just trying to send 1's and 0's.
Anyhow, IE doesn't actually commit any of the values, so I imagine there's something wrong with the attempt to get to the PHP page and receive a response. Sorry for being a n00b, but what can cause this?
Unfortunately, the web page has some sensitive info I don't want people to see, so sensored code below:
JAVASCRIPT FUNCTION:
function toggleResponded(i) {
var respondedHttp;
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
respondedHttp=new XMLHttpRequest();
} else {// code for IE6, IE5
respondedHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
alert("toggling responded for element: " + i);
respondedHttp.onreadystatechange = function() {
if(respondedHttp.readyState==4 && respondedHttp.status==200) {
var state = respondedHttp.responseText;
alert("Recieved: " + state);
if(state == "off") {
document.getElementById("respond"+i).className = "inLineOff";
document.getElementById("respond"+i).innerHTML = "No Response Yet";
document.getElementById("attend"+i).style.display="none";
document.getElementById("quantityCell"+i).style.display="none";
} else if(state == "on") {
document.getElementById("respond"+i).className = "inLineOn";
document.getElementById("respond"+i).innerHTML = "Responded";
document.getElementById("attend"+i).style.display="inline";
if(document.getElementById("attend"+i).innerHTML == "Attending") {
document.getElementById("quantityCell"+i).style.display="table-cell";
}
} else {
alert("error: " + state);
}
}
}
var name = peeps.people[i];
alert("toggling for: " + name);
alert("toggling as: " + encodeURIComponent(name));
var ops = "./quer.php?";
ops += "op=toggleResponded";
ops += "&name=" + encodeURIComponent(name);
alert("going to: " + ops);
respondedHttp.open("GET", ops, true);
respondedHttp.send();
}
PHP:
if(isset($_GET["op"])) {
switch($_GET["op"]) {
case "toggleResponded":
$name = mysql_real_escape_string(rawurldecode($_GET["name"]));
$database->executeStatement("SELECT * FROM table WHERE nameField='$name'");
$info = $database->nextResult();
$nval = 0;
if($info["Responded"] == 0) {
$nval = 1;
}
$database->executeStatement("UPDATE table SET field='$nval' WHERE nameField='$name'");
if($nval == 1) {
echo "on";
} else {
echo "off";
}
break; | 0 |
9,168,087 | 02/06/2012 22:11:40 | 986,443 | 10/09/2011 14:40:47 | 27 | 0 | How to send facebook chat message from android application | <br>
Is there a way to send a facebook chat message to user's friends (not to all of them, one at each time) from android application? | android | facebook | null | null | null | 05/08/2012 12:51:29 | not a real question | How to send facebook chat message from android application
===
<br>
Is there a way to send a facebook chat message to user's friends (not to all of them, one at each time) from android application? | 1 |
4,146,341 | 11/10/2010 15:55:50 | 477,057 | 10/15/2010 15:20:01 | 15 | 7 | Core-plot configuration error | I am trying to use core-plot and I followed the instruction from the following project page to use it.
http://code.google.com/p/core-plot/wiki/UsingCorePlotInApplications, which is
You can install the SDK with a standard Mac installer package, or by hand. Here is how you install by hand.
1. Copy the CorePlotSDK directory to ~/Library/SDKs/
2. Add to your project's .PCH file:
#import < CorePlot/CorePlot.h >
3. Open Project -> Edit Project Settings and for All Configurations:
3a. Add to Additional SDKS:
$HOME/Library/SDKs/CorePlotSDK/${PLATFORM_NAME}.sdk
3b. Add to Other Linker Flags:
-ObjC -all_load -lCorePlot
4. Add the QuartzCore framework to the project.
5. Add a CPGraph to your application.
I went with the SDK install options: I installed it with Mac installer Package, it got installed in the following location /Library/SDKs/iphoneos.sdk and /Library/SDKs/iphonesimulator.os
Then i did step 2 as mentioned.
**For 3a i added /Library/SDKs/iphonesimulator.os**
Then i did 3b and then 4.
After that I tried to do a build and see how does it works and i get the following errors:
<command line>:1:0 <command line>:1:1: warning: "__IPHONE_OS_VERSION_MIN_REQUIRED" redefined
<command line>:1:0 <command line>:1:1: warning: this is the location of the previous definition
/var/folders/+r/+rBG+BziF1OqK12XNyw1ak+++TM/-Caches-/com.apple.Xcode.502/CompositeSDKs/iphonesimulator-iPhoneSimulator4.1-cztutytisanvsqaptkdkpoyyctln/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250:0 /var/folders/+r/+rBG+BziF1OqK12XNyw1ak+++TM/-Caches-/com.apple.Xcode.502/CompositeSDKs/iphonesimulator-iPhoneSimulator4.1-cztutytisanvsqaptkdkpoyyctln/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250: error: syntax error before '^' token
/var/folders/+r/+rBG+BziF1OqK12XNyw1ak+++TM/-Caches-/com.apple.Xcode.502/CompositeSDKs/iphonesimulator-iPhoneSimulator4.1-cztutytisanvsqaptkdkpoyyctln/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250:0 /var/folders/+r/+rBG+BziF1OqK12XNyw1ak+++TM/-Caches-/com.apple.Xcode.502/CompositeSDKs/iphonesimulator-iPhoneSimulator4.1-cztutytisanvsqaptkdkpoyyctln/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250: error: 'type name' declared as function returning a function
This appears 20 times. and it points all to UIView.h
There are same question in the stackoverflow and people suggested to change the compiler to 4.2 and for lot of people it worked, but for me the compiler was always set to 4.2 and still I get the same error.
**On 3a if do /Library/SDKs/iphoneos.sdk**
I get the following error
error: Composite SDK failed: The base SDK uses platform 'iphonesimulator', but an additional SDK uses platform 'iphoneos'. All SDKs must use the same platform (PLATFORM_NAME).
Please help
| configuration | core-plot | null | null | null | null | open | Core-plot configuration error
===
I am trying to use core-plot and I followed the instruction from the following project page to use it.
http://code.google.com/p/core-plot/wiki/UsingCorePlotInApplications, which is
You can install the SDK with a standard Mac installer package, or by hand. Here is how you install by hand.
1. Copy the CorePlotSDK directory to ~/Library/SDKs/
2. Add to your project's .PCH file:
#import < CorePlot/CorePlot.h >
3. Open Project -> Edit Project Settings and for All Configurations:
3a. Add to Additional SDKS:
$HOME/Library/SDKs/CorePlotSDK/${PLATFORM_NAME}.sdk
3b. Add to Other Linker Flags:
-ObjC -all_load -lCorePlot
4. Add the QuartzCore framework to the project.
5. Add a CPGraph to your application.
I went with the SDK install options: I installed it with Mac installer Package, it got installed in the following location /Library/SDKs/iphoneos.sdk and /Library/SDKs/iphonesimulator.os
Then i did step 2 as mentioned.
**For 3a i added /Library/SDKs/iphonesimulator.os**
Then i did 3b and then 4.
After that I tried to do a build and see how does it works and i get the following errors:
<command line>:1:0 <command line>:1:1: warning: "__IPHONE_OS_VERSION_MIN_REQUIRED" redefined
<command line>:1:0 <command line>:1:1: warning: this is the location of the previous definition
/var/folders/+r/+rBG+BziF1OqK12XNyw1ak+++TM/-Caches-/com.apple.Xcode.502/CompositeSDKs/iphonesimulator-iPhoneSimulator4.1-cztutytisanvsqaptkdkpoyyctln/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250:0 /var/folders/+r/+rBG+BziF1OqK12XNyw1ak+++TM/-Caches-/com.apple.Xcode.502/CompositeSDKs/iphonesimulator-iPhoneSimulator4.1-cztutytisanvsqaptkdkpoyyctln/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250: error: syntax error before '^' token
/var/folders/+r/+rBG+BziF1OqK12XNyw1ak+++TM/-Caches-/com.apple.Xcode.502/CompositeSDKs/iphonesimulator-iPhoneSimulator4.1-cztutytisanvsqaptkdkpoyyctln/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250:0 /var/folders/+r/+rBG+BziF1OqK12XNyw1ak+++TM/-Caches-/com.apple.Xcode.502/CompositeSDKs/iphonesimulator-iPhoneSimulator4.1-cztutytisanvsqaptkdkpoyyctln/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250: error: 'type name' declared as function returning a function
This appears 20 times. and it points all to UIView.h
There are same question in the stackoverflow and people suggested to change the compiler to 4.2 and for lot of people it worked, but for me the compiler was always set to 4.2 and still I get the same error.
**On 3a if do /Library/SDKs/iphoneos.sdk**
I get the following error
error: Composite SDK failed: The base SDK uses platform 'iphonesimulator', but an additional SDK uses platform 'iphoneos'. All SDKs must use the same platform (PLATFORM_NAME).
Please help
| 0 |
9,622,552 | 03/08/2012 18:07:02 | 937,684 | 09/09/2011 23:05:01 | 34 | 3 | Minecraft Mod portable torch/lantern | I have just started making a mod for minecraft, I learned how to make items and import custom png's and have gotten all of that to work. I have been searching around the code trying to find a way to make a item being held or in the inventory give off light around the player. I do have experience coding in java, but I am not well antiquated with the minecraft code. Thank you very much in advance.
(This is using mcp 5.6 with modloader in minecraft 1.1 with eclipse) | java | eclipse | minecraft | mod | null | 03/08/2012 23:21:28 | off topic | Minecraft Mod portable torch/lantern
===
I have just started making a mod for minecraft, I learned how to make items and import custom png's and have gotten all of that to work. I have been searching around the code trying to find a way to make a item being held or in the inventory give off light around the player. I do have experience coding in java, but I am not well antiquated with the minecraft code. Thank you very much in advance.
(This is using mcp 5.6 with modloader in minecraft 1.1 with eclipse) | 2 |
9,994,688 | 04/03/2012 13:49:57 | 1,259,374 | 03/09/2012 13:19:02 | 13 | 0 | is it possible to change packet ip with PcapSharp? | i cannot find any documentation of this project
| c# | null | null | null | null | 07/18/2012 17:19:41 | not a real question | is it possible to change packet ip with PcapSharp?
===
i cannot find any documentation of this project
| 1 |
5,830,685 | 04/29/2011 10:06:25 | 730,831 | 04/29/2011 10:06:25 | 1 | 0 | how to use text file | how to use text file through code for iphone | iphone | null | null | null | null | 04/29/2011 11:17:07 | not a real question | how to use text file
===
how to use text file through code for iphone | 1 |
7,967,186 | 11/01/2011 13:29:20 | 928,664 | 09/05/2011 10:23:58 | 43 | 4 | Touch move in Cocos2d | i have problem in Touch Event.
i have 5 sprite and i want to move a single sprite And only select sprite. but in this when i move touch then only one Sprite is move How move only select Sprite..
in .h file
CCSprite *puzzButton1,*puzzButton2,*puzzButton3;
in .m file
// create and initialize our seeker sprite, and add it to this layer
puzzButton1 = [CCSprite spriteWithFile: @"ingame_button_idal.png"];
puzzButton1.position = ccp( 480/2, 320/2 );
[self addChild:puzzButton1];
// create and initialize our seeker sprite, and add it to this layer
puzzButton2 = [CCSprite spriteWithFile: @"ingame_button_idal.png"];
puzzButton2.position = ccp( 100, 200 );
[self addChild:puzzButton2];
// create and initialize our seeker sprite, and add it to this layer
puzzButton3 = [CCSprite spriteWithFile: @"ingame_button_idal.png"];
puzzButton3.position = ccp( 100, 300 );
[self addChild:puzzButton3];
and in
- (BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event
{
return TRUE;
}
- (void)ccTouchMoved:(UITouch *)touch withEvent:(UIEvent *)event
{
CGPoint location = [self convertTouchToNodeSpace: touch];
[puzzButton1 stopAllActions];
[puzzButton1 runAction: [CCMoveTo actionWithDuration:0.1 position:location]];
}
| cocos2d | cocos2d-iphone | null | null | null | null | open | Touch move in Cocos2d
===
i have problem in Touch Event.
i have 5 sprite and i want to move a single sprite And only select sprite. but in this when i move touch then only one Sprite is move How move only select Sprite..
in .h file
CCSprite *puzzButton1,*puzzButton2,*puzzButton3;
in .m file
// create and initialize our seeker sprite, and add it to this layer
puzzButton1 = [CCSprite spriteWithFile: @"ingame_button_idal.png"];
puzzButton1.position = ccp( 480/2, 320/2 );
[self addChild:puzzButton1];
// create and initialize our seeker sprite, and add it to this layer
puzzButton2 = [CCSprite spriteWithFile: @"ingame_button_idal.png"];
puzzButton2.position = ccp( 100, 200 );
[self addChild:puzzButton2];
// create and initialize our seeker sprite, and add it to this layer
puzzButton3 = [CCSprite spriteWithFile: @"ingame_button_idal.png"];
puzzButton3.position = ccp( 100, 300 );
[self addChild:puzzButton3];
and in
- (BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event
{
return TRUE;
}
- (void)ccTouchMoved:(UITouch *)touch withEvent:(UIEvent *)event
{
CGPoint location = [self convertTouchToNodeSpace: touch];
[puzzButton1 stopAllActions];
[puzzButton1 runAction: [CCMoveTo actionWithDuration:0.1 position:location]];
}
| 0 |
9,404,130 | 02/22/2012 22:26:40 | 1,226,979 | 02/22/2012 22:07:09 | 1 | 0 | How to sum up counts in file one and write in interval in file two in python or R? | I am very new to Python, but I can't find answers to my specific amateur question...
I have two files, file 1 contains numbers and counts:
20 1
23 5
22 90
99 4
43 10
50 63
60 9
etc.
file 2 contains intervals:
0 19
20 39
40 59
60 79
80 99
I plan to read file 2 one line at a time, then count up the sums from file 1 that belongs the interval in file 2. so the output will be like this:
0 19 0
20 39 96
40 59 73
60 79 9
80 99 4
I am struggling to write a loop for it. I can do this in R, but the entire file is too large and it take ages to complete. any pointers will be appreciated!
Thank you very much.
| python | r | null | null | null | 06/20/2012 12:13:15 | not a real question | How to sum up counts in file one and write in interval in file two in python or R?
===
I am very new to Python, but I can't find answers to my specific amateur question...
I have two files, file 1 contains numbers and counts:
20 1
23 5
22 90
99 4
43 10
50 63
60 9
etc.
file 2 contains intervals:
0 19
20 39
40 59
60 79
80 99
I plan to read file 2 one line at a time, then count up the sums from file 1 that belongs the interval in file 2. so the output will be like this:
0 19 0
20 39 96
40 59 73
60 79 9
80 99 4
I am struggling to write a loop for it. I can do this in R, but the entire file is too large and it take ages to complete. any pointers will be appreciated!
Thank you very much.
| 1 |
6,638,810 | 07/10/2011 02:38:21 | 295,128 | 03/16/2010 20:25:19 | 338 | 1 | What is the purpose of Virtual member in C++ ? | I don't see the purpose of a virtual member in a class other than safety. Are there any other reasons to use virtual when designing implementations? Edit: I erased the variable part. | c++ | virtual | null | null | null | 07/13/2011 03:46:12 | not a real question | What is the purpose of Virtual member in C++ ?
===
I don't see the purpose of a virtual member in a class other than safety. Are there any other reasons to use virtual when designing implementations? Edit: I erased the variable part. | 1 |
2,233,290 | 02/09/2010 23:23:29 | 195,446 | 10/23/2009 16:37:10 | 33 | 6 | Was it a big mistake of JavaScript language inventor to use function instead of a shorter word ? | It seems that it would be wise to use def, fn, or fun for function definitions similar to Ruby or other succinct languages.
Now that it's too late to change things due to potential compatibility issues, the whole world is forced to suffer using that wasteful long name 'function' everywhere in JavaScript code.
| javascript | programming-languages | coding-style | naming-conventions | null | 02/09/2010 23:26:12 | not constructive | Was it a big mistake of JavaScript language inventor to use function instead of a shorter word ?
===
It seems that it would be wise to use def, fn, or fun for function definitions similar to Ruby or other succinct languages.
Now that it's too late to change things due to potential compatibility issues, the whole world is forced to suffer using that wasteful long name 'function' everywhere in JavaScript code.
| 4 |
11,439,851 | 07/11/2012 19:18:51 | 1,232,684 | 02/25/2012 15:29:46 | 129 | 6 | Toast after stopping timer, how? | How can I make a toast after stopping the timer?
onCreate {
//other code
myTimer = new Timer();
myTimer.schedule(new TimerTask() {
@Override
public void run() {
TimerMethod();
}
}, 0, 1000);
Toast.makeText(getApplicationContext(), "AS", 455).show();
}
private void TimerMethod()
{
this.runOnUiThread(Timer_Tick);
}
private Runnable Timer_Tick = new Runnable() {
public void run() {
rub_stat++;
if (rub_stat == 15){myTimer.cancel(); } }
};
So after rub_stat reaches 15 I want to cancel the timer and make the toast appear. Thanks in advance! | android | timer | null | null | null | null | open | Toast after stopping timer, how?
===
How can I make a toast after stopping the timer?
onCreate {
//other code
myTimer = new Timer();
myTimer.schedule(new TimerTask() {
@Override
public void run() {
TimerMethod();
}
}, 0, 1000);
Toast.makeText(getApplicationContext(), "AS", 455).show();
}
private void TimerMethod()
{
this.runOnUiThread(Timer_Tick);
}
private Runnable Timer_Tick = new Runnable() {
public void run() {
rub_stat++;
if (rub_stat == 15){myTimer.cancel(); } }
};
So after rub_stat reaches 15 I want to cancel the timer and make the toast appear. Thanks in advance! | 0 |
9,382,872 | 02/21/2012 18:16:53 | 411,023 | 07/19/2010 05:10:58 | 2,116 | 155 | Android linkify by checking if a value exists in a HashMap | Is there any way to check if a value exists in a HashMap, and chain it with a regex pattern and then linkify it ?
Currently I am just using some regex pattern to linkify.
Thanks !
| java | android | regex | hashmap | linkify | 02/22/2012 05:23:26 | not a real question | Android linkify by checking if a value exists in a HashMap
===
Is there any way to check if a value exists in a HashMap, and chain it with a regex pattern and then linkify it ?
Currently I am just using some regex pattern to linkify.
Thanks !
| 1 |
1,577,381 | 10/16/2009 10:47:01 | 164,357 | 08/27/2009 17:03:36 | 85 | 0 | 'Sys' is undefined javascrip error | I am getting the following error:
> Microsoft JScript runtime error: 'Sys'
> is undefined
While trying to execute:
<head id="Head1" runat="server">
<title>Untitled Page</title>
<script language="javascript" type="text/javascript">
//ERROR IN THIS LINE!!!
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(onUpdated());
function onUpdated() {
// get the update progress div
var pnlPopup = $get("div2");
// make it invisible
}
</script>
</head> | asp.net | ajax | javascript | null | null | null | open | 'Sys' is undefined javascrip error
===
I am getting the following error:
> Microsoft JScript runtime error: 'Sys'
> is undefined
While trying to execute:
<head id="Head1" runat="server">
<title>Untitled Page</title>
<script language="javascript" type="text/javascript">
//ERROR IN THIS LINE!!!
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(onUpdated());
function onUpdated() {
// get the update progress div
var pnlPopup = $get("div2");
// make it invisible
}
</script>
</head> | 0 |
3,529,284 | 08/20/2010 08:26:00 | 314,056 | 04/11/2010 19:43:17 | 700 | 54 | Set cookie via code for CURL transfers | I'm writing an "API" for a website which doesn't have it.
Basically, my PHP code logs into the website and grabs the data I need (two different transfers).
At login time, I'm getting a bit of a problem. The website sets a couple of cookies through HTTP, which I'm capturing using CURL's cookie mechanism.
This seems to work out nicely, except that they are also trying to set a cookie via javascript in that same response.
I don't need to parse the javascript since the cookie they set is entirely predictable.
What I need is to somehow tell CURL that this cookie exists, WHILE it stills maintains the other cookies.
Help? :) | php | javascript | api | cookies | curl | null | open | Set cookie via code for CURL transfers
===
I'm writing an "API" for a website which doesn't have it.
Basically, my PHP code logs into the website and grabs the data I need (two different transfers).
At login time, I'm getting a bit of a problem. The website sets a couple of cookies through HTTP, which I'm capturing using CURL's cookie mechanism.
This seems to work out nicely, except that they are also trying to set a cookie via javascript in that same response.
I don't need to parse the javascript since the cookie they set is entirely predictable.
What I need is to somehow tell CURL that this cookie exists, WHILE it stills maintains the other cookies.
Help? :) | 0 |
9,790,307 | 03/20/2012 15:57:29 | 1,203,071 | 02/10/2012 22:22:00 | 19 | 0 | notifyDataSetChanged() deletes original data in the list | I'm attempting to add items to an adapter as the user scrolls to the bottom of the list. I am able to do this, however I want to add the new items to the adapter and keep the items that were already there, but as it is now the original items are removed and only the new ones are visible. Any ideas as to how I can achieve this?
This is what my code looks like atm:
public void onScroll(AbsListView view, int firstVisibleItem,
int visibleItemCount, int totalItemCount) {
if (loading) {
if (totalItemCount > previousTotal) {
previousTotal = totalItemCount;
loading = false;
previousTotal = totalItemCount;
currentPage++;
}
}
if (!loading
&& ((firstVisibleItem + visibleItemCount) >= totalItemCount)) {
if (fragmentMode == 5) {
ActiveUser.getInstance().FetchVidPage(currentPage, chanID,
activity, this);
loading = true;
}
}
}
@Override
public void onTaskFinished() {
titles.addAll(ActiveUser.getInstance().getWebVidInfo(1));
thumbs.addAll(ActiveUser.getInstance().getWebVidInfo(2));
data.addAll(ActiveUser.getInstance().getWebVidInfo(3));
describtions.addAll(ActiveUser.getInstance().getWebVidInfo(4));
vidOwnerIDs.addAll(ActiveUser.getInstance().getWebVidInfo(4));
notifyDataSetChanged();
}
Just to clearify what I'm doing; Once the bottom of the list is visible I start an AsyncTask that fetches more videos. In the asynctask I set the adapter as a listener for an event thats fired once the asynctask is finished - this works.
onTaskFinished() the last method above - here I add the new items to 4 lists which the adapter uses to fill out each list item with, and finally I notify the adapter.
So the new items are all added fine, the problem is that the items that were in the before the new ones were added, are for some reason removed, or not visible anymore.
Any ideas?
| android | listview | baseadapter | android-lazyadapter | null | null | open | notifyDataSetChanged() deletes original data in the list
===
I'm attempting to add items to an adapter as the user scrolls to the bottom of the list. I am able to do this, however I want to add the new items to the adapter and keep the items that were already there, but as it is now the original items are removed and only the new ones are visible. Any ideas as to how I can achieve this?
This is what my code looks like atm:
public void onScroll(AbsListView view, int firstVisibleItem,
int visibleItemCount, int totalItemCount) {
if (loading) {
if (totalItemCount > previousTotal) {
previousTotal = totalItemCount;
loading = false;
previousTotal = totalItemCount;
currentPage++;
}
}
if (!loading
&& ((firstVisibleItem + visibleItemCount) >= totalItemCount)) {
if (fragmentMode == 5) {
ActiveUser.getInstance().FetchVidPage(currentPage, chanID,
activity, this);
loading = true;
}
}
}
@Override
public void onTaskFinished() {
titles.addAll(ActiveUser.getInstance().getWebVidInfo(1));
thumbs.addAll(ActiveUser.getInstance().getWebVidInfo(2));
data.addAll(ActiveUser.getInstance().getWebVidInfo(3));
describtions.addAll(ActiveUser.getInstance().getWebVidInfo(4));
vidOwnerIDs.addAll(ActiveUser.getInstance().getWebVidInfo(4));
notifyDataSetChanged();
}
Just to clearify what I'm doing; Once the bottom of the list is visible I start an AsyncTask that fetches more videos. In the asynctask I set the adapter as a listener for an event thats fired once the asynctask is finished - this works.
onTaskFinished() the last method above - here I add the new items to 4 lists which the adapter uses to fill out each list item with, and finally I notify the adapter.
So the new items are all added fine, the problem is that the items that were in the before the new ones were added, are for some reason removed, or not visible anymore.
Any ideas?
| 0 |
10,956,771 | 06/08/2012 22:33:53 | 994,319 | 10/13/2011 20:38:09 | 15 | 0 | Lots of errors from prototype.js with Magento | A lot of errors are coming from prototype.js on our magento site. A lot of these are in relation to 'ClassName' and 'length being null or not an object.
If anyone could take a look <http://foscam-uk.com/index.php>, if you need me to post any code from anywhere let me know and I will.
Thanks for your time. | javascript | magento | prototypejs | null | null | 06/11/2012 07:34:25 | not a real question | Lots of errors from prototype.js with Magento
===
A lot of errors are coming from prototype.js on our magento site. A lot of these are in relation to 'ClassName' and 'length being null or not an object.
If anyone could take a look <http://foscam-uk.com/index.php>, if you need me to post any code from anywhere let me know and I will.
Thanks for your time. | 1 |
7,853,895 | 10/21/2011 18:47:52 | 604,168 | 02/05/2011 07:07:25 | 417 | 4 | Get lat,long points on a line | How could you get the lat,long of **four points**(equal distance apart) on a line from 27,-82 to 28,-81?
| php | null | null | null | null | 10/21/2011 19:07:26 | not constructive | Get lat,long points on a line
===
How could you get the lat,long of **four points**(equal distance apart) on a line from 27,-82 to 28,-81?
| 4 |
7,456,102 | 09/17/2011 16:10:33 | 539,085 | 12/11/2010 19:04:35 | 452 | 25 | Calling C functions from python code. Dll not working | I wrote below dll called djj.dll it has a file called try.cpp with following code
#include<stdio.h>
int print(){
return 4;
}
Now, i build this dll and go to python idle.
I type print windll.djj.print . It gives syntax error .WHY??
| python | c | null | null | null | 09/17/2011 21:59:47 | not a real question | Calling C functions from python code. Dll not working
===
I wrote below dll called djj.dll it has a file called try.cpp with following code
#include<stdio.h>
int print(){
return 4;
}
Now, i build this dll and go to python idle.
I type print windll.djj.print . It gives syntax error .WHY??
| 1 |
7,276,232 | 09/01/2011 20:38:57 | 924,177 | 09/01/2011 20:10:35 | 1 | 0 | How to inherit a class' methods and have them access self member variables in python | I'm kind of new to Python, and I have been trying to figure out the best way to migrate a bunch of messy class methods (which access member variables) into a separate Utils.py type module to clean things up. The method names still need to be inherited by the base class, but they need to also have access to the parnet class methods. I'm detailing the background because I think there might be a better python way to solve this.
Basically I need to do something like the following, if I was trying to do this via inheritence: (I've played with super, but I haven't been able to solve it this way)
class Graph(GraphUtils):
graph_size = 10
def print_size(self):
print self.graph_size
class GraphUtils():
def set_size(self, new_size)
self.graph_size = new_size
if __name__ == "__main__":
g = Graph()
print "Graph default size: " + str(g.graph_size) # This is 10
g.set_size(20)
g.print_size() # I want it to print 20, but it'll print the default 10
I know there's another way to unify to import a class's methods and variables into another class, but I run the risk namespace collisions.
A technique I used in a similar case, where a separate module was needed to appear as an 'add-on' in our library looked as follows: (the 'add-on' idea came from the desire to optionally distribute additional functionality to the Graph class, it's all licensing related)
class Graph:
ext = None
graph_size = 10
def __init__(self):
self.ext = Extension()
self.ext._graph = self
def set_size(self, new_size):
self.graph_size = new_size
class Extension:
_graph = None
def process(self):
print "Processing graph size: " + str(self._graph.graph_size)
if __name__ == "__main__":
g = Graph()
print "Graph default size: " + str(g.graph_size) # This is 10
g.set_size(20)
g.ext.process()
# Output: Processing graph size: 20
Just wondering what you guys think is the best approach or if this can be reasonable (safely) accomplished in Python. (2.6+)
Thanks! | python | class | inheritance | null | null | null | open | How to inherit a class' methods and have them access self member variables in python
===
I'm kind of new to Python, and I have been trying to figure out the best way to migrate a bunch of messy class methods (which access member variables) into a separate Utils.py type module to clean things up. The method names still need to be inherited by the base class, but they need to also have access to the parnet class methods. I'm detailing the background because I think there might be a better python way to solve this.
Basically I need to do something like the following, if I was trying to do this via inheritence: (I've played with super, but I haven't been able to solve it this way)
class Graph(GraphUtils):
graph_size = 10
def print_size(self):
print self.graph_size
class GraphUtils():
def set_size(self, new_size)
self.graph_size = new_size
if __name__ == "__main__":
g = Graph()
print "Graph default size: " + str(g.graph_size) # This is 10
g.set_size(20)
g.print_size() # I want it to print 20, but it'll print the default 10
I know there's another way to unify to import a class's methods and variables into another class, but I run the risk namespace collisions.
A technique I used in a similar case, where a separate module was needed to appear as an 'add-on' in our library looked as follows: (the 'add-on' idea came from the desire to optionally distribute additional functionality to the Graph class, it's all licensing related)
class Graph:
ext = None
graph_size = 10
def __init__(self):
self.ext = Extension()
self.ext._graph = self
def set_size(self, new_size):
self.graph_size = new_size
class Extension:
_graph = None
def process(self):
print "Processing graph size: " + str(self._graph.graph_size)
if __name__ == "__main__":
g = Graph()
print "Graph default size: " + str(g.graph_size) # This is 10
g.set_size(20)
g.ext.process()
# Output: Processing graph size: 20
Just wondering what you guys think is the best approach or if this can be reasonable (safely) accomplished in Python. (2.6+)
Thanks! | 0 |
1,496,033 | 09/30/2009 03:48:11 | 179,353 | 09/26/2009 01:05:44 | 1 | 0 | Sorting <li> tags | I have a a <ul> and I would like to sort my list alphabetically (I don't want caps dont matter) according to a class named "name". How would I do this?
<ul class="column">
<li>
<table>
<tr>
<td class="name" >Name of Item</td>
</tr>
<tr>
<td>Content</td>
</tr>
<tr>
<td>morecontent</td>
<td>morecontent</td>
</tr>
</table>
</li>
<li>
<table>
<tr>
<td class="name" >Another name of item</td>
</tr>
<tr>
<td>Content</td>
</tr>
<tr>
<td>morecontent</td>
<td>morecontent</td>
</tr>
</table>
</li>
</ul>
Thanks | html | sorting | null | null | null | null | open | Sorting <li> tags
===
I have a a <ul> and I would like to sort my list alphabetically (I don't want caps dont matter) according to a class named "name". How would I do this?
<ul class="column">
<li>
<table>
<tr>
<td class="name" >Name of Item</td>
</tr>
<tr>
<td>Content</td>
</tr>
<tr>
<td>morecontent</td>
<td>morecontent</td>
</tr>
</table>
</li>
<li>
<table>
<tr>
<td class="name" >Another name of item</td>
</tr>
<tr>
<td>Content</td>
</tr>
<tr>
<td>morecontent</td>
<td>morecontent</td>
</tr>
</table>
</li>
</ul>
Thanks | 0 |
161,590 | 10/02/2008 10:00:52 | 21,027 | 09/23/2008 10:33:58 | 185 | 13 | How do you track your time? | I had about 7 employes until today and everyone had another kind of timesheet/timereporting.
How do you track your time at your current workplace, or if your a freelancer, how do you keep track of your time? | project-management | gtd | newbie | null | null | 02/15/2011 15:39:21 | off topic | How do you track your time?
===
I had about 7 employes until today and everyone had another kind of timesheet/timereporting.
How do you track your time at your current workplace, or if your a freelancer, how do you keep track of your time? | 2 |
4,770,807 | 01/22/2011 21:45:24 | 116,791 | 06/03/2009 18:36:27 | 551 | 34 | Displaytag alternatives | I'm building an application using Struts 2 + Spring 3 + Hibernate 3. I was wondering if any of you knows of any alternative to the "displaytag" library to draw and manage tables.
Not that I dislike it so much, but I read this [comment][1] and made me wonder about other options. And I see it has not been updated in a while and I was wondering if there is some reason for that (like a better/more popular alternative available).
[1]: http://stackoverflow.com/questions/3143408/displaytag-pagination-vs-hibernate-pagination/3144744#3144744 | java | javascript | spring | struts2 | displaytag | null | open | Displaytag alternatives
===
I'm building an application using Struts 2 + Spring 3 + Hibernate 3. I was wondering if any of you knows of any alternative to the "displaytag" library to draw and manage tables.
Not that I dislike it so much, but I read this [comment][1] and made me wonder about other options. And I see it has not been updated in a while and I was wondering if there is some reason for that (like a better/more popular alternative available).
[1]: http://stackoverflow.com/questions/3143408/displaytag-pagination-vs-hibernate-pagination/3144744#3144744 | 0 |
3,462,334 | 08/11/2010 20:02:23 | 331,227 | 05/03/2010 08:17:20 | 23 | 0 | Getting image contents of obstructed window | Is it possible to get image contents of an obstructed window without bringing it to the front? Also, is it possible to send mouse clicks to a specific locations of such window using Windows API? Would the realization be different on Windows XP and Windows 7?
What functions I would need and where can I read more about that. Thanks. | c++ | windows | screen-capture | null | null | null | open | Getting image contents of obstructed window
===
Is it possible to get image contents of an obstructed window without bringing it to the front? Also, is it possible to send mouse clicks to a specific locations of such window using Windows API? Would the realization be different on Windows XP and Windows 7?
What functions I would need and where can I read more about that. Thanks. | 0 |
7,769,981 | 10/14/2011 15:32:51 | 995,673 | 10/14/2011 15:25:38 | 1 | 0 | Python: how to convert wave file to float amplitude | so I asked everything in the title:
I have a wave file (written by PyAudio from an input audio) and I want to convert it in float data corresponding of the sound level (amplitude) to do some fourier transformation etc...
Anyone have an idea to convert WAVE data to float?
Thank you in advance | python | audio | wave | pyaudio | null | null | open | Python: how to convert wave file to float amplitude
===
so I asked everything in the title:
I have a wave file (written by PyAudio from an input audio) and I want to convert it in float data corresponding of the sound level (amplitude) to do some fourier transformation etc...
Anyone have an idea to convert WAVE data to float?
Thank you in advance | 0 |
9,492,471 | 02/29/2012 01:44:08 | 237,150 | 12/22/2009 20:22:49 | 1,657 | 106 | How to prevent Nokogiri from encoding entities in HTML fragments | Nokogiri 1.5.0
I'm unable to output a parsed fragment with a link having query parameters, specifically with the ampersand in the href. The ampersand is replaced by its html entity.
f = Nokogiri::HTML.fragment(%q{<a href="http://example.com?this=1&that=2">Testing</a>})
f.to_s # => "<a href=\"http://example.com?this=1&that=2\">Testing</a>"
f.to_html # => "<a href=\"http://example.com?this=1&that=2\">Testing</a>"
No help using `to_html(encoding: 'UTF-8')` or US-ASCII.
This would seem pretty common, parsing a valid link format and wanting to render that back as valid HTML.
http://stackoverflow.com/questions/2567029/how-to-make-nokogiri-transparently-return-un-encoded-html-entities-untouched was no help.
| html | ruby | html-entities | nokogigi | null | null | open | How to prevent Nokogiri from encoding entities in HTML fragments
===
Nokogiri 1.5.0
I'm unable to output a parsed fragment with a link having query parameters, specifically with the ampersand in the href. The ampersand is replaced by its html entity.
f = Nokogiri::HTML.fragment(%q{<a href="http://example.com?this=1&that=2">Testing</a>})
f.to_s # => "<a href=\"http://example.com?this=1&that=2\">Testing</a>"
f.to_html # => "<a href=\"http://example.com?this=1&that=2\">Testing</a>"
No help using `to_html(encoding: 'UTF-8')` or US-ASCII.
This would seem pretty common, parsing a valid link format and wanting to render that back as valid HTML.
http://stackoverflow.com/questions/2567029/how-to-make-nokogiri-transparently-return-un-encoded-html-entities-untouched was no help.
| 0 |
11,612,460 | 07/23/2012 12:23:06 | 1,527,224 | 07/15/2012 17:34:17 | 8 | 1 | How to use one UIPickerView for multiple textfields? | I have 8 textfields in one view. I want to populate each using a pickerview.
Can I have 1 pickerview which will have list of items from different arrays for different textfields?
Can someone explain how do I do it programmatically with a sample code?
Also how can I hide the pickerview when the view loads and it should be displayed when I click on a textfield with its corresponding data list? It should disappear when I select the data and reappear when I click on a different textfield with its corresponding data list and so on.
I am new to xcode. Any help will be much appreciated. Thank you. | iphone | xcode | uitextfield | uipickerview | null | null | open | How to use one UIPickerView for multiple textfields?
===
I have 8 textfields in one view. I want to populate each using a pickerview.
Can I have 1 pickerview which will have list of items from different arrays for different textfields?
Can someone explain how do I do it programmatically with a sample code?
Also how can I hide the pickerview when the view loads and it should be displayed when I click on a textfield with its corresponding data list? It should disappear when I select the data and reappear when I click on a different textfield with its corresponding data list and so on.
I am new to xcode. Any help will be much appreciated. Thank you. | 0 |
3,798,337 | 09/26/2010 15:02:19 | 224,922 | 12/04/2009 16:51:10 | 2,261 | 3 | Javascript can implement OOP but Ruby can't implement functional programming? | Im new to "real" Javascript:ing and I know understand more of functional programming.
It seems that in Javascript you get the best from both worlds: functional and object oriented programming.
But when I think about Ruby, I can't recall that you:
- pass functions as parameters
- have variables of the data type function
- declare functions inside functions
Does this mean that Javascript embraces the best of the both worlds while Ruby only embraces object-oriented programming style? | javascript | ruby | oop | functional-programming | null | 03/29/2012 12:55:00 | not constructive | Javascript can implement OOP but Ruby can't implement functional programming?
===
Im new to "real" Javascript:ing and I know understand more of functional programming.
It seems that in Javascript you get the best from both worlds: functional and object oriented programming.
But when I think about Ruby, I can't recall that you:
- pass functions as parameters
- have variables of the data type function
- declare functions inside functions
Does this mean that Javascript embraces the best of the both worlds while Ruby only embraces object-oriented programming style? | 4 |
5,068,451 | 02/21/2011 16:26:47 | 157,872 | 08/17/2009 16:25:55 | 325 | 10 | promissing "coming soon" features in my iphone app ? | it's allowed to promise future features or content, such as levels, labeled as "comming soon" in my iphone app ? | iphone | null | null | null | null | 02/22/2011 02:41:03 | off topic | promissing "coming soon" features in my iphone app ?
===
it's allowed to promise future features or content, such as levels, labeled as "comming soon" in my iphone app ? | 2 |
10,563,650 | 05/12/2012 12:18:33 | 1,326,559 | 04/11/2012 12:33:23 | 35 | 12 | Simplest way to convert a string to xml in c# | I'm looking for the simplest way to convert a string into an Xml in C#.I mean i need a function in c# which will return a xml file that means return type will be xml. | c# | xml | xml-parsing | null | null | 05/12/2012 12:40:13 | not a real question | Simplest way to convert a string to xml in c#
===
I'm looking for the simplest way to convert a string into an Xml in C#.I mean i need a function in c# which will return a xml file that means return type will be xml. | 1 |
9,941,681 | 03/30/2012 11:00:39 | 1,049,341 | 11/16/2011 09:35:45 | 142 | 10 | mysql: group results, limit them and join to other tables in one query | i have a online application for wich i require a sort of dashboard (to use the white-space).
There are three tables used for the operation:
1.) categories: id, name
2.) entries: id, name, description, category_id, created, modified
3.) entryimages: id, filename, description, entry_id
on the dashboard i want to show 4-5 entries (with thumbnail images, so i require joins to the entryimages table and the categories table) for each category.
I read through some articles (and threads on s.o.) like this one:
http://www.xaprb.com/blog/2006/12/07/how-to-select-the-firstleastmax-row-per-group-in-sql/
But am still not getting it right, i've tried to first extract all categories and for each and every category build a query and with "all union" attach them to one, but that is not working.
The last version of code i used:
foreach($categories as $id => $name)
{
$query .= "SELECT `entry`.`id`,
`entry`.`name`,
`entry`.`description`,
`entry`.`category_id`,
`entry`.`created`,
`entry`.`modified`,
`entryimages`.`filename`,
`entryimages`.`description`
FROM `entries` as `entry` LEFT JOIN `entryimages` ON `entryimages`.`entry_id` = `entry`.`id`
WHERE `entry`.`category_id` = $id ";
if($i < count($groups))
{
$query .= 'UNION ALL ';
}
$i++;
}
$result = mysql_query($query);
Does anybody know what is the best right to accomplish this operation?
Thanks 1000 | php | mysql | join | null | null | null | open | mysql: group results, limit them and join to other tables in one query
===
i have a online application for wich i require a sort of dashboard (to use the white-space).
There are three tables used for the operation:
1.) categories: id, name
2.) entries: id, name, description, category_id, created, modified
3.) entryimages: id, filename, description, entry_id
on the dashboard i want to show 4-5 entries (with thumbnail images, so i require joins to the entryimages table and the categories table) for each category.
I read through some articles (and threads on s.o.) like this one:
http://www.xaprb.com/blog/2006/12/07/how-to-select-the-firstleastmax-row-per-group-in-sql/
But am still not getting it right, i've tried to first extract all categories and for each and every category build a query and with "all union" attach them to one, but that is not working.
The last version of code i used:
foreach($categories as $id => $name)
{
$query .= "SELECT `entry`.`id`,
`entry`.`name`,
`entry`.`description`,
`entry`.`category_id`,
`entry`.`created`,
`entry`.`modified`,
`entryimages`.`filename`,
`entryimages`.`description`
FROM `entries` as `entry` LEFT JOIN `entryimages` ON `entryimages`.`entry_id` = `entry`.`id`
WHERE `entry`.`category_id` = $id ";
if($i < count($groups))
{
$query .= 'UNION ALL ';
}
$i++;
}
$result = mysql_query($query);
Does anybody know what is the best right to accomplish this operation?
Thanks 1000 | 0 |
7,098,740 | 08/17/2011 20:04:46 | 695,101 | 04/06/2011 15:07:00 | 384 | 2 | Why the div content dispeared after displaying? | I'm starting on coding chat function in my web application. What I want is after user hitting send button, what they texted will be displayed in the chatting div immediately. I use jQuery to perform this function, however, I found that after displaying the content, it disappears immediately. Did I miss something?
The JS code:
<script type="text/javascript">
function Send() {
var original = $('#contentDIV').val();
var text = $("[id$='TextBox1']").val();
$('#contentDIV').html(original + "<br />" + text);
}
</script>
The HTML part:
<div id="contentDIV" style="height:400px;overflow:auto">
</div>
<asp:TextBox ID="TextBox1" runat="server" Width="400px"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="Send()"
UseSubmitBehavior="False" />
| jquery | html | null | null | null | null | open | Why the div content dispeared after displaying?
===
I'm starting on coding chat function in my web application. What I want is after user hitting send button, what they texted will be displayed in the chatting div immediately. I use jQuery to perform this function, however, I found that after displaying the content, it disappears immediately. Did I miss something?
The JS code:
<script type="text/javascript">
function Send() {
var original = $('#contentDIV').val();
var text = $("[id$='TextBox1']").val();
$('#contentDIV').html(original + "<br />" + text);
}
</script>
The HTML part:
<div id="contentDIV" style="height:400px;overflow:auto">
</div>
<asp:TextBox ID="TextBox1" runat="server" Width="400px"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="Send()"
UseSubmitBehavior="False" />
| 0 |
332,585 | 12/01/2008 23:22:49 | 1,965 | 08/19/2008 15:51:08 | 12,273 | 644 | 2d Platformer physics | It was a long holiday weekend, so I got the coding bug again and started playing around:

I wrote a basic tile engine, but having never attempted this before, I am really struggling with handling sprite collision detection and implementing realistic physics for gravity.
For any other game hobby writers, can you point me towards some walkthroughs on the best way to approach this?
| tile-engine | game-physics | justforfun | null | null | null | open | 2d Platformer physics
===
It was a long holiday weekend, so I got the coding bug again and started playing around:

I wrote a basic tile engine, but having never attempted this before, I am really struggling with handling sprite collision detection and implementing realistic physics for gravity.
For any other game hobby writers, can you point me towards some walkthroughs on the best way to approach this?
| 0 |
9,769,860 | 03/19/2012 12:06:45 | 1,278,486 | 03/19/2012 11:54:45 | 1 | 0 | How do you use Enyo Gestures in other javascript libraries like Zepto | I have a hard time getting Enyo gestures into Zepto. Enyo has way too many dependencies and in the annotated source, it says that Enyo gestures aren't DOM elements. I'm used to seeing the use of cases when switching from touch to mouse, but Enyo implements tracking which I have no idea on how it works.
Is there any way to get enyo gestures like up, down, drag etc. to be used in other javascript libraries?
Thanks! | javascript | enyo | null | null | null | null | open | How do you use Enyo Gestures in other javascript libraries like Zepto
===
I have a hard time getting Enyo gestures into Zepto. Enyo has way too many dependencies and in the annotated source, it says that Enyo gestures aren't DOM elements. I'm used to seeing the use of cases when switching from touch to mouse, but Enyo implements tracking which I have no idea on how it works.
Is there any way to get enyo gestures like up, down, drag etc. to be used in other javascript libraries?
Thanks! | 0 |
7,383,772 | 09/12/2011 05:50:01 | 528,878 | 12/03/2010 03:54:02 | 44 | 1 | How to read "a b.txt" in bundle directory iOS | I have a problem right now. I want to read content of file which one have space in file name like "a b.txt" in budle directory. How to do that?
Thanks before. Regards. | ios | bundle | read-file | null | null | null | open | How to read "a b.txt" in bundle directory iOS
===
I have a problem right now. I want to read content of file which one have space in file name like "a b.txt" in budle directory. How to do that?
Thanks before. Regards. | 0 |
1,056,847 | 06/29/2009 06:29:02 | 122,913 | 06/15/2009 04:00:47 | 19 | 0 | can u help me in oracle10g for writing trigger that will create csv file with the contents of the data in table | <br>
can u pls help me in writing a trigger which invoke after updated a particular column in the table and creates a csv file with the contents of same table
<br>
thanks in advance
<br> | oracle10g | null | null | null | null | null | open | can u help me in oracle10g for writing trigger that will create csv file with the contents of the data in table
===
<br>
can u pls help me in writing a trigger which invoke after updated a particular column in the table and creates a csv file with the contents of same table
<br>
thanks in advance
<br> | 0 |
7,820,150 | 10/19/2011 10:51:04 | 189,451 | 10/13/2009 22:28:08 | 78 | 0 | How to: create fb app like http://www.facebook.com/promo.io?sk=app_232647093432509 | My boss handed me the task to create a lighter and different version of this app: http://www.facebook.com/promo.io?sk=app_232647093432509
This app uses wildfireapp stories, but we have to make it a little different (and connect with other funcionalitis), so i have to make our new version. The basic functionalities are this:
- user has the input window to write his answer
- user has checkbox "share on your wall"
- the button to submit his answer
When the user clicks on the submit button, the app ask him for the permission and then submits the answer (and post the answer on his wall if the checkbox was on).
I found the facebook PHP SDK Overview (http://developers.facebook.com/docs/reference/php/), looked at the example at GitHub, looked at more examples, but didnt get the idea on how to solve the problem: first login user (using loginUrl) and then post the question (PHP POST). Does enybody has any idea how to solve this? Thank you very much! | facebook | facebook-graph-api | null | null | null | 10/19/2011 22:49:14 | not a real question | How to: create fb app like http://www.facebook.com/promo.io?sk=app_232647093432509
===
My boss handed me the task to create a lighter and different version of this app: http://www.facebook.com/promo.io?sk=app_232647093432509
This app uses wildfireapp stories, but we have to make it a little different (and connect with other funcionalitis), so i have to make our new version. The basic functionalities are this:
- user has the input window to write his answer
- user has checkbox "share on your wall"
- the button to submit his answer
When the user clicks on the submit button, the app ask him for the permission and then submits the answer (and post the answer on his wall if the checkbox was on).
I found the facebook PHP SDK Overview (http://developers.facebook.com/docs/reference/php/), looked at the example at GitHub, looked at more examples, but didnt get the idea on how to solve the problem: first login user (using loginUrl) and then post the question (PHP POST). Does enybody has any idea how to solve this? Thank you very much! | 1 |
10,727,641 | 05/23/2012 20:50:41 | 1,413,571 | 05/23/2012 20:41:42 | 1 | 0 | Need Assistance with IDA Pro and Bypassing a Login | I am new to IDA, and I really need help with the Hex editing part of it, or like if you can add lines to the loc_xxxx things or w/e. I am trying to bypass the login to a program I use, but now they are down, and their database is down too, so I will always get invalid login. What I am trying to do is replace this:
loc_237D: // CODE XREF: sub_2360+Ej
ldstr "You need to enter a valid username and password!"
ldstr "Error"
ldc.i4.0
ldc.i4.s 0x10
call value class [System.Windows.Forms]System.Windows.Forms.DialogResult [System.Windows.Forms]System.Windows.Forms.MessageBox::Show(class System.String, class System.String, value class [System.Windows.Forms]System.Windows.Forms.MessageBoxButtons, value class [System.Windows.Forms]System.Windows.Forms.MessageBoxIcon)
pop
br loc_29D0
With this:
loc_2759: // CODE XREF: sub_2360+3F2j
ldarg.0
ldfld class [System.Windows.Forms]System.Windows.Forms.Label BlackOpsIntervention_Loader.Form1::??E@?
ldstr "Authentication successful!"
callvirt void [System.Windows.Forms]System.Windows.Forms.Label::set_Text(class System.String)
ldsflda modopt([mscorlib]System.Runtime.CompilerServices.IsConst) value class ??E@?
ldloca.s 0x17
ldc.i4.4
call T0x6000078
ldc.i4.0
blt.s loc_277E
leave loc_281E
I think I have to change the hex values or something, but I can't figure out how, so if anyone would like to help, post an answer, or add me to skype : bcfgammer | login | hack | ida | ida-pro | null | 05/25/2012 20:00:55 | off topic | Need Assistance with IDA Pro and Bypassing a Login
===
I am new to IDA, and I really need help with the Hex editing part of it, or like if you can add lines to the loc_xxxx things or w/e. I am trying to bypass the login to a program I use, but now they are down, and their database is down too, so I will always get invalid login. What I am trying to do is replace this:
loc_237D: // CODE XREF: sub_2360+Ej
ldstr "You need to enter a valid username and password!"
ldstr "Error"
ldc.i4.0
ldc.i4.s 0x10
call value class [System.Windows.Forms]System.Windows.Forms.DialogResult [System.Windows.Forms]System.Windows.Forms.MessageBox::Show(class System.String, class System.String, value class [System.Windows.Forms]System.Windows.Forms.MessageBoxButtons, value class [System.Windows.Forms]System.Windows.Forms.MessageBoxIcon)
pop
br loc_29D0
With this:
loc_2759: // CODE XREF: sub_2360+3F2j
ldarg.0
ldfld class [System.Windows.Forms]System.Windows.Forms.Label BlackOpsIntervention_Loader.Form1::??E@?
ldstr "Authentication successful!"
callvirt void [System.Windows.Forms]System.Windows.Forms.Label::set_Text(class System.String)
ldsflda modopt([mscorlib]System.Runtime.CompilerServices.IsConst) value class ??E@?
ldloca.s 0x17
ldc.i4.4
call T0x6000078
ldc.i4.0
blt.s loc_277E
leave loc_281E
I think I have to change the hex values or something, but I can't figure out how, so if anyone would like to help, post an answer, or add me to skype : bcfgammer | 2 |
9,979,915 | 04/02/2012 16:15:18 | 727,429 | 03/23/2011 20:06:13 | 1,143 | 49 | Google apps server or Amazon server | why would I prefer Google Apps server over one of Amazon's various offerings?
the main purpose would be to store data for mobile apps, so I suppose cost and programming language are the biggest deciding factors.
Is there a good primer I can read? I'm mainly looking for resources to then come back here with more detailed questions | google-app-engine | web-applications | mobile | amazon-ec2 | apps | 04/03/2012 02:26:54 | not constructive | Google apps server or Amazon server
===
why would I prefer Google Apps server over one of Amazon's various offerings?
the main purpose would be to store data for mobile apps, so I suppose cost and programming language are the biggest deciding factors.
Is there a good primer I can read? I'm mainly looking for resources to then come back here with more detailed questions | 4 |
10,331,770 | 04/26/2012 10:40:36 | 969,293 | 09/28/2011 14:30:50 | 42 | 0 | UIwebview media query in portrait orientation | Im trying to load some html in a webview and I want different css to be used for landscape and portrait orientation
this is the head part of my html
NSMutableString *htmlString = [NSMutableString stringWithString:@"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"];
[htmlString appendString:@"<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" id=\"bp-doc\">"
"<head>"
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>"
"<meta name=\"viewport\" content=\"width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;\" />" ];
//landscape css
[htmlString appendString:@"<link rel='stylesheet' media='screen and (orientation: landscape)' href='landscape.css' type='text/css'/>"];
//portrait css
[htmlString appendString:@"<link rel='stylesheet' media='screen and (orientation: portrait)' href='portrait.css' type='text/css'/>"];
[htmlString appendString:@"<link rel='stylesheet' href='style.css' type='text/css'/>"
"<script type='text/javascript' src='jquery-1.6.2.min.js'></script>"
"<script type='text/javascript' src='script.js'></script>"
"</head>"
];
Im also doing this in viewcontrollers shouldAutorotateToInterfaceOrientation: method
int i =0;
switch (interfaceOrientation){
case UIInterfaceOrientationPortrait:
i = 0;
break;
case UIInterfaceOrientationPortraitUpsideDown:
i = 180;
break;
case UIInterfaceOrientationLandscapeLeft:
i = 90;
break;
case UIInterfaceOrientationLandscapeRight:
i = -90;
break;
}
[webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"window.__defineGetter__('orientation',function(){return %d;});window.onorientationchange();",i]];
But portrait.css is never used in portrait orientation. It seems like the media query for orientation portrait does not work at all.
| html | objective-c | css | ios | xcode | null | open | UIwebview media query in portrait orientation
===
Im trying to load some html in a webview and I want different css to be used for landscape and portrait orientation
this is the head part of my html
NSMutableString *htmlString = [NSMutableString stringWithString:@"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"];
[htmlString appendString:@"<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" id=\"bp-doc\">"
"<head>"
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>"
"<meta name=\"viewport\" content=\"width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;\" />" ];
//landscape css
[htmlString appendString:@"<link rel='stylesheet' media='screen and (orientation: landscape)' href='landscape.css' type='text/css'/>"];
//portrait css
[htmlString appendString:@"<link rel='stylesheet' media='screen and (orientation: portrait)' href='portrait.css' type='text/css'/>"];
[htmlString appendString:@"<link rel='stylesheet' href='style.css' type='text/css'/>"
"<script type='text/javascript' src='jquery-1.6.2.min.js'></script>"
"<script type='text/javascript' src='script.js'></script>"
"</head>"
];
Im also doing this in viewcontrollers shouldAutorotateToInterfaceOrientation: method
int i =0;
switch (interfaceOrientation){
case UIInterfaceOrientationPortrait:
i = 0;
break;
case UIInterfaceOrientationPortraitUpsideDown:
i = 180;
break;
case UIInterfaceOrientationLandscapeLeft:
i = 90;
break;
case UIInterfaceOrientationLandscapeRight:
i = -90;
break;
}
[webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"window.__defineGetter__('orientation',function(){return %d;});window.onorientationchange();",i]];
But portrait.css is never used in portrait orientation. It seems like the media query for orientation portrait does not work at all.
| 0 |
10,157,727 | 04/14/2012 22:03:09 | 1,068,513 | 11/28/2011 00:40:37 | 22 | 0 | Transferring audio file | I have an application that records audio and needs to be shared with other users. I tried ftp'ing to a web server so that I can stream but the file is getting corrupted and results in garbage. Any suggestions how I should be handling this case.
Thanks
Jai | android | file-transfer | null | null | null | null | open | Transferring audio file
===
I have an application that records audio and needs to be shared with other users. I tried ftp'ing to a web server so that I can stream but the file is getting corrupted and results in garbage. Any suggestions how I should be handling this case.
Thanks
Jai | 0 |
11,236,283 | 06/27/2012 23:42:12 | 1,417,244 | 05/25/2012 11:15:03 | 195 | 2 | palindrome - Functional Programming (haskell) | What is the crucial technical reason/feature behind palindrome gets so many mentions in Functional Programming (haskell)? | haskell | palindrome | null | null | null | 06/27/2012 23:52:06 | not a real question | palindrome - Functional Programming (haskell)
===
What is the crucial technical reason/feature behind palindrome gets so many mentions in Functional Programming (haskell)? | 1 |
697,767 | 03/30/2009 15:45:57 | 16,777 | 09/17/2008 20:38:16 | 936 | 55 | fixed-height header, maximized-height body in CSS without tables or JavaScript | I have an HTML editor widget that I want to appear within an absolutely positioned, fixed-size DIV. However, I don't know the size of the DIV beforehand, and it may change if the user resizes the window.
The editor, naturally, has controls and an editable area. Each has their own DIV. I want the controls to take up as much space as they need to, and the editable area to fill the rest of the space.
If I use tables, this is extremely easy to achieve. I just turn off borders and padding and margins, and throw each DIV into a cell in its own row, and maybe fiddle with max-height on the controls DIV.
I've monkeyed with various CSS examples and nothing seems to work without having some JavaScript run on resize to make the editable DIV be the height of the parent minus the height of the controls.
Of course, I can make the parent DIV have display:table and the child DIVs wrapped in display:table-row DIVs and themselves have display:table-cell, but...well...in that case it's exactly the same as using TABLE, TR, and TD, but ten times more ugly for the sake of CSS purity. (Why bother?) | css | javascript | table | html | null | null | open | fixed-height header, maximized-height body in CSS without tables or JavaScript
===
I have an HTML editor widget that I want to appear within an absolutely positioned, fixed-size DIV. However, I don't know the size of the DIV beforehand, and it may change if the user resizes the window.
The editor, naturally, has controls and an editable area. Each has their own DIV. I want the controls to take up as much space as they need to, and the editable area to fill the rest of the space.
If I use tables, this is extremely easy to achieve. I just turn off borders and padding and margins, and throw each DIV into a cell in its own row, and maybe fiddle with max-height on the controls DIV.
I've monkeyed with various CSS examples and nothing seems to work without having some JavaScript run on resize to make the editable DIV be the height of the parent minus the height of the controls.
Of course, I can make the parent DIV have display:table and the child DIVs wrapped in display:table-row DIVs and themselves have display:table-cell, but...well...in that case it's exactly the same as using TABLE, TR, and TD, but ten times more ugly for the sake of CSS purity. (Why bother?) | 0 |
6,055,706 | 05/19/2011 08:17:04 | 750,334 | 05/12/2011 09:51:43 | 27 | 2 | Remove formatting java | I was wondering if there is a java-method that removes the formatting of anykind of output, whether it be string, int, double.
thanx. | java | format | rft | null | null | 05/19/2011 08:46:24 | not a real question | Remove formatting java
===
I was wondering if there is a java-method that removes the formatting of anykind of output, whether it be string, int, double.
thanx. | 1 |
9,167,147 | 02/06/2012 20:57:06 | 600,082 | 02/02/2011 13:56:17 | 659 | 48 | Asp.net MVC 3 Route table - Order of the routes | I have 404 route in my global.asax
routes.MapRoute(
"404",
"{*url}",
new { controller = "Error", action = "PageNotFound" })
;
And routes in areas.
If request is into route in global.asax, then order of the routes in ROUTE TABLE is:
1) area routes
2) global.asax routes
3) 404 route
But if request is into area, then order of the routes in ROUTE TABLE is:¨
1) global.asax routes
2) 404 route
3) area routes
But only on some IIS, where is the problem ?
| asp.net | asp.net-mvc-3 | null | null | null | 02/07/2012 21:32:12 | not a real question | Asp.net MVC 3 Route table - Order of the routes
===
I have 404 route in my global.asax
routes.MapRoute(
"404",
"{*url}",
new { controller = "Error", action = "PageNotFound" })
;
And routes in areas.
If request is into route in global.asax, then order of the routes in ROUTE TABLE is:
1) area routes
2) global.asax routes
3) 404 route
But if request is into area, then order of the routes in ROUTE TABLE is:¨
1) global.asax routes
2) 404 route
3) area routes
But only on some IIS, where is the problem ?
| 1 |
4,317,097 | 11/30/2010 18:24:33 | 75,500 | 03/09/2009 06:16:32 | 4,813 | 227 | ElementName vs. RelativeResource? | What of the following TextBlocks' Bindings costs more performance:
<Window
x:Name="Me"
x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:src="clr-namespace:WpfApplication1"
Title="MainWindow">
<StackPanel>
<TextBlock Text="{Binding Title, ElementName=Me}"/>
<TextBlock Text="{Binding Title, RelativeSource={RelativeSource AncestorType={x:Type src:MainWindow}}}"/>
</StackPanel>
</Window>
I am sure my question might take different when the TextBlocks are in a high nesting level having many siblings and ancestors. | wpf | binding | performance | relativesource | elementname | null | open | ElementName vs. RelativeResource?
===
What of the following TextBlocks' Bindings costs more performance:
<Window
x:Name="Me"
x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:src="clr-namespace:WpfApplication1"
Title="MainWindow">
<StackPanel>
<TextBlock Text="{Binding Title, ElementName=Me}"/>
<TextBlock Text="{Binding Title, RelativeSource={RelativeSource AncestorType={x:Type src:MainWindow}}}"/>
</StackPanel>
</Window>
I am sure my question might take different when the TextBlocks are in a high nesting level having many siblings and ancestors. | 0 |
2,243,202 | 02/11/2010 08:45:17 | 270,924 | 02/11/2010 08:45:17 | 1 | 0 | Exception in Gtk.NodeView.AddNode | I'm getting an exception when I want to add elements into my NodeView:
> Exception in Gtk# callback delegate
> Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
> System.IndexOutOfRangeException: Array index is out of range.
> at Gtk.NodeStore.get_value_cb (Int32 node_idx, Int32 col, GLib.Value& val) [0x00000]
> at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal)
> at Gtk.NodeStore.get_value_cb(Int32 node_idx, Int32 col, Value ByRef val)
> at Gtk.Application.gtk_main()
> at Gtk.Application.Run()
> at IcePipe.Program.Main(System.String[] args) in /home/tomcatfort/Projects/IcePipe/GUI/Program.cs:line 18
I'm making this code in mono 2.4.2.3. And I'm using Gtk#.
You can download my code from this link: [http://tomcatfort.net/priv/IcePipe.tar.gz][1]
I don't know what cause the problem, I can't find anything that might be the problem.
[1]: http://tomcatfort.net/priv/IcePipe.tar.gz | c# | gtk# | null | null | null | null | open | Exception in Gtk.NodeView.AddNode
===
I'm getting an exception when I want to add elements into my NodeView:
> Exception in Gtk# callback delegate
> Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
> System.IndexOutOfRangeException: Array index is out of range.
> at Gtk.NodeStore.get_value_cb (Int32 node_idx, Int32 col, GLib.Value& val) [0x00000]
> at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal)
> at Gtk.NodeStore.get_value_cb(Int32 node_idx, Int32 col, Value ByRef val)
> at Gtk.Application.gtk_main()
> at Gtk.Application.Run()
> at IcePipe.Program.Main(System.String[] args) in /home/tomcatfort/Projects/IcePipe/GUI/Program.cs:line 18
I'm making this code in mono 2.4.2.3. And I'm using Gtk#.
You can download my code from this link: [http://tomcatfort.net/priv/IcePipe.tar.gz][1]
I don't know what cause the problem, I can't find anything that might be the problem.
[1]: http://tomcatfort.net/priv/IcePipe.tar.gz | 0 |
11,036,073 | 06/14/2012 15:09:11 | 1,394,341 | 05/14/2012 17:44:33 | 6 | 0 | Drupal View block's exposed filters don't work in node | I have a view block with three exposed filters that work fine within the view, but not when called within a node. It worked fine when I first called it in the node, but has since stopped working. I've tried recreating the view block, recreating it in an entirely new view, and calling it from a new node. The exposed filters do absolutely nothing when clicked.
I have AJAX enabled (when disabled, the exposed filters disappear).
Any ideas why this isn't working?
Drupal version: 7.12
PHP code used in the node to call the view block:
<?php $block = block_load('views', 'content_list_primary4-view_block_list_ftactivities');
print (drupal_render(_block_get_renderable_array(_block_render_blocks(array($block)))));
?>
Live Preview Query:
Query
SELECT field_data_field_list_order.field_list_order_value AS field_data_field_list_order_field_list_order_value, node.nid AS nid, 'content_list_primary4:view_block_list_ftactivities' AS view_name
FROM
{node} node
INNER JOIN {field_data_field_audience} field_data_field_audience ON node.nid = field_data_field_audience.entity_id AND (field_data_field_audience.entity_type = 'node' AND field_data_field_audience.deleted = '0')
LEFT JOIN {field_data_field_list_order} field_data_field_list_order ON node.nid = field_data_field_list_order.entity_id AND (field_data_field_list_order.entity_type = 'node' AND field_data_field_list_order.deleted = '0')
WHERE (( (field_data_field_audience.field_audience_tid = '125') ))
ORDER BY field_data_field_list_order_field_list_order_value ASC
Title
Path This display has no path.
Exported View Code:
$view = new view;
$view->name = 'content_list_primary4';
$view->description = 'Blk of Washburn Award Winners, Walker Price Winners, Upcoming Events, Field Trip Activities';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Content List - Primary4';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'Events';
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['query']['options']['query_comment'] = FALSE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'none';
$handler->display->display_options['style_plugin'] = 'list';
$handler->display->display_options['style_options']['row_class'] = 'offering-preview_primary';
$handler->display->display_options['style_options']['wrapper_class'] = '';
$handler->display->display_options['row_plugin'] = 'node';
$handler->display->display_options['row_options']['links'] = 1;
$handler->display->display_options['row_options']['comments'] = 0;
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = '';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['external'] = 0;
$handler->display->display_options['fields']['title']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['title']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['element_type'] = 'h2';
$handler->display->display_options['fields']['title']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['title']['element_default_classes'] = 0;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 0;
/* Field: Content: Show Subtitle */
$handler->display->display_options['fields']['field_subtitle']['id'] = 'field_subtitle';
$handler->display->display_options['fields']['field_subtitle']['table'] = 'field_data_field_subtitle';
$handler->display->display_options['fields']['field_subtitle']['field'] = 'field_subtitle';
$handler->display->display_options['fields']['field_subtitle']['label'] = '';
$handler->display->display_options['fields']['field_subtitle']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_subtitle']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_subtitle']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_subtitle']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_subtitle']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_subtitle']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_subtitle']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_subtitle']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_subtitle']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_subtitle']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_subtitle']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_subtitle']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_subtitle']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_subtitle']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_subtitle']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_subtitle']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_subtitle']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['field_subtitle']['field_api_classes'] = 0;
/* Field: Content: Snippet Description */
$handler->display->display_options['fields']['field_snippet_desc']['id'] = 'field_snippet_desc';
$handler->display->display_options['fields']['field_snippet_desc']['table'] = 'field_data_field_snippet_desc';
$handler->display->display_options['fields']['field_snippet_desc']['field'] = 'field_snippet_desc';
$handler->display->display_options['fields']['field_snippet_desc']['label'] = '';
$handler->display->display_options['fields']['field_snippet_desc']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_snippet_desc']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_snippet_desc']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_snippet_desc']['element_default_classes'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['field_api_classes'] = 0;
/* Field: Content: Date(s) */
$handler->display->display_options['fields']['field_dates_singles']['id'] = 'field_dates_singles';
$handler->display->display_options['fields']['field_dates_singles']['table'] = 'field_data_field_dates_singles';
$handler->display->display_options['fields']['field_dates_singles']['field'] = 'field_dates_singles';
$handler->display->display_options['fields']['field_dates_singles']['label'] = '';
$handler->display->display_options['fields']['field_dates_singles']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_dates_singles']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_dates_singles']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_dates_singles']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_dates_singles']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['settings'] = array(
'format_type' => 'custom_full_pipe',
'fromto' => 'both',
'multiple_number' => '1',
'multiple_from' => '',
'multiple_to' => '',
'show_repeat_rule' => 'hide',
);
$handler->display->display_options['fields']['field_dates_singles']['group_rows'] = 1;
$handler->display->display_options['fields']['field_dates_singles']['delta_offset'] = '0';
$handler->display->display_options['fields']['field_dates_singles']['delta_reversed'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['delta_first_last'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['field_api_classes'] = 0;
/* Field: Content: Link */
$handler->display->display_options['fields']['view_node']['id'] = 'view_node';
$handler->display->display_options['fields']['view_node']['table'] = 'views_entity_node';
$handler->display->display_options['fields']['view_node']['field'] = 'view_node';
$handler->display->display_options['fields']['view_node']['label'] = '';
$handler->display->display_options['fields']['view_node']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['view_node']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['view_node']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['view_node']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['view_node']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['view_node']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['view_node']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['view_node']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['view_node']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['view_node']['alter']['trim'] = 0;
$handler->display->display_options['fields']['view_node']['alter']['html'] = 0;
$handler->display->display_options['fields']['view_node']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['view_node']['element_default_classes'] = 1;
$handler->display->display_options['fields']['view_node']['hide_empty'] = 0;
$handler->display->display_options['fields']['view_node']['empty_zero'] = 0;
$handler->display->display_options['fields']['view_node']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['view_node']['text'] = 'Learn more about this offering';
/* Sort criterion: Content: Order in List (field_list_order) */
$handler->display->display_options['sorts']['field_list_order_value']['id'] = 'field_list_order_value';
$handler->display->display_options['sorts']['field_list_order_value']['table'] = 'field_data_field_list_order';
$handler->display->display_options['sorts']['field_list_order_value']['field'] = 'field_list_order_value';
$handler->display->display_options['filter_groups']['groups'] = array(
0 => 'AND',
1 => 'AND',
2 => 'AND',
);
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'event_desc' => 'event_desc',
);
$handler->display->display_options['filters']['type']['group'] = 1;
$handler->display->display_options['filters']['type']['exposed'] = TRUE;
$handler->display->display_options['filters']['type']['expose']['operator_id'] = 'type_op';
$handler->display->display_options['filters']['type']['expose']['label'] = 'Type';
$handler->display->display_options['filters']['type']['expose']['use_operator'] = FALSE;
$handler->display->display_options['filters']['type']['expose']['operator'] = 'type_op';
$handler->display->display_options['filters']['type']['expose']['identifier'] = 'type';
$handler->display->display_options['filters']['type']['expose']['required'] = FALSE;
$handler->display->display_options['filters']['type']['expose']['remember'] = FALSE;
$handler->display->display_options['filters']['type']['expose']['multiple'] = FALSE;
/* Filter criterion: Content: Audience (field_audience) */
$handler->display->display_options['filters']['field_audience_tid']['id'] = 'field_audience_tid';
$handler->display->display_options['filters']['field_audience_tid']['table'] = 'field_data_field_audience';
$handler->display->display_options['filters']['field_audience_tid']['field'] = 'field_audience_tid';
$handler->display->display_options['filters']['field_audience_tid']['type'] = 'select';
$handler->display->display_options['filters']['field_audience_tid']['vocabulary'] = 'audience';
/* Display: Blk - List - Washburn Award Winners */
$handler = $view->new_display('block', 'Blk - List - Washburn Award Winners', 'view_block_list_washburn_award_winners');
$handler->display->display_options['defaults']['title'] = FALSE;
$handler->display->display_options['defaults']['use_ajax'] = FALSE;
$handler->display->display_options['use_ajax'] = TRUE;
$handler->display->display_options['defaults']['sorts'] = FALSE;
/* Sort criterion: Content: Title */
$handler->display->display_options['sorts']['title']['id'] = 'title';
$handler->display->display_options['sorts']['title']['table'] = 'node';
$handler->display->display_options['sorts']['title']['field'] = 'title';
$handler->display->display_options['sorts']['title']['order'] = 'DESC';
$handler->display->display_options['filter_groups']['groups'] = array(
0 => 'AND',
1 => 'AND',
2 => 'OR',
);
$handler->display->display_options['defaults']['filters'] = FALSE;
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'washburn_award_winner' => 'washburn_award_winner',
);
$handler->display->display_options['filters']['type']['group'] = 1;
$handler->display->display_options['block_description'] = 'Content List of Washburn Award Winners';
/* Display: Blk - List - Walker Prize Winners */
$handler = $view->new_display('block', 'Blk - List - Walker Prize Winners', 'view_block_list_walker_prize_winners');
$handler->display->display_options['defaults']['title'] = FALSE;
$handler->display->display_options['defaults']['use_ajax'] = FALSE;
$handler->display->display_options['use_ajax'] = TRUE;
$handler->display->display_options['defaults']['sorts'] = FALSE;
/* Sort criterion: Content: Title */
$handler->display->display_options['sorts']['title']['id'] = 'title';
$handler->display->display_options['sorts']['title']['table'] = 'node';
$handler->display->display_options['sorts']['title']['field'] = 'title';
$handler->display->display_options['sorts']['title']['order'] = 'DESC';
$handler->display->display_options['filter_groups']['groups'] = array(
0 => 'AND',
1 => 'AND',
2 => 'OR',
);
$handler->display->display_options['defaults']['filters'] = FALSE;
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'walker_prize_winner' => 'walker_prize_winner',
);
$handler->display->display_options['filters']['type']['group'] = 1;
$handler->display->display_options['block_description'] = 'Content List of Walker Prize Winners';
/* Display: Upcoming Events */
$handler = $view->new_display('block', 'Upcoming Events', 'view_block_list_upcoming_events');
$handler->display->display_options['defaults']['title'] = FALSE;
$handler->display->display_options['defaults']['query'] = FALSE;
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['query']['options']['distinct'] = TRUE;
$handler->display->display_options['query']['options']['query_comment'] = FALSE;
$handler->display->display_options['defaults']['style_plugin'] = FALSE;
$handler->display->display_options['style_plugin'] = 'list';
$handler->display->display_options['style_options']['row_class'] = 'offering-preview_primary';
$handler->display->display_options['style_options']['wrapper_class'] = '';
$handler->display->display_options['defaults']['style_options'] = FALSE;
$handler->display->display_options['defaults']['row_plugin'] = FALSE;
$handler->display->display_options['row_plugin'] = 'node';
$handler->display->display_options['row_options']['links'] = 1;
$handler->display->display_options['row_options']['comments'] = 0;
$handler->display->display_options['defaults']['row_options'] = FALSE;
$handler->display->display_options['defaults']['sorts'] = FALSE;
/* Sort criterion: Content: Order in List (field_list_order) */
$handler->display->display_options['sorts']['field_list_order_value']['id'] = 'field_list_order_value';
$handler->display->display_options['sorts']['field_list_order_value']['table'] = 'field_data_field_list_order';
$handler->display->display_options['sorts']['field_list_order_value']['field'] = 'field_list_order_value';
$handler->display->display_options['sorts']['field_list_order_value']['order'] = 'DESC';
/* Sort criterion: Content: Post date */
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'node';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['granularity'] = 'day';
$handler->display->display_options['filter_groups']['operator'] = 'OR';
$handler->display->display_options['filter_groups']['groups'] = array(
0 => 'AND',
1 => 'AND',
);
$handler->display->display_options['defaults']['filters'] = FALSE;
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'event_desc' => 'event_desc',
);
$handler->display->display_options['filters']['type']['group'] = 0;
/* Filter criterion: Content: Date(s) - start date (field_dates_singles) */
$handler->display->display_options['filters']['field_dates_singles_value']['id'] = 'field_dates_singles_value';
$handler->display->display_options['filters']['field_dates_singles_value']['table'] = 'field_data_field_dates_singles';
$handler->display->display_options['filters']['field_dates_singles_value']['field'] = 'field_dates_singles_value';
$handler->display->display_options['filters']['field_dates_singles_value']['operator'] = 'between';
$handler->display->display_options['filters']['field_dates_singles_value']['group'] = 0;
$handler->display->display_options['filters']['field_dates_singles_value']['expose']['use_operator'] = FALSE;
$handler->display->display_options['filters']['field_dates_singles_value']['expose']['required'] = FALSE;
$handler->display->display_options['filters']['field_dates_singles_value']['expose']['remember'] = FALSE;
$handler->display->display_options['filters']['field_dates_singles_value']['expose']['multiple'] = FALSE;
$handler->display->display_options['filters']['field_dates_singles_value']['default_date'] = 'now';
$handler->display->display_options['filters']['field_dates_singles_value']['default_to_date'] = 'now +90 days';
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type_1']['id'] = 'type_1';
$handler->display->display_options['filters']['type_1']['table'] = 'node';
$handler->display->display_options['filters']['type_1']['field'] = 'type';
$handler->display->display_options['filters']['type_1']['value'] = array(
'3d_desc' => '3d_desc',
'exhibit_desc' => 'exhibit_desc',
'lp_desc' => 'lp_desc',
'omni_desc' => 'omni_desc',
'planet_desc' => 'planet_desc',
);
$handler->display->display_options['filters']['type_1']['group'] = 1;
$handler->display->display_options['filters']['type_1']['expose']['use_operator'] = FALSE;
$handler->display->display_options['filters']['type_1']['expose']['required'] = FALSE;
$handler->display->display_options['filters']['type_1']['expose']['remember'] = FALSE;
$handler->display->display_options['filters']['type_1']['expose']['multiple'] = FALSE;
/* Filter criterion: Content: Run Dates - start date (field_dates_run) */
$handler->display->display_options['filters']['field_dates_run_value']['id'] = 'field_dates_run_value';
$handler->display->display_options['filters']['field_dates_run_value']['table'] = 'field_data_field_dates_run';
$handler->display->display_options['filters']['field_dates_run_value']['field'] = 'field_dates_run_value';
$handler->display->display_options['filters']['field_dates_run_value']['operator'] = 'between';
$handler->display->display_options['filters']['field_dates_run_value']['group'] = 1;
$handler->display->display_options['filters']['field_dates_run_value']['expose']['use_operator'] = FALSE;
$handler->display->display_options['filters']['field_dates_run_value']['expose']['required'] = FALSE;
$handler->display->display_options['filters']['field_dates_run_value']['expose']['remember'] = FALSE;
$handler->display->display_options['filters']['field_dates_run_value']['expose']['multiple'] = FALSE;
$handler->display->display_options['filters']['field_dates_run_value']['default_date'] = 'now';
$handler->display->display_options['filters']['field_dates_run_value']['default_to_date'] = 'now +90 days';
/* Filter criterion: Content: Has taxonomy terms (with depth) */
$handler->display->display_options['filters']['term_node_tid_depth']['id'] = 'term_node_tid_depth';
$handler->display->display_options['filters']['term_node_tid_depth']['table'] = 'node';
$handler->display->display_options['filters']['term_node_tid_depth']['field'] = 'term_node_tid_depth';
$handler->display->display_options['filters']['term_node_tid_depth']['value'] = array(
2175 => '2175',
109 => '109',
2176 => '2176',
110 => '110',
2177 => '2177',
112 => '112',
2179 => '2179',
2180 => '2180',
2167 => '2167',
2178 => '2178',
488 => '488',
2160 => '2160',
);
$handler->display->display_options['filters']['term_node_tid_depth']['reduce_duplicates'] = 0;
$handler->display->display_options['filters']['term_node_tid_depth']['type'] = 'select';
$handler->display->display_options['filters']['term_node_tid_depth']['vocabulary'] = 'event_types';
$handler->display->display_options['filters']['term_node_tid_depth']['depth'] = '1';
/* Display: Field Trip Activities */
$handler = $view->new_display('block', 'Field Trip Activities', 'view_block_list_ftactivities');
$handler->display->display_options['defaults']['title'] = FALSE;
$handler->display->display_options['defaults']['use_ajax'] = FALSE;
$handler->display->display_options['use_ajax'] = TRUE;
$handler->display->display_options['defaults']['exposed_form'] = FALSE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['exposed_form']['options']['reset_button'] = TRUE;
$handler->display->display_options['exposed_form']['options']['autosubmit'] = 0;
$handler->display->display_options['exposed_form']['options']['autosubmit_hide'] = 1;
$handler->display->display_options['defaults']['style_plugin'] = FALSE;
$handler->display->display_options['style_plugin'] = 'list';
$handler->display->display_options['defaults']['style_options'] = FALSE;
$handler->display->display_options['defaults']['row_plugin'] = FALSE;
$handler->display->display_options['row_plugin'] = 'node';
$handler->display->display_options['row_options']['links'] = 1;
$handler->display->display_options['row_options']['comments'] = 0;
$handler->display->display_options['defaults']['row_options'] = FALSE;
$handler->display->display_options['defaults']['filters'] = FALSE;
/* Filter criterion: Content: Audience (field_audience) */
$handler->display->display_options['filters']['field_audience_tid']['id'] = 'field_audience_tid';
$handler->display->display_options['filters']['field_audience_tid']['table'] = 'field_data_field_audience';
$handler->display->display_options['filters']['field_audience_tid']['field'] = 'field_audience_tid';
$handler->display->display_options['filters']['field_audience_tid']['value'] = array(
125 => '125',
);
$handler->display->display_options['filters']['field_audience_tid']['group'] = 0;
$handler->display->display_options['filters']['field_audience_tid']['reduce_duplicates'] = 0;
$handler->display->display_options['filters']['field_audience_tid']['type'] = 'select';
$handler->display->display_options['filters']['field_audience_tid']['vocabulary'] = 'audience';
| drupal | drupal-7 | drupal-views | drupal-forms | drupal-ajax | 06/14/2012 15:10:59 | not a real question | Drupal View block's exposed filters don't work in node
===
I have a view block with three exposed filters that work fine within the view, but not when called within a node. It worked fine when I first called it in the node, but has since stopped working. I've tried recreating the view block, recreating it in an entirely new view, and calling it from a new node. The exposed filters do absolutely nothing when clicked.
I have AJAX enabled (when disabled, the exposed filters disappear).
Any ideas why this isn't working?
Drupal version: 7.12
PHP code used in the node to call the view block:
<?php $block = block_load('views', 'content_list_primary4-view_block_list_ftactivities');
print (drupal_render(_block_get_renderable_array(_block_render_blocks(array($block)))));
?>
Live Preview Query:
Query
SELECT field_data_field_list_order.field_list_order_value AS field_data_field_list_order_field_list_order_value, node.nid AS nid, 'content_list_primary4:view_block_list_ftactivities' AS view_name
FROM
{node} node
INNER JOIN {field_data_field_audience} field_data_field_audience ON node.nid = field_data_field_audience.entity_id AND (field_data_field_audience.entity_type = 'node' AND field_data_field_audience.deleted = '0')
LEFT JOIN {field_data_field_list_order} field_data_field_list_order ON node.nid = field_data_field_list_order.entity_id AND (field_data_field_list_order.entity_type = 'node' AND field_data_field_list_order.deleted = '0')
WHERE (( (field_data_field_audience.field_audience_tid = '125') ))
ORDER BY field_data_field_list_order_field_list_order_value ASC
Title
Path This display has no path.
Exported View Code:
$view = new view;
$view->name = 'content_list_primary4';
$view->description = 'Blk of Washburn Award Winners, Walker Price Winners, Upcoming Events, Field Trip Activities';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Content List - Primary4';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'Events';
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['query']['options']['query_comment'] = FALSE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'none';
$handler->display->display_options['style_plugin'] = 'list';
$handler->display->display_options['style_options']['row_class'] = 'offering-preview_primary';
$handler->display->display_options['style_options']['wrapper_class'] = '';
$handler->display->display_options['row_plugin'] = 'node';
$handler->display->display_options['row_options']['links'] = 1;
$handler->display->display_options['row_options']['comments'] = 0;
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = '';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['external'] = 0;
$handler->display->display_options['fields']['title']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['title']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['element_type'] = 'h2';
$handler->display->display_options['fields']['title']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['title']['element_default_classes'] = 0;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 0;
/* Field: Content: Show Subtitle */
$handler->display->display_options['fields']['field_subtitle']['id'] = 'field_subtitle';
$handler->display->display_options['fields']['field_subtitle']['table'] = 'field_data_field_subtitle';
$handler->display->display_options['fields']['field_subtitle']['field'] = 'field_subtitle';
$handler->display->display_options['fields']['field_subtitle']['label'] = '';
$handler->display->display_options['fields']['field_subtitle']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_subtitle']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_subtitle']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_subtitle']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_subtitle']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_subtitle']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_subtitle']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_subtitle']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_subtitle']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_subtitle']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_subtitle']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_subtitle']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_subtitle']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_subtitle']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_subtitle']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_subtitle']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_subtitle']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['field_subtitle']['field_api_classes'] = 0;
/* Field: Content: Snippet Description */
$handler->display->display_options['fields']['field_snippet_desc']['id'] = 'field_snippet_desc';
$handler->display->display_options['fields']['field_snippet_desc']['table'] = 'field_data_field_snippet_desc';
$handler->display->display_options['fields']['field_snippet_desc']['field'] = 'field_snippet_desc';
$handler->display->display_options['fields']['field_snippet_desc']['label'] = '';
$handler->display->display_options['fields']['field_snippet_desc']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_snippet_desc']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_snippet_desc']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_snippet_desc']['element_default_classes'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['field_snippet_desc']['field_api_classes'] = 0;
/* Field: Content: Date(s) */
$handler->display->display_options['fields']['field_dates_singles']['id'] = 'field_dates_singles';
$handler->display->display_options['fields']['field_dates_singles']['table'] = 'field_data_field_dates_singles';
$handler->display->display_options['fields']['field_dates_singles']['field'] = 'field_dates_singles';
$handler->display->display_options['fields']['field_dates_singles']['label'] = '';
$handler->display->display_options['fields']['field_dates_singles']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_dates_singles']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_dates_singles']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_dates_singles']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_dates_singles']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['settings'] = array(
'format_type' => 'custom_full_pipe',
'fromto' => 'both',
'multiple_number' => '1',
'multiple_from' => '',
'multiple_to' => '',
'show_repeat_rule' => 'hide',
);
$handler->display->display_options['fields']['field_dates_singles']['group_rows'] = 1;
$handler->display->display_options['fields']['field_dates_singles']['delta_offset'] = '0';
$handler->display->display_options['fields']['field_dates_singles']['delta_reversed'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['delta_first_last'] = 0;
$handler->display->display_options['fields']['field_dates_singles']['field_api_classes'] = 0;
/* Field: Content: Link */
$handler->display->display_options['fields']['view_node']['id'] = 'view_node';
$handler->display->display_options['fields']['view_node']['table'] = 'views_entity_node';
$handler->display->display_options['fields']['view_node']['field'] = 'view_node';
$handler->display->display_options['fields']['view_node']['label'] = '';
$handler->display->display_options['fields']['view_node']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['view_node']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['view_node']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['view_node']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['view_node']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['view_node']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['view_node']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['view_node']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['view_node']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['view_node']['alter']['trim'] = 0;
$handler->display->display_options['fields']['view_node']['alter']['html'] = 0;
$handler->display->display_options['fields']['view_node']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['view_node']['element_default_classes'] = 1;
$handler->display->display_options['fields']['view_node']['hide_empty'] = 0;
$handler->display->display_options['fields']['view_node']['empty_zero'] = 0;
$handler->display->display_options['fields']['view_node']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['view_node']['text'] = 'Learn more about this offering';
/* Sort criterion: Content: Order in List (field_list_order) */
$handler->display->display_options['sorts']['field_list_order_value']['id'] = 'field_list_order_value';
$handler->display->display_options['sorts']['field_list_order_value']['table'] = 'field_data_field_list_order';
$handler->display->display_options['sorts']['field_list_order_value']['field'] = 'field_list_order_value';
$handler->display->display_options['filter_groups']['groups'] = array(
0 => 'AND',
1 => 'AND',
2 => 'AND',
);
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'event_desc' => 'event_desc',
);
$handler->display->display_options['filters']['type']['group'] = 1;
$handler->display->display_options['filters']['type']['exposed'] = TRUE;
$handler->display->display_options['filters']['type']['expose']['operator_id'] = 'type_op';
$handler->display->display_options['filters']['type']['expose']['label'] = 'Type';
$handler->display->display_options['filters']['type']['expose']['use_operator'] = FALSE;
$handler->display->display_options['filters']['type']['expose']['operator'] = 'type_op';
$handler->display->display_options['filters']['type']['expose']['identifier'] = 'type';
$handler->display->display_options['filters']['type']['expose']['required'] = FALSE;
$handler->display->display_options['filters']['type']['expose']['remember'] = FALSE;
$handler->display->display_options['filters']['type']['expose']['multiple'] = FALSE;
/* Filter criterion: Content: Audience (field_audience) */
$handler->display->display_options['filters']['field_audience_tid']['id'] = 'field_audience_tid';
$handler->display->display_options['filters']['field_audience_tid']['table'] = 'field_data_field_audience';
$handler->display->display_options['filters']['field_audience_tid']['field'] = 'field_audience_tid';
$handler->display->display_options['filters']['field_audience_tid']['type'] = 'select';
$handler->display->display_options['filters']['field_audience_tid']['vocabulary'] = 'audience';
/* Display: Blk - List - Washburn Award Winners */
$handler = $view->new_display('block', 'Blk - List - Washburn Award Winners', 'view_block_list_washburn_award_winners');
$handler->display->display_options['defaults']['title'] = FALSE;
$handler->display->display_options['defaults']['use_ajax'] = FALSE;
$handler->display->display_options['use_ajax'] = TRUE;
$handler->display->display_options['defaults']['sorts'] = FALSE;
/* Sort criterion: Content: Title */
$handler->display->display_options['sorts']['title']['id'] = 'title';
$handler->display->display_options['sorts']['title']['table'] = 'node';
$handler->display->display_options['sorts']['title']['field'] = 'title';
$handler->display->display_options['sorts']['title']['order'] = 'DESC';
$handler->display->display_options['filter_groups']['groups'] = array(
0 => 'AND',
1 => 'AND',
2 => 'OR',
);
$handler->display->display_options['defaults']['filters'] = FALSE;
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'washburn_award_winner' => 'washburn_award_winner',
);
$handler->display->display_options['filters']['type']['group'] = 1;
$handler->display->display_options['block_description'] = 'Content List of Washburn Award Winners';
/* Display: Blk - List - Walker Prize Winners */
$handler = $view->new_display('block', 'Blk - List - Walker Prize Winners', 'view_block_list_walker_prize_winners');
$handler->display->display_options['defaults']['title'] = FALSE;
$handler->display->display_options['defaults']['use_ajax'] = FALSE;
$handler->display->display_options['use_ajax'] = TRUE;
$handler->display->display_options['defaults']['sorts'] = FALSE;
/* Sort criterion: Content: Title */
$handler->display->display_options['sorts']['title']['id'] = 'title';
$handler->display->display_options['sorts']['title']['table'] = 'node';
$handler->display->display_options['sorts']['title']['field'] = 'title';
$handler->display->display_options['sorts']['title']['order'] = 'DESC';
$handler->display->display_options['filter_groups']['groups'] = array(
0 => 'AND',
1 => 'AND',
2 => 'OR',
);
$handler->display->display_options['defaults']['filters'] = FALSE;
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'walker_prize_winner' => 'walker_prize_winner',
);
$handler->display->display_options['filters']['type']['group'] = 1;
$handler->display->display_options['block_description'] = 'Content List of Walker Prize Winners';
/* Display: Upcoming Events */
$handler = $view->new_display('block', 'Upcoming Events', 'view_block_list_upcoming_events');
$handler->display->display_options['defaults']['title'] = FALSE;
$handler->display->display_options['defaults']['query'] = FALSE;
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['query']['options']['distinct'] = TRUE;
$handler->display->display_options['query']['options']['query_comment'] = FALSE;
$handler->display->display_options['defaults']['style_plugin'] = FALSE;
$handler->display->display_options['style_plugin'] = 'list';
$handler->display->display_options['style_options']['row_class'] = 'offering-preview_primary';
$handler->display->display_options['style_options']['wrapper_class'] = '';
$handler->display->display_options['defaults']['style_options'] = FALSE;
$handler->display->display_options['defaults']['row_plugin'] = FALSE;
$handler->display->display_options['row_plugin'] = 'node';
$handler->display->display_options['row_options']['links'] = 1;
$handler->display->display_options['row_options']['comments'] = 0;
$handler->display->display_options['defaults']['row_options'] = FALSE;
$handler->display->display_options['defaults']['sorts'] = FALSE;
/* Sort criterion: Content: Order in List (field_list_order) */
$handler->display->display_options['sorts']['field_list_order_value']['id'] = 'field_list_order_value';
$handler->display->display_options['sorts']['field_list_order_value']['table'] = 'field_data_field_list_order';
$handler->display->display_options['sorts']['field_list_order_value']['field'] = 'field_list_order_value';
$handler->display->display_options['sorts']['field_list_order_value']['order'] = 'DESC';
/* Sort criterion: Content: Post date */
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'node';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['granularity'] = 'day';
$handler->display->display_options['filter_groups']['operator'] = 'OR';
$handler->display->display_options['filter_groups']['groups'] = array(
0 => 'AND',
1 => 'AND',
);
$handler->display->display_options['defaults']['filters'] = FALSE;
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'event_desc' => 'event_desc',
);
$handler->display->display_options['filters']['type']['group'] = 0;
/* Filter criterion: Content: Date(s) - start date (field_dates_singles) */
$handler->display->display_options['filters']['field_dates_singles_value']['id'] = 'field_dates_singles_value';
$handler->display->display_options['filters']['field_dates_singles_value']['table'] = 'field_data_field_dates_singles';
$handler->display->display_options['filters']['field_dates_singles_value']['field'] = 'field_dates_singles_value';
$handler->display->display_options['filters']['field_dates_singles_value']['operator'] = 'between';
$handler->display->display_options['filters']['field_dates_singles_value']['group'] = 0;
$handler->display->display_options['filters']['field_dates_singles_value']['expose']['use_operator'] = FALSE;
$handler->display->display_options['filters']['field_dates_singles_value']['expose']['required'] = FALSE;
$handler->display->display_options['filters']['field_dates_singles_value']['expose']['remember'] = FALSE;
$handler->display->display_options['filters']['field_dates_singles_value']['expose']['multiple'] = FALSE;
$handler->display->display_options['filters']['field_dates_singles_value']['default_date'] = 'now';
$handler->display->display_options['filters']['field_dates_singles_value']['default_to_date'] = 'now +90 days';
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type_1']['id'] = 'type_1';
$handler->display->display_options['filters']['type_1']['table'] = 'node';
$handler->display->display_options['filters']['type_1']['field'] = 'type';
$handler->display->display_options['filters']['type_1']['value'] = array(
'3d_desc' => '3d_desc',
'exhibit_desc' => 'exhibit_desc',
'lp_desc' => 'lp_desc',
'omni_desc' => 'omni_desc',
'planet_desc' => 'planet_desc',
);
$handler->display->display_options['filters']['type_1']['group'] = 1;
$handler->display->display_options['filters']['type_1']['expose']['use_operator'] = FALSE;
$handler->display->display_options['filters']['type_1']['expose']['required'] = FALSE;
$handler->display->display_options['filters']['type_1']['expose']['remember'] = FALSE;
$handler->display->display_options['filters']['type_1']['expose']['multiple'] = FALSE;
/* Filter criterion: Content: Run Dates - start date (field_dates_run) */
$handler->display->display_options['filters']['field_dates_run_value']['id'] = 'field_dates_run_value';
$handler->display->display_options['filters']['field_dates_run_value']['table'] = 'field_data_field_dates_run';
$handler->display->display_options['filters']['field_dates_run_value']['field'] = 'field_dates_run_value';
$handler->display->display_options['filters']['field_dates_run_value']['operator'] = 'between';
$handler->display->display_options['filters']['field_dates_run_value']['group'] = 1;
$handler->display->display_options['filters']['field_dates_run_value']['expose']['use_operator'] = FALSE;
$handler->display->display_options['filters']['field_dates_run_value']['expose']['required'] = FALSE;
$handler->display->display_options['filters']['field_dates_run_value']['expose']['remember'] = FALSE;
$handler->display->display_options['filters']['field_dates_run_value']['expose']['multiple'] = FALSE;
$handler->display->display_options['filters']['field_dates_run_value']['default_date'] = 'now';
$handler->display->display_options['filters']['field_dates_run_value']['default_to_date'] = 'now +90 days';
/* Filter criterion: Content: Has taxonomy terms (with depth) */
$handler->display->display_options['filters']['term_node_tid_depth']['id'] = 'term_node_tid_depth';
$handler->display->display_options['filters']['term_node_tid_depth']['table'] = 'node';
$handler->display->display_options['filters']['term_node_tid_depth']['field'] = 'term_node_tid_depth';
$handler->display->display_options['filters']['term_node_tid_depth']['value'] = array(
2175 => '2175',
109 => '109',
2176 => '2176',
110 => '110',
2177 => '2177',
112 => '112',
2179 => '2179',
2180 => '2180',
2167 => '2167',
2178 => '2178',
488 => '488',
2160 => '2160',
);
$handler->display->display_options['filters']['term_node_tid_depth']['reduce_duplicates'] = 0;
$handler->display->display_options['filters']['term_node_tid_depth']['type'] = 'select';
$handler->display->display_options['filters']['term_node_tid_depth']['vocabulary'] = 'event_types';
$handler->display->display_options['filters']['term_node_tid_depth']['depth'] = '1';
/* Display: Field Trip Activities */
$handler = $view->new_display('block', 'Field Trip Activities', 'view_block_list_ftactivities');
$handler->display->display_options['defaults']['title'] = FALSE;
$handler->display->display_options['defaults']['use_ajax'] = FALSE;
$handler->display->display_options['use_ajax'] = TRUE;
$handler->display->display_options['defaults']['exposed_form'] = FALSE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['exposed_form']['options']['reset_button'] = TRUE;
$handler->display->display_options['exposed_form']['options']['autosubmit'] = 0;
$handler->display->display_options['exposed_form']['options']['autosubmit_hide'] = 1;
$handler->display->display_options['defaults']['style_plugin'] = FALSE;
$handler->display->display_options['style_plugin'] = 'list';
$handler->display->display_options['defaults']['style_options'] = FALSE;
$handler->display->display_options['defaults']['row_plugin'] = FALSE;
$handler->display->display_options['row_plugin'] = 'node';
$handler->display->display_options['row_options']['links'] = 1;
$handler->display->display_options['row_options']['comments'] = 0;
$handler->display->display_options['defaults']['row_options'] = FALSE;
$handler->display->display_options['defaults']['filters'] = FALSE;
/* Filter criterion: Content: Audience (field_audience) */
$handler->display->display_options['filters']['field_audience_tid']['id'] = 'field_audience_tid';
$handler->display->display_options['filters']['field_audience_tid']['table'] = 'field_data_field_audience';
$handler->display->display_options['filters']['field_audience_tid']['field'] = 'field_audience_tid';
$handler->display->display_options['filters']['field_audience_tid']['value'] = array(
125 => '125',
);
$handler->display->display_options['filters']['field_audience_tid']['group'] = 0;
$handler->display->display_options['filters']['field_audience_tid']['reduce_duplicates'] = 0;
$handler->display->display_options['filters']['field_audience_tid']['type'] = 'select';
$handler->display->display_options['filters']['field_audience_tid']['vocabulary'] = 'audience';
| 1 |
6,147,985 | 05/27/2011 04:56:13 | 68,808 | 02/20/2009 07:25:28 | 161 | 20 | How do I explain my colleague that Linq to Sql is not the same as Entity Framework and that EF isn't "shitty"?! | This is a bit of a weird question. But I'm tired of having a certain type of discussions with a colleague of mine. Could someone PLEASE (I'm disparate) give me some technical backup on this? I'm trying to ignore his harsh language, but find that very hard.
Does one continue discussions like these? Or is it better just to leave it aside and say something like "no comment"?
How I see it:
- EF is way more then Linq to Sql
- Our application is slow, because our team lacks knowledge and experience, not because EF is 'shitty'
- maybe the type of application (huge inheritance and recursive structures) is not made to be used with EF
- think twice before you say something and REMEMBER your own opinion (at least for a few minutes)
(3:08:34 PM) TweeZz: it's "fast" until the object gets saved into db
(3:08:45 PM) TweeZz: so probably something with the fact that then those objects are attached?
(3:08:57 PM) TweeZz: and until I don't click the button they are detached?
(3:09:21 PM) TweeZz: takes double the time :(
(3:09:23 PM) colleague: until you click the button they dont have anything to do with database, they are just POCO
(3:09:39 PM) TweeZz: k so probably something there
(3:09:41 PM) colleague: then they get saved on db and get tracked
(3:09:43 PM) TweeZz: change tra
(3:09:44 PM) TweeZz: jj
(3:09:55 PM) colleague: but that's what we've known from the beginning
(3:09:57 PM) colleague: :)
(3:10:03 PM) colleague: it has to take some time
(3:10:06 PM) TweeZz: jj just a bit surprised about the difference
(3:10:13 PM) colleague: i just hoped that that EF isn't soooo shitty :)
(3:10:13 PM) TweeZz: anyhow it's too slow
(3:10:20 PM) TweeZz: no comment ;)
(3:10:31 PM) colleague: well i hoped it would do stuff more clever
(3:10:45 PM) colleague: to me it seems worse than linqToSql yet it should be a replacement for it
(3:10:56 PM) colleague: faaaar worse :)
(3:11:15 PM) TweeZz: again, no comment ;)
(3:12:19 PM) colleague: myea, i picked it
(3:12:22 PM) colleague: i'm to blame :)
(3:13:01 PM) TweeZz: you can discuss it here ;)
(3:13:01 PM) TweeZz: http://stackoverflow.com/questions/8676/entity-framework-vs-linq-to-sql
(3:13:07 PM) TweeZz: or post a question
(3:13:12 PM) TweeZz: why does EF suck
(3:13:12 PM) TweeZz: ;)
(3:13:24 PM) colleague: i know answer to that already ;]
(3:13:26 PM) colleague: M$ :D
(3:13:52 PM) colleague: something is good so why not abandon it and let's do something huge and slow
(3:13:54 PM) TweeZz: hehe
(3:13:55 PM) colleague: vista :D
(3:17:24 PM) TweeZz: seriously I will post a question on stackoverflow
(3:17:52 PM) TweeZz: how do I tell my colleague that linq to sql is not the same as entity framework and that EF isn't "shitty"
(3:18:18 PM) colleague: when did i say that linq to sql is the same as EF?
(3:18:30 PM) colleague: i dont think that it's the same, never thought that
(3:18:42 PM) colleague: afaik :D
(3:19:16 PM) TweeZz: and then you can discuss your opinion with the community ;)
(3:19:34 PM) colleague: thx ;]
(3:19:40 PM) colleague: you're such a help
(3:19:46 PM) TweeZz: what about this?
(3:19:47 PM) TweeZz: 3:10:45 PM) colleague: to me it seems worse than linqToSql yet it should be a replacement for it
(3:19:51 PM) TweeZz: I can't handle you alone man
(3:19:54 PM) TweeZz: I need backup | entity-framework | linq-to-sql | communication | null | null | 05/27/2011 05:20:32 | not a real question | How do I explain my colleague that Linq to Sql is not the same as Entity Framework and that EF isn't "shitty"?!
===
This is a bit of a weird question. But I'm tired of having a certain type of discussions with a colleague of mine. Could someone PLEASE (I'm disparate) give me some technical backup on this? I'm trying to ignore his harsh language, but find that very hard.
Does one continue discussions like these? Or is it better just to leave it aside and say something like "no comment"?
How I see it:
- EF is way more then Linq to Sql
- Our application is slow, because our team lacks knowledge and experience, not because EF is 'shitty'
- maybe the type of application (huge inheritance and recursive structures) is not made to be used with EF
- think twice before you say something and REMEMBER your own opinion (at least for a few minutes)
(3:08:34 PM) TweeZz: it's "fast" until the object gets saved into db
(3:08:45 PM) TweeZz: so probably something with the fact that then those objects are attached?
(3:08:57 PM) TweeZz: and until I don't click the button they are detached?
(3:09:21 PM) TweeZz: takes double the time :(
(3:09:23 PM) colleague: until you click the button they dont have anything to do with database, they are just POCO
(3:09:39 PM) TweeZz: k so probably something there
(3:09:41 PM) colleague: then they get saved on db and get tracked
(3:09:43 PM) TweeZz: change tra
(3:09:44 PM) TweeZz: jj
(3:09:55 PM) colleague: but that's what we've known from the beginning
(3:09:57 PM) colleague: :)
(3:10:03 PM) colleague: it has to take some time
(3:10:06 PM) TweeZz: jj just a bit surprised about the difference
(3:10:13 PM) colleague: i just hoped that that EF isn't soooo shitty :)
(3:10:13 PM) TweeZz: anyhow it's too slow
(3:10:20 PM) TweeZz: no comment ;)
(3:10:31 PM) colleague: well i hoped it would do stuff more clever
(3:10:45 PM) colleague: to me it seems worse than linqToSql yet it should be a replacement for it
(3:10:56 PM) colleague: faaaar worse :)
(3:11:15 PM) TweeZz: again, no comment ;)
(3:12:19 PM) colleague: myea, i picked it
(3:12:22 PM) colleague: i'm to blame :)
(3:13:01 PM) TweeZz: you can discuss it here ;)
(3:13:01 PM) TweeZz: http://stackoverflow.com/questions/8676/entity-framework-vs-linq-to-sql
(3:13:07 PM) TweeZz: or post a question
(3:13:12 PM) TweeZz: why does EF suck
(3:13:12 PM) TweeZz: ;)
(3:13:24 PM) colleague: i know answer to that already ;]
(3:13:26 PM) colleague: M$ :D
(3:13:52 PM) colleague: something is good so why not abandon it and let's do something huge and slow
(3:13:54 PM) TweeZz: hehe
(3:13:55 PM) colleague: vista :D
(3:17:24 PM) TweeZz: seriously I will post a question on stackoverflow
(3:17:52 PM) TweeZz: how do I tell my colleague that linq to sql is not the same as entity framework and that EF isn't "shitty"
(3:18:18 PM) colleague: when did i say that linq to sql is the same as EF?
(3:18:30 PM) colleague: i dont think that it's the same, never thought that
(3:18:42 PM) colleague: afaik :D
(3:19:16 PM) TweeZz: and then you can discuss your opinion with the community ;)
(3:19:34 PM) colleague: thx ;]
(3:19:40 PM) colleague: you're such a help
(3:19:46 PM) TweeZz: what about this?
(3:19:47 PM) TweeZz: 3:10:45 PM) colleague: to me it seems worse than linqToSql yet it should be a replacement for it
(3:19:51 PM) TweeZz: I can't handle you alone man
(3:19:54 PM) TweeZz: I need backup | 1 |
2,984,760 | 06/06/2010 15:31:26 | 359,752 | 06/06/2010 15:31:26 | 1 | 0 | Comeau Compiler | Looking for some feedback with Comeau compiler with Borland c++builder as backend.
- VCL Stuff ??
- use with Cmake ??
- .... | c++builder | null | null | null | null | 06/07/2010 14:57:09 | not a real question | Comeau Compiler
===
Looking for some feedback with Comeau compiler with Borland c++builder as backend.
- VCL Stuff ??
- use with Cmake ??
- .... | 1 |
6,005,240 | 05/14/2011 22:39:15 | 707,111 | 04/08/2011 20:01:10 | 2,201 | 145 | Best way to implement permissions? | I'm creating a website in which there are projects, users, and permissions for each user or groups of users. What this is is a community collaboration tool, and I have 4 different permissions:
- Creator - make changes, accept changes, change permissions
- Accept changes
- Make changes
- View
How could I implement, in a database, this kind of permission system, for groups of users? | php | mysql | sql | permissions | null | 06/13/2012 12:56:57 | not constructive | Best way to implement permissions?
===
I'm creating a website in which there are projects, users, and permissions for each user or groups of users. What this is is a community collaboration tool, and I have 4 different permissions:
- Creator - make changes, accept changes, change permissions
- Accept changes
- Make changes
- View
How could I implement, in a database, this kind of permission system, for groups of users? | 4 |
8,342,251 | 12/01/2011 13:38:03 | 1,075,533 | 12/01/2011 13:28:18 | 1 | 0 | code entry access | How do I access the programming area of my Facebook Page to enter the Like Button, etc. code?
I know how to 'get code' but then I am lost as to where I enter it into my Page. Please advise. | ms-access | like | facebook-javascript-sdk | facebook-social-plugins | null | 12/06/2011 04:29:55 | off topic | code entry access
===
How do I access the programming area of my Facebook Page to enter the Like Button, etc. code?
I know how to 'get code' but then I am lost as to where I enter it into my Page. Please advise. | 2 |
8,733,464 | 01/04/2012 20:21:15 | 1,120,199 | 12/28/2011 23:50:00 | 16 | 0 | Best programming language for "web tasks", such as using Facebook API or fetching text data from websites? | Best suited programming/scripting language for automating simple tasks like:
- extracting data from text files and web pages (scraping, data mining)
- finding and replacing data from text files
- using web APIs like Facebook's Graph API ...
Python, Ruby? | scripting | null | null | null | null | 01/04/2012 20:23:32 | not constructive | Best programming language for "web tasks", such as using Facebook API or fetching text data from websites?
===
Best suited programming/scripting language for automating simple tasks like:
- extracting data from text files and web pages (scraping, data mining)
- finding and replacing data from text files
- using web APIs like Facebook's Graph API ...
Python, Ruby? | 4 |
8,743,012 | 01/05/2012 13:07:40 | 1,132,187 | 01/05/2012 12:54:20 | 1 | 0 | MySQL Query - Adding up columns & rows | I currently have two tables, one is products and the other is options (colour, size, etc).
If no options are specified for the product, it puts the stock against the product table
Otherwise it will put the stock against the option table
Tables look a bit like this:
**Product table:**
productid, name, sku, stock
**Option table:**
optionid, productid, sku, stock
I want to pull the data from both tables, and add up the "stock"
**So far I have this:**
SELECT `product`.`productid`, `product`.`name`, `product`.`sku`,
( SUM(`product`.`stock`) ) + ( SUM(`option`.`stock`) ) AS `stock`
FROM `product`
LEFT JOIN `option` ON `product`.`productid` = `option`.`productid`
GROUP BY `productid`
Which displays the data how I want but the issue is with the stock.
For a product that has options specified, it adds them up nicely.
If the product doesn't have an option, it just displays "NULL"
Results
http://i.stack.imgur.com/WBw8W.png
Any help would be very appreciated.
Thanks in advance, James. | php | mysql | sql | database | query | null | open | MySQL Query - Adding up columns & rows
===
I currently have two tables, one is products and the other is options (colour, size, etc).
If no options are specified for the product, it puts the stock against the product table
Otherwise it will put the stock against the option table
Tables look a bit like this:
**Product table:**
productid, name, sku, stock
**Option table:**
optionid, productid, sku, stock
I want to pull the data from both tables, and add up the "stock"
**So far I have this:**
SELECT `product`.`productid`, `product`.`name`, `product`.`sku`,
( SUM(`product`.`stock`) ) + ( SUM(`option`.`stock`) ) AS `stock`
FROM `product`
LEFT JOIN `option` ON `product`.`productid` = `option`.`productid`
GROUP BY `productid`
Which displays the data how I want but the issue is with the stock.
For a product that has options specified, it adds them up nicely.
If the product doesn't have an option, it just displays "NULL"
Results
http://i.stack.imgur.com/WBw8W.png
Any help would be very appreciated.
Thanks in advance, James. | 0 |
983,534 | 06/11/2009 20:41:52 | 111,674 | 05/24/2009 04:47:19 | 43 | 1 | Which ethics (if any) are relevant to programming? | Does ethics have anything to do with programming? Let's think analogously about a doctor. Does a doctor's job have anything to do with ethics? Well, I suppose even a sociopath can get the degree and perform their residency, but it is crucial that doctors do think about ethics. They need to know whether its OK to perform abortion, euthanasia, cloning, stem cell research, etc. - apart from the legality in any particular state, and apart from the technical aspects!
Similarly in computer science, ethics are important. We have questions on here (stack overflow) whether to implement features on a system that will inevitably be used for spying. What about spamming?
So it seems to me that there are ethical questions that are relevant to programming. If so, what are they? Conversely, what are the irrelevant ethics? (And "all ethical questions are irrelevant") is a fine answer (though I would think incorrect), just defend the assertion.
| ethics | null | null | null | null | 06/11/2009 21:05:36 | off topic | Which ethics (if any) are relevant to programming?
===
Does ethics have anything to do with programming? Let's think analogously about a doctor. Does a doctor's job have anything to do with ethics? Well, I suppose even a sociopath can get the degree and perform their residency, but it is crucial that doctors do think about ethics. They need to know whether its OK to perform abortion, euthanasia, cloning, stem cell research, etc. - apart from the legality in any particular state, and apart from the technical aspects!
Similarly in computer science, ethics are important. We have questions on here (stack overflow) whether to implement features on a system that will inevitably be used for spying. What about spamming?
So it seems to me that there are ethical questions that are relevant to programming. If so, what are they? Conversely, what are the irrelevant ethics? (And "all ethical questions are irrelevant") is a fine answer (though I would think incorrect), just defend the assertion.
| 2 |
4,579,567 | 01/02/2011 17:32:50 | 407,677 | 07/31/2010 21:39:22 | 9 | 2 | sql and asp.net | I want to add data to the particular user's database. look i'll try to illustriate scenario
Their are several user's in a role of student and teacher wanted to add Classwork, Homework and Comments etc for the user selected from the dropdown list of available student so i want help that how i can add particular data for the selected student from dropdownlist give me all the possible ways with procedure and all. I am Using Asp.net with C# and sql express 2008
THanks in Advance and Please help! | asp.net | sql | null | null | null | 01/02/2011 18:06:05 | not a real question | sql and asp.net
===
I want to add data to the particular user's database. look i'll try to illustriate scenario
Their are several user's in a role of student and teacher wanted to add Classwork, Homework and Comments etc for the user selected from the dropdown list of available student so i want help that how i can add particular data for the selected student from dropdownlist give me all the possible ways with procedure and all. I am Using Asp.net with C# and sql express 2008
THanks in Advance and Please help! | 1 |
11,676,788 | 07/26/2012 19:38:13 | 1,423,184 | 05/29/2012 08:20:44 | 43 | 0 | CSS interfering with AdSense code | I have adjusted my Google AdSense code to show large fonts, but the ads continue to be displayed in a small font. I then realized that the AdSense code is enclosed in a <div id="pathway"> portion of my phpBB forum's header, which probably uses forced style settings from one of the forum's CSS.
What can be added to the AdSense code to override font size settings just for the AdSense part? | css | adsense | phpbb | null | null | null | open | CSS interfering with AdSense code
===
I have adjusted my Google AdSense code to show large fonts, but the ads continue to be displayed in a small font. I then realized that the AdSense code is enclosed in a <div id="pathway"> portion of my phpBB forum's header, which probably uses forced style settings from one of the forum's CSS.
What can be added to the AdSense code to override font size settings just for the AdSense part? | 0 |
9,939,756 | 03/30/2012 08:50:41 | 682,412 | 03/29/2011 16:00:41 | 66 | 3 | Rotation on UILabel causes weird clipping problems | I have UIButtons, for which I want to rotate the title labels like this:
button.titleLabel.transform = CGAffineTransformRotate(button.titleLabel.transform, 12*M_PI/180)
The result looks like this: http://imgur.com/LD6q6 (Layer borders for clarification)
clipsToBounds is off for both the button and its label and I have tinkered with pretty much any combination of Autoresizing, Autoresize-masks, enlarging the frame, etc. but literally nothing changes about the way that label is drawn.
Any idea on how I can enlarge the label enough? | cocoa | uikit | uilabel | cgaffinetransform | null | null | open | Rotation on UILabel causes weird clipping problems
===
I have UIButtons, for which I want to rotate the title labels like this:
button.titleLabel.transform = CGAffineTransformRotate(button.titleLabel.transform, 12*M_PI/180)
The result looks like this: http://imgur.com/LD6q6 (Layer borders for clarification)
clipsToBounds is off for both the button and its label and I have tinkered with pretty much any combination of Autoresizing, Autoresize-masks, enlarging the frame, etc. but literally nothing changes about the way that label is drawn.
Any idea on how I can enlarge the label enough? | 0 |
6,703,650 | 07/15/2011 07:04:56 | 747,024 | 05/10/2011 14:14:43 | 232 | 0 | Javascript and basic programming concepts | I'm looking to deepen my knowledge in how Javascript works.<br>
I started learning JS without any programming background and it seems I lack some fundamental understanding of programming, things like `stack` `pointers` `memory usage` `prototyping` etc,
Where can I learn those things online\from a book? | javascript | null | null | null | null | 07/15/2011 07:49:47 | not constructive | Javascript and basic programming concepts
===
I'm looking to deepen my knowledge in how Javascript works.<br>
I started learning JS without any programming background and it seems I lack some fundamental understanding of programming, things like `stack` `pointers` `memory usage` `prototyping` etc,
Where can I learn those things online\from a book? | 4 |
11,222,504 | 06/27/2012 08:47:02 | 1,097,285 | 12/14/2011 07:18:57 | 848 | 47 | IIS 6.0 renders HTML page properly but gives error while serving .aspx pages | I have an app built in `ASP.NET/C#`.
I have created a WebSetUp for the application.The setup installation was successful.
It also created the virtual directory `Cwiz` which I mentioned during installation.
I also enabled `ASP.NET` in `IIS 6.0`.
Now when I try to access the page like localhost/Cwiz/Login.aspx It gives me an error
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /HomeLogin.aspx
When I try to access a html page like `localhost/Cwiz/test.html` it works properly.
I am using `Forms Authentication`.
I have searched for the solution enough but can't seem to guess what can be wrong.I enabled `ASP.NET` in `IIS`.
Can anyone help me with this issue.
Any suggestion are welcome.
| asp.net | iis6 | null | null | null | null | open | IIS 6.0 renders HTML page properly but gives error while serving .aspx pages
===
I have an app built in `ASP.NET/C#`.
I have created a WebSetUp for the application.The setup installation was successful.
It also created the virtual directory `Cwiz` which I mentioned during installation.
I also enabled `ASP.NET` in `IIS 6.0`.
Now when I try to access the page like localhost/Cwiz/Login.aspx It gives me an error
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /HomeLogin.aspx
When I try to access a html page like `localhost/Cwiz/test.html` it works properly.
I am using `Forms Authentication`.
I have searched for the solution enough but can't seem to guess what can be wrong.I enabled `ASP.NET` in `IIS`.
Can anyone help me with this issue.
Any suggestion are welcome.
| 0 |
10,637,909 | 05/17/2012 14:40:56 | 127,602 | 06/23/2009 14:12:44 | 393 | 12 | Simulate Metro-UI button click | I am in the process of building a metro style app and I need to know if there is a way to fire button clicks programmatically.
I have this PasswordBox and button in my xaml:
<PasswordBox IsPasswordRevealButtonEnabled="True" KeyDown="On_text_KeyDown" x:Name="SomePW" FontSize="50" KeyDown="On_text_KeyDown" Margin="0,0,0,190" Height="67" Width="363"/>
<Button Background="White" x:Name="Button_Go" Foreground="Black" Margin="20,0,0,190" Content="Go" FontSize="20" Click="Go_click" Height="67" Width="60"/>
And in my C# code this is the function that handles the key press in the PasswordBox:
private void On_text_KeyDown(object sender, RoutedEventArgs e)
{
KeyEventArgs K = (KeyEventArgs)e;
if (K.Key == Windows.System.VirtualKey.Enter)
{
//<TO-DO> Simulate Button Click Here
}
}
The problem is I can't seem to find a way to simulate the button click... Can someone help please? | c# | windows-8 | metro-ui | visual-studio-11 | null | null | open | Simulate Metro-UI button click
===
I am in the process of building a metro style app and I need to know if there is a way to fire button clicks programmatically.
I have this PasswordBox and button in my xaml:
<PasswordBox IsPasswordRevealButtonEnabled="True" KeyDown="On_text_KeyDown" x:Name="SomePW" FontSize="50" KeyDown="On_text_KeyDown" Margin="0,0,0,190" Height="67" Width="363"/>
<Button Background="White" x:Name="Button_Go" Foreground="Black" Margin="20,0,0,190" Content="Go" FontSize="20" Click="Go_click" Height="67" Width="60"/>
And in my C# code this is the function that handles the key press in the PasswordBox:
private void On_text_KeyDown(object sender, RoutedEventArgs e)
{
KeyEventArgs K = (KeyEventArgs)e;
if (K.Key == Windows.System.VirtualKey.Enter)
{
//<TO-DO> Simulate Button Click Here
}
}
The problem is I can't seem to find a way to simulate the button click... Can someone help please? | 0 |
8,151,757 | 11/16/2011 12:32:40 | 25,578 | 10/06/2008 17:53:18 | 580 | 13 | Is there any free option to replace Google Maps satellite view? | Since next month Google will charge sites using more than 25K maps impressions per day. I'm looking for options to replace Google Maps with some free service.
All I need is satellite imagery of a relatively small area of the U.S., so far I learned about Open Layers but I'm not sure if it's possible to download and host the aerial tiles from some where or if there is some free service with no cap for displaying satellite tiles. | maps | null | null | null | null | 11/16/2011 18:28:20 | off topic | Is there any free option to replace Google Maps satellite view?
===
Since next month Google will charge sites using more than 25K maps impressions per day. I'm looking for options to replace Google Maps with some free service.
All I need is satellite imagery of a relatively small area of the U.S., so far I learned about Open Layers but I'm not sure if it's possible to download and host the aerial tiles from some where or if there is some free service with no cap for displaying satellite tiles. | 2 |
8,935,323 | 01/20/2012 00:26:16 | 618,815 | 01/03/2011 04:06:55 | 771 | 1 | Detecting cycles of a graph(maybe directed or undirected) in Haskell | I started to solve this problem in imperative way and it works. However, it takes me triple time to figure out how to do it Haskell and failed! Suppose I represent graph as list (or map) of a node with its adjacency nodes.
type Node = Int
type Graph = [Node, [Node]]
Note the above representation can be directed or undirected.
I also pass the seen set and finished set as arguments(since no side effects are preferred in functional) when doing exploration to detect back track edge. However, I just can't do it in Haskell!
I know there may be using State monad, but that thing hasn't come through my mind quite well neither.
I am curious to know how could anyone guide me how to do it in "beautiful" Haskell style?
| haskell | null | null | null | null | null | open | Detecting cycles of a graph(maybe directed or undirected) in Haskell
===
I started to solve this problem in imperative way and it works. However, it takes me triple time to figure out how to do it Haskell and failed! Suppose I represent graph as list (or map) of a node with its adjacency nodes.
type Node = Int
type Graph = [Node, [Node]]
Note the above representation can be directed or undirected.
I also pass the seen set and finished set as arguments(since no side effects are preferred in functional) when doing exploration to detect back track edge. However, I just can't do it in Haskell!
I know there may be using State monad, but that thing hasn't come through my mind quite well neither.
I am curious to know how could anyone guide me how to do it in "beautiful" Haskell style?
| 0 |
5,162,442 | 03/02/2011 01:29:03 | 588,498 | 01/25/2011 04:28:55 | 106 | 0 | JavaScript sort with numbers | The following program (taken from a tutorial) prints the numbers in an array in order from lowest to highest. In this case, the result will be `2,4,5,13,31`
My question relates to the paramaters "a" and "b" for the function compareNumbers. When the function is called in `numArray.sort(compareNumbers)` what numbers will be the parameters a and b for the function. Does it just move along the array. For example, start with a=13 and b=2? After that, does the function run again comparing a=2 and b=31? or would it next compare a=31 and b=4?
Can someone please explain how that part works and also how it manages to sort them from lowest to highest? I don`t see how the function manages to do the necessary calculations on the numbers in the array.
function compareNumbers(a,b) {
return a - b;
}
var numArray = [13,2,31,4,5];
alert(numArray.sort(compareNumbers));
| javascript | null | null | null | null | null | open | JavaScript sort with numbers
===
The following program (taken from a tutorial) prints the numbers in an array in order from lowest to highest. In this case, the result will be `2,4,5,13,31`
My question relates to the paramaters "a" and "b" for the function compareNumbers. When the function is called in `numArray.sort(compareNumbers)` what numbers will be the parameters a and b for the function. Does it just move along the array. For example, start with a=13 and b=2? After that, does the function run again comparing a=2 and b=31? or would it next compare a=31 and b=4?
Can someone please explain how that part works and also how it manages to sort them from lowest to highest? I don`t see how the function manages to do the necessary calculations on the numbers in the array.
function compareNumbers(a,b) {
return a - b;
}
var numArray = [13,2,31,4,5];
alert(numArray.sort(compareNumbers));
| 0 |
5,897,544 | 05/05/2011 12:21:07 | 63,202 | 02/06/2009 06:02:52 | 481 | 37 | Why do some good reputable sites like stackoveflow still use Table tags? | Its odd but true, i've seen it in a lot of place, and im 100% sure its not hard at all to lose the table tags, but also, its much more scalable not to use tables
why then, some good websites insist on using tables? | html | standards | stackoverflow | null | null | 05/05/2011 12:25:45 | not constructive | Why do some good reputable sites like stackoveflow still use Table tags?
===
Its odd but true, i've seen it in a lot of place, and im 100% sure its not hard at all to lose the table tags, but also, its much more scalable not to use tables
why then, some good websites insist on using tables? | 4 |
9,446,755 | 02/25/2012 18:26:00 | 6,486 | 09/15/2008 11:06:04 | 1,417 | 31 | difference between build deployment package and msbuild t:package | I am trying to complete my automated deployment process see [this question for further info][1] and it is close. I can right click on my MVC project in VS2010 and select "Build deployment package" and it successfully builds it, and this will deploy to the remote server. When I run the following command the build fails:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe mvcproject.csproj /T:Package /p:Configuration=Deployment
The error I get is:
MSDEPLOY : error : Object of type 'manifest' and path 'C:\hoh_code\GIT\ai-poker- project\Packages\Deployment\PokerLeague
WebSite\PokerLeagueWebSite.SourceManifest.xml' cannot be created. [C:\hoh_code\GIT\ai-poker-project\Clients\PokerLeague
WebSite\PokerLeagueWebSite.csproj]
MSDEPLOY : error : One or more entries in the manifest 'sitemanifest' are not valid. [C:\hoh_code\GIT\ai-poker-project\
Clients\PokerLeagueWebSite\PokerLeagueWebSite.csproj]
MSDEPLOY : error : An error occurred when reading the IIS Configuration File 'MACHINE/REDIRECTION'. The identity perfor
ming the operation was 'wiggly\Jon'. [C:\hoh_code\GIT\ai-poker-project\Clients\PokerLeagueWebSite\PokerLeagueWebSite.cs
proj]
MSDEPLOY : error : Filename: \\?\C:\Windows\system32\inetsrv\config\redirection.config [C:\hoh_code\GIT\ai-poker-projec
t\Clients\PokerLeagueWebSite\PokerLeagueWebSite.csproj]
MSDEPLOY : error : Cannot read configuration file due to insufficient permissions [C:\hoh_code\GIT\ai-poker-project\Cli
ents\PokerLeagueWebSite\PokerLeagueWebSite.csproj]
I was under the impression that the right click I was doing was the same thing as the msbuild command. I tried setting the output level to detailed but could not see the command that was triggering it correctly, (possibly not seeing the wood for the tree's though).
My question is, what can I do to get the project to build via the command line so I can build it on my CI Server (doesn't have VS2010) so that it can be automatically deployed, and why is VS2010 succeeding when the command line fails?
[1]: http://stackoverflow.com/questions/9357369/deploy-mvc-site-with-msdeploy-including-iis-settings-from-ci-server-that-doesnt | visual-studio-2010 | msbuild | manifest | msdeploy | web-deployment-project | null | open | difference between build deployment package and msbuild t:package
===
I am trying to complete my automated deployment process see [this question for further info][1] and it is close. I can right click on my MVC project in VS2010 and select "Build deployment package" and it successfully builds it, and this will deploy to the remote server. When I run the following command the build fails:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe mvcproject.csproj /T:Package /p:Configuration=Deployment
The error I get is:
MSDEPLOY : error : Object of type 'manifest' and path 'C:\hoh_code\GIT\ai-poker- project\Packages\Deployment\PokerLeague
WebSite\PokerLeagueWebSite.SourceManifest.xml' cannot be created. [C:\hoh_code\GIT\ai-poker-project\Clients\PokerLeague
WebSite\PokerLeagueWebSite.csproj]
MSDEPLOY : error : One or more entries in the manifest 'sitemanifest' are not valid. [C:\hoh_code\GIT\ai-poker-project\
Clients\PokerLeagueWebSite\PokerLeagueWebSite.csproj]
MSDEPLOY : error : An error occurred when reading the IIS Configuration File 'MACHINE/REDIRECTION'. The identity perfor
ming the operation was 'wiggly\Jon'. [C:\hoh_code\GIT\ai-poker-project\Clients\PokerLeagueWebSite\PokerLeagueWebSite.cs
proj]
MSDEPLOY : error : Filename: \\?\C:\Windows\system32\inetsrv\config\redirection.config [C:\hoh_code\GIT\ai-poker-projec
t\Clients\PokerLeagueWebSite\PokerLeagueWebSite.csproj]
MSDEPLOY : error : Cannot read configuration file due to insufficient permissions [C:\hoh_code\GIT\ai-poker-project\Cli
ents\PokerLeagueWebSite\PokerLeagueWebSite.csproj]
I was under the impression that the right click I was doing was the same thing as the msbuild command. I tried setting the output level to detailed but could not see the command that was triggering it correctly, (possibly not seeing the wood for the tree's though).
My question is, what can I do to get the project to build via the command line so I can build it on my CI Server (doesn't have VS2010) so that it can be automatically deployed, and why is VS2010 succeeding when the command line fails?
[1]: http://stackoverflow.com/questions/9357369/deploy-mvc-site-with-msdeploy-including-iis-settings-from-ci-server-that-doesnt | 0 |
1,621,921 | 10/25/2009 20:04:57 | 5,883 | 09/11/2008 14:59:51 | 337 | 16 | Enforcing the correct implementation of INotifyPropertyChanged with CodeContracts - "requires unproven" | I'm looking for an easy way to enforce the correct implementation of INotifyPropertyChanged i.e. when PropertyChanged is raised it must reference a property that is actually defined. I tried doing this with the new CodeContract tools from Microsoft, but I keep getting the warning "CodeContracts: requires unproven". Here is my code...
public sealed class MyClass : INotifyPropertyChanged
{
private int myProperty;
public int MyProperty
{
get
{
return myProperty;
}
set
{
if (myProperty == value)
{
return;
}
myProperty = value;
OnPropertyChanged("MyProperty");
}
}
private void OnPropertyChanged(string propertyName)
{
Contract.Requires(GetType().GetProperties().Any(x => x.Name == propertyName));
var handler = PropertyChanged;
if (handler != null)
{
handler(this, new PropertyChangedEventArgs(propertyName));
}
}
public event PropertyChangedEventHandler PropertyChanged;
}
Is there anyway to get this to work?
| codecontracts | c# | inotifypropertychanged | null | null | null | open | Enforcing the correct implementation of INotifyPropertyChanged with CodeContracts - "requires unproven"
===
I'm looking for an easy way to enforce the correct implementation of INotifyPropertyChanged i.e. when PropertyChanged is raised it must reference a property that is actually defined. I tried doing this with the new CodeContract tools from Microsoft, but I keep getting the warning "CodeContracts: requires unproven". Here is my code...
public sealed class MyClass : INotifyPropertyChanged
{
private int myProperty;
public int MyProperty
{
get
{
return myProperty;
}
set
{
if (myProperty == value)
{
return;
}
myProperty = value;
OnPropertyChanged("MyProperty");
}
}
private void OnPropertyChanged(string propertyName)
{
Contract.Requires(GetType().GetProperties().Any(x => x.Name == propertyName));
var handler = PropertyChanged;
if (handler != null)
{
handler(this, new PropertyChangedEventArgs(propertyName));
}
}
public event PropertyChangedEventHandler PropertyChanged;
}
Is there anyway to get this to work?
| 0 |
5,342,522 | 03/17/2011 17:01:50 | 651,418 | 03/09/2011 11:17:37 | 72 | 0 | Spoon Studio crashes or please suggest another all-to-one-exe-packer. :) | I have downloaded trial of Spoon Studio, yet it crashes on startup.
![enter image description here][1]
Any ideas what might be causing it? Their support keeps silent.
Or maybe you could suggest another obfuscator(?), i.e. a tool or a way to pack all the needed *.DLLs and other stuff into one .exe file?
Thanks!
[1]: http://i.stack.imgur.com/Rpt6z.jpg | c# | .net | obfuscation | null | null | 01/27/2012 18:35:00 | not constructive | Spoon Studio crashes or please suggest another all-to-one-exe-packer. :)
===
I have downloaded trial of Spoon Studio, yet it crashes on startup.
![enter image description here][1]
Any ideas what might be causing it? Their support keeps silent.
Or maybe you could suggest another obfuscator(?), i.e. a tool or a way to pack all the needed *.DLLs and other stuff into one .exe file?
Thanks!
[1]: http://i.stack.imgur.com/Rpt6z.jpg | 4 |
7,761,757 | 10/13/2011 23:55:23 | 302,102 | 03/25/2010 21:19:11 | 31 | 2 | Python 3 - Connecting with JDBC | How do you connect to a database using a JDBC driver from within Python 3? [JayDeBeApi](http://pypi.python.org/pypi/JayDeBeApi/) seems to do the job for Python 2, but at the moment it isn't Python 3-compatible.
This question is similar to [this one](http://stackoverflow.com/questions/5938011/python-connecting-to-jdbc), but I am asking specifically about Python 3. | database | jdbc | python-3.x | null | null | null | open | Python 3 - Connecting with JDBC
===
How do you connect to a database using a JDBC driver from within Python 3? [JayDeBeApi](http://pypi.python.org/pypi/JayDeBeApi/) seems to do the job for Python 2, but at the moment it isn't Python 3-compatible.
This question is similar to [this one](http://stackoverflow.com/questions/5938011/python-connecting-to-jdbc), but I am asking specifically about Python 3. | 0 |
8,955,914 | 01/21/2012 19:16:29 | 807,496 | 06/20/2011 22:35:33 | 39 | 0 | Object Oriented design interview Q | When companies ask you to do OO design related questions in the interview, what do they really expect? Do they expect you to briefly tell them the algorithm and some pseudocode or do they actually expect you to write the entire structure of the code?
For example question like : Design a musical jukebox. Do I start off telling what classes I will make with some pseudocode or what?
Thanks a lot | oop | design | interview-questions | null | null | 01/21/2012 19:29:26 | off topic | Object Oriented design interview Q
===
When companies ask you to do OO design related questions in the interview, what do they really expect? Do they expect you to briefly tell them the algorithm and some pseudocode or do they actually expect you to write the entire structure of the code?
For example question like : Design a musical jukebox. Do I start off telling what classes I will make with some pseudocode or what?
Thanks a lot | 2 |
7,713,640 | 10/10/2011 13:39:46 | 379,008 | 06/29/2010 12:49:08 | 2,062 | 34 | IIS 7 Error do now being display | Hi I use IIS 7 locally and on the Server,
I'm able to run all ASP.NET pages with no problems.
Only when a page create an exceptions, instead of visualize any error message and details.
I get only an IE windows saying
Do you want open or download file ....
I already tried, in web.config customerror="off" and in IIS / ASP / Debugging > send error to browser but just does not work.
Any Ideas what I'm doing wrong? Thanks | asp.net | iis7 | iis-7.5 | null | null | null | open | IIS 7 Error do now being display
===
Hi I use IIS 7 locally and on the Server,
I'm able to run all ASP.NET pages with no problems.
Only when a page create an exceptions, instead of visualize any error message and details.
I get only an IE windows saying
Do you want open or download file ....
I already tried, in web.config customerror="off" and in IIS / ASP / Debugging > send error to browser but just does not work.
Any Ideas what I'm doing wrong? Thanks | 0 |
570,056 | 02/20/2009 15:43:05 | 68,905 | 02/20/2009 12:55:13 | 1 | 0 | C#.NET Insert Dynamic Controls Into Middle of Controls Collection | this is my very first post! I'm pretty desperate so I'm going above and beyond my standard googling. I believe this is an advanced or expert-level .NET question.
The problem is that I have built a .NET web application that needs to be able to insert user controls dynamically into the middle of a list. I'm quite comfortable with dynamic controls so long they only need to be added to the end of the list (ie: I'm familiar with articles like this: http://msdn.microsoft.com/en-us/library/ms972976.aspx). However, if I need to add a UserControl to the front of a Controls collection or somewhere in the middle I'm pretty much lost since the UniqueID of the control is thrown off.
As a simplified example, let's say that i have a Panel to which I am adding a list of UserControls called MyControl.ascx. I also have some event that can get fired on the page to that needs to dynamically insert a MyControl.ascx into the specified index of the Controls collection of the panel. I also have one or more events on MyControl.ascx to which I need to subscribe. This means that the controls need to be loaded BEFORE the events on these controls would fire or else they will not fire. If you don't know to what I'm referring then I either worded the question poorly or this question might be too difficult for you :)
Below is some C# pseudocode to demonstrate the issue. The problem is that the Controls.AddAt(index, control) method does NOT adjust the UniqueID values of the controls accordingly. For example, consider the following controls in a Controls collection:
Whether I'm actually writing code that directly depends on the UniqueID or not, .NET indirectly uses the UniqueID to link together the events that were fired on the previous postback with the controls get loaded on the new postback. Taking my previous example of:
On initial Page Load (Page.IsPostback == false)
<table>
<tr>
<td width='100'>Control index</td>
<td width='75'>UniqueID</td>
<td>Value</td>
</tr>
<tr>
<td>0</td>
<td>ctl00</td>
<td>value1</td>
</tr>
<tr>
<td>1</td>
<td>ctl01</td>
<td>value2</td>
</tr>
<tr>
<td>2</td>
<td>ctl02</td>
<td>value3</td>
</tr>
</table><br/>
After a postback (Page.IsPostback == false) from some other control that wants to insert the control at index 0:
If i do a Controls.AddAt(0, newControl) then the Controls collection looks something like this:
<table>
<tr>
<td width='100'>Control index</td>
<td width='75'>UniqueID</td>
<td>Value</td>
</tr>
<tr>
<td>0</td>
<td>ctl03</td>
<td>value0 <== the controls' unique IDs do not shift!</td>
</tr>
<tr>
<td>1</td>
<td>ctl00</td>
<td>value1</td>
</tr>
<tr>
<td>2</td>
<td>ctl01</td>
<td>value2</td>
</tr>
<tr>
<td>3</td>
<td>ctl02</td>
<td>value3</td>
</tr>
</table><br/>
So if i were to click on a linkbutton in the control with Value == value0 and UniqueID == ctl03, the controls would be ordered like the following on post-back and the UniqueIDs would not be in the order i want. This will cause the click event to attach to the wrong control:
<table>
<tr>
<td width='100'>Control index</td>
<td width='75'>UniqueID</td>
<td>Value</td>
</tr>
<tr>
<td>0</td>
<td>ctl00</td>
<td>value0 <== the control i wanted to throw the event</td>
</tr>
<tr>
<td>1</td>
<td>ctl01</td>
<td>value1</td>
</tr>
<tr>
<td>2</td>
<td>ctl02</td>
<td>value2</td>
</tr>
<tr>
<td>3</td>
<td>ctl03</td>
<td>value3 <== the actual control to which the event is attached</td>
</tr>
</table><br/>
If i didn't have to handle events from these dynamic controls this probably wouldn't be a problem. Here is my code:
//--on init i just need to pull the records from the DB, turn them into a MyControl.ascx,
// and then add them to my panel
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
//--get my List<SomethingFromDB> ordered by value and iterate through, adding
//controls to the control collection
List<SomethingFromDB> myList = remoteService.GetSomeListFromTheDB();
foreach(SomethingFromDB something in List<SomethingFromDB>)
{
//--load a new MyControl.ascx
MyControl myControl = (MyControl )LoadControl("~/Controls/MyControl .ascx");
//--populate the values of myControl with the "something"
this.populateMyControl(something);
//--dynamically add the control to my panel
this.myPanel.Add(myControl);
//--subscribe to event
myControl.SomeArbitraryEvent += new EventHandler(MyArbitraryHandler);
}
//--This event gets fired by a magical control on the page and passes
// a new SomethingFromDB which needs to be inserted into the DB
// and then dynamically inserted into the Controls collection at the specified
// index
private void SomeOtherControl_ClickInsert(object sender, MyControlEventArgs e)
{
//--insert this record into the DB
remoteService.InsertIntoDB(e.SomethingFromDB);
//--dynamically load this control
MyControl myControl = (MyControl )LoadControl("~/Controls/MyControl .ascx");
//--get the index into which we will be inserting this control
int index = e.NewIndex;
//--dynamically add the control to my panel at the specified index. THIS
// DOES NOT ADJUST THE UNIQUEID VALUES ACCORDINGLY AND IS THE SOURCE
// OF MY PROBLEM!
this.myPanel.AddAt(index, myControl);
}
Please help--this one is killing me. If you need more information or have questions please let me know and I'd be happy to provide more info. I GREATLY appreciate your help! | .net-3.5 | c# | dynamic | controls | usercontrols | null | open | C#.NET Insert Dynamic Controls Into Middle of Controls Collection
===
this is my very first post! I'm pretty desperate so I'm going above and beyond my standard googling. I believe this is an advanced or expert-level .NET question.
The problem is that I have built a .NET web application that needs to be able to insert user controls dynamically into the middle of a list. I'm quite comfortable with dynamic controls so long they only need to be added to the end of the list (ie: I'm familiar with articles like this: http://msdn.microsoft.com/en-us/library/ms972976.aspx). However, if I need to add a UserControl to the front of a Controls collection or somewhere in the middle I'm pretty much lost since the UniqueID of the control is thrown off.
As a simplified example, let's say that i have a Panel to which I am adding a list of UserControls called MyControl.ascx. I also have some event that can get fired on the page to that needs to dynamically insert a MyControl.ascx into the specified index of the Controls collection of the panel. I also have one or more events on MyControl.ascx to which I need to subscribe. This means that the controls need to be loaded BEFORE the events on these controls would fire or else they will not fire. If you don't know to what I'm referring then I either worded the question poorly or this question might be too difficult for you :)
Below is some C# pseudocode to demonstrate the issue. The problem is that the Controls.AddAt(index, control) method does NOT adjust the UniqueID values of the controls accordingly. For example, consider the following controls in a Controls collection:
Whether I'm actually writing code that directly depends on the UniqueID or not, .NET indirectly uses the UniqueID to link together the events that were fired on the previous postback with the controls get loaded on the new postback. Taking my previous example of:
On initial Page Load (Page.IsPostback == false)
<table>
<tr>
<td width='100'>Control index</td>
<td width='75'>UniqueID</td>
<td>Value</td>
</tr>
<tr>
<td>0</td>
<td>ctl00</td>
<td>value1</td>
</tr>
<tr>
<td>1</td>
<td>ctl01</td>
<td>value2</td>
</tr>
<tr>
<td>2</td>
<td>ctl02</td>
<td>value3</td>
</tr>
</table><br/>
After a postback (Page.IsPostback == false) from some other control that wants to insert the control at index 0:
If i do a Controls.AddAt(0, newControl) then the Controls collection looks something like this:
<table>
<tr>
<td width='100'>Control index</td>
<td width='75'>UniqueID</td>
<td>Value</td>
</tr>
<tr>
<td>0</td>
<td>ctl03</td>
<td>value0 <== the controls' unique IDs do not shift!</td>
</tr>
<tr>
<td>1</td>
<td>ctl00</td>
<td>value1</td>
</tr>
<tr>
<td>2</td>
<td>ctl01</td>
<td>value2</td>
</tr>
<tr>
<td>3</td>
<td>ctl02</td>
<td>value3</td>
</tr>
</table><br/>
So if i were to click on a linkbutton in the control with Value == value0 and UniqueID == ctl03, the controls would be ordered like the following on post-back and the UniqueIDs would not be in the order i want. This will cause the click event to attach to the wrong control:
<table>
<tr>
<td width='100'>Control index</td>
<td width='75'>UniqueID</td>
<td>Value</td>
</tr>
<tr>
<td>0</td>
<td>ctl00</td>
<td>value0 <== the control i wanted to throw the event</td>
</tr>
<tr>
<td>1</td>
<td>ctl01</td>
<td>value1</td>
</tr>
<tr>
<td>2</td>
<td>ctl02</td>
<td>value2</td>
</tr>
<tr>
<td>3</td>
<td>ctl03</td>
<td>value3 <== the actual control to which the event is attached</td>
</tr>
</table><br/>
If i didn't have to handle events from these dynamic controls this probably wouldn't be a problem. Here is my code:
//--on init i just need to pull the records from the DB, turn them into a MyControl.ascx,
// and then add them to my panel
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
//--get my List<SomethingFromDB> ordered by value and iterate through, adding
//controls to the control collection
List<SomethingFromDB> myList = remoteService.GetSomeListFromTheDB();
foreach(SomethingFromDB something in List<SomethingFromDB>)
{
//--load a new MyControl.ascx
MyControl myControl = (MyControl )LoadControl("~/Controls/MyControl .ascx");
//--populate the values of myControl with the "something"
this.populateMyControl(something);
//--dynamically add the control to my panel
this.myPanel.Add(myControl);
//--subscribe to event
myControl.SomeArbitraryEvent += new EventHandler(MyArbitraryHandler);
}
//--This event gets fired by a magical control on the page and passes
// a new SomethingFromDB which needs to be inserted into the DB
// and then dynamically inserted into the Controls collection at the specified
// index
private void SomeOtherControl_ClickInsert(object sender, MyControlEventArgs e)
{
//--insert this record into the DB
remoteService.InsertIntoDB(e.SomethingFromDB);
//--dynamically load this control
MyControl myControl = (MyControl )LoadControl("~/Controls/MyControl .ascx");
//--get the index into which we will be inserting this control
int index = e.NewIndex;
//--dynamically add the control to my panel at the specified index. THIS
// DOES NOT ADJUST THE UNIQUEID VALUES ACCORDINGLY AND IS THE SOURCE
// OF MY PROBLEM!
this.myPanel.AddAt(index, myControl);
}
Please help--this one is killing me. If you need more information or have questions please let me know and I'd be happy to provide more info. I GREATLY appreciate your help! | 0 |
6,702,459 | 07/15/2011 03:41:38 | 838,363 | 07/11/2011 06:50:41 | 9 | 4 | stringstream error | For some reason, the stringstream skips over the first string in the getline function.
string nextLine = "2 BIRTH OCT 30 1998";
string wordInLine;
stringstream traverse;
traverse << nextLine;
while (traverse >> wordInLine)
cout << wordInLine;
Instead of grabbing the first element, it moves to the second element in the nextLine string to start with. Does anyone know why? | c++ | string | stringstream | null | null | 07/15/2011 05:25:15 | not a real question | stringstream error
===
For some reason, the stringstream skips over the first string in the getline function.
string nextLine = "2 BIRTH OCT 30 1998";
string wordInLine;
stringstream traverse;
traverse << nextLine;
while (traverse >> wordInLine)
cout << wordInLine;
Instead of grabbing the first element, it moves to the second element in the nextLine string to start with. Does anyone know why? | 1 |
3,042,248 | 06/15/2010 02:55:12 | 141,345 | 07/20/2009 11:40:59 | 138 | 16 | Java certification roadMap | I am a .net programmer for sometime, and I was thinking about getting a Java certification, but unlike .Net, Java is a mystery to me.
- What are good certification books?
- What is the roadmap for the
certifications?
- Is that the best
path, or the only path?
http://in.sun.com/training/certification/java/
Thank you very much | java | career-development | self-improvement | certification | null | 01/27/2012 22:30:12 | not constructive | Java certification roadMap
===
I am a .net programmer for sometime, and I was thinking about getting a Java certification, but unlike .Net, Java is a mystery to me.
- What are good certification books?
- What is the roadmap for the
certifications?
- Is that the best
path, or the only path?
http://in.sun.com/training/certification/java/
Thank you very much | 4 |
4,976,557 | 02/12/2011 05:38:58 | 585,152 | 01/21/2011 22:46:11 | 23 | 2 | AttachedProperty in XAML firing before I can authenticate & determine role | Using VS2008, Silverlight 4.
I have created an AttachedProperty, "RequiresRole", that I'm setting in my XAML. If a user isn't in the role defined by that property, the visibility of said control is set to collapsed.
The problem I'm currently having is that the 'UserHasRole' check (within my Authorization class, as part of the RequiredRole_Callback function) is firing when I load the application, but before I have a chance to login, authenticate, and set the Role for the user.
I have a few properties in my App.xaml.cs, "IsAuthenticated", which is set to true when a user logs in (using a service to call a SPROC), and "Role", which is the return value of a successful call to Logon SPROC.
Relevant Authorization.cs code:
public static readonly DependencyProperty RequiredRoleProperty = DependencyProperty.RegisterAttached(
"RequiredRole",
typeof(string),
typeof(Authorization),
new PropertyMetadata(RequiredRole_Callback));
// This callback will be invoked when some control will receive a value for your 'RequiredRole' property
private static void RequiredRole_Callback(DependencyObject source, DependencyPropertyChangedEventArgs e)
{
var uiElement = (UIElement)source;
RecalculateControlVisibility(uiElement);
// also this class should subscribe somehow to role changes and update all control's visibility after role being changed
}
private static void RecalculateControlVisibility(UIElement control)
{
//Authorization.UserHasRole() - is your code to check roles
if (Authorization.UserHasRole(GetRequiredRole(control)))
control.Visibility = Visibility.Visible;
else
control.Visibility = Visibility.Collapsed;
}
private static Boolean UserHasRole(string role)
{
string Role = App.Role;
if (Role.ToLower() == role.ToLower())
{
return true;
}
return false;
}
Relevant MainPage.xaml code:
xmlns:s="clr-namespace:TSMVVM.Authorization"
<HyperlinkButton x:Name="lnkLogin"
HorizontalAlignment="Right"
Tag="Login"
Command="{Binding NavigateCommand}"
s:Authorization.RequiredRole="Azdmin"
CommandParameter="{Binding Tag, ElementName=lnkLogin}"
Content="Login" />
Relevant Mainpage.xaml.cs code:
void MainPage_Loaded(object sender, RoutedEventArgs e)
{
if (!App.IsAuthenticated)
{
ContentFrame.Navigate(new Uri("Login", UriKind.Relative));
}
} | silverlight | attached-properties | null | null | null | null | open | AttachedProperty in XAML firing before I can authenticate & determine role
===
Using VS2008, Silverlight 4.
I have created an AttachedProperty, "RequiresRole", that I'm setting in my XAML. If a user isn't in the role defined by that property, the visibility of said control is set to collapsed.
The problem I'm currently having is that the 'UserHasRole' check (within my Authorization class, as part of the RequiredRole_Callback function) is firing when I load the application, but before I have a chance to login, authenticate, and set the Role for the user.
I have a few properties in my App.xaml.cs, "IsAuthenticated", which is set to true when a user logs in (using a service to call a SPROC), and "Role", which is the return value of a successful call to Logon SPROC.
Relevant Authorization.cs code:
public static readonly DependencyProperty RequiredRoleProperty = DependencyProperty.RegisterAttached(
"RequiredRole",
typeof(string),
typeof(Authorization),
new PropertyMetadata(RequiredRole_Callback));
// This callback will be invoked when some control will receive a value for your 'RequiredRole' property
private static void RequiredRole_Callback(DependencyObject source, DependencyPropertyChangedEventArgs e)
{
var uiElement = (UIElement)source;
RecalculateControlVisibility(uiElement);
// also this class should subscribe somehow to role changes and update all control's visibility after role being changed
}
private static void RecalculateControlVisibility(UIElement control)
{
//Authorization.UserHasRole() - is your code to check roles
if (Authorization.UserHasRole(GetRequiredRole(control)))
control.Visibility = Visibility.Visible;
else
control.Visibility = Visibility.Collapsed;
}
private static Boolean UserHasRole(string role)
{
string Role = App.Role;
if (Role.ToLower() == role.ToLower())
{
return true;
}
return false;
}
Relevant MainPage.xaml code:
xmlns:s="clr-namespace:TSMVVM.Authorization"
<HyperlinkButton x:Name="lnkLogin"
HorizontalAlignment="Right"
Tag="Login"
Command="{Binding NavigateCommand}"
s:Authorization.RequiredRole="Azdmin"
CommandParameter="{Binding Tag, ElementName=lnkLogin}"
Content="Login" />
Relevant Mainpage.xaml.cs code:
void MainPage_Loaded(object sender, RoutedEventArgs e)
{
if (!App.IsAuthenticated)
{
ContentFrame.Navigate(new Uri("Login", UriKind.Relative));
}
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.