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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5,750,875 | 04/21/2011 23:28:01 | 398,587 | 07/22/2010 00:08:21 | 11 | 0 | Using the Facebook API to post to live stream plugin? (not to a user or page's wall) | I'm working on creating a Facebook application that re-creates a live stream and I'm having trouble with permissions. Originally the 'stream' was going to the application's wall, but a user cannot post onto an application's wall without liking the page first (and therefor granting publish permissions to that app's wall).
Our current solution is a Facebook social plug-in - http://developers.facebook.com/docs/reference/plugins/live-stream/- which works fine but we're not able to customize it. Does anyone know of a way using the Facebook API to post to a live stream object? Ideally I'd like to re-create the social stream by hand using a combination of the FQL to fetch new posts made in the stream and using their API to create new posts for the stream. Any leads would be fantastic. | javascript | facebook | api | null | null | null | open | Using the Facebook API to post to live stream plugin? (not to a user or page's wall)
===
I'm working on creating a Facebook application that re-creates a live stream and I'm having trouble with permissions. Originally the 'stream' was going to the application's wall, but a user cannot post onto an application's wall without liking the page first (and therefor granting publish permissions to that app's wall).
Our current solution is a Facebook social plug-in - http://developers.facebook.com/docs/reference/plugins/live-stream/- which works fine but we're not able to customize it. Does anyone know of a way using the Facebook API to post to a live stream object? Ideally I'd like to re-create the social stream by hand using a combination of the FQL to fetch new posts made in the stream and using their API to create new posts for the stream. Any leads would be fantastic. | 0 |
7,277,747 | 09/01/2011 23:24:54 | 777,982 | 05/31/2011 15:53:56 | 376 | 52 | How much of a hassle it is to implement SSL from GoDaddy with PayPal? | It is hard, needs a lot of time and pondering to set itup or it is something easy to implement esp when using with PayPal APIs.
Thanks | ssl | paypal | implementation | null | null | 09/02/2011 00:55:44 | off topic | How much of a hassle it is to implement SSL from GoDaddy with PayPal?
===
It is hard, needs a lot of time and pondering to set itup or it is something easy to implement esp when using with PayPal APIs.
Thanks | 2 |
7,613,588 | 09/30/2011 16:54:07 | 629,014 | 02/22/2011 20:05:46 | 13 | 0 | How can I build my own personal android app store? | How does one create a personal app store for Android built from either custom or open source software. | android | null | null | null | null | 09/30/2011 17:20:08 | not a real question | How can I build my own personal android app store?
===
How does one create a personal app store for Android built from either custom or open source software. | 1 |
4,117,983 | 11/07/2010 13:45:01 | 454,770 | 09/22/2010 07:29:57 | 165 | 0 | What's the standard way to login to a client software in c/c++? | To login to a website I can use `curl`, what about when I need to login to a client software? | c++ | c | windows | null | null | 11/07/2010 19:49:29 | not a real question | What's the standard way to login to a client software in c/c++?
===
To login to a website I can use `curl`, what about when I need to login to a client software? | 1 |
8,245,711 | 11/23/2011 16:30:53 | 1,062,324 | 11/23/2011 16:26:10 | 1 | 0 | Hulp With php and mysql | I try for a while from a mysql php string to it. These are two variables from mysql that sex should call. This means that if you're in the chat it automatically retrieves your gender from the MySQL site, but I can not. Is there anyone here who can help me there?
mysql database tables:
profilevalue_4, profilevalue_5
Php string:
<?php echo($user->user_info['Sex????']);?>
Thank you very much! | php | mysql | null | null | null | 11/23/2011 22:18:00 | not a real question | Hulp With php and mysql
===
I try for a while from a mysql php string to it. These are two variables from mysql that sex should call. This means that if you're in the chat it automatically retrieves your gender from the MySQL site, but I can not. Is there anyone here who can help me there?
mysql database tables:
profilevalue_4, profilevalue_5
Php string:
<?php echo($user->user_info['Sex????']);?>
Thank you very much! | 1 |
11,581,087 | 07/20/2012 14:10:00 | 1,535,236 | 07/18/2012 14:58:36 | 1 | 0 | Click on iframe link through a click on a page | I'm running a blog and I am using ads to monetize it;
when I paste their iframe code in the HTML, it shows 3 images on my blog and when you click one of the images, it lead to a new address on a new window. What I want to do is bring up a popunder when I click anywhere on the blog which means one click on the blog = one click on one of the links give by the iframe = 1 pop-under(or new tab)
Ads network iframe code:
<iframe allowtransparency="1" frameborder="0" height="144" id="xxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxx" scrolling="no" src="http://xxxxxx.xxxxxxxx.com/blog-name.com/xxx" width="568"></iframe>
ps: The popunder should show up once every 24h per visitors
Sorry for the "xxxx" (I don't want to display the ads network name)
I'm newbie so step by step please...
| javascript | html | iframe | null | null | 07/24/2012 01:39:12 | too localized | Click on iframe link through a click on a page
===
I'm running a blog and I am using ads to monetize it;
when I paste their iframe code in the HTML, it shows 3 images on my blog and when you click one of the images, it lead to a new address on a new window. What I want to do is bring up a popunder when I click anywhere on the blog which means one click on the blog = one click on one of the links give by the iframe = 1 pop-under(or new tab)
Ads network iframe code:
<iframe allowtransparency="1" frameborder="0" height="144" id="xxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxx" scrolling="no" src="http://xxxxxx.xxxxxxxx.com/blog-name.com/xxx" width="568"></iframe>
ps: The popunder should show up once every 24h per visitors
Sorry for the "xxxx" (I don't want to display the ads network name)
I'm newbie so step by step please...
| 3 |
7,667,111 | 10/05/2011 20:08:17 | 981,117 | 10/05/2011 20:02:47 | 1 | 0 | Our Facebook "Like" Buttons on our pages are showing up fine, sharing the content fine, just don't count the # of likes on certain articles? | We use the iframe implementation of the Like button on our "Junkdrawer" section of the site. Currently it is working fine on 95% of the posts in that category. However, our video content is not being tracked correctly, let me explain. The Like button shows up, you can click it, it registers 1 like, and that like is shared on your Facebook page...come back to the page though and that 1 is gone, and no likes are actually counted, they are shared, just not counted. I tried linting the URL and that appears fine, any suggestions? Here is an example page where the likes are not being counted.
http://www.thrashermagazine.com/component/option,com_hwdvideoshare/Itemid,90/lang,en/task,viewvideo/video_id,1311/
| facebook | like | null | null | null | 10/06/2011 08:33:13 | off topic | Our Facebook "Like" Buttons on our pages are showing up fine, sharing the content fine, just don't count the # of likes on certain articles?
===
We use the iframe implementation of the Like button on our "Junkdrawer" section of the site. Currently it is working fine on 95% of the posts in that category. However, our video content is not being tracked correctly, let me explain. The Like button shows up, you can click it, it registers 1 like, and that like is shared on your Facebook page...come back to the page though and that 1 is gone, and no likes are actually counted, they are shared, just not counted. I tried linting the URL and that appears fine, any suggestions? Here is an example page where the likes are not being counted.
http://www.thrashermagazine.com/component/option,com_hwdvideoshare/Itemid,90/lang,en/task,viewvideo/video_id,1311/
| 2 |
11,648,060 | 07/25/2012 10:49:31 | 930,094 | 09/06/2011 06:53:22 | 1 | 0 | Tomcat, JVM configuration for 64 bit Linux to support 4000 concurrent users | This is my first post on this forum but I have read a lot on this place already.
I am an entry level system architect. We want to design a site for mobile phones (no javascript / ajax) with around **5000 concurrent users** *[ concurrent users and not daily active users ]*. As it is a mobile site, entire processing must be done on server side and plain HTML will be thrown to the client.
We have decided to use 64 bit Linux, Java 1.6 or above and Tomcat 7 for this. Hardware will be on Amazon cloud: 6-8 cores with 16GB RAM. We will be using just JSP and Servlets. Database is MYSQL. We may put 2-3 servers in parallel under load balanced if needed.
Please help me with the following doubts:
1. Please help me with the advanced configuration parameters of tomcat. What should be the number of threads, number of maximum connections for the above requirement on given hardware.
2. What should be the memory specifications of JVM ?
3. What is the maximum number of concurrent connections tomcat can handle in above setup ? Are there any other better alternatives for tomcat for such requirement ?
4. Will the Java's default gc be able to handle the garbage collection entirely ? Or we should look at some other additional alternatives ?
5. We will make our app stateless so that it can be extended easily by adding multiple servers horizontally if needed. Any additional best proven technologies for the same ?
6. I wish to avoid RMI etc. overheads hence decided to stay away from EJB and other complex J2EE technologies. Is that a better decision or not ?
7. Some people advised me to go for PHP instead of Java claiming PHP as a better for web projects. But considering available programming resources on our side, we decided to stick with J2EE only. Should I seriously consider that option ?
Optimizing at DB level will be a separate discussion thread, so please don't give inputs on that here. We have already shortlisted memcached or redis for caching.
I wish to ask this question as a discussion thread than just a spoon-fed answer.
Thanks in advance for your feedback.
MRD | java | php | linux | java-ee | tomcat | 07/25/2012 11:07:15 | too localized | Tomcat, JVM configuration for 64 bit Linux to support 4000 concurrent users
===
This is my first post on this forum but I have read a lot on this place already.
I am an entry level system architect. We want to design a site for mobile phones (no javascript / ajax) with around **5000 concurrent users** *[ concurrent users and not daily active users ]*. As it is a mobile site, entire processing must be done on server side and plain HTML will be thrown to the client.
We have decided to use 64 bit Linux, Java 1.6 or above and Tomcat 7 for this. Hardware will be on Amazon cloud: 6-8 cores with 16GB RAM. We will be using just JSP and Servlets. Database is MYSQL. We may put 2-3 servers in parallel under load balanced if needed.
Please help me with the following doubts:
1. Please help me with the advanced configuration parameters of tomcat. What should be the number of threads, number of maximum connections for the above requirement on given hardware.
2. What should be the memory specifications of JVM ?
3. What is the maximum number of concurrent connections tomcat can handle in above setup ? Are there any other better alternatives for tomcat for such requirement ?
4. Will the Java's default gc be able to handle the garbage collection entirely ? Or we should look at some other additional alternatives ?
5. We will make our app stateless so that it can be extended easily by adding multiple servers horizontally if needed. Any additional best proven technologies for the same ?
6. I wish to avoid RMI etc. overheads hence decided to stay away from EJB and other complex J2EE technologies. Is that a better decision or not ?
7. Some people advised me to go for PHP instead of Java claiming PHP as a better for web projects. But considering available programming resources on our side, we decided to stick with J2EE only. Should I seriously consider that option ?
Optimizing at DB level will be a separate discussion thread, so please don't give inputs on that here. We have already shortlisted memcached or redis for caching.
I wish to ask this question as a discussion thread than just a spoon-fed answer.
Thanks in advance for your feedback.
MRD | 3 |
4,733,739 | 01/19/2011 09:44:33 | 520,106 | 11/25/2010 12:03:57 | 23 | 6 | Is it possible to pass parameters from server package to client package using RPC? | I have a GWT project in which I have a web interface programmed in the client package and the code that connects to a remote server in the server package. The interface presents certain parameters to the user and he/she has to select them and make a query to the remote server.
I have passed the user-selected parameters to the server package using a RPC call, but I would like to know if it is possible to to the inverse operation, because I would like to draw the data retrieved from the server on an embedded Google map (retrieved data is georeferenced) and all this drawing things is done in the client package with pure-GWT classes.
What do you think? Is it possible? Any idea? Do I have to draw the georeferenced data on the client side?
Thanks to all. | java | gwt-rpc | null | null | null | null | open | Is it possible to pass parameters from server package to client package using RPC?
===
I have a GWT project in which I have a web interface programmed in the client package and the code that connects to a remote server in the server package. The interface presents certain parameters to the user and he/she has to select them and make a query to the remote server.
I have passed the user-selected parameters to the server package using a RPC call, but I would like to know if it is possible to to the inverse operation, because I would like to draw the data retrieved from the server on an embedded Google map (retrieved data is georeferenced) and all this drawing things is done in the client package with pure-GWT classes.
What do you think? Is it possible? Any idea? Do I have to draw the georeferenced data on the client side?
Thanks to all. | 0 |
3,276,875 | 07/18/2010 19:15:32 | 135,807 | 07/09/2009 17:33:03 | 401 | 17 | An antlr problem with embedded comments | I am trying to implement a nested comment in D.
nestingBlockComment
: '/+' (options {greedy=false;} :nestingBlockCommentCharacters)* '+/' {$channel=HIDDEN;}; // line 58
nestingBlockCommentCharacters
: (nestingBlockComment| '/'~'+' | ~'/' ) ; //line 61
For me, it would be logical that this should work...
This is the error message I get:
[21:06:34] warning(200): d.g:58:64: Decision can match input such as "'+/'" using multiple alternatives: 1, 2
As a result, alternative(s) 1 were disabled for that input
[21:06:34] warning(200): d.g:61:7: Decision can match input such as "'/+'" using multiple alternatives: 1, 3
As a result, alternative(s) 3 were disabled for that input
Could someone explan those error messages to me and the fix?
Thanks.
| antlr | antlr3 | null | null | null | null | open | An antlr problem with embedded comments
===
I am trying to implement a nested comment in D.
nestingBlockComment
: '/+' (options {greedy=false;} :nestingBlockCommentCharacters)* '+/' {$channel=HIDDEN;}; // line 58
nestingBlockCommentCharacters
: (nestingBlockComment| '/'~'+' | ~'/' ) ; //line 61
For me, it would be logical that this should work...
This is the error message I get:
[21:06:34] warning(200): d.g:58:64: Decision can match input such as "'+/'" using multiple alternatives: 1, 2
As a result, alternative(s) 1 were disabled for that input
[21:06:34] warning(200): d.g:61:7: Decision can match input such as "'/+'" using multiple alternatives: 1, 3
As a result, alternative(s) 3 were disabled for that input
Could someone explan those error messages to me and the fix?
Thanks.
| 0 |
5,986,308 | 05/13/2011 01:20:03 | 695,577 | 04/06/2011 20:29:22 | 5 | 0 | explain this code | hi can anyone please explain this code
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/signal.h>
char n = 0;
char FLAG =0x00;
char FLAG2 =0x00;
char RST=0x00;
unsigned char minutes_save [20];
unsigned char seconds_save [20];
int seconds, minutes, shift, count;
void init(void)
{
DDRB = 0xff;
DDRA =0xff;
MCUCR = 0x0F;
GICR = 0xC0;
TCCR2 = 0x05;
ASSR = 0x08;
TCNT2 = 0x00;
sei();
}
SIGNAL(SIG_INTERRUPT0)
{
if (FLAG == 0x00)
TIMSK = 0x40;
if (FLAG == 0x01)
TIMSK = 0x00;
FLAG = FLAG ^ 1;
} | c | null | null | null | null | 05/13/2011 01:41:45 | not a real question | explain this code
===
hi can anyone please explain this code
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/signal.h>
char n = 0;
char FLAG =0x00;
char FLAG2 =0x00;
char RST=0x00;
unsigned char minutes_save [20];
unsigned char seconds_save [20];
int seconds, minutes, shift, count;
void init(void)
{
DDRB = 0xff;
DDRA =0xff;
MCUCR = 0x0F;
GICR = 0xC0;
TCCR2 = 0x05;
ASSR = 0x08;
TCNT2 = 0x00;
sei();
}
SIGNAL(SIG_INTERRUPT0)
{
if (FLAG == 0x00)
TIMSK = 0x40;
if (FLAG == 0x01)
TIMSK = 0x00;
FLAG = FLAG ^ 1;
} | 1 |
5,764,888 | 04/23/2011 14:55:28 | 602,524 | 02/04/2011 02:07:31 | 57 | 0 | While loop now working! | using namespace std;
void reverse(char a[],int slen, int elen)
{
int start,end,temp;
for(start=slen,end=elen;start<end;start++,end--)
{
temp=a[start];
a[start]=a[end];
a[end]=temp;
}
}
void reverseall(char b[])
{
char a[15];
int i,j,n=0,len;
for(i=14,j=0;i>=0,j<15;i--,j++)
a[j]=b[i];
i=0;
j=0;
while(a[i]!='\0')
{cout<<"h";
n++;
i++;
}
while(j!=n)
{
if(j!=0)
j++;
len=0;
while(a[j]!= ' ' && a[j]!='\0')
{
len++;
j++;
}
reverse(a,j-len,j-1);
}
for(i=0;i<n;i++)
cout<<a[i];
}
int main()
{
char b[20]="hi how are you";
reverseall(b);
return 0;
}
I modified a working program of [reversing in place][1], and just added 3 lines and the while loop is not working now.
for(i=14,j=0;i>=0,j<15;i--,j++)
a[j]=b[i];
i=0;
j=0;
Here is the [link][2] to the program, I want the output as "you are how hi".
Thanks.
[1]: http://codepad.org/SF4PVt7F
[2]: http://codepad.org/WmGwrYPF | c++ | while-loops | reverse | null | null | 04/27/2011 03:20:24 | not a real question | While loop now working!
===
using namespace std;
void reverse(char a[],int slen, int elen)
{
int start,end,temp;
for(start=slen,end=elen;start<end;start++,end--)
{
temp=a[start];
a[start]=a[end];
a[end]=temp;
}
}
void reverseall(char b[])
{
char a[15];
int i,j,n=0,len;
for(i=14,j=0;i>=0,j<15;i--,j++)
a[j]=b[i];
i=0;
j=0;
while(a[i]!='\0')
{cout<<"h";
n++;
i++;
}
while(j!=n)
{
if(j!=0)
j++;
len=0;
while(a[j]!= ' ' && a[j]!='\0')
{
len++;
j++;
}
reverse(a,j-len,j-1);
}
for(i=0;i<n;i++)
cout<<a[i];
}
int main()
{
char b[20]="hi how are you";
reverseall(b);
return 0;
}
I modified a working program of [reversing in place][1], and just added 3 lines and the while loop is not working now.
for(i=14,j=0;i>=0,j<15;i--,j++)
a[j]=b[i];
i=0;
j=0;
Here is the [link][2] to the program, I want the output as "you are how hi".
Thanks.
[1]: http://codepad.org/SF4PVt7F
[2]: http://codepad.org/WmGwrYPF | 1 |
8,372,723 | 12/04/2011 02:11:08 | 31,100 | 10/24/2008 07:54:53 | 2,311 | 48 | How do I make parallel HTTP requests in Perl, and receive them back in order? | Using Perl, I'm looking for a simple way to perform a handful of HTTP requests in parallel, where I get responses back in the same order I sent them after they complete, e.g.:
my ($google, $perl) = foobar(GET => 'http://www.google.com/',
GET => 'http://www.perl.org/');
Is there a module I should be looking at?
I know I can do the bookkeeping by hand, but I feel spoiled after being able to do this using [jQuery's `when` method](http://api.jquery.com/jQuery.when/), and I'd love to have as simple a solution using Perl.
Thanks for your help. | perl | cpan | null | null | null | null | open | How do I make parallel HTTP requests in Perl, and receive them back in order?
===
Using Perl, I'm looking for a simple way to perform a handful of HTTP requests in parallel, where I get responses back in the same order I sent them after they complete, e.g.:
my ($google, $perl) = foobar(GET => 'http://www.google.com/',
GET => 'http://www.perl.org/');
Is there a module I should be looking at?
I know I can do the bookkeeping by hand, but I feel spoiled after being able to do this using [jQuery's `when` method](http://api.jquery.com/jQuery.when/), and I'd love to have as simple a solution using Perl.
Thanks for your help. | 0 |
10,053,018 | 04/07/2012 08:34:13 | 1,318,607 | 04/07/2012 04:26:30 | 1 | 0 | Portal : Do I really need a Portal | Do I really need a Portal ??
Always one question comes to my mind , why do peoplw go for Portal development , cant they manage with a normal web aplication , managing the UI Page with different sections . I am sorry if my question is not valid .
Or In what scenarios do we actually need for a Portal System ??
| web | portal | null | null | null | 04/09/2012 14:30:46 | not a real question | Portal : Do I really need a Portal
===
Do I really need a Portal ??
Always one question comes to my mind , why do peoplw go for Portal development , cant they manage with a normal web aplication , managing the UI Page with different sections . I am sorry if my question is not valid .
Or In what scenarios do we actually need for a Portal System ??
| 1 |
7,654,285 | 10/04/2011 21:31:07 | 857,994 | 07/22/2011 13:21:38 | 2,609 | 102 | Useful features to learn in boost for immediate use | I know this could be seen as subjective off-the-cuff (thus a poor question), but bear with me.
Boost has recently become available on the project on which I'm working, and I don't have much experience with it. Boost has so many parts and features that it's hard to know where to get started in learning it - especially since I'll be trying to learn it while making production code.
So, I would greatly appreciate it if someone could list around 3 to 5 features which are very useful in general, every-day programming and state why they're useful. I'm not asking you which is best, or trying to get a debate - I just want to know some good features to start learning and using immediately. I don't need code samples either, I'll be more than happy to research how to use the features myself after I know which ones are sensible to start learning now.
I'll accept any answer with a concise list of features that are sensible :) | c++ | boost | null | null | null | 10/04/2011 21:52:24 | not constructive | Useful features to learn in boost for immediate use
===
I know this could be seen as subjective off-the-cuff (thus a poor question), but bear with me.
Boost has recently become available on the project on which I'm working, and I don't have much experience with it. Boost has so many parts and features that it's hard to know where to get started in learning it - especially since I'll be trying to learn it while making production code.
So, I would greatly appreciate it if someone could list around 3 to 5 features which are very useful in general, every-day programming and state why they're useful. I'm not asking you which is best, or trying to get a debate - I just want to know some good features to start learning and using immediately. I don't need code samples either, I'll be more than happy to research how to use the features myself after I know which ones are sensible to start learning now.
I'll accept any answer with a concise list of features that are sensible :) | 4 |
11,328,531 | 07/04/2012 11:50:57 | 1,242,018 | 03/01/2012 06:51:51 | 88 | 3 | How to change MutableArray from other view? |
In my Application,
There are two different views **ItemList** And **ItemSearch**.
In ItemList file I have one NSMUTABLEARRAY with name tblItem. I want pass data in tblitem from the Itemsearch page.
Please, anyone suggest me.
How can i do this? | iphone | objective-c | cocoa-touch | iphone-sdk-4.0 | null | null | open | How to change MutableArray from other view?
===
In my Application,
There are two different views **ItemList** And **ItemSearch**.
In ItemList file I have one NSMUTABLEARRAY with name tblItem. I want pass data in tblitem from the Itemsearch page.
Please, anyone suggest me.
How can i do this? | 0 |
6,387,235 | 06/17/2011 14:20:38 | 785,099 | 06/05/2011 20:30:19 | 27 | 0 | About method override | For the following segment of java code, the method of “run” occurs four times. I am quite confusing about the relationships of these four occurrences of “run”. The original code is pretty long, I just keep the part that is related to my question.
1. public final class Job extends AbstractJob {
2. private Job( ) {
3. }
4. public static void main(String[] args) throws Exception {
5. new Job( ).run(new Path("testdata"), output, 10 );
6. }
7.
8. @Override
9. public int run(String[] args) throws IOException, ClassNotFoundException, InterruptedException {
10. run(input, output, alpha0);
11. return 0;
12. }
13. public void run(Path input, Path output, double alpha0)
14. throws IOException, ClassNotFoundException, InterruptedException {
15. ClusterDriver.run(directoryInput, output, alpha0);
16. }
17. }
Can I understnd the invoking sequence of this segment of code as follows.
At first, he run method at line 5 is called. Due to its particular parameter setting, 3 parameters, the compiler automatically uses the run method defined in line 13. ( if we only have one parameter in line 5, then compiler will use the run method defined in line 9 instead.
For the run method defined in line 9, it will call run method at line 10, which essentially is the run method defined at line 13.
Is my understanding correct? | java | override | null | null | null | null | open | About method override
===
For the following segment of java code, the method of “run” occurs four times. I am quite confusing about the relationships of these four occurrences of “run”. The original code is pretty long, I just keep the part that is related to my question.
1. public final class Job extends AbstractJob {
2. private Job( ) {
3. }
4. public static void main(String[] args) throws Exception {
5. new Job( ).run(new Path("testdata"), output, 10 );
6. }
7.
8. @Override
9. public int run(String[] args) throws IOException, ClassNotFoundException, InterruptedException {
10. run(input, output, alpha0);
11. return 0;
12. }
13. public void run(Path input, Path output, double alpha0)
14. throws IOException, ClassNotFoundException, InterruptedException {
15. ClusterDriver.run(directoryInput, output, alpha0);
16. }
17. }
Can I understnd the invoking sequence of this segment of code as follows.
At first, he run method at line 5 is called. Due to its particular parameter setting, 3 parameters, the compiler automatically uses the run method defined in line 13. ( if we only have one parameter in line 5, then compiler will use the run method defined in line 9 instead.
For the run method defined in line 9, it will call run method at line 10, which essentially is the run method defined at line 13.
Is my understanding correct? | 0 |
4,677,532 | 01/13/2011 06:51:33 | 463,857 | 10/01/2010 12:51:27 | 423 | 36 | How to make tableviewcell text editable on touch in iPhone SDK? | In my iPhone app, I have a table view.
I want that when the user selects (or basically touches) on the cell of the tableview then he/she should be able to edit the cell contents.
How can I do that?
Please Help and Suggest.
Thanks. | iphone | cocoa-touch | uitableview | uitableviewcell | ios-4.2 | null | open | How to make tableviewcell text editable on touch in iPhone SDK?
===
In my iPhone app, I have a table view.
I want that when the user selects (or basically touches) on the cell of the tableview then he/she should be able to edit the cell contents.
How can I do that?
Please Help and Suggest.
Thanks. | 0 |
10,850,973 | 06/01/2012 13:11:52 | 1,314,565 | 04/05/2012 07:02:22 | 485 | 11 | Good example for loaders | Where can I find a good example of doing processing in the background using loaders.? How Loaders can do same task as AsyncTask. | android | android-asynctask | android-loader | null | null | 06/01/2012 13:20:03 | not constructive | Good example for loaders
===
Where can I find a good example of doing processing in the background using loaders.? How Loaders can do same task as AsyncTask. | 4 |
5,906,137 | 05/06/2011 02:17:00 | 701,441 | 04/11/2011 02:03:27 | 74 | 0 | How to reduce network access time ? | I have an application that takes more time for data access than processing time. How can I speed things up ? Any pointers ? In general, what are the ways to improve network access times ? | java | networking | null | null | null | 05/06/2011 02:46:01 | not a real question | How to reduce network access time ?
===
I have an application that takes more time for data access than processing time. How can I speed things up ? Any pointers ? In general, what are the ways to improve network access times ? | 1 |
4,223,231 | 11/19/2010 08:28:38 | 53,313 | 01/09/2009 12:35:35 | 1,801 | 96 | Which big fat web sites use servlet technology? | Are there any?? | java | servlets | null | null | null | 11/19/2010 08:33:42 | off topic | Which big fat web sites use servlet technology?
===
Are there any?? | 2 |
805,786 | 04/30/2009 07:33:22 | 40,322 | 11/24/2008 16:54:48 | 2,979 | 213 | .NET Licensing Components | I'm looking for not too intrusive to the end user and decently priced .NET Licencing components.
Especially something allows serial key and time based expiration.
Any recommendations? | .net | licensing | demo | components | null | 01/09/2012 01:35:02 | not constructive | .NET Licensing Components
===
I'm looking for not too intrusive to the end user and decently priced .NET Licencing components.
Especially something allows serial key and time based expiration.
Any recommendations? | 4 |
10,341,872 | 04/26/2012 21:44:57 | 1,359,266 | 04/26/2012 16:53:01 | 1 | 0 | how to use Swing Timer from a function | I would like to stop the execution of a function to print what I have in paintComponent
main(){
f(){
change(list)
Timer to stop 1 minute and repaint
}
}
change(){
repaint();
}
| timer | repaint | null | null | null | 04/30/2012 15:29:57 | not a real question | how to use Swing Timer from a function
===
I would like to stop the execution of a function to print what I have in paintComponent
main(){
f(){
change(list)
Timer to stop 1 minute and repaint
}
}
change(){
repaint();
}
| 1 |
5,473,249 | 03/29/2011 13:25:19 | 476,990 | 10/15/2010 14:26:38 | 185 | 28 | CakePHP Email Component | Any reason why when I include the Email component in my controller without writing any code for it:
var $components = array('Email');
I get a fatal error saying:
Fatal error: Call to a member function read() on a non-object
I assume this is relating to the $Session variable, when I comment the component out, the error disappears.
| email | cakephp | null | null | null | null | open | CakePHP Email Component
===
Any reason why when I include the Email component in my controller without writing any code for it:
var $components = array('Email');
I get a fatal error saying:
Fatal error: Call to a member function read() on a non-object
I assume this is relating to the $Session variable, when I comment the component out, the error disappears.
| 0 |
11,041,743 | 06/14/2012 21:39:08 | 1,447,968 | 06/11/2012 00:35:03 | 1 | 0 | Should I work on XML simultaneously while I work on the Java coding for developing an Android App? | First off, I would like to make clear, that I am SUPER NEW TO THIS!! I suck at Java/developing, but I am very enthusiastic to learn.
I have a project in mind, an informative Android app. I think I have an idea of how I want it structered:
First View = list of 50 objects
Once you click on one of those objects it will provide another list of information of THOSE objects.
I understand that the Java coding is what I'd need to put the data there, but I also know that I'd have to be a little familiar with XML to actually make it look pretty. Am I supposed to be running back and forth to both the XML layouts and the Java code at the same time? Can I come back to fix up the XML later?
Do I have the right idea on how to structure an App that just lists tons of info? | java | android | xml | list | gui | 06/15/2012 21:45:08 | not a real question | Should I work on XML simultaneously while I work on the Java coding for developing an Android App?
===
First off, I would like to make clear, that I am SUPER NEW TO THIS!! I suck at Java/developing, but I am very enthusiastic to learn.
I have a project in mind, an informative Android app. I think I have an idea of how I want it structered:
First View = list of 50 objects
Once you click on one of those objects it will provide another list of information of THOSE objects.
I understand that the Java coding is what I'd need to put the data there, but I also know that I'd have to be a little familiar with XML to actually make it look pretty. Am I supposed to be running back and forth to both the XML layouts and the Java code at the same time? Can I come back to fix up the XML later?
Do I have the right idea on how to structure an App that just lists tons of info? | 1 |
5,907,022 | 05/06/2011 05:10:34 | 694,240 | 04/06/2011 05:49:49 | 96 | 0 | stop watch in android | i need to create stopwatch with start,stop and pause in android. please assist me. not yet started any coding. | android | null | null | null | null | null | open | stop watch in android
===
i need to create stopwatch with start,stop and pause in android. please assist me. not yet started any coding. | 0 |
7,739,105 | 10/12/2011 11:08:05 | 785,531 | 06/06/2011 07:40:41 | 55 | 0 | Using Jquery AJAX function with datatype HTML | We have a complete code for getting the values from PHP through Jquery AJAX with JSON datatype. Here are the codes.
**CSS code**
body {
background-color: #f0f0f0;
}
#wrapper {
margin: 100px auto;
width: 310px;
}
#email {
width: 248px;
}
#text {
width: 248px;
height: 70px;
}
#waiting {
color: #767676;
text-align: center;
}
fieldset {
margin-top: 10px;
background: #fff;
border: 1px solid #c8c8c8;
background-color: #fff;
}
legend {
background-color: #fff;
border-top: 1px solid #c8c8c8;
border-right: 1px solid #c8c8c8;
border-left: 1px solid #c8c8c8;
font-size: 1.2em;
padding: 0px 7px;
}
label {
display: inline-block;
width: 50px;
}
.success {
width: 298px;
background: #a5e283;
border: #337f09 1px solid;
padding: 5px;
}
.error {
width: 298px;
background: #ea7e7e;
border: #a71010 1px solid;
padding: 5px;
}
**HTML CODE**
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Ajax submit</title>
<link href="css/main.css" type="text/css" media="screen, projection"rel="stylesheet" />
</head>
<body>
<div id="wrapper">
<div id="message" style="display: none;">
</div>
<div id="waiting" style="display: none;">
Please wait<br />
<img src="images/ajax-loader.gif" title="Loader" alt="Loader" />
</div>
<form action="" id="demoForm" method="post">
<fieldset>
<legend>Demo form</legend>
<span style="font-size: 0.9em;">TEST by ROD</span>
<p>
<label for="email">E-Mail:</label>
<input type="text" name="email" id="email" value="" />
</p>
<p>
<input type="submit" name="submit" id="submit" style="float: right; clear: both; margin-right: 3px;" value="Submit" />
</p>
</fieldset>
</form>
</div>
<script type="text/javascript" src="js/jquery/jquery-1.3.2.js"></script>
<script type="text/javascript" src="js/ajaxSubmit.js"></script>
</body>
</html>
**PHP CODE**
sleep(3);
if (empty($_POST['email'])) {
$return['error'] = true;
$return['msg'] = 'You did not enter you email.';
}
else {
$return['error'] = false;
$return['msg'] = 'You\'ve entered: ' . $_POST['email'] . '.';
}
echo json_encode($return);
**JS CODE**
$(document).ready(function(){
$('#submit').click(function() {
$('#waiting').show(500);
$('#demoForm').hide(0);
$('#message').hide(0);
$.ajax({
type : 'POST',
url : 'post.php',
dataType : 'json',
data: {
email : $('#email').val()
},
success : function(data){
$('#waiting').hide(500);
$('#message').removeClass().addClass((data.error === true) ? 'error' : 'success')
.text(data.msg).show(500);
if (data.error === true)
$('#demoForm').show(500);
},
error : function(XMLHttpRequest, textStatus, errorThrown) {
$('#waiting').hide(500);
$('#message').removeClass().addClass('error')
.text('There was an error.').show(500);
$('#demoForm').show(500);
}
});
return false;
});
});
I just want to Move this code to HTML format, actually above these codes are made by internet user. due to my limited knowledge in AJAX/JS . we are unable to make it AJAX with HTML datatype.
The whole programme is good and according to our need. At the moment we just want to DISABLE the JSON and ENABLE HTML DATATYPE.
Thanks for giving time.
Rod
| javascript | html | ajax | jquery-ajax | null | null | open | Using Jquery AJAX function with datatype HTML
===
We have a complete code for getting the values from PHP through Jquery AJAX with JSON datatype. Here are the codes.
**CSS code**
body {
background-color: #f0f0f0;
}
#wrapper {
margin: 100px auto;
width: 310px;
}
#email {
width: 248px;
}
#text {
width: 248px;
height: 70px;
}
#waiting {
color: #767676;
text-align: center;
}
fieldset {
margin-top: 10px;
background: #fff;
border: 1px solid #c8c8c8;
background-color: #fff;
}
legend {
background-color: #fff;
border-top: 1px solid #c8c8c8;
border-right: 1px solid #c8c8c8;
border-left: 1px solid #c8c8c8;
font-size: 1.2em;
padding: 0px 7px;
}
label {
display: inline-block;
width: 50px;
}
.success {
width: 298px;
background: #a5e283;
border: #337f09 1px solid;
padding: 5px;
}
.error {
width: 298px;
background: #ea7e7e;
border: #a71010 1px solid;
padding: 5px;
}
**HTML CODE**
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Ajax submit</title>
<link href="css/main.css" type="text/css" media="screen, projection"rel="stylesheet" />
</head>
<body>
<div id="wrapper">
<div id="message" style="display: none;">
</div>
<div id="waiting" style="display: none;">
Please wait<br />
<img src="images/ajax-loader.gif" title="Loader" alt="Loader" />
</div>
<form action="" id="demoForm" method="post">
<fieldset>
<legend>Demo form</legend>
<span style="font-size: 0.9em;">TEST by ROD</span>
<p>
<label for="email">E-Mail:</label>
<input type="text" name="email" id="email" value="" />
</p>
<p>
<input type="submit" name="submit" id="submit" style="float: right; clear: both; margin-right: 3px;" value="Submit" />
</p>
</fieldset>
</form>
</div>
<script type="text/javascript" src="js/jquery/jquery-1.3.2.js"></script>
<script type="text/javascript" src="js/ajaxSubmit.js"></script>
</body>
</html>
**PHP CODE**
sleep(3);
if (empty($_POST['email'])) {
$return['error'] = true;
$return['msg'] = 'You did not enter you email.';
}
else {
$return['error'] = false;
$return['msg'] = 'You\'ve entered: ' . $_POST['email'] . '.';
}
echo json_encode($return);
**JS CODE**
$(document).ready(function(){
$('#submit').click(function() {
$('#waiting').show(500);
$('#demoForm').hide(0);
$('#message').hide(0);
$.ajax({
type : 'POST',
url : 'post.php',
dataType : 'json',
data: {
email : $('#email').val()
},
success : function(data){
$('#waiting').hide(500);
$('#message').removeClass().addClass((data.error === true) ? 'error' : 'success')
.text(data.msg).show(500);
if (data.error === true)
$('#demoForm').show(500);
},
error : function(XMLHttpRequest, textStatus, errorThrown) {
$('#waiting').hide(500);
$('#message').removeClass().addClass('error')
.text('There was an error.').show(500);
$('#demoForm').show(500);
}
});
return false;
});
});
I just want to Move this code to HTML format, actually above these codes are made by internet user. due to my limited knowledge in AJAX/JS . we are unable to make it AJAX with HTML datatype.
The whole programme is good and according to our need. At the moment we just want to DISABLE the JSON and ENABLE HTML DATATYPE.
Thanks for giving time.
Rod
| 0 |
9,932,504 | 03/29/2012 19:54:24 | 702,769 | 04/11/2011 19:14:09 | 428 | 0 | WCF, Entity Framework and N-tier solution | I've implemented WCF service using Entity Framework in a 3-Tier solution. I got it working, but what is puzzling me is why did I have to copy connection string ( specified in configuration file **C1**, which is used by Entity Framework to retrieve schema information from a database) into configuration file **C2** used WCF service? Namelly, if I don't copy the connection string, then I get:
FaultException: The specified named connection is either not found in the confiuration,
not intended to be used with the EntityClient provider, or not valid.
So it seems that **C1**'s connection string is used by Entity Framework at design time, while during runtime connection string specified in **C2** is used instead to connect to the database? Why?
Thank you
| wcf | entity-framework | null | null | null | null | open | WCF, Entity Framework and N-tier solution
===
I've implemented WCF service using Entity Framework in a 3-Tier solution. I got it working, but what is puzzling me is why did I have to copy connection string ( specified in configuration file **C1**, which is used by Entity Framework to retrieve schema information from a database) into configuration file **C2** used WCF service? Namelly, if I don't copy the connection string, then I get:
FaultException: The specified named connection is either not found in the confiuration,
not intended to be used with the EntityClient provider, or not valid.
So it seems that **C1**'s connection string is used by Entity Framework at design time, while during runtime connection string specified in **C2** is used instead to connect to the database? Why?
Thank you
| 0 |
5,497,346 | 03/31/2011 08:53:06 | 674,268 | 03/24/2011 03:56:50 | 1 | 0 | Facebook Graph API for iPhone Error | can any one suggest what is API error code 1 in Graph API for Facebook
please help me with this?
Thanks in advance.
| iphone-sdk-4.0 | null | null | null | null | null | open | Facebook Graph API for iPhone Error
===
can any one suggest what is API error code 1 in Graph API for Facebook
please help me with this?
Thanks in advance.
| 0 |
5,741,737 | 04/21/2011 08:50:31 | 696,627 | 04/07/2011 10:42:17 | 5 | 0 | WCF Sessions Question | I read some articles about Sessions in WCF and its difference between Asp.Net sessions.
Can you please tell me
a) The example scenarios in which we can make use of WCF Sessions.
b) The benefits of using WCF Sessions in such scenarios.
c) Code implementation of such scenarios
Thanks
Lijo | wcf | null | null | null | null | null | open | WCF Sessions Question
===
I read some articles about Sessions in WCF and its difference between Asp.Net sessions.
Can you please tell me
a) The example scenarios in which we can make use of WCF Sessions.
b) The benefits of using WCF Sessions in such scenarios.
c) Code implementation of such scenarios
Thanks
Lijo | 0 |
10,209,904 | 04/18/2012 13:01:02 | 950,464 | 09/17/2011 16:56:20 | 40 | 1 | internal storage in different threads | Good day, I have one theoretical question. I have an application that run some threads. One of the thread download xml file to local storage, have other threads access to this file? | android | multithreading | null | null | null | null | open | internal storage in different threads
===
Good day, I have one theoretical question. I have an application that run some threads. One of the thread download xml file to local storage, have other threads access to this file? | 0 |
6,976,934 | 08/08/2011 01:10:31 | 274,078 | 02/16/2010 05:04:52 | 1,489 | 127 | mvc back to previous view | Suppose:
View List X
View List Y
View Details
View Route
User selects Details View from either List X or Y View and clicks through to the Route View.
When he is done on the Route View he clicks the Back Button to go the the Details View again and if he wishes clicks the Back Button there to go back to the List View (X or y depending where he came from) again.
What is the easiest way in MVC to make the back button point to the right page even if the page is reloaded.
UrlReferrer won't work because coming from the Route View back to the Details View would make the UrlRefferer point to the Route View and not to one of the Lists.
| asp.net-mvc | null | null | null | null | null | open | mvc back to previous view
===
Suppose:
View List X
View List Y
View Details
View Route
User selects Details View from either List X or Y View and clicks through to the Route View.
When he is done on the Route View he clicks the Back Button to go the the Details View again and if he wishes clicks the Back Button there to go back to the List View (X or y depending where he came from) again.
What is the easiest way in MVC to make the back button point to the right page even if the page is reloaded.
UrlReferrer won't work because coming from the Route View back to the Details View would make the UrlRefferer point to the Route View and not to one of the Lists.
| 0 |
827,220 | 05/05/2009 22:37:02 | 16,709 | 09/17/2008 20:04:03 | 327 | 46 | Any real world experience with H2 database? | Has anybody out there got any real world experience with the [H2 database][1]? I'm interested in:
- performance
- stability
- bugs
[1]: http://www.h2database.com/html/main.html | database | java | null | null | null | 07/29/2012 13:56:53 | not constructive | Any real world experience with H2 database?
===
Has anybody out there got any real world experience with the [H2 database][1]? I'm interested in:
- performance
- stability
- bugs
[1]: http://www.h2database.com/html/main.html | 4 |
9,218,318 | 02/09/2012 20:32:43 | 1,200,584 | 02/09/2012 20:25:01 | 1 | 0 | Would it be beneficial to use Bcrypt and PBKDF2 together? | I've read various opinions about whether Bcrypt or PBKDF2 is a better key derivation hashing method (see http://stackoverflow.com/questions/1561174/sha512-vs-blowfish-and-bcrypt
and http://stackoverflow.com/questions/4433216/password-encryption-pbkdf2-using-sha512-x-1000-vs-bcrypt).
The answer seems to depend on which expert you ask and on a lot of complicated factors that are not easy to analyze.
Would using both of them serially one before the other accrue the benefits of both and thus achieve an optimally secure solution? | hash | hashing | hmac | bcrypt | pbkdf2 | 05/22/2012 14:22:26 | off topic | Would it be beneficial to use Bcrypt and PBKDF2 together?
===
I've read various opinions about whether Bcrypt or PBKDF2 is a better key derivation hashing method (see http://stackoverflow.com/questions/1561174/sha512-vs-blowfish-and-bcrypt
and http://stackoverflow.com/questions/4433216/password-encryption-pbkdf2-using-sha512-x-1000-vs-bcrypt).
The answer seems to depend on which expert you ask and on a lot of complicated factors that are not easy to analyze.
Would using both of them serially one before the other accrue the benefits of both and thus achieve an optimally secure solution? | 2 |
10,543,993 | 05/11/2012 00:46:06 | 446,991 | 09/14/2010 04:45:53 | 100 | 1 | Failed to parse output of Open MPI command | I've Open MPI installed and it's working perfectly on terminal, but couldn't get it working on Eclipse.
I'm trying to use PTP plugin to be able to write parallel programs on Eclipse.
I've installed PTP successfully, but running the project produces this error message
Failed after executing command to launch parallel application.
Failed to parse output of Open MPI command. Check output for errors.
Premature end of file.
| eclipse-plugin | openmpi | null | null | null | null | open | Failed to parse output of Open MPI command
===
I've Open MPI installed and it's working perfectly on terminal, but couldn't get it working on Eclipse.
I'm trying to use PTP plugin to be able to write parallel programs on Eclipse.
I've installed PTP successfully, but running the project produces this error message
Failed after executing command to launch parallel application.
Failed to parse output of Open MPI command. Check output for errors.
Premature end of file.
| 0 |
11,019,352 | 06/13/2012 16:32:24 | 1,312,785 | 04/04/2012 11:58:30 | 1 | 0 | jQuery accordion for smartphones | The idea is that this accordion works only on smartphones to improve usability on small devices.
However it only works when you refresh the browser under 480.
Is there a way of including in the function something that makes the browser refresh as soon as the window is resized under 480?
Refreshing the browser manually would not make it usable at all.
var windowWidth = $(window).width(); //retrieve current window width
function accordion() {
if (windowWidth<=480)
{
$('h3').click(function() {
$('h3').next().hide(2000);
if($(this).next().is(':hidden') == true) {
$(this).next().show(1000); }
});
}}
$(document).ready(function() {
accordion();
});
HTML markup
<section id="Main_Box_Section">
<section class="box">
<h3>Service 1</h3>
<div class="box2"> <p></p></div>
</section><!-- end box_1 -->
<section class="box">
<h3>Service 2</h3>
<div class="box2"><p></p> </div>
</section><!-- end box_2 -->
<section class="box">
<h3>Service 3</h3>
<div class="box2"><p></p> </div>
</section><!-- end box_3 -->
</section> | jquery | null | null | null | null | 06/13/2012 18:24:22 | too localized | jQuery accordion for smartphones
===
The idea is that this accordion works only on smartphones to improve usability on small devices.
However it only works when you refresh the browser under 480.
Is there a way of including in the function something that makes the browser refresh as soon as the window is resized under 480?
Refreshing the browser manually would not make it usable at all.
var windowWidth = $(window).width(); //retrieve current window width
function accordion() {
if (windowWidth<=480)
{
$('h3').click(function() {
$('h3').next().hide(2000);
if($(this).next().is(':hidden') == true) {
$(this).next().show(1000); }
});
}}
$(document).ready(function() {
accordion();
});
HTML markup
<section id="Main_Box_Section">
<section class="box">
<h3>Service 1</h3>
<div class="box2"> <p></p></div>
</section><!-- end box_1 -->
<section class="box">
<h3>Service 2</h3>
<div class="box2"><p></p> </div>
</section><!-- end box_2 -->
<section class="box">
<h3>Service 3</h3>
<div class="box2"><p></p> </div>
</section><!-- end box_3 -->
</section> | 3 |
3,074,653 | 06/19/2010 06:54:06 | 293,055 | 03/13/2010 17:42:45 | 19 | 0 | How can I convert words to numbers in PHP? | The first method that springs to mind is reading each character and converting it to its ASCII value. Are there any other methods of doing this? I would like to be able to give a php script a string, and have it turn that same string (that may or may not contain numbers or symbols) into the same series of numbers every time. | php | string | random | null | null | null | open | How can I convert words to numbers in PHP?
===
The first method that springs to mind is reading each character and converting it to its ASCII value. Are there any other methods of doing this? I would like to be able to give a php script a string, and have it turn that same string (that may or may not contain numbers or symbols) into the same series of numbers every time. | 0 |
11,564,819 | 07/19/2012 16:03:39 | 894,284 | 08/14/2011 22:08:01 | 9,245 | 298 | What is "live programming" and what are the distinguishing features of "live programming languages"? | What is meant by the term "live programming"?
I recently came across the term on [this LtU thread](http://lambda-the-ultimate.org/node/2149). *(I assume the linked PDF explains it but I can't open it on any of my computers)*. Googling for it returns a lot of junk results, including some for "live coding", which seems to be something different.
What features or components distinguish a "live programming language" from a non-live language? | programming-paradigms | live-programming | null | null | null | 07/30/2012 03:23:14 | not constructive | What is "live programming" and what are the distinguishing features of "live programming languages"?
===
What is meant by the term "live programming"?
I recently came across the term on [this LtU thread](http://lambda-the-ultimate.org/node/2149). *(I assume the linked PDF explains it but I can't open it on any of my computers)*. Googling for it returns a lot of junk results, including some for "live coding", which seems to be something different.
What features or components distinguish a "live programming language" from a non-live language? | 4 |
10,086,307 | 04/10/2012 09:37:45 | 1,323,678 | 04/10/2012 09:31:25 | 1 | 0 | GPS vehicle tracking over the internet | Do we need to insert a GSM SIM card to a GPS device of a vehicle to track its location from distance (over the internet) | gps | communication | null | null | null | 04/11/2012 11:54:44 | not a real question | GPS vehicle tracking over the internet
===
Do we need to insert a GSM SIM card to a GPS device of a vehicle to track its location from distance (over the internet) | 1 |
11,708,629 | 07/29/2012 10:50:07 | 1,560,836 | 07/29/2012 10:39:50 | 1 | 0 | GoogleEarth-like controls for Three.js | I've tried unsuccessfully (because of my poor 3D geometry understanding and unfortunate lack of time to dig in) to build a GoogleEarth-like controls for three.js. Maybe someone can help me, or might already have it. Anyways, i think it would be an excellent addition to three.js library.
Here's the specific functionality I am trying to build:
1. Zoom in with mouse wheel TO MOUSE CURSOR
2. Rotate around the scene by holding down Shift
3. Pan by pressing left mouse button.
4. As a bonus: show a little target icon during 1 and 2 operations above.
I have most trouble with 1, and haven't attempted 2. Panning is easy (there are lots of examples).
Right now I am unable to zoom into the scene so that it stays fixed under the cursor (so I can point at the top right corner of the screen, zoom-in and still see what I had under the cursor).
My thanks in advance,
Alex | zoom | three.js | projector | null | null | null | open | GoogleEarth-like controls for Three.js
===
I've tried unsuccessfully (because of my poor 3D geometry understanding and unfortunate lack of time to dig in) to build a GoogleEarth-like controls for three.js. Maybe someone can help me, or might already have it. Anyways, i think it would be an excellent addition to three.js library.
Here's the specific functionality I am trying to build:
1. Zoom in with mouse wheel TO MOUSE CURSOR
2. Rotate around the scene by holding down Shift
3. Pan by pressing left mouse button.
4. As a bonus: show a little target icon during 1 and 2 operations above.
I have most trouble with 1, and haven't attempted 2. Panning is easy (there are lots of examples).
Right now I am unable to zoom into the scene so that it stays fixed under the cursor (so I can point at the top right corner of the screen, zoom-in and still see what I had under the cursor).
My thanks in advance,
Alex | 0 |
8,678,736 | 12/30/2011 11:00:56 | 562,478 | 01/04/2011 11:37:30 | 941 | 76 | How to run T-SQL queries using Linq2Entity? | My project is using Linq2Entity. I want to execute some T-SQL. I want to use existing L2E connection configurations, I don't want to add a new SqlClient provider connection configuration to my .config file. How do I do that? ObjectContext seems to have only methods that return results with classes from data mapping schema.
I've tried doing ObjectContext.Connection.CreateCommand method, then specifying my T-SQL as the command text, but it failed with a message that is something like "could not understand what entities you are talking about in your query". | tsql | entity-framework | sqlcommand | dbcommand | null | null | open | How to run T-SQL queries using Linq2Entity?
===
My project is using Linq2Entity. I want to execute some T-SQL. I want to use existing L2E connection configurations, I don't want to add a new SqlClient provider connection configuration to my .config file. How do I do that? ObjectContext seems to have only methods that return results with classes from data mapping schema.
I've tried doing ObjectContext.Connection.CreateCommand method, then specifying my T-SQL as the command text, but it failed with a message that is something like "could not understand what entities you are talking about in your query". | 0 |
1,974,045 | 12/29/2009 10:58:22 | 33,436 | 11/02/2008 13:07:33 | 514 | 29 | Firefox addon (for firefox 3.5) to monitor web usage | I am looking for a firefox addon that would tell me where I have spent how much time browsing. I came across quite a few addons but they are either not supported in 3.5 or they are no longer supported or cannot be installed.
I work on ubuntu linux (9.04) and Shiretoko (Firefox 3.5). I need a solution for this environment.
I need stats like
Website Time spent (hh:mm) % (day) % (week) %(month)
-----------------------------------------------------------------------------
www.stackoverflow.com 20:00 90 xx yy
www.google.com 1:35 x
www.theserverside.com 80:23 x
www.facebook.com 200:30 x | firefox-addon | null | null | null | null | 12/29/2009 14:59:06 | off topic | Firefox addon (for firefox 3.5) to monitor web usage
===
I am looking for a firefox addon that would tell me where I have spent how much time browsing. I came across quite a few addons but they are either not supported in 3.5 or they are no longer supported or cannot be installed.
I work on ubuntu linux (9.04) and Shiretoko (Firefox 3.5). I need a solution for this environment.
I need stats like
Website Time spent (hh:mm) % (day) % (week) %(month)
-----------------------------------------------------------------------------
www.stackoverflow.com 20:00 90 xx yy
www.google.com 1:35 x
www.theserverside.com 80:23 x
www.facebook.com 200:30 x | 2 |
7,429,587 | 09/15/2011 10:45:50 | 946,583 | 09/15/2011 10:40:30 | 1 | 0 | How to open PhpMyAdnim on Mac ? | I'm new to PHP & MYSQL;
I've installed MAMP on OSX lion,
I can't open PhpMyAdmin in my browser "Safari".
Thanx in advance. | php | mysql | osx | phpmyadmin | mamp | 09/15/2011 11:06:25 | off topic | How to open PhpMyAdnim on Mac ?
===
I'm new to PHP & MYSQL;
I've installed MAMP on OSX lion,
I can't open PhpMyAdmin in my browser "Safari".
Thanx in advance. | 2 |
5,000,502 | 02/15/2011 06:23:33 | 358,193 | 06/04/2010 07:13:03 | 176 | 2 | suggest a good offfline office suite | i am developing an **intranet** website and my client want a complete office(e,g, MS office,Open office) solution over that intranet website .
i know that Google docs is a better option and i can implement it using it's API but the
problem is that if i use google docs then my client always need an internet connection so my
client wants a solution over it's intranet so he can access the office without using the
internet.
i already tried [eyeOS][1] is provides some office tools but they are not complete i mean
to say that they don't have complete features like a desktop install or google docs.
so please suggest me a good offline solution for this issue.
if your solution is open source then it's better.
can i do this using Open office?(i am sorry if i am asking something wrong because i have no idea about it)
[1]: http://eyeos.org/
-thanks in advance
| java | open-source | cloud | openoffice.org | google-docs | 02/15/2011 14:46:26 | off topic | suggest a good offfline office suite
===
i am developing an **intranet** website and my client want a complete office(e,g, MS office,Open office) solution over that intranet website .
i know that Google docs is a better option and i can implement it using it's API but the
problem is that if i use google docs then my client always need an internet connection so my
client wants a solution over it's intranet so he can access the office without using the
internet.
i already tried [eyeOS][1] is provides some office tools but they are not complete i mean
to say that they don't have complete features like a desktop install or google docs.
so please suggest me a good offline solution for this issue.
if your solution is open source then it's better.
can i do this using Open office?(i am sorry if i am asking something wrong because i have no idea about it)
[1]: http://eyeos.org/
-thanks in advance
| 2 |
1,678,454 | 11/05/2009 05:07:23 | 174,719 | 09/17/2009 02:45:22 | 92 | 1 | Submenus in Wordpress | I know you can create pages under a parent eg:
-a
--c
--d
--e
-b
--f
--g
But all of the themes I've looked at will only display the top menus.
-a
-b
How can I create a menu with drop downs for the sub menus I'll handle the drop down scripting, but how do I access the page names in order to create one? | wordpress | php | null | null | null | null | open | Submenus in Wordpress
===
I know you can create pages under a parent eg:
-a
--c
--d
--e
-b
--f
--g
But all of the themes I've looked at will only display the top menus.
-a
-b
How can I create a menu with drop downs for the sub menus I'll handle the drop down scripting, but how do I access the page names in order to create one? | 0 |
3,406,620 | 08/04/2010 14:38:53 | 409,195 | 08/03/2010 01:18:16 | 1 | 0 | how to learn c basic easily and quickly? | how to learn c basic easily and quickly? | c | null | null | null | null | 08/04/2010 14:41:54 | not a real question | how to learn c basic easily and quickly?
===
how to learn c basic easily and quickly? | 1 |
5,909,076 | 05/06/2011 08:57:53 | 395,099 | 07/18/2010 10:36:24 | 119 | 5 | Best Jquery Upload Script (ajax) | there are many Jquery-Ajax-Upload scripts available but what is currently (for you) the best (stable) script?
Thank in advance!<br />
Peter
| jquery | ajax | upload | null | null | 06/09/2012 16:53:32 | not constructive | Best Jquery Upload Script (ajax)
===
there are many Jquery-Ajax-Upload scripts available but what is currently (for you) the best (stable) script?
Thank in advance!<br />
Peter
| 4 |
8,944,874 | 01/20/2012 16:46:36 | 920,504 | 08/30/2011 20:50:24 | 43 | 0 | accessing css file with VPN | I am connected to my office VPN but for some reasons I cannot access my css files. I mean the css files arent finding the right path. Is there a proxy setting i need to change to fix it?
Note: I am not trying to access the css file but when I load the page. My page is messed up so I used firebug and noticed that the page was pointing to the wrong css path. It used to work fine in my office.
Thanks | css | vpn | null | null | null | 01/23/2012 03:37:03 | too localized | accessing css file with VPN
===
I am connected to my office VPN but for some reasons I cannot access my css files. I mean the css files arent finding the right path. Is there a proxy setting i need to change to fix it?
Note: I am not trying to access the css file but when I load the page. My page is messed up so I used firebug and noticed that the page was pointing to the wrong css path. It used to work fine in my office.
Thanks | 3 |
11,678,316 | 07/26/2012 21:30:53 | 17,967 | 09/18/2008 16:58:49 | 1,458 | 47 | OC4J AnnotatedNoClassDefFoundError for RemoteHome | I had this working a few months ago but I apparently changed something and now it's not working. The below is throwing a AnnotatedNoClassDefFoundError. It's being called from a web app in EAR #1 which is trying to call an EJB in EAR #2.
Object obj = getContext().lookup(name);
SecurityServiceRemoteHome home = (SecurityServiceRemoteHome)PortableRemoteObject.narrow(obj,
SecurityServiceRemoteHome.class);
where name is "ejb/ifactory/SecurityService/remote". Here's the error log
oracle.classloader.util.AnnotatedNoClassDefFoundError:
Missing class: com.icumed.ifactory.service.session.SecurityServiceRemoteHome
Dependent class: com.icumed.ifactory.service.EJBServiceLocatorStrategy
Loader: ifactory3.root:0.0.0
Code-Source: /icu/ias/dev/ifactory/10.1.3/j2ee/sandbox/applications/ifactory3/lib/ifactory-ejb-client.jar
Configuration: <library> in /icu/ias/dev/ifactory/10.1.3/j2ee/sandbox/applications/ifactory3/
The odd thing is that I have a simple little Swing app as well and I tried the same call in there and it worked.
Any hints on why it's not working? | java-ee | ejb | oc4j | null | null | null | open | OC4J AnnotatedNoClassDefFoundError for RemoteHome
===
I had this working a few months ago but I apparently changed something and now it's not working. The below is throwing a AnnotatedNoClassDefFoundError. It's being called from a web app in EAR #1 which is trying to call an EJB in EAR #2.
Object obj = getContext().lookup(name);
SecurityServiceRemoteHome home = (SecurityServiceRemoteHome)PortableRemoteObject.narrow(obj,
SecurityServiceRemoteHome.class);
where name is "ejb/ifactory/SecurityService/remote". Here's the error log
oracle.classloader.util.AnnotatedNoClassDefFoundError:
Missing class: com.icumed.ifactory.service.session.SecurityServiceRemoteHome
Dependent class: com.icumed.ifactory.service.EJBServiceLocatorStrategy
Loader: ifactory3.root:0.0.0
Code-Source: /icu/ias/dev/ifactory/10.1.3/j2ee/sandbox/applications/ifactory3/lib/ifactory-ejb-client.jar
Configuration: <library> in /icu/ias/dev/ifactory/10.1.3/j2ee/sandbox/applications/ifactory3/
The odd thing is that I have a simple little Swing app as well and I tried the same call in there and it worked.
Any hints on why it's not working? | 0 |
6,370,005 | 06/16/2011 09:52:29 | 589,517 | 01/25/2011 19:11:02 | 393 | 25 | Customized JAXB xml output | Given the following class:
public class Customer {
public String name;
public String lastName;
}
I want to generate the following xml output using JAXB for a customer whose `name` is John and `lastName` is Doe:
<cst>John Doe</cst>
How can i do this with JAXB? | java | xml | jaxb | null | null | null | open | Customized JAXB xml output
===
Given the following class:
public class Customer {
public String name;
public String lastName;
}
I want to generate the following xml output using JAXB for a customer whose `name` is John and `lastName` is Doe:
<cst>John Doe</cst>
How can i do this with JAXB? | 0 |
6,681,541 | 07/13/2011 15:37:04 | 185,749 | 10/07/2009 16:10:41 | 472 | 35 | How to select MAX in a sub query in Linq to Sql | Given the following data, how does one select only the latest version for each item using LINQ?
ItemId, Version
===================
A, 1
A, 2
A, 3
B, 8
B, 9,
C, 10
C, 11
The desired results are:
A, 3
B, 9
C, 11
In TSQL, I would do something like so:
SELECT * FROM MyTable AS Tbl1
WHERE Tbl1.Version =
(SELECT MAX(Version)
FROM MyTable
WHERE MyTable.ItemId = Tbl1.ItemId) | sql | linq | linq-to-sql | null | null | null | open | How to select MAX in a sub query in Linq to Sql
===
Given the following data, how does one select only the latest version for each item using LINQ?
ItemId, Version
===================
A, 1
A, 2
A, 3
B, 8
B, 9,
C, 10
C, 11
The desired results are:
A, 3
B, 9
C, 11
In TSQL, I would do something like so:
SELECT * FROM MyTable AS Tbl1
WHERE Tbl1.Version =
(SELECT MAX(Version)
FROM MyTable
WHERE MyTable.ItemId = Tbl1.ItemId) | 0 |
9,974,009 | 04/02/2012 09:34:06 | 1,249,449 | 03/05/2012 09:08:36 | 46 | 3 | Google maps get array of polylines | I need to draw multiple routes on a google map. By googeling around i found 2 solutions. 1 was to create and render each route in a sepparate DirectionsRenderer object. The other solution (which i have found [here](http://stackoverflow.com/questions/6040965/drawing-multiple-route-google-map)) suggests storing the polygons in a array and draw them out all at once (which seems like a better solution to me)
The problem is, i am unable to find a way to get all the polygons on the map. Does anyone has a snippet of code on how to do this? | google-maps | google | google-maps-api-3 | null | null | null | open | Google maps get array of polylines
===
I need to draw multiple routes on a google map. By googeling around i found 2 solutions. 1 was to create and render each route in a sepparate DirectionsRenderer object. The other solution (which i have found [here](http://stackoverflow.com/questions/6040965/drawing-multiple-route-google-map)) suggests storing the polygons in a array and draw them out all at once (which seems like a better solution to me)
The problem is, i am unable to find a way to get all the polygons on the map. Does anyone has a snippet of code on how to do this? | 0 |
7,215,461 | 08/27/2011 15:23:32 | 892,178 | 08/12/2011 16:56:00 | 1 | 0 | change the code of texr area in netbeans | how to change the code of text area box in net beans? Iam going to design an IDE.for that i created a text editor.i have to change the colour of the keyword when type it.please help me out to solve it. | java | netbeans | null | null | null | 08/27/2011 16:50:14 | not a real question | change the code of texr area in netbeans
===
how to change the code of text area box in net beans? Iam going to design an IDE.for that i created a text editor.i have to change the colour of the keyword when type it.please help me out to solve it. | 1 |
9,502,569 | 02/29/2012 16:08:15 | 1,209,555 | 02/14/2012 16:39:59 | 1 | 0 | make black white picture | i just want to make black and white image but i dont know how to do this, just knowing to get pixel
can you hep me
private BufferedImage image;
private int[][]rgbValue;
public void setRgbValue(BufferedImage image){
int width = image.getWidth();
int height = image.getHeight();
rgbValue = new int[width*height][3];
int counter = 0;
for(int i=0 ; i<width ; i++){
for(int j=0 ; j<height ; j++){
int color = image.getRGB(i, j);
int red = (color & 0x00ff0000) >> 16;
int green = (color & 0x0000ff00) >> 8;
int blue = (color & 0x000000ff);
rgbValue[counter][0] = red;
rgbValue[counter][1] = green;
rgbValue[counter][2] = blue;
counter++;
}
}
| image | white | null | null | null | null | open | make black white picture
===
i just want to make black and white image but i dont know how to do this, just knowing to get pixel
can you hep me
private BufferedImage image;
private int[][]rgbValue;
public void setRgbValue(BufferedImage image){
int width = image.getWidth();
int height = image.getHeight();
rgbValue = new int[width*height][3];
int counter = 0;
for(int i=0 ; i<width ; i++){
for(int j=0 ; j<height ; j++){
int color = image.getRGB(i, j);
int red = (color & 0x00ff0000) >> 16;
int green = (color & 0x0000ff00) >> 8;
int blue = (color & 0x000000ff);
rgbValue[counter][0] = red;
rgbValue[counter][1] = green;
rgbValue[counter][2] = blue;
counter++;
}
}
| 0 |
8,684,642 | 12/30/2011 22:23:04 | 460,075 | 09/28/2010 01:16:23 | 134 | 7 | Why does YY represent a 4 digit year in a date format for the jQueryUI datepicker? | When specifying a date format for the jQuery UI datepicker YY is a 4 digit year and Y is a 2 digit year:
YY = 2011
Y = 11
See http://docs.jquery.com/UI/Datepicker/formatDate
Was curious why this is. | jquery | jquery-ui | datepicker | dateformat | null | 12/31/2011 00:33:15 | not constructive | Why does YY represent a 4 digit year in a date format for the jQueryUI datepicker?
===
When specifying a date format for the jQuery UI datepicker YY is a 4 digit year and Y is a 2 digit year:
YY = 2011
Y = 11
See http://docs.jquery.com/UI/Datepicker/formatDate
Was curious why this is. | 4 |
8,728,126 | 01/04/2012 14:01:55 | 1,130,051 | 01/04/2012 13:41:56 | 1 | 0 | how to disable drupal7 system css files? | ive created a new view and change some styles in view.css.
but when i load the page, my styles was override by style.css and system.theme.css.
is there a way to set my css "before" the system css?
| css | views | drupal-7 | null | null | null | open | how to disable drupal7 system css files?
===
ive created a new view and change some styles in view.css.
but when i load the page, my styles was override by style.css and system.theme.css.
is there a way to set my css "before" the system css?
| 0 |
7,153,239 | 08/22/2011 20:30:11 | 675,577 | 03/24/2011 19:42:55 | 80 | 5 | Windows boot script: make program run at startup, once per day | I found that in order to run a program at startup it's enough to paste a shortcut to it at the "Startup" folder.
But what I really wanted now was to make it run at startup but only the first boot of each day. I figure that it'll probably involve some scripting right? Can anyone give some guidelines of what to do? | windows | script | startup | null | null | 08/23/2011 00:34:42 | off topic | Windows boot script: make program run at startup, once per day
===
I found that in order to run a program at startup it's enough to paste a shortcut to it at the "Startup" folder.
But what I really wanted now was to make it run at startup but only the first boot of each day. I figure that it'll probably involve some scripting right? Can anyone give some guidelines of what to do? | 2 |
7,752,432 | 10/13/2011 10:01:17 | 701,159 | 04/10/2011 19:13:16 | 11 | 0 | How to start working programmatically with Twitter API programmly, having only login and password? | Without manually creating applications and keys! | api | twitter | twitter-api | twitter-oauth | null | 11/07/2011 12:26:11 | not a real question | How to start working programmatically with Twitter API programmly, having only login and password?
===
Without manually creating applications and keys! | 1 |
1,433,490 | 09/16/2009 14:49:53 | 155,355 | 08/12/2009 19:31:50 | 1 | 0 | SQL Server - Efficiently storing the results of a query in a tracking table | I have been asked to keep track of how many times each item comes up within the results of a particular query. My thought is to just store the result of a query into a tracking table and then spit the results back to the caller. I am wondering what the most efficient method of storing these results would be since the result set could include up to 1000 records.
My plan is to pull the query results into a temp table and insert those results into the tracking table then return the temp table as the result of the SPROC. Something like this:
DECLARE @QueryTime datetime
SET @QueryTime = GETDATE()
DECLARE @Results TABLE (X nvarchar(255), Y nvarchar(255))
INSERT INTO @Results
SELECT X,Y FROM TableA
INSERT INTO TableB
SELECT X, @QueryTime FROM @Results
SELECT X, Y FROM @Results
Does anyone have a more efficient way to post the bulk result set into a tracking table? | sql | stored-procedures | null | null | null | null | open | SQL Server - Efficiently storing the results of a query in a tracking table
===
I have been asked to keep track of how many times each item comes up within the results of a particular query. My thought is to just store the result of a query into a tracking table and then spit the results back to the caller. I am wondering what the most efficient method of storing these results would be since the result set could include up to 1000 records.
My plan is to pull the query results into a temp table and insert those results into the tracking table then return the temp table as the result of the SPROC. Something like this:
DECLARE @QueryTime datetime
SET @QueryTime = GETDATE()
DECLARE @Results TABLE (X nvarchar(255), Y nvarchar(255))
INSERT INTO @Results
SELECT X,Y FROM TableA
INSERT INTO TableB
SELECT X, @QueryTime FROM @Results
SELECT X, Y FROM @Results
Does anyone have a more efficient way to post the bulk result set into a tracking table? | 0 |
6,779,998 | 07/21/2011 17:13:15 | 197,606 | 10/27/2009 19:49:00 | 3,118 | 105 | Removing all  type characters | I have constant problems with data where odd characters like `` will show up in our database causing everything to break at some point down the line. I need to get a system in place that only allows specific characters through and ignores all of these crazy things that can be pasted from Microsoft Office. Is there something like this built in, or should I start from scratch? | php | special-characters | null | null | null | null | open | Removing all  type characters
===
I have constant problems with data where odd characters like `` will show up in our database causing everything to break at some point down the line. I need to get a system in place that only allows specific characters through and ignores all of these crazy things that can be pasted from Microsoft Office. Is there something like this built in, or should I start from scratch? | 0 |
10,806,916 | 05/29/2012 21:24:26 | 1,311,339 | 04/03/2012 20:13:36 | 18 | 0 | Is SQL or C# faster at pairing? | I have a lot of data which needs to be paired based on a few simple criteria. There is a time window (both records have a DateTime column), if one record is very close in time (within 5 seconds) to another then it is a potential match, the record which is the closest in time is considered a complete match. There are other fields which help narrow this down also.
I wrote a stored procedure which does this matching on the server before returning the
full, matched dataset to a C# application. My question is, would it be better to pull in the 1 million (x2) rows and deal with them in C#, or is sql server better suited to perform this matching? If Sql server is, then what is the fastest way of pairing data using datetime fields?
Right now I select all records from Table 1/Table 2 into temporary tables, iterate through each record in Table 1, look for a match in Table 2 and store the match (if one exists) in a temporary table, then I delete both records in their own temporary tables.
I had to rush this piece for a game I'm writing, so excuse the bad (very bad) procedure... It works, it's just horribly inefficient! The whole SP is available on pastebin: http://pastebin.com/qaieDsW7
I know the SP is written poorly, so saying "hey, dumbass... write it better" doesn't help! I'm looking for help in improving it, or help/advice on how I should do the whole thing differently! I have about 3/5 days to rewrite it, I can push that deadline back a bit, but I'd rather not if you guys can help me in time! :)
Thanks! | c# | sql | sql-server | database | c#-4.0 | null | open | Is SQL or C# faster at pairing?
===
I have a lot of data which needs to be paired based on a few simple criteria. There is a time window (both records have a DateTime column), if one record is very close in time (within 5 seconds) to another then it is a potential match, the record which is the closest in time is considered a complete match. There are other fields which help narrow this down also.
I wrote a stored procedure which does this matching on the server before returning the
full, matched dataset to a C# application. My question is, would it be better to pull in the 1 million (x2) rows and deal with them in C#, or is sql server better suited to perform this matching? If Sql server is, then what is the fastest way of pairing data using datetime fields?
Right now I select all records from Table 1/Table 2 into temporary tables, iterate through each record in Table 1, look for a match in Table 2 and store the match (if one exists) in a temporary table, then I delete both records in their own temporary tables.
I had to rush this piece for a game I'm writing, so excuse the bad (very bad) procedure... It works, it's just horribly inefficient! The whole SP is available on pastebin: http://pastebin.com/qaieDsW7
I know the SP is written poorly, so saying "hey, dumbass... write it better" doesn't help! I'm looking for help in improving it, or help/advice on how I should do the whole thing differently! I have about 3/5 days to rewrite it, I can push that deadline back a bit, but I'd rather not if you guys can help me in time! :)
Thanks! | 0 |
10,484,058 | 05/07/2012 14:43:21 | 1,379,989 | 05/07/2012 14:32:28 | 1 | 0 | Get data from URL and mysql database in PHP | Hi guys I have a webpage written in php where I need to get data from the url for that webpage using the $_GET command in php. This works fine, except I also want to get data from a mysql database on the same webpage using the $_POST command and compare the two. Is this possible to do on the same page because I have not found a way. They do not seem to want to work with each other.
<?php
$id = $_GET['id'];
echo $id;
?>
That is the code I have so far, but I also need to get data from a mysql database. Thanks. | php | mysql | null | null | null | 05/07/2012 14:47:45 | not a real question | Get data from URL and mysql database in PHP
===
Hi guys I have a webpage written in php where I need to get data from the url for that webpage using the $_GET command in php. This works fine, except I also want to get data from a mysql database on the same webpage using the $_POST command and compare the two. Is this possible to do on the same page because I have not found a way. They do not seem to want to work with each other.
<?php
$id = $_GET['id'];
echo $id;
?>
That is the code I have so far, but I also need to get data from a mysql database. Thanks. | 1 |
8,741,537 | 01/05/2012 11:15:30 | 1,131,970 | 01/05/2012 11:09:24 | 1 | 0 | How can i restrict the user to login only from the system which he registered from the Computer | In my website, if one user registered from a computer, we have to allow that user to be able to access the site from that computer only. If he try to login from another system even in LAN, we have to deny the access.
Please help me with this. Its Urgent. | php | null | null | null | null | 01/05/2012 12:07:28 | not a real question | How can i restrict the user to login only from the system which he registered from the Computer
===
In my website, if one user registered from a computer, we have to allow that user to be able to access the site from that computer only. If he try to login from another system even in LAN, we have to deny the access.
Please help me with this. Its Urgent. | 1 |
10,510,555 | 05/09/2012 05:57:13 | 1,355,207 | 04/25/2012 03:53:08 | 1 | 0 | Vehicle Tracking System using C# | I would like to create Vehicle Tracking System using C#. actually i would like to track shuttle service at my college. Im wanna using mobile phone as a GPS device *send a bas location data to pc* (built-in with GPS). I want to track the bas location and show at the maps. This system is web based. I have zero experienced for this type of system. I don't know how to start. Help me..
In my mind, i want to create like http://broncoshuttle.com/
i only want to track current bus location and ETA bus at some bus stop.
| c# | google-maps | gps | null | null | 05/09/2012 06:12:43 | not a real question | Vehicle Tracking System using C#
===
I would like to create Vehicle Tracking System using C#. actually i would like to track shuttle service at my college. Im wanna using mobile phone as a GPS device *send a bas location data to pc* (built-in with GPS). I want to track the bas location and show at the maps. This system is web based. I have zero experienced for this type of system. I don't know how to start. Help me..
In my mind, i want to create like http://broncoshuttle.com/
i only want to track current bus location and ETA bus at some bus stop.
| 1 |
365,924 | 12/13/2008 23:23:11 | 44,354 | 12/08/2008 16:59:10 | 45 | 0 | how to determine the period of a function | if i have a function A,which can apply a certain rule on a given matrix to generate a another matrix which i call it the next state of the origin matrix,also the function can determine the the final state of the matrix by given times N(apply the rule on origin,and apply the rule on the next state of the origin matrix again,and apply rule apply rule... for N times).
***So suppose for a given matrix,apply the rule on it for 5 times and the final matrix become the same as the origin matrix,and we call that matrix's period is 5.***
And I have another function B,how can i make the functionB can determine the period of a given function under the same rule of the functionA,and return the period?I just have no idea how to start to make it...Thanks in advance.
def functionA(origin_matrix,N_times):
#apply rule on the origin_matrix to generate another matrix which is the next sate of it.
#apply rule on origin_matrix for N_times
return the_final_matrix
def functionB(origin_matrix):
#determine the period of the the origin_matrix.
return period | python | null | null | null | null | null | open | how to determine the period of a function
===
if i have a function A,which can apply a certain rule on a given matrix to generate a another matrix which i call it the next state of the origin matrix,also the function can determine the the final state of the matrix by given times N(apply the rule on origin,and apply the rule on the next state of the origin matrix again,and apply rule apply rule... for N times).
***So suppose for a given matrix,apply the rule on it for 5 times and the final matrix become the same as the origin matrix,and we call that matrix's period is 5.***
And I have another function B,how can i make the functionB can determine the period of a given function under the same rule of the functionA,and return the period?I just have no idea how to start to make it...Thanks in advance.
def functionA(origin_matrix,N_times):
#apply rule on the origin_matrix to generate another matrix which is the next sate of it.
#apply rule on origin_matrix for N_times
return the_final_matrix
def functionB(origin_matrix):
#determine the period of the the origin_matrix.
return period | 0 |
6,754,099 | 07/19/2011 21:01:55 | 59,301 | 01/27/2009 11:18:00 | 9,421 | 410 | How stable is Monodroid? | I'd like to know how stable the latest trial version of Monodroid is. Is it stable enough for production use? I'm asking because Monotouch 4.0x seems to be a big step back in terms of stability.
Thanks,
Adrian | monotouch | monodroid | null | null | null | 07/19/2011 21:33:29 | not constructive | How stable is Monodroid?
===
I'd like to know how stable the latest trial version of Monodroid is. Is it stable enough for production use? I'm asking because Monotouch 4.0x seems to be a big step back in terms of stability.
Thanks,
Adrian | 4 |
8,902,962 | 01/17/2012 23:07:27 | 1,126,599 | 01/02/2012 17:33:34 | 26 | 0 | which android mobile phone would you suggest for someone who's just starting with android development? | I'm interested in android development, I have some experience in the emulator but I want to try my applications on mobile phones
I can spend at most 150 euros
I've heard the LG optimus is a good choice but I'm not sure at all, I have no idea about mobile phones
I just want to be able to run applications and see how they appear on my phone
does the android operating system also depend on this? I mean, what's the difference between android 2.2 and 4.0? will applications of 4.0 be able to run on 2.2 and the opposite?
thanks in advance
| android | null | null | null | null | 01/17/2012 23:42:39 | not constructive | which android mobile phone would you suggest for someone who's just starting with android development?
===
I'm interested in android development, I have some experience in the emulator but I want to try my applications on mobile phones
I can spend at most 150 euros
I've heard the LG optimus is a good choice but I'm not sure at all, I have no idea about mobile phones
I just want to be able to run applications and see how they appear on my phone
does the android operating system also depend on this? I mean, what's the difference between android 2.2 and 4.0? will applications of 4.0 be able to run on 2.2 and the opposite?
thanks in advance
| 4 |
8,972,187 | 01/23/2012 13:12:39 | 198,187 | 10/28/2009 15:02:10 | 1,642 | 64 | Descriptive naming conventions for Interfaces & Abstract Classes | I have recently been experimenting with naming abstract classes and interfaces in a more descriptive way. Mainly to try and ensure that they do not stray from their intended purpose.
So for abstract classes I have been using **IsA** or **IsAn** for interfaces **ICan** or **IPerform**
For example, instead of IOperationManager; ICanPerformOperationManagement
I find this reads better when looking at class.
Im sure Im not the first to think like this and was wondering if anyone has used any sort descriptive naming convention for interfaces and abstract classes? Will it scale to large projects, or is it just adding confusion?
EDIT: Is this question too subjective!? | c# | architecture | naming-conventions | null | null | 01/23/2012 13:19:56 | off topic | Descriptive naming conventions for Interfaces & Abstract Classes
===
I have recently been experimenting with naming abstract classes and interfaces in a more descriptive way. Mainly to try and ensure that they do not stray from their intended purpose.
So for abstract classes I have been using **IsA** or **IsAn** for interfaces **ICan** or **IPerform**
For example, instead of IOperationManager; ICanPerformOperationManagement
I find this reads better when looking at class.
Im sure Im not the first to think like this and was wondering if anyone has used any sort descriptive naming convention for interfaces and abstract classes? Will it scale to large projects, or is it just adding confusion?
EDIT: Is this question too subjective!? | 2 |
7,935,472 | 10/28/2011 22:21:10 | 605,328 | 02/06/2011 14:19:40 | 180 | 15 | Using JGroups with Tunnel | I have got JGroups to work locally using UDP/TCP but i can't make it work with tunnel.I need to be able to exchange messages between different machines(making a p2p application) so i need tunnel . It seems like the default tunnel protocol needs to be changed or I'm not starting the GossipRouter properly .I have read a few web pages and some of the latest jgroups manual but can't fix it .
Error message is the following and keeps repeating :
WARNING: failed reconnecting stub to GR at localhost/127.0.0.1:12001: java.lang.Exception: Could not connect to localhost/127.0.0.1:12001
Oct 28, 2011 11:19:56 PM org.jgroups.logging.JDKLogImpl error
SEVERE: failed sending message to cluster (122 bytes): java.lang.Exception: None of the available stubs [RouterStub[localsocket=0.0.0.0/0.0.0.0:49326,router_host=localhost::12001,connected=false]] accepted a multicast message, cause: null
>
Thank you in advance for any tips / advice . | java | networking | jgroups | null | null | null | open | Using JGroups with Tunnel
===
I have got JGroups to work locally using UDP/TCP but i can't make it work with tunnel.I need to be able to exchange messages between different machines(making a p2p application) so i need tunnel . It seems like the default tunnel protocol needs to be changed or I'm not starting the GossipRouter properly .I have read a few web pages and some of the latest jgroups manual but can't fix it .
Error message is the following and keeps repeating :
WARNING: failed reconnecting stub to GR at localhost/127.0.0.1:12001: java.lang.Exception: Could not connect to localhost/127.0.0.1:12001
Oct 28, 2011 11:19:56 PM org.jgroups.logging.JDKLogImpl error
SEVERE: failed sending message to cluster (122 bytes): java.lang.Exception: None of the available stubs [RouterStub[localsocket=0.0.0.0/0.0.0.0:49326,router_host=localhost::12001,connected=false]] accepted a multicast message, cause: null
>
Thank you in advance for any tips / advice . | 0 |
4,514,060 | 12/22/2010 21:49:39 | 551,739 | 12/22/2010 21:49:39 | 1 | 0 | How to develop a custom blog for a website using ASP.NET and C# code base? | I want to make a blog in C# for a website i have right now. I can't find any good tutorials on how to create your own blog.
Here is what i am working with.
I currently have a Website but i think it has php engines cuz i had it since last year when i started university. Can i convert it to be able to display ASP.NET?
| c# | null | null | null | null | 12/22/2010 21:54:52 | not a real question | How to develop a custom blog for a website using ASP.NET and C# code base?
===
I want to make a blog in C# for a website i have right now. I can't find any good tutorials on how to create your own blog.
Here is what i am working with.
I currently have a Website but i think it has php engines cuz i had it since last year when i started university. Can i convert it to be able to display ASP.NET?
| 1 |
4,091,242 | 11/03/2010 20:13:38 | 481,945 | 10/20/2010 15:51:03 | 8 | 0 | subprocess.call requiering all parms to be seperated by comas | I used to be able to do a subprocess.call(["command","-option value -option value"]) and it would work there was a change to the command to work properly with things in quotes, but now I have to change my subprocess call command to look like this:
subprecces.call(["command","-option","value","-option","value"])
is there something I can do to get it to work the other way again in python?
the os.system("command -option value -option value") works the same as it did before. | python | null | null | null | null | null | open | subprocess.call requiering all parms to be seperated by comas
===
I used to be able to do a subprocess.call(["command","-option value -option value"]) and it would work there was a change to the command to work properly with things in quotes, but now I have to change my subprocess call command to look like this:
subprecces.call(["command","-option","value","-option","value"])
is there something I can do to get it to work the other way again in python?
the os.system("command -option value -option value") works the same as it did before. | 0 |
1,052,234 | 06/27/2009 06:32:53 | 112,924 | 05/27/2009 06:11:29 | 22 | 4 | is jquery a problem for large scale sites? | can jquery be a problem for large scale sites in relation to something like facebook, where a huge number of visits hit the site or the site containing a great amount of content?
| jquery | null | null | null | null | 01/24/2012 20:17:49 | not constructive | is jquery a problem for large scale sites?
===
can jquery be a problem for large scale sites in relation to something like facebook, where a huge number of visits hit the site or the site containing a great amount of content?
| 4 |
9,633,996 | 03/09/2012 12:22:07 | 1,259,251 | 03/09/2012 12:11:26 | 1 | 0 | How can i connect to mysql | I decide to install sams + squid on Debian Squeeze, if i istall it by man everything is ok, but not along i decide to write script on Python.
when writing a script i have problem with mysql
1. mysql -u root -p (need pass MySQL)
2. GRANT ALL ON squidctrl.* TO sams@localhost IDENTIFIED BY "yourpassword";
3. GRANT ALL ON squidlog.* TO sams@localhost IDENTIFIED BY "yourpassword"; (yourpassword – any wish pass)
When i wrote this
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import os,sys,re
os.system("mysql -u root -p")
System asked password i entered it, but it's all.
I also need the system requested two other strings, how can i do it a don't know | python | mysql | script | null | null | 06/19/2012 12:44:49 | off topic | How can i connect to mysql
===
I decide to install sams + squid on Debian Squeeze, if i istall it by man everything is ok, but not along i decide to write script on Python.
when writing a script i have problem with mysql
1. mysql -u root -p (need pass MySQL)
2. GRANT ALL ON squidctrl.* TO sams@localhost IDENTIFIED BY "yourpassword";
3. GRANT ALL ON squidlog.* TO sams@localhost IDENTIFIED BY "yourpassword"; (yourpassword – any wish pass)
When i wrote this
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import os,sys,re
os.system("mysql -u root -p")
System asked password i entered it, but it's all.
I also need the system requested two other strings, how can i do it a don't know | 2 |
2,956,259 | 06/02/2010 09:04:47 | 356,242 | 06/02/2010 08:39:35 | 1 | 0 | Cant append "used" DOMObject in IE | I have some objects, that keep created DOMObjects, like here:
function category(){
var domBlock;
this.block = function(){
if (!domBlock){
// Here dom-object constructor $('<div></div>'); etc
}
return domBlock; // jquery object,
// but i test and native document.createElement
}
}
Then i clear category's area, and append old and new received(with Ajax) objects:
area.html('');
for(id in category_list){
area.append( category_list[id].block() );
}
where category_list is list that contain category objects. Area is jQuery <div> object.
In other browsers (except IE) i get area with all needed categories, but in IE i get only new received categories(that just create DomObject), other old objects that keeped old DomObject not show.
I know it possible make with innerHTML, but i wont keep DomObject, not text. Because DomObject keep many events. And it very hard for browser attach events for each DomObject after refresh area.
| javascript | jquery | internet-explorer | null | null | null | open | Cant append "used" DOMObject in IE
===
I have some objects, that keep created DOMObjects, like here:
function category(){
var domBlock;
this.block = function(){
if (!domBlock){
// Here dom-object constructor $('<div></div>'); etc
}
return domBlock; // jquery object,
// but i test and native document.createElement
}
}
Then i clear category's area, and append old and new received(with Ajax) objects:
area.html('');
for(id in category_list){
area.append( category_list[id].block() );
}
where category_list is list that contain category objects. Area is jQuery <div> object.
In other browsers (except IE) i get area with all needed categories, but in IE i get only new received categories(that just create DomObject), other old objects that keeped old DomObject not show.
I know it possible make with innerHTML, but i wont keep DomObject, not text. Because DomObject keep many events. And it very hard for browser attach events for each DomObject after refresh area.
| 0 |
8,183,850 | 11/18/2011 14:17:47 | 1,053,927 | 11/18/2011 13:50:14 | 1 | 0 | Creating independent and reusable component of file system jtree | Hi to everybody willing to help me...
I have to make custom component of file system jtree. The component should be independent and reusable for every application that needs it. I have made a java project and class file system tree
that has all functionalities that component should have and now I don't know what to do. Please help me..
Thanks in advance:) | java | swing | filesystems | jtree | jcomponent | 11/18/2011 15:23:51 | not a real question | Creating independent and reusable component of file system jtree
===
Hi to everybody willing to help me...
I have to make custom component of file system jtree. The component should be independent and reusable for every application that needs it. I have made a java project and class file system tree
that has all functionalities that component should have and now I don't know what to do. Please help me..
Thanks in advance:) | 1 |
10,548,738 | 05/11/2012 09:21:57 | 673,766 | 03/23/2011 19:41:36 | 18 | 0 | Create XML from Input Data file and XSD file | I have referred related [posts][1] on this topic, But i didn't get exactly what i was looking for.
I have an XSD and my Data file as an input. I wish to generate .XML file out of that.
I would like to write a Java Code which should be **generic** one, i.e. it should except any .xsd and its data file to create .xml file and I don't want to change the calling setters names and calling class name when xsd changes.
In other words, i need to generate calling class as per the xsd to generate xml.
I tried JAXB to create .xml from .xsd.
For Examle:
Hello.java
import java.io.*;
import java.util.*;
import javax.xml.bind.*;
import hello.*;
public class Hello {
private ObjectFactory of;
private GreetingListType grList;
public Hello(){
of = new ObjectFactory();
grList = of.createGreetingListType();
}
public void make( String t, String l ){
GreetingType g = of.createGreetingType();
g.setText( t );
g.setLanguage( l );
grList.getGreeting().add( g );
}
public void marshal() {
try {
JAXBElement<GreetingListType> gl =
of.createGreetings( grList );
File file = new File("jaxb_hello.xml");
JAXBContext jc = JAXBContext.newInstance( "hello" );
Marshaller m = jc.createMarshaller();
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
m.marshal( gl, System.out );
m.marshal( gl, file);
} catch( JAXBException jbe ){
// ...
}
}
public static void main(String args[])
{
Hello h = new Hello();
h.make( "Bonjour, madame", "fr" );
h.make( "Hey, you", "en" );
h.marshal();
}
}
I am not sure if there exist any free library or tool on unix environment to achive this.
If there isn't any, i will try to code it down. Some references would be of great help.
[1]: http://stackoverflow.com/questions/17106/how-to-generate-sample-xml-documents-from-their-dtd-or-xsd/ | java | xml | xsd | jaxb | xml-schema | null | open | Create XML from Input Data file and XSD file
===
I have referred related [posts][1] on this topic, But i didn't get exactly what i was looking for.
I have an XSD and my Data file as an input. I wish to generate .XML file out of that.
I would like to write a Java Code which should be **generic** one, i.e. it should except any .xsd and its data file to create .xml file and I don't want to change the calling setters names and calling class name when xsd changes.
In other words, i need to generate calling class as per the xsd to generate xml.
I tried JAXB to create .xml from .xsd.
For Examle:
Hello.java
import java.io.*;
import java.util.*;
import javax.xml.bind.*;
import hello.*;
public class Hello {
private ObjectFactory of;
private GreetingListType grList;
public Hello(){
of = new ObjectFactory();
grList = of.createGreetingListType();
}
public void make( String t, String l ){
GreetingType g = of.createGreetingType();
g.setText( t );
g.setLanguage( l );
grList.getGreeting().add( g );
}
public void marshal() {
try {
JAXBElement<GreetingListType> gl =
of.createGreetings( grList );
File file = new File("jaxb_hello.xml");
JAXBContext jc = JAXBContext.newInstance( "hello" );
Marshaller m = jc.createMarshaller();
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
m.marshal( gl, System.out );
m.marshal( gl, file);
} catch( JAXBException jbe ){
// ...
}
}
public static void main(String args[])
{
Hello h = new Hello();
h.make( "Bonjour, madame", "fr" );
h.make( "Hey, you", "en" );
h.marshal();
}
}
I am not sure if there exist any free library or tool on unix environment to achive this.
If there isn't any, i will try to code it down. Some references would be of great help.
[1]: http://stackoverflow.com/questions/17106/how-to-generate-sample-xml-documents-from-their-dtd-or-xsd/ | 0 |
969,130 | 06/09/2009 09:44:47 | 100,142 | 05/03/2009 08:20:51 | 1,069 | 64 | NSLog tips and tricks | I'm doing a presentation on debugging in Xcode and would like to get more information on using NSLog efficiently. I'd like to know if there are any tips and tricks to using NSLog which you guys have picked up.
For example,
- is there a way to easily NSLog the current method's name / line number?
- is there a way to "disable" all NSLogs easily before compiling for release code?
Any other tips would be appreciated.
Thanks.
| nslog | cocoa | cocoa-touch | xcode | null | 11/28/2011 01:26:24 | not constructive | NSLog tips and tricks
===
I'm doing a presentation on debugging in Xcode and would like to get more information on using NSLog efficiently. I'd like to know if there are any tips and tricks to using NSLog which you guys have picked up.
For example,
- is there a way to easily NSLog the current method's name / line number?
- is there a way to "disable" all NSLogs easily before compiling for release code?
Any other tips would be appreciated.
Thanks.
| 4 |
10,103,505 | 04/11/2012 09:44:29 | 1,302,724 | 03/30/2012 07:52:10 | 3 | 0 | Cakephp: setting values to $this->data in controller | Is it possible to set values in $this->data which is received in controller from the view.
We can use if($this->data['id']) but why we cant set values in it?
Will this work`$this->data['id']=$userid;` | cakephp | cakephp-1.3 | null | null | null | 04/16/2012 15:35:07 | not a real question | Cakephp: setting values to $this->data in controller
===
Is it possible to set values in $this->data which is received in controller from the view.
We can use if($this->data['id']) but why we cant set values in it?
Will this work`$this->data['id']=$userid;` | 1 |
9,083,433 | 01/31/2012 16:47:14 | 591,235 | 01/26/2011 19:53:57 | 424 | 0 | Mean Residual Life, clarification needed | I need to understand the Survival Analysis concept of MEAN RESIDUAL LIFE.
I haven't found anything that to my mind gives me a complete and clear definition. Definitions I have found embedded in papers include:
> The mean residual life function (mrlf) of a subject is defined as the
> average residual lifetime of the subject given that the subject has
> survived up to a given time point.
>
> http://www.stat.ncsu.edu/information/library/papers/mimeo2612.pdf
Another:
> The function E[S|t], the expected additional lifetime given that a
> component has survived until time t, is called the mean residual
> lifetime (MRL) function.
>
> http://www.jstor.org/pss/3213124
one more:
> In life testing situations, the expected additional lifetime given that a component has survived until time t is a function of t, called the mean residual life. More specifically, if the random variable X represents the life of a component, then the mean residual life is given by m(t) = E(X - t|X>t).
>
> http://bmif.unde.ro/docs/20082/5%20DIsbasoiu.pdf
Buried in Mathematica's documentation I found two references for calculating mean residual life, which I've put into similar functions.
MRL1[variable_, distribution_] := NExpectation[X \[Conditioned] X > variable,
X \[Distributed] distribution] - variable
MRL2[variable_, distribution_] := NExpectation[X - variable \[Conditioned] X > variable,
X \[Distributed] distribution]
You can find the references at:
http : //
www.wolfram.com/mathematica/new - in - 8/nonparametric - derived -
and - formula - distributions/analyze - left-- right-- and -
interval - censored - data.html
and
http://reference.wolfram.com/mathematica/ref/SkewNormalDistribution.html
The second of these corresponds in form to the third of the above definitions. One can see that the 2 functions produce the same results:
dist = LogNormalDistribution[1.75, 0.65];
var = 6;
MRL1[var, dist]
MRL2[var, dist]
4.80314
4.80314
I put together a manipulate to illustrate this idea using the first of the above functions:
dist = LogNormalDistribution[1.75, 0.65];
Manipulate[
Module[{mrl},
mrl = MRL1[t , dist];
Column[{"MEAN RESIDUAL LIFE?", " ", "PDF",
Show[ListPlot[{{t , N[PDF[dist, t ]]}, {mrl, N[PDF[dist, mrl]]}},
ImageSize -> 350,
PlotRange -> All,
Prolog -> {Text["MRL", {mrl, .01}], Text["t", {t, .02}]},
Filling -> Axis,
FillingStyle -> Lighter[Red],
AxesOrigin -> {0, 0}],
Plot[PDF[dist, x], {x, 0, 40}]],
" ",
"CDF",
Show[ListPlot[{{t , N[CDF[dist, t ]]}, {mrl, N[CDF[dist, mrl]]}},
ImageSize -> 350,
PlotRange -> All,
Prolog -> {Text["MRL", {mrl, .1}], Text["t", {t, .2}]},
Filling -> Axis,
FillingStyle -> Lighter[Red],
AxesOrigin -> {0, 0}],
Plot[CDF[dist, x], {x, 0, 40}]],
Grid[{{"t ", t}, {"MRL ", mrl}, {"Mean[dist] ",
Mean[dist]}, {"PDF at t", N[PDF[dist, t ]]}, {"CDF at t",
N[CDF[dist, t ]]}}, Alignment -> Left]}]],
{t, 0, 40}]
To put this a some context, the x axis could represent time (life expectancy, time to failure of a part) or some other quantity such as distance (miles a car runs before breaking down or how far a trend in a stock can run).
The value "t" corresponding to the x axis initializes at 0.
Some observations:
Mean[dist] = 7.10821.
Where t = 0, MRL = 7.10819 (pretty close to the mean).
As t increases towards MRL, MRL decreases.
At t = 4.7985, t = MRL (at least to 4 decimal places).
As t increases beyond MRL it drags MRL higher.
When (for this distribution) t reaches a bit over 25, MRL begins to exceed the mean of the distribution.
When I first came across mean residual life, I thought it would represent the expectation of everything beyond t and that as t increased MRL would have to increase. If someone lives to 80 years old, wouldn't they have some (if small) expectation of living longer? Some average in the tail of the distribution?
Maybe MRL doesn't make sense if t > MRL.
If 0 < t < MRL why should one's expectation be less than the mean of the distribution?
I feel a bit thick headed on this, as if I've missed some basic intuitive grasp of the idea.
I just hoped someone on the forum could give me an insight into this and how to apply it.
Thanks,
J
| probability | mathematica-8 | null | null | null | 02/01/2012 15:08:19 | off topic | Mean Residual Life, clarification needed
===
I need to understand the Survival Analysis concept of MEAN RESIDUAL LIFE.
I haven't found anything that to my mind gives me a complete and clear definition. Definitions I have found embedded in papers include:
> The mean residual life function (mrlf) of a subject is defined as the
> average residual lifetime of the subject given that the subject has
> survived up to a given time point.
>
> http://www.stat.ncsu.edu/information/library/papers/mimeo2612.pdf
Another:
> The function E[S|t], the expected additional lifetime given that a
> component has survived until time t, is called the mean residual
> lifetime (MRL) function.
>
> http://www.jstor.org/pss/3213124
one more:
> In life testing situations, the expected additional lifetime given that a component has survived until time t is a function of t, called the mean residual life. More specifically, if the random variable X represents the life of a component, then the mean residual life is given by m(t) = E(X - t|X>t).
>
> http://bmif.unde.ro/docs/20082/5%20DIsbasoiu.pdf
Buried in Mathematica's documentation I found two references for calculating mean residual life, which I've put into similar functions.
MRL1[variable_, distribution_] := NExpectation[X \[Conditioned] X > variable,
X \[Distributed] distribution] - variable
MRL2[variable_, distribution_] := NExpectation[X - variable \[Conditioned] X > variable,
X \[Distributed] distribution]
You can find the references at:
http : //
www.wolfram.com/mathematica/new - in - 8/nonparametric - derived -
and - formula - distributions/analyze - left-- right-- and -
interval - censored - data.html
and
http://reference.wolfram.com/mathematica/ref/SkewNormalDistribution.html
The second of these corresponds in form to the third of the above definitions. One can see that the 2 functions produce the same results:
dist = LogNormalDistribution[1.75, 0.65];
var = 6;
MRL1[var, dist]
MRL2[var, dist]
4.80314
4.80314
I put together a manipulate to illustrate this idea using the first of the above functions:
dist = LogNormalDistribution[1.75, 0.65];
Manipulate[
Module[{mrl},
mrl = MRL1[t , dist];
Column[{"MEAN RESIDUAL LIFE?", " ", "PDF",
Show[ListPlot[{{t , N[PDF[dist, t ]]}, {mrl, N[PDF[dist, mrl]]}},
ImageSize -> 350,
PlotRange -> All,
Prolog -> {Text["MRL", {mrl, .01}], Text["t", {t, .02}]},
Filling -> Axis,
FillingStyle -> Lighter[Red],
AxesOrigin -> {0, 0}],
Plot[PDF[dist, x], {x, 0, 40}]],
" ",
"CDF",
Show[ListPlot[{{t , N[CDF[dist, t ]]}, {mrl, N[CDF[dist, mrl]]}},
ImageSize -> 350,
PlotRange -> All,
Prolog -> {Text["MRL", {mrl, .1}], Text["t", {t, .2}]},
Filling -> Axis,
FillingStyle -> Lighter[Red],
AxesOrigin -> {0, 0}],
Plot[CDF[dist, x], {x, 0, 40}]],
Grid[{{"t ", t}, {"MRL ", mrl}, {"Mean[dist] ",
Mean[dist]}, {"PDF at t", N[PDF[dist, t ]]}, {"CDF at t",
N[CDF[dist, t ]]}}, Alignment -> Left]}]],
{t, 0, 40}]
To put this a some context, the x axis could represent time (life expectancy, time to failure of a part) or some other quantity such as distance (miles a car runs before breaking down or how far a trend in a stock can run).
The value "t" corresponding to the x axis initializes at 0.
Some observations:
Mean[dist] = 7.10821.
Where t = 0, MRL = 7.10819 (pretty close to the mean).
As t increases towards MRL, MRL decreases.
At t = 4.7985, t = MRL (at least to 4 decimal places).
As t increases beyond MRL it drags MRL higher.
When (for this distribution) t reaches a bit over 25, MRL begins to exceed the mean of the distribution.
When I first came across mean residual life, I thought it would represent the expectation of everything beyond t and that as t increased MRL would have to increase. If someone lives to 80 years old, wouldn't they have some (if small) expectation of living longer? Some average in the tail of the distribution?
Maybe MRL doesn't make sense if t > MRL.
If 0 < t < MRL why should one's expectation be less than the mean of the distribution?
I feel a bit thick headed on this, as if I've missed some basic intuitive grasp of the idea.
I just hoped someone on the forum could give me an insight into this and how to apply it.
Thanks,
J
| 2 |
3,939,532 | 10/15/2010 04:41:14 | 440,546 | 09/06/2010 10:31:49 | 1 | 0 | Transfer files between servers using php | I wrote a little code in php that enables me to download a file from one website to my own!
but there is a little problem here!
I can only Download files from my website that are less than 4MB:(
Now my question is that in what way I can Download special part of files from other websites!
like from 1st byte to 10th byte!
My Code is:
<form action="" method="get">
URL: <input name="URL" size="30" type="text" /><br>
File name: <input name="fn" size="30" type="text" /><br>
<input type="submit" value="Download" />
</form>
<?php
$ch = curl_init();
$m=$_GET["URL"];
$filen=$_GET["fn"];
if(!$m){echo "Enter URL<br>";exit();}
if(!$filen){echo "Enter URL<br>";exit();}
curl_setopt($ch, CURLOPT_URL,$m);
/**
* Create a new file
*/
$fp = fopen($filen, 'w');
/**
* Ask cURL to write the contents to a file
*/
curl_setopt($ch, CURLOPT_FILE, $fp);
/**
* Execute the cURL session
*/
curl_exec ($ch);
/**
* Close cURL session and file
*/
curl_close ($ch);
fclose($fp);
echo "<a href=\"$filen\">click</a>";
?>
| php | null | null | null | null | null | open | Transfer files between servers using php
===
I wrote a little code in php that enables me to download a file from one website to my own!
but there is a little problem here!
I can only Download files from my website that are less than 4MB:(
Now my question is that in what way I can Download special part of files from other websites!
like from 1st byte to 10th byte!
My Code is:
<form action="" method="get">
URL: <input name="URL" size="30" type="text" /><br>
File name: <input name="fn" size="30" type="text" /><br>
<input type="submit" value="Download" />
</form>
<?php
$ch = curl_init();
$m=$_GET["URL"];
$filen=$_GET["fn"];
if(!$m){echo "Enter URL<br>";exit();}
if(!$filen){echo "Enter URL<br>";exit();}
curl_setopt($ch, CURLOPT_URL,$m);
/**
* Create a new file
*/
$fp = fopen($filen, 'w');
/**
* Ask cURL to write the contents to a file
*/
curl_setopt($ch, CURLOPT_FILE, $fp);
/**
* Execute the cURL session
*/
curl_exec ($ch);
/**
* Close cURL session and file
*/
curl_close ($ch);
fclose($fp);
echo "<a href=\"$filen\">click</a>";
?>
| 0 |
8,091,389 | 11/11/2011 08:27:25 | 510,339 | 11/17/2010 03:52:13 | 104 | 3 | Need (RPC + C# .Net + Framework 4.0) Samples | I want some samples in Remote Procedure Call in C#.Net and Framework 4.0. I had searched google a lot. But i dint find Step by Step Procedure of RPC Concept.
Kindly post some tutorials (RPC + C# .Net + Framework 4.0) | c# | .net-4.0 | rpc | null | null | 11/11/2011 09:27:23 | not constructive | Need (RPC + C# .Net + Framework 4.0) Samples
===
I want some samples in Remote Procedure Call in C#.Net and Framework 4.0. I had searched google a lot. But i dint find Step by Step Procedure of RPC Concept.
Kindly post some tutorials (RPC + C# .Net + Framework 4.0) | 4 |
7,835,805 | 10/20/2011 12:18:15 | 173,149 | 09/14/2009 13:42:30 | 700 | 37 | Where I can find already prepared Mercurial/Git mirrors of SVN/CVS open source reposiroties? | I have soem restriction to Internet access and like DVCS as they allow offline use.
I can run hg convert on any repo but this require 3 step:
* find project SVN
* make convertion
* maintain subsequent updates
I look for place there these steps done for many popular open source projects...
For example https://bitbucket.org/django/django/ https://bitbucket.org/redmine/redmine host mirror that udates each 5 minutes...
I search in bitbucket docs, but does not found how setup mirroring on regular basis...
Also many Savannah project host mirror in Git/Mercurial/Bazaar format for old CVS/SVN projects.
In case of Savannah you have official mirrors, as I understand in case of Bitbucket you get unofficial mirrors.
For me it will be good to use official/semiofficial mirror place where I can report that something broken and expect that it will be fixed...
Please don't recommend create/maintain own mirrors... | git | mercurial | hosting | project-hosting | null | 10/20/2011 19:48:35 | not a real question | Where I can find already prepared Mercurial/Git mirrors of SVN/CVS open source reposiroties?
===
I have soem restriction to Internet access and like DVCS as they allow offline use.
I can run hg convert on any repo but this require 3 step:
* find project SVN
* make convertion
* maintain subsequent updates
I look for place there these steps done for many popular open source projects...
For example https://bitbucket.org/django/django/ https://bitbucket.org/redmine/redmine host mirror that udates each 5 minutes...
I search in bitbucket docs, but does not found how setup mirroring on regular basis...
Also many Savannah project host mirror in Git/Mercurial/Bazaar format for old CVS/SVN projects.
In case of Savannah you have official mirrors, as I understand in case of Bitbucket you get unofficial mirrors.
For me it will be good to use official/semiofficial mirror place where I can report that something broken and expect that it will be fixed...
Please don't recommend create/maintain own mirrors... | 1 |
1,063,041 | 06/30/2009 10:50:09 | 125,736 | 06/19/2009 13:13:13 | 1 | 0 | Overwriting/redirect a Request in Coldfusion using modelglue | Actually its related to authentication. my scenario is as following:
I have a homepage, where user can see some news n other stuff, also there are text fields for user to enter the login info and get logged in.
Now if user is not logged in i want to restrict him to see the details of news. and whenever user click on any of the link, it should get a alert (u need to login).
modelglue.xml
<event-handler name="modelglue.OnRequestStart">
<broadcasts>
<message name="checkAuthentication" />
</broadcasts>
<results>
<result name="invalid" do="homePage" />
</results>
<views />
</event-handler>
*checkAuthentication() checks whether user is logged in or not. in case of invalid (not logged in) it redirects to "homePage" event.
Now the issue is, when user click on any of the link, authentication is checked. If authentic (logged in) then that corresponding event is called and action is performed. but in case of invalid (not logged in), It goes to "homePage" event, performs action but also performs the other request (e.g. if event is showNews) News is also shown, which i dont want to.
Can anyone tell how can I stop the execution before that showNews event. i.e. just homePage event is finished.
thnx in advance | coldfusion | null | null | null | null | null | open | Overwriting/redirect a Request in Coldfusion using modelglue
===
Actually its related to authentication. my scenario is as following:
I have a homepage, where user can see some news n other stuff, also there are text fields for user to enter the login info and get logged in.
Now if user is not logged in i want to restrict him to see the details of news. and whenever user click on any of the link, it should get a alert (u need to login).
modelglue.xml
<event-handler name="modelglue.OnRequestStart">
<broadcasts>
<message name="checkAuthentication" />
</broadcasts>
<results>
<result name="invalid" do="homePage" />
</results>
<views />
</event-handler>
*checkAuthentication() checks whether user is logged in or not. in case of invalid (not logged in) it redirects to "homePage" event.
Now the issue is, when user click on any of the link, authentication is checked. If authentic (logged in) then that corresponding event is called and action is performed. but in case of invalid (not logged in), It goes to "homePage" event, performs action but also performs the other request (e.g. if event is showNews) News is also shown, which i dont want to.
Can anyone tell how can I stop the execution before that showNews event. i.e. just homePage event is finished.
thnx in advance | 0 |
4,187,404 | 11/15/2010 18:01:45 | 391,960 | 07/14/2010 19:02:40 | 119 | 1 | To which language is Scala most similar from a functional programming perspective? | 1. Standard ML
2. Objective Caml
3. Haskell
4. some other | scala | functional-programming | null | null | null | 04/20/2012 12:23:55 | not constructive | To which language is Scala most similar from a functional programming perspective?
===
1. Standard ML
2. Objective Caml
3. Haskell
4. some other | 4 |
6,476,065 | 06/25/2011 05:32:52 | 614,807 | 08/16/2010 14:06:36 | 1,994 | 106 | Get Current Time and Date in Milliseconds | I want to get Current time and date in milliseconds . How can i get this ?
Here i used below function.
Date date=new Date() ;
System.out.println("Today is " +date.getTime());
It will return the milliseconds from the 1 jan 1970 .
But i want the current millisecods of the today's Date .
Like
----
23:59:00 = 86340000 milliseconds.
Can anyone help me ? Thanks. | java | android | null | null | null | null | open | Get Current Time and Date in Milliseconds
===
I want to get Current time and date in milliseconds . How can i get this ?
Here i used below function.
Date date=new Date() ;
System.out.println("Today is " +date.getTime());
It will return the milliseconds from the 1 jan 1970 .
But i want the current millisecods of the today's Date .
Like
----
23:59:00 = 86340000 milliseconds.
Can anyone help me ? Thanks. | 0 |
8,385,352 | 12/05/2011 12:32:18 | 647,453 | 03/07/2011 00:46:08 | 27 | 0 | What is the java keyevent field for question mark? | Is there keyPress(KeyEvent.VK_?)
Please help
Thanks
| java | keyevent | null | null | null | 12/05/2011 15:54:45 | too localized | What is the java keyevent field for question mark?
===
Is there keyPress(KeyEvent.VK_?)
Please help
Thanks
| 3 |
7,685,548 | 10/07/2011 09:44:24 | 729,879 | 04/28/2011 18:10:52 | 35 | 0 | VB Script Error - Worked before but now not confusingly | i am getting a error
![Error i am getting][1]
[1]: http://i.stack.imgur.com/jO5hv.png
The VB file reads col1 and finds the matching image name in the directory and the renames that file to col2 it produces a report to show what images haven't been renamed and placed the ones that have in a folder called rename
i have attached the file so you can see
Thanks
Jack | vb | null | null | null | null | null | open | VB Script Error - Worked before but now not confusingly
===
i am getting a error
![Error i am getting][1]
[1]: http://i.stack.imgur.com/jO5hv.png
The VB file reads col1 and finds the matching image name in the directory and the renames that file to col2 it produces a report to show what images haven't been renamed and placed the ones that have in a folder called rename
i have attached the file so you can see
Thanks
Jack | 0 |
10,539,556 | 05/10/2012 17:49:39 | 981,616 | 10/06/2011 05:39:29 | 1,261 | 102 | How can I come up with creating an algorithm which simulates a real time situation. | I'm good at algorithms but not as good as converting real-time problems and learning them throughly to make it as an algorithm. I would like to know if there is any book/paper that teaches or makes you demystify the situation and formulate it as an algorithm. (Its much like training your mental ability to break the situation and comeup with algorithm in a crisp.)
Showing some of the ways to approach these kinda problems. and any easy learning links/material would help me a lot.
**Note:** I know SO doesnt allow to ask for the opinion or something vague (I dont mind my Q being downgraded). But I am asking some concrete problem and hope can get some nice info from some of the great minds here. | algorithm | real-time | null | null | null | 05/10/2012 19:44:05 | off topic | How can I come up with creating an algorithm which simulates a real time situation.
===
I'm good at algorithms but not as good as converting real-time problems and learning them throughly to make it as an algorithm. I would like to know if there is any book/paper that teaches or makes you demystify the situation and formulate it as an algorithm. (Its much like training your mental ability to break the situation and comeup with algorithm in a crisp.)
Showing some of the ways to approach these kinda problems. and any easy learning links/material would help me a lot.
**Note:** I know SO doesnt allow to ask for the opinion or something vague (I dont mind my Q being downgraded). But I am asking some concrete problem and hope can get some nice info from some of the great minds here. | 2 |
9,315,624 | 02/16/2012 17:04:14 | 950,520 | 09/17/2011 18:09:28 | 1 | 0 | how to builed web based Application as desktop application ? | what is the easiest way to build desktop application as web based application ? I want to build app that deal with one database and let many remote pc's use and manipulate this DB but not by simple web interface . instead the users can instal program in their computer
.. I hope that my Q is clear =)
| web-based | null | null | null | null | 02/17/2012 05:35:30 | not a real question | how to builed web based Application as desktop application ?
===
what is the easiest way to build desktop application as web based application ? I want to build app that deal with one database and let many remote pc's use and manipulate this DB but not by simple web interface . instead the users can instal program in their computer
.. I hope that my Q is clear =)
| 1 |
306,502 | 11/20/2008 19:13:38 | 39,430 | 11/20/2008 19:13:38 | 1 | 0 | Historical programmer evaluation materials | I am interested in finding out what were considered important attributes of a developer in the early days of programming, i.e., 1950s, 1960s, or early 1970s. Post any examples/materials you have: interview questions, developer tests, expected experience, personality assessments, anything that was used to evaluate a programmer before Microsoft's time.
If you can, provide references such as the company that used the test and the location and date of use, as well as programming languages and hardware that would have been in use had the participant been hired on.
| hiring | interview-questions | null | null | null | null | open | Historical programmer evaluation materials
===
I am interested in finding out what were considered important attributes of a developer in the early days of programming, i.e., 1950s, 1960s, or early 1970s. Post any examples/materials you have: interview questions, developer tests, expected experience, personality assessments, anything that was used to evaluate a programmer before Microsoft's time.
If you can, provide references such as the company that used the test and the location and date of use, as well as programming languages and hardware that would have been in use had the participant been hired on.
| 0 |
10,130,178 | 04/12/2012 19:12:10 | 1,145,827 | 01/12/2012 15:23:20 | 21 | 5 | How to register an HttpModule that is not in the App_code folder | I would like to have my code for an HttpModule somewhere else than in the App_code folder, is that possible? | asp.net | httpmodule | null | null | null | 04/17/2012 04:38:22 | not a real question | How to register an HttpModule that is not in the App_code folder
===
I would like to have my code for an HttpModule somewhere else than in the App_code folder, is that possible? | 1 |
6,954,614 | 08/05/2011 10:03:40 | 874,398 | 08/02/2011 10:29:24 | 16 | 0 | Create an index of the most common words in a PDF - Python | This question is linked to my other post:
http://stackoverflow.com/questions/6910932/how-do-i-create-a-look-up-index-from-a-pdf
However, the requirement have slightly changed. I need to create an index of the most popular/common words in a PDF using python
Could someone please let me know? Thanks. | python | pdf | count | index | null | 11/07/2011 12:23:28 | not a real question | Create an index of the most common words in a PDF - Python
===
This question is linked to my other post:
http://stackoverflow.com/questions/6910932/how-do-i-create-a-look-up-index-from-a-pdf
However, the requirement have slightly changed. I need to create an index of the most popular/common words in a PDF using python
Could someone please let me know? Thanks. | 1 |
5,556,949 | 04/05/2011 18:52:31 | 666,605 | 03/18/2011 19:27:57 | 2 | 2 | Can someone direct me to a script... | Stack overflow has this very cool char counter under the comment box. Can someone direct me to the script? or a something slightly different | count | stackoverflow | character | box | comment | null | open | Can someone direct me to a script...
===
Stack overflow has this very cool char counter under the comment box. Can someone direct me to the script? or a something slightly different | 0 |
3,253,393 | 07/15/2010 07:35:57 | 323,787 | 04/22/2010 23:33:01 | 82 | 11 | animated UIButtons are clickable at destination before they reach destination | I have a UIView that contains a couple UIButtons that I am animating from offscreen to onscreen. I find that the region where they are heading is clickable before they reach it. The animation is pretty simple, so I'm wondering if there is something obvious that I am missing in terms of telling the code to not treat the button as if it is at the final destination (I'm not sure if that is supposed to be the expected behavior and the animation is purely a visual while the clickable region is instantaneously at the destination; I wouldn't expect it to be).
Here is the code I use to animate it. It's basically switching out a sub panel and bringing back a main panel with buttons:
// switch back to main abilities panel
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration: kFadeInTime];
CGRect rect = CGRectMake(
480.0f,
mAbilities.mSubPanel.frame.origin.y,
mAbilities.mSubPanel.frame.size.width,
mAbilities.mSubPanel.frame.size.height);
mAbilities.mSubPanel.frame = rect;
[UIView commitAnimations];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration: kFadeInTime];
[UIView setAnimationDelay: kFadeInTime];
rect = CGRectMake(
kAbilitiesBorderX,
mAbilities.mPanel.frame.origin.y,
mAbilities.mPanel.frame.size.width,
mAbilities.mPanel.frame.size.height);
mAbilities.mPanel.frame = rect;
[UIView commitAnimations]; | animation | uibutton | null | null | null | null | open | animated UIButtons are clickable at destination before they reach destination
===
I have a UIView that contains a couple UIButtons that I am animating from offscreen to onscreen. I find that the region where they are heading is clickable before they reach it. The animation is pretty simple, so I'm wondering if there is something obvious that I am missing in terms of telling the code to not treat the button as if it is at the final destination (I'm not sure if that is supposed to be the expected behavior and the animation is purely a visual while the clickable region is instantaneously at the destination; I wouldn't expect it to be).
Here is the code I use to animate it. It's basically switching out a sub panel and bringing back a main panel with buttons:
// switch back to main abilities panel
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration: kFadeInTime];
CGRect rect = CGRectMake(
480.0f,
mAbilities.mSubPanel.frame.origin.y,
mAbilities.mSubPanel.frame.size.width,
mAbilities.mSubPanel.frame.size.height);
mAbilities.mSubPanel.frame = rect;
[UIView commitAnimations];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration: kFadeInTime];
[UIView setAnimationDelay: kFadeInTime];
rect = CGRectMake(
kAbilitiesBorderX,
mAbilities.mPanel.frame.origin.y,
mAbilities.mPanel.frame.size.width,
mAbilities.mPanel.frame.size.height);
mAbilities.mPanel.frame = rect;
[UIView commitAnimations]; | 0 |
10,387,352 | 04/30/2012 16:45:29 | 808,647 | 06/21/2011 14:39:41 | 5 | 0 | Accessing OSX files and folders from Ubuntu 12.04 | I would like to dual boot ubuntu 12.04 and OSX Lion. Is there a way that I can access all my music, documents, etc. from my ubuntu partition? | osx | ubuntu | null | null | null | 05/02/2012 15:11:08 | off topic | Accessing OSX files and folders from Ubuntu 12.04
===
I would like to dual boot ubuntu 12.04 and OSX Lion. Is there a way that I can access all my music, documents, etc. from my ubuntu partition? | 2 |
427,821 | 01/09/2009 11:57:44 | 52,063 | 01/06/2009 15:14:16 | 11 | 1 | Best way to implement an SFTP server solution? | I'm currently setting up a commercial SFTP server and I'm just looking for some of your opinions on the set-up I'm currently thinking of implementing, as well as a recommendation as to what commercial Secure FTP server software would be best to suit. Bear in mind that the data i'm responsible for is highly sensitive so any comments/feedback is much appreciated.
Here's the scenario:
1) Before file upload, files are compressed & encrypted using AES 256 with a salt.
2) Files uploaded from the clients' server over SFTP (port 22) to our SFTP server.
3) Files are then downloaded over HTTPS by our other client using one time password verification (strong 10 char alphanumeric password)
The specifics of the implementation I'm thinking of are:
For part (2) above, the connection is opened using host key matching, public key authentication and a user name/password combination. The firewall at both sides is restricted to only allow the static IP of the client server to connect.
For part (3), the other client is supplied with a user name/password on a per user basis (for auditing) to log into their jailed account on the server. the encryption password for the file itself is supplied on a per file basis, so i'm trying to apply two modes of encryption at all times here (except when the files are resting on the server).
Along with dedicated firewalls on both sides, Access control on the SFTP server will be configured to block IP addresses with a certain number of failed attempts over a short time, invalid passwords attempts will lock out users, password policies will be implemented etc.
I like to think that I've covered as much as possible but I'd love to hear what you guys think about this implementation?
For the commercial server side of things, I've narrowed it down to GloalSCAPE SFTP w/ SSH & HTTP module or JSCAPE Secure FTP server - I'll be assessing the suitability of each over the weekend but if any of you have any experience with either i'd love to hear about it also.
| sftp | aes | ssh | https | security | 11/21/2011 23:52:48 | off topic | Best way to implement an SFTP server solution?
===
I'm currently setting up a commercial SFTP server and I'm just looking for some of your opinions on the set-up I'm currently thinking of implementing, as well as a recommendation as to what commercial Secure FTP server software would be best to suit. Bear in mind that the data i'm responsible for is highly sensitive so any comments/feedback is much appreciated.
Here's the scenario:
1) Before file upload, files are compressed & encrypted using AES 256 with a salt.
2) Files uploaded from the clients' server over SFTP (port 22) to our SFTP server.
3) Files are then downloaded over HTTPS by our other client using one time password verification (strong 10 char alphanumeric password)
The specifics of the implementation I'm thinking of are:
For part (2) above, the connection is opened using host key matching, public key authentication and a user name/password combination. The firewall at both sides is restricted to only allow the static IP of the client server to connect.
For part (3), the other client is supplied with a user name/password on a per user basis (for auditing) to log into their jailed account on the server. the encryption password for the file itself is supplied on a per file basis, so i'm trying to apply two modes of encryption at all times here (except when the files are resting on the server).
Along with dedicated firewalls on both sides, Access control on the SFTP server will be configured to block IP addresses with a certain number of failed attempts over a short time, invalid passwords attempts will lock out users, password policies will be implemented etc.
I like to think that I've covered as much as possible but I'd love to hear what you guys think about this implementation?
For the commercial server side of things, I've narrowed it down to GloalSCAPE SFTP w/ SSH & HTTP module or JSCAPE Secure FTP server - I'll be assessing the suitability of each over the weekend but if any of you have any experience with either i'd love to hear about it also.
| 2 |
8,702,227 | 01/02/2012 14:53:38 | 1,117,029 | 12/27/2011 03:43:48 | 11 | 0 | My arrayList keeps resetting! :o | So, after banging my head against the wall for an hour or two, and countless debug statements, I realized that my arrayList is losing all its values between method one and two.
for (int i=0; i<mURLURLS.length; i++) {
getListView().addHeaderView(buildHeader(mURLURLS[i]));
try {
getNames(mURLURLS[i]);
if (!linkArray.isEmpty()) {
for (Iterator c = linkArray.iterator(); c.hasNext();) {
Log.d("POC", "LINK ARRAY CONTAINS " + (String)c.next());
}
} else {
Log.d("POC", "LINKARRAY IS EMPTY!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
}
getLinks(mURLURLS[i]);
} catch (Exception e) {
e.printStackTrace();
}
}
Watching logcat tells me that at this point, my arrayList is empty.
getNames is as follows.
public void getNames(final String mURLURLS) throws IOException {
new Thread(new Runnable() {
public void run() {
try {
URL url = new URL(mURLURLS);
URLConnection con = url.openConnection();
Pattern p = Pattern.compile("text/html;\\s+charset=([^\\s]+)\\s*");
Matcher m = p.matcher(con.getContentType());
String charset = m.matches() ? m.group(1) : "ISO-8859-1";
Reader r = new InputStreamReader(con.getInputStream(), charset);
StringBuilder buf = new StringBuilder();
while (true) {
int ch = r.read();
if (ch < 0)
break;
buf.append((char) ch);
}
String strMessy = buf.toString();
strClean = new String (strMessy.replaceAll("\\<.*?>",""));
cleanArray.add(strClean);
mHandler.sendEmptyMessage(1);
} catch (Exception e) {
e.printStackTrace();
}
}
}).start();
}
The handler message calls my getFinalName method. Using the handler was the only way I could assure that the next method wouldnt get started before getName was finished.
getFinalName is as follows.
public void getFinalName(String strClean) {
//should loop through until string no longer contains any .zip files.
while (strClean.contains(".zip")){
String trimmed = strClean.substring(0, strClean.lastIndexOf(".zip"));
String[] parts = trimmed.split("\n");
String lastWord = parts[parts.length - 1] + ".zip";
finalName = lastWord;
strClean = new String(strClean.replace(finalName, ""));
linkArray.add(finalName);
}
}
Any and all ideas are appreciated, I have no clue what could be causing the arrayList to reset. At the end of getFinalName its populated, but somewhere between the end of getFinalName and getLinks, it gets reset, though theres no code between the two that is executed.
| java | android | arraylist | null | null | 01/03/2012 12:50:27 | too localized | My arrayList keeps resetting! :o
===
So, after banging my head against the wall for an hour or two, and countless debug statements, I realized that my arrayList is losing all its values between method one and two.
for (int i=0; i<mURLURLS.length; i++) {
getListView().addHeaderView(buildHeader(mURLURLS[i]));
try {
getNames(mURLURLS[i]);
if (!linkArray.isEmpty()) {
for (Iterator c = linkArray.iterator(); c.hasNext();) {
Log.d("POC", "LINK ARRAY CONTAINS " + (String)c.next());
}
} else {
Log.d("POC", "LINKARRAY IS EMPTY!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
}
getLinks(mURLURLS[i]);
} catch (Exception e) {
e.printStackTrace();
}
}
Watching logcat tells me that at this point, my arrayList is empty.
getNames is as follows.
public void getNames(final String mURLURLS) throws IOException {
new Thread(new Runnable() {
public void run() {
try {
URL url = new URL(mURLURLS);
URLConnection con = url.openConnection();
Pattern p = Pattern.compile("text/html;\\s+charset=([^\\s]+)\\s*");
Matcher m = p.matcher(con.getContentType());
String charset = m.matches() ? m.group(1) : "ISO-8859-1";
Reader r = new InputStreamReader(con.getInputStream(), charset);
StringBuilder buf = new StringBuilder();
while (true) {
int ch = r.read();
if (ch < 0)
break;
buf.append((char) ch);
}
String strMessy = buf.toString();
strClean = new String (strMessy.replaceAll("\\<.*?>",""));
cleanArray.add(strClean);
mHandler.sendEmptyMessage(1);
} catch (Exception e) {
e.printStackTrace();
}
}
}).start();
}
The handler message calls my getFinalName method. Using the handler was the only way I could assure that the next method wouldnt get started before getName was finished.
getFinalName is as follows.
public void getFinalName(String strClean) {
//should loop through until string no longer contains any .zip files.
while (strClean.contains(".zip")){
String trimmed = strClean.substring(0, strClean.lastIndexOf(".zip"));
String[] parts = trimmed.split("\n");
String lastWord = parts[parts.length - 1] + ".zip";
finalName = lastWord;
strClean = new String(strClean.replace(finalName, ""));
linkArray.add(finalName);
}
}
Any and all ideas are appreciated, I have no clue what could be causing the arrayList to reset. At the end of getFinalName its populated, but somewhere between the end of getFinalName and getLinks, it gets reset, though theres no code between the two that is executed.
| 3 |
10,681,808 | 05/21/2012 08:29:26 | 1,189,614 | 02/04/2012 16:59:20 | 83 | 5 | TPL + C++/CLI: tutorials, samples | Is it possible to use TPL in C++/CLI?
Major materials I find relate to PPL, not TPL. If I try to use TPL as I used for C# (e.g. retrieving result of an async operation, via ->Result), then get something like
"Error 150 error C2039: 'Result' : is not a member of 'System::Threading::Tasks::Task`1'
"
Any samples or good tutorials? Thanks | c++-cli | task-parallel-library | null | null | null | 05/22/2012 12:19:35 | not constructive | TPL + C++/CLI: tutorials, samples
===
Is it possible to use TPL in C++/CLI?
Major materials I find relate to PPL, not TPL. If I try to use TPL as I used for C# (e.g. retrieving result of an async operation, via ->Result), then get something like
"Error 150 error C2039: 'Result' : is not a member of 'System::Threading::Tasks::Task`1'
"
Any samples or good tutorials? Thanks | 4 |
3,119,472 | 06/25/2010 15:52:27 | 376,415 | 06/25/2010 15:36:13 | 1 | 0 | Is MVC .net right for my project type? | After countless hours researching (creating a few demo projects, viewing webinars etc..) I feel like MVC .net works great for 90% of the web application types out there, but not for mine.
Basically I have a dashboard application where I'm displaying large amounts of information in many different graphs / charts (all on the same screen). If I change the state of a control on the page, say a date range, I would like all of the graphs / charts to update accordingly.
This is fairly trivial in webforms using usercontrols with ajax update panels, but I've not seen a 'good' simple implementation in MVC without doing most of the heavy lifting in JQuery / Javascript code.
Most of the examples of post backs in MVC involve a form submission (we don't have any forms on our dashboard) or it involves navigation from view to view (which I don't want to do either). The closest thing I can relate what we need to would be an MVVM framework but we won't be moving to Silverlight for a few months.
Am I thinking of MVC wrong, am I missing such a simple example that the major bloggers / tutorials don't cover it? Any thoughts?
| c# | asp.net-mvc | silverlight | mvc | asp.net-mvc-2 | null | open | Is MVC .net right for my project type?
===
After countless hours researching (creating a few demo projects, viewing webinars etc..) I feel like MVC .net works great for 90% of the web application types out there, but not for mine.
Basically I have a dashboard application where I'm displaying large amounts of information in many different graphs / charts (all on the same screen). If I change the state of a control on the page, say a date range, I would like all of the graphs / charts to update accordingly.
This is fairly trivial in webforms using usercontrols with ajax update panels, but I've not seen a 'good' simple implementation in MVC without doing most of the heavy lifting in JQuery / Javascript code.
Most of the examples of post backs in MVC involve a form submission (we don't have any forms on our dashboard) or it involves navigation from view to view (which I don't want to do either). The closest thing I can relate what we need to would be an MVVM framework but we won't be moving to Silverlight for a few months.
Am I thinking of MVC wrong, am I missing such a simple example that the major bloggers / tutorials don't cover it? Any thoughts?
| 0 |
9,598,684 | 03/07/2012 09:22:44 | 1,225,922 | 02/22/2012 13:19:10 | 25 | 0 | How to add an array values into another array? | I have two array of values and their keys...<br>
**First array**<br>
Array
(
[0] => Array
(
[10] => A1
[11] => A2
)
[1] => Array
(
[12] => B1
[13] => B2
)
)
**Second array**<br>
Array
(
[1] => Z1
[2] => Z2
)
I want to group these two array into a single array. I mean the array format should be.
Array
(
[0] => Array
(
[1] => Z1
[10] => A1
[11] => A2
)
[1] => Array
(
[2] => Z2
[12] => B1
[13] => B2
)
)
I tried with array_push but add the entire array in the [0] position or in the [2] position in the second array.<br>
Anyone has any ideas?
thanks
| arrays | multidimensional-array | for-loop | foreach | null | null | open | How to add an array values into another array?
===
I have two array of values and their keys...<br>
**First array**<br>
Array
(
[0] => Array
(
[10] => A1
[11] => A2
)
[1] => Array
(
[12] => B1
[13] => B2
)
)
**Second array**<br>
Array
(
[1] => Z1
[2] => Z2
)
I want to group these two array into a single array. I mean the array format should be.
Array
(
[0] => Array
(
[1] => Z1
[10] => A1
[11] => A2
)
[1] => Array
(
[2] => Z2
[12] => B1
[13] => B2
)
)
I tried with array_push but add the entire array in the [0] position or in the [2] position in the second array.<br>
Anyone has any ideas?
thanks
| 0 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.