PostId
int64
13
11.8M
PostCreationDate
stringlengths
19
19
OwnerUserId
int64
3
1.57M
OwnerCreationDate
stringlengths
10
19
ReputationAtPostCreation
int64
-33
210k
OwnerUndeletedAnswerCountAtPostTime
int64
0
5.77k
Title
stringlengths
10
250
BodyMarkdown
stringlengths
12
30k
Tag1
stringlengths
1
25
Tag2
stringlengths
1
25
Tag3
stringlengths
1
25
Tag4
stringlengths
1
25
Tag5
stringlengths
1
25
PostClosedDate
stringlengths
19
19
OpenStatus
stringclasses
5 values
unified_texts
stringlengths
47
30.1k
OpenStatus_id
int64
0
4
2,290,751
02/18/2010 17:33:21
6,176
09/12/2008 19:11:55
150
6
WPF: How can I programatically close a PrintDialog ?
How can I programatically close a WPF PrintDialog ? I tried to call Finalize on it trough reflection, and that does not close it either. Here is what I tried with: using System; using System.Reflection; using System.Threading; using System.Windows; using System.Windows.Controls; namespace WpfApplication15 { partial class Window1 : Window { PrintDialog _printDialog; public Window1() { InitializeComponent(); new Thread(OpenDialog).Start(); new Thread(CloseDialog).Start(); } void OpenDialog() { Thread.Sleep(1000); Dispatcher.BeginInvoke((Action)OpenDialogImpl); } void OpenDialogImpl() { _printDialog = new PrintDialog(); _printDialog.ShowDialog(); } void CloseDialog() { Thread.Sleep(2000); Dispatcher.BeginInvoke((Action)CloseDialogImpl); } void CloseDialogImpl() { var type = typeof(PrintDialog); var flags = BindingFlags.Instance | BindingFlags.NonPublic; var finalize = type.GetMethod("Finalize", flags); finalize.Invoke(_printDialog, null); MessageBox.Show("Finalized"); } } }
wpf
null
null
null
null
null
open
WPF: How can I programatically close a PrintDialog ? === How can I programatically close a WPF PrintDialog ? I tried to call Finalize on it trough reflection, and that does not close it either. Here is what I tried with: using System; using System.Reflection; using System.Threading; using System.Windows; using System.Windows.Controls; namespace WpfApplication15 { partial class Window1 : Window { PrintDialog _printDialog; public Window1() { InitializeComponent(); new Thread(OpenDialog).Start(); new Thread(CloseDialog).Start(); } void OpenDialog() { Thread.Sleep(1000); Dispatcher.BeginInvoke((Action)OpenDialogImpl); } void OpenDialogImpl() { _printDialog = new PrintDialog(); _printDialog.ShowDialog(); } void CloseDialog() { Thread.Sleep(2000); Dispatcher.BeginInvoke((Action)CloseDialogImpl); } void CloseDialogImpl() { var type = typeof(PrintDialog); var flags = BindingFlags.Instance | BindingFlags.NonPublic; var finalize = type.GetMethod("Finalize", flags); finalize.Invoke(_printDialog, null); MessageBox.Show("Finalized"); } } }
0
10,488,076
05/07/2012 19:42:34
786,466
06/06/2011 20:05:12
1
1
How to draw family tree from php array?
<br /> I need to draw a family tree by a given PHP array <br/> The php array looks like follows: <br/> $array[0] = first_entry //First entry $array[1][0] = first_entry's mother //First entry's parents $array[1][1] = first_entry's father //First entry's parents $array[2][0] = first_entry's mother's mother //Second entry's parents $array[2][1] = first_entry's mother's father//Second entry's parents $array[2][2] = first_entry's father's mother //Second entry's parents $array[2][3] = first_entry's father's father//Second entry's parents And so on. Each level having the last's level parents in order - first 2 entries are representing the last's level entry. <br/> <br /> What I need is a PHP code or JavaScript that will RENDER the family tree from the first one to the last - - and will create an image / PDF file ready for printing. <br/>
php
javascript
arrays
null
null
05/08/2012 19:47:01
not a real question
How to draw family tree from php array? === <br /> I need to draw a family tree by a given PHP array <br/> The php array looks like follows: <br/> $array[0] = first_entry //First entry $array[1][0] = first_entry's mother //First entry's parents $array[1][1] = first_entry's father //First entry's parents $array[2][0] = first_entry's mother's mother //Second entry's parents $array[2][1] = first_entry's mother's father//Second entry's parents $array[2][2] = first_entry's father's mother //Second entry's parents $array[2][3] = first_entry's father's father//Second entry's parents And so on. Each level having the last's level parents in order - first 2 entries are representing the last's level entry. <br/> <br /> What I need is a PHP code or JavaScript that will RENDER the family tree from the first one to the last - - and will create an image / PDF file ready for printing. <br/>
1
3,714,605
09/15/2010 04:10:02
215,847
11/20/2009 22:15:40
147
25
how can I make a simple interactive web map of data for countries (bigger than what google Chart API allows)
I have a spreadsheet with: URL, 2 digit country code, Main Value, Less important values ... I just want to make a simple map that can be bigger than what Google Charts API allows (that one is limited to 600x600), but a similar level of simplicity. If it looks nice and is interactive (hovering on country shows data) all the better. If I have to host my own javascript, that's OK.
javascript
maps
google-charts
countries
null
null
open
how can I make a simple interactive web map of data for countries (bigger than what google Chart API allows) === I have a spreadsheet with: URL, 2 digit country code, Main Value, Less important values ... I just want to make a simple map that can be bigger than what Google Charts API allows (that one is limited to 600x600), but a similar level of simplicity. If it looks nice and is interactive (hovering on country shows data) all the better. If I have to host my own javascript, that's OK.
0
10,149,847
04/14/2012 00:09:06
1,249,347
03/05/2012 08:02:47
66
7
Clarification of copyright law on javascript code (enforceability, &c)
I had never thought about IP in coding before until recently with I did my first "gig." I started reading about IP after I finished and apparently I narrowly escaped some trouble. I did some freelance work for which I signed a restrictive contract that would've required me to fork over any rights to any software I wrote. I didn't develop any new code for the work, I only used code I already had, so I didn't have an issue. However, it got me thinking and kind of scares me out of doing any future work. In my case, the code of my own I used was Python, so I think the issue of ownership would be relatively clear cut. But it got my thinking how IP would work for Javascript, which (for the most part) is intended to be downloaded and executed on every computer that wants to use the script. In terms of other copyrightables, I can't think of anything to compare this to. It'd be like Coke selling their products with the recipe printed on the bottle, but even more difficult, since at least in that case you'd have the physical evidence of who came up with it first. Due to the rapidity of propagation on the Internet, it seems like it'd be much harder to make the claim of originality, unless you went through the trouble of registering your copyright (or however that works). So my question is how the copyright on client-side code can possibly be enforced. What if you developed such code for a client, who now holds the right to it but uses it on a public website, and you want to use pieces of it in a future project for your own purposes or for another client? Would it be illegal to use it without licensing it back from your former client? I doubt most bits of Javascript are worth worrying about, but I can imagine such an issue arising if you develop a neat jQuery plugin for a stingy client. (Also, has anyone actually been forced to license their own code from a former client? Does that even make sense? I mean, you can't pretend you can't do something you've already done, so what prevents you from rewriting some code you've already come up with, even if you don't copy it verbatim?) Sorry if my understanding of IP is naive and incomplete! Coding's my hobby not my job, and unless I hear some positive responses about this subject, I think it'll stay that way. (Ps, I read some related questions on this forum, where many people replied "Don't rely on us for legal advice!" I wouldn't and won't and don't want to. I don't need legal advice, at least not yet. I'm trying to get the perspective of programmers with experience working with these issues, in case I decide to do more paid work in the future.)
javascript
copyright
null
null
null
04/14/2012 00:18:32
off topic
Clarification of copyright law on javascript code (enforceability, &c) === I had never thought about IP in coding before until recently with I did my first "gig." I started reading about IP after I finished and apparently I narrowly escaped some trouble. I did some freelance work for which I signed a restrictive contract that would've required me to fork over any rights to any software I wrote. I didn't develop any new code for the work, I only used code I already had, so I didn't have an issue. However, it got me thinking and kind of scares me out of doing any future work. In my case, the code of my own I used was Python, so I think the issue of ownership would be relatively clear cut. But it got my thinking how IP would work for Javascript, which (for the most part) is intended to be downloaded and executed on every computer that wants to use the script. In terms of other copyrightables, I can't think of anything to compare this to. It'd be like Coke selling their products with the recipe printed on the bottle, but even more difficult, since at least in that case you'd have the physical evidence of who came up with it first. Due to the rapidity of propagation on the Internet, it seems like it'd be much harder to make the claim of originality, unless you went through the trouble of registering your copyright (or however that works). So my question is how the copyright on client-side code can possibly be enforced. What if you developed such code for a client, who now holds the right to it but uses it on a public website, and you want to use pieces of it in a future project for your own purposes or for another client? Would it be illegal to use it without licensing it back from your former client? I doubt most bits of Javascript are worth worrying about, but I can imagine such an issue arising if you develop a neat jQuery plugin for a stingy client. (Also, has anyone actually been forced to license their own code from a former client? Does that even make sense? I mean, you can't pretend you can't do something you've already done, so what prevents you from rewriting some code you've already come up with, even if you don't copy it verbatim?) Sorry if my understanding of IP is naive and incomplete! Coding's my hobby not my job, and unless I hear some positive responses about this subject, I think it'll stay that way. (Ps, I read some related questions on this forum, where many people replied "Don't rely on us for legal advice!" I wouldn't and won't and don't want to. I don't need legal advice, at least not yet. I'm trying to get the perspective of programmers with experience working with these issues, in case I decide to do more paid work in the future.)
2
11,206,497
06/26/2012 11:37:38
1,395,762
05/15/2012 09:23:06
11
3
Sencha Touch Calender update size
I like to update size calender from full screen to 800*600. I use this code but it is not working. var calendarPanel = new Ext.Panel({ dockedItems: [{ xtype: 'toolbar', dock: 'top', items: [{ xtype: 'segmentedbutton', allowMultiple: false, items: [{ text: 'Mois', pressed: true, handler: function(){ calendar.setMode('month'); } }, { text: 'Semaine', handler: function(){ calendar.setMode('week'); } }] }] }, { dock: 'bottom', xtype: 'list', height: 110, itemTpl: '{event} {location}', store: new Ext.data.Store({ model: 'Event', data: [] }) }], layout: 'fit', width: 800, height: 600, items: [calendar] });``
android
calendar
resize
sencha-touch
null
null
open
Sencha Touch Calender update size === I like to update size calender from full screen to 800*600. I use this code but it is not working. var calendarPanel = new Ext.Panel({ dockedItems: [{ xtype: 'toolbar', dock: 'top', items: [{ xtype: 'segmentedbutton', allowMultiple: false, items: [{ text: 'Mois', pressed: true, handler: function(){ calendar.setMode('month'); } }, { text: 'Semaine', handler: function(){ calendar.setMode('week'); } }] }] }, { dock: 'bottom', xtype: 'list', height: 110, itemTpl: '{event} {location}', store: new Ext.data.Store({ model: 'Event', data: [] }) }], layout: 'fit', width: 800, height: 600, items: [calendar] });``
0
8,074,943
11/10/2011 04:16:50
919,655
08/30/2011 12:07:00
28
0
Clipmate 's similar function
I want to create a similar application to clipmate.com 's clipmate application Things are saved into my clipboard and can be reread after I run the application the next days. Can you tell me the techniques -database related- used to do this ?
c#
null
null
null
null
11/10/2011 07:07:28
not a real question
Clipmate 's similar function === I want to create a similar application to clipmate.com 's clipmate application Things are saved into my clipboard and can be reread after I run the application the next days. Can you tell me the techniques -database related- used to do this ?
1
3,373,499
07/30/2010 16:31:16
213,786
11/18/2009 14:13:15
44
3
Is Groovy a langage to know ?
I am going to have some spare time and I'm looking in good ways to invest and improve my IT knowledge. The groovy langage seems to become more and more popular and I am a bit struggling to understand why. Could someone explain me what makes groovy a langage to know ? Is it currently used in real projects ? Thanks !
groovy
null
null
null
null
07/31/2010 05:56:41
not constructive
Is Groovy a langage to know ? === I am going to have some spare time and I'm looking in good ways to invest and improve my IT knowledge. The groovy langage seems to become more and more popular and I am a bit struggling to understand why. Could someone explain me what makes groovy a langage to know ? Is it currently used in real projects ? Thanks !
4
7,127,381
08/19/2011 21:01:39
338,690
05/11/2010 20:11:57
16
0
Sequentially Combining Three Lists Created with Regular Expressions - Python
I have a text file I am reading with three regular expressions. I'd like to combine each item from each regex search line by line and print them out using the same format as the last line below. I just cannot get the loop right to combine everything. import re string = open("cusip.txt") read_string = string.read() cusip_reg_exp = re.compile('\s[0-9]{3}[a-zA-Z0-9]{6}\s') cusip_result = cusip_reg_exp.findall(read_string) bond_name_reg_exp = re.compile('\s[A-Z]{3,5}\s[0-9]{4}\D{1,3}\S{1,3}\s{1,2}\w{1,3}') bond_name_result = bond_name_reg_exp.findall(read_string) bond_price_name_reg_ex = re.compile('[$]{0,1}[0-9]{1,2}[-]{1}[0-9]{2}') bond_price_result = bond_price_name_reg_ex.findall(read_string) print(cusip_result[0],bond_name_result[0],bond_price_result[0])
python
list
expressions
null
null
null
open
Sequentially Combining Three Lists Created with Regular Expressions - Python === I have a text file I am reading with three regular expressions. I'd like to combine each item from each regex search line by line and print them out using the same format as the last line below. I just cannot get the loop right to combine everything. import re string = open("cusip.txt") read_string = string.read() cusip_reg_exp = re.compile('\s[0-9]{3}[a-zA-Z0-9]{6}\s') cusip_result = cusip_reg_exp.findall(read_string) bond_name_reg_exp = re.compile('\s[A-Z]{3,5}\s[0-9]{4}\D{1,3}\S{1,3}\s{1,2}\w{1,3}') bond_name_result = bond_name_reg_exp.findall(read_string) bond_price_name_reg_ex = re.compile('[$]{0,1}[0-9]{1,2}[-]{1}[0-9]{2}') bond_price_result = bond_price_name_reg_ex.findall(read_string) print(cusip_result[0],bond_name_result[0],bond_price_result[0])
0
6,086,945
05/22/2011 08:56:40
687,263
04/01/2011 08:54:56
39
0
VideoCalling in iPhone?
I need to implement the video calling in iPhone. Is there any best open source for that? I got the open source "squidge_source". in this source code they are using the private Frameworks, if i use this Apple will approve my app?.
iphone
null
null
null
null
null
open
VideoCalling in iPhone? === I need to implement the video calling in iPhone. Is there any best open source for that? I got the open source "squidge_source". in this source code they are using the private Frameworks, if i use this Apple will approve my app?.
0
8,852,041
01/13/2012 14:27:27
751,335
05/12/2011 20:55:24
40
7
How to download youtube videos using a python script
I need to download videos from youtube using a python script. However i am unable to get the url of the video from the youtube page. For eg. given the url: http://www.youtube.com/watch?v=5qcmCUsw4EQ&feature=g-all-u&context=G2633db8FAAAAAAAAAAA I need to download the video as a flv or any other format. Also i need to be able to download it multiple quality. I tried several scripts like youtube-dl and quvi but they all give errors and dont work. Please help. It shall be deeply appreciated.
python
video
script
youtube
null
01/16/2012 13:55:43
off topic
How to download youtube videos using a python script === I need to download videos from youtube using a python script. However i am unable to get the url of the video from the youtube page. For eg. given the url: http://www.youtube.com/watch?v=5qcmCUsw4EQ&feature=g-all-u&context=G2633db8FAAAAAAAAAAA I need to download the video as a flv or any other format. Also i need to be able to download it multiple quality. I tried several scripts like youtube-dl and quvi but they all give errors and dont work. Please help. It shall be deeply appreciated.
2
409,933
01/03/2009 21:54:30
37,213
10/16/2008 01:43:36
1,557
171
Does Learning C#/.NET Require An MSDN Subscription?
I'm a Java EE person who would like to climb the .NET learning curve. I've always had the impression that one important difference between Java and .NET was that the Microsoft suite required that you (or your employer) had put up some coin to get access to the tools. A Java person has the advantage of being able to download a JVM, Eclipse or NetBeans, Tomcat or Glassfish, MySQL or PostgreSQL, and they're in business. Is that still fair? What's the best way for a guy who works in a Java EE shop to learn C# without breaking the bank? Is it possible learn C# well without a paid subscription to MSDN?
.net
java-ee
msdnsubscriptions
learning-curve
c#
05/01/2012 23:04:31
not constructive
Does Learning C#/.NET Require An MSDN Subscription? === I'm a Java EE person who would like to climb the .NET learning curve. I've always had the impression that one important difference between Java and .NET was that the Microsoft suite required that you (or your employer) had put up some coin to get access to the tools. A Java person has the advantage of being able to download a JVM, Eclipse or NetBeans, Tomcat or Glassfish, MySQL or PostgreSQL, and they're in business. Is that still fair? What's the best way for a guy who works in a Java EE shop to learn C# without breaking the bank? Is it possible learn C# well without a paid subscription to MSDN?
4
3,190,162
07/06/2010 20:55:36
67,505
02/17/2009 18:30:08
408
37
sql connection timeout
i have my server written with structure map and fluent nhibernate, when i run my server from my pc and direct him to the db on another server i get a sqlexception that tells me that the timeout expired this is the message : Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. the line in code that marked on debug is _transaction = _session.BeginTransaction(); any suggetions? the db is mssql 2008
sql-server
fluent-nhibernate
null
null
null
null
open
sql connection timeout === i have my server written with structure map and fluent nhibernate, when i run my server from my pc and direct him to the db on another server i get a sqlexception that tells me that the timeout expired this is the message : Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. the line in code that marked on debug is _transaction = _session.BeginTransaction(); any suggetions? the db is mssql 2008
0
11,347,749
07/05/2012 15:35:13
173,773
09/15/2009 14:58:40
3,680
126
Can I/how do I recover data from crashed MobileNotes app?
My MobileNotes app (the built in Notes app for iPhone) has entered some sort of inconsistent state and is now crashing on startup. I would like to recover my notes from it (and also get the app working again, but that's secondary). Has anyone seen this, and/or succeeded at recovering their data? Starting the app gives the following stack trace/crash data: Jul 5 11:15:08 unknown MobileNotes[777] <Error>: *** Terminating app due to uncaught exception 'NSObjectInaccessibleException', reason: 'CoreData could not fulfill a fault for '0x14e620 <x-coredata://77E0D73C-42FB-4F50-A269-6459285C2296/Note/p180>'' *** First throw call stack: (0x357dc88f 0x37b83259 0x361264f3 0x36125d5b 0x36125c0b 0x20dc3 0x33270efb 0x3326ffd9 0x3326f763 0x34723 0x1a103 0x33213f37 0x3573b1fb 0x3260baa5 0x3260b6bd 0x3260f843 0x3260f57f 0x32637911 0x326378e3 0x3325510f 0x33242b33 0x33210ac3 0x33210567 0x3320ff3b 0x373cf22b 0x357b0523 0x357b04c5 0x357af313 0x357324a5 0x3573236d 0x3324186b 0x3323ecd5 0x15e67 0x1564c) Jul 5 11:15:08 unknown UIKitApplication:com.apple.mobilenotes[0xf629][777] <Notice>: terminate called throwing an exception Jul 5 11:15:09 unknown ReportCrash[778] <Notice>: Formulating crash report for process MobileNotes[777] Jul 5 11:15:09 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.apple.mobilenotes[0xf629]) Job appears to have crashed: Abort trap: 6 > Jul 5 11:15:09 unknown SpringBoard[15] <Warning>: Application 'Notes' exited abnormally with signal 6: Abort trap: 6 Jul 5 11:15:09 unknown ReportCrash[778] <Notice>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/MobileNotes_2012-07-05-111508_braglearbgle.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0 For a full crash log, see [here][1] [1]: http://snipplr.com/view/65979/iphone-crash-log/
iphone
ios
crash
mobilenotes
null
07/06/2012 04:06:46
off topic
Can I/how do I recover data from crashed MobileNotes app? === My MobileNotes app (the built in Notes app for iPhone) has entered some sort of inconsistent state and is now crashing on startup. I would like to recover my notes from it (and also get the app working again, but that's secondary). Has anyone seen this, and/or succeeded at recovering their data? Starting the app gives the following stack trace/crash data: Jul 5 11:15:08 unknown MobileNotes[777] <Error>: *** Terminating app due to uncaught exception 'NSObjectInaccessibleException', reason: 'CoreData could not fulfill a fault for '0x14e620 <x-coredata://77E0D73C-42FB-4F50-A269-6459285C2296/Note/p180>'' *** First throw call stack: (0x357dc88f 0x37b83259 0x361264f3 0x36125d5b 0x36125c0b 0x20dc3 0x33270efb 0x3326ffd9 0x3326f763 0x34723 0x1a103 0x33213f37 0x3573b1fb 0x3260baa5 0x3260b6bd 0x3260f843 0x3260f57f 0x32637911 0x326378e3 0x3325510f 0x33242b33 0x33210ac3 0x33210567 0x3320ff3b 0x373cf22b 0x357b0523 0x357b04c5 0x357af313 0x357324a5 0x3573236d 0x3324186b 0x3323ecd5 0x15e67 0x1564c) Jul 5 11:15:08 unknown UIKitApplication:com.apple.mobilenotes[0xf629][777] <Notice>: terminate called throwing an exception Jul 5 11:15:09 unknown ReportCrash[778] <Notice>: Formulating crash report for process MobileNotes[777] Jul 5 11:15:09 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.apple.mobilenotes[0xf629]) Job appears to have crashed: Abort trap: 6 > Jul 5 11:15:09 unknown SpringBoard[15] <Warning>: Application 'Notes' exited abnormally with signal 6: Abort trap: 6 Jul 5 11:15:09 unknown ReportCrash[778] <Notice>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/MobileNotes_2012-07-05-111508_braglearbgle.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0 For a full crash log, see [here][1] [1]: http://snipplr.com/view/65979/iphone-crash-log/
2
4,582,482
01/03/2011 06:27:02
347,678
05/22/2010 06:46:29
27
3
live stock ticker
i want to display live stock prices on my php website. so is there any script for this? thanks
stocks
null
null
null
null
01/04/2011 08:30:55
not a real question
live stock ticker === i want to display live stock prices on my php website. so is there any script for this? thanks
1
11,419,966
07/10/2012 18:53:03
1,324,476
04/10/2012 15:45:07
13
1
JSF OutputLink issue
Here is my portlet named program.xhtml: <script type="text/javascript"> jQuery(document).ready(function() { var clientId = '#{lookupBean.clientId}'; var formID = clientId + '\\:associateMarketingProgramForm'; var formIDToFind = '#' + formID; jQuery(formIDToFind+"\\:marketingProgramArticleId").change(function() { jQuery(formIDToFind+"\\:getMarketingProgramAssoc").click(); }); }); </script> <h:form id="associateMarketingProgramForm"> <table width="100%" border="1" bordercolor="#CCCCCC" rules="cols" cellspacing="0" cellpadding="0"> <tr> <td style="background-color: #949494; border-bottom: 1px solid #CCCCCC; color: #FFFFFF; font-weight: bold; height: 22px;" colspan="2" align="left"> &#160;&#160;&#160;#{msg.createMarketingProgramLbl}</td> </tr> <tr> <td> <div class="text-left">#{msg.createMarketingProgramLbl}</div></td> <td> <div class="text-left"> <h:outputLink style="color:blue;" value="#{liferay.portalURL}#{lookupBean.portalContext}/group/test/create"> <f:param name="p_p_id" value="15" /> <f:param name="p_p_state" value="maximized" /> <f:param name="p_p_mode" value="view" /> <f:param name="p_p_col_id" value="column-1" /> <f:param name="_15_struts_action" value="/journal/edit_article" /> <f:param name="tag" value="marketing program,news,general,general group" /> <f:param name="advancedSearch" value="true" /> <f:param name="type" value="marketing-program" /> <f:param name="custom" value="true" /> <f:param name="_15_redirect" value="/aaa/group/test/marketing-programs" /> #{msg.createLbl} </h:outputLink> , <h:outputLink style="color:blue;" value="#{liferay.portalURL}#{lookupBean.portalContext}/group/test/edit"> <f:param name="p_p_id" value="15" /> <f:param name="custom" value="true" /> <f:param name="tag" value="marketing program,news,general,general group" /> <f:param name="advancedSearch" value="true" /> <f:param name="type" value="marketing-program" /> <f:param name="_15_redirect" value="/aaa/group/test/marketing-programs" /> #{msg.editLbl} </h:outputLink> </div></td> </tr> <tr> <td>&#160;&#160;#{msg.programLbl}</td> <td><h:selectOneMenu id="marketingProgramArticleId" value="#{manageMarketingProgramsBean.marketingProgramArticleId}"> <f:selectItem itemLabel="Select Marketing Program" itemValue="" /> <f:selectItems value="#{manageMarketingProgramsBean.marketingPrograms}" /> </h:selectOneMenu> <h:message for="marketingProgramArticleId" errorClass="error" id="mpError" /> &#160;&#160; <span id="getAssocButtonDiv" style="display: none"> <h:commandButton id="getMarketingProgramAssoc" action="#{manageMarketingProgramsBean.populateMarketingProgramData}" value="Get Marketing Program Associations" > <f:setPropertyActionListener target="#{manageMarketingProgramsBean.resetProgram}" value="true" /> </h:commandButton> </span></td> <td>&#160;&#160;</td> </tr> </table> </h:form> When a option is picked up from the drop down "marketingProgramArticleId", an onchange event is called which calls the managed bean method manageMarketingProgramsBean.populateMarketingProgramData which will populate some more form data in the same portlet and reloads the same portlet program.xhtml. When the portlet tries to reload as a result of selecting an option I am getting the following exception: Error Rendering View[/WEB-INF/xhtml/program/marketing/programs.xhtml] javax.el.ELException: /WEB-INF/xhtml/program/marketing/programs.xhtml value="#{liferay.portalURL}#{ lookupBean.portalContext}/group/test/create": java.lang.NullPointerException at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:114) at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194) at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182) at javax.faces.component.UIOutput.getValue(UIOutput.java:169) at com.sun.faces.renderkit.html_basic.OutputLinkRenderer.getValue(OutputLinkRenderer.java:182) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:355) at com.sun.faces.renderkit.html_basic.OutputLinkRenderer.renderAsActive(OutputLinkRenderer.java:191) at com.sun.faces.renderkit.html_basic.OutputLinkRenderer.encodeBegin(OutputLinkRenderer.java:107) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:820) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1777) at javax.faces.render.Renderer.encodeChildren(Renderer.java:168) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779) at javax.faces.render.Renderer.encodeChildren(Renderer.java:168) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304) at com.sun.faces.renderkit.html_basic.TableRenderer.renderRow(TableRenderer.java:384) at com.sun.faces.renderkit.html_basic.TableRenderer.encodeChildren(TableRenderer.java:161) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779) at javax.faces.render.Renderer.encodeChildren(Renderer.java:168) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779) at javax.faces.render.Renderer.encodeChildren(Renderer.java:168) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:424) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125) at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288) at com.liferay.faces.bridge.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:91) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) at com.liferay.faces.bridge.lifecycle.LifecycleWrapper.render(LifecycleWrapper.java:45) at com.liferay.faces.bridge.BridgePhaseRenderImpl.execute(BridgePhaseRenderImpl.java:241) at com.liferay.faces.bridge.BridgePhaseRenderImpl.execute(BridgePhaseRenderImpl.java:84) at com.liferay.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:82) at javax.portlet.faces.GenericFacesPortlet.doBridgeDispatch(GenericFacesPortlet.java:672) at javax.portlet.faces.GenericFacesPortlet.doRenderDispatchInternal(GenericFacesPortlet.java:638) at javax.portlet.faces.GenericFacesPortlet.doView(GenericFacesPortlet.java:274) at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328) at javax.portlet.faces.GenericFacesPortlet.doDispatch(GenericFacesPortlet.java:245) at javax.portlet.GenericPortlet.render(GenericPortlet.java:233) at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100) at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:64) at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:93) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:524) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:444) at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:639) at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:726) at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java:426) at jsp_servlet._html._portal.__render_portlet._jspService(__render_portlet.java:1447) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:524) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:444) at com.liferay.portal.util.PortalImpl.renderPortlet(PortalImpl.java:4276) at com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:1324) at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processPortlet(RuntimePortletUtil.java:160) at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processPortlet(RuntimePortletUtil.java:94) at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processTemplate(RuntimePortletUtil.java:256) at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processTemplate(RuntimePortletUtil.java:181) at jsp_servlet._html._portal._layout._view.__portlet._jspService(__portlet.java:789) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:524) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:444) at com.liferay.portal.action.LayoutAction.includeLayoutContent(LayoutAction.java:409) at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:677) at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:241) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:170) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:516) at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:493) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:199) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:240) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:524) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253) at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:136) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:301) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:199) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:229) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:55) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:240) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:80) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:208) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:184) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92) at com.verisign.vcc.common.filters.BusinessAnalyticsFilter.doFilter(BusinessAnalyticsFilter.java:68) at sun.reflect.GeneratedMethodAccessor580.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:54) at $Proxy774.doFilter(Unknown Source) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.verisign.vcc.servlet.filter.InternalPortletsSecurityFilter.doFilter(InternalPortletsSecurityFilter.java:57) at sun.reflect.GeneratedMethodAccessor580.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:54) at $Proxy774.doFilter(Unknown Source) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:178) Caused by: java.lang.NullPointerException at com.liferay.faces.portal.bean.Liferay.getPortalURL(Liferay.java:153) at sun.reflect.GeneratedMethodAccessor1512.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at javax.el.BeanELResolver.getValue(BeanELResolver.java:261) at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176) at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203) at com.sun.el.parser.AstValue.getValue(AstValue.java:116) at com.sun.el.parser.AstValue.getValue(AstValue.java:163) at com.sun.el.parser.AstDeferredExpression.getValue(AstDeferredExpression.java:59) at com.sun.el.parser.AstCompositeExpression.getValue(AstCompositeExpression.java:64) at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:219) at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109) But when the portlet is loaded for the first time, everything works fine. The issue is after the onChange event on the drop down which the causes the portlet to be reloaded.
jsf-2.0
liferay-6
null
null
null
null
open
JSF OutputLink issue === Here is my portlet named program.xhtml: <script type="text/javascript"> jQuery(document).ready(function() { var clientId = '#{lookupBean.clientId}'; var formID = clientId + '\\:associateMarketingProgramForm'; var formIDToFind = '#' + formID; jQuery(formIDToFind+"\\:marketingProgramArticleId").change(function() { jQuery(formIDToFind+"\\:getMarketingProgramAssoc").click(); }); }); </script> <h:form id="associateMarketingProgramForm"> <table width="100%" border="1" bordercolor="#CCCCCC" rules="cols" cellspacing="0" cellpadding="0"> <tr> <td style="background-color: #949494; border-bottom: 1px solid #CCCCCC; color: #FFFFFF; font-weight: bold; height: 22px;" colspan="2" align="left"> &#160;&#160;&#160;#{msg.createMarketingProgramLbl}</td> </tr> <tr> <td> <div class="text-left">#{msg.createMarketingProgramLbl}</div></td> <td> <div class="text-left"> <h:outputLink style="color:blue;" value="#{liferay.portalURL}#{lookupBean.portalContext}/group/test/create"> <f:param name="p_p_id" value="15" /> <f:param name="p_p_state" value="maximized" /> <f:param name="p_p_mode" value="view" /> <f:param name="p_p_col_id" value="column-1" /> <f:param name="_15_struts_action" value="/journal/edit_article" /> <f:param name="tag" value="marketing program,news,general,general group" /> <f:param name="advancedSearch" value="true" /> <f:param name="type" value="marketing-program" /> <f:param name="custom" value="true" /> <f:param name="_15_redirect" value="/aaa/group/test/marketing-programs" /> #{msg.createLbl} </h:outputLink> , <h:outputLink style="color:blue;" value="#{liferay.portalURL}#{lookupBean.portalContext}/group/test/edit"> <f:param name="p_p_id" value="15" /> <f:param name="custom" value="true" /> <f:param name="tag" value="marketing program,news,general,general group" /> <f:param name="advancedSearch" value="true" /> <f:param name="type" value="marketing-program" /> <f:param name="_15_redirect" value="/aaa/group/test/marketing-programs" /> #{msg.editLbl} </h:outputLink> </div></td> </tr> <tr> <td>&#160;&#160;#{msg.programLbl}</td> <td><h:selectOneMenu id="marketingProgramArticleId" value="#{manageMarketingProgramsBean.marketingProgramArticleId}"> <f:selectItem itemLabel="Select Marketing Program" itemValue="" /> <f:selectItems value="#{manageMarketingProgramsBean.marketingPrograms}" /> </h:selectOneMenu> <h:message for="marketingProgramArticleId" errorClass="error" id="mpError" /> &#160;&#160; <span id="getAssocButtonDiv" style="display: none"> <h:commandButton id="getMarketingProgramAssoc" action="#{manageMarketingProgramsBean.populateMarketingProgramData}" value="Get Marketing Program Associations" > <f:setPropertyActionListener target="#{manageMarketingProgramsBean.resetProgram}" value="true" /> </h:commandButton> </span></td> <td>&#160;&#160;</td> </tr> </table> </h:form> When a option is picked up from the drop down "marketingProgramArticleId", an onchange event is called which calls the managed bean method manageMarketingProgramsBean.populateMarketingProgramData which will populate some more form data in the same portlet and reloads the same portlet program.xhtml. When the portlet tries to reload as a result of selecting an option I am getting the following exception: Error Rendering View[/WEB-INF/xhtml/program/marketing/programs.xhtml] javax.el.ELException: /WEB-INF/xhtml/program/marketing/programs.xhtml value="#{liferay.portalURL}#{ lookupBean.portalContext}/group/test/create": java.lang.NullPointerException at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:114) at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194) at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182) at javax.faces.component.UIOutput.getValue(UIOutput.java:169) at com.sun.faces.renderkit.html_basic.OutputLinkRenderer.getValue(OutputLinkRenderer.java:182) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:355) at com.sun.faces.renderkit.html_basic.OutputLinkRenderer.renderAsActive(OutputLinkRenderer.java:191) at com.sun.faces.renderkit.html_basic.OutputLinkRenderer.encodeBegin(OutputLinkRenderer.java:107) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:820) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1777) at javax.faces.render.Renderer.encodeChildren(Renderer.java:168) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779) at javax.faces.render.Renderer.encodeChildren(Renderer.java:168) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304) at com.sun.faces.renderkit.html_basic.TableRenderer.renderRow(TableRenderer.java:384) at com.sun.faces.renderkit.html_basic.TableRenderer.encodeChildren(TableRenderer.java:161) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779) at javax.faces.render.Renderer.encodeChildren(Renderer.java:168) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779) at javax.faces.render.Renderer.encodeChildren(Renderer.java:168) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:424) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125) at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288) at com.liferay.faces.bridge.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:91) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) at com.liferay.faces.bridge.lifecycle.LifecycleWrapper.render(LifecycleWrapper.java:45) at com.liferay.faces.bridge.BridgePhaseRenderImpl.execute(BridgePhaseRenderImpl.java:241) at com.liferay.faces.bridge.BridgePhaseRenderImpl.execute(BridgePhaseRenderImpl.java:84) at com.liferay.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:82) at javax.portlet.faces.GenericFacesPortlet.doBridgeDispatch(GenericFacesPortlet.java:672) at javax.portlet.faces.GenericFacesPortlet.doRenderDispatchInternal(GenericFacesPortlet.java:638) at javax.portlet.faces.GenericFacesPortlet.doView(GenericFacesPortlet.java:274) at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328) at javax.portlet.faces.GenericFacesPortlet.doDispatch(GenericFacesPortlet.java:245) at javax.portlet.GenericPortlet.render(GenericPortlet.java:233) at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100) at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:64) at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:93) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:524) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:444) at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:639) at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:726) at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java:426) at jsp_servlet._html._portal.__render_portlet._jspService(__render_portlet.java:1447) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:524) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:444) at com.liferay.portal.util.PortalImpl.renderPortlet(PortalImpl.java:4276) at com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:1324) at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processPortlet(RuntimePortletUtil.java:160) at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processPortlet(RuntimePortletUtil.java:94) at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processTemplate(RuntimePortletUtil.java:256) at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processTemplate(RuntimePortletUtil.java:181) at jsp_servlet._html._portal._layout._view.__portlet._jspService(__portlet.java:789) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:524) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:444) at com.liferay.portal.action.LayoutAction.includeLayoutContent(LayoutAction.java:409) at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:677) at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:241) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:170) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:516) at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:493) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:199) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:240) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:524) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253) at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:136) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:301) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:199) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:229) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:55) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:240) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:80) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:208) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:184) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92) at com.verisign.vcc.common.filters.BusinessAnalyticsFilter.doFilter(BusinessAnalyticsFilter.java:68) at sun.reflect.GeneratedMethodAccessor580.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:54) at $Proxy774.doFilter(Unknown Source) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.verisign.vcc.servlet.filter.InternalPortletsSecurityFilter.doFilter(InternalPortletsSecurityFilter.java:57) at sun.reflect.GeneratedMethodAccessor580.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:54) at $Proxy774.doFilter(Unknown Source) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:178) Caused by: java.lang.NullPointerException at com.liferay.faces.portal.bean.Liferay.getPortalURL(Liferay.java:153) at sun.reflect.GeneratedMethodAccessor1512.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at javax.el.BeanELResolver.getValue(BeanELResolver.java:261) at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176) at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203) at com.sun.el.parser.AstValue.getValue(AstValue.java:116) at com.sun.el.parser.AstValue.getValue(AstValue.java:163) at com.sun.el.parser.AstDeferredExpression.getValue(AstDeferredExpression.java:59) at com.sun.el.parser.AstCompositeExpression.getValue(AstCompositeExpression.java:64) at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:219) at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109) But when the portlet is loaded for the first time, everything works fine. The issue is after the onChange event on the drop down which the causes the portlet to be reloaded.
0
255,201
10/31/2008 22:55:11
23,512
09/29/2008 16:42:11
1,882
61
Splitting development of new versions from on-going fixes of in-the-field versions?
At $work, we've recently (as in three or four years ago now) split our development organisation in two (but not half): one group to develop the Next Big Thing (NBT), and the other group to handle customer-reported problems, diagnose them, and check in the fixes for the regularly-scheduled patches (development support, or DS). And the second group will then merge the changes into the NBT release as well. Allegedly, this is to help the NBT team better plan the NBT - by having their developers not being distracted by customers, planning how much of their attention can be paid to the NBT product is theoretically easier. It also is supposed to help customers by having developers specialise in supporting customers. What are your thoughts/experiences on such a split? Would you prefer this model? Would it cause you to look for further employment elsewhere? What are the pros and cons? In my experience so far, I'm finding that: * some people have quit (or, rather, forced their manager to lay them off) Others seem to prefer this (I'm not sure why) * the NBT group is further removed from customers resulting in: * less understanding of what pain points customers really have * less understanding of where customers are getting confused by the interface (whether graphical or command-line or whatever) * less ability to respond to stupid requirements with customer-related retorts * The DS group is responsible for passing on what is learned from the customer to the NBT group. * I don't know how you learn, but me and apparently most of our DS group seems to learn by experience better than by being told. So only a portion of the information will be retained relative to not having this split. * It's impossible to remember everything from a two-week customer engagement to report back to the DS group anyway, but if DS and NBT were a single group, Stupid Requirements would trigger the memory. So stuff we could have learned is never used. * The planning of the NBT is failing as too many Stupid Requirements have come in, and the NBT team has asked our DS team for extra help. The flexibility that this split has removed is still required. As you might be able to guess, I'm trying to make a case for re-merging the teams. However, I do recognise that my perspective may be getting the better of me, so I'm open to the reverse discussion: how this is helpful to the development process, and, ultimately, the customer. If you have positive experiences, I really would like to hear them, too.
untagged
null
null
null
null
07/12/2011 17:13:39
not constructive
Splitting development of new versions from on-going fixes of in-the-field versions? === At $work, we've recently (as in three or four years ago now) split our development organisation in two (but not half): one group to develop the Next Big Thing (NBT), and the other group to handle customer-reported problems, diagnose them, and check in the fixes for the regularly-scheduled patches (development support, or DS). And the second group will then merge the changes into the NBT release as well. Allegedly, this is to help the NBT team better plan the NBT - by having their developers not being distracted by customers, planning how much of their attention can be paid to the NBT product is theoretically easier. It also is supposed to help customers by having developers specialise in supporting customers. What are your thoughts/experiences on such a split? Would you prefer this model? Would it cause you to look for further employment elsewhere? What are the pros and cons? In my experience so far, I'm finding that: * some people have quit (or, rather, forced their manager to lay them off) Others seem to prefer this (I'm not sure why) * the NBT group is further removed from customers resulting in: * less understanding of what pain points customers really have * less understanding of where customers are getting confused by the interface (whether graphical or command-line or whatever) * less ability to respond to stupid requirements with customer-related retorts * The DS group is responsible for passing on what is learned from the customer to the NBT group. * I don't know how you learn, but me and apparently most of our DS group seems to learn by experience better than by being told. So only a portion of the information will be retained relative to not having this split. * It's impossible to remember everything from a two-week customer engagement to report back to the DS group anyway, but if DS and NBT were a single group, Stupid Requirements would trigger the memory. So stuff we could have learned is never used. * The planning of the NBT is failing as too many Stupid Requirements have come in, and the NBT team has asked our DS team for extra help. The flexibility that this split has removed is still required. As you might be able to guess, I'm trying to make a case for re-merging the teams. However, I do recognise that my perspective may be getting the better of me, so I'm open to the reverse discussion: how this is helpful to the development process, and, ultimately, the customer. If you have positive experiences, I really would like to hear them, too.
4
10,772,734
05/27/2012 08:41:33
1,419,919
05/27/2012 08:31:12
1
0
Flex: How to set the text of label in for loop?
I have a label in datagrid column. I want to set value to the label such that the label value will increment for each row according to the number of rows in grid. I wrote a simple for loop like this for(i=1;i<=invArrayCol.length;i++) { srno.text=""+i; } where srno is id given to the label and invArrayCol is the ArrayCollectionObject which is the dataprovider to the grid. It shows me the access to undefined property srno
actionscript-3
flex
null
null
null
null
open
Flex: How to set the text of label in for loop? === I have a label in datagrid column. I want to set value to the label such that the label value will increment for each row according to the number of rows in grid. I wrote a simple for loop like this for(i=1;i<=invArrayCol.length;i++) { srno.text=""+i; } where srno is id given to the label and invArrayCol is the ArrayCollectionObject which is the dataprovider to the grid. It shows me the access to undefined property srno
0
7,788,462
10/17/2011 01:00:19
636,324
02/27/2011 09:42:37
45
0
project euler 215 in java
I wrote this solution to [Project Euler #215][1] in java. It doesn't complete the calculations for W(32,10) in less than a minute and It needs to. I was hoping I could get some advice on how to make it faster. [1]: http://projecteuler.net/problem=215 import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.HashMap; import java.util.Map; class BlockCombos { static ArrayList<String> possibleRows = new ArrayList<String>(); static long validWalls = 0; static Map<Integer, List> map = new HashMap<Integer, List>(); static int[][] cache; public static void main(String[] args) { if (args.length != 2) { System.out.println("Error: You need to enter a height and width."); } else { int height = Integer.parseInt(args[1]); int width = Integer.parseInt(args[0]); //numbers proportionate to block widths //reduced for less overhead (actual widths do not matter) ArrayList<Integer> numbers = new ArrayList<Integer>(); numbers.add(new Integer(2)); numbers.add(new Integer(3)); startGetBlockCombos(numbers,width); int i = 0; //initial row for(String row : possibleRows) { //possible rows char[] rowArr = row.toCharArray(); List<Integer> compatiblerows = new ArrayList<Integer>(); int k = 0; //rowtocheck index for(String rowToCheck : possibleRows) { char[] rowToCheckArr = rowToCheck.toCharArray(); for(int x = 0; x < rowToCheckArr.length-1; x++) { if(rowArr[x] == '1' && rowToCheckArr[x] == '1') { //set not compatible break; } else if (x == rowToCheckArr.length-2) { compatiblerows.add(k); } } k ++; //rowtocheck index } Integer key = new Integer(i); map.put(key, compatiblerows); i++; //row index } possibleRows.clear(); //a little clean up cache = new int[map.size()][height]; startBuildWalls(height); System.out.print(validWalls); } } static void startBuildWalls(int height) { height = height-1; for(int x = 0; x < map.size(); x++) { buildWalls(x, height); } //testing threads from static method } static void buildWalls(int currentRow, int rowsToGo) { rowsToGo -=1; if(rowsToGo > 0) { @SuppressWarnings("unchecked") List<Integer> nextRows = (List<Integer>)map.get(Integer.valueOf(currentRow)); for(int row : nextRows) { buildWalls(row,rowsToGo); } } else { validWalls++; return; } } static void startGetBlockCombos(ArrayList<Integer> numbers, int target) { ArrayList<Integer> part = new ArrayList<Integer>(); getBlockCombos(numbers,target,part); } static void getBlockCombos(ArrayList<Integer> numbers, int target, ArrayList<Integer> partial) { int s = 0; for (int x: partial) { s += x; } if (s == target) { Integer row[] = new Integer[partial.size()]; row = partial.toArray(row); String rowString = ""; for (int b : row) { if (b == 2) { rowString = rowString +"01"; } else { rowString = rowString + "001"; } } BlockCombos.possibleRows.add(rowString); } else if (s > target) { return; } for(int i=0;i<2;i++) { int n = numbers.get(i); ArrayList<Integer> partial_rec = new ArrayList<Integer>(partial); partial_rec.add(n); getBlockCombos(numbers,target,partial_rec); } } }
java
project-euler
null
null
null
10/17/2011 13:39:58
not constructive
project euler 215 in java === I wrote this solution to [Project Euler #215][1] in java. It doesn't complete the calculations for W(32,10) in less than a minute and It needs to. I was hoping I could get some advice on how to make it faster. [1]: http://projecteuler.net/problem=215 import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.HashMap; import java.util.Map; class BlockCombos { static ArrayList<String> possibleRows = new ArrayList<String>(); static long validWalls = 0; static Map<Integer, List> map = new HashMap<Integer, List>(); static int[][] cache; public static void main(String[] args) { if (args.length != 2) { System.out.println("Error: You need to enter a height and width."); } else { int height = Integer.parseInt(args[1]); int width = Integer.parseInt(args[0]); //numbers proportionate to block widths //reduced for less overhead (actual widths do not matter) ArrayList<Integer> numbers = new ArrayList<Integer>(); numbers.add(new Integer(2)); numbers.add(new Integer(3)); startGetBlockCombos(numbers,width); int i = 0; //initial row for(String row : possibleRows) { //possible rows char[] rowArr = row.toCharArray(); List<Integer> compatiblerows = new ArrayList<Integer>(); int k = 0; //rowtocheck index for(String rowToCheck : possibleRows) { char[] rowToCheckArr = rowToCheck.toCharArray(); for(int x = 0; x < rowToCheckArr.length-1; x++) { if(rowArr[x] == '1' && rowToCheckArr[x] == '1') { //set not compatible break; } else if (x == rowToCheckArr.length-2) { compatiblerows.add(k); } } k ++; //rowtocheck index } Integer key = new Integer(i); map.put(key, compatiblerows); i++; //row index } possibleRows.clear(); //a little clean up cache = new int[map.size()][height]; startBuildWalls(height); System.out.print(validWalls); } } static void startBuildWalls(int height) { height = height-1; for(int x = 0; x < map.size(); x++) { buildWalls(x, height); } //testing threads from static method } static void buildWalls(int currentRow, int rowsToGo) { rowsToGo -=1; if(rowsToGo > 0) { @SuppressWarnings("unchecked") List<Integer> nextRows = (List<Integer>)map.get(Integer.valueOf(currentRow)); for(int row : nextRows) { buildWalls(row,rowsToGo); } } else { validWalls++; return; } } static void startGetBlockCombos(ArrayList<Integer> numbers, int target) { ArrayList<Integer> part = new ArrayList<Integer>(); getBlockCombos(numbers,target,part); } static void getBlockCombos(ArrayList<Integer> numbers, int target, ArrayList<Integer> partial) { int s = 0; for (int x: partial) { s += x; } if (s == target) { Integer row[] = new Integer[partial.size()]; row = partial.toArray(row); String rowString = ""; for (int b : row) { if (b == 2) { rowString = rowString +"01"; } else { rowString = rowString + "001"; } } BlockCombos.possibleRows.add(rowString); } else if (s > target) { return; } for(int i=0;i<2;i++) { int n = numbers.get(i); ArrayList<Integer> partial_rec = new ArrayList<Integer>(partial); partial_rec.add(n); getBlockCombos(numbers,target,partial_rec); } } }
4
9,862,771
03/25/2012 18:25:13
1,291,604
03/25/2012 17:59:10
1
0
Any ideas on how to create accurate orbital gravity using box2d?
I am trying to create an accurate orbital gravity system using box2d, basically; i want to be able to shoot a bullet on earth and depending on how fast this bullet goes, it will escape from earth, stay in orbit around earth or will land e.g.240 degrees or 45 degrees on the earth surface. (assuming, the bullet will fire at 0 degree) I did a lot of research and already dove into the physics laws of newton etc. Basic applyforce does not seem to do the job accurate enough. I also found the formula which calculates the needed velocity for an object to stay in orbit, and I managed to make this happen within box2d. However, if I want to stop the bullet, the bullet will not fall on earth again. (apply force is used for radial gravity and the second apply force is used to move the bullet to the "right" ) It will stay in orbit. Only if I add damping, the bullet will fall back to earth, but this seems wrong to me. When the bullet collides with something else, it also will damp. i tought that the main issue here is to modify the velocity for the bullet. The bullet takes an x amount of time to land on lets say: 180 degree. How further away the bullet is from earth surface, the more velocity it takes to land on 180 degree the same amount of time. I think that velocity is the key to make true accurate radial gravity, but my question is; is this true, what do you guys think, does anyone have a similar scenario?? How does one control speed in the most proper way, without using damping and setlinearvelocity?? I also want to be able to control the speed needed to let the bullet orbit, escape or land back on earth. This should be possible, since there is also a formula that calculates the orbit velocity. E.g. When it goes wrong, the bullet is moving too fast, will escape from earth, but will move back, because earth gravity will modify the path of the bullet. Btw: i did search a lot on internet, but cannot really link that stuff to practical box2d code, so i hope, someone can point me the right direction. Kind regards!
box2d
gravity
radial
accurate
null
null
open
Any ideas on how to create accurate orbital gravity using box2d? === I am trying to create an accurate orbital gravity system using box2d, basically; i want to be able to shoot a bullet on earth and depending on how fast this bullet goes, it will escape from earth, stay in orbit around earth or will land e.g.240 degrees or 45 degrees on the earth surface. (assuming, the bullet will fire at 0 degree) I did a lot of research and already dove into the physics laws of newton etc. Basic applyforce does not seem to do the job accurate enough. I also found the formula which calculates the needed velocity for an object to stay in orbit, and I managed to make this happen within box2d. However, if I want to stop the bullet, the bullet will not fall on earth again. (apply force is used for radial gravity and the second apply force is used to move the bullet to the "right" ) It will stay in orbit. Only if I add damping, the bullet will fall back to earth, but this seems wrong to me. When the bullet collides with something else, it also will damp. i tought that the main issue here is to modify the velocity for the bullet. The bullet takes an x amount of time to land on lets say: 180 degree. How further away the bullet is from earth surface, the more velocity it takes to land on 180 degree the same amount of time. I think that velocity is the key to make true accurate radial gravity, but my question is; is this true, what do you guys think, does anyone have a similar scenario?? How does one control speed in the most proper way, without using damping and setlinearvelocity?? I also want to be able to control the speed needed to let the bullet orbit, escape or land back on earth. This should be possible, since there is also a formula that calculates the orbit velocity. E.g. When it goes wrong, the bullet is moving too fast, will escape from earth, but will move back, because earth gravity will modify the path of the bullet. Btw: i did search a lot on internet, but cannot really link that stuff to practical box2d code, so i hope, someone can point me the right direction. Kind regards!
0
10,851,866
06/01/2012 14:11:05
883,105
08/07/2011 20:31:50
1
1
What Facebook use for jquery working in IE old versions
I have developed a social networking site. I have developed chatting environment in jQuery. But, this is working fine in mozilla and chrome and also IE9. Unluckily it is not working in IE old versions. I have viewed source of Facebook, I saw some bigpipe methods in script tags. I am unfamiliar with all this. I am unable to find out the solution to make my code work on IE olds. My client argues that if FB is working in IE olds versions then why not our site. Please help.
jquery
facebook
jquery-ui
null
null
06/01/2012 22:31:06
not a real question
What Facebook use for jquery working in IE old versions === I have developed a social networking site. I have developed chatting environment in jQuery. But, this is working fine in mozilla and chrome and also IE9. Unluckily it is not working in IE old versions. I have viewed source of Facebook, I saw some bigpipe methods in script tags. I am unfamiliar with all this. I am unable to find out the solution to make my code work on IE olds. My client argues that if FB is working in IE olds versions then why not our site. Please help.
1
11,076,945
06/18/2012 04:31:24
1,314,162
04/05/2012 01:24:25
1
0
Broke Emacs 24 on Lion 10.7.4
I just managed to break my beloved Emacs on Lion and hope that all the time and effort i put into configuring it isn't lost. I recently decided to uninstall macports and solely use homebrew via sudo port -f uninstall installed and removed all relevant directories. I am using Emacs Prelude, and installed it with homebrew. I am now getting the following error message on startup (excerpt): Application Specific Information: dyld: launch, loading dependent libraries Dyld Error Message: Library not loaded: /opt/local/lib/libncurses.5.dylib Referenced from: /usr/local/Cellar/emacs/HEAD/Emacs.app/Contents/MacOS/Emacs Reason: no suitable image found. Did find: /usr/lib/libncurses.5.dylib: mach-o, but wrong architecture I understand that it's a problem with ncurses, but i have no idea how to re-install it properly. Any help is appreciated!
emacs
osx-lion
macports
ncurses
null
06/25/2012 15:57:29
off topic
Broke Emacs 24 on Lion 10.7.4 === I just managed to break my beloved Emacs on Lion and hope that all the time and effort i put into configuring it isn't lost. I recently decided to uninstall macports and solely use homebrew via sudo port -f uninstall installed and removed all relevant directories. I am using Emacs Prelude, and installed it with homebrew. I am now getting the following error message on startup (excerpt): Application Specific Information: dyld: launch, loading dependent libraries Dyld Error Message: Library not loaded: /opt/local/lib/libncurses.5.dylib Referenced from: /usr/local/Cellar/emacs/HEAD/Emacs.app/Contents/MacOS/Emacs Reason: no suitable image found. Did find: /usr/lib/libncurses.5.dylib: mach-o, but wrong architecture I understand that it's a problem with ncurses, but i have no idea how to re-install it properly. Any help is appreciated!
2
1,764,600
11/19/2009 16:28:03
62,143
02/03/2009 21:39:57
160
10
/bin/sh invoked from make doesn't find command with unquoted dash-argument
I have a makefile to build some transducers using Xerox' finite state tools (xfst in this case), which I invoke in my makefile like so (except with a hard tab instead of spaces in the actual makefile, of course): latin.fst: nouns.fst verbs.fst xfst -f build/latin.fst.build On my laptop (a Mac with OS X 10.6.2) this works just fine, but on my university's Linux machines I get this error: make: xfst: Command not found make: *** [nouns.fst] Error 127 After some debugging I've found two ways to fix this problem. The first is to quote the `-f` argument to xfst: `"-f"`, the other is to say `SHELL=/bin/bash` at the top of the makefile. From the second fix (and how make works) it looks like the problem is with how /bin/sh executes the command. Now, /bin/sh is linked to /bin/bash, so it's not because of some kind of weird shell being installed as /bin/sh. Also, invoking /bin/sh and running the commands, or invoking `/bin/sh -c "xfst -f build/latin.fst.build"` works just dandy. Make is GNU Make 3.81, bash is GNU bash, version 3.2.25(1)-release. Does anyone have any idea what's going on here?
make
shell
bash
null
null
null
open
/bin/sh invoked from make doesn't find command with unquoted dash-argument === I have a makefile to build some transducers using Xerox' finite state tools (xfst in this case), which I invoke in my makefile like so (except with a hard tab instead of spaces in the actual makefile, of course): latin.fst: nouns.fst verbs.fst xfst -f build/latin.fst.build On my laptop (a Mac with OS X 10.6.2) this works just fine, but on my university's Linux machines I get this error: make: xfst: Command not found make: *** [nouns.fst] Error 127 After some debugging I've found two ways to fix this problem. The first is to quote the `-f` argument to xfst: `"-f"`, the other is to say `SHELL=/bin/bash` at the top of the makefile. From the second fix (and how make works) it looks like the problem is with how /bin/sh executes the command. Now, /bin/sh is linked to /bin/bash, so it's not because of some kind of weird shell being installed as /bin/sh. Also, invoking /bin/sh and running the commands, or invoking `/bin/sh -c "xfst -f build/latin.fst.build"` works just dandy. Make is GNU Make 3.81, bash is GNU bash, version 3.2.25(1)-release. Does anyone have any idea what's going on here?
0
11,351,702
07/05/2012 20:00:48
197,340
10/27/2009 13:26:40
180
8
Telerik TreeView | NodeExpand event is providing the wrong node value when using NodeTemplate
I am using Telerik version: 2009.3.1208.0 My task is to add an arrow to the node (on the right side of the node) so people can left-click on it and access context menu. ![enter image description here][1] I was able to to do that through creating a nodetemplate (subscribing to an interface) and then assigning my class to NodeTemplate property (on Page Init) Here is the code: Imports System.Web.UI Imports System.Web.UI.WebControls Imports Telerik.Web.UI Public Class MyNodeTemplate Implements ITemplate Public Sub InstantiateIn(ByVal container As Control) Implements ITemplate.InstantiateIn Dim newLabel As New Label() newLabel.CssClass = "nodeLabel" newLabel.Text = DirectCast(container, RadTreeNode).Text Dim arrowDiv As New System.Web.UI.HtmlControls.HtmlGenericControl("DIV") arrowDiv.Attributes.Add("class", "nodeRightClickArrow") arrowDiv.Attributes.Add("onclick", "LeftClickContextMenuClick(event, this);") container.Controls.Add(newLabel) container.Controls.Add(arrowDiv) End Sub End Class Everything seems fine **EXCEPT**: When expanding one of the nodes, the **NodeExpand Event sends the wrong value for the node that is being expanded**. For example, if I expand Node 3, it gives me value (e.Node.Value) for Node 1. See picture below for more explanation. As a result wrong child nodes are loaded. ![enter image description here][2] Questions: 1) Why NodeExpand is broken when NodeTemplate is being added ? 2) Any way to achieve adding an arrow to the node so people can left-click on it without overwriting NodeTemplate? [1]: http://i.stack.imgur.com/yOvC8.png [2]: http://i.stack.imgur.com/rdJ7l.png
c#
asp.net
vb.net
treeview
telerik
null
open
Telerik TreeView | NodeExpand event is providing the wrong node value when using NodeTemplate === I am using Telerik version: 2009.3.1208.0 My task is to add an arrow to the node (on the right side of the node) so people can left-click on it and access context menu. ![enter image description here][1] I was able to to do that through creating a nodetemplate (subscribing to an interface) and then assigning my class to NodeTemplate property (on Page Init) Here is the code: Imports System.Web.UI Imports System.Web.UI.WebControls Imports Telerik.Web.UI Public Class MyNodeTemplate Implements ITemplate Public Sub InstantiateIn(ByVal container As Control) Implements ITemplate.InstantiateIn Dim newLabel As New Label() newLabel.CssClass = "nodeLabel" newLabel.Text = DirectCast(container, RadTreeNode).Text Dim arrowDiv As New System.Web.UI.HtmlControls.HtmlGenericControl("DIV") arrowDiv.Attributes.Add("class", "nodeRightClickArrow") arrowDiv.Attributes.Add("onclick", "LeftClickContextMenuClick(event, this);") container.Controls.Add(newLabel) container.Controls.Add(arrowDiv) End Sub End Class Everything seems fine **EXCEPT**: When expanding one of the nodes, the **NodeExpand Event sends the wrong value for the node that is being expanded**. For example, if I expand Node 3, it gives me value (e.Node.Value) for Node 1. See picture below for more explanation. As a result wrong child nodes are loaded. ![enter image description here][2] Questions: 1) Why NodeExpand is broken when NodeTemplate is being added ? 2) Any way to achieve adding an arrow to the node so people can left-click on it without overwriting NodeTemplate? [1]: http://i.stack.imgur.com/yOvC8.png [2]: http://i.stack.imgur.com/rdJ7l.png
0
9,651,922
03/11/2012 02:32:30
1,244,626
03/02/2012 08:28:44
6
0
Tab not selecting with change in selected form
i have a tabforms in my application and whenever i open the multiple forms the tabs open in usual manner but whenever i open the form which is already opened the selected tab doesnt get changed.it gets stuck to the tab which is opened at last.My code is here. private void Form1_MdiChildActivate(object sender, EventArgs e) { if (this.ActiveMdiChild == null) tabForms.Visible = false; // If no any child form, hide tabControl else { this.ActiveMdiChild.WindowState = FormWindowState.Maximized; // Child form always maximized // If child form is new and no has tabPage, // create new tabPage if (this.ActiveMdiChild.Tag == null) { // Add a tabPage to tabControl with child // form caption TabPage tp = new TabPage(this.ActiveMdiChild.Text); tp.Tag = this.ActiveMdiChild; tp.Parent = tabForms; tabForms.SelectedTab = tp; SwapTabPages(tp); this.ActiveMdiChild.Tag = tp; this.ActiveMdiChild.FormClosed += new FormClosedEventHandler(ActiveMdiChild_FormClosed); } if (!tabForms.Visible) tabForms.Visible = true; } } private void ActiveMdiChild_FormClosed(object sender, FormClosedEventArgs e) { //Destroy the corresponding Tabpage when closing MDI child form if (tabForms.HasChildren) { ((sender as Form).Tag as TabPage).Dispose(); } //If no Tabpage left else if (!tabForms.HasChildren) { tabForms.Visible = false; } } private void tabForms_SelectedIndexChanged(object sender, EventArgs e) { if ((tabForms.SelectedTab != null) && (tabForms.SelectedTab.Tag != null)) (tabForms.SelectedTab.Tag as Form).Select(); }
c#
null
null
null
null
03/15/2012 09:15:28
not a real question
Tab not selecting with change in selected form === i have a tabforms in my application and whenever i open the multiple forms the tabs open in usual manner but whenever i open the form which is already opened the selected tab doesnt get changed.it gets stuck to the tab which is opened at last.My code is here. private void Form1_MdiChildActivate(object sender, EventArgs e) { if (this.ActiveMdiChild == null) tabForms.Visible = false; // If no any child form, hide tabControl else { this.ActiveMdiChild.WindowState = FormWindowState.Maximized; // Child form always maximized // If child form is new and no has tabPage, // create new tabPage if (this.ActiveMdiChild.Tag == null) { // Add a tabPage to tabControl with child // form caption TabPage tp = new TabPage(this.ActiveMdiChild.Text); tp.Tag = this.ActiveMdiChild; tp.Parent = tabForms; tabForms.SelectedTab = tp; SwapTabPages(tp); this.ActiveMdiChild.Tag = tp; this.ActiveMdiChild.FormClosed += new FormClosedEventHandler(ActiveMdiChild_FormClosed); } if (!tabForms.Visible) tabForms.Visible = true; } } private void ActiveMdiChild_FormClosed(object sender, FormClosedEventArgs e) { //Destroy the corresponding Tabpage when closing MDI child form if (tabForms.HasChildren) { ((sender as Form).Tag as TabPage).Dispose(); } //If no Tabpage left else if (!tabForms.HasChildren) { tabForms.Visible = false; } } private void tabForms_SelectedIndexChanged(object sender, EventArgs e) { if ((tabForms.SelectedTab != null) && (tabForms.SelectedTab.Tag != null)) (tabForms.SelectedTab.Tag as Form).Select(); }
1
4,383,377
12/08/2010 01:26:06
234,175
12/17/2009 22:06:35
191
18
'Go' windows port build problems: 8l linker crashes
I'm looking to give the 'Go' programming language a try but I'm having trouble getting even a simple test example to work. I think it's probably an issue with the port so I've submitted a ticket under issues in gomingw project page. > What steps will reproduce the problem? > 1. Create any simple go test program > 2. compile it with 8g. ie. 8g hello.go > 3. link it with 8l. ie. 8l hello.8 > > What is the expected output? What do you see instead? > I expect 8l to link successfully with no errors. Instead I see the > follow errors output followed with a > crash. > goos is not known: mingw > warning: uanble to find runtime.a > runtime.morestack not defined > > What version of the product are you using? On what operating system? > This is on windows 7 with gowin32_2010-12-02.zip > > Please provide any additional information below. > I have set the 4 standard go variables on my environment as > follows: > goos = mingw, gobin = G:\oss\go\bin, goarch = 386, goroot = > G:\oss\go > > From looking at the error, I'm going to say it looks like it needs > something from mingw gcc toolset? > Though I see no mention of this > requirement anywhere, neither in the > readme or install. What is the > runtime.a that is missing? Is it part > of mingw? I've also tried one version > before this latest one and the problem > is present on that version as well. Has anyone else that's tried Go's port of windows encountered an issue like this? What could be causing this? Thanks
winapi
go
linker-error
null
null
null
open
'Go' windows port build problems: 8l linker crashes === I'm looking to give the 'Go' programming language a try but I'm having trouble getting even a simple test example to work. I think it's probably an issue with the port so I've submitted a ticket under issues in gomingw project page. > What steps will reproduce the problem? > 1. Create any simple go test program > 2. compile it with 8g. ie. 8g hello.go > 3. link it with 8l. ie. 8l hello.8 > > What is the expected output? What do you see instead? > I expect 8l to link successfully with no errors. Instead I see the > follow errors output followed with a > crash. > goos is not known: mingw > warning: uanble to find runtime.a > runtime.morestack not defined > > What version of the product are you using? On what operating system? > This is on windows 7 with gowin32_2010-12-02.zip > > Please provide any additional information below. > I have set the 4 standard go variables on my environment as > follows: > goos = mingw, gobin = G:\oss\go\bin, goarch = 386, goroot = > G:\oss\go > > From looking at the error, I'm going to say it looks like it needs > something from mingw gcc toolset? > Though I see no mention of this > requirement anywhere, neither in the > readme or install. What is the > runtime.a that is missing? Is it part > of mingw? I've also tried one version > before this latest one and the problem > is present on that version as well. Has anyone else that's tried Go's port of windows encountered an issue like this? What could be causing this? Thanks
0
6,186,835
05/31/2011 11:24:06
724,124
04/25/2011 17:58:12
13
0
Haskell: Excluding computed results from a map of [1..]?
I'm currently working on a program which computes amicable pairs (Project Euler 21). I've already found the solution, however I noticed that a flaw in my program was that it evaluates all of the numbers of the set [1..] whether or not we have already found the number to be a pair. i.e. If currently evaluating 220 and 284 is found to be it's pair, however continuing on through when the map function gets to 284 it shouldn't evaluate it again. import Data.List properDivisors :: (Integral a) => a -> [a] properDivisors n = [x | x <- [1..n `div` 2], n `mod` x == 0 ] amicablePair :: (Integral a) => a -> Maybe a amicablePair a | a == b = Nothing | a == dOf b = Just b | otherwise = Nothing where dOf x = sum (properDivisors x) b = dOf a getAmicablePair :: (Integral a) => a -> [a] getAmicablePair a = case amicablePair a of Just b -> [a,b] Nothing -> [] amicables = foldr (++) [] ams where ams = map getAmicablePair [1..] I'm fairly new to Haskell and functional programming so forgive me if it an obvious solution.
list
haskell
folding
infinite
null
null
open
Haskell: Excluding computed results from a map of [1..]? === I'm currently working on a program which computes amicable pairs (Project Euler 21). I've already found the solution, however I noticed that a flaw in my program was that it evaluates all of the numbers of the set [1..] whether or not we have already found the number to be a pair. i.e. If currently evaluating 220 and 284 is found to be it's pair, however continuing on through when the map function gets to 284 it shouldn't evaluate it again. import Data.List properDivisors :: (Integral a) => a -> [a] properDivisors n = [x | x <- [1..n `div` 2], n `mod` x == 0 ] amicablePair :: (Integral a) => a -> Maybe a amicablePair a | a == b = Nothing | a == dOf b = Just b | otherwise = Nothing where dOf x = sum (properDivisors x) b = dOf a getAmicablePair :: (Integral a) => a -> [a] getAmicablePair a = case amicablePair a of Just b -> [a,b] Nothing -> [] amicables = foldr (++) [] ams where ams = map getAmicablePair [1..] I'm fairly new to Haskell and functional programming so forgive me if it an obvious solution.
0
10,686,076
05/21/2012 13:21:25
1,120,878
12/29/2011 09:52:18
35
0
recursive algorithm for specific tree
I want to a recursive algorithm for a specific binary tree with following property. 1) At the time of insertion the node should enter at left first then right. 2) if node should insert at next level only if previous level is fully filled. Sorry I don't know the Name of this type of specific tree. Please tell me the name if such specific tree exist.
c++
c
algorithm
genetic-algorithm
null
05/26/2012 16:01:16
not a real question
recursive algorithm for specific tree === I want to a recursive algorithm for a specific binary tree with following property. 1) At the time of insertion the node should enter at left first then right. 2) if node should insert at next level only if previous level is fully filled. Sorry I don't know the Name of this type of specific tree. Please tell me the name if such specific tree exist.
1
6,066,618
05/20/2011 01:34:21
762,006
05/20/2011 01:34:21
1
0
Help with Compiler Erroe C2440 in C++
i am getting a C2440 compiler error when i build my program but cant figure out how to fix it Here is the line it comes up on: if((*Iter)->classID != classID && (*Iter)->getX() == (int)pos.x && (int)(*Iter)->getY == (int)pos.y) PLEASE HELP!!!
c++
visual-studio-2008
winapi
null
null
05/20/2011 03:14:40
not a real question
Help with Compiler Erroe C2440 in C++ === i am getting a C2440 compiler error when i build my program but cant figure out how to fix it Here is the line it comes up on: if((*Iter)->classID != classID && (*Iter)->getX() == (int)pos.x && (int)(*Iter)->getY == (int)pos.y) PLEASE HELP!!!
1
7,872,147
10/24/2011 06:52:10
874,014
08/02/2011 06:39:24
1
0
javascript code for downloading image from server
i have a web page. on clicking the download button the image which is stored in the server should be downloaded to the local system. Can anyone provide the javascript code for this..
javascript
null
null
null
null
null
open
javascript code for downloading image from server === i have a web page. on clicking the download button the image which is stored in the server should be downloaded to the local system. Can anyone provide the javascript code for this..
0
9,051,331
01/29/2012 06:14:41
951,202
09/18/2011 12:12:45
70
1
How to insert the rows in the database mysql table in the following?
I have two table named: **Blog** for displaying blogs post and **comments** for displaying comments section for each blog post. The fields for these are as follows: **For Blog:** 1: blog_id 2: title 3: body 4: author 5: updated **For Comments:** 1: comments_id 2: username 3: email 4: comment_body 5: blog_id The field **blog_id** must be the same for both the table. Now what i want is that suppose for blog_id = "2", I am writing comment, so what would be the insert query so that when i visit index.php?blog_id=2, I get the comments for only that particular post. **I mean how to insert the comments for a particular blog_id?**
mysql
null
null
null
null
null
open
How to insert the rows in the database mysql table in the following? === I have two table named: **Blog** for displaying blogs post and **comments** for displaying comments section for each blog post. The fields for these are as follows: **For Blog:** 1: blog_id 2: title 3: body 4: author 5: updated **For Comments:** 1: comments_id 2: username 3: email 4: comment_body 5: blog_id The field **blog_id** must be the same for both the table. Now what i want is that suppose for blog_id = "2", I am writing comment, so what would be the insert query so that when i visit index.php?blog_id=2, I get the comments for only that particular post. **I mean how to insert the comments for a particular blog_id?**
0
11,025,756
06/14/2012 02:04:03
832,394
07/06/2011 20:55:47
33
0
String values loose value orientation with internationalization android
I'm developing an Android app that uses Internationalization. So i have the folders values-language (e.g. values-en, values-br) in my solution. The internationalization is working well. The problem is when i combine it with orientation elements. I have also one xml file for landscape and other for portrait. I have the folders layout-orientation (e.g layout-port). The orientation is working well too. I accomplish this by overhiding the following method: public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); setContentView(R.layout.main); } But i'm having problems with the string values (labels). When i change the orientation, all the string values loose data and appers as ids. For example, I have a button that has a label "SAVE". When i rotate my phone, the label of the button changes to "@23232324" which is the number of the resource. What can I do? I've tried to create portrait and landscape folders for each language that I have but didn't work (e.g values-br-port, values-br-land). I need to keep both working, orientation and internationalization. I need to have two different layouts based on the orientation and also different languages.
android
application
internationalization
orientation
null
null
open
String values loose value orientation with internationalization android === I'm developing an Android app that uses Internationalization. So i have the folders values-language (e.g. values-en, values-br) in my solution. The internationalization is working well. The problem is when i combine it with orientation elements. I have also one xml file for landscape and other for portrait. I have the folders layout-orientation (e.g layout-port). The orientation is working well too. I accomplish this by overhiding the following method: public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); setContentView(R.layout.main); } But i'm having problems with the string values (labels). When i change the orientation, all the string values loose data and appers as ids. For example, I have a button that has a label "SAVE". When i rotate my phone, the label of the button changes to "@23232324" which is the number of the resource. What can I do? I've tried to create portrait and landscape folders for each language that I have but didn't work (e.g values-br-port, values-br-land). I need to keep both working, orientation and internationalization. I need to have two different layouts based on the orientation and also different languages.
0
10,201,406
04/18/2012 01:06:15
1,338,697
04/17/2012 12:07:57
1
0
How to make toast message with two button pressed
How to make toast message with 2 button... if pressing two buttons then toast message... please help me...
android
toast
null
null
null
04/18/2012 02:51:43
not a real question
How to make toast message with two button pressed === How to make toast message with 2 button... if pressing two buttons then toast message... please help me...
1
6,178,446
05/30/2011 16:04:11
353,878
05/30/2010 06:35:08
474
22
Why can't I use Record.all.destroy in Rails?
I'm currently beginning to learn Ruby and the Ruby on Rails framework. I've found that in the table `records`, I can find a record with an id of 5 and delete it by using the following code: `Record.find(5).destroy` This makes sense- I chain methods to find the record and destroy it. However, if I want to destroy all the records in the table, the logical command would be the following, as `all` selects all the records in the table: `Record.all.destroy` And this returns a NoMethodError! I am aware that I can use `Record.destroy_all` or `Record.delete_all` to accomplish this task, however, I'd like to know why I can't just use the most logical choice instead of having to look up things like `delete_all`. I am new to this framework, so it's entirely possible that I'm missing something fundamental here. Thanks for any answers in advance.
ruby-on-rails
ruby
null
null
null
null
open
Why can't I use Record.all.destroy in Rails? === I'm currently beginning to learn Ruby and the Ruby on Rails framework. I've found that in the table `records`, I can find a record with an id of 5 and delete it by using the following code: `Record.find(5).destroy` This makes sense- I chain methods to find the record and destroy it. However, if I want to destroy all the records in the table, the logical command would be the following, as `all` selects all the records in the table: `Record.all.destroy` And this returns a NoMethodError! I am aware that I can use `Record.destroy_all` or `Record.delete_all` to accomplish this task, however, I'd like to know why I can't just use the most logical choice instead of having to look up things like `delete_all`. I am new to this framework, so it's entirely possible that I'm missing something fundamental here. Thanks for any answers in advance.
0
11,323,311
07/04/2012 06:08:44
1,374,162
05/04/2012 05:23:03
487
33
how to clear cell css style and rowspan in c#
Below is my html table. In first table first tr first cell i have given csstdgreen to td. and second cell have csstdgreen with rowspan 3. I have to clear csstdgreen and rowspan and like to convert second table tr. I have loop through table and check cell have csstdgreen and how many rowspan. if cell have csstdgreen and rowspan then make first table like second table. How i check css and rowspan in c# server side.I search google but not get. //First Table <table id="mytable" runat="server"> <tr class="csstablelisttd"> <td>09:00AM</td> <td class="csstdgreen">00</td> <td class="csstdgreen" rowspan="3">John</td> </tr> <tr class="csstablelisttd"> <td></td> <td class="csstdgreen">15 </td> </tr> <tr class="csstablelisttd"> <td></td> <td class="csstdgreen">15 </td> </tr> </table> //Second Table <table id="mytable" runat="server"> <tr class="csstablelisttd"> <td>09:00AM</td> <td>00</td> <td>John</td> </tr> <tr class="csstablelisttd"> <td></td> <td>15 </td> <td></td> </tr> <tr class="csstablelisttd"> <td></td> <td class="csstdgreen">15 </td> <td></td> </tr> </table>
c#
asp.net
html
null
null
null
open
how to clear cell css style and rowspan in c# === Below is my html table. In first table first tr first cell i have given csstdgreen to td. and second cell have csstdgreen with rowspan 3. I have to clear csstdgreen and rowspan and like to convert second table tr. I have loop through table and check cell have csstdgreen and how many rowspan. if cell have csstdgreen and rowspan then make first table like second table. How i check css and rowspan in c# server side.I search google but not get. //First Table <table id="mytable" runat="server"> <tr class="csstablelisttd"> <td>09:00AM</td> <td class="csstdgreen">00</td> <td class="csstdgreen" rowspan="3">John</td> </tr> <tr class="csstablelisttd"> <td></td> <td class="csstdgreen">15 </td> </tr> <tr class="csstablelisttd"> <td></td> <td class="csstdgreen">15 </td> </tr> </table> //Second Table <table id="mytable" runat="server"> <tr class="csstablelisttd"> <td>09:00AM</td> <td>00</td> <td>John</td> </tr> <tr class="csstablelisttd"> <td></td> <td>15 </td> <td></td> </tr> <tr class="csstablelisttd"> <td></td> <td class="csstdgreen">15 </td> <td></td> </tr> </table>
0
11,002,799
06/12/2012 18:40:45
1,257,636
03/08/2012 17:38:51
43
0
PHP Zend Framework
im new in PHP and I want to know about PHP Zend Framework. What tools softwares do i need to install first? I've been searching a lot from google. But I also need to ask from an experienced developer (PHP), or any tips, reference, etc that could be of any help for a beginner like me? Thank you in advance.
php
zend-framework
null
null
null
06/13/2012 02:14:05
not a real question
PHP Zend Framework === im new in PHP and I want to know about PHP Zend Framework. What tools softwares do i need to install first? I've been searching a lot from google. But I also need to ask from an experienced developer (PHP), or any tips, reference, etc that could be of any help for a beginner like me? Thank you in advance.
1
8,843,386
01/12/2012 22:36:14
1,050,479
11/16/2011 20:34:38
38
2
Find the id of the button that called intent/activity? Android
My main activity layout contains 10 different buttons that all call the same activity (MapsActivity). How can I find out the id of the button that was pressed from MapsActivity ? I tried to send it by using > intent.putExtra("id", id); But this id came out as the same when pushing any of the buttons. Do I need to create a separate intent for each button that all call the same activity? Or can I use 1 intent and just change what value it passes to MapsActivity? I hope I've explained this problem clearly enough! Thanks!
android
button
activity
android-intent
bundle
null
open
Find the id of the button that called intent/activity? Android === My main activity layout contains 10 different buttons that all call the same activity (MapsActivity). How can I find out the id of the button that was pressed from MapsActivity ? I tried to send it by using > intent.putExtra("id", id); But this id came out as the same when pushing any of the buttons. Do I need to create a separate intent for each button that all call the same activity? Or can I use 1 intent and just change what value it passes to MapsActivity? I hope I've explained this problem clearly enough! Thanks!
0
3,131,896
06/28/2010 11:22:42
216,560
11/22/2009 18:15:23
72
2
C# LINQ/Lambda scope question
I get the error : > A local variable named 's' cannot be > declared in this scope because it > would give a different meaning to 's', > which is already used in a 'child' > scope to denote something else. static void Main(string[] args) { string s = "hello"; // Line 1 var test = new[] { "abd", "def" }.Select(s => s.StartsWith("a")); // Line 2 } Why? I would have guessed that the 's' from line 1 would be shaded by the '.Select(s =>..' decleration in line 2 but - as far as I can tell - this is not the case.. PS I'm not sure that shaded it the proper term - please correct me if a better word/phrase exsists.
c#
linq
lambda
null
null
null
open
C# LINQ/Lambda scope question === I get the error : > A local variable named 's' cannot be > declared in this scope because it > would give a different meaning to 's', > which is already used in a 'child' > scope to denote something else. static void Main(string[] args) { string s = "hello"; // Line 1 var test = new[] { "abd", "def" }.Select(s => s.StartsWith("a")); // Line 2 } Why? I would have guessed that the 's' from line 1 would be shaded by the '.Select(s =>..' decleration in line 2 but - as far as I can tell - this is not the case.. PS I'm not sure that shaded it the proper term - please correct me if a better word/phrase exsists.
0
2,707,572
04/25/2010 08:10:00
75,306
03/08/2009 15:27:27
57
0
fork within Cocoa application
My problem is not the best scenario for fork(). However, this is the best func I can get. I am working on a Firefox plugin on Mac OSX. To make it robust, I need to create a new process to run my plugin. The problem is, when I forked a new process, much like this: <code>if (fork() == 0) exit(other_main());</code> However, since the state is not cleaned, I cannot properly initialized my new process (call NSApplicationLoad etc.). Any ideas? BTW, I certainly don't want create a new binary and exec it.
osx
cocoa
fork
null
null
null
open
fork within Cocoa application === My problem is not the best scenario for fork(). However, this is the best func I can get. I am working on a Firefox plugin on Mac OSX. To make it robust, I need to create a new process to run my plugin. The problem is, when I forked a new process, much like this: <code>if (fork() == 0) exit(other_main());</code> However, since the state is not cleaned, I cannot properly initialized my new process (call NSApplicationLoad etc.). Any ideas? BTW, I certainly don't want create a new binary and exec it.
0
156,940
10/01/2008 10:05:32
3,241
08/27/2008 14:23:16
180
25
Is the web hosting location important these days?
I was recently looking at some web hosting solutions and some of the providers offered various hosting locations e.g. US or UK based servers. My question is: does it really make a difference from the performance point of view? Lets say that I am expecting most of the traffic coming from continental Europe? Would the fact that the servers are based in UK make bigger difference if the traffic was coming from the UK. Any pros and cons of having a website hosted in the same county as the most of the expected traffic?
hosting
null
null
null
null
null
open
Is the web hosting location important these days? === I was recently looking at some web hosting solutions and some of the providers offered various hosting locations e.g. US or UK based servers. My question is: does it really make a difference from the performance point of view? Lets say that I am expecting most of the traffic coming from continental Europe? Would the fact that the servers are based in UK make bigger difference if the traffic was coming from the UK. Any pros and cons of having a website hosted in the same county as the most of the expected traffic?
0
10,668,928
05/19/2012 21:18:51
295,189
03/16/2010 21:44:33
1,649
21
trying to create an inputbox that will have text
I am trying to create a css that will give me an input box but also some text on top of it. I was able to create the input box but I am not sure how to add in the css that the lable associated with that input field shows up on the top. here is the example to what I have http://jsfiddle.net/McdhR/2/
css
css3
css-selectors
null
null
05/19/2012 21:38:59
too localized
trying to create an inputbox that will have text === I am trying to create a css that will give me an input box but also some text on top of it. I was able to create the input box but I am not sure how to add in the css that the lable associated with that input field shows up on the top. here is the example to what I have http://jsfiddle.net/McdhR/2/
3
11,003,400
06/12/2012 19:21:42
1,449,547
06/11/2012 17:35:28
1
0
add lives to my game
I want to accomplish a few things. First is to create lives and start with 3. Game Over on 0 lives. Lose a life if you get hit by a ghost. Lose a life if you fall below a certain distance. Currently it's just taking the lives count and goes negative without stopping. So it's ignoreing my checkGameOver public class World { public interface WorldListener { public void jump(); public void highJump(); public void hit(); public void coin(); public void dying(); } public static final float WORLD_WIDTH = 10; public static final float WORLD_HEIGHT = 15 * 20; public static final int WORLD_STATE_RUNNING = 0; public static final int WORLD_STATE_NEXT_LEVEL = 1; public static final int WORLD_STATE_GAME_OVER = 2; public static final Vector2 gravity = new Vector2(0, -12); public final Hero hero; public final List<Platform> platforms; public final List<Spring> springs; public final List<Ghost> ghosts; public final List<Coin> coins; public Castle castle; public final WorldListener listener; public final Random rand; public float heightSoFar; public int score; public int state; public int lives=3; public World(WorldListener listener) { this.hero = new Hero(5, 1); this.platforms = new ArrayList<Platform>(); this.springs = new ArrayList<Spring>(); this.ghosts = new ArrayList<Ghost>(); this.coins = new ArrayList<Coin>(); this.listener = listener; rand = new Random(); generateLevel(); this.heightSoFar = 0; this.score = 0; this.state = WORLD_STATE_RUNNING; } private void generateLevel() { float y = Platform.PLATFORM_HEIGHT / 2; float maxJumpHeight = Hero.hero_JUMP_VELOCITY * Hero.hero_JUMP_VELOCITY / (2 * -gravity.y); while (y < WORLD_HEIGHT - WORLD_WIDTH / 2) { int type = rand.nextFloat() > 0.8f ? Platform.PLATFORM_TYPE_MOVING : Platform.PLATFORM_TYPE_STATIC; float x = rand.nextFloat() * (WORLD_WIDTH - Platform.PLATFORM_WIDTH) + Platform.PLATFORM_WIDTH / 2; Platform platform = new Platform(type, x, y); platforms.add(platform); if (rand.nextFloat() > 0.9f && type != Platform.PLATFORM_TYPE_MOVING) { Spring spring = new Spring(platform.position.x, platform.position.y + Platform.PLATFORM_HEIGHT / 2 + Spring.SPRING_HEIGHT / 2); springs.add(spring); } if (rand.nextFloat() > 0.7f) { Ghost ghost = new Ghost(platform.position.x + rand.nextFloat(), platform.position.y + Ghost.GHOST_HEIGHT + rand.nextFloat() * 3); ghosts.add(ghost); } if (rand.nextFloat() > 0.6f) { Coin coin = new Coin(platform.position.x + rand.nextFloat(), platform.position.y + Coin.COIN_HEIGHT + rand.nextFloat() * 3); coins.add(coin); } y += (maxJumpHeight - 0.5f); y -= rand.nextFloat() * (maxJumpHeight / 3); } castle = new Castle(WORLD_WIDTH / 2, y); } public void update(float deltaTime, float accelX) { updatehero(deltaTime, accelX); updatePlatforms(deltaTime); updateGhosts(deltaTime); updateCoins(deltaTime); if (hero.state != Hero.hero_STATE_HIT) checkCollisions(); checkGameOver(); checkFall(); } private void updatehero(float deltaTime, float accelX) { if (hero.state != Hero.hero_STATE_HIT && hero.position.y <= 0.5f) hero.hitPlatform(); if (hero.state != Hero.hero_STATE_HIT) hero.velocity.x = -accelX / 10 * Hero.hero_MOVE_VELOCITY; hero.update(deltaTime); heightSoFar = Math.max(hero.position.y, heightSoFar); } private void updatePlatforms(float deltaTime) { int len = platforms.size(); for (int i = 0; i < len; i++) { Platform platform = platforms.get(i); platform.update(deltaTime); if (platform.state == Platform.PLATFORM_STATE_PULVERIZING && platform.stateTime > Platform.PLATFORM_PULVERIZE_TIME) { platforms.remove(platform); len = platforms.size(); } } } private void updateGhosts(float deltaTime) { int len = ghosts.size(); for (int i = 0; i < len; i++) { Ghost ghost = ghosts.get(i); ghost.update(deltaTime); if (ghost.state == Ghost.GHOST_STATE_DYING && ghost.stateTime > Ghost.GHOST_DYING_TIME) { ghosts.remove(ghost); len = ghosts.size(); } } } private void updateCoins(float deltaTime) { int len = coins.size(); for (int i = 0; i < len; i++) { Coin coin = coins.get(i); coin.update(deltaTime); } } private void checkCollisions() { checkPlatformCollisions(); checkGhostCollisions(); checkItemCollisions(); checkCastleCollisions(); } private void checkPlatformCollisions() { if (hero.velocity.y > 0) return; int len = platforms.size(); for (int i = 0; i < len; i++) { Platform platform = platforms.get(i); if (hero.position.y > platform.position.y) { if (OverlapTester .overlapRectangles(hero.bounds, platform.bounds)) { hero.hitPlatform(); listener.jump(); if (rand.nextFloat() > 0.5f) { platform.pulverize(); } break; } } } } private void checkGhostCollisions() { int len = ghosts.size(); for (int i = 0; i < len; i++) { Ghost ghost = ghosts.get(i); if (hero.position.y < ghost.position.y) { if (OverlapTester.overlapRectangles(ghost.bounds, hero.bounds)){ hero.hitGhost(); listener.hit(); lives--; } break; } else { if(hero.position.y > ghost.position.y) { if (OverlapTester.overlapRectangles(hero.bounds, ghost.bounds)){ hero.hitGhostJump(); listener.jump(); ghost.dying(); score += Ghost.GHOST_SCORE; } break; } } } } private void checkItemCollisions() { int len = coins.size(); for (int i = 0; i < len; i++) { Coin coin = coins.get(i); if (OverlapTester.overlapRectangles(hero.bounds, coin.bounds)) { coins.remove(coin); len = coins.size(); listener.coin(); score += Coin.COIN_SCORE; } } if (hero.velocity.y > 0) return; len = springs.size(); for (int i = 0; i < len; i++) { Spring spring = springs.get(i); if (hero.position.y > spring.position.y) { if (OverlapTester.overlapRectangles(hero.bounds, spring.bounds)) { hero.hitSpring(); listener.highJump(); } } } } private void checkCastleCollisions() { if (OverlapTester.overlapRectangles(castle.bounds, hero.bounds)) { state = WORLD_STATE_NEXT_LEVEL; } } private void checkFall() { if (heightSoFar - 7.5f > hero.position.y) { --lives; } } public boolean checkGameOver() { --lives; return isDead(); } public boolean isDead(){ return lives<1; } }
java
android
null
null
null
06/14/2012 16:28:58
not a real question
add lives to my game === I want to accomplish a few things. First is to create lives and start with 3. Game Over on 0 lives. Lose a life if you get hit by a ghost. Lose a life if you fall below a certain distance. Currently it's just taking the lives count and goes negative without stopping. So it's ignoreing my checkGameOver public class World { public interface WorldListener { public void jump(); public void highJump(); public void hit(); public void coin(); public void dying(); } public static final float WORLD_WIDTH = 10; public static final float WORLD_HEIGHT = 15 * 20; public static final int WORLD_STATE_RUNNING = 0; public static final int WORLD_STATE_NEXT_LEVEL = 1; public static final int WORLD_STATE_GAME_OVER = 2; public static final Vector2 gravity = new Vector2(0, -12); public final Hero hero; public final List<Platform> platforms; public final List<Spring> springs; public final List<Ghost> ghosts; public final List<Coin> coins; public Castle castle; public final WorldListener listener; public final Random rand; public float heightSoFar; public int score; public int state; public int lives=3; public World(WorldListener listener) { this.hero = new Hero(5, 1); this.platforms = new ArrayList<Platform>(); this.springs = new ArrayList<Spring>(); this.ghosts = new ArrayList<Ghost>(); this.coins = new ArrayList<Coin>(); this.listener = listener; rand = new Random(); generateLevel(); this.heightSoFar = 0; this.score = 0; this.state = WORLD_STATE_RUNNING; } private void generateLevel() { float y = Platform.PLATFORM_HEIGHT / 2; float maxJumpHeight = Hero.hero_JUMP_VELOCITY * Hero.hero_JUMP_VELOCITY / (2 * -gravity.y); while (y < WORLD_HEIGHT - WORLD_WIDTH / 2) { int type = rand.nextFloat() > 0.8f ? Platform.PLATFORM_TYPE_MOVING : Platform.PLATFORM_TYPE_STATIC; float x = rand.nextFloat() * (WORLD_WIDTH - Platform.PLATFORM_WIDTH) + Platform.PLATFORM_WIDTH / 2; Platform platform = new Platform(type, x, y); platforms.add(platform); if (rand.nextFloat() > 0.9f && type != Platform.PLATFORM_TYPE_MOVING) { Spring spring = new Spring(platform.position.x, platform.position.y + Platform.PLATFORM_HEIGHT / 2 + Spring.SPRING_HEIGHT / 2); springs.add(spring); } if (rand.nextFloat() > 0.7f) { Ghost ghost = new Ghost(platform.position.x + rand.nextFloat(), platform.position.y + Ghost.GHOST_HEIGHT + rand.nextFloat() * 3); ghosts.add(ghost); } if (rand.nextFloat() > 0.6f) { Coin coin = new Coin(platform.position.x + rand.nextFloat(), platform.position.y + Coin.COIN_HEIGHT + rand.nextFloat() * 3); coins.add(coin); } y += (maxJumpHeight - 0.5f); y -= rand.nextFloat() * (maxJumpHeight / 3); } castle = new Castle(WORLD_WIDTH / 2, y); } public void update(float deltaTime, float accelX) { updatehero(deltaTime, accelX); updatePlatforms(deltaTime); updateGhosts(deltaTime); updateCoins(deltaTime); if (hero.state != Hero.hero_STATE_HIT) checkCollisions(); checkGameOver(); checkFall(); } private void updatehero(float deltaTime, float accelX) { if (hero.state != Hero.hero_STATE_HIT && hero.position.y <= 0.5f) hero.hitPlatform(); if (hero.state != Hero.hero_STATE_HIT) hero.velocity.x = -accelX / 10 * Hero.hero_MOVE_VELOCITY; hero.update(deltaTime); heightSoFar = Math.max(hero.position.y, heightSoFar); } private void updatePlatforms(float deltaTime) { int len = platforms.size(); for (int i = 0; i < len; i++) { Platform platform = platforms.get(i); platform.update(deltaTime); if (platform.state == Platform.PLATFORM_STATE_PULVERIZING && platform.stateTime > Platform.PLATFORM_PULVERIZE_TIME) { platforms.remove(platform); len = platforms.size(); } } } private void updateGhosts(float deltaTime) { int len = ghosts.size(); for (int i = 0; i < len; i++) { Ghost ghost = ghosts.get(i); ghost.update(deltaTime); if (ghost.state == Ghost.GHOST_STATE_DYING && ghost.stateTime > Ghost.GHOST_DYING_TIME) { ghosts.remove(ghost); len = ghosts.size(); } } } private void updateCoins(float deltaTime) { int len = coins.size(); for (int i = 0; i < len; i++) { Coin coin = coins.get(i); coin.update(deltaTime); } } private void checkCollisions() { checkPlatformCollisions(); checkGhostCollisions(); checkItemCollisions(); checkCastleCollisions(); } private void checkPlatformCollisions() { if (hero.velocity.y > 0) return; int len = platforms.size(); for (int i = 0; i < len; i++) { Platform platform = platforms.get(i); if (hero.position.y > platform.position.y) { if (OverlapTester .overlapRectangles(hero.bounds, platform.bounds)) { hero.hitPlatform(); listener.jump(); if (rand.nextFloat() > 0.5f) { platform.pulverize(); } break; } } } } private void checkGhostCollisions() { int len = ghosts.size(); for (int i = 0; i < len; i++) { Ghost ghost = ghosts.get(i); if (hero.position.y < ghost.position.y) { if (OverlapTester.overlapRectangles(ghost.bounds, hero.bounds)){ hero.hitGhost(); listener.hit(); lives--; } break; } else { if(hero.position.y > ghost.position.y) { if (OverlapTester.overlapRectangles(hero.bounds, ghost.bounds)){ hero.hitGhostJump(); listener.jump(); ghost.dying(); score += Ghost.GHOST_SCORE; } break; } } } } private void checkItemCollisions() { int len = coins.size(); for (int i = 0; i < len; i++) { Coin coin = coins.get(i); if (OverlapTester.overlapRectangles(hero.bounds, coin.bounds)) { coins.remove(coin); len = coins.size(); listener.coin(); score += Coin.COIN_SCORE; } } if (hero.velocity.y > 0) return; len = springs.size(); for (int i = 0; i < len; i++) { Spring spring = springs.get(i); if (hero.position.y > spring.position.y) { if (OverlapTester.overlapRectangles(hero.bounds, spring.bounds)) { hero.hitSpring(); listener.highJump(); } } } } private void checkCastleCollisions() { if (OverlapTester.overlapRectangles(castle.bounds, hero.bounds)) { state = WORLD_STATE_NEXT_LEVEL; } } private void checkFall() { if (heightSoFar - 7.5f > hero.position.y) { --lives; } } public boolean checkGameOver() { --lives; return isDead(); } public boolean isDead(){ return lives<1; } }
1
8,607,957
12/22/2011 17:54:38
1,111,794
12/22/2011 13:19:28
27
0
Read from certain letter to end
I want to read a string from the character "," to the very end. I think this is either doable with sed or with awk any ideas? Example: socialcoding,github.html I want him to echo only github
shell
unix
sed
awk
null
null
open
Read from certain letter to end === I want to read a string from the character "," to the very end. I think this is either doable with sed or with awk any ideas? Example: socialcoding,github.html I want him to echo only github
0
4,697,880
01/15/2011 03:52:49
565,968
01/06/2011 19:34:37
77
0
gridview itemtemplate
I'd like to add a <div> inside a gridview cell. More particularly, the datasource is a number between 1 and 7 and based on that number, the div needs to be of a certain background color and the text need to be a certain word. For instance, if the data is 1, the div should be yellow and the word should be sunny. What's the best way to do this? Thanks.
asp.net
null
null
null
null
null
open
gridview itemtemplate === I'd like to add a <div> inside a gridview cell. More particularly, the datasource is a number between 1 and 7 and based on that number, the div needs to be of a certain background color and the text need to be a certain word. For instance, if the data is 1, the div should be yellow and the word should be sunny. What's the best way to do this? Thanks.
0
3,001,114
06/08/2010 20:40:10
259,348
01/26/2010 15:50:47
217
12
Using a Session Scoped Bean
The following code is returning null: private MyAppUser getMyAppUser(HttpSession session) { MyAppUser myAppUser = (MyAppUser) session.getAttribute("myAppUserManager"); return myAppUser; } Despite the fact that I have the following in my context: <bean id="myAppUserManager" class="com.myapp.profile.MyAppUser" scope="session"/> This doesn't make any sense to me, the "myAppUser" bean is a bean that absolutely can never be null, and I need to be able to reference it from controllers, I don't need it in services or repositories, just controllers, but it doesn't seem to be getting stored in the session, the use case is extremely simple, but I haven't been able to get to the bottom of what's wrong, or come up with a good workaround
java
spring-mvc
null
null
null
null
open
Using a Session Scoped Bean === The following code is returning null: private MyAppUser getMyAppUser(HttpSession session) { MyAppUser myAppUser = (MyAppUser) session.getAttribute("myAppUserManager"); return myAppUser; } Despite the fact that I have the following in my context: <bean id="myAppUserManager" class="com.myapp.profile.MyAppUser" scope="session"/> This doesn't make any sense to me, the "myAppUser" bean is a bean that absolutely can never be null, and I need to be able to reference it from controllers, I don't need it in services or repositories, just controllers, but it doesn't seem to be getting stored in the session, the use case is extremely simple, but I haven't been able to get to the bottom of what's wrong, or come up with a good workaround
0
6,485,259
06/26/2011 16:44:43
816,313
06/26/2011 16:44:43
1
0
According to HTTML, CSS, and jQuery standards, is php good?
I think the title is self explanatory. is php good?
php
null
null
null
null
06/26/2011 16:49:51
not a real question
According to HTTML, CSS, and jQuery standards, is php good? === I think the title is self explanatory. is php good?
1
2,446,514
03/15/2010 10:52:57
241,486
12/31/2009 11:09:47
1
0
About Php development
hi actually i m new in prograamming and i have developed two projects one in osdate and other is my own code >and i am jyst 6 months older in php as developer >i am not happy with my code standard i want to improve that plz anyone can suggest me about standard and how to organised your project before starting ??i know its funny bt i dnt have any senior in my office i have to make myself
php5
null
null
null
null
null
open
About Php development === hi actually i m new in prograamming and i have developed two projects one in osdate and other is my own code >and i am jyst 6 months older in php as developer >i am not happy with my code standard i want to improve that plz anyone can suggest me about standard and how to organised your project before starting ??i know its funny bt i dnt have any senior in my office i have to make myself
0
9,809,939
03/21/2012 17:40:10
807,064
06/20/2011 17:02:53
494
27
Good Basis for Multi-User Web Application With Blogging, Etc
I have an idea for a new web application and have been looking for tools to help me get a jump start. Essentially, I would like to provide a service to "my" users that would let them easily create a site that includes blogging and some other specialized functionality while allowing them to maintain their own users. The best analogy is that I'd like to create a site similar to WordPress.com (the service, not the software), TypePad, or Blogger but way simpler (I'm only one guy after all!) and designed for users in a very specific niche. Which brings me to my question: **what tools exist to help develop multi-tenant, multi-user web applications?** I would personally prefer something open source and written in .NET, but for the benefit of everyone else I think non-open source and/or non-.NET systems would also prove valuable. My first thought was to look for open source CMS systems that support multi-tenancy and have a robust extension mechanism. The most promising that I've found so far is [Orchard][1]. Has anyone used it (or something similar) for this kind of purpose? My main requirements are (and these are general enough that I think many folks with similar host-type web application ideas may benefit from an answer): - Multi-site/multi-tenant - Allow the creation of multiple sites that are fully customizable (such as themes) but that share a common set of overall features and functionality. - User management - Support for "master" users that can configure the entire ecosystem. - Support for "administrators" that have control over their own site and users, but not those of others. - Support for "users" that are tied to an individual site, possibly with multiple access levels or types (as defined by the site's administrator). - Extensibility - Since the whole point is to provide a hosting application for individual sites in a specific niche, the setup has to be highly extensible to support additional features, changes to the platform, etc. (I asked this over at Web Applications, but got closed as off-topic. Hopefully SO is the right site this time. Forgive me if not - it can be difficult to determine the appropriate SE site sometimes). [1]: http://orchardproject.net/
c#
content-management-system
hosting
multi-tenant
null
03/23/2012 07:19:40
not a real question
Good Basis for Multi-User Web Application With Blogging, Etc === I have an idea for a new web application and have been looking for tools to help me get a jump start. Essentially, I would like to provide a service to "my" users that would let them easily create a site that includes blogging and some other specialized functionality while allowing them to maintain their own users. The best analogy is that I'd like to create a site similar to WordPress.com (the service, not the software), TypePad, or Blogger but way simpler (I'm only one guy after all!) and designed for users in a very specific niche. Which brings me to my question: **what tools exist to help develop multi-tenant, multi-user web applications?** I would personally prefer something open source and written in .NET, but for the benefit of everyone else I think non-open source and/or non-.NET systems would also prove valuable. My first thought was to look for open source CMS systems that support multi-tenancy and have a robust extension mechanism. The most promising that I've found so far is [Orchard][1]. Has anyone used it (or something similar) for this kind of purpose? My main requirements are (and these are general enough that I think many folks with similar host-type web application ideas may benefit from an answer): - Multi-site/multi-tenant - Allow the creation of multiple sites that are fully customizable (such as themes) but that share a common set of overall features and functionality. - User management - Support for "master" users that can configure the entire ecosystem. - Support for "administrators" that have control over their own site and users, but not those of others. - Support for "users" that are tied to an individual site, possibly with multiple access levels or types (as defined by the site's administrator). - Extensibility - Since the whole point is to provide a hosting application for individual sites in a specific niche, the setup has to be highly extensible to support additional features, changes to the platform, etc. (I asked this over at Web Applications, but got closed as off-topic. Hopefully SO is the right site this time. Forgive me if not - it can be difficult to determine the appropriate SE site sometimes). [1]: http://orchardproject.net/
1
8,336,453
12/01/2011 04:12:27
1,032,633
11/06/2011 18:55:52
8
0
Sub to create object of type passed by caller in VB.NET
I'm having trouble creating a sub that can create objects of a variable type on the fly. Here's an example of what I'm trying to achieve: class systemSettings 'some properties end class Class fireSystemSettings inherits systemSettings 'some additional properties end class Class windSystemSettings inherits systemSettings 'some additional properties end class sub createSystem(systemType as Type) Dim newSystem as New systemType systemCollection.add(newSystem) end sub I can't get it to work. I've done a fair bit of research, and looked at generic types, reflection, and other tools, but I'm having trouble determining how best to tackle this problem.
vb.net
null
null
null
null
null
open
Sub to create object of type passed by caller in VB.NET === I'm having trouble creating a sub that can create objects of a variable type on the fly. Here's an example of what I'm trying to achieve: class systemSettings 'some properties end class Class fireSystemSettings inherits systemSettings 'some additional properties end class Class windSystemSettings inherits systemSettings 'some additional properties end class sub createSystem(systemType as Type) Dim newSystem as New systemType systemCollection.add(newSystem) end sub I can't get it to work. I've done a fair bit of research, and looked at generic types, reflection, and other tools, but I'm having trouble determining how best to tackle this problem.
0
10,027,987
04/05/2012 11:46:49
583,050
01/20/2011 14:07:31
601
56
Using white spaces in xaml
Here is a tiny part of WP7 toolkit xaml code (copy-pasted): <ColorAnimation Storyboard.TargetName="SwitchBottom" Storyboard.TargetProperty="(Grid.Background).(SolidColorBrush.Color)" Duration="0" To="{StaticResource PhoneForegroundColor}"/> Here is the same code formatted differently: <ColorAnimation Storyboard.TargetName="SwitchBottom" Storyboard.TargetProperty="(Grid.Background).(SolidColorBrush.Color)" Duration="0" To="{StaticResource PhoneForegroundColor}"/> First code takes 402 By, the second is more than 2x smaller - 182 By. (If you wanted to properly format it, it would be stil 2x smaller.) Here is a more practical example: I took the toolkit generic.xaml and tested how much can be this file sqeezed within 10 minutes. Original file takes 25588 By. The result: 15762 By. Not a bad result for a 10 min work: Saving the parsing of 10K xaml code. Xaml code is included 1:1 into the binary toolkit dll. It means it must be parsed at run-time. Why to hell must every WP7 user again and again wait for parsing of meaningless white space? Just because of stupid formatting MS programmers use. If these programmers read another [MS article][1] they would understand the amount of unnecessary work caused by inapropriate formatting. Plus there are articles on the web that prove that xml white-space parsing has non-negligible impact. Sorry, had to write this as I daily see inefficient programming on the MS side. But nobody cares, so I decided to pick up a tiny water-proof example. Wouldn't be bad to see the reaction of the toolkit authors. [1]: http://msdn.microsoft.com/en-us/library/cc189036%28VS.95%29.aspx#whitespace
windows-phone-7
xaml
null
null
null
04/29/2012 09:32:51
not a real question
Using white spaces in xaml === Here is a tiny part of WP7 toolkit xaml code (copy-pasted): <ColorAnimation Storyboard.TargetName="SwitchBottom" Storyboard.TargetProperty="(Grid.Background).(SolidColorBrush.Color)" Duration="0" To="{StaticResource PhoneForegroundColor}"/> Here is the same code formatted differently: <ColorAnimation Storyboard.TargetName="SwitchBottom" Storyboard.TargetProperty="(Grid.Background).(SolidColorBrush.Color)" Duration="0" To="{StaticResource PhoneForegroundColor}"/> First code takes 402 By, the second is more than 2x smaller - 182 By. (If you wanted to properly format it, it would be stil 2x smaller.) Here is a more practical example: I took the toolkit generic.xaml and tested how much can be this file sqeezed within 10 minutes. Original file takes 25588 By. The result: 15762 By. Not a bad result for a 10 min work: Saving the parsing of 10K xaml code. Xaml code is included 1:1 into the binary toolkit dll. It means it must be parsed at run-time. Why to hell must every WP7 user again and again wait for parsing of meaningless white space? Just because of stupid formatting MS programmers use. If these programmers read another [MS article][1] they would understand the amount of unnecessary work caused by inapropriate formatting. Plus there are articles on the web that prove that xml white-space parsing has non-negligible impact. Sorry, had to write this as I daily see inefficient programming on the MS side. But nobody cares, so I decided to pick up a tiny water-proof example. Wouldn't be bad to see the reaction of the toolkit authors. [1]: http://msdn.microsoft.com/en-us/library/cc189036%28VS.95%29.aspx#whitespace
1
991,741
06/13/2009 23:13:59
98,907
04/30/2009 20:14:24
6
0
VERY weird UITableViewController.tableview behaviour on scrollToRowAtIndexPath
hey all, I'm very confused here, i've been trying to figure this one out. I have a UIViewController, viewControllerBrowse, with two TableViewController, Designations & Types, I call a second UIViewController, viewControllerSelectLibrary, that makes some SOLite operations and fills two arrays from where the first two TableView feed. When I'm going to call back viewControllerBrowse, I perform inside a NSThread: > Blockquote [appDelegate.viewControllerBrowse.tvcTypes.tableView reloadData]; [appDelegate.viewControllerBrowse.tvcTypes.tableView selectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] animated:YES scrollPosition:UITableViewScrollPositionTop]; [appDelegate.viewControllerBrowse.tvcDesignations.tableView reloadData]; [appDelegate.viewControllerBrowse.tvcDesignations.tableView selectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] animated:YES scrollPosition:UITableViewScrollPositionTop]; What TRUUUULY puzzles me is that on tvcTypes case, its tableView gets its first row selected and scrolled to the top BUT, for tvcDesignations, its tableView get ITS FIRST ROW SELECTED BUT IT DOES NOT SCROLL TO THE TOP the fact that the first row is selected tells me that it's not a problem of reference in the appDelegate, it's as if only half the method is working/?????????????? anyone hit this one before??????
iphone
uitableview
uitableviewcontroller
scrolling
null
null
open
VERY weird UITableViewController.tableview behaviour on scrollToRowAtIndexPath === hey all, I'm very confused here, i've been trying to figure this one out. I have a UIViewController, viewControllerBrowse, with two TableViewController, Designations & Types, I call a second UIViewController, viewControllerSelectLibrary, that makes some SOLite operations and fills two arrays from where the first two TableView feed. When I'm going to call back viewControllerBrowse, I perform inside a NSThread: > Blockquote [appDelegate.viewControllerBrowse.tvcTypes.tableView reloadData]; [appDelegate.viewControllerBrowse.tvcTypes.tableView selectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] animated:YES scrollPosition:UITableViewScrollPositionTop]; [appDelegate.viewControllerBrowse.tvcDesignations.tableView reloadData]; [appDelegate.viewControllerBrowse.tvcDesignations.tableView selectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] animated:YES scrollPosition:UITableViewScrollPositionTop]; What TRUUUULY puzzles me is that on tvcTypes case, its tableView gets its first row selected and scrolled to the top BUT, for tvcDesignations, its tableView get ITS FIRST ROW SELECTED BUT IT DOES NOT SCROLL TO THE TOP the fact that the first row is selected tells me that it's not a problem of reference in the appDelegate, it's as if only half the method is working/?????????????? anyone hit this one before??????
0
11,207,929
06/26/2012 13:04:38
1,231,800
02/24/2012 22:43:19
15
0
Android data holding
I want to build android app.It must have many pair of string value and image. What is the best way to hold this data in app, that i can get list of all strings.
android
data
null
null
null
06/27/2012 13:11:43
not a real question
Android data holding === I want to build android app.It must have many pair of string value and image. What is the best way to hold this data in app, that i can get list of all strings.
1
9,157,987
02/06/2012 09:26:25
1,029,593
11/04/2011 11:31:11
8
1
how onItemClick set image from adapter in image?
** how i can set image from adapter onItemClick i have 2 picture(picture1,picture2) i want to set image1 from adapter in picture1 in my activity in next click i have to set picture2 in other image2**
android
image
adapter
null
null
02/06/2012 16:30:49
not a real question
how onItemClick set image from adapter in image? === ** how i can set image from adapter onItemClick i have 2 picture(picture1,picture2) i want to set image1 from adapter in picture1 in my activity in next click i have to set picture2 in other image2**
1
10,571,145
05/13/2012 10:53:06
554,217
12/26/2010 09:29:16
1,123
3
mysql distinct statement not working
$query = "SELECT DISTINCT t.task_id, e.url,e.error_id, p.page_rank, e.scan_status, e.url_is_route,e.url_is_route,e.forbidden_word,e.google_host_fail,e.google_cache_fail,e.google_title_fail,e.robots_noindex_nofollow,e.xrobots_noindex_nofollow,e.title_fetch_warn,e.h1_fail,e.h2_fail,e.h3_fail,e.h1_warn,e.h2_warn,e.h3_warn FROM `error_report` AS e INNER JOIN task_pages AS t ON t.task_id=e.task_id INNER JOIN `pages` AS p ON p.page_id=t.page_id WHERE t.task_id=" . $this->task_id ; I want the query to be distinct only by t.task_id. The problem is that when I add more fields..the query isnt distinct anymore. Is there still a way to select distinct by t.task_id only?
php
mysql
null
null
null
null
open
mysql distinct statement not working === $query = "SELECT DISTINCT t.task_id, e.url,e.error_id, p.page_rank, e.scan_status, e.url_is_route,e.url_is_route,e.forbidden_word,e.google_host_fail,e.google_cache_fail,e.google_title_fail,e.robots_noindex_nofollow,e.xrobots_noindex_nofollow,e.title_fetch_warn,e.h1_fail,e.h2_fail,e.h3_fail,e.h1_warn,e.h2_warn,e.h3_warn FROM `error_report` AS e INNER JOIN task_pages AS t ON t.task_id=e.task_id INNER JOIN `pages` AS p ON p.page_id=t.page_id WHERE t.task_id=" . $this->task_id ; I want the query to be distinct only by t.task_id. The problem is that when I add more fields..the query isnt distinct anymore. Is there still a way to select distinct by t.task_id only?
0
3,260,649
07/15/2010 22:40:00
381,299
07/01/2010 16:37:41
1
0
Android 1.5-specific error
I am having trouble with with getting my application to function on android 1.5. It works fine in 1.6, 2.1, and 2.2 but whenever I attempt to run it in 1.5, I get an immediate force close with the LogCat output: `java.lang.RuntimeException: Unable to start activity ComponentInfo{com.qrohlf.activites/com.qrohlf.activites.BookmarkHistoryTabActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class java.lang.reflect.Constructor` This strikes me as very odd, as line #2 of my layout XML is just `<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"` Any ideas? Is there some major API change between 1.5 and 1.6 in the way layout XMLs are done that I'm missing? (I've included the rest of my layout xml below for reference) <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <include android:id="@+id/custom_titlebar" layout="@layout/custom_titlebar" /> <ViewFlipper android:id="@+id/frame_content" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" > <ListView android:id="@+id/soccerteams_listview" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#FFFFFFFF"/> <ListView android:id="@+id/countries_listview" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#FFFFFFFF"/> </ViewFlipper> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" android:background="@android:color/black" android:padding="0px"> <Button android:id="@+id/bookmarks_button" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/bookmarks" android:textColor="@android:color/primary_text_dark" android:drawableTop="@drawable/ic_bookmark_tab" android:background="@drawable/tab_background" android:layout_weight="1"/> <Button android:id="@+id/history_button" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/history" android:textColor="@android:color/primary_text_dark" android:drawableTop="@drawable/ic_history_tab" android:background="@drawable/tab_background" android:layout_weight="1"/> </LinearLayout> </LinearLayout>
android
android-layout
null
null
null
null
open
Android 1.5-specific error === I am having trouble with with getting my application to function on android 1.5. It works fine in 1.6, 2.1, and 2.2 but whenever I attempt to run it in 1.5, I get an immediate force close with the LogCat output: `java.lang.RuntimeException: Unable to start activity ComponentInfo{com.qrohlf.activites/com.qrohlf.activites.BookmarkHistoryTabActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class java.lang.reflect.Constructor` This strikes me as very odd, as line #2 of my layout XML is just `<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"` Any ideas? Is there some major API change between 1.5 and 1.6 in the way layout XMLs are done that I'm missing? (I've included the rest of my layout xml below for reference) <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <include android:id="@+id/custom_titlebar" layout="@layout/custom_titlebar" /> <ViewFlipper android:id="@+id/frame_content" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" > <ListView android:id="@+id/soccerteams_listview" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#FFFFFFFF"/> <ListView android:id="@+id/countries_listview" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#FFFFFFFF"/> </ViewFlipper> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" android:background="@android:color/black" android:padding="0px"> <Button android:id="@+id/bookmarks_button" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/bookmarks" android:textColor="@android:color/primary_text_dark" android:drawableTop="@drawable/ic_bookmark_tab" android:background="@drawable/tab_background" android:layout_weight="1"/> <Button android:id="@+id/history_button" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/history" android:textColor="@android:color/primary_text_dark" android:drawableTop="@drawable/ic_history_tab" android:background="@drawable/tab_background" android:layout_weight="1"/> </LinearLayout> </LinearLayout>
0
2,320,603
02/23/2010 18:12:44
152,740
08/07/2009 20:29:17
20
2
When is Sharepoint 2007 / Sharepoint 2010 suitable for Line of Business Applications?
From my experience, this is adding minor features at increased implementation and maintenance cost in comparison with using just "pure" Microsoft.Net, ASP.NET and IIS application. Sharepoint 2007 = ( no concept of deployment version control etc, narly css/skinning, weird cms features, sp webparts not recommended, very limited worfklow features) Sharepoint 2010 = ( is everything fixed? ) The generic feeling I have is to stay away from Sharepoint, implement in pure asp.net using proven patterns and practices, architecture etc. And just consume Sharepoint services when suitable. Is Sharepoint 2007 or 2010 ready for real line of business applications running extranet with thousands of users, or should we just go for asp.net?
sharepoint
sharepoint2010
sharepoint2007
null
null
null
open
When is Sharepoint 2007 / Sharepoint 2010 suitable for Line of Business Applications? === From my experience, this is adding minor features at increased implementation and maintenance cost in comparison with using just "pure" Microsoft.Net, ASP.NET and IIS application. Sharepoint 2007 = ( no concept of deployment version control etc, narly css/skinning, weird cms features, sp webparts not recommended, very limited worfklow features) Sharepoint 2010 = ( is everything fixed? ) The generic feeling I have is to stay away from Sharepoint, implement in pure asp.net using proven patterns and practices, architecture etc. And just consume Sharepoint services when suitable. Is Sharepoint 2007 or 2010 ready for real line of business applications running extranet with thousands of users, or should we just go for asp.net?
0
5,808,540
04/27/2011 18:06:33
179,736
09/27/2009 11:27:55
5,354
53
In Node.js Mongoose, I want to update each field...how can I do that?
User.find({},function(err,docs){ foreach(docs as d){ d.name="apple"; d.save(); }; }); This doesn't work! I get some "unique identifier" error. Can someone fix this for me?
javascript
database
mongodb
node.js
mongoose
null
open
In Node.js Mongoose, I want to update each field...how can I do that? === User.find({},function(err,docs){ foreach(docs as d){ d.name="apple"; d.save(); }; }); This doesn't work! I get some "unique identifier" error. Can someone fix this for me?
0
9,685,070
03/13/2012 13:36:55
840,090
07/12/2011 05:34:16
303
6
android - call_phone permission is required?
In my app i want to make a one tap call without using the **android.permission.CALL_PHONE**. is it possible? because of this permission user scare to install this app. thanks
android
null
null
null
null
03/13/2012 21:59:28
not a real question
android - call_phone permission is required? === In my app i want to make a one tap call without using the **android.permission.CALL_PHONE**. is it possible? because of this permission user scare to install this app. thanks
1
6,922,917
08/03/2011 07:16:30
535,967
12/09/2010 05:51:49
701
2
MySQL query to search for MATCH in 3 columns?
I created a FULLTEXT Index for columns: `City, Group and Text` called `city_group_text_comparator` How do I do a simple query to look up a string on all 3? I tried this: $result = mysql_query("SELECT * FROM Posts WHERE MATCH (City, `Group`, Text) AGAINST ('$search') LIMIT $limit_posts OFFSET $first_post"); How does it order the results? Thanks
php
mysql
full-text-search
full-text-indexing
null
null
open
MySQL query to search for MATCH in 3 columns? === I created a FULLTEXT Index for columns: `City, Group and Text` called `city_group_text_comparator` How do I do a simple query to look up a string on all 3? I tried this: $result = mysql_query("SELECT * FROM Posts WHERE MATCH (City, `Group`, Text) AGAINST ('$search') LIMIT $limit_posts OFFSET $first_post"); How does it order the results? Thanks
0
8,402,843
12/06/2011 15:57:50
500,921
11/08/2010 16:51:45
343
12
Desinging a netty application that uses many types of packets
I wonder what's the most maintainable/correct way to implement a server based on netty that handles a bunch of different packet types (mmo server to be precise), i.e. login packets, move packets etc. It would be perfect to ultimately have every packet represented by a POJO. Assuming **every packet begins with an unique, constant-length identifier**: is it better to have multiple decoders (I'd like to take advantage of the ReplayingDecoder class), or just one decoder that delegates further decoding to other classes based on decoded packet id? Any suggestions and/or links would be appreciated.
java
design
netty
null
null
12/07/2011 17:08:07
not constructive
Desinging a netty application that uses many types of packets === I wonder what's the most maintainable/correct way to implement a server based on netty that handles a bunch of different packet types (mmo server to be precise), i.e. login packets, move packets etc. It would be perfect to ultimately have every packet represented by a POJO. Assuming **every packet begins with an unique, constant-length identifier**: is it better to have multiple decoders (I'd like to take advantage of the ReplayingDecoder class), or just one decoder that delegates further decoding to other classes based on decoded packet id? Any suggestions and/or links would be appreciated.
4
5,013,782
02/16/2011 07:46:30
265,013
02/03/2010 06:13:01
306
31
Regular Expression for Phone Numer
I need a Javascript RegEx thorough which I can validate phone number. RegEx should handle following criteria 1. It should only consist of numbers ( ) + and - 2. Count of + should not exceed 1 3. Count of - should not exceed 4 4. There must be only one pair of () 5. If '(' is present in phone number then ')' must be present. Thanks for the help! Hussain.
javascript
regex
null
null
null
null
open
Regular Expression for Phone Numer === I need a Javascript RegEx thorough which I can validate phone number. RegEx should handle following criteria 1. It should only consist of numbers ( ) + and - 2. Count of + should not exceed 1 3. Count of - should not exceed 4 4. There must be only one pair of () 5. If '(' is present in phone number then ')' must be present. Thanks for the help! Hussain.
0
3,644,299
09/04/2010 22:58:45
344,733
05/19/2010 04:55:59
18
0
Symbol not found: _OBJC_CLASS_$_NSURL error when launching on Mac OS X Leopard
I've just gotten a report from a user that a new build of my app crashes on his machine when he tries to launch it. In the report is this: Dyld Error Message: Symbol not found: _OBJC_CLASS_$_NSURL Referenced from: /Applications/MyApp.app/Contents/MacOS/MyApp Expected in: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation The user is running OS X 10.5.8 on a Core 2 Duo Mac. I am able to launch the app just fine under Tiger, and Leopard on my PowerBook G4 and on Snow Leopard on my iMac. At least one user is able to launch the app just fine under Snow Leopard. From my (admittedly small) sample set, I think the problem is specific to 64-bit machines running Leopard. My project is compiled with the 10.6 SDK with the Deployment Target set to 10.4. Any thoughts on how to fix this or exactly why it's happening?
objective-c
cocoa
osx
nsurl
core-foundation
null
open
Symbol not found: _OBJC_CLASS_$_NSURL error when launching on Mac OS X Leopard === I've just gotten a report from a user that a new build of my app crashes on his machine when he tries to launch it. In the report is this: Dyld Error Message: Symbol not found: _OBJC_CLASS_$_NSURL Referenced from: /Applications/MyApp.app/Contents/MacOS/MyApp Expected in: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation The user is running OS X 10.5.8 on a Core 2 Duo Mac. I am able to launch the app just fine under Tiger, and Leopard on my PowerBook G4 and on Snow Leopard on my iMac. At least one user is able to launch the app just fine under Snow Leopard. From my (admittedly small) sample set, I think the problem is specific to 64-bit machines running Leopard. My project is compiled with the 10.6 SDK with the Deployment Target set to 10.4. Any thoughts on how to fix this or exactly why it's happening?
0
2,464,986
03/17/2010 18:46:51
261,708
01/29/2010 09:43:55
55
0
'currentCtx' is undefined
While trying to create/upload a document in a document library, Ie throws the below exception 'currentCtx' is undefined what it means and how to fix this?
sharepoint
moss
wss-3.0
sharepoint2007
null
null
open
'currentCtx' is undefined === While trying to create/upload a document in a document library, Ie throws the below exception 'currentCtx' is undefined what it means and how to fix this?
0
11,436,692
07/11/2012 15:59:49
409,898
07/05/2010 21:07:19
130
3
Should MSMQ be on a sender of receiver machine?
I'm wondering if there are any guidelines for which machine MSMQ should be installed on, in a situation in which one machine (A) will be sending messages, and another machine (B) will be receiving them. Are there any factors that would indicate either that it's better to install MSMQ on A (in which case the sender writes messages locally, but the receiver reads them remotely), or to install on B (in which case it's the other way round?) (If it makes any difference, in our case the sender is a website, and the receiver is an app server machine that sits behind the website, and to which the website sends messages. In the absence of any other advice, I'd have been inclined to install MSMQ on the app server, on the vague principle of keeping as little software as possible on the web server on security grounds, since that server is in the first line of any attack. To complicate matters, the website sits behind a load balancer - so 'machine A' is actually two identical machines, likewise for machine 'B').
msmq
null
null
null
null
null
open
Should MSMQ be on a sender of receiver machine? === I'm wondering if there are any guidelines for which machine MSMQ should be installed on, in a situation in which one machine (A) will be sending messages, and another machine (B) will be receiving them. Are there any factors that would indicate either that it's better to install MSMQ on A (in which case the sender writes messages locally, but the receiver reads them remotely), or to install on B (in which case it's the other way round?) (If it makes any difference, in our case the sender is a website, and the receiver is an app server machine that sits behind the website, and to which the website sends messages. In the absence of any other advice, I'd have been inclined to install MSMQ on the app server, on the vague principle of keeping as little software as possible on the web server on security grounds, since that server is in the first line of any attack. To complicate matters, the website sits behind a load balancer - so 'machine A' is actually two identical machines, likewise for machine 'B').
0
1,034,750
06/23/2009 19:43:49
123,251
06/15/2009 17:53:58
1
0
SOAP servers and clients with Zend framework (Getting errors)
I am testing a server and client i made on my webspace. when i try to call a simple "testServer" function defined in a ServerMap class, I get "Looks like we got no XML document" ..? I called getFunctions on the client and testServer is a valid function. I tried catching all exceptions and then calling __getLastResponseHeaders() and __getLastResponse. header: string(348) "HTTP/1.1 200 OK Date: Tue, 23 Jun 2009 19:36:29 GMT Server: Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.9 X-Powered-By: PHP/5.2.9 Cache-Control: max-age=1 Expires: Tue, 23 Jun 2009 19:36:30 GMT Vary: Accept-Encoding Content-Length: 1574 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html " response: string(1574) "DEBUG HEADER : This is a cached page ! " If i look at the source html of the response, its actually: string(1574) "DEBUG HEADER : This is a cached page !<?xml version="1.0"?> <A lot of xml that looks pretty much like my WSDL file that my Zend_Soap_AutoDiscover generates> So whats going on? I searched online and i didnt really find any solid solutions. I don't have blank space before my <?php ?>..
soap
zend
wsdl
web-services
null
null
open
SOAP servers and clients with Zend framework (Getting errors) === I am testing a server and client i made on my webspace. when i try to call a simple "testServer" function defined in a ServerMap class, I get "Looks like we got no XML document" ..? I called getFunctions on the client and testServer is a valid function. I tried catching all exceptions and then calling __getLastResponseHeaders() and __getLastResponse. header: string(348) "HTTP/1.1 200 OK Date: Tue, 23 Jun 2009 19:36:29 GMT Server: Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.9 X-Powered-By: PHP/5.2.9 Cache-Control: max-age=1 Expires: Tue, 23 Jun 2009 19:36:30 GMT Vary: Accept-Encoding Content-Length: 1574 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html " response: string(1574) "DEBUG HEADER : This is a cached page ! " If i look at the source html of the response, its actually: string(1574) "DEBUG HEADER : This is a cached page !<?xml version="1.0"?> <A lot of xml that looks pretty much like my WSDL file that my Zend_Soap_AutoDiscover generates> So whats going on? I searched online and i didnt really find any solid solutions. I don't have blank space before my <?php ?>..
0
1,236,940
08/06/2009 04:19:29
19,853
09/21/2008 05:24:28
230
7
Respecting Fellow Developers
We've all been there. You have written some code and unit tests, the tests all pass, and the code is decent (nothing's perfect, right?). Then, someone who is sure that they know better than you comes along and decides to change your code or the interfaces to your code just because he/she does not like the variable/class names that you used. No "real" refactorings, no real optimizations, no real improvement -- just different words -- not necessarily better words, just different. My real problem with this is that (a) its a waste of time and (b) it shows a blatant disrespect for the fellow developer that wrote the code in the first place. My visceral response is to lash out, but that's counter productive. Instead, I though that I might wright a paragraph or two as sort of a "Charter" or "Philosophy" that is adopted for the project. I'm wondering if anyone else has tried this, and if so, was it successful? -- Thanks
process
human-resources
philosophical
null
null
08/25/2009 14:48:09
off topic
Respecting Fellow Developers === We've all been there. You have written some code and unit tests, the tests all pass, and the code is decent (nothing's perfect, right?). Then, someone who is sure that they know better than you comes along and decides to change your code or the interfaces to your code just because he/she does not like the variable/class names that you used. No "real" refactorings, no real optimizations, no real improvement -- just different words -- not necessarily better words, just different. My real problem with this is that (a) its a waste of time and (b) it shows a blatant disrespect for the fellow developer that wrote the code in the first place. My visceral response is to lash out, but that's counter productive. Instead, I though that I might wright a paragraph or two as sort of a "Charter" or "Philosophy" that is adopted for the project. I'm wondering if anyone else has tried this, and if so, was it successful? -- Thanks
2
5,384,601
03/21/2011 22:41:16
496,150
11/03/2010 15:57:10
18
0
Java Doubles are not good at math
I am currently writing a calculator program in java. It is my first java program, I am used to c++. I have noticed that doubles in java are not at all like doubles in c++. try this in java and c++ 4.1*3 that/.1 it should be 12.3 then 123, and c++ gives this result but java gives 12.299999999999999 and 122.99999999999999 How can I do math like in c++ with doubles, I understand that anything you would use 12.299999999999999 in a program at all would make no difference compared to 12.3, but when a user is reading the numbers this is very ugly. I have looked into the BigDecimal class but I cannot do trig and logarithms and whatnot with that class
java
c++
math
calculator
double-precision
03/23/2011 21:21:04
not a real question
Java Doubles are not good at math === I am currently writing a calculator program in java. It is my first java program, I am used to c++. I have noticed that doubles in java are not at all like doubles in c++. try this in java and c++ 4.1*3 that/.1 it should be 12.3 then 123, and c++ gives this result but java gives 12.299999999999999 and 122.99999999999999 How can I do math like in c++ with doubles, I understand that anything you would use 12.299999999999999 in a program at all would make no difference compared to 12.3, but when a user is reading the numbers this is very ugly. I have looked into the BigDecimal class but I cannot do trig and logarithms and whatnot with that class
1
612,488
03/04/2009 21:23:01
52,952
01/08/2009 15:12:23
1
0
Logoff button IIS6 ASP.NET Basic Authentication
I have a requirement for an explicit logout button for users in a ASP.NET web app. I am using IIS6 with Basic Authentication(SSL). I can redirect to another web page but the browser keeps the session alive. I have googled around and found a way to do it by enabling an active x control to communicate with IIS and kill the session. I am in a restricted environment that does not allow forms authentication and active x controls are not forbidden as well. Has anyone else had this requirement and how have you handled it?
iis-6
asp.net
basic-authentication
logoff
session
null
open
Logoff button IIS6 ASP.NET Basic Authentication === I have a requirement for an explicit logout button for users in a ASP.NET web app. I am using IIS6 with Basic Authentication(SSL). I can redirect to another web page but the browser keeps the session alive. I have googled around and found a way to do it by enabling an active x control to communicate with IIS and kill the session. I am in a restricted environment that does not allow forms authentication and active x controls are not forbidden as well. Has anyone else had this requirement and how have you handled it?
0
10,892,196
06/05/2012 05:45:02
737,322
05/04/2011 04:38:03
23
0
Testing anti-piracy code
Is there anyway to test an anti piracy code on iPhone app? I've implemented a little piracy code and I'm looking for a way to test it. I've downloaded Crackulous from Cydia to crack my own app, but it doesn't appear in the list....maybe because I've instAlled it using Xcode. Is there any solution for that? Thanks in advance for any help or suggestion!
objective-c
ios
piracy-prevention
null
null
06/05/2012 12:58:02
off topic
Testing anti-piracy code === Is there anyway to test an anti piracy code on iPhone app? I've implemented a little piracy code and I'm looking for a way to test it. I've downloaded Crackulous from Cydia to crack my own app, but it doesn't appear in the list....maybe because I've instAlled it using Xcode. Is there any solution for that? Thanks in advance for any help or suggestion!
2
303,048
11/19/2008 19:28:05
28,004
10/14/2008 20:23:06
543
54
creating an extensive project to be sold
I going to start a C# project from scratch that will consist in several modules so it **could be sold by modules** of an existing PHP/ASP/MySQL/Oracle/MS SQL application that manages to show 3D objects and create 2D and 3D CAD files from a web app that the user can use to create all the stuff. **My question is**, to start from ground zero, and having the "sell" point of view, it should be a good programming method that I should implement, design patterns, unit testing, etc... how will I know how to apply them, and is there any good tutorial / show me the way kind'a thing to know about this things, like... - what classes show I make available to be override by the client so I can provide extensibility in our Modules? - what kind of "package" should I use to "sell"? DLL, CAB, MSI? - should I use SubSonic / NHibernate so the user can generate it's own DAL? our prototype implementation will use only Oracle. I'm kinda lost right now, I know what to do, but not how can I accomplishing it (having this perfect codding path in mind). any good programming idea it gladly appreciated :)
c#
design-patterns
module
howto
null
null
open
creating an extensive project to be sold === I going to start a C# project from scratch that will consist in several modules so it **could be sold by modules** of an existing PHP/ASP/MySQL/Oracle/MS SQL application that manages to show 3D objects and create 2D and 3D CAD files from a web app that the user can use to create all the stuff. **My question is**, to start from ground zero, and having the "sell" point of view, it should be a good programming method that I should implement, design patterns, unit testing, etc... how will I know how to apply them, and is there any good tutorial / show me the way kind'a thing to know about this things, like... - what classes show I make available to be override by the client so I can provide extensibility in our Modules? - what kind of "package" should I use to "sell"? DLL, CAB, MSI? - should I use SubSonic / NHibernate so the user can generate it's own DAL? our prototype implementation will use only Oracle. I'm kinda lost right now, I know what to do, but not how can I accomplishing it (having this perfect codding path in mind). any good programming idea it gladly appreciated :)
0
8,454,418
12/10/2011 04:32:31
1,078,863
12/03/2011 10:24:07
1
0
How to fill dropdown list using javascript array classic asp
can any one help me out from to fill dropdownlist using javascript in classic asp. Thanks, Ruchi
javascript
asp-classic
vbscript
null
null
12/10/2011 13:17:49
not a real question
How to fill dropdown list using javascript array classic asp === can any one help me out from to fill dropdownlist using javascript in classic asp. Thanks, Ruchi
1
9,398,022
02/22/2012 15:43:36
439,688
08/07/2010 10:16:37
611
25
How to set some type of marker in a method so that I can tell whether the method was executed successfully or not in ruby on rails
I have class methods like these in a "message" model: def delete_all_users_messages(user_id, parent_id) message = Message.find_by_parent_id(parent_id) message.children.where(:sender_id => user_id ).update_all(:sender_status => 1) message.children.where(:recipient_id => user_id ).update_all(:recipient_status => 1 ) thread = message.message_thread thread.update_attribute(:sender_status, 1) if thread.sender_id == user_id thread.update_attribute(:recipient_status, 1) if thread.recipient_id == user_id if thread.sender_status == 1 && thread.recipient_status == 1 thread.delete Message.delete_all(:parent_id => parent_id) end end def delete_all_users_selected_messages(message_ids, user_id, parent_id) Message.where(:id => message_ids, :sender_id => user_id).update_all(:sender_status => 1) Message.where(:id => message_ids, :recipient_id => user_id).update_all(:recipient_status => 1) Message.where('id != ? AND parent_id = ?', parent_id, parent_id).where(:sender_status => 1, :recipient_status => 1).delete_all thread = MessageThread.find_by_message_id(parent_id) children_exist = thread.message.children.where('id != ? AND parent_id = ?', parent_id, parent_id).any? unless children_exist thread.delete thread.message.delete end I use them in my messages_controller like this: def destroy_all_messages Message.delete_all_users_messages(current_user.id, params[:format]) flash[:success] = "Messages deleted" redirect_to messages_path end def destroy_selected_messages Message.delete_all_users_selected_messages(params[:message_ids], current_user.id, params[:format]) flash[:success] = "Messages deleted" redirect_to :back end I would like to also return an error message if something went wrong.. but because all the logic for deleting messages is in my model it's quite hard to do this. Can anyone provide a solution with an example of how I could use some kind of condition to show my success message if messages were deleted and an error if they weren't because something went wrong. There must me some kind of markers I can put in the class methods to confirm they have passed a certain point successfully. Thanks for your time Kind regards
ruby-on-rails
ruby
ruby-on-rails-3
ruby-on-rails-3.1
rubygems
null
open
How to set some type of marker in a method so that I can tell whether the method was executed successfully or not in ruby on rails === I have class methods like these in a "message" model: def delete_all_users_messages(user_id, parent_id) message = Message.find_by_parent_id(parent_id) message.children.where(:sender_id => user_id ).update_all(:sender_status => 1) message.children.where(:recipient_id => user_id ).update_all(:recipient_status => 1 ) thread = message.message_thread thread.update_attribute(:sender_status, 1) if thread.sender_id == user_id thread.update_attribute(:recipient_status, 1) if thread.recipient_id == user_id if thread.sender_status == 1 && thread.recipient_status == 1 thread.delete Message.delete_all(:parent_id => parent_id) end end def delete_all_users_selected_messages(message_ids, user_id, parent_id) Message.where(:id => message_ids, :sender_id => user_id).update_all(:sender_status => 1) Message.where(:id => message_ids, :recipient_id => user_id).update_all(:recipient_status => 1) Message.where('id != ? AND parent_id = ?', parent_id, parent_id).where(:sender_status => 1, :recipient_status => 1).delete_all thread = MessageThread.find_by_message_id(parent_id) children_exist = thread.message.children.where('id != ? AND parent_id = ?', parent_id, parent_id).any? unless children_exist thread.delete thread.message.delete end I use them in my messages_controller like this: def destroy_all_messages Message.delete_all_users_messages(current_user.id, params[:format]) flash[:success] = "Messages deleted" redirect_to messages_path end def destroy_selected_messages Message.delete_all_users_selected_messages(params[:message_ids], current_user.id, params[:format]) flash[:success] = "Messages deleted" redirect_to :back end I would like to also return an error message if something went wrong.. but because all the logic for deleting messages is in my model it's quite hard to do this. Can anyone provide a solution with an example of how I could use some kind of condition to show my success message if messages were deleted and an error if they weren't because something went wrong. There must me some kind of markers I can put in the class methods to confirm they have passed a certain point successfully. Thanks for your time Kind regards
0
4,409,591
12/10/2010 14:11:24
526,477
12/01/2010 11:47:29
796
48
2D array initialisation in C
I know this is an old chestnut, but I want a small 2D array statically allocated in my code. I know the way to do this is: static int A[3][2] = { { 1, 2 }, { 3, 4 }, { 5, 6 } }; That's fine and I can access all the members of it. However I have several problems passing it to a function, e.g.: void print_matrix(int **a, int r, int c) { int x, y; for(x = 0; x < r; x++) { printf("Row %02d = %#x = ", x, a[x]); for(y = 0; y < c; y++) { printf("%s%d", (0 == y) ? "" : ", ", a[x][y]); } printf("\n"); } } Firstly I can't simply pass `A` to the function, I need to cast it to (int **). Since `char *` is synonymous to `char []`, I was a little surprised at this. Secondly, it crashes and when I check in the debugger, within the sub-function, `a[0]` is reported as `1` and not a pointer to an array of integers. I know there is compiler/C language arcane magic happening here. But it is all a little confusing. If I try to initialise as: static int *A[3] = { { 1, 2 }, { 3, 4 }, { 5, 6 } }; I get a ton of warnings. How does this differ to: static char *S[3] = { "hello". "there", "stackoverflow" }; ----- Apart from the question of arcane C magic, which somehow I have never learnt despite over a decade of C programming :(, I would like to know how to generate my array so I can successfully pass it as an `int **` without having to go through all the fag of for loops or copying the statically allocated array to a dynamically allocated one. Would the following work? int *A0 = { 1, 2 }; int *A1 = { 3, 4 }; int *A2 = { 5, 6 }; int **A = { A0, A1, A2 }; Is there a nicer way than this of doing it? Thanks, all. P.s. I know that in real life we would read values from a DB or file into dynamically allocated arrays and avoid all this stuff.
c
multidimensional-array
null
null
null
null
open
2D array initialisation in C === I know this is an old chestnut, but I want a small 2D array statically allocated in my code. I know the way to do this is: static int A[3][2] = { { 1, 2 }, { 3, 4 }, { 5, 6 } }; That's fine and I can access all the members of it. However I have several problems passing it to a function, e.g.: void print_matrix(int **a, int r, int c) { int x, y; for(x = 0; x < r; x++) { printf("Row %02d = %#x = ", x, a[x]); for(y = 0; y < c; y++) { printf("%s%d", (0 == y) ? "" : ", ", a[x][y]); } printf("\n"); } } Firstly I can't simply pass `A` to the function, I need to cast it to (int **). Since `char *` is synonymous to `char []`, I was a little surprised at this. Secondly, it crashes and when I check in the debugger, within the sub-function, `a[0]` is reported as `1` and not a pointer to an array of integers. I know there is compiler/C language arcane magic happening here. But it is all a little confusing. If I try to initialise as: static int *A[3] = { { 1, 2 }, { 3, 4 }, { 5, 6 } }; I get a ton of warnings. How does this differ to: static char *S[3] = { "hello". "there", "stackoverflow" }; ----- Apart from the question of arcane C magic, which somehow I have never learnt despite over a decade of C programming :(, I would like to know how to generate my array so I can successfully pass it as an `int **` without having to go through all the fag of for loops or copying the statically allocated array to a dynamically allocated one. Would the following work? int *A0 = { 1, 2 }; int *A1 = { 3, 4 }; int *A2 = { 5, 6 }; int **A = { A0, A1, A2 }; Is there a nicer way than this of doing it? Thanks, all. P.s. I know that in real life we would read values from a DB or file into dynamically allocated arrays and avoid all this stuff.
0
3,234,054
07/13/2010 03:47:23
205,007
11/06/2009 16:12:06
826
37
Does NSURLConnection Block the Main/UI Thread
I am downloading images in table view cells as they scroll onto the screen. For UX reasons, I start downloading the images in `- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath`. I do not wait until the table view is done scrolling. When the table view cell is set, I start downloading images that I do not have already. However, they do not seem to fully download until the table view stops moving. As soon as it stops moving, the images almost download instantly. Is there anyway to use NSURLConnection where it is not blocked by the main UI thread? Or, is there a way where these images will download very quickly while the table view is being scrolled.
iphone
objective-c
ipad
nsurlconnection
null
null
open
Does NSURLConnection Block the Main/UI Thread === I am downloading images in table view cells as they scroll onto the screen. For UX reasons, I start downloading the images in `- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath`. I do not wait until the table view is done scrolling. When the table view cell is set, I start downloading images that I do not have already. However, they do not seem to fully download until the table view stops moving. As soon as it stops moving, the images almost download instantly. Is there anyway to use NSURLConnection where it is not blocked by the main UI thread? Or, is there a way where these images will download very quickly while the table view is being scrolled.
0
11,526,582
07/17/2012 16:11:41
1,532,341
07/17/2012 16:05:13
1
0
Java: Convert bool array into a single int
I have a boolean array (length = 2) that I want to consecrate and convert to an int as if they were binary. ie: [false, false] = 0 [false, true] = 1 [true, false] = 2 [true, true] = 3
java
boolean
int
convert
null
07/20/2012 00:14:49
not a real question
Java: Convert bool array into a single int === I have a boolean array (length = 2) that I want to consecrate and convert to an int as if they were binary. ie: [false, false] = 0 [false, true] = 1 [true, false] = 2 [true, true] = 3
1
4,954,916
02/10/2011 08:38:51
451,302
09/18/2010 08:56:56
112
1
image upload is not working in ckeditor in drupal
hi i have installed ckeditor in my drupal website and i have set the configuration setting but when i try to upload the image it gives me the error "NotAccess". how can i remove this error. which setting i have to enable for this. Please guide me or give me some suggestion.
drupal
null
null
null
null
null
open
image upload is not working in ckeditor in drupal === hi i have installed ckeditor in my drupal website and i have set the configuration setting but when i try to upload the image it gives me the error "NotAccess". how can i remove this error. which setting i have to enable for this. Please guide me or give me some suggestion.
0
3,116,748
06/25/2010 08:58:58
246,776
01/08/2010 22:16:08
546
16
Is that stable multiple versions of iPhone SDK on single Mac?
I'm trying to make an app which compatible with 3.x and 4.x iOS. But SDK 4 supports only SDK 4.x and iPad, there is no 3.x SDK for iPhone. So I'm considering installing 3.1.3 SDK on my main workstation with 4.x SDK. I know it's possible to install multiple SDKs on a Mac, but I'm afraid any unknown problem by this. Anyone who experienced with multiple SDKs, please let me know what happened.
iphone
null
null
null
null
null
open
Is that stable multiple versions of iPhone SDK on single Mac? === I'm trying to make an app which compatible with 3.x and 4.x iOS. But SDK 4 supports only SDK 4.x and iPad, there is no 3.x SDK for iPhone. So I'm considering installing 3.1.3 SDK on my main workstation with 4.x SDK. I know it's possible to install multiple SDKs on a Mac, but I'm afraid any unknown problem by this. Anyone who experienced with multiple SDKs, please let me know what happened.
0
472,077
01/23/2009 06:31:06
36,590
11/11/2008 14:33:47
826
41
Good or Bad? Bring "Function Chaining" Capabilities to PHP
So I was thinking one way that you can bring method chaining into PHP with the built-in global functions would be to "borrow" the |> (pipe) operator from F#. It would pipe the results on the left into the first parameter of the function on the right. Of course PHP would have to revisit the parameter order of some of their functions. This would allow you to write: function StrManip($val) { return str_repeat(strtolower(trim($val)),2); } Like this: function StrManip($val) { return $val |> trim() |> strtolower() |> str_repeat(2); }
php
language-features
suggestion
feedback
null
07/19/2011 18:31:36
not constructive
Good or Bad? Bring "Function Chaining" Capabilities to PHP === So I was thinking one way that you can bring method chaining into PHP with the built-in global functions would be to "borrow" the |> (pipe) operator from F#. It would pipe the results on the left into the first parameter of the function on the right. Of course PHP would have to revisit the parameter order of some of their functions. This would allow you to write: function StrManip($val) { return str_repeat(strtolower(trim($val)),2); } Like this: function StrManip($val) { return $val |> trim() |> strtolower() |> str_repeat(2); }
4
677,453
03/24/2009 13:41:57
36,609
11/11/2008 15:28:09
35
0
Does ImagePicker API in iPhone OS 3.0 now include geo-tagging?
I'm looking at the ImagePicker API spec for iPhone OS 3.0 and don't see any reference to location being integrated into photo. I know that with OS 2.x photos taken through ImagePicker would not include location data. However I am wondering if anyone can confirm whether geo-tagging is indeed lacking in the new ImagePicker API as well. Not sure why they would continue to leave this out when the native camera app has had it for awhile. Thanks
iphone
null
null
null
null
null
open
Does ImagePicker API in iPhone OS 3.0 now include geo-tagging? === I'm looking at the ImagePicker API spec for iPhone OS 3.0 and don't see any reference to location being integrated into photo. I know that with OS 2.x photos taken through ImagePicker would not include location data. However I am wondering if anyone can confirm whether geo-tagging is indeed lacking in the new ImagePicker API as well. Not sure why they would continue to leave this out when the native camera app has had it for awhile. Thanks
0
10,381,094
04/30/2012 09:10:42
1,365,403
04/30/2012 09:03:48
1
0
WFS as vector layer in Open Layers through Map Server
I am working on OpenLayers and want to implement WFS as vector layer(using WFS services from .map file) using Map Server . But am not able to implement it . Please help me for that .
openlayers
null
null
null
null
null
open
WFS as vector layer in Open Layers through Map Server === I am working on OpenLayers and want to implement WFS as vector layer(using WFS services from .map file) using Map Server . But am not able to implement it . Please help me for that .
0
8,251,393
11/24/2011 01:55:19
1,010,127
10/24/2011 01:52:09
11
0
Using Javascript to pass a parameter from a URL to a hidden form field
I wasn to be able to pass and ID such as '123456' from a URL: http://www.mysite.com/page.html?ID=123456 to a hidden form field. I found a Javascript that lets me write the ID to a page but I don't know how to add the value to the value="" bit of a hidden input field. Any ideas much appreciated!
javascript
hidden-field
null
null
null
null
open
Using Javascript to pass a parameter from a URL to a hidden form field === I wasn to be able to pass and ID such as '123456' from a URL: http://www.mysite.com/page.html?ID=123456 to a hidden form field. I found a Javascript that lets me write the ID to a page but I don't know how to add the value to the value="" bit of a hidden input field. Any ideas much appreciated!
0
3,043,154
06/15/2010 07:06:48
366,979
06/15/2010 07:06:48
1
0
Combining multiple condition in single case statement in Sql Server
According to the following description i have to frame a case ...End statement in Sql server ,help me to frame a complex case..End statement to fulfil the following condition. if PAT_ENT.SCR_DT is not null and PAT_ENTRY.ELIGIBILITY is null then display display 'Favor' if PAT_ENT.SCR_DT is not null and PAT_ENTRY.EL is equal to No, display 'Error' if PAT_ENTRY.EL is Yes and DS.DES is equal to null or OFF, display 'Active' if DS.DES is equal to N, display 'Early Term' if DS.DES is equal to Y, display 'Complete' Thanks in advance.
sql-server
sql-server-2005
null
null
null
null
open
Combining multiple condition in single case statement in Sql Server === According to the following description i have to frame a case ...End statement in Sql server ,help me to frame a complex case..End statement to fulfil the following condition. if PAT_ENT.SCR_DT is not null and PAT_ENTRY.ELIGIBILITY is null then display display 'Favor' if PAT_ENT.SCR_DT is not null and PAT_ENTRY.EL is equal to No, display 'Error' if PAT_ENTRY.EL is Yes and DS.DES is equal to null or OFF, display 'Active' if DS.DES is equal to N, display 'Early Term' if DS.DES is equal to Y, display 'Complete' Thanks in advance.
0
1,175,553
07/24/2009 02:55:01
131,482
07/01/2009 05:09:00
16
0
any good comparison for javascript vs. other OO languages?
I've just started learning javascript and noticing its attributes relating to other OO languages (weakly typed like php/tcl, has error handling and inheritance like java's model). When I was learning java there were several "C++ vs. Java" comparisons that really helped me wrap my head around the philosophy of the language. Javascript does seem to have some stuff different than other languages such as closures, was wondering if anybody knows a good comparison/rundown of the language compared to the functional/OO languages i know (php, C/C++, java, tcl) to help me get a handle on it. Thanks!
javascript
oop
null
null
null
null
open
any good comparison for javascript vs. other OO languages? === I've just started learning javascript and noticing its attributes relating to other OO languages (weakly typed like php/tcl, has error handling and inheritance like java's model). When I was learning java there were several "C++ vs. Java" comparisons that really helped me wrap my head around the philosophy of the language. Javascript does seem to have some stuff different than other languages such as closures, was wondering if anybody knows a good comparison/rundown of the language compared to the functional/OO languages i know (php, C/C++, java, tcl) to help me get a handle on it. Thanks!
0
5,930,565
05/08/2011 21:40:00
538,786
12/11/2010 09:57:35
84
1
jQuery UI Tabs - Uncaught TypeError: Cannot call method 'split' of undefined
What am I doing wrong? The tabs will not work at all. http://pastebin.com/tBsjbZWV
javascript
jquery
jquery-ui-tabs
null
null
05/09/2011 08:55:36
not a real question
jQuery UI Tabs - Uncaught TypeError: Cannot call method 'split' of undefined === What am I doing wrong? The tabs will not work at all. http://pastebin.com/tBsjbZWV
1
8,352,569
12/02/2011 06:29:58
1,076,829
12/02/2011 06:24:31
1
0
How do I play videos in a website without using youtube?
How do I play videos in a website? I have to create a website which people can upload videos and also other users can rate it.Going to develop the site in php. Please help me Thanks
php
null
null
null
null
12/05/2011 10:00:57
not a real question
How do I play videos in a website without using youtube? === How do I play videos in a website? I have to create a website which people can upload videos and also other users can rate it.Going to develop the site in php. Please help me Thanks
1
9,341,971
02/18/2012 14:18:37
425,031
08/19/2010 09:43:39
115
14
Like Button & count on a wordpress blog for a community page which I am admin?
Hi I am an admin on a community page. I am developing a website with wordpress for this community page. Using the Simple Facebook Connect plugin I have got a like box + counter on the wordpress site. But I cannot see how to link the button with the community page? (it seems to connect to my app only) I had to make an application and got an application ID and secret from that. On the facebook app-profile I searched for a way to make it "Refer" to the community page, but no answer! Is it that I must have been the person who "created" the community page or what? If you can help or even just point me to the documentation on this? The wordpress plugin has some info on linking it all up , but it seems outdated as the app-profile page it describes on facebook is totally different now.
application
page
facebook-page
community
null
03/02/2012 20:26:08
off topic
Like Button & count on a wordpress blog for a community page which I am admin? === Hi I am an admin on a community page. I am developing a website with wordpress for this community page. Using the Simple Facebook Connect plugin I have got a like box + counter on the wordpress site. But I cannot see how to link the button with the community page? (it seems to connect to my app only) I had to make an application and got an application ID and secret from that. On the facebook app-profile I searched for a way to make it "Refer" to the community page, but no answer! Is it that I must have been the person who "created" the community page or what? If you can help or even just point me to the documentation on this? The wordpress plugin has some info on linking it all up , but it seems outdated as the app-profile page it describes on facebook is totally different now.
2
8,646,808
12/27/2011 16:21:26
1,117,923
12/27/2011 16:12:44
1
0
Trying to install ruby as system admin
I am managing a few linux clusters. I am trying to install ruby and some gems for all users, but I'm stuck somehow. 1. Easy version control/switching would be favorable. 2. All users should able to execute ruby AND gems without any problem. However, any capability for users to have control over installation/management of rubies and gems is not needed. 3. All users are using tcsh. Thus I guess RVM is not an option (I tried). 4. When I change ruby-related environment, I'd like to the change applied to all users, without them having them do something... I guess this might be accomplishable with /etc/csh.cshrc or /etc/skel/.tcshrc. 5. I don't want to touch group settings (while RVM forces it). I'm currently considering using rbenv, but it is somewhat uncertain if it satisfies conditions above... I may abandon condition 1, but I have still no idea about getting gems working for all users...
ruby
rvm
tcsh
rbenv
null
01/22/2012 18:01:31
not a real question
Trying to install ruby as system admin === I am managing a few linux clusters. I am trying to install ruby and some gems for all users, but I'm stuck somehow. 1. Easy version control/switching would be favorable. 2. All users should able to execute ruby AND gems without any problem. However, any capability for users to have control over installation/management of rubies and gems is not needed. 3. All users are using tcsh. Thus I guess RVM is not an option (I tried). 4. When I change ruby-related environment, I'd like to the change applied to all users, without them having them do something... I guess this might be accomplishable with /etc/csh.cshrc or /etc/skel/.tcshrc. 5. I don't want to touch group settings (while RVM forces it). I'm currently considering using rbenv, but it is somewhat uncertain if it satisfies conditions above... I may abandon condition 1, but I have still no idea about getting gems working for all users...
1
4,056,919
10/30/2010 01:59:23
170,352
09/08/2009 18:23:21
1,176
50
R Quality Assurance Techniques
Could you provide some insight into the techniques that you use to ensure the quality of your solutions. For example, sometimes, I like to test my result using stopif() to ensure I'm not receiving ridiculous results. Are there any other techniques or functions that you use in data processing to ensure that you're receiving the solution you meant to? Note: I realize that this is a broad question and perhaps a candidate for community wiki or even closure, but rather than voting to close, perhaps assist me by adding comments to direct the conversation.
r
null
null
null
null
null
open
R Quality Assurance Techniques === Could you provide some insight into the techniques that you use to ensure the quality of your solutions. For example, sometimes, I like to test my result using stopif() to ensure I'm not receiving ridiculous results. Are there any other techniques or functions that you use in data processing to ensure that you're receiving the solution you meant to? Note: I realize that this is a broad question and perhaps a candidate for community wiki or even closure, but rather than voting to close, perhaps assist me by adding comments to direct the conversation.
0
3,735,766
09/17/2010 13:35:49
46,011
12/13/2008 19:05:05
3,396
99
Whats the best general purpose PHP framework?
I know there may be a better framework depending on what type of project you are working on. However, if I just wanted to learn one PHP framework, which one would be the best all-purpose solution? Or should I just not use a framework like I have been doing?
php
frameworks
null
null
null
09/17/2010 13:41:18
not constructive
Whats the best general purpose PHP framework? === I know there may be a better framework depending on what type of project you are working on. However, if I just wanted to learn one PHP framework, which one would be the best all-purpose solution? Or should I just not use a framework like I have been doing?
4
8,461,757
12/11/2011 03:26:38
487,855
10/05/2010 20:42:09
584
14
Can we have supertags, basically union of other tags
Can we have supertags, basically union of other tags. Like `web-dev` to be union of `html` and `css` and `javascript` or `iOS-dev` to be a union of `ios`, `iphone`, `ipad`, `objective-c` or `nix` to be a union of `linux`, `unix`, `freebsd`, `openbsd`,`macosx` ...
tags
null
null
null
null
12/11/2011 03:44:52
off topic
Can we have supertags, basically union of other tags === Can we have supertags, basically union of other tags. Like `web-dev` to be union of `html` and `css` and `javascript` or `iOS-dev` to be a union of `ios`, `iphone`, `ipad`, `objective-c` or `nix` to be a union of `linux`, `unix`, `freebsd`, `openbsd`,`macosx` ...
2
2,334,568
02/25/2010 14:20:39
223,465
12/03/2009 02:17:02
215
7
Threading books for C++
I'm looking for books that would help my understanding regarding threading in C++. What are the best books available? And also, can you specify which threading library it uses and its level like beginner, intermediate, advanced or reference.
c++
multithreading
books
null
null
09/22/2011 00:51:49
not constructive
Threading books for C++ === I'm looking for books that would help my understanding regarding threading in C++. What are the best books available? And also, can you specify which threading library it uses and its level like beginner, intermediate, advanced or reference.
4
11,315,209
07/03/2012 16:26:53
1,037,884
11/09/2011 14:37:31
91
2
JQuery autocomplete and images speed issues
I'm using jquery autocomplete to load products complete with thumbnails. The trouble is that each image load takes up a http request and most browsers have a limit on how many requests can be made to one hostname in parallel. What this means is after typing the first letter into search the script will immediately fetch 20 images (for example), but this exceeds the parallel http requests limit which means an immediate subsequent letter press does not carry out the ajax instantly. Instead it waits in queue until the previous images have loaded. Only then will the search update. This is very frustrating for the user, especially considering that the images I'm using are quite large in file size. The only way I have found to overcome this is to place the javascript on a separate sub domain to the images, then JS loads instantly without waiting for images to load. However this is not a solution I can use in this project. Any other solutions?
jquery
image
autocomplete
null
null
null
open
JQuery autocomplete and images speed issues === I'm using jquery autocomplete to load products complete with thumbnails. The trouble is that each image load takes up a http request and most browsers have a limit on how many requests can be made to one hostname in parallel. What this means is after typing the first letter into search the script will immediately fetch 20 images (for example), but this exceeds the parallel http requests limit which means an immediate subsequent letter press does not carry out the ajax instantly. Instead it waits in queue until the previous images have loaded. Only then will the search update. This is very frustrating for the user, especially considering that the images I'm using are quite large in file size. The only way I have found to overcome this is to place the javascript on a separate sub domain to the images, then JS loads instantly without waiting for images to load. However this is not a solution I can use in this project. Any other solutions?
0
10,942,257
06/08/2012 02:08:20
1,354,497
04/24/2012 18:33:28
116
11
Printing a DIV using Jquery and CSS on landscape mode
I am currently trying to build a coupon system, The coupon has several informations on it (Address, name, google map, a QR code etc) Right now Iam trying to use a button in order to print the coupon only. The coupon is generated on a white page only the body the container DIV and a printing button exist on the page. The QR code is generated using a jquery plugin. My main problem is that no css styles are attached to the printing material although I have made the following statement on my header <link href="/media/css/coupon.css" rel="stylesheet" media="screen" type="text/css" /> <link rel="stylesheet" href="/media/css/coupon.css" type="text/css" media="print" /> Also, I am seeking for a solution in order to force the coupon to be printed on landscape mode as the container DIV is too large for a single page on portrait mode. You can take a look on my live example over [here][1] I have used for testing Chrome, Mozilla and Opera with OSX but still no luck. [1]: http://jsfiddle.net/q8DeF/1/
jquery
css
printing
landscape-portrait
null
null
open
Printing a DIV using Jquery and CSS on landscape mode === I am currently trying to build a coupon system, The coupon has several informations on it (Address, name, google map, a QR code etc) Right now Iam trying to use a button in order to print the coupon only. The coupon is generated on a white page only the body the container DIV and a printing button exist on the page. The QR code is generated using a jquery plugin. My main problem is that no css styles are attached to the printing material although I have made the following statement on my header <link href="/media/css/coupon.css" rel="stylesheet" media="screen" type="text/css" /> <link rel="stylesheet" href="/media/css/coupon.css" type="text/css" media="print" /> Also, I am seeking for a solution in order to force the coupon to be printed on landscape mode as the container DIV is too large for a single page on portrait mode. You can take a look on my live example over [here][1] I have used for testing Chrome, Mozilla and Opera with OSX but still no luck. [1]: http://jsfiddle.net/q8DeF/1/
0
6,754,265
07/19/2011 21:16:46
719,781
04/21/2011 22:42:01
8
0
Best Test Case Management Tool. Ability to Migrate from TestLink. Integration with JIRA.
I'm evaluating a change of Test Management Tool. Currently we are using TestLink and have 3000 TCs on it. My main issues with it are; the lack of field customization in TC creation, not possible to call reusable TCs, HTML tags needed to format text... I have the possibility of request budget for a paid tool, but it should be worth it and affordable (Not like HP Quality Center). Of course I will need to migrate my current suite to the new tool and it will be great if the tool could be integrated with JIRA as we use it for Bug/Req tracking. I would greatly appreciate if somebody could give me feedback and advice on this subject.
testing
integration
test-management
null
null
07/26/2012 12:50:20
not constructive
Best Test Case Management Tool. Ability to Migrate from TestLink. Integration with JIRA. === I'm evaluating a change of Test Management Tool. Currently we are using TestLink and have 3000 TCs on it. My main issues with it are; the lack of field customization in TC creation, not possible to call reusable TCs, HTML tags needed to format text... I have the possibility of request budget for a paid tool, but it should be worth it and affordable (Not like HP Quality Center). Of course I will need to migrate my current suite to the new tool and it will be great if the tool could be integrated with JIRA as we use it for Bug/Req tracking. I would greatly appreciate if somebody could give me feedback and advice on this subject.
4
11,237,027
06/28/2012 01:37:30
1,487,263
06/28/2012 01:32:53
1
0
How to make spotify ipad app login screen Xcode
How would i make a view in xcode like the spotify login window with images moving like a carousal in the background ![enter image description here][1] http://i.stack.imgur.com/TZvAX.png (image of login app)
xcode
animation
spotify
null
null
06/29/2012 03:11:08
not a real question
How to make spotify ipad app login screen Xcode === How would i make a view in xcode like the spotify login window with images moving like a carousal in the background ![enter image description here][1] http://i.stack.imgur.com/TZvAX.png (image of login app)
1
11,653,813
07/25/2012 15:57:07
1,057,649
11/21/2011 10:54:04
6
0
Physically cut off right top corner of an image
Goodday! I seem to have an issue wich i cannot resolve. Example; I have a div with a gradient from white to gray. In this div there is a image with a outerglow (css). This image needs his right top corner 'cut off' with an angle of 45 degr. Not a big issue one might think. Put a transparant image with a colored corner over it, or use css3. But the problem is the gradient. At the bottom there's the gray color. If you use the image with a colored corner, the colors won't match anymore. I can't use the css3 border radius because of IE/older browsers. Is there a way to 'physically' cut off the corner with jQuery? The website is in ASP.NET C# so csharp solution would also work. Thx!
jquery
html
css
null
null
07/26/2012 20:45:41
not a real question
Physically cut off right top corner of an image === Goodday! I seem to have an issue wich i cannot resolve. Example; I have a div with a gradient from white to gray. In this div there is a image with a outerglow (css). This image needs his right top corner 'cut off' with an angle of 45 degr. Not a big issue one might think. Put a transparant image with a colored corner over it, or use css3. But the problem is the gradient. At the bottom there's the gray color. If you use the image with a colored corner, the colors won't match anymore. I can't use the css3 border radius because of IE/older browsers. Is there a way to 'physically' cut off the corner with jQuery? The website is in ASP.NET C# so csharp solution would also work. Thx!
1
5,859,754
05/02/2011 16:34:25
322,492
04/21/2010 16:19:19
301
0
Which is the best mobile web application development framework
I am in the process of converting an existing Java/J2EE based web application into Mobile web application which should support iPhone, Androind devices, Blackberry etc. And also different screen sizes like 320x480, 768x1024, 1024x600 etc.<br/><br/> I found that **SenchaTouch**, **JQTouch** and **JqueryMobile** are some of the frameworks currently available. <br><br>Are there any other framworks available? and for the requirement I have, which is the right framework?
android
iphone-web
jqtouch
sencha-touch
mobile-development
11/16/2011 18:25:33
not constructive
Which is the best mobile web application development framework === I am in the process of converting an existing Java/J2EE based web application into Mobile web application which should support iPhone, Androind devices, Blackberry etc. And also different screen sizes like 320x480, 768x1024, 1024x600 etc.<br/><br/> I found that **SenchaTouch**, **JQTouch** and **JqueryMobile** are some of the frameworks currently available. <br><br>Are there any other framworks available? and for the requirement I have, which is the right framework?
4
9,352,116
02/19/2012 18:52:37
387,848
02/14/2010 23:31:05
490
14
NSLocale setPreferredLanguage
I seem to be going in circles around this problem and I am heading no where now. I am trying to force the language of my app (to swedish) as shown below. @autoreleasepool { [[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObjects:@"sv", nil] forKey:@"AppleLanguages"]; [[NSUserDefaults standardUserDefaults]synchronize]; return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } I have done it in the main method, so that preference is set as soon as the application is launched. Then when i want to sort an array alphabetically i use `NSSortDescriptor` with selector `localizedCaseInsensitiveCompare:`. > NSSortDescriptor *valueDescriptor = [[NSSortDescriptor alloc] initWithKey:@"iName" ascending:YES selector:@selector(localizedCaseInsensitiveCompare:)]; > NSArray * descriptors = [NSArray arrayWithObject:valueDescriptor]; > self.ingredientsList = [NSMutableArray arrayWithArray:[self.ingredientsList sortedArrayUsingDescriptors:descriptors]]; But my problem is sorting with my local language does not happen the first time. But if I restart the app, the sorting is according to the language (Swedish). Why doesnt it happen the first time? What am i doing wrong? Help/suggestions will be appreciated. Thanks
iphone
objective-c
nsuserdefaults
nssortdescriptor
nslocale
null
open
NSLocale setPreferredLanguage === I seem to be going in circles around this problem and I am heading no where now. I am trying to force the language of my app (to swedish) as shown below. @autoreleasepool { [[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObjects:@"sv", nil] forKey:@"AppleLanguages"]; [[NSUserDefaults standardUserDefaults]synchronize]; return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } I have done it in the main method, so that preference is set as soon as the application is launched. Then when i want to sort an array alphabetically i use `NSSortDescriptor` with selector `localizedCaseInsensitiveCompare:`. > NSSortDescriptor *valueDescriptor = [[NSSortDescriptor alloc] initWithKey:@"iName" ascending:YES selector:@selector(localizedCaseInsensitiveCompare:)]; > NSArray * descriptors = [NSArray arrayWithObject:valueDescriptor]; > self.ingredientsList = [NSMutableArray arrayWithArray:[self.ingredientsList sortedArrayUsingDescriptors:descriptors]]; But my problem is sorting with my local language does not happen the first time. But if I restart the app, the sorting is according to the language (Swedish). Why doesnt it happen the first time? What am i doing wrong? Help/suggestions will be appreciated. Thanks
0
241,345
10/27/2008 20:55:40
22,777
09/26/2008 17:14:26
203
22
Should I take programming courses when I already have experience?
I have been a programmer for about 3 and a half years. I took a few computer science courses in college ( specifically C and Java), but recently feel like there's a number of things I wish I knew. Real nuts and bolts computer science type things. Stack versus heap. Design patterns, good database design. I am reluctant to go back to school since I have a Master's in math, and I still feel like I have had my fill. However, is there something that I could have learned in classes that I won't have already learned in the real world? If so, that could outweigh my hesitancy.
self-improvement
null
null
null
null
03/01/2012 19:48:03
not constructive
Should I take programming courses when I already have experience? === I have been a programmer for about 3 and a half years. I took a few computer science courses in college ( specifically C and Java), but recently feel like there's a number of things I wish I knew. Real nuts and bolts computer science type things. Stack versus heap. Design patterns, good database design. I am reluctant to go back to school since I have a Master's in math, and I still feel like I have had my fill. However, is there something that I could have learned in classes that I won't have already learned in the real world? If so, that could outweigh my hesitancy.
4
8,443,548
12/09/2011 09:36:49
1,066,779
11/26/2011 10:23:44
1
0
what data type should select to store song url and name in asp c#?
I want to upload a mp3 and store song details in audio table and save that song to a folder. and when user click the play button then pass that song url to windows media player to play the song... i has created a table like: Column Datatype Allownulls s_ID (primary) int no Songurl Varchar(MAX) yes song name Varchar(50) yes i am using MS visual studio 2008 and sql server 2005. plz suggest me idea and example of code to how to create... Advace thank you...
c#
asp.net
null
null
null
12/09/2011 14:11:35
not a real question
what data type should select to store song url and name in asp c#? === I want to upload a mp3 and store song details in audio table and save that song to a folder. and when user click the play button then pass that song url to windows media player to play the song... i has created a table like: Column Datatype Allownulls s_ID (primary) int no Songurl Varchar(MAX) yes song name Varchar(50) yes i am using MS visual studio 2008 and sql server 2005. plz suggest me idea and example of code to how to create... Advace thank you...
1
2,054,557
01/13/2010 05:02:39
30,636
10/23/2008 04:07:52
471
4
Best font size for Latex Beamer
I am preparing a presentation in latex using the beamer package. I am wondering what font size "pros" who give a lot of presentations use to make sure people in the back of the room can see. The default font size seems a bit small to me. Thanks, Setjmp
latex
beamer
presentation
fonts
size
null
open
Best font size for Latex Beamer === I am preparing a presentation in latex using the beamer package. I am wondering what font size "pros" who give a lot of presentations use to make sure people in the back of the room can see. The default font size seems a bit small to me. Thanks, Setjmp
0