question_id int64 4 6.31M | answer_id int64 7 6.31M | title stringlengths 9 150 | question_body stringlengths 0 28.8k | answer_body stringlengths 60 27.2k | question_text stringlengths 40 28.9k | combined_text stringlengths 124 39.6k | tags listlengths 1 6 | question_score int64 0 26.3k | answer_score int64 0 28.8k | view_count int64 15 14M | answer_count int64 0 182 | favorite_count int64 0 32 | question_creation_date stringdate 2008-07-31 21:42:52 2011-06-10 18:12:18 | answer_creation_date stringdate 2008-07-31 22:17:57 2011-06-10 18:14:17 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6,274,015 | 6,275,315 | Can I ignore rows when Loading Data Into a table? | LOAD XML LOCAL INFILE 'c:/users/ryan/desktop/2.xml' REPLACE INTO TABLE product ROWS IDENTIFIED BY ' ' I want to only update 2 rows based on my XML file. Can I ignore specific rows of the table? | You can ignore specified number of first rows, e.g. - 'IGNORE 10 LINES'; otherwise, load all rows into another table, then write UPDATE or INSERT...SELECT query to change rows you need (there should be keys to specify these rows). | Can I ignore rows when Loading Data Into a table? LOAD XML LOCAL INFILE 'c:/users/ryan/desktop/2.xml' REPLACE INTO TABLE product ROWS IDENTIFIED BY ' ' I want to only update 2 rows based on my XML file. Can I ignore specific rows of the table? | TITLE:
Can I ignore rows when Loading Data Into a table?
QUESTION:
LOAD XML LOCAL INFILE 'c:/users/ryan/desktop/2.xml' REPLACE INTO TABLE product ROWS IDENTIFIED BY ' ' I want to only update 2 rows based on my XML file. Can I ignore specific rows of the table?
ANSWER:
You can ignore specified number of first rows, e.... | [
"mysql",
"xml"
] | 0 | 1 | 97 | 1 | 0 | 2011-06-08T03:52:17.127000 | 2011-06-08T07:06:52.373000 |
6,275,087 | 6,275,281 | How to generate random item with different frequency from mysql | I have a table like follows: Potion { id, name, freq } I gave away potions to users in 'random' manner. but I want to be able to control frequency of the randomness because some potions is more powerful than others. What's the best way to do this? I am thinking of something like this: id | name | freq -----------------... | You first need to create a view on top of RAND() so it returns the same value for each invocation during execution (otherwise you'll get weird results): create view constant_rand as select rand() as rand; Next select a random row weighted by the cumulative freq: select id from potion p1 join constant_rand where rand * ... | How to generate random item with different frequency from mysql I have a table like follows: Potion { id, name, freq } I gave away potions to users in 'random' manner. but I want to be able to control frequency of the randomness because some potions is more powerful than others. What's the best way to do this? I am thi... | TITLE:
How to generate random item with different frequency from mysql
QUESTION:
I have a table like follows: Potion { id, name, freq } I gave away potions to users in 'random' manner. but I want to be able to control frequency of the randomness because some potions is more powerful than others. What's the best way to... | [
"mysql",
"ruby",
"random",
"performance",
"numbers"
] | 0 | 0 | 308 | 2 | 0 | 2011-06-08T06:41:41.013000 | 2011-06-08T07:03:04.330000 |
6,275,094 | 6,275,144 | dynamically switch (http)s on pages content to secure protocol (javascript) | I'm going to dynamically change the protocols in source of all pages on Blogger. Eg All http:// change to https:// on below items: And if possible on internal javascript variables | The best choice for you is using Protocol-Relative aka Protocol-Agnostic urls: So no need to change anything dynamically. | dynamically switch (http)s on pages content to secure protocol (javascript) I'm going to dynamically change the protocols in source of all pages on Blogger. Eg All http:// change to https:// on below items: And if possible on internal javascript variables | TITLE:
dynamically switch (http)s on pages content to secure protocol (javascript)
QUESTION:
I'm going to dynamically change the protocols in source of all pages on Blogger. Eg All http:// change to https:// on below items: And if possible on internal javascript variables
ANSWER:
The best choice for you is using Prot... | [
"javascript",
"dynamic",
"https",
"protocols"
] | 0 | 13 | 2,946 | 2 | 0 | 2011-06-08T06:42:18.607000 | 2011-06-08T06:47:48.930000 |
6,275,113 | 6,275,526 | Sending Mail using MailSender | I am using SimpleMailMessage and MailSender in Spring to send mail. I have configured.xml file as true true abc@gmail.com abc@yahoo.co.in but I get error: Failed messages: com.sun.mail.smtp.SMTPSendFailedException: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 http://mail.google.com/support/bin/answer.py?a... | Did you check out the configuration guide on Google's site? You could for example try to set the mail port as 587 if 465 causes problems. | Sending Mail using MailSender I am using SimpleMailMessage and MailSender in Spring to send mail. I have configured.xml file as true true abc@gmail.com abc@yahoo.co.in but I get error: Failed messages: com.sun.mail.smtp.SMTPSendFailedException: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 http://mail.goog... | TITLE:
Sending Mail using MailSender
QUESTION:
I am using SimpleMailMessage and MailSender in Spring to send mail. I have configured.xml file as true true abc@gmail.com abc@yahoo.co.in but I get error: Failed messages: com.sun.mail.smtp.SMTPSendFailedException: 530-5.5.1 Authentication Required. Learn more at 530 5.5.... | [
"java"
] | 0 | 0 | 1,066 | 2 | 0 | 2011-06-08T06:44:34.520000 | 2011-06-08T07:30:21.090000 |
6,275,122 | 6,275,954 | In Sockets, how to remove the length prefix in Socket Packet Protocol | Code-wise, how do you remove the length prefix in SocketPacketProtocol.cs for Nito.Async and/or PacketProtcol for ordinary Sockets? | If your packets are fixed-size, then you can adapt PacketProtocol very easily. If this is not the case, you'll have to roll your own solution. Nito.Async heavily relies on a length prefix to build a packet out of several "fragmented receives". If your protocol relies on other packet-delimitation methods i.e special seq... | In Sockets, how to remove the length prefix in Socket Packet Protocol Code-wise, how do you remove the length prefix in SocketPacketProtocol.cs for Nito.Async and/or PacketProtcol for ordinary Sockets? | TITLE:
In Sockets, how to remove the length prefix in Socket Packet Protocol
QUESTION:
Code-wise, how do you remove the length prefix in SocketPacketProtocol.cs for Nito.Async and/or PacketProtcol for ordinary Sockets?
ANSWER:
If your packets are fixed-size, then you can adapt PacketProtocol very easily. If this is n... | [
"c#",
".net",
"sockets"
] | 0 | 0 | 270 | 1 | 0 | 2011-06-08T06:45:55.010000 | 2011-06-08T08:14:56.153000 |
6,275,127 | 6,275,147 | Why would someone use @property if no setter or deleter are defined? | In python code I often see the use of @property. If I understand correctly, with the property function a getter setter and deleter can be defined. Why would one use @property if the setter and deleter are not defined (@x.setter, @x.deleter)? Isn't this the same as not using @property at all? | It creates an API that does not allow a value to be set. This is similar in other languages to a constant. | Why would someone use @property if no setter or deleter are defined? In python code I often see the use of @property. If I understand correctly, with the property function a getter setter and deleter can be defined. Why would one use @property if the setter and deleter are not defined (@x.setter, @x.deleter)? Isn't thi... | TITLE:
Why would someone use @property if no setter or deleter are defined?
QUESTION:
In python code I often see the use of @property. If I understand correctly, with the property function a getter setter and deleter can be defined. Why would one use @property if the setter and deleter are not defined (@x.setter, @x.d... | [
"python",
"properties",
"decorator"
] | 11 | 10 | 10,280 | 4 | 0 | 2011-06-08T06:46:27.987000 | 2011-06-08T06:47:56.770000 |
6,275,130 | 6,275,242 | JUnit: how to access Spring configuration as Spring has intended? | There is a tutorial video that introduces Spring MVC 3.0. In the demo-project they use the following directory structure: src main webapp WEB-INF spring appServlet controllers.xml servlet-context.xml root-context.xml Let's say I have a project with Maven-support and I want to write JUnit tests using Spring's configurat... | You should put the "normal" spring configuration in the resources folder but not in the webapp folder: src\main\ressources\WEB-INF\spring\root/spring-context.xml. Then you can access it without problems from the test. Put only the web related spring configuration (servlet-context.xml) in the webapp folder. The structur... | JUnit: how to access Spring configuration as Spring has intended? There is a tutorial video that introduces Spring MVC 3.0. In the demo-project they use the following directory structure: src main webapp WEB-INF spring appServlet controllers.xml servlet-context.xml root-context.xml Let's say I have a project with Maven... | TITLE:
JUnit: how to access Spring configuration as Spring has intended?
QUESTION:
There is a tutorial video that introduces Spring MVC 3.0. In the demo-project they use the following directory structure: src main webapp WEB-INF spring appServlet controllers.xml servlet-context.xml root-context.xml Let's say I have a ... | [
"spring",
"junit"
] | 4 | 2 | 5,016 | 2 | 0 | 2011-06-08T06:46:53.090000 | 2011-06-08T06:58:36.503000 |
6,275,138 | 6,275,331 | SQL Server - Update rows based on a list | I'm working with Windows Forms - VB.NET. Here's what I have: A ListView with checkboxes set to True A Button (triggers the update) A database table with similar fields as the ListView What I want to happen: when the user clicks the Button, all items on the ListView with checkbox checked will be updated. My progress: I'... | If you're using SQL Server 2008 or later, you can use table-valued parameters. These let you continue to deal with the separate IDs on separate rows, perform SQL joins, etc. There are plenty of examples on the page I've linked to, e.g.: Using connection ' Create a DataTable with the modified rows. Dim addedCategories A... | SQL Server - Update rows based on a list I'm working with Windows Forms - VB.NET. Here's what I have: A ListView with checkboxes set to True A Button (triggers the update) A database table with similar fields as the ListView What I want to happen: when the user clicks the Button, all items on the ListView with checkbox... | TITLE:
SQL Server - Update rows based on a list
QUESTION:
I'm working with Windows Forms - VB.NET. Here's what I have: A ListView with checkboxes set to True A Button (triggers the update) A database table with similar fields as the ListView What I want to happen: when the user clicks the Button, all items on the List... | [
"sql",
"vb.net",
"list",
"sql-update"
] | 0 | 1 | 2,620 | 2 | 0 | 2011-06-08T06:47:21.837000 | 2011-06-08T07:09:51.383000 |
6,275,178 | 6,275,312 | jQGrid primary key issue when delete | I have primary key of my row as hidden field in my jQGrid. It is called "UserId" colNames: ['UserId', "Details"...], colModel: [{ name: 'UserId', index: 'UserId', editable: false, hidden: true }, { name: 'Details', index: 'Details', editable: true, editactioniconscolumn: true },...] I get worked create and update cases... | You can implement your requirements in many ways: If the value from the UserId column is unique on the page and can be used to identify the row you can add key:true property to the UserId column definition in the colModel. You can use beforeSubmit or onclickSubmit event to modify the postdata parameter and add addition... | jQGrid primary key issue when delete I have primary key of my row as hidden field in my jQGrid. It is called "UserId" colNames: ['UserId', "Details"...], colModel: [{ name: 'UserId', index: 'UserId', editable: false, hidden: true }, { name: 'Details', index: 'Details', editable: true, editactioniconscolumn: true },...]... | TITLE:
jQGrid primary key issue when delete
QUESTION:
I have primary key of my row as hidden field in my jQGrid. It is called "UserId" colNames: ['UserId', "Details"...], colModel: [{ name: 'UserId', index: 'UserId', editable: false, hidden: true }, { name: 'Details', index: 'Details', editable: true, editactioniconsc... | [
"jqgrid",
"jqgrid-asp.net"
] | 5 | 6 | 3,041 | 1 | 0 | 2011-06-08T06:51:01.797000 | 2011-06-08T07:06:33.677000 |
6,275,184 | 6,275,241 | Creating a generic retrieval method to return 1 record | I am working through a code sample, and I just want to hear some opinions on the way that they have done things. They use plain old ADO.NET. They have a generic function called Read that brings back 1 record. Here is the code: public static T Read (string storedProcedure, Func make, object[] parms = null) { using (SqlC... | The delegate for the make (materialization) is pretty versatile and flexible, but IMO makes for a bit of unnecessary work in the vast majority of cases. In terms of what it does - they use the delegate as a callback to get the caller to specify how to read the record. Note, since they don't expect the consumer to chang... | Creating a generic retrieval method to return 1 record I am working through a code sample, and I just want to hear some opinions on the way that they have done things. They use plain old ADO.NET. They have a generic function called Read that brings back 1 record. Here is the code: public static T Read (string storedPro... | TITLE:
Creating a generic retrieval method to return 1 record
QUESTION:
I am working through a code sample, and I just want to hear some opinions on the way that they have done things. They use plain old ADO.NET. They have a generic function called Read that brings back 1 record. Here is the code: public static T Read... | [
"c#",
".net",
"c#-4.0",
"ado.net"
] | 5 | 3 | 494 | 2 | 0 | 2011-06-08T06:51:46.390000 | 2011-06-08T06:58:29.730000 |
6,275,187 | 6,275,502 | How to do permutation in tsql (set based) | I have the below input PlayerID MatchPlayed RunsMade -------- ----------- -------- 1 10 200 2 5 100 3 8 24 4 30 50 The output will be Combined Players Combined Match Played Combined runs Made ---------------- --------------------- ------------------ 1 10 200 1,2 15 300 1,3 18 224 1,4 40 250 1,2,3 23 324 1,2,4 45 350 1,... | Setup: create table Input(PlayerId int, MatchPlayed int, RunsMade int)
insert Input select 1, 10, 200 union all select 2, 5, 100 union all select 3, 8, 24 union all select 4, 30, 50 Query: with cte(Combined, PlayerId, MatchPlayed, RunsMade) as ( select cast(PlayerId as varchar(500)), PlayerId, MatchPlayed, RunsMade fr... | How to do permutation in tsql (set based) I have the below input PlayerID MatchPlayed RunsMade -------- ----------- -------- 1 10 200 2 5 100 3 8 24 4 30 50 The output will be Combined Players Combined Match Played Combined runs Made ---------------- --------------------- ------------------ 1 10 200 1,2 15 300 1,3 18 2... | TITLE:
How to do permutation in tsql (set based)
QUESTION:
I have the below input PlayerID MatchPlayed RunsMade -------- ----------- -------- 1 10 200 2 5 100 3 8 24 4 30 50 The output will be Combined Players Combined Match Played Combined runs Made ---------------- --------------------- ------------------ 1 10 200 1... | [
"sql",
"sql-server",
"sql-server-2005",
"t-sql",
"permutation"
] | 2 | 5 | 277 | 1 | 0 | 2011-06-08T06:52:14.463000 | 2011-06-08T07:28:04.387000 |
6,275,193 | 6,275,332 | django-tables2 linkcolumn multiple items in the same cell | I'd like to add multiple 'items' to the same cell using tables.LinkColumn. Something like this: column_name = tables.LinkColumn('some_url_edit', args=[A('pk')], attrs={'class':'tbl_icon edit'}) column_name += tables.LinkColumn('some_url_del', args=[A('pk')], attrs={'class':'tbl_icon delete'}) column_name +=... Is this ... | You have two options here, either use a TemplateColumn, or write a render_FOO method. Here is an example using the TemplateColumn (as you can see the record is added to the context that is used to render the template, thus allowing you to access the pk via record.pk: TEMPLATE = ''' Edit Delete '''
class MyTable(tables... | django-tables2 linkcolumn multiple items in the same cell I'd like to add multiple 'items' to the same cell using tables.LinkColumn. Something like this: column_name = tables.LinkColumn('some_url_edit', args=[A('pk')], attrs={'class':'tbl_icon edit'}) column_name += tables.LinkColumn('some_url_del', args=[A('pk')], att... | TITLE:
django-tables2 linkcolumn multiple items in the same cell
QUESTION:
I'd like to add multiple 'items' to the same cell using tables.LinkColumn. Something like this: column_name = tables.LinkColumn('some_url_edit', args=[A('pk')], attrs={'class':'tbl_icon edit'}) column_name += tables.LinkColumn('some_url_del', a... | [
"django",
"django-tables2"
] | 5 | 11 | 3,895 | 2 | 0 | 2011-06-08T06:52:29.853000 | 2011-06-08T07:10:09.983000 |
6,275,219 | 6,275,433 | Generating IL for double arrays | I’m writing some IL institutions for creating int and double arrays using System.Reflection.Emit name space. For creating int array I’m using following code. LocalBuilder arr = gen.DeclareLocal(typeof(int)); gen.Emit(OpCodes.Ldc_I4_1); gen.Emit(OpCodes.Newarr, typeof(int)); gen.Emit(OpCodes.Stloc, arr); gen.Emit(OpCode... | LocalBuilder arr = gen.DeclareLocal(typeof(int)); gen.Emit(OpCodes.Ldc_I4_1); gen.Emit(OpCodes.Newarr, typeof(int)); gen.Emit(OpCodes.Stloc, arr); Why is the arr not of type int[]? I am certain peverify would complain for both versions. The fact that it runs for the first version is simply 'luck'*. * The reason is much... | Generating IL for double arrays I’m writing some IL institutions for creating int and double arrays using System.Reflection.Emit name space. For creating int array I’m using following code. LocalBuilder arr = gen.DeclareLocal(typeof(int)); gen.Emit(OpCodes.Ldc_I4_1); gen.Emit(OpCodes.Newarr, typeof(int)); gen.Emit(OpCo... | TITLE:
Generating IL for double arrays
QUESTION:
I’m writing some IL institutions for creating int and double arrays using System.Reflection.Emit name space. For creating int array I’m using following code. LocalBuilder arr = gen.DeclareLocal(typeof(int)); gen.Emit(OpCodes.Ldc_I4_1); gen.Emit(OpCodes.Newarr, typeof(in... | [
"c#",
"il"
] | 7 | 7 | 2,653 | 1 | 0 | 2011-06-08T06:55:37.833000 | 2011-06-08T07:21:55.027000 |
6,275,222 | 6,275,304 | Auto Notification for Android | I'm new with Android programming. I'm just wondering whether its possible to set up auto notification. For example, every morning at 8am, the app will send a notification to user about something. Is this possible? Which area/class of Android programming should I look at? Thanks! | You should have a look at the Alarm Manager. You will need to use either of the 'set' methods, and give it a PendingIntent that will perform a broadcast or start an intent service that wakes up just to show the notification. For the broadcast, you will need to have a receiver in your app, that makes a Notification and ... | Auto Notification for Android I'm new with Android programming. I'm just wondering whether its possible to set up auto notification. For example, every morning at 8am, the app will send a notification to user about something. Is this possible? Which area/class of Android programming should I look at? Thanks! | TITLE:
Auto Notification for Android
QUESTION:
I'm new with Android programming. I'm just wondering whether its possible to set up auto notification. For example, every morning at 8am, the app will send a notification to user about something. Is this possible? Which area/class of Android programming should I look at? ... | [
"android",
"notifications"
] | 1 | 1 | 2,935 | 1 | 0 | 2011-06-08T06:55:56.733000 | 2011-06-08T07:05:53.820000 |
6,275,225 | 6,275,275 | GridView: Why do I STILL have to do my own Sorting and Paging? | When I already enabled paging and sorting for a GridView Control? Here's my aspx code: I do the query and DataBind in Page_Load() and the data were displayed properly. I was expecting GridView to handle the paging and sorting for me but when I tried to page or sort, the page crashed and I was told to provide the Sortin... | The GridView does yet not know how to sort if the user clicks on a column. Therefore you need to provide the SortExpression for the sortable columns. Also you might want to provide extra functionality to sort ascending/descending if user clicked on the same column twice. Therefore you need to store the current SortExpr... | GridView: Why do I STILL have to do my own Sorting and Paging? When I already enabled paging and sorting for a GridView Control? Here's my aspx code: I do the query and DataBind in Page_Load() and the data were displayed properly. I was expecting GridView to handle the paging and sorting for me but when I tried to page... | TITLE:
GridView: Why do I STILL have to do my own Sorting and Paging?
QUESTION:
When I already enabled paging and sorting for a GridView Control? Here's my aspx code: I do the query and DataBind in Page_Load() and the data were displayed properly. I was expecting GridView to handle the paging and sorting for me but wh... | [
"asp.net",
"gridview"
] | 0 | 1 | 622 | 1 | 0 | 2011-06-08T06:56:37.427000 | 2011-06-08T07:02:50.310000 |
6,275,233 | 6,275,273 | Windows batch script: substring calculation | I have a situation like this. I have a list of urls in a file. SET str1="http://www.domain.com/dir1/dir2/dir3/dir4/dir5/file1.txt" In the above string http://www.domain.com/dir1/dir2/dir3 is constant in all the urls. I need to extract the rest of the path in each url. I mean, i need to get the final string from the abo... | You need the %var:~start,end% notation. For example, if you run this: @SET str1="http://www.domain.com/dir1/dir2/dir3/dir4/dir5/file1.txt" @ECHO %str1:~37,-1% It will print /dir4/dir5/file1.txt. | Windows batch script: substring calculation I have a situation like this. I have a list of urls in a file. SET str1="http://www.domain.com/dir1/dir2/dir3/dir4/dir5/file1.txt" In the above string http://www.domain.com/dir1/dir2/dir3 is constant in all the urls. I need to extract the rest of the path in each url. I mean,... | TITLE:
Windows batch script: substring calculation
QUESTION:
I have a situation like this. I have a list of urls in a file. SET str1="http://www.domain.com/dir1/dir2/dir3/dir4/dir5/file1.txt" In the above string http://www.domain.com/dir1/dir2/dir3 is constant in all the urls. I need to extract the rest of the path in... | [
"windows",
"batch-file"
] | 6 | 9 | 15,030 | 2 | 0 | 2011-06-08T06:57:32.243000 | 2011-06-08T07:02:43.380000 |
6,275,238 | 6,275,791 | Query for exact match of users in a conversation in SQL Server | I have a conversation table, and a user conversation table. CONVERSATION Id, Subject, Type
USERCONVERSATION Id, UserId, ConversationId I need to do a SQL Query based on a list of UserIds. So, if I have three UserIds for the same ConversationId, I need to perform a query where if I provide the same three userIds, it wi... | Assuming the same user can't be in a UserConversation twice: SELECT ConversationID FROM UserConversation GROUP BY ConversationID HAVING Count(UserID) = 3 -- this isn't necessary but might improve performance AND Sum(CASE WHEN UserID IN (1, 2, 3) THEN 1 ELSE 0 END) = 3 This also works: SELECT ConversationID FROM UserCon... | Query for exact match of users in a conversation in SQL Server I have a conversation table, and a user conversation table. CONVERSATION Id, Subject, Type
USERCONVERSATION Id, UserId, ConversationId I need to do a SQL Query based on a list of UserIds. So, if I have three UserIds for the same ConversationId, I need to p... | TITLE:
Query for exact match of users in a conversation in SQL Server
QUESTION:
I have a conversation table, and a user conversation table. CONVERSATION Id, Subject, Type
USERCONVERSATION Id, UserId, ConversationId I need to do a SQL Query based on a list of UserIds. So, if I have three UserIds for the same Conversat... | [
"sql",
"sql-server",
"t-sql"
] | 4 | 4 | 637 | 2 | 0 | 2011-06-08T06:58:09.267000 | 2011-06-08T07:56:57.253000 |
6,275,246 | 6,275,296 | Displaying rows with count 0 in MySQL using COUNT and GROUP BY | I have two tables, Subject and Content, where Content references Subject with foreign key. I want to display how many times each subject appears in Content table (0, if it does not appear). But the query below only gives me the rows with count > 0 and ignores the others: SELECT Subject.id, Subject.name, COUNT(Content.s... | Which table is type a column in? I'm supposing that it's Content - and by including the field in the WHERE clause, you're forcing the Content table on the right-hand side of the LEFT JOIN to have data in it (which means the LEFT JOIN is actually then just an INNER JOIN). Try: SELECT Subject.id, Subject.name, COUNT(Cont... | Displaying rows with count 0 in MySQL using COUNT and GROUP BY I have two tables, Subject and Content, where Content references Subject with foreign key. I want to display how many times each subject appears in Content table (0, if it does not appear). But the query below only gives me the rows with count > 0 and ignor... | TITLE:
Displaying rows with count 0 in MySQL using COUNT and GROUP BY
QUESTION:
I have two tables, Subject and Content, where Content references Subject with foreign key. I want to display how many times each subject appears in Content table (0, if it does not appear). But the query below only gives me the rows with c... | [
"mysql",
"count",
"outer-join"
] | 1 | 5 | 2,218 | 3 | 0 | 2011-06-08T06:59:22 | 2011-06-08T07:05:04.040000 |
6,275,265 | 6,275,367 | Where can i find the JAX-WS version shipped with Java 6? | I'm using Java 6 for learning more about web Services (JAX-WS). I also read that JAX-WS latest version is available with Metro, i.e. If you're not using JDK6 and planning to use JAX-WS, you can use Metro. I would like to know which version of the JAX-WS is shipped with my JDK? I'm using jdk1.6.0_22. | JAX-WS is part of standart JDK since version 6. You can learn which version of jax-ws by means wsgen or wsimport. You can find them bin subdirectory of your jdk installation. Q. How do I find out which version of the JAX-WS RI I'm using? Run the following command $ wsgen or wsimport -version Alternatively, each JAX-WS ... | Where can i find the JAX-WS version shipped with Java 6? I'm using Java 6 for learning more about web Services (JAX-WS). I also read that JAX-WS latest version is available with Metro, i.e. If you're not using JDK6 and planning to use JAX-WS, you can use Metro. I would like to know which version of the JAX-WS is shippe... | TITLE:
Where can i find the JAX-WS version shipped with Java 6?
QUESTION:
I'm using Java 6 for learning more about web Services (JAX-WS). I also read that JAX-WS latest version is available with Metro, i.e. If you're not using JDK6 and planning to use JAX-WS, you can use Metro. I would like to know which version of th... | [
"java",
"web-services",
"jax-ws",
"jax-rpc"
] | 12 | 10 | 15,967 | 2 | 0 | 2011-06-08T07:01:38.560000 | 2011-06-08T07:15:55.093000 |
6,275,266 | 6,275,399 | Fancy Box and Jquery Tiny Scroll Bar Prolem | I am working on a page and having problem with the Fancybox close action for the Image gallery in the first button at the bottom, the gallery is closed but overaly is still there. Here is the test link How ever the same settings are working for the second link "Floor Plan". Secondly I am using a Tiny Scrollbar plugin f... | First off, I noticed you're suing jQuery 1.3, why? Here's 1.6: http://jquery.com/ It isn't that much larger, and its an updated library. That may fix your problem. If that didn't work, then delete the fancybox.js, re-downlod and put it in again, same with css. Make sure the css is called at the end of your css document... | Fancy Box and Jquery Tiny Scroll Bar Prolem I am working on a page and having problem with the Fancybox close action for the Image gallery in the first button at the bottom, the gallery is closed but overaly is still there. Here is the test link How ever the same settings are working for the second link "Floor Plan". S... | TITLE:
Fancy Box and Jquery Tiny Scroll Bar Prolem
QUESTION:
I am working on a page and having problem with the Fancybox close action for the Image gallery in the first button at the bottom, the gallery is closed but overaly is still there. Here is the test link How ever the same settings are working for the second li... | [
"php",
"jquery",
"fancybox"
] | 0 | 2 | 3,811 | 3 | 0 | 2011-06-08T07:01:38.670000 | 2011-06-08T07:18:39.100000 |
6,275,267 | 6,275,292 | Convert a Dictionary<string,string> to an array | I want to convert a Dictionary to an array in C#. The array should be in the following format: string[] array = {"key1=value1","key2=value2","key1=value1"} How to do this effectively? | string[] array = dictionary.Select(kvp => string.Format("{0}={1}", kvp.Key, kvp.Value)).ToArray(); | Convert a Dictionary<string,string> to an array I want to convert a Dictionary to an array in C#. The array should be in the following format: string[] array = {"key1=value1","key2=value2","key1=value1"} How to do this effectively? | TITLE:
Convert a Dictionary<string,string> to an array
QUESTION:
I want to convert a Dictionary to an array in C#. The array should be in the following format: string[] array = {"key1=value1","key2=value2","key1=value1"} How to do this effectively?
ANSWER:
string[] array = dictionary.Select(kvp => string.Format("{0}=... | [
".net",
"c#-3.0"
] | 3 | 5 | 2,058 | 2 | 0 | 2011-06-08T07:01:41.167000 | 2011-06-08T07:04:21.087000 |
6,275,285 | 6,275,947 | Bind tmpl to a jquery collection | Can anyone explain this behavior, imagine you have a jQuery collection, like this: var list = $("#mySelect").children().filter(":selected"); Then I want to create a text-join to get "pX, pY" by using the following template: var concatenation = $.tmpl("p${$data.val()}, ", list); Result is a text node with only the first... | your options is a jQuery selector result collection, it looks like the template engine does not understand that this is a collection and databind one row to the entire collection, thats why $data.val() return the first value (Thats the deafault behavior of a jquery selector). If you instead do var concatenation = $.tmp... | Bind tmpl to a jquery collection Can anyone explain this behavior, imagine you have a jQuery collection, like this: var list = $("#mySelect").children().filter(":selected"); Then I want to create a text-join to get "pX, pY" by using the following template: var concatenation = $.tmpl("p${$data.val()}, ", list); Result i... | TITLE:
Bind tmpl to a jquery collection
QUESTION:
Can anyone explain this behavior, imagine you have a jQuery collection, like this: var list = $("#mySelect").children().filter(":selected"); Then I want to create a text-join to get "pX, pY" by using the following template: var concatenation = $.tmpl("p${$data.val()}, ... | [
"javascript",
"jquery-templates"
] | 0 | 2 | 189 | 1 | 0 | 2011-06-08T07:03:17.193000 | 2011-06-08T08:14:04.440000 |
6,275,286 | 6,275,390 | changing the css dynamically in asp.net | I have a gridview inside an update panel.In that gridview, I have a linkbutton in which i need to show the status.If the linkbutton text is success then it should be in same color. and if the linkbutton text is fail,it should be in red color.I have written the css for red color. Here the default is blue.How to change i... | You could use GridView's RowDataBound event to change the CSS accordingly. Private Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound Select Case e.Row.RowType Case DataControlRowType.DataRow Dim data = DirectCast(e.Row.DataItem, ... | changing the css dynamically in asp.net I have a gridview inside an update panel.In that gridview, I have a linkbutton in which i need to show the status.If the linkbutton text is success then it should be in same color. and if the linkbutton text is fail,it should be in red color.I have written the css for red color. ... | TITLE:
changing the css dynamically in asp.net
QUESTION:
I have a gridview inside an update panel.In that gridview, I have a linkbutton in which i need to show the status.If the linkbutton text is success then it should be in same color. and if the linkbutton text is fail,it should be in red color.I have written the c... | [
"asp.net",
"css"
] | 1 | 0 | 382 | 1 | 0 | 2011-06-08T07:03:18.440000 | 2011-06-08T07:17:39.293000 |
6,275,289 | 6,275,350 | scala package conflict | I have a library which has root package "scala", and now I have a project using this library, and I have a sub package named "com.zjffdu.scala". And the class file in this package needs to import classes from the library. So I have the following import statement. import scala._ But because this class is also in package... | Use this: import _root_.scala._ As you can see it's not very pretty — the best option is probably to avoid naming one of your packages scala. And by the way — the root scala package is always preimported (though subpackages, of course, are not). | scala package conflict I have a library which has root package "scala", and now I have a project using this library, and I have a sub package named "com.zjffdu.scala". And the class file in this package needs to import classes from the library. So I have the following import statement. import scala._ But because this c... | TITLE:
scala package conflict
QUESTION:
I have a library which has root package "scala", and now I have a project using this library, and I have a sub package named "com.zjffdu.scala". And the class file in this package needs to import classes from the library. So I have the following import statement. import scala._ ... | [
"scala"
] | 8 | 19 | 1,086 | 1 | 0 | 2011-06-08T07:03:43.100000 | 2011-06-08T07:12:58.670000 |
6,275,297 | 6,275,389 | WCF+NHibernate+LazyLoading | I'm having issues transferring lazy loaded data over the wire using WCF and NHibernate. I've more than 5,000,000 records all together. The application is multi-tier, uses MVVM and works as: WCF (net.tcp Binding) --> Data Access Layer --> Business Layer --> UI. There is no issue with WCF or NHibernate. The mappings are ... | Turn off lazy loading or use DTOs!!! That is the solution. Transferring 5M records looks like nonsense and if your collections are lazy loaded initial serialization can trigger several hundred thousands database selects. Also if each record has only 1B you will transfer 5MB - I doubt that record has 1B so we can talk a... | WCF+NHibernate+LazyLoading I'm having issues transferring lazy loaded data over the wire using WCF and NHibernate. I've more than 5,000,000 records all together. The application is multi-tier, uses MVVM and works as: WCF (net.tcp Binding) --> Data Access Layer --> Business Layer --> UI. There is no issue with WCF or NH... | TITLE:
WCF+NHibernate+LazyLoading
QUESTION:
I'm having issues transferring lazy loaded data over the wire using WCF and NHibernate. I've more than 5,000,000 records all together. The application is multi-tier, uses MVVM and works as: WCF (net.tcp Binding) --> Data Access Layer --> Business Layer --> UI. There is no is... | [
"wcf"
] | 1 | 1 | 438 | 2 | 0 | 2011-06-08T07:05:07.670000 | 2011-06-08T07:17:39.263000 |
6,275,302 | 6,277,533 | OpenGL ES shader to convert color image to black-and-white infrared? | I was able to create a fragment shader to convert a color image to greyscale, by: float luminance = pixelColor.r * 0.299 + pixelColor.g * 0.587 + pixelColor.b * 0.114; gl_FragColor = vec4(luminance, luminance, luminance, 1.0); Now I'd like to mimic a Photoshop channel mixer effect: How can I translate the % percentage ... | You should know from school that 10% of a value means multiplying that value by 0.1, so just use (-0.7, 2.0, -0.3). | OpenGL ES shader to convert color image to black-and-white infrared? I was able to create a fragment shader to convert a color image to greyscale, by: float luminance = pixelColor.r * 0.299 + pixelColor.g * 0.587 + pixelColor.b * 0.114; gl_FragColor = vec4(luminance, luminance, luminance, 1.0); Now I'd like to mimic a ... | TITLE:
OpenGL ES shader to convert color image to black-and-white infrared?
QUESTION:
I was able to create a fragment shader to convert a color image to greyscale, by: float luminance = pixelColor.r * 0.299 + pixelColor.g * 0.587 + pixelColor.b * 0.114; gl_FragColor = vec4(luminance, luminance, luminance, 1.0); Now I'... | [
"image-processing",
"opengl-es",
"shader"
] | 5 | 5 | 5,835 | 1 | 0 | 2011-06-08T07:05:34.540000 | 2011-06-08T10:47:35.427000 |
6,275,308 | 6,277,458 | Configuring Java Compiler->Errors/Warnings within pom.xml | I am looking for a solution for the stated problem. I already figured out, that the project-settings from "Project Properties"->"Java Compiler"->"Errors/Warnings" are going to.settings/org.eclipse.jdt.core.prefs (like e.g. org.eclipse.jdt.core.compiler.problem.enumIdentifier=error ). It would be great, if I could confi... | For one, maven would not understand eclipse compiler settings. Another, Eclipse uses ecj by default. maven compiler plugin can be configured with the parameters that java compiler understands. It can take a few parameters as documented here, but doubtful if it meets the requirement you have. Perhaps a candidate for a c... | Configuring Java Compiler->Errors/Warnings within pom.xml I am looking for a solution for the stated problem. I already figured out, that the project-settings from "Project Properties"->"Java Compiler"->"Errors/Warnings" are going to.settings/org.eclipse.jdt.core.prefs (like e.g. org.eclipse.jdt.core.compiler.problem.e... | TITLE:
Configuring Java Compiler->Errors/Warnings within pom.xml
QUESTION:
I am looking for a solution for the stated problem. I already figured out, that the project-settings from "Project Properties"->"Java Compiler"->"Errors/Warnings" are going to.settings/org.eclipse.jdt.core.prefs (like e.g. org.eclipse.jdt.core.... | [
"eclipse",
"maven",
"m2eclipse"
] | 1 | 1 | 683 | 1 | 0 | 2011-06-08T07:06:06.363000 | 2011-06-08T10:39:00.840000 |
6,275,310 | 6,289,423 | Text not appearing in listview | I have a listview in which i wanted to have custom typeface e.g. Arial. for this i subclassed the SimpleAdapter and implemented the the typeface for textviews in the list. But after this implementation, the list appears to be blank but the onClick is still working and clicking on the blank list item navigates me to the... | the answer is quite simple as it was my mistake, wasn't providing the ItemText to be viewed to the getView method: public class MySimpleAdapter extends SimpleAdapter {
private ArrayList > results;
public MySimpleAdapter(Context context, ArrayList > data, int resource, String[] from, int[] to) { super(context, data, r... | Text not appearing in listview I have a listview in which i wanted to have custom typeface e.g. Arial. for this i subclassed the SimpleAdapter and implemented the the typeface for textviews in the list. But after this implementation, the list appears to be blank but the onClick is still working and clicking on the blan... | TITLE:
Text not appearing in listview
QUESTION:
I have a listview in which i wanted to have custom typeface e.g. Arial. for this i subclassed the SimpleAdapter and implemented the the typeface for textviews in the list. But after this implementation, the list appears to be blank but the onClick is still working and cl... | [
"android",
"android-listview",
"simpleadapter"
] | 1 | 1 | 1,291 | 2 | 0 | 2011-06-08T07:06:19.213000 | 2011-06-09T07:24:19.383000 |
6,275,313 | 6,275,670 | Related to Voice Recognition Google API android | Voice Recognition API produces a list of suggestions after listening a voice.I wanted to know, does the most probable suggestion always comes on the top?or it is just random.. I need this to make calculations for determining accuracy. | if u using new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH), 0); and data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS); will always sorts best matches first Yes | Related to Voice Recognition Google API android Voice Recognition API produces a list of suggestions after listening a voice.I wanted to know, does the most probable suggestion always comes on the top?or it is just random.. I need this to make calculations for determining accuracy. | TITLE:
Related to Voice Recognition Google API android
QUESTION:
Voice Recognition API produces a list of suggestions after listening a voice.I wanted to know, does the most probable suggestion always comes on the top?or it is just random.. I need this to make calculations for determining accuracy.
ANSWER:
if u using... | [
"android",
"listview",
"voice-recognition"
] | 1 | 2 | 234 | 1 | 0 | 2011-06-08T07:06:34.653000 | 2011-06-08T07:44:11.493000 |
6,275,316 | 6,275,423 | Using An Iframe for an embedded App | I'm currently programming a web application that can be embedded. I'm wondering if it would be a good practice to generate an iframe for the interface through an included Javascript file? For example the user would just have to include this on their index page: Init_App("[User_Public_Authorization]"); Application.js wi... | Before you write a script you should always ask yourself if you really need it. What you want to do is load an script which then creates an iframe which then loads your app. The simpler solution would be to just use an iframe. Which benefits would you get from your script? What can your script do that an ordinary ifram... | Using An Iframe for an embedded App I'm currently programming a web application that can be embedded. I'm wondering if it would be a good practice to generate an iframe for the interface through an included Javascript file? For example the user would just have to include this on their index page: Init_App("[User_Public... | TITLE:
Using An Iframe for an embedded App
QUESTION:
I'm currently programming a web application that can be embedded. I'm wondering if it would be a good practice to generate an iframe for the interface through an included Javascript file? For example the user would just have to include this on their index page: Init... | [
"php",
"javascript",
"web-applications",
"embed"
] | 0 | 0 | 388 | 1 | 0 | 2011-06-08T07:06:53.787000 | 2011-06-08T07:20:47.320000 |
6,275,319 | 6,275,366 | Several questions about plist in iOS | I implemented the plist in my iOS game following this tutorial: Now I have several questions about plist file in iphone. My plist file is fine, but my plist file in the project folder is not changed when write data to the plist file. The tutorial said " Find the Data.plist file in ~/Documents and open it in a text edit... | For your first question. 1-> To view your.plist file in XCode, you will have to create and add that in your project through the `xCode. 2- From Apple documentation. Because the property-list file is in the Resources folder, it will be written to the application’s main bundle when you build the project. So it will be ov... | Several questions about plist in iOS I implemented the plist in my iOS game following this tutorial: Now I have several questions about plist file in iphone. My plist file is fine, but my plist file in the project folder is not changed when write data to the plist file. The tutorial said " Find the Data.plist file in ~... | TITLE:
Several questions about plist in iOS
QUESTION:
I implemented the plist in my iOS game following this tutorial: Now I have several questions about plist file in iphone. My plist file is fine, but my plist file in the project folder is not changed when write data to the plist file. The tutorial said " Find the Da... | [
"iphone",
"ios",
"plist"
] | 0 | 2 | 1,149 | 1 | 0 | 2011-06-08T07:07:01.840000 | 2011-06-08T07:15:27.500000 |
6,275,327 | 6,275,346 | Understanding floating point representation errors; what's wrong with my thinking? | I'm having some trouble understanding why some figures can't be represented with floating point number. As we know, a normal float would have sign bit, exponent, and mantissa. Why can't, for example, 0.1 be represented accurately in this system; the way I think of it would be that you put 10 (1010 in bin) to mantissa a... | If your exponent is decimal (i.e. it represents 10^X), you can precisely represent 0.1 -- however, most floating point formats use binary exponents (i.e. they represent 2^X). Since there are no integers X and Y such that Y * (2 ^ X) = 0.1, you cannot precisely represent 0.1 in most floating point formats. Some language... | Understanding floating point representation errors; what's wrong with my thinking? I'm having some trouble understanding why some figures can't be represented with floating point number. As we know, a normal float would have sign bit, exponent, and mantissa. Why can't, for example, 0.1 be represented accurately in this... | TITLE:
Understanding floating point representation errors; what's wrong with my thinking?
QUESTION:
I'm having some trouble understanding why some figures can't be represented with floating point number. As we know, a normal float would have sign bit, exponent, and mantissa. Why can't, for example, 0.1 be represented ... | [
"floating-point",
"floating-accuracy"
] | 7 | 10 | 2,952 | 5 | 0 | 2011-06-08T07:08:42.190000 | 2011-06-08T07:12:15.590000 |
6,275,334 | 6,275,542 | Dateformatter iPhone issue | NSLog(@"%@", self.departDate);
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; [dateFormat setDateFormat:@"MM/dd/yyyy"]; NSLog(@"%@", [dateFormat stringFromDate:self.departDate]); [dateFormat release]; So I have this code, which returns this in the console: 2011-06-09 00:00:00 +0000 06/08/2011 Any ideas ... | The first log corresponds to a GMT date. However when you create an NSDateFormatter instance, it will have a default timezone set to the user's timezone which I am guessing is probably somewhere west of Greenwich. If you want the time to remain in GMT, you will have to add this line, [dateFormat setTimeZone:[NSTimeZone... | Dateformatter iPhone issue NSLog(@"%@", self.departDate);
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; [dateFormat setDateFormat:@"MM/dd/yyyy"]; NSLog(@"%@", [dateFormat stringFromDate:self.departDate]); [dateFormat release]; So I have this code, which returns this in the console: 2011-06-09 00:00:00 ... | TITLE:
Dateformatter iPhone issue
QUESTION:
NSLog(@"%@", self.departDate);
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; [dateFormat setDateFormat:@"MM/dd/yyyy"]; NSLog(@"%@", [dateFormat stringFromDate:self.departDate]); [dateFormat release]; So I have this code, which returns this in the console: 20... | [
"iphone",
"nsdate",
"nsdateformatter"
] | 0 | 0 | 172 | 1 | 0 | 2011-06-08T07:10:22.787000 | 2011-06-08T07:32:41.097000 |
6,275,337 | 6,275,468 | Can I run php mysql in google app engine | I am planning to create a facebook canvas app using php sdk. Google app engine providing free account so I am planning to do it. But still there is a problem, right now google app engine support only java and python. Is there any way to run php and mysql in google app engine? | PHP can't run natively on the App Engine. But, there is an open source tool called Quercus, a 100% Java implementation of the PHP language (requires JDK 1.5). Since the App Engine now supports Java this means you can use Quercus to run PHP scripts on the App Engine. | Can I run php mysql in google app engine I am planning to create a facebook canvas app using php sdk. Google app engine providing free account so I am planning to do it. But still there is a problem, right now google app engine support only java and python. Is there any way to run php and mysql in google app engine? | TITLE:
Can I run php mysql in google app engine
QUESTION:
I am planning to create a facebook canvas app using php sdk. Google app engine providing free account so I am planning to do it. But still there is a problem, right now google app engine support only java and python. Is there any way to run php and mysql in goo... | [
"php",
"mysql",
"google-app-engine"
] | 7 | 5 | 10,216 | 6 | 0 | 2011-06-08T07:11:03.760000 | 2011-06-08T07:25:37.340000 |
6,275,352 | 6,275,466 | Mvvm popup window with view model, parameter and result | I have spent two day trying to figure it out. I have implemented two ways of working with mvvm popup windows Example of the first aproach usage: _childWindowController.ShowDialogWithResult ( (result, a) => { if (a.DialogResult.HasValue && a.DialogResult.Value) { if (result.NationalityCountryId.HasValue) { Background.Na... | I recommend you take a look at User Interaction Patterns, as it goes over the different approaches you can take to handling user interactions in MVVM. An alternative to using an interaction service is to implement an interaction request object. Another approach to implementing simple user interactions in the MVVM patte... | Mvvm popup window with view model, parameter and result I have spent two day trying to figure it out. I have implemented two ways of working with mvvm popup windows Example of the first aproach usage: _childWindowController.ShowDialogWithResult ( (result, a) => { if (a.DialogResult.HasValue && a.DialogResult.Value) { i... | TITLE:
Mvvm popup window with view model, parameter and result
QUESTION:
I have spent two day trying to figure it out. I have implemented two ways of working with mvvm popup windows Example of the first aproach usage: _childWindowController.ShowDialogWithResult ( (result, a) => { if (a.DialogResult.HasValue && a.Dialo... | [
"c#",
"silverlight",
"design-patterns",
"mvvm"
] | 2 | 7 | 4,858 | 1 | 0 | 2011-06-08T07:13:03.600000 | 2011-06-08T07:25:30.200000 |
6,275,359 | 6,275,486 | Javascript onfocus / onblur issues | So I am making a little searchbar that shows results underneath of it like such: I am basically doing a livesearch with through AJAX. The is initially hidden until you type and it populates some results. My issue however is getting it to hide when the user clicks away. having it disappear through onblur does not work e... | Here is a non-optimised but working non-jQuery solution hello UPDATE: Toggle if clicked on the wrapper div var hide= (id!="searchWrapper" && id!="Search" && id!= "inputSpn" && id!= "searchBtn" && id!= "Results"); document.getElementById("Results").style.display=(hide)?"none":"block"; | Javascript onfocus / onblur issues So I am making a little searchbar that shows results underneath of it like such: I am basically doing a livesearch with through AJAX. The is initially hidden until you type and it populates some results. My issue however is getting it to hide when the user clicks away. having it disap... | TITLE:
Javascript onfocus / onblur issues
QUESTION:
So I am making a little searchbar that shows results underneath of it like such: I am basically doing a livesearch with through AJAX. The is initially hidden until you type and it populates some results. My issue however is getting it to hide when the user clicks awa... | [
"javascript",
"onblur",
"livesearch"
] | 0 | 0 | 851 | 2 | 0 | 2011-06-08T07:14:16.213000 | 2011-06-08T07:26:43.663000 |
6,275,361 | 6,276,560 | Host plain html web page in APEX 4.0 | I have a html/javascript web page that I need to run unmodified on APEX 4.0, I can't seem to figure out to achieve this. In older version of APEX you could put header and body html in page attributes, I can't see something similar in 4.0 Appreciate your inputs, I am sure I am missing out something very stupid. EDIT: I ... | Apex 4.0 still has page HTML Header and Body attributes. You can also put pure HTML in an HTML region source. However, it also has a new type of application called a Websheet and it appears that you have created one of these, either intentionally or by accident. | Host plain html web page in APEX 4.0 I have a html/javascript web page that I need to run unmodified on APEX 4.0, I can't seem to figure out to achieve this. In older version of APEX you could put header and body html in page attributes, I can't see something similar in 4.0 Appreciate your inputs, I am sure I am missin... | TITLE:
Host plain html web page in APEX 4.0
QUESTION:
I have a html/javascript web page that I need to run unmodified on APEX 4.0, I can't seem to figure out to achieve this. In older version of APEX you could put header and body html in page attributes, I can't see something similar in 4.0 Appreciate your inputs, I a... | [
"html",
"oracle",
"web-hosting",
"oracle-apex"
] | 0 | 2 | 1,537 | 1 | 0 | 2011-06-08T07:14:42.693000 | 2011-06-08T09:14:05.097000 |
6,275,380 | 6,275,467 | Does html_entity_decode replaces also? If not how to replace it? | I have a situation where I am passing a string to a function. I want to convert to " " (a blank space) before passing it to function. Does html_entity_decode does it? If not how to do it? I am aware of str_replace but is there any other way out? | Quote from html_entity_decode() manual: You might wonder why trim(html_entity_decode(' ')); doesn't reduce the string to an empty string, that's because the ' ' entity is not ASCII code 32 (which is stripped by trim()) but ASCII code 160 (0xa0) in the default ISO 8859-1 characterset. You can use str_replace() to replac... | Does html_entity_decode replaces also? If not how to replace it? I have a situation where I am passing a string to a function. I want to convert to " " (a blank space) before passing it to function. Does html_entity_decode does it? If not how to do it? I am aware of str_replace but is there any other way out? | TITLE:
Does html_entity_decode replaces also? If not how to replace it?
QUESTION:
I have a situation where I am passing a string to a function. I want to convert to " " (a blank space) before passing it to function. Does html_entity_decode does it? If not how to do it? I am aware of str_replace but is there any... | [
"php",
"html",
"string",
"whitespace",
"html-entities"
] | 15 | 43 | 32,172 | 4 | 0 | 2011-06-08T07:16:48.643000 | 2011-06-08T07:25:34.790000 |
6,275,383 | 6,275,532 | Which function will it call? | Here is the code, I wrote the comments. The question is I don't know which function will be called after the function unhide in the Derive class. #include #include #include using namespace std;
class Base { string strName; public: Base& operator=(const Base &b) { this->strName = b.strName; cout << "copy assignment" <<... | Standard 7.3.3-4 (from an old draft, but in this regard still valid): If an assignment operator brought from a base class into a derived class scope has the signature of a copy-assignment operator for the derived class (class.copy), the using-declaration does not by itself suppress the implicit declaration of the deriv... | Which function will it call? Here is the code, I wrote the comments. The question is I don't know which function will be called after the function unhide in the Derive class. #include #include #include using namespace std;
class Base { string strName; public: Base& operator=(const Base &b) { this->strName = b.strName;... | TITLE:
Which function will it call?
QUESTION:
Here is the code, I wrote the comments. The question is I don't know which function will be called after the function unhide in the Derive class. #include #include #include using namespace std;
class Base { string strName; public: Base& operator=(const Base &b) { this->st... | [
"c++",
"inheritance",
"operators",
"operator-overloading"
] | 3 | 3 | 122 | 2 | 0 | 2011-06-08T07:16:58.430000 | 2011-06-08T07:31:08.337000 |
6,275,393 | 6,275,504 | How to install Django on different version of PYTHON? | I have two python versions 2.6 and 3.0. I want to install django1.3 in python3.0's site-package directory and my default python setting is on 2.6. I also added path /usr/local/bin/python3.0 and /usr/local/bin/python3.0 into.bashrc file. Please help me. | Django is not compatible with Python 3. You must install it in the 2.X branch. However, what you want to achive will be easier done using virtualenv: easy_install virtualenv virtualenv project --python=python2.6 source project/bin/activate pip install django | How to install Django on different version of PYTHON? I have two python versions 2.6 and 3.0. I want to install django1.3 in python3.0's site-package directory and my default python setting is on 2.6. I also added path /usr/local/bin/python3.0 and /usr/local/bin/python3.0 into.bashrc file. Please help me. | TITLE:
How to install Django on different version of PYTHON?
QUESTION:
I have two python versions 2.6 and 3.0. I want to install django1.3 in python3.0's site-package directory and my default python setting is on 2.6. I also added path /usr/local/bin/python3.0 and /usr/local/bin/python3.0 into.bashrc file. Please help... | [
"django"
] | 1 | 4 | 7,018 | 4 | 0 | 2011-06-08T07:18:03.897000 | 2011-06-08T07:28:06.983000 |
6,275,397 | 6,275,471 | Smart Java compiler for garbage collection | why java compiler is not more smart. Suppose it is, then it can find out the unreachable object at compiletime and code itself clean the garbage. I`m thinking that this will helps to avoid garbage collection concept in java(need to add DELETE keyword for delete the object). Why it is not possible?.. | There is a lot of problems computers can't always give a yes or no answer to. Actually, there is more problems which can't be solved by computers than problems which can. Look at Undecidable problem and List of undecidable problems. There you will find the halting problem: Halting problem which says that a computer can... | Smart Java compiler for garbage collection why java compiler is not more smart. Suppose it is, then it can find out the unreachable object at compiletime and code itself clean the garbage. I`m thinking that this will helps to avoid garbage collection concept in java(need to add DELETE keyword for delete the object). Wh... | TITLE:
Smart Java compiler for garbage collection
QUESTION:
why java compiler is not more smart. Suppose it is, then it can find out the unreachable object at compiletime and code itself clean the garbage. I`m thinking that this will helps to avoid garbage collection concept in java(need to add DELETE keyword for dele... | [
"java"
] | 0 | 1 | 786 | 4 | 0 | 2011-06-08T07:18:32.140000 | 2011-06-08T07:25:47.920000 |
6,275,412 | 6,275,561 | Is there an easy way to assign a struct array | I have a struct array like this: struct VERTEX_FMT { float x, y, z, u, v; const static DWORD FVF = (D3DFVF_XYZ | D3DFVF_TEX1); }; VERTEX_FMT vertices[] = { {-1.0f, -1.0f, 0.0f, 0.0f, 0.0f}, {-1.0f, 1.0f, 0.0f, 0.0f, 1.0f}, { 1.0f, -1.0f, 0.0f, 1.0f, 0.0f}, { 1.0f, 1.0f, 0.0f, 1.0f, 1.0f}, }; Is there an easy to way ass... | Only if you wrap the array in another struct. Arrays are pretty broken in C, and C++ decided that std::vector was sufficient, and that any attempt to fix C style arrays either wouldn't go far enough to make a difference, or would break compatibility to a point where you couldn't talk of C style arrays any more. For POD... | Is there an easy way to assign a struct array I have a struct array like this: struct VERTEX_FMT { float x, y, z, u, v; const static DWORD FVF = (D3DFVF_XYZ | D3DFVF_TEX1); }; VERTEX_FMT vertices[] = { {-1.0f, -1.0f, 0.0f, 0.0f, 0.0f}, {-1.0f, 1.0f, 0.0f, 0.0f, 1.0f}, { 1.0f, -1.0f, 0.0f, 1.0f, 0.0f}, { 1.0f, 1.0f, 0.0... | TITLE:
Is there an easy way to assign a struct array
QUESTION:
I have a struct array like this: struct VERTEX_FMT { float x, y, z, u, v; const static DWORD FVF = (D3DFVF_XYZ | D3DFVF_TEX1); }; VERTEX_FMT vertices[] = { {-1.0f, -1.0f, 0.0f, 0.0f, 0.0f}, {-1.0f, 1.0f, 0.0f, 0.0f, 1.0f}, { 1.0f, -1.0f, 0.0f, 1.0f, 0.0f},... | [
"c++",
"struct"
] | 2 | 2 | 1,621 | 4 | 0 | 2011-06-08T07:19:42.933000 | 2011-06-08T07:35:12.007000 |
6,275,417 | 6,275,603 | Best practices for customizing themes | What are the best practices for customizing themes for a WP7 application (font family, colours, etc)? Should I be sticking to the standard names and replacing them or creating new resource names and using those? ie. "PhoneFontFamilyNormal" or "MyAppFontFamilyNormal"? "PhoneTextNormalStyle" or "MyAppTextNormalStyle"? Th... | I would personally create my own resources with unique names and use those. This avoids any confusion relating to precedence (I can't recall right now the resource look-up mechanism in Silverlight, I know that it is a simplification of the WPF one - which is a little complex!). One important consideration is whether yo... | Best practices for customizing themes What are the best practices for customizing themes for a WP7 application (font family, colours, etc)? Should I be sticking to the standard names and replacing them or creating new resource names and using those? ie. "PhoneFontFamilyNormal" or "MyAppFontFamilyNormal"? "PhoneTextNorm... | TITLE:
Best practices for customizing themes
QUESTION:
What are the best practices for customizing themes for a WP7 application (font family, colours, etc)? Should I be sticking to the standard names and replacing them or creating new resource names and using those? ie. "PhoneFontFamilyNormal" or "MyAppFontFamilyNorma... | [
"windows-phone-7",
"themes"
] | 2 | 2 | 195 | 1 | 0 | 2011-06-08T07:20:22.543000 | 2011-06-08T07:37:57.227000 |
6,275,426 | 6,275,623 | I want to generate a image of UIScrollView? | In iPhone application I want to generate a image of UIScrollView whose content size is near about 600*41000. If I use current graphic image context to capture the scroll view layer, then it only captures the visible part of the scroll view not the whole layer of that scroll view. I am using the below code: { UIGraphics... | Try to generate image not from UIScrollView but from its content view. When you add some views to UIScrollView with something like addSubview: they become scroll's content ones. Of course, UIScrollView can have more than one content view (just as any UIView can have more than one subview) and this case it will be more ... | I want to generate a image of UIScrollView? In iPhone application I want to generate a image of UIScrollView whose content size is near about 600*41000. If I use current graphic image context to capture the scroll view layer, then it only captures the visible part of the scroll view not the whole layer of that scroll v... | TITLE:
I want to generate a image of UIScrollView?
QUESTION:
In iPhone application I want to generate a image of UIScrollView whose content size is near about 600*41000. If I use current graphic image context to capture the scroll view layer, then it only captures the visible part of the scroll view not the whole laye... | [
"iphone"
] | 0 | 0 | 1,455 | 1 | 0 | 2011-06-08T07:21:05.397000 | 2011-06-08T07:39:34.440000 |
6,275,429 | 6,275,519 | __DIR__ VS using Reflection | In Symfony2, I saw the code like below: if (null === $this->rootDir) { $r = new \ReflectionObject($this); $this->rootDir = dirname($r->getFileName()); } why not just use the __DIR__? if (null === $this->rootDir) { $this->rootDir = __DIR__; } What is difference between them? | __DIR__ returns the directory of the file where it is called. The Symphony2 code returns the directory of where the class is defined, which most likely is a different file. | __DIR__ VS using Reflection In Symfony2, I saw the code like below: if (null === $this->rootDir) { $r = new \ReflectionObject($this); $this->rootDir = dirname($r->getFileName()); } why not just use the __DIR__? if (null === $this->rootDir) { $this->rootDir = __DIR__; } What is difference between them? | TITLE:
__DIR__ VS using Reflection
QUESTION:
In Symfony2, I saw the code like below: if (null === $this->rootDir) { $r = new \ReflectionObject($this); $this->rootDir = dirname($r->getFileName()); } why not just use the __DIR__? if (null === $this->rootDir) { $this->rootDir = __DIR__; } What is difference between them?... | [
"php",
"symfony"
] | 3 | 5 | 763 | 4 | 0 | 2011-06-08T07:21:25.103000 | 2011-06-08T07:29:36.430000 |
6,275,430 | 6,275,520 | GWT Application loading time | I am using GWT 2.0.3 with ext version.When I run the application its take some time to load.As much as I know It take time to load some JS file (Not sure about it).For slow internet connection it wiil take more time. I want to know what exactly GWT application do while loading.If it is loading some JS file the is there... | When a GWT application loads, it loads all js files contained in your html host page, what means everything client side related is loaded. To optimize this GWT introduced code splitting some time ago. You can check it here. The basic idea is to divide your application in logical parts, when a user wants to access to an... | GWT Application loading time I am using GWT 2.0.3 with ext version.When I run the application its take some time to load.As much as I know It take time to load some JS file (Not sure about it).For slow internet connection it wiil take more time. I want to know what exactly GWT application do while loading.If it is load... | TITLE:
GWT Application loading time
QUESTION:
I am using GWT 2.0.3 with ext version.When I run the application its take some time to load.As much as I know It take time to load some JS file (Not sure about it).For slow internet connection it wiil take more time. I want to know what exactly GWT application do while loa... | [
"java",
"gwt",
"smartgwt"
] | 1 | 3 | 2,383 | 2 | 0 | 2011-06-08T07:21:36.927000 | 2011-06-08T07:29:40.687000 |
6,275,439 | 6,275,586 | c -> c# data types conversion when using native functions from dll | Is this list correct? unsigned int(c) -> uint(c#) const char*(c) -> String(c#) unsigned int*(c) -> uint[](c#) unsigned char*(c) -> byte[](c#) I think there's a mistake here because with these 4 parameters for native function I have PInvokeStackImbalance. C function is: bool something (unsigned char *a, unsigned int a_l... | First, PInvoke.net is your friend. Second, You conversions are correct except that you should use a StringBuilder for functions that take a char* as a buffer to fill ( [in out] ). Your stack imbalance may be due to the use of different calling conventions. The default calling convention for C# is __stdcall, but your C ... | c -> c# data types conversion when using native functions from dll Is this list correct? unsigned int(c) -> uint(c#) const char*(c) -> String(c#) unsigned int*(c) -> uint[](c#) unsigned char*(c) -> byte[](c#) I think there's a mistake here because with these 4 parameters for native function I have PInvokeStackImbalance... | TITLE:
c -> c# data types conversion when using native functions from dll
QUESTION:
Is this list correct? unsigned int(c) -> uint(c#) const char*(c) -> String(c#) unsigned int*(c) -> uint[](c#) unsigned char*(c) -> byte[](c#) I think there's a mistake here because with these 4 parameters for native function I have PIn... | [
"c#",
"types",
"pinvoke"
] | 0 | 2 | 2,780 | 1 | 0 | 2011-06-08T07:22:13.533000 | 2011-06-08T07:36:59.153000 |
6,275,446 | 6,275,482 | View code for email validation | I have an 'account' view, where a user can change his email, name, and password. For changing his email, he has to confirm his email address by clicking a confirmation link. My view code looks pretty bloated, and I was wondering how I could improve it and make it more concise. Here is what I currently have -- In the mo... | Well, you could start out by splitting up the code into several views. like def change_email(request, user_id): and def change_password(request, user_id): and so on, instead of having one account view. | View code for email validation I have an 'account' view, where a user can change his email, name, and password. For changing his email, he has to confirm his email address by clicking a confirmation link. My view code looks pretty bloated, and I was wondering how I could improve it and make it more concise. Here is wha... | TITLE:
View code for email validation
QUESTION:
I have an 'account' view, where a user can change his email, name, and password. For changing his email, he has to confirm his email address by clicking a confirmation link. My view code looks pretty bloated, and I was wondering how I could improve it and make it more co... | [
"django",
"django-views"
] | 0 | 5 | 213 | 1 | 0 | 2011-06-08T07:22:58.613000 | 2011-06-08T07:26:36.643000 |
6,275,455 | 6,276,633 | re.pl: Variable not properly scoped inside block | Example: ~ $ re.pl $ { my $abc = 10; $abc } 10 $ $abc 10 $ Is this a documented gotcha? | This appears to be a bug in Lexical::Persistence, which Devel::REPL uses to manage the lexical environment persisting across multiple eval s. Here's a demonstration of the bug without Devel::REPL. This code incorrectly produces the value of $abc, 10, even though it's in an inner scope. use strict; use warnings; use Lex... | re.pl: Variable not properly scoped inside block Example: ~ $ re.pl $ { my $abc = 10; $abc } 10 $ $abc 10 $ Is this a documented gotcha? | TITLE:
re.pl: Variable not properly scoped inside block
QUESTION:
Example: ~ $ re.pl $ { my $abc = 10; $abc } 10 $ $abc 10 $ Is this a documented gotcha?
ANSWER:
This appears to be a bug in Lexical::Persistence, which Devel::REPL uses to manage the lexical environment persisting across multiple eval s. Here's a demon... | [
"perl",
"read-eval-print-loop"
] | 3 | 6 | 175 | 4 | 0 | 2011-06-08T07:24:00.023000 | 2011-06-08T09:21:59.913000 |
6,275,459 | 6,275,640 | List all stopped application pools in an IIS6 farm | I'd like to print only those IIS6 pools that are stopped or stopping (have an AppPoolState of 3 or 4). If everything else is fine (all started), just print out "OK". I'm not sure for a simple way to check all of them. I've tried to loop through app pools checking each state one by one, but it looks a bit complicated an... | You can check if there are any items in a collection like this: $stoppedPools = $iispools | where { $_.apppoolstate -ge 3 } if (!$stoppedPools) { write-host "OK" } else { # print stopped/stopping pools here $stoppedPools | convertto-html -fragment } | List all stopped application pools in an IIS6 farm I'd like to print only those IIS6 pools that are stopped or stopping (have an AppPoolState of 3 or 4). If everything else is fine (all started), just print out "OK". I'm not sure for a simple way to check all of them. I've tried to loop through app pools checking each ... | TITLE:
List all stopped application pools in an IIS6 farm
QUESTION:
I'd like to print only those IIS6 pools that are stopped or stopping (have an AppPoolState of 3 or 4). If everything else is fine (all started), just print out "OK". I'm not sure for a simple way to check all of them. I've tried to loop through app po... | [
"scripting",
"powershell",
"iis-6",
"adsi"
] | 2 | 2 | 1,083 | 1 | 0 | 2011-06-08T07:24:49.020000 | 2011-06-08T07:42:11.397000 |
6,275,483 | 6,275,510 | how do i make users to download jpg files | i need to make users download jpg files. i know that if i send them the link to the jpg file, the browser will just display the jpg file. Then the user must do rightclick -> save picture as However, i want to force the download dialog box to appear so that they can download the jpg file. Anyone can help me with that? | You need to set the correct headers in your PHP script that serves the image to the user header("Cache-Control: public"); header("Content-Description: File Transfer"); header("Content-Disposition: attachment; filename=$file"); header("Content-Type: image/jpg"); header("Content-Transfer-Encoding: binary");
//read image... | how do i make users to download jpg files i need to make users download jpg files. i know that if i send them the link to the jpg file, the browser will just display the jpg file. Then the user must do rightclick -> save picture as However, i want to force the download dialog box to appear so that they can download the... | TITLE:
how do i make users to download jpg files
QUESTION:
i need to make users download jpg files. i know that if i send them the link to the jpg file, the browser will just display the jpg file. Then the user must do rightclick -> save picture as However, i want to force the download dialog box to appear so that the... | [
"php",
"network-programming"
] | 0 | 4 | 281 | 1 | 0 | 2011-06-08T07:26:39.660000 | 2011-06-08T07:28:47.990000 |
6,275,497 | 6,276,482 | jQuery/javascript - Input fields (user,pass) just like twitter's login? | How can I achieve the same effect like twitter's log-in form (the top on the right) - when you click on the username/pass the value "username" stays there until you enter text? Also it's a bit dimmed. Thank you! | I've coded a plugin to do this, couldn't find any that use the twitter-like div default value. See working fiddle: http://jsfiddle.net/garreh/nCCPQ/2/ jQuery: $.defaultText plugin // Basic Usage: $('input').defaultText({ text: 'Username' });
// Provide a class to use: $('input').defaultText({ text: 'Email address', cs... | jQuery/javascript - Input fields (user,pass) just like twitter's login? How can I achieve the same effect like twitter's log-in form (the top on the right) - when you click on the username/pass the value "username" stays there until you enter text? Also it's a bit dimmed. Thank you! | TITLE:
jQuery/javascript - Input fields (user,pass) just like twitter's login?
QUESTION:
How can I achieve the same effect like twitter's log-in form (the top on the right) - when you click on the username/pass the value "username" stays there until you enter text? Also it's a bit dimmed. Thank you!
ANSWER:
I've code... | [
"javascript",
"jquery",
"css"
] | 2 | 4 | 2,722 | 6 | 0 | 2011-06-08T07:27:44.780000 | 2011-06-08T09:05:28.843000 |
6,275,499 | 6,275,545 | XAMPP don't know how to restart | I want to restart it because I made some changes in the php.ini to adjust the max_file_size. I need to restart it so that it will take effect however I can't find the command in the XAMPP control panel. I tried to search in Google I can't find the right answer. By the way, I am using XAMPP 1.7.4 in Windows Vista. | In the version I am using, from the control panel just click the stop button for the given app and then the start button. | XAMPP don't know how to restart I want to restart it because I made some changes in the php.ini to adjust the max_file_size. I need to restart it so that it will take effect however I can't find the command in the XAMPP control panel. I tried to search in Google I can't find the right answer. By the way, I am using XAM... | TITLE:
XAMPP don't know how to restart
QUESTION:
I want to restart it because I made some changes in the php.ini to adjust the max_file_size. I need to restart it so that it will take effect however I can't find the command in the XAMPP control panel. I tried to search in Google I can't find the right answer. By the w... | [
"xampp"
] | 23 | 4 | 86,594 | 9 | 0 | 2011-06-08T07:28:00.927000 | 2011-06-08T07:33:26.703000 |
6,275,500 | 6,275,701 | How do I get the top 1 of a linked table? | Ok, so say I have two tables. Question questionID QuestionDescription Answer AnswerID QuestionID AnswerDescription CreatedDate And say I want to create a query which returns the question and latest created answer like these columns QuestionID QuestionName AnswerDescription CreatedDate Is that possible? I can do a query... | To get per question, SQL Server 2005+ SELECT q.QuestionID, q.QuestionName, a.AnswerDescription, a.CreatedDate FROM QUESTION q CROSS APPLY ( SELECT TOP 1 a2.AnswerDescription, a2.CreatedDate FROM ANSWER a2 WHERE q.questionID = a2.QuestionID ORDER BY a2.CreatedDate DESC ) a | How do I get the top 1 of a linked table? Ok, so say I have two tables. Question questionID QuestionDescription Answer AnswerID QuestionID AnswerDescription CreatedDate And say I want to create a query which returns the question and latest created answer like these columns QuestionID QuestionName AnswerDescription Crea... | TITLE:
How do I get the top 1 of a linked table?
QUESTION:
Ok, so say I have two tables. Question questionID QuestionDescription Answer AnswerID QuestionID AnswerDescription CreatedDate And say I want to create a query which returns the question and latest created answer like these columns QuestionID QuestionName Answ... | [
"sql",
"t-sql"
] | 1 | 4 | 132 | 3 | 0 | 2011-06-08T07:28:02.970000 | 2011-06-08T07:47:07.490000 |
6,275,508 | 6,275,618 | UINavigationBar question | I added a UINavigationBar to my UIView I am trying to set its title, and its leftbar byut it failed I use the following code self.title = @"Edit Table "; UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithTitle:@"Edit" style:UIBarButtonItemStyleBordered target:self action:@selector(EditTable:)]; [self.naviga... | Update Call this View using [self.navigationController pushViewController:self.NodeSelection animated:YES]; You can change the title of NavigationBar using this self.navigationItem.title = @"Hello"; and For leftBarButton your code is right. Second Update For return to parent screen [self.navigationController popViewCon... | UINavigationBar question I added a UINavigationBar to my UIView I am trying to set its title, and its leftbar byut it failed I use the following code self.title = @"Edit Table "; UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithTitle:@"Edit" style:UIBarButtonItemStyleBordered target:self action:@selector(E... | TITLE:
UINavigationBar question
QUESTION:
I added a UINavigationBar to my UIView I am trying to set its title, and its leftbar byut it failed I use the following code self.title = @"Edit Table "; UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithTitle:@"Edit" style:UIBarButtonItemStyleBordered target:self ... | [
"iphone",
"ios",
"ipad"
] | 0 | 2 | 110 | 2 | 0 | 2011-06-08T07:28:38.313000 | 2011-06-08T07:39:00.583000 |
6,275,509 | 6,282,850 | Getting Groups which are Communities in Liferay | I am trying to get all the groups which are communities in Liferay 5.2.x version. Currently I am doing the following. 1) List groups = GroupLocalServiceUtil.getGroups(0, groupCount) --> Get all the existing groups 2) Iterate over the groups list to check if the group is a community by using group.isCommunity(). Please ... | I would use: GroupLocalServiceUtil.search( long companyId, String name, String description, LinkedHashMap params, int start, int end) With name, description having a blank string passed. Params being null or an empty LinkedHashMap. Start and end being what every you desire (passing -1 to both will get the entire set). ... | Getting Groups which are Communities in Liferay I am trying to get all the groups which are communities in Liferay 5.2.x version. Currently I am doing the following. 1) List groups = GroupLocalServiceUtil.getGroups(0, groupCount) --> Get all the existing groups 2) Iterate over the groups list to check if the group is a... | TITLE:
Getting Groups which are Communities in Liferay
QUESTION:
I am trying to get all the groups which are communities in Liferay 5.2.x version. Currently I am doing the following. 1) List groups = GroupLocalServiceUtil.getGroups(0, groupCount) --> Get all the existing groups 2) Iterate over the groups list to check... | [
"liferay"
] | 0 | 0 | 3,151 | 1 | 0 | 2011-06-08T07:28:45.303000 | 2011-06-08T17:33:50.387000 |
6,275,511 | 6,279,985 | Any sample for iCloud? | iCloud is coming to us. As iOS developer, after reading this, I just wonder if there are any samples for this new tech. Thanks | Download the beta Xcode and check in the docs (after downloading them) for "What's new", there's an overview there. | Any sample for iCloud? iCloud is coming to us. As iOS developer, after reading this, I just wonder if there are any samples for this new tech. Thanks | TITLE:
Any sample for iCloud?
QUESTION:
iCloud is coming to us. As iOS developer, after reading this, I just wonder if there are any samples for this new tech. Thanks
ANSWER:
Download the beta Xcode and check in the docs (after downloading them) for "What's new", there's an overview there. | [
"sample",
"ios5",
"icloud"
] | 1 | 2 | 6,403 | 3 | 0 | 2011-06-08T07:28:54.243000 | 2011-06-08T14:04:56.143000 |
6,275,515 | 6,275,613 | Javascript Uncaught ReferenceError: Class is not defined | I am trying to implement a moving photo slider that is no jQuery, it uses moo tools I want a slider like this guy http://mahusay-fbt.blogspot.com/ So I got that piece of code that is specifically designed for blogger here bit.ly/chXo9Q I implemented it on my dummy blog and it ain't working This is the error i get Uncau... | Your packed version of mootools is not quite right. You should replace it. | Javascript Uncaught ReferenceError: Class is not defined I am trying to implement a moving photo slider that is no jQuery, it uses moo tools I want a slider like this guy http://mahusay-fbt.blogspot.com/ So I got that piece of code that is specifically designed for blogger here bit.ly/chXo9Q I implemented it on my dumm... | TITLE:
Javascript Uncaught ReferenceError: Class is not defined
QUESTION:
I am trying to implement a moving photo slider that is no jQuery, it uses moo tools I want a slider like this guy http://mahusay-fbt.blogspot.com/ So I got that piece of code that is specifically designed for blogger here bit.ly/chXo9Q I impleme... | [
"javascript",
"mootools",
"blogger"
] | 1 | 5 | 6,609 | 1 | 0 | 2011-06-08T07:29:17 | 2011-06-08T07:38:45.930000 |
6,275,517 | 6,275,905 | Luke-Lucene Index Tool for searching | I have a scenario to search. for that i am using Lucene Index Tool. so how can i make a query with less than or greater than conditions. presently it is taking only OR, AND. | From the website http://lucene.apache.org/java/3_2_0/queryparsersyntax.html, luncene is not support less than or greater than conditions. Maybe Range Searches will do it. | Luke-Lucene Index Tool for searching I have a scenario to search. for that i am using Lucene Index Tool. so how can i make a query with less than or greater than conditions. presently it is taking only OR, AND. | TITLE:
Luke-Lucene Index Tool for searching
QUESTION:
I have a scenario to search. for that i am using Lucene Index Tool. so how can i make a query with less than or greater than conditions. presently it is taking only OR, AND.
ANSWER:
From the website http://lucene.apache.org/java/3_2_0/queryparsersyntax.html, lunce... | [
"lucene"
] | 0 | 0 | 777 | 1 | 0 | 2011-06-08T07:29:25.777000 | 2011-06-08T08:08:48.283000 |
6,275,521 | 6,275,919 | Additions of tabbar and navigation bar controllers | Hii... I have added the tabbar and navigation bar controller by using following code. But only on the first tab I have added table view and buttons but it is also displaying on others tab views. What is the problem with this code I am not able to come to know. please help me If anyone know. - (BOOL)application:(UIAppli... | You are allocating the same viewcontroller controller for each button except the second one, that is bound to a viewcontroller1 instance. Maybe this could be the problem. If you are adding the table view and buttons to the viewcontroller instances, maybe in the viewDidLoad method, this could be the cause. | Additions of tabbar and navigation bar controllers Hii... I have added the tabbar and navigation bar controller by using following code. But only on the first tab I have added table view and buttons but it is also displaying on others tab views. What is the problem with this code I am not able to come to know. please h... | TITLE:
Additions of tabbar and navigation bar controllers
QUESTION:
Hii... I have added the tabbar and navigation bar controller by using following code. But only on the first tab I have added table view and buttons but it is also displaying on others tab views. What is the problem with this code I am not able to come... | [
"iphone"
] | 0 | 0 | 184 | 1 | 0 | 2011-06-08T07:29:43.850000 | 2011-06-08T08:10:37.557000 |
6,275,527 | 6,275,637 | Eclipse android emulator doesn't close when 'x' is pressed | I just reinstalled the new version of Ubuntu, and afterwards eclipse + android sdk and AVD. Now, when I create a new emulator, after it loads, if I press the ' x ' button, both the emulator and eclipse freeze. Even if I close the emulator in task manager, eclipse still tells me that I haven't closed that emulator. I fi... | Yet not meet this problem. What's the version of your eclipse? You'd better use RCP eclipse for android development. The URL for RCP eclipse: eclipse-rcp-and-rap-developers | Eclipse android emulator doesn't close when 'x' is pressed I just reinstalled the new version of Ubuntu, and afterwards eclipse + android sdk and AVD. Now, when I create a new emulator, after it loads, if I press the ' x ' button, both the emulator and eclipse freeze. Even if I close the emulator in task manager, eclip... | TITLE:
Eclipse android emulator doesn't close when 'x' is pressed
QUESTION:
I just reinstalled the new version of Ubuntu, and afterwards eclipse + android sdk and AVD. Now, when I create a new emulator, after it loads, if I press the ' x ' button, both the emulator and eclipse freeze. Even if I close the emulator in t... | [
"android",
"emulation",
"shutdown"
] | 1 | 2 | 1,104 | 1 | 0 | 2011-06-08T07:30:44.273000 | 2011-06-08T07:41:54.093000 |
6,275,535 | 6,275,627 | PHP error: php_network_getaddresses: getaddrinfo failed: (while getting information from other site.) | Trying to get information from an external source, I'm receiving the following error: Warning: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in line #... Yesterday everything was fine, so what happened to this script, which is not working and gives me the error above? Any solution o... | It's because you can't resolve the host name Maybe DNS problems, host is unreachable... try to use IP address instead of host name... ping this host name... nslookup it... | PHP error: php_network_getaddresses: getaddrinfo failed: (while getting information from other site.) Trying to get information from an external source, I'm receiving the following error: Warning: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in line #... Yesterday everything was fi... | TITLE:
PHP error: php_network_getaddresses: getaddrinfo failed: (while getting information from other site.)
QUESTION:
Trying to get information from an external source, I'm receiving the following error: Warning: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in line #... Yesterday... | [
"php",
"warnings"
] | 52 | 49 | 279,078 | 14 | 0 | 2011-06-08T07:31:25.393000 | 2011-06-08T07:40:01.427000 |
6,275,536 | 6,275,811 | Explain this ColorBox code in detail | I am trying to learn the real nitty gritty details of Javascript, so I would appreciate it if someone could explain this code for me. In ColorBox, the author defines his public method as so: publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback) { // do stuff... }; Other public methods are then defi... | In JavaScript each object is an associative array at the same time, object properties are also array keys. This means that obj.prop = 1 and obj["prop"] = 1 are exactly the same thing. Also, methods are simply properties that have a function as their value. So $["colorbox"] = function() {...} creates an anonymous functi... | Explain this ColorBox code in detail I am trying to learn the real nitty gritty details of Javascript, so I would appreciate it if someone could explain this code for me. In ColorBox, the author defines his public method as so: publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback) { // do stuff... ... | TITLE:
Explain this ColorBox code in detail
QUESTION:
I am trying to learn the real nitty gritty details of Javascript, so I would appreciate it if someone could explain this code for me. In ColorBox, the author defines his public method as so: publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback)... | [
"javascript",
"jquery",
"jquery-plugins"
] | 3 | 3 | 430 | 3 | 0 | 2011-06-08T07:31:37.397000 | 2011-06-08T07:58:52.357000 |
6,275,540 | 6,275,564 | Send Parameter When Redirecting to a new page | I get a userId in the Default page, where I connect to the database(Oracle if it's interesting).I want to keep this userId and use it in the pages I open. I need it to compare with a combobox SelectedItem.Value. And this combobox is found almost in all the pages in the web site.How can I send this UserId as a parameter... | You can send it as a querystring parameter, but the best way to keep the value in memory is with a session variable | Send Parameter When Redirecting to a new page I get a userId in the Default page, where I connect to the database(Oracle if it's interesting).I want to keep this userId and use it in the pages I open. I need it to compare with a combobox SelectedItem.Value. And this combobox is found almost in all the pages in the web ... | TITLE:
Send Parameter When Redirecting to a new page
QUESTION:
I get a userId in the Default page, where I connect to the database(Oracle if it's interesting).I want to keep this userId and use it in the pages I open. I need it to compare with a combobox SelectedItem.Value. And this combobox is found almost in all the... | [
"asp.net",
"parameters"
] | 1 | 1 | 122 | 7 | 0 | 2011-06-08T07:32:19.233000 | 2011-06-08T07:35:23.880000 |
6,275,550 | 6,276,397 | How to add the cells in the table view like this in the image? | Hi all I want to add the cell in the table view as one touches on the row or section.I tried this by taking the sections and then clicking on the section will change the height of cell.But thats not working fine. Here are the images,that i want to accomplish Thanks in advance for everyone...... | This is not exact answer...but you can use this approach You don't need to have sections.It can be don using custom cell with UILable & Uibutton(for +) On button clicked event -(IBAction)ShowDetails:(id)sender { [UITableView beginAnimations:nil context:NULL]; [UITableView setAnimationDuration:.5]; [UITableView setAnima... | How to add the cells in the table view like this in the image? Hi all I want to add the cell in the table view as one touches on the row or section.I tried this by taking the sections and then clicking on the section will change the height of cell.But thats not working fine. Here are the images,that i want to accomplis... | TITLE:
How to add the cells in the table view like this in the image?
QUESTION:
Hi all I want to add the cell in the table view as one touches on the row or section.I tried this by taking the sections and then clicking on the section will change the height of cell.But thats not working fine. Here are the images,that i... | [
"iphone",
"uitableview"
] | 0 | 0 | 203 | 2 | 0 | 2011-06-08T07:33:56.970000 | 2011-06-08T08:58:12.887000 |
6,275,557 | 6,275,741 | Where to put business logic for two related objects? | Suppose I have two entities: User and UserGroup. They have a one-to-many relationship => each UserGroup virtually contains 0 to n number of users. If I want to retrieve the users for a UserGroup where in my business layer would be a better class to put that method? In UserManager, add method: GetAllUsersForUserGroup in... | Of course it's difficult to give an opinion without knowing exactly how the managers and the clients of the managers are structured and what methods they already offer. Assuming the managers are simple DAOs with CRUD operations for the basic entity operations I'd think about having a higher level UserRepository or User... | Where to put business logic for two related objects? Suppose I have two entities: User and UserGroup. They have a one-to-many relationship => each UserGroup virtually contains 0 to n number of users. If I want to retrieve the users for a UserGroup where in my business layer would be a better class to put that method? I... | TITLE:
Where to put business logic for two related objects?
QUESTION:
Suppose I have two entities: User and UserGroup. They have a one-to-many relationship => each UserGroup virtually contains 0 to n number of users. If I want to retrieve the users for a UserGroup where in my business layer would be a better class to ... | [
"c#",
"architecture",
"business-logic",
"business-logic-layer"
] | 2 | 4 | 1,393 | 5 | 0 | 2011-06-08T07:34:48.130000 | 2011-06-08T07:51:30.283000 |
6,275,558 | 6,275,617 | Question about while(!EOF) | Im reading in values from stdin and I want to keep reading the file until I have completed reading it all the way, so I am using while(!EOF){ scanf(...) } However, the code fragment doesn't seem to do anything, while(!EOF){
scanf("%d %d %d %d", &imageWidth, &imageHeight, &safeRegionStart, &safeRegionWidth);
printf("-... | EOF is only an integer constant. On most systems it is -1.!-1 is false and while(false) won't do anything. What you want is to check the return values of scanf. scanf returns the number of successfully read items and eventually EOF. | Question about while(!EOF) Im reading in values from stdin and I want to keep reading the file until I have completed reading it all the way, so I am using while(!EOF){ scanf(...) } However, the code fragment doesn't seem to do anything, while(!EOF){
scanf("%d %d %d %d", &imageWidth, &imageHeight, &safeRegionStart, &s... | TITLE:
Question about while(!EOF)
QUESTION:
Im reading in values from stdin and I want to keep reading the file until I have completed reading it all the way, so I am using while(!EOF){ scanf(...) } However, the code fragment doesn't seem to do anything, while(!EOF){
scanf("%d %d %d %d", &imageWidth, &imageHeight, &s... | [
"c",
"stdin",
"eof"
] | 1 | 8 | 20,235 | 4 | 0 | 2011-06-08T07:34:52.680000 | 2011-06-08T07:38:59.413000 |
6,275,572 | 6,276,518 | what library shall i use to send email by ruby | Now i want to write one app which send emails millions each day by ruby, now i know there is some options such as net::smtp and actionmailer, maybe others, could someone recommend one better library so that i can use it to finish my task. Thank you in advance. | I would suggest using the mail gem. ActionMailer in rails 3 uses it under the hood and it works with 1.9.2 and jruby and there is loads of good documentation here: https://github.com/mikel/mail Code example: Mail.deliver do from 'me@test.lindsaar.net' to 'you@test.lindsaar.net' subject 'Here is the image you wanted' bo... | what library shall i use to send email by ruby Now i want to write one app which send emails millions each day by ruby, now i know there is some options such as net::smtp and actionmailer, maybe others, could someone recommend one better library so that i can use it to finish my task. Thank you in advance. | TITLE:
what library shall i use to send email by ruby
QUESTION:
Now i want to write one app which send emails millions each day by ruby, now i know there is some options such as net::smtp and actionmailer, maybe others, could someone recommend one better library so that i can use it to finish my task. Thank you in adv... | [
"ruby-on-rails",
"ruby",
"email",
"email-client"
] | 0 | 7 | 2,707 | 2 | 0 | 2011-06-08T07:36:03.117000 | 2011-06-08T09:09:08.530000 |
6,275,579 | 6,275,850 | how to delete exe file MAINICON | How can I delete the MAINICON resource entry in exe file(s)? Instead of changing the main icon of a given exe file, I want to delete the main icon, thus, it takes the default windows exe icon. I already know that this API function UpdateResource can change the MAINICON ( actually can change any resource) but how to del... | UpdateResource can add, modify and delete a resource. If lpData is NULL and cbData is 0, the specified resource is deleted from the file indicated by hUpdate. | how to delete exe file MAINICON How can I delete the MAINICON resource entry in exe file(s)? Instead of changing the main icon of a given exe file, I want to delete the main icon, thus, it takes the default windows exe icon. I already know that this API function UpdateResource can change the MAINICON ( actually can cha... | TITLE:
how to delete exe file MAINICON
QUESTION:
How can I delete the MAINICON resource entry in exe file(s)? Instead of changing the main icon of a given exe file, I want to delete the main icon, thus, it takes the default windows exe icon. I already know that this API function UpdateResource can change the MAINICON ... | [
"delphi",
"winapi",
"resources"
] | 6 | 7 | 1,011 | 1 | 0 | 2011-06-08T07:36:31.323000 | 2011-06-08T08:02:11.643000 |
6,275,584 | 6,276,008 | SH_DENY* equivalent in Solaris | Solaris equivalent to fcntl.h and share.h I am porting a big C++ project from Windows/VS to Solaris/Eclipse/gcc. The Windows code uses _SH_DENYNO etc which are in a Microsoft file share.h. The same file on the Sun at /usr/include/sys does not contain these, nor does any other I can find. I suppose they have another nam... | I think solaris, like other unix, is always _SH_DENYNO. You need explicit locking of files, try lockf or fcntl. | SH_DENY* equivalent in Solaris Solaris equivalent to fcntl.h and share.h I am porting a big C++ project from Windows/VS to Solaris/Eclipse/gcc. The Windows code uses _SH_DENYNO etc which are in a Microsoft file share.h. The same file on the Sun at /usr/include/sys does not contain these, nor does any other I can find. ... | TITLE:
SH_DENY* equivalent in Solaris
QUESTION:
Solaris equivalent to fcntl.h and share.h I am porting a big C++ project from Windows/VS to Solaris/Eclipse/gcc. The Windows code uses _SH_DENYNO etc which are in a Microsoft file share.h. The same file on the Sun at /usr/include/sys does not contain these, nor does any ... | [
"c++",
"gcc",
"porting"
] | 3 | 3 | 1,090 | 1 | 0 | 2011-06-08T07:36:51.023000 | 2011-06-08T08:19:51.893000 |
6,275,597 | 6,275,629 | How web page automatically identify country? | I am working in ASP.net and C#. Currently i am designing a signup page for my web application. On that page there is a field "Country", user can specify his country using drop-down list. Now i want to automatically detect user's country and then pre select that country in drop-down list. How do i identify user country. | You need some kind of IP geolocation database to map the users IP address to a country. There are plenty of services and data files online, just google for geo IP lookup. EDIT just did a quick google for you this should give you the data you need. | How web page automatically identify country? I am working in ASP.net and C#. Currently i am designing a signup page for my web application. On that page there is a field "Country", user can specify his country using drop-down list. Now i want to automatically detect user's country and then pre select that country in dr... | TITLE:
How web page automatically identify country?
QUESTION:
I am working in ASP.net and C#. Currently i am designing a signup page for my web application. On that page there is a field "Country", user can specify his country using drop-down list. Now i want to automatically detect user's country and then pre select ... | [
"c#",
"asp.net",
"geolocation",
"country"
] | 1 | 4 | 1,471 | 2 | 0 | 2011-06-08T07:37:41.853000 | 2011-06-08T07:40:14.330000 |
6,275,616 | 6,275,653 | Keeping a session when using HttpWebRequest | In my project I'm using C# app client and tomcat6 web application server. I wrote this snippet in the C# client: public bool isServerOnline() { Boolean ret = false;
try { HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(VPMacro.MacroUploader.SERVER_URL); req.Method = "HEAD"; req.KeepAlive = false; HttpWebRes... | You must use a CookieContainer and keep the instance between calls. private CookieContainer cookieContainer = new CookieContainer(); public bool isServerOnline() { Boolean ret = false;
try { HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(VPMacro.MacroUploader.SERVER_URL); req.CookieContainer = cookieContai... | Keeping a session when using HttpWebRequest In my project I'm using C# app client and tomcat6 web application server. I wrote this snippet in the C# client: public bool isServerOnline() { Boolean ret = false;
try { HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(VPMacro.MacroUploader.SERVER_URL); req.Method... | TITLE:
Keeping a session when using HttpWebRequest
QUESTION:
In my project I'm using C# app client and tomcat6 web application server. I wrote this snippet in the C# client: public bool isServerOnline() { Boolean ret = false;
try { HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(VPMacro.MacroUploader.SERVE... | [
"c#",
"httpwebrequest",
"session-cookies"
] | 9 | 27 | 28,287 | 1 | 0 | 2011-06-08T07:38:54.923000 | 2011-06-08T07:43:25.247000 |
6,275,619 | 6,275,647 | ASP.NET MVC 3 : Validation get message list | I have this: public class Customer { [DisplayName("Lastname"), StringLength(50)] [Required(ErrorMessage="My Error Message")] [NotEmpty()] public override string LastName { get; set; }
[DisplayName("Firstname"), StringLength(50)] [Required(ErrorMessage="My Error Message 2")] [NotEmpty()] public override string FirstNam... | You could get a list of all errors with their respective field and message like this: var errors = ModelState.Where(x => x.Value.Errors.Count > 0).Select(x => new { x.Key, x.Value.Errors }).ToArray(); | ASP.NET MVC 3 : Validation get message list I have this: public class Customer { [DisplayName("Lastname"), StringLength(50)] [Required(ErrorMessage="My Error Message")] [NotEmpty()] public override string LastName { get; set; }
[DisplayName("Firstname"), StringLength(50)] [Required(ErrorMessage="My Error Message 2")] ... | TITLE:
ASP.NET MVC 3 : Validation get message list
QUESTION:
I have this: public class Customer { [DisplayName("Lastname"), StringLength(50)] [Required(ErrorMessage="My Error Message")] [NotEmpty()] public override string LastName { get; set; }
[DisplayName("Firstname"), StringLength(50)] [Required(ErrorMessage="My E... | [
"asp.net-mvc",
"validation"
] | 7 | 16 | 4,097 | 1 | 0 | 2011-06-08T07:39:03.677000 | 2011-06-08T07:42:56.253000 |
6,275,620 | 6,275,731 | How to create Virtual Host from Apache .htaccess? | I am using Apache Friends XAMPP in Windows (Local Server). I setup the virtual host in httpd-vhosts.conf in an Apache configuration directory like this NameVirtualHost *:80 ServerName test.example.com DocumentRoot "E:\xampp\htdocs\example" This works fine when I browse the URL http://test.example.com Is it possible to ... | The context for VirtualHost has to be server config. See the Apache docs. This means that the directive may be used in the server configuration files (e.g., httpd.conf), but not within any or containers. It is not allowed in.htaccess files at all. ( Directive Dictionary ) | How to create Virtual Host from Apache .htaccess? I am using Apache Friends XAMPP in Windows (Local Server). I setup the virtual host in httpd-vhosts.conf in an Apache configuration directory like this NameVirtualHost *:80 ServerName test.example.com DocumentRoot "E:\xampp\htdocs\example" This works fine when I browse ... | TITLE:
How to create Virtual Host from Apache .htaccess?
QUESTION:
I am using Apache Friends XAMPP in Windows (Local Server). I setup the virtual host in httpd-vhosts.conf in an Apache configuration directory like this NameVirtualHost *:80 ServerName test.example.com DocumentRoot "E:\xampp\htdocs\example" This works f... | [
"apache",
".htaccess",
"mod-rewrite",
"url-rewriting",
"virtualhost"
] | 7 | 7 | 11,634 | 2 | 0 | 2011-06-08T07:39:14.443000 | 2011-06-08T07:50:55.767000 |
6,275,649 | 6,275,896 | iOS-FBConnect - requests results crash the app if the delegate of them released | I'm developing an iOS app and views create a request for their data, now if the user dismiss the view, it's released and when the FBConnect call: if ([_delegate respondsToSelector: @selector(request:didReceiveResponse:)]) { [_delegate request:self didReceiveResponse:httpResponse]; } the app is crashed... Any solution f... | Try using a higher-level controller as delegate, e.g. the main view controller, or the app delegate itself. This way you will always be sure that that component will not be released while the app is running. | iOS-FBConnect - requests results crash the app if the delegate of them released I'm developing an iOS app and views create a request for their data, now if the user dismiss the view, it's released and when the FBConnect call: if ([_delegate respondsToSelector: @selector(request:didReceiveResponse:)]) { [_delegate reque... | TITLE:
iOS-FBConnect - requests results crash the app if the delegate of them released
QUESTION:
I'm developing an iOS app and views create a request for their data, now if the user dismiss the view, it's released and when the FBConnect call: if ([_delegate respondsToSelector: @selector(request:didReceiveResponse:)]) ... | [
"iphone",
"ios",
"delegates",
"facebook",
"fbconnect"
] | 1 | 2 | 439 | 2 | 0 | 2011-06-08T07:42:57.843000 | 2011-06-08T08:07:46.497000 |
6,275,658 | 6,275,713 | conditionals in javascript based on page currently showing | because of some problems with joomla "in-content javascript" I have to give all my js logic to one file, but there are problems with inconsistence of dom elements across my site (it is ajax driven, so there is only one script and various DOMs). What is the best solution to make some conditionals solving this problem.. ... | var $obj = $('selector'); if ($obj.length) { makeSomething(); } Actually, this is only meaningful if you are searching for the existence of a certain element (that might identify a whole page) and running several operations based on that. If you just want to do something on the elements like $('selector').append('x'); ... | conditionals in javascript based on page currently showing because of some problems with joomla "in-content javascript" I have to give all my js logic to one file, but there are problems with inconsistence of dom elements across my site (it is ajax driven, so there is only one script and various DOMs). What is the best... | TITLE:
conditionals in javascript based on page currently showing
QUESTION:
because of some problems with joomla "in-content javascript" I have to give all my js logic to one file, but there are problems with inconsistence of dom elements across my site (it is ajax driven, so there is only one script and various DOMs)... | [
"javascript",
"jquery",
"jquery-selectors"
] | 1 | 0 | 54 | 1 | 0 | 2011-06-08T07:43:41.290000 | 2011-06-08T07:49:04.503000 |
6,275,664 | 6,275,709 | Html.ActionLink creates links containing parameters from current page | I’ve got the following code (from a partial view), which creates a list of links enabling me to filter the items listed within my index page according to the letter they begin with: @{ string letters = "abcdefghijklmnopqrstuvwxyz"; } @Html.ActionLink("0–9", "Index") @foreach (char c in letters.ToCharArray()) { @Html.Ac... | Make only one route and set the {letter} parameter as optional. routes.MapRoute( "artists", "artists/{letter}", new { controller = "Artist", action = "Index", letter = UrlParameter.Optional }, new { letter = "[a-z]" } ); EDIT: Have a look at this post. EDIT2: Another possible solution would be: routes.MapRoute( "artist... | Html.ActionLink creates links containing parameters from current page I’ve got the following code (from a partial view), which creates a list of links enabling me to filter the items listed within my index page according to the letter they begin with: @{ string letters = "abcdefghijklmnopqrstuvwxyz"; } @Html.ActionLink... | TITLE:
Html.ActionLink creates links containing parameters from current page
QUESTION:
I’ve got the following code (from a partial view), which creates a list of links enabling me to filter the items listed within my index page according to the letter they begin with: @{ string letters = "abcdefghijklmnopqrstuvwxyz"; ... | [
"c#",
"asp.net-mvc-3"
] | 1 | 1 | 1,502 | 1 | 0 | 2011-06-08T07:43:57.930000 | 2011-06-08T07:48:07.023000 |
6,275,665 | 6,275,750 | File.Listfile() force closes (NullPointerException) | I have a weird problem where, the first time you start the app, it works well, the 2nd time it crashes, the 3rd works, the 4th crashes and so on.. Here is the logcat: E/AndroidRuntime(18039): FATAL EXCEPTION: main E/AndroidRuntime(18039): java.lang.RuntimeException: Unable to start activity Co mponentInfo{omar.quran1/o... | First off, Since you are checking if f is null, instead, check if f.exists(). Because if that doesn't exist, then there is no way that it can list anything, thus it would be null, which would be causing your exception. This isn't exactly an answer to your question, but try that and see what happens, and post your resul... | File.Listfile() force closes (NullPointerException) I have a weird problem where, the first time you start the app, it works well, the 2nd time it crashes, the 3rd works, the 4th crashes and so on.. Here is the logcat: E/AndroidRuntime(18039): FATAL EXCEPTION: main E/AndroidRuntime(18039): java.lang.RuntimeException: U... | TITLE:
File.Listfile() force closes (NullPointerException)
QUESTION:
I have a weird problem where, the first time you start the app, it works well, the 2nd time it crashes, the 3rd works, the 4th crashes and so on.. Here is the logcat: E/AndroidRuntime(18039): FATAL EXCEPTION: main E/AndroidRuntime(18039): java.lang.R... | [
"java",
"android",
"file",
"nullpointerexception"
] | 0 | 0 | 1,254 | 3 | 0 | 2011-06-08T07:43:59.193000 | 2011-06-08T07:52:13.310000 |
6,275,672 | 6,276,012 | 3D Cube Problem! Part 1 | I have created a 3D cube in iphone using CALayer's. Now I wanted to rotate that cube( CALayer ) at 90˚ when user double taps on it. I was able to rotate that cube( CALayer ) to 90˚ once but when I double tap the cube( CALayer ) is not rotating. Here is the code that I used to rotate the cube( CALayer ) CATransform3D x ... | its because you are not changing the angle of rotation.... to understand this lets say you are passing M_PI/2 each time to that method.... so CATransform3DRotate do not rotate it to next 90˚ rather it rotate the layer to the specified angle in this case its 90... so you are not getting any chage because it already at 9... | 3D Cube Problem! Part 1 I have created a 3D cube in iphone using CALayer's. Now I wanted to rotate that cube( CALayer ) at 90˚ when user double taps on it. I was able to rotate that cube( CALayer ) to 90˚ once but when I double tap the cube( CALayer ) is not rotating. Here is the code that I used to rotate the cube( CA... | TITLE:
3D Cube Problem! Part 1
QUESTION:
I have created a 3D cube in iphone using CALayer's. Now I wanted to rotate that cube( CALayer ) at 90˚ when user double taps on it. I was able to rotate that cube( CALayer ) to 90˚ once but when I double tap the cube( CALayer ) is not rotating. Here is the code that I used to r... | [
"iphone",
"objective-c",
"core-animation",
"calayer",
"catransform3d"
] | 3 | 2 | 1,138 | 1 | 0 | 2011-06-08T07:44:20.230000 | 2011-06-08T08:20:16.617000 |
6,275,674 | 6,280,423 | iOS, Core Data, update datamodel - How does it work? | Preambule Suppose, I have an iOS application, which is a book reader, and it uses Core Data for storing the books data. The first version of my app uses a rather simple data model, which i later will update. I want to sell my books via the "In App Purchase". Question If i update the application with a new datamodel, wi... | To update the data model, you use migration. See: Core Data Model Versioning and Data Migration Programming Guide... for details. Note that you can in many cases rely on automatic migration. How will I motivate the users to update their apps to a new version when they buy books (in my app) in the new version, while sti... | iOS, Core Data, update datamodel - How does it work? Preambule Suppose, I have an iOS application, which is a book reader, and it uses Core Data for storing the books data. The first version of my app uses a rather simple data model, which i later will update. I want to sell my books via the "In App Purchase". Question... | TITLE:
iOS, Core Data, update datamodel - How does it work?
QUESTION:
Preambule Suppose, I have an iOS application, which is a book reader, and it uses Core Data for storing the books data. The first version of my app uses a rather simple data model, which i later will update. I want to sell my books via the "In App P... | [
"ios",
"core-data",
"in-app-purchase"
] | 0 | 2 | 3,685 | 1 | 0 | 2011-06-08T07:44:53.907000 | 2011-06-08T14:30:39.783000 |
6,275,688 | 6,275,752 | Correct way of loading multiple CSS in a page | As per Yahoo, we have to limit number of request to the server's to improve the website's performance. Agreeing to it, I would to combine my CSS files, but i am not sure which one of below method is appropriate or corrent one to go with. Method 1 File: css1.css.....css1style { }.. File: css2.css.....css2style { }.. The... | I would compress them into one file in order to reduce the http requests. Look at the HTML5Boilerplate's Build Script. It allows you to code in separate files and deploy in one minified file. This is always best practice. | Correct way of loading multiple CSS in a page As per Yahoo, we have to limit number of request to the server's to improve the website's performance. Agreeing to it, I would to combine my CSS files, but i am not sure which one of below method is appropriate or corrent one to go with. Method 1 File: css1.css.....css1styl... | TITLE:
Correct way of loading multiple CSS in a page
QUESTION:
As per Yahoo, we have to limit number of request to the server's to improve the website's performance. Agreeing to it, I would to combine my CSS files, but i am not sure which one of below method is appropriate or corrent one to go with. Method 1 File: css... | [
"css"
] | 2 | 4 | 199 | 5 | 0 | 2011-06-08T07:46:01.440000 | 2011-06-08T07:52:34.303000 |
6,275,700 | 6,275,738 | How can I show the Facebook authorization screen? | How can I show the Facebook authorization screen using PHP when the user visits a facebook application? | see http://net.tutsplus.com/tutorials/php/how-to-authenticate-your-users-with-facebook-connect for an example | How can I show the Facebook authorization screen? How can I show the Facebook authorization screen using PHP when the user visits a facebook application? | TITLE:
How can I show the Facebook authorization screen?
QUESTION:
How can I show the Facebook authorization screen using PHP when the user visits a facebook application?
ANSWER:
see http://net.tutsplus.com/tutorials/php/how-to-authenticate-your-users-with-facebook-connect for an example | [
"php",
"facebook"
] | 0 | 0 | 258 | 2 | 0 | 2011-06-08T07:46:59.513000 | 2011-06-08T07:51:12.150000 |
6,275,705 | 6,275,735 | php export todays date xml or json | im creating a phonegap application with images that will be updated weekly, i am able to load and save the data onto the phone. However in testing i have found that many people have incorrect dates on their phone so its been difficult to tell the app when to download the new data. is there a nifty piece of php i can in... | You'll want to use php's date function and json_encode try date('m/d/Y')));?> | php export todays date xml or json im creating a phonegap application with images that will be updated weekly, i am able to load and save the data onto the phone. However in testing i have found that many people have incorrect dates on their phone so its been difficult to tell the app when to download the new data. is ... | TITLE:
php export todays date xml or json
QUESTION:
im creating a phonegap application with images that will be updated weekly, i am able to load and save the data onto the phone. However in testing i have found that many people have incorrect dates on their phone so its been difficult to tell the app when to download... | [
"php",
"xml",
"json",
"cordova"
] | 0 | 3 | 339 | 2 | 0 | 2011-06-08T07:47:44.013000 | 2011-06-08T07:51:03.313000 |
6,275,712 | 6,276,473 | MS-DOS batch script: substring from url | I have an other question. I have an url like this @SET var1="http://www.domain.com/dir1/dir2/dir3/dir4/dir5/file.txt". In this url I need to get "http://www.domain.com/dir1/dir2/dir3/dir4/dir5/" path. Thanks. | How about this? @echo off setlocal enabledelayedexpansion
set var1="http://www.domain.com/dir1/dir2/dir3/dir4/dir5/file.txt"
set var2=%var1%:loop if "!var2:~-2,1!"=="/" goto endloop set var2="%var2:~1,-2%" goto loop:endloop echo.%var2% It removes characters from the end of the path until / is reached. | MS-DOS batch script: substring from url I have an other question. I have an url like this @SET var1="http://www.domain.com/dir1/dir2/dir3/dir4/dir5/file.txt". In this url I need to get "http://www.domain.com/dir1/dir2/dir3/dir4/dir5/" path. Thanks. | TITLE:
MS-DOS batch script: substring from url
QUESTION:
I have an other question. I have an url like this @SET var1="http://www.domain.com/dir1/dir2/dir3/dir4/dir5/file.txt". In this url I need to get "http://www.domain.com/dir1/dir2/dir3/dir4/dir5/" path. Thanks.
ANSWER:
How about this? @echo off setlocal enabledel... | [
"batch-file",
"dos"
] | 0 | 0 | 1,396 | 1 | 0 | 2011-06-08T07:48:41.860000 | 2011-06-08T09:04:54.307000 |
6,275,725 | 6,275,959 | Exceptional RewriteCond for some page | Let say i have domain like this http://foo.com this domain as present use.htaccess to RewriteCond and the.htaccess code is like this: RewriteCond %{REQUEST_FILENAME}!-f RewriteCond %{REQUEST_FILENAME}!-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] This Rewrite will happen to all page request, now i want to change this to... | The Redirect directive you specified in your question should work, you can add it to your.htaccess file, before the Rewrite stuff block. If it doesn't work still, maybe Apache has not loaded the mod_alias module, and then you can add this directive before the other Rewrite's in the.htaccess file: RewriteRule ^/en/rates... | Exceptional RewriteCond for some page Let say i have domain like this http://foo.com this domain as present use.htaccess to RewriteCond and the.htaccess code is like this: RewriteCond %{REQUEST_FILENAME}!-f RewriteCond %{REQUEST_FILENAME}!-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] This Rewrite will happen to all page... | TITLE:
Exceptional RewriteCond for some page
QUESTION:
Let say i have domain like this http://foo.com this domain as present use.htaccess to RewriteCond and the.htaccess code is like this: RewriteCond %{REQUEST_FILENAME}!-f RewriteCond %{REQUEST_FILENAME}!-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] This Rewrite will ... | [
".htaccess"
] | 0 | 1 | 766 | 1 | 0 | 2011-06-08T07:50:25.763000 | 2011-06-08T08:15:19.477000 |
6,275,728 | 6,275,781 | Consuming a web service with http request response in .NET? | I need to create xml message and send it to the web service. Then I should handle the response by looking at the response xml that is coming from service. I have used WCF before but I should do it with old style. Where should I start? Thanks in advance. | If you don't want to use WCF / ASMX clients you should start by learning HTTP and SOAP ( 1.1, 1.2 ) to understand needed HTTP headers for POST requests and message construction and reading + HttpWebRequest. Doing it this way doesn't make sense - stick with WCF or ASMX (that is actually the old way). | Consuming a web service with http request response in .NET? I need to create xml message and send it to the web service. Then I should handle the response by looking at the response xml that is coming from service. I have used WCF before but I should do it with old style. Where should I start? Thanks in advance. | TITLE:
Consuming a web service with http request response in .NET?
QUESTION:
I need to create xml message and send it to the web service. Then I should handle the response by looking at the response xml that is coming from service. I have used WCF before but I should do it with old style. Where should I start? Thanks ... | [
".net",
"xml",
"web-services",
"soap",
"httprequest"
] | 1 | 1 | 3,473 | 3 | 0 | 2011-06-08T07:50:40.377000 | 2011-06-08T07:55:37.420000 |
6,275,734 | 6,275,788 | Oracle: materialized view with unique items out of flat table | I am working on Oracle. I have this large property-indexer table ( THE_TABLE ), whose columns are [ObjectID | CategoryID | Property1 | Property2 |... | PropertyN] where N is known by design. All the Property% columns are VARCHAR2 of the same size, the ObjectID is Numeric. Now, I would like to create a materialized view... | I am not sufe if I understand your question correctly, but I believe you want something like create materialied view THE_VIEW as select categoryID, 'property1' propertyName, property1 propertyValue from THE_TABLE union all select categoryID, 'property2' propertyName, property2 propertyValue from THE_TABLE union all... ... | Oracle: materialized view with unique items out of flat table I am working on Oracle. I have this large property-indexer table ( THE_TABLE ), whose columns are [ObjectID | CategoryID | Property1 | Property2 |... | PropertyN] where N is known by design. All the Property% columns are VARCHAR2 of the same size, the Object... | TITLE:
Oracle: materialized view with unique items out of flat table
QUESTION:
I am working on Oracle. I have this large property-indexer table ( THE_TABLE ), whose columns are [ObjectID | CategoryID | Property1 | Property2 |... | PropertyN] where N is known by design. All the Property% columns are VARCHAR2 of the sam... | [
"sql",
"oracle",
"view"
] | 2 | 3 | 992 | 2 | 0 | 2011-06-08T07:51:00.660000 | 2011-06-08T07:56:33.967000 |
6,275,762 | 6,275,812 | Escaping quotes in string | I have a python dictionary e.g.: [{"pk":"1","name":"John","size":"1/4" "},{},{},etc] That size is 1/4 inch,how would I "escape" that quote? So it still would display it as 1/4", Its a list of things, so I cant just manually code it like 1/4\", I tried replace('"','\"') EDIT: The orginal list is a textfield in my Django... | You need to escape your backslash in the replace in order to get it printed. Try replace('"','\\"') | Escaping quotes in string I have a python dictionary e.g.: [{"pk":"1","name":"John","size":"1/4" "},{},{},etc] That size is 1/4 inch,how would I "escape" that quote? So it still would display it as 1/4", Its a list of things, so I cant just manually code it like 1/4\", I tried replace('"','\"') EDIT: The orginal list i... | TITLE:
Escaping quotes in string
QUESTION:
I have a python dictionary e.g.: [{"pk":"1","name":"John","size":"1/4" "},{},{},etc] That size is 1/4 inch,how would I "escape" that quote? So it still would display it as 1/4", Its a list of things, so I cant just manually code it like 1/4\", I tried replace('"','\"') EDIT: ... | [
"python",
"regex",
"escaping"
] | 39 | 70 | 123,110 | 5 | 0 | 2011-06-08T07:53:24.250000 | 2011-06-08T07:58:54.850000 |
6,275,764 | 6,275,787 | Why does IsAssignableFrom() not work for int and double? | This is false: typeof(double).IsAssignableFrom(typeof(int)) This is false: typeof(int).IsAssignableFrom(typeof(double)) But this works: double a = 1.0; int b = 1;
a = b; Clearly a double is assignable from an int but the framework IsAssignableFrom() gets it wrong. Why? Or is this a bug in.NET caused by the special nat... | C# is providing the implicit conversion from int to double. That's a language decision, not something which.NET will do for you... so from the.NET point of view, double isn't assignable from int. (As an example of why this is language-specific, F# doesn't perform implicit conversions for you like this - you'd need to e... | Why does IsAssignableFrom() not work for int and double? This is false: typeof(double).IsAssignableFrom(typeof(int)) This is false: typeof(int).IsAssignableFrom(typeof(double)) But this works: double a = 1.0; int b = 1;
a = b; Clearly a double is assignable from an int but the framework IsAssignableFrom() gets it wron... | TITLE:
Why does IsAssignableFrom() not work for int and double?
QUESTION:
This is false: typeof(double).IsAssignableFrom(typeof(int)) This is false: typeof(int).IsAssignableFrom(typeof(double)) But this works: double a = 1.0; int b = 1;
a = b; Clearly a double is assignable from an int but the framework IsAssignableF... | [
"c#",
".net",
"types"
] | 30 | 26 | 3,822 | 1 | 0 | 2011-06-08T07:53:26.883000 | 2011-06-08T07:56:15.480000 |
6,275,766 | 6,276,108 | Transform java.net.URI to org.eclipse.emf.common.util.URI | There are at least two types of URIs in Java: java.net.URI org.eclipse.emf.common.util.URI I have java.net.URI and need to use the EMF URI. How can I convert the former to the latter? If I try new URI uri = profileUrl.toURI() I will get a message like this: Type mismatch: cannot convert from java.net.URI to org.eclipse... | First things first, there are not "two types of URIs in Java": there is only one in Java, and one in EMF which is a framework built for modeling. They have their own implementation of URI because this reflects one of their own concepts, or they needed more than Java's URI allows, or... there can be a number of reasons ... | Transform java.net.URI to org.eclipse.emf.common.util.URI There are at least two types of URIs in Java: java.net.URI org.eclipse.emf.common.util.URI I have java.net.URI and need to use the EMF URI. How can I convert the former to the latter? If I try new URI uri = profileUrl.toURI() I will get a message like this: Type... | TITLE:
Transform java.net.URI to org.eclipse.emf.common.util.URI
QUESTION:
There are at least two types of URIs in Java: java.net.URI org.eclipse.emf.common.util.URI I have java.net.URI and need to use the EMF URI. How can I convert the former to the latter? If I try new URI uri = profileUrl.toURI() I will get a messa... | [
"url",
"eclipse-plugin",
"uri",
"eclipse-emf",
"emf"
] | 3 | 10 | 3,639 | 1 | 0 | 2011-06-08T07:53:42.003000 | 2011-06-08T08:27:51.467000 |
6,275,769 | 6,276,308 | HTAccess Rule for Rewrite URL | I have url domainname.com/filename.php?id=45&view=sale i want to set url as domainname.com/filename/id/45/view/sale/ Can any one please help. thanks | RewriteEngine On RewriteCond %{QUERY_STRING} id=(.*)&view=(.*) RewriteRule ^(.*).php$ /$1/id/%1/view/%2 [R] You do want to map this way, right? The other way round is easier. You may remove the [R] flag. It helps testing. | HTAccess Rule for Rewrite URL I have url domainname.com/filename.php?id=45&view=sale i want to set url as domainname.com/filename/id/45/view/sale/ Can any one please help. thanks | TITLE:
HTAccess Rule for Rewrite URL
QUESTION:
I have url domainname.com/filename.php?id=45&view=sale i want to set url as domainname.com/filename/id/45/view/sale/ Can any one please help. thanks
ANSWER:
RewriteEngine On RewriteCond %{QUERY_STRING} id=(.*)&view=(.*) RewriteRule ^(.*).php$ /$1/id/%1/view/%2 [R] You do... | [
".htaccess",
"mod-rewrite",
"url-rewriting"
] | 0 | 1 | 94 | 1 | 0 | 2011-06-08T07:54:15.983000 | 2011-06-08T08:48:40.677000 |
6,275,773 | 6,275,816 | PHP Return result in different group | all I have a bundle of data like 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 then I separate these data into 2 groups which is $groupA = range(1, 5)
$groupB = range(6, 10) For instance, I have $data = array(1, 4) and it will return this belong to Group A. Likewise, $data = array(7,8), it will return to me Group B. So how can I writ... | You may want to use array_intersect: $groupA = range(1, 5); $groupB = range(6, 10); $data = array(1, 4, 6, 7); $foundGroups = array(); if(array_intersect($data, $groupA)) $foundGroups[] = 'A'; if(array_intersect($data, $groupB)) $foundGroups[] = 'B'; print_r($foundGroups); Note that an empty array evaluates to false wh... | PHP Return result in different group all I have a bundle of data like 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 then I separate these data into 2 groups which is $groupA = range(1, 5)
$groupB = range(6, 10) For instance, I have $data = array(1, 4) and it will return this belong to Group A. Likewise, $data = array(7,8), it will re... | TITLE:
PHP Return result in different group
QUESTION:
all I have a bundle of data like 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 then I separate these data into 2 groups which is $groupA = range(1, 5)
$groupB = range(6, 10) For instance, I have $data = array(1, 4) and it will return this belong to Group A. Likewise, $data = arra... | [
"php",
"arrays",
"range"
] | 3 | 4 | 93 | 4 | 0 | 2011-06-08T07:54:48.253000 | 2011-06-08T07:59:00.987000 |
6,275,780 | 6,275,868 | Deleting some nodes from an XML document when iterating using XSLT | I'm having a little issue with some XSLT. My original XML looks like this: 10 2011-06-07 1039 10 977400 12881459 01/2011 110606 710,08 EUR 612 Asiakas maksoi lisäksi kesäkuun vuokran ajalle 1.6. - 15.6.2 612 011. Meillä saldo 0 €. 10 25 My XSLT looks like this:...and my output looks like this: 10 2011-06-07 10 25 10 97... | An easier way to approach this is to take an identity transform (i.e. one which simply copies each element / attribute), then add no-op matches for the elements you wish to omit:... See this related question: XSL Transform remove Xml Elements | Deleting some nodes from an XML document when iterating using XSLT I'm having a little issue with some XSLT. My original XML looks like this: 10 2011-06-07 1039 10 977400 12881459 01/2011 110606 710,08 EUR 612 Asiakas maksoi lisäksi kesäkuun vuokran ajalle 1.6. - 15.6.2 612 011. Meillä saldo 0 €. 10 25 My XSLT looks li... | TITLE:
Deleting some nodes from an XML document when iterating using XSLT
QUESTION:
I'm having a little issue with some XSLT. My original XML looks like this: 10 2011-06-07 1039 10 977400 12881459 01/2011 110606 710,08 EUR 612 Asiakas maksoi lisäksi kesäkuun vuokran ajalle 1.6. - 15.6.2 612 011. Meillä saldo 0 €. 10 2... | [
"xml",
"xslt"
] | 3 | 2 | 369 | 1 | 0 | 2011-06-08T07:55:36.743000 | 2011-06-08T08:04:47.537000 |
6,275,783 | 6,276,593 | Failed to create nested elements in XML using XLST | I have a flat XML which looks like this: Chassis-One Chassis Shelf-One Shelf Shelf-Two Shelf Slot-One Slot How can I create an XSL that will transform my XML into another XML that looks like this: Chassis-One Shelf-One Slot-One It's like in a chassis, there are 2 shelves, and in Shelf One, there is Slot -One.. I tried ... | There's a fairly simple (although a little verbose) solution: It's a bit repetitive though, the last three templates are almost identical. But then, depending on your specific requirements, it might be helpful that they're handled by different templates. If you can guarantee that a shelf will always follow the related ... | Failed to create nested elements in XML using XLST I have a flat XML which looks like this: Chassis-One Chassis Shelf-One Shelf Shelf-Two Shelf Slot-One Slot How can I create an XSL that will transform my XML into another XML that looks like this: Chassis-One Shelf-One Slot-One It's like in a chassis, there are 2 shelv... | TITLE:
Failed to create nested elements in XML using XLST
QUESTION:
I have a flat XML which looks like this: Chassis-One Chassis Shelf-One Shelf Shelf-Two Shelf Slot-One Slot How can I create an XSL that will transform my XML into another XML that looks like this: Chassis-One Shelf-One Slot-One It's like in a chassis,... | [
"xslt"
] | 2 | 0 | 313 | 2 | 0 | 2011-06-08T07:55:46.997000 | 2011-06-08T09:17:43.117000 |
6,275,784 | 6,275,914 | PackageManager issue in android | I can't get date in properManner, I use PackageManager: Code example::List applications = getPackageManager().getInstalledPackages(0); for(PackageInfo info: applications){ // Drawable icon = info.applicationInfo.loadIcon(getBaseContext()); long firstInstalled = info.firstInstallTime; long lastUpdate = info.lastUpdateTi... | Use below code Date d = new Date(firstInstalled); d.getDate(); d.getMonth(); d.getYear(); | PackageManager issue in android I can't get date in properManner, I use PackageManager: Code example::List applications = getPackageManager().getInstalledPackages(0); for(PackageInfo info: applications){ // Drawable icon = info.applicationInfo.loadIcon(getBaseContext()); long firstInstalled = info.firstInstallTime; lon... | TITLE:
PackageManager issue in android
QUESTION:
I can't get date in properManner, I use PackageManager: Code example::List applications = getPackageManager().getInstalledPackages(0); for(PackageInfo info: applications){ // Drawable icon = info.applicationInfo.loadIcon(getBaseContext()); long firstInstalled = info.fir... | [
"android"
] | 0 | 1 | 309 | 2 | 0 | 2011-06-08T07:55:48.830000 | 2011-06-08T08:09:46.607000 |
6,275,795 | 6,275,877 | Javascript object to behave differently, based on index ending: foo vs. foo() | Is it possible to construct an object in a way to return the following: baseObject.foo; // return a string describing what foo does baseObject.foo(); // execute the foo function
baseObject.bar; // bar description baseObject.bar(); // execute bar Update: JavaScript Method Overloading is close, but not quite what I'm lo... | baseObject.foo has to be a function, otherwise you won't be able to call it. The only thing you can influence is how this function is coerced to a string, by overriding its toString() method. By default toString() returns function source code, you can make it return something else instead. baseObject.foo = function() {... | Javascript object to behave differently, based on index ending: foo vs. foo() Is it possible to construct an object in a way to return the following: baseObject.foo; // return a string describing what foo does baseObject.foo(); // execute the foo function
baseObject.bar; // bar description baseObject.bar(); // execute... | TITLE:
Javascript object to behave differently, based on index ending: foo vs. foo()
QUESTION:
Is it possible to construct an object in a way to return the following: baseObject.foo; // return a string describing what foo does baseObject.foo(); // execute the foo function
baseObject.bar; // bar description baseObject... | [
"javascript",
"object",
"javascript-objects"
] | 1 | 4 | 63 | 2 | 0 | 2011-06-08T07:57:21.530000 | 2011-06-08T08:05:47.847000 |
6,275,797 | 6,275,939 | Unity container object resolution hierarchy | I have my container configured like following: container = new UnityContainer().RegisterType ().RegisterType ().RegisterType (new InjectionConstructor(strA)); What I need is, I want to register another C instance like: container.RegisterType (new InjectionConstructor(strB)); note the difference between strA and strB. B... | You will want to use a named type registration. var container = new UnityContainer().RegisterType ("ForA", new InjectionConstructor(strA)).RegisterType ("ForB", new InjectionConstructor(strB)).RegisterType (new InjectionConstructor(container.Resolve ("ForA"))).RegisterType (new InjectionConstructor(container.Resolve ("... | Unity container object resolution hierarchy I have my container configured like following: container = new UnityContainer().RegisterType ().RegisterType ().RegisterType (new InjectionConstructor(strA)); What I need is, I want to register another C instance like: container.RegisterType (new InjectionConstructor(strB)); ... | TITLE:
Unity container object resolution hierarchy
QUESTION:
I have my container configured like following: container = new UnityContainer().RegisterType ().RegisterType ().RegisterType (new InjectionConstructor(strA)); What I need is, I want to register another C instance like: container.RegisterType (new InjectionCo... | [
"c#",
"dependency-injection",
"unity-container",
"containers"
] | 1 | 2 | 550 | 2 | 0 | 2011-06-08T07:57:37.630000 | 2011-06-08T08:13:08.307000 |
6,275,799 | 6,276,622 | Trouble with rspec test with a polymorphic class | I'm using MongoMapper instead of ActiveRecord. I have a User model and a Task model. In the Task model, I have 2 attributes as follow: Owner Author Both attributes are User references. Here are the relations between the two models: User.rb has_many:tasks,:as =>:owner Taks.rb belongs_to:owner,:class_name => "User",:poly... | There are several answers to this: 1) You may have a leaking spec that runs before this spec (this means that a task is created with the id and type of 'another_user' before this 2) It may be necessary to create the tasks, too (try to use Factory.create(:task) instead of just Factory(:task) 3) You may want to check out... | Trouble with rspec test with a polymorphic class I'm using MongoMapper instead of ActiveRecord. I have a User model and a Task model. In the Task model, I have 2 attributes as follow: Owner Author Both attributes are User references. Here are the relations between the two models: User.rb has_many:tasks,:as =>:owner Tak... | TITLE:
Trouble with rspec test with a polymorphic class
QUESTION:
I'm using MongoMapper instead of ActiveRecord. I have a User model and a Task model. In the Task model, I have 2 attributes as follow: Owner Author Both attributes are User references. Here are the relations between the two models: User.rb has_many:task... | [
"ruby-on-rails",
"rspec",
"rspec2",
"polymorphic-associations"
] | 0 | 0 | 2,147 | 2 | 0 | 2011-06-08T07:57:44.140000 | 2011-06-08T09:20:55 |
6,275,813 | 6,275,849 | php re-create an array to new keys and values | I have the following array of keys and values. How can i recreate this array to make the second column as the key and 3rd column the values. Also remove all unwanted spacings. Array ( [16] => hasKeyframes: true [17] => hasMetadata: true [18] => duration: 30 [19] => audiosamplerate: 22000 [20] => audiodatarate: 68 [21] ... | $newArray=array(); foreach($array as $value) { $pair=explode(":",$value); $newArray[trim($pair[0])] = trim($pair[1]); } EDIT if we have something like [19] => Duration: 00:00:31.03, then we only get 00 for $pair[1] $newArray=array(); foreach($array as $value) { $pair=explode(":",$value,2); $newArray[trim($pair[0])] = t... | php re-create an array to new keys and values I have the following array of keys and values. How can i recreate this array to make the second column as the key and 3rd column the values. Also remove all unwanted spacings. Array ( [16] => hasKeyframes: true [17] => hasMetadata: true [18] => duration: 30 [19] => audiosam... | TITLE:
php re-create an array to new keys and values
QUESTION:
I have the following array of keys and values. How can i recreate this array to make the second column as the key and 3rd column the values. Also remove all unwanted spacings. Array ( [16] => hasKeyframes: true [17] => hasMetadata: true [18] => duration: 3... | [
"php",
"arrays"
] | 1 | 4 | 407 | 2 | 0 | 2011-06-08T07:58:57.863000 | 2011-06-08T08:02:05.410000 |
6,275,817 | 6,276,946 | Safari : jQuery functionality not working in ajax loaded content | I have a page dashboard.asp It opens a dialog and using ajax loads... profile.asp Within profile.asp there are various jquery functions relating to the functionality of the profile. All is well accept Safari will not not load $(document).ready in the loaded content. A secondary question would be should I be including i... | Argh! I had left etc in the Ajax loaded content which was messing everything up! Thank you for your answers, upvoting them as they were correct in the context. | Safari : jQuery functionality not working in ajax loaded content I have a page dashboard.asp It opens a dialog and using ajax loads... profile.asp Within profile.asp there are various jquery functions relating to the functionality of the profile. All is well accept Safari will not not load $(document).ready in the load... | TITLE:
Safari : jQuery functionality not working in ajax loaded content
QUESTION:
I have a page dashboard.asp It opens a dialog and using ajax loads... profile.asp Within profile.asp there are various jquery functions relating to the functionality of the profile. All is well accept Safari will not not load $(document)... | [
"javascript",
"jquery",
"xhtml",
"safari"
] | 0 | 0 | 1,638 | 2 | 0 | 2011-06-08T07:59:01.127000 | 2011-06-08T09:50:12.943000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.