Unnamed: 0
int64 302
6.03M
| Id
int64 303
6.03M
| Title
stringlengths 12
149
| input
stringlengths 25
3.08k
| output
stringclasses 181
values | Tag_Number
stringclasses 181
values |
---|---|---|---|---|---|
2,157,119 | 2,157,120 |
JavaScript return and php problem (true,false)
|
<p>now i made JavaScript code (jquery code) and when i click ok it return true if i want true and false if i want false</p>
<p>now the problem is php not consider true as <code>php keyword true</code> its just consider it a word like any other word and i must make it like this</p>
<pre><code>if($post == 'true')
</code></pre>
<p>and i want make it like this</p>
<pre><code>if($post) // retuen true if $post true
</code></pre>
<p>how i can do that
and i use jquery function <code>is()</code> to send true or false to php</p>
|
php jquery
|
[2, 5]
|
3,952,217 | 3,952,218 |
Object required?
|
<pre><code>$(document).ready(function(){
function openEditor(){
$("#editor").show().animate({width: 965, height: 380}, 1500);
$("#editor textarea").show();
}
function closeEditor(){
$("#editor").animate({width: 985, height: 1}, 1500, function(){
$("#editor").hide();
$("#editor textarea").hide();
});
}
function setedit(){
$.ajax({
type: "POST",
url: "engine.php",
data: "title="+ $('#editorTitle').attr('value') +"&text="+ $('#editorText').html(),
beforeSend: function(){
$('#mainField').html('<img src="data/images/loader.gif" alt="Loading...">');
},
success: function(msg){
alert(msg);
closeEditor();
search();
}
});
}
function search(){ // Row 138
$('#editorTitle').val($('#search').val());
$('#mainField').html('<img src="data/images/loader.gif" alt="Loading...">');
$.get('engine.php?search='+ $('#search').val() , function(data) {
$('#mainField').html(data);
});
$.get('engine.php?raw=true&search='+ $('#search').val() , function(data2) {
$('#editorText').html(data2);
});
$.get('engine.php?title=true&search='+ $('#search').val() , function(data2) {
$('#h1').html(data2); // Row 152
$('#editorTitle').html(data2);
});
}
$("#ready").html('Document ready at '+ event.timeStamp); // Row 157
});
</code></pre>
<p>Hello,</p>
<p>At row 138 and row 157 i get some strange error that an object (?) is required?
I've been working on it all day and it still isn't working...</p>
<p>Help! Please!</p>
<p>Greetings!</p>
|
javascript jquery
|
[3, 5]
|
3,582,506 | 3,582,507 |
Sys.WebForms.PageRequestManagerServerErrorException 500
|
<p>While trying to run my application I'm getting this error.</p>
<blockquote>
<p>Sys.WebForms.PageRequestManagerServerErrorException:500</p>
</blockquote>
<p>How can i resolve this?</p>
<p>Any idea?</p>
<p>thank you</p>
|
c# asp.net
|
[0, 9]
|
4,751,890 | 4,751,891 |
Issue resetting form with JQuery
|
<p>I'm having an issue with a form that is built with Ajax. Basically it is one of those forms which populates as you drill down from a parent select. The problem is once you advance forward a page, and go back the first drop down has its option selected, but the others are not processed and therefore just say "Select a [thing] first". So I'm trying to reset the form when I move back a page.</p>
<p>I have in my document ready the following:</p>
<pre><code>$('form[name="Search"]')[0].reset();
</code></pre>
<p>This works fine in Firefox and Chrome, however IE9 I get the following message: </p>
<blockquote>
<p>Microsoft JScript runtime error: Unable to get value of the property 'reset': object is null or undefined</p>
</blockquote>
<p>Does anyone know of a workaround, or suggest a better way to approach this?</p>
<p>Thanks.</p>
|
javascript jquery
|
[3, 5]
|
379,014 | 379,015 |
Javascript or Jquery auto populate one input text based on another input value
|
<p>I am not good at JS or Jquery. I take the follow code for better explaining what I what. When a user input 400 or more to triglycerides, the LDL is autopopulated with 'N/A'. How do I implement JS or Jqeury to do that? thanks</p>
<pre><code><form>
<input name='triglycerides" value="" />
<input name='LDL' value="" />
</form>
</code></pre>
<p>My actual code is as follows:</p>
<pre><code>$('#ldl_override').keyup(function(){
var val = parseInt($(this).val());
if(val > 399)
$('#qIn726').val('N/A');
});
elseif($ldl_override && $questionID == 728)
{
$question .= "<input $maxLengthString id=\"ldl_override\" name=\"field[" . $questionID . "]\" type=\"text\" value=\"" . htmlspecialchars($answer) . "\" />\n";
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,965,415 | 1,965,416 |
How to show boolean values on android device?
|
<p>I am new to android programming. I want to show only true values of an array to android application. I have an input box, when you enter something into that and click on send. It goes to new page and shows the entered message, I want to show true values of boolean array into that page along with entered name. I am stuck and I am not able to find any solution.</p>
<pre><code>//enter code here
boolean arrBool[] = new boolean[4];
arrBool[0] = false;
arrBool[1] = true;
arrBool[2] = false;
arrBool[3] = true;
Intent i = new Intent(this, DisplayMessageActivity.class);
for (int t=0; t<arrBool.length; t++) {
if(arrBool[t]==true)
i.putExtra(EXTRA_MESSAGE, arrBool);
}
startActivity(i);
</code></pre>
|
java android
|
[1, 4]
|
634,194 | 634,195 |
Referencing javascript object within jquery event
|
<p>I've this code.</p>
<pre><code>var NotificationsBox={
HideNotificationBox:function()
{
document.getElementById("NotificationBox").style.visibility="hidden";
},
toggleNotificationBox:function()
{
$('#NotificationBox').toggle();
},
SetContainerClick_NotificationHide_Event:function()
{
$('#Container').click(this.HideNotificationBox);
},
SetNotificationBoxClick_NotificationToggleEvent:function()
{
$('#ShowNotification').click(function(){
$(this).html("0");
$(this).css("background-color","#000");
this.toggleNotificationBox(); /// <-- PROBLEM
});
}
};
NotifyBox=Object.create(NotificationsBox);
NotifyBox.HideNotificationBox();
NotifyBox.SetContainerClick_NotificationHide_Event();
NotifyBox.SetNotificationBoxClick_NotificationToggleEvent();
</code></pre>
<p>Now you can see what the problem is. Here <code>this</code> will reference to the <code>#ShowNotification</code> and I want to reference <code>NotificationBox</code> here so that I can call the function.</p>
|
javascript jquery
|
[3, 5]
|
1,289,711 | 1,289,712 |
jquery toggle() not working with variable
|
<p>I wan't to be able to "toggle" a div using jquery through a function but it gives me </p>
<p>"Uncaught TypeError: Cannot read property 'defaultView' of undefined"</p>
<p>in the chrome debugger. here is my code</p>
<pre><code>function hide(id){
$(id).toggle();
}
</code></pre>
<p>I have also tried</p>
<pre><code>if (document.getElementById(id).style.display=="none"){
document.getElementById(id).style.display="block";
}
else if (document.getElementById(id).style.display=="block"){
document.getElementById(id).style.display="none";
}
console.log(document.getElementById(id));
console.log(id);
return document.getElementById(id).style.display;
</code></pre>
<p>and I get an error that says </p>
<p>"Uncaught TypeError: Cannot read property 'style' of null"</p>
<p>More info:</p>
<p>I call <code>hide()</code> from the HTML, I input the HTML using js</p>
<p>here is the basic code</p>
<pre><code>function inputHtml(id){
var div = document.createElement("div");
div.innerHTML = '<div id="'+id+'"><div onclick="hide('+id+')">hide</div></div>';
main.appendChild(div);
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
290,084 | 290,085 |
Android 101 - How do i iniate a method within main activity from an onInit?
|
<p>I need to know code to fix my example below to initate a method within my activity.</p>
<p>code:</p>
<pre><code> public void onInit(int status) {
HowDoIStartThisMethodCorrectly?(); <-- cuz this dosen't start that method.
</code></pre>
<p>}</p>
<p>I need a method within my main activity to run when program starts, so i add to onCreate my onInit method, but not working.. =/ ??</p>
|
java android
|
[1, 4]
|
3,094,605 | 3,094,606 |
what is difference between multidimensional array in java and c++?
|
<pre><code>char a[][4] = {{'a','a','a'},
{'a','a','a'},
{'a','a','a'},
{'a','a','a'}};
</code></pre>
<p>In c++ you must initialize the last index of an array.</p>
<p>In java if you do this it will result in an error.</p>
<p><strong>Can someone explain me why??</strong><br><br></p>
<p>Also when I check the length of array like this in java.</p>
<pre><code>System.out.println(a[0].length);
</code></pre>
<p>the result is the length of the column in the array</p>
<p>lets says there is an '\0' at the end of array and when I check the length of array in c++ like this.</p>
<pre><code>cout << strlen(a[0])
</code></pre>
<p>I get the length of an entire array.</p>
<p><strong>Can I just get the lenght of the row or column in an array in c++ like in java?</strong></p>
<p>Is this becuase array in java is an object?</p>
|
java c++
|
[1, 6]
|
1,084,528 | 1,084,529 |
Selecting the last child
|
<p>I was wondering how I'd get an alert of a last child by clicking a link.</p>
<pre><code> <h3 id="comment:5" class="myclass">
</code></pre>
<p>This is how far I got:</p>
<pre><code>$('#lastcomment').click(function() {
alert('Handler for .click() called.');
});
</code></pre>
<p>My aim is to jump to the last comment by clicking the link. An alert would be fine for the first step I guess. So that I can see the last child of the comments.</p>
<p>Any help is much appreciated.</p>
|
javascript jquery
|
[3, 5]
|
5,358,964 | 5,358,965 |
Simple javascript document.write isn't working
|
<p><a href="http://www.jsfiddle.net/T6Jqx/13/" rel="nofollow">Here's the code in question</a></p>
<p>I'm trying to create a simple application - each of the three men has a <code>rel="x"</code> attribute attached them. I'm using <code>var regionId = $('img.selected-region').attr('rel');</code> to make the <code>rel</code> of the currently selected item the value of reginId.</p>
<p>I want to test this out by performing a simple <code>document.write(regionId)</code> command in a div under the pictures of the men. However, it's not working. Have I put the var regionId definition in the right place in the script window? </p>
<p>I'm completely new to javascript so the syntax is confusing to me - and help would be greatly appreciated.</p>
|
javascript jquery
|
[3, 5]
|
5,347,052 | 5,347,053 |
Javascript to untag spans without id
|
<p>Would it be possible to find and untag spans that do not have ids within a string? I have a text that has bunch of spans some of which have ids and others don't.</p>
<p>Input: </p>
<pre><code><span>Hi there!</span><span id="blabla">This is a test</span>
</code></pre>
<p>Output:</p>
<pre><code>Hi there!<span id="blabla">This is a test</span>
</code></pre>
<p>I prefer JavaScript functions but I wouldn't mind using jQuery if it makes things easier!</p>
|
javascript jquery
|
[3, 5]
|
1,075,573 | 1,075,574 |
changing text for an input field using php, mysql, and javascript
|
<p>Ok, i have some data that is being populated via a php query to a database. I am getting comments that a user enters. I am displaying the returned data in a variable as shown below. If a comment does not exist then it would display an "add comment" link. The comment is just displayed as text at first. If a comment exists then it would display the comment along with an "edit" comment" link.</p>
<p>This is the functionality i am looking to have: 1) when you click on "add comment" an input field would be displayed to the left of the "add comment" link and that link would then turn in to two links that read "save" and "cancel". I know how to do the save link but i would like to know how to make the "cancel" link revert the area back to just having the "add comment" link. 2) when you click on "edit comment" then i would like the same functionality with an input field and the "save" and "cancel" links; however, i would like the input field to be pre-populated with the comments text that is being pulled via the comments variable. I'm thinking maybe this can be done with some css display toggling none and block/inline. Not sure exactly though. Any help is greatly appreciated!</p>
<p>PHP Code:</p>
<pre><code>if(!$comments){
echo "<span style='font-size:12px;'>[<a href='#'>Add a Comment</a>]</span>";
}else{
echo "<span style='font-size:12px;'>NOTES: " . $comments . " [<a href='#'>Edit Comment</a>]</span>";
}
</code></pre>
<p>One final question: how should i handle if the comments have special characters or quotes? Actually i guess i'll need to worry about those before teh variable is created, correct? How do i do that? Thanks so much!</p>
<p>UPDATE: I appreciate the help on handling special characters, but i really need the first two questions answered more. Thanks for any more help anyone can provide me!</p>
|
php javascript jquery
|
[2, 3, 5]
|
6,026,986 | 6,026,987 |
Exclude specific errors from custom error redirect
|
<p>Is there a good way to exclude some errors from being redirected to the default custom error page?</p>
<p>I'm using aspnet membership provider and have just discovered that if for example a user tries to change their email address to one that is already in the system, rather than show the error message warning in the style of a validation error as was designed, since I turned on custom errors, it just redirects to the standard error page.</p>
<p>Do I need to specifically exclude error codes for this problem?</p>
<p>Here is the custom error section in the web config:</p>
<pre><code><customErrors mode="On" defaultRedirect="/Error/Error500" />
</code></pre>
<p>Thanks very much</p>
|
c# asp.net
|
[0, 9]
|
5,802,889 | 5,802,890 |
jquery overriding href
|
<p>I have a div (.questionsList) that contains a link. When the div is clicked, I have an element #slider that slides out. However, when the link inside the div is clicked, I want to follow that link. The problem is, when I click the link, the jquery slide effect is overriding the link href so the slider slides out and the link does nothing. How can I fix this?</p>
<p>This is the code I was using prior to recognizing the problem.</p>
<pre><code>$(".questionsList").toggle(function() {
$('#slider').animate({ left: '375' }, 500);
}, function() {
$('#slider').animate({ left: '0'}, 500);
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,577,022 | 1,577,023 |
detect character before the cursor after keyup in textarea
|
<p>I am trying to implement tagging just like what facebook does with @friendname. I have a textarea and I wanted to detect when a user typed in @. How do I do so using a keyup listener? Is it possible to get the entered text using keyup? Here's what I have now</p>
<pre><code>$("#recommendTextArea").keyup(function () {
var content = $(this).val(); //content Box Data
var go = content.match(start); //content Matching @
var name = content.match(word); //content Matching @friendname
console.log(content[content.length-1]);
//If @ available
if(go.length > 0)
{
//if @abc avalable
if(name.length > 0)
{
//do something here
}
}
});
</code></pre>
<p>Most importantly what I need is the index of the'@' that the user just entered.</p>
|
javascript jquery
|
[3, 5]
|
3,652,135 | 3,652,136 |
Why is the javascript object prototype referred to as `fn`?
|
<p>What's the etymology of such terminology? Where does it come from? What does it stand for?</p>
|
javascript jquery
|
[3, 5]
|
476,161 | 476,162 |
asp.net showing literal on condition
|
<p>I have a literal in my master page and in the code behind, sometimes I populate it with data and sometimes not. The literal is in a div so that I can access its value in javascript. The mark-up looks like this:</p>
<pre><code><div id="Literal1"><asp:literal .... ID="TheLiteral1" /></div>
</code></pre>
<p>How can I rewrite this so that if I don't populate the literal, I don't render the div that contains the literal.</p>
<p>Thanks.</p>
|
c# asp.net
|
[0, 9]
|
4,664,405 | 4,664,406 |
How to center a ImageView vertically in its parent?
|
<p>My layout design is a TextView with long text and a ImageView to the right of the TextView. I want to center the ImageView in its parent vertically, so I used android:layout_centerVertical="true", but it turned out that the ImageView was aligned to the bottom of its parent. If I don't use layout_centerVertical property, the ImageView will be aligned to the top of its parent. How can I solve this problem? Thanks.</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:background="#000000">
<ImageView android:id="@+id/t3" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:src="@drawable/arrow_right"
android:layout_alignParentRight="true" android:background="#ff0000"
android:layout_centerVertical="true" android:scaleType="centerInside" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="This a very very very very very very very very very very very very very very very very long sentence"
android:textColor="#231ACC" android:layout_toLeftOf="@id/t3" />
</RelativeLayout>
</code></pre>
|
java android
|
[1, 4]
|
4,023,350 | 4,023,351 |
Generate charts with Google chart API
|
<p>i'am trying to generate a chart like this one: <code>http://chartpart.com/</code> but i don't know how to do that exactly.Do i need to make the string that generates the chart manually or do i need to send the data to a google server and receive the string?(if so how do i send the data?)
PS:i would like to do all this in c# and send the resulting string via web service.</p>
|
c# android
|
[0, 4]
|
2,622,777 | 2,622,778 |
Run a .jar file with parameters from JavaScript
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1320476/execute-another-jar-in-a-java-program">Execute another jar in a java program</a> </p>
</blockquote>
<p>I have an executable jar file that accepts two parameters: an input file and an output file:</p>
<pre><code>java -jar inputFile.txt outputFile.txt
</code></pre>
<p>How can I call exactly this from JavaScript?</p>
|
java javascript
|
[1, 3]
|
3,902,769 | 3,902,770 |
Get screen size include the source code panel/ debug panel using jquery
|
<pre><code>$(window).height();
$(window).width();
</code></pre>
<p>Currently I am using these two codes to get the screen size,However, if the source code panel/debug panel is on. The size of the screen will exclude, how to include the source code bar in the screen size result? Thanks. </p>
<p>Also, is there anyway to get the actual screen resolution of the user screen? (in case the user is not maximize the browser). Thanks</p>
|
javascript jquery
|
[3, 5]
|
882,593 | 882,594 |
Strange behavior in JavaScript
|
<p>I have 2 elements - "span" (named "divLikedX") and "a" (named "aLikeX"). I have the following javascript (occurs clicking by "a"):</p>
<pre><code> function CommentLike(CommentID, aLink) {
if (CommentID != null && CommentID > 0)
$.post("/Home/LikeComment", { CommentID: CommentID },
function () {
//alert($("#divLiked" + CommentID).is(':visible'));
/*alert($(aLink).text());*/if ($("#divLiked" + CommentID).is(':hidden')) {
$("#divLiked" + CommentID).show();
$("#aLike" + CommentID).text('Unlike');
} else {
$("#divLiked" + CommentID).hide();
$("#aLike" + CommentID).text('Like');
}
});
};
</code></pre>
<p>If I remove <code>$("#aLike" + CommentID).text('Unlike');</code> and <code>$("#aLike" + CommentID).text('Like');</code> strings I get the correct behavior. But with these strings it works correctly only first 2 clicks, after it <code>alert($("#divLiked" + CommentID).is(':visible')) == "true"</code> always. Why?</p>
|
javascript jquery
|
[3, 5]
|
2,982,058 | 2,982,059 |
Unable to pass the array value in the Hyperlink
|
<p>Below is the code that I am using with Jquery to pass a value when a hyperlink is selected on sharepoint disp form.</p>
<pre><code>for(var i=0;i<retval.length;i++)
{
strHTML = strHTML + "<a href='url.aspx?ID= '+retval[i]+' &Source= url'>" + retval[i] + "</a>";
strHTML = strHTML + " ";
}
strHTML = strHTML + "</div>";
$("textarea[Title='Test']").closest("span").find("iframe[Title='Rich Text Editor']").contents().find("body").html(strHTML);
</code></pre>
<p>Its unable to read the value in retval[i], its breaking right at ID. Is the syntax wrong? </p>
|
javascript jquery asp.net
|
[3, 5, 9]
|
3,832,288 | 3,832,289 |
Problem with jQuery clone(): clone input without value
|
<p>I am using jquery <code>.clone()</code> and it is working fine. However my problem is that when I clone my input field it also clones the value of the previous field. I don't want to clone the value. How can I overcome this issue?</p>
<p>Here is my code</p>
<pre><code>function addrow(){
var num = $('.clonedInput').length;
var newNum = new Number(num + 1);
var newElem = $('#input' + num).clone().attr('id', 'input' + newNum);
$('#input' + num).after(newElem);
jQuery('.clonedInput').each(function(){
jQuery('#total', jQuery(this)).unbind('blur');
});
var ci = jQuery('.clonedInput:last');
jQuery('#total', ci).blur(function() {
addrow();
});
}
</code></pre>
<p>Regards,</p>
<p>Faizan</p>
|
javascript jquery
|
[3, 5]
|
1,963,567 | 1,963,568 |
How to change direction on y axis in JSChart
|
<p>I create a chart using [JSChart] Library JavaScript but I want to make <em>y</em> axis direction right to left</p>
|
javascript jquery
|
[3, 5]
|
5,237,155 | 5,237,156 |
Hide all elements with particular number in id
|
<p>need help, I try to cut complexity and make simple example:</p>
<pre><code><div id="tree_div">
<ul>
<li id="tree_li_401">401</li>
<li id="tree_li_101">101</li>
<li id="tree_li_301">301</li>
<li id="tree_li_201">201</li>
<li id="tree_li_102">102</li>
<li id="tree_li_402">402</li>
</ul>
</div>
</code></pre>
<p>I need to hide all li elements base on <strong>first number after tree_li_</strong></p>
<p>For example: I need to hide all elements which have number <strong>4</strong> after <strong>tree_li_</strong>:</p>
<pre><code><li id="tree_li_402">
<li id="tree_li_401">
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,741,631 | 5,741,632 |
getElementById issue
|
<p>I have got this button:</p>
<pre><code><input type="button" value="Rep"
id="rep" name="rep" class="rep" style="width:50px"
onclick="triggerLabel(1);this.disabled=true;addRep(<?php echo $comment_id; ?>);"/>
<script type="text/javascript">
function triggerLabel($commentID)
{
var $theID="#"+$commentID;
var $label=document.getElementById($theID).value;
alert($label);
}
</script>
</code></pre>
<p>The alert isn't triggered. I want to obtain the commentID and convert it to a string.. And I want that string to represent my element ID. The alert works, it retrieves #25. That's the id that I gave one of my labels..</p>
<pre><code>echo '<label id="'.$comment_id.'">'.$avatarRep.'</label>';
</code></pre>
<p>It should retrieve that label, but unfortunately it fails..I get this:</p>
<blockquote>
<p>Error: document.getElementById($theID) is null
Source File: <a href="http://localhost/PoliticalForum/Thread/thread.php?threadID=15&page=1" rel="nofollow">http://localhost/PoliticalForum/Thread/thread.php?threadID=15&page=1</a>
Line: 246</p>
</blockquote>
<p>What do I do?</p>
<p>That's how the label html control looks like when I view the source page:</p>
<pre><code><label id="25">6</label>
</code></pre>
<p>UPDATE:
I updated my answer. Take a look:</p>
<pre><code>var $label=document.getElementById($commentID);
$label.value=9999;
</code></pre>
<p>The 9999 isnt inserted into the table..why?!?</p>
<p>UPDATE 2:
This doesnt work:</p>
<pre><code>document.getElementById($commentID).value="88888";
</code></pre>
<p>The label isnt changed.</p>
|
javascript jquery
|
[3, 5]
|
4,549,317 | 4,549,318 |
jQuery preventDefault Not Behaving
|
<p>I have a simple search function that is misbehaving. The search box is inside of a form that we do not want to submit when searching, so I have the setup below.</p>
<pre><code>$(function() {
jQuery.fn.onEnter = function(callback) {
this.keyup(function(e) {
if(e.keyCode == 13) {
e.preventDefault();
//e.stopPropagation();
if (typeof callback == 'function')
callback.apply(this);
}
});
return this;
}
$('#txtSearch').onEnter(function() {
search();
return false;
});
$('#search_btn').click(function() {
search();
return false;
});
function search() {
alert('searching');
}
});
</code></pre>
<p>The e.preventDefault() line isn't working, so the search function fires as well as the form submits. I've tried it with both <code>e.preventDefault()</code> and <code>e.stopPropagation()</code> with no luck.</p>
|
javascript jquery
|
[3, 5]
|
1,963,439 | 1,963,440 |
How to get the Win32_battery class information of the battery connected to computer through RS 232 Interface?
|
<p>I need to get the battery information (Win32_battery class) (using WMI) of the battery connected to the PC through RS 232 Interface(C#.NET app). Can any one help me to get this information?</p>
|
c# c++
|
[0, 6]
|
1,460,960 | 1,460,961 |
Need help to do math with PHP and JavaScript
|
<p>I have the following JQuery/Javascript</p>
<pre><code><script>
var Quantity;
$("select").change(function() {
var str = "";
var price = <?php echo $row[price];?>;
$("select option:selected").each(function() {
str += $(this).text() + " ";
});
$(".plan_price").text("price : " + parseInt(str) * price + " baht");
Quantity = parseInt(str);
}).change();
</script>
</code></pre>
<p>and this for php/sql</p>
<pre><code>if ($row[item_amount] - 1 == 0) {
$sql = "update item set active='2',item_amount=item_amount-1,buy_time=NOW() where id='$id'";
} else {
$sql = "update item set item_amount=item_amount-1,buy_time=NOW() where id='$id'";
}
</code></pre>
<p>I want to know if there is any way for me to subtract/add the value of the javascript variable Quantity to/from the $row[item_amount] in php as I need the Quantity to be subtracted from the database.</p>
<p>Thanks in advanced </p>
<p>Tony</p>
|
php javascript jquery
|
[2, 3, 5]
|
1,713,447 | 1,713,448 |
Change visibility of ASP.NET label with JavaScript
|
<p>I have a ASP.NET page with an asp:button that is not visible. I can't turn it visible with JavaScript because it is not rendered to the page.</p>
<p>What can I do to resolve this?</p>
|
asp.net javascript
|
[9, 3]
|
1,098,122 | 1,098,123 |
How to stop toggle event from being fired multiple times on mouseenter/mouseleave?
|
<p>I'm using jQuery to toggle the visibility of a <code><div></code> using the jQuery toggle method. The toggle is fired on the mouseenter and mouseleave event, thus creating the effect of the div to fold out on mouseenter and fold in on mouseleave. Problem is, if the user drags the mouse over the <code><div></code> a few times and then leaves the <code><div></code>, the div will toggle in and out several times. This can happen if the user accidentally moves around the mouse pointer in the <code><div></code> are. Do anyone have any idea on how I can avoid this behavior?</p>
<p>Thanx!</p>
|
javascript jquery
|
[3, 5]
|
4,869,624 | 4,869,625 |
Number Separator in repeater
|
<p>I have this line in a repeater in my ASP.NET web page:</p>
<pre><code><%# Eval(123456) %>
</code></pre>
<p>I want to shown my number (123456) with separator (like this: 123,456)</p>
<p>what I must to do ?</p>
<p>I know something about string format. and I use some string format like "{N3}" and "{#,000)"
. but it doesn't help me.</p>
|
c# asp.net
|
[0, 9]
|
4,261,068 | 4,261,069 |
Change the Grid View Pages on button click in C# Asp.net
|
<p>I have a problem that I want to change the Grid View page on button click. Means Grid View paging concept on button click in C#. I have to click on a button having a particular number text, then this will shows the particular page of gridview corresponding to the Button clicked.</p>
<p>Thanks in advance.</p>
|
c# asp.net
|
[0, 9]
|
5,503,270 | 5,503,271 |
Working with percents in Jquery
|
<p>I'm building a site with a fluid layout, and therefore need to use percentages in my Jquery sizes and animations. The problem, as I've discovered, is that Jquery doesn't understand percentages. Here's an example of what I'm after:</p>
<p>The page <code><body></code> is 100% wide.</p>
<p><code><article></code> is the width of 71% of the page body.</p>
<p><code><hgroup></code> is the width of 33.2% of <code><article></code></p>
<p>I would like <code><article></code> to be the same width as <code><hgroup></code> on page load (so that only <code><hgroup></code> is showing), then expand to 71% of the page width again when <code><hgroup></code> is clicked, allowing the rest of the content within <code><article></code> to show. At the same time, I'd like <code><article></code> to slide left by the width of <code><hgroup></code>, hiding <code><hgroup></code>.</p>
<p>Is there any way to make this kind of calculation, or will I have to resort to pixels?</p>
|
javascript jquery
|
[3, 5]
|
5,556,204 | 5,556,205 |
Loan Pattern / Automatic Resource Management in Java
|
<p>I have tried to implement automatic resource management for Java (something like C#'s <code>using</code>). Following is the code I have come up with:</p>
<pre><code>import java.lang.reflect.*;
import java.io.*;
interface ResourceUser<T> {
void use(T resource);
}
class LoanPattern {
public static <T> void using(T resource, ResourceUser<T> user) {
Method closeMethod = null;
try {
closeMethod = resource.getClass().getMethod("close");
user.use(resource);
}
catch(Exception x) {
x.printStackTrace();
}
finally {
try {
closeMethod.invoke(resource);
}
catch(Exception x) {
x.printStackTrace();
}
}
}
public static void main(String[] args) {
using(new PrintWriter(System.out,true), new ResourceUser<PrintWriter>() {
public void use(PrintWriter writer) {
writer.println("Hello");
}
});
}
}
</code></pre>
<p>Please analyze the above code and let me know of any possible flaws and also suggest how I can improve this. Thank you.</p>
<p>(Sorry for my poor English. I am not a native English speaker.)</p>
|
c# java
|
[0, 1]
|
3,107,614 | 3,107,615 |
How to get the first name of each list?
|
<p>Sorry if the title isn't clear enough, I have five <code><li>'s</code> in each <code><li></code> I have <code><a></code> and a <code><div></code> and in each <code><div></code> I have a <code><ul></code>with a class of "config". Then in that I have two <code><li></code>.</p>
<p>I use jQuery to hide the <code><ul></code> with the class of config and then use slideToggle to show/hide them. The problem is, It shows all of them. I want to just click one link and the appropriate <code><div></code> or <code><ul></code> should appear, not all of them. How can I do this? </p>
<p>So far I have:</p>
<pre><code>$(document).ready(function(){
$("ul.config").hide();
$("li:nth-child(1) a").click(function(){
$("li ul.config:first").slideToggle(300);
});
});
</code></pre>
<p>But that only shows the very first list. How can I show each one when it's clicked?</p>
|
javascript jquery
|
[3, 5]
|
3,807,009 | 3,807,010 |
UPDATED: trying to store an array in php then call a javascript function
|
<p>I'm trying to store results in an array from mysql using php, then using the results to call a javascript funtion to use the results there. I'm not sure why my map isn't showing up (trying to implement google maps into my page)</p>
<p>My php/html/javascript call</p>
<pre><code> <?php
.....
<div id="content"
......
$address=array();
//will list out where to go
while ($sec = mysql_fetch_array($result2)) {
$address[$x++] = ($sec[5] . " " . $sec[7]);
}
print_r($latlng);
print_r($address);
mysql_close($link);
?>
<div id="address_container">
<?php
print array_shift($address);
?>
</div>
</div>
</code></pre>
<p>My Javascript code:</p>
<pre><code> <script type="text/javascript">
var geocoder;
var map;
function initialize() {
geocoder = new google.maps.Geocoder();
var latlng = new google.maps.LatLng(-34.397, 150.644);
var myOptions = {
zoom: 8,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
map = new google.maps.Map(document.getElementById("map_canvas"), myOp$
}
function codeAddress() {
var address = document.getElementByID("address_container").innerHTML;
console.log(address);
geocoder.geocode( { 'address': address}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
map.setCenter(results[0].geometry.location);
var marker = new google.maps.Marker({
map: map,
position: results[0].geometry.location
});
} else {
alert("Geocode was not successful for the following reason: " + s$
}
});
}
</code></pre>
|
php javascript
|
[2, 3]
|
3,149,658 | 3,149,659 |
Send nullable int from Android to C# web service
|
<p>I want to call a JSON C# web service that receives the following parameters:</p>
<pre><code>getMensajesByParameters(int param1, int param2, int? param3)
</code></pre>
<p>Notice that the third parameter is defined as a <code>int?</code>? That means that is a "nullable int".</p>
<p>By the other side I am writing an Android application to call the service.
I am sending the parameters like the one described above.</p>
<pre><code>HttpPost postRequest = new HttpPost(PreferenceManager.getDefaultSharedPreferences(actividad.getBaseContext()).getString(actividad.getString(R.string.server_address_key),"") + "getMensajesByParameters");
List<NameValuePair> pairs = new ArrayList<NameValuePair>();
pairs.add(new BasicNameValuePair("param1", String.valueOf(param1)));
pairs.add(new BasicNameValuePair("param2", String.valueOf(param2)));
pairs.add(new BasicNameValuePair("param3", null));
postRequest.setEntity(new UrlEncodedFormEntity(pairs,"UTF-8"));
HttpResponse getResponse = client.execute(postRequest);
final int statusCode = getResponse.getStatusLine().getStatusCode();
</code></pre>
<p>Seems like I am doing something wrong by sending null to the nullable parameter like that, because I am getting status code 500.</p>
<p>I would appreciate any help.</p>
|
c# java android
|
[0, 1, 4]
|
5,524,020 | 5,524,021 |
Android: How can I get ip address from an android app?
|
<p>Is it possible to get the ip address from android app?</p>
|
java android
|
[1, 4]
|
2,610,111 | 2,610,112 |
How do you dynamically assign a Master Page?
|
<p>Is it possible to assign a Master Page dynamically?</p>
|
c# asp.net
|
[0, 9]
|
669,623 | 669,624 |
Dynamic Product Comparison Page
|
<p>I'm working on creating a product comparison page for a website and am looking for a direction to take. Essentially what will happen is a the page will receive 2-4 product IDs in the query string (delimited in some way) and then build the comparison page.</p>
<p>Now this would be easy if I just needed to databind down the page with each product being a horizontal line item. However I need to make them vertical line items so they can be compared side by side. I also need this to be a single page that does it dynamically rather than 3 separate pages that I redirect to and manually set everything in.</p>
<p>Is there an easy way to do something like this? Like is there a way I can rotate a listview or something in order to get it to display a single row vertically rather than horizontally?</p>
<p>Or should I rotate my data so that I can still bind normally but lose readability?</p>
<p>Any direction would be greatly appreciated!</p>
|
c# asp.net
|
[0, 9]
|
2,359,089 | 2,359,090 |
calling object method in jquery each loop - scope issue?
|
<pre><code>My.Awesome.Obj = function() {
return {
// PUBLIC PROPERTIES
legendObj: null,
// PUBLIC METHODS
init: function() {
this.assignLegendClick();
},
assignLegendClick: function() {
console.log('*** drawLegend()');
var checkboxes = this.legendObj.find("input");
checkboxes.each(function() {
$(this).click(function() {
this.handleLegendClick();
});
})
},
handleLegendClick: function() {
console.log('*** handleLegendClick()');
},
EOF: null
};
}();
</code></pre>
<p>So I'm getting an error saying </p>
<blockquote>
<p>handleLegendClick is not defined</p>
</blockquote>
<p>I'm assuming this is a scope issue, but I'm not sure how to refer back to the parent object within the loop...</p>
|
javascript jquery
|
[3, 5]
|
4,454,075 | 4,454,076 |
Android Custom Listview
|
<p>I went through tutorials and searched, but still I can't understand how the,</p>
<pre><code>getView(int position, View convertView, ViewGroup arg2)
</code></pre>
<p>method works when extends <code>BaseAdapter</code> to create a custom listView in my android application. Therefore I cant Edit the Custom list view exactly I want.</p>
<p>I need to know when this method invokes and the meanings of the parameters.</p>
<p>If someone can explain the following method its great. Thanks</p>
<pre><code>@Override
public View getView(int position, View convertView, ViewGroup arg2)
{
ViewHolder holder;
LayoutInflater inflater = context.getLayoutInflater();
if (convertView == null)
{
convertView = inflater.inflate(R.layout.listitem_row, null);
holder = new ViewHolder();
holder.txtViewTitle = (TextView) convertView.findViewById(R.id.textView1);
holder.txtViewDescription = (TextView) convertView.findViewById(R.id.textView2);
convertView.setTag(holder);
}
else
{
holder = (ViewHolder) convertView.getTag();
}
holder.txtViewTitle.setText(title[position]);
holder.txtViewDescription.setText(description[position]);
return convertView;
}
</code></pre>
|
java android
|
[1, 4]
|
4,921,216 | 4,921,217 |
masterpage page_load return
|
<p>I've a master page and A.ascx, B.ascx. These user controls embedded in master page.</p>
<p>master.page cs</p>
<pre><code> protected void Page_Load(object sender, EventArgs e)
{
if(exitMode){
//return
}
}
</code></pre>
<p>If I coded like this, The code debug mustn't enter A and B's page_load, only must go masterpage page_load. Is there a structure like this?</p>
|
c# asp.net
|
[0, 9]
|
1,297,278 | 1,297,279 |
Method in C# returning value
|
<p>I want to write a generic method in C# in asp.net application where i need to pass the sql server stored procedure name as the parameter. It will be a generic function and will take any stored procedure name as a parameter and execute it.Please help me</p>
|
c# asp.net
|
[0, 9]
|
1,252,796 | 1,252,797 |
Clearing all fields in an asp.net form
|
<p>I have an <code>asp.net</code> <code>form</code>. In this <code>form</code>I want to clear all the data what I entered in <code>textbox</code>,<code>dropdownlist</code> etc. So how can I do without going to each textbox and set the value.</p>
<p>like <code>TextBox1.Text="";</code> etc. How can i clear all values of a form ?</p>
|
c# asp.net
|
[0, 9]
|
2,807,546 | 2,807,547 |
primitive vs managed types on android - which one should i use in my app
|
<p>im trying to port an iphone app to android. i am completely new to java and android environment</p>
<p>i see different code samples on the internet, some use int and boolean where as some use Integer and Boolean</p>
<p>i wanted to know the pros and cons of both and which is the best way forward?</p>
<p>since primitive types are saved on the stack and no garbage collection happens on them, are they definitely a better choice as far as performance goes?</p>
<p>what is the real benefit of primitive v/s managed types? and what is the suggested approach?</p>
<p>in my app performance is crucial...</p>
<p>thanks in advance</p>
|
java android
|
[1, 4]
|
4,788,003 | 4,788,004 |
how to modify the value of src attribute of <img> tag using jquery or javascript
|
<p>I am parsing a html string fragment and changing the src attribute of image tags. (i.e. replacing paths that start with ".."</p>
<pre><code>var hstr = $.parseHTML(str);
$(hstr).find('img').each(function(e){
var srcvalue = $(this).attr('src');
srcvalue = srcvalue.replace(/../gi, "");
$(this).attr('src', srcvalue);
});
</code></pre>
<p>then setting the contents of a div element by appending the result</p>
<pre><code>document.getElementById('#section').append($(hstr));
</code></pre>
<p>but it is not working... can anyone tell me what is going wrong ?</p>
|
javascript jquery
|
[3, 5]
|
5,486,767 | 5,486,768 |
Find and replace in div table using jQuery?
|
<p>I have a text "First Name (Given Name, Forename):" that needs to replaced with "Something" using jquery. Please see below text.</p>
<pre><code> <div id="ctl00_m_g_23e3c2e9_71b9_464f_9ad3_46a603eb384f_ctl00_PanelSearch"
sizcache="3" sizset="0">
<table width="100%" sizcache="2" sizset="0">
<tbody sizcache="1" sizset="0">
<tr sizcache="0" sizset="0">
<td style="width: 40%;">
First Name (Given Name, Forename): //replace with "Something"
</td>
</tr>
</tbody>
</div>
</code></pre>
<p>How to do this?</p>
|
javascript jquery
|
[3, 5]
|
4,828,422 | 4,828,423 |
Keeping timestamps accurate in chat system - using timeago jQuery plugin
|
<p>I'm creating a web-based chat/messaging system. Since the chats can be saved, each message of a chat and the time in which each message was sent are stored on the server in a mysql database. Timestamps are stored in mysql DATETIME format in UTC time and the timestamps are generated on the server.</p>
<p>As messages and their accompanying timestamps are retrieved from the server, I'm using the <a href="http://timeago.yarp.com/" rel="nofollow">jQuery timeago plugin</a> and formatting the timestamps to display in the form "1 minute ago", "3 days ago", and so on.</p>
<p>The problem with this is that the "timeago" time is calculated relative to the time of the user's machine. For example, say you receive a message that was actually sent only 2 seconds ago. If your machine's time is three minutes fast relative to the server's time, then the time for this message displays as "3 minutes ago".</p>
<p>Any ideas for strategies that will always present the accurate time to the user?</p>
|
php javascript jquery
|
[2, 3, 5]
|
4,313,546 | 4,313,547 |
all validators executed when page is loaded
|
<p>Can i run all validators when page is loaded. I need to show * in all input text fields that are necessary. I have require field validators for that fields, can i run it by default when page is loaded?</p>
|
c# asp.net
|
[0, 9]
|
634,248 | 634,249 |
Finding tables assinging ID's Shrinking to fit parent div And making bigger
|
<p>Hi this is a follow on question from a previous post. <a href="http://stackoverflow.com/questions/10503276/reducing-font-size-in-table-so-the-table-fits-inside-a-div">here</a></p>
<p>I have html pages generated from a database some of which may contain multiple tables, these tables may not fit there parent div so what i need to do is the following</p>
<ol>
<li>find all tables in the page</li>
<li>assign an id to the table if it doesn't exist</li>
<li>shrink the text within the table so it fits with the parent div</li>
<li>wrap the table in it's own unique div</li>
<li>add a button so on click the table is shown in a fancybox hence 4</li>
</ol>
<p>I've managed to do 1, 3 & 5 manually but number 2 is proving an issue it seems that Tid is not being assigned and therefor in the function ShrinkTable Tid is unknown so firebug says TabWidth is Nan Not a Number at this line.</p>
<pre><code> var TabWidth = parseInt($("#" + Tid).width(), 10);
</code></pre>
<p>I've create a <a href="http://jsfiddle.net/HolyG6/wG5hF/" rel="nofollow">jsfiddle</a></p>
<p>can somebody look at the fiddle & tell why Tid is not being assigned to the table And how to do 4 so on clicking the button only the table appears in the Fancybox?</p>
<p>Thanx Holly</p>
|
javascript jquery
|
[3, 5]
|
4,917,709 | 4,917,710 |
DateTime JavaScript vs C#
|
<p>Regardless of many posts I've read the magic still in my code.
I have DateTime value in db ('2011-03-30 00:00:00.000') that I process for asp.net/mvc page where some javascript needs to read it and compare. The magic in the following:</p>
<pre><code><%
DateTime unixTimeOffset = new DateTime(1970, 1, 1, 0, 0, 0, 0);
DateTime testDate = new DateTime(2011,03,30,0,0,0,0);
%>
<%= (testDate - unixTimeOffset).TotalMilliseconds %>
...
</code></pre>
<p>Last string of the code gives me this value: 1301443200000
When I try to read it in JavaScript I have: </p>
<pre><code>val myDate = new Date(1301443200000);
</code></pre>
<p>And myDate is Tue Mar 29 2011 20:00:00 GMT-0400 (Eastern Daylight Time) {} But not a March 30th as it should be.</p>
<p>I understand it provides date referencing to local time, GMT-4 but what is the solution to get it independent?
Any ideas? Thanks. </p>
|
c# javascript
|
[0, 3]
|
601,500 | 601,501 |
How do I check on whether my synchronized methods are blocking (Android + Java)
|
<p>I have a feeling that my synchorization may be a little coarse (juddering UI) and was wondering how do I find out when/if my synchronized java methods are blocking on each other. My current project is on Android but I am interested in the more general Java case as well.</p>
<p>Thanks, </p>
|
java android
|
[1, 4]
|
1,441,318 | 1,441,319 |
Pull data from a jQuery input box
|
<p>I have found a lovely bit of jQuery for a pop out calender. However I want to use the date(s) the user selects in a Stored Procedure. To keep this example simple how do I pull/push this date to say label? </p>
<p>I have tried putting the label into the function but without joy. </p>
<p>The date shows in <code><input type="text" id="datepickerStart" /></code></p>
<p>but not... </p>
<pre><code> <asp:Label ID="lbltest" runat="server" type="text" />
</code></pre>
<hr>
<pre><code> <meta charset="utf-8" />
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
<script>
$(function () {
$("#datepickerStart").datepicker({
showOn: "button",
buttonImage: "images/calendar.gif",
buttonImageOnly: true
});
$("#datepickerEnd").datepicker({
showOn: "button",
buttonImage: "images/calendar.gif",
buttonImageOnly: true
});
});
</script>
</code></pre>
|
jquery asp.net
|
[5, 9]
|
2,738,428 | 2,738,429 |
How to add action to the disabled elements via JQuery?
|
<p>Purpose:
To make sure some elements couldn't be modified, I disabled some elements once the page was loaded. But if I double clicked the element, the element could be modifiable.</p>
<p>Please see the below code.</p>
<p>My version is jquery-1.5.min.js</p>
<pre><code>function disableAccounts($column){
$column.find('.input_application').attr("disabled","true");
}
</code></pre>
<p>// this doesn't work since '.input_username' has been disabled.</p>
<pre><code>function addEditUsername($column){
$column.find('.input_username').dblclick(function(){
$(this).removeAttr('disabled');
});
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
252,261 | 252,262 |
Javascript PHP pop up an image when click on search, upon closing the image show results
|
<p>When I click on search the image pop up, But the values of the form did not get pass to the php script.</p>
<p><strong>Click on search run this code-></strong></p>
<pre><code><?php
$loan_amt = $_POST['loan_amt'];
if($_POST['search']){
if($_POST['loan_amt']=="" || $_POST['loan_tenure']==""){
$error = "Please fill up the mandatory fields";
}else{
session_start();
$_SESSION['property_type'] = $_POST['property_type'];
$_SESSION['property_status'] = $_POST['property_status'];
$_SESSION['loan_amt'] = $_POST['loan_amt'];
$_SESSION['loan_tenure'] = $_POST['loan_tenure'];
header("location:rates_results.php");
}
}
?>
</code></pre>
<p><strong>Form (Loan Amount Field)</strong></p>
<pre><code><form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" onsubmit="this.loan_amt.value=this.loan_amt.value.replace(/\,/g,'')">
<table width="400px">
<tr>
<td class="color1" width="130">Loan Amt (SGD)*:</td>
<td width="258" align="left">
<input type="text" style="width:150px;font-size:16px" onkeyup="format(this)" onchange="format(this)"
onblur="if(this.value.indexOf('.')==-1)this.value=this.value" name="loan_amt">
</td>
</tr>
</table>
</form>
</code></pre>
<p><strong>Search/Submit Button</strong></p>
<pre><code><div id="examples">
<span id="images">
<a href="images/9features.png" toptions="effect = clip, layout = quicklook">
<input type="submit" class="buttonStyle" name="search" value="search" />
</a>
</span>
</div>
</code></pre>
|
java php javascript
|
[1, 2, 3]
|
5,601,774 | 5,601,775 |
Script integration in Java application
|
<p>I have a java application(runnable jar) and VB scripts which I'm using to telnet to a remote machine and executing some cmds. So, I first execute the vbs files and then run my jar(in all everything is working fine).</p>
<p>But, now I want to integrate scripts and my java jar such that, running the jar should first trigger the script followed by Java related task.</p>
<p>Few thing which I've come across are - </p>
<p>I cannot trigger Vbs from Java(javax.script - correct me if I'm wrong). So, possible options to rewite the script in are -
Javascript(have no idea what my Javascript file would have so that after reading it inside java class I can write it to the Socket output stream.)</p>
<p>PHP(I tried this using Java bridge but it gives some error saying cgi needs to installed. And, I believe it also requires PHP to be installed on the host machine before executing my jar. So I'm not going any futher with this approach.)</p>
<p>Long story short, I don't want to create any dependencies - I am looking for something like where I can package any external lib with my jar(if required) and use it to execute my scripts.</p>
|
java javascript
|
[1, 3]
|
4,689,491 | 4,689,492 |
Filter rows based on some function
|
<p>I got the following table:</p>
<pre><code><table>
<tr class="applyFilterOnThis">
<td></td>
<td><span class="timeAdded">15.03.2011 05:42</span></td>
</tr>
<tr class="applyFilterOnThis">
<td></td>
<td><span class="timeAdded">15.03.2011 08:42</span></td>
</tr>
<tr class="applyFilterOnThis">
<td></td>
<td><span class="timeAdded">15.03.2011 15:42</span></td>
</tr>
</table>
</code></pre>
<p>Now I want to add a class to every row that has a timeadded that is more than, say 6 hours from the client time. (If time is now 15.03.2011 17:00, only the last row gets the class added.</p>
<p>This is what I was looking for (don't know about the 'Filter' function):</p>
<pre><code> $('.applyFilterOnThis').Filter(someFunction()).addClass('markAsFiltered');
</code></pre>
<p>(I know the actual parsing of the date is a separate issue, so I'd be happy if someone just give a hint on how to use the filter function)</p>
<p>Thanks for any help</p>
<p>Larsi</p>
|
javascript jquery
|
[3, 5]
|
2,384,471 | 2,384,472 |
Selecting first # of elements with jQuery
|
<p>I have the following HTML:</p>
<pre><code><input id="1" type="checkbox"/>
<label for="1">bla bla</label>
<br/>
<input id="2" type="checkbox"/>
<label for="2">hello hello</label>
<br/>
.
.
.
etc...
</code></pre>
<p>Is there a way to select first few inputs here in one call? In other words, I don't want to select them all and loop through each one. Just 1 statement to select, for example, first 3.
Thanks!</p>
|
javascript jquery
|
[3, 5]
|
3,386,676 | 3,386,677 |
Declaring variables jQuery and JS
|
<p>It may be a silly question but I haven't been able to find any documentations on this on the internet.</p>
<p>When declaring variables to use within Javascript i normally use <code>var x = 0</code> but I've seen in jQuery tutorials that they use <code>$x = 0</code>. What is the difference of those two ?</p>
<p>Also, would i call those two variables the same way or do i need to use the $ mark before ?
So for example : <code>for(i=0; i < x; i++)</code> or <code>for(i=0; i < $x; i++)</code></p>
|
javascript jquery
|
[3, 5]
|
3,863,448 | 3,863,449 |
Trigger jquery function on blur unless specific elements are clicked
|
<p>I have a login form. When the inputs get focused the "forgotten password" and "remember me" elements get shown by adding a css class, when they blur, the elements are hidden again by removing the class "sho". I would like the elements to keep the class "<code>show</code>"if I click either one of them or the login link</p>
<pre><code>$(document).ready(function() {
$('.login *').focus(showlogin);
$('.login *').blur(hidelogin);
});
function showlogin(){
$('.login .hidden').addClass("show");
}
function hidelogin(){
$('.login .hidden').removeClass("show");
}
</code></pre>
<p>Html:</p>
<pre><code><form class="login">
<input type="text"/>
<input type="password"/>
<a class="loginbutton" href="#">Log in</a>
<br />
<a class="hidden" href="#">Forgotten password</a>
<label class="hidden"><input type="checkbox" /> Remember me</label>
</form>
</code></pre>
|
javascript jquery
|
[3, 5]
|
442,887 | 442,888 |
Find value in array jQuery
|
<p>So I need to get the part of the array that is holding a specific id, so that I can use the other variables within it.</p>
<p>Here is my current code to create the array:</p>
<pre><code><?php foreach ($list_subjects as $subject): ?>
subjects.push({
id: parseInt(<?php echo $subject['subject_id']; ?>),
subject_name: "<?php echo $subject['subject_name']; ?>",
course_type: "<?php echo $subject['course_type']; ?>",
num_videos: parseInt(<?php echo $subject['num_videos']; ?>),
subject_tag: "<?php echo $subject['subject_tags']; ?>"
});
<?php endforeach; ?>
</code></pre>
<p>(I know mixing PHP in this fashion isn't good practise, but bear with me for this question)</p>
<p>This is the code I'm using to at least try and check if the value is in the array, but it is returning -1 every time, and the value of course_id IS in the array.</p>
<blockquote>
<p>alert($.inArray(course_id, subjects.id));</p>
</blockquote>
<p>Why is this happening?</p>
|
javascript jquery
|
[3, 5]
|
5,395,067 | 5,395,068 |
making div/htmlgeneric control visible using asp.net
|
<p>I have a user control with a div like this:</p>
<pre><code> <div runat="server" id="pnlShippingMethods" class="checkoutstep">
<div class="steptitle">
<%=GetLocaleResourceString("CheckoutOnePage.ShippingMethods.Title")%>
<div style="float: right;">
</div>
Date from checkout page one for ship method update panel is <%= DateTime.Now.ToString() %>
</div>
<asp:Panel runat="server" ID="pnlShippingMethodsContent" class="stepcontent">
<nopCommerce:CheckoutShippingMethod ID="ctrlCheckoutShippingMethod" runat="server"
OnePageCheckout="true" />
</asp:Panel>
</div>
</code></pre>
<p>I am making in visible = false on page load where this control is placed. Then from another control on the same page I am trying to make it visible like this:</p>
<pre><code>HtmlGenericControl pnlShippingMethods = this.Parent.Parent.Parent.Parent.Parent.FindControl("pnlShippingMethods") as HtmlGenericControl;
pnlShippingMethods.Visible = true;
</code></pre>
<p>I am able to make visible/invisible user control CheckoutShippingMethod from other user control but not the div. Please suggest how to make it visible</p>
|
c# asp.net
|
[0, 9]
|
5,785,637 | 5,785,638 |
getting some problem with gridview paging
|
<p>I have two pages.</p>
<p>In one page I have placed a <code>GridView</code>. In the grid I am using two hyperlinks for select and edit. When I click for the edit page I am redirected to another page. When I have finished editing the record it goes back to the first page.</p>
<p>The problem is when I was on the 2nd or 3rd page of the <code>GridView</code> and then edited, it went back to first page, not the 2nd or 3rd page I was on. </p>
<p>I want the same page after I go back to the page I left. How can I go about this?</p>
|
c# asp.net
|
[0, 9]
|
5,196,608 | 5,196,609 |
Replacing only part of an iframe src
|
<p>I need to use javascript to change part of an iframe src, is there a way to change '500' to '800' in that iframe src? I tried the following code but it did not work. If anyone could help that'd be appreciated.</p>
<pre><code> function bigPhotosets() {
$('iframe.photoset').each(function(){
$(this).attr('src').replace('500','800');
$(this).attr('width').replace('500','800');
});
}
bigPhotosets();
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,822,473 | 5,822,474 |
How to replicate the "popup" messages seen in SE sites?
|
<p>StackOverflow and other sites in the SE Network have nifty things that pop up with messages, for example, when you click on an upvote link while not logged in. I'm not sure what this sort of thing is called, though.</p>
<p>I'm assuming that this is done with CSS somewhere, but looking at the source of the pages with a view to reverse engineering it, it doesn't seem like the buttons are actually links.</p>
<p>Using C# and ASP.NET, how could I emulate this sort of functionality?</p>
|
c# asp.net
|
[0, 9]
|
2,564,925 | 2,564,926 |
How to check whether Java plugins are installed or not in a browser using Code .?
|
<p>How to check whether Java plugins are installed or not in a browser using java or javascript or JSP Code .?</p>
|
java javascript
|
[1, 3]
|
5,210,074 | 5,210,075 |
Passing $(this) selector into nested functions
|
<p>So I have a script in place that needs to go through each <code>P</code> tag within a parent <code>DIV</code> with the class name of <code>entry-content</code> and translate each one using the google translate API.</p>
<p>So when a user clicks a link to translate the page from english to spanish this function is run:</p>
<pre><code>function spanish() {
$(".entry-content p").each(function(){
var text = $(this).html();
google.language.detect(text, function(result) {
google.language.translate(text, "en", "es", function(result) {
if (result.translation) {
alert($(this).html()); //outputs NULL
$(this).html(result.translation); //doesn't work
}
});
});
});
}
</code></pre>
<p>The problem is when iIget to the inner function <code>$(this).html()</code> comesback NULL and I am not able to change the current elements html in order to change it to the new translated text.</p>
<p>So I guess my question is:
How would I pass the current selected element into the nested functions?</p>
<p>Thanks</p>
|
javascript jquery
|
[3, 5]
|
1,369,825 | 1,369,826 |
Executing JavaScript with Python without X
|
<p>I want to parse a html-page that unfortunately requires JavaScript to show any content. In order to do so I use a small python-script that pulls the html-code of the page, but after that I have to execute the JavaScript in a DOM-context which seems pretty hard.</p>
<p>To make it even harder I want to use it in a server environment that has no X11-server.</p>
<p>Note: I already read about <a href="http://code.google.com/p/pywebkitgtk/" rel="nofollow">http://code.google.com/p/pywebkitgtk/</a> but it seems to need a X-server.</p>
|
javascript python
|
[3, 7]
|
373,825 | 373,826 |
clickable grid view row asp.net
|
<p>i want asp.net gridview with its rows clickable.</p>
<p>i want to call a function when that row is clicked based on row index.</p>
<p>i tried to use RowDataBound event but it did not worked or me</p>
<p>i used the following code</p>
<pre><code>protected void PeopleGridView_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes["onmouseover"] = "this.style.cursor='hand';this.style.textDecoration='underline';";
e.Row.Attributes["onmouseout"] = "this.style.textDecoration='none';";
e.Row.Attributes["onclick"] = ClientScript.GetPostBackClientHyperlink(this.PeopleGridView, "Select$" + e.Row.RowIndex);
}
}
</code></pre>
<p>where am i going wrong?</p>
<p>i dont want to redirect to any other page.
i want to fill the values in text box on the same page</p>
|
c# asp.net
|
[0, 9]
|
1,482,020 | 1,482,021 |
jquery validate
|
<p>I am using the plugin from here: <a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/" rel="nofollow">http://bassistance.de/jquery-plugins/jquery-plugin-validation/</a></p>
<p>and I am wondering if anyone has any code that will allow me to compare 2 form fields and validate that <code>field_1</code> must be larger than <code>field_2</code>?</p>
<p>I am initiated the validate method like:</p>
<pre><code>$("#frmValidate").validate({
meta: "validate"
});
</code></pre>
<p>Many thanks.</p>
|
javascript jquery
|
[3, 5]
|
5,537,904 | 5,537,905 |
How do I refresh and remove some query on current URL
|
<p>Example my current URL is</p>
<pre><code>http://domain.com/category/health-beauty/?session={%22session_key%22%3A%22df1eca3f79e122bd915651e5-1325102496%22%2C%22uid%22%3A%221325102496%22%2C%22expires%22%3A0%2C%22secret%22%3A%229eb858d1fc7dda2b37be912282a41382%22%2C%22base_domain%22%3A%22domain.com%22%2C%22access_token%22%3A%22193986783965592|df1eca3f79e122bd915651e5-1325102496|nJe_UcyAxMt2i6S40QWBKw6-Rek%22%2C%22sig%22%3A%22a7304578c9e00c14ed8e5825e2c2837b%22}
</code></pre>
<p>The <code>session</code> is coming from Facebook.</p>
<p>Now I want remove or refresh the current URL to be</p>
<pre><code>http://domain.com/category/health-beauty/
</code></pre>
<p>Let me know.</p>
|
php javascript
|
[2, 3]
|
5,577,490 | 5,577,491 |
Alert dialog display even when the application is not running
|
<p>I want to notify the user of my app when he receives special news (from my app).
How can i display some kind of a messeage to the user, even if my app is running in the background (or not running at all if possible).</p>
<p>I want him to be notified by text, and sound.</p>
<p>Thanks.</p>
|
java android
|
[1, 4]
|
5,557,758 | 5,557,759 |
Extend the DropDown for Item ToolTip,Asp.net,C#
|
<p>i need to extend the DropDownList For adding toolTip For DropDown Item On mouseOver.</p>
<p>If(Dropdown size is samller than Dropdownlist item then it will be useful for seeing the item as tool tip)</p>
<p>For that i came to know, We need to create ServerControl project in VS2008 but i dont know how to add a property like ItemToolTip </p>
<p>which need to be worked as (DataTextField, DataValueField in drop down list) in that class .</p>
<p>tell me any link for ServerControl project sample which resembles my requirement.</p>
<p>I tried using below code but dropdown property itself not working..</p>
<p>namespace DropDownItemToolTip</p>
<p>{</p>
<pre><code>[DefaultProperty("Text")]
[ToolboxData("<{0}:ServerControl1 runat=server></{0}:ServerControl1>")]
public class ServerControl1 : System.Web.UI.WebControls.DropDownList
{
[Bindable(true)]
[Category("Appearance")]
[DefaultValue("")]
[Localizable(true)]
public string Text1
{
get
{
String s = (String)ViewState["Text"];
return ((s == null) ? "[" + this.ID + "]" : s);
}
set
{
ViewState["Text"] = value;
}
}
protected override void RenderContents(HtmlTextWriter output)
{
output.Write(Text1);
}
}
</code></pre>
<p>}</p>
<p>Send me any sample project link, which done like this.. </p>
|
c# asp.net
|
[0, 9]
|
618,689 | 618,690 |
On events? Turn it off?
|
<p>On keyup my script does something, I was wondering if I could turn it off, as in, I only want it to check one key up.</p>
<pre><code>ckEditorNewsArticle.document.on("keyup", function(){
</code></pre>
<p>Edit:</p>
<pre><code>ckEditorNewsArticle.document.on('keyup', function(){
alert('key up');
});
</code></pre>
<p>This works. But I cant get it to fire only once, by using one.</p>
<pre><code>ckEditorNewsArticle.document.one('keyup', function(){
alert('one');
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
4,906,764 | 4,906,765 |
escaping a variable in jquery
|
<p>I have a function like this... I am trying to insert a class name using a variable <code>gotValue</code>. How do I pass it in jQuery? I have tried that in if clause, but it did not work. </p>
<pre><code>function fullData(gotValue)
{
alert(gotValue);
var count = gotvalue.substring(9);
if($('.'+gotValue+'').is(':checked'))
{
alert('working');
}
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,877,205 | 3,877,206 |
Android: how to run a thread in service after the device has been rebooted
|
<p>How to run a thread in background, after the device is rebooted. I'm trying to re schedule the alarm using alarm manager after the device is rebooted. But miserably it is ringing once after reboot and the scheduled alarms are cleared after reboot. so i've to make a thread run in background service that re-schedules the alarm taking the time from the database. How to achieve it? any help is highly appreciated and thanks in advance...</p>
|
java android
|
[1, 4]
|
2,715,898 | 2,715,899 |
Quick way to create array from another array's variables?
|
<p>Lets say I have 2 arrays:</p>
<pre><code>var a = [];
var b = [];
a.push({id:1, name:"Joe"});
a.push({id:2, name:"Jeff"});
a.push({id:3, name:"John"});
</code></pre>
<p>Is there a quick way to populate <code>b</code> with just <code>a</code>'s names in Javascript, or do I have to use a loop?</p>
<p>E.g, something like:</p>
<pre><code>b = a[].name; // b is now ["Joe","Jeff","John"]
</code></pre>
|
javascript jquery
|
[3, 5]
|
389,421 | 389,422 |
jQuery load function can't won't load
|
<p>I've been working on this <a href="http://orchidaberdeen.com/" rel="nofollow">website</a> for quite some time now and i've encountered a bug that is trumping me at every point.</p>
<p>The problem is in the gallery section of the site. When a user clicks on the circle the website splits open to reveal more thumbnails. When the user clicks on the smaller thumbnails a lightbox is supposed to appear. </p>
<p>Sadly this is not the case, i think it's due to the fact that there is to much jQuery being loaded at once. As the thumbnail pages are external html files being loaded by jQuery so when i try to load the lightbox plugin the browser doesn't seem to want to load it.</p>
<p>The lightbox effect works when the page is viewed on it's own individual pages for example here, <a href="http://orchidaberdeen.com/6_toggle/1.html" rel="nofollow">http://orchidaberdeen.com/6_toggle/1.html</a></p>
<p>These are the things i've tried,</p>
<pre><code>(function loading() {
$.get('js/view.min.js?auto', function() {
$('body').load('6_toggle/1.html#externalContent');
});
})();
</code></pre>
<p>I've also tried this,</p>
<pre><code>$(".plus_1").click(function() {
$.getScript("js/view.min.js?auto", function(data, textStatus, jqxhr) {
console.log(data); //data returned
console.log(textStatus); //success
console.log(jqxhr.status); //200
console.log('Load was performed.');
});
});
</code></pre>
<p>This line of code is loading the external html files, </p>
<pre><code>t_slide.load("6_toggle/"+page+".html", function() {
</code></pre>
<p>If anyone has any suggestions or knows of a fix that can re-trigger jquery after a page load or knows if this isn't even possible then it would be greatly appreciated.</p>
<p>Many thanks,</p>
<p>Cameron</p>
|
javascript jquery
|
[3, 5]
|
3,158,030 | 3,158,031 |
How to validate Radio Buttons in a Table using jQuery
|
<p>I have some Radio Buttons that creates in run time and they are inside of a table.How I can check that one of the surly selected using jQuery?</p>
<p>Thanks</p>
|
jquery asp.net
|
[5, 9]
|
5,727,867 | 5,727,868 |
Asp.net Event for change tracking of entities
|
<p>I have an asp.net page with many dozens of controls representing multiple database entities. I would like to track when any of the data for these entities is changed. </p>
<p>If I add a page member such as </p>
<pre><code>public Page1 : System.Web.UI.Page
{
protected bool Entity1HasChanged { get;set; }
protected void RegisterChange(object sender, EventArgs e)
{
Entity1HasChanged = true;
}
}
</code></pre>
<p>Then for each control OnTextChanged event or equivalent I call a method that sets this boolean to true.</p>
<p>I would then like to run a method <strong>AFTER</strong> all control events have completed which does some database updates. What page event can I hook into to do this? Reading the page on the LoadComplete event it only states that all load events will have completed.</p>
<p>Does anyone know how I should achieve this? Am I doing this completely the wrong way?</p>
<p>Thanks,</p>
<p>Ian</p>
|
c# asp.net
|
[0, 9]
|
967,873 | 967,874 |
ASP.NET control with jQuery. Specific version for control
|
<p>Is below how you would use a specific version of jQuery (already previously assigned on a page) in a control and set it back to the previous version for remaining control/s.</p>
<p>I know this is not ideal but the who app will be cleaned up later.</p>
<p>Thanks in advance.</p>
<pre><code><!-- This would be set earlier on the page. Possibly at page level or in a previous control -->
<script type="text\javascript" src='jquery-1.7.1.js'></script>
<!-- This would at the start of the control -->
<script>
var $origJquery = null; //Should be unique var name for the control
if(typeof jQuery != 'undefined')
$origJquery = jQuery.noConflict();
</script>
<script type="text\javascript" src='jquery-1.7.2.js'></script>
<script>
var $newJquery = jQuery.noConflict();
//Can use $newJquery here
</script>
<script>
//Set back when finished at end of control
if($origJquery != null)
{
$ = $origJquery;
$origJquery = null;
}
</script>
</code></pre>
|
jquery asp.net
|
[5, 9]
|
273,358 | 273,359 |
Checking if current context is jQuery stack
|
<p>For example i need to check if current context is jQuery stack. How would you do it? Ignoring methods checking. It's ugly solution. :)</p>
<p>For example:</p>
<pre><code>if(it_is_jquery_stack_context) {
// do some stuff with jQuery support
}
else {
// do some stuff without it
}
</code></pre>
<p><strong>UPDATE</strong></p>
<p>For example:</p>
<pre><code>if(typeof this.get=='function' && this.length && this.get(0)===dom_ element) {
// do some stuff
}
</code></pre>
<p>The last question is:</p>
<p>How to check if <code>this.get(0)</code> is instance of dom element?</p>
|
javascript jquery
|
[3, 5]
|
4,917,618 | 4,917,619 |
asp.net capture client side time and insert it in DB
|
<p>In my asp.net web application I need to capture the Client time and store it in a DB.For this I have written the follwing script in the head of my master:</p>
<p>{
</p>
<pre><code>function checkClientTimeZone() {
// Set the client time zone
var dt = new Date();
alert(dt.toTimeString());
document.getElementById("HiddenField1").value = dt.toTimeString();
}
window.onload = checkClientTimeZone;
</script>
</code></pre>
<p>}</p>
<p>Where the hidden field has been declared on the master page
On every page load the script runs well and alerts the time of the client . But when I refer the value of the hidden fild in the content page it stills reflects 'Hi' which is the default value. Could someone please help ..</p>
|
javascript asp.net
|
[3, 9]
|
838,742 | 838,743 |
Uploading an Excel sheet with a specified sheet name using oledb
|
<p>How to upload an excel sheet using asp.net and know the structure of the columns in the sheet so that it would be helpful in using sqlbulkcopy to upload to a table with similar structure.</p>
<p>any answers would be appreciated.</p>
<p>Thanks in advance.</p>
|
c# asp.net
|
[0, 9]
|
2,877,587 | 2,877,588 |
import unique elements out of ArrayList in Java
|
<p>I've <code>ArrayList</code> (get_unique) of type integer where in I have to insert only unique values in
it. how can I do it??</p>
<p>I've got it some idea to do the same in javascript but do not know how to do it in Java?</p>
<pre><code> <%
ArrayList<Integer> get_unique = new ArrayList<Integer>();
ArrayList<Integer> set_unique = new ArrayList<Integer>();
// how do it
%>
</code></pre>
<hr>
<pre><code><script language="JavaScript">
<!--
// note: you will need to populate the myList() array with values!
var myList = new Array();
var uniqueList = new Array();
var uniqueListIndex = 0;
for (i=0;i<myList.length;i++) {
var temp = myList[i];
var unique = true;
for (j=0;j<uniqueList.length;j++) {
if (temp == uniqueList[j]) {
unique = false;
break;
}
}
if (unique == true) {
uniqueList[uniqueListIndex] = temp;
uniqueListIndex++;
}
}
</script>
</code></pre>
|
java javascript
|
[1, 3]
|
2,559,686 | 2,559,687 |
Clone a div and then clone again from the child
|
<p>I have the following simple code, where I double click a div (with class <strong>container</strong>) and it's simply clones itself inside another div (with id <strong>containment-wrapper</strong>):</p>
<p><strong>html</strong></p>
<pre><code><span class="container">div one</span>
<div id="containment-wrapper">
</div>
</code></pre>
<p><strong>Jquery</strong></p>
<pre><code>$(".container").dblclick(function() {
$(this).clone().appendTo('#containment-wrapper');
});
</code></pre>
<p>When I double click the original div, it clones itself and puts a div inside the containment-wrapper but when I double click a cloned div, it doesn't do anything even though it has class=container, why is this happening? I tried many different ways to clone it but nothing worked.</p>
|
javascript jquery
|
[3, 5]
|
1,724,422 | 1,724,423 |
ASP.net Repeater get current pointer/counter
|
<p>the question is really simple.
Is there a way to access the current pointer/counter for an asp Repeater control.</p>
<p>I have a list with items and I would like one of the repeaters columns (it repeats and html table) to be something like ...</p>
<p>Item 1 | some info</p>
<p>Item 2 | some info</p>
<p>... and so on</p>
<p>1 and 2 being the counter.</p>
<p>any help?</p>
|
c# asp.net
|
[0, 9]
|
4,087,101 | 4,087,102 |
How to get file name from a specified folder?
|
<p>I want to get the file name resides under a specified folder.</p>
<p>i.e. there is a file stored under two folders <code>First\Second\test.txt</code> I want have the path of the parent directory of file that is <code>First\Second\</code> in my program. Now I want to get the file name residing under the directory "Second" using code.</p>
<p>Please help me.</p>
|
c# asp.net
|
[0, 9]
|
3,852,088 | 3,852,089 |
Press a button on keydown? (jQuery)
|
<p>I have this simple code for keydown. At the moment is fading in div1. I am looking for a code which will press a button?. I know I have to add onClick event on the button but I tried couple of ways which didn't gave me any results.</p>
<pre><code>jQuery(document).one('keydown', 'g',function (evt){
$("#Div1").fadeIn();
return false;});
</code></pre>
<p>The button source is: (Which on click it does show's me #Div1 again. I want to add the same for the Div1.):</p>
<pre><code><ul id="button">
<li><a class="btn1" id=btn1 href="#Div1"></a></li>
</ul>
</code></pre>
<p>You probably think why would I want that? The reason is that Div1 is a form which on button click makes some animations where on FadeIn it doesn't.
Thanks alot.</p>
|
javascript jquery
|
[3, 5]
|
2,522,762 | 2,522,763 |
Java -> Python?
|
<p>Besides the dynamic nature of Python (and the syntax), what are some of the major features of the Python language that Java doesn't have, and vice versa?</p>
|
java python
|
[1, 7]
|
1,856,554 | 1,856,555 |
Is it possible to set audio file after receiving call of out side
|
<p>I want to play audio file at the time the receiver receive call at receiver side.</p>
<p>My application will call a caller and if caller receive a call, i want to listen audio file or recorded file to receive.</p>
<p>If this is possible, then please give me some instruction for this.</p>
|
java javascript android
|
[1, 3, 4]
|
5,745,526 | 5,745,527 |
How to implement Custom Audio Capcha in ASP.Net
|
<p>We have created a Custom Capcha generator using C#.Net. Now we have requirement to upgrade our Capcha to include audio feature(Listen Capcha). Our major constraint is that we cannot use any third party components(Dlls)</p>
<p>Please guide me to implement such functionality.</p>
<p>Thanks in advance.</p>
|
c# asp.net
|
[0, 9]
|
4,383,367 | 4,383,368 |
Why I get different date formats when I run my application through IIS and Visual Studio's web server on the same computer?
|
<p>I get the same culture i.e. "en-US" while running the website from both IIS and Visual Studio's web server.</p>
<p>But I get a different date format as follows, when I run the following code:</p>
<pre><code>HttpContext.Current.Response.Write(System.Threading.Thread.CurrentThread.CurrentCulture.ToString());
HttpContext.Current.Response.Write(System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern);
</code></pre>
<p>On Visual Studio's web server: dd/MM/yyyy en-US</p>
<p>On IIS: M/d/yyyy en-US</p>
<p>Does "Regional and Language Options" in "Control Panel" play any role in this ?
If I change the date format there in "Regional and Language Options", I see no effect in my application.</p>
|
c# asp.net
|
[0, 9]
|
4,165,140 | 4,165,141 |
Want to add element. What's wrong?
|
<p>In <a href="http://jsfiddle.net/littlesandra88/w5nAr/5/" rel="nofollow">this</a> JSfiddle have I a checkbox, a label and a submit button.</p>
<p>When the checkbox is checked, and submit is clicked a 'x' should appear, like to does now.</p>
<p>When the checkbox is unchecked, and submit is clicked a 'x' should disappear, like to does now.</p>
<p>The problem is that the 'x' doesn't appear again, if the checkbox is checked, and submit is clicked.</p>
<p>This is my code</p>
<pre><code>$('form').submit(function() {
if( $("input[type=checkbox]").is(':checked')){
$("label").add();
}else{
$("label").detach();
}
return false;
});
<form action="" method="post">
<input id="element" signed" type="checkbox" checked>
<label for="element">x</label>
<button type="submit">Submit</button>
</form>
</code></pre>
<p>Any idea what's wrong?</p>
|
javascript jquery
|
[3, 5]
|
5,108,526 | 5,108,527 |
fade in div on page load
|
<p>I need a div to fade in when the page loads.</p>
<pre><code><div id=monster></div>
</code></pre>
<p>Im already using jquery FYI.</p>
<p>Thanks in advance.</p>
|
javascript jquery
|
[3, 5]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.