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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9,521,079 | 03/01/2012 17:34:27 | 811,083 | 06/22/2011 20:02:36 | 35 | 0 | ASP.NET 4.0 vs ASP.NET MVC | just a general question, I am developing an ASP.NET CMS, I was wondering is it worthed to convert it to ASP.NET MVC because currently it is ASP.NET 4, is MVC better or doesn't matter much and there aren't big differences and what will my advantages will be if I convert it?
Thanks. | asp.net | asp.net-mvc | null | null | null | 03/02/2012 03:41:13 | not constructive | ASP.NET 4.0 vs ASP.NET MVC
===
just a general question, I am developing an ASP.NET CMS, I was wondering is it worthed to convert it to ASP.NET MVC because currently it is ASP.NET 4, is MVC better or doesn't matter much and there aren't big differences and what will my advantages will be if I convert it?
Thanks. | 4 |
10,298,654 | 04/24/2012 13:18:07 | 74,238 | 03/05/2009 13:42:07 | 471 | 2 | Get result from dynamic SQL in stored procedure | I'm writing a stored procedure where I need to dynamically construct a SQL statement within the procedure to reference a passed in table name.
I need to have this SQL statement return a result that I can then use throughout the rest of the procedure.
I've tried using temp tables and everything but I keep getting a message that I need to declare the variable, etc.
For example:
DECLARE @FiscalYear INT
DECLARE @DataSource NVARCHAR(25)
DECLARE @SQL NVARCHAR(250)
SELECT @DataSource = 'CustomerCosts20120328'
DECLARE @tempFiscalYear TABLE ( FiscalYear INT )
SELECT @SQL = 'INSERT INTO @tempFiscalYear SELECT DISTINCT FiscalYear FROM ' + @DataSource
EXEC(@SQL)
SELECT @FiscalYear = FiscalYear FROM @tempFiscalYear
Or...
DECLARE @FiscalYear INT
DECLARE @DataSource NVARCHAR(25)
DECLARE @SQL NVARCHAR(250)
SELECT @DataSource = 'CustomerCosts20120328'
SELECT @SQL = 'SELECT DISTINCT @FiscalYear = FiscalYear FROM ' + @DataSource
EXEC(@SQL)
Is there anyway to do this without resorting to using an actual table?
Thanks. | sql | sql-server-2008 | tsql | stored-procedures | null | null | open | Get result from dynamic SQL in stored procedure
===
I'm writing a stored procedure where I need to dynamically construct a SQL statement within the procedure to reference a passed in table name.
I need to have this SQL statement return a result that I can then use throughout the rest of the procedure.
I've tried using temp tables and everything but I keep getting a message that I need to declare the variable, etc.
For example:
DECLARE @FiscalYear INT
DECLARE @DataSource NVARCHAR(25)
DECLARE @SQL NVARCHAR(250)
SELECT @DataSource = 'CustomerCosts20120328'
DECLARE @tempFiscalYear TABLE ( FiscalYear INT )
SELECT @SQL = 'INSERT INTO @tempFiscalYear SELECT DISTINCT FiscalYear FROM ' + @DataSource
EXEC(@SQL)
SELECT @FiscalYear = FiscalYear FROM @tempFiscalYear
Or...
DECLARE @FiscalYear INT
DECLARE @DataSource NVARCHAR(25)
DECLARE @SQL NVARCHAR(250)
SELECT @DataSource = 'CustomerCosts20120328'
SELECT @SQL = 'SELECT DISTINCT @FiscalYear = FiscalYear FROM ' + @DataSource
EXEC(@SQL)
Is there anyway to do this without resorting to using an actual table?
Thanks. | 0 |
9,546,689 | 03/03/2012 14:01:29 | 253,656 | 01/19/2010 02:06:34 | 1,335 | 3 | range of primitive datatypes in C? | I am learning C language and got the following range of primitive data types:
![enter image description here][1]
[1]: http://i.stack.imgur.com/av0xh.png
I dont know where the values in the **Range** column come from? | c | primitive-types | null | null | null | 03/05/2012 04:44:19 | not a real question | range of primitive datatypes in C?
===
I am learning C language and got the following range of primitive data types:
![enter image description here][1]
[1]: http://i.stack.imgur.com/av0xh.png
I dont know where the values in the **Range** column come from? | 1 |
8,108,509 | 11/13/2011 00:00:40 | 706,479 | 04/13/2011 16:40:01 | 1 | 1 | C++ enviroment recommendation? | Hello everybody i´m a completly newbie and i like to know wich enviroment can you recommend me for programming in C++, i mean Operating System (if Linux, Ubuntu is a right option?), IDE, etc. maybe i have to create a virtual machine? | c++ | ide | recomendations | null | null | 11/13/2011 00:09:21 | off topic | C++ enviroment recommendation?
===
Hello everybody i´m a completly newbie and i like to know wich enviroment can you recommend me for programming in C++, i mean Operating System (if Linux, Ubuntu is a right option?), IDE, etc. maybe i have to create a virtual machine? | 2 |
8,112,114 | 11/13/2011 14:10:35 | 947,950 | 09/16/2011 00:34:28 | 11 | 0 | Multi-Thread a Style DataTrigger IValueConverter in WPF | I am conditionally formatting a listview by setting the Style DataTrigger and binding it to an IValueConverter (CheckForShade) which returns if the styling should be applied.
<Style.Triggers>
<DataTrigger Binding="{Binding Converter={StaticResource CheckForShade}}" Value="false" >
<Setter Property="Background" Value="Red" />
</DataTrigger>
</Style.Triggers>
The problem is that the logic contained in the IValueConverter is pretty intensive and I would like someway to to multi-thread it so that each row in the Listview can be evaluated for formatting at the same time and in a thread other than the UI thread.
Also it currently slows the application from opening while it checks all the rows of the Listview and applies formatting, I would like to delay the formatting check until the UI has loaded and then multi-thread each row. | c# | wpf | multithreading | datatrigger | ivalueconverter | null | open | Multi-Thread a Style DataTrigger IValueConverter in WPF
===
I am conditionally formatting a listview by setting the Style DataTrigger and binding it to an IValueConverter (CheckForShade) which returns if the styling should be applied.
<Style.Triggers>
<DataTrigger Binding="{Binding Converter={StaticResource CheckForShade}}" Value="false" >
<Setter Property="Background" Value="Red" />
</DataTrigger>
</Style.Triggers>
The problem is that the logic contained in the IValueConverter is pretty intensive and I would like someway to to multi-thread it so that each row in the Listview can be evaluated for formatting at the same time and in a thread other than the UI thread.
Also it currently slows the application from opening while it checks all the rows of the Listview and applies formatting, I would like to delay the formatting check until the UI has loaded and then multi-thread each row. | 0 |
8,184,873 | 11/18/2011 15:36:30 | 731,278 | 04/29/2011 14:50:13 | 375 | 0 | SMS Quality of Service | I want to integrate SMS into my app as a way for someone to contact my server from a phone in essentially real time. It would be significantly less useful if I cannot guarantee that I will receive the SMS from the user within some short period of time.
I know that SMS is not guaranteed to be received within any short time frame (or even at all), but from my personal experiences it seems like it is almost always the case that messages are received within a short delay of being sent.
Does anybody know more about the average delays and average number of messages that simply get dropped for SMS? | sms | null | null | null | null | 11/23/2011 23:52:25 | off topic | SMS Quality of Service
===
I want to integrate SMS into my app as a way for someone to contact my server from a phone in essentially real time. It would be significantly less useful if I cannot guarantee that I will receive the SMS from the user within some short period of time.
I know that SMS is not guaranteed to be received within any short time frame (or even at all), but from my personal experiences it seems like it is almost always the case that messages are received within a short delay of being sent.
Does anybody know more about the average delays and average number of messages that simply get dropped for SMS? | 2 |
8,496,911 | 12/13/2011 22:08:34 | 1,077,437 | 12/02/2011 13:07:23 | 63 | 0 | Adding image to contentpane in window application | How can i add, set visible and bounts, my "images/name.jpg" into my ContentPane window container?
public class WindowName extends JFrame
{
public WindowName()
{
JFrame Window = new JFrame();
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setTitle("...");
setSize(700, 600);
setVisible(true);
Container powZawartosci = getContentPane();
powZawartosci.setLayout(null);
}
} | java | image | null | null | null | null | open | Adding image to contentpane in window application
===
How can i add, set visible and bounts, my "images/name.jpg" into my ContentPane window container?
public class WindowName extends JFrame
{
public WindowName()
{
JFrame Window = new JFrame();
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setTitle("...");
setSize(700, 600);
setVisible(true);
Container powZawartosci = getContentPane();
powZawartosci.setLayout(null);
}
} | 0 |
10,471,331 | 05/06/2012 14:35:00 | 963,038 | 09/24/2011 21:24:37 | 3 | 0 | Is it possible to make a bluetooth calling application in android? | Someone please help me. I saw a bluetooth chat application. So i wonder is it possible to make a bluetooth calling application. | android | null | null | null | null | 05/06/2012 17:44:28 | not a real question | Is it possible to make a bluetooth calling application in android?
===
Someone please help me. I saw a bluetooth chat application. So i wonder is it possible to make a bluetooth calling application. | 1 |
9,028,349 | 01/27/2012 02:39:44 | 528,813 | 12/03/2010 02:02:40 | 266 | 5 | MySQL listings schema | Say I have a property `listings` table and a `listings_categories` table which determines if the listing is for *sale*, *rent* and/or *season rent*. Depending which categories a listing has (min of 1 required), a price value or timespan (in case of season rent) may be required.
How should I deal with these price fields? Should they be placed in the `listings`, or move them to the `listings_categories` table? These price fields are somewhat essential to the app and will always be displayed -- would I have any problems appending them to the rest of the main listing table?
| mysql | join | schema | null | null | null | open | MySQL listings schema
===
Say I have a property `listings` table and a `listings_categories` table which determines if the listing is for *sale*, *rent* and/or *season rent*. Depending which categories a listing has (min of 1 required), a price value or timespan (in case of season rent) may be required.
How should I deal with these price fields? Should they be placed in the `listings`, or move them to the `listings_categories` table? These price fields are somewhat essential to the app and will always be displayed -- would I have any problems appending them to the rest of the main listing table?
| 0 |
7,611,840 | 09/30/2011 14:28:33 | 699,978 | 04/09/2011 13:31:54 | 1,395 | 41 | Error when trying to install RVM on Linux Mint: No command RVM found | I'm following this tutorial:
http://www.christopherirish.com/2010/08/25/how-to-install-rvm-on-ubuntu-10-04/
When I get to the part where he tells us to modify the .bashrc file, I get stuck. For one thing, the .bashrc file is nowhere to be found.
![enter image description here][1]
Second, I tried manually creating the file myself and put this as it's contents:
if [[ -n "$PS1" ]]; then
if [[ -s $HOME/.rvm/scripts/rvm ]] ; then source $HOME/.rvm/scripts/rvm ; fi
fi
But when I try running the command `rvm notes` I get the following error:
> No command 'rvm' found, but there are 20 similar ones rvm: command not
> found
What can I do to use RVM properly?
[1]: http://i.stack.imgur.com/Jww8J.png | ruby | bash | rvm | linuxmint | null | 10/01/2011 00:13:16 | off topic | Error when trying to install RVM on Linux Mint: No command RVM found
===
I'm following this tutorial:
http://www.christopherirish.com/2010/08/25/how-to-install-rvm-on-ubuntu-10-04/
When I get to the part where he tells us to modify the .bashrc file, I get stuck. For one thing, the .bashrc file is nowhere to be found.
![enter image description here][1]
Second, I tried manually creating the file myself and put this as it's contents:
if [[ -n "$PS1" ]]; then
if [[ -s $HOME/.rvm/scripts/rvm ]] ; then source $HOME/.rvm/scripts/rvm ; fi
fi
But when I try running the command `rvm notes` I get the following error:
> No command 'rvm' found, but there are 20 similar ones rvm: command not
> found
What can I do to use RVM properly?
[1]: http://i.stack.imgur.com/Jww8J.png | 2 |
4,447,377 | 12/15/2010 06:42:05 | 281,839 | 02/26/2010 06:30:28 | 237 | 7 | Asp.net super fast data search for autocomplete , plz guide me | Thanks for your time and attention.
I have ajaxtookit Autocomplete and requriment is to make it super fast. Currently data is in database and on every request it is fetched and come from database. This data are contacts and addresses and often new records will be added in the tables. There are 3 solutions that come to mind. Please guide me what you suggest and what you feel is best.
1. Let the data in database, just do indexing and if possible do some connection polling so that connection establishing time can be saved.
2. Cache data in application server. Use Linq to query.
3. Do search on sorted data in some file.
Please guide and help me.
Thanks | c# | asp.net | search | autocomplete | ajaxtoolkit | null | open | Asp.net super fast data search for autocomplete , plz guide me
===
Thanks for your time and attention.
I have ajaxtookit Autocomplete and requriment is to make it super fast. Currently data is in database and on every request it is fetched and come from database. This data are contacts and addresses and often new records will be added in the tables. There are 3 solutions that come to mind. Please guide me what you suggest and what you feel is best.
1. Let the data in database, just do indexing and if possible do some connection polling so that connection establishing time can be saved.
2. Cache data in application server. Use Linq to query.
3. Do search on sorted data in some file.
Please guide and help me.
Thanks | 0 |
10,094,333 | 04/10/2012 18:27:10 | 1,324,780 | 04/10/2012 18:15:19 | 1 | 0 | JQuery onclick nav hide and show | I was wandering how to code a onclick event for a jquery nav
when you click go
<a href="#go">Go</a>
it should look for the id in the href and .show() and .hide() the other items of the same class like class hide. Anyone show me the code?
| jquery | hide | show | null | null | 04/11/2012 20:07:46 | not a real question | JQuery onclick nav hide and show
===
I was wandering how to code a onclick event for a jquery nav
when you click go
<a href="#go">Go</a>
it should look for the id in the href and .show() and .hide() the other items of the same class like class hide. Anyone show me the code?
| 1 |
10,446,701 | 05/04/2012 10:02:34 | 1,374,645 | 05/04/2012 09:52:38 | 1 | 0 | Highlight the selected node in dojo treeview | I am using dojo treestructure .on clicking the nodes, each one is redirected to respective url's. This is done on page reload. So, i am not able to highlight the selected node. Also the tree expansion is not proper.Kindly provide me a simple answer and help me solve the problem.
Thanks in Advance,
Jasmine | python | django | dojo | null | null | 05/06/2012 06:14:29 | not a real question | Highlight the selected node in dojo treeview
===
I am using dojo treestructure .on clicking the nodes, each one is redirected to respective url's. This is done on page reload. So, i am not able to highlight the selected node. Also the tree expansion is not proper.Kindly provide me a simple answer and help me solve the problem.
Thanks in Advance,
Jasmine | 1 |
977,998 | 06/10/2009 20:34:04 | 79,755 | 03/18/2009 22:35:45 | 237 | 12 | Performing expression evaluation/reduction in Visual Studio 2008 | Is it possible to get Visual Studio to do mathematical expression evaluation/reduction?
For example if I type '-0.005 + -0.345' how do I get Visual Studio to reduce that (i.e. replace it with the reduction)? Do I have to write a macro? If so, are there any pre-existing macros to do this type of expression reduction? | visual-studio | expression | evaluation | reduction | null | null | open | Performing expression evaluation/reduction in Visual Studio 2008
===
Is it possible to get Visual Studio to do mathematical expression evaluation/reduction?
For example if I type '-0.005 + -0.345' how do I get Visual Studio to reduce that (i.e. replace it with the reduction)? Do I have to write a macro? If so, are there any pre-existing macros to do this type of expression reduction? | 0 |
11,531,734 | 07/17/2012 22:28:10 | 1,508,085 | 07/07/2012 01:14:52 | 10 | 0 | Can anyone tell me why eclipse doesn't like this java array initialisation ? | I am new to using eclipse and I am totally puzzled as to why it doesn't like the first line of my for loop
public Practice(int n) {
this.n=n;
for(int i=0; i<n; i++){
(int j=0; j<n; j++) {
this.decay=new double[i][j];
}
}
} | java | eclipse | null | null | null | 07/18/2012 02:47:44 | too localized | Can anyone tell me why eclipse doesn't like this java array initialisation ?
===
I am new to using eclipse and I am totally puzzled as to why it doesn't like the first line of my for loop
public Practice(int n) {
this.n=n;
for(int i=0; i<n; i++){
(int j=0; j<n; j++) {
this.decay=new double[i][j];
}
}
} | 3 |
2,237,202 | 02/10/2010 13:48:01 | 169,277 | 09/06/2009 14:30:11 | 800 | 41 | How can I see jboss console with maven | I started jboss-5.1.0.GA server with maven2, is there a possibility that I can see what is happening in the console. I'm using eclipse plugin to run maven. Is it possible to see console in eclipse or elsewhere?
Thank you | java | eclipse | maven-2 | jboss | null | null | open | How can I see jboss console with maven
===
I started jboss-5.1.0.GA server with maven2, is there a possibility that I can see what is happening in the console. I'm using eclipse plugin to run maven. Is it possible to see console in eclipse or elsewhere?
Thank you | 0 |
11,574,648 | 07/20/2012 07:17:50 | 1,517,934 | 07/11/2012 13:35:35 | 3 | 0 | how to create web services in android and what tool it want? | I want to create web services, and i don't know how to create it and what tool need to create it,so please anyone suggest me some tutorial for guidance. thank in advance. | java | android | web-services | null | null | 07/21/2012 14:11:00 | not a real question | how to create web services in android and what tool it want?
===
I want to create web services, and i don't know how to create it and what tool need to create it,so please anyone suggest me some tutorial for guidance. thank in advance. | 1 |
9,325,078 | 02/17/2012 08:30:55 | 1,215,650 | 02/17/2012 07:21:35 | 1 | 0 | POSIX thread scheduling policies | what is the difference between PTHREAD_INHERIT_SCHED and PTHREAD_EXPLICIT SCHED? By default which sched will be there and how to set it.? | posix | null | null | null | null | null | open | POSIX thread scheduling policies
===
what is the difference between PTHREAD_INHERIT_SCHED and PTHREAD_EXPLICIT SCHED? By default which sched will be there and how to set it.? | 0 |
3,019,073 | 06/10/2010 22:43:55 | 364,028 | 06/10/2010 22:14:40 | 1 | 0 | How to select first entry of the day grouped by user in SQL | I've looked around and can't quite grasp the whole answer to this SQL query question needed to extract data from an MS Access 2000 table.
Here's an example of what the table [Time Sub] looks like:
**CLIENT_ID, DATE_ENTERED, CODE, MINUTES**
11111, 5/12/2008 3:50:52 PM, M, 38
11111, 5/12/2008 2:55:50 PM, M, 2
11714, 5/13/2008 1:15:32 PM, M, 28
11111, 5/13/2008 6:15:12 PM, W, 11
11112, 5/12/2008 2:50:52 PM, M, 89
11112, 5/12/2008 5:10:52 PM, M, 9
91112, 5/14/2008 1:10:52 PM, L, 96
11112, 5/12/2008 5:11:52 PM, M, 12
I need to select the first entry of each day per client that's NOT code L or W.
I know this can be done in a SQL statement, but I just can't figure out how. I can get close, but never come up with the right output.
Any help is appreciated.
Thanks,
Mike
| sql | ms-access | select | statement | null | null | open | How to select first entry of the day grouped by user in SQL
===
I've looked around and can't quite grasp the whole answer to this SQL query question needed to extract data from an MS Access 2000 table.
Here's an example of what the table [Time Sub] looks like:
**CLIENT_ID, DATE_ENTERED, CODE, MINUTES**
11111, 5/12/2008 3:50:52 PM, M, 38
11111, 5/12/2008 2:55:50 PM, M, 2
11714, 5/13/2008 1:15:32 PM, M, 28
11111, 5/13/2008 6:15:12 PM, W, 11
11112, 5/12/2008 2:50:52 PM, M, 89
11112, 5/12/2008 5:10:52 PM, M, 9
91112, 5/14/2008 1:10:52 PM, L, 96
11112, 5/12/2008 5:11:52 PM, M, 12
I need to select the first entry of each day per client that's NOT code L or W.
I know this can be done in a SQL statement, but I just can't figure out how. I can get close, but never come up with the right output.
Any help is appreciated.
Thanks,
Mike
| 0 |
11,474,111 | 07/13/2012 16:02:03 | 1,524,040 | 07/13/2012 15:56:47 | 1 | 0 | MySQL: AVG of defined variable per month | I'm a complete SQL Newbie and need help with the following code:
SELECT DISTINCT userid, count( userid ) as login_count
FROM (SELECT DISTINCT userid, date( FROM_UNIXTIME( date_time ) ) AS DAY
FROM xcart_login_history
WHERE status="success" and (action ="login" or action = "autologin")
ORDER BY userid, DAY) as login_days
WHERE login_days.DAY
<
(SELECT DISTINCT min(date(FROM_UNIXTIME(xcart_orders.date)))
FROM xcart_orders
WHERE xcart_orders.userid = login_days.userid
GROUP BY userid )
GROUP BY userid
What it does: it shows me the logins of individual users before purchasing (on purpose not more than one per day counted). I now need the average login number / login count before purchase on a monthly basis.
Could please somebody help me? Thank! | mysql | avg | null | null | null | 07/16/2012 02:13:16 | off topic | MySQL: AVG of defined variable per month
===
I'm a complete SQL Newbie and need help with the following code:
SELECT DISTINCT userid, count( userid ) as login_count
FROM (SELECT DISTINCT userid, date( FROM_UNIXTIME( date_time ) ) AS DAY
FROM xcart_login_history
WHERE status="success" and (action ="login" or action = "autologin")
ORDER BY userid, DAY) as login_days
WHERE login_days.DAY
<
(SELECT DISTINCT min(date(FROM_UNIXTIME(xcart_orders.date)))
FROM xcart_orders
WHERE xcart_orders.userid = login_days.userid
GROUP BY userid )
GROUP BY userid
What it does: it shows me the logins of individual users before purchasing (on purpose not more than one per day counted). I now need the average login number / login count before purchase on a monthly basis.
Could please somebody help me? Thank! | 2 |
5,449,956 | 03/27/2011 14:45:53 | 675,926 | 03/24/2011 23:51:46 | 52 | 0 | How to add a delay for a 2,3 seconds | How can I add a delay to a program in C# as I wrote in the subject?
thanks | c# | delay | null | null | null | 03/27/2011 14:51:13 | not a real question | How to add a delay for a 2,3 seconds
===
How can I add a delay to a program in C# as I wrote in the subject?
thanks | 1 |
674,278 | 03/23/2009 17:07:29 | 78,569 | 03/16/2009 12:43:35 | 8 | 0 | Eclipse RCP - Content Assist trouble | I'm trying to add content assist to my editor. I've added
public IContentAssistant getContentAssistant(ISourceViewer sv) {
ContentAssistant ca = new ContentAssistant();
IContentAssistProcessor pr = new TagCompletionProcessor();
ca.setContentAssistProcessor(pr, XMLPartitionScanner.XML_TAG);
ca.setContentAssistProcessor(pr, IDocument.DEFAULT_CONTENT_TYPE);
return ca;
}
to editor configuration, then made completion processor class:
public class TagCompletionProcessor implements IContentAssistProcessor {
private ITypedRegion wordRegion;
private String currentWord;
private SmartTreeSet tags;
public TagCompletionProcessor() {
tags = new SmartTreeSet();
//filling tags skipped
}
@Override
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer,
int offset) {
System.out.println("compute");
wordRegion = viewer.getDocument().getDocumentPartitioner().getPartition(offset);
try {
int offs = wordRegion.getOffset();
int len = wordRegion.getLength();
currentWord = viewer.getDocument().get(offs, len);
return tags.getProposals(currentWord.toLowerCase(), offs, len);
} catch (BadLocationException e) {
return null;
}
}
@Override
public IContextInformation[] computeContextInformation(ITextViewer viewer,
int offset) {
return null;
}
@Override
public char[] getCompletionProposalAutoActivationCharacters() {
return new char[] {'<'};
}
@Override
public char[] getContextInformationAutoActivationCharacters() {
return null;
}
@Override
public IContextInformationValidator getContextInformationValidator() {
return null;
}
@Override
public String getErrorMessage() {
return "No tags found";
}
}
... but it's not working. Init goes normal, but auto-activation does not working and when I'm pressing ctrl-space (I've added org.eclipse.ui.edit.text.contentAssist.proposals command to Bindings ext point) empty list appearing. What am I doing wrong? | eclipse-rcp | null | null | null | null | 10/20/2011 19:22:46 | too localized | Eclipse RCP - Content Assist trouble
===
I'm trying to add content assist to my editor. I've added
public IContentAssistant getContentAssistant(ISourceViewer sv) {
ContentAssistant ca = new ContentAssistant();
IContentAssistProcessor pr = new TagCompletionProcessor();
ca.setContentAssistProcessor(pr, XMLPartitionScanner.XML_TAG);
ca.setContentAssistProcessor(pr, IDocument.DEFAULT_CONTENT_TYPE);
return ca;
}
to editor configuration, then made completion processor class:
public class TagCompletionProcessor implements IContentAssistProcessor {
private ITypedRegion wordRegion;
private String currentWord;
private SmartTreeSet tags;
public TagCompletionProcessor() {
tags = new SmartTreeSet();
//filling tags skipped
}
@Override
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer,
int offset) {
System.out.println("compute");
wordRegion = viewer.getDocument().getDocumentPartitioner().getPartition(offset);
try {
int offs = wordRegion.getOffset();
int len = wordRegion.getLength();
currentWord = viewer.getDocument().get(offs, len);
return tags.getProposals(currentWord.toLowerCase(), offs, len);
} catch (BadLocationException e) {
return null;
}
}
@Override
public IContextInformation[] computeContextInformation(ITextViewer viewer,
int offset) {
return null;
}
@Override
public char[] getCompletionProposalAutoActivationCharacters() {
return new char[] {'<'};
}
@Override
public char[] getContextInformationAutoActivationCharacters() {
return null;
}
@Override
public IContextInformationValidator getContextInformationValidator() {
return null;
}
@Override
public String getErrorMessage() {
return "No tags found";
}
}
... but it's not working. Init goes normal, but auto-activation does not working and when I'm pressing ctrl-space (I've added org.eclipse.ui.edit.text.contentAssist.proposals command to Bindings ext point) empty list appearing. What am I doing wrong? | 3 |
8,415,636 | 12/07/2011 12:55:09 | 1,009,697 | 10/23/2011 16:25:29 | 18 | 6 | Payment method creation observer | I am currently creating a module that allows a back end user to manage customer's allowed payment methods. Magento event/observer helps a lot - everything that I need to do about customers hooked nicely by this system and transfers to my code. But I also need to hook an **event of payment method creation** (registering new payment method module). I know that there is no such event in Magento (correct me if I'm wrong), but I need some workaround to achieve such a functionality (nice/right way).
So here is a question:
*What is the best (nice/right) way to manage (hook) an event of payment method creation (payment module registering) in Magento?*
Sorry for the bad language... Thanks for answers! | events | magento | null | null | null | null | open | Payment method creation observer
===
I am currently creating a module that allows a back end user to manage customer's allowed payment methods. Magento event/observer helps a lot - everything that I need to do about customers hooked nicely by this system and transfers to my code. But I also need to hook an **event of payment method creation** (registering new payment method module). I know that there is no such event in Magento (correct me if I'm wrong), but I need some workaround to achieve such a functionality (nice/right way).
So here is a question:
*What is the best (nice/right) way to manage (hook) an event of payment method creation (payment module registering) in Magento?*
Sorry for the bad language... Thanks for answers! | 0 |
8,178,883 | 11/18/2011 07:03:11 | 1,053,211 | 11/18/2011 06:00:44 | 1 | 0 | Domino defrag - free version or paid | I've been using the free [DominoDefrag][1] tool available on [openntf][2] on a number of my companies servers and have had trouble free operation of the tool. We are upgrading servers to domino 8.5 and my boss wants to know if we should be looking at a "paid for" defrag tool.
Has anyone been through this exercise? any experiences and pointers to case studies or blogs would be welcomed.. I know there is now a 8.5 version of the open source solution on openntf and i really would like to continue using the free version..
[1]: http://www.openntf.org/internal/home.nsf/project.xsp?action=openDocument&name=DominoDefrag
[2]: http://www.openntf.org/internal/home.nsf/project.xsp?action=openDocument&name=DominoDefrag | ibm | lotus-domino | defragmentation | null | null | 11/18/2011 10:38:59 | off topic | Domino defrag - free version or paid
===
I've been using the free [DominoDefrag][1] tool available on [openntf][2] on a number of my companies servers and have had trouble free operation of the tool. We are upgrading servers to domino 8.5 and my boss wants to know if we should be looking at a "paid for" defrag tool.
Has anyone been through this exercise? any experiences and pointers to case studies or blogs would be welcomed.. I know there is now a 8.5 version of the open source solution on openntf and i really would like to continue using the free version..
[1]: http://www.openntf.org/internal/home.nsf/project.xsp?action=openDocument&name=DominoDefrag
[2]: http://www.openntf.org/internal/home.nsf/project.xsp?action=openDocument&name=DominoDefrag | 2 |
11,154,082 | 06/22/2012 10:01:39 | 1,132,688 | 01/05/2012 17:00:17 | -1 | 0 | How to use the feature "OpenID" at your site to identify users | It had already made friends, topics, and what I saw but did not complete.
I raised this question again if someone give me a full explanation of exactly **"OpenID"** is my own website and how we account for other sites like Google, Facebook can be used.
Let me give you a better example or sample project I will better understand this concept. | c# | asp.net | null | null | null | 06/23/2012 13:27:47 | not a real question | How to use the feature "OpenID" at your site to identify users
===
It had already made friends, topics, and what I saw but did not complete.
I raised this question again if someone give me a full explanation of exactly **"OpenID"** is my own website and how we account for other sites like Google, Facebook can be used.
Let me give you a better example or sample project I will better understand this concept. | 1 |
10,563,879 | 05/12/2012 12:47:39 | 1,377,904 | 05/06/2012 10:23:56 | 3 | 0 | *** glibc detected *** ./burcu.exe: double free or corruption (out): 0x00000000014ec040 *** | That's my matrix.cpp
#include<iostream>
#include<string>
#include<cstdlib>
#include<ctime>
using namespace std;
template <class Type>
class Matrix {
int line, column;
Type** arr;
public:
Matrix(int, int);
void print() const;
~Matrix();
Type getElement (int, int) const;
bool contains (int) const;
Matrix<Type> operator/(const Matrix<Type>& );
int getLine() const;
int getColumn() const;
void insertElement(int, int, Type);
void operator--();
void operator=(const Matrix<Type>&);
void operator++();
Matrix <Type> operator+(const Matrix<Type>&);
bool operator==(const Matrix<Type>&) const;
};
template <class Type>
Matrix<Type> ::Matrix (int line_in, int column_in)
{
line=line_in;
column= column_in;
arr = new Type*[line];
for( int i = 0 ; i < line ; i++ )
arr[i] = new Type [column];
for( int i=0; i<line; i++)
for( int j=0; j<column; j++)
{arr[i][j]= (Type) (rand()%101)/10;
/*cout<< arr[i][j]<<endl;*/}
}
template <class Type>
Matrix<Type>::~Matrix ()
{
for(int i=1;i<line;i++)
delete[] arr[i];
delete [] arr;
}
template <class Type>
Type Matrix<Type>::getElement( int index_1, int index_2) const
{ string error= "Index out of bounds";
if (index_1>line||index_2>column) throw error;
else
return arr[index_1-1][index_2-1];
}
template <class Type>
void Matrix <Type>::print() const
{ for( int i=0; i<line; i++)
{for( int j=0; j<column; j++)
{cout<< arr[i][j] << "\t";}
cout<<"\n";}
}
template <class Type>
bool Matrix <Type>::contains( int number) const
{ for( int i=0; i<line; i++)
{ for( int j=0; j<column; j++)
{ if( arr[i][j]== number)
return true;}
}
return false;
}
template <class Type>
int Matrix <Type>::getColumn() const
{ return column;}
template <class Type>
int Matrix <Type>::getLine() const
{ return line;}
template <class Type>
Matrix <Type> Matrix <Type>::operator/(const Matrix<Type>& matrix_in)
{ string error_1="Sizes must be equal for division";
string error_2=" Divisor matrix contains 0";
Matrix <Type> new_matrix(line,column);
//Type result;
if( line!= matrix_in.getLine() || column!=matrix_in.getColumn()) throw error_1;
for(int i=1; i<=line; i++)
for(int j=1; j<=column; j++)
{
if( matrix_in.getElement(i,j)==0) throw error_2;
arr[i-1][j-1]= (Type) (arr[i-1][j-1]) / matrix_in.getElement(i,j);
}
return *this; }
template <class Type>
void Matrix <Type>::insertElement(int i, int j, Type in_data)
{ arr[i][j]=in_data;}
template <class Type>
void Matrix<Type>::operator=(const Matrix<Type>& object_in)
{ string error=" Sizes are not equal for assignment";
if(line!=object_in.getLine() || column!=object_in.getColumn()) throw error;
line=object_in.getLine();
column=object_in.getColumn();
for(int i=1; i<=line; i++)
for( int j=1; j<=column; j++)
{ arr[i-1][j-1]= object_in.getElement(i,j);}
}
template <class Type>
void Matrix<Type>::operator--()
{ for(int i=0; i<line;i++)
for( int j=0; j<column; j++)
{ arr[i][j] = ( arr[i][j]-1); }
}
template <class Type>
void Matrix<Type>::operator++()
{ for(int i=0; i<line; i++)
for(int j=0; j<column; j++)
{ arr[i][j]+=1;}
}
template <class Type>
Matrix<Type> Matrix<Type>::operator+( const Matrix<Type>& object_in)
{ string error="Sizes must be equal for addition";
if(line!=object_in.getLine() || column!=object_in.getColumn()) throw error;
for(int i=1; i<=line; i++)
for(int j=1; j<=column; j++)
{ arr[i-1][j-1]+=object_in.getElement(i,j);}
return *this;}
template <class Type>
bool Matrix<Type>::operator==( const Matrix<Type>& object_in) const
{ string error="Sizes are not equal.Matrices are incomparible.";
if(line!=object_in.getLine() ||column!=object_in.getColumn()) throw error;
for(int i=1; i<=line; i++)
{for(int j=1; j<=column; j++)
{ if( arr[i-1][j-1]!=object_in.getElement(i,j))
return false;
}
}
return true;}
And main.cpp is:
#include <iostream>
#include <ctime>
#include <string>
#include<cstdlib>
#include"matrix.cpp"
using namespace std;
int main()
{
srand(time(NULL));
Matrix<int> m1(3,5); // creating some objects
Matrix<int> m2(3,5); // matrices’ elements are assigned randomly from 0 to 10
Matrix<double> m3(5,5);
Matrix<double> m4(5,6);
try{
cout << m1.getElement(3,6) << endl; // trying to get the element at(3,6)
}
catch(const string & err_msg)
{
cout << err_msg << endl;
}
cout << "Printing m4" << endl;
m2.print(); // printing m4
/* try{
Matrix<int> m6 = m2 / m1;// trying to divide two matrices
m6.print();
}
catch(const string & err_msg)
{
cout << err_msg << endl;
}
*/
cout << "Printing m1" << endl;
m1.print();
if(m1.contains(4)) // checking if the matrix has an element with value 4
cout << "Matrix contains the element" << endl;
else
cout << "Matrix does not contain the element" << endl;
/* Matrix<int> m5 = m2;
cout << "Printing m5" << endl;
m5.print(); */
try{
--m1;
cout<<"m1new"<<endl;
m1.print(); // decrement m1's matrix elements by 1
Matrix<int> m5 = m1 + m2; // sum m1 and m2 object's matrices and assign result to m5
cout<<"m5:"<<endl;
m5.print();
++m3; // increment m1's matrix elements by 1
// m2 = m5 / m1; // divide m5 and m1 object's matrices and assign result to m2
if(m3 == m4) // comparing two objects
cout << "Objects are equal" << endl;
else
cout << "Objects are not equal" << endl;
}
catch(const string & err_msg)
{
cout << err_msg << endl;
}
cout << "Printing m5" << endl;
// m5.print();
return 0;
}
Here is my error in g++:
[akgunhas@ssh burcu3]$ ./burcu.exe
Index out of bounds
Printing m4
5 3 5 8 4
0 6 4 1 5
6 8 4 0 7
Printing m1
6 9 4 2 4
0 4 4 2 1
7 9 1 5 9
Matrix contains the element
Printing m5
5 3 5 8 4
0 6 4 1 5
6 8 4 0 7
m1new
5 8 3 1 3
-1 3 3 1 0
6 8 0 4 8
m5:
10 11 8 9 7
-1 9 7 2 5
12 16 4 4 15
Sizes are not equal.Matrices are incomparible.
*** glibc detected *** ./burcu.exe: double free or corruption (out): 0x00000000014ec040 ***
======= Backtrace: =========
/lib64/libc.so.6[0x38e3e70d7f]
/lib64/libc.so.6(cfree+0x4b)[0x38e3e711db]
./burcu.exe[0x401e37]
./burcu.exe[0x4011f1]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x38e3e1d994]
./burcu.exe(__gxx_personality_v0+0x59)[0x400d69]
======= Memory map: ========
00400000-00403000 r-xp 00000000 00:16 28050015 /users/lnxsrv1
/ee/akgunhas/burcu3/burcu.exe
00602000-00603000 rw-p 00002000 00:16 28050015 /users/lnxsrv1
/ee/akgunhas/burcu3/burcu.exe
014ec000-0150d000 rw-p 014ec000 00:00 0
38e3a00000-38e3a1c000 r-xp 00000000 fd:00 1593483 /lib64/ld-2.5.so
38e3c1c000-38e3c1d000 r--p 0001c000 fd:00 1593483 /lib64/ld-2.5.so
38e3c1d000-38e3c1e000 rw-p 0001d000 fd:00 1593483 /lib64/ld-2.5.so
38e3e00000-38e3f4d000 r-xp 00000000 fd:00 32363 /lib64/libc-2.5.so
38e3f4d000-38e414d000 ---p 0014d000 fd:00 32363 /lib64/libc-2.5.so
38e414d000-38e4151000 r--p 0014d000 fd:00 32363 /lib64/libc-2.5.so
38e4151000-38e4152000 rw-p 00151000 fd:00 32363 /lib64/libc-2.5.so
38e4152000-38e4157000 rw-p 38e4152000 00:00 0
38e4200000-38e4282000 r-xp 00000000 fd:00 291216 /lib64/libm-2.5.so
38e4282000-38e4481000 ---p 00082000 fd:00 291216 /lib64/libm-2.5.so
38e4481000-38e4482000 r--p 00081000 fd:00 291216 /lib64/libm-2.5.so
38e4482000-38e4483000 rw-p 00082000 fd:00 291216 /lib64/libm-2.5.so
38e7a00000-38e7a0d000 r-xp 00000000 fd:00 291213 /lib64/libgcc_s-
4.1.2-20080825.so.1
38e7a0d000-38e7c0d000 ---p 0000d000 fd:00 291213 /lib64/libgcc_s-
4.1.2-20080825.so.1
38e7c0d000-38e7c0e000 rw-p 0000d000 fd:00 291213 /lib64/libgcc_s-
4.1.2-20080825.so.1
38eae00000-38eaee6000 r-xp 00000000 fd:00 785480 /usr/lib64
/libstdc++.so.6.0.8
38eaee6000-38eb0e5000 ---p 000e6000 fd:00 785480 /usr/lib64
/libstdc++.so.6.0.8
38eb0e5000-38eb0eb000 r--p 000e5000 fd:00 785480 /usr/lib64
/libstdc++.so.6.0.8
38eb0eb000-38eb0ee000 rw-p 000eb000 fd:00 785480 /usr/lib64
/libstdc++.so.6.0.8
38eb0ee000-38eb100000 rw-p 38eb0ee000 00:00 0
2b0db6f08000-2b0db6f0b000 rw-p 2b0db6f08000 00:00 0
2b0db6f20000-2b0db6f22000 rw-p 2b0db6f20000 00:00 0
7fff342fe000-7fff34313000 rw-p 7ffffffe9000 00:00 0 [stack]
7fff34391000-7fff34394000 r-xp 7fff34391000 00:00 0 [vdso]
ffffffffff600000-ffffffffffe00000 ---p 00000000 00:00 0 [vsyscall]
Aborted
I don't know why does compiler give this error. When I close operator == line in main function it is okay but else it gives error like that. When I try to assign two matrices with different size, after throw it gives error too.
| pointers | delete | matrix | glibc | null | 05/13/2012 15:47:16 | too localized | *** glibc detected *** ./burcu.exe: double free or corruption (out): 0x00000000014ec040 ***
===
That's my matrix.cpp
#include<iostream>
#include<string>
#include<cstdlib>
#include<ctime>
using namespace std;
template <class Type>
class Matrix {
int line, column;
Type** arr;
public:
Matrix(int, int);
void print() const;
~Matrix();
Type getElement (int, int) const;
bool contains (int) const;
Matrix<Type> operator/(const Matrix<Type>& );
int getLine() const;
int getColumn() const;
void insertElement(int, int, Type);
void operator--();
void operator=(const Matrix<Type>&);
void operator++();
Matrix <Type> operator+(const Matrix<Type>&);
bool operator==(const Matrix<Type>&) const;
};
template <class Type>
Matrix<Type> ::Matrix (int line_in, int column_in)
{
line=line_in;
column= column_in;
arr = new Type*[line];
for( int i = 0 ; i < line ; i++ )
arr[i] = new Type [column];
for( int i=0; i<line; i++)
for( int j=0; j<column; j++)
{arr[i][j]= (Type) (rand()%101)/10;
/*cout<< arr[i][j]<<endl;*/}
}
template <class Type>
Matrix<Type>::~Matrix ()
{
for(int i=1;i<line;i++)
delete[] arr[i];
delete [] arr;
}
template <class Type>
Type Matrix<Type>::getElement( int index_1, int index_2) const
{ string error= "Index out of bounds";
if (index_1>line||index_2>column) throw error;
else
return arr[index_1-1][index_2-1];
}
template <class Type>
void Matrix <Type>::print() const
{ for( int i=0; i<line; i++)
{for( int j=0; j<column; j++)
{cout<< arr[i][j] << "\t";}
cout<<"\n";}
}
template <class Type>
bool Matrix <Type>::contains( int number) const
{ for( int i=0; i<line; i++)
{ for( int j=0; j<column; j++)
{ if( arr[i][j]== number)
return true;}
}
return false;
}
template <class Type>
int Matrix <Type>::getColumn() const
{ return column;}
template <class Type>
int Matrix <Type>::getLine() const
{ return line;}
template <class Type>
Matrix <Type> Matrix <Type>::operator/(const Matrix<Type>& matrix_in)
{ string error_1="Sizes must be equal for division";
string error_2=" Divisor matrix contains 0";
Matrix <Type> new_matrix(line,column);
//Type result;
if( line!= matrix_in.getLine() || column!=matrix_in.getColumn()) throw error_1;
for(int i=1; i<=line; i++)
for(int j=1; j<=column; j++)
{
if( matrix_in.getElement(i,j)==0) throw error_2;
arr[i-1][j-1]= (Type) (arr[i-1][j-1]) / matrix_in.getElement(i,j);
}
return *this; }
template <class Type>
void Matrix <Type>::insertElement(int i, int j, Type in_data)
{ arr[i][j]=in_data;}
template <class Type>
void Matrix<Type>::operator=(const Matrix<Type>& object_in)
{ string error=" Sizes are not equal for assignment";
if(line!=object_in.getLine() || column!=object_in.getColumn()) throw error;
line=object_in.getLine();
column=object_in.getColumn();
for(int i=1; i<=line; i++)
for( int j=1; j<=column; j++)
{ arr[i-1][j-1]= object_in.getElement(i,j);}
}
template <class Type>
void Matrix<Type>::operator--()
{ for(int i=0; i<line;i++)
for( int j=0; j<column; j++)
{ arr[i][j] = ( arr[i][j]-1); }
}
template <class Type>
void Matrix<Type>::operator++()
{ for(int i=0; i<line; i++)
for(int j=0; j<column; j++)
{ arr[i][j]+=1;}
}
template <class Type>
Matrix<Type> Matrix<Type>::operator+( const Matrix<Type>& object_in)
{ string error="Sizes must be equal for addition";
if(line!=object_in.getLine() || column!=object_in.getColumn()) throw error;
for(int i=1; i<=line; i++)
for(int j=1; j<=column; j++)
{ arr[i-1][j-1]+=object_in.getElement(i,j);}
return *this;}
template <class Type>
bool Matrix<Type>::operator==( const Matrix<Type>& object_in) const
{ string error="Sizes are not equal.Matrices are incomparible.";
if(line!=object_in.getLine() ||column!=object_in.getColumn()) throw error;
for(int i=1; i<=line; i++)
{for(int j=1; j<=column; j++)
{ if( arr[i-1][j-1]!=object_in.getElement(i,j))
return false;
}
}
return true;}
And main.cpp is:
#include <iostream>
#include <ctime>
#include <string>
#include<cstdlib>
#include"matrix.cpp"
using namespace std;
int main()
{
srand(time(NULL));
Matrix<int> m1(3,5); // creating some objects
Matrix<int> m2(3,5); // matrices’ elements are assigned randomly from 0 to 10
Matrix<double> m3(5,5);
Matrix<double> m4(5,6);
try{
cout << m1.getElement(3,6) << endl; // trying to get the element at(3,6)
}
catch(const string & err_msg)
{
cout << err_msg << endl;
}
cout << "Printing m4" << endl;
m2.print(); // printing m4
/* try{
Matrix<int> m6 = m2 / m1;// trying to divide two matrices
m6.print();
}
catch(const string & err_msg)
{
cout << err_msg << endl;
}
*/
cout << "Printing m1" << endl;
m1.print();
if(m1.contains(4)) // checking if the matrix has an element with value 4
cout << "Matrix contains the element" << endl;
else
cout << "Matrix does not contain the element" << endl;
/* Matrix<int> m5 = m2;
cout << "Printing m5" << endl;
m5.print(); */
try{
--m1;
cout<<"m1new"<<endl;
m1.print(); // decrement m1's matrix elements by 1
Matrix<int> m5 = m1 + m2; // sum m1 and m2 object's matrices and assign result to m5
cout<<"m5:"<<endl;
m5.print();
++m3; // increment m1's matrix elements by 1
// m2 = m5 / m1; // divide m5 and m1 object's matrices and assign result to m2
if(m3 == m4) // comparing two objects
cout << "Objects are equal" << endl;
else
cout << "Objects are not equal" << endl;
}
catch(const string & err_msg)
{
cout << err_msg << endl;
}
cout << "Printing m5" << endl;
// m5.print();
return 0;
}
Here is my error in g++:
[akgunhas@ssh burcu3]$ ./burcu.exe
Index out of bounds
Printing m4
5 3 5 8 4
0 6 4 1 5
6 8 4 0 7
Printing m1
6 9 4 2 4
0 4 4 2 1
7 9 1 5 9
Matrix contains the element
Printing m5
5 3 5 8 4
0 6 4 1 5
6 8 4 0 7
m1new
5 8 3 1 3
-1 3 3 1 0
6 8 0 4 8
m5:
10 11 8 9 7
-1 9 7 2 5
12 16 4 4 15
Sizes are not equal.Matrices are incomparible.
*** glibc detected *** ./burcu.exe: double free or corruption (out): 0x00000000014ec040 ***
======= Backtrace: =========
/lib64/libc.so.6[0x38e3e70d7f]
/lib64/libc.so.6(cfree+0x4b)[0x38e3e711db]
./burcu.exe[0x401e37]
./burcu.exe[0x4011f1]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x38e3e1d994]
./burcu.exe(__gxx_personality_v0+0x59)[0x400d69]
======= Memory map: ========
00400000-00403000 r-xp 00000000 00:16 28050015 /users/lnxsrv1
/ee/akgunhas/burcu3/burcu.exe
00602000-00603000 rw-p 00002000 00:16 28050015 /users/lnxsrv1
/ee/akgunhas/burcu3/burcu.exe
014ec000-0150d000 rw-p 014ec000 00:00 0
38e3a00000-38e3a1c000 r-xp 00000000 fd:00 1593483 /lib64/ld-2.5.so
38e3c1c000-38e3c1d000 r--p 0001c000 fd:00 1593483 /lib64/ld-2.5.so
38e3c1d000-38e3c1e000 rw-p 0001d000 fd:00 1593483 /lib64/ld-2.5.so
38e3e00000-38e3f4d000 r-xp 00000000 fd:00 32363 /lib64/libc-2.5.so
38e3f4d000-38e414d000 ---p 0014d000 fd:00 32363 /lib64/libc-2.5.so
38e414d000-38e4151000 r--p 0014d000 fd:00 32363 /lib64/libc-2.5.so
38e4151000-38e4152000 rw-p 00151000 fd:00 32363 /lib64/libc-2.5.so
38e4152000-38e4157000 rw-p 38e4152000 00:00 0
38e4200000-38e4282000 r-xp 00000000 fd:00 291216 /lib64/libm-2.5.so
38e4282000-38e4481000 ---p 00082000 fd:00 291216 /lib64/libm-2.5.so
38e4481000-38e4482000 r--p 00081000 fd:00 291216 /lib64/libm-2.5.so
38e4482000-38e4483000 rw-p 00082000 fd:00 291216 /lib64/libm-2.5.so
38e7a00000-38e7a0d000 r-xp 00000000 fd:00 291213 /lib64/libgcc_s-
4.1.2-20080825.so.1
38e7a0d000-38e7c0d000 ---p 0000d000 fd:00 291213 /lib64/libgcc_s-
4.1.2-20080825.so.1
38e7c0d000-38e7c0e000 rw-p 0000d000 fd:00 291213 /lib64/libgcc_s-
4.1.2-20080825.so.1
38eae00000-38eaee6000 r-xp 00000000 fd:00 785480 /usr/lib64
/libstdc++.so.6.0.8
38eaee6000-38eb0e5000 ---p 000e6000 fd:00 785480 /usr/lib64
/libstdc++.so.6.0.8
38eb0e5000-38eb0eb000 r--p 000e5000 fd:00 785480 /usr/lib64
/libstdc++.so.6.0.8
38eb0eb000-38eb0ee000 rw-p 000eb000 fd:00 785480 /usr/lib64
/libstdc++.so.6.0.8
38eb0ee000-38eb100000 rw-p 38eb0ee000 00:00 0
2b0db6f08000-2b0db6f0b000 rw-p 2b0db6f08000 00:00 0
2b0db6f20000-2b0db6f22000 rw-p 2b0db6f20000 00:00 0
7fff342fe000-7fff34313000 rw-p 7ffffffe9000 00:00 0 [stack]
7fff34391000-7fff34394000 r-xp 7fff34391000 00:00 0 [vdso]
ffffffffff600000-ffffffffffe00000 ---p 00000000 00:00 0 [vsyscall]
Aborted
I don't know why does compiler give this error. When I close operator == line in main function it is okay but else it gives error like that. When I try to assign two matrices with different size, after throw it gives error too.
| 3 |
5,386,411 | 03/22/2011 03:27:40 | 645,778 | 03/05/2011 06:15:30 | 1 | 0 | Gift Card Balance | Is there an automated way to check the balance of a gift card online? I've thought about creating creating a form and sending the card number and pin to the vendor's website and scraping the results, but I run into captchas on too many sites. Just wondering if anyone has programed a method to validate gift card balances. | forms | web-scraping | gifts | null | null | 03/22/2011 07:59:17 | not a real question | Gift Card Balance
===
Is there an automated way to check the balance of a gift card online? I've thought about creating creating a form and sending the card number and pin to the vendor's website and scraping the results, but I run into captchas on too many sites. Just wondering if anyone has programed a method to validate gift card balances. | 1 |
4,661,139 | 01/11/2011 18:21:29 | 365,688 | 06/13/2010 13:06:57 | 3 | 0 | Invoking application scoped bean jsf | In my applicatoin I have a application scoped bean, which I call it like this:
`FacesContext.getCurrentInstance().getExternalContext().getApplicationMap().get("name");`
What is the best way to initialize it?
The way I do till now it to call one of its properies in the first jsf page, for no need - just initializing the bean.
The page looks like this:
<h:inputHidden id="inovkeBean" value="#{myBean.nothing}"/>
And the bean:
@ApplicationScoped
public class MyBean {
String nothing;
public String getNothing() {
return nothing;
}
}
It works fine, just i'm asking: can anybody tell me a nicer way to initialize the bean?
Thanks!
| jsf | null | null | null | null | null | open | Invoking application scoped bean jsf
===
In my applicatoin I have a application scoped bean, which I call it like this:
`FacesContext.getCurrentInstance().getExternalContext().getApplicationMap().get("name");`
What is the best way to initialize it?
The way I do till now it to call one of its properies in the first jsf page, for no need - just initializing the bean.
The page looks like this:
<h:inputHidden id="inovkeBean" value="#{myBean.nothing}"/>
And the bean:
@ApplicationScoped
public class MyBean {
String nothing;
public String getNothing() {
return nothing;
}
}
It works fine, just i'm asking: can anybody tell me a nicer way to initialize the bean?
Thanks!
| 0 |
8,795,356 | 01/09/2012 21:20:43 | 1,139,616 | 01/09/2012 21:04:49 | 1 | 0 | Rsync permission denied when using --remove-source-files | My issue is I try to run the following rsync command:
$ rsync --remove-source-files -e "ssh -i /path/to/my/key" user@server:/files/test* .
The command successfully transfers the files I want, but it fails to remove the source files. The error is:
rsync: sender failed to remove testfile: Permission denied (13)
1.) I've tried setting the source files to 777, no luck.
2.) I have changed the source files to be owned by the user running the rsync, no luck.
3.) I have tried making sure both the source and destination folders are owned by the user running the rsync, no luck.
This is an Ubuntu Oneric AWS EC2 machine to another Ubuntu Oneric AWS EC2 machine rsync transfer using sync version 3.0.7 protocol version 30.
Again the copies work fine, but the files don't get removed on the sender side, which is a bummer. I have also noticed that I get a similar error if I simply try to do the removal via ssh:
$ ssh user@server rm /files/test*
I get:
rm: cannot remove `/files/test': Permission denied
I suspect it is related.
I don't ever recall having these types of issues in Redhat.
What piece of simplicity am I missing?
| ubuntu | ssh | rsync | null | null | 01/12/2012 18:26:25 | off topic | Rsync permission denied when using --remove-source-files
===
My issue is I try to run the following rsync command:
$ rsync --remove-source-files -e "ssh -i /path/to/my/key" user@server:/files/test* .
The command successfully transfers the files I want, but it fails to remove the source files. The error is:
rsync: sender failed to remove testfile: Permission denied (13)
1.) I've tried setting the source files to 777, no luck.
2.) I have changed the source files to be owned by the user running the rsync, no luck.
3.) I have tried making sure both the source and destination folders are owned by the user running the rsync, no luck.
This is an Ubuntu Oneric AWS EC2 machine to another Ubuntu Oneric AWS EC2 machine rsync transfer using sync version 3.0.7 protocol version 30.
Again the copies work fine, but the files don't get removed on the sender side, which is a bummer. I have also noticed that I get a similar error if I simply try to do the removal via ssh:
$ ssh user@server rm /files/test*
I get:
rm: cannot remove `/files/test': Permission denied
I suspect it is related.
I don't ever recall having these types of issues in Redhat.
What piece of simplicity am I missing?
| 2 |
11,319,192 | 07/03/2012 21:06:25 | 1,499,979 | 07/03/2012 21:03:19 | 1 | 0 | How do I block access to a windows share on a host? | I have a windows share that anyone can connect to (no password), however users of specific computers should not be allowed to connect to them. How do I disable access for those users on those computers? | networking | windows-7 | null | null | null | 07/05/2012 01:38:07 | off topic | How do I block access to a windows share on a host?
===
I have a windows share that anyone can connect to (no password), however users of specific computers should not be allowed to connect to them. How do I disable access for those users on those computers? | 2 |
1,196,623 | 07/28/2009 20:44:45 | 47,817 | 12/19/2008 16:23:18 | 119 | 2 | TCP Vs. Http Benchmark | I am having a Web application sitting on IIS, and talking with [remote]Service-Machine.
I am not sure whether to choose TCP or Http, as the main protocol.
I know the difference pretty well, but I am looking for a good benchmark, that shows how much faster is the TCP?
| tcp | http | c# | java | null | null | open | TCP Vs. Http Benchmark
===
I am having a Web application sitting on IIS, and talking with [remote]Service-Machine.
I am not sure whether to choose TCP or Http, as the main protocol.
I know the difference pretty well, but I am looking for a good benchmark, that shows how much faster is the TCP?
| 0 |
4,816,330 | 01/27/2011 12:33:30 | 592,170 | 01/27/2011 12:31:24 | 1 | 0 | web-app_2_5.xsd showing errors when validating web.xml in eclipse | I have no idea what I could've done to cause this because my time spent programming is stretched out and I've already forgotten what I might've done. But now when I load Eclipse it says:
The errors below were detected when validating the file "web-app_2_5.xsd" via the file "web.xml". In most cases these errors can be detected by validating "web-app_2_5.xsd" directly. However it is possible that errors will only occur when web-app_2_5.xsd is validated in the context of web.xml.
s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'JDK 6 XML-related APIs'.
The entity name must immediately follow the '&' in the entity reference.
My first few lines of web.xml looks like so.
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
I've read that it could be an error with the server where the file is being retrieved from, or with caching. I've disabled and cleared the cache and as far as I can tell the server is the same everyone else is using unless they switched to an oracle.com url and I haven't found it yet.
Any thoughts would be greatly appreciated. | java | xml | java-ee | null | null | 06/30/2011 08:41:17 | too localized | web-app_2_5.xsd showing errors when validating web.xml in eclipse
===
I have no idea what I could've done to cause this because my time spent programming is stretched out and I've already forgotten what I might've done. But now when I load Eclipse it says:
The errors below were detected when validating the file "web-app_2_5.xsd" via the file "web.xml". In most cases these errors can be detected by validating "web-app_2_5.xsd" directly. However it is possible that errors will only occur when web-app_2_5.xsd is validated in the context of web.xml.
s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'JDK 6 XML-related APIs'.
The entity name must immediately follow the '&' in the entity reference.
My first few lines of web.xml looks like so.
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
I've read that it could be an error with the server where the file is being retrieved from, or with caching. I've disabled and cleared the cache and as far as I can tell the server is the same everyone else is using unless they switched to an oracle.com url and I haven't found it yet.
Any thoughts would be greatly appreciated. | 3 |
5,637,336 | 04/12/2011 15:00:03 | 704,343 | 04/12/2011 15:00:03 | 1 | 0 | Make page public, then hide page from public based on settings. How? | I have user profiles on my site. Users can make it public by checking a checkbox (search able via a search engine) and uncheck the box to block the page from being searched on a search engine. Site is in php codeignitor.
How is this accomplished? I am esp lost on when the user unchecks the box to block the page from being public how is that done and how to do this in as real time as possible? A good example are the profiles on fb or linkedin. | php | seo | search-engine | public | null | null | open | Make page public, then hide page from public based on settings. How?
===
I have user profiles on my site. Users can make it public by checking a checkbox (search able via a search engine) and uncheck the box to block the page from being searched on a search engine. Site is in php codeignitor.
How is this accomplished? I am esp lost on when the user unchecks the box to block the page from being public how is that done and how to do this in as real time as possible? A good example are the profiles on fb or linkedin. | 0 |
3,142,582 | 06/29/2010 16:14:46 | 84,539 | 03/30/2009 09:34:26 | 1,007 | 35 | C# - Confirming all Keys in a dictionary have populated Values | I have a `Dictionary<string, List<string>>`
I want to do a check that all Keys in the dictionary have at least 1 item in its corresponding list
| c# | .net | .net-3.5 | c#-3.0 | null | null | open | C# - Confirming all Keys in a dictionary have populated Values
===
I have a `Dictionary<string, List<string>>`
I want to do a check that all Keys in the dictionary have at least 1 item in its corresponding list
| 0 |
8,678,015 | 12/30/2011 09:27:04 | 794,779 | 06/12/2011 13:27:49 | 127 | 2 | What does Spring dependency injection solve? | See the top answer to this question: http://stackoverflow.com/questions/1061717/what-exactly-is-spring-for
Im at loss as to what the problem is, and why Springs solution of putting specifying what implementation of the interface to use inside an XML file is better than simply having a line of code instantiate the correct interface? | java | spring | dependency-injection | inversion-of-control | null | 12/30/2011 13:01:12 | not constructive | What does Spring dependency injection solve?
===
See the top answer to this question: http://stackoverflow.com/questions/1061717/what-exactly-is-spring-for
Im at loss as to what the problem is, and why Springs solution of putting specifying what implementation of the interface to use inside an XML file is better than simply having a line of code instantiate the correct interface? | 4 |
6,576,381 | 07/04/2011 21:58:31 | 828,691 | 07/04/2011 20:23:09 | 6 | 0 | Thread Synchronization in Thread Pools | Can someone elaborate on how synchronization work in thread pooling? | multithreading | threadpool | thread-pool | null | null | 07/05/2011 15:24:04 | not a real question | Thread Synchronization in Thread Pools
===
Can someone elaborate on how synchronization work in thread pooling? | 1 |
8,272,578 | 11/25/2011 17:42:53 | 1,018,711 | 10/28/2011 16:07:04 | 105 | 1 | WPF - Game grid | i have wpf application, a game of sudoku. I have a model and user control for a game grid (9x9 squares). Because my knowledge of binding is limited and i had not enough time, i decided to make it old way without databinding and manualy synchronize model and view. However it is very unclean and synchronization problems appear.
I decided to convert to proper databinding.
I suppose my grid should be something like itemscontrol (listbox or combobox) but instead of linear list it would layout its items into two dimensional grid.
I am new to binding and i have no idea how to achieve my goal. I have model class which has some general info about current puzzle and contains collection of cells. Each cell has its own propertiues like value, possibilities, state etc.
I have user control of entire grid and user control for each individual cell. I need grid to bind to some properties of my model (eg, disabled,enabled,sudoku-type) and each cell to bind to my corresponding cell - value, background etc.
Also my collection of cells is two dimensional array. I suppose it is not bindable - it has to be observable collection right? But i use x and y coordinates (indexes) to navigate trough array (like to go trough entrire row or column). Maybe this could be one dimensional array and replaced with linq queries (like for row - select all cells from cells where cell.Y = desiredRowIndex).
Can you please point me some direction how to continue?
Thank you. | c# | .net | wpf | data-binding | null | null | open | WPF - Game grid
===
i have wpf application, a game of sudoku. I have a model and user control for a game grid (9x9 squares). Because my knowledge of binding is limited and i had not enough time, i decided to make it old way without databinding and manualy synchronize model and view. However it is very unclean and synchronization problems appear.
I decided to convert to proper databinding.
I suppose my grid should be something like itemscontrol (listbox or combobox) but instead of linear list it would layout its items into two dimensional grid.
I am new to binding and i have no idea how to achieve my goal. I have model class which has some general info about current puzzle and contains collection of cells. Each cell has its own propertiues like value, possibilities, state etc.
I have user control of entire grid and user control for each individual cell. I need grid to bind to some properties of my model (eg, disabled,enabled,sudoku-type) and each cell to bind to my corresponding cell - value, background etc.
Also my collection of cells is two dimensional array. I suppose it is not bindable - it has to be observable collection right? But i use x and y coordinates (indexes) to navigate trough array (like to go trough entrire row or column). Maybe this could be one dimensional array and replaced with linq queries (like for row - select all cells from cells where cell.Y = desiredRowIndex).
Can you please point me some direction how to continue?
Thank you. | 0 |
6,410,729 | 06/20/2011 11:55:15 | 238,664 | 12/25/2009 19:54:39 | 546 | 28 | No links clickable in WebView embedded in ViewGroup if other children there | I have a RelativeLayout that contains a WebView and a ListView (ListViewContainer is a subclass of ListView:
public AdListViewContainer(Context context, ServiceLookup lookup, MarketList list, Registry registry, BitmapCache bitmapCache, Utilities utilities, ActionFlipper flipper) {
super(context);
mScale = getContext().getResources().getDisplayMetrics().density;
final int orientation = getResources().getConfiguration().orientation;
setClickable(true);
if (orientation == Configuration.ORIENTATION_PORTRAIT) {
mAd = new WebView(context);
mAd.setId(1234);
mAd.setWebViewClient(new AdListWebClient());
mAd.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
Log.d (TAG, "Inner Event " + event.getAction());
return false;
}
});
mAd.getSettings().setJavaScriptEnabled(true);
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT, RelativeLayout.LayoutParams.FILL_PARENT);
lp.addRule(ALIGN_PARENT_BOTTOM, 1);
addView(mAd, lp);
}
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT, RelativeLayout.LayoutParams.FILL_PARENT);
if (mAd != null) {
lp.addRule(ALIGN_BOTTOM, mAd.getId());
}
mListContainer = new ListViewContainer(context, lookup, list, registry, bitmapCache, utilities, flipper);
addView(mListContainer, lp);
}
The WebView is showing an ad generated by Adition, basically an img-tag in an a-tag.
The problem I have is that the ad can't be clicked. No touch or click events are received by the WebView. When I remove the ListView and the WebView is the only child of the ViewGroup (by removing the last addView call), the ad is clickable and everything is fine.
ListViewContainer is a straightforward subclass of ListView that contains a load of clickable LinearLayouts.
Any help appreciated!
| android | android-webview | null | null | null | null | open | No links clickable in WebView embedded in ViewGroup if other children there
===
I have a RelativeLayout that contains a WebView and a ListView (ListViewContainer is a subclass of ListView:
public AdListViewContainer(Context context, ServiceLookup lookup, MarketList list, Registry registry, BitmapCache bitmapCache, Utilities utilities, ActionFlipper flipper) {
super(context);
mScale = getContext().getResources().getDisplayMetrics().density;
final int orientation = getResources().getConfiguration().orientation;
setClickable(true);
if (orientation == Configuration.ORIENTATION_PORTRAIT) {
mAd = new WebView(context);
mAd.setId(1234);
mAd.setWebViewClient(new AdListWebClient());
mAd.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
Log.d (TAG, "Inner Event " + event.getAction());
return false;
}
});
mAd.getSettings().setJavaScriptEnabled(true);
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT, RelativeLayout.LayoutParams.FILL_PARENT);
lp.addRule(ALIGN_PARENT_BOTTOM, 1);
addView(mAd, lp);
}
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT, RelativeLayout.LayoutParams.FILL_PARENT);
if (mAd != null) {
lp.addRule(ALIGN_BOTTOM, mAd.getId());
}
mListContainer = new ListViewContainer(context, lookup, list, registry, bitmapCache, utilities, flipper);
addView(mListContainer, lp);
}
The WebView is showing an ad generated by Adition, basically an img-tag in an a-tag.
The problem I have is that the ad can't be clicked. No touch or click events are received by the WebView. When I remove the ListView and the WebView is the only child of the ViewGroup (by removing the last addView call), the ad is clickable and everything is fine.
ListViewContainer is a straightforward subclass of ListView that contains a load of clickable LinearLayouts.
Any help appreciated!
| 0 |
9,786,506 | 03/20/2012 12:12:07 | 1,218,072 | 02/18/2012 13:05:57 | 11 | 0 | Hibernate named queries and startup performances | We are starting a new projet using JPA/Hibernate. Someone in the team is refusing to use named queries saying that he had performance issues with those before. According to him, the named queries are not only parsed at startup but they also are executed which would slow significantly the startup.
Is it right and if so, is there any configuration to prevent hibernate from executing the queries? | hibernate | jpa | named-query | null | null | null | open | Hibernate named queries and startup performances
===
We are starting a new projet using JPA/Hibernate. Someone in the team is refusing to use named queries saying that he had performance issues with those before. According to him, the named queries are not only parsed at startup but they also are executed which would slow significantly the startup.
Is it right and if so, is there any configuration to prevent hibernate from executing the queries? | 0 |
3,409,569 | 08/04/2010 20:30:13 | 359,467 | 06/06/2010 00:47:12 | 3 | 2 | Call an action when closing a JSP | I'm new to the java web world, so forgive me if I say something stupid.
I'm working with struts 2 and I need to delete a file (which is located on the server) when a jsp is closed.
Does any body knows how to do this?
Thanks in advance. | java | jsp | struts2 | null | null | null | open | Call an action when closing a JSP
===
I'm new to the java web world, so forgive me if I say something stupid.
I'm working with struts 2 and I need to delete a file (which is located on the server) when a jsp is closed.
Does any body knows how to do this?
Thanks in advance. | 0 |
6,946,786 | 08/04/2011 18:38:48 | 196,066 | 10/25/2009 03:05:30 | 36 | 1 | Synchronization of Views to Tables | I have written the following code to do a comparision of a View and its corresponding production table. I am looking for better ways to write this code for efficiency, any pointers would be greatly appreciated. The code gives me the desired results, Now it's just a point of learning new approaches and concepts to it.
http://pastebin.com/pSTdCx3L | sql | tsql | sql-server-2008 | null | null | 08/04/2011 19:42:03 | not a real question | Synchronization of Views to Tables
===
I have written the following code to do a comparision of a View and its corresponding production table. I am looking for better ways to write this code for efficiency, any pointers would be greatly appreciated. The code gives me the desired results, Now it's just a point of learning new approaches and concepts to it.
http://pastebin.com/pSTdCx3L | 1 |
7,779,503 | 10/15/2011 17:41:43 | 63,401 | 02/06/2009 16:55:56 | 490 | 9 | Max recursion in "pip install" & "setup.py install" | I'm trying to install a package (splinter) on a Macbook (OS X 10.6.8), but I keep getting maximum recursion errors. They occur whether I use "setup.py install" or "pip install", and whether I try to do a global install or use virtualenv. They occurred both under Python 2.7.1 and 2.7.2. They occur when I do it a boat, they occur when I do it with a goat.
Please note that no one else seems to be having this problem with the splinter package.
The loopy bit of my trace back:
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/egg_info.py", line 177, in run
self.find_sources()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/egg_info.py", line 252, in find_sources
mm.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/egg_info.py", line 306, in run
self.add_defaults()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/egg_info.py", line 330, in add_defaults
sdist.add_defaults(self)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/sdist.py", line 264, in add_defaults
for pkg, src_dir, build_dir, filenames in build_py.data_files:
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/build_py.py", line 39, in __getattr__
self.data_files = files = self._get_data_files(); return files
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/build_py.py", line 44, in _get_data_files
self.analyze_manifest()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/build_py.py", line 92, in analyze_manifest
self.run_command('egg_info')
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
My Python path:
/Users/gimli/Work/LocalSystemGimli/troubleshooting/splinter_install
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.0-py2.7.egg
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv-1.6.4-py2.7.egg
/Users/gimli/Work/LocalSystemGimli/troubleshooting/splinter_install
/opt/local/www
/opt/local/www/swage_block/libraries/django_tastypie
/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
/Library/Python/2.6/site-packages/MySQL_python-1.2.3-py2.6-macosx-10.6-universal.egg
/Library/Python/2.6/site-packages/lxml-2.3-py2.6-macosx-10.6-universal.egg
/Library/Python/2.6/site-packages/python_dateutil-1.5-py2.6.egg
/Library/Python/2.6/site-packages/python_digest-1.7-py2.6.egg
/Library/Python/2.6/site-packages/simplejson-2.1.6-py2.6-macosx-10.6-universal.egg
/Library/Python/2.6/site-packages
/Library/Python/2.6/site-packages/mimeparse-0.1.3-py2.6.egg-info
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python
The pip.log has many, many, many warnings that "warning: manifest_maker: standard file '-c' not found".
`setuptools.__version__` is 0.6c9, `setuptools.distutils.__version__` is 2.7.2.
Strangely, the `__file__` for the setuptools module is under the 2.6 installation directory, but that for setuptools.disutils is under the 2.7 installation.
I suspect the problem is some subtle error in my installation of 2.7 or some dependent module (the computer came with 2.6 installed) but I can't for the life of me figure the problem.
| python | python-install | null | null | null | 10/16/2011 17:09:24 | off topic | Max recursion in "pip install" & "setup.py install"
===
I'm trying to install a package (splinter) on a Macbook (OS X 10.6.8), but I keep getting maximum recursion errors. They occur whether I use "setup.py install" or "pip install", and whether I try to do a global install or use virtualenv. They occurred both under Python 2.7.1 and 2.7.2. They occur when I do it a boat, they occur when I do it with a goat.
Please note that no one else seems to be having this problem with the splinter package.
The loopy bit of my trace back:
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/egg_info.py", line 177, in run
self.find_sources()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/egg_info.py", line 252, in find_sources
mm.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/egg_info.py", line 306, in run
self.add_defaults()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/egg_info.py", line 330, in add_defaults
sdist.add_defaults(self)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/sdist.py", line 264, in add_defaults
for pkg, src_dir, build_dir, filenames in build_py.data_files:
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/build_py.py", line 39, in __getattr__
self.data_files = files = self._get_data_files(); return files
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/build_py.py", line 44, in _get_data_files
self.analyze_manifest()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/build_py.py", line 92, in analyze_manifest
self.run_command('egg_info')
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
My Python path:
/Users/gimli/Work/LocalSystemGimli/troubleshooting/splinter_install
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.0-py2.7.egg
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv-1.6.4-py2.7.egg
/Users/gimli/Work/LocalSystemGimli/troubleshooting/splinter_install
/opt/local/www
/opt/local/www/swage_block/libraries/django_tastypie
/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
/Library/Python/2.6/site-packages/MySQL_python-1.2.3-py2.6-macosx-10.6-universal.egg
/Library/Python/2.6/site-packages/lxml-2.3-py2.6-macosx-10.6-universal.egg
/Library/Python/2.6/site-packages/python_dateutil-1.5-py2.6.egg
/Library/Python/2.6/site-packages/python_digest-1.7-py2.6.egg
/Library/Python/2.6/site-packages/simplejson-2.1.6-py2.6-macosx-10.6-universal.egg
/Library/Python/2.6/site-packages
/Library/Python/2.6/site-packages/mimeparse-0.1.3-py2.6.egg-info
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python
The pip.log has many, many, many warnings that "warning: manifest_maker: standard file '-c' not found".
`setuptools.__version__` is 0.6c9, `setuptools.distutils.__version__` is 2.7.2.
Strangely, the `__file__` for the setuptools module is under the 2.6 installation directory, but that for setuptools.disutils is under the 2.7 installation.
I suspect the problem is some subtle error in my installation of 2.7 or some dependent module (the computer came with 2.6 installed) but I can't for the life of me figure the problem.
| 2 |
6,394,182 | 06/18/2011 05:55:44 | 773,158 | 05/27/2011 13:21:41 | 6 | 0 | Best reference book for Extjs 4 | I am try to learn in Extjs 4.so can u help me to find out the best refer book for extjs 4.
give me some link for refer. | extjs | books | null | null | null | 10/03/2011 17:44:03 | not constructive | Best reference book for Extjs 4
===
I am try to learn in Extjs 4.so can u help me to find out the best refer book for extjs 4.
give me some link for refer. | 4 |
6,929,006 | 08/03/2011 15:26:31 | 469,573 | 10/07/2010 20:16:53 | 107 | 2 | Suggestions for Dashboard/ Database Reporting software | We are looking for a reporting suite that will allow us to analyse our data. I'm not sure of the exact terminology for such suites but they are often known as 'Dashboard Software' or 'Database Reporting'
An example is: [Wonder Graphs][1]
We are looking for a suite that will integrate with our MySQL database and provide us with:
- 'Live' graphical Interfaces (Graphs, Charts) for viewing our data which are automatically updated
- The ability to 'Drill Down' using these charts to see more specific information.
For example if a chart shows total sales, we want to be able to click on that graph and be shown information on type of sales.
- The ability to export to excel
- An easy-to-use user interface that allows non-technical users to create and customise their own views or dashboards.
If anyone can list software they use, have used, or know to be good that would be a great help.
If there is an open-source example available that is great however we are expecting to pay for such software.
Let me know if I have been to vague on details.
Thanks in advance,
James
[1]: http://www.wondergraphs.com/ | mysql | dashboard | dashboard-designer | null | null | 08/04/2011 05:15:26 | not constructive | Suggestions for Dashboard/ Database Reporting software
===
We are looking for a reporting suite that will allow us to analyse our data. I'm not sure of the exact terminology for such suites but they are often known as 'Dashboard Software' or 'Database Reporting'
An example is: [Wonder Graphs][1]
We are looking for a suite that will integrate with our MySQL database and provide us with:
- 'Live' graphical Interfaces (Graphs, Charts) for viewing our data which are automatically updated
- The ability to 'Drill Down' using these charts to see more specific information.
For example if a chart shows total sales, we want to be able to click on that graph and be shown information on type of sales.
- The ability to export to excel
- An easy-to-use user interface that allows non-technical users to create and customise their own views or dashboards.
If anyone can list software they use, have used, or know to be good that would be a great help.
If there is an open-source example available that is great however we are expecting to pay for such software.
Let me know if I have been to vague on details.
Thanks in advance,
James
[1]: http://www.wondergraphs.com/ | 4 |
9,935,533 | 03/30/2012 00:32:52 | 1,120,121 | 12/28/2011 22:32:17 | 353 | 17 | Android/Java how to check if a Rectangle and a line segment intersect without line2d | in my game for Android I need to check for intersection between a rectangle and a line segment. I cannot use [line2d][1] as android does not support that. I have looked at similar questions dealing with lines and tried to modify them and failed. I also realize this [Q/A][2] which is basically what I want, however I have failed. For an example here is my code for a Line class that includes my attempt at intersection. The results have been some non-intersections returning true and some intersections returning false;
package com.example.HelloAndroid;
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.RectF;
public class Segment {
int x1;
int y1;
int x2;
int y2;
double m;
double b;
boolean ishoriz;
boolean isvert;
public Segment(int x1s, int y1s, int x2s, int y2s)
{
if(x1s>x2s)
{this.x1=x2s;
this.x2=x1s;}
else{
this.x1=x1s;
this.x2=x2s;
}
if(y1s>y2s)
{this.y1=y2s;
this.y2=y1s;}
else{
this.y1=y1s;
this.y2=y2s;
}
int ydif=y2s-y1s;
int xdif=x2s-x1s;
if(ydif==0)
{this.ishoriz=true;
this.m=0;
this.b=x1s;}
else if(xdif==0)
{this.isvert=true;}
else{
this.m=ydif/xdif;
int r = ydif/xdif;
this.b=y1s-(r*x1s);
this.isvert=false;
this.ishoriz=false;
}
}
public Point intersects(Segment s, Segment s2)
{
if(s.ishoriz&&s2.ishoriz)
{return new Point(-1,-1);}
if(s.isvert&&s2.isvert)
{return new Point(-1,-1);}
if(s.isvert)
{int x=s.x1;
if(s2.x1<=x&&s2.x2>=x)
{
int y= (int) ((s2.m*x)+s2.b);
return new Point(x,y);
}
return new Point(-1,-1);
}
if(s2.isvert)
{int x=s2.x1;
if(s.x1<=x&&s.x2>=x)
{
int y= (int) ((s.m*x)+s.b);
return new Point(x,y);
}
return new Point(-1,-1);
}
if(s.m==s2.m)
{return new Point(-1,-1);}
//use substitution
//(s.m-s2.m)x=s2.b-s.b
int x=(int) (s.m-s2.m);
x=(int) ((s2.b-s.b)/x);
//find y
int y=(int) ((x*s.m)+s.b);
if(s.y1<=y&&s.y2>=y&&s2.y1<=y&&s2.y2>=y&&s.x1<=x&&s.x2>=x&&s2.x1<=x&&s2.x2>=x)
{
return new Point(x,y);}
return new Point(-1,-1);
}
public boolean intersected(Segment s, Segment s2)
{
if(s.ishoriz&&s2.ishoriz)
{return false;}
if(s.isvert&&s2.isvert)
{return false;}
if(s.isvert)
{int x=s.x1;
if(s2.x1<=x&&s2.x2>=x)
{
int y= (int) ((s2.m*x)+s2.b);
return true;
}
return false;
}
if(s2.isvert)
{int x=s2.x1;
if(s.x1<=x&&s.x2>=x)
{
int y= (int) ((s.m*x)+s.b);
return true;
}
return false;
}
if(s.m==s2.m)
{return false;}
//use substitution
//(s.m-s2.m)x=s2.b-s.b
int x=(int) (s.m-s2.m);
x=(int) ((s2.b-s.b)/x);
//find y
int y=(int) ((x*s.m)+s.b);
if(s.y1<=y&&s.y2>=y&&s2.y1<=y&&s2.y2>=y&&s.x1<=x&&s.x2>=x&&s2.x1<=x&&s2.x2>=x)
{
return true;}
return false;
}
public boolean intersects2(Segment s, Rect r)
{
Segment top = new Segment(r.left,r.top,r.right,r.top+1);
Segment left = new Segment(r.left,r.top,r.left+1,r.bottom);
Segment bottom = new Segment(r.left,r.bottom,r.right,r.bottom+1);
Segment right = new Segment(r.right,r.top,r.right+1,r.bottom);
boolean topp=s.intersected(s, top);
boolean leftp=s.intersected(s, left);
boolean bottomp=s.intersected(s, bottom);
boolean rightp=s.intersected(s, right);
if(topp)
{return topp;}
if(leftp)
{return leftp;}
if(bottomp)
{return bottomp;}
if(rightp)
{return rightp;}
else {return false;}
}}
[1]: http://docs.oracle.com/javase/6/docs/api/java/awt/geom/Line2D.html
[2]: http://stackoverflow.com/questions/4823789/how-to-check-if-any-point-or-part-of-a-line-is-inside-or-touches-a-rectangle | java | android | intersection | lines | null | 03/31/2012 19:11:01 | too localized | Android/Java how to check if a Rectangle and a line segment intersect without line2d
===
in my game for Android I need to check for intersection between a rectangle and a line segment. I cannot use [line2d][1] as android does not support that. I have looked at similar questions dealing with lines and tried to modify them and failed. I also realize this [Q/A][2] which is basically what I want, however I have failed. For an example here is my code for a Line class that includes my attempt at intersection. The results have been some non-intersections returning true and some intersections returning false;
package com.example.HelloAndroid;
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.RectF;
public class Segment {
int x1;
int y1;
int x2;
int y2;
double m;
double b;
boolean ishoriz;
boolean isvert;
public Segment(int x1s, int y1s, int x2s, int y2s)
{
if(x1s>x2s)
{this.x1=x2s;
this.x2=x1s;}
else{
this.x1=x1s;
this.x2=x2s;
}
if(y1s>y2s)
{this.y1=y2s;
this.y2=y1s;}
else{
this.y1=y1s;
this.y2=y2s;
}
int ydif=y2s-y1s;
int xdif=x2s-x1s;
if(ydif==0)
{this.ishoriz=true;
this.m=0;
this.b=x1s;}
else if(xdif==0)
{this.isvert=true;}
else{
this.m=ydif/xdif;
int r = ydif/xdif;
this.b=y1s-(r*x1s);
this.isvert=false;
this.ishoriz=false;
}
}
public Point intersects(Segment s, Segment s2)
{
if(s.ishoriz&&s2.ishoriz)
{return new Point(-1,-1);}
if(s.isvert&&s2.isvert)
{return new Point(-1,-1);}
if(s.isvert)
{int x=s.x1;
if(s2.x1<=x&&s2.x2>=x)
{
int y= (int) ((s2.m*x)+s2.b);
return new Point(x,y);
}
return new Point(-1,-1);
}
if(s2.isvert)
{int x=s2.x1;
if(s.x1<=x&&s.x2>=x)
{
int y= (int) ((s.m*x)+s.b);
return new Point(x,y);
}
return new Point(-1,-1);
}
if(s.m==s2.m)
{return new Point(-1,-1);}
//use substitution
//(s.m-s2.m)x=s2.b-s.b
int x=(int) (s.m-s2.m);
x=(int) ((s2.b-s.b)/x);
//find y
int y=(int) ((x*s.m)+s.b);
if(s.y1<=y&&s.y2>=y&&s2.y1<=y&&s2.y2>=y&&s.x1<=x&&s.x2>=x&&s2.x1<=x&&s2.x2>=x)
{
return new Point(x,y);}
return new Point(-1,-1);
}
public boolean intersected(Segment s, Segment s2)
{
if(s.ishoriz&&s2.ishoriz)
{return false;}
if(s.isvert&&s2.isvert)
{return false;}
if(s.isvert)
{int x=s.x1;
if(s2.x1<=x&&s2.x2>=x)
{
int y= (int) ((s2.m*x)+s2.b);
return true;
}
return false;
}
if(s2.isvert)
{int x=s2.x1;
if(s.x1<=x&&s.x2>=x)
{
int y= (int) ((s.m*x)+s.b);
return true;
}
return false;
}
if(s.m==s2.m)
{return false;}
//use substitution
//(s.m-s2.m)x=s2.b-s.b
int x=(int) (s.m-s2.m);
x=(int) ((s2.b-s.b)/x);
//find y
int y=(int) ((x*s.m)+s.b);
if(s.y1<=y&&s.y2>=y&&s2.y1<=y&&s2.y2>=y&&s.x1<=x&&s.x2>=x&&s2.x1<=x&&s2.x2>=x)
{
return true;}
return false;
}
public boolean intersects2(Segment s, Rect r)
{
Segment top = new Segment(r.left,r.top,r.right,r.top+1);
Segment left = new Segment(r.left,r.top,r.left+1,r.bottom);
Segment bottom = new Segment(r.left,r.bottom,r.right,r.bottom+1);
Segment right = new Segment(r.right,r.top,r.right+1,r.bottom);
boolean topp=s.intersected(s, top);
boolean leftp=s.intersected(s, left);
boolean bottomp=s.intersected(s, bottom);
boolean rightp=s.intersected(s, right);
if(topp)
{return topp;}
if(leftp)
{return leftp;}
if(bottomp)
{return bottomp;}
if(rightp)
{return rightp;}
else {return false;}
}}
[1]: http://docs.oracle.com/javase/6/docs/api/java/awt/geom/Line2D.html
[2]: http://stackoverflow.com/questions/4823789/how-to-check-if-any-point-or-part-of-a-line-is-inside-or-touches-a-rectangle | 3 |
6,391,442 | 06/17/2011 20:29:20 | 638,649 | 03/01/2011 02:12:20 | 1,189 | 59 | python check if utf-8 string is upper. |
I am having trouble with .isupper() when I have a utf-8 encoded string. I have a lot of text files I am converting to xml. While the text is very variable the format is static. words in all caps should be wrapped in `<title>` tags and everything else `<p>`. It is considerably more complex then this, but this should be sufficent for my question.
My problem is that this is an utf-8 file. This is a must, as there will be <strike>some</strike> many non-English characters in the final output. This may be time to provide a brief example:
**inputText.txt**
> RÉSUMÉ
>
> Bacon ipsum dolor sit amet strip steak
> t-bone chicken, irure ground round
> nostrud aute pancetta ham hock
> incididunt aliqua. Dolore short loin
> ex chicken, chuck drumstick ut
> hamburger ut andouille. In laborum
> eiusmod short loin, spare ribs enim
> ball tip sausage. Tenderloin ut
> consequat flank. Tempor officia
> sirloin duis. In pancetta do, ut
> dolore t-bone sint pork pariatur
> dolore chicken exercitation. Nostrud
> ribeye tail, ut ullamco venison mollit
> pork chop proident consectetur fugiat
> reprehenderit officia ut tri-tip.
**DesiredOutput**
<title>RÉSUMÉ</title>
<p>Bacon ipsum dolor sit amet strip steak t-bone chicken, irure ground round nostrud
aute pancetta ham hock incididunt aliqua. Dolore short loin ex chicken, chuck drumstick
ut hamburger ut andouille. In laborum eiusmod short loin, spare ribs enim ball tip sausage.
Tenderloin ut consequat flank. Tempor officia sirloin duis. In pancetta do, ut dolore t-bone
sint pork pariatur dolore chicken exercitation. Nostrud ribeye tail, ut ullamco venison
mollit pork chop proident consectetur fugiat reprehenderit officia ut tri-tip.
</p>
**Sample Code**
#!/usr/local/bin/python2.7
# yes this is an alt-install of python
import codecs
import sys
import re
from xml.dom.minidom import Document
def mian():
fn = sys.argv[1]
input = codecs.open(fn, 'r', 'utf-8')
output = codecs.open('desiredOut.xml', 'w', 'utf-8')
doc = Documents()
doc = parseInput(input,doc)
print>>output, doc.toprettyxml(indent=' ',encoding='UTF-8')
def parseInput(input, doc):
tokens = [re.split(r'\b', line.strip()) for line in input if line != '\n'] #remove blank lines
for i in range(len(tokens)):
# THIS IS MY PROBLEM. .isupper() is never true.
if str(tokens[i]).isupper():
title = doc.createElement('title')
tText = str(tokens[i]).strip('[\']')
titleText = doc.createTextNode(tText.title())
doc.appendChild(title)
title.appendChild(titleText)
else:
p = doc.createElement('p')
pText = str(tokens[i]).strip('[\']')
paraText = doc.createTextNode(pText)
doc.appendChild(p)
p.appenedChild(paraText)
return doc
if __name__ == '__main__':
main()
ultimately it is pretty straight forward, I would accept critiques or suggestions on my code. Who wouldn't? In particular I am unhappy with `str(tokens[i])` perhaps there is a better way to loop through a list of strings?
But the *purpose of this question* is to figure out the most efficient way to check if an utf-8 string is capitalized. Perhaps I should look into crafting a regex for this.
Do note, I did not run this code and it may not run just right. I hand picked the parts from working code and may have mistyped something. Alert me and I will correct it. lastly, note I am not using lxml | python | xml | regex | utf-8 | null | null | open | python check if utf-8 string is upper.
===
I am having trouble with .isupper() when I have a utf-8 encoded string. I have a lot of text files I am converting to xml. While the text is very variable the format is static. words in all caps should be wrapped in `<title>` tags and everything else `<p>`. It is considerably more complex then this, but this should be sufficent for my question.
My problem is that this is an utf-8 file. This is a must, as there will be <strike>some</strike> many non-English characters in the final output. This may be time to provide a brief example:
**inputText.txt**
> RÉSUMÉ
>
> Bacon ipsum dolor sit amet strip steak
> t-bone chicken, irure ground round
> nostrud aute pancetta ham hock
> incididunt aliqua. Dolore short loin
> ex chicken, chuck drumstick ut
> hamburger ut andouille. In laborum
> eiusmod short loin, spare ribs enim
> ball tip sausage. Tenderloin ut
> consequat flank. Tempor officia
> sirloin duis. In pancetta do, ut
> dolore t-bone sint pork pariatur
> dolore chicken exercitation. Nostrud
> ribeye tail, ut ullamco venison mollit
> pork chop proident consectetur fugiat
> reprehenderit officia ut tri-tip.
**DesiredOutput**
<title>RÉSUMÉ</title>
<p>Bacon ipsum dolor sit amet strip steak t-bone chicken, irure ground round nostrud
aute pancetta ham hock incididunt aliqua. Dolore short loin ex chicken, chuck drumstick
ut hamburger ut andouille. In laborum eiusmod short loin, spare ribs enim ball tip sausage.
Tenderloin ut consequat flank. Tempor officia sirloin duis. In pancetta do, ut dolore t-bone
sint pork pariatur dolore chicken exercitation. Nostrud ribeye tail, ut ullamco venison
mollit pork chop proident consectetur fugiat reprehenderit officia ut tri-tip.
</p>
**Sample Code**
#!/usr/local/bin/python2.7
# yes this is an alt-install of python
import codecs
import sys
import re
from xml.dom.minidom import Document
def mian():
fn = sys.argv[1]
input = codecs.open(fn, 'r', 'utf-8')
output = codecs.open('desiredOut.xml', 'w', 'utf-8')
doc = Documents()
doc = parseInput(input,doc)
print>>output, doc.toprettyxml(indent=' ',encoding='UTF-8')
def parseInput(input, doc):
tokens = [re.split(r'\b', line.strip()) for line in input if line != '\n'] #remove blank lines
for i in range(len(tokens)):
# THIS IS MY PROBLEM. .isupper() is never true.
if str(tokens[i]).isupper():
title = doc.createElement('title')
tText = str(tokens[i]).strip('[\']')
titleText = doc.createTextNode(tText.title())
doc.appendChild(title)
title.appendChild(titleText)
else:
p = doc.createElement('p')
pText = str(tokens[i]).strip('[\']')
paraText = doc.createTextNode(pText)
doc.appendChild(p)
p.appenedChild(paraText)
return doc
if __name__ == '__main__':
main()
ultimately it is pretty straight forward, I would accept critiques or suggestions on my code. Who wouldn't? In particular I am unhappy with `str(tokens[i])` perhaps there is a better way to loop through a list of strings?
But the *purpose of this question* is to figure out the most efficient way to check if an utf-8 string is capitalized. Perhaps I should look into crafting a regex for this.
Do note, I did not run this code and it may not run just right. I hand picked the parts from working code and may have mistyped something. Alert me and I will correct it. lastly, note I am not using lxml | 0 |
208,828 | 10/16/2008 14:40:15 | 6,617 | 09/15/2008 12:22:19 | 667 | 35 | What conventions exist for ordering arguments in methods? | A colleague and I are discussing best practices regarding ordering method parameters. The goal is to establish a standard in our organization to improve readability and productivity by giving our methods common signatures. We are merely establishing guidelines for the recent grads we are hiring.
**Example (userId is always passed in to audit the calls):**
GetOrders(string userId, int customerId);
GetOrders(string userId, int[] orderIds);
GetCustomer(string userId, int customerId);
My argument is the following:
1. common arguments are left most.
2. remaining arguments are based on importance
3. optional (nullable) arguments last.
His argument is essentially the opposite.
I'm not asking for a right or wrong answer here, nor a discussion. I just want to see what standards exist already.
Thanks! | oop | coding-style | null | null | null | null | open | What conventions exist for ordering arguments in methods?
===
A colleague and I are discussing best practices regarding ordering method parameters. The goal is to establish a standard in our organization to improve readability and productivity by giving our methods common signatures. We are merely establishing guidelines for the recent grads we are hiring.
**Example (userId is always passed in to audit the calls):**
GetOrders(string userId, int customerId);
GetOrders(string userId, int[] orderIds);
GetCustomer(string userId, int customerId);
My argument is the following:
1. common arguments are left most.
2. remaining arguments are based on importance
3. optional (nullable) arguments last.
His argument is essentially the opposite.
I'm not asking for a right or wrong answer here, nor a discussion. I just want to see what standards exist already.
Thanks! | 0 |
9,239,381 | 02/11/2012 10:10:23 | 1,026,240 | 11/02/2011 18:12:49 | 137 | 2 | GPS location and city name using TerraService or other | I have a simple app that is retrieving the current location via GPS and displays my current location. The problem is that the web service I'm using for getting the city name ([TerraService][1]) doesn't work with non English characters.
Also I want to be able to customize the format of the returned data. Now it can give me "1km SW Bart, Redmond, United States" and thats not good.
Do you know how to customize it and get it to work with non English characters?
[1]: http://msrmaps.com/TerraService2.asmx | web-services | windows-phone-7 | gps | null | null | null | open | GPS location and city name using TerraService or other
===
I have a simple app that is retrieving the current location via GPS and displays my current location. The problem is that the web service I'm using for getting the city name ([TerraService][1]) doesn't work with non English characters.
Also I want to be able to customize the format of the returned data. Now it can give me "1km SW Bart, Redmond, United States" and thats not good.
Do you know how to customize it and get it to work with non English characters?
[1]: http://msrmaps.com/TerraService2.asmx | 0 |
10,470,616 | 05/06/2012 12:48:29 | 1,326,939 | 04/11/2012 15:10:16 | 23 | 0 | PHP display error | I've created the following code but for some reason it is echoing **Array** instead of the result:
<?
include("../config.php");
include("functions.php");
$count = "SELECT `monthly_slots` FROM users WHERE `username` = 'Bill'";
$count = mysql_query($count);
$data = mysql_fetch_assoc($count);
echo "$data";
?>
Any ideas?
I have no idea why it is outputting Array because there should only be one result from that query.
| php | mysql | null | null | null | null | open | PHP display error
===
I've created the following code but for some reason it is echoing **Array** instead of the result:
<?
include("../config.php");
include("functions.php");
$count = "SELECT `monthly_slots` FROM users WHERE `username` = 'Bill'";
$count = mysql_query($count);
$data = mysql_fetch_assoc($count);
echo "$data";
?>
Any ideas?
I have no idea why it is outputting Array because there should only be one result from that query.
| 0 |
9,356,840 | 02/20/2012 06:03:07 | 1,208,692 | 02/14/2012 09:12:24 | 1 | 0 | Sync contacts to our own web server | i wanted to create a sample application to sync my contacts to my web server. Are there any good tutorial to learn, how to sync my contacts in my emulator to my own web server..?? Would appreciate your kind help. | android | null | null | null | null | 02/21/2012 11:09:15 | not constructive | Sync contacts to our own web server
===
i wanted to create a sample application to sync my contacts to my web server. Are there any good tutorial to learn, how to sync my contacts in my emulator to my own web server..?? Would appreciate your kind help. | 4 |
8,196,979 | 11/19/2011 20:18:27 | 1,055,624 | 11/19/2011 19:06:47 | 1 | 0 | Slightly Different Take on Being a Ruby Newbie | I've been banging around with Peter Cooper's excellent book, as well as a few other resources in order to get a foothold in Ruby; now I'd like to go a step further. I'm wondering if I could reinforce what I've learnt by looking at code snippets/basic programs that are simple to follow but also educational for the pre-intermediate.
So, if anyone can recommend some examples that will help someone with a general grasp of syntax, but shows how to create or implement an idea, I would be very grateful. What I'm looking for is something that I can take apart and put back together again in order to get to grips with a concept.
I apologize if this all sounds a bit wooly, but I learn through repetition so the more examples the better. I've been using free online courses, to supplement my learning, but I'm looking for something I can play about with on Ruby when I don't have internet access.
Thanks for taking the time to read this, and I look forward to hearing from you. | ruby | null | null | null | null | 11/19/2011 22:37:36 | not constructive | Slightly Different Take on Being a Ruby Newbie
===
I've been banging around with Peter Cooper's excellent book, as well as a few other resources in order to get a foothold in Ruby; now I'd like to go a step further. I'm wondering if I could reinforce what I've learnt by looking at code snippets/basic programs that are simple to follow but also educational for the pre-intermediate.
So, if anyone can recommend some examples that will help someone with a general grasp of syntax, but shows how to create or implement an idea, I would be very grateful. What I'm looking for is something that I can take apart and put back together again in order to get to grips with a concept.
I apologize if this all sounds a bit wooly, but I learn through repetition so the more examples the better. I've been using free online courses, to supplement my learning, but I'm looking for something I can play about with on Ruby when I don't have internet access.
Thanks for taking the time to read this, and I look forward to hearing from you. | 4 |
4,361,829 | 12/05/2010 22:59:43 | 335,036 | 10/06/2008 18:02:50 | 963 | 23 | AIR vs Autohotkey vs C# for quick windows form + output | I've been using Autohotkey to create quickie GUI apps that take data, apply styles and formatting, and output to clipboard or to a flat file. These are "mini applications" for users who need to work in an HTML environment but don't know anything about tags.
I've thought about going beyond Autohotkey and I'm looking at both Windows Forms (C#) and Adobe AIR.
As someone with some winforms and AHK experience, is Air something I could pick up? I might have a couple of Mac or Linux users, but that's not my sole criteria. | c# | winforms | air | null | null | null | open | AIR vs Autohotkey vs C# for quick windows form + output
===
I've been using Autohotkey to create quickie GUI apps that take data, apply styles and formatting, and output to clipboard or to a flat file. These are "mini applications" for users who need to work in an HTML environment but don't know anything about tags.
I've thought about going beyond Autohotkey and I'm looking at both Windows Forms (C#) and Adobe AIR.
As someone with some winforms and AHK experience, is Air something I could pick up? I might have a couple of Mac or Linux users, but that's not my sole criteria. | 0 |
10,241,334 | 04/20/2012 06:31:40 | 1,300,585 | 03/29/2012 11:05:18 | 13 | 0 | I want to see solutions - floating point variables | Actually I want to see "equal" phrase. At least some solutions.
in Python:
x = 1.5
y = 2.5
for i in range(0, 10):
x += 0.1
print('equal' if x == y else 'not equal')
print(x)
in Ruby:
x = 1.5
y = 2.5
for i in 1..10
x += 0.1
end
puts x == y ? 'equal' : 'not equal'
puts x
in PHP:
$x = 1.5;
$y = 2.5;
for ($i=0; $i<10; $i++)
$x += 0.1;
echo $x == $y ? 'equal' : 'not equal';
echo $x;
| php | python | ruby | null | null | 04/20/2012 07:08:16 | not a real question | I want to see solutions - floating point variables
===
Actually I want to see "equal" phrase. At least some solutions.
in Python:
x = 1.5
y = 2.5
for i in range(0, 10):
x += 0.1
print('equal' if x == y else 'not equal')
print(x)
in Ruby:
x = 1.5
y = 2.5
for i in 1..10
x += 0.1
end
puts x == y ? 'equal' : 'not equal'
puts x
in PHP:
$x = 1.5;
$y = 2.5;
for ($i=0; $i<10; $i++)
$x += 0.1;
echo $x == $y ? 'equal' : 'not equal';
echo $x;
| 1 |
3,640,705 | 09/04/2010 02:54:51 | 309,616 | 04/06/2010 00:02:07 | 53 | 0 | Latex for Mac OS X | Does anyone know of a latex distribution/front end they highly recommend for OS X?
If the front end had some features you recommend, what are they and why?
Thanks! | osx | latex | latex-environment | null | null | 09/04/2010 15:47:58 | off topic | Latex for Mac OS X
===
Does anyone know of a latex distribution/front end they highly recommend for OS X?
If the front end had some features you recommend, what are they and why?
Thanks! | 2 |
9,636,731 | 03/09/2012 15:36:48 | 900,785 | 08/18/2011 14:21:52 | 16 | 0 | Linux on Freescale ARM Board | I have a Freescale IMX board with me and I am just starting to get my hands dirty running a linux on it. I got a RootFs(tar ball) and a boot tarball of the linux that I want to see running on Imx. Can I simply compile the kernel with the arm tool chain and then copy the image, the bootloader etc as instructed here: http://eewiki.net/display/linuxonarm/i.MX51+EV
Would the BSP of the IMX linux just suffice for any linux? Where to start? Please help | linux | arm | bsp | freescale | null | 03/20/2012 05:32:39 | off topic | Linux on Freescale ARM Board
===
I have a Freescale IMX board with me and I am just starting to get my hands dirty running a linux on it. I got a RootFs(tar ball) and a boot tarball of the linux that I want to see running on Imx. Can I simply compile the kernel with the arm tool chain and then copy the image, the bootloader etc as instructed here: http://eewiki.net/display/linuxonarm/i.MX51+EV
Would the BSP of the IMX linux just suffice for any linux? Where to start? Please help | 2 |
9,747,749 | 03/17/2012 06:12:57 | 115,781 | 06/02/2009 05:09:30 | 2,204 | 7 | How to reduce overhead in my C program? | I am using C on linux, and my program is both of high CPU-density an I/O-density. Using time command shows that my program having much overhead:
real 1m4.639s
user 0m53.929s
sys 0m9.747s
Is that possible to find out what costs 'sys 0m9.747s' and reduce it?
=================================================
Excuse me if this question isn't easy to answer without the code, but my code is too long to be posted here. So any tips or clues will also do. Thank you | c | linux | optimization | null | null | 03/18/2012 12:41:15 | not a real question | How to reduce overhead in my C program?
===
I am using C on linux, and my program is both of high CPU-density an I/O-density. Using time command shows that my program having much overhead:
real 1m4.639s
user 0m53.929s
sys 0m9.747s
Is that possible to find out what costs 'sys 0m9.747s' and reduce it?
=================================================
Excuse me if this question isn't easy to answer without the code, but my code is too long to be posted here. So any tips or clues will also do. Thank you | 1 |
7,308,923 | 09/05/2011 13:40:10 | 928,984 | 09/05/2011 13:40:10 | 1 | 0 | Small PHP MVC framework with namespaces | I'm looking for a very small MVC framework, or just sample architecture, that makes use of namespaces. I'm a bit curious on how to do it and would like to see a small example of that. Thanks! Any tips or links? | php | namespaces | null | null | null | 09/05/2011 20:00:09 | not constructive | Small PHP MVC framework with namespaces
===
I'm looking for a very small MVC framework, or just sample architecture, that makes use of namespaces. I'm a bit curious on how to do it and would like to see a small example of that. Thanks! Any tips or links? | 4 |
9,762,392 | 03/18/2012 21:21:55 | 435,176 | 08/30/2010 16:50:08 | 145 | 3 | Where to have an SVN repository | I would like to set up my own SVN repository on my hosting account but I have shared hosting and don't have the funds right now or a significant startup site to actually get a VPS. Is there shared hosting out there that enables you to do this? I may not be that knowledgeable on this so please inform me if I am wrong. I am new to SVN and know that there are free SVN hosting out there like Codesion but I would like the ability to be able to post-commit after every commit. I believe I am using the right terminology, but basically I want a production environment where I will have a subdomain for development and testing purposes that whenever an SVN commit is made to my SVN repository it will automatically update that to my development subdomain and export the files. This way all changes that everyone makes can be seen in that subdomain.
I am currently the only one working on the website but I may be having some more friends work on it with me and I'd like the ability to use SVN this way. Am I going about this the right way? Is there a better solution to this regarding my resources? What is the best practice to managing a working website like this that will constantly be updated and have new features.
Please, any help would be greatly appreciated.
| svn | web-hosting | null | null | null | 03/19/2012 12:11:52 | not constructive | Where to have an SVN repository
===
I would like to set up my own SVN repository on my hosting account but I have shared hosting and don't have the funds right now or a significant startup site to actually get a VPS. Is there shared hosting out there that enables you to do this? I may not be that knowledgeable on this so please inform me if I am wrong. I am new to SVN and know that there are free SVN hosting out there like Codesion but I would like the ability to be able to post-commit after every commit. I believe I am using the right terminology, but basically I want a production environment where I will have a subdomain for development and testing purposes that whenever an SVN commit is made to my SVN repository it will automatically update that to my development subdomain and export the files. This way all changes that everyone makes can be seen in that subdomain.
I am currently the only one working on the website but I may be having some more friends work on it with me and I'd like the ability to use SVN this way. Am I going about this the right way? Is there a better solution to this regarding my resources? What is the best practice to managing a working website like this that will constantly be updated and have new features.
Please, any help would be greatly appreciated.
| 4 |
5,547,333 | 04/05/2011 04:48:43 | 645,748 | 02/23/2011 09:36:06 | 1 | 0 | include_path='.;C:\php5\pear' | hi i want to change my include_path with
include_path='.;C:\wamp\www\PMS\include' .
i am using wamp server plese tell me how can i change it | php | wamp | null | null | null | 04/05/2011 09:33:49 | not a real question | include_path='.;C:\php5\pear'
===
hi i want to change my include_path with
include_path='.;C:\wamp\www\PMS\include' .
i am using wamp server plese tell me how can i change it | 1 |
2,739,829 | 04/29/2010 18:35:44 | 200,586 | 11/01/2009 19:40:19 | 1 | 1 | Additional Pssnapins | I can see the 6 or so native PSSnapins, thanks to get-PSSnapin
I have added the useful QAD snapins, thanks to add-PSSnapin
My question is could you recommend any other useful third-party Snapins for PowerShell? | powershell-v2.0 | pssnapin | null | null | null | 10/11/2011 16:09:55 | not constructive | Additional Pssnapins
===
I can see the 6 or so native PSSnapins, thanks to get-PSSnapin
I have added the useful QAD snapins, thanks to add-PSSnapin
My question is could you recommend any other useful third-party Snapins for PowerShell? | 4 |
1,250,233 | 08/09/2009 00:18:17 | 54,964 | 01/14/2009 11:38:17 | 1,505 | 89 | To sanitize all user's input in PostgreSQL by PHP | This question is based on [this thread][1].
**Do you need the explicit sanitizing when you use pg_prepare?**
I feel that pg_prepare sanitizes the user's input automatically such that we do not need this
$question_id = filter_input(INPUT_GET, 'questions', FILTER_SANITIZE_NUMBER_INT);
[1]: http://stackoverflow.com/questions/1249671/to-generate-a-question-for-a-given-user-in-postgresql-by-php/1249816#1249816 | postgresql | php | sanitize | null | null | null | open | To sanitize all user's input in PostgreSQL by PHP
===
This question is based on [this thread][1].
**Do you need the explicit sanitizing when you use pg_prepare?**
I feel that pg_prepare sanitizes the user's input automatically such that we do not need this
$question_id = filter_input(INPUT_GET, 'questions', FILTER_SANITIZE_NUMBER_INT);
[1]: http://stackoverflow.com/questions/1249671/to-generate-a-question-for-a-given-user-in-postgresql-by-php/1249816#1249816 | 0 |
3,450,386 | 08/10/2010 15:05:24 | 238,779 | 12/26/2009 08:54:17 | 1,187 | 68 | What all points should I consider while making asp.net application for torrent ? | What all points should I consider while making asp.net application for torrent ?
The application would allow user to browse, upload, download torrents. Further is there any particular standard for making torrents. Kindly share and enlighten.
Thanks in advance. | c# | .net | asp.net | vb.net | project-planning | null | open | What all points should I consider while making asp.net application for torrent ?
===
What all points should I consider while making asp.net application for torrent ?
The application would allow user to browse, upload, download torrents. Further is there any particular standard for making torrents. Kindly share and enlighten.
Thanks in advance. | 0 |
2,608,184 | 04/09/2010 14:17:05 | 290,410 | 03/10/2010 10:39:43 | 15 | 1 | Validation is more sensible at which Level Views Level or Model level in asp.net MVC | Validation is more sensible at which Level Views Level or Model level in asp.net MVC
& also link of good Tutorial on Validation in MVC ? | validation | mvc | null | null | null | null | open | Validation is more sensible at which Level Views Level or Model level in asp.net MVC
===
Validation is more sensible at which Level Views Level or Model level in asp.net MVC
& also link of good Tutorial on Validation in MVC ? | 0 |
4,513,244 | 12/22/2010 20:06:45 | 442,823 | 09/08/2010 20:42:12 | 28 | 1 | Does anyone know how they did this uikeyboard? | see this keyboard:
Does anyone know how they did? | objective-c | null | null | null | null | 12/22/2010 21:50:11 | not a real question | Does anyone know how they did this uikeyboard?
===
see this keyboard:
Does anyone know how they did? | 1 |
5,102,580 | 02/24/2011 09:14:22 | 128,618 | 06/25/2009 04:43:13 | 327 | 8 | Round php's number and and covert the rounded number? | Round php's number and and covert the rounded number?
$n = -5665.36;
->$new_n = round($n);
>>> $new_n = -5665;
My Approach:
if($m=1)
$p= $n;
if($m=10)
$p = 5660
if($m=100)
$p = 5600
if($m=1000)
$p = 5000
Anybody know which php` math function` OR the `good ways` to do it use to get value of $p as expected here
| php | null | null | null | null | null | open | Round php's number and and covert the rounded number?
===
Round php's number and and covert the rounded number?
$n = -5665.36;
->$new_n = round($n);
>>> $new_n = -5665;
My Approach:
if($m=1)
$p= $n;
if($m=10)
$p = 5660
if($m=100)
$p = 5600
if($m=1000)
$p = 5000
Anybody know which php` math function` OR the `good ways` to do it use to get value of $p as expected here
| 0 |
1,812,199 | 11/28/2009 10:30:36 | 92,319 | 04/17/2009 19:55:27 | 69 | 1 | hpricot problem | I am trying to use hpricot in a controller. I would like to pass this value to a html.erb page so I can display it on the screen
So I wrote this:
session[:allcars] = (doc/"td.car_title/text()")
but this gives an error
when I tried this:
puts (doc/"td.car_title/text()")
this printed the cars into the console.
So I can't understand what I'm doing wrong :S
Thanks | hpricot | ruby-on-rails | null | null | null | null | open | hpricot problem
===
I am trying to use hpricot in a controller. I would like to pass this value to a html.erb page so I can display it on the screen
So I wrote this:
session[:allcars] = (doc/"td.car_title/text()")
but this gives an error
when I tried this:
puts (doc/"td.car_title/text()")
this printed the cars into the console.
So I can't understand what I'm doing wrong :S
Thanks | 0 |
5,291,341 | 03/13/2011 18:08:15 | 230,348 | 12/12/2009 16:42:24 | 214 | 15 | What is the event which raise when a processes comes up | I want to act with a service (kill the procces) whenever a process (executable file) comes up. <br>
Obviusly it is an Event but I don't know what event is.<br>
Is there someone to assist me on this?
| .net | windows | vb.net | visual-studio-2010 | null | null | open | What is the event which raise when a processes comes up
===
I want to act with a service (kill the procces) whenever a process (executable file) comes up. <br>
Obviusly it is an Event but I don't know what event is.<br>
Is there someone to assist me on this?
| 0 |
2,639,956 | 04/14/2010 18:25:41 | 194,967 | 10/22/2009 23:14:39 | 99 | 4 | JQuery: How to select all elements except input and textarea? | I am trying to disable the backspace key in my jQuery app, so that it does not cause the browser to go back a page. However, I do not want to disable it if an input or textarea element is focused, because I want backspace to work properly there.
So, I want to select anything that is not an input or textarea.
Here is the code. The problem is that it fires for every element, even inputs and textareas.
$(':not(input, textarea)').keydown(function(e) {
if (e.keyCode === 8) {
return false;
}
});
I do not understand why the :not() function is not working. Is there a better way I can do this?
Note that if I remove the :not() function, it works properly. That is, it only fires for input and textarea elements.
| jquery | jquery-selectors | null | null | null | null | open | JQuery: How to select all elements except input and textarea?
===
I am trying to disable the backspace key in my jQuery app, so that it does not cause the browser to go back a page. However, I do not want to disable it if an input or textarea element is focused, because I want backspace to work properly there.
So, I want to select anything that is not an input or textarea.
Here is the code. The problem is that it fires for every element, even inputs and textareas.
$(':not(input, textarea)').keydown(function(e) {
if (e.keyCode === 8) {
return false;
}
});
I do not understand why the :not() function is not working. Is there a better way I can do this?
Note that if I remove the :not() function, it works properly. That is, it only fires for input and textarea elements.
| 0 |
7,546,544 | 09/25/2011 15:36:42 | 865,477 | 07/27/2011 13:25:18 | 323 | 13 | zero-one programming(with out assembly) | as you know what we program in assembly like add,mov or ... will decode to zero-one code.
for e.g <code>ADD</code> decode to <code>11110000</code>.
now I wanna try to program only by zero-one.please help me where should I program it.(does it have any IDE or something like that?) and where can I access all zero-one code and learn it?(specially web site or eBook).
Thanks for your advice | assembly | null | null | null | null | 09/25/2011 15:39:58 | not a real question | zero-one programming(with out assembly)
===
as you know what we program in assembly like add,mov or ... will decode to zero-one code.
for e.g <code>ADD</code> decode to <code>11110000</code>.
now I wanna try to program only by zero-one.please help me where should I program it.(does it have any IDE or something like that?) and where can I access all zero-one code and learn it?(specially web site or eBook).
Thanks for your advice | 1 |
10,212,298 | 04/18/2012 15:06:55 | 1,327,446 | 04/11/2012 19:19:18 | 1 | 0 | Setting a minimum size of the inside of a JFrame | I'm currently using myFrame.setMinimumSize() to set the minimum size of the window to 640x480.
Right now, it works, except that the 640x480 includes the window decorations.
How would I set the minimum size of the content pane so that the user cannot resize the window smaller than that?
(If I use myFrame.getContentPane().setMinimumSize(), the user can still resize the JFrame.) | size | jframe | minimum | null | null | null | open | Setting a minimum size of the inside of a JFrame
===
I'm currently using myFrame.setMinimumSize() to set the minimum size of the window to 640x480.
Right now, it works, except that the 640x480 includes the window decorations.
How would I set the minimum size of the content pane so that the user cannot resize the window smaller than that?
(If I use myFrame.getContentPane().setMinimumSize(), the user can still resize the JFrame.) | 0 |
7,575,769 | 09/27/2011 21:14:12 | 641,418 | 03/02/2011 15:06:37 | 1,295 | 92 | jpg looks different in firefox 6 and 7 on Windows 7 | [This][1] website renders a background jpg differently than it did in Firefox 5 and below on Windows 7. I know that's a bit confusing so I'll outline it.
**It works:**
All versions of firefox, chrome, and IE on windows XP
All versions of chrome, IE, and firefox 5 and below on windows 7
Example:
![enter image description here][2]
**It doesn't work:**
Firefox 6 and above on Windows 7
Example:
![enter image description here][3]
The website is repeating the gradient jpg horizontally. It then tries to make the background color the same color as the bottom of that gradient.
Thanks again SO.
[1]: http://www.dps.state.ok.us/ohp/tngrct/ohpweb/index.html
[2]: http://i.stack.imgur.com/PVyeU.png
[3]: http://i.stack.imgur.com/L6K3f.png | css | firefox | windows-7 | jpg | null | 10/20/2011 14:35:15 | off topic | jpg looks different in firefox 6 and 7 on Windows 7
===
[This][1] website renders a background jpg differently than it did in Firefox 5 and below on Windows 7. I know that's a bit confusing so I'll outline it.
**It works:**
All versions of firefox, chrome, and IE on windows XP
All versions of chrome, IE, and firefox 5 and below on windows 7
Example:
![enter image description here][2]
**It doesn't work:**
Firefox 6 and above on Windows 7
Example:
![enter image description here][3]
The website is repeating the gradient jpg horizontally. It then tries to make the background color the same color as the bottom of that gradient.
Thanks again SO.
[1]: http://www.dps.state.ok.us/ohp/tngrct/ohpweb/index.html
[2]: http://i.stack.imgur.com/PVyeU.png
[3]: http://i.stack.imgur.com/L6K3f.png | 2 |
3,498,263 | 08/16/2010 23:38:05 | 398,417 | 07/21/2010 20:03:09 | 32 | 0 | Python: openssl segmentation fault | I followed the instrunction on this site http://paltman.com/2007/nov/15/getting-ssl-support-in-python-251/ to install openssl.
When I go to test i get this as the output:
test_rude_shutdown ...
test_basic ...
Segmentation fault
How would I resolve this?
| python | openssl | null | null | null | null | open | Python: openssl segmentation fault
===
I followed the instrunction on this site http://paltman.com/2007/nov/15/getting-ssl-support-in-python-251/ to install openssl.
When I go to test i get this as the output:
test_rude_shutdown ...
test_basic ...
Segmentation fault
How would I resolve this?
| 0 |
10,848,058 | 06/01/2012 09:49:55 | 1,210,927 | 02/15/2012 09:35:39 | 1 | 2 | Wkhtmltopdf margin (top and bottom) | Iam using wkhtmltopdf 0.10.0 rc2
on a : Linux 3.2.0-24-generic #38-Ubuntu x86_64 GNU/Linux
I can't create pdf's with margin-top or margin-bottom (no errors)
I'm using the command bellow:
wkhtmotopdf -T 50 -B 50 http://google.com ./test.pdf
wkhtmotopdf --margin-top 50 --margin-bottom 50 page.html ./test.pdf
When i try this:
wkhtmotopdf -L 50 -R 50 -T 50 -B 50 page.html ./test.pdf
Margin left and right works perfect (still no margin-top/margin-bottom)
it dosn't matter wich URL or page i convert | linux | pdf | ubuntu | margin | wkhtmltopdf | 06/02/2012 16:23:09 | off topic | Wkhtmltopdf margin (top and bottom)
===
Iam using wkhtmltopdf 0.10.0 rc2
on a : Linux 3.2.0-24-generic #38-Ubuntu x86_64 GNU/Linux
I can't create pdf's with margin-top or margin-bottom (no errors)
I'm using the command bellow:
wkhtmotopdf -T 50 -B 50 http://google.com ./test.pdf
wkhtmotopdf --margin-top 50 --margin-bottom 50 page.html ./test.pdf
When i try this:
wkhtmotopdf -L 50 -R 50 -T 50 -B 50 page.html ./test.pdf
Margin left and right works perfect (still no margin-top/margin-bottom)
it dosn't matter wich URL or page i convert | 2 |
5,526,315 | 04/02/2011 22:28:50 | 689,321 | 04/02/2011 22:28:50 | 1 | 0 | White vs Black LED - Fatigue factor | Does anyone have a scientific reference that can assist me. An advanced photography site has just changed the backdrop from black to white, and is meeting with some rebellion amongst many followers:)
I wish to quote some scientific paper's findings.
Thanks!
PS: I don't quite understand the tag system, so picked what I thought might assist. Sorry. | css | null | null | null | null | 04/02/2011 22:33:45 | off topic | White vs Black LED - Fatigue factor
===
Does anyone have a scientific reference that can assist me. An advanced photography site has just changed the backdrop from black to white, and is meeting with some rebellion amongst many followers:)
I wish to quote some scientific paper's findings.
Thanks!
PS: I don't quite understand the tag system, so picked what I thought might assist. Sorry. | 2 |
9,706,975 | 03/14/2012 17:28:01 | 458,097 | 07/30/2010 16:53:20 | 109 | 1 | sqlalchemy trouble with non ascii char in columnH | Hi I have a db in mysql I want access to with sqlalchemy, most of the times everithings is fine, but I have some columns with accented char like ò,è etc when I try to load from the db a row with sqlalchemy, python raises an exception even before I try to use the filed with the accent, I get this error
UnicodeDecodeError: 'utf8' codec can't decode byte 0xd2 in position 13: unexpected end of data
this is my class definition
class Pv(Base):
__tablename__='pv'
pv_id = Column(Integer, primary_key=True)
codice = Column(Unicode)
pref_mmas =Column(Unicode)
cod_mmas =Column(Integer)
certificato =Column(Boolean)
pv_mt = Column(Boolean)
cliente= Column(Boolean)
cod_cliente =Column(Unicode)
ragione_sociale =Column('nome1',Unicode(50))
titolare = Column('nome2',Unicode(50))
tc_istat_id=Column(Integer)
indirizzo =Column(Unicode(100))
cap =Column(Unicode)
comune =Column(Unicode)
provincia =Column(Unicode(2))
tel1 =Column(Unicode(20))
tel2 =Column(Unicode(20))
tel3 =Column(Unicode(20))
cf_pi =Column(Unicode)
fax =Column(Unicode)
sito =Column(Unicode)
email =Column(Unicode)
note =Column(Unicode)
data_aggiornamento =Column(DateTime)
tc_stato_id =Column(Integer)
ins_data =Column(DateTime)
ins_utente =Column(Integer)
mod_data =Column(DateTime)
mod_utente =Column(Integer)
| python | sqlalchemy | null | null | null | 04/15/2012 03:53:10 | too localized | sqlalchemy trouble with non ascii char in columnH
===
Hi I have a db in mysql I want access to with sqlalchemy, most of the times everithings is fine, but I have some columns with accented char like ò,è etc when I try to load from the db a row with sqlalchemy, python raises an exception even before I try to use the filed with the accent, I get this error
UnicodeDecodeError: 'utf8' codec can't decode byte 0xd2 in position 13: unexpected end of data
this is my class definition
class Pv(Base):
__tablename__='pv'
pv_id = Column(Integer, primary_key=True)
codice = Column(Unicode)
pref_mmas =Column(Unicode)
cod_mmas =Column(Integer)
certificato =Column(Boolean)
pv_mt = Column(Boolean)
cliente= Column(Boolean)
cod_cliente =Column(Unicode)
ragione_sociale =Column('nome1',Unicode(50))
titolare = Column('nome2',Unicode(50))
tc_istat_id=Column(Integer)
indirizzo =Column(Unicode(100))
cap =Column(Unicode)
comune =Column(Unicode)
provincia =Column(Unicode(2))
tel1 =Column(Unicode(20))
tel2 =Column(Unicode(20))
tel3 =Column(Unicode(20))
cf_pi =Column(Unicode)
fax =Column(Unicode)
sito =Column(Unicode)
email =Column(Unicode)
note =Column(Unicode)
data_aggiornamento =Column(DateTime)
tc_stato_id =Column(Integer)
ins_data =Column(DateTime)
ins_utente =Column(Integer)
mod_data =Column(DateTime)
mod_utente =Column(Integer)
| 3 |
9,435,007 | 02/24/2012 17:11:01 | 1,231,289 | 02/24/2012 17:09:58 | 1 | 0 | Payment of Fees | i have four tables ...
student : contain the students id and name etc..
student_fee : contains the paid_date, student_id and fee_id with reference to student and fee table
fee : contains the fee_id, fee amount, fee_typeid (ref to fee_type table)
fee_type : contain the fee_typeid and type of fees ... admission fee, monthly tuition fee, fines, uniform fees etc..
How do i display the students who had already paid the admission fee (or fee_typeid for admission fee) and those who had not pay it ..
| mysql | null | null | null | null | 02/24/2012 17:33:35 | not a real question | Payment of Fees
===
i have four tables ...
student : contain the students id and name etc..
student_fee : contains the paid_date, student_id and fee_id with reference to student and fee table
fee : contains the fee_id, fee amount, fee_typeid (ref to fee_type table)
fee_type : contain the fee_typeid and type of fees ... admission fee, monthly tuition fee, fines, uniform fees etc..
How do i display the students who had already paid the admission fee (or fee_typeid for admission fee) and those who had not pay it ..
| 1 |
9,943,813 | 03/30/2012 13:20:09 | 739,356 | 05/05/2011 06:57:04 | 45 | 1 | Concept: Is mongo right for applying schemas? | I am currently in charge of checking wether it is valuable for one of our upcoming products to be developed on mongo.
Without going too much into detail, I'll try to explain, what the app does.
The app simply has "entities". These entities are technical stuff, like cell phones, TVs, Laptops, tablet pcs, and so forth.
Of course, a cell phone has other attributes than a Tablet PCs and a Laptop has even other attributes, like RAM, CPU, display size and so on.
Now I want to have something that we wanna call a scheme: We define that we need to have saved the display size, amount of ram size of flash devices, processor type, processor speed and so on for tablet pcs. For cell phone we might save display size, GSM, Edge, 3g, 4g, processor, ram, touch screen technology, bla bla bla. I think you got it :)
What I want to realize is, that each "category" has a schema and when one of the system's users enters a new product (let's say the new iphone 4), the app constructs the form to be filled out with the appropriate attributes.
So far it sounds nice and should not be a problem with mongo. But now the tough for which I could not find a clean solution....
An attribute modeled in mongo looks like:
{
_id: 1234456, name: "Attribute name", type: 0, "description"
}
But what to do, if i need this attribute in several languages, like:
{
en: {name: "Attribute name", type: 0, "description"},
de: {name: "Name des Attributs, type: 0, "Beschreibung"}
}
I also need to ensure that the german attribute gets updated as soon as the english gets updated, for instance when type changes from 0 to 1.
Any ideas on that? | node.js | mongodb | relations | concept | null | null | open | Concept: Is mongo right for applying schemas?
===
I am currently in charge of checking wether it is valuable for one of our upcoming products to be developed on mongo.
Without going too much into detail, I'll try to explain, what the app does.
The app simply has "entities". These entities are technical stuff, like cell phones, TVs, Laptops, tablet pcs, and so forth.
Of course, a cell phone has other attributes than a Tablet PCs and a Laptop has even other attributes, like RAM, CPU, display size and so on.
Now I want to have something that we wanna call a scheme: We define that we need to have saved the display size, amount of ram size of flash devices, processor type, processor speed and so on for tablet pcs. For cell phone we might save display size, GSM, Edge, 3g, 4g, processor, ram, touch screen technology, bla bla bla. I think you got it :)
What I want to realize is, that each "category" has a schema and when one of the system's users enters a new product (let's say the new iphone 4), the app constructs the form to be filled out with the appropriate attributes.
So far it sounds nice and should not be a problem with mongo. But now the tough for which I could not find a clean solution....
An attribute modeled in mongo looks like:
{
_id: 1234456, name: "Attribute name", type: 0, "description"
}
But what to do, if i need this attribute in several languages, like:
{
en: {name: "Attribute name", type: 0, "description"},
de: {name: "Name des Attributs, type: 0, "Beschreibung"}
}
I also need to ensure that the german attribute gets updated as soon as the english gets updated, for instance when type changes from 0 to 1.
Any ideas on that? | 0 |
7,455,105 | 09/17/2011 13:27:03 | 368,230 | 06/16/2010 12:30:36 | 1,186 | 63 | Where can i download an official version of fastboot? | The website [developer.htc.com][1] has changed to [htcdev.com][2]. Now i can't find the link to download `fastboot`.
Where can i download a safe version of `fastboot` for Android?
[1]: http://developer.htc.com
[2]: http://htcdev.com | android | linux | null | null | null | 09/17/2011 21:04:14 | off topic | Where can i download an official version of fastboot?
===
The website [developer.htc.com][1] has changed to [htcdev.com][2]. Now i can't find the link to download `fastboot`.
Where can i download a safe version of `fastboot` for Android?
[1]: http://developer.htc.com
[2]: http://htcdev.com | 2 |
10,514,311 | 05/09/2012 10:32:08 | 1,310,005 | 04/03/2012 09:12:50 | 8 | 0 | Constructing Json for JqPlot Bar Charts | I have managed to create something to populate the JqPlot pie chart (very hard coded – it will be automated). Here is how I’ve done it:
public ActionResult PieChart()
{
return View();
}
public ActionResult PieChartJSON()
{
List<PieChartData> sampleData = new List<PieChartData>();
PieChartData test = new PieChartData();
PieChartData test2 = new PieChartData();
PieChartData test3 = new PieChartData();
PieChartData test4 = new PieChartData();
PieChartData test5 = new PieChartData();
test.Label = "ta";
test.Value = 3;
sampleData.Add(test);
test2.Label = "be";
test2.Value = 5;
sampleData.Add(test2);
test3.Label = "ga";
test3.Value = 3;
sampleData.Add(test3);
test4.Label = "ma";
test4.Value = 8;
sampleData.Add(test4);
test5.Label = "ja";
test5.Value = 8;
sampleData.Add(test5);
return Json(sampleData, JsonRequestBehavior.AllowGet);
}
JQuery:
jQuery(document).ready(function () {
urlDataJSON = '/Home/PieChartJSON';
$.getJSON(urlDataJSON, "", function (data) {
var dataSlices = [];
var dataLabels = "";
$.each(data, function (entryindex, entry) {
dataSlices.push(entry['Value']);
dataLabels = dataLabels + entry['Label'];
});
options = {
legend: { show: true },
title: 'Poll Results',
seriesDefaults: {
// Make this a pie chart.
renderer: jQuery.jqplot.PieRenderer,
rendererOptions: {
// Put data labels on the pie slices.
// By default, labels show the percentage of the slice.
showDataLabels: true
}
}
}
var plot = $.jqplot('pieChart', [dataSlices], options);
});
});
http://i.stack.imgur.com/ohup4.png *Produced Graph
I’d like to be able to create something similar to the bar graph on the following page: http://www.jqplot.com/tests/bar-charts.php (second chart down). This bar graph is created using the following jQuery:
I’m quite new to C# and Json and I’m a little unsure how the Json data should be constructed to create this bar graph.
Can anyone help me out?
$(document).ready(function(){
// For horizontal bar charts, x an y values must will be "flipped"
// from their vertical bar counterpart.
var plot2 = $.jqplot('chart2', [
[[2,1], [4,2], [6,3], [3,4]],
[[5,1], [1,2], [3,3], [4,4]],
[[4,1], [7,2], [1,3], [2,4]]], {
seriesDefaults: {
renderer:$.jqplot.BarRenderer,
// Show point labels to the right ('e'ast) of each bar.
// edgeTolerance of -15 allows labels flow outside the grid
// up to 15 pixels. If they flow out more than that, they
// will be hidden.
pointLabels: { show: true, location: 'e', edgeTolerance: -15 },
// Rotate the bar shadow as if bar is lit from top right.
shadowAngle: 135,
// Here's where we tell the chart it is oriented horizontally.
rendererOptions: {
barDirection: 'horizontal'
}
},
axes: {
yaxis: {
renderer: $.jqplot.CategoryAxisRenderer
}
}
});
});
| jquery | asp.net | json | mvc | jqplot | null | open | Constructing Json for JqPlot Bar Charts
===
I have managed to create something to populate the JqPlot pie chart (very hard coded – it will be automated). Here is how I’ve done it:
public ActionResult PieChart()
{
return View();
}
public ActionResult PieChartJSON()
{
List<PieChartData> sampleData = new List<PieChartData>();
PieChartData test = new PieChartData();
PieChartData test2 = new PieChartData();
PieChartData test3 = new PieChartData();
PieChartData test4 = new PieChartData();
PieChartData test5 = new PieChartData();
test.Label = "ta";
test.Value = 3;
sampleData.Add(test);
test2.Label = "be";
test2.Value = 5;
sampleData.Add(test2);
test3.Label = "ga";
test3.Value = 3;
sampleData.Add(test3);
test4.Label = "ma";
test4.Value = 8;
sampleData.Add(test4);
test5.Label = "ja";
test5.Value = 8;
sampleData.Add(test5);
return Json(sampleData, JsonRequestBehavior.AllowGet);
}
JQuery:
jQuery(document).ready(function () {
urlDataJSON = '/Home/PieChartJSON';
$.getJSON(urlDataJSON, "", function (data) {
var dataSlices = [];
var dataLabels = "";
$.each(data, function (entryindex, entry) {
dataSlices.push(entry['Value']);
dataLabels = dataLabels + entry['Label'];
});
options = {
legend: { show: true },
title: 'Poll Results',
seriesDefaults: {
// Make this a pie chart.
renderer: jQuery.jqplot.PieRenderer,
rendererOptions: {
// Put data labels on the pie slices.
// By default, labels show the percentage of the slice.
showDataLabels: true
}
}
}
var plot = $.jqplot('pieChart', [dataSlices], options);
});
});
http://i.stack.imgur.com/ohup4.png *Produced Graph
I’d like to be able to create something similar to the bar graph on the following page: http://www.jqplot.com/tests/bar-charts.php (second chart down). This bar graph is created using the following jQuery:
I’m quite new to C# and Json and I’m a little unsure how the Json data should be constructed to create this bar graph.
Can anyone help me out?
$(document).ready(function(){
// For horizontal bar charts, x an y values must will be "flipped"
// from their vertical bar counterpart.
var plot2 = $.jqplot('chart2', [
[[2,1], [4,2], [6,3], [3,4]],
[[5,1], [1,2], [3,3], [4,4]],
[[4,1], [7,2], [1,3], [2,4]]], {
seriesDefaults: {
renderer:$.jqplot.BarRenderer,
// Show point labels to the right ('e'ast) of each bar.
// edgeTolerance of -15 allows labels flow outside the grid
// up to 15 pixels. If they flow out more than that, they
// will be hidden.
pointLabels: { show: true, location: 'e', edgeTolerance: -15 },
// Rotate the bar shadow as if bar is lit from top right.
shadowAngle: 135,
// Here's where we tell the chart it is oriented horizontally.
rendererOptions: {
barDirection: 'horizontal'
}
},
axes: {
yaxis: {
renderer: $.jqplot.CategoryAxisRenderer
}
}
});
});
| 0 |
7,357,237 | 09/09/2011 04:43:10 | 557,836 | 12/30/2010 02:42:40 | 962 | 106 | When should comparator === be used over ==? | So I've been actively programming bot in school and work the past 5 years, but I never tried to find out the difference between == and ===.
I can see the difference of a comparator using a single =, it'll look at the value of the left handed variable through the loop, ex:
while($line = getrow(something))
So what's the difference between == and === in statements such as:
if ($var1 === $var2)
//versus
if ($var1 == $var2)
Likewise:
if ($var1 !== $var2)
//versus
if ($var1 != $var2)
I have always used double equals, I have never used tripple.
The languages I use are :php, vb.net, java, javascript, c/c++.
I'm interested in learning systematically what is going on in a tripple quote that is different than that of a double quote.
When should one be used over another? Thanks for appeasing to my curiosity :) | if-statement | compare | equals | null | null | null | open | When should comparator === be used over ==?
===
So I've been actively programming bot in school and work the past 5 years, but I never tried to find out the difference between == and ===.
I can see the difference of a comparator using a single =, it'll look at the value of the left handed variable through the loop, ex:
while($line = getrow(something))
So what's the difference between == and === in statements such as:
if ($var1 === $var2)
//versus
if ($var1 == $var2)
Likewise:
if ($var1 !== $var2)
//versus
if ($var1 != $var2)
I have always used double equals, I have never used tripple.
The languages I use are :php, vb.net, java, javascript, c/c++.
I'm interested in learning systematically what is going on in a tripple quote that is different than that of a double quote.
When should one be used over another? Thanks for appeasing to my curiosity :) | 0 |
8,685,666 | 12/31/2011 01:32:55 | 1,123,787 | 12/31/2011 01:18:38 | 1 | 0 | Android as an Appliance | I am new to Android and I am trying to use a Android tablet to create an appliance. See this link as a reference. http://www.youtube.com/watch?v=ouP-CgLfANw . I don't want to user
Is this possible by just modifying the boot process and using a Samsung Galaxy tablet?
Thanks, in advance. | android | null | null | null | null | 12/31/2011 20:16:03 | not a real question | Android as an Appliance
===
I am new to Android and I am trying to use a Android tablet to create an appliance. See this link as a reference. http://www.youtube.com/watch?v=ouP-CgLfANw . I don't want to user
Is this possible by just modifying the boot process and using a Samsung Galaxy tablet?
Thanks, in advance. | 1 |
9,346,188 | 02/19/2012 02:40:29 | 1,190,269 | 02/05/2012 06:04:49 | 1 | 0 | Search XML file using javascript | I'm trying to make a page where a user may enter a url into an input box, click submit, and the script will return the WebCite page. (WebCite is a url caching service. For example, if I "archive" www.google.com, the archive page is www.webcitation.org/65YgIgei6.) So WebCite has a query syntax that when given a url to cache, an email, and the parameter `&returnxml=true`, will return an xml file. (For example, http://www.webcitation.org/archive?url=http://www.google.com&[email protected]&returnxml=true leads to an xml file where the text between the <webcite_url> tags is the archive page.)
So I would like some Javscript (or jquery) that will search the xml file for "`<webcite_url>`" and "`</webcite_url>`" and return the url within those tags. http://jsfiddle.net/gxHWk/ is the basic idea.
btw, I read stackoverflow.com/questions/6648454/search-and-output-data-from-an-xml-file-using-javascript, but I can't figure out how to adapt the code there to my circumstances.
(*removed "http://" from some links because of spam filter)
Thanks! | javascript | jquery | null | null | null | null | open | Search XML file using javascript
===
I'm trying to make a page where a user may enter a url into an input box, click submit, and the script will return the WebCite page. (WebCite is a url caching service. For example, if I "archive" www.google.com, the archive page is www.webcitation.org/65YgIgei6.) So WebCite has a query syntax that when given a url to cache, an email, and the parameter `&returnxml=true`, will return an xml file. (For example, http://www.webcitation.org/archive?url=http://www.google.com&[email protected]&returnxml=true leads to an xml file where the text between the <webcite_url> tags is the archive page.)
So I would like some Javscript (or jquery) that will search the xml file for "`<webcite_url>`" and "`</webcite_url>`" and return the url within those tags. http://jsfiddle.net/gxHWk/ is the basic idea.
btw, I read stackoverflow.com/questions/6648454/search-and-output-data-from-an-xml-file-using-javascript, but I can't figure out how to adapt the code there to my circumstances.
(*removed "http://" from some links because of spam filter)
Thanks! | 0 |
10,672,423 | 05/20/2012 09:52:35 | 1,136,709 | 01/08/2012 04:10:01 | 305 | 9 | Something wrong with imagedashedline? | Is there an error with the following code?
imagedashedline($image, $posax, $posay, $posbx, $posay, $black);
I tried it like this:
imageline($image, $posax, $posay, $posbx, $posay, $black);
and it worked perfectly in the gd code. So what must be the error? Is it that `imagepolygon` has a higher z-index than it, but not higher than `imageline`? (a polygon partially covers this should-be dashed line.) | php | gd | null | null | null | null | open | Something wrong with imagedashedline?
===
Is there an error with the following code?
imagedashedline($image, $posax, $posay, $posbx, $posay, $black);
I tried it like this:
imageline($image, $posax, $posay, $posbx, $posay, $black);
and it worked perfectly in the gd code. So what must be the error? Is it that `imagepolygon` has a higher z-index than it, but not higher than `imageline`? (a polygon partially covers this should-be dashed line.) | 0 |
1,622,605 | 10/26/2009 00:31:00 | 190,929 | 10/15/2009 22:21:10 | 8 | 1 | define float as center in css | How can I define a define float as center in css? actually i need a layout between right and left and also i tried "text-align" but it doesn't work and the "float" property just working.
Thank you | css | float | alignment | layout | div | null | open | define float as center in css
===
How can I define a define float as center in css? actually i need a layout between right and left and also i tried "text-align" but it doesn't work and the "float" property just working.
Thank you | 0 |
7,020,147 | 08/11/2011 02:23:09 | 59,494 | 01/27/2009 20:14:23 | 2,794 | 75 | Linq-To-SQL select, update and commit results in empty Table | Given:
using (DataContext ctx = new DataContext(props.ConnectionString))
{
IQueryable<Email> emails = null;
try
{
emails = ctx.Emails.Where(e => !(e.IsLocked || e.IsSent));
foreach (var e in emails)
{
e.IsLocked = true;
}
ctx.SubmitChanges();
}
}
// do something with emails here
Why is emails empty after SubmitChanges()? Is there any way to avoid emptying the Table after IsLocked is set to true? | linq-to-sql | select | update | null | null | null | open | Linq-To-SQL select, update and commit results in empty Table
===
Given:
using (DataContext ctx = new DataContext(props.ConnectionString))
{
IQueryable<Email> emails = null;
try
{
emails = ctx.Emails.Where(e => !(e.IsLocked || e.IsSent));
foreach (var e in emails)
{
e.IsLocked = true;
}
ctx.SubmitChanges();
}
}
// do something with emails here
Why is emails empty after SubmitChanges()? Is there any way to avoid emptying the Table after IsLocked is set to true? | 0 |
8,735,685 | 01/04/2012 23:38:30 | 1,120,354 | 12/29/2011 02:53:42 | 107 | 0 | What's a simple but non-trivial example of class defined using union in C++? | What's a simple but non-trivial example of class defined using union in C++?
* the class should be defined using `union`
* the class should have constructor(s) and destructor explicitly declared and implemented
* the class should have methods that demonstrate the difference of such a class from a class defined using `class` key word
| c++ | oop | null | null | null | 01/04/2012 23:49:10 | not a real question | What's a simple but non-trivial example of class defined using union in C++?
===
What's a simple but non-trivial example of class defined using union in C++?
* the class should be defined using `union`
* the class should have constructor(s) and destructor explicitly declared and implemented
* the class should have methods that demonstrate the difference of such a class from a class defined using `class` key word
| 1 |
10,778,189 | 05/28/2012 00:20:08 | 758,067 | 05/17/2011 19:42:37 | 172 | 5 | Scala SBT / Maven2 Error on OSX: "Error Opening Zip File" -> MissingRequirementError | I have a project that builds well on Unix boxes (http://www.github.com/jhclark/ducttape).
However, using SBT 0.11.2 (and a few other versions of SBT), it will not build on my Mac (OSX 10.5). I get the following cryptic error message:
$ ~/bin/sbt compile (master*? 20:11)
[info] Loading project definition from /Users/jon/Documents/workspace- scala/ducttape/project
[info] Set current project to ducttape (in build file:/Users/jon/Documents/workspace-scala/ducttape/)
[info] Compiling 104 Scala sources to /Users/jon/Documents/workspace-scala/ducttape/target/scala-2.9.2/classes...
[error] error while loading <root>, error in opening zip file
[error] {file:/Users/jon/Documents/workspace-scala/ducttape/}default-024416/compile:compile: scala.tools.nsc.MissingRequirementError: object scala not found.
[error] Total time: 2 s, completed May 27, 2012 8:12:09 PM
This happens even after I clean things out thoroughly with:
sbt clean clean-files
rm -rf ~/.ivy2 ~/.m2 ~/.sbt
I suspect that the real error is happening in Maven2, which SBT uses for dependency management (see also http://stackoverflow.com/questions/7600028/error-in-opening-zip-file).
However, I'm stumped after several days. Any ideas?
| scala | maven | maven-2 | sbt | null | null | open | Scala SBT / Maven2 Error on OSX: "Error Opening Zip File" -> MissingRequirementError
===
I have a project that builds well on Unix boxes (http://www.github.com/jhclark/ducttape).
However, using SBT 0.11.2 (and a few other versions of SBT), it will not build on my Mac (OSX 10.5). I get the following cryptic error message:
$ ~/bin/sbt compile (master*? 20:11)
[info] Loading project definition from /Users/jon/Documents/workspace- scala/ducttape/project
[info] Set current project to ducttape (in build file:/Users/jon/Documents/workspace-scala/ducttape/)
[info] Compiling 104 Scala sources to /Users/jon/Documents/workspace-scala/ducttape/target/scala-2.9.2/classes...
[error] error while loading <root>, error in opening zip file
[error] {file:/Users/jon/Documents/workspace-scala/ducttape/}default-024416/compile:compile: scala.tools.nsc.MissingRequirementError: object scala not found.
[error] Total time: 2 s, completed May 27, 2012 8:12:09 PM
This happens even after I clean things out thoroughly with:
sbt clean clean-files
rm -rf ~/.ivy2 ~/.m2 ~/.sbt
I suspect that the real error is happening in Maven2, which SBT uses for dependency management (see also http://stackoverflow.com/questions/7600028/error-in-opening-zip-file).
However, I'm stumped after several days. Any ideas?
| 0 |
11,676,588 | 07/26/2012 19:24:12 | 1,555,810 | 07/26/2012 19:18:21 | 1 | 0 | Attached my live site. My font-face is rendering bold and it looks totally awful. What's wrong here? | http://kulthouse.com/profile.html
The problem is specifically appearing on Firefox & Chrome on Windows7. If you dig around, I've made every effort to specify "font-weight: normal", not apply bold, etc. I'm kind of at a loss for what is the problem here.
Meanwhile, if you check http://logan.tv, they make use of Garamond and it renders flawlessly for me.
Any tips? | html | css | fonts | webfonts | null | 07/27/2012 11:32:53 | too localized | Attached my live site. My font-face is rendering bold and it looks totally awful. What's wrong here?
===
http://kulthouse.com/profile.html
The problem is specifically appearing on Firefox & Chrome on Windows7. If you dig around, I've made every effort to specify "font-weight: normal", not apply bold, etc. I'm kind of at a loss for what is the problem here.
Meanwhile, if you check http://logan.tv, they make use of Garamond and it renders flawlessly for me.
Any tips? | 3 |
7,105,922 | 08/18/2011 10:23:40 | 720,909 | 01/20/2011 13:55:29 | 33 | 1 | Spring - WEB services | **HI ALL**
Please tell me how to develop Web services Using Spring
I want to use **AbstractMarshallingPayloadEndpoint**
I want to do it without annotation (old style )
Thanks A Lot | spring | null | null | null | null | 08/18/2011 15:11:51 | not a real question | Spring - WEB services
===
**HI ALL**
Please tell me how to develop Web services Using Spring
I want to use **AbstractMarshallingPayloadEndpoint**
I want to do it without annotation (old style )
Thanks A Lot | 1 |
4,291,717 | 11/27/2010 12:48:19 | 104,059 | 05/09/2009 13:15:33 | 137 | 1 | Facebook Flash app cannot communicate with JavaScript | My index.php file loads the Facebook JavaScript SDK and the FBJS bridge:
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>
<script type="text/javascript" src="FBJSBridge.js"></script>
It then inits the Facebook SDK:
<script type="text/javascript">
FB.init({
appId : '<?=$fbconfig['appid']?>',
session: <?php echo json_encode($session); ?>,
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
And embeds the Flash file using swfobject:
swfobject.embedSWF("http://www.myserver.org/Facebook/app/app.swf", "holderDiv", "740", "616");
When I run this file on my server, I can communicate with Facebooks JavaScript SDK either indirectly through ExternalInterface calls, launching various Facebook UI dialogs etc. And I can also use the [facebook-actionscript-api][1] to launch the same dialogs directly from ActionScript.
When I however use this index file as my Facebook canvas url and load the swf in a Facebook iFrame, the communication crashes the application. I'm not sure how to debug this but I think it might have to do with crossdomain security. Any ideas on debugging and/or solutions are welcome.
[1]: http://code.google.com/p/facebook-actionscript-api/ | javascript | flash | actionscript-3 | facebook | facebook-actionscript-api | null | open | Facebook Flash app cannot communicate with JavaScript
===
My index.php file loads the Facebook JavaScript SDK and the FBJS bridge:
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>
<script type="text/javascript" src="FBJSBridge.js"></script>
It then inits the Facebook SDK:
<script type="text/javascript">
FB.init({
appId : '<?=$fbconfig['appid']?>',
session: <?php echo json_encode($session); ?>,
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
And embeds the Flash file using swfobject:
swfobject.embedSWF("http://www.myserver.org/Facebook/app/app.swf", "holderDiv", "740", "616");
When I run this file on my server, I can communicate with Facebooks JavaScript SDK either indirectly through ExternalInterface calls, launching various Facebook UI dialogs etc. And I can also use the [facebook-actionscript-api][1] to launch the same dialogs directly from ActionScript.
When I however use this index file as my Facebook canvas url and load the swf in a Facebook iFrame, the communication crashes the application. I'm not sure how to debug this but I think it might have to do with crossdomain security. Any ideas on debugging and/or solutions are welcome.
[1]: http://code.google.com/p/facebook-actionscript-api/ | 0 |
9,541,065 | 03/02/2012 22:10:51 | 621,645 | 08/26/2010 09:37:59 | 185 | 0 | Detect the lanscap mode and show an UIImage | I am developing an iOS application with uses only portrait mode. i would like to show in all the views of my application an image (320*480) when the user turn the iPhone ( lanscape mode)
How i can do this ? | objective-c | ios | null | null | null | null | open | Detect the lanscap mode and show an UIImage
===
I am developing an iOS application with uses only portrait mode. i would like to show in all the views of my application an image (320*480) when the user turn the iPhone ( lanscape mode)
How i can do this ? | 0 |
9,619,299 | 03/08/2012 14:35:33 | 1,018,562 | 03/08/2010 14:56:00 | 38 | 0 | Best free book/tutorial for learning ASP.net | I am an experienced C++ programmer and also have experience with C#. I am interested in web-designing/development. I want a book which teaches ASP.net without teaching C# first. In other words, it dives directly into ASP.net using C# (not VB.net). What is the best free book of that sort? | c# | asp.net | null | null | null | 03/08/2012 14:47:34 | not constructive | Best free book/tutorial for learning ASP.net
===
I am an experienced C++ programmer and also have experience with C#. I am interested in web-designing/development. I want a book which teaches ASP.net without teaching C# first. In other words, it dives directly into ASP.net using C# (not VB.net). What is the best free book of that sort? | 4 |
9,228,176 | 02/10/2012 12:58:45 | 1,162,272 | 01/21/2012 12:53:32 | 6 | 0 | Qt widgets and Unicode | what does
> **primaryColumnCombo->setMinimumSize(secondaryColumnCombo->sizeHint());** working?
primaryColumnCombo->setMinimumSize(secondaryColumnCombo->sizeHint());
And how does
> `QChar ch = first;
while (ch <= last)
{
primaryColumnCombo->addItem(QString(ch));
ch = ch.unicode() + 1;
}`
this loop working?
Please it you want to answer than it's good. There is no need to pass remarks .
Thanks
| c++ | qt | null | null | null | 02/12/2012 06:11:27 | not a real question | Qt widgets and Unicode
===
what does
> **primaryColumnCombo->setMinimumSize(secondaryColumnCombo->sizeHint());** working?
primaryColumnCombo->setMinimumSize(secondaryColumnCombo->sizeHint());
And how does
> `QChar ch = first;
while (ch <= last)
{
primaryColumnCombo->addItem(QString(ch));
ch = ch.unicode() + 1;
}`
this loop working?
Please it you want to answer than it's good. There is no need to pass remarks .
Thanks
| 1 |
8,067,519 | 11/09/2011 15:43:55 | 695,156 | 04/06/2011 15:38:32 | 48 | 0 | Form Goes Crazy After Linking CSS | I have a form I'm working on and I'm trying to align all my fields to make it look presentable and the page goes crazy when I link a css page to it. I don't understand why my textareas aren't floating to the right.
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!--<LINK REL=StyleSheet HREF="reporter.css" TYPE="text/css">-->
<script type="text/javascript" src="calendarDateInput.js"></script>
<title>Downtime Reporting</title>
</head>
<body>
<form action = "addissue.php" METHOD = "POST">
http://www.dynamicdrive.com/dynamicindex7/jasoncalendar.htm
<script>DateInput('orderdate', true, 'DD-MON-YYYY')</script>
Please select the application affected:
<select name = "application">
<option value = "Default1">Default2</option>
<option value = "2">2</option>
</select><br />
Start Time: <input type = "text" name = "start" /><br />
End Time: <input type = "text" name = "end" /><br />
Service Level Affecting? <input type = "radio" name = "sla" value = "Yes" />Yes
<input type = "radio" name = "sla" value = "No" />No<br />
System State:
<select name = "state">
<option value = "down">Down</option>
<option value = "degradated">Degradated</option>
<option value = "feature">Feature Broken</option>
</select><br />
Issue Description:
<textarea name = "issuedesc"rows = "5" cols = "90">Enter Issue Description Here.</textarea><br />
Resolution Description:
<textarea name = "resdesc" rows = "5" cols = "90">Enter Resolution Description Here.</textarea><br />
Group Issue Is Assigned To:
<select name = "group">
<option value = "default1">default1</option>
<option value = "2">2</option>
</select><br />
<input type = "submit" value = "Submit">
</form>
</body>
My css file just consists of this right now.
textarea{
float:right;
} | html | css | null | null | null | null | open | Form Goes Crazy After Linking CSS
===
I have a form I'm working on and I'm trying to align all my fields to make it look presentable and the page goes crazy when I link a css page to it. I don't understand why my textareas aren't floating to the right.
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!--<LINK REL=StyleSheet HREF="reporter.css" TYPE="text/css">-->
<script type="text/javascript" src="calendarDateInput.js"></script>
<title>Downtime Reporting</title>
</head>
<body>
<form action = "addissue.php" METHOD = "POST">
http://www.dynamicdrive.com/dynamicindex7/jasoncalendar.htm
<script>DateInput('orderdate', true, 'DD-MON-YYYY')</script>
Please select the application affected:
<select name = "application">
<option value = "Default1">Default2</option>
<option value = "2">2</option>
</select><br />
Start Time: <input type = "text" name = "start" /><br />
End Time: <input type = "text" name = "end" /><br />
Service Level Affecting? <input type = "radio" name = "sla" value = "Yes" />Yes
<input type = "radio" name = "sla" value = "No" />No<br />
System State:
<select name = "state">
<option value = "down">Down</option>
<option value = "degradated">Degradated</option>
<option value = "feature">Feature Broken</option>
</select><br />
Issue Description:
<textarea name = "issuedesc"rows = "5" cols = "90">Enter Issue Description Here.</textarea><br />
Resolution Description:
<textarea name = "resdesc" rows = "5" cols = "90">Enter Resolution Description Here.</textarea><br />
Group Issue Is Assigned To:
<select name = "group">
<option value = "default1">default1</option>
<option value = "2">2</option>
</select><br />
<input type = "submit" value = "Submit">
</form>
</body>
My css file just consists of this right now.
textarea{
float:right;
} | 0 |
2,305,988 | 02/21/2010 13:23:15 | 27,423 | 10/13/2008 13:56:14 | 24,412 | 876 | Is there a library that can decompile a method into an Expression tree, with support for CLR 4.0? | Previous questions have asked if it is possible to turn compiled delegates into expression trees, for example:
* http://stackoverflow.com/questions/767733/converting-a-net-funct-to-a-net-expressionfunct
The sane answers at the time were:
* It's possible, but very hard and there's no standard library solution.
* Use Reflector!
But fortunately there are some greatly-insane/insanely-great people out there who like reverse engineering things, and they make difficult things easy for the rest of us.
Clearly it is possible to decompile IL to C#, as Reflector does it, and so you could *in principle* instead target CLR 4.0 expression trees with support for all statement types. This is interesting because it wouldn't matter if the compiler's built-in special support for `Expression<>` lambdas is never extended to support building statement expression trees in the compiler. A library solution could fill the gap. We would then have a high-level starting point for writing aspect-like manipulations of code without having to mess with raw IL.
As noted in the answers to the above linked question, [there are some promising signs][1] but I haven't succeeded in finding if there's been much progress since by searching.
So has anyone finished this job, or got very far with it?
[1]: http://evain.net/blog/articles/2009/04/22/converting-delegates-to-expression-trees | expression-trees | .net-4.0 | null | null | null | null | open | Is there a library that can decompile a method into an Expression tree, with support for CLR 4.0?
===
Previous questions have asked if it is possible to turn compiled delegates into expression trees, for example:
* http://stackoverflow.com/questions/767733/converting-a-net-funct-to-a-net-expressionfunct
The sane answers at the time were:
* It's possible, but very hard and there's no standard library solution.
* Use Reflector!
But fortunately there are some greatly-insane/insanely-great people out there who like reverse engineering things, and they make difficult things easy for the rest of us.
Clearly it is possible to decompile IL to C#, as Reflector does it, and so you could *in principle* instead target CLR 4.0 expression trees with support for all statement types. This is interesting because it wouldn't matter if the compiler's built-in special support for `Expression<>` lambdas is never extended to support building statement expression trees in the compiler. A library solution could fill the gap. We would then have a high-level starting point for writing aspect-like manipulations of code without having to mess with raw IL.
As noted in the answers to the above linked question, [there are some promising signs][1] but I haven't succeeded in finding if there's been much progress since by searching.
So has anyone finished this job, or got very far with it?
[1]: http://evain.net/blog/articles/2009/04/22/converting-delegates-to-expression-trees | 0 |
11,489,364 | 07/15/2012 04:12:12 | 1,394,482 | 05/14/2012 18:58:11 | 28 | 0 | cant insert second entry on database | the first entry i enter was saved on the database, but when i enter another, it is not saved anymore
this is my html:
<html>
<body>
<h1 style="color:#03F; font-size: 25px;">Add User</h1>
<hr />
<form method="post" action="manipulate_item.php?id=adduser">
<table>
<tr>
<td><b>Add As:</b></td>
<td><select name="regas" style="width:200px;">
<option>Student</option>
<option>Teacher</option>
</select></td></tr>
<tr>
<td><b>ID Number:</b></td>
<td><input type="text" name="id" style="width:200px;"></td></tr>
</table>
<input type="submit" name="button" id="button" value="Add User" />
<input type="reset" name="button3" id="button3" value="Cancel" />
This is how it is processed:
if(!count($err))
{
$row=mysql_fetch_array(mysql_query("SELECT * FROM tz_members WHERE id='$id' AND regas='$regas'"));
if($row)
{
$err[]='User ID already exists!';
$_SESSION['msg']['reg-err'] = implode('<br />',$err);
}
else
{
$q=mysql_query("INSERT INTO tz_members(regas, id) VALUES('$regas', '$id')");
if(mysql_affected_rows($connect)==1)
{
$_SESSION['msg']['reg-success']='New User Added!';
header("Location:allusers.php");
exit;
}
else
{
$err[]='Cannot insert item.';
$_SESSION['msg']['reg-err'] = implode('<br />',$err);
}
}
}
And this is my database:
CREATE TABLE tz_members (
regas varchar(8) collate utf8_unicode_ci NOT NULL,
id int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
| php | null | null | null | null | 07/16/2012 00:01:07 | not a real question | cant insert second entry on database
===
the first entry i enter was saved on the database, but when i enter another, it is not saved anymore
this is my html:
<html>
<body>
<h1 style="color:#03F; font-size: 25px;">Add User</h1>
<hr />
<form method="post" action="manipulate_item.php?id=adduser">
<table>
<tr>
<td><b>Add As:</b></td>
<td><select name="regas" style="width:200px;">
<option>Student</option>
<option>Teacher</option>
</select></td></tr>
<tr>
<td><b>ID Number:</b></td>
<td><input type="text" name="id" style="width:200px;"></td></tr>
</table>
<input type="submit" name="button" id="button" value="Add User" />
<input type="reset" name="button3" id="button3" value="Cancel" />
This is how it is processed:
if(!count($err))
{
$row=mysql_fetch_array(mysql_query("SELECT * FROM tz_members WHERE id='$id' AND regas='$regas'"));
if($row)
{
$err[]='User ID already exists!';
$_SESSION['msg']['reg-err'] = implode('<br />',$err);
}
else
{
$q=mysql_query("INSERT INTO tz_members(regas, id) VALUES('$regas', '$id')");
if(mysql_affected_rows($connect)==1)
{
$_SESSION['msg']['reg-success']='New User Added!';
header("Location:allusers.php");
exit;
}
else
{
$err[]='Cannot insert item.';
$_SESSION['msg']['reg-err'] = implode('<br />',$err);
}
}
}
And this is my database:
CREATE TABLE tz_members (
regas varchar(8) collate utf8_unicode_ci NOT NULL,
id int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
| 1 |
11,245,895 | 06/28/2012 13:36:02 | 1,305,749 | 04/01/2012 01:45:04 | 56 | 0 | Developing for the windows slate | as Microsoft are releasing a tablet later this year, with a new operating system I was wondering whether we can already create apps for this platform and have them on the market place prior to release?
If this is the case where could I get my hands on the API's needed to go about creating a touch application in XNA for the upcoming windows 8 tablet. | windows | api | xna | tablet | null | null | open | Developing for the windows slate
===
as Microsoft are releasing a tablet later this year, with a new operating system I was wondering whether we can already create apps for this platform and have them on the market place prior to release?
If this is the case where could I get my hands on the API's needed to go about creating a touch application in XNA for the upcoming windows 8 tablet. | 0 |
8,074,781 | 11/10/2011 03:49:22 | 584,261 | 01/21/2011 09:55:37 | 93 | 3 | books on writing secure applications | I am working on a Payment transaction application and would like to get a broader understanding of various components that goes into building a secure web application.
More information about application:<br>
1. language: Java<br>
2. webserver & container : Apache webserver & tomcat<br>
3. communication over https<br>
Which book would you suggest? | java | books | web-security | tomcat6 | null | 11/10/2011 22:45:48 | not constructive | books on writing secure applications
===
I am working on a Payment transaction application and would like to get a broader understanding of various components that goes into building a secure web application.
More information about application:<br>
1. language: Java<br>
2. webserver & container : Apache webserver & tomcat<br>
3. communication over https<br>
Which book would you suggest? | 4 |
9,065,865 | 01/30/2012 14:59:35 | 446,502 | 09/13/2010 15:40:50 | 186 | 2 | Perl XPath to the value of a form input field | Shortened example of some html:
<input name="some_name" id="some_ID" value="The-Value-I-Want" />
In Perl,
//input[contains(@id, 'some')]/@value
Gives me:
value="The-Value-I-Want"
But all I REALLY want is :
"The-Value-I-Want"
I would have thought:
//input[contains(@id, 'some')]/@value/text
would have done it - but no. I've tried /@value[text] , /@value/@text , /@value/text() , etc
All the help I find on this issue is in Javascript XPath (or other). Perl is my language.
Thanks for any help! :) | html | perl | xpath | null | null | null | open | Perl XPath to the value of a form input field
===
Shortened example of some html:
<input name="some_name" id="some_ID" value="The-Value-I-Want" />
In Perl,
//input[contains(@id, 'some')]/@value
Gives me:
value="The-Value-I-Want"
But all I REALLY want is :
"The-Value-I-Want"
I would have thought:
//input[contains(@id, 'some')]/@value/text
would have done it - but no. I've tried /@value[text] , /@value/@text , /@value/text() , etc
All the help I find on this issue is in Javascript XPath (or other). Perl is my language.
Thanks for any help! :) | 0 |
9,675,522 | 03/12/2012 22:09:21 | 871,778 | 07/31/2011 14:03:21 | 12 | 0 | Hosting streaming content | I am administering a drupal based website for a small company. We want to start offering our customers video content, streaming preferably.
What we would like to do is have a log-in on the website where after authentication the user could access the videos.
Since I am quite new to do this I don't know
A., what streaming provider to use, lot of people mentioning amazon s3
b., is it possible if using amazon s3 to have my conent be "secured" so only people with neccessary login details access it.
(There is no need for purchasing infrastructure. We hand out the login/password to the customer personally, we just want that if someone copy/pastes the link he or she would not be able to watch it)
I just need some general guidline, googling streaming hosting gives up way to much results and I couldn't find the best solution for this type of question... :(
Thank you for your help! | drupal | streaming | hosting | null | null | 03/15/2012 13:06:04 | off topic | Hosting streaming content
===
I am administering a drupal based website for a small company. We want to start offering our customers video content, streaming preferably.
What we would like to do is have a log-in on the website where after authentication the user could access the videos.
Since I am quite new to do this I don't know
A., what streaming provider to use, lot of people mentioning amazon s3
b., is it possible if using amazon s3 to have my conent be "secured" so only people with neccessary login details access it.
(There is no need for purchasing infrastructure. We hand out the login/password to the customer personally, we just want that if someone copy/pastes the link he or she would not be able to watch it)
I just need some general guidline, googling streaming hosting gives up way to much results and I couldn't find the best solution for this type of question... :(
Thank you for your help! | 2 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.