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,648,338 | 2,648,339 |
where does the Editable.append() implemented?
|
<p>Here is the code :</p>
<pre><code>Editable text = (Editable)mResults.getText(); //mResults is a TextView.
</code></pre>
<p>I want to know, when i call <code>text.append("***")</code>,which implements is called? I can't find where the Editable interface is implemented.</p>
|
java android
|
[1, 4]
|
1,404,902 | 1,404,903 |
HTML File Upload Control Problem in Asp.net 2003
|
<p>hi im using html File Upload Control in Asp.net 2003 version...whenever I try to upload the file its working fine...but suppose I upload the file then I click any radio button or any other button, fileupload control value is automatically erased..so I cannot upload the file successfully...anybody help me...</p>
|
c# asp.net
|
[0, 9]
|
4,689,939 | 4,689,940 |
Exchange rate of variable currency in a variable Date in C#
|
<p>Hi Anyone knows any free Web service which can give me ability to convert my variable currency of into different currency in a variable date. I have tested this web service (http://www.webservicex.net/CurrencyConvertor.asmx) but it is not giving me option for previous date.
Please guide me!</p>
<p>Kind Regards
Syed Sana ul Haq Fazli </p>
|
c# asp.net
|
[0, 9]
|
3,879,543 | 3,879,544 |
unable to remove the validation classes while clicking the cancel option in dialog box
|
<p>hello i'm using <a href="http://www.position-relative.net/creation/formValidator/demos/demoValidators.html" rel="nofollow">these validation</a> for my application. these works fine, when i'm using these in dialog box it works but after showing validations and pressing cancel the validations remains appear in the back-end page. Suggest some alternative like removeClass() on clicking the cancel option in my dialog box.</p>
|
javascript jquery
|
[3, 5]
|
1,118,925 | 1,118,926 |
How To Add Url To Google by code
|
<p>i want add a url via code in google that must be added at this <a href="http://www.google.com/addurl/?continue=/addurl" rel="nofollow">page</a>. any help?</p>
|
c# asp.net
|
[0, 9]
|
1,762,994 | 1,762,995 |
jQuery param dynamic object name
|
<p>why can't i have a variable in an object? I get an error like: </p>
<pre><code>"Uncaught SyntaxError: Unexpected token this"
</code></pre>
<p>My code is like this.</p>
<pre><code>$("#search_options input:checkbox").on('click', function() {
var params = {
$(this).attr('name') : $(this).val(),
};
var str = jQuery.param(params);
});
</code></pre>
<p>I'm sure that $(this) is working because I tried to console.log it outside the params object then i is working.</p>
|
javascript jquery
|
[3, 5]
|
5,827,039 | 5,827,040 |
What would be java equivalent code for this C# code?
|
<p>I am not sure how to implement this C# code into java? Dev is class that has this code.</p>
<pre><code> public enum ConfigSetupByte0Bitmap
{
Config5VReg = 0x80,
ConfigPMux = 0x40,
}
public void SetVReg(bool val)
{
//vReg = val;
if (val)
{
configSetupByte0 |= (int)Dev.ConfigSetupByte0Bitmap.Config5VReg;
}
else
{
configSetupByte0 &= ~(int)Dev.ConfigSetupByte0Bitmap.Config5VReg;
}
}
</code></pre>
|
c# java
|
[0, 1]
|
1,917,699 | 1,917,700 |
jquery - small issue when submitting form
|
<p>I am using the following jquery snippet to display an image on my upload form while it is processing and everything works fine except the image is shown even when the file field is empty so I was wondering how I could change this function to only show the image if the field was not empty.</p>
<p>Thx.</p>
<pre><code><script>
$(document).ready(function() {
$("form").submit(function() {
$("#loadingbox").show();
return true;
});
});
</script>
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,874,478 | 1,874,479 |
Is there automatic formatting for an asp:literal control?
|
<p>Is there a way to automatically format a <code>string</code> for literal insertion into JavaScript code?</p>
<p>Say you have this in your page:</p>
<pre class="lang-html prettyprint-override"><code><script type="text/javascript">
var strvar = <asp:Literal runat="server" id="ltrStrvar"></asp:Literal>;
</script>
</code></pre>
<p>And in your server-side code:</p>
<pre class="lang-csharp prettyprint-override"><code>protected void Page_Load(object sender, EventArgs e) {
ltrStrvar.Text = "hello \"world\"";
}
</code></pre>
<p>Is there a way to <em>automatically</em> have it escape the string and surround it with quotes for error-free insertion into JavaScript, so all I have to do is set the <code>Text</code> property with an arbitrary string? I know how to do it <em>manually</em> but was looking for a more elegant solution.</p>
|
c# asp.net
|
[0, 9]
|
547,672 | 547,673 |
pass php variable via AJAX with jquery
|
<p>I want to send a variable <code>$stuff</code> frome <code>page.php</code> to <code>load.php</code> via POST</p>
<p>I have something like this in javascript</p>
<pre><code>$.post("load.php", {'start': count }, function(data){
$("#posts").append(data);
});
</code></pre>
<p>I know I need to modify {'start': count } but im confused as to how to pass $stuff in since it isn't a javascript variable.</p>
<p>Thanks</p>
|
php javascript jquery
|
[2, 3, 5]
|
6,018,477 | 6,018,478 |
javascript/jquery- how to check, if an element has text attribute or not
|
<p>Is there some way of determining at run time, if an element returns value for element.text() or not? Using javascript or jquery?</p>
<p>I.E. some way of checking if an element is pure text, or it is some other type of element?</p>
<p>Why I need a solution to the above--- </p>
<p>I am trying to parse through some complicated forms with totally different coding styles (in the way, for example, text values for elements of a radio button may be enclosed in label tags, or they may be directly given, or they may be enclosed in span tags, and so on...)</p>
<p>So I need to parse the form with the form id as wrapper, </p>
<p>now if the text value for a radio button is enclosed in span, and current selected element is radio button, then next element will be the span tag (opening) which I want to do nothing with and move on. The one after that will be the text, and this I want to obtain using this.text().</p>
<p>Hence the whole question...</p>
|
javascript jquery
|
[3, 5]
|
274,428 | 274,429 |
calling a php from javascript as src file
|
<p>i have a question
when a .php file called as a javascript what dose this mean? and when this is needed to be used ?</p>
<p>ex:</p>
<pre><code><head>
<script src="dir/myphpfile.php" type="text/javascript"></script>
</head>
</code></pre>
|
php javascript
|
[2, 3]
|
2,672,349 | 2,672,350 |
How do I increase a counter by dragging a page element and moving the mouse right or left with JQuery?
|
<p>I need to do something like the Apple <a href="http://www.apple.com/iphone/gallery/" rel="nofollow">website gallery</a> (the 360° iPhone view).
So I need to increase or decrease a counter according to the mouse movement after the onclick event (dragging) so I'll be able to load the right image (ending with an incremental number).</p>
<p>Is there any way to do this?
If I didn't explain it well just let me know, thank you.</p>
|
javascript jquery
|
[3, 5]
|
3,959,346 | 3,959,347 |
How to create instance of a class only once in asp.net
|
<p>A instance of a class is created in the partial class of an aspx page.Under page_load or button click method I'm trying to set the value to the class. but when each postback takes place new instance is created and I'm losing the previous value. </p>
<pre><code>public partial class DatabaseSelection : System.Web.UI.Page
{
DBProperties dbpro;
Metadata obmeta;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
dbpro = new DBProperties();
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
3,627,682 | 3,627,683 |
Jquery camera in save mode does not save file
|
<p>When using <a href="http://www.xarg.org/project/jquery-webcam-plugin/" rel="nofollow">jquery camera</a> in "save" mode, it seems to have no effect. I tried calling the url in "webcam.save" manually, it it worked fine. It seems that jquery camera is not working correctly. Does anyone have any ideas?</p>
<pre><code><!DOCTYPE html>
<html>
<head>
<title>Registration</title>
<script type="text/javascript" src="http://localhost/ra/js/jquery.js"></script>
<script type="text/javascript" src="http://localhost/ra/js/jquery.webcam/jquery.webcam.js"></script>
</head>
<body>
<h1>Register</h1>
<h4>Picture</h4>
<div id="picture"></div>
<input type="button" id="take_picture" value="Take Picture" />
</body>
</html>
<script type="text/javascript">
$("#picture").webcam({
width: 320,
height: 240,
mode: "save",
swffile: "http://localhost/ra/js/jquery.webcam/jscam.swf",
onTick: function() {},
onSave: function() {},
onCapture: function() {},
debug: function() {},
onLoad: function() {}
});
$("#take_picture").click(function()
{
webcam.save("http://localhost/ra/index.php/registration/do_upload_picture");
});
</script>
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,943,183 | 1,943,184 |
javascript variable scope across functions jQuery involved
|
<p>Here is what i cannot get to work - in mouseMove this.mouseX is undefined. I need the mouseX and mouseY (e.pageX in code) from mousemove event.</p>
<pre><code>function myClass () {
var mouseX=x;
var mouseY=y;
$(document).mousemove(this.mouseMove);
}
myClass.prototype.mouseMove = function(e){
this.mouseX=e.pageX;//not a good idea but you can alert this
}
var a=new myClass();
</code></pre>
<p>Can i get that event passed to the supposed class instance or there is no way to get it done?</p>
<p>I should also mention i am trying to avoid global scope variables here.</p>
|
javascript jquery
|
[3, 5]
|
5,685,636 | 5,685,637 |
Sending Mail with an attachment using SMTP
|
<pre><code>protected void Button1_Click(object sender, EventArgs e)
{
var fromAddress = new MailAddress(fromid.Text, fromname.Text);
var toAddress = new MailAddress(toid.Text, toname.Text);
string fromPassword = pswd.Text;
string subject = subjectbox.Text;
string body = bodybox.Text;
Attachment at = new Attachment(Server.MapPath("~/Penguins.jpg"));
var smtp = new SmtpClient
{
Host = "smtp.gmail.com",
Port = 587,
EnableSsl = true,
DeliveryMethod = SmtpDeliveryMethod.Network,
Credentials = new NetworkCredential(fromAddress.Address, fromPassword),
Timeout = 20000,
};
using (var message = new MailMessage(fromAddress, toAddress)
{
Subject = subject,
Body = body,
IsBodyHtml = false,
})
{
message.Attachments.Add(at);
smtp.Send(message);
}
}
</code></pre>
<p>There is no error but while sending mail it takes some time and shows "Connection TimeOut" and not sending mail...:(
Can any one tell where is the problem. </p>
|
c# asp.net
|
[0, 9]
|
735,009 | 735,010 |
Adding title tag to hyperlinks placed in bulleted list
|
<p>I have a bulleted list set to <code>BulletedListDisplayMode.HyperLink</code> display mode, and it works fine but I cannot find a way to specify the title tag for each hyperlink. Can this be done?</p>
<p>Thanks!</p>
|
c# asp.net
|
[0, 9]
|
1,851,250 | 1,851,251 |
Apply arbitrary shape to a View
|
<p>Is there any way to "shape" a View using a custom path rather than a standard square/oval/etc. shapes?</p>
<p>The high level task is mapping an image of a human body. I want make various areas of it clickable. The idea to use and ImageView to display it the body and then put transparent views on top of it to handle click events. So for instance I would have a view shaped to cover left arm area of the image to catch click event on that arm and nothing else.</p>
<p>If that doesn't work, I was thinking I could use a whole bunch of small square shaped views instead of a single custom shaped one to cover one area, but that seems pretty messy. Or perhaps there is an alternative approach?</p>
|
java android
|
[1, 4]
|
564,912 | 564,913 |
Detect if an user is on the launcher
|
<p>Is it possible to understand programmatically if the user is on the launcher (he's not using other apps or has not other activities opened)?</p>
|
java android
|
[1, 4]
|
3,115,759 | 3,115,760 |
How do I correctly control or do something to placeholder on focus of a forms field?
|
<p>I have a signup form with 3 fields:</p>
<p>Username</p>
<p>Email</p>
<p>Password</p>
<p>On most browsers when a user clicks on a particular field, the placeholder value displayed is blanked out so the user can type and if they type nothing and come out of the field the placeholder text re-appears. Anyway some browsers e.g. chrome don't hide the placeholder text onfocus so I had to write some javascript to take care of this.</p>
<p>I'm quite new to javascript but to me the code I've written to deal with this doesn't seem right. I have a feeling it could be shorter and better.</p>
<p>For each field I have this inside a document ready function:</p>
<pre><code>$("#field_id").focusin(function() {
$(this)[0].placeholder = "";
});
$("#field_id").focusout(function() {
$(this)[0].placeholder = "Enter email";
});
</code></pre>
<p>My html: </p>
<pre><code><p><input class="signupFields" data-validate="true" id="user_username" name="user[username]" placeholder="Username" size="30" type="text" /></p>
<p><input class="signupFields" data-validate="true" id="user_email" name="user[email]" placeholder="Email" size="30" type="text" /> </p>
<p><input class="signupFields" data-validate="true" id="user_password" name="user[password]" placeholder="Password" size="30" type="password" /> </p>
</code></pre>
<p>So imagine that times 3 .. Seems like a lot of code for such a simple requirement. Also I really don't like the fact that I'm trying to mimic javascripts document.getElementById. There must be a way I can do this in a more jQuery like way. Not liking the [0].</p>
<p>Can any body give me an example of a cleaner way of doing this exact same thing?</p>
<p>Kind regards</p>
|
javascript jquery
|
[3, 5]
|
4,741,917 | 4,741,918 |
jQuery .ready() automatically defining variables for each element with ID in DOM
|
<p>I have noticed some unexpected behaviour when using the jQuery <code>.ready()</code> function, whereby afterwards you can reference an element in the DOM simply by using its ID without prior definition:</p>
<pre><code><html>
<script src="jquery.js"></script>
<script>
$(document).ready(function() {
myowndiv.innerHTML = 'wow!'
});
</script>
<body>
<div id="myowndiv"></div>
</body>
</html>
</code></pre>
<p>I would have expected to have to declare and assign <code>myowndiv</code> with <code>document.getElementById("myowndiv");</code> or <code>$("#myowndiv");</code> before I could call <code>innerHTML</code> or anything else on it?</p>
<p>Is this behaviour by design? Can anyone explain why? My fear is that if I don't notice and refactor and end up not using <code>.ready()</code> or even using jQuery at all then my code will fail to execute with lots of <code>undefined</code> errors.</p>
<p>Cheers!</p>
|
javascript jquery
|
[3, 5]
|
3,435,695 | 3,435,696 |
Limit Sum Value of Multiple Input Fields
|
<p>I need some help with javascript or jQuery.</p>
<p>I have three (3) input fields that I want to filter (sum of three fields).</p>
<p>the total value of 3 input fields is must 100. If the user fills more than 100, it will be automatically change the value that the total is 100.</p>
<p>you can see <a href="http://jsfiddle.net/D5F3p/" rel="nofollow">this example</a></p>
<pre><code><input type="text" name="text1" size="3"> text1<br />
<input type="text" name="text2" size="3"> text2<br />
<input type="text" name="text3" size="3"> text3<br />
<p>The maximum value of total 3 fields above is 100.</p>
<pre>example 1 :
text1 : 20;
text2 : 30;
text3 : 50; (will automatically filled with 50 because the total value must 100)</pre>
<pre>example 2 :
text1 : 37;
text2 : 60;
text3 : 3; (will automatically filled with 3 because the total value must 100)</pre>
</code></pre>
<p>Thanks for helping me,
I need it :)</p>
|
javascript jquery
|
[3, 5]
|
465,303 | 465,304 |
Javascript in ASP.NET is not working
|
<p>I'm back at coding som .NET stuff and I thought I'd play with Javascripts / jQuery.<br>
I've added my <code>/js/myscript.js</code> file and it loads when the pages has loaded.</p>
<p>In my js file I only have one call <code>alert('TEST')</code>.</p>
<p>Why isn't the alert triggered?</p>
<p>I'm on ASP.NET 4.0 - but I don' think that has anything to do with it.<br>
Is there a way to detect if there is any conflict with other scripts?</p>
<p>This goes in the header:</p>
<pre><code><script type="text/javascript" src="js/myscript.js" ></script>
</code></pre>
<p>After page is loaded, I can use Firebug and exapnd the script and see it's content. So the script is loaded.</p>
<p><strong>Embarrassing update</strong></p>
<pre><code>jQuery(document).ready(function() {
// Alert if jQuery is loaded
alert('Test1');
}
alert('Test 2');
</code></pre>
<p>As you can see in the above code, I'd forgotten to add the <code>);</code> and the end of the <code>jQuery(document).ready()</code> function.</p>
<p>After a long day, even the simplest things can go unnoticed.</p>
|
javascript jquery asp.net
|
[3, 5, 9]
|
2,371,105 | 2,371,106 |
Does python have automatic resource management?
|
<p>All versions of Java require the user to close resources manually - usually handled in the finally block. Java 7 is about to get <a href="http://www.infoq.com/news/2010/08/arm-blocks" rel="nofollow">ARM</a> (automatic resource management) blocks. </p>
<ol>
<li>Firstly I don't see a finally block concept in python. Or do you close resources in the catch for each raised exceptions ?</li>
<li>Is there a library that performs ARM in python ? If not, then what is the pythonic way to do ARM ?</li>
</ol>
|
java python
|
[1, 7]
|
1,156,450 | 1,156,451 |
detect if the user have an intention to redirect from it's page
|
<p>How can I detect if a user has any intention to leave his current page and redirect to any page from my website is their any javascript function that can handle this event I have more than 25 links in my page </p>
<pre><code><script type="text/javascript">
if(//user clicks a link )
confirm("do you want to continue ?");
</script>
</code></pre>
<p>Is their any javascript function that can check if the user click on any link on the page </p>
|
javascript jquery
|
[3, 5]
|
830,784 | 830,785 |
ASP.NET Learning Path for a PHP Programmer
|
<p>I'm a beginning PHP programmer with little real-world experience (haven't even graduated yet), but I'd like to learn ASP.NET to possibly qualify for twice as many jobs in web development as opposed to knowing just PHP and having seen far too many <code>!== false</code> I love the idea of working with a strongly-typed language. I started using the MVC framework CodeIgniter recently, but I can write PHP without a framework, too. I also like to be in control of my HTML. I read an ASP.NET/C# book a couple of months ago, but somehow Web Forms just don't "click" for me. What approach would you recommend for a PHP programmer to ease into ASP.NET?</p>
|
php asp.net
|
[2, 9]
|
2,287,632 | 2,287,633 |
Jquery variabile change
|
<p>How I can show the second alert from the following code after the first showed?!</p>
<pre><code>var s = 1;
$(document).ready(function(){
if(s == 1 )
{
alert("SIMULATED");
s = 0;
}
else alert (" ok ");
});
</code></pre>
<p>I need to change the s variable to 0 and to show alert("ok") after the first alert showed</p>
|
javascript jquery
|
[3, 5]
|
5,724,899 | 5,724,900 |
dealing with application context
|
<p>I'm new to android and java.</p>
<p>I'm rearranging some of the classes in my app into separate class files. I had a onLocationListener class in my main activity class file. I moved the class to a separate java class file. Then, however the following code will not compile . . .</p>
<pre><code>public void onProviderDisabled(String provider)
{
Toast.makeText( getApplicationContext(),
"Gps Disabled",
Toast.LENGTH_SHORT ).show();
}
</code></pre>
<p>The getApplicationContext won't compile when this code is in a separate file. I tried <em>this.</em> and <em>mainactivityname.</em> but nothing seems to work. So I suppose this problem can be formed into a the following question:</p>
<p>How do you state the application context from code that exists in separate java class files outside the main activity file?
thanks, Gary</p>
|
java android
|
[1, 4]
|
1,746,740 | 1,746,741 |
asp:imagebutton, change image from javascript / jquery
|
<p>How can i change the image of an image button clientside, on click.</p>
<p>I have tried this:</p>
<pre><code>function changetoDownload(theId) {
$(theId.id).delay(2000)
.queue(function (next) { $(theId).attr("ImageURL", "Images/Apps/free.png"); next(); });
}
<asp:ImageButton ID="ImageButton1" OnClick="Button7_Click" OnClientClick="changetoDownload(this.id);" ImageUrl="Images/download.gif" runat="server" />
</code></pre>
|
javascript jquery asp.net
|
[3, 5, 9]
|
1,046,633 | 1,046,634 |
Create different fragment types by one function
|
<p>I need a function in my Activity, that sets fragment to my ViewGroup (FrameLayout in this case). Of course, I can use such construction:</p>
<pre><code>public void setFragment(Fragment fragment){
FragmentManager fm=getFragmentManager();
//etc
}
</code></pre>
<p>But with this solution I need to create <code>fragment</code> somewhere else, not in my function. So, if class <code>MyFragment</code> extends <code>Fragment</code>, I need something like this:</p>
<pre><code>setFragment(MyFragment);
</code></pre>
<p>Is it possible? <strong>Can I pass class as a parameter of function and then create instance of it</strong></p>
<p>And if it's not - is it a bad idea to create fragment behind the function? Like</p>
<pre><code>MyFragment my=new MyFragment();
setFragment(my);
</code></pre>
|
java android
|
[1, 4]
|
1,551,737 | 1,551,738 |
Returning values from Asynctask
|
<p>Okay I have been trying to get this to work for some time now. I want to be able to have my user login without having the UI hang until the server responds. When the doinbackground is complete I want it to pass an int value or perhaps a boolean value to the postexecute and then the rest of my code will execute. For some reason I have having problems passing values.</p>
<p>Would anyone be able to help me?</p>
<pre><code>private class login extends AsyncTask<Integer, Void, Void>{
ProgressDialog dialog = ProgressDialog.show(MainActivity.this, "", "Loading, Please wait...", true);
String user = "";
@Override
protected int doInBackground(Integer... params) {
// TODO Auto-generated method stub
Log.i("thread", "Doing Something...");
int val = 0;
if(db.userLogin(userTxt.getText().toString(), passTxt.getText().toString(), getApplicationContext()) == "No User Found, please try again!"){
val = 0;
}
return val;
}
protected void onPreExecute(){
//dialog.dismiss();
Log.i("thread", "Started...");
dialog.show();
}
protected void onPostExecute(int result){
Log.i("thread", "Done...");
dialog.dismiss();
if(result == 0){
toast.setText("No User Found, please try again!");
toast.show();
}else{
Intent myIntent = new Intent(ctx, userInfo.class);
myIntent.putExtra("user", user);
startActivityForResult(myIntent, 0);
}
}
}
</code></pre>
|
java android
|
[1, 4]
|
433,778 | 433,779 |
how to detect images not use in host
|
<p>I have a picture upload module. I don't know how to make a script can be do this: after upload 1 day, I want check images upload to be use or not. If not use I want it will do some action..</p>
|
php jquery
|
[2, 5]
|
4,383,712 | 4,383,713 |
Need properties to pass to google chart javascript
|
<p>I am working with WordPress so I checked if it was a typical WordPress question, but it is a usual php and jQuery question.</p>
<p>I have a piece of code which is executed 12 times with different data. I have to collect this data with jQuery and pass it to another widget which will be shown only if I click a widget is clicked. The other widget must show the data of the clicked widget and present a google chart. The show on purpose and google chart thing is no problem, my only problem is to pass the data. I tried a lot of things but I am new to jQuery and have definitely a lack of skills at the moment so I hope you guys can help me. I have simplified the code to show you the examples and structure.</p>
<p>The code which will be executed 12 times:</p>
<pre><code><a href="javascript:void(0);" class="span1 <?php echo $color .' '. $styleName; ?>">
<div class="box_top">
<div class="icon"></div>
<div class="title"><h2><?php echo $title; ?></h2></div>
</div>
<div class="box_middle">
<?php echo $currentValue; ?>
</div>
<div class="box_bottom">
<div class="lastweek">
<p>Last week:</p>
</div>
<div class="number">
<?php echo $prevValue; ?>
</div>
</div>
</a>
</code></pre>
<p>The only difference between this widget and the other widget will be that in the class span1 will be span5.</p>
<p>To make a long story short: I need to collect the data of the variables so I can pass them to another widget, can somebody help me with this or push me in the right direction?</p>
|
php jquery
|
[2, 5]
|
386,802 | 386,803 |
How can I export images with my apk file in android?
|
<p>I'm developing an application for android with eclipse, and it has some logos (.jpg image files) that I reference from my code.</p>
<p>The problem is that, when I export with eclipse the .apk file to install the app, the logos aren't exported...</p>
<p>How can I export the package to have the logos when I install the application?</p>
<p>Thanks!!!</p>
|
java android
|
[1, 4]
|
11,577 | 11,578 |
Can't trigger 'hover' event with jquery
|
<p>jQuery's 'hover' trigger doesn't seem to work. My code is simple:</p>
<pre><code><div id='el'>Content</div>
// does not work
$('#el').on('hover', function() { console.log('is not triggered'); });
$('#el').trigger('hover');
// works for various strings: 'foo', 'click', 'hove', 'keyup', etc.
$('#el').on('foo', function() { console.log('is triggered'); });
$('#el').trigger('foo');
</code></pre>
<p>Any handler I bind to this div with <code>.on</code> responds to <code>.trigger</code> except for the 'hover' event. A handler bound with <code>.on('hover', handler)</code> does respond to me manually hovering on the element, but it does not respond to programmatic triggers. I've tested this in both Chrome and Firefox.</p>
<p>Any ideas? Is this a bug in jQuery?</p>
|
javascript jquery
|
[3, 5]
|
5,735,831 | 5,735,832 |
disabling javascript codes using php?
|
<p>is there a way to disable javascript codes in a particular page using certain php codes? I need to ensure that all the javascripts used in a page should not give any result (even errors) when run.</p>
|
php javascript
|
[2, 3]
|
2,294,910 | 2,294,911 |
Python/C API Problems executing python script
|
<p>I am using the python 3.3 c API, but I have been unable to find a way to load a script and execute it. The script test.py executes fine if i run it from command prompt, but when I try to run it from C++ code, I run into errors such as: NameError: name 'x' is not defined printing into the console window of my application. The code that I'm attempting to use in order to run the python script is below. I'm almost wondering if it is some type of character encoding problem. </p>
<pre><code> Py_Initialize();
FILE* PythonScriptFile = fopen("test.py", "r");
PyRun_SimpleFile(PythonScriptFile, "test.py");
fclose(PythonScriptFile);
Py_Finalize();
</code></pre>
<p>Also, the python test file.</p>
<pre><code>print("test")
</code></pre>
<p>Anyone know what could be causing this?</p>
|
c++ python
|
[6, 7]
|
4,768,152 | 4,768,153 |
How to count all the queries executed by a page in asp.net
|
<p>I want to list out all the queries executed by a page and log the all queries executed by a page. I am using MYSQL. Can any one help me with this? </p>
|
c# asp.net
|
[0, 9]
|
3,184,642 | 3,184,643 |
how to validate username and password valid or not in login control using asp.net
|
<p>I have one login control in my asp.net web application. I use the following code.</p>
<pre><code> <asp:Login ID="Login1" runat="server" Width="351px" CssClass="login"
FailureText="User Name/Password is incorrect"
EnableTheming="true" TitleText="Login into Focus/Career Status Viewer"
Height="164px" onauthenticate="Login1_Authenticate" DisplayRememberMe="False"
UserNameLabelText="Username:" >
<TextBoxStyle CssClass="login-textbox" />
<LoginButtonStyle CssClass="login-button" />
<ValidatorTextStyle Font-Names="Calibri" />
<TitleTextStyle CssClass="login-title"/>
</asp:Login>
</code></pre>
<p>I want when i type username alone the error message will be produced like password required. Can anyone tell how can I do this??
Thankx in advance......</p>
|
c# asp.net
|
[0, 9]
|
488,494 | 488,495 |
Javascript Image Preload with 404 error
|
<p>im trying to preload some images here. But what i need is to preload some images in an array, and show the progress.</p>
<p>This is working, but its giving me the <strong>GET 404 (Not Found)</strong> in console. But its working. What can i do to avoid this warning?</p>
<p>thanks!</p>
<pre><code>function start(id) {
var images = new Array();
images[0] = "http://www.travelblog.org/Wallpaper/pix/tb_fiji_sunset_wallpaper.jpg";
images[1] = "http://www.fantasy-and-art.com/wp-content/gallery/abstract-wallpapers/lion_hd_wallpaper.jpg";
images[2] = "http://hidefwallpaper.org/wp-content/gallery/1_apple_wallpaper_02/90831582ea8e018759044f2820b518d1.jpg";
imageObj = new Image();
imageObj.src = images[id];
imageObj.onload = function() {
if (id == images.length) {
alert('Carregou tudo');
}
if (id < images.length) {
start(id + 1);
alert(id);
}
}
}
start(0);
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,274,358 | 3,274,359 |
skip take methods with javascript arrays
|
<p>Are there methods by which I can skip a particular number of objects and take a certain number of objects from an array in javascript?</p>
<p>Basically the pattern I'm looking for is this.</p>
<p>Say I have an array of 8 objects.</p>
<p><strong>First loop:</strong></p>
<p>Return objects at index 0 to 3 from the array.</p>
<p><strong>Second loop:</strong></p>
<p>return objects at index 4 to 7 from the array.</p>
<p><strong>Third loop</strong>:</p>
<p>Back to the beginning so return objects at 0 to 3 again.</p>
<p>Ad infinitum.....</p>
<p>I'd love to see a jquery based solution if possible but I'm all open for raw javascript implementations too as I'm eager to learn.</p>
<p>Cheers.</p>
|
javascript jquery
|
[3, 5]
|
731,288 | 731,289 |
How to focus to the top of newly generated text in textView?
|
<p>I have a simple jokes application. When you press the button you get new joke. If the previous one was bigger than the screen you can scroll it down. If you go down to the bottom and you go to the next joke, you are transfered to the bottom of the newly generated joke, but i want it to go to the top, and automatically display the start of the joke. How can i do this ?
I assume it would be done via the java code.</p>
<p>Thank you for your time.</p>
|
java android
|
[1, 4]
|
3,294,092 | 3,294,093 |
Detect IF hovering over element with jQuery
|
<p>I'm not looking for an action to call <em>when</em> hovering, but instead a way to tell <em>if</em> an element is being hovered over currently. For instance:</p>
<pre><code>$('#elem').mouseIsOver(); // returns true or false
</code></pre>
<p>Is there a jQuery method that accomplishes this?</p>
|
javascript jquery
|
[3, 5]
|
3,252,367 | 3,252,368 |
Remove NaN from input field
|
<p>I want to remove NaN from input field when I select one input field. Is that available? there is a calculation, and it automatically show NaN, I would like to change it to 0, and after he has chosen something else, the 0 will dissapear and it will show the value. I need to replace NaN with 0. The field id on which the NaN show's up is #cars . Hope you can help me with this.</p>
|
javascript jquery
|
[3, 5]
|
174,927 | 174,928 |
jquerycropping,codiegniter,php
|
<p>I want to crop the image using jquery,codigniter</p>
<p>in jquery i get four coordinate of image x1=249 x2=326 y1=194 y2=271 w=77 h=77</p>
<p>in codiegniter done the query</p>
<p>function do_crop()
{</p>
<pre><code> $x=249;
$y=194;
$w=77;
$h=77;
$path= 'system/application/';
$config = array(
'image_library' => 'gd2',
'source_image' => $path.'/jag1/flowers.jpg' ,
'new_image' => $path.'/jag2/flowers.jpg',
'maintain_ration' => false,
'width' => $w,
'height' => $h,
'x_axis' => $x,
'y_axis' => $y
);
$this->load->library('image_lib');
$this->image_lib->initialize($config);
if ( ! $this->image_lib->crop())
{
echo $this->image_lib->display_errors();
}
$this->image_lib->clear();
}
</code></pre>
<p>i get cropped image. But problem is don't get exact cropped image x,y coordinate problem</p>
<p>Please correct the coordinate</p>
|
php jquery
|
[2, 5]
|
303,946 | 303,947 |
JavaScript exporting JSP div data to excel file
|
<p>I have a java script code for exporting div data to excel file :</p>
<pre><code>$(".excelIcon").click(function(e) {
//getting values of current time for generating the file name
var timeStamp = new Date().getTime();
//creating a temporary HTML link element (they support setting file names)
var a = document.createElement('a');
var data_type = 'data:application/vnd.ms-excel';
//getting data from our div that contains the HTML table
var htmlImg = $('<div>').append($('.div1').clone()).html();
var html = htmlImg.replace(/<img[^>]*>/g,"");
var table_html = html.replace(/ /g, '%20');
a.href = data_type + ', ' + table_html;
//setting the file name
a.download = 'file' + '_' + timeStamp + '.xls';
//triggering the function
a.click();
//just in case, prevent default behaviour
e.preventDefault();
});
</code></pre>
<p>I have used type as <strong>application/vnd.ms-excel</strong> which is a microsoft standard for exporting jsp data to excel , my problem is that this code is running in chrome , means I am able to export jsp data to excel in chrome but it is not working in IE, safari and firefox (I am unable to download excel from above code in these three browser).
Can anyone guide me that what I am lacking for these browsers.
Thanks in advance.</p>
|
javascript jquery
|
[3, 5]
|
2,058,900 | 2,058,901 |
How should run a function 5 times in jQuery?
|
<p>Basically, I'm trying to create 5 rows of tables, using a loop function. I've already have the codes for creating one row. How do I run the script 5 times in jQuery ? </p>
<p>I don't quite understand how .each(); works to do a loop. Can somebody please explain to me? Thanks.</p>
|
javascript jquery
|
[3, 5]
|
561,306 | 561,307 |
stop an looping animation on hover and click to start it again
|
<p>In the link below there are some bubbles wich animates from left to right in a loop. If you hover over one of them, it gets larger and stops animating. My problem is that the bubble doesnt stop for very long, I want it to stop permanently, until you click on it</p>
<p><a href="http://jsfiddle.net/jukke/SU4gJ/1/" rel="nofollow">http://jsfiddle.net/jukke/SU4gJ/1/</a></p>
<p>You are also more than welcome to rewrite parts of the code to make it better/cleaner. I dont really have much experience coding :)</p>
|
javascript jquery
|
[3, 5]
|
4,256,597 | 4,256,598 |
Getting the dynamic value of a checkbox in repeating region loop with Jquery
|
<p>How do I get the values of a check box that is in a repeating region with its values dynamically generated from a recordset from the database.I want to retrieve the value when it is checked and after I click on a link.The problem is that it is retrieving only the first value of the recordset which is 1.This is the code:</p>
<p>jQuery:</p>
<pre><code>$(document).ready(function() {
$("#clickbtn").click(function() {
$("input[type=checkbox][checked]").each(function() {
var value=$("#checkid").attr('value');
$("#textfield").attr('value',value);
});
return false;
});
});
</code></pre>
<p>HTML:</p>
<pre><code><td width="22">
<form id="form1" name="form1" method="post" action="">
<input type="checkbox" name="checkid" id="checkid" value="<?php echo $row_people['NameID']; ?>" />
</form>
</td>
</code></pre>
<p>I would appreciate the help</p>
|
javascript jquery
|
[3, 5]
|
4,788,340 | 4,788,341 |
Accessing client side dynamic controls within ASP.NET codebehind
|
<p>Hi I'm trying to access the html controls that are created dynamically within an event but I'm unable to access this. </p>
<p>I'm using the following code to create the elements on the client side using Javascript:</p>
<pre><code>function addInput(field)
{
...declaratives...
var input = document.createElement("input");
input.id = field+count;
input.name = field+count;
input.type = "text";
... remainder of the code and the element is added to the DOM...
}
</code></pre>
<p>I also have a server control on the page (a button called Button1), and what I want to do is when the user clicks on the button I want to look at the details in that the user has entered in the dynamically created input boxes and store them in a database. However, in the event <code>protected void Button1_Click(object sender, EventArgs e)</code> I can't access the input fields. </p>
<p>Is this possible ? </p>
<p>I'm using VS 2010 C# (v4.0). </p>
|
javascript asp.net
|
[3, 9]
|
5,298,402 | 5,298,403 |
I am not able to call input id in c#?
|
<pre><code><div class="demo" > <p>Date: <input id="datepicker" type="text"> </p>
</code></pre>
<p>I am using a javascript date-picker, I have given it an id as shown above but am unable to reference this in my c# code behind. I have been told that I can use runat="server". Using that I can get the id in c#, but the date-picker will not work.</p>
|
javascript asp.net
|
[3, 9]
|
4,681,082 | 4,681,083 |
Error while loading jquery plugin
|
<p>i have jquery plugin jquery-1.4.2.min.js. while loading this file the following error is showing. but if i use it in another screen or another program it is loading successfully... i am unable to find the reason. Can any one help me please.
Thank you
Mihir
<img src="http://i.stack.imgur.com/SasRS.png" alt="enter image description here"></p>
|
javascript jquery
|
[3, 5]
|
4,209,942 | 4,209,943 |
Must every activity has own model?
|
<p>I have just read the description of MVC desing pattern and I havesome questions: I am Android developer (junior), and I want to make my code more clear. So, should I use MVC for it? And must every activity has own model? Is there any good tutorial for it? Thank you. </p>
|
java android
|
[1, 4]
|
742,860 | 742,861 |
Java methods flow
|
<p>I'm trying to learn how to program on android which of course uses Java. I understand Java vaugely, but this confuses me.</p>
<p>A method which I view as a function (PHP being my native programming language) can seemingly be declared anywhere in a java file and still be pulled out at any other point is this so? What I mean is in PHP you have to define a function(method) to then be able to call it. So everything has to be in order.</p>
<p>Also is calling a function like including that section of code in your method calling it. Example being:</p>
<p>method 1 contains opendb command
method 2 contains closedb command
oncreate method calls method 1 then 2 does it act accordingly.</p>
<p>Sorry may sound dumb but I like concrete answers and not assumptions of mine.</p>
|
java android
|
[1, 4]
|
27,638 | 27,639 |
getting installed applications programmattically
|
<p>I am trying to get the installed application in android after clicking a icon. Under the icon click code I wrote following code:</p>
<pre><code>Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.ACTION_ALL_APPS);
startActivity(intent);
</code></pre>
<p>But it kills the application. I want to show the installed applications on the screen programmatically like when we see when press app key on android.</p>
<p>Is it possible?
where am I doing wrong?
Thank you in advance.</p>
|
java android
|
[1, 4]
|
487,739 | 487,740 |
currently selected month in asp.net calendar control
|
<p>How do I know which month is selected when no date is selected.</p>
<p>For eg, on page load, the calendar will show december. The user click ">" button to show January. </p>
<p>How do I know that he has selected January?</p>
<p>Tkz</p>
|
c# asp.net
|
[0, 9]
|
4,273,244 | 4,273,245 |
Is there any way to get a mouseover event when an element is covered up by another element?
|
<p>Without calculating the element's position and then firing your own "event".</p>
<p><a href="http://jsfiddle.net/ckaPU/" rel="nofollow">original fiddle (can be fixed with z-index)</a> </p>
<p><a href="http://jsfiddle.net/PHXJ9/4/" rel="nofollow">better fiddle (a situation where z-index can't work)</a></p>
<p><img src="http://i.stack.imgur.com/mVUeN.png" alt="example"></p>
<pre><code><div class='under'></div>
<div class='over'></div>
.over {
display:inline-block;
position:absolute;
height:100px;
width:100px;
background: rgba(0, 255, 0, .3);
}
.under {
display:inline-block;
position:absolute;
height:26px;
width:26px;
top:37px;
left:37px;
background:rgba(0, 0, 255, 1);
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
4,751,395 | 4,751,396 |
jQuery: Adding properteries twice/later in code?
|
<p>Is this possible?
I have this right now for my fancybox:</p>
<pre><code> $(document).ready(function() {
$("a#uploadImage").fancybox({
'titleShow' : false,
'width': 560,
'height': 620,
'autoDimensions': false,
'overlayOpacity': 0.6
});
});
</code></pre>
<p>Is it possible to later on to do:</p>
<pre><code> $(document).ready(function() {
$("a#uploadImage").fancybox({
'onCleanup' : function() {
if (window.confirm('Är du säker?'))
{
alert ('OK!');
}else{
return false;
}
}
});
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,727,125 | 5,727,126 |
Convert UTC Time T0 Local Time In Java and c#
|
<p>In c#:</p>
<pre><code>DateTime dateTime = DateTime.Parse(text, CultureInfo.InvariantCulture);
string s = dateTime.ToLocalTime().ToString("s", CultureInfo.InvariantCulture));
</code></pre>
<p>The <code>text</code> is <code>2011-06-30T05:48:34Z</code>, and the <code>s</code> is <code>2011-6-30 13:48:34</code></p>
<p>In java:</p>
<pre><code>DateFormat df = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
// explicitly set timezone of input if needed
df.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
java.util.Date dateTime ;
dateTime = df.parse(text);
String s= df.format(dateTime));
</code></pre>
<p>but the <code>s</code> is <code>2011-6-30 05:48:34</code>. How to implement ToLocalTime() function in Java?</p>
|
c# java
|
[0, 1]
|
5,808,466 | 5,808,467 |
How can I make this div slide up and down hover effect?
|
<p>I want to create a <code><div></code> animation very much like this site: <a href="http://www.weareinstrument.com/about/" rel="nofollow">http://www.weareinstrument.com/about/</a>. When you hover over the darker grey boxes and the images at the bottom of the screen they seem to slide up and down depending if you're hovering them. I can't seem to find the jQuery in the source code for it. Can anyone inform me on how it would be done?</p>
|
javascript jquery
|
[3, 5]
|
4,714,564 | 4,714,565 |
How to Refresh listview using getview of BaseAdapter on image clickEvent
|
<pre><code>public View getView(final int position, View v, ViewGroup parent) {
Teami = (LayoutInflater) contextTeam
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = Teami.inflate(com.yellowflag.activity.R.layout.yf_login3_list_row,
null);
TextView txtzmarket = (TextView) v
.findViewById(com.yellowflag.activity.R.id.txtzmarket);
TextView txtzname = (TextView) v
.findViewById(com.yellowflag.activity.R.id.txtzname);
final ImageView img_nfl_favoriteactive = (ImageView) v
.findViewById(com.yellowflag.activity.R.id.imgfavoriteactive);
ImageView nfllist_image = (ImageView) v
.findViewById(com.yellowflag.activity.R.id.list_image);
String s = TeamList.get(position).getTeamID();
String lower = s.toLowerCase();
int image_id = contextTeam.getResources().getIdentifier(lower + "_25",
"drawable", contextTeam.getPackageName());
nfllist_image.setBackgroundResource(image_id);
txtzmarket.setText(TeamList.get(position).getMarket());
txtzname.setText(TeamList.get(position).getName());
if (selected[position] == 1) {
img_nfl_favoriteactive.setSelected(true);
}
img_nfl_favoriteactive.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
for (int i = 0; i < TeamList.size(); i++) {
selected[i] = 0;
}
img_nfl_favoriteactive.setSelected(true);
selected[position] = 1;
}
});
return v;
}
</code></pre>
<p>I want to refresh listview using img_nfl_favoriteactive which is an image view of my rowview, Clickevent with getview method.
how to refresh this using getview method clickevent using android please help me?
Again, I also want to know that how can i implement the single item selector in this list view.</p>
|
java android
|
[1, 4]
|
1,554,108 | 1,554,109 |
Update Image, capture screengrab and save to disk using JavaScript
|
<p><strong>Refresh Image Src content and Stop the refreshing</strong>
<br>
Hi, i have a function that refresh the "src" attr every second. , now i want when i click button stop, it will stop the interval, in addtion, to make a button to take the picture and save it to computer, like snapshot.</p>
<pre><code><img src="http://someurl" id="image1" class="g" />
<button id="stop">STOP!</button>
<button id="capture">capture</button>
</code></pre>
<p><a href="http://jsfiddle.net/vmVTU/" rel="nofollow">Example </a>
you can see here what i wrote and give me directions , thanks.</p>
|
javascript jquery
|
[3, 5]
|
3,960,882 | 3,960,883 |
How do I load data from my database before jQuery formats my listview?
|
<p>I have used jQuery to format my list view.</p>
<p>Because it takes too much time to load data from the database, jQuery will start to format the list view before it completes loading the data.</p>
<p>So how do I load data from the database <em>before</em> jQuery formats my listview?</p>
|
jquery asp.net
|
[5, 9]
|
3,115,288 | 3,115,289 |
Asp.Net&JavaScript: Problem With Image Slide
|
<p>I'm trying to slide background on hover.
I used the code below in HTML webpage once and it worked correctly.
But when I tried to use it in my ASPX page, first it gave this error:
"Microsoft JScript RunTime Error: '$' is undeclared"
So I deleted the 1st $ before function(). But I couldn't make it work still.
Any ideas why it does not work?
Code is:</p>
<pre><code><head runat="server">
<title></title>
<script type="text/javascript">
$(function () {
$("#vertical div a").hover(function () {
$("img", this).stop().animate({ top: "-173px" }, { queue: false, duration: 400 });
}, function () {
$("img", this).stop().animate({ top: "0px" }, { queue: false, duration: 400 });
});
});
</script>
<style type="text/css">
.altikisilik
{
display: block;
background: url('Images/Default/Brazil_bg.png') top;
}
#vertical div
{
position: relative;
overflow: hidden;
}
#vertical img
{
position: absolute;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div id="vertical" class="clear" runat="server">
<div>
<a class="altikisilik" href="Default.aspx">
<img src="Images/Default/Brazil.png" border="0" alt="Brazil" />
</a>
</div>
</div>
</form>
</body>
</code></pre>
|
javascript asp.net
|
[3, 9]
|
1,992,030 | 1,992,031 |
PHP variable in Javascript
|
<p>Consider this simple example;</p>
<pre><code><?php $text = test; ?>
<script type="text/javascript" defer="defer">
var test;
test = "<?php echo $text; ?>"
$(document).ready(function(){
alert(test);
});
</script>
</code></pre>
<p>This works fine. Creating the alert with the text from the php var. However, if I place; </p>
<pre><code><?php $text = test; ?>
</code></pre>
<p>below the script - it does not work. I've tried the defer function. What am I doing wrong? </p>
<p>Cheers</p>
|
php javascript
|
[2, 3]
|
4,505,190 | 4,505,191 |
jquery and updatepanel?
|
<p>I have an updatepanel in ASP.NET that does a partial page refresh. </p>
<p>I've had some success using jQuery's <code>on()</code> method, however <code>$(document).ready(function(){})</code> is only called during the initial load of a page, rather than after each updatepanel refresh.</p>
<p>I think I could probably trigger it using '<code>ScriptManager.RegisterStartupScript()</code>' but would prefer a 'cleaner' method. Do any exist?</p>
|
javascript jquery asp.net
|
[3, 5, 9]
|
474,480 | 474,481 |
What is wrong with this foreach loop..??? Android
|
<p>I have a foreach loop iterating through each object in a vector. When I debug the code, it runs successfully for the first object in the vector. But then it will fail when it tries to run the loop for the second object. I am <em>sure</em> there is more than one element in the vector.</p>
<pre><code>for(Object shape : vecForShapes)
{
currentNode = (Drawable) shape;
newNode = getResources().getDrawable(R.drawable.nodered);
newNode.setBounds(currentNode.getBounds());
vecForShapes.remove(currentNode);
vecForShapes.add(newNode);
}
</code></pre>
<p>So basically my question is, why is this loop failing? I really do not understand what is wrong here.</p>
<p>P.S. My final aim is to remove <code>currentNode</code> from the vector, replace it with <code>newNode</code> then redraw the whole vector in my <code>onDraw</code> method.</p>
<p>Thanks</p>
|
java android
|
[1, 4]
|
3,800,538 | 3,800,539 |
How to check user id already exists
|
<p>I am a beginner coder, i am building a project using C# Asp.Net in which i am registering users with a user id, now my question is that how to check that the user id is already exists in the user table or not when user trying to register, i am using sql server 2000?</p>
|
c# asp.net
|
[0, 9]
|
4,940,675 | 4,940,676 |
hasClass doesn't work in my js code?
|
<p>I want to use <code>hasClass</code> in the following code, but that doesn't work for me, please see my demo in jsfiddle and tell me, what do I do wrong?</p>
<pre><code><span>
<input type="text" name="relation" class="IdRelation">
</span>
if ($('span').hasClass('IdRelation')) {
alert("ok");
}
</code></pre>
<p><a href="http://jsfiddle.net/6Bwkv/" rel="nofollow">DEMO</a></p>
|
javascript jquery
|
[3, 5]
|
4,038,171 | 4,038,172 |
Using jQuery, what's the best way to set up a polling system?
|
<p>During a document.ready, I call the "load_result" function outlined below:</p>
<pre><code>function load_result()
{
$.getJSON( "http://www.mywebsite.com/loadresult.php", function(data) {
if( data == undefined )
{
null_count++;
return;
}
console.log( data );
insert_result( data );
setTimeout( "load_result", 500 );
} );
}
</code></pre>
<p>However, this works sporadically.. sometimes, it calls <code>insert_result</code> properly, and other times it doesn't. Any tips?</p>
|
php jquery
|
[2, 5]
|
5,294,906 | 5,294,907 |
Best way to control page titles on a large website in ASP.NET
|
<p>We have a fairly large website with several master pages. Right now the titles are being controlled by Session variables in individual pages and set by the master page. The code is bad and needs to be redone. With the current system, since the master page is executed last, we can't completely overwrite the page title when needed from the page. What is the best way to create breadcrumbed page titles across a large site in ASP.NET with several master pages, without using Sessions variables? Session variables are bad for page titles mmmkkayy.</p>
|
c# asp.net
|
[0, 9]
|
5,116,056 | 5,116,057 |
Is this JavaScript or JS framework
|
<p>The link at <a href="http://www.shoesofprey.com/3d" rel="nofollow">http://www.shoesofprey.com/3d</a> has an interactive interface and engaging. </p>
<p>Initially I thought the whole interaction had been developed in Flash but to my surprise that is not the case. I would like to know the technology that has been used to create the interface. I think it is JavaScript? Or has any JavaScript framework like jQuery has been used? Any comments are appreciated. </p>
|
javascript jquery
|
[3, 5]
|
1,660,947 | 1,660,948 |
Need to incorporate event calander in ASP.NET website?
|
<p>I want to incoporate event calander in my website (ASP.NET). </p>
<p>I go through from the below event calender.</p>
<p><strong>wdCalendar</strong> <br/>
<a href="http://www.web-delicious.com/jquery-plugins-demo/wdCalendar/sample.php" rel="nofollow">http://www.web-delicious.com/jquery-plugins-demo/wdCalendar/sample.php</a></p>
<p>Can someone suggest some event calander which can handle events on day, week and month basis? </p>
|
jquery asp.net
|
[5, 9]
|
3,590,942 | 3,590,943 |
how to compare two dates in jquery
|
<p>the 1 st one which get using the id has format </p>
<pre><code>var checkindate = $('#check-in').text();
28-07-2011
</code></pre>
<p>then i get the current date using </p>
<pre><code>var now = new Date();
</code></pre>
<p>and it has the format </p>
<pre><code>Wed Jul 20 2011 19:09:46 GMT+0530 (IST)
</code></pre>
<p>i want to get the date difference from these two dates . in this case it is 8
. i searched a lot and could not find an answer , please help....... :'(</p>
|
php javascript jquery
|
[2, 3, 5]
|
3,366,399 | 3,366,400 |
How can I use the jQuery-like selector in pure JavaScript
|
<p>What I looking for is:</p>
<pre><code>var arrinput = $('input[name$="letter"]')
</code></pre>
<p>How can I change that from jQuery style to a pure javascript style?</p>
<p>So I want the <code><input></code> tags which <code>name</code> is ended with "letter".</p>
<hr>
<p>I changed code a bit... My browser dont support querySelector and FYI I'm using webbrowser component on c# winforms </p>
|
javascript jquery
|
[3, 5]
|
791,032 | 791,033 |
Jquery : Disabled 'input' field not available in form
|
<p>I'm trying to dynamically set a an input value("choice" in my case) inside a form based on user inputs. After setting the desired value, I want to disable the field so that user cannot change it. Here is the code i'm using. </p>
<pre><code>// HTML
<select name="0-choices" id="id_0-choices">
<option value="Phone">Phone</option>
<option value="Fax">Fax</option>
<option value="Voicemail">Voicemail</option>
</select>
//Javascript
$(cfield).children().first().removeAttr('selected');
$(cfield).children('option[value="Voicemail"]').attr('selected','selected');
//$(cfield).val('Voicemail');
$(cfield).attr('disabled','disabled');
</code></pre>
<p>The problem is, if I disable the field, the field is not available in the posted data. So my validation function complains of data not available. How can I "freeze" the input field and yet be able to post it.</p>
|
javascript jquery
|
[3, 5]
|
3,150,924 | 3,150,925 |
Dropdown Menu is not working properly
|
<p>I used dropdown menu in our site its worked in all browser but in IE6 it's not working properly. so tell me solution. this site is in wordpress.</p>
<p>Thanks
Abhay</p>
|
php javascript
|
[2, 3]
|
3,170,977 | 3,170,978 |
Declaring variables using the keyword this in js
|
<p>Is there a difference between this:</p>
<pre><code>var onClick = function() {
var image = .....
$.post("/..../...", null, function(data) { myCallback(data, image); } );
}
</code></pre>
<p>and</p>
<pre><code>var onClick = function() {
this.image = .....
$.post("/..../...", null, function(data) { myCallback(data, this.image); } );
}
</code></pre>
<p>I am using the 'this' way, and for some reason any parameter I pass into myCallback is null??</p>
<p>If I output the variable before the $.post call using alert, I get a value so its not null?</p>
|
javascript jquery
|
[3, 5]
|
310,827 | 310,828 |
jQuery navigation bar not working in?
|
<p>In my mobile application, I use navigation bar. and i use beta version 1.</p>
<pre><code><div data-role="navbar" id="navibar">
<ul>
<li><a href="#" id="searchNav1">Search</a></li>
<li><a href="#" id="shoppingNav1">Shopping</a></li>
</ul>
</div>
</code></pre>
<p>JS:</p>
<pre><code> $('#shoppingNav1').live("click",function()
{
alert("in");
shopping();
$.mobile.changePage("#shoppingListPage","pop", false, false);
alert("");
});
</code></pre>
<p>when i click this it's change the page in my desktop browser but not in actual device </p>
|
javascript jquery
|
[3, 5]
|
507,097 | 507,098 |
Programmatically change a select though option event
|
<p>Ok. No one is listening to me, so I'm going to try rephrasing the question by showing you WORKING CODE that does what I want, but not in the way that I want.</p>
<p>NOTE: I am not asking how to do this. I am asking more like...what's the best way...</p>
<pre>
// First I need the proper value
$select.find("option:selected").prop("selected", false);
$select.find("option:first").prop("selected", true);
// Now I need the event to fire
$select.trigger("change");
</pre>
<p>I'd like to do this in one line though...like the last line of code on this question.</p>
<p>Please don't tell me anything that you would expect someone that's been doing front end stuff for 10 years to know.</p>
<p><strong>ORIGINAL - DONT ANSWER BASED ON THE BELOW</strong></p>
<p>Doesn't really have to be jQuery, but I'm using it so it might as well be.</p>
<p>Basically, what I'd like to do is say</p>
<pre><code>var $option = $select.find("option:first");
$option.trigger("click");
</code></pre>
<p>But that doesn't really work. I mean, it sort of does, but it doesn't seem to also fire the change event on the select...so I'm thinking I should actually be doing something more like...</p>
<pre>
$select.triggerEvent(new Event({
type : "change",
target : $option
});
</pre>
<p>But that can't be right.</p>
|
javascript jquery
|
[3, 5]
|
4,578,119 | 4,578,120 |
getting a add cannot be resolved or is not a field and ic_menu_refresh cannot be resolved or is not a field error
|
<p>I am using eclipse and learning android out of a book. I am copying code to learn about menus and am getting these two errors and cannot figure out why.</p>
<pre><code> @Override
public boolean onCreateOptionsMenu(Menu menu){
menu
.add(Menu.NONE, MENU_ADD, Menu.NONE, "Add")
.setIcon(android.R.drawable.ic_menu_add);
menu
.add(Menu.NONE, MENU_RESET, Menu.NONE, "RESET")
.setIcon(android.R.drawable.ic_menu_refresh);//error here.
</code></pre>
<p>This is the ic_menu_refresh cannot be resolved or is not a field error
ic_menu_refresh does not show up as one of the options ic_menu_add did.</p>
<p>The getting a add cannot be resolved or is not a field error</p>
<pre><code>private void add(){
final View addView=getLayoutInflater().inflate(android.R.layout.add, null);//add is the source of the error.
</code></pre>
<p>Here are the libraries I am using</p>
<pre><code> package com.commonware.android.menus;
import java.util.ArrayList;
import android.app.AlertDialog;
import android.app.ListActivity;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.ContextMenu;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.EditText;
</code></pre>
<p>I can include the rest of the code if needed</p>
|
java android
|
[1, 4]
|
256,713 | 256,714 |
Delete new jQuery prepended node after 2 seconds
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/5950318/getting-jquery-inserted-dom-elements-without-requerying-for-element-after-insert">Getting jQuery-inserted DOM elements without requerying for element after insertion</a> </p>
</blockquote>
<p>Is there a way to store a newly prepended element (with jQuery) into a var?</p>
<p>I want to do something like this:</p>
<pre><code>var new_div = $('#my-div').prepend('<div>Something new</div>');
setTimeout(function () {
new_div.remove();
}, 2000);
</code></pre>
|
javascript jquery
|
[3, 5]
|
4,421,417 | 4,421,418 |
Remove element by class using parent()
|
<p>I am making changes to a jQuery validator, when there is an error it inserts a div to the parent element. I am trying to remove an the inserted div with by the specific class name from the parent. </p>
<pre><code>$(element).parent().remove('.removeThis');
</code></pre>
<p>I thought the above code would work but it does not remove the the div.</p>
|
javascript jquery
|
[3, 5]
|
4,362,922 | 4,362,923 |
jQuery posts error text when posting with ajax
|
<p>When I'm posting via ajax I'm sometimes getting extra characters posted for example. If the text passed though ajax yo a php $_POST I end up getting:</p>
<blockquote>
<p>This is my messagejQuery127638276487364873268_374632874687326487</p>
</blockquote>
<p>99% of the time posts pass though fine... I'm unsure how to capture and remove this error as it only happens some of the time.</p>
<pre><code>// this is the ajax that we need to post the footprint to the wall.
$('#submitbutton').click(function () {
var footPrint = $('#footPrint').val();
var goUserId = '1';
$.ajax({
type: 'POST',
url: '/scripts/ajax-ProfileObjects.php',
data: 'do=leave_footprint&footPrint=' + footPrint + '&ref=' + goUserId + '&json=1',
dataType: 'json',
success: function(data){
var textError = data.error;
var textAction = data.action;
var textList = data.list;
if (textError == 'post_twice' || textError =='footprint_empty' || textError == 'login_req') {
// display the error.
} else {
// lets fade out the item and update the page.
}
});
return false; });
</code></pre>
|
php jquery
|
[2, 5]
|
1,942,638 | 1,942,639 |
Google Maps is forbidden in our country
|
<p>I am a web developer in a country where Google Maps is forbidden. I have been trying to use this JavaScript source address: <code>http://maps.google.com/maps/api/js?sensor=false</code> but it is blocked. </p>
<p>I can access the resource through an anti-filter (proxy) app, but I need my site users to be able to access it. Can I access it by another URL? How can I resolve this issue?</p>
|
php javascript
|
[2, 3]
|
4,362,427 | 4,362,428 |
Need Removable comments in this textarea
|
<p>Hi I need to add some content which would be clear on click in the given below textarea.</p>
<p>Not able to find the answer, please help me</p>
<pre><code> <tr><td><?php echo tep_draw_textarea_field('comments', 'soft', '60', '5'); ?></td></tr>
</code></pre>
|
php javascript
|
[2, 3]
|
5,839,493 | 5,839,494 |
Javascript inside php code not displaying
|
<p>I have inside my php code </p>
<pre><code>var_dump($var);
$var ='
<script type="text/javascript">
'.$var.'
</script>'
;
var_dump($var);
</code></pre>
<p>The first <code>var_dump</code> displays correctly some value, but the second displays an empty string. </p>
<p><a href="http://codepad.viper-7.com/IdpgMo" rel="nofollow">Exemplary output</a>:</p>
<blockquote>
<p><strong>Notice:</strong> Undefined variable: var in <strong>/code/IdpgMo</strong> on line <strong>3</strong><br>
NULL<br>
<strong>Notice:</strong> Undefined variable: var in <strong>/code/IdpgMo</strong> on line <strong>7</strong><br>
string(50) " " PHP Notice: Undefined variable: var in /code/IdpgMo on line 3 PHP Notice: Undefined variable: var in /code/IdpgMo on line <strong>7</strong></p>
</blockquote>
<p>Why is it so?</p>
|
php javascript
|
[2, 3]
|
3,936,983 | 3,936,984 |
How to access HTML of a Input element
|
<p>Hi I am trying to get the HTML of INPUT tag. But unable to..</p>
<pre><code> <input type="checkbox" name="_QS4_CNA" id="_Q0_C7" class="mrMultiple" value="NA">
<label for="_Q0_C7">
<span class="mrMultipleText" style="">None of these</span>
</label>
</input>
</code></pre>
<p>And I am trying access as </p>
<pre><code> var dat=$(':checkbox#_Q0_C7').html();
alert(dat);
</code></pre>
<p>But i cannot access this. Please help me on this..</p>
|
javascript jquery
|
[3, 5]
|
3,610,955 | 3,610,956 |
How to get specific date?
|
<p>I have to show date on my jsp that date will be the up coming wednesday date of week.For example if today is "friday 3 june 2012" and customer get login today then i have to show him mgs that Your order will be deliver on Wednesday "date". that "date" will be the live date of coming wednesday meanse Wednesday 8 june 2012.
how i get my requirement using Jquery .</p>
|
java javascript jquery
|
[1, 3, 5]
|
456,210 | 456,211 |
How to integrate C# code with a Java code?
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/246096/how-can-i-integrate-java-with-net">How can I integrate Java with .Net?</a> </p>
</blockquote>
<p>I am doing a project which currently I have done some part using Java.</p>
<p>For further proceedings of the project I have found a code which exactly match with my requirement, but it is in C#.</p>
<p>In my project some variables have to be passed from the Java code to the C# code, and the processing part is to be done within that C# code and it must return the result to the Java code back.</p>
<p>Is it possible to do this?If so how can I do this?I really appreciate your help.</p>
<p>Thank you.</p>
|
c# java
|
[0, 1]
|
3,754,769 | 3,754,770 |
FileUploder get file full path using jquery
|
<p>I use below code for getting full file path </p>
<p>My problem is using file.value in firefox only get my file name but in ie it get file full path </p>
<pre><code> function setImage(file) {
document.getElementById('prevImage').src = file.value;
}
<asp:FileUpload ID="fup" runat="server" onchange="setImage(this);" />
<img id="prevImage" height="200" width="200"></img>
</code></pre>
|
javascript jquery asp.net
|
[3, 5, 9]
|
5,237,095 | 5,237,096 |
ASP.NET ProtocolViolationException - Cannot send a content-body with this verb-type
|
<p>Why will <strong>req.GetRequestStream().Close();</strong> cause "<strong>ProtocolViolationException</strong> - Cannot send a content-body with this verb-type." The code snippet is from <a href="http://www.codeproject.com/KB/dotnet/XmlPost.aspx" rel="nofollow">here</a>. Thanks.</p>
<pre><code> WebRequest req = null;
WebResponse rsp = null;
try
{
string fileName = "Login.xml";
string uri = "http://localhost/api/login";
req = WebRequest.Create(uri);
//req.Proxy = WebProxy.GetDefaultProxy(); // Enable if using proxy
req.Method = "POST"; // Post method
req.ContentType = "text/xml"; // content type
// Wrap the request stream with a text-based writer
StreamWriter writer = new StreamWriter(req.GetRequestStream());
// Write the XML text into the stream
writer.WriteLine(this.GetTextFromXMLFile(fileName));
writer.Close();
// Send the data to the webserver
rsp = req.GetResponse();
}
catch (WebException webEx)
{
LOG.Error(webEx.StackTrace.ToString());
}
catch (Exception ex)
{
LOG.Error(ex.StackTrace.ToString());
}
finally
{
if (req != null) req.GetRequestStream().Close();
if (rsp != null) rsp.GetResponseStream().Close();
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
5,619,650 | 5,619,651 |
Why does Android only show the last Activity when using a for-loop?
|
<p>Perhaps I'm not used to the Android development, but when I look, I expect everything to be done in order. When one activity finishes, the next starts. However, it seems that my code doesn't work that way. Take the following code for example:</p>
<pre><code>for (int i = 0; i < 3; i++){
Intent myIntent = new Intent(Game.this.getBaseContext(), NextScreen.class);
myIntent.putExtra("something", i);
myIntent.putExtra("Opp", oppList.get(i).toString());
startActivityForResult(myIntent, 0);
}
</code></pre>
<p>It doesn't display activity one, wait for you to do what you do in that screen, then come back for the second activity. It immediately displays the third activity. If I click on the back button on my android emulator, it will show me activity two... and if I click back again, it will show me activity one... so it just kind of rapid-fires these activities onto the screen without waiting for you to do what you do in these activities. I'm sure I'm not the first person that's wanted to do something like this. Any idea what I'm doing wrong? How do you work around this situation?</p>
|
java android
|
[1, 4]
|
5,507,111 | 5,507,112 |
How to create bouncable scrollview in android?
|
<p>How to create bounce scroll view in android like iPhone?</p>
|
java android
|
[1, 4]
|
4,051,954 | 4,051,955 |
unterminated string literal issue
|
<p>First timer here, and total noob when it comes to PHP and JavaScript.</p>
<p>I have 2 lines of code which are identical, however one works and one kicks out a unterminated string literal error.</p>
<p>One that works:</p>
<pre><code><script type="text/javascript">
document.getElementById('vehiclemake').value
= "<?php echo $_POST['vehiclemake'];?>";
</script>
</code></pre>
<p>One that doesn't:</p>
<pre><code><script>
document.getElementById('PostcodeSelect').value =
"<?php echo $_POST['PostcodeSelect'];?>";
</script>
</code></pre>
<p>The only thing I can think of is that the postcode select POST variable has an underscore in it eg: AB1_1BA does this need escaping or something?</p>
<p>Any help greatly appreciated, cheers!</p>
|
php javascript
|
[2, 3]
|
4,694,236 | 4,694,237 |
Custom dialog having mutiple editText and spinners in Android?
|
<p>I am trying to put custom dialog in buttons on click event, and dialog box having multiple textViews and spinners in Android.</p>
<p>How it possible?</p>
|
java android
|
[1, 4]
|
1,498,978 | 1,498,979 |
More problems with Jquery src and load()
|
<p>I am pulling my hair out as to why one of these scripts works, while the other doesn't . Upon clicking the text, the image should change. And on a side note does the load() command look ok?</p>
<p>What is the difference between these two that's making the first work and the second malfunction?</p>
<p>The functional:
</p>
<pre><code>CageImg=new Image();
CageImg.src="http://cageme.herokuapp.com/css/mrcage.jpg"
function buttonInCompany()
{
$('#desc').load('incompany.html');
$('#midimg').attr("src",CageImg.src); }
$(document).ready(function() { $("#someID").click(function() { buttonInCompany(); }); }); </script>
<div id='someID'>Everything is cage's cage.<br><br></div>
<img id="midimg" src="http://3.bp.blogspot.com/-BdfyYy_Y0gY/UP_3y3F2RDI/AAAAAAAAC-Q/eHPCltO8bG8/s1600/TomEngelsnicolas+thing.jpg">
</code></pre>
<p>The non functional:</p>
<pre><code> <script src="jquery.src"></script>
<script>
incompanyImage=new Image();
incompanyImage.src= "images/16581370-group-of-happy-young-business-people-in-a-meeting-at-office.jpg"
function buttonInCompany()
{
$('#desc').load('desc.html #incompany');
$('#midimg').attr("src",incompanyImage.src); }
$(document).ready(function() { $("#incompany").click(function() { buttonInCompany(); }); });
</script>
<div id="incompany" class="art-button">Aulas in-Company</div>
<img id="midimg" width="233" height="350" src="images/Fotolia_5170186_X-01.jpg"><br></p>
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,661,161 | 5,661,162 |
Null reference Exception unhandled by the user code
|
<p>I build my solution in visual studio(successfull) and I am trying to run it but for some reason at the following line of code it was throwing the exception I went several articles but there was no exact solution how this could be handled </p>
<pre><code>public static int GetCurrentPolicyClassId()
{
**int policyClassId = (int) HttpContext.Current.Session[AppConstants.SK_POLICYCLASSID];**
return policyClassId;
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
645,795 | 645,796 |
Android hide soft keyboard IME
|
<p>Below is a bit of code that I managed to get to work to hide the soft keyboard on android. It works by the user clicking anywhere on the screen (outside of a <code>EditText</code> input/s) to hide the IME soft keyboard. It registers a <code>OnTouchListener</code> to the <code>ScrollView (id="@+id/sv_background)</code> which when the screen is touched it hides the IME soft keyboard via the <code>InputMethodManager</code> code. I have set the scroll view as the parent layout in this case but it also works with any other layout view. </p>
<p>I hope this is useful to someone out there in Android land.</p>
<p>XML</p>
<pre><code><ScrollView
android:id="@+id/sv_background"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<other views and EditTexts/>
</ScrollView>
</code></pre>
<p>Java</p>
<pre><code>private ScrollView svBackground;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.newentry);
svBackground = (ScrollView)findViewById(R.id.sv_background);
svBackground.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(svBackground.getWindowToken(), 0);
return false;
}
});
}
</code></pre>
|
java android
|
[1, 4]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.