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 |
|---|---|---|---|---|---|
4,388,607
| 4,388,608
|
Can I do Android Programming in C++ ,C
|
<p>Can I do Android Programming in C++ ,C ?
If ( answer == "yes" )
{
then please tell how ? and whats the procedure for set-up ?
( i donot know obj-c ,java ) but well versed in C,C++ ,FLASH AS3
SDK released by google</p>
<p>please do not tell about NVDIA SDK its not fully developed :)
}</p>
|
c++ android
|
[6, 4]
|
5,505,212
| 5,505,213
|
Can I put a <span> tag in the Text property of an ASP:Button?
|
<p>I am trying to do something like this:</p>
<pre><code><asp:Button ID="btnSearch"
runat="server"
CssClass="greybtn"
Text='<span>Search</span>'
OnClick="btnSearch_Click" />
</code></pre>
<p>It displays <code><span>Search</span></code> instead of just <code>Search</code>.</p>
|
c# asp.net
|
[0, 9]
|
1,572,424
| 1,572,425
|
Can I pass $(this) to the .getJSON callback function? any workaround?
|
<p>I tried to get the value of rel on each li and pass it to the .getJSON function. I then want to add the thumbnail_url value from the callback to the image tag of the li descendants . My question is how could I pass the $(this) object to the callback function. It seems the $(this) is null.</p>
<pre><code>$('ul.sample li').each(function () {
var url = 'http://sampleurl/api/url?' + $(this).attr('rel');
$.getJSON(url, function (data){
$(this).find('img').attr('src') = data.thumbnail_url;
})
});
</code></pre>
<p>HTML:</p>
<pre><code><ul class="sample">
<li rel="value1">
<img src="">
</li>
<li rel="value2">
<img src="">
</li>
</ul>
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,468,774
| 5,468,775
|
Click Event for Dynamically Generate Linkbutton
|
<p>i created a simple registration page which have fields Name,Username and Password.. actually am checking the username with database whether that username already had or not...</p>
<p><img src="http://i.stack.imgur.com/ExBqE.png" alt="enter image description here"></p>
<p>suppose if that username already taken,then i display"Username Already Taken" message in label,and also i create dynamically 4 link buttons for username suggestions like </p>
<p><img src="http://i.stack.imgur.com/Lxlm2.png" alt="enter image description here"></p>
<p>now when i click on linkbuttons,that are bind to username textbox.. here is my code</p>
<p><img src="http://i.stack.imgur.com/ubCYl.png" alt="enter image description here"></p>
<p>give me some idea how to bind that linkbutton to textbox.. </p>
|
c# asp.net
|
[0, 9]
|
5,263,269
| 5,263,270
|
Making a redistributable component or library for Android
|
<p>I'm just starting out on Android and Java programming, coming in from a C++ background. I was wondering - whats the best way to go about making a library/UI widget/component that I can license to third-party developers? </p>
<p>In C++ I'd ship the customers my headers and *.a files, but I don't know the equivalent in Java.</p>
<p>Are there any good resources or links about this, maybe even from general Java development standpoint.</p>
|
java android
|
[1, 4]
|
1,041,202
| 1,041,203
|
Server, what do I need exactly?
|
<p>when people talk about having a server that receives request ( say to update tickets in DB, or fetch tickets..etc), what kind of server are we talking here? Is it just a webserver (say from host gator) and couple of PHP scripts handling requests or are we talking about specific kind of server (different than web hosting server)?</p>
<p>My intention is to have an android app that sends a ticket to server and track status. Kind of like bug tracker.
Thank you</p>
|
java android
|
[1, 4]
|
4,573,796
| 4,573,797
|
checkboxlist select only one item
|
<p>I am trying to select only one checkbox from the list. Here is the code I am trying but it doesn't seem to be working. I can use RadioButtonlist but it doesn't allow me to deselect the radio button. Please let me know.</p>
<pre><code>$(document).ready(function () {
var checkboxlistid = "#<%= chkLst.ClientID %>";
$(checkboxlistid + " input:checkbox").click(function () {
$(this).attr("checked",""); });
</code></pre>
<p>});</p>
<pre><code> <asp:CheckBoxList ID="chkLst" runat="server" RepeatDirection="Horizontal">
<asp:ListItem Value="U">Unknown</asp:ListItem>
<asp:ListItem Value="R">Ref</asp:ListItem>
</asp:CheckBoxList>
</code></pre>
|
jquery asp.net
|
[5, 9]
|
695,152
| 695,153
|
Read realtime output of a command
|
<p>How can I read real-time output of a shell command from Java</p>
<p>This is what I have so far but it prints after command has been executed:</p>
<pre><code>try {
proc = Runtime.getRuntime().exec("du -d 1 /sdcard/");
InputStream inputStream = proc.getInputStream();
InputStreamReader inputStreamReader = new InputStreamReader(inputStream);
BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
while ((line = bufferedReader.readLine()) != null) {
publishProgress(i);
i++;
System.out.println(line); // it prints all at once after command has been executed.
}
}
catch (IOException e) {
Log.e("du","error "+e.getMessage());
}
</code></pre>
|
java android
|
[1, 4]
|
1,828,559
| 1,828,560
|
Asp.net login script
|
<p>i'm new to asp.net, i'm writing a login & registration script for learning database application. But the script seems not work. it stills can add duplicated username. Here is the script</p>
<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;
public partial class Registration : System.Web.UI.Page
{
static string temp;
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack)
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["earchConnectionString"].ConnectionString);
con.Open();
string cmdStr = "Select count(*) from [user] where UserName='" + TextBoxUN.Text + "'";
SqlCommand userExist = new SqlCommand(cmdStr, con);
int temp = Convert.ToInt32(userExist.ExecuteScalar().ToString());
con.Close();
if (temp == 1)
{
Response.Write("User Name Already Exist....<br /> Please Choose Another User Name.");
}
}
}
protected void Submit_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["earchConnectionString"].ConnectionString);
con.Open();
string insCmd = "Insert into [user] (UserName, Password, EmailAddress, FullName, level) values (@UserName,@Password,@EmailAddress, @FullName, @level)";
SqlCommand insertUser = new SqlCommand(insCmd, con);
insertUser.Parameters.AddWithValue("@UserName", TextBoxUN.Text);
insertUser.Parameters.AddWithValue("@Password", TextBoxPass.Text);
insertUser.Parameters.AddWithValue("@EmailAddress", TextBoxEA.Text);
insertUser.Parameters.AddWithValue("@FullName", TextBoxFN.Text);
insertUser.Parameters.AddWithValue("@level", level.SelectedValue.ToString());
try
{
insertUser.ExecuteNonQuery();
con.Close();
//Response.Redirect("Login.aspx");
Label1.Text = temp;
}
catch (Exception er)
{
Response.Write("Something wrong");
}
finally
{
//Any Special Action You Want To Add
}
}
}
</code></pre>
<p>Any can detect the problems?</p>
<p>thanks</p>
|
c# asp.net
|
[0, 9]
|
5,423,713
| 5,423,714
|
a jQuery image-group animation
|
<p>I've got a div with three same images.</p>
<pre><code><div>
<img class="movlights" src="files/images/movelights.png" alt="10 years logo" />
<img class="movlights sec" src="files/images/movelights.png" alt="10 years logo" />
<img class="movlights third" src="files/images/movelights.png" alt="10 yearslogo"/>
</div>
</code></pre>
<p>Each has different "absolute" position in a way that all form a row and their parent div is
overflowed - hidden.</p>
<p>So I animate them moving together simultaneously as a group from left to right with this code:</p>
<pre><code> $(function(){
movelights();
});
function movelights(){
for(x=0;x<3;x++)
{
$('div img:eq('+x+')').animate({left: (1400 - x*800)},24000);
}
};
</code></pre>
<p>My problem is:
How to return an image on a certain starting position before the others by queuing it again when it passes the div's right edge so that the animated pattern repeats itself!</p>
<p>So I'm interested in both:</p>
<ul>
<li>how to queue image from end of the
line to beginning</li>
<li>how to loop the animated pattern</li>
</ul>
<p>Hope I was clear enough English isn't my native language.</p>
<p>Here's some additional code:</p>
<pre><code>div{
width:1000px;
overflow:hidden;
position:relative;
}
all img{
display:block;
position:absolute;
left:120px;
}
img2{
left:-678px;
}
img3{
left:-1400px;
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,366,013
| 3,366,014
|
show only Error message of asp validators by javascript
|
<p>i trying to pop up only error message's for validation's control not text.
The code which i tried is showing null for error message's. </p>
<pre><code>function fnOnUpdateValidators() {
for (var i = 0; i < Page_Validators.length; i++) {
var val = Page_Validators[i];
var ctrl = document.getElementById(val.controltovalidate);
if (ctrl != null && ctrl.style != null) {
if (!val.isvalid) {
ctrl.style.background = '#FFD6AD';
var errMsg = document.getElementById(val.id).getAttribute('ErrorMessage');
alert(errMsg);
}
else
ctrl.style.backgroundColor = '';
}
}
}
</code></pre>
|
javascript asp.net
|
[3, 9]
|
4,756,740
| 4,756,741
|
Making all links inside of a div call the same function?
|
<p>I'm trying to make a notification area that will show alerts.</p>
<pre><code>return this.each(function() {
jQuery('<div class="' + o['className'] + '">' + o.msg + ' +
'<a href="#" onclick="$(this).parent().remove(); dismiss(' + o["id"] + ');">X</a>' + '</div>')
.appendTo(this);
});
</code></pre>
<p>This just takes a message pulled from the database, and shows it to the user. If the user clicks the X then it will call dismiss() which will mark it as being read in the database.</p>
<p>The thing is, if the message itself contains a link to another page or external site, I also want to call dismiss() before the user leaves the page. Is there anyway to alter this javascript to take all <code>a</code> elements (the X and any links that would appear in the message) and change the onclick to call the function?</p>
|
javascript jquery
|
[3, 5]
|
5,754,725
| 5,754,726
|
How can I alter the `href` attribute of an anchor using jQuery
|
<p>I have a link:</p>
<pre><code><a href="">MyLink</a>
</code></pre>
<p>What I need to do with jQuery to edit the <code>href</code> attribute?</p>
|
javascript jquery
|
[3, 5]
|
1,945,278
| 1,945,279
|
How to get website name from domain name in c#
|
<p>I want a function in c# that will do the following:</p>
<p>input: string domain="google.com"</p>
<p>output: string name="Google"</p>
<p>and also to work on .co.uk (multiple dots domains)</p>
|
c# asp.net
|
[0, 9]
|
1,500,409
| 1,500,410
|
jQuery ajax return data empty in IE
|
<p>I'm using ajax to get some data then based on the data use html() to put it on the page.</p>
<p>In IE, the data returned is empty (it's html). It still triggers the success function, but the html is not there. I've set the dataType: "text" but still doesn't work.</p>
<p>Any ideas?</p>
<p>Thanks!</p>
<p>EDIT:</p>
<p>Here's the exact code:</p>
<pre><code>$('#frm').submit(function(event){
event.preventDefault();
var self = this;
z = $('#zipcode');
if(z.val() != '' && z.val().length == 5) {
var value = z.val().replace(/^\s\s*/, '').replace(/\s\s*$/, '');
var intRegex = /^\d+$/;
if(!intRegex.test(value)) {
return false;
}
} else {
return false;
}
$.ajax({
url: "/ajax/zip",
type: 'GET',
async: false,
dataType: 'html',
data: {zipcode: $('.zip_field').val()},
success: function(data) {
if(data == 'false'){
error($(".zip_field"));
return false;
}else{
self.submit();
$('.container').empty().append(data);
}
}
});
})
</code></pre>
<p>It's submitting a zip code. On submit, it checks to make sure it's a number and 5 digits in length. If that passes, it goes to the ajax and checks to make sure it's a valid zip code (database check), if that fails it returns 'false' as text, if it's good then it returns some html.</p>
<p>It works in Firefox and Chrome, but not in IE. When it's good, it submits the form but the data returned alerts empty and is appended as empty space.</p>
|
javascript jquery
|
[3, 5]
|
5,312,252
| 5,312,253
|
identify object property by placement in object
|
<p>How do you identify an object by its place in the object.</p>
<pre><code>myObj.b = 2
</code></pre>
<p>can I go somethiong like <code>myObj[1] to show 2 also</code>?</p>
<pre><code>var myObj = {
a: 1,
b: 2,
c: 3,
d: 4,
e: 5,
f: 6
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
4,779,174
| 4,779,175
|
jquery detect coordinate of top of page after scrolling
|
<p>I have a 'back button' that I would like to stick to the header until you scroll past a certain point (so I have it absolutely positioned but would like it positioned 'fixed' when you scroll past the header).</p>
<p>Kinda like the 'GAMEHQ' section does here: <a href="http://scores.espn.go.com/mlb/preview?gameId=311027124" rel="nofollow">http://scores.espn.go.com/mlb/preview?gameId=311027124</a></p>
<p>Any suggestions? Thanks!</p>
|
javascript jquery
|
[3, 5]
|
973,981
| 973,982
|
image fade on hover + make image clickable
|
<p>I'd like it so when I hover over the image, the entire image becomes a link rather than just the text inside. Can someone help me with this?</p>
<p>Javascript:</p>
<pre><code>$('.thumbnail').hover(function() {
$('.thumbnail img').stop(true,true).fadeTo(400, 0.2);
$('.description').stop(true,true).fadeIn(400);
}, function() {
$('.thumbnail img').stop(true,true).fadeTo(400, 1);
$('.description').stop(true,true).fadeOut(400);
});
</code></pre>
<p>Here is the jsfiddle: <a href="http://jsfiddle.net/LDs6C/15/" rel="nofollow">http://jsfiddle.net/LDs6C/15/</a></p>
|
javascript jquery
|
[3, 5]
|
2,598,905
| 2,598,906
|
IE 7 jquery bind and $(this)
|
<p>I have treeview script and part of it looks like :</p>
<pre><code>root.find("." + classControl).each(function () {
$(this).bind('click', function () {
if ($(this).text() == "-") {
$(this).text("+");
}
else {
$(this).text("-");
}
$(this).parentsUntil("li").parent().children("ul").toggle();
});
});
</code></pre>
<p>It should find all collapse/show buttons and bind them proper function. It works in FF,Chrome,IE 8 but not in IE7 not. When I click on the button, it changes from + to - or the reverse, but it also sets all other buttons to empty text. </p>
<p>I think the problem must be with the this selector, because if I bind only simple alert(), it works even in IE7</p>
|
javascript jquery
|
[3, 5]
|
660,947
| 660,948
|
Looking to download a series of files from a remote server, asynchronously, with callbacks
|
<p>Basically, there is a script on my local network that generates a file. I want to be able to make multiple calls to this script at the same time with different variables and present notification to the user when each particular file is ready. I've tried doing it in Javascript, jQuery and PHP, but not having much luck.</p>
<p>I can't seem to get it to work asynchronously through PHP with a callback, and I can't seem to get it to actually download through Javascript or jQuery.</p>
<p>I've tried <code>$.get('script_url')</code> and <code>$('#someelement').load('script_url')</code> for jQuery.</p>
<p>I've also tried using <a href="http://github.com/coolaj86/jquery-cors" rel="nofollow">http://github.com/coolaj86/jquery-cors</a> and referencing <a href="http://developer.mozilla.org/en/http_access_control" rel="nofollow">http://developer.mozilla.org/en/http_access_control</a> to no avail.</p>
|
php javascript jquery
|
[2, 3, 5]
|
1,157,944
| 1,157,945
|
How do I rearrange the order of a list on a web page based on the current day?
|
<p>I'm working on a web site for a restaurant and the Daily Specials list takes up too much vertical space. Each <code><li></code> consists of the day of the week, name of the special, and a description.</p>
<p>I'd like to encapsulate the list using <a href="http://jscrollpane.kelvinluck.com/basic.html" rel="nofollow">jScrollPane</a>.</p>
<p>However, this would require the user to scroll to find out what the special for that day is.</p>
<p>So, I want to have the special for the current day always be present at the top, with the other specials listed below. For example, if today is Wednesday, the list would be ordered as follows:</p>
<ul>
<li>Wednesday</li>
<li>Thursday</li>
<li>Friday</li>
<li>Saturday</li>
<li>Sunday</li>
<li>Monday</li>
<li>Tuesday</li>
</ul>
<p>The specials will not change for the foreseeable future. Currently I have them in an unordered list (<code><ul></code>). What would be the best method to achieve this?</p>
|
php javascript jquery
|
[2, 3, 5]
|
419,317
| 419,318
|
Using Jquery .ajax method how can i read the query parameter and hit the web method and get the result in json on page load + asp.net?
|
<p>I am using Asp.net with jquery I wanted to display information for a specific product that is getting from the query string so my question is</p>
<p><strong>How can i get the query string through jquery and hit the Web method and get the result in json and display that result on my page on page load.</strong></p>
<p>Thanks waiting for your replay..</p>
|
asp.net jquery
|
[9, 5]
|
3,951,868
| 3,951,869
|
JavaScript not detecting change
|
<p>I am sure this is easy but I've looked all over with no luck. I have written a paging jQuery script that animates a list on my page. I have next and previous buttons which I am showing/hiding depending on where you are in the list however it doesnt pick up the position change the first time. Here is my code in jsFiddle:</p>
<p><a href="http://jsfiddle.net/mikeoram/t4787/" rel="nofollow">http://jsfiddle.net/mikeoram/t4787/</a></p>
<p>I'm sure I'm only missing something simple, all suggestions would be helpful.</p>
<p>Please only answer my question, there are reasons I'm doing it the way I am, and i no it can be done differently.</p>
<p>Thanks,</p>
<p>Mike</p>
|
javascript jquery
|
[3, 5]
|
5,131,968
| 5,131,969
|
How to separate PHP code and Javascript code
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1316203/how-can-i-separate-javascript-from-php-when-the-js-needs-a-php-variable">How can I separate javascript from PHP when the JS needs a PHP variable?</a><br>
<a href="http://stackoverflow.com/questions/13734338/how-to-define-a-variable-in-javascript-with-php-echo-function">How to define a variable in JavaScript with PHP echo function?</a> </p>
</blockquote>
<p>For example I have the following Javascript code. It uses PHP variables.</p>
<pre><code><script>
$(function() {
for(var items = 1; items <=<?php echo $items;?>; items++){
print_percentage_is("div.is"+items);
}
});
</script>
</code></pre>
<p>What's the best solution to separate the Javascript code with my Html/PHP code? For this case I can not use this way</p>
<pre><code><script type="text/javascript" language="javascript" src="/js/change.js"></script>
</code></pre>
<p>Do I need to create a PHP file and put the javascript in? What's the best solution?</p>
|
php javascript
|
[2, 3]
|
5,661,312
| 5,661,313
|
How can I get call on Emulator?
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/6502242/where-i-can-see-the-log-if-i-have-installed-application-on-phone">Where I can see the Log, If I have installed application on Phone?</a> </p>
</blockquote>
<p>My installed application on phone is getting crashed when any incoming call come or if we plugin/plugout charger. So I want to trace the error or Log.</p>
|
java android
|
[1, 4]
|
4,567,241
| 4,567,242
|
how to response.write bytearray?
|
<p>This is not working:</p>
<pre><code>byte[] tgtBytes = ...
Response.Write(tgtBytes);
</code></pre>
|
c# asp.net
|
[0, 9]
|
2,160,989
| 2,160,990
|
How do you debug a single ASPX file?
|
<p>How do you debug a single ASPX file?</p>
<p>I am somewhat new to ASPX files, but I am not new to C#.</p>
<p>I figured that all asp.net c# projects were run on the server as compiled code. And so there was some sort of binary file somewhere somehow or maybe a XAP file like they have with silverlight.</p>
<p>But it seems that this is not the case. it seems that, sometimes, you can have an ASPX file along with the code-behing C Sharp file and it runs just like a PHP file. For starters, is that right? Am I right so far?</p>
<p>Now, if I was the owner of both the ASPX file and the CSHARP code-behind file, how would I go about debugging it in Visual Studio?</p>
<p>How do I run the code?</p>
<p>My point is that there is no project to load. There is only a file.</p>
<p>After setting a break point, there is nothing to run. I have tried attaching to the browser that has the aspx code loaded but then the breakpoints become inactive.</p>
<p>the file is <a href="https://www.seattleu.edu/admission/nonMatricLander.aspx" rel="nofollow">https://www.seattleu.edu/admission/nonMatricLander.aspx</a></p>
<p>and out on the server there is just the aspx file and the accompanying .cs file </p>
<p>That is all there is. There is no solution file, there is no default.aspx file there is nothing else in the that directory apart from other .aspx files and aspx.cs files.</p>
<p>If it was a web form, there would be a project file and and or a solution file. There would be something compiled, right? There is nothing like that. there are no dll files</p>
|
c# asp.net
|
[0, 9]
|
5,316,804
| 5,316,805
|
Error in JavaScript when implementing input field shadow
|
<p>I want to implement a shadow into an input field. This is the JavaScript code that I am using:</p>
<pre><code><!-- input field shadow -->
var placeholder = "test field"
$("input").on({
focus: function() {
if (this.value == placeholder) {
$(this).val("").removeClass("shadow");
}
},
blur: function() {
if (this.value == "") {
$(this).val(placeholder).addClass("shadow");
}
}
}).trigger("blur");
</code></pre>
<p>When I run the code in Firefox I get this error message:</p>
<blockquote>
<p>illegal character }).trigger("blur");</p>
</blockquote>
<p>Is there a bug into the code? How I can fix it?</p>
|
javascript jquery
|
[3, 5]
|
210,550
| 210,551
|
jQuery .index() in javascript
|
<p>As per the jQuery api, the complementary operation to .get(), which accepts an index and returns a DOM node, <code>.index()</code> can take a DOM node and returns an index. Suppose we have a simple unordered list on the page:</p>
<pre><code><ul>
<li id="foo">foo</li>
<li id="bar">bar</li>
<li id="baz">baz</li>
</ul>
</code></pre>
<p><code>.index()</code> will return the position of the first element within the set of matched elements in relation to its siblings:</p>
<pre><code>alert('Index: ' + $('#bar').index();
</code></pre>
<p>We get back the zero-based position of the list item:</p>
<pre><code>Index: 1
</code></pre>
<p>I just want to know, how can we do the same using <strong>JavaScript</strong>?? </p>
|
javascript jquery
|
[3, 5]
|
510,414
| 510,415
|
Converting a string of JS Array to PHP array
|
<p>I have a string (in PHP) representing a JS array, and for testing purpose would like to convert it to a PHP array to feed them into a unit test. Here's an example string</p>
<pre><code>{ name: 'unique_name',fof: -1,range: '1',aoe: ',0,0,fp: '99,desc: 'testing ability,image: 'dummy.jpg'}
</code></pre>
<p>I could use a explode on the "," then on the colon, but that is rather inelegant. Is there a better way?</p>
|
php javascript
|
[2, 3]
|
1,235,466
| 1,235,467
|
Getting total for a column in ListView
|
<p>I need to get a sum for all items in a column within a listview. I put in the following code in the itemdatabound event, but realized after testing it that it will only be getting what is bound, oops.</p>
<p>So I was looking for a little help converting this to show a total for my column from all items bound to the ListView.</p>
<p>Thanks.</p>
<pre><code> if (e.Item.ItemType == ListViewItemType.DataItem)
{
ListViewDataItem item = (ListViewDataItem)e.Item;
Label lblQty = (Label)e.Item.FindControl("lblQuantity");
if (lblQty == null)
{
return;
}
if (lblQty.Text.Length == 0 || lblQty.Text == "")
{
return;
}
else
{
ListViewTotal += int.Parse(lblQty.Text);
}
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
2,270,291
| 2,270,292
|
How to fire alert once for each new space found in text String?
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/302122/jquery-event-keypress-which-key-was-pressed">jQuery Event Keypress: Which key was pressed?</a> </p>
</blockquote>
<p>I'm using below code to fire an alert every time a new space char is encountered as a user types into a text box.
This works until the user enters the first space, as the alert will be fired for each subsequent space.</p>
<p>For this String : 'test ' the alert will be fired once, which is correct</p>
<p>For this String : 'test test' the alert will be fired 5 times, but it should be just fired once.</p>
<p>For this String : 'test test test' the alert should be fired three times.</p>
<p>How can below code be amended so that alert fires just once for each new space character ?</p>
<pre><code>$("#myDiv").keyup(function() {
if$("#myDiv").val().indexOf(' ') != -1)
{
alert("space found");
}
};
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,713,883
| 1,713,884
|
how to fetch userID
|
<p>how do I fetch a user ID that is associated with the email address entered by the user in the text box?</p>
|
c# asp.net
|
[0, 9]
|
2,641,681
| 2,641,682
|
Byte type is wierd
|
<p>I need to send some bytes over UDP Protocol the start squence is 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF</p>
<p>When I define like this:</p>
<pre><code>byte [] begin = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
</code></pre>
<p>I get an error saying I need to cast those to byte type. Far as I know 0xFF doesn't exced the byte type so what is the problem ?</p>
<p>If i write this it works :</p>
<pre><code>byte [] begin = {(byte) 0xFF,(byte) 0xFF,(byte) 0xFF,(byte) 0xFF,(byte) 0xFF,(byte) 0xFF};
</code></pre>
|
java android
|
[1, 4]
|
842,946
| 842,947
|
How to get the dynamically created text box value in jsp using jquery javascript
|
<p>I am using code in Javascript like below:</p>
<pre><code>newTextBoxDiv.html('<td border="2">'+number+'</td>'
+'<td>'+grouptext+'</td>'
+'<td style="display:none">'+groupVal+'</td>'+'<td>'+itemText+'</td>'
+'<td style="display:none">'+itemId+'</td>'+'<td>'
+cuttingText+'</td>'+'<td style="display:none">'
+cuttingId+'</td>'+'<td><input type="text"
class="ui-state-default ui-corner-all" size="6" name="textbox'
+ counter +'" id="textbox' + counter + '" value="" size="13" ></td>'
+'<td><input type="checkbox" name="samples"/></td>'
+'<td><input type="text" class="ui-state-default
ui-corner-all" size="8" name="textbox' + counter
+'" id="textbox1' + counter + '" value="" size="13" >');
newTextBoxDiv.appendTo("#example");
</code></pre>
<p>My problem is that when I click on each row I need to get a text box value.</p>
|
javascript jquery
|
[3, 5]
|
5,318,780
| 5,318,781
|
Pulling HTML value through jQuery
|
<p>I have these data-attributes</p>
<pre><code><li data-audio="" data-pic="images/one.png" data-word="one" data-hint="What?"></li>
</code></pre>
<p>I pull them through using this function</p>
<pre><code>$(wordsData).each(function () {
var elm = $(this);
listOfWords.push({
"name": elm.data("word"),
"pic": elm.data("pic"),
"hint": elm.data("hint"),
"audio": elm.data("audio")
});
});
</code></pre>
<p>My problem is that when I pull the picture through I would like to display the hint in the same div. But for some reason when I check in the console it says value="", when it should say "What?"</p>
<pre><code><div class="hint-img-wrapper">
<img src="" value="" id="hintPic" class="pic-hint" alt="Hint" />
</code></pre>
<p>I display it it like this</p>
<pre><code> $("#hintPic").attr('src', listOfWords[rndWord].pic).attr('value', listOfWords[rndWord].hint);
$(hintPic).show();
</code></pre>
<p>Can someone tell me what I am doing wrong?</p>
|
javascript jquery
|
[3, 5]
|
4,978,259
| 4,978,260
|
Click function inside for loop
|
<p>I am trying to loop my .hide() and .show() click handlers and I can't get this simple part to work correctly. My buttons are called "#towelcome" etc. I'm assuminig I'm missing something stupid and obvious. All of the divs are hidden in css. </p>
<pre><code>var elements = ["welcome", "slides", "projects", "pages"];
for (i=0;i<=elements.length-1;i++){
$("#to"+elements[i]).click(function() {
$("#"+elements[i]).show();
});
}
</code></pre>
<p>/UPDATE:------------------------------------------------------------------------</p>
<p>The following code is the code I am trying to minify.</p>
<pre><code>$("#toprojects").click(function(){
$("#projects").show();
$("#slides").hide();
$("#pages").hide();
$("#welcome").hide();
});
$("#toslides").click(function(){
$("#projects").hide();
$("#slides").show();
$("#pages").hide();
$("#welcome").hide();
});
$("#topages").click(function(){
$("#projects").hide();
$("#slides").hide();
$("#pages").show();
$("#welcome").hide();
});
if(window.location.hash === "#slides"){
$("#projects").hide();
$("#slides").show();
$("#pages").hide();
$("#welcome").hide();
}
if(window.location.hash === "#projects"){
$("#projects").show();
$("#slides").hide();
$("#pages").hide();
$("#welcome").hide();
}
if(window.location.hash === "#pages"){
$("#projects").hide();
$("#slides").hide();
$("#pages").show();
$("#welcome").hide();
}
</code></pre>
<p>found a related post here and it solved it pretty nicely
<a href="http://stackoverflow.com/questions/494161/jquery-set-click-from-array-loop">jQuery: Set click from array loop.</a></p>
|
javascript jquery
|
[3, 5]
|
1,731,930
| 1,731,931
|
ASP.NET parent page update with JavaScript?
|
<p>here is my problem:
I have a ASP.NET appl. In the appl, there is a page (page A) that brings up a second page (page B) Page b is a simple form that fills a dataGrid that is located in Page A. I have tryed many approaches (IDisposable, creating methods for it...) but it does not give me the correct functioning. I have been looking into it for quit a while now and I am pretty sure the right way to do it is by using javaScript, but I am not that expert in that technology. I wonder if someone could point me to a solution (whether is JavaScript or not) or point me to an article that could make me understand the preblem better.</p>
<p>Many thanks for your help guys!!!!!
Cheers</p>
|
asp.net javascript
|
[9, 3]
|
3,164,296
| 3,164,297
|
Copying a parent element to be displayed in a modal box
|
<p>I have a link which I want to display a modal dialog box, containing a headline and a copy of the parent element of the clicked link.</p>
<pre><code>$('#link').live('click',function(){
container = $(this).parents(".container")[0];
message = $("<h2>You clicked on this.</h2>" + container);
message.find(".foo, .bar, .lorem").remove();
console.log(message[0]);
// code for displaying the box using message[0]
});
</code></pre>
<p>I also have to filter out certain children of the container element.</p>
<p>However, this (being my fourth attempt at it after dabbling with <code>clone()</code> and <code>insertAfter()</code> for a while) does not work. It only displays the <code><h2></code>, with no sight of the copy of the parent element.</p>
<p>Obviously the original parent element still visible on the page behind the modal should not be affected.</p>
<p>What's wrong here?</p>
|
javascript jquery
|
[3, 5]
|
597,818
| 597,819
|
ASP.Net, populate grid record by record
|
<p>I have a GridView on the page and some search option on top of the page and a search button,
When user click Search button, get first record and bind the grid and show to the user.
Now start getting remaining records (5 at a time) and add to the grid until entire search result.
Is that possible with asp.net and jQuery, If yes, please suggest me how can I achieve it.</p>
|
jquery asp.net
|
[5, 9]
|
1,094,308
| 1,094,309
|
What is the difference between focusin/focusout vs focus/blur in jQuery?
|
<p>I was handling some events using the following code with <a href="http://code.jquery.com/jquery-1.7.2.js" rel="nofollow">jQuery 1.7.2</a>:</p>
<pre><code>$().on('focus blur', function(event) {
console.log(event.type);
});
</code></pre>
<p>And I have noticed that <code>event.type</code> for both events, prints out: <code>focusin</code> and <code>focusout</code>.</p>
<p>What is difference between <code>focusin/focusout</code> vs <code>focus/blur</code>?</p>
|
javascript jquery
|
[3, 5]
|
732,561
| 732,562
|
Disabling the radio button with jQuery
|
<p>I have a group of radio buttons with same <code>name</code> and some of which may be disabled. I don't want the user to check or uncheck the disabled radio buttons . Obviously this means that if the checked radio button in the group is disabled the user cannot change the selection.</p>
<p>i wrote the following code for this.</p>
<pre><code>$("#container").delegate(":radio","click",function(e){
alert($(":radio").filter(":checked").val());
//this always shows up the value of the radio button clicked
if($(":radio").filter(":checked").is(":disabled"))
{
e.preventDefault();
}
});
</code></pre>
<p>I suppose the problem is that as soon as the radio button is clicked the selection changes and the event handler is executed and <code>.preventDefault()</code> reverts the selection.</p>
<p>I hope it's clear</p>
<p>Here is a <a href="http://jsfiddle.net/dTBVa/3/" rel="nofollow">jsFiddle</a></p>
|
javascript jquery
|
[3, 5]
|
955,250
| 955,251
|
Java Android - Casting Parent to Child to Child
|
<p><strong>Update:</strong>
I was being stupid thinking its different in this case. You can't cast a Parent to a Child full stop ;)</p>
<hr>
<p>I'm going mad.</p>
<p>I have a class:</p>
<pre><code>public class ActivityMonitorItemView Extends LinearLayout
</code></pre>
<p>Now I'm using a LayoutInflator to return a LinearLayout. But as this returns a View I'm first casting to a LinearLayout like so:</p>
<pre><code>LinearLayout sillyLayout = (LinearLayout) vi.inflate(R.layout.activity_monitor_item, null);
</code></pre>
<p>But now when I try cast sillyLayout to ActivityMonitorItemView..</p>
<pre><code>ActivityMonitorItemView amtv = (ActivityMonitorItemView) sillyLayout;
</code></pre>
<p>I get a ClassCastException...</p>
<p>Any Ideas? (Actual code used below)</p>
<pre><code>@Override
public View getView(int position, View convertView, ViewGroup parent)
{
ActivityMonitorItemView v = (ActivityMonitorItemView) convertView;
if(v == null)
{
LayoutInflater vi = (LayoutInflater)OurViewManager.getAnswersRef().getCurrentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
LinearLayout t = (LinearLayout) vi.inflate(R.layout.activity_monitor_item, null);
v = (ActivityMonitorItemView) t;
v.LinkUpToTask(listItems.get(position));
}
return v;
}
</code></pre>
|
java android
|
[1, 4]
|
4,463,343
| 4,463,344
|
Why do they use references instead of jQuery objects?
|
<p>In <a href="http://www.switchonthecode.com/tutorials/how-to-build-a-star-ratings-jquery-plugin" rel="nofollow">this</a> tutorial, they use containerElement.rating and starElement.rating for storing rating.</p>
<p>The question is : Why?? is it possible to use jQuery objects container and star like</p>
<p>container.rating and star.rating??</p>
<p>In their example, How does it work:</p>
<pre><code>star.click(function() {
containerElement.rating = this.rating;//What does 'this' refer to?? Star or starElement??
elements.triggerHandler("ratingchanged", {rating: this.rating});
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,566,126
| 1,566,127
|
jQuery: value.attr is not a function
|
<p>I have this snipped in my page:</p>
<pre><code>$('#category_sorting_form_save').click(function(){
var elements = $("#category_sorting_elements > div");
$.each(elements, function(key, value) {
console.info(key," : ",value);
console.info("cat_id: ",value.attr('cat_id'));
});
});
</code></pre>
<p>And when it is executed, I get:</p>
<pre><code>0 : <div class="dragable" cat_id="6" value="" style="opacity: 1;">
value.attr is not a function
console.info("cat_id: ",value.attr('cat_id'));
</code></pre>
<p>What am I doing wrong here? I am trying to get the value of the div.cat_id element.</p>
<p>Thanks :)</p>
<p>Eric</p>
|
javascript jquery
|
[3, 5]
|
2,653,939
| 2,653,940
|
Using jQuery to bind a click to the unused part of a page
|
<p>I'm stuck trying to bind a click redirect to the body tag on a page where there's not already another div. I have a typical header, container and footer layout but I want to place a site skin in the background for users to click on to register. </p>
<p>Here's what I have so far to target the body element:</p>
<pre><code>$('body').bind({
click: function() {
window.location = 'https://example.com/';
},
})
</code></pre>
<p>The background image displays fine and the redirect works but if I click on somewhere in the header, container or footer it will perform the redirect which is not what I want. I'd prefer it ignore those divs for purpose of the redirect.</p>
<p>Thanks for any suggestions!</p>
|
javascript jquery
|
[3, 5]
|
5,122,500
| 5,122,501
|
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]
|
3,888,836
| 3,888,837
|
Javascript widget inspired by iPhone UITableView?
|
<p>Cocoa Touch's UITableView allows a user to scroll through large numbers of data rows with good performance because it recycles table rows. Rather than create a GUI element for every single data row, a limited number of table rows is created, and simply updated with the relevant data as the user scrolls, giving the illusion of navigating up and down a very large number of table rows.</p>
<p>Has anyone seen this done in javascript? Is there a plugin available anywhere that will do this for me?</p>
|
javascript iphone
|
[3, 8]
|
2,378,516
| 2,378,517
|
Check if there are more elements to come in $.each()
|
<p>I am using the <code>$.each()</code> method of jQuery to loop over a couple of objects. Is there a way to find out if there are more objects to come in the <code>$.each()</code> method?</p>
<p>Something like:</p>
<pre><code>$.each(data, function(o, myObject) {
if(data.hasMoreObjects) {
// append something
} else {
// append nothing
}
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,933,220
| 5,933,221
|
Calculating time difference with start time and elapsed time
|
<pre><code>public static final long TIMEOUT = 60000;
public static final long SYSTEM_TIME = System.currentTimeMillis();
</code></pre>
<p>I have the TIMEOUT Value for my application set as 60000 and i have my system time. Now how would i know that <code>50 seconds</code> has been elapsed and i need to show a message to the end-user.</p>
<pre><code>if (TIMEOUT - SYSTEM_TIME <= 10000) {
Toast.makeText(getApplicationContext(), "10 Seconds Left", Toast.LENGTH_LONG).show();
disconnectHandler.postDelayed(disconnectCallback, DISCONNECT_TIMEOUT);
}
</code></pre>
|
java android
|
[1, 4]
|
3,096,801
| 3,096,802
|
Adding OutPutCache to Control Definition Alters its Class ...?
|
<p>I'm working on a web app (CMS) that loads controls dynamically into a holder page. Using .Net version 3.5.</p>
<p>All my controls inherit from a custom base class.</p>
<p>So at runtime I have a bit of code that does something like this:</p>
<pre><code>Sarx.cms.BaseControl bctl = (Sarx.cms.BaseControl)LoadControl(sourceOfTheControl);
</code></pre>
<p>All was fine until I added an outputcache directive to the control definition (in the markup).</p>
<p>No, the above cast fails with an InvalidCastException.</p>
<p>I looked at the Control that is the output of the LoadControl and cast, and the runtime reports it is now of type PartialCachingControl:</p>
<pre><code>Control c1 = LoadControl(PageData.PageApplications[i].Source);
c1.GetType()
</code></pre>
<p>UnderlyingSystemType: {Name = "PartialCachingControl" FullName = "System.Web.UI.PartialCachingControl"}</p>
<p>I'd appreciate it if someone could explain and/or suggest a workaround.</p>
<p>Thanks in advance,</p>
<p>5arx</p>
|
c# asp.net
|
[0, 9]
|
4,654,662
| 4,654,663
|
Trying to save the status of radio groups according to a select radio button
|
<p>I am working on a project where I have many radio buttons in several radio groups. What I would like to do is save the configuration of all the radio groups in accordance to a specific button in the first radio group. For example the first radio group is called select and I have 4 different select radio buttons. When I switch from the 4 buttons inside that group I would like the other radio group buttons to be filled in automatically to that of what they were previously, I would also like to save the configuration of the current button when it is switched through out the radio group. So for example if a radio button in the first radio group is switched it remembers the configuration of the previous one and will automatically load itself again when it comes back to that view.</p>
|
java android
|
[1, 4]
|
5,929,619
| 5,929,620
|
Wrap a mixed set of text nodes and HTML elements with JavaScript / jQuery
|
<p>I have this HTML</p>
<pre><code><div class="box">
<a href="#goals"> | <a href="#rules"> | <a href="#controls">
<p><a name="goals"></a></p>
<h2>Goals</h2>
... yada yada
</code></pre>
<p>and want it like this.</p>
<pre><code><div id="nav">
<a href="#goals"> | <a href="#rules"> | <a href="#controls">
</div>
</code></pre>
<p>JQuery have wrapAll(), but I can only select the links so the "|" gets left outside the div.</p>
<p>before('div') and after('div') creates a closed element, like <code><div></div></code> so what to do?</p>
<p>I'm using</p>
<pre><code>$('.box a[href^="#"]')
</code></pre>
<p>to select the links. They are part of a text resource file, so I cant edit anything.</p>
|
javascript jquery
|
[3, 5]
|
2,543,713
| 2,543,714
|
ComboBox object not accessible by me
|
<p>This is probably easy to solve, but the following cannot be done:</p>
<pre><code>protected void gSelectApplied(object sender, EventArgs e)
{
ComboBox box = (ComboBox)sender;
}
</code></pre>
<p>Because the ComboBox object is not present in the imported libraries. I went ahead an looked at the Microsoft documentation and I do not have access to the System.Windows.* libraries.</p>
|
c# asp.net
|
[0, 9]
|
2,848,095
| 2,848,096
|
Thread.sleep in Canvas
|
<p>I am not able to display the rectangles after a certain delay in code.
Here is what I am doing</p>
<p>DashPathEffect dashPath =new DashPathEffect(new float[]{1,0}, 1);</p>
<pre><code> paint.setPathEffect(dashPath);
paint.setStrokeWidth(300);
final int size =300;
</code></pre>
<p>canvas.drawLine(0, size ,100 , size, paint);</p>
<p>try {</p>
<pre><code> Thread.sleep(4000, 0);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
</code></pre>
<p>canvas.drawLine(110, size ,200 , size, paint);</p>
<hr>
<p>I am not able to notice any delay between these two rectagles in the mobile screen. Both appear at the same time. All I am trying to do is, draw the rectangles one after other with some delay in between. What this code is rather doing is, waiting for 4 seconds and then displaying both rectangles at same time. Thank you. </p>
|
java android
|
[1, 4]
|
3,086,311
| 3,086,312
|
Empty $_POST without Content-type
|
<p>If I make a POST request where the content-type is not set in the request header, the variable $_POST remains empty.</p>
<p>Question: How can I force PHP to fill $_POST?</p>
<p>I encountered the problem making an Javascript AJAX request using <a href="http://msdn.microsoft.com/en-us/library/cc288060%28v=vs.85%29.aspx" rel="nofollow">XDomainRequest</a> where you can not define any headers. Just to make it easier for you to understand the problem you can simulate the same effect without Javascript in PHP this way:</p>
<pre><code>$data = 'test=1';
$fp = fsockopen('www.yourpage.org', 80, $errno, $errstr, 5);
fputs($fp, "POST /test_out.php HTTP/1.1\r\n");
fputs($fp, "Host: www.yourpage.org\r\n");
//fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n");
fputs($fp, "Content-length: ". strlen($data) ."\r\n");
fputs($fp, "Connection: close\r\n\r\n");
fputs($fp, $data);
while(!feof($fp)) { echo fgets($fp, 128); }
fclose($fp);
</code></pre>
<p>test_out.php would be</p>
<pre><code>var_dump($_POST);
</code></pre>
<p>Without the correct content-type the variables in $_POST <em>magically disappear</em>.</p>
<p>This is more an educational question. I am asking this because most people here can not imaging that the content-type has this effect. I was asked to 'come back with facts'. So here you go.</p>
|
php javascript
|
[2, 3]
|
5,567,466
| 5,567,467
|
Don't want to submit form elements that I hide by hiding parent li
|
<p>I have form inputs placed in li element, and am hiding some of them by clicking a button. They get submitted even though they are hidden, so I was wondering what the alternative way would be to hide these element in a way that they will not be submitted?</p>
|
javascript jquery
|
[3, 5]
|
5,572,572
| 5,572,573
|
Confirmation prompt before PHP execution
|
<p>I've build a decent CMS for my website. It allows me to manage the entire content, as well as delete an article. I just want to make some kind of Javascript(any other suggestions are most welcome) stop and ask function. When someone clicks delete(my employees are going to use the CMS in the very near future) show a prompt asking Are you sure? and if they clicks yes, only then go through with the delete. The delete is being done through an url request. <code>http://mywebsite.com/somefile.php?action=delete_article&id=whatever_id</code> Something that my quantum physics teacher used to refer to as the anti-idiot protection. Thanks in advance for all your help!</p>
|
php javascript
|
[2, 3]
|
2,348,488
| 2,348,489
|
Suggesstion for executing a PHP image treatment script
|
<p>I have a <a href="http://pastebin.com/f70e3ccf7" rel="nofollow">PHP script</a> that has as input a target image and an image dir to make a treatment.
Wanting to make an Android app, i have thinked about this two ideas:
1- Choose the images in the Android device and send them to the server, the server will make treatments and send the output final image to the device.
Problem: A high amount of data will be sent according to the number of images and their size.
2- Execute the php script locally in the device, but i think that it must have a good CPU and i don't know if Android OS can handle that.</p>
<p>Can you please advice me and propose some ideas/solutions?
Thank you very much</p>
|
php android
|
[2, 4]
|
4,100,582
| 4,100,583
|
how to properly append div at run time?
|
<p>Hello im trying to wrap a div with another div by using jquery append and im having one hell of a time.
here is my div</p>
<pre><code><div id ="one" class="PortalBox" data-title="Concur">
<div class = "localContent">
FGDDDDDDDDDfdgdfffffffff
dfgggggggggggggggggggggggggg
dfggggggggggggggggggggggggg
fgddddddddddddddddddddddddd
fgddddddddddddd.
</div>
</div>
</code></pre>
<p>now what i would like to do is add an open div tag right above
and then close it after the closing tag related to local content.
here is what i tried and i keep failing miserably.</p>
<pre><code> /*open div*/
$('.localContent').each(function(idx, ele){
//alert(ele.className);
$('<div class="ab_Box1d" style ="width:630px">').insertBefore($(ele))
})
/*close the div*/
$('.localContent').each(function(idx, ele){
//alert(ele.className);
$('</div>').insertAfter($(ele))
})
</code></pre>
<p>what is the proper way to do this? any help would be most appreciative.</p>
|
javascript jquery
|
[3, 5]
|
2,903,328
| 2,903,329
|
ASP.Net get an error when trying to adjust css in code behind
|
<p>I have this code in my code behind:</p>
<pre><code>if (Request.QueryString["category"] == "9")
{
HtmlControl downloadableProducts = (HtmlControl)Page.FindControl("downloadableProducts");
downloadableProducts.Style.Add("display", "none");
}
</code></pre>
<p>It is generating the following error:</p>
<p>System.NullReferenceException: Object reference not set to an instance of an object. on line 43 which is the this <code>downloadableProducts.Style.Add("display", "none");</code></p>
<p>My div looks like this:</p>
<pre><code><div id="downloadableProducts" runat="server">
<a href="#">Downloadedable Products</a>
</div>
</code></pre>
<p>What am I doing wrong?</p>
<p>If I remove this line from my code behind:</p>
<pre><code>HtmlControl downloadableProducts = (HtmlControl)Page.FindControl("downloadableProducts");
</code></pre>
<p>I get this error:</p>
<p>The name 'downloadableProducts' does not exist in the current context</p>
|
c# asp.net
|
[0, 9]
|
2,791,734
| 2,791,735
|
Load Javascript for a widget Worpress
|
<p>I want to load a special Javascript File just when the widget is loaded in the sidebar. Where do I have to put my <code>wp_enqueue_script(...)</code> lines?</p>
<pre><code>class controller_widget extends WP_Widget {
function controller_widget() {
$this->color = "red";
$this->dir = plugin_dir_url(__FILE__);
$widget_ops = array('classname' => 'controller_widget', 'description' => __('Benutzerfreundlicher Controller zur eingrenzung von Objekten'));
$control_ops = array('width' => 350, 'height' => 400);
$this->WP_Widget('controller_widget', __('Controller'), $widget_ops, $control_ops);
// At the moment I load the code here, but I want to proof that it is just loaded when the widget really is shown in the sidebar.
}
}
function widget( $args, $instance ) {...}
}
</code></pre>
<p>Thank you!</p>
|
php javascript
|
[2, 3]
|
1,779,283
| 1,779,284
|
can we create instance of class by using USE Keyword
|
<p>We use keyword to refer the namespaces and class</p>
<p>can we create instance of class by using USE Keyword </p>
<p>i need to access method in that class.</p>
<p>Like eg:- using (new class) if any other ways please let me know. </p>
|
c# asp.net
|
[0, 9]
|
3,294,842
| 3,294,843
|
How to get recently inserted row index in Datalist
|
<p>Is there a way to get the index of the most recently inserted record that was bound to a datalist? My datalist is sorted, so my record is not the last one. I am trying to highlight the record that just got inserted, so I need to know where it is in the datalist.</p>
<p>This is in ASP .NET C#.</p>
<p>edit: I should probably rephrase my question. After I insert a record, I "re-get" my records and rebind the datalist to update it with the inserted record. Depending on what sort mode it is on, the newly added record can be anywhere in the list.</p>
|
c# asp.net
|
[0, 9]
|
3,381,252
| 3,381,253
|
Validate DropDownList if checkbox checked
|
<p>ASP.NET3.5 Webforms. Am trying to put a validator on the drop down list, only if the checkbox is checked.</p>
<p>This doesn't work. If I put an alert in the onclick event, it does show.</p>
<pre><code><script language="javascript" type="text/javascript">
function setVal(sender) {
var myVal = document.getElementById('<%=(DropDownList)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("ddlSupplierCouncilArea")%>');
ValidatorEnable(myVal, !sender.checked);
ValidatorValidate(myVal)
}
</script>
<asp:CheckBox runat="server" ID="cbxIsSupplier" Text="I wish to register as a Supplier in the"
OnClick="setVal(this)" />
<asp:DropDownList ID="ddlSupplierCouncilArea" runat="server">
<asp:ListItem>[Please select]</asp:ListItem>
<asp:ListItem Value="blah1">blah1</asp:ListItem>
<asp:ListItem Value="Waimakariri">blah2</asp:ListItem>
</asp:DropDownList>
<div class="validators">
<asp:RequiredFieldValidator ID="rfvCouncilArea" runat="server" InitialValue="[Please select]"
ControlToValidate="ddlCollectorCouncilArea" ErrorMessage="Select a Council Area"
Enabled="false" ToolTip="Select a council area" ValidationGroup="CreateUserWizard1">* required</asp:RequiredFieldValidator>
</div>
</code></pre>
|
javascript asp.net
|
[3, 9]
|
87,830
| 87,831
|
javascript getting client ip
|
<p>Hi I found how to get client ip by answer here:
<a href="http://stackoverflow.com/questions/102605/can-i-lookup-the-ip-address-of-a-hostname-from-javascript">http://stackoverflow.com/questions/102605/can-i-lookup-the-ip-address-of-a-hostname-from-javascript</a></p>
<p>But I don't understand how to use it. </p>
<p>This is what I have:</p>
<pre><code>var user;
if ($('#user-id').length) {
user = $('#user-id').text();
} else {
http://jsonip.appspot.com/?callback=getip
function getip(json){
user = json.ip;
}
}
</code></pre>
<p>I don't understand how to include the url and how to use the getip function.</p>
<p>I need to set the user to the ip address in the else.</p>
<p>Thanks!</p>
|
javascript jquery
|
[3, 5]
|
5,587,592
| 5,587,593
|
Update select list while open using JQuery
|
<p>I encounter a situation where I have to update the content of select list while it is open. For the moment, to see the changes made, the user has to click again on the select list.</p>
<p>To change the content, I use the method .html() of the select list that I want to apply the changes.</p>
<p>To put you in the context, the event that trigger the changes in the select list, is when I change the select item of another select list when we exit it (loose focus/blur).</p>
<p>The problem is, if I change the content of the select list in its focus event and get the value of the other select to show the right content, I will have to click on the select again to see the changes and if I made the changes in the blur event of the other select, I would have the same problem if focus is set immediatly to the select list that the content change.</p>
|
javascript jquery
|
[3, 5]
|
4,787,128
| 4,787,129
|
Jquery - How to get the selector of a plugin call?
|
<p>Being a Noob at Jquery, I'll ask a noob question.
How do you get the selector of a plugin call inside the plugin?</p>
<p>For example:</p>
<pre><code>$('.greatClassName').greatPlugin();
</code></pre>
<p><strong>From <code>greatPlugin()</code>, how can I get <code>'.greatClassName'</code>?</strong></p>
<p>Thanks in advance for your help.</p>
|
javascript jquery
|
[3, 5]
|
59,196
| 59,197
|
Php variable to JavaScript
|
<p>How to add the value of php variabele to jquery variable and adds them,i have a form that will take a value and post to second page where second page contains a div panel where the form checkboxes values are adding and subtracting,basically i want to add the submitted value from page1 to page2.Here is the code.I have 3 form values which will be redirected one by one.Whenever user submits the respective button</p>
<pre><code>if($_POST['submit'])
{
$beg=$_POST['basic'];
}
function refreshPrices() {
var currentTotalValue = 0;
var beg=?????
$("#results div").each(function() {
if (!isNaN(parseInt($(this).find("span").text().substring(1)))) {
currentTotalValue += parseInt($(this).find("span").text().substring(1));
}
});
$("#totalValue").text("$" + currentTotalValue)
}
</code></pre>
|
php javascript jquery
|
[2, 3, 5]
|
5,895,400
| 5,895,401
|
setText of a TextView array
|
<p>What I'm trying to do is have an EditText where people enter their names. As people press the "Add Player" button, the name which they just typed appears below in the list form. So I've created 8 textviews which are initially invisible but as people type the name press the "Add Player" button, the text changes to their names and becomes visible.</p>
<p>So I set up a TextView array of the list of names, which are all text views</p>
<pre><code>TextView[] nameList = new TextView[]{name1, name2, name3, name4, name5, name6, name7, name8};
</code></pre>
<p>Later on in the code in the onClick section, I had</p>
<pre><code>for (int i = 0; i < 8; i++) {
String name = etName.getText().toString();
nameList[i].setText(name);
nameList[i].setVisibility(View.VISIBLE);
}
</code></pre>
<p>However, with this, whenever I press the "add player" button, the app crashes and I get a NullPointerException. How would I solve this?</p>
<p>The problem isn't with the for loop as the app crashed without it. The problem seems to be with the array as if I put</p>
<pre><code>name1.setText(name);
name1.setVisibility(View.VISIBLE);
</code></pre>
<p>the code worked fine.</p>
|
java android
|
[1, 4]
|
5,624,193
| 5,624,194
|
JSCocoa and the iPhone
|
<p>Now I have a stack of free time on my hands, I wanna get into iphone dev fo real.</p>
<p>But Objective C scares me (a bit). It feels I'm going a bit back in time. I say this because I've spent the last 8 months coding in C++.</p>
<p><a href="http://inexdo.com/JSCocoa" rel="nofollow">JSCocoa</a> looks awesome, but does this actually work on the iphone?</p>
<p>What would need to be done to get this working on the iphone?</p>
|
javascript iphone
|
[3, 8]
|
2,874,319
| 2,874,320
|
Refresh button for an iframe jquery or javascript
|
<p>Hello i have a problem. I have a page in which i have inside an iframe. In the parent page (not in the iframe), i want to build the browser buttons back, fw, refresh and home page.
The back, fw, home page buttons are almost ok. The refresh button doesnt work.
The code is below:</p>
<pre><code><a href="javascript:;" onClick="parent.document.getElementById('my_frame').location.reload();">
</code></pre>
<p>I also have to tell that my url is not changing i mean i have used post method and the url is always the same.
Any answers of jquery or javascript???</p>
<p>Thanks in advence, i m really desperate</p>
|
javascript jquery
|
[3, 5]
|
354,476
| 354,477
|
Unexpected token ) fault JS code cant find the error?
|
<p>I keep receiving the error <strong>unexpected token ")"</strong> in the following code. Can anyone tell me what is wrong with my code?</p>
<pre><code>function postFrom()
{
/* contactform */
$.post('/contact_owner/send/', {
customer_name: $('[name="customer_name"]').val(),
customer_phone: $('[name="customer_phone"]').val(),
customer_email: $('[name="customer_email"]').val(),
customer_message: $('[name="customer_message"]').val() +' \n-Adress: '+ $('[name="customer_address"]').val() +' -Postnummer: '+ $('[name="customer_zipcode"]').val() +' -Ort: '+ $('[name="customer_city"]').val() + ' -Markisvävar: '+ final,
subject:$('[name="customer_name"]').val() +' - '+ $('[name="sub"]').val() }, function(data){
if (data) {
$('#status_notice').css('color', 'red');
$('#status_notice').html(data);
} else {
$('#status_notice').css('color', 'green');
$('#status_notice').html('Ditt meddelande skickades.');
$('[name="customer_name"]').val('');
$('[name="customer_phone"]').val('');
$('[name="customer_email"]').val('');
$('[name="customer_address"]').val('');
$('[name="customer_zipcode"]').val('');
$('[name="customer_city"]').val('');
$('[name="customer_message"]').val('');
$('input[type=checkbox]').each(function()
{
this.checked = false;
});
}
});
event.preventDefault();
});
});
/* contactform END */
}//end function
</code></pre>
|
javascript jquery
|
[3, 5]
|
4,682,358
| 4,682,359
|
Checking for length of ul and removing an li element
|
<p>I am trying to remove the last <code><li></code> element from a <code><ul></code> element only if it exceeds a particular length. For this, I am doing something like this:</p>
<pre><code>var selector = "#ulelement"
if($(selector).children().length > threshold) {
$(selector + " >:last").remove();
}
</code></pre>
<p>I don't like the fact that I have to use the selector twice. Is there a shorter way to do this? Something like a "remove-if-length-greater-than-threshold" idea. I was thinking that maybe there is a way to do this using the live() function but I have no idea how.</p>
|
javascript jquery
|
[3, 5]
|
5,794,659
| 5,794,660
|
Unable to return data from $.post to display using jquery?
|
<p>My html content look like this:</p>
<pre><code> <table>
<tr>
<th>Log1 Column</th>
<th>Log2 Column</th>
<th>Log3 Column</th>
</tr>
<tbody id="bottomLogTable"></tbody>
</table>
</code></pre>
<p>Somehow I'm not getting the return data from $.post in the #bottomLogTable location but firebug says 200 ok, meaning the data returned.</p>
<pre><code> $("#logClick").live("click", function()
{
$.post("node2542.txt", function(data)
{
$("#bottomLogTable").append(data); // not display returned data
$("#bottomLogTable").html(data); // also not display returned data
});
});
</code></pre>
<p>Any suggestions or ideas to get me going in the right direction in resolving this issue?</p>
|
javascript jquery
|
[3, 5]
|
3,402,504
| 3,402,505
|
JQuery .attr("title") undefined
|
<p><strong>Solved</strong> but the answer that contained a key debugging suggestion was deleted by author. Consider case closed.</p>
<p>This should be really simple, but for some reason I just cannot figure it out. I need to get the value of a div's title attribute, and the JQeury code I have is:</p>
<pre><code>var name = $('#stg'+this.id).attr('title');
</code></pre>
<p>and the div in the relevant HTML source code is:</p>
<pre><code><div class="stage" id="stg32432432" title="Name - desc">...</div>
</code></pre>
<p>For some odd reason, request for <code>attr("title")</code> keeps returning <code>undefined</code>, even though <code>attr("id")</code> and <code>attr("class")</code> all return expected values with no issues. What am I missing?</p>
<p><strong>Edit</strong>: I tried debugging it with a trick suggested in a (now deleted) reply:</p>
<pre><code>var name = $('#stg'+this.id)[0].outerHTML;
</code></pre>
<p>and lo and behold, it shows:</p>
<pre><code><div class="stage" id="stg32432432">...</div>
</code></pre>
<p>Something ate my title! Everything else is exactly as I expected, but the title is missing. Too bad I cannot mark that reply as correct, as I think from here on I can trace where the attributes gets annihilated. </p>
<p><strong>Update</strong>: it turned out that a third party library used for displaying titles as fancy tooltips was stripping the titles as it processed them. Mystery resolved.</p>
<p>Thanks to all.</p>
|
javascript jquery
|
[3, 5]
|
3,352,554
| 3,352,555
|
Coding a javascript carousel slider from scratch with jquery - using variables
|
<p>So my code works to a degree. I have a slider, with some left & right buttons.</p>
<p>What I'm trying to do is make sure that it can't slide past a certain point one way or the other, as there will be a fixed number of slides. So I've introduced a variable called slideWidth which I'm trying to use to keep track of the current margin. If it reaches a certain number I only want one button to work. My code below doesn't seem to change though - I can hit the left button unlimited times, and never the right...</p>
<pre><code><script>
$(document).ready(function() {
var slideWidth=0;
if (slideWidth == 0)
{
$("#slideLeft").click(function(){
$(".slideOverflowHide").animate({"margin-left": "-=1100px"}, "slow");
slideWidth = slideWidth - 1100;
});
}else if (slideWidth == -3300){
$("#slideRight").click(function(){
$(".slideOverflowHide").animate({"margin-left": "+=1100px"}, "slow");
slideWidth = slideWidth + 1100;
});
}else{
$("#slideRight").click(function(){
$(".slideOverflowHide").animate({"margin-left": "+=1100px"}, "slow");
slideWidth = slideWidth + 1100;
});
$("#slideLeft").click(function(){
$(".slideOverflowHide").animate({"margin-left": "-=1100px"}, "slow");
slideWidth = slideWidth - 1100;
});
}
});
</script>
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,654,373
| 1,654,374
|
asp.net and jquery ui draggable beginners
|
<p>Hi im very new to jquery and combining it into my asp.net work stuffs.</p>
<p>Ive read the order you reg the jquery files matters, so ive put the core file at the top ?
I really dont understand what im getting wrong here :</p>
<pre><code> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<asp:PlaceHolder runat="server" ID="ph">
<script src="development-bundle/ui/jquery.ui.core.js" type="text/javascript"> </script>
<script src="development-bundle/jquery-1.7.2.js" type="text/javascript"></script>
<script src="development-bundle/ui/jquery.ui.draggable.js" type="text/javascript"> </script>
<script type="text/javascript">
$(function () {
$("#draggable").draggable();
});
</script>
</asp:PlaceHolder>
<asp:Panel ID="pnl_deck_holder" runat="server">
</asp:Panel>
<div id="draggable" class="ui-widget-content">
drag me
</div>
</asp:Content>
</code></pre>
|
jquery asp.net
|
[5, 9]
|
1,235,519
| 1,235,520
|
how to select each fourth div in collection using jQuery
|
<p>I have gallery alike div container with many item divs inside. I want to select each fourth or in programming therms itemID % 4 == 0 item.</p>
<p>How can i do that with jQuery?</p>
|
javascript jquery
|
[3, 5]
|
627,863
| 627,864
|
Find Html Inside a String Using Jquery
|
<p>I am not sure how practical this question is , but what i am trying to do is find html inside a string and then append pre tags to it using jquery. let say i have a variable with following string.</p>
<pre><code>var string = "Some normal text <html><body><div> This is the html </div> </body></html>";
</code></pre>
<p>Html inside the string is dynamic and can contain any tags , what i want is to find the starting and ending of html and append,prepend pre tags accordingly.</p>
<p>Thanks</p>
|
javascript jquery
|
[3, 5]
|
1,276,663
| 1,276,664
|
virtual function
|
<p>what are virtual functions? what is pure virtual function? please explain with example</p>
|
java c++
|
[1, 6]
|
2,665,540
| 2,665,541
|
JQuery Onclick Change Image Src not refreshing the image
|
<p>I am using the code to change the image src with jquery:</p>
<pre><code><script>
$(document).ready(function() {
$('#MyDiv').click(function() {
$('#MyImageID').attr('src', 'image1.jpg');
});
});
</script>
</code></pre>
<p>My problem is that although it's actually changed the src it's not actually showing the new image.</p>
<p>Does it have to refresh the image ?</p>
<p>How can I sort this?</p>
|
javascript jquery
|
[3, 5]
|
3,425,548
| 3,425,549
|
object array mobile development
|
<p>Im currently creating a tile-based game for android. Using java via dalvik JVM. im fretting over a decision to represent objects in a particular map. should i use an id based map (2 dimensional integer array) and place game logic in a separate function in the game engine, or create an object array (2 dimensional array of game objects) and store game logic within the class methods. i am thinking about the cost of object creation and garbage collection vs extensibility.</p>
|
java android
|
[1, 4]
|
4,550,996
| 4,550,997
|
Search Engine Optimization (SEO) & Friendly URLs using ASP.Net
|
<p>please tell me best to achieve Search Engine Optimization (SEO) & Friendly URLs using ASP.Net</p>
|
c# asp.net
|
[0, 9]
|
1,182,316
| 1,182,317
|
Android Augmented Reality disable camera elements when device is 180 degree?
|
<p>I'm developing an android Augmented reality application. I want to disable the camera elements(places on camera view) when i change the device angle to 180 degree(device in rest position) and re enable them when the device is held at 90 degree. </p>
<p>How do i do it? My Augmented Reality window is a camera view.. </p>
|
java android
|
[1, 4]
|
179,072
| 179,073
|
How can I tell wheter a file is opened by an other application?
|
<p>Is there a way to tell whether a file is opened by another application in PHP of Java?</p>
|
java php
|
[1, 2]
|
2,729,218
| 2,729,219
|
Working with percents in Jquery
|
<p>I'm building a site with a fluid layout, and therefore need to use percentages in my Jquery sizes and animations. The problem, as I've discovered, is that Jquery doesn't understand percentages. Here's an example of what I'm after:</p>
<p>The page <code><body></code> is 100% wide.</p>
<p><code><article></code> is the width of 71% of the page body.</p>
<p><code><hgroup></code> is the width of 33.2% of <code><article></code></p>
<p>I would like <code><article></code> to be the same width as <code><hgroup></code> on page load (so that only <code><hgroup></code> is showing), then expand to 71% of the page width again when <code><hgroup></code> is clicked, allowing the rest of the content within <code><article></code> to show. At the same time, I'd like <code><article></code> to slide left by the width of <code><hgroup></code>, hiding <code><hgroup></code>.</p>
<p>Is there any way to make this kind of calculation, or will I have to resort to pixels?</p>
|
javascript jquery
|
[3, 5]
|
538,456
| 538,457
|
ASP.NET how to push notification to client (same as Gmail)
|
<p>How can i push notification to client same as Gmail do?
which technology should i use?</p>
|
c# asp.net
|
[0, 9]
|
4,991,542
| 4,991,543
|
Calling javascript method on html page, loaded in C#
|
<p>Is it possible?
I mean, I have loaded html page (with HtmlAgilityPack for example) and javascript file. I need to apply javascript method from this file (or whole javascript file) to my loaded html page and do this from C# code. Then save result html to filesystem.
Can I do that?</p>
|
c# javascript
|
[0, 3]
|
135,728
| 135,729
|
jQuery Index of Hovered Button
|
<p>I'm not sure why I'm not figuring this out... I do this all the time. Must be having a "Monday Moment." But, basically, here's what I have:</p>
<pre><code>$('#nav ul li a').hover(hoverOn, hoverOff);
function hoverOn (evt) {
//how do I get the index of which button was hovered (from the jQuery group)?
}
</code></pre>
<p>My code looks like this:</p>
<pre><code><div id="nav">
<ul>
<li><a href="#" id="index">Home</a></li>
<li><a href="#" id="about">About Us</a></li>
<li><a href="#" id="services">Services</a></li>
<li><a href="#" id="resources">Resources</a></li>
<li><a href="#" id="contact">Contact</a></li>
</ul>
</div>
</code></pre>
|
javascript jquery
|
[3, 5]
|
252,499
| 252,500
|
how to set local path in javascript of window.open by using in C#.net
|
<p>i am trying to open the excel which was in local disc D path of my system since i have set this bellow string as such but it was not working in c#.net</p>
<pre><code>string strScript = "<script language=JavaScript>window.open('file://D:/Ajman/FrameworkWebUI/Temp/ExcelFileName.xls',null,'width=1,height=1,toolbar=no,top=300,left=700,right=1, scrollbars=no,locaton=yes,resizable=1');</script>";
</code></pre>
|
c# javascript
|
[0, 3]
|
5,467,748
| 5,467,749
|
Best way to return dynamic non-html content from a page
|
<p>I should start by saying that I am using ASP.NET using C# in a .NET 2.0 environment. In particular, I am trying to generate a csv download when the user clicks on a link button. The link to my postback is inside an UpdatePanel. In the past (before ajax) to return non-html content I would use code such as the following:</p>
<pre><code>string filename = e.CommandArgument.ToString();//somefile.csv
string fileContents = SomeClass.GetFile(filename);
Response.AddHeader("Content-disposition",
string.Format("attachment; filename={0}", filename));
Response.Write(fileContents);
</code></pre>
<p>But since the content is not trying to do a full refresh of the browser this technique does not work.</p>
<p>Does someone have a better approach for this kind of situation. One constraint I have is that I am stuck with .net 2.0 for this part of the project and can't switch to 3.5 to solve this problem. </p>
<p>p.s. I need to generate the content with a dynamic filename as well</p>
|
c# asp.net
|
[0, 9]
|
5,012,669
| 5,012,670
|
Javascript single page architecture with module autonomy
|
<p>I just started this HTML5 project where we decided to make it a single page architecture by leveraging jQuery $.load() method. Unfortunately, as soon as the JS started to grow, we quickly started running into issues where the modules loaded into the master dashboard have no knowledge of their parent.</p>
<p>The architecture looks like this:</p>
<p>dashboard.html (master file)<br>
moduleA.html<br>
moduleA.js<br>
moduleB.html<br>
moduleB.js<br>
moduleC.html<br>
moduleC.js</p>
<p>Since we decided to also keep the JS as separate files, we are having to load all JS files through dashboard.html in order to invoke them individually when modulex is loaded.</p>
<p>So when loading moduleA.html into the dashboard we have to call its corresponding JS. To do this we simply wrote the JS using a Module Pattern so we can easily invoke it by doing a function call, like:</p>
<pre>
<script>
moduleA
</script>
</pre>
<p>or this if we want to access a specific property of this member.</p>
<pre>
<script>
moduleA.someMethod();
</script>
</pre>
<p>Now, I know there are is gotta be a nicer way of doing this, right? I hate having to have script tags in the HTML modules in order to load its corresponding JS file.</p>
<p>Another limitation of this is the fact that we no longer can work on modules individually, since the scripts and CSS invocation happens on the parent (dashboard.html) so certainly when moduleA.html is loaded directly, it is pure HTML with no script or CSS.</p>
<p>I looked through the other questions but I didn't see anyone with the same problem.</p>
<p>I looked at AngularJS, EmberJS, KO.JS and BoilerPlateJS but none of them addresses what we are trying to accomplish. The only one that has a similar single page concept is jQuery Mobile but I don't know if you can switch from jQuery to jQuery Mobile and everything remains working.</p>
<p>Has anyone face this issue yet? Is there a solution or would I have to go with a custom solution.</p>
<p>Thanks!</p>
|
javascript jquery
|
[3, 5]
|
2,010,385
| 2,010,386
|
How to fetch Android Market data when there is no API?
|
<p>As far as I can tell, there is no API (official or unofficial) to access information about Apps on the Android Market (info such as Title, Icon, Description, Downloads, Comments, etc..) However, there are a few <a href="http://androidstats.com/" rel="nofollow">websites</a> that have managed to compile this information anyway.</p>
<p>My question is: How is this being done?</p>
<p>A couple of guesses.</p>
<ul>
<li>Manually (not likely, due to volume)</li>
<li>Implemented the protocol used by the official app (by decompiling or observing packets)</li>
<li>Running some kind of debugger with the official app to extract the live data</li>
<li>Using some kind of automation + screen shots + text recognition (seems complicated)</li>
<li>Modifying the (open) source to write a log file</li>
</ul>
<p>I'm just curious how this was done because I sure can't figure it out. Thanks. </p>
|
java android
|
[1, 4]
|
2,457,168
| 2,457,169
|
get text node of an element
|
<pre><code><div class="title">
I am text node
<a class="edit">Edit</a>
</div>
</code></pre>
<p>I wish to get the "Iam text node" do not wish to remove the "edit" tag and need a cross browser solution.
it might be something simple, but I can't think of another way of getting to it.</p>
|
javascript jquery
|
[3, 5]
|
1,861,074
| 1,861,075
|
How to search for positions inside a path with Region
|
<p>I have some sprite objects at different positions on the screen. When I draw a shape around one or several of those objects, I want to know which object that are inside. For this I'm using the Region class and the contains() method. The drawn shape is stored as a path. For now I have only made some code to check for any the objects position, but it's not working? It seems like it's not finding any positions despite that I have a shape around them. What have I done wrong? Or is there a better way?</p>
<pre><code>// Create path
path.moveTo(touchDownX, touchDownY);
for(Point point: points) {
path.lineTo(point.x, point.y);
}
// Draw path
canvas.drawPath(path, paint);
Region region = new Region();
region.setPath(path, region);
// Loop throw all circle objects
for (int i=0; i<5;i++) {
int x = circleManager.getCirclePositionX(i);
int y = circleManager.getCirclePositionY(i);
if(region.contains(x, y))
Log.i("YES!", "");
}
</code></pre>
|
java android
|
[1, 4]
|
1,658,871
| 1,658,872
|
How to make the Setting works for Class Library project in C# 2.0?
|
<p>I am putting the setting under the property of one of my C# Class Library project for app setting:</p>
<pre><code>EUCAccountService_ConnectionString
EUCTelcoDB_ConnectionString
</code></pre>
<p>In the development, it works nicely. Until I deported to production, I realise that the component that use those thing .. it just hang. I found that under \BIN when it compiled dewaCorp.EUC.TelcoDB.Data.dll.config and open up that file and turn out nothing.</p>
<pre><code><?xml version="1.0" encoding="utf-8" ?>
<configuration>
</configuration>
</code></pre>
<p>How to make this works? I thought by compiling it, it turned to some sort config file or something. But it didn't.</p>
<p>I am appreciated your comment.</p>
|
c# asp.net
|
[0, 9]
|
2,838,715
| 2,838,716
|
How can I discover whether a particular piece of data is encrypted?
|
<p>How can I discover whether a particular piece of data (say, a string, or file data) is encrypted? I wish to discover this programmatically, rather than via manually inspection.</p>
|
java android
|
[1, 4]
|
3,090,988
| 3,090,989
|
Is it possible to hide the content of an asp.net master page, if page is opened as a popup?
|
<p>I have several aspx pages that can be opened either normally (full screen in browser), or called from another page as a popup (I am using Greybox, fwiw)</p>
<p>If the page is opened as a popup in Greybox, I would like to NOT display the master page content (which displays common top and left menus, etc).</p>
<p>As far as I know, there is no way of knowing server side if the page is a popup, this must be detected in client side javascript (in the case of Greybox, by checking window.parent.parent), and therefore the master page content must be hidden via javascript as well.</p>
<p>Any ideas on how to approach this?</p>
|
asp.net javascript
|
[9, 3]
|
1,160,327
| 1,160,328
|
Re-running JQuery's selectors and actions after a programmatic insertion of new content
|
<p>Fellow JQuery hackers, hello :-)</p>
<p>Suppose you have the following code:</p>
<pre><code>$('.links').click(function(){
//Do something
}
</code></pre>
<p>And I then insert dynamic content into a DIV's HTML content (Say, for example, after clicking a button, the new content gets inserted). This content has the "links" class. The problem is that the "click" button doesn't get registered with the newly inserted content.</p>
<p><strong>How do I tell JQuery to re-select all the elements with a "links" class and apply the above function on them? Can this be automated?</strong></p>
<p>Thanks.</p>
|
javascript jquery
|
[3, 5]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.