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 |
|---|---|---|---|---|---|
755,005
| 755,006
|
Find a image in code behind
|
<p>I would like to use the find control method to find a image on the designer and make it visible, but i keep getting a null</p>
<p>This is my Code:</p>
<pre><code>foreach (ImageShow image in imageList)
{
Image Showimage = (Image)FindControl(image.imageName);
Showimage.Visible = true;
}
</code></pre>
<p>Any help would be much appreciated,
Thanks in advance </p>
|
c# asp.net
|
[0, 9]
|
2,409,648
| 2,409,649
|
How to send json data to jQuery.css()
|
<p>I want to send json formatted data to jQuery.css() function, and i dont know how to do that.
Later on, i will send more properties, this is just example of my problem.</p>
<pre><code>//Sorry, this var x is actually string that i get when i print my json string
var x = {"transform":"rotate(30deg)","-o-transform":"rotate(30deg)"}
//If i try to do something like this wont work
$("#mainImage").css(x);
//but following works
$("#mainImage").css({"transform":"rotate(30deg)","-o-transform":"rotate(30deg)"})
</code></pre>
<p>It probably has to do something that jquery accepts <code>.css( map )</code><br>
A map of property-value pairs to set.</p>
<p>And i am trying to send single text string, can i somehow convert json to map ?</p>
<p>@Pekka Yes, i am sure that <code>$("#mainImage").css(x);</code> doesnt work.</p>
<p>@Felix That is what i get by calling <code>json = JSON.stringify(data);</code> sorry if it not json data, i am js newbie..</p>
|
javascript jquery
|
[3, 5]
|
311,337
| 311,338
|
jQuery pseudo selector with variable as selector
|
<p>I've set a variable equal to a frequently-referenced selector:</p>
<pre><code>var allSteps = $("#makeIntoSlideshowUL > li");
</code></pre>
<p>Additionally, I'm using a custom-defined search function that makes contains (which I'm using to search) case-insensitive</p>
<pre><code>jQuery.expr[':'].Contains = function(a,i,m){
return jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0;
};
</code></pre>
<p>Without using the variable selector, I can do this</p>
<pre><code>$("#makeIntoSlideshowUL > li:Contains('" + $(this).val() + "')").css("display","block");
</code></pre>
<p>How do I use the variable selector and this defined psuedo selector together? I've tried this, but it doesn't work</p>
<pre><code>allSteps+":Contains('" + $(this).val() + "')".css("display","block");
</code></pre>
|
javascript jquery
|
[3, 5]
|
6,026,830
| 6,026,831
|
Clear back navigation stack on activity intent
|
<p>I have a login view at the start of my application. On logging in this view is finished manually (i.e. <code>finish()</code> is called in the code). This is so that the user doesn't have to press the back button past the login page when they want to exit the app.</p>
<p>Now I want to have a <code>logout</code> button in the app. This calls the login view (with an intent to remove any previously stored login credentials - i.e. simulating a logout).</p>
<p>What I need to do is clear the backwards navigation stack on this intent, or else the user will still be able to press back and view the application as they navigated it originally.</p>
<p>Now, <code>Intent.FLAG_ACTIVITY_CLEAR_TOP</code> doesn't work, I presume because I <code>finish()</code> the Login activity meaning that that activity isn't in the back stack. I am also using <code>Intent.FLAG_ACTIVITY_NEW_TASK</code> which doesn't seem to work either. User's can still press the back button and navigate backwards through activities they should be logged in to access.</p>
<p>So what I need to do is create an instance of the Login activity and make this the new <code>root</code> activity of my application.</p>
<p>How can I do this?</p>
<p>Thanks</p>
|
java android
|
[1, 4]
|
5,418,435
| 5,418,436
|
Mobile Website essentials..?
|
<p>I have decided i'll have to make a mobile version of my website. so ive tried reading about and come here to confirm and get your approval.</p>
<p>1) I have decided im going to use jquery mobile framework to create it. what are its limitations? according to me...none. educate me.</p>
<p>2) I don't have a smartphone or similar? how will i test the website during development? i have read about phone emulators... what is the best phone emulator you wud recommend that emulates a vast array of phones?</p>
<p>3)Once ive developed the website... i'll need a smart way of phone detection... so as it redirects to mobile website... i know there are libraries for this... again i need a recommendation here</p>
<p>Please help me answer these questions or direct me towards the right path... i know a lot of mobile website noobs need these questions answered.</p>
<p>btw, my website is veepiz.com. incase that can help</p>
|
php jquery android
|
[2, 5, 4]
|
4,868,040
| 4,868,041
|
Doing javascript on an appended HTML item within an accordion
|
<p>Okay, so I'm populating an accordion with JSON data. The only way I know how to do this is by appending HTML to the div. Here's my code:</p>
<pre><code>$.getJSON('/industry_tree.json', function(data) {
$("#accordion").accordion();
for (i in data) {
acc_html += '<h3><a href="#">'+data[i].data+'</a></h3>';
acc_html += '<div>';
for (j in data[i].children) {
acc_html += '<li>'+data[i].children[j].data+'</li>';
}
acc_html += '</div>';
}
console.log(acc_html);
$("#accordion").append(acc_html);
$("#accordion").accordion("destroy").accordion({autoHeight: false});
});
</code></pre>
<p>I want the <code><li></code> to execute some sort of JS everytime it's clicked. The problem is, I'm not sure how to do that if I'm adding it via an append.</p>
|
javascript jquery
|
[3, 5]
|
812,575
| 812,576
|
A potencially dangerous Request.FormValue was detected by the client.,
|
<p>I have a aynchronousFileUpload control in a userControl. When I am trying to upload a File I have got an error " A potencially......". Usually when I got this error earlier on an aspx page i made validaterequest=false and then it worked ., but now i got this error with a user control any suggestions ......</p>
<p>Thanks in Advance</p>
|
c# asp.net
|
[0, 9]
|
5,935,793
| 5,935,794
|
why the change event is not called?
|
<p>When I set the text of a input text with: <code>$('#rif').val('bla bla bla');</code></p>
<p>Why if I add a <code>.change()</code> event on that input text is not called?</p>
|
javascript jquery
|
[3, 5]
|
5,592,005
| 5,592,006
|
Is there a way to "link" several elements?
|
<p>Suppose I have 4 visible divs: <br />
- 2 on top <br />
- 2 on the bottom, wrapped in a container <br />
and 1 hidden div.</p>
<p>When a mouse hover over a bottom div it changes its color and changes color of one of the top divs.</p>
<p>When user clicks on a bottom div the hidden div appears and stays on the screen until mouse leave the container.</p>
<p>I use if statements to change color of divs, but I'm not sure whether I'm doing this right. Maybe there is a more simple and elegant way to do this.</p>
<p>So there are the questions: <br />
- Do I have to use if statement here? Maybe there is a way to somehow "link" pairs of elements to reduce the amount of code?<br />
- What if I want a top div to stay active while hidden div is visible? Do I need to write additional function with if statements again? Wouldn't that be "do not repeat yourself" rule violation?</p>
<p>Code example here: <a href="http://jsfiddle.net/Xq9kr" rel="nofollow">http://jsfiddle.net/Xq9kr</a></p>
|
javascript jquery
|
[3, 5]
|
4,436,434
| 4,436,435
|
clone table row, append random or sequential number to ID
|
<p>So i have this code</p>
<pre><code>$('input.clone').live('click', function(){
//put jquery this context into a var
var $btn = $(this);
//use .closest() to navigate from the buttno to the closest row and clone it
var $clonedRow = $btn.closest('tr').clone();
//append the cloned row to end of the table
//clean ids if you need to
$clonedRow.find('*').andSelf().filter('[id]').each( function(){
//clear id or change to something else
this.id += '_clone';
});
//finally append new row to end of table
$btn.closest('tbody').append( $clonedRow );
});
</code></pre>
<p>Problem is, each row i clone gets named whatever _clone
How would i write this so that each time i run the function, it picks either a random or more idealy sequential number to append to the id isntead of "_clone"</p>
|
javascript jquery
|
[3, 5]
|
2,717,760
| 2,717,761
|
Use Multiple jQuery and jQuery UI Libraries
|
<p>Is there a way to use multiple jQuery and jQuery UI Libraries in the same source?</p>
<p>I know about noConflict and using multiple jQuery Libraries with this method, however is it possible to use multiple jQuery UI Libraries?</p>
<p>Essentially I would like to use jQuery 1.2.6 and jQuery UI 1.6 together for a certain portion of the page that only works with those libraries</p>
<p>and then for everything else use the latest jQuery Libraries of 1.4.2 and UI 1.8.</p>
<p>Thanks,</p>
<p>-Seth</p>
|
asp.net jquery
|
[9, 5]
|
5,195,634
| 5,195,635
|
loop through table find first td text which have css csstablelisttdselected
|
<pre><code> <table id="tableWorkList" class="csstablelist" cellspacing="1" cellpadding="1">
<tr><td></td><td></td><td></td><td></td><td></td></tr>
<tr>
<td class="csstablelisttdselected" style="display: none;">
246
</td>
<td class="csstablelisttdselected" style="display: none;">
2
</td>
<td class="csstablelisttdselected">
n
</td>
</tr>
</table>
</code></pre>
<p><strong>i have to loop through table and find first cell text which have css class name csstablelisttdselected</strong></p>
|
javascript jquery
|
[3, 5]
|
5,730,503
| 5,730,504
|
Posting Data to another domain thru code-behind of Asp.NET
|
<p>Since we can't post data to cross domains, I want to post the data to my aspx page and a code-behind code will take the data and submit to cross domain <em>(which is not being operated by me, so I don't have permission to modify source code for jsonp)</em> and also the website to which I pass my post data is also returning a cookie which includes shopping cart info and I need to store it on my local browser cache as well.</p>
<p>Can you provide me some code on how to accomplish that?</p>
<p>Thanks..</p>
<p>What I know is I need to use <code>WebResponse</code> and <code>WebRequest</code> classes for that manner.</p>
|
javascript asp.net
|
[3, 9]
|
1,355,499
| 1,355,500
|
printwriter in JAVA to pass to python
|
<p>I have a code in JAVA and i need in python, the code is it:</p>
<pre><code>private static PrintWriter logWriter; //Only one instance to access log file.
PrintWriter.write() manages the lock.
static{
try{
logWriter = new PrintWriter(new FileOutputStream(logTextFileName,true));
}catch(Exception e){
}
}
private static Object lockLogWriter = new Object();
/**
* Returns the object used to write to the log File. If closed, creates a new instance
*/
private static PrintWriter getLogWriter(){
if (logWriter.checkError()){
synchronized (lockLogWriter){
logWriter.close();
try{
logWriter = new PrintWriter(new FileOutputStream(logTextFileName,true));
}catch (Exception ex){
}
}
}
return logWriter;
}
</code></pre>
<p>But i do not know what is the equivalent of prinwriter, Object, FileOutputstream and sinchronized</p>
|
java python
|
[1, 7]
|
746,376
| 746,377
|
jQuery serialize issue
|
<p>Making a form submit with jquery ajax and retriving form data with serialize function. But i have a problem with links inside datastring as it converts them into something like this:</p>
<pre><code>url=http%3A%2F%2Fwww.sitename.com
</code></pre>
<p>but i would like to return normal link like</p>
<pre><code>http://www.sitename.com
</code></pre>
<p>and then i dont know how to reconvert this link back inside the php final file to return it. Maybe something like to string conversion or whats the idea about this?</p>
<p>Thank you.</p>
|
php jquery
|
[2, 5]
|
1,167,231
| 1,167,232
|
Dynamically add rows to columns
|
<p>I am adding rows dynamically to a table. The table already has a row consisting of column headers like date, day etc.</p>
<pre><code>for(var i=0; i<=fix;i++){
var cols = 5;
var tr = $('<tr>');
$('<td name=Date"+i+" id=Date_"+i+"></td>').appendTo(tr);
$('<td id=day_"+ i+">"+theday +"</td>').appendTo(tr);
for (var c = 0; c < cols; c++){
$('<td> <input type=text name=value_"+i+" id=value"+i+"></td>').appendTo(tr);
}
tr.appendTo($('#tbl> tbody:first'))
}
</code></pre>
<p>I want to fill the 'td's with some vlaues stored in variable. But if i write</p>
<pre><code>$('<td name=Date"+i+" id=Date_"+i+">"+var+"</td>').appendTo(tr);
</code></pre>
<p>where var is a variable, Its value does not appear. Instead the whole string is displayed. How can i prefill then with some variable values ?</p>
|
javascript jquery
|
[3, 5]
|
4,981,435
| 4,981,436
|
javascript equivalent of jquery code
|
<p>Can someone help what's the javascript equivalent of below jquery line. </p>
<pre><code>$("#abc option[value='1']").text();
</code></pre>
<p>abc is the id of selectbox</p>
|
javascript jquery
|
[3, 5]
|
3,655,267
| 3,655,268
|
Learning C# ASAP to get started with ASP.NET?
|
<p>I have experience writing web apps in Django; scripting in Python; playing with PHP and I understand Object Oriented Programming. I need to get started ASAP with C# in order to start learning and using ASP.NET for a clients project.</p>
<p>Is there a way to get a working knowledge of C# without passing by the over-a-thousand-pages-books? How should I proceed to gain that knowledge?</p>
<p>Thanks.</p>
|
c# asp.net
|
[0, 9]
|
2,376,101
| 2,376,102
|
Javascript / Jquery - Multiple on Change (function()
|
<p>I am kinda new to Jquery / JS and after a little help. I realise there hopefully is a much better way to do this, and any help would be greatly appreciated.</p>
<p>I am building a form that can calculate a total. That is:</p>
<p>'Cost' x '(1 + percent(%))' = 'total cost'</p>
<p>I have it working nicely, though I want to make it so that if I change either the '<strong>percent</strong>' field, or the '<strong>cost</strong>' field then the <strong>total amount</strong> updates. At the moment only if you update the '<strong>cost</strong>' will the <strong>total update</strong>.</p>
<p>Hope that makes sense. Code is below.</p>
<pre><code>$(document).ready(function(){
$("#cost").change(function() {
var findprofit = parseFloat($("#cost").val());
var profit = (findprofit*.01)
var margin = parseFloat($("#percentage").val());
var total = profit*margin;
$(".profit_1_1").html(total);
var totalprofit = (total + findprofit);
$("#total").val(totalprofit);
});
<input type="text" name="cost" id="cost" />
<input type="text" name="percentage" id="cost" percentage />
<input type="text" name="total" id="total" readonly />
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,311,778
| 1,311,779
|
expiry download links in c# and asp.net
|
<blockquote>
<p><strong>Possible Duplicates:</strong><br>
<a href="http://stackoverflow.com/questions/4323949/temporary-file-download-link-with-asp-net">Temporary file download link with ASP.NET</a><br>
<a href="http://stackoverflow.com/questions/5703201/create-temporary-link-for-download">Create temporary link for download</a> </p>
</blockquote>
<p>I use ASP.NET
I need to give user temporary link for downloading file from server.
It should be a temporary link (page), which is available for a short time (12 hours for example). How can I generate this link (or temporary web page with link)?</p>
|
c# jquery asp.net
|
[0, 5, 9]
|
4,924,257
| 4,924,258
|
how to get text width in pixel javascript or jquery?
|
<p>I want to get textarea text width. How to get text width in pixel.
I do not want text length. </p>
|
javascript jquery
|
[3, 5]
|
5,566,771
| 5,566,772
|
foreach statement (get string values)
|
<p>Can someone please help me out? My code for splitting the strings is working however, i still need to use the splitted string my page. How can i achieve this? Here's my current code</p>
<pre><code> private void SplitStrings()
{
List<string> listvalues = new List<string>();
listvalues = (List<string>)Session["mylist"];
string[] strvalues = listvalues.ToArray();
if (listvalues != null)
{
foreach (string strElement in listvalues)
{
string[] prods = strElement.ToString().Split("|".ToCharArray());
string prodName = prods[0].ToString();
Response.Write(prodName);
}
}
}
</code></pre>
<p><a href="http://i46.tinypic.com/11b18ol.jpg" rel="nofollow">link text</a></p>
<p>how can i replace the response.write with any label or literal? when i tried to use a literal on the code it displays one single string not all of the strings that's been splitted.</p>
<p>any ideas?</p>
|
c# asp.net
|
[0, 9]
|
1,265,406
| 1,265,407
|
Action Attribute
|
<p>I want to send form data to aspx.cs page view below codes.</p>
<p>But this error generated:Object reference not set to an instance of an object.</p>
<p>Please guide me.</p>
<pre><code> <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server" method="post" action="Default2.aspx">
<input id="Text1" type="text" value="dgfdh" runat="server" name="Text1"/>
</form>
</body>
</html>
</code></pre>
<hr>
<pre><code> protected void Page_Load(object sender, EventArgs e)
{
TextBox1.Text = Request.Form["Text1"].ToString();
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
3,802,099
| 3,802,100
|
Turn an anchor into a span?
|
<p>What's the easiest way to turn an <code><a></code> into <code><span></code> keeping all the attributes and content? (except for perhaps the href).</p>
<p><code>.replaceWith()</code> replaces the whole shebang.</p>
|
javascript jquery
|
[3, 5]
|
2,220,639
| 2,220,640
|
Pikachoose gallery Fancybox: if I want fancy box on only one image
|
<p>I am using Pikachoose image gallery. And I want to open a fancybox on one image in which I want to show a youtube video. I have already used this code</p>
<pre><code>$(document).ready(function (){
var a = function(self){
self.anchor.fancybox();
};
$("#pikame").PikaChoose({buildFinished:a});
});
</code></pre>
<p>But this code added fancybox to all images in slider. How can I add fancy box to only one image?
Thanks in advance..</p>
|
php jquery
|
[2, 5]
|
5,914,119
| 5,914,120
|
Clear Server Cache on Browser Close Using ASP.NET
|
<p>for a secure web application , How to clear an item in server Cache on Browser close.</p>
|
c# javascript asp.net
|
[0, 3, 9]
|
603,020
| 603,021
|
JavaScript/jQuery Chaining Tag Replacement Calls
|
<p>I'm having trouble having the 2nd call to .replaceWith overwrite the old content written with .replaceWith. How do you handle an issue like below :</p>
<pre><code>if (data==-3){
$('message').replaceWith('ffgd');
} else if (data==-4){
$('message').replaceWith('dfdsfdsfds');
</code></pre>
<p>On the first call when data is -3, I see ffgd. Then when a 2nd call occurs and data=-4, I know that the else if block is run because of console.log messages but it doesnt overwrite the ffgd.</p>
|
javascript jquery
|
[3, 5]
|
5,237,949
| 5,237,950
|
JQuery click function not working on button within parent element which has it's own click function
|
<p>I have a button which needs to run a javascript function when clicked.</p>
<p>The problem is that this button lives within another element which has it's own click function which seems to be preventing that of the button from running.</p>
<p>Here's the code:</p>
<pre><code> <a id="login">Login
<span>
<span style="display:block; padding:0 0 5px 0;">
content here...
</span>
<input type="button" id="forgotten" value="test" />
</span>
</a>
</code></pre>
<p>And here's the javascript:</p>
<pre><code>$("#login").click( function() {
$("#login > span").slideDown();
});
$('body').click( function() {
if ($("#login > span:visible")) {
$("#login > span").slideUp();
}
});
$('#login, #login > span').click( function(event){
event.stopPropagation();
});
$("#forgotten").live("click", function() {
// ... Run function here...
});
</code></pre>
<p>I have a feeling it might be because of the stopPropagation part of the code.</p>
<p>Any ideas?</p>
|
javascript jquery
|
[3, 5]
|
1,750,178
| 1,750,179
|
problem in passing Id from asp.net to Javascript
|
<p>I need to call a functoin on button click and pass the value of id into that function...here is what I m doing ...but I bet i m doing sth wrong bcoz its not working</p>
<pre><code>function Datarate(frm) {
var ar = document.getElementById('<%= submit.ClientID%>');
alert(ar);
}
<asp:Button runat="server" ID="submit" Text="Submit" OnClientClick="return Datarate(this.form);" PostBackUrl="www.google.com" />
</code></pre>
<p>but i m getting alert as null...</p>
<p>any idea where I m getting wrong...
Thanks,</p>
|
asp.net javascript
|
[9, 3]
|
4,049,136
| 4,049,137
|
Communications permission trouble when calling into Java from javascript
|
<p>I have a little graphics editing Java applet embedded in an HTML/Javascript/jquery page.</p>
<p>I have a save button on the page that pops up a jquery dialogue which calls a Java function.</p>
<p>When that function tries to access the server it dies on a permission error. The identical code works to load the graphics object. </p>
<p>I am currently assuming that the call to Java from Javascript is not in the applet context (separate thread?), so there is no place it was loaded from and therefor cannot talk to it.</p>
<p>Is there any way to get into the correct context? </p>
<p>I expect I can work around it by putting the save button in the Java applet and using a Java dialogue to get the other data. Long term going to HTML5 canvas is the solution I think.</p>
|
java javascript jquery
|
[1, 3, 5]
|
1,294,818
| 1,294,819
|
Is it possible to do conditional statements in the CssClass property?
|
<p>I'm using a repeater control. One of my item attributes is a boolean. I know I can do a conditional statement in the Text property, such as:</p>
<pre><code>Text='<%# Item.Boolean ? "Text 1" : "Text 2" %>
</code></pre>
<p>However, what if I want the same text but a different CSS style depending on the boolean?</p>
<p>Is code like the following possible?</p>
<pre><code>CssClass=<%# Item.Boolean ? "CssClass1" : "CssClass2" %>
</code></pre>
|
c# asp.net
|
[0, 9]
|
4,798,978
| 4,798,979
|
Access $('selector').data in functions/objects
|
<p>How do I access values set by $.data() inside a function or object</p>
<pre><code> $('#timers').data('firsttimer', 100);
//prints 100
document.write($('#timers').data('firsttimer'));
function blah(){
//Prints nothing
document.write($('#timers').data('firsttimer'));
}
blah();
</code></pre>
<p>See this jsfiddle for easy access to test the code <a href="http://jsfiddle.net/JUfd8/" rel="nofollow">http://jsfiddle.net/JUfd8/</a></p>
|
javascript jquery
|
[3, 5]
|
5,555,449
| 5,555,450
|
javascript before leaving the page
|
<p>I want to make a confirmation before user leaving the page.If he says ok then it would redirect to new page or cancel to leave.I tried to make it with onunload</p>
<pre><code><script type="text/javascript">
function con() {
var answer = confirm("do you want to check our other products")
if (answer){
alert("bye");
}
else{
window.location = "http://www.xyz.com/products";
}
}
</script>
</head>
<body onunload="con();">
<h1 style="text-align:center">main page</h1>
</body>
</html>
</code></pre>
<p>but it confirm after page already closed?How to do it properly.It would be even better if someone shows how to do it with jquery?Any help would be greatly appreciated.Thanks in advance</p>
|
javascript jquery
|
[3, 5]
|
4,305,626
| 4,305,627
|
Android Queue vs Stack
|
<p>Why does <code>java.util.Stack</code> allows me to create a new <code>Stack</code> in an android activity with a simple constructor like:</p>
<pre><code>Stack < ImageView> stack = new Stack< ImageView>();
</code></pre>
<p>and i cannot do the same with <code>java.util.Queue</code>? Shouldn't a queue have a similar constructor? Strange enough on <a href="http://developer.android.com/reference/java/util/Stack.html" rel="nofollow">http://developer.android.com/reference/java/util/Stack.html</a> it says the <code>Stack</code> has a public constructor and on <a href="http://developer.android.com/reference/java/util/Queue.html" rel="nofollow">http://developer.android.com/reference/java/util/Queue.html</a> i don't see a similar constructor for a queue.. why is that? what is the way to have a <code>Queue</code> of <code>ImageView</code> elements for example?
Thanks.</p>
|
java android
|
[1, 4]
|
4,343,158
| 4,343,159
|
Can you re-use child layouts?
|
<p>Say I have a (programatically created) parent LinearLayout parent1 and I add a (programatically created) childA layout with <code>parent1.addView(childA);</code> then I set up childA in some complex way - perhaps it has its own children within it. Now can I subsequently somehow un-link it from parent1 without damaging any of the information within childA so that I can re-use it using parent2.addView(childA)?</p>
|
java android
|
[1, 4]
|
4,816,802
| 4,816,803
|
NullPointerException using append method on a view in android?
|
<p>I am trying to populate data from database into a TextView using this code:</p>
<pre><code>@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
TextView view = (TextView) findViewById(R.id.textView);
db = (new DatabaseHelper(this)).getWritableDatabase();
cursor = getCursor();
cursor.moveToFirst();
while (cursor.isAfterLast() == false) {
String text = cursor.getString(2);
view.append(text);
cursor.moveToNext();
}
</code></pre>
<p>However I am getting a NullPointerException on this line:</p>
<pre><code> view.append(text);
</code></pre>
<p>and I am not sure about the reason as the view exists.</p>
|
java android
|
[1, 4]
|
1,295,311
| 1,295,312
|
mega dropdown sharepoint 2010?
|
<p>How can i implement a similar mega dropdown menu on this site below
<a href="http://www.kraftrecipes.com/home.aspx" rel="nofollow">http://www.kraftrecipes.com/home.aspx</a>
Any ideas?Can Jquery do this...
Anyone done this before?
Thanks in Advance
** i need it for Sharepoint 2010</p>
|
jquery javascript
|
[5, 3]
|
3,036,189
| 3,036,190
|
Open excel file in asp.net
|
<p>I am trying to open a Excel(.xls) file from asp.net.The code i am using is given here.It is showing a save as dialog box which i don't want .Please help me !!!</p>
<pre><code> Response.ContentType = "application/xls";
Response.Flush();
Response.WriteFile(fileName);
Response.End();
</code></pre>
|
c# asp.net
|
[0, 9]
|
789,787
| 789,788
|
Javascript: check if window.fullScreen is false then open url in new window in full screen
|
<p>I have written a javascript on page load that</p>
<pre><code>if(!window.fullScreen) window.open(document.URL,'','fullScreen=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');}
</code></pre>
<p>but window.fullScreen always come false so it keep opening window.</p>
<p>any other way to check if window is in full screen mode or not?</p>
<p>Thanks</p>
|
javascript asp.net
|
[3, 9]
|
2,386,080
| 2,386,081
|
How to fire javascript method after a page has rendered
|
<p>Hi guys I need to call a javascript function after the page is rendered.</p>
<p>How can i accomplish this?</p>
<p>Please advise.</p>
<p>I tried the <code>public void Page_LoadComplete(object sender, EventArgs e)</code> event.</p>
<p>But my javascript failed because the controls were not rendered yet.</p>
<p>Thanks is advance.</p>
|
javascript asp.net
|
[3, 9]
|
254,693
| 254,694
|
jQuery animate - get future position of element
|
<p>I'm having trouble getting the position of an element because my animation is long and $(this).position().top is calculated too early.</p>
<p>How can I get a future position value of an element before it animates to that position? </p>
|
javascript jquery
|
[3, 5]
|
5,335,296
| 5,335,297
|
remove all <li> from <ul>?
|
<p>hi all i am appending li in ul from the following code</p>
<pre><code>for(var i=1;i<=len;i++){
li=document.createElement('li');
element = document.createElement("img");
element.setAttribute("src", path[i]);
li.appendChild(element);
root.appendChild(li);
}
</code></pre>
<p>now i want to remove all item on button click
and i m using this code which is not working </p>
<pre><code>while(root.hasChildNodes()){
root.removeChild('li');
}
</code></pre>
<p>the condition is true but the inner line root.removechild('li'); does not work i also tried these mentioned options --> root.removeChild(root li) , ('#listid li'), ('ul li') ...
is there anything missing or any other way to remove items from list ? thnx in advance</p>
|
javascript jquery
|
[3, 5]
|
3,799,319
| 3,799,320
|
Executing ASP.NET 1.1 Code within Javascript
|
<p>When the user clicks a certain LinkButton, I need to open a confirmation dialog with OK/Cancel. If the user hits OK, then I need to run a function from ASP.NET (something to update the database).</p>
<p>Something like the following...</p>
<p><strong>Javascript</strong></p>
<p><code>function openConfirm() {
return window.confirm("Are you sure you want to do this?");
}</code></p>
<p><strong>ASP</strong></p>
<p><code><asp:LinkButton runat="server" CommandName="viewPart" onClick="if(openConfirm() === true) <% SomeASPFunctionCall() %>;">Delete</asp:LinkButton></code></p>
<p>The catch is that my application is running ASP.NET 1.1, so any references to adding an <code>OnClientClick</code> to the control is irrelevant (because <code>OnClientClick</code> has been added for ASP 2.0). I have tried postbacks via __doPostBack and the __eventObject and __eventArguments, but those simply do not work or I can't figure it out.</p>
<p>How should I manage this combination of client-side/server-side interaction?</p>
<p>Thank you</p>
|
javascript asp.net
|
[3, 9]
|
2,574,915
| 2,574,916
|
Jquery pass wrong value to page
|
<p>I have been struggling with this for days. This works, but does not pass the correct variable to the page ( testMap.php ). I use data from my DB and hovering over the link does show the correct variables in the URL, but for whatever reason jquery is always grabbing the first variable in the loop. Any suggestions?</p>
<pre><code><?php
$myname = $_SESSION['username'];
global $database;
$stmt = $database->connection->query("SELECT * FROM ".TBL_FLIGHTS." WHERE username='$myname'");
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){
$date = $row['date'];
$starting = $row['starting'];
$ending = $row['ending'];
$route = $row['route'];
echo "<a class=\"route\" href=\"start=$starting&end=$ending\"><p class=\"pBlue\">$date - $starting - $ending - $route</p></a>";
?>
<div id="start" style="visibility:hidden"><?php echo $starting; ?></div>
<div id="end" style="visibility:hidden"><?php echo $ending; ?></div>
<?
}
?>
<script type="text/javascript">
$(document).ready(function() {
var start = $('#start').text();
var end = $('#end').text();
$(function() {
$(".route").click(function(evt) {
$("#mymap_canvas").load("testMap.php?start="+start+"&end="+end )
evt.preventDefault();
})
})
});
</script>
</code></pre>
|
php jquery
|
[2, 5]
|
5,046,748
| 5,046,749
|
Uncaught TypeError: Illegal invocation in js using jQuery
|
<pre><code> function makePvsApplicantCalls(){
console.log('In makePvsApplicantCalls');
$.ajax({
type: 'GET',
url: "/reppify/RPCPostAdapter/httprpc/applicationFacade/getPreviousApplicants",
data : {jobId : jobId, page: pgNoPA++},
cache: false,
beforeSend: function(){
console.log('In makePvsApplicantCalls Before Send');
},
success: onSuccessPA,
complete: function(){
$('#prevSpinner').hide();
},
error: handleError,
dataType: 'json'
});
}
</code></pre>
<p>On Calling above javascript function, I'm getting following exception on browser and not able to make AJAX call, following is the invoking code</p>
<pre><code>if(data.result>0) {
makePvsApplicantCalls();
}
</code></pre>
<p>Following is the error</p>
<pre><code> Uncaught TypeError: Illegal invocation jquery.min.js:4
e jquery.min.js:4
ca jquery.min.js:2
ca jquery.min.js:2
ca jquery.min.js:2
ca jquery.min.js:2
f.extend.param jquery.min.js:4
f.extend.ajax jquery.min.js:4
makePvsApplicantCalls b2bscreening.js:2584
$.ajax.success b2bscreening.js:2451
n jquery.min.js:2
o.fireWith jquery.min.js:2
w jquery.min.js:4
d jquery.min.js:4
</code></pre>
<p>How can I get rid of this exception?</p>
|
javascript jquery
|
[3, 5]
|
5,567,450
| 5,567,451
|
How to allow only defined characters as input using jQuery?
|
<p>How do i allow special characters such as hyphen,comma,slash,space key,backspace key,delete key along with alphanumeric values and restrict the rest in jQuery?</p>
<p>As this criteria(allowed characters/input values) varies from field to field, i would like to make it as a utility method which accepts input field id and allowed characters as parameters.
for example: limitCharacters(textid, pattern)</p>
|
javascript jquery
|
[3, 5]
|
4,417,759
| 4,417,760
|
Redirect after iPhone\Android app install
|
<p>Say I redirected a user to download my app from itunes via an "itms://itunes.apple.com/us/app/facebook/id284882215?mt=8&uo=6" link (or the equivalent Google Play link)</p>
<p>Is it possible to have him redirect to some url after the app is installed? (say my own schema url registered by my app) ?</p>
<p>Thanks</p>
|
android iphone
|
[4, 8]
|
453,387
| 453,388
|
How to get bounds of Google Map?
|
<p>I need to do following task: there is Google Map widget and user can move/zoom the map. When user click the button that application should show latitude & longitude of bounds of GMap (north-east corner and south-west corner). But I don't know how I can do it. I hope you can help me. Thank you for, anyway.</p>
|
java android
|
[1, 4]
|
1,944,755
| 1,944,756
|
updating database on user close the web browser before session expired in asp.net,c#
|
<p>i am newly developer in .net for developing chat software in web application.i was try to use javascript event onbeforeunload,unload not working every browser. Untill not solve my problem.
i want to sample code for updating database on user close the web browser before session expired in asp.net,c# ...Want advance help.</p>
|
c# asp.net
|
[0, 9]
|
5,846,591
| 5,846,592
|
Undo jQuery or revert DOM?
|
<p>I have some jQuery that runs on a page. As a short-term fix I want to remove the code within the tags (containing the JS), that are on the page so that this jQuery does NOT run.</p>
<p>Is there any way that I can do this, or stop the code from running? I want to revert back to the typical DOM state, not the manipulated one...</p>
<p>Edit:</p>
<p>I have a script tag on the page that runs some javascript.</p>
<p>Due to certain limitations, I can't simply remove this - I have to include a javascript file to remove this script tag / OR prevent this javascript from running.</p>
<p>I want to revert back to how the page should look without having been manipulated by the script tag that is already on the page.</p>
|
javascript jquery
|
[3, 5]
|
5,217,316
| 5,217,317
|
Jquery: Blur function does not work with Div tag
|
<p>I am trying to create a Jquery Tree plugin for my current project. In the plugin, there are 3 compomnents: a text box containing the result selected from the tree , a div containing the tree and a button to show the div. It works fine, except that i cannot make it auto lose the popup div if the tree lose its focus. </p>
<p>Here is the code to create the div </p>
<pre><code> createTree = function() {
$.getJSON(_options.jsonSrc, function(data) {
nDiv = document.createElement("div");
nDiv.id = "divRootAd";
$(nDiv).css('display', 'none');
jsonObj = data["treeJson"];
nUl = document.createElement("ul");
nUl.appendChild(createNode(jsonObj));
nDiv.appendChild(nUl);
$("body").append(nDiv);
//$(nDiv).focus();
repositionDiv();
});
};
repositionDiv = function() {
if ($('#divRootAd').is(':hidden')) {
// get the field position
var sf_pos = $("#txtAdVal").offset();
var sf_top = sf_pos.top;
var sf_left = sf_pos.left;
// get the field size
var sf_height = $("#txtAdVal").height();
// apply the css styles - optimized for Firefox
$("#divRootAd").css("position","absolute");
$("#divRootAd").css("left", sf_left);
$("#divRootAd").css("top", sf_top + sf_height + 5);
$('#divRootAd').show();
$('#divRootAd').blur(function(event){
alert("lose focus");
clearDiv();
});
} else {
clearDiv();
}
};
</code></pre>
<p>The line alert("lose focus") does not work when i move the mouse outside the div. Can anyone suggest a solution for this ? </p>
|
javascript jquery
|
[3, 5]
|
5,996,054
| 5,996,055
|
Move div element to the middle of the screen in animation
|
<p>How do you animate a div element to the middle of the screen from the left side</p>
<p>I get this invalid obect or prperty
i can't seem to reference the jQuery(document) object through jQuery anymore </p>
<pre><code>form.each(function () {
jQuery(this).animate({ marginLeft: jQuery(document).width / 2 }, 750); <-- this line here gives me errors
jQuery('input[name^=Next]').click(function () {
});
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
2,291,258
| 2,291,259
|
Invoke or call more then one method at same time?
|
<p>how to call more then one method at same time in my page load in asp.net??
i have 4 methods to called in my page load event.
but i want to call all 4 methods and not wait for 1st method to get finish then call 2nd method.</p>
<p>How to achieve this is in asp.net 4.0?</p>
<p>Thanks.</p>
|
c# asp.net
|
[0, 9]
|
4,994,310
| 4,994,311
|
add items in Adapter
|
<p>I'm new in programming.
I have a problem with filling <code>GridView</code> from the Internet.
Through <code>AsyncTask</code>, I parsed much content (img, txt), create and filling database.
And when I call the adapter to <code>GridView</code> (<code>CursorAdapter</code> or any of the standard adapters), he always fully updates all the already-made content.
Please advise some sort of a way to fill the content <code>GridView</code> without changing already completed views, from DB, which actively adds data from the parser.
What adapter and methods, be better to use in this case? I would be very grateful for some guidance or example.
Thank you for taking a few minutes for giving me.</p>
|
java android
|
[1, 4]
|
507,543
| 507,544
|
jQuery is locking up browser
|
<p>I am not sure if I should be clearing everything or resetting something somewhere.</p>
<p>What is happening is that the browser will lock up for 10 - 30 seconds when setting a int value in the input textbox.</p>
<p>Here is a little snippet:</p>
<pre><code>function RunIt() {
$('#txTotW').bind('keyup', function () {
_totWidth = parseInt($(this).val());
$('#totalWidth').text($(this).val());
RunIt();
});
$('#txTotH').bind('keyup', function () {
_totHeight = parseInt($(this).val());
RunIt();
});
$('#txBayCnt').bind('keyup', function () {
_bayCount = parseInt($(this).val());
RunIt();
});
}
</code></pre>
<p>If at any time one of the keyup events are fires I rebuild a table by <code>.find('tr').remove()</code> and this table only has three rows max at any time, but since the change of one value the entire table will be rebuilt.</p>
<p>This does not seem like a big enough load to make the browser lock up.</p>
<p>What can I do to fix this?</p>
|
javascript jquery
|
[3, 5]
|
621,764
| 621,765
|
how to create a multi dimensional array out of dynamically created fields and variables
|
<p>here is my url: <a href="http://iadprint.com/products?product=business%20card" rel="nofollow">http://iadprint.com/products?product=business%20card</a></p>
<p>the fields that you see on this page are all dynamically created on the backend. i decided to use the fieldnames created as variables to display the price as you can see in the js below. I have two problems one being that when the page refreshes the pricing div values cleans out and the selections do not stay and the second one is i cant figure out how to add all items selected into an array for the cart page.</p>
<p>for the first problem i figured it was best to place each selection into a cookie in an array form and on refresh pull out the data and select the needed fields. unless there is another way.</p>
<p>this is what im guessing the array would look like</p>
<pre><code>$products = array("product" => "business_card", array("ProdID" => "1"), ("ProdID" => "2") ..and so on)
</code></pre>
<p>basically i would add only the fields who have a length of greater than zero so that i know it was selected. what my question is would that be the correct way to format the array? and is there a way i can do array_push in javascript to push in new elements each time a selection change is occurred?</p>
<p>as for problem two im hopefully guessing it will be easy once the cookie is created with its correct data.</p>
|
php javascript jquery
|
[2, 3, 5]
|
4,918,774
| 4,918,775
|
manipulating dynamically created form elements without losing their values with jQuery
|
<p>I want to do a search and replace on a complex bit of dynamically created form. It's as simple as finding all the instances of one string and replacing them with another, made more complicated by the fact there are 11 instances per bit of form and make up only parts of various attributes. </p>
<p>Examples of the kind of thing I'm working with (it's the '001' bit I'm searching and replacing):</p>
<pre><code><div id="step_title:001|title">
<label for="step_title:001|title|field">
<input id="step_title:001|title|field" name="step_title:001|title|field"/>
</code></pre>
<p>I had thought something like this would do the trick:</p>
<pre><code>$(this).html($(this).html().replace('old string', 'new string'));
</code></pre>
<p>However because the bit of form is dynamically added the form data is lost every time I perform this action. I tried using the .clone() function which seems to preserve the data, but that doesn't allow you to manipulate the object. I also tried performing the search and replace directly onto the containing object, but I guess .replace() only works on strings. </p>
|
javascript jquery
|
[3, 5]
|
5,436,648
| 5,436,649
|
sending request and parameter when submit from using ajax
|
<p>I want to submit a form using jquery <code>.post()</code>. I want to send all the input names in addition to another parameter, in there any way to send data and the request?</p>
<pre><code> $.post("RegistrarManagementServlet",{"option":"cancelRequest"},function(){
alert("hi");
});
</code></pre>
<p>here is how we submit the request</p>
<pre><code> $.post("RegistrarManagementServlet",request,function(){
alert("hi");
});
</code></pre>
<p>I want to send all the data in the form (in the normal post request) in addition to option parameter, how can I make it?</p>
<p><strong>EDIT</strong></p>
<p>where should I define the request as function parameter, since the code occurs after confirmation dialog appear</p>
<pre><code>$('#cancelRequest').click(function(event){
event.preventDefault();
jConfirm('Are you sure to delete registrar request?', 'Confirmation Dialog', function(result) {
if(result == true){
request.cancelRequest="cancelRequest"; //request is not defiend
$.post("RegistrarManagementServlet",request,function(){
alert("hi");
});
}
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
4,104,614
| 4,104,615
|
disable/enable buttons
|
<p>I'm working in ASP .Net. I need to be able to click a button, disable it, have the code behind kick in and execute some functions and once they are done, enable the button again. There is no postback taking place per say in this project as we are using an UpdatePanel. About as far as I've been able to get successfully is using this syntax to disable it on the code behind Page_Load function: </p>
<pre><code>btnConnect.Attributes.Add("onClick", "document.body.style.cursor = 'wait';this.disabled = true;" + ClientScript.GetPostBackEventReference(btnConnect, string.Empty) + ";");
</code></pre>
<p>This disables the button and allows the code behind to execute. I just can't figure out how to re-enable the button once the functions that run in the code behind are done. Is there a way to capture when the code behind is done?</p>
|
c# asp.net
|
[0, 9]
|
1,658,190
| 1,658,191
|
Trouble witn creating notification in status bar from service Android
|
<p>I need to create Service in my application for showing notifications. I have the code for service:</p>
<pre><code>package com.bba.droid;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.os.IBinder;
public class AlertsMonitorService extends Service{
@Override
public IBinder onBind(Intent arg0) {
// TODO Auto-generated method stub
return null;
}
@Override
public void onCreate() {
super.onCreate();
}
@Override
public void onStart(Intent intent, int id) {
NotificationManager notifyMngr=(NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
Notification notification=new Notification(R.drawable.icon_back, "Downloading...", System.currentTimeMillis());
PendingIntent contentIntent = PendingIntent.getActivity(this.getApplicationContext(), 0, null, 0);
notification.setLatestEventInfo(this.getApplicationContext(), "YoutubeDownloader", "The video is downloading...", contentIntent);
notifyMngr.notify(0, notification);
}
}
</code></pre>
<p>And I have code for main Activity:</p>
<pre><code>package com.bba.droid;
import android.app.Activity;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.util.Log;
public class DroidTestActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Intent service=new Intent();
service.setClass(this, AlertsMonitorService.class);
this.startService(service);
}
}
</code></pre>
<p>But service doesn't create a notification in status bar. Where have I made mistake? </p>
|
java android
|
[1, 4]
|
3,774,463
| 3,774,464
|
mouse click somewhere else on page (not on a specific div)
|
<p>I want to close a little pop-up box in page when user has clicked anywhere on the page other than box area. how to find it?</p>
|
javascript jquery
|
[3, 5]
|
3,382,523
| 3,382,524
|
More efficient way script the heights of DIVs
|
<p>Im using this script to find the height of a DIV. I am using it on more than one DIV.
Is there a more efficient way to write this code?</p>
<pre><code>$(document).ready(function() {
$(".block00").height($(".subheader").height());
$(".block01").height($(".subheader").height());
$(".block02").height($(".subheader").height());
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
4,514,697
| 4,514,698
|
How do I use JQuery or JavaScript to remove all links in a table?
|
<p>I have a table that I would like to export to Excel but I don't want any of the hyperlinks to come through. Is that possible?</p>
<p>I noticed that something similar was being done in the thread
<a href="http://stackoverflow.com/questions/6098958/jquery-remove-images">JQuery remove images</a> but I don't thing it quite the same as what I need?</p>
<p>I would also like to keep the text within the tag if possible?</p>
<p>Example: </p>
<pre><code><table class="surveyTable" id="Summary">
<tr>
<th>Section</th>
<th title="3584">
<a href="test.php?id=3584">
Call 1
</a>
</th> ...
</code></pre>
<p>I would like to have the ability to export the above without the href yet retaining the "Call 1" but maybe this is not possible?</p>
<p>Thanks!</p>
|
javascript jquery
|
[3, 5]
|
28,725
| 28,726
|
How to investigate why Session() expired and let users know
|
<p>How to investigate what is causing Session expiry?
I would like to give some advise to end-users who have the following problem with our website:</p>
<pre><code>If Session("xxxx") Is Nothing Then say something.. WHY??
</code></pre>
<p>Can I add something to web.config to make sessions last longer or should I read the IIS log files to see why this happens?</p>
|
c# asp.net
|
[0, 9]
|
4,723,971
| 4,723,972
|
how can I allow the user to click only 3 times on a button in jquery?
|
<p>I'm trying to make a little rock paper scissors game. for that I've written a small javascript in jquery. the whole thing should work like this: user presses button, an ajax event is fired, the selected option is added to a div and a counter increments. but only 3 times! I can't figure it out to work like this... here's my code</p>
<pre><code>if (counter <= 3){
$('.buStein1').click(function(event){
$.post("game.php", { uid: "<?php echo $user['id']?>", choice: "stein", runde: counter });
$('#choiceContainer').append(stein);
counter++;
});
$('.buSchere1').click(function(event){
$.post("game.php", { uid: "<?php echo $user['id']?>", choice: "schere", runde: counter });
$('#choiceContainer').append(schere);
counter++;
});
$('.buPapier1').click(function(event){
$.post("game.php", { uid: "<?php echo $user['id']?>", choice: "papier", runde: counter });
$('#choiceContainer').append(papier);
counter++;
});
}
else {
$('#choiceContainer').text('no clicking possible');
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
886,046
| 886,047
|
JS var function
|
<p>Please take a look at following code:</p>
<pre><code>var test = {
test2 : {
variable: 'hello world',
test3: {
test4 : test.test2.variable
},
echo : function() {
alert(test.test2.test3.test4);
}
}
};
test.test2.echo();
</code></pre>
<p><a href="http://jsfiddle.net/RUgA4/" rel="nofollow">jsfiddle</a></p>
<p>Why can't test4 access the variable:</p>
<pre><code>test4 : test.test2.variable
</code></pre>
<p>Please feel also free to modify my title, I couldn't find a better one.</p>
<p>Thank you!</p>
|
javascript jquery
|
[3, 5]
|
3,886,263
| 3,886,264
|
Finding duplicate points within an arraylist of points
|
<p>I'm trying to delete all the duplicate points within two array lists. Each list is created by finding which country links to which country, if they link then it creates a new point in both arrays at the same time.</p>
<p>The idea is so that I can loop though the size of both arrays (Or size of one) and draw lines between the points.</p>
<p>Problem at the moment is that it's not deleting the points or it deletes them all.</p>
<p>I have the following Arrays</p>
<pre><code>//Different values of course.
Array1 = [Point[1,5]],[Point[1,5]],[Point[1,5]][Point[1,5]]
Array2 = [Point[1,5]],[Point[1,5]],[Point[1,5]][Point[1,5]]
</code></pre>
<p>Here's the code that deletes the duplicate arrays out:</p>
<pre><code>private ArrayList<ArrayList<Point>> checkDuplicatePoints(ArrayList<Point> Array1, ArrayList<Point> Array2)
{
for(int index1 = 0; index1 < Array1.size(); index1++)
{
for(int index2 = 0; index2 < Array2.size(); index2++)
{
//So not the same position in the list.
if(index1 != index2)
{
if(
Array1.get(index1).x == Array2.get(index2).x &&
Array1.get(index1).y == Array2.get(index2).y
)
{
Array1.remove(index1);
Array2.remove(index2);
checkDuplicatePoints(Array1, Array2);
}
}
}
}
ArrayList<ArrayList<Point>> n2DPointArray = new ArrayList<ArrayList<Point>>();
n2DPointArray.add(Array1);
n2DPointArray.add(Array2);
return n2DPointArray;
}
</code></pre>
|
java android
|
[1, 4]
|
203,735
| 203,736
|
JQuery autosuggest plugin to do the following?
|
<p>I'm looking for an auto suggest plugin that'll allow me to programmatically update the suggested results. I found a plugin which is almost perfect in terms of functionality.. <a href="http://code.drewwilson.com/entry/autosuggest-jquery-plugin" rel="nofollow">http://code.drewwilson.com/entry/autosuggest-jquery-plugin</a> it does everything else I need it to (multiple queries, comma separation, etc.) </p>
<p>however, I can't seem to keep updating the list of suggested result as it doesn't appear to have that functionality. Does anyone know of a plugin similar to the one above which supports the additional functionality I require?</p>
|
javascript jquery
|
[3, 5]
|
5,623,637
| 5,623,638
|
Disabling a button doesn't fire click event on server side
|
<p>I have an imagebutton in my aspx page like:</p>
<pre><code><asp:ImageButton ID="btnProcessPayment" ImageUrl="~/Images/process-payment.png" OnClientClick="return disableButton(this);"
runat="server" OnClick="btnProcessPayment_Click" />
</code></pre>
<p>This is my javascript function:</p>
<pre><code>function disableButton(button) {
button.disabled = true;
return true;
}
</code></pre>
<p>As you can see in my javascript event handler I have disabled the button to prevent the user from click the button twice. However, even my server side event handler doesn't get fired due to this. What am I doing wrong?</p>
<p><strong>Note:</strong> If I comment out this line <code>button.disabled = true;</code> all works out pretty well.</p>
|
c# javascript asp.net
|
[0, 3, 9]
|
4,647,516
| 4,647,517
|
Android - java.lang.NoClassDefFoundError: android.Maps.HomeScreen
|
<p>I have just opened my code from a few weeks off and now it doesn't seem to work. I have a splash screen on open, which then moves to the home screen. The splash screen works, but when trying to move to the home page it falls over saying <code>No Class Def Found</code>. What does this mean and how can i fix it?</p>
<p>It says the problem is found with the below code which is in the splash screen class:</p>
<pre><code> public void run()
{
//Finish the splash activity so it can't be returned to.
SplashScreen.this.finish();
// Create an Intent that will start the main activity.
Intent mainIntent = new Intent(SplashScreen.this, HomeScreen.class);
SplashScreen.this.startActivity(mainIntent);
}
</code></pre>
|
java android
|
[1, 4]
|
4,533,432
| 4,533,433
|
animation pausing in jquery slider
|
<p>am using jquery roundrr plugin. I want to stop the animation on mouseover and resume on mouseout, on the roundrr_container div. I tried to edit the code but could not get it done. Can you please help me with this.</p>
<p>the code is here</p>
<p><a href="https://github.com/addyosmani/jquery-roundrr/blob/master/demos/demo3/index.html" rel="nofollow">https://github.com/addyosmani/jquery-roundrr/blob/master/demos/demo3/index.html</a></p>
<p>and the jquery script is here</p>
<p><a href="https://github.com/addyosmani/jquery-roundrr/blob/master/demos/demo3/js/app.js" rel="nofollow">https://github.com/addyosmani/jquery-roundrr/blob/master/demos/demo3/js/app.js</a></p>
<p>pls help me</p>
|
javascript jquery
|
[3, 5]
|
5,027,886
| 5,027,887
|
.Click work with id?
|
<p>I have just started using JQuery, and i know you can use <code>.click</code> with a <code>class</code> but can you use .click using <code>id</code> as the trigger ? I have had a look around but i can't find any information on triggers. </p>
|
javascript jquery
|
[3, 5]
|
3,026,665
| 3,026,666
|
Return array from JSON file with JQuery?
|
<p>I have a JSON file that contains the following:
[{name:joe,number:4},{name:ralph,number:76}]</p>
<p>Simply put, I'm trying to create a function that returns that as an array:</p>
<pre><code>function createArray(){
x = $.getJSON("/names.json", function(json) {
var myArray = [];
$.each(json, function() {
myArray.push(json);
});
return myArray;
});
return x;
}
</code></pre>
<p>This is not working, I'm not sure what part of it doesnt make sense</p>
|
javascript jquery
|
[3, 5]
|
3,021,652
| 3,021,653
|
Combine JS function mouseup
|
<p>I want to combine JS functions, but that's not working. Does someone have a suggestion for my code?</p>
<pre><code>$(document).ready(function(){
$(".searchs").keyup(function() {
var searchbox = $(this).val();
var dataString = 'searchword='+ searchbox;
if(searchbox=='') {
$("#display").hide();
} else {
$.ajax({
type: "POST",
url: "searchs.php",
data: dataString,
cache: false,
success: function(html) {
$("#display").html(html).show();
}
});
}
return false;
});
$(".searchs").focus(function(){
var seachbox = $(searchbox).val();
if(seachbox != '') {
$("#display").show();
}
});
});
$(document).mouseup(function(e) {
if ($("#display").is(":visible") && $(e.target).parents$("#display").length == 0) {
$("#display").hide();
}
});
</code></pre>
<p>For reference, I got that script from <a href="http://jsfiddle.net/bqQqN/15/" rel="nofollow">http://jsfiddle.net/bqQqN/15/</a>. What I want to do is to add the mouseup function to my code. Anyone?</p>
|
javascript jquery
|
[3, 5]
|
2,234,249
| 2,234,250
|
how to download files from tomcat server
|
<p>I am using Eclipse. So I have <code>BOOKS</code> folder under <code>WEb-INF</code>. I want to download the files through my Android application. So how do I give the Url path? I have given: <code>"http://adaptive:8080/BOOKS/pdftest.pdf"</code>.</p>
<p>But it is giving <code>filenotFoundException</code>. So what should the url be?</p>
|
java android
|
[1, 4]
|
4,223,531
| 4,223,532
|
using selected text in asp.net textbox
|
<p>I have a textbox that has regular text in it. I want a user to be able to select a word and create a hyperlink from that word. I will be doing this by basically using that word and replacing it with an a tag and adding url info. My question is how can I get the users selected text from c# code behind. I saw something about selectedtext but that only works for windows forms textbox. Any ideas?</p>
<p>thanks,</p>
|
c# asp.net
|
[0, 9]
|
813,814
| 813,815
|
jQuery Plugin: Limiting script tag references to other libraries
|
<p>I am about to create a jQuery plugin but I was thinking of using a few other libraries. Now for it to be easy to use I was wondering if there are ways to limited the amount of script tag references I have to add. </p>
<p>Few options I was considering:</p>
<p>1: Include the library code into the plugin code. Not sure if this is viable? It will increase the size of the plugin.</p>
<p>2: I just read about google.loader so I don't know a lot about it yet. Seems like a way you can load libraries from inside your code using Google API. It does require an API key though so this might not be for everybody.</p>
<p>So StackOverflow, how do you deal with this problem?</p>
|
javascript jquery
|
[3, 5]
|
2,174,244
| 2,174,245
|
Data list binding with some text and validating datalist
|
<p>I am using this code for datalist validation.</p>
<p>I am binding the image in datalist after that i am trying to give the caption to each image suppose there is 3 image is datalist then for the first image i am able to give but for the other one i am unable to.. i think there is some error in conditions help me in this. code is following..</p>
<pre><code>if (DataList1.Items.Count == 0)
{
msgError.Text = "Please add images and captions for each image";
msgError.Focus();
}
else
AddCaption();
bool IsEmptyCaption = false;
Hashtable htble = (Hashtable)ViewState["imgIdCapHtbl"];
List<int> imgIds = (List<int>)ViewState["imgIds"];
if (htble != null && imgIds != null)
{
foreach (int id in imgIds)
{
if (htble[id] == "")
{
IsEmptyCaption = true;
break;
}
else
IsEmptyCaption = false;
}
}
else
IsEmptyCaption = true;
if (DataList1.Items.Count == 0)
{
msgError.Text = "Please add images";
msgError.Focus();
}
else if (IsEmptyCaption)
{
msgError.Text = "Please add captions for each image";
msgError.Focus();
}
else
{
Args[0] = "Section1";
Args[1] = "";
Args[2] = FindingId.ToString();
Args[3] = FindingIdIns.ToString();
AnotherHeading = false;
//AddCaption();
objGetBaseCase.UpdateImageCaptions((Hashtable)ViewState["imgIdCapHtbl"]);
if (AddFindingsViewerDetails != null)
AddFindingsViewerDetails(Args, e);
ClearImages();
PageContent pg = (PageContent)this.Parent.FindControl("PageContent");
if (pg != null)
pg.LoadWorkflowForCase();
if (Display != null)
Display(null, EventArgs.Empty);
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
2,671,175
| 2,671,176
|
Unbinding input type file button with jquery doesn't work
|
<p>I have an input type file element:</p>
<pre><code><input type="file" name="val1" />
</code></pre>
<p>And jquery:</p>
<pre><code>$("input[name='val1']").off("click");
</code></pre>
<p>But the above JS script (already included in <code>$(function() { });</code> block) doesn't work, means I can click on <code>Browse...</code> button. I want to disable it or disable click event on this input element.</p>
<p>What's the mistake with my jquery code ? Or it is not possible ?</p>
<p>Thanks</p>
|
javascript jquery
|
[3, 5]
|
4,762,069
| 4,762,070
|
Explanation needed on boolean methods return
|
<p>I've been looking through some code from a decompiled APK file and ran across this syntax for returning a boolean condition that I haven't seen before. Anyone have an explanation on how this works?</p>
<pre><code>public static boolean is2G(NetworkType paramNetworkType)
{
if ((EDGE.equals(paramNetworkType)) || (IDEN.equals(paramNetworkType)) || (CDMA.equals(paramNetworkType)) || (GPRS.equals(paramNetworkType)));
for (int i = 1; ; i = 0)
return i;
}
</code></pre>
|
java android
|
[1, 4]
|
4,046,920
| 4,046,921
|
How to get the href of a link using jquery?
|
<p>I have a simple jquery code:</p>
<pre><code>$(function(){
$('#note_pag a').click(function(){
alert('click');
return false;
});
});
</code></pre>
<p>and this is the html code:</p>
<pre><code><div id="note_pag">
<ul>
<li><a href="1">1</a></li>
<li><a href="2">2</a></li>
<li><a href="3">3</a></li>
<li><a href="4">4</a></li>
</ul>
</div>
</code></pre>
<p>my question is: how can i get the href of the link clicked from the user?</p>
<p>Thanks</p>
|
javascript jquery
|
[3, 5]
|
4,288,049
| 4,288,050
|
Keep the text of the text box through a PageLoad();
|
<p>I am wondering How i can keep the text of my textbox even if i have to make a new page load, clicking on an hyperlink.</p>
<p>It's always an empty string.</p>
<p>Can someone help me ? </p>
<pre><code> lkForgotten.NavigateUrl = string.Format("Logon.aspx?forgotten={0}", "");
lkSend.NavigateUrl = string.Format("Logon.aspx?forgotten={0}&userEmail={1}", "submited", txtForgotten.Text);
try
{
if (Request.QueryString["forgotten"].ToString() == "")
{
txtForgotten.Visible = true;
lkSend.Visible = true;
}
if (Request.QueryString["forgotten"].ToString() == "submited")
{
userEmail = txtForgotten.Text;
SendForgottenPassword(userEmail);
}
}
catch { }
</code></pre>
|
c# asp.net
|
[0, 9]
|
3,685,867
| 3,685,868
|
jquery issue with on and live
|
<p>I have the following code:</p>
<pre><code>var $reviewButton = $('span.review_button');
$reviewButton
.live('click',
function(){
$('#add_reviews').show();
}
)
</code></pre>
<p>Later in the script, I use an AJAX call to load some content and another instance of $('span.review_button') enters the picture. I updated my code above to use '.live' because the click event was not working with the AJAX generated review button. </p>
<p>This code works, as the .live(click //) event works on both the static 'span.review_button' and the AJAX generated 'span.review_button'</p>
<p>I see however that .live is depracated so I have tried to follow the jquery documentations instructions by switching to '.on' but when I switch to the code below, I have the same problem I had before switching to '.live' in which the click function works with the original instance of 'span.review_button' but not on the AJAX generated instance:</p>
<pre><code>var $reviewButton = $('span.review_button');
$reviewButton
.on('click',
function(){
$('#add_reviews').show();
}
)
</code></pre>
<p>Suggestions?</p>
|
javascript jquery
|
[3, 5]
|
4,806,366
| 4,806,367
|
Change the sequence of background images
|
<p>I have this JavaScript function to display a sequence of background images.
What I want is to change to sequence for every page with php. In this case I want to substitute the x in bg_x_ps.jpg with a number in the range of 1 to 8.
Each background must have an unique number. </p>
<pre><code>$.vegas( 'slideshow', {
delay: 34000,
backgrounds: [
{ src: "http://sionvalais.com/images/bg_2_ps.jpg", fade: 4000 },
{ src: 'http://sionvalais.com/images/bg_4_ps.jpg', fade: 4000 },
{ src: 'http://sionvalais.com/images/bg_5_ps.jpg', fade: 4000 },
{ src: 'http://sionvalais.com/images/bg_7_ps.jpg', fade: 4000 }
]
} )( 'overlay' );
</code></pre>
|
php javascript jquery
|
[2, 3, 5]
|
5,758,966
| 5,758,967
|
Get first two digits of a string, support for negative 'numbers'
|
<p>I have the following strings in JavaScript as examples:</p>
<pre><code>-77.230202
39.90234
-1.2352
</code></pre>
<p>I want to ge the first two digits, before the decimal. While maintaining the negative value. So the first one would be '-77' and the last would be '-1'</p>
<p>Any help would be awesome!</p>
<p>Thank you.</p>
|
javascript jquery
|
[3, 5]
|
1,417,407
| 1,417,408
|
ListFragment how to get the listView?
|
<p>I'm porting my app from AsyncTasks to Fragements.</p>
<p>But how can I access the listView (id: list) element within my fragment?</p>
<pre><code>class MyFragment extends ListFragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.list_fragment, container, false);
ListView listView = getListView(); //EX:
listView.setTextFilterEnabled(true);
registerForContextMenu(listView);
return v;
}
}
</code></pre>
<p>xml:</p>
<pre><code> <ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</ListView>
</code></pre>
<p>Ex:</p>
<pre><code>Caused by: java.lang.IllegalStateException: Content view not yet created
</code></pre>
|
java android
|
[1, 4]
|
3,122,826
| 3,122,827
|
Implement a short pause before jquery animation
|
<p>Im writing a simple jquery menu system that shows / hides a DIV on mouse over a text link.</p>
<p>I want to implement a short pause before the slide happens, so that the menue doesnt drop down if the mouse just flies over the menu link.</p>
<p>this is how i currently activate the menu:</p>
<pre><code><script type="text/javascript"><!--
$('#aboutLink').mouseover(function() {$('#aboutMenu1').slideDown('fast');
$('#aboutLink').css("color", "#ff297b");});
--></script>
</code></pre>
<p>So in effect what i need to do is on mouseover, wait say 300ms, then, IF the mouse is STILL over the link, do the animation.</p>
|
javascript jquery
|
[3, 5]
|
1,704,718
| 1,704,719
|
Using jQuery.on() vs. loading script when content loads
|
<p>When loading content inside of a modal box or lightbox, is it better to hook up needed events and scripts through the use of <code>jQuery.on()</code>, or have it load with the content by a script tag?</p>
<p>For example, with the <code>.on()</code> solution:</p>
<pre><code>$('#blah').on('load', function() {
$('#something').click(function() { alert('Hi'); });
});
</code></pre>
<p>And then when the modal box was loaded, it would call <code>$('#blah').trigger('load')</code></p>
<p>Or, just simple have the the script loaded in with the HTML as in:</p>
<pre><code><div id="blah">
<a href="#" id="something">Something</a>
</div>
<script src="/js/blah.js"></script>
</code></pre>
<p>With blah.js containing the javascript code above involving setting up the click event on #something. I've used the <code>.on()</code> method for a while, but I wasn't sure if this was the best way to handle this.</p>
|
javascript jquery
|
[3, 5]
|
4,032,238
| 4,032,239
|
Creating 2D Bounding Box's
|
<p>how would I create a bounding box around a object if I am using the canvas surfaceview? Would I have to do it in the object class? Inside of my view class? Any help is highly appreciated. Thanks in advance.</p>
|
java android
|
[1, 4]
|
2,186,913
| 2,186,914
|
The operator | is undefined for the argument type(s) boolean, void
|
<p>Hi i just keep getting that error and im kind of a newbie and dont know wahats going on. Thanks for the help in advance</p>
<pre><code> if(txtvi1.getText().toString().equals("") | txtvi2.getText().toString().equals("") | txtvi3.getText().toString().equals("") | txtvi4.getText().toString().equals("")| txtvi5.getText().toString().equals("") | txtvi6.getText().toString().equals("") | txtvi7.getText().toString().equals("") | txtvi8.getText().toString().equals("") | checkbx1.setChecked(false)) {
Toast.makeText(getApplicationContext(), string, 5000).show();
} else {
Toast.makeText(getApplicationContext(), string2, 5000).show();
}
</code></pre>
<p>So the error is in the checkbox i just want the toast to appear if any of the textview are empty or if the checkbox is unchecked.
If it is possible how can i do it?</p>
|
java android
|
[1, 4]
|
3,439,884
| 3,439,885
|
Forcing custom 404 pages for pages in URL Routing
|
<p>Coding Platform ASP.NET 4.0 WebForms on IIS7.5</p>
<p>If I request a page <code>blahblah.aspx</code> which does not exist, I get navigated to my custom error page for Page not found Exception. I have implemented URL routing and so I have omitted all my .aspx extensions for routes.</p>
<p>Now, If I type<code> www.mysite.com/blahblah</code> (thats a url without extension) instead of going to my custom error page, it gets redirected to my IIS 404 error page. </p>
<p>What should I do to make my custom error page appear on my site instead of IIS error page?</p>
|
c# asp.net
|
[0, 9]
|
3,575,686
| 3,575,687
|
jquery context menu plugin
|
<p>I'm using the context menu plugin, it works, but everytime an ajax load event starts the effect of the context menu isn't showing, the menue no more is valid.</p>
<pre><code> $("").contextMenu({
menu: 'myMenu'
},
function(action, el, pos) {
switch (action) {
case "option":
{
$.post("", {}, function() {
$().load();
});
break;
}
}
});
</code></pre>
<p>Here is te menue code, and when the load in the ajax post start the menue dissapear.</p>
|
javascript jquery
|
[3, 5]
|
1,163,768
| 1,163,769
|
how to convert string in int type in C#
|
<p>i am taking string value from textbox name txtLastAppointment no. and
want to convert it to int and then store it in databse using Linq to sql but i am getting error "input string was not in proper format"</p>
<p>my Input string is 2.</p>
<p>My Code is.</p>
<pre><code> objnew.lastAppointmentNo=Convert.ToInt32(txtLastAppointmenNo.Text);
</code></pre>
<p>please point out my mistake.
Thanks..</p>
|
c# asp.net
|
[0, 9]
|
5,091,345
| 5,091,346
|
Maybe I've lost the plot, but why is this small piece of JavaScript not working?
|
<p>I want a generic error handler for my forms</p>
<pre><code>var errorsBox = function() {
var $errorBox = $('#form-error');
return {
add: function(errors) {
if ($errorBox.length === 0) {
$errorBox = $('<div id="form-error"><ul></ul></div>').appendTo('form');
};
$errorBox.find('ul > li').remove();
$.each(errors, function(i, error) {
$errorBox.find('ul').append('<li>' + error + '</li>');
});
}
};
};
</code></pre>
<p>You can play with it on <a href="http://jsbin.com/aloya4/edit" rel="nofollow">JSbin</a>.</p>
<p>I'm getting</p>
<blockquote>
<p>errorsBox.add is not a function</p>
</blockquote>
<p>I'm sure it's really obvious, but I can't seem to understand why this might not be working.</p>
<p>What have I done wrong?</p>
<p>Thanks!</p>
|
javascript jquery
|
[3, 5]
|
4,115,181
| 4,115,182
|
Getting DataList selected item in a text box
|
<p>I have a DataList on my webpage that is populated by <code>ItemTemplate</code>. Each <code><tr></code> in ItemTemplate has a LinkButton with <code>CommandName=Select</code>. When the user clicks on the link button, the corresponding text should appear in the TextBox below.</p>
<p>Inside the ItemTemplate, each row also has a label control which I have put up to be able to be able to find the control and typecast.</p>
<p>Inside the properties window, I am not able to locate the <code>AutoPostBack</code> property. <br/>
What event has to be used in this case? Would the SelectedIndexChanged serve the purpose? </p>
<p>How do I find the corresponding data from this row and assign it to my textbox?</p>
|
c# asp.net
|
[0, 9]
|
3,063,622
| 3,063,623
|
How to set the dropdownlist value?
|
<p>I am using this technique: <a href="http://stackoverflow.com/questions/2670327/is-there-a-way-to-hold-the-values-lost-in-postback">http://stackoverflow.com/questions/2670327/is-there-a-way-to-hold-the-values-lost-in-postback</a></p>
<p>After it does the postback, how do I set which item is selected?
<br>
$(document).ready(function() { <br></p>
<pre><code> if (document.getElementById("txtHidData").value != "")<br>
$("#country").val(document.getElementById("txtHidData").value);<br>
//or<br>
//$("#country")[0].selectedIndex = document.getElementById("txtHidData").value;<br>
</code></pre>
<p>Does not work either way, any help? Thanks.<br></p>
<p><strong>EDIT:</strong></p>
<p>$("#country").change(function() {</p>
<pre><code> debugger
var _selected = $("#country option:selected").val();
document.getElementById("txtHidData").value = "";
document.getElementById("txtHidData").value = _selected;
// $("#txtHidData").value = _selected;
</code></pre>
<p>....</p>
|
javascript jquery
|
[3, 5]
|
1,190,584
| 1,190,585
|
Android emulator queues clicks?
|
<p>The problem i'm facing at the moment is that the android emulator seems to queue the clicks i do on the button below. If i click in a regular speed, it's no problem what so ever. But whenever i so to say, spam-click the button, it seems that it recieves all clicks and does that number of operations. </p>
<p>Example:
The array is 5 values long, if i stand on index 5 and click on the backbutton 4 times very fast, i end up at index 1, but if i stand at index 2 and spam-clicks three times, it throws
<code>java.lang.ArrayIndexOutOfBoundsException</code></p>
<p>code as follows:</p>
<pre><code> ButtonGoBack.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
// here i set it disabled to prevent mass clicks/taps/touches.
ButtonGoBack.setEnabled(false);
enumCounter--;
temporaryValue = values[enumCounter];
doSomething(temporaryValue);
// hides button
if(enumCounter== 0)
{
ButtonGoBack.setVisibility(4);
}
}
});
</code></pre>
<p>100~ or so code-lines after.</p>
<pre><code>ButtonGoBack.setEnabled(true);
</code></pre>
<p>does not seem to do the trick. </p>
<p>any suggestions how to do this in a different manner?</p>
|
java android
|
[1, 4]
|
441,977
| 441,978
|
Problem showing loader GIF in Internet Explorer
|
<p>I'm trying to show a <a href="http://www.ajaxload.info/" rel="nofollow">loader gif</a>, on a jquery dialog(with no title bar of course) after a user clicks submit on a form.</p>
<p>After doing a couple of thing I came up with this: <a href="http://jsfiddle.net/edaloicaro18/K2tv4/23/" rel="nofollow">demo</a> ,and said to myself "Finally! Success!", but when I tested it on IE (I usually use Chrome),much to my disappointment, the animation (loader.gif) didn't seem to be that animated, I mean it looked like a static image and I don't know why it works so fine in FF, Chrome and safary and it simply doesn't work in IE.</p>
<p>I know that gif works wonders on the jsfiddle , even If you use IE, but for some reason when I do the same on my project it doesn't :(</p>
<p>PS:I have no problem if you have another way of doing the same thing, as long as it also works in IE</p>
<p>Hope you can help me out with this.</p>
|
javascript jquery
|
[3, 5]
|
3,434,956
| 3,434,957
|
How to check Android EditText integer value?
|
<p>I'm trying to make an app that would calculate the income tax of a given person. There is an EditText field where the user must point out his monthly wage and then it's being calculated in the MainActivity.java. The problem is - when I try to do some maths using the given input field, an error <code>The operator * is undefined for the argument type(s) EditText, double</code> shows up.</p>
<pre><code>wage = (EditText) findViewById(R.id.wage);
submit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
wageAfterTax = wage * 0.25;
result.setText("Your wage after tax deductions is " + wageAfterTax);
}
});
</code></pre>
<p>Can you please suggest what to do?</p>
|
java android
|
[1, 4]
|
5,449,403
| 5,449,404
|
how can get only numbers from the text using jquery
|
<p>I want to get only the numbers(123) not the text(confirm), here is my code</p>
<pre><code><p>123confirm</p>
<script type="text/javascript">
$(document).ready(function(){
$(p).click(function(){
var sd=$(this).text();
alert(sd);
});
});
</script>
</code></pre>
|
javascript jquery
|
[3, 5]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.