Unnamed: 0
int64 65
6.03M
| Id
int64 66
6.03M
| Title
stringlengths 10
191
| input
stringlengths 23
4.18k
| output
stringclasses 10
values | Tag_Number
stringclasses 10
values |
---|---|---|---|---|---|
2,723,377 | 2,723,378 |
How to hide all tabs on default with jQuery accordion?
|
<p>I have implement Jquery accordian in my wesbite as shown <a href="http://jqueryui.com/accordion/#collapsible" rel="nofollow">here</a>. I have enabled collapsible which allows me to collapse all tabs. But I'd like all tabs to be closed by default. Currently the first tab is open by default. How do I do that?</p>
|
jquery
|
[5]
|
3,037,140 | 3,037,141 |
Download files in queue in Android
|
<p>How do I download multiple files in a queue one by one! I'm using <a href="https://github.com/umeng/android_download_manager" rel="nofollow">this</a> as a sample code, since.
I would be passing the URLs to download in Strings from my local DB dynamically.</p>
<p>Please let me know how to do that. I want the download to start as soon as the application launches. Kindly help me out!
<strong>Android Dev Type</strong>: Newbie
<strong>Purpose of Download Queue:</strong> To download multiple files from the server after in-app billing gets successful!</p>
<p><strong>P.S.:</strong> I already referenced <a href="http://stackoverflow.com/questions/4336365/download-queue-in-android/4337002#4337002">this</a> question. But I'm not sure if that would solve my issue!</p>
|
android
|
[4]
|
4,934,251 | 4,934,252 |
Access Windows mobile Address book
|
<p>What is the code for accessing contacts from address book in windows mobile application when the contacts are stored into the windows mobile address book?</p>
<p>I tried:</p>
<pre><code>(Microsoft.WindowsMobile.PocketOutlook.OutlookSession ss = new OutlookSession())
{
ContactCollection mobilePhoneBook = ss.Contacts.Items;
foreach (Contact aContact in mobilePhoneBook)
{
MessageBox.Show("First Name: " + aContact.FirstName.ToString()
+ "\n Mobile Number: " + aContact.MobileTelephoneNumber.ToString());
}
}
</code></pre>
<hr>
<p>It's giving the error: </p>
<blockquote>
<p><code>can't find pinvoke dll 'pimstore.dll'</code></p>
</blockquote>
|
c#
|
[0]
|
3,768,372 | 3,768,373 |
Create an if statement with these ifs
|
<p>I am designing a social network site and am adding the final piece to the puzzle. It is regarding the buttons, Unfriend and Add Friend. And when the Session matches the ID, they shouldn't appear.</p>
<p>The Unfriend button appears when it is needed. And so does Add Friend to an extent it works as well for my profile despite a clear collection of if statements that say it shouldn't do that.</p>
<p>In short, I don't want it to appear on my profile and the two IF statements at the bottom I am havng trouble combining</p>
<p>I am really stuck and my code is below: </p>
<pre><code> $cool = $_GET['id'];
$evan = mysql_query("SELECT * FROM users WHERE username='{$_SESSION['user_login']}'");
$joe1 = mysql_fetch_assoc($evan);
$cookie = mysql_query("SELECT * FROM users WHERE id='{$_GET['id']}'");
$joe = mysql_fetch_assoc($cookie);
if (in_array($_SESSION['user_login'], $friendArray)) {
$addAsFriend = '<input type="submit" name="removefriend" value="UnFriend">';
echo $addAsFriend;
}
if ($_GET['id'] == $joe1['id']) {
$addAsFriend = '<input style="display:none;" type="submit" name="addfriend" value="Add Frimm1end">';
echo $addAsFriend;
}
if (!$_GET['id'] == $joe1['id']) {
$addAsFriend = '<input type="submit" name="addfriend" value="Add Friend">';
echo $addAsFriend;
}
if (!in_array($joe1['username'], $friendArray)) {
$addAsFriend = '<input type="submit" name="addfriend" value="Add Friend">';
echo $addAsFriend;
}
</code></pre>
|
php
|
[2]
|
287,855 | 287,856 |
Javascript: nested loops?
|
<p>I'd like to achieve an animation/sequence like this:</p>
<p>the animation starts with a loop (imagine a <strong>car</strong> moving from x1 to x2) then a pause of 1 second then again the animation (imagine a <strong>car</strong> moving from x2 to x3 etc) </p>
<p>the <strong>car</strong> loop is achieved adding 1px to the car left: value</p>
<p>but i cant figure out the nested loop how should work</p>
<p>i'm trying to do ti only using setInterval, no jquery</p>
<p><strong>UPDATE: sorry i wasnt clear</strong></p>
<p>but assume we have </p>
<pre><code>var animation = setInterval(car_moves, 10);
</code></pre>
<p>how do i trigger this animation every 2 seconds, and the animation should last 0.5sec ?</p>
|
javascript
|
[3]
|
1,394,691 | 1,394,692 |
Why does my web site prompt for a username password when custom errors mode is on
|
<p>While navigating my site with custom errors mode set to off it behaves normal. If I turn I turn custom errors mode to on, then my first visit to the site prompts me with a username password dialog box. </p>
<p>The entire site is enforced with SSL if that matters. Where should I start looking? Is this possibly an IIS issue? I'm not sure why setting custom errors mode to on/off would invoke this type of behavior.</p>
|
asp.net
|
[9]
|
623,399 | 623,400 |
Google Drive API Error "The authenticated user has not installed the app" in android
|
<p>I'm trying to use Google drive api in android application, I'm using "google-api-java-client", from this library I've imported libs which are specific to android,
also registered project to Google api console for Google drive api & I'm able to do user authentication using OAuth2.0. But when executing insert http request call I'm getting following response from Google API</p>
<pre><code>com.google.api.client.http.HttpResponseException: 403 Forbidden
{
"error":{
"errors":[
{
"domain": "global"
"reason": "appNotInstalled"
"message": "The authenticated user has not installed the app with client id"
}
],
"code": 403,
"message":"The authenticated user has not installed the app with client id "
}
}
</code></pre>
<p>Please Help!</p>
|
android
|
[4]
|
890,552 | 890,553 |
list view instead of filling whole screen
|
<p>I have trying to create a list with items. I do not want the list will fill the whole screen. I really tries to create a list its width and height will be nearly equal size of the longest list item and number of items on the list respectively. In other words; </p>
<p>if I have one item, on android I will see </p>
<pre><code>------------------------
| |
| 1 |
------------------------
</code></pre>
<p>If I have 2 items</p>
<pre><code>------------------------
| |
| 1 |
| 2 |
------------------------
</code></pre>
<p>If I have item with name "lll" and "llllllllll",</p>
<pre><code>------------------------
| |
| lll |
| llllllllll |
------------------------
</code></pre>
<p>My layout is </p>
<pre><code> <?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp" >
</TextView>
</code></pre>
<p>What part should I change in order to get what I have told at above ?</p>
<p>EDIT:</p>
<pre><code> String[] values = new String[] { "1", "2", "3","4","5","6","7","8","9","10","11","12","13","14" };
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
android.R.layout.simple_expandable_list_item_1, values);
setListAdapter(adapter);
</code></pre>
|
android
|
[4]
|
1,902,458 | 1,902,459 |
java.lang.NoClassDefFoundError: BoothServer
|
<p>I'm following this tutorial <a href="http://stilius.net/java/java_ssl.php" rel="nofollow">http://stilius.net/java/java_ssl.php</a> to create simple SSLServer and client sockets. I've created the certificate using keytool but I've a problem executing this line from the above tutorial, </p>
<p>"java -Djavax.net.ssl.keyStore=mySrvKeystore -Djavax.net.ssl.keyStorePassword=123456 EchoServer".</p>
<p>Where should I put the certificate? in project directory?
how can I pass the parameters mentioned above?</p>
<p>I'm doing this and getting error;</p>
<pre><code>C:\Users\abc\workspace\VirtualElectionBoothServer\bin>java -Djavax.net.ssl.keyStore=mySrvKeystore -Djavax.net.ssl.keyStorePassword=123456 BoothServer
Exception in thread "main" java.lang.NoClassDefFoundError: BoothServer
Caused by: java.lang.ClassNotFoundException: BoothServer
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: BoothServer. Program will exit.
</code></pre>
<h2>Edit:</h2>
<p>my problem is that I never run a project from command line so I don't know how to run this line from command line;</p>
<pre><code>C:\Users\abc\workspace\VirtualElectionBoothServer\bin>java -Djavax.net.ssl.keyStore=mySrvKeystore -Djavax.net.ssl.keyStorePassword=123456 BoothServer
</code></pre>
<p>From which directory should i run it? I've more than one .java files. which one to run? one having main()?</p>
|
java
|
[1]
|
3,383,156 | 3,383,157 |
How do I wait during application startup until WIFI connects?
|
<p>Like many apps my app depends on WIFI and Http Connection to operate. What I am not clear on is how I can time a wait until WIFI is enabled AND device is attached to WIFI network is. What is the best way to delay on application startup long enough for this to happen? during this time I would for example keep buttons deactivated. Also is there any way to make the device attempt to connect to its preferred network? Thanks</p>
|
android
|
[4]
|
600,741 | 600,742 |
How can I develop mobile application using C# or anything else
|
<p>I need help, I am newbie in C#, I have developed one game application using C#, now I want to deploy that game in mobile application or any social application...How can I do that?</p>
|
c#
|
[0]
|
2,918,263 | 2,918,264 |
Splitting an expression
|
<p>I have to split a string into a list of substrings according to the criteria that all the parenthesis strings should be split .</p>
<p>Lets say I have <code>(9+2-(3*(4+2)))</code> then I should get <code>(4+2)</code>, <code>(3*6)</code> and <code>(9+2-18)</code>.</p>
<p>The basic objective is that I learn which of the inner parenthesis is going to be executed first and then execute it.</p>
<p>Please help....</p>
<hr>
<p>It would be helpful if you could suggest a method using re module. Just so this is for everyone it is not homework and I understand Polish notation. What I am looking for is using the power of Python and re module to use it in less lines of code.</p>
<p>Thanks a lot....</p>
|
python
|
[7]
|
3,843,377 | 3,843,378 |
How C++ call class method() in context of object1 by calling object.method()
|
<p>how C++ mech works when we call object.method(), how can it call method of the class in context of the object without mixing with any other object.</p>
<p>and that object become "this" object in that method.</p>
<p>how this mapping is managed. I understand when it comes to virtual function call, you have vptr pointer and v-table to locate the function, but it is a next level activity.</p>
|
c++
|
[6]
|
2,805,409 | 2,805,410 |
Import/Export based on conditions
|
<p>Imagine a <code>settings.py</code>:</p>
<pre><code>if condition:
A_SETTING = True
else:
A_SETTING = False
</code></pre>
<p>how can I have another file just import it and get the setting based on the condition:</p>
<pre><code>import settings
use_setting_somehow(settings.A_SETTING)
</code></pre>
<p><strong>UPDATE:</strong> Ignore this please. I had a mistake in my function.</p>
|
python
|
[7]
|
2,396,596 | 2,396,597 |
Trying to echo to a new line and isn't working
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2674703/php-trying-to-create-a-new-line-with-n">PHP: trying to create a new line with “\n”</a><br>
<a href="http://stackoverflow.com/questions/6879617/line-break-help-in-php">line break help in PHP</a> </p>
</blockquote>
<p>Hello I have been trying to echo to a new line in PHP using the \n thing and it just isn't working, I have tried separating it just in case PHP got confused or something and it still isn't working, HELP!! </p>
<p>This is my code, you shouldn't need to know it all:</p>
<p>Take "id" to be 1, "sender" to be "test" and "message" to be "test"</p>
<pre><code>echo($rows."\n");
while($rowarray = mysql_fetch_array($result)){
echo($rowarray["id"].") From: ".$rowarray["sender"]." - ".$rowarray["message"]."\n");
}
</code></pre>
<p>I want it to print out like this:</p>
<pre><code>1 (or how many rows there are)
1) From: test - test
</code></pre>
<p>I have no idea what I am doing wrong. I would really appreciate help</p>
|
php
|
[2]
|
601,368 | 601,369 |
Getting the last three elements from a List/ArrayList?
|
<p>I need to get the last three elements added to a List. Are there any utility methods for this or will I just use a for loop that iterates down from "size(myList) - 1"?</p>
|
java
|
[1]
|
1,281,991 | 1,281,992 |
can anybody explain how AudioSessionSetActive(true/false) function work in iphone OS?
|
<p>Activating audio session interrupt audio sessions belonging to built-in applications running in the background, depending on categories and priorities. Deactivating audio session allows other, interrupted audio sessions to resume.
activating audio session ( AudioSessionSetActive(true) ) was working properly,but deactivating audio session ( AudioSessionSetActive(false) ) was not working. can any body suggest me how to deactivate audio session and resume the interrupted audio.</p>
|
iphone
|
[8]
|
5,714,330 | 5,714,331 |
Count method or property for an IList
|
<p>Thanks for help with explaining to me about IList and IEnumerable. I have marked that <a href="http://stackoverflow.com/questions/8692742/cannot-convert-from-an-ienumerablet-to-an-icollectiont/" title="question">question</a> as answered. Now I have a request for just a bit more information. </p>
<p>I have code like this:</p>
<pre><code>for (var index = 0; index < Model.Items.Count(); index++)
</code></pre>
<p>It was suggested in a previous post that it's not efficient as the Count() is a method and it gets executed many times. I tried the following:</p>
<pre><code>for (var index = 0; index < Model.Items.Count; index++)
</code></pre>
<p>This seems to work. </p>
<p>Can someone please confirm there's a difference. Both work so I am not 100 % sure.</p>
<p>Would the following be the most efficient? Does the foreach need an IList or and IEnumerable?</p>
<pre><code>foreach(var item in Items)
</code></pre>
|
c#
|
[0]
|
1,124,279 | 1,124,280 |
Why don't C++ compilers zero-initialize integer, floating-point, and pointer variables by default?
|
<p>Sometimes, we can use tools like valgrind to find out if we forgot to initialize a pointer variable. But why don't modern compilers relieve us from this common mistake which is hard to reproduce?</p>
|
c++
|
[6]
|
1,428,262 | 1,428,263 |
Undefined offset 0, but still gives me correct result
|
<pre><code>$options = array('health', 'strength', 'agility', 'stamina', 'defence');
$total = array();
foreach ($options as $value)
{
foreach ($objects as $object)
{
$total[$value] += $object->$value;
}
}
var_dump($total);
</code></pre>
<p>I have some objects in an array called <code>$objects</code>. It's giving the data to the <code>$total</code> as it should do.</p>
<p>But by some reason it's whining about some undefined offset.</p>
<pre><code> Notice: Undefined index: health in C:\wamp\www\objbattle\index.php on line 32
</code></pre>
<p>Line 32 is: <code>$total[$value] += $object->$value;</code></p>
<p>Why!? And how do I get rid of it?</p>
|
php
|
[2]
|
938,492 | 938,493 |
How to get a list with elements that are contained in two other lists?
|
<p>We have two lists:</p>
<pre><code>a=['1','2','3','4']
b=['2','3','4','5']
</code></pre>
<p>How to get a list with elements that are contained in both lists:</p>
<pre><code>a_and_b=['2','3','4']
</code></pre>
<p>and a list with elements that are contained only in one list, but not the other:</p>
<pre><code>only_a=['1']
only_b=['5']
</code></pre>
<p>Yes, I can use cycles, but it's lame =)</p>
|
python
|
[7]
|
1,725,456 | 1,725,457 |
jquery call back function
|
<p>I have a call back function as follows</p>
<pre><code>$('#lnkClientData').click(function() {
$('#clientdiv').slideToggle(function(){
if($('#lnkClientData').hasClass('open'))
{
$('#divnext').slideToggle();
$('#lnkClientData').removeClass('open').addClass('close');
}
else
{
$('#divnext').slideToggle();
$('#lnkClientData').removeClass('close').addClass('open');
}
}
);
});
</code></pre>
<p>I want the <code>$('#divnext').slideToggle();</code> code to be executed before the outside <code>$('#clientdiv').slideToggle()</code> function....
Right now the outside function gets called first....what I am trying to do is hide an anchor when a <code>div</code> slides in...but his happens before the <code>div</code> slides in...</p>
<pre><code> if($('#clientDiv').is(':visible'))
{
alert('');
// $('#divnext').hide();
//$('#clientDiv').slideToggle(); // Or whatever animation you want
}
else
{
//$('#clientDiv').slideToggle(function() // Or whatever animation you want
//{
// $('#divnext').show();
//});
}
</code></pre>
|
jquery
|
[5]
|
4,340,610 | 4,340,611 |
Get file owner in Windows using PHP
|
<p>Provide a path to file, and get its owner username on Windows?</p>
<p>Of course, <code>fileowner</code> is useless here.</p>
<p>Any PECL extensions that can help?</p>
<p>Edit: Alternative that will also work:</p>
<p>Read the summary data from a .DOC file, to retrieve the Author.</p>
<p>Edit 2: Found a solution using <code>COM("word.application")</code>. Any others?</p>
|
php
|
[2]
|
1,311,446 | 1,311,447 |
Functions that return a function - Javascript
|
<p>I' started learning JavaScript recently and I'm stuck up with this concept of 'Functions that return functions'. I'm referring the book 'Object Oriented Javascript' by Stoyan Stefanov. I have prior programming experience in Java, C and C++ and also 2 years of work experience applying my knowledge on the same.</p>
<p><strong>Snippet One:</strong> </p>
<pre><code>function a() {
alert('A!');
function b(){
alert('B!');
}
return b();
}
var s = a();
alert('break');
s();
</code></pre>
<p><strong>Output:</strong></p>
<pre><code>A!
B!
break
</code></pre>
<p><strong>Snippet Two</strong></p>
<pre><code>function a() {
alert('A!');
function b(){
alert('B!');
}
return b;
}
var s = a();
alert('break');
s();
</code></pre>
<p><strong>Output:</strong></p>
<pre><code>A!
break
B!
</code></pre>
<p>Can someone please tell me the difference between returning <code>b</code> and <code>b()</code> in the above snippets? I tried searching for stuff on google but couldn't get any worthy links. I'd be glad if someone also provided me some links explaining the concept. Thanks and Regards.</p>
|
javascript
|
[3]
|
2,430,277 | 2,430,278 |
No PHP errors on browser. what config is responsible for silent failure?
|
<p>I was trying to run a simple PHP script on Amazon EC2.
As i got blank screen on the browser, started putting some garbage syntax or echo in between steps. Then i figured out that script was failing without any error.</p>
<p>How to disable silent failure? </p>
<pre><code><?php
putenv('HOME=/root');
echo 'after env'; //displayed on browser
require_once('/home/ec2-user/AWSSDKforPHP/sdk.class.php');
//i believe this require step was failed
echo 'after require'; // not displayed on browser
$ec2 = new AmazonEC2();
$response = $ec2->describe_availability_zones();
print_r($response);
echo 'hello';
?>
</code></pre>
|
php
|
[2]
|
425,415 | 425,416 |
Unique user signature
|
<p>I need to be able to detect if a used already visited a particular page. </p>
<p>I can set a cookies at their initial visit. I can also store some environment, such as IP, browser, OS, perhaps even language and create some string, like MD5 to compare against current visitor's environment. </p>
<p>Is there another method I should consider? </p>
<p>I work with PHP.</p>
|
php
|
[2]
|
5,373,168 | 5,373,169 |
A Tab Exception Message
|
<p>06-14 00:21:30.398: ERROR/AndroidRuntime(332): Caused by: java.lang.RuntimeException: Your content must have a TabHost whose id attribute is 'android.R.id.tabhost'</p>
<p>what it means? I've already given the id for tabhost.And I can see the id in R.java.</p>
<h2>Here is the .xml:</h2>
<p>TabHost xmlns:android="http://schemas.android.com/apk/res/android"<br>
android:id="@+id/tabhost"<br>
android:layout_width="fill_parent"<br>
android:layout_height="fill_parent"<br>
LinearLayout<br>
android:orientation="vertical"<br>
android:layout_width="fill_parent"<br>
android:layout_height="fill_parent"<br>
android:padding="5dp"<br>
TabWidget<br>
android:id="@+id/tabs"<br>
android:layout_width="fill_parent"<br>
android:layout_height="wrap_content"<br>
FrameLayout<br>
android:id="@+id/tabcontent"<br>
android:layout_width="fill_parent"<br>
android:layout_height="fill_parent"<br>
android:padding="5dp"<br>
LinearLayout<br>
TabHost</p>
|
android
|
[4]
|
4,855,612 | 4,855,613 |
How to use media.Metadata class in android to get info from metadata of a video
|
<p>I have a project in android that requires me to get bitrate of a streaming video that will be played in MediaPlayer. I concluded android.media.Metadata class (not in public API) will help me. But i am clueless about how to use it as a method of MediaPlayer.To get metadata of a file i can use MediaMetadataRetriver class. But how to use it with the external Metadata class?</p>
|
android
|
[4]
|
3,162,220 | 3,162,221 |
Memory leak using raphael.js with hover
|
<p>There is a serious memory leak happening using the Raphael library pie chart WITH the hover attribute. If I remove the code that includes the hover attribute it works great and when I add it back in the memory footprint steadily grows and hovering over the piechart increases the memory footprint even more so. Unlike most other examples I'm using window.setInterval to constantly update the page (if this helps any).
I'm at a loss as to how to correct this issue and reaching out for some help.</p>
<p>Below is the basics of what I'm doing...using pretty much the dynamic pieChart on the Raphael website and adding an interval timer to it. I cant however figure out how to utilize the hover effect without the memory issue???:</p>
<pre><code> window.onload = setInterval(drawThePie, 10000);
function drawThePie() {
var mainCont = parent.frames["main"].document;
mainCont.getElementById("holder").innerHTML = "Getting data..";
//..Setting values for pieChart and legend into arrays here
//..Looping through color array and setting values for colorlist below
var r = Raphael("holder");
var aCircle = r.aCircle(85,85,78).attr({fill: "black"});
pie = r.piechart(85,85,75,data, {"legend": legend, "legendpos": "east", colors: colorlist });
if(dataNotZero > 0) { mainCont.getElementById("holder").innerHTML = "";}
pie.hover(function () {
this.sector.stop();
this.sector.scale(1.1, 1.1, this.cx, this.cy);
if (this.label) {
this.label[0].stop();
this.label[0].attr({ r: 7.5 });
this.label[1].attr({ "font-weight": 800 });
}
}, function () {
this.sector.animate({ transform: 's1 1 ' + this.cx + ' ' + this.cy }, 500, "bounce");
if (this.label) {
this.label[0].animate({ r: 5 }, 500, "bounce");
this.label[1].attr({ "font-weight": 400 });
}
});
};
</code></pre>
|
javascript
|
[3]
|
5,894,469 | 5,894,470 |
Roatate image about it's centre
|
<p>I am trying an application like rotating image with motion sensor....My problem is that the image does not rotate about centre properly....And my angle range is 0 to 90 and 0 to -90..
And below is my code.....</p>
<pre><code> public void onDraw(Canvas canvas) {
super.onDraw(canvas);
Bitmap arrow = BitmapFactory.decodeResource(getResources(),R.drawable.arrow);
int arrowW = arrow.getWidth();
int arrowH = arrow.getHeight();
float scaleWidth = 1;
float scaleHeight = 1;
int centrex = arrowW/2;
int centrey = arrowH/2;
int X=108;
int Y=100;
int angle=0;
Matrix matrix = new Matrix();
matrix.postScale(scaleWidth, scaleHeight);
matrix.postRotate(angle, X+centrex , Y+centrey );
Bitmap resizedBitmap = Bitmap.createBitmap(arrow, 0, 0, arrow.getWidth(), arrow.getHeight(), matrix, true);
canvas.save();
canvas.drawBitmap(resizedBitmap, X, Y, null);
invalidate();
}
</code></pre>
<p>I am getting the angle values from onCreate method.....Using orientation sensor(roll values)..
But When I rotate the screen my image is rotating but not exactly around the image centre.....</p>
<p>Thanks......</p>
|
android
|
[4]
|
1,655,814 | 1,655,815 |
Java - Returning strings
|
<p>I wish to return a string from a method object that is called by another method in another class. My problem is: when I attempt to assign the returned value to a String in the other class, it cannot find the method object within the class object.</p>
<pre><code>Guessing Game = new Guessing();
</code></pre>
<p>This makes the object using the class Guessing.Java</p>
<pre><code>else if (buttonObj == guess){
double g = yourGuess.getNumber();
if ((g > 0)&&(g < 11)){
Game.StartGame(g);
label3.setVisible(false);
yourGuess.setEnabled(false);
label1.setText(Game.StartGame());
}else{
label3.setVisible(true);
yourGuess.requestFocus(true);
}
}
</code></pre>
<p>When I try retrieving the String from the StartGame method within the Guessing.Java class, it says it cannot find the class.</p>
<pre><code>public String StartGame(double guess){
int round = 1;
int guesses = 3;
String correct = "correct";
if (guesses > 0){
if (guess == ans){
correct = "correct";
}else if ((guess == ans - 1)||(guess == ans + 1)){
correct = "hot";
guesses--;
}else if ((guess == ans - 2)||(guess == ans - 2)){
correct = "warm";
guesses--;
}else{
correct = "cold";
guesses--;
}
}else{
correct = "round";
}
return correct;
}
</code></pre>
<p>I have tried several different things and looked it up multiple times but nothing works, can anyone help?</p>
|
java
|
[1]
|
966,893 | 966,894 |
How to add an id attribute to a html tag with a certain class using jQuery?
|
<p>I have a link with a class of <code>special</code> and I want to add an id attribute to it.</p>
<p>Only one element in my document will have this class at any one time (I may remove and add a new one at some point).</p>
<p>How would I add an id attribute to the element to change it from this:</p>
<pre><code><div class="special">
</code></pre>
<p>to this:</p>
<pre><code><div id="special-12345" class="special">
</code></pre>
|
jquery
|
[5]
|
961,728 | 961,729 |
How does a Java thread behave when a method is accessed externally?
|
<p>Suppose I have the following thread:</p>
<pre><code>public class MyThread {
public void run() {
while (true) {
// do something forever
}
}
}
</code></pre>
<p>Then I instantiate the thread as follows:</p>
<pre><code>MyThread thread = new MyThread();
</code></pre>
<p>What happens if I now call</p>
<pre><code>thread.performSomeFunction()
</code></pre>
<p>Specifically, how does performSomeFunction interact with the infinite loop above? Does it have to wait for the loop to sleep? Or can they both run "concurrently"?</p>
|
java
|
[1]
|
1,104,520 | 1,104,521 |
JavaScript - Input BUTTON hide - not working
|
<pre><code><input id="btnupdate" type="button" value="Update" onclick="update()"/>
<img id="loadupdate" src="http://localhost/connectu/styles/images/load_big.gif">
</code></pre>
<p>This code is returned by and PHP script in response to AJAX request. The update() function contains the code to hide the button and the image.</p>
<pre><code>document.getElementById('btnupdate').style.display='none';
document.getElementById('loadupdate').style.display='none';
</code></pre>
<p>The update() function is in the native file. But the problem is, image gets hidden but not button.
I tried FIREBUG. No javascript errors.</p>
|
javascript
|
[3]
|
5,162,750 | 5,162,751 |
Fiil an array with buttons
|
<pre><code>private Button[] Minefiled={g_btn2,g_btn3.....};
private Button g_btnNew;
private Button g_btn2;
private Button g_btn3;
private Button g_btn4;
private Button g_btn5;
private Button g_btn6;
private Button g_btn7;
</code></pre>
<p>Can i fill an array with buttons like this?</p>
|
java
|
[1]
|
3,372,990 | 3,372,991 |
Make subcategories in template script
|
<p>I really need help with a script i have bought, the script has some categories, but i also need sub categories, so i added an extra field in the table traffic_categories. The original traffic_categories has id and category, but i have added sub_id also, so if the category is a main category it has 0 in sub_id, but if the category is a sub category it has the main category id in the sub_id field.. Simple..</p>
<p>The problem is the script hava an advanced template system i can´t figure out how works.
Here is the script that gets the categories from mysql:</p>
<pre><code>$result = mysql_query('SELECT category FROM traffic_categories WHERE sub_id = 0 ORDER BY category ASC;');
$iCat=2;
$CONF['categories'] = array(); $TMPL['cats'] = '';
while(list($TMPL['cat']) = mysql_fetch_row($result)) {
$TMPL['cath'] = str_replace(' ', '+', $TMPL['cat']);
$TMPL['cats'] .= base::do_skin('menu/cats');
$CONF['categories'][] = $TMPL['cat'];
$TMPL['last'] = $iCat++ % 4 === 0 ? ' last' : '';
}
</code></pre>
<p>and here is cats.html:</p>
<pre><code><div class="one-fourth{$last}">
<h5><a href="/cat/{$cath}">{$cat}</a></h5>
<ul class="categoryList">
Here i want the subcategories--><li> - <a href=""></a></li>
</ul>
</div>
</code></pre>
<p>and in my frontpage.html where the categories will be showed is just {$cats}.</p>
<p>So if someone please can help me show the subcategories inside the list in cats.html where is have written "Here i want the subcategories-->", then i will be really glad, thanks.</p>
|
php
|
[2]
|
3,116,328 | 3,116,329 |
Parsing plain text into associative array in PHP
|
<p>I've been working on this but haven't found any solution yet. I need to parse such string into associative array (PHP) </p>
<blockquote>
<p>Result: ssl_card_number=35*<strong>**</strong>*0000 ssl_exp_date=1212
ssl_amount=33.55 ssl_invoice_number=0 ssl_description=
ssl_company=Some Company ssl_first_name=John ssl_last_name=Cater
ssl_avs_address=Test St. ssl_address2= ssl_city=Sandy ssl_state=Utah
ssl_avs_zip=84075 ssl_country=United States ssl_phone=
[email protected] ssl_result=0
ssl_result_message=APPROVED
ssl_txn_id=00000000-0000-0000-0000-00000000000
ssl_approval_code=123456 ssl_cvv2_response=P ssl_avs_response=X
ssl_account_balance=0.00 ssl_txn_time=03/14/2012 06:58:27 PM</p>
</blockquote>
<p>This string is what's coming from Merchant Service (the one above contains fake data) so I need to parse it out and reach the values like this</p>
<p><code>$card_number = $parsed["ssl_card_number"];</code></p>
<p>How can I accomplish it? Note: All the keys start with <code>ssl_</code> it can be helpful somewhere maybe.</p>
|
php
|
[2]
|
583,662 | 583,663 |
Why does std::getline(cin, Number) give a "No matching function for call" error?
|
<p>I wrote a program so the user inputs a number and the program outputs its binary representation.</p>
<p>I get this error:</p>
<blockquote>
<p>No matching function for call to `getline(std::istream&, unsigned int&)'</p>
</blockquote>
<p>How can I solve this?</p>
<p>Also, it outputs:</p>
<pre><code>0
0
0
0
</code></pre>
<p>...when it should output the right value for the input.</p>
<pre><code>#include <iostream>
using namespace std;
int main ()
{
int Number;
cin >> Number;
bool Binary[sizeof(int) * CHAR_BIT];
for(unsigned int i = 0; i < sizeof(int) * CHAR_BIT; i++)
Binary[(sizeof(int) * CHAR_BIT - 1) - i] = Number & (1 << i);
for(unsigned int i = 0; i < sizeof(int); i++)
std::cout << Binary[i] << std::endl;
system ("pause");
return 0;
}
</code></pre>
|
c++
|
[6]
|
5,724,677 | 5,724,678 |
Set minimum length of a list?
|
<p>I have a list in Python. I don't know exactly how long it is, but I know it's less than 15 items long.</p>
<p>I want to pad it out to exactly 15 items long, appending empty strings for all the items that I need to add.</p>
<p>Is there an efficient way to do this in Python? </p>
<p>I was hoping:</p>
<pre><code>myarr = myarr[:15]
</code></pre>
<p>might work, but it doesn't.</p>
<p>Currently I have:</p>
<pre><code>if len(myarr) < 15:
for i in range(15 - len(myarr)):
myarr.append('')
</code></pre>
<p>Any more compact suggestions?</p>
|
python
|
[7]
|
3,407,837 | 3,407,838 |
In C#, can you make a windows form application start as a service?
|
<p>I have a GUI C# Windows form program that I would like to start as a service when the computer starts and perhaps have an icon in the system tray that when clicked maximizes the program. Is this possible without major rework?</p>
<p>Thanks</p>
|
c#
|
[0]
|
3,054,342 | 3,054,343 |
What is the best replacement for a gallery in android?
|
<p>I need to implement gallery of clickable images that can be scrolled horizontally. The Gallery widget is deprecated, what can be the best replacement?</p>
|
android
|
[4]
|
1,382,146 | 1,382,147 |
Python for large projects
|
<p>Are there any resources out there on how to architect large, industrial strength Python projects? I'd like to start on an ambitious personal project, but I'm not really sure how to architect it and what practices to put into place to make the project successful. </p>
<p>Are there any resources out there discussing how to make large Python projects work? </p>
|
python
|
[7]
|
2,507,589 | 2,507,590 |
application open and close notification
|
<p>How can I receive a notification whenever a user is opening and closing any application on the phone?</p>
|
android
|
[4]
|
5,541,694 | 5,541,695 |
How to improve NSXMLParser performance
|
<p>I am developing an application where I use <code>NSXMLParser</code> to parse an XML file. At the moment this takes 8 seconds. But my requirement is to do the parsing within 5 seconds. How can I improve the performance of my parser?</p>
|
iphone
|
[8]
|
22,718 | 22,719 |
Update of Inflated TextView Triggers GC_Concurrent
|
<p>I have a Handler which is triggered by a runnable which updates my TextView.</p>
<p>Here is my Handler and Runnable.</p>
<pre><code>private Handler durationHandler = new Handler();
private Runnable mUpdateTimeTask = new Runnable() {
public void run() {
_currentRecordingTrack.setDuration(getCurrentRecordingTrack().getDuration() + 1);
mListener.trackUpdated(getCurrentRecordingTrack());
durationHandler.removeCallbacks(this);
durationHandler.postDelayed(this, 1000);
}
};
</code></pre>
<p>The handler is started using this code.</p>
<pre><code>durationHandler.removeCallbacks(mUpdateTimeTask);
durationHandler.postDelayed(mUpdateTimeTask, 1000);
</code></pre>
<p>mListener is a feeding back to the Fragment who's TextView I want to update the text.
Here is my Fragment where I inflate and declare my TextView.</p>
<pre><code>@Override
public View onCreateView(LayoutInflater inflater, ViewGroup group, Bundle saved)
{
super.onCreateView(inflater, group, saved);
View view = inflater.inflate(R.layout.trackdisplayfrag, group, false);
this.durationValueTxtView = (TextView) view.findViewById(R.id.durationValueLbl);
return view;
}
</code></pre>
<p>So when the mListener.trackUpdated() is called, it then calls my Fragment method to update the TextView's text.</p>
<pre><code>public void updateViewWithTrack(CCTrack track) {
if (track != null)
durationValueTxtView.setText(TimeUtility.convertSecondsIntoTimeString(track.getDuration()));
}
</code></pre>
<p><strong>The Problem</strong></p>
<p>So this all works fine. The problem is I'm getting GC_CONCURRENT messages in my LogCat every time the TextView's setText is called.</p>
<p>If I remove the TextView's setText method it doesn't happen anymore but it still continues to happen if I replace the TimeUtility... method with just a string.</p>
<p>Any help would be much appreciated.</p>
|
android
|
[4]
|
1,166,734 | 1,166,735 |
How to layout view right aligned and bottom of an LinearLayout
|
<p>I am trying to layout 1 textview (upText) left aligned and 1 textview (downText) and an image view (image) both on the same line and right aligned.</p>
<p>how can I do that? I tried that, but both 'textview' and image view at left aligned.</p>
<p></p>
<pre><code> <TextView
android:id="@+id/uptext"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="left"/>
<TextView
android:id="@+id/downtext"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:gravity="right|bottom"/>
<ImageView
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right|bottom"/>
</LinearLayout>
</code></pre>
|
android
|
[4]
|
1,918,006 | 1,918,007 |
Programmatically logging into a site
|
<p>It might sound silly; but can we programmatically login into a site such as Linkedin by passing our user credentials (userid and password)? I am not talking about using OAuth or other mechanism.</p>
<p><em><strong>Edit:</em></strong></p>
<p>I am using the following code in Page_Load method of an .aspx web page to login into Linkedin but it's not working. I see the login page again:</p>
<pre><code> try {
string url = "https://www.linkedin.com/uas/login";
string userName = "[email protected]";
string password = "--------";
string domain = "linkedin.com";
string postData = "session_key=" + userName + "&session_password=" + password;
string userAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)";
string method = "POST";
string contentType = "text/html; charset=UTF-8";
HttpWebRequest http = WebRequest.Create(url) as HttpWebRequest;
http.UserAgent = userAgent;
http.Method = method;
http.ContentType = contentType;
http.Credentials = new NetworkCredential(userName, password, domain);
byte[] dataBytes = UTF8Encoding.UTF8.GetBytes(postData);
http.ContentLength = dataBytes.Length;
http.Timeout = -1;
http.KeepAlive = true;
http.CookieContainer = new CookieContainer();
using (Stream postStream = http.GetRequestStream())
{
postStream.Write(dataBytes, 0, dataBytes.Length);
}
HttpWebResponse httpResponse = http.GetResponse() as HttpWebResponse;
if (httpResponse.Cookies != null)
{
foreach (Cookie cok in httpResponse.Cookies)
{
if (cok != null)
{
Response.Write(String.Format("Name = {0}- Value = {1}- Path = {2}<br/>", cok.Name, cok.Value, cok.Path));
}
}
}
Response.Write(httpResponse.Headers.ToString() + "<br/>");
Response.Write(new StreamReader(httpResponse.GetResponseStream()).ReadToEnd());
} catch(Exception ex)
{
Response.Write(ex.ToString());
}
</code></pre>
|
asp.net
|
[9]
|
3,480,219 | 3,480,220 |
Easiest way to find GMT offsets where local time is between certain hours?
|
<p>If it's 2am in London, how can I find the GMT offsets in seconds where the local time is between 7am and 7pm?</p>
<p>I have database records with a GMT offset column (-3600, -14400, 28000 etc) . I'd like to be able to select by those with offsets falling roughly within local daytime hours. Right now, which of these offsets are in daytime hours? I'm totally at a loss for how to approach this. </p>
|
php
|
[2]
|
1,398,657 | 1,398,658 |
Javascript basic execution order
|
<p>I know PHP, server-side scripts, run first and output the html to the browser, then javascript is executed. However, I am trying to get a feel for how the javascript is executed and can't quite figure it out.</p>
<p>Is Javascript executed top-down and is consistent with this top-down execution? I am dynamically creating javascript in PHP which is triggered by events in my webpage's original javascript.</p>
<p>Will created JS execute exactly where I put it or will it fire before? after?</p>
<p>Thanks</p>
|
javascript
|
[3]
|
4,184,601 | 4,184,602 |
How do I pass arguments to my JavaScript function?
|
<p>I have this JavaScript function:</p>
<pre><code>function prefixOneDropDown(){
var source = $('#prefix-one');
var selected = source.find('option[selected]');
var options = $('option', source);
var DefinitionList = '<dl id="dd-prefix-one" class="dropdown f-left"><dt><a href="#">' + selected.text() + '<span class="value">' + selected.val() + '</span></a></dt><dd><ul></ul></dd></dl>';
$(DefinitionList).insertAfter(source);
options.each(function(){ $("#dd-prefix-one dd ul").append('<li><a href="#"><span class="number-plate">' + $(this).text() + '</span><span class="value">' + $(this).val() + '</span></a></li>'); });
}
</code></pre>
<p>I was wondering if there is a way declaring <code>var selected, options, DefinitionList</code> outside the function...then call them in as arguments? </p>
<p>I've tried a number of different approaches but I'm missing something.</p>
<p>The function is called in my js like so : <code>prefixOneDropDown();</code></p>
<p>Any help would be Greatly Appreciated, Thanks</p>
|
javascript
|
[3]
|
2,322,631 | 2,322,632 |
Only show div if enough space to do so
|
<p>I'm looking for a solution to only display a div if there is space to do so.</p>
<p>On my blog's post pages I display latest posts in the left sidebar, like so...</p>
<p><a href="http://nonaynever.net/12286/manager-vacancy-a-long-shortlist/" rel="nofollow">No Nay Never post page</a></p>
<p>I want to show a different number of sidebar items dependent on how long the post is. Currently I have three divs displaying different numbers of items and run this script.</p>
<pre><code> if ($("#contentheight").height()>960 && $("#contentheight").height()<1200) {
document.getElementById("threeposts").className += "hide";
}
else if ($("#contentheight").height()>1200 && $("#contentheight").height()<1880) {
document.getElementById("fiveposts").className += "hide";
}
else if ($("#contentheight").height()>1880) {
document.getElementById("sevenposts").className += "hide";
}
</code></pre>
<p>However, this is hardly convenient and for very short posts it shows no items at all.</p>
<p>Is there a workaround whereby I can, for example, code for 7 items, but only show as many as the parent div can take? I tried using overflow:hidden but then you end up with the end item chopped in half.</p>
<p>For example, if there is enough room for three full items, they would be shown but any after that would not.</p>
|
javascript
|
[3]
|
2,092,774 | 2,092,775 |
How to store a date in a cookie?
|
<p>I have a javascript library that read date in this form:</p>
<pre><code>12/31/2020 5:00 AM
</code></pre>
<p>So I need to save a date in that form in a cookie.
I write this code:</p>
<pre><code>setcookie("invexpire", time()+3600*24, time()+3600*24*365);
echo $_COOKIE['invexpire'];
</code></pre>
<p>but it display something like this:</p>
<pre><code>1340702563
</code></pre>
<p>So, How can I store a date in that form in a cookie ?</p>
|
php
|
[2]
|
1,711,191 | 1,711,192 |
Compilation error: Generic array creation
|
<p>I would like to create an array of <code>ArrayList<String></code>. I tried the following:</p>
<pre><code>static ArrayList<String>[] displayBlocks = new ArrayList<String>[3];
</code></pre>
<p>However, I'm getting a compile time error:</p>
<blockquote>
<p>generic array creation</p>
</blockquote>
<p>I have added <code>import java.util.*;</code>. How can I get it to compile?</p>
|
java
|
[1]
|
4,834,834 | 4,834,835 |
How to Bring Android Activity to the Foreground and Detect if its in background?
|
<p>I have a callback inside an Activity which is called by a remote service. I fire a Toast when it gets called so, i know its getting called but its in the background, so I need a way from within the activity to make it go to the foreground. How can this be done. Also detect if I am in Foreground or not. How can this be done?</p>
|
android
|
[4]
|
5,024,667 | 5,024,668 |
C++: Problem with overloading mathematical operators
|
<p>I am looking to overload, let's say, the addition operator and have it add two objects of the same class. When I declare this "operator+" prototype function in the class declaration in the header file, I pass in both objects as parameters. I get a compiler error saying that "binary 'operator +' has too many parameters". I was searching around for an answer online and found out that declaring an inline function just outside the class declaration in the header file compiled out. I'm wondering what I was doing wrong or if I'm missing something here. Here is the code I am using in the header file.</p>
<pre><code>class Person
{
private:
int age;
double weight;
public:
Person::Person(); //default constructor
Person::~Person(); //default desctructor
Person operator+(Person r, Person i);
};
</code></pre>
<p>This compiles with the error I mentioned above. Below is the code that compiles fine.</p>
<pre><code>class Person
{
private:
int age;
double weight;
public:
Person::Person(); //default constructor
Person::~Person(); //default desctructor
};
inline Person operator+(Person r, Person i)
{
return Person(0,0);
}
</code></pre>
|
c++
|
[6]
|
2,317,009 | 2,317,010 |
What are the native typesafe enum patterns?
|
<p>I am a newbie to java, i want to learn about the native typesafe enum patterns? can anybody help me?</p>
<p>thanks in advance..</p>
|
java
|
[1]
|
1,979,837 | 1,979,838 |
How do I add a new key:value pair in existing JavaScript object?
|
<p>I have a JavaScript object like:</p>
<pre><code>appointerment= {ids: '15,16,17', appointments: {'15': '12.05.2010,14,05,2010'} }
</code></pre>
<p>now in appointments object I want to add something like <code>'16': '21.05.2010'</code></p>
<p>what is the best possible way to do this?</p>
|
javascript
|
[3]
|
5,529,070 | 5,529,071 |
Can the following code be editted, so that the second method is executed too?
|
<p>Is there anyway of calling methodB before methodA finishes, so that methodB gets executed? Ive tried numerous ways of implementing it, and none of them worked :(</p>
<hr>
<p>can someone explain? Thanks.</p>
<pre><code>public List<ObjectA> _OurObjectA= new List<ObjectA>();
public List<ObjectA> methodA()
{
List<ObjectA> products = new List<ObjectA>();
ServiceReference1.ServiceClient client =
new ServiceReference1.ServiceClient();
client.getProductCompleted +=
new EventHandler<ServiceReference1.getProductCompletedEventArgs>(methodB);
client.getProductAsync();
return _OurObjectA;
}
void methodB(object sender, ServiceReference1.getProductCompletedEventArgs e)
{
ObservableCollection<ServiceReference1.ObjectA> products = e.Result;
foreach (ServiceReference1.ObjectA obj in products)
{
ObjectA temp = new ObjectA(obj);
_OurObjectA.Add(temp);
}
}
</code></pre>
|
c#
|
[0]
|
4,440,946 | 4,440,947 |
Method call if not null in C#
|
<p>Is it possible to somehow shorten this statement?</p>
<pre><code>if (obj != null)
obj.SomeMethod();
</code></pre>
<p>because I happen to write this a lot and it gets pretty annoying. The only thing I can think of is to implement <strong>Null Object</strong> pattern, but that's not what I can do every time and it's certainly not a solution to shorten syntax.</p>
<p>And similar problem with events, where </p>
<pre><code>public event Func<string> MyEvent;
</code></pre>
<p>and then invoke</p>
<pre><code>if (MyEvent != null)
MyEvent.Invoke();
</code></pre>
|
c#
|
[0]
|
5,483,510 | 5,483,511 |
jquery click an img hide an LI
|
<p>i have something similar to the following... used a python script to JSON to populate.</p>
<pre><code><ul>
<li id="p1" class="x">val1 <img id="ip1" class="redx" src="redx.gif"/></li>
<li id="p2" class="x">val2 <img id="ip2" class="redx" src="redx.gif"/></li>
<li id="p3" class="x">val3 <img id="ip3" class="redx" src="redx.gif"/></li>
<li id="p4" class="x">val4 <img id="ip4" class="redx" src="redx.gif"/></li>
</ul>
</code></pre>
<p>I'd like some jquery to... when click the red x image.. to hide the whole LI cell it is in.</p>
<p>I have tried a few things but ... to no avail.</p>
<p>EDIT: <b>All in all</b>.. this doesnt seem to trigger ... this seems like a fundamental issue.</p>
<pre><code>$(function(){
function removeli() {
alert("got here" + this.id);
}
$("redx").click(removeli);
});
</code></pre>
<p>Any ideas on the final jquery code to accomplish this?</p>
|
jquery
|
[5]
|
3,856,184 | 3,856,185 |
fail-safe iterator
|
<p>CopyOnWriteArrayList produce fail-safe iterator because everytime the "structure is modified" , the modification mean a new array is produced. the iterator iterate over the old copy of array? So, fail-safe mean it is safe from failing?</p>
|
java
|
[1]
|
982,619 | 982,620 |
Android: Override back button
|
<p>I have a Main Activity, then a ListActivity to select an item to show, and then a third activity to show selected item. When user push back button, I want him to go back to main activity, not the listActivity.</p>
<p>How can I do that?</p>
|
android
|
[4]
|
5,610,715 | 5,610,716 |
Malzilla Tutorial #4 - how to get it working
|
<p>I am trying to understand the basic work flow of using <a href="http://malzilla.sourceforge.net/" rel="nofollow">Malzilla</a> , and therefore doing the tutorials. But already in the <a href="http://malzilla.sourceforge.net/tutorial04/index.html" rel="nofollow">first one</a>, where you actually get to do something I am lost as it doesn't work for me at all, even though I follow it step by step.</p>
<p>In the first paragraph where you have to concatenate the string and then translate it using the <code>MiscDecoders->DecodeUCS2</code>, I am getting not printable chars as a solution, after concatenating and using the decoder.</p>
<p>In the second paragraph where you are told to run the script after adding the function-call at the bottom of the script, the Decoder tells me that he cannot handle the <code>arguments.callee.toString()</code> method and therefor wont run the script. </p>
<p>How outdated are those tutorials and how can I get them to work?</p>
|
javascript
|
[3]
|
3,574,942 | 3,574,943 |
How to call a mehod(Function) on 1st day of every month and year in php?
|
<p>I have two methods(functions) called Mnth_function() and Yr_function(), and I need to call these two methods at different situation (or time) in my web application.
<br/></p>
<ol>
<li>Mnth_function() should call on 1st day of every month at 12:02:00 AM <br></li>
<li>Yr_function() should call on 1st day of every year at 12:15:00 AM </li>
</ol>
<p>But method Mnth_function() only once in
How can I achieve this(functions).</p>
|
php
|
[2]
|
4,907,920 | 4,907,921 |
related to php arithmetic
|
<pre><code>$y = 013;
echo $y + 5; //this result in 16
</code></pre>
<p>I can not figure it out how its ans is 16? Can any one help?</p>
|
php
|
[2]
|
3,502,249 | 3,502,250 |
How to disable network connectivity dynamically for a process?
|
<p>My app is data intensive and I want to provide users the comfort of turning on/off WIFI only data usage.</p>
<p>My application makes use of the network connectivity all over and also the ads do too. How can I globally for the app process limit the data connectivity type to only WIFI?</p>
|
android
|
[4]
|
5,717,670 | 5,717,671 |
How to deal with pass a value twice in a PHP file
|
<p>I am working on modification of a program. There are two value passes happened in one PHP file, and I get a notification from system like this:</p>
<pre><code>Notice: Undefined index: content in /Users/alexhu/NetBeansProjects/menagerie/svn/trunk/apps/frontend/modules/legacy/legacy_lib/content/utilities/hraprint.php on line 23
</code></pre>
<p>And</p>
<pre><code>Notice: Undefined index: isProvena in /Users/alexhu/NetBeansProjects/menagerie/svn/trunk/apps/frontend/modules/legacy/legacy_lib/content/utilities/hraprint.php on line 24
</code></pre>
<p>How to avoid it?</p>
|
php
|
[2]
|
5,896,830 | 5,896,831 |
Measure, Layout, and Draw times in Hierarchyviewer
|
<p>What is the difference between Measure, Layout, and Draw time in Android Hierarchyviewer tool? There is a nice article on Android Developers, however I can't find any information related on actual meanings of these three different time values... Can somebody explain me the difference? Thanks.</p>
|
android
|
[4]
|
5,029,640 | 5,029,641 |
string memory allocation
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/3361079/string-memory-allocation">string memory allocation</a> </p>
</blockquote>
<p>What is the difference between</p>
<pre><code>System.out.println("hello world");
System.out.println("hello world");
</code></pre>
<p>and </p>
<pre><code>String s="hello world";
System.out.println(s);
System.out.println(s);
</code></pre>
<p>and which one is better?</p>
|
java
|
[1]
|
4,345,469 | 4,345,470 |
Reece Calendar event
|
<p>I have this problem with the script:</p>
<p>Notice: Undefined index: show_times in C:\wamp\www\ReeceCalendar_0.9\cal\gatekeeper.php on line 192</p>
<p>Notice: Undefined index: hours_24 in C:\wamp\www\ReeceCalendar_0.9\cal\gatekeeper.php on line 194</p>
<p>Notice: Undefined index: start_monday in C:\wamp\www\ReeceCalendar_0.9\cal\gatekeeper.php on line 196</p>
<p>Notice: Undefined index: anon_naming in C:\wamp\www\ReeceCalendar_0.9\cal\gatekeeper.php on line 198</p>
<p>and the codes for each line are:</p>
<p>192: if($d['show_times']=='y') $cal_options['show_times'] = TRUE;</p>
<p>194: if($d['hours_24']=='y') $cal_options['hours_24'] = TRUE;</p>
<p>196: if($d['start_monday']=='y') $cal_options['start_monday'] = TRUE;</p>
<p>198: if($d['anon_naming']=='y') $cal_options['anon_naming'] = TRUE;</p>
<p>Please help me!Thnx</p>
|
php
|
[2]
|
1,010,877 | 1,010,878 |
How to parse the file present on SDCArd
|
<p><br>
I have a file which I created and is present in data/data/com.andr.filedemo/files/a.xml.
Now I want to parse this file using XML Pull parser. How can we give the path of that file or how we can access that file and then parse that file using XML Pull parser.
<br>
Can anyone help me in sortig out this issue?
<br>
Thanks in Advance,</p>
|
android
|
[4]
|
2,603,383 | 2,603,384 |
Remove certain values from xml string if checkbox clicked
|
<p>I have form that builds an xml string of all the values (excluding some) in the submitHandler of an .ajax submitted form to a WCF service, here is an example:</p>
<pre><code>function SetServices() {
var services = '<SERVICE><SERVICECD>1KNTK</SERVICECD></SERVICE>';
$(":checked:not([name='ServiceType'], #Standard, #NoneForex, #RTT, #PRN, #BW, #Metrics, #STATUS :input, #EX_AGREEMENTS :input, #final_step :input)").each(function() {
services += '<SERVICE><SERVICECD>' + this.id + '</SERVICECD></SERVICE>';
});
$('#SERVICES').val('<SERVICES>' + services + '</SERVICES>');
}
SetServices();
</code></pre>
<p>I need to add a function that will remove some values (var dontsubmit = ("#id1, #id2") etc if a checkbox ("#CME") is checked how would I combine this with the function "SetServices" or do I just run it after in the submitHandler?</p>
<pre><code>$("#CME").change (function() {
var dontsubmit = ("#id1, #id2, #id3, #id4, #id5");
if ($(this).is(":checked") && dontsubmit.is(":checked") {
$(this).remove(dontsubmit);
});
</code></pre>
<p>this isnt working, I need to figure out how to remove from the string "SetServices" builds.</p>
|
jquery
|
[5]
|
5,053,298 | 5,053,299 |
Which is better: require_once? or if (!defined('FOOBAR')) require? or something entirely different?
|
<p>Assuming PHP version >= 5.2, which is a better solution for managing includes: </p>
<pre><code>require_once DEFPATH . 'config.inc.php';
</code></pre>
<p>or </p>
<pre><code>if (!defined('FOOBAR')) require DEFPATH . 'config.inc.php';
</code></pre>
<p>or something entirely different?</p>
<p>Site does not use a front controller or autoloader. Typical number of files needed to be included is 3 - 8.</p>
<p>I've heard, here and elsewhere, that <code>require_once</code> adds overhead and does not play nice with caching. But I've also heard that a small number of <code>require_once</code> statements is OK in practice in later versions of PHP.</p>
<p>There must also be some overhead associated with checking if something is defined, but that may be less of an issue.</p>
<p>In general, which is the better practice and why?</p>
|
php
|
[2]
|
2,376,476 | 2,376,477 |
how do I include header files like list.h, queue.h and vector.h in C++ file?
|
<p>I downloaded a sample code and cpp files include header files like list.h, queue.h, and vector.h and if I try to build then I got "fatal error: No such file or directory compilation terminated" I think I should include the path to the system library that has those header files but I don't know how to do that.</p>
<p>Thanks in advance...</p>
|
c++
|
[6]
|
4,788,100 | 4,788,101 |
How to update only the part of page
|
<p>I have several combo boxes and labels. when a user select any item from the combo box, the corresponding value will be retrieved from database and will be shown on the label. I have done these part successfully. </p>
<p>But my query is, when I select any item from the combo box, the whole page posts back to the server (AutoPostBack set to <strong><em>True</strong>.</em>) </p>
<p>is it possible to post back only a part of page not the whole page (i.e. only combo box controls may be posted back to server instead of whole page)?</p>
|
asp.net
|
[9]
|
5,380,167 | 5,380,168 |
Check if is an Object
|
<p>I need to check if a variable is a pure Object instance. For example: a HTMLElement is <em>instanceof</em> Object. But I really need to check if it is <em>only</em> an Object, like <code>{a: true, b: false}</code> is. It not can validate an Array.</p>
<p><em><strong>Note</strong>: I can use newer features of Chrome, if better.</em></p>
|
javascript
|
[3]
|
4,288,849 | 4,288,850 |
how to get the respective value from a database table where one of the column values are displayed in a list view
|
<p>I have created a table named train_table in SQLite database with 3 columns. they are train_id, train_no and train_name. Now, i wrote a class in which i displayed the train_name in a list view. how do i get the related train_no in the next page? can anyone help me in sorting this problem.?
Thanks in advance</p>
|
android
|
[4]
|
3,283,468 | 3,283,469 |
Set the dimensions of a google map view v2 android
|
<p>I need help dealing with my app. I need to know how to make my google map view smaller. I need it to be located in the top left hand corner with a set dimension. </p>
<p>Please help or even suggest a resource online??</p>
|
android
|
[4]
|
2,309,205 | 2,309,206 |
how to use image like as map?
|
<p>User can used image like as map .. user can zoom in and zoom out this image like we use google map. i am not required to used google map in my application. anyone please suggest which steps follow for this type of development.</p>
|
android
|
[4]
|
3,883,482 | 3,883,483 |
C++ Help - I can't seem to figure out the last part of this code
|
<p>I'm trying to get the program to display the current height of the child and the estimated height of the child. </p>
<p>I have it displaying the before and after for the first child but can't get it to display the estimated height for the rest of the children. </p>
<p>I would be very grateful if anyone could help me figure this out. Thanks!</p>
<p>Here is the code that I have:</p>
<pre><code>#include <iostream>
using namespace std;
int main()
{
double height [10];
double chgHeight [10];
for (int x = 0; x < 10; x = x + 1)
{
height[x] = 0.0;
chgHeight[x] = 0.0;
}
cout << "You will be asked to enter the heights of ten children."<< endl;
for (int x = 0; x < 10; x = x + 1)
{
cout << "Enter height of child " << endl;
cin >> height[x];
}
chgHeight[0] = height[0] * .05 + height[0];
for (int x = 0; x < 10; x = x + 1)
{
cout << "Child " << x+1 << ": Current " << height[x] << " Expected "<< chgHeight[x] << endl;
}
system("pause");
return 0;
}
</code></pre>
|
c++
|
[6]
|
3,586,500 | 3,586,501 |
Fetching the data from database for specific time
|
<p>Hello here i want fetch the data from database into datagridview for timer interval
BETWEEN <code>1900-01-01 23:00:00.000</code> AND <code>1900-01-01 06:59:59.999</code> but here i am unable to do that can anyone help me .......</p>
<pre><code>temprature Time date
27 1900-01-01 00:46:09.000 2011-06-16 00:00:00
27.3 1900-01-01 00:48:09.000 2011-06-16 00:00:00
27.6 1900-01-01 00:50:09.000 2011-06-16 00:00:00
27.9 1900-01-01 00:52:09.000 2011-06-16 00:00:00
28.2 1900-01-01 00:54:09.000 2011-06-16 00:00:00
28.5 1900-01-01 00:56:09.000 2011-06-16 00:00:00
28.8 1900-01-01 00:58:09.000 2011-06-16 00:00:00
29.1 1900-01-01 01:00:09.000 2011-06-16 00:00:00
29.4 1900-01-01 01:02:09.000 2011-06-16 00:00:00
29.7 1900-01-01 01:04:09.000 2011-06-16 00:00:00
</code></pre>
|
c#
|
[0]
|
2,749,963 | 2,749,964 |
Check if a property exists in a list of custom class
|
<p>I have a list of my custom class(which has properties like Name,Age,Address).How can i check whether I have a property called "Name" in my list of custom class. I dont want to check if an item exists for the property Name , rather i did like to check if the property exists or not.</p>
<p>Any help on this?</p>
|
c#
|
[0]
|
5,868,987 | 5,868,988 |
How can I add sequence IDs to classes in a list of another class?
|
<p>I have the following class. Inside of the Parent class is a List of ParentDetail. Now I need to add a new field to the ParentDetail class. The field is called Id. What I need is a method in the main class that will iterate through the ParentDetails and populate the Id field with a number starting at 1. </p>
<p>Can anyone think of an easy way to do this? I am not sure how I can iterate through the List.</p>
<pre><code>public class Parent {
public IList<ParentDetail> ParentDetails {
get { return _ParentDetails; }
}
private List<ParentDetail> _ParentDetails = new List<ParentDetail>();
public Parent() {
this._ParentDetails = new List<ParentDetail>();
}
}
public class ParentDetail {
public int Id { get; set; } <<<<<<<< new field
}
}
</code></pre>
|
c#
|
[0]
|
3,931,586 | 3,931,587 |
find list view choice mode multiple events
|
<p>how to find checked events in choice mode multiple.</p>
<p>I am using ontemselected method it is not working for me</p>
<pre><code> ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,android.R.layout.simple_list_item_multiple_choice,getIntent().getStringArrayExtra("agents"));
ListView list = (ListView)findViewById(R.id.ListView01);
list.setAdapter(adapter);
list.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
list.setSelected(true);
list.setClickable(true);
list.setOnItemSelectedListener(new OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> arg0, View arg1,
int arg2, long arg3) {
// TODO Auto-generated method stub
Log.d("checked",""+arg2);
}
@Override
public void onNothingSelected(AdapterView<?> arg0) {
// TODO Auto-generated method stub
}
});
}catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
</code></pre>
|
android
|
[4]
|
1,942,738 | 1,942,739 |
Is boost tokenizer thread safe?
|
<p>I want to parse a csv string in my program, boost split must have a stl vector to store the result, so I want to use boost tokenizer. Is boost tokenizer thread safe? </p>
|
c++
|
[6]
|
2,416,170 | 2,416,171 |
Some problems with Threads
|
<p>I'm having a-bit of trouble with threads in java. Basically Im creating an array of threads and starting them. the point of the program is to simulate a race, total the time for each competitor ( i.e. each thread ) and pick the winner. </p>
<p>The competitor moves one space, waits ( i.e. thread sleeps for a random period of time between 5 and 6 seconds ) and then continues. The threads don't complete in the order that they started as expected. </p>
<p>Now for the problem. I can get the total time it takes for a thread to complete; what I want is to store all the times from the threads into a single array and be able to calculate the fastest time. </p>
<p>To do this should I place the array in the main.class file? Would I be right in assuming so because if it was placed in the Thread class it wouldn't work. Or should I create a third class? </p>
<p>I'm alittle confused :/</p>
|
java
|
[1]
|
4,286,744 | 4,286,745 |
Convert 2D array to 1D array of column strings
|
<p>I'm working on a java program that has the following input:</p>
<pre><code>A V V V VV V V V
E F V E VF E V E
C D V C VD B V C
A A V A VA G V A
V D V V VD E V V
A V V A VV V V A
</code></pre>
<p>and the following output:</p>
<pre><code>R
R
R
R
R
R
</code></pre>
<p>So an <code>R</code> has to be printed if a column contains minimal one letter <code>A-G</code>, but a space has to be printed if there are only <code>V</code>'s in the column. The code I have is:</p>
<pre class="lang-java prettyprint-override"><code>Scanner inputc2 = new Scanner (new File("internalc"));
int sss = 0;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
try{
matrix2[i][j] = inputc2.useDelimiter(" ").next().replaceAll(",", " ");
System.out.println(matrix2[i][j]);
temp2[sss] = matrix2[i][j];//change this
if(temp2[sss].indexOf("N") >= 0){
pc2.println(temp2[sss].replaceAll("N","R"));
}
if(temp2[sss].indexOf(' ') >= 0){
pc2.println(temp2[sss]);
}
sss++;
}
catch (java.util.NoSuchElementException e) {
// e.printStackTrace();
}
}
}
</code></pre>
<p>In the current program the temp2[sss] is exactly the same as matrix2[i][j], but it must be strings of columns. I hope that you can help me.</p>
<p>Kind regards,
Bjorn</p>
|
java
|
[1]
|
1,956,797 | 1,956,798 |
get css() property before append()?
|
<p>how can you get a css property before the element is appended?</p>
<p>css</p>
<pre><code>input.inp {
padding:3px 2px 3px 2px;
}
</code></pre>
<p>js</p>
<pre><code>var elm = $('<input class="inp" type="text" />');
alert(elm.css('padding-left'));
td.append(elm);
alert(elm.css('padding-left'));
</code></pre>
<p>only the second alert retuns the value...</p>
<p>I want the input element to have width:100%.. but since you can't do that (when the input has a padding of its own) I need to set the width in pixels</p>
<ol>
<li>get width of the the TD where the INPUT has to be appended...</li>
<li>get the left and right padding of the INPUT</li>
<li>append the INPUT to the TD with the width of the TD minus the left and right padding of the INPUT</li>
</ol>
|
jquery
|
[5]
|
2,424,339 | 2,424,340 |
battery related info android
|
<p>I am just tyring to create an activity which shows the battery level in the picture format automatically when ever there is a change in the battery status so any one can suggest me the procedure to create that type of app</p>
|
android
|
[4]
|
2,109,035 | 2,109,036 |
How to Keep previous row selected in iPhone?
|
<p>When i am select any row of navigation screen it is highlighted with Blue color. I want to keep this row selected with blue color when i am came to screen by back button. Mean when i am go to previous screen by back button, it should be indicated that which row is selected.</p>
|
iphone
|
[8]
|
3,767,102 | 3,767,103 |
Pass a simple string when opening a child window
|
<p>In the parent window:</p>
<pre><code>window.open('page.php','nameIWant','toolbar=no')
</code></pre>
<p>How do I get the target specified in window.open() from the new window code.</p>
<p>I tried to retrieve document.title, document.name and document.target, none gave me 'nameIWant'
or is there a simple way to get a string upon opening, that works in IE8.</p>
|
javascript
|
[3]
|
3,441,933 | 3,441,934 |
Position absolute vs div height in a jQuery project
|
<p>I have this project that assorted people have been helping me with here and I have a minor issue, if you see in my project here: <a href="http://jsfiddle.net/webmonkeycch/4JACw/3/" rel="nofollow">http://jsfiddle.net/webmonkeycch/4JACw/3/</a> the red line indicates a footer div of a site and because the frame is being positioned absolute the red line jumps above. Now I understand that you cant measure the height of something positioned absolute and assuming that the content area will be changing height depending on the content so I was wondering if there is a better way or recreating the jquery project itself. Any help will be appreciated.</p>
|
jquery
|
[5]
|
4,514,481 | 4,514,482 |
Form validation using Jquery
|
<p>When I submit my form I need to validate a txt field for not null and other stuff through jquery. But for only one submit button among all the other buttons it must validate that .I am doing the following</p>
<pre><code>$(document).ready( function(){
/* validate form */
$("#getEstimateId").click(function(e) {
alert('get Estimate');
});
$("#get").click(function(e) {
alert('get');
});
$("#getEstimateId").click(function() {
alert('getting in ');
var validator = $("#editDMBasketContentsId").validate({
rules: {
"postal": {
required:true,
number: true,
exactlength : 4,
digits : true
}
},
messages: {
"postal": {
required: "This field is required",
number :"Invalid entry please enter numbers only.",
exactlength : "Exactly 4 characters must be entered",
digits : "Please enter digits only"
}
},
errorPlacement: function (error, element) {
if (element.is(":radio"))
error.appendTo(element.parent().next().next());
else if (element.is(":checkbox"))
error.appendTo(element.next().next());
else
error.appendTo(element.parent().find(".status"));
},
submitHandler: function () {
document.forms['deliveryEstimate'].submit();
},
success: function (label) {
label.html("&nbsp;").addClass("checked");
}
});
});
});
</code></pre>
<p>It is going inside the method when i click the button and displays all the alerts but then the validation is not happening. Any suggestions on why it is happening so</p>
|
jquery
|
[5]
|
5,112,796 | 5,112,797 |
Attach click events in an IFRAME
|
<p>Basically I have an IFRAME that displays a given page. I am using jQuery to append a number of DIVs within the IFRAME upon load:</p>
<pre><code>$('#portal').load(function(){
$('#portal').contents().find('.callout').append('<div class="overlay">Test</div>');
});
</code></pre>
<p>(#portal is the IFRAME)</p>
<p>Now I want to attach a click event handler to these new DIVs. I believe since I am creating the DIVs dynamically, I need to use the <code>on()</code> function, but I having trouble doing this. I have tried:</p>
<pre><code>$('#portal').on('click', '.overlay', function(){
alert("Test");
});
</code></pre>
<p>The above two snippets of code are in a JS file that is accessible only on the parent page, i.e. the IFRAME itself does not reference the JS file.</p>
|
jquery
|
[5]
|
3,441,483 | 3,441,484 |
How to check last three elements from a python list - whether they are integer?
|
<p>I am using Python, version 2.7.2.</p>
<p>I have a task to check whether the last three elements from a list are integer?
For example:</p>
<pre><code>mylist = [String, Large_string_containing_integers_inside_it, 80, 40, 50]
</code></pre>
<p>For above list I want to check whether the last three elements are integer or not.
How can I do this?</p>
<p>Here is the code I am testing:</p>
<pre><code>#!/usr/bin/python
line = ['MKS_TEST', 'Build', 'stability:', '1', 'out', 'of', 'the', 'last', '2', 'builds', 'failed.', '80', '40', '50']
if all(isinstance(i, int) for i in line[-3:]):
job_name = line[0]
warn = line[-3]
crit = line[-2]
score = line[-1]
if score < crit:
print ("CRITICAL - Health Score is %d" % score)
elif (score >= crit) and (score <= warn):
print ("WARNING - Health Score is %d" % score)
else:
print ("OK - Health Score is %d" % score)
</code></pre>
|
python
|
[7]
|
4,048,405 | 4,048,406 |
How to make Popen() understand UTF-8 properly?
|
<p>This is my code in Python:</p>
<pre><code>[...]
proc = Popen(path, stdin=stdin, stdout=PIPE, stderr=PIPE)
result = [x for x in proc.stdout.readlines()]
result = ''.join(result);
</code></pre>
<p>Everything works fine, when it's ASCII. When I'm receiving UTF-8 text in <code>stdout</code> the result is unpredictable. In most cases the output is damaged. What is wrong here?</p>
<p>Btw, maybe this code should be optimized somehow?</p>
|
python
|
[7]
|
3,919,023 | 3,919,024 |
Split() deprecated
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2813241/php-split-alternative">PHP split alternative?</a> </p>
</blockquote>
<pre><code> // Successful geocode
$geocode_pending = false;
$coordinates = $xml->Response->Placemark->Point->coordinates;
$coordinatesSplit = split(",", $coordinates);
// Format: Longitude, Latitude, Altitude
$lat = $coordinatesSplit[1];
$lng = $coordinatesSplit[0];
</code></pre>
<p>Hello People, this is a part of my geolocation code. I try to change a stored adress into a lat/long and than save the lat/long back in the database.
They use the split function to put a string in an array but since php 5.3.0 the function is deprecated.
Anyone has a solution for this?</p>
<p>Thank you</p>
<p>EDIT:</p>
<p>When i use this</p>
<pre><code>$coordinatesSplit = preg_split(",", $coordinates);
</code></pre>
<p>I receive following error</p>
<blockquote>
<p>preg_split() [function.preg-split]:
No ending delimiter</p>
</blockquote>
<p><strong>LAST edit</strong>
When i add something to the database, the long/late are automatically saved to. But when i want to add for example the 6th adress in the database, the script to generate the lat/long is automatically doing this over all the records in the database. Is there any posibility to do this only at the last added? ----> <a href="http://stackoverflow.com/questions/10543719/geolocation-long-lan-in-database">Geolocation LONG/LAN in database</a></p>
|
php
|
[2]
|
1,056,477 | 1,056,478 |
Removing Textboxes
|
<p>Im new to js kindly help me! im using functionality to add text boxes dynamically im done with that part now i want make a js function that removes text boxes on a click on remove button. any help ?</p>
|
javascript
|
[3]
|
3,122,541 | 3,122,542 |
selecting unicode characters from text file or webpage
|
<p>I am able to syllabalise the devnagari words as shown on the following page.</p>
<p><a href="https://gist.github.com/950405" rel="nofollow">https://gist.github.com/950405</a></p>
<p>But what I want to do is to find the words those start with "ह" from the following webpage.</p>
<p><a href="http://www.sacred-texts.com/hin/mbs/mbs12030.htm" rel="nofollow">http://www.sacred-texts.com/hin/mbs/mbs12030.htm</a></p>
<p>How it can done using python?</p>
|
python
|
[7]
|
947,316 | 947,317 |
Get the next div wrt to current one with same class names
|
<p>How can I find the next with the same class as the current one. using jquery</p>
<p>I have a <code><div></code> with <code>class="help"</code>, now when some clicks on a button inside this I want to select the next with the same "help" class.</p>
<pre><code><div class="help">
<div>....OTHER HTML CONTENT......<div>
<input type='submit' class='ok'>
</div>
<div>....OTHER HTML CONTENT......<div>
<div class="help"></div>
<div>....OTHER HTML CONTENT......<div>
<div>....OTHER HTML CONTENT......<div>
<div>....OTHER HTML CONTENT......<div>
<div class="help"></div>
<div>....OTHER HTML CONTENT......<div>
<div class="help"></div>
</code></pre>
|
jquery
|
[5]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.