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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8,130,585 | 11/15/2011 01:56:06 | 701,678 | 04/11/2011 06:42:09 | 100 | 14 | Is is possible to determine the local path from url? | I have access to apache web server. It is a web service application using Python.
I would like to access a file (100% sure reside in the local which is the web server itself) but I have only the url.
I am thinking of references any setting file of apache web server to determine the absolute local path of the file.
let say I have this kind of url: http://localhost/service/abc.jpg . So I can parse it to get the filename then obtain the decided local path from setting file.
But.. how about this kind of url: http://localhost/service/imagefile1 . In this case, I have only the url that the filename is not included in the url but still valid url. Is it possible to obtain the absolute local path of the file from url?
Any guidance is appreciated. | python | apache | url-routing | null | null | null | open | Is is possible to determine the local path from url?
===
I have access to apache web server. It is a web service application using Python.
I would like to access a file (100% sure reside in the local which is the web server itself) but I have only the url.
I am thinking of references any setting file of apache web server to determine the absolute local path of the file.
let say I have this kind of url: http://localhost/service/abc.jpg . So I can parse it to get the filename then obtain the decided local path from setting file.
But.. how about this kind of url: http://localhost/service/imagefile1 . In this case, I have only the url that the filename is not included in the url but still valid url. Is it possible to obtain the absolute local path of the file from url?
Any guidance is appreciated. | 0 |
3,207,096 | 07/08/2010 19:17:14 | 387,069 | 07/08/2010 19:17:14 | 1 | 0 | WIX: persist session data between C# CustomActions and subsequently displayed WIX Dialog | I am new to WIX and have been tasked with creating an installer that does
the following:
*Deploys a build of our application without overwriting the App.Config file
for the application
*Loads the key/values in the App.Config file and prompts the user with the
"defaults" (existing values) and allows them to modify them before finishing
*SAVES the values the user provided (or defaults if the user made no
changes) back to the App.Config file for use with the application.
I've got the WIX dilalogs and custom actions laid out successfully where
after InstallFinalize, my "LoadDefaultOptions" CustomAction is executed,
which successfully takes the installation directory and the app config file
name, loads it in an XML reader, and parses the key/value pairs, setting
them into the session variable in this manner:
session[key] = value;
My custom action(s) are defined as:
<CustomAction Id="LoadDefaultOptions" Return="asyncWait" Execute="immediate" BinaryKey="aeserverDbDialogPackage.dll" DllEntry="LoadDefaultOptions"/>
<CustomAction Id="SetConfigOptions" Return="check" Execute="immediate" BinaryKey="aeserverDbDialogPackage.dll" DllEntry="SetConfigOptions"/>
The LoadDefaultOptions executes as such:
`<Custom Action="LoadDefaultOptions" After="InstallFinalize" />`
I have the custom dialog edit properties set like this:
<Control Id="CCPDbConnString" Type="Edit" X="20" Y="62" Width="150"
Height="18" Property="CCPCONNECTIONSTRING" Indirect="no" />
There's a matching Property tag earlier in the WXS file like this:
<Property Id="CCPCONNECTIONSTRING" Secure="yes" ></Property>
...And the LoadDefaultOptions customAction overwrites the session var like
this:
session["CCPCONNECTIONSTRING"] = <value parsed from file>;
According to session logs, this works as expected, the xml parse works, and
the session vars are set.
My problem is when my custom dialog comes around to prompt the user with
those stored defaults AFTER the LoadDefaultOptions CustomAction has run.
The ORIGINAL property values of the session variables seem to have "stuck"
instead of being overwritten by the custom action that loaded the defaults
via the xml file and stored them in the session. (they are blank as their
original properties are defined, or in the case I define them otherwise,
they show those values instead of the session written values)
How do you get Dialogs to "read" overridden session variables by
CustomActions?
Ultimately I want to load those values from the app config, prompt them back
to the user in an optional dialog prompt off the exit screen (which works so
far, aside from not getting updated session vars), and then on command from
that prompt dialog, run another custom action to re-write the App.Config
file with the settings provided from the custom dialog...
I just can't get the session vars to PERSIST!!!
Any ideas? am I completely off base attempting to use the session in this manner? how else could I parse the app.config file, and allow an installation user to change app settinsg if not by session? | installer | wix | msi | session-variables | persistent | null | open | WIX: persist session data between C# CustomActions and subsequently displayed WIX Dialog
===
I am new to WIX and have been tasked with creating an installer that does
the following:
*Deploys a build of our application without overwriting the App.Config file
for the application
*Loads the key/values in the App.Config file and prompts the user with the
"defaults" (existing values) and allows them to modify them before finishing
*SAVES the values the user provided (or defaults if the user made no
changes) back to the App.Config file for use with the application.
I've got the WIX dilalogs and custom actions laid out successfully where
after InstallFinalize, my "LoadDefaultOptions" CustomAction is executed,
which successfully takes the installation directory and the app config file
name, loads it in an XML reader, and parses the key/value pairs, setting
them into the session variable in this manner:
session[key] = value;
My custom action(s) are defined as:
<CustomAction Id="LoadDefaultOptions" Return="asyncWait" Execute="immediate" BinaryKey="aeserverDbDialogPackage.dll" DllEntry="LoadDefaultOptions"/>
<CustomAction Id="SetConfigOptions" Return="check" Execute="immediate" BinaryKey="aeserverDbDialogPackage.dll" DllEntry="SetConfigOptions"/>
The LoadDefaultOptions executes as such:
`<Custom Action="LoadDefaultOptions" After="InstallFinalize" />`
I have the custom dialog edit properties set like this:
<Control Id="CCPDbConnString" Type="Edit" X="20" Y="62" Width="150"
Height="18" Property="CCPCONNECTIONSTRING" Indirect="no" />
There's a matching Property tag earlier in the WXS file like this:
<Property Id="CCPCONNECTIONSTRING" Secure="yes" ></Property>
...And the LoadDefaultOptions customAction overwrites the session var like
this:
session["CCPCONNECTIONSTRING"] = <value parsed from file>;
According to session logs, this works as expected, the xml parse works, and
the session vars are set.
My problem is when my custom dialog comes around to prompt the user with
those stored defaults AFTER the LoadDefaultOptions CustomAction has run.
The ORIGINAL property values of the session variables seem to have "stuck"
instead of being overwritten by the custom action that loaded the defaults
via the xml file and stored them in the session. (they are blank as their
original properties are defined, or in the case I define them otherwise,
they show those values instead of the session written values)
How do you get Dialogs to "read" overridden session variables by
CustomActions?
Ultimately I want to load those values from the app config, prompt them back
to the user in an optional dialog prompt off the exit screen (which works so
far, aside from not getting updated session vars), and then on command from
that prompt dialog, run another custom action to re-write the App.Config
file with the settings provided from the custom dialog...
I just can't get the session vars to PERSIST!!!
Any ideas? am I completely off base attempting to use the session in this manner? how else could I parse the app.config file, and allow an installation user to change app settinsg if not by session? | 0 |
9,817,799 | 03/22/2012 07:05:27 | 1,285,183 | 03/22/2012 06:42:44 | 1 | 0 | mysql not working on windows 7 x 64 installed with wamp | my name is soba thank you in advance
I have recently installed wamp (version wampserver2.2c-x64) on a windows 7 64 bit OS. I am also using the 32 bit version of the above mentioned wamp at home which works fine.
I have worked with wamp for a few years without a problem. But this is the first time I am using it on a 64 bit windows 7 OS. I can access to the localhost and view the phpinfo so I figured php and apache is working fine. when I try to open phpmyadmin it displays the following message
**#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)**
I tried to get access to the mysql server using the mysql console and it just closes when I hit enter. I have been trying to fix this for almost 2 days and googling about it. some suggested using XAMPP. so I uninstalled wamp and installed XAMPP which has the same issue. so I have uninstalled it and re-installed wamp again.
I have also checked netstat if the services are running and port 80 and 3306 are running
as this is my office pc I am stuck with no work done. any help would be appreciate
Thank you
soba | mysql | phpmyadmin | wamp | null | null | null | open | mysql not working on windows 7 x 64 installed with wamp
===
my name is soba thank you in advance
I have recently installed wamp (version wampserver2.2c-x64) on a windows 7 64 bit OS. I am also using the 32 bit version of the above mentioned wamp at home which works fine.
I have worked with wamp for a few years without a problem. But this is the first time I am using it on a 64 bit windows 7 OS. I can access to the localhost and view the phpinfo so I figured php and apache is working fine. when I try to open phpmyadmin it displays the following message
**#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)**
I tried to get access to the mysql server using the mysql console and it just closes when I hit enter. I have been trying to fix this for almost 2 days and googling about it. some suggested using XAMPP. so I uninstalled wamp and installed XAMPP which has the same issue. so I have uninstalled it and re-installed wamp again.
I have also checked netstat if the services are running and port 80 and 3306 are running
as this is my office pc I am stuck with no work done. any help would be appreciate
Thank you
soba | 0 |
7,036,296 | 08/12/2011 06:19:17 | 473,396 | 10/12/2010 13:33:24 | 17 | 0 | Does C language supports inheritance? | Suppose we have a header file "add.h" with "add(int,int)" function , "subtract.h" header file with "subtract(int,int)" function .Suppose we have a header file "calc.h" as follows-:
<br/><br/>
--------------add.h-------------<br/>
int add(int a,int b)<br/>
{<br/>
return (a+b);<br/>
}<br/>
-------------sub.h--------------<br/>
int sub(int a,int b)<br/>
{<br/>
return (a-b);<br/>
}<br/>
-------------calc.h-------------<br/>
#include "add.h"<br/>
#include "sub.h"<br/>
------------program.c-----------<br/>
#include "calc.h"<br/>
#include stdio.h<br/>
#include conio.h<br/**>
void main()<br/>
{<br/>
printf ("%d",add(1,2));<br/>
printf ("%d",sub(3,1));<br/>
}<br/>
Can't we say that it is the form of inheritance where calc.h is inhering from add.h and sub.h and program.c is inheriting from calc.h?
I know this may be silly doubt to ask but I want to clarify my doubt?
Furthur Please tell me why should one prefer Object Oriented Prog. rather than procedural programming?
| c | null | null | null | null | 08/12/2011 10:03:03 | not constructive | Does C language supports inheritance?
===
Suppose we have a header file "add.h" with "add(int,int)" function , "subtract.h" header file with "subtract(int,int)" function .Suppose we have a header file "calc.h" as follows-:
<br/><br/>
--------------add.h-------------<br/>
int add(int a,int b)<br/>
{<br/>
return (a+b);<br/>
}<br/>
-------------sub.h--------------<br/>
int sub(int a,int b)<br/>
{<br/>
return (a-b);<br/>
}<br/>
-------------calc.h-------------<br/>
#include "add.h"<br/>
#include "sub.h"<br/>
------------program.c-----------<br/>
#include "calc.h"<br/>
#include stdio.h<br/>
#include conio.h<br/**>
void main()<br/>
{<br/>
printf ("%d",add(1,2));<br/>
printf ("%d",sub(3,1));<br/>
}<br/>
Can't we say that it is the form of inheritance where calc.h is inhering from add.h and sub.h and program.c is inheriting from calc.h?
I know this may be silly doubt to ask but I want to clarify my doubt?
Furthur Please tell me why should one prefer Object Oriented Prog. rather than procedural programming?
| 4 |
9,114,504 | 02/02/2012 14:59:10 | 438,958 | 09/03/2010 12:40:28 | 426 | 5 | jquery bug with this function | i'm not able to get the id of the div field where the radio boxes changed. If I remove the table coding from the html, this coding would work. Any ideas?
Example HTML:
$PLAN_REPORT_DATE_HTML .= qq|<div id="planreportdate-$TECH_ID---$METRIC_ID---$SIZE_ID">
<table><tr><td>
${FOUNDRY_NAME}_${TECHFLAVOUR}-$SIZE_VALUE<br><br>
<input type="radio" name="radiovalue-$count" value="Latest" > Latest <br>
<input type="radio" name="radiovalue-$count" value="MajorUpdates" > Major Updates <br>
<input type="radio" name="radiovalue-$count" value="All" >All<br>
</td></tr><tr><td>
<select name="plan-$count" multiple id="plan-$TECH_ID---$METRIC_ID---$SIZE_ID" size="5">|;
Jquery Coding
\$("div[id^='planreportdate-'] input[name^='radiovalue-']").change(function(event) {
var id_value = \$(this).parent().attr('id');
var value= \$("div[id="+ id_value + "] input[name^='radiovalue-']:checked").val();
var selectboxid = id_value.replace(/^planreportdate-/g,"");
if (value == "All")
{
// THIS CODING SELECTS ALL THE SELECT OPTIONS
\$("#plan-" + selectboxid).each(function() {
\$("#plan-" + selectboxid + " option").attr("selected","selected");
});
}
| jquery | null | null | null | null | null | open | jquery bug with this function
===
i'm not able to get the id of the div field where the radio boxes changed. If I remove the table coding from the html, this coding would work. Any ideas?
Example HTML:
$PLAN_REPORT_DATE_HTML .= qq|<div id="planreportdate-$TECH_ID---$METRIC_ID---$SIZE_ID">
<table><tr><td>
${FOUNDRY_NAME}_${TECHFLAVOUR}-$SIZE_VALUE<br><br>
<input type="radio" name="radiovalue-$count" value="Latest" > Latest <br>
<input type="radio" name="radiovalue-$count" value="MajorUpdates" > Major Updates <br>
<input type="radio" name="radiovalue-$count" value="All" >All<br>
</td></tr><tr><td>
<select name="plan-$count" multiple id="plan-$TECH_ID---$METRIC_ID---$SIZE_ID" size="5">|;
Jquery Coding
\$("div[id^='planreportdate-'] input[name^='radiovalue-']").change(function(event) {
var id_value = \$(this).parent().attr('id');
var value= \$("div[id="+ id_value + "] input[name^='radiovalue-']:checked").val();
var selectboxid = id_value.replace(/^planreportdate-/g,"");
if (value == "All")
{
// THIS CODING SELECTS ALL THE SELECT OPTIONS
\$("#plan-" + selectboxid).each(function() {
\$("#plan-" + selectboxid + " option").attr("selected","selected");
});
}
| 0 |
11,718,378 | 07/30/2012 09:09:04 | 1,392,980 | 05/14/2012 04:32:41 | 1 | 0 | How to show splash page? which lasts 3 to 4 seconds. Give me code | I need to How to show splash page using HTML which lasts 3 to 4 seconds. Give me code. | phonegap | null | null | null | null | 07/30/2012 12:21:12 | not a real question | How to show splash page? which lasts 3 to 4 seconds. Give me code
===
I need to How to show splash page using HTML which lasts 3 to 4 seconds. Give me code. | 1 |
2,394,037 | 03/06/2010 20:39:15 | 152,825 | 08/08/2009 01:01:42 | 65 | 4 | Zend_Date and setting timezone on instation | I have a ZF app and am saving times as UTC in MySQL db. When I retrieve, them I'd like to tell Zend_Ddate that they are UTC rather than the timezone set in php.ini of 'America/Los Angeles'.
Currently, I'm instantiating like this:
$date=new Zend_Date($item['created_on_utc'],Zend_Date::ISO_8601,'en_US');
but feel like there should be a way to tell Zend_Date that is a utc Date. How would I do that?
thanks | php | zend-framework | zend-date | null | null | null | open | Zend_Date and setting timezone on instation
===
I have a ZF app and am saving times as UTC in MySQL db. When I retrieve, them I'd like to tell Zend_Ddate that they are UTC rather than the timezone set in php.ini of 'America/Los Angeles'.
Currently, I'm instantiating like this:
$date=new Zend_Date($item['created_on_utc'],Zend_Date::ISO_8601,'en_US');
but feel like there should be a way to tell Zend_Date that is a utc Date. How would I do that?
thanks | 0 |
3,729,338 | 09/16/2010 17:53:51 | 443,708 | 09/09/2010 18:06:05 | 22 | 0 | How to replace " in .NET | Simple! How to replace " in .NET ..? | .net | visual-studio | replace | null | null | 09/16/2010 18:01:38 | not a real question | How to replace " in .NET
===
Simple! How to replace " in .NET ..? | 1 |
6,477,665 | 06/25/2011 12:17:02 | 815,292 | 06/25/2011 12:17:02 | 1 | 0 | How to read an array and animate the results | I read through several examples of loading an array manually with graphical image file names. The array is then referenced with a few lines of code and the graphical images are animated which looks great.
I have a method that I call that reads data from a SQLITE table and loads an array that contains the file names of the images. The SQL call includes an order by statement to get the images ordered correctly in the array.
I then return from the call to the method and can get the count from the array. I can not figure out how to read the array from the SQL call and get an array built in a way that I can hand it to the UIImage to animate the results. It seems that my main stumbling block is the reading of the text values in the array. I anticipate that I would actually define a new array using initWithObjects and supply the text value of each element in the array in a statement that looks similar to: [UIImage imageNamed: (value of an element from the array)] but am not having any luck reading the initial array and be able to see the clear text value of what was stored initially. | iphone | null | null | null | null | 06/27/2011 09:02:10 | not a real question | How to read an array and animate the results
===
I read through several examples of loading an array manually with graphical image file names. The array is then referenced with a few lines of code and the graphical images are animated which looks great.
I have a method that I call that reads data from a SQLITE table and loads an array that contains the file names of the images. The SQL call includes an order by statement to get the images ordered correctly in the array.
I then return from the call to the method and can get the count from the array. I can not figure out how to read the array from the SQL call and get an array built in a way that I can hand it to the UIImage to animate the results. It seems that my main stumbling block is the reading of the text values in the array. I anticipate that I would actually define a new array using initWithObjects and supply the text value of each element in the array in a statement that looks similar to: [UIImage imageNamed: (value of an element from the array)] but am not having any luck reading the initial array and be able to see the clear text value of what was stored initially. | 1 |
11,254,985 | 06/29/2012 01:24:23 | 1,490,062 | 06/29/2012 01:19:50 | 1 | 0 | Reverse Engineering an exe file to get the source code | Hi I have the source for a game that I am hosting a private server for, But I am very limited what I can do due to the handling done in the client. I want to reverse engineer and change it in any way possible to add in new things. What can I use and the steps I should take to doing this? | c++ | compiler | reverse-engineering | null | null | 06/29/2012 10:18:27 | not constructive | Reverse Engineering an exe file to get the source code
===
Hi I have the source for a game that I am hosting a private server for, But I am very limited what I can do due to the handling done in the client. I want to reverse engineer and change it in any way possible to add in new things. What can I use and the steps I should take to doing this? | 4 |
10,181,418 | 04/16/2012 20:44:44 | 631,037 | 02/23/2011 20:20:12 | 177 | 0 | Change column values where it's zero at mySQL | I'd like to change the values from the column "inside_position" where the cell values is 0
update TABLE_NAME SET inside_position=100 where inside_position=0;
I can't mess this up, so i'll not set up the trial and error method for this one.
Hope you can help me.
|Product_ID||Product_Code||Inside_position|
| 403 || EH009KP || 0 |
| 503 || GHSJSKD || 0 |
| 603 || KANSDAS || 1 |
| 703 || KJNKANS || 0 |
| 803 || KJHEERF || 0 |
| 903 || NBVDHQE || 5 |
| 910 || PKMRQEM || 0 |
| 980 || 990KMNJ || 0 |
-------------------------------------------
This table describes my problem, i want to change the ones with 0 to 100;
| php | mysql | sql | database | null | 04/23/2012 13:03:41 | not a real question | Change column values where it's zero at mySQL
===
I'd like to change the values from the column "inside_position" where the cell values is 0
update TABLE_NAME SET inside_position=100 where inside_position=0;
I can't mess this up, so i'll not set up the trial and error method for this one.
Hope you can help me.
|Product_ID||Product_Code||Inside_position|
| 403 || EH009KP || 0 |
| 503 || GHSJSKD || 0 |
| 603 || KANSDAS || 1 |
| 703 || KJNKANS || 0 |
| 803 || KJHEERF || 0 |
| 903 || NBVDHQE || 5 |
| 910 || PKMRQEM || 0 |
| 980 || 990KMNJ || 0 |
-------------------------------------------
This table describes my problem, i want to change the ones with 0 to 100;
| 1 |
10,884,579 | 06/04/2012 16:18:57 | 1,250,021 | 03/05/2012 14:16:43 | 3 | 0 | Split View-based template for iPad in horizontal? | I´ve been reading different questions in StackOverFlow ( http://stackoverflow.com/questions/5340634/what-application-template-should-i-use-for-my-geolocation-application or http://stackoverflow.com/questions/814575/main-differenece-between-view-based-and-window-based-application-template, for example) in order to understand which template would fit my app best. The Split view-based template feels to me like a good choice, since I want an application where the user can have a View where some content is displayed (let´s say, for example, an image) but also a set of miniatures of all the other elements available (the TableView). So if, while taking a look to the first image another one becomes available, this last one would appear in the the set of miniatures. In this way, the user could always access any received element, recognizing it by its miniature (snapshot alike).
The problem is that I would like to have the TableView displayed at the bottom in horizontal, because it gives a better idea of how the elements are chronologically displayed and the remaining space (in the view) fits better to what I have in mind. I was reading the Apple the documentation but without any luck.
So the actual question is; is there a way to make this template have the TableView as I want it to be?
If there is no possibility to change that, what would you suggest? I already started doing some coding, but I´m completely open to start again if someone has any suggestions of better templates or approaches. | ios | ipad | xcode-template | null | null | null | open | Split View-based template for iPad in horizontal?
===
I´ve been reading different questions in StackOverFlow ( http://stackoverflow.com/questions/5340634/what-application-template-should-i-use-for-my-geolocation-application or http://stackoverflow.com/questions/814575/main-differenece-between-view-based-and-window-based-application-template, for example) in order to understand which template would fit my app best. The Split view-based template feels to me like a good choice, since I want an application where the user can have a View where some content is displayed (let´s say, for example, an image) but also a set of miniatures of all the other elements available (the TableView). So if, while taking a look to the first image another one becomes available, this last one would appear in the the set of miniatures. In this way, the user could always access any received element, recognizing it by its miniature (snapshot alike).
The problem is that I would like to have the TableView displayed at the bottom in horizontal, because it gives a better idea of how the elements are chronologically displayed and the remaining space (in the view) fits better to what I have in mind. I was reading the Apple the documentation but without any luck.
So the actual question is; is there a way to make this template have the TableView as I want it to be?
If there is no possibility to change that, what would you suggest? I already started doing some coding, but I´m completely open to start again if someone has any suggestions of better templates or approaches. | 0 |
2,721,562 | 04/27/2010 13:26:56 | 193,583 | 10/21/2009 05:16:18 | 16 | 3 | Android developer phone 1 downgrade firmware | I am trying to downgrade Android developer phone 1's firmware version from 1.6. to 1.5 by following [this][1] link...
http://developer.htc.com/adp.html
Here I have completed till steps #7 of **Update the Device Radio Firmware**. while in steps 8,
It start to load update.zip file.
It analyze the update.zip file. and at last it shows that **update Aborted**
I have followed exact all steps mentioned in that list.
Insight will be appreciated.
-Dhaiwat
[1]: http://developer.htc.com/adp.html | android | null | null | null | null | null | open | Android developer phone 1 downgrade firmware
===
I am trying to downgrade Android developer phone 1's firmware version from 1.6. to 1.5 by following [this][1] link...
http://developer.htc.com/adp.html
Here I have completed till steps #7 of **Update the Device Radio Firmware**. while in steps 8,
It start to load update.zip file.
It analyze the update.zip file. and at last it shows that **update Aborted**
I have followed exact all steps mentioned in that list.
Insight will be appreciated.
-Dhaiwat
[1]: http://developer.htc.com/adp.html | 0 |
1,936,302 | 12/20/2009 16:41:55 | 53,885 | 01/11/2009 13:32:46 | 312 | 2 | String.Replace with \ in it? | How can I replace the "\" in a string with "\\"?
I tried String.Replace("\","\\\") but then intellisense stops working :(
Thanks!
| c# | null | null | null | null | null | open | String.Replace with \ in it?
===
How can I replace the "\" in a string with "\\"?
I tried String.Replace("\","\\\") but then intellisense stops working :(
Thanks!
| 0 |
8,065,704 | 11/09/2011 13:28:52 | 22,470 | 09/25/2008 23:40:28 | 7,370 | 626 | Correct spelling of PHP 5.3? | How do I spell PHP and a version correctly? Is it with space separated or not?
PHP5.3
or
PHP 5.3
If it is spelled with space, why do we say PHP5 then?
| php | version | spelling | null | null | 11/09/2011 13:30:58 | not constructive | Correct spelling of PHP 5.3?
===
How do I spell PHP and a version correctly? Is it with space separated or not?
PHP5.3
or
PHP 5.3
If it is spelled with space, why do we say PHP5 then?
| 4 |
9,962,702 | 04/01/2012 07:35:23 | 1,271,985 | 03/15/2012 15:55:10 | 11 | 2 | Conditional column header in mysql | I am in a situation which is easy to see but I can't solve it anyway. The problem is I want a column name <b>header</b> (not the value) different based on a condition. I want like the following thing:
SELECT DISTINCT (CASE bool_var WHEN 1 THEN SUM(r.amount_dbl) AS RECEIVED ELSE SUM(r.amount_dbl) AS Issued END) FROM table
Is it possible? Please help in this regard.
| mysql | sql | conditional | null | null | 05/28/2012 22:24:53 | not a real question | Conditional column header in mysql
===
I am in a situation which is easy to see but I can't solve it anyway. The problem is I want a column name <b>header</b> (not the value) different based on a condition. I want like the following thing:
SELECT DISTINCT (CASE bool_var WHEN 1 THEN SUM(r.amount_dbl) AS RECEIVED ELSE SUM(r.amount_dbl) AS Issued END) FROM table
Is it possible? Please help in this regard.
| 1 |
7,343,179 | 09/08/2011 04:40:51 | 884,995 | 08/08/2011 23:39:46 | 88 | 1 | Is it possible to remove a github account | I created an account on github.com.
Now i want to delete it.
I want to create another account.
Is it possible ? | git | github | null | null | null | 09/08/2011 05:44:19 | off topic | Is it possible to remove a github account
===
I created an account on github.com.
Now i want to delete it.
I want to create another account.
Is it possible ? | 2 |
10,407,216 | 05/02/2012 03:10:26 | 584,968 | 01/21/2011 19:41:00 | 1 | 0 | hg serve - An attempt was made to access a socket in a way forbidden by its access permissions | I'm sure that there are several reasons as to why this could occur, but I found one of them: I use a Sony VAIO and when 'VAIO Care' is installed and running on your machine, it blocks port 8000 and causes this error to occur whenever you attempt to 'hg serve' one of your repositories. Specifically, manually terminating VCsystray.exe caused this error to cease when executing an 'hg serve'. Thought I should pass along this information in the event that anyone else was running into the same issue. | mercurial | null | null | null | null | 05/03/2012 00:36:21 | not a real question | hg serve - An attempt was made to access a socket in a way forbidden by its access permissions
===
I'm sure that there are several reasons as to why this could occur, but I found one of them: I use a Sony VAIO and when 'VAIO Care' is installed and running on your machine, it blocks port 8000 and causes this error to occur whenever you attempt to 'hg serve' one of your repositories. Specifically, manually terminating VCsystray.exe caused this error to cease when executing an 'hg serve'. Thought I should pass along this information in the event that anyone else was running into the same issue. | 1 |
3,131,448 | 06/28/2010 09:58:14 | 219,876 | 11/27/2009 07:36:44 | 296 | 3 | how to add the footer row dynamically in gridview. with textboxes | how to add the footer row dynamically in gridview. with textboxes.. pls give any idea...
| c# | asp.net | gridview | footer | null | 11/25/2011 05:44:08 | not a real question | how to add the footer row dynamically in gridview. with textboxes
===
how to add the footer row dynamically in gridview. with textboxes.. pls give any idea...
| 1 |
3,401,323 | 08/03/2010 22:49:28 | 410,211 | 08/03/2010 22:49:28 | 1 | 0 | Conditional probability in a joint probability distribution | Given [this][1] joint probability distribution, I need to figure out P(Cavity | Toothache OR Catch).
I know that
P(Cavity | Toothache OR Catch) = P(Cavity AND (Toothache OR Catch)) / P(Toothache OR Catch)
but I'm not sure how to solve the numerator here.
Thanks.
[1]: http://i.imgur.com/3HrCP.jpg | math | probability | null | null | null | 08/03/2010 23:51:21 | off topic | Conditional probability in a joint probability distribution
===
Given [this][1] joint probability distribution, I need to figure out P(Cavity | Toothache OR Catch).
I know that
P(Cavity | Toothache OR Catch) = P(Cavity AND (Toothache OR Catch)) / P(Toothache OR Catch)
but I'm not sure how to solve the numerator here.
Thanks.
[1]: http://i.imgur.com/3HrCP.jpg | 2 |
10,510,873 | 05/09/2012 06:32:19 | 1,383,834 | 05/09/2012 06:29:01 | 1 | 0 | cloudera can't install software on nodes | at the very beginning Cludera Manager (free edition) shows
Install failed.
> Failed to copy installation files.
in details:
> /tmp/scm_prepare_node.htrg8rFh
> /usr/share/cmf/packages is not a regular file or directory
It shows for all 3 nodes.
What is a problem ? | installation | install | cloudera | null | null | null | open | cloudera can't install software on nodes
===
at the very beginning Cludera Manager (free edition) shows
Install failed.
> Failed to copy installation files.
in details:
> /tmp/scm_prepare_node.htrg8rFh
> /usr/share/cmf/packages is not a regular file or directory
It shows for all 3 nodes.
What is a problem ? | 0 |
10,143,743 | 04/13/2012 15:26:55 | 1,057,735 | 11/21/2011 11:45:30 | 104 | 1 | TFS tf31003 error cannot connect | We are working in team. All of a sudden i cannot log into the tfs server machine.
Getting the error below
**TF31003. Either you have not entered the necessary credentials or your user account does not
have permission to connect to the Team Foundation server.**
I have been looking around here and there on the internet. for quite some time. But no gains.
I can access to the TFS from other machines.
Any help would be really appreciated. | tfs2010 | null | null | null | null | 04/19/2012 14:00:02 | not a real question | TFS tf31003 error cannot connect
===
We are working in team. All of a sudden i cannot log into the tfs server machine.
Getting the error below
**TF31003. Either you have not entered the necessary credentials or your user account does not
have permission to connect to the Team Foundation server.**
I have been looking around here and there on the internet. for quite some time. But no gains.
I can access to the TFS from other machines.
Any help would be really appreciated. | 1 |
9,232,029 | 02/10/2012 17:24:50 | 875,498 | 08/02/2011 21:21:01 | 201 | 8 | Do you use constants when working with NSDictionary? | I understand using constants for your names in a NSDictionary to prevent typos (myName will auto complete vs @"myName" won't).
i'm working with a medium size dictionaries right now and a couple of times, i've misstyped key names and had to spend some time tracking down where i miss spelled a word.
i'm wondering, do you consider it worth while to set up a constants naming scheme? | objective-c | ios | null | null | null | 02/11/2012 15:26:22 | not constructive | Do you use constants when working with NSDictionary?
===
I understand using constants for your names in a NSDictionary to prevent typos (myName will auto complete vs @"myName" won't).
i'm working with a medium size dictionaries right now and a couple of times, i've misstyped key names and had to spend some time tracking down where i miss spelled a word.
i'm wondering, do you consider it worth while to set up a constants naming scheme? | 4 |
801,732 | 04/29/2009 10:15:52 | 76,037 | 03/10/2009 08:33:53 | 626 | 48 | Migrating DB: Keep relations constraints? | At the risk of being called a fool, I am wondering what your thoughts are on maintaining relationship constraints within a MS SQL DB.
I am migrating a system into a .NET environment from ASP. This brings with it business objects and other tiered-coding techniques, which work to abstract the database from the user/API. The new application has a definite API above an Entity Framework DAL.
The application DB in the old database is large and the purpose of some of the tables will be changing to start containing binary data, in the form of files, etc. I'm keen to split these off into separate DBs to ease management at the client sites where disk space is at a premium.
Is there any value in retaining relationship constraints between tables?
Assumptions:
- Code is tested
- Where relations are important, execution is performed under a Transaction
- Access to the DB is via the API only, other access by third parties is unsupported.
Reasons to keep constraints:
- Enforces the data structure
- JOINs are faster?
- Query Plan assistance?
Reasons to remove constraints in new .NET version:
- One can assume that the API/BIZ logic would manage relations such as Parent/Child.
- Reduces opportunity to hive off sections of the DB into other catalogs (the system is built using a Plug-in architecture, most tables may operate in isolation)
- Am I correct in believing that SQL has to do additional checks during INSERT on constraints, which may be unnecassary when an API above the DB is managing this?
I throw my question upon the community anyway in case I have missed something dumb or if this is just a nightmare waiting to happen ...
Many thanks,
Nathan | sql-server | constraints | null | null | null | null | open | Migrating DB: Keep relations constraints?
===
At the risk of being called a fool, I am wondering what your thoughts are on maintaining relationship constraints within a MS SQL DB.
I am migrating a system into a .NET environment from ASP. This brings with it business objects and other tiered-coding techniques, which work to abstract the database from the user/API. The new application has a definite API above an Entity Framework DAL.
The application DB in the old database is large and the purpose of some of the tables will be changing to start containing binary data, in the form of files, etc. I'm keen to split these off into separate DBs to ease management at the client sites where disk space is at a premium.
Is there any value in retaining relationship constraints between tables?
Assumptions:
- Code is tested
- Where relations are important, execution is performed under a Transaction
- Access to the DB is via the API only, other access by third parties is unsupported.
Reasons to keep constraints:
- Enforces the data structure
- JOINs are faster?
- Query Plan assistance?
Reasons to remove constraints in new .NET version:
- One can assume that the API/BIZ logic would manage relations such as Parent/Child.
- Reduces opportunity to hive off sections of the DB into other catalogs (the system is built using a Plug-in architecture, most tables may operate in isolation)
- Am I correct in believing that SQL has to do additional checks during INSERT on constraints, which may be unnecassary when an API above the DB is managing this?
I throw my question upon the community anyway in case I have missed something dumb or if this is just a nightmare waiting to happen ...
Many thanks,
Nathan | 0 |
3,529,407 | 08/20/2010 08:49:55 | 426,145 | 08/20/2010 08:49:55 | 1 | 0 | Shortest C code to reverse a string.. | Not counting the function signature (just the body) can anybody produce C code shorter than this function that will reverse a string and return the result as a pointer to the reversed string.. (not using a string reverse library function either)?
char * reverse_str(char * s)
{
char c,*f=s,*p=s;while(*p)p++;while(--p>s){c=*p;*p=*s;*s++=c;}return f;
} | string | reverse | null | null | null | 08/21/2010 08:27:01 | not a real question | Shortest C code to reverse a string..
===
Not counting the function signature (just the body) can anybody produce C code shorter than this function that will reverse a string and return the result as a pointer to the reversed string.. (not using a string reverse library function either)?
char * reverse_str(char * s)
{
char c,*f=s,*p=s;while(*p)p++;while(--p>s){c=*p;*p=*s;*s++=c;}return f;
} | 1 |
10,190,555 | 04/17/2012 11:43:32 | 1,213,859 | 02/16/2012 12:55:20 | 72 | 8 | DXLExporter is not exporting the design element sin Xpage? |
**I am using the following code,**
var db=session.getCurrentDatabase()
var nc:NotesNoteCollection=db.createNoteCollection(true);
nc.selectAllDesignElements(true);
nc.buildCollection()
var filename = "d:\\dxl\\xpDXL.dxl";
var stream:NotesStream=session.createStream()
if (stream.open(filename)) {
stream.truncate(); // Any existing file is erased
var exporter:NotesDxlExporter = session.createDxlExporter();
stream.writeText(exporter.exportDxl(db))
}
**> It is not exporting the designelements. But in DXL, It has the
> document collections.** | lotus-notes | xpages | lotusscript | null | null | null | open | DXLExporter is not exporting the design element sin Xpage?
===
**I am using the following code,**
var db=session.getCurrentDatabase()
var nc:NotesNoteCollection=db.createNoteCollection(true);
nc.selectAllDesignElements(true);
nc.buildCollection()
var filename = "d:\\dxl\\xpDXL.dxl";
var stream:NotesStream=session.createStream()
if (stream.open(filename)) {
stream.truncate(); // Any existing file is erased
var exporter:NotesDxlExporter = session.createDxlExporter();
stream.writeText(exporter.exportDxl(db))
}
**> It is not exporting the designelements. But in DXL, It has the
> document collections.** | 0 |
5,870,308 | 05/03/2011 13:37:17 | 734,517 | 05/02/2011 13:33:08 | 1 | 0 | [Android]Database + jdbc | I'm doing an internship and I have to do an Android application.
I have to show some data on the phone, from a remote Pervasive database.
I need to create a web interface, and I can do this in two different ways : by using servlet on a Tomcat server, or with PHP.
What do you think to be the best solution ? Tomcat, a servlet and JDBC, or PHP ?
Thanks | android | database | jdbc | pervasive | null | null | open | [Android]Database + jdbc
===
I'm doing an internship and I have to do an Android application.
I have to show some data on the phone, from a remote Pervasive database.
I need to create a web interface, and I can do this in two different ways : by using servlet on a Tomcat server, or with PHP.
What do you think to be the best solution ? Tomcat, a servlet and JDBC, or PHP ?
Thanks | 0 |
6,142,562 | 05/26/2011 17:24:12 | 771,758 | 05/26/2011 17:24:12 | 1 | 0 | If Else Statement - Jquery Animate | Bit of a JQuery beginner - trying to animate a "tab" to follow the class "StaffPanel" as it animates outwards.
Below are my scripts. The second one works properly, animating the class outwards and attaching the .StaffTriggerActive to the button.
Problem is, I can't seem to figure out how to write a if else statement to make the button animate to the closed state once the user closes the button..
I obviously am doing something wrong - any one with ideas?
$(document).ready(function() {
$('.StaffTrigger').click(function() {
if($(this).hasClass('.StaffTriggerActive')) {
$(".StaffTriggerActive").animate ({
right: '=0'
}, "fast");
}
else {
$(".StaffTriggerActive").animate ({
right: '=340'
}, "fast");
}
});
});
$(document).ready(function(){
$(".StaffTrigger").click(function(){
$(".StaffPanel").toggle("fast");
$(this).toggleClass("StaffTriggerActive");
return false;
});
}); | jquery | jquery-animation | if-statement | null | null | null | open | If Else Statement - Jquery Animate
===
Bit of a JQuery beginner - trying to animate a "tab" to follow the class "StaffPanel" as it animates outwards.
Below are my scripts. The second one works properly, animating the class outwards and attaching the .StaffTriggerActive to the button.
Problem is, I can't seem to figure out how to write a if else statement to make the button animate to the closed state once the user closes the button..
I obviously am doing something wrong - any one with ideas?
$(document).ready(function() {
$('.StaffTrigger').click(function() {
if($(this).hasClass('.StaffTriggerActive')) {
$(".StaffTriggerActive").animate ({
right: '=0'
}, "fast");
}
else {
$(".StaffTriggerActive").animate ({
right: '=340'
}, "fast");
}
});
});
$(document).ready(function(){
$(".StaffTrigger").click(function(){
$(".StaffPanel").toggle("fast");
$(this).toggleClass("StaffTriggerActive");
return false;
});
}); | 0 |
7,134,066 | 08/20/2011 19:14:33 | 200,145 | 10/31/2009 13:19:36 | 2,904 | 22 | Is there any benefit in encoding source code files in ANSI over UTF-8? | ANSI seems much more limited than UTF-8, yet it's the default file encoding in Notepad++, so I was wondering. | java | php | encoding | null | null | 08/21/2011 17:56:53 | not constructive | Is there any benefit in encoding source code files in ANSI over UTF-8?
===
ANSI seems much more limited than UTF-8, yet it's the default file encoding in Notepad++, so I was wondering. | 4 |
2,422,337 | 03/11/2010 03:26:42 | 242,181 | 01/01/2010 03:45:38 | 432 | 8 | unexpected behavior in printing string in loop. | I don't understand why this is happening:
I have an integer being passed to a label object:
int NTURNS = 3;
for (int i = NTURNS; i > 0; i--){
printTurns(i);
buildBall();
}
and printTurns is this:
private void printTurns(int i){
GLabel turns = new GLabel("" + i);
remove(turns);
add(turns, (WIDTH - PADDLE_WIDTH), (BRICK_Y_OFFSET / 2));
}
This will print the number of turns left in the game at the top. I have the `remove(turns);` there to remove the text so the next text won't overlap the old, but this is not working for some reason.
The numbers are stacking on top of eachother. Why is that?
| java | null | null | null | null | null | open | unexpected behavior in printing string in loop.
===
I don't understand why this is happening:
I have an integer being passed to a label object:
int NTURNS = 3;
for (int i = NTURNS; i > 0; i--){
printTurns(i);
buildBall();
}
and printTurns is this:
private void printTurns(int i){
GLabel turns = new GLabel("" + i);
remove(turns);
add(turns, (WIDTH - PADDLE_WIDTH), (BRICK_Y_OFFSET / 2));
}
This will print the number of turns left in the game at the top. I have the `remove(turns);` there to remove the text so the next text won't overlap the old, but this is not working for some reason.
The numbers are stacking on top of eachother. Why is that?
| 0 |
11,060,784 | 06/16/2012 04:19:16 | 1,044,876 | 11/14/2011 03:08:40 | 16 | 0 | FREE WEb Stocks API? | i am currently looking for a free web stock API i could use inside a commercial application.
Any suggestions is welcome!
Thanks in advance! | api | rest | null | null | null | 06/16/2012 05:01:26 | not constructive | FREE WEb Stocks API?
===
i am currently looking for a free web stock API i could use inside a commercial application.
Any suggestions is welcome!
Thanks in advance! | 4 |
7,842,723 | 10/20/2011 21:50:55 | 116,395 | 06/03/2009 06:44:14 | 1,189 | 40 | Monotouch and Async CTP | Is there any way to hook up these two guys?
The only thing I found is a small article that said as of May 2011 MonoTouch didn't support neither Async CTP nor Reactive Extensions. I don't really care about the second (maybe I should, I dunno), but do you know if is it possible at all? Or when it will be?
Links to manuals, blogs and articles will be appreciated | c# | multithreading | asynchronous | mono | monotouch | null | open | Monotouch and Async CTP
===
Is there any way to hook up these two guys?
The only thing I found is a small article that said as of May 2011 MonoTouch didn't support neither Async CTP nor Reactive Extensions. I don't really care about the second (maybe I should, I dunno), but do you know if is it possible at all? Or when it will be?
Links to manuals, blogs and articles will be appreciated | 0 |
8,443,284 | 12/09/2011 09:11:04 | 976,178 | 10/03/2011 06:43:22 | 21 | 0 | Code Coverage issue when upgrading PHING and PHPUnit | I use PHPUnit 3.6 and PHing 2.4.8 for unit testing my CodeIgniter 1.7 application..
After upgrading PHING and PHPUnit(from 3.4), the execution of my test using build.xml (using phing command), the Unit Test HTML Report is generated with correct output and no errors.
But the problem here is in Code Coverage Report.
The code covered in the report is colored green (which is correct) and those code that are not covered are not anymore colored pink/red. And also, the percentage covered is incorrect. I get 98% code covered even though it is not before.
Is this issue about compatibility?
Please help. Im really stuck right now.
| phpunit | code-coverage | phing | null | null | 01/03/2012 15:31:51 | too localized | Code Coverage issue when upgrading PHING and PHPUnit
===
I use PHPUnit 3.6 and PHing 2.4.8 for unit testing my CodeIgniter 1.7 application..
After upgrading PHING and PHPUnit(from 3.4), the execution of my test using build.xml (using phing command), the Unit Test HTML Report is generated with correct output and no errors.
But the problem here is in Code Coverage Report.
The code covered in the report is colored green (which is correct) and those code that are not covered are not anymore colored pink/red. And also, the percentage covered is incorrect. I get 98% code covered even though it is not before.
Is this issue about compatibility?
Please help. Im really stuck right now.
| 3 |
9,470,619 | 02/27/2012 18:59:48 | 74,022 | 03/05/2009 01:13:55 | 19,495 | 518 | My HTML 5 upload isn't catch errors | My upload actually works fine. The code is
var data = new FormData(document.getElementById("upload-form"));
var xhr = new XMLHttpRequest();
xhr.upload.addEventListener("progress", uploadProgress, false);
xhr.addEventListener("load", uploadComplete, false);
xhr.addEventListener("error", uploadFailed, false);
xhr.open("POST", postUrl, true);
xhr.send(data);
My `uploadProgress` method fires as it should. My `uploadComplete` works when the upload is successful, but when there is an error, it still fires and `uploadFailed` does not. FireBug shows that the server is responding with the exception message, so I'm not sure why `load` is firing over `error`.
function uploadComplete(e) {
window.location.href = redirectUrl;
}
function uploadFailed(e) {
alert("There was an error uploading the file.");
}
To make testing easier I modified my ASP.NET MVC controller action to just
throw new ApplicationException("Error");
What am I doing wrong? If an exception is raised on the controller, I want the `uploadFailed` method to fire. | jquery | html5 | exception-handling | null | null | null | open | My HTML 5 upload isn't catch errors
===
My upload actually works fine. The code is
var data = new FormData(document.getElementById("upload-form"));
var xhr = new XMLHttpRequest();
xhr.upload.addEventListener("progress", uploadProgress, false);
xhr.addEventListener("load", uploadComplete, false);
xhr.addEventListener("error", uploadFailed, false);
xhr.open("POST", postUrl, true);
xhr.send(data);
My `uploadProgress` method fires as it should. My `uploadComplete` works when the upload is successful, but when there is an error, it still fires and `uploadFailed` does not. FireBug shows that the server is responding with the exception message, so I'm not sure why `load` is firing over `error`.
function uploadComplete(e) {
window.location.href = redirectUrl;
}
function uploadFailed(e) {
alert("There was an error uploading the file.");
}
To make testing easier I modified my ASP.NET MVC controller action to just
throw new ApplicationException("Error");
What am I doing wrong? If an exception is raised on the controller, I want the `uploadFailed` method to fire. | 0 |
11,342,165 | 07/05/2012 10:12:02 | 1,498,986 | 07/03/2012 13:49:41 | 1 | 0 | IE does not support Java Script (Form validation) | I'm newbie to java script.
Html form validating in java script pop up window does not shown in IE7,8,9.
but its supporting in chrome and Firefox.
Thanks in advance
Following Java Script:
<script language="JavaScript">
var frmvalidator = new Validator("postresume");
frmvalidator.addValidation("CandidateFirstName","req","Please provide your First Name");
frmvalidator.addValidation("CandidateFirstName","alpha","Alphabetic chars only");
frmvalidator.addValidation("CandidateLastName","req","Please provide your Last name");
frmvalidator.addValidation("CandidateLastName","alpha","Alphabetic chars only");
frmvalidator.addValidation("DateDD","req","Please provide date");
frmvalidator.addValidation("DateDD","day","Please provide valid date");
frmvalidator.addValidation("DateDD","minlen=2");
frmvalidator.addValidation("DateMM","req","Please provide month");
frmvalidator.addValidation("DateMM","minlen=2");
frmvalidator.addValidation("DateMM","month","Please provide valid month");
frmvalidator.addValidation("DateYear","req","Please provide year");
frmvalidator.addValidation("DateYear","minlen=4");
frmvalidator.addValidation("DateYear","year","Please provide valid year");
</script> | javascript | html | null | null | null | 07/24/2012 01:38:57 | not a real question | IE does not support Java Script (Form validation)
===
I'm newbie to java script.
Html form validating in java script pop up window does not shown in IE7,8,9.
but its supporting in chrome and Firefox.
Thanks in advance
Following Java Script:
<script language="JavaScript">
var frmvalidator = new Validator("postresume");
frmvalidator.addValidation("CandidateFirstName","req","Please provide your First Name");
frmvalidator.addValidation("CandidateFirstName","alpha","Alphabetic chars only");
frmvalidator.addValidation("CandidateLastName","req","Please provide your Last name");
frmvalidator.addValidation("CandidateLastName","alpha","Alphabetic chars only");
frmvalidator.addValidation("DateDD","req","Please provide date");
frmvalidator.addValidation("DateDD","day","Please provide valid date");
frmvalidator.addValidation("DateDD","minlen=2");
frmvalidator.addValidation("DateMM","req","Please provide month");
frmvalidator.addValidation("DateMM","minlen=2");
frmvalidator.addValidation("DateMM","month","Please provide valid month");
frmvalidator.addValidation("DateYear","req","Please provide year");
frmvalidator.addValidation("DateYear","minlen=4");
frmvalidator.addValidation("DateYear","year","Please provide valid year");
</script> | 1 |
8,818,589 | 01/11/2012 11:38:07 | 1,143,026 | 01/11/2012 11:08:40 | 1 | 0 | How to implement stack and queue in java? | How to implement stack and queue in java ?
`like _so_` | java | stack | null | null | null | 01/11/2012 11:46:33 | not a real question | How to implement stack and queue in java?
===
How to implement stack and queue in java ?
`like _so_` | 1 |
5,325,325 | 03/16/2011 12:33:16 | 83,501 | 03/27/2009 07:03:57 | 303 | 2 | Is FacesContext limited to one web application ? | I have an ear , Sample.ear and two war files and one jar file in that
It's like this
Sameple.ear
|--- UI1.war
|--- UI2.war
|--- Model.jar
I have a managed-bean(backing-bean) defined in UI1.war . Is it possible to access that particular managed-bean in a jsf page inside UI2.war ?
I tired to get it like #{LoginBean.username} (LoginBean is the managed bean inside UI1.war which I want to access ) , in my UI2.war , but FacesContext is not able to resolve this .
Pls help
Thanks
J | jsf | facescontext | null | null | null | null | open | Is FacesContext limited to one web application ?
===
I have an ear , Sample.ear and two war files and one jar file in that
It's like this
Sameple.ear
|--- UI1.war
|--- UI2.war
|--- Model.jar
I have a managed-bean(backing-bean) defined in UI1.war . Is it possible to access that particular managed-bean in a jsf page inside UI2.war ?
I tired to get it like #{LoginBean.username} (LoginBean is the managed bean inside UI1.war which I want to access ) , in my UI2.war , but FacesContext is not able to resolve this .
Pls help
Thanks
J | 0 |
7,725,795 | 10/11/2011 12:07:57 | 385,559 | 07/07/2010 13:18:18 | 974 | 52 | Getting UILabel to produce an ellipsis rather then shrinking the font | When I dynamically change the text of a UILabel I would prefer to get an ellipsis (dot, dot, dot) rather then have the text be automatically resized. How does one do this?
In other words, if I have UILabel with the word `Cat` with size font 14 and then I change the word to `Hippopotamus` the font shrinks to fit all the word. I would rather the word be automatically truncated followed by an ellipsis.
I assume there is a parameter that can be changed within my UILabel object. I'd rather not do this programmatically.
| iphone | objective-c | xcode | uilabel | null | null | open | Getting UILabel to produce an ellipsis rather then shrinking the font
===
When I dynamically change the text of a UILabel I would prefer to get an ellipsis (dot, dot, dot) rather then have the text be automatically resized. How does one do this?
In other words, if I have UILabel with the word `Cat` with size font 14 and then I change the word to `Hippopotamus` the font shrinks to fit all the word. I would rather the word be automatically truncated followed by an ellipsis.
I assume there is a parameter that can be changed within my UILabel object. I'd rather not do this programmatically.
| 0 |
11,127,847 | 06/20/2012 20:41:07 | 1,110,927 | 12/22/2011 02:06:07 | 16 | 0 | Why does my screen scroll back down after I scroll it up? | I'm having trouble with scrolling the screen in an iPad app. In my app, there can be lots of fields near the bottom of the page. So instead of frequent adjustments to the screen position depending on the location of the currently active field, I would like for the screen to be in one of two positions: scrolled or not-scrolled. If the user is working on a field any part of which would be hidden by the keyboard, I would like to scroll the screen up by the height of the keyboard.
My problem is that after the keyboard appears and the screen scrolls the distance specified by my code, the screen then snaps back down to a position such that the cursor, wherever it happens to be, is just above the top of the keyboard. I don't understand what is causing this final snap. My scrolling code (lifted from a tutorial) is below.
Thanks
//Scroll the screen up if the keyboard hides the current field
- (void)keyboardDidShow:(NSNotification *)notification
{
// Step 1: Get the height of the keyboard.
if ([self interfaceOrientation] == UIInterfaceOrientationPortrait || [self interfaceOrientation] == UIInterfaceOrientationPortraitUpsideDown)
{
keyboardHeight = [[[notification userInfo] objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue].size.height;
}
else
{
keyboardHeight = [[[notification userInfo] objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue].size.width;
}
// Step 2: Adjust the bottom content inset of your scroll view by the keyboard height.
UIEdgeInsets contentInsets = UIEdgeInsetsMake(0.0, 0.0, keyboardHeight, 0.0);
[(UIScrollView*)[self view] setContentInset: contentInsets];
[(UIScrollView*)[self view] setScrollIndicatorInsets: contentInsets];
// Step 3: Scroll the screen up by the height of the keyboard.
visibleRect = self.view.frame;
visibleRect.size.height -= (keyboardHeight + [[self toolbar] bounds].size.height);
if (([self.activeField frame].origin.y + [self.activeField frame].size.height) > visibleRect.size.height)
{
//make sure scrolling is vertical only
CGPoint scrollPoint = CGPointMake(currentLeftEdge, keyboardHeight);
[(UIScrollView*)[self view] setContentOffset: scrollPoint animated:YES];
}
}
| xcode | keyboard | scrolling | null | null | null | open | Why does my screen scroll back down after I scroll it up?
===
I'm having trouble with scrolling the screen in an iPad app. In my app, there can be lots of fields near the bottom of the page. So instead of frequent adjustments to the screen position depending on the location of the currently active field, I would like for the screen to be in one of two positions: scrolled or not-scrolled. If the user is working on a field any part of which would be hidden by the keyboard, I would like to scroll the screen up by the height of the keyboard.
My problem is that after the keyboard appears and the screen scrolls the distance specified by my code, the screen then snaps back down to a position such that the cursor, wherever it happens to be, is just above the top of the keyboard. I don't understand what is causing this final snap. My scrolling code (lifted from a tutorial) is below.
Thanks
//Scroll the screen up if the keyboard hides the current field
- (void)keyboardDidShow:(NSNotification *)notification
{
// Step 1: Get the height of the keyboard.
if ([self interfaceOrientation] == UIInterfaceOrientationPortrait || [self interfaceOrientation] == UIInterfaceOrientationPortraitUpsideDown)
{
keyboardHeight = [[[notification userInfo] objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue].size.height;
}
else
{
keyboardHeight = [[[notification userInfo] objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue].size.width;
}
// Step 2: Adjust the bottom content inset of your scroll view by the keyboard height.
UIEdgeInsets contentInsets = UIEdgeInsetsMake(0.0, 0.0, keyboardHeight, 0.0);
[(UIScrollView*)[self view] setContentInset: contentInsets];
[(UIScrollView*)[self view] setScrollIndicatorInsets: contentInsets];
// Step 3: Scroll the screen up by the height of the keyboard.
visibleRect = self.view.frame;
visibleRect.size.height -= (keyboardHeight + [[self toolbar] bounds].size.height);
if (([self.activeField frame].origin.y + [self.activeField frame].size.height) > visibleRect.size.height)
{
//make sure scrolling is vertical only
CGPoint scrollPoint = CGPointMake(currentLeftEdge, keyboardHeight);
[(UIScrollView*)[self view] setContentOffset: scrollPoint animated:YES];
}
}
| 0 |
8,797,803 | 01/10/2012 02:20:40 | 64,895 | 02/11/2009 03:53:51 | 2,151 | 73 | What's the best way to input and store a url input in a web page in MySQL php? | I'm struggling a bit figuring out the best way accept and store a url from a web page.
Here's my approach:
1. It should be urlencoded since it's sent over the net to the server.
2. Specify the page as utf-8 in the header.
3. Use my_real_escape_string for inserting to the db.
4. Use strip_slashes on the input.
Does this make sense?
| php | url | strip-s | null | null | null | open | What's the best way to input and store a url input in a web page in MySQL php?
===
I'm struggling a bit figuring out the best way accept and store a url from a web page.
Here's my approach:
1. It should be urlencoded since it's sent over the net to the server.
2. Specify the page as utf-8 in the header.
3. Use my_real_escape_string for inserting to the db.
4. Use strip_slashes on the input.
Does this make sense?
| 0 |
10,397,695 | 05/01/2012 12:34:16 | 1,206,051 | 02/13/2012 04:39:59 | 148 | 0 | What type of project will help me learn thread programming | I want to learn threading and multiprocessing in Python. I don't know what kind of project to take up for this.
I want to be able to deal with all the related objects like Locks, Mutexes, Conditions, Semaphores, etc.
Please suggest a project type that's best for me. | python | multithreading | self-improvement | null | null | 05/01/2012 13:04:09 | not constructive | What type of project will help me learn thread programming
===
I want to learn threading and multiprocessing in Python. I don't know what kind of project to take up for this.
I want to be able to deal with all the related objects like Locks, Mutexes, Conditions, Semaphores, etc.
Please suggest a project type that's best for me. | 4 |
5,169,717 | 03/02/2011 15:32:28 | 600,539 | 02/02/2011 19:36:05 | 67 | 1 | How does Facebook chat work? | When you browse Facebook, the FacebookChat widget at the bottom does not seem to refresh. How does that work? Is it sitting outside of an iframe or something? | php | javascript | facebook | null | null | 05/01/2012 21:27:08 | not a real question | How does Facebook chat work?
===
When you browse Facebook, the FacebookChat widget at the bottom does not seem to refresh. How does that work? Is it sitting outside of an iframe or something? | 1 |
7,255,680 | 08/31/2011 10:30:54 | 415,412 | 08/09/2010 18:25:34 | 1 | 0 | which modern technology stack to use to build a site like TopCoder, CodeChef, etc | I have been programming in Java for a few years now and am looking to learn a new technology stack. I typically learn well when I am doing a project than writing code snippets. Code evaluation sites like [TopCoder][1], [CodeChef][2], etc. caught my fancy. I want to build a site like these.
What I already know:
1. Java - server side (EJB, etc), client side (GWT, Swing, etc.)
2. RDBMS - Oracle, EnterpriseDB, etc.
3. Other Application Frameworks like Spring, etc.
What I want to learn through this:
1. A new server side language that reduces development time
2. A new client side language which is build to look nice with lots of components
3. A NoSQL DB
Please suggest a good combination of above three using non-Java technology as much as possible or a complete framework for the same.
[1]: http://community.topcoder.com/tc
[2]: http://www.codechef.com/
[3]: http://uva.onlinejudge.org/ | codechef | topcoder | null | null | null | 11/28/2011 07:28:09 | not constructive | which modern technology stack to use to build a site like TopCoder, CodeChef, etc
===
I have been programming in Java for a few years now and am looking to learn a new technology stack. I typically learn well when I am doing a project than writing code snippets. Code evaluation sites like [TopCoder][1], [CodeChef][2], etc. caught my fancy. I want to build a site like these.
What I already know:
1. Java - server side (EJB, etc), client side (GWT, Swing, etc.)
2. RDBMS - Oracle, EnterpriseDB, etc.
3. Other Application Frameworks like Spring, etc.
What I want to learn through this:
1. A new server side language that reduces development time
2. A new client side language which is build to look nice with lots of components
3. A NoSQL DB
Please suggest a good combination of above three using non-Java technology as much as possible or a complete framework for the same.
[1]: http://community.topcoder.com/tc
[2]: http://www.codechef.com/
[3]: http://uva.onlinejudge.org/ | 4 |
3,412,537 | 08/05/2010 07:19:42 | 411,649 | 08/05/2010 07:19:42 | 1 | 0 | How to get the CPU usage of iPhone/iPad? | I saw in A+ monitor, it can show CPU Idle, CPU usage, CPU System. Which API should be used to get the these information? I have searched and I use the getloadavg function, but it can only return the CPU usage. Also it is not correctly for it will always be more than 90%.
Thanks! | iphone | cpu-usage | null | null | null | null | open | How to get the CPU usage of iPhone/iPad?
===
I saw in A+ monitor, it can show CPU Idle, CPU usage, CPU System. Which API should be used to get the these information? I have searched and I use the getloadavg function, but it can only return the CPU usage. Also it is not correctly for it will always be more than 90%.
Thanks! | 0 |
8,809,444 | 01/10/2012 19:36:43 | 465,386 | 10/03/2010 21:14:27 | 339 | 8 | Framework for kernel developer's first stab at web dev? | Like the title says, I am currently employed writing a UNIX kernel and usermode apps in C. I've picked up a small web development side project, and I'm trying to figure out where to begin. The internet should be great for researching something like this, but there are so many options and so many people with strong opinions.
Project requirements:
* Frontend and admin login, user accounts
* Sessions, cookies
* Database (that can scale)
* HTTPS, secure CC info
* Post dynamic content like news, etc.
I'm familiar with:
* Linux/Unix, Windows (would prefer Linux for something like this probably)
* Apache (I used a little bit of PHP once)
* C, C++, C#, Python (I love Python), SQL, a few others
I'm wondering: what are some strong web frameworks at the moment? Which will be easy to pick up for a hobby project, but can scale if necessary? Would I be better off learning PHP because it's not abstracted too far from HTTP, or should I plug in to Django or something and let it do the work for me? Which are the most prevalent frameworks for single-developer projects, and why?
Thanks much. | frameworks | web | null | null | null | null | open | Framework for kernel developer's first stab at web dev?
===
Like the title says, I am currently employed writing a UNIX kernel and usermode apps in C. I've picked up a small web development side project, and I'm trying to figure out where to begin. The internet should be great for researching something like this, but there are so many options and so many people with strong opinions.
Project requirements:
* Frontend and admin login, user accounts
* Sessions, cookies
* Database (that can scale)
* HTTPS, secure CC info
* Post dynamic content like news, etc.
I'm familiar with:
* Linux/Unix, Windows (would prefer Linux for something like this probably)
* Apache (I used a little bit of PHP once)
* C, C++, C#, Python (I love Python), SQL, a few others
I'm wondering: what are some strong web frameworks at the moment? Which will be easy to pick up for a hobby project, but can scale if necessary? Would I be better off learning PHP because it's not abstracted too far from HTTP, or should I plug in to Django or something and let it do the work for me? Which are the most prevalent frameworks for single-developer projects, and why?
Thanks much. | 0 |
9,839,442 | 03/23/2012 12:45:16 | 458,850 | 09/26/2010 18:16:20 | 461 | 23 | How to add a image after input value? | I need to create a beatiful js validation and incorrect markers is label inside inputs fields after value. Unfortunately, I still haven't got any idea how to realize this feature, need help?
ps must work in ie8+, opera 11 and in other normal browsers. | javascript | jquery | html | css | null | 03/23/2012 13:29:41 | not a real question | How to add a image after input value?
===
I need to create a beatiful js validation and incorrect markers is label inside inputs fields after value. Unfortunately, I still haven't got any idea how to realize this feature, need help?
ps must work in ie8+, opera 11 and in other normal browsers. | 1 |
295,771 | 11/17/2008 15:01:38 | 1,174 | 08/13/2008 10:17:21 | 195 | 11 | Configure Hibernate to escape underscores in LIKE clause using SQL Server dialect | I have a SQL SELECT query which has a LIKE clause containing an underscore, which should specifically look for an underscore, not treat it as a wildcard:
SELECT * FROM my_table WHERE name LIKE '_H9%';
I understand that I can change the actual clause to '[_]H9%' for this to work as I expect, but the problem is that this clause is being generated by Hibernate.
Is there a way to configure Hibernate to escape all underscores in all queries in this way? Failing that, is there a way to configure SQL Server (2008 in my case) to _not_ treat underscores as wildcards?
| sql-server | sql | hibernate | java | null | null | open | Configure Hibernate to escape underscores in LIKE clause using SQL Server dialect
===
I have a SQL SELECT query which has a LIKE clause containing an underscore, which should specifically look for an underscore, not treat it as a wildcard:
SELECT * FROM my_table WHERE name LIKE '_H9%';
I understand that I can change the actual clause to '[_]H9%' for this to work as I expect, but the problem is that this clause is being generated by Hibernate.
Is there a way to configure Hibernate to escape all underscores in all queries in this way? Failing that, is there a way to configure SQL Server (2008 in my case) to _not_ treat underscores as wildcards?
| 0 |
10,968,263 | 06/10/2012 11:24:15 | 1,250,107 | 03/05/2012 14:55:44 | 145 | 0 | QT program on Ubuntu | I made a qt program on Windows XP and it runs great. Now when I try to run that program on Ubuntu 10.10 , it gives me error "Not Supported". I have included all the required QT libraries and .dll files required to make the program portable are present in the folder of the program but its of no use.. I am using QT 4.7.
Thanks | c++ | qt | ubuntu | null | null | 06/10/2012 19:17:02 | not a real question | QT program on Ubuntu
===
I made a qt program on Windows XP and it runs great. Now when I try to run that program on Ubuntu 10.10 , it gives me error "Not Supported". I have included all the required QT libraries and .dll files required to make the program portable are present in the folder of the program but its of no use.. I am using QT 4.7.
Thanks | 1 |
9,649,905 | 03/10/2012 20:28:20 | 309,798 | 04/06/2010 07:15:54 | 1,016 | 12 | How to start writing a firewall for linux? | I want to develope a firewall for Linux. I prefer C/C++ language.
Is there any simple sample code for writing a firewall?
Which libraries should I use? | c++ | c | linux | firewall | null | 03/10/2012 20:46:49 | not a real question | How to start writing a firewall for linux?
===
I want to develope a firewall for Linux. I prefer C/C++ language.
Is there any simple sample code for writing a firewall?
Which libraries should I use? | 1 |
7,121,877 | 08/19/2011 12:54:04 | 83,806 | 03/27/2009 20:44:03 | 183 | 13 | What benefits does NEsper provide over Rx? | I'm looking at the inprocess CEP, NEsper. it seems that I can do everything it can do in Rx with nicer syntax.
What benefits does NEsper provide over Rx? | system.reactive | esper | cep | null | null | 08/19/2011 15:15:01 | not constructive | What benefits does NEsper provide over Rx?
===
I'm looking at the inprocess CEP, NEsper. it seems that I can do everything it can do in Rx with nicer syntax.
What benefits does NEsper provide over Rx? | 4 |
9,965,564 | 04/01/2012 15:22:26 | 1,306,441 | 04/01/2012 15:11:47 | 1 | 0 | Overwriting Update to either Update or Archive in rails | My requirement is that I want an object (tee) to update if there have not been rounds played on it. If there have been rounds played on it then I want the object (tee) to archive (active attribute set to false) and the updates to be applied to a clone of the object.
My first thought was that I would overwrite the update method in the Tee model like so and have a private method that handles the archive, clone and change:
def update
if(self.rounds.count == 0)
super
else
#archive, clone and apply changes
archive_clone_and_change
return false
end
end
This feels dirty though because I am returning a false on a successful archive update. It also is going to get tricky when I try to apply the changes in the archive_clone_and_change method.
Should I be doing this in the controller instead of the method or does my approach make sense? | ruby-on-rails | ruby | update | null | null | null | open | Overwriting Update to either Update or Archive in rails
===
My requirement is that I want an object (tee) to update if there have not been rounds played on it. If there have been rounds played on it then I want the object (tee) to archive (active attribute set to false) and the updates to be applied to a clone of the object.
My first thought was that I would overwrite the update method in the Tee model like so and have a private method that handles the archive, clone and change:
def update
if(self.rounds.count == 0)
super
else
#archive, clone and apply changes
archive_clone_and_change
return false
end
end
This feels dirty though because I am returning a false on a successful archive update. It also is going to get tricky when I try to apply the changes in the archive_clone_and_change method.
Should I be doing this in the controller instead of the method or does my approach make sense? | 0 |
2,359,713 | 03/01/2010 22:50:43 | 273,110 | 02/14/2010 21:40:33 | 47 | 0 | How do I operate on every item in a vector AND refer to a previous value in Clojure? | Given:
(def my-vec [{:a "foo" :b 10} {:a "bar" :b 13} {:a "baz" :b 7}])
How could iterate over each element to print that element's :a and the sum of all :b's to that point? That is:
"foo" 10
"bar" 23
"baz" 30
I'm trying things like this to no avail:
; Does not work!
(map #(prn (:a %2) %1) (iterate #(+ (:b %2) %1) 0)) my-vec)
This doesn't work because the "iterate" lazy-seq can't refer to the current element in my-vec (as far as I can tell).
TIA! Sean
| clojure | null | null | null | null | null | open | How do I operate on every item in a vector AND refer to a previous value in Clojure?
===
Given:
(def my-vec [{:a "foo" :b 10} {:a "bar" :b 13} {:a "baz" :b 7}])
How could iterate over each element to print that element's :a and the sum of all :b's to that point? That is:
"foo" 10
"bar" 23
"baz" 30
I'm trying things like this to no avail:
; Does not work!
(map #(prn (:a %2) %1) (iterate #(+ (:b %2) %1) 0)) my-vec)
This doesn't work because the "iterate" lazy-seq can't refer to the current element in my-vec (as far as I can tell).
TIA! Sean
| 0 |
4,375,142 | 12/07/2010 09:31:16 | 487,604 | 10/26/2010 12:31:10 | 16 | 1 | Tabs in ActionScript | how to put tabs in application using only actionscript, there are lot of examples there using flex mx controls for tabnavigator, but i want to use only actionscript or flashscript, please help | actionscript-3 | null | null | null | null | null | open | Tabs in ActionScript
===
how to put tabs in application using only actionscript, there are lot of examples there using flex mx controls for tabnavigator, but i want to use only actionscript or flashscript, please help | 0 |
567,882 | 02/20/2009 00:45:53 | 55,717 | 01/16/2009 03:31:33 | 12 | 5 | Tips/recommendations for using Lucene | I'm working on a job portal using asp.net 3.5
I've used Lucene for job and resume search functionality.
Would like to know tips/recommendations if any with respect to Lucene performance optimization, scalability, etc.
Thanks a ton! | lucene | lucene.net | null | null | null | null | open | Tips/recommendations for using Lucene
===
I'm working on a job portal using asp.net 3.5
I've used Lucene for job and resume search functionality.
Would like to know tips/recommendations if any with respect to Lucene performance optimization, scalability, etc.
Thanks a ton! | 0 |
4,317,729 | 11/30/2010 19:35:56 | 398,431 | 07/21/2010 20:25:29 | 1,072 | 3 | Better way to learn PHP | **Reading offline-books** or **online docs/articles**?
For a newbie.
Please write an argued answer. | php | books | study | null | null | 11/30/2010 19:42:39 | not constructive | Better way to learn PHP
===
**Reading offline-books** or **online docs/articles**?
For a newbie.
Please write an argued answer. | 4 |
669,630 | 03/21/2009 17:39:46 | 54,838 | 01/14/2009 00:35:06 | 2,214 | 117 | What is your favorite unit testing pass/fail slang? | I want to talk like I'm in the military of NUnit, but don't like the term "Green grass" as used by Rob Conery. Do you know any others? | unit-testing | fun | jokes | null | null | 07/22/2011 22:36:49 | not constructive | What is your favorite unit testing pass/fail slang?
===
I want to talk like I'm in the military of NUnit, but don't like the term "Green grass" as used by Rob Conery. Do you know any others? | 4 |
11,570,642 | 07/19/2012 23:11:03 | 1,302,415 | 03/30/2012 04:38:59 | 38 | 1 | x86 - Get time in 1ms increments | The x86 interrupt 0x1A seems to give the computer's clock time, but it can only give accurate time to within 55ms (AH=0). Is there any way to get smaller increments (and maybe a bit more "normal") than that, like maybe 1ms? I'm trying to make my own toy OS, so i can't use anything i can't write myself. | assembly | x86 | clock | null | null | null | open | x86 - Get time in 1ms increments
===
The x86 interrupt 0x1A seems to give the computer's clock time, but it can only give accurate time to within 55ms (AH=0). Is there any way to get smaller increments (and maybe a bit more "normal") than that, like maybe 1ms? I'm trying to make my own toy OS, so i can't use anything i can't write myself. | 0 |
8,354,835 | 12/02/2011 10:20:51 | 985,482 | 10/08/2011 15:19:54 | 43 | 3 | Java Graphics Resources | Hi I am interested in starting to create some small games using java.I have managed to learn java up to swing prety well am now I want to learn the Graphics 2D api.I have searched online and on stackoverflow about related information on it and I only found some posts of some old books that are from 1999 to 2002.Can anyone recommend me a good book with some up to date information about Graphics in Java(I'm mostly interested in 2D Graphics) or a good online resource(I've checked sun's tutorials there a bit vague in my opinion).Thanks for answer. | java | null | null | null | null | 12/03/2011 15:53:37 | not constructive | Java Graphics Resources
===
Hi I am interested in starting to create some small games using java.I have managed to learn java up to swing prety well am now I want to learn the Graphics 2D api.I have searched online and on stackoverflow about related information on it and I only found some posts of some old books that are from 1999 to 2002.Can anyone recommend me a good book with some up to date information about Graphics in Java(I'm mostly interested in 2D Graphics) or a good online resource(I've checked sun's tutorials there a bit vague in my opinion).Thanks for answer. | 4 |
5,361,690 | 03/19/2011 11:11:48 | 412,690 | 08/06/2010 05:58:09 | 43 | 3 | iOS Settings.bundle localization difficulties | From what I can read I'm not the only having this problem; except this is just happening in my `Settings.bundle` in my app it's all fine…
My app is localized in English (primary) and French.
My `Root.strings` file isn't getting called in at all, for English and French. If I put my iPhone in French the Settings bundle will be defaulted to the title declared in my `Root.plist`. Now in whatever language my iPhone's set to (English or French), let's say I add a group entitled "hello" and set the corresponding string to "world" I'll just get "hello" as my "localized" string…
Thanks | iphone | ios | localization | settings.bundle | null | null | open | iOS Settings.bundle localization difficulties
===
From what I can read I'm not the only having this problem; except this is just happening in my `Settings.bundle` in my app it's all fine…
My app is localized in English (primary) and French.
My `Root.strings` file isn't getting called in at all, for English and French. If I put my iPhone in French the Settings bundle will be defaulted to the title declared in my `Root.plist`. Now in whatever language my iPhone's set to (English or French), let's say I add a group entitled "hello" and set the corresponding string to "world" I'll just get "hello" as my "localized" string…
Thanks | 0 |
9,271,581 | 02/14/2012 04:10:57 | 219,728 | 11/26/2009 23:07:24 | 99 | 2 | How to retrieve J2ME application logs on Bada? | I have an J2ME application installed on a Bada 2.0 device. This application runs fine except for NFC related events. I would like to investigate this reading the logs written by Bada's Java virtual Machine and/or Bada's OS.
**Does anyone know how to retrieve those logs ?**
Note: I already looked at the Bada SDK but logs emited via their Eclipse
Regards,
OS: Bada 2.0
Device: Samsung GT-S7250. | logging | java-me | bada | null | null | null | open | How to retrieve J2ME application logs on Bada?
===
I have an J2ME application installed on a Bada 2.0 device. This application runs fine except for NFC related events. I would like to investigate this reading the logs written by Bada's Java virtual Machine and/or Bada's OS.
**Does anyone know how to retrieve those logs ?**
Note: I already looked at the Bada SDK but logs emited via their Eclipse
Regards,
OS: Bada 2.0
Device: Samsung GT-S7250. | 0 |
11,643,180 | 07/25/2012 05:17:29 | 1,179,653 | 01/31/2012 06:21:29 | 53 | 13 | linux route command not working | I use route command to add new route in my routing table. But it my new root is not added. Also it doesn't show any error for my command. Here is the console
#route add ::/0 via fe::2
route: resolving fe::2
#
So when I use route -A inet6, I can't see the newly added route. | linux | networking | ipv6 | route | null | 07/25/2012 13:10:49 | off topic | linux route command not working
===
I use route command to add new route in my routing table. But it my new root is not added. Also it doesn't show any error for my command. Here is the console
#route add ::/0 via fe::2
route: resolving fe::2
#
So when I use route -A inet6, I can't see the newly added route. | 2 |
1,814,076 | 11/28/2009 23:10:50 | 34,537 | 11/05/2008 03:00:23 | 2,961 | 59 | Multiple-instances lock? | I am using a mysql db. Right now for my multithreads i use lock(staticVar){...}. It works fine. But i can add data via the command line which also uses the DB. It will occasionally throw an exception or cause my main instance to throw an exception from the sqlite db being lock.
How can i create a mutli instance lock so i no longer get this db is locked exception? | sqlite | multiple-instances | .net | locking | null | null | open | Multiple-instances lock?
===
I am using a mysql db. Right now for my multithreads i use lock(staticVar){...}. It works fine. But i can add data via the command line which also uses the DB. It will occasionally throw an exception or cause my main instance to throw an exception from the sqlite db being lock.
How can i create a mutli instance lock so i no longer get this db is locked exception? | 0 |
6,758,949 | 07/20/2011 08:18:00 | 853,450 | 07/20/2011 07:39:23 | 1 | 0 | how to combine different columns of respective tables having different datatypes n column names into new table | i have 5 existing tables in db with different num of columns,n no table contains column names in common.
tables in my db are...
table1 contains column names-userid,bloodgroup,age,dateofbirth,,gender
table2 column names-housenumber,streetname,cityname,pincode,phoneno
table3 column names-designationname,desgcode
table4 column names-empname,empno
table5 column names-divisionname,divcode
n i want only some column names from these tables,those are...
table1-userid,bloodgroup,gender
table2-housenumber,streetname,cityname,phoneno
table3-designationname
table4-empname
table5-divisionname
n now i want to insert all these column names into a new table.....
for ex:new table should contain column names as:-
new table-userid,bloodgroup,gender,
housenumber,streetname,cityname,phoneno,designationname,empname,divisionname.
so that i can use that new table in my project....plz rpy asap,its urgent.....giv me the exact query plz..... | mysql | null | null | null | null | 07/20/2011 14:55:50 | not a real question | how to combine different columns of respective tables having different datatypes n column names into new table
===
i have 5 existing tables in db with different num of columns,n no table contains column names in common.
tables in my db are...
table1 contains column names-userid,bloodgroup,age,dateofbirth,,gender
table2 column names-housenumber,streetname,cityname,pincode,phoneno
table3 column names-designationname,desgcode
table4 column names-empname,empno
table5 column names-divisionname,divcode
n i want only some column names from these tables,those are...
table1-userid,bloodgroup,gender
table2-housenumber,streetname,cityname,phoneno
table3-designationname
table4-empname
table5-divisionname
n now i want to insert all these column names into a new table.....
for ex:new table should contain column names as:-
new table-userid,bloodgroup,gender,
housenumber,streetname,cityname,phoneno,designationname,empname,divisionname.
so that i can use that new table in my project....plz rpy asap,its urgent.....giv me the exact query plz..... | 1 |
1,586,661 | 10/19/2009 01:57:41 | 184,610 | 10/05/2009 21:15:05 | 39 | 0 | Remove large block of blank text in PHP | Hello I have a string in PHP
$string = "...................blah blah blah.................."
where the ......... are blank spaces (stackoverflow doesn't let me enter many blank spaces).
How do I remove this block of blank spaces before and after the "blah blah blah" text? "blah blah blah" is parsed data that changes.
Thank you. | parsing | php | null | null | null | null | open | Remove large block of blank text in PHP
===
Hello I have a string in PHP
$string = "...................blah blah blah.................."
where the ......... are blank spaces (stackoverflow doesn't let me enter many blank spaces).
How do I remove this block of blank spaces before and after the "blah blah blah" text? "blah blah blah" is parsed data that changes.
Thank you. | 0 |
7,403,509 | 09/13/2011 14:26:41 | 942,742 | 09/13/2011 14:22:43 | 1 | 0 | How to senda asp.net report as an PDF attachment in the mail? | My requirement is to send a asp.net report(.rdlc) as an pdf attachement in the mail.
but i am getting the error while rendering the report to pdf
here is the error:
{"The definition of the report 'Main Report' is invalid."}
at Microsoft.Reporting.WebForms.LocalReport.CompileReport()
at Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, CreateAndRegisterStream createStreamCallback, Warning[]& warnings)
at Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings)
at Microsoft.Reporting.WebForms.LocalReport.Render(String format, String deviceInfo, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings)
please suggest some solutions urgently. | asp.net | null | null | null | null | 09/16/2011 20:44:16 | not a real question | How to senda asp.net report as an PDF attachment in the mail?
===
My requirement is to send a asp.net report(.rdlc) as an pdf attachement in the mail.
but i am getting the error while rendering the report to pdf
here is the error:
{"The definition of the report 'Main Report' is invalid."}
at Microsoft.Reporting.WebForms.LocalReport.CompileReport()
at Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, CreateAndRegisterStream createStreamCallback, Warning[]& warnings)
at Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings)
at Microsoft.Reporting.WebForms.LocalReport.Render(String format, String deviceInfo, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings)
please suggest some solutions urgently. | 1 |
10,819,992 | 05/30/2012 16:03:09 | 1,051,221 | 11/17/2011 07:17:33 | 12 | 1 | User name should not be unique | Guys i am working on classified system in wordpress by using classipress & i am trying to figure out two things mentioned below, kindly help me if you have any ideas...
1. I want that user name should not be unique so the user like from facebook registration or want any specific user name so the the wordpress donot restrict it..
**Guys, can you guide me how can i achieve it or is there any plugin for it???**
2. second i want to send a message on user's cell phone number when user login & register..or atleast login...For this may be i can put plugin cell number field on registration page so when user put their cell number in that field it subscribe to that...& when user login it send message to their cell phone...
**so is there any plugin for it??**
| wordpress | wordpress-plugin | app-themes | null | null | 06/02/2012 06:32:15 | not a real question | User name should not be unique
===
Guys i am working on classified system in wordpress by using classipress & i am trying to figure out two things mentioned below, kindly help me if you have any ideas...
1. I want that user name should not be unique so the user like from facebook registration or want any specific user name so the the wordpress donot restrict it..
**Guys, can you guide me how can i achieve it or is there any plugin for it???**
2. second i want to send a message on user's cell phone number when user login & register..or atleast login...For this may be i can put plugin cell number field on registration page so when user put their cell number in that field it subscribe to that...& when user login it send message to their cell phone...
**so is there any plugin for it??**
| 1 |
3,826,072 | 09/29/2010 21:39:52 | 155,513 | 08/13/2009 01:29:04 | 503 | 12 | How do you use OpenGLES to open an image file, do some work, then save the image file, in the background (offline)? | So I'd like to create a class that accepts a CGImage from an image file I just read from disk, does work on that image texture (color transformations) then returns the texture as a CGImage and does all this in the background w/out drawing to screen. I've looked at Apple's demo app on GLImageProcessing but it draws all the processing to the screen and I've seen bits and bites of how to do parts of what I want but can't assemble it.
Any suggestions would be greatly appreciated.
Thanks | iphone | objective-c | opengl | opengl-es | null | null | open | How do you use OpenGLES to open an image file, do some work, then save the image file, in the background (offline)?
===
So I'd like to create a class that accepts a CGImage from an image file I just read from disk, does work on that image texture (color transformations) then returns the texture as a CGImage and does all this in the background w/out drawing to screen. I've looked at Apple's demo app on GLImageProcessing but it draws all the processing to the screen and I've seen bits and bites of how to do parts of what I want but can't assemble it.
Any suggestions would be greatly appreciated.
Thanks | 0 |
7,139,425 | 08/21/2011 16:11:50 | 530,955 | 12/05/2010 03:56:10 | 183 | 1 | Deleting Elements from an array | I have a numpy array and I want to delete the first 3 elements of the array. I tried this solution:
a = np.arange(0,10)
i=0
while(i<3):
del a[0]
i=i+1
This gives me an error that "**ValueError: cannot delete array elements**". I do not understand why this is the case. i'd appreciate the help thanks! | python | numpy | null | null | null | null | open | Deleting Elements from an array
===
I have a numpy array and I want to delete the first 3 elements of the array. I tried this solution:
a = np.arange(0,10)
i=0
while(i<3):
del a[0]
i=i+1
This gives me an error that "**ValueError: cannot delete array elements**". I do not understand why this is the case. i'd appreciate the help thanks! | 0 |
9,898,781 | 03/27/2012 22:43:25 | 1,011,444 | 10/24/2011 18:23:20 | 26 | 0 | What's the difference between a 5$/mo and a 20$/mo web hosting? | I need to put on the Internet my portfolio and a few other projects (http://myportfolio.com/website1 for example). I was thinking of a low budget web hosting like Bluehost.
I'm learning Ruby on Rails and I plan to continue on this road, and [Bluehost][1] does support Ruby on Rails and PostgreSQL (which I'm using). But I saw on the Internet people recommending Heroku (which seems a bit pricy for the relatively little exposition I'll have) or [Linode][2], Slicehost, which are more like 20$/mo or more.
Which one should I take, and above all what's the difference? (I heard about hosting Rails apps in a "shared environement" not being recommendable, etc.)
Thanks in advance.
[1]: https://www.bluehost.com/
[2]: http://www.linode.com/ | ruby-on-rails | web-hosting | null | null | null | 03/27/2012 23:10:37 | off topic | What's the difference between a 5$/mo and a 20$/mo web hosting?
===
I need to put on the Internet my portfolio and a few other projects (http://myportfolio.com/website1 for example). I was thinking of a low budget web hosting like Bluehost.
I'm learning Ruby on Rails and I plan to continue on this road, and [Bluehost][1] does support Ruby on Rails and PostgreSQL (which I'm using). But I saw on the Internet people recommending Heroku (which seems a bit pricy for the relatively little exposition I'll have) or [Linode][2], Slicehost, which are more like 20$/mo or more.
Which one should I take, and above all what's the difference? (I heard about hosting Rails apps in a "shared environement" not being recommendable, etc.)
Thanks in advance.
[1]: https://www.bluehost.com/
[2]: http://www.linode.com/ | 2 |
714,349 | 04/03/2009 15:07:35 | 19,490 | 09/20/2008 04:55:00 | 203 | 4 | How do I run my own web server from home? | I thinking taking my website off of a shared hosting plan and hosting my own web server to save some $$$. I never hosted a website before and I’m very new to this. I’m using ASP.NET 3.5 and SQL Server 2005 Express. The laptop I will use as the web server runs on Windows XP, 1GB DDR SDRAM, a AMD Turion 64 mobile technology ML-30 / 1.6 GHz CPU, ZoneAlarm firewall and a cable modem with 10 Mbps download and 512 kbps upload. The site currently has 600+ registered users with a few hundred unique page views a day.
**Some questions:**
What are the steps from ground zero on hosting a web server for ASP.NET and MS SQL Server from home? As I mentioned I have no experience at hosting websites, just building them so please be descriptive.
How much would it cost to run your own server? (Expecting just a rough estimate so I can out weigh shared / dedicated hosting plans.) Do I need to purchase any licenses? Is it more of a hassle than it’s worth?
I’m not sure what else to ask. If you have any advice or information to share that would be great.
Thanks for your help. I really appreciate it.
John
| hosting | website | asp.net | null | null | 04/03/2009 15:45:03 | off topic | How do I run my own web server from home?
===
I thinking taking my website off of a shared hosting plan and hosting my own web server to save some $$$. I never hosted a website before and I’m very new to this. I’m using ASP.NET 3.5 and SQL Server 2005 Express. The laptop I will use as the web server runs on Windows XP, 1GB DDR SDRAM, a AMD Turion 64 mobile technology ML-30 / 1.6 GHz CPU, ZoneAlarm firewall and a cable modem with 10 Mbps download and 512 kbps upload. The site currently has 600+ registered users with a few hundred unique page views a day.
**Some questions:**
What are the steps from ground zero on hosting a web server for ASP.NET and MS SQL Server from home? As I mentioned I have no experience at hosting websites, just building them so please be descriptive.
How much would it cost to run your own server? (Expecting just a rough estimate so I can out weigh shared / dedicated hosting plans.) Do I need to purchase any licenses? Is it more of a hassle than it’s worth?
I’m not sure what else to ask. If you have any advice or information to share that would be great.
Thanks for your help. I really appreciate it.
John
| 2 |
1,515,508 | 10/04/2009 03:19:13 | 169,210 | 09/06/2009 09:29:40 | 309 | 5 | Segmentation fault doubt | I have observed that sometimes in C programs, if we have a printf in code anywhere before a segmentation fault, it does not print. Why is it so? | c | segmentation-fault | null | null | null | null | open | Segmentation fault doubt
===
I have observed that sometimes in C programs, if we have a printf in code anywhere before a segmentation fault, it does not print. Why is it so? | 0 |
8,959,724 | 01/22/2012 07:38:46 | 51,532 | 01/05/2009 05:44:54 | 907 | 16 | Keeping track of my softball team's stats | My softball team is a rag time collection of physicists, and although we're not the most unskilled bunch of scientists, what we lack in brute strength we make up for in clear thinking and an obsession for statistics. I'm trying to keep a good record of our stats (the league provides H,AB,R,RBI,BB,2B,3B,HR,AVG, SLG,OBP,OPS) and we've kept an excel based record for the last 9 seasons/3 years and put it online.
I'm looking for a more useable, extensible, and less spreadsheet-y solution to this without creating my own MySQL/PHP framework. I've found [softballstats][1] on sourceforge and it gave me hope a good solution is out there. (Props to it's author, David Carlo) Does anyone know a good solution that incorporates the following:
1. Variable number of seasons per year.
2. Players that flow in and out year by year. (Career stats for players in current year)
2. Gaps when city official mess up stats. (Often messed up, sometimes get
play-by-play).
This has been cross posted at SuperUser [here][2] since this could be either highly technical or link-and-solve. The incorrect post should be promptly closed. Thanks everyone.
[1]: http://softballstats.sourceforge.net/
[2]: http://superuser.com/questions/381092/keeping-track-of-my-softball-teams-stats | statistics | null | null | null | null | 01/22/2012 16:46:58 | not a real question | Keeping track of my softball team's stats
===
My softball team is a rag time collection of physicists, and although we're not the most unskilled bunch of scientists, what we lack in brute strength we make up for in clear thinking and an obsession for statistics. I'm trying to keep a good record of our stats (the league provides H,AB,R,RBI,BB,2B,3B,HR,AVG, SLG,OBP,OPS) and we've kept an excel based record for the last 9 seasons/3 years and put it online.
I'm looking for a more useable, extensible, and less spreadsheet-y solution to this without creating my own MySQL/PHP framework. I've found [softballstats][1] on sourceforge and it gave me hope a good solution is out there. (Props to it's author, David Carlo) Does anyone know a good solution that incorporates the following:
1. Variable number of seasons per year.
2. Players that flow in and out year by year. (Career stats for players in current year)
2. Gaps when city official mess up stats. (Often messed up, sometimes get
play-by-play).
This has been cross posted at SuperUser [here][2] since this could be either highly technical or link-and-solve. The incorrect post should be promptly closed. Thanks everyone.
[1]: http://softballstats.sourceforge.net/
[2]: http://superuser.com/questions/381092/keeping-track-of-my-softball-teams-stats | 1 |
2,949,368 | 06/01/2010 11:35:48 | 355,344 | 06/01/2010 11:31:58 | 1 | 0 | Can I move a Perl installation from one computer to another computer? | I am trying to set up an application dependant on few Perl modules, but the server I am installing to, does not have Internet connection. I read about offline module installs via ppd files, however I would have to resolve all the dependencies one by one.. All the more tedious considering I don't have direct internet connection.
I am hoping to find a solution, where I install ActivePerl on my PC and install all the libraries that I want and then copy paste the directories to my server. If it is just a matter of fixing some environment variables, that would be fine. Just want to know the definitive list of variables to modify. Not sure whether it is mandatory to install the perl libraries on the computer in which it is intended to run? (One is 32 bit platform and other one is 64 bit, but the server is already running various 32 bit applications so I hope it is not a major problem) For best compatibility, I plan to install ActivePerl on both the systems and merge the library directories to be identical. | perl | install | perl-module | activeperl | null | null | open | Can I move a Perl installation from one computer to another computer?
===
I am trying to set up an application dependant on few Perl modules, but the server I am installing to, does not have Internet connection. I read about offline module installs via ppd files, however I would have to resolve all the dependencies one by one.. All the more tedious considering I don't have direct internet connection.
I am hoping to find a solution, where I install ActivePerl on my PC and install all the libraries that I want and then copy paste the directories to my server. If it is just a matter of fixing some environment variables, that would be fine. Just want to know the definitive list of variables to modify. Not sure whether it is mandatory to install the perl libraries on the computer in which it is intended to run? (One is 32 bit platform and other one is 64 bit, but the server is already running various 32 bit applications so I hope it is not a major problem) For best compatibility, I plan to install ActivePerl on both the systems and merge the library directories to be identical. | 0 |
8,660,019 | 12/28/2011 18:54:06 | 879,033 | 08/04/2011 16:26:05 | 51 | 3 | Rails 3 initializers that run only on `rails server` and not `rails generate`, etc | I have a relatively small piece of initializer code that I want to run whenever `rails server` runs, but not when I run `rails generate`, `rails console` or any other rails command (including rake tasks that require the environment task). This piece of code pre-fills some caches and is relatively expensive so I really don't want it to run on anything but `rails s`
**Solutions that are unsatisfactory:**
Foreman et al. will mean it'll run on a different process which is (a) over the top for that small piece of code, (b) requires interprocess communication instead of the simple in-memory approach afforded by the initializer.
On the server I've solved this by configuring passenger to pass a special environment variable into rails, telling it it's running in server context. However I'd like it if possible to work out of the box on all developer's machines without resorting to remembering to run rails server in a way that'll also provide that environment variable (i.e `IN_SERVER=true rails server`).
This question has always been asked before with respect to running an initializer when running in `rails server` and not in `rake`. However I want it to run specifically only in server initialization - the fix for rake is great but isn't comprehensive. | ruby-on-rails | ruby-on-rails-3 | ruby-on-rails-3.1 | null | null | null | open | Rails 3 initializers that run only on `rails server` and not `rails generate`, etc
===
I have a relatively small piece of initializer code that I want to run whenever `rails server` runs, but not when I run `rails generate`, `rails console` or any other rails command (including rake tasks that require the environment task). This piece of code pre-fills some caches and is relatively expensive so I really don't want it to run on anything but `rails s`
**Solutions that are unsatisfactory:**
Foreman et al. will mean it'll run on a different process which is (a) over the top for that small piece of code, (b) requires interprocess communication instead of the simple in-memory approach afforded by the initializer.
On the server I've solved this by configuring passenger to pass a special environment variable into rails, telling it it's running in server context. However I'd like it if possible to work out of the box on all developer's machines without resorting to remembering to run rails server in a way that'll also provide that environment variable (i.e `IN_SERVER=true rails server`).
This question has always been asked before with respect to running an initializer when running in `rails server` and not in `rake`. However I want it to run specifically only in server initialization - the fix for rake is great but isn't comprehensive. | 0 |
1,366,921 | 09/02/2009 10:32:50 | 3,477 | 08/28/2008 17:58:59 | 103 | 4 | Windows analog to Unix' 'ipcs -m' command | Does Windows have the notion of system-wide shared memory segments and is there a command for listing them? | windows | null | null | null | null | null | open | Windows analog to Unix' 'ipcs -m' command
===
Does Windows have the notion of system-wide shared memory segments and is there a command for listing them? | 0 |
4,167,748 | 11/12/2010 18:16:38 | 507,731 | 11/12/2010 18:16:38 | 1 | 0 | WPF Expander in user control getting rendered transparent in ListBox item | I’m having issues with a WPF Expander that I have in a user control that gets rendered in a ListBox. Essentially I’m trying to get PopUpButton behavior on each ListItem in my ListBox. When I open the Expander the content is rendering behind everything else as if it were transparent, or lower in the z-order. I’ve tried this with a WPF PopUp and Toggle Button as well (using techniques described int Karle Shivllet’s blog – Expander Control with Popup Content) to no avail.
Let me first describe what it is I’m trying to do. I have two controls that display a list of inputs that I need to configure for my application. For simplicity sake, one user control is used to configure inputs to a graph, and another control is used to control inputs to a simple excel grid. The inputs for the graph and grid each have properties that need to be configured on them. I’ve developed a simple user control called InputSelectControl that will render a ListBox containing the list of inputs to be configured for the graph or grid. Each ListItem in the ListBox consist of a TextBlock for the input’s name (e.g. Pressure, ECG, etc.) and a WPF Expander that , when clicke, displays a property editor for that input. Since the property editor presentation will be different depending on whether I’m dealing with graph inputs versus grid inputs, I’ve used a DependencyProperty on my InputSelectControl that is of type ControlTemplate. This allows my grid and graph to each supply the presentation they need for editing their input properties. Also note that I will have more than just a graph and a grid that need this behavior, thus the desire to make this a user control that can dynamically receive presentation behavior.
I’ve tried placing my Expander inside my property editor template, had have also tried experimenting with the ZIndex in various places, but always end up with the same behavior, the Expander popup displays behind the ListItems in my list.
Below is some code further describing my approach. Hopefully someone can help me out of this pickle.
XAML representing my Grid (could be graph, or something else) control that hold my InputSelectControl:
<UserControl x:Class="MyApp.GridView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:props="clr-namespace:PopupButtonDependencyProp" mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<UserControl.Resources>
<!-- Specify the control tempalte we want loaded into the
properies popup for a grid-->
<ControlTemplate x:Key="GridPropertyEditorTemplate" TargetType="ContentControl">
<props:GridInputPropertyEditor />
</ControlTemplate>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock Text="Hello Grid" Margin="5" />
<!-- Tell the InputSelectControl what template to load into Property
Window for each Grid Input item -->
<props:InputSelectControl Grid.Row="1"
DataContext="{Binding VmUsedInputs, Mode=OneWay}"
PropertyEditorTemplate="{StaticResource GridPropertyEditorTemplate}" />
</Grid>
</UserControl>
XAML representing my **InputSelectControl** that displays my list of inputs and a ContentControl place holder for each ListItem where I want my "Popup behavior" for editing properties:
<UserControl x:Class="MyApp.InputSelectControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:props="clr-namespace:PopupButtonDependencyProp"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<!-- Listbox holding our inputs. Assuming whatever we're contained in has
set our DataContext to a valid Input collection-->
<ListBox x:Name="inputsUsed" Grid.Row="1" ItemsSource="{Binding}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Auto"
SelectionMode="Multiple" ClipToBounds="True">
<ListBox.ItemTemplate>
<DataTemplate>
<Border x:Name="border" CornerRadius="7">
<StackPanel VerticalAlignment="Stretch" Orientation="Horizontal">
<!-- Input label-->
<TextBlock Text="{Binding Path=Label}" FontWeight ="Bold"
FontSize ="12" FontStyle = "Normal"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" Margin="5,0,5,0" />
<Expander x:Name="GridPropEditor" Header="Properties"
Height="Auto" Margin="5,0,0,0"
ToolTip="Open trace property dialog">
<!-- Properties button - The ContentControl below is rendering
the PropertyEditorTemplate that was set by whoever contains us -->
<ContentControl Template="{Binding PropertyEditorTemplate,
RelativeSource={RelativeSource AncestorType=props:InputSelectControl}}" />
</Expander>
</StackPanel>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</UserControl>
C# representing my DependencyProperty for injection the property editor template to present on popup.
/// <summary>
/// Interaction logic for InputSelectControl.xaml
/// </summary>
public partial class InputSelectControl : UserControl
{
#region Dependency Property stuff
/// <summary>
/// Dependency Property for control template to be rendered. This
/// lets us adorn the InputSelectControl with content in the Xaml.
/// The content can be different fore each instance of InputSelectControl.
/// </summary>
public static DependencyProperty PropertyEditorTemplateProperty =
DependencyProperty.Register("PropertyEditorTemplate",
typeof(ControlTemplate), typeof(InputSelectControl));
/// <summary>
/// PropertyEditorTemplate. This is how the property is set and get by WPF
/// </summary>
public ControlTemplate PropertyEditorTemplate
{
get { return GetValue(PropertyEditorTemplateProperty) as ControlTemplate; }
set { SetValue(PropertyEditorTemplateProperty, value); }
}
#endregion
/// <summary>
/// Constructor
/// </summary>
public InputSelectControl()
{
InitializeComponent();
}
}
XAML representing my GridInputPropertyEditor which is the template describing the presentation for editing Grid properties. This will be different for a Graph:
<UserControl x:Class="MyApp.GridInputPropertyEditor"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Canvas Panel.ZIndex=”99”>
<!-- Property Editor Control - Assumes DataContext holds to the properties
that need to be edited-->
<StackPanel Orientation="Vertical" Background="WhiteSmoke">
<!-- Lists the properties for a Grid to be edited. We could use
any layout we need here. -->
<ListBox ItemsSource="{Binding Properties}" Background="WhiteSmoke" >
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Margin="5,5">
<TextBlock Text="{Binding Label}" FontWeight="Bold"/>
<TextBlock Text=":" />
<TextBox Text="{Binding Value}" Margin="10,0" Width="20" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>
</Canvas>
</UserControl>
| wpf | contentcontrol | null | null | null | null | open | WPF Expander in user control getting rendered transparent in ListBox item
===
I’m having issues with a WPF Expander that I have in a user control that gets rendered in a ListBox. Essentially I’m trying to get PopUpButton behavior on each ListItem in my ListBox. When I open the Expander the content is rendering behind everything else as if it were transparent, or lower in the z-order. I’ve tried this with a WPF PopUp and Toggle Button as well (using techniques described int Karle Shivllet’s blog – Expander Control with Popup Content) to no avail.
Let me first describe what it is I’m trying to do. I have two controls that display a list of inputs that I need to configure for my application. For simplicity sake, one user control is used to configure inputs to a graph, and another control is used to control inputs to a simple excel grid. The inputs for the graph and grid each have properties that need to be configured on them. I’ve developed a simple user control called InputSelectControl that will render a ListBox containing the list of inputs to be configured for the graph or grid. Each ListItem in the ListBox consist of a TextBlock for the input’s name (e.g. Pressure, ECG, etc.) and a WPF Expander that , when clicke, displays a property editor for that input. Since the property editor presentation will be different depending on whether I’m dealing with graph inputs versus grid inputs, I’ve used a DependencyProperty on my InputSelectControl that is of type ControlTemplate. This allows my grid and graph to each supply the presentation they need for editing their input properties. Also note that I will have more than just a graph and a grid that need this behavior, thus the desire to make this a user control that can dynamically receive presentation behavior.
I’ve tried placing my Expander inside my property editor template, had have also tried experimenting with the ZIndex in various places, but always end up with the same behavior, the Expander popup displays behind the ListItems in my list.
Below is some code further describing my approach. Hopefully someone can help me out of this pickle.
XAML representing my Grid (could be graph, or something else) control that hold my InputSelectControl:
<UserControl x:Class="MyApp.GridView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:props="clr-namespace:PopupButtonDependencyProp" mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<UserControl.Resources>
<!-- Specify the control tempalte we want loaded into the
properies popup for a grid-->
<ControlTemplate x:Key="GridPropertyEditorTemplate" TargetType="ContentControl">
<props:GridInputPropertyEditor />
</ControlTemplate>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock Text="Hello Grid" Margin="5" />
<!-- Tell the InputSelectControl what template to load into Property
Window for each Grid Input item -->
<props:InputSelectControl Grid.Row="1"
DataContext="{Binding VmUsedInputs, Mode=OneWay}"
PropertyEditorTemplate="{StaticResource GridPropertyEditorTemplate}" />
</Grid>
</UserControl>
XAML representing my **InputSelectControl** that displays my list of inputs and a ContentControl place holder for each ListItem where I want my "Popup behavior" for editing properties:
<UserControl x:Class="MyApp.InputSelectControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:props="clr-namespace:PopupButtonDependencyProp"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<!-- Listbox holding our inputs. Assuming whatever we're contained in has
set our DataContext to a valid Input collection-->
<ListBox x:Name="inputsUsed" Grid.Row="1" ItemsSource="{Binding}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Auto"
SelectionMode="Multiple" ClipToBounds="True">
<ListBox.ItemTemplate>
<DataTemplate>
<Border x:Name="border" CornerRadius="7">
<StackPanel VerticalAlignment="Stretch" Orientation="Horizontal">
<!-- Input label-->
<TextBlock Text="{Binding Path=Label}" FontWeight ="Bold"
FontSize ="12" FontStyle = "Normal"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" Margin="5,0,5,0" />
<Expander x:Name="GridPropEditor" Header="Properties"
Height="Auto" Margin="5,0,0,0"
ToolTip="Open trace property dialog">
<!-- Properties button - The ContentControl below is rendering
the PropertyEditorTemplate that was set by whoever contains us -->
<ContentControl Template="{Binding PropertyEditorTemplate,
RelativeSource={RelativeSource AncestorType=props:InputSelectControl}}" />
</Expander>
</StackPanel>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</UserControl>
C# representing my DependencyProperty for injection the property editor template to present on popup.
/// <summary>
/// Interaction logic for InputSelectControl.xaml
/// </summary>
public partial class InputSelectControl : UserControl
{
#region Dependency Property stuff
/// <summary>
/// Dependency Property for control template to be rendered. This
/// lets us adorn the InputSelectControl with content in the Xaml.
/// The content can be different fore each instance of InputSelectControl.
/// </summary>
public static DependencyProperty PropertyEditorTemplateProperty =
DependencyProperty.Register("PropertyEditorTemplate",
typeof(ControlTemplate), typeof(InputSelectControl));
/// <summary>
/// PropertyEditorTemplate. This is how the property is set and get by WPF
/// </summary>
public ControlTemplate PropertyEditorTemplate
{
get { return GetValue(PropertyEditorTemplateProperty) as ControlTemplate; }
set { SetValue(PropertyEditorTemplateProperty, value); }
}
#endregion
/// <summary>
/// Constructor
/// </summary>
public InputSelectControl()
{
InitializeComponent();
}
}
XAML representing my GridInputPropertyEditor which is the template describing the presentation for editing Grid properties. This will be different for a Graph:
<UserControl x:Class="MyApp.GridInputPropertyEditor"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Canvas Panel.ZIndex=”99”>
<!-- Property Editor Control - Assumes DataContext holds to the properties
that need to be edited-->
<StackPanel Orientation="Vertical" Background="WhiteSmoke">
<!-- Lists the properties for a Grid to be edited. We could use
any layout we need here. -->
<ListBox ItemsSource="{Binding Properties}" Background="WhiteSmoke" >
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Margin="5,5">
<TextBlock Text="{Binding Label}" FontWeight="Bold"/>
<TextBlock Text=":" />
<TextBox Text="{Binding Value}" Margin="10,0" Width="20" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>
</Canvas>
</UserControl>
| 0 |
11,129,131 | 06/20/2012 22:32:17 | 1,430,922 | 06/01/2012 14:36:02 | 15 | 0 | Text File Output | I need to output a .txt file onto the Desktop of the user, how do i do this in Java? is this code usable with some tweaking or does it require a start over from scratch?
try {
OutputStream fout= new FileOutputStream("test.txt");
OutputStream bout= new BufferedOutputStream(fout);
OutputStreamWriter out
= new OutputStreamWriter(bout, "8859_1");
out.write("test");
}
out.flush();
out.close();
catch (UnsupportedEncodingException e) {
System.out.println(
"This VM does not support the Latin-1 character set."
);
}
catch (IOException e) {
System.out.println(e.getMessage());
}
| java | null | null | null | null | 06/22/2012 01:42:18 | not constructive | Text File Output
===
I need to output a .txt file onto the Desktop of the user, how do i do this in Java? is this code usable with some tweaking or does it require a start over from scratch?
try {
OutputStream fout= new FileOutputStream("test.txt");
OutputStream bout= new BufferedOutputStream(fout);
OutputStreamWriter out
= new OutputStreamWriter(bout, "8859_1");
out.write("test");
}
out.flush();
out.close();
catch (UnsupportedEncodingException e) {
System.out.println(
"This VM does not support the Latin-1 character set."
);
}
catch (IOException e) {
System.out.println(e.getMessage());
}
| 4 |
4,074,109 | 11/02/2010 00:07:41 | 479,805 | 10/18/2010 21:18:34 | 37 | 3 | basic math how do you solve n(n+1) = x | After years of coding I have forgotten my high school math.
how does one solve n(n+1) = 200 ? | math | null | null | null | null | 11/02/2010 00:10:57 | off topic | basic math how do you solve n(n+1) = x
===
After years of coding I have forgotten my high school math.
how does one solve n(n+1) = 200 ? | 2 |
8,779,062 | 01/08/2012 16:13:34 | 1,087,848 | 12/08/2011 13:39:13 | 25 | 1 | Run PERL online | Sorry if this is a stupid question, but i'm new to PERL, I just started the day before yesterday.
I want to run a PERL-script online, but i don't know how.
In PHP you need to start with '‹?php', so do you have to start with something like that in PERL?
And does Apache automatically recognize PERL? Or do I have to upload PERL and let it point to it using '#!pathtoPERL'?
Can I use 'print()' to display HTML?
Thanks. | perl | apache | online | null | null | null | open | Run PERL online
===
Sorry if this is a stupid question, but i'm new to PERL, I just started the day before yesterday.
I want to run a PERL-script online, but i don't know how.
In PHP you need to start with '‹?php', so do you have to start with something like that in PERL?
And does Apache automatically recognize PERL? Or do I have to upload PERL and let it point to it using '#!pathtoPERL'?
Can I use 'print()' to display HTML?
Thanks. | 0 |
5,092,108 | 02/23/2011 14:20:35 | 554,785 | 12/27/2010 07:58:59 | 32 | 6 | Why is SQL so complicated? | I'll give a few examples.
Why couldn't this:
$query = sprintf("INSERT INTO event_data VALUES (`event_id`, '" . $event_data['account_id'] . "', '" . $event_data['title'] . "', '" . $event_data['image_path'] . "', '" . $event_data['date'] . "', '" . $event_data['time'] . "', '" . $event_data['location'] . "', '" . $event_data['status'] . "', '" . $event_data['description'] . "', '" . $event_data['discussion'] . "')");
mysql_query($query);
Simply be something like this:
mysql_insert("event_data", $event_data);
Or why couldn't this (made-up syntax simply for demonstration):
table people_list {
person_id (auto-increment)
name
age
race
...
}
table friends_lists {
friendship_id (auto-increment)
person_id1
person_id2
}
Be done like this:
table people_list {
person_id (auto-increment)
name
age
race
...
sub_table friend_list {
person_id (auto-increment)
}
}
And so forth.
Why all the unnecessary complexity? This has bothered me so much whenever I have to use SQL for my PHP projects that I've actually considered writing my own basic database engine to do it instead.
Also, is there a simplified alternative? Note that I don't care if it's flat file.
| php | mysql | sql | null | null | 02/23/2011 14:23:43 | not constructive | Why is SQL so complicated?
===
I'll give a few examples.
Why couldn't this:
$query = sprintf("INSERT INTO event_data VALUES (`event_id`, '" . $event_data['account_id'] . "', '" . $event_data['title'] . "', '" . $event_data['image_path'] . "', '" . $event_data['date'] . "', '" . $event_data['time'] . "', '" . $event_data['location'] . "', '" . $event_data['status'] . "', '" . $event_data['description'] . "', '" . $event_data['discussion'] . "')");
mysql_query($query);
Simply be something like this:
mysql_insert("event_data", $event_data);
Or why couldn't this (made-up syntax simply for demonstration):
table people_list {
person_id (auto-increment)
name
age
race
...
}
table friends_lists {
friendship_id (auto-increment)
person_id1
person_id2
}
Be done like this:
table people_list {
person_id (auto-increment)
name
age
race
...
sub_table friend_list {
person_id (auto-increment)
}
}
And so forth.
Why all the unnecessary complexity? This has bothered me so much whenever I have to use SQL for my PHP projects that I've actually considered writing my own basic database engine to do it instead.
Also, is there a simplified alternative? Note that I don't care if it's flat file.
| 4 |
3,621,373 | 09/01/2010 19:16:50 | 347,996 | 05/22/2010 20:25:26 | 26 | 1 | interview gone wrong: whiteboard folies | Back in March, I had my first interview for software engineering within the company I work as tech support. I didn't manage to get the job as I was shot off at the whiteboard coding challenge, which I found overwhelmingly scary (although my code was not 100% well, it wasn't totally bizarre - in my opinion, it only served to show I wasn't on top of my game when it comes to C). At the end, I didn't get a response to the interview, but interestingly, the QA people felt interested in me and asked me to flee over and have a second interview. I was tasked to describe some really basic python scripts in the whiteboard with graphics, and again, I didn't get it right. I must say I have no formal studies, I left school about 4 years before I could enroll into university (assuming a 100% successful rate in those 4 years) and I have a clear lack of communication skills and a bit of a nervousness problem as well as lack of self-confidence. Furthermore, English is my second language, so it all adds up. What I'm trying to find now is how to improve this "condition", what would be the best way for me to try and improve my ability to translate programs into graphics in a way that it is clear and/or represents the idea I'm trying to convey. I've done a few presentations before and I did get some of the graphics looking particularly good, but it is considerably different from doing it with a pen on a whiteboard. Is there any specific part of the university curriculum that requires a lot of these skills that may be worth for me to investigate? How do people practise describing problems in whiteboard drawings? | interview-questions | whiteboard | null | null | null | 09/03/2010 01:30:30 | off topic | interview gone wrong: whiteboard folies
===
Back in March, I had my first interview for software engineering within the company I work as tech support. I didn't manage to get the job as I was shot off at the whiteboard coding challenge, which I found overwhelmingly scary (although my code was not 100% well, it wasn't totally bizarre - in my opinion, it only served to show I wasn't on top of my game when it comes to C). At the end, I didn't get a response to the interview, but interestingly, the QA people felt interested in me and asked me to flee over and have a second interview. I was tasked to describe some really basic python scripts in the whiteboard with graphics, and again, I didn't get it right. I must say I have no formal studies, I left school about 4 years before I could enroll into university (assuming a 100% successful rate in those 4 years) and I have a clear lack of communication skills and a bit of a nervousness problem as well as lack of self-confidence. Furthermore, English is my second language, so it all adds up. What I'm trying to find now is how to improve this "condition", what would be the best way for me to try and improve my ability to translate programs into graphics in a way that it is clear and/or represents the idea I'm trying to convey. I've done a few presentations before and I did get some of the graphics looking particularly good, but it is considerably different from doing it with a pen on a whiteboard. Is there any specific part of the university curriculum that requires a lot of these skills that may be worth for me to investigate? How do people practise describing problems in whiteboard drawings? | 2 |
6,256,735 | 06/06/2011 19:02:29 | 786,400 | 06/06/2011 19:02:29 | 1 | 0 | a manual of coding practives in FOSS Linux projects | I'd like to learn coding in my spare time on my Debian box.
At first, based on what languages are said to be easy, I bought a book on Python, only to find out that most projects are written in C. But C does not suffice neither as it seems that, in order to do anything worthwhile, I need to get a grip on things like distributed version control systems; glib/GTK; some system calls I can't find in my book on C and reading patch files; and, probably, some Shell-scripting. On Amazon there are loads of books covering those topics but most seem rather outdated and among the newer pieces I cannot find a suitable _overview_ to begin with. So: Is there any book or tutorial out there introducing me hands-on to what I need to know to start contributing little snipets of code? What popular projects are written in Python?
Thanks
... | python | c | linux | null | null | 06/06/2011 19:14:28 | off topic | a manual of coding practives in FOSS Linux projects
===
I'd like to learn coding in my spare time on my Debian box.
At first, based on what languages are said to be easy, I bought a book on Python, only to find out that most projects are written in C. But C does not suffice neither as it seems that, in order to do anything worthwhile, I need to get a grip on things like distributed version control systems; glib/GTK; some system calls I can't find in my book on C and reading patch files; and, probably, some Shell-scripting. On Amazon there are loads of books covering those topics but most seem rather outdated and among the newer pieces I cannot find a suitable _overview_ to begin with. So: Is there any book or tutorial out there introducing me hands-on to what I need to know to start contributing little snipets of code? What popular projects are written in Python?
Thanks
... | 2 |
10,765,692 | 05/26/2012 11:06:13 | 1,119,087 | 12/28/2011 10:11:32 | 89 | 0 | Could not load NIB in bundle in iPhone | I am getting this error...
enter code here
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/patrontechnosoft/Library/Application Support/iPhone Simulator/5.0/Applications/EBCB993E-A707-4121-BE4C-13B34466B44D/New GMAT - Practice.app> (loaded)' with name 'IRAnswerViewController_iPad''
*** First throw call stack:
(0x1a88052 0x1c99d0a 0x1a30a78 0x1a309e9 0x584838 0x42be2c 0x42c3a9 0x42c5cb 0x447b89 0x4479bd 0x445f8a 0x445e2f 0x4478f4 0x1a89ec9 0x3695c2 0x36955a 0x58e569 0x1a89ec9 0x3695c2 0x36955a 0x40eb76 0x40f03f 0x40ebab 0x590d1f 0x1a89ec9 0x3695c2 0x36955a 0x40eb76 0x40f03f 0x40e2fe 0x38ea30 0x38ec56 0x375384 0x368aa9 0x23d1fa9 0x1a5c1c5 0x19c1022 0x19bf90a 0x19bedb4 0x19beccb 0x23d0879 0x23d093e 0x366a9b 0x1d5a 0x1ca5)
terminate called throwing an exception
| iphone | objective-c | ios5 | xib | null | null | open | Could not load NIB in bundle in iPhone
===
I am getting this error...
enter code here
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/patrontechnosoft/Library/Application Support/iPhone Simulator/5.0/Applications/EBCB993E-A707-4121-BE4C-13B34466B44D/New GMAT - Practice.app> (loaded)' with name 'IRAnswerViewController_iPad''
*** First throw call stack:
(0x1a88052 0x1c99d0a 0x1a30a78 0x1a309e9 0x584838 0x42be2c 0x42c3a9 0x42c5cb 0x447b89 0x4479bd 0x445f8a 0x445e2f 0x4478f4 0x1a89ec9 0x3695c2 0x36955a 0x58e569 0x1a89ec9 0x3695c2 0x36955a 0x40eb76 0x40f03f 0x40ebab 0x590d1f 0x1a89ec9 0x3695c2 0x36955a 0x40eb76 0x40f03f 0x40e2fe 0x38ea30 0x38ec56 0x375384 0x368aa9 0x23d1fa9 0x1a5c1c5 0x19c1022 0x19bf90a 0x19bedb4 0x19beccb 0x23d0879 0x23d093e 0x366a9b 0x1d5a 0x1ca5)
terminate called throwing an exception
| 0 |
10,243,579 | 04/20/2012 09:29:56 | 1,072,811 | 11/30/2011 07:06:06 | 18 | 0 | Use the device's internal memory | Friends, can I use the internal memory to store your application files there? In other words, when suddenly, the device will not SD card.
In particular, I need to create there a folder where I was later going to copy your files.
Thanks! | android | null | null | null | null | null | open | Use the device's internal memory
===
Friends, can I use the internal memory to store your application files there? In other words, when suddenly, the device will not SD card.
In particular, I need to create there a folder where I was later going to copy your files.
Thanks! | 0 |
232,155 | 10/24/2008 01:04:35 | 10,738 | 09/16/2008 01:25:21 | 670 | 21 | UTF8 LAMP Resources | At work, I'm beginning to have some issues with character encoding. I'd like to make our web app use UTF-8 all the way around. After a few hours of googling, I've only found a few sites with information on a UTF-8 LAMP setup. Does anyone know of any good resources online about UTF-8, Linux, Apache, MySql and PHP? I'll post what I've found in the answers. | utf-8 | lamp | online-resources | null | null | null | open | UTF8 LAMP Resources
===
At work, I'm beginning to have some issues with character encoding. I'd like to make our web app use UTF-8 all the way around. After a few hours of googling, I've only found a few sites with information on a UTF-8 LAMP setup. Does anyone know of any good resources online about UTF-8, Linux, Apache, MySql and PHP? I'll post what I've found in the answers. | 0 |
5,637,689 | 04/12/2011 15:25:57 | 694,652 | 04/06/2011 10:32:51 | 138 | 13 | OpenQuery from SQL Server to Oracle server hangs indefinitely if connection is lost | I have a scheduled job which runs on a SQL Server 2005 database. It runs a stored proc which imports data from a View. This View consists of an `OPENQUERY` to a linked Oracle server.
I have no control over the Oracle server - it is both geographically and virtually separated from the Sql Server installation. The View just has read-only access and I grab the data from it every 30 mins.
On occasion, the connection to the linked server will either drop, hang or be otherwise unresponsive. When this happens, the Job (on SQL Server) also hangs, waiting indefinitely for the connection to return. The Job never fails nor completes in this scenario and the first I know about it is when users complain about missing data.
Querying a database on the *same server* fails as expected if there's a connection problem - it's only when `OPENQUERY` is used on the linked Oracle server that it loses its 'awareness' of the connection.
Is there a way to make the job realise the connection to the Linked Server has dropped and fail accordingly? Or do I have to create a second Job to check that the first one hasn't hung? | oracle | sql-server-2005 | linked-server | null | null | null | open | OpenQuery from SQL Server to Oracle server hangs indefinitely if connection is lost
===
I have a scheduled job which runs on a SQL Server 2005 database. It runs a stored proc which imports data from a View. This View consists of an `OPENQUERY` to a linked Oracle server.
I have no control over the Oracle server - it is both geographically and virtually separated from the Sql Server installation. The View just has read-only access and I grab the data from it every 30 mins.
On occasion, the connection to the linked server will either drop, hang or be otherwise unresponsive. When this happens, the Job (on SQL Server) also hangs, waiting indefinitely for the connection to return. The Job never fails nor completes in this scenario and the first I know about it is when users complain about missing data.
Querying a database on the *same server* fails as expected if there's a connection problem - it's only when `OPENQUERY` is used on the linked Oracle server that it loses its 'awareness' of the connection.
Is there a way to make the job realise the connection to the Linked Server has dropped and fail accordingly? Or do I have to create a second Job to check that the first one hasn't hung? | 0 |
11,734,356 | 07/31/2012 06:28:35 | 1,175,510 | 01/28/2012 17:16:35 | 128 | 4 | file not found in APV PDF Viewer in android | i m trying to re construct the .so file of APV PDF Viewer in cygwin but it display error of not found
#include "fitz.h"
#include "mupdf.h"
this files r not in project. when i remove it it display so many errors
| android | jni | pdf-viewer | null | null | null | open | file not found in APV PDF Viewer in android
===
i m trying to re construct the .so file of APV PDF Viewer in cygwin but it display error of not found
#include "fitz.h"
#include "mupdf.h"
this files r not in project. when i remove it it display so many errors
| 0 |
3,512,317 | 08/18/2010 13:00:21 | 19,875 | 09/21/2008 07:46:57 | 864 | 68 | Can't see why there is a memory leak here | I have the following block giving me problems in the performance tool: Particularly it is saying STObject is leaking. I am not sure why?
for (NSDictionary *message in messages)
{
STObject *mySTObject = [[STObject alloc] init];
mySTObject.stID = [message valueForKey:@"id"];
[items addObject:mySTObject];
[mySTObject release]; mySTObject = nil;
}
[receivedData release]; receivedData=nil;
[conn release]; conn=nil;
}
| iphone | objective-c | cocoa | cocoa-touch | memory | null | open | Can't see why there is a memory leak here
===
I have the following block giving me problems in the performance tool: Particularly it is saying STObject is leaking. I am not sure why?
for (NSDictionary *message in messages)
{
STObject *mySTObject = [[STObject alloc] init];
mySTObject.stID = [message valueForKey:@"id"];
[items addObject:mySTObject];
[mySTObject release]; mySTObject = nil;
}
[receivedData release]; receivedData=nil;
[conn release]; conn=nil;
}
| 0 |
11,299,782 | 07/02/2012 19:13:53 | 1,385,833 | 05/09/2012 23:31:59 | 1 | 1 | Mysql regexp prevent character being number | Can someone help me with this bug. I need the following code to NOT match if there is another number afterwards
$query = "SELECT * FROM mytable WHERE server_name REGEXP '(server ?" . $server_id . ")' ";
For example, if $server_id is 50, it currently matches server 500, 501 etc and I dont want it too, but it should be allowed to match 'server50' 'server50 100mbit' 'server50,100mbit' etc. the character afterwards needs to be anything other than another number and can even be nothing at all.
Stu | php | mysql | null | null | null | null | open | Mysql regexp prevent character being number
===
Can someone help me with this bug. I need the following code to NOT match if there is another number afterwards
$query = "SELECT * FROM mytable WHERE server_name REGEXP '(server ?" . $server_id . ")' ";
For example, if $server_id is 50, it currently matches server 500, 501 etc and I dont want it too, but it should be allowed to match 'server50' 'server50 100mbit' 'server50,100mbit' etc. the character afterwards needs to be anything other than another number and can even be nothing at all.
Stu | 0 |
9,578,280 | 03/06/2012 05:17:58 | 1,251,368 | 03/06/2012 05:11:01 | 1 | 0 | String split using php and regEx | How to get string by trimming * at start (if present)and end (if present)of given string usig Reg Exp in php | php | regex | null | null | null | null | open | String split using php and regEx
===
How to get string by trimming * at start (if present)and end (if present)of given string usig Reg Exp in php | 0 |
7,802,967 | 10/18/2011 05:52:53 | 466,534 | 04/21/2010 12:03:08 | 2,152 | 9 | 0 in the while statement | i have one question and please help me.i have read on web page somthing about do while statement,different is that ,in while there is written 0,not boolean condition
do{
do some instruction
}while(condition )
is clearly understandable,but this one
do
{
//again some instruction
}while(0)
i can't guess what does it do?is it equivalence it to this: do something while(false)?or maybe is it infinity loop?please help me | c++ | null | null | null | null | null | open | 0 in the while statement
===
i have one question and please help me.i have read on web page somthing about do while statement,different is that ,in while there is written 0,not boolean condition
do{
do some instruction
}while(condition )
is clearly understandable,but this one
do
{
//again some instruction
}while(0)
i can't guess what does it do?is it equivalence it to this: do something while(false)?or maybe is it infinity loop?please help me | 0 |
9,952,353 | 03/31/2012 01:55:39 | 923,657 | 09/01/2011 14:40:04 | 437 | 2 | delphi - how to pass a parameter from the instantiator to a constructor in the spring4d dependency injection framework? | It's possible to register a class with a parameter expected to be passed from the point of creation?
I know it can be done something like this:
GlobalContainer.RegisterType<TUserProcessor>.Implements<IUserUpgrader>.
AsTransient.DelegateTo(
function: TUserProcessor
begin
Result := TUserProcessor.Create(GetCurrentUser);
end
);
But there the parameters are binded to the execution context where the container gets registered and not where the object get's intantiated.
Something like this it's possible for example?
GlobalContainer.Resolve<IMathService>([FCurrentUser]);
I know some peoble advocate to have very simple constructors, but there are times when a constructor parameter looks clearly the way to go:
1. The object constructed needs the object parameter to work, so the reference must be satisfied. The parameter also makes that constraint much more obvious looking at the class.
2. You can assign the reference in a method or property and raise and exception in every other method if you try to use the object without first making the assignment.. I don't like writing this type of code it's simply a waste of time, just use the constructor parameter and check there. Less code, the better IMO.
3. Also the object being passed it's local to the object that constructs the new object using the container (for example a Transaction object) and has some state (it's not a new object that I can get with the container).
| delphi | dependency-injection | delphi-xe2 | null | null | null | open | delphi - how to pass a parameter from the instantiator to a constructor in the spring4d dependency injection framework?
===
It's possible to register a class with a parameter expected to be passed from the point of creation?
I know it can be done something like this:
GlobalContainer.RegisterType<TUserProcessor>.Implements<IUserUpgrader>.
AsTransient.DelegateTo(
function: TUserProcessor
begin
Result := TUserProcessor.Create(GetCurrentUser);
end
);
But there the parameters are binded to the execution context where the container gets registered and not where the object get's intantiated.
Something like this it's possible for example?
GlobalContainer.Resolve<IMathService>([FCurrentUser]);
I know some peoble advocate to have very simple constructors, but there are times when a constructor parameter looks clearly the way to go:
1. The object constructed needs the object parameter to work, so the reference must be satisfied. The parameter also makes that constraint much more obvious looking at the class.
2. You can assign the reference in a method or property and raise and exception in every other method if you try to use the object without first making the assignment.. I don't like writing this type of code it's simply a waste of time, just use the constructor parameter and check there. Less code, the better IMO.
3. Also the object being passed it's local to the object that constructs the new object using the container (for example a Transaction object) and has some state (it's not a new object that I can get with the container).
| 0 |
3,312,310 | 07/22/2010 18:52:22 | 391,715 | 07/14/2010 14:57:18 | 1 | 0 | Replacing a file into mutiple folders/subdirectories | Is there a way in command prompt to take one file and copy it into another folder and it's subdirectories based on it's name?
I have an image named 5.jpg that has been put in a sub-folder that is in every folder in a directory.
I want to do a search inside of the folder (with the old image) and its sub-folders and replace all of the results with the new image. | file | replace | copy | cmd | subdirectories | null | open | Replacing a file into mutiple folders/subdirectories
===
Is there a way in command prompt to take one file and copy it into another folder and it's subdirectories based on it's name?
I have an image named 5.jpg that has been put in a sub-folder that is in every folder in a directory.
I want to do a search inside of the folder (with the old image) and its sub-folders and replace all of the results with the new image. | 0 |
8,947,515 | 01/20/2012 20:31:48 | 1,127,398 | 01/03/2012 07:47:48 | 3 | 1 | Scalability issues for PHP comet chat system | I am planning about a chat system for my website. I am thinking about doing ajax pushing. The client will initiate a connection to the server by calling chat.php.
chat.php will do an infinite loop(30 sec). On getting a new message it will return the print the message to the client and exits the connection. The ajax script on getting a responseText calls chat.php once again.
My question is the scalability of such a system(php driven COMET) for 500 concurrent chat processes on a shared hosting package. | php | mysql | ajax | comet | shared-hosting | 01/22/2012 01:04:34 | not a real question | Scalability issues for PHP comet chat system
===
I am planning about a chat system for my website. I am thinking about doing ajax pushing. The client will initiate a connection to the server by calling chat.php.
chat.php will do an infinite loop(30 sec). On getting a new message it will return the print the message to the client and exits the connection. The ajax script on getting a responseText calls chat.php once again.
My question is the scalability of such a system(php driven COMET) for 500 concurrent chat processes on a shared hosting package. | 1 |
2,102,537 | 01/20/2010 15:32:55 | 101,442 | 05/05/2009 09:55:40 | 52 | 0 | Execute cronjobs in lock step | I have two cronjobs, each using a "*/5 * * * *" schedule.
What I really want is to execute them every ten minutes, but the second one 5 minutes later than the first one.
Is there an elegant way to do this? | cron | null | null | null | null | null | open | Execute cronjobs in lock step
===
I have two cronjobs, each using a "*/5 * * * *" schedule.
What I really want is to execute them every ten minutes, but the second one 5 minutes later than the first one.
Is there an elegant way to do this? | 0 |
8,972,450 | 01/23/2012 13:34:23 | 1,095,783 | 12/13/2011 12:51:28 | 11 | 2 | iOS and Website Facebook Access Token | I have created a Website and an accompanying native, iOS application.
Part of the spec is to register and login using Facebook.
* I register via the Website using Facebook to create my account.
* Using the same account, I login in using Facebook on the iOS application.
* However, the login process fails because the access_token returned is different to the access token generated when registering the account on the website.
As I have requested "offline_access" both access token's should be the same.
I have test both access token's using the graph API and they are valid.
The only difference in both processes is that the website generates an access_token using the code attribute. | ios | facebook | website | oauth | access-token | 02/07/2012 13:25:17 | not a real question | iOS and Website Facebook Access Token
===
I have created a Website and an accompanying native, iOS application.
Part of the spec is to register and login using Facebook.
* I register via the Website using Facebook to create my account.
* Using the same account, I login in using Facebook on the iOS application.
* However, the login process fails because the access_token returned is different to the access token generated when registering the account on the website.
As I have requested "offline_access" both access token's should be the same.
I have test both access token's using the graph API and they are valid.
The only difference in both processes is that the website generates an access_token using the code attribute. | 1 |
9,806,742 | 03/21/2012 14:34:58 | 195,711 | 10/24/2009 01:30:24 | 1,563 | 130 | jQuery - how to alter Datepicker settings after it has been initialized | I would like to bind to initialized datepicker "onSelect" function.
I've been trying hard to find a solution on the web, but was unsuccessful.
Anyone can tell me how to do it? | jquery | jquery-ui | datepicker | null | null | null | open | jQuery - how to alter Datepicker settings after it has been initialized
===
I would like to bind to initialized datepicker "onSelect" function.
I've been trying hard to find a solution on the web, but was unsuccessful.
Anyone can tell me how to do it? | 0 |
9,216,424 | 02/09/2012 18:15:58 | 133,405 | 07/05/2009 17:43:52 | 752 | 37 | Mongo db / C# - How to do bounding box queries? | Per title - I am using the official mongodb driver and I am looking to get all POIs within the given bounding box.
So far I have:
MongoCollection<BsonDocument> collection = _MongoDatabase.GetCollection("pois");
BsonArray lowerLeftDoc = new BsonArray(new[] { lowerLeft.Lon, lowerLeft.Lat});
BsonArray upperRightDoc = new BsonArray(new[] { upperRight.Lon, upperRight.Lat});
BsonDocument locDoc = new BsonDocument {
{ "$within", new BsonArray(new[] { lowerLeftDoc, upperRightDoc})}
};
BsonDocument queryDoc = new BsonDocument {
{ "loc", locDoc }
};
IList<TrafficUpdate> updates = new List<TrafficUpdate>();
foreach (BsonDocument t in collection.Find(new QueryDocument(queryDoc)).SetLimit(limit))
{
}
Unfortunatelly this doesnt work. I get:
> QueryFailure flag was unknown $within type: 0 (response was { "$err" :
> "unknown $within type: 0", "code" : 13058 }).
| c# | mongodb | mongodb-csharp | null | null | null | open | Mongo db / C# - How to do bounding box queries?
===
Per title - I am using the official mongodb driver and I am looking to get all POIs within the given bounding box.
So far I have:
MongoCollection<BsonDocument> collection = _MongoDatabase.GetCollection("pois");
BsonArray lowerLeftDoc = new BsonArray(new[] { lowerLeft.Lon, lowerLeft.Lat});
BsonArray upperRightDoc = new BsonArray(new[] { upperRight.Lon, upperRight.Lat});
BsonDocument locDoc = new BsonDocument {
{ "$within", new BsonArray(new[] { lowerLeftDoc, upperRightDoc})}
};
BsonDocument queryDoc = new BsonDocument {
{ "loc", locDoc }
};
IList<TrafficUpdate> updates = new List<TrafficUpdate>();
foreach (BsonDocument t in collection.Find(new QueryDocument(queryDoc)).SetLimit(limit))
{
}
Unfortunatelly this doesnt work. I get:
> QueryFailure flag was unknown $within type: 0 (response was { "$err" :
> "unknown $within type: 0", "code" : 13058 }).
| 0 |
6,310,070 | 06/10/2011 17:37:08 | 733,587 | 05/01/2011 19:30:44 | 5 | 0 | Can someone help me solve this exercise on programming with c language on dev c++? | There is a string consisting of words separated by at least one blank. Write a function to convert the first letter of each word into capital and all other letters of the word small and if any letter is in capital turn it into small. Make use of functions toupper and tolower. The program should make use of functions defined by the programmer (at least one) that has the parameter string or pointer to string. At the end print the following string.
I need help on writing the function.
I would really appreciate it! | c++ | homework | programming-languages | null | null | 06/10/2011 17:51:49 | not a real question | Can someone help me solve this exercise on programming with c language on dev c++?
===
There is a string consisting of words separated by at least one blank. Write a function to convert the first letter of each word into capital and all other letters of the word small and if any letter is in capital turn it into small. Make use of functions toupper and tolower. The program should make use of functions defined by the programmer (at least one) that has the parameter string or pointer to string. At the end print the following string.
I need help on writing the function.
I would really appreciate it! | 1 |
10,822,212 | 05/30/2012 18:36:17 | 1,113,251 | 12/23/2011 10:36:38 | 100 | 2 | Different Rules to Handle duplicate values in Table | Duplicates in Table 1 are indentifies as follows ;
select quote_ref, count (*)
from table 1
group by quote_ref
having count(*) > 1
Now I want the eliminate the duplicates based on the 2 rules below .
Take the entry that has the Status= Complete
If none in complete status then take the one with max ( [created_date ])
Else Flag to look at ?
Suppose I need a CASE statement with a delete, but not sure how to construct ? | sql | sql-server | null | null | null | null | open | Different Rules to Handle duplicate values in Table
===
Duplicates in Table 1 are indentifies as follows ;
select quote_ref, count (*)
from table 1
group by quote_ref
having count(*) > 1
Now I want the eliminate the duplicates based on the 2 rules below .
Take the entry that has the Status= Complete
If none in complete status then take the one with max ( [created_date ])
Else Flag to look at ?
Suppose I need a CASE statement with a delete, but not sure how to construct ? | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.