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 |
---|---|---|---|---|---|
3,712,487 | 3,712,488 |
Closing Navigation onClick of any area of the screen
|
<p>I have a dropdown navigation which opens onClick.</p>
<p>What I want to happen is, that once the ul is open, I want it to close whenever the user goes to open any of the other dropdowns or clicks anywhere away from the dropdown.</p>
<p>At the moment, You have to specifically click the parent li to close the dropdown.</p>
<p>See demo</p>
<p><a href="http://jsbin.com/icotef#" rel="nofollow">http://jsbin.com/icotef#</a></p>
<p>B</p>
|
javascript jquery
|
[3, 5]
|
2,823,486 | 2,823,487 |
How to get content from dynamically added controls
|
<p>This is how my web page looks like:
<img src="http://i.stack.imgur.com/dMVBt.png" alt="enter image description here"></p>
<p><strong>PosisionDataView</strong> is a web user control, which contains textboxes for product name and note plus some additional controls.</p>
<p><strong>QuantityView</strong> is also a web user control, which contains textboxes for quantity and price plus some additional controls.</p>
<p>The user can dynamically add QuantityView's and PositionView's to the page. This happens this way:</p>
<ul>
<li>The user clicks the ButtonAddQuantityView or ButtonAddPositionView</li>
<li>jquery's ajax method is called, which calls a method on my web service, which returns QuantityView or PositionView in html format</li>
<li>the received control is appended to the QuantityPlaceholder or to PositionsPlaceholder</li>
</ul>
<p>This all works pretty smooth, but what is the best method to parse this mess after postback? For example the QuantityView contains the textbox txtQuantity and in Request.Form collection I get these values for quantities:</p>
<ul>
<li>ctl00$ContentPlaceHolder1$PositionView$ctl00$QuantityView$ctl00$txtQuantity: 1</li>
<li>ctl00$txtQuantity: 2,4</li>
<li>ctl00$QuantityView$ctl00$txtQuantity: 3</li>
</ul>
<p>In reallity position 1 contains quantities 1 and 2, and position 2 contains quantities 3 and 4, but the Request.Form is a mess...</p>
|
c# jquery asp.net
|
[0, 5, 9]
|
3,117,870 | 3,117,871 |
How can I pass Collection to modal dialog window?
|
<p>I want to know, if its possible to pass collection between pages. I mean to say i have a client-side JavaScript modal dialog on which I want to use my collection. Earlier I was using Session[] to share the value, but its becoming evil for me, as it always displays the first value. Any change in value in not updated. </p>
<p>So whenever my pop up is displayed I want the collection to get moved to the Child dialog. From there, i will extract the Collection, do some stuffs and again return it to parent page, preventing postbacks and session management.</p>
<p>I think i am clear to you guys. If not clear, please add comment.</p>
|
c# javascript asp.net
|
[0, 3, 9]
|
5,450,847 | 5,450,848 |
Get list of Non System Applications
|
<p>I'm able to get a list of installed packages using the package manager, but this includes various system packages . Are there any filters i can apply on this list to only show the apps that would show up when bringing up the application list from the home screen?</p>
|
java android
|
[1, 4]
|
3,581,338 | 3,581,339 |
Switching from C# to C++. Any must-reads?
|
<p>I'm trying to find a least-resistance path from C# to C++, and while I feel I handle C# pretty well after two solid years, I'm still not sure I've gotten the "groove" of C++, despite numerous attempts.</p>
<p>Are there any particular books or websites that might be suitable for this transition?</p>
|
c# c++
|
[0, 6]
|
3,037,669 | 3,037,670 |
from parent to child without traversing the full path
|
<p>My divs are nested like this. </p>
<pre><code><div id="top">
<div class="child1">
<div class="child-child">
<div class="child-child-child">
</div>
</div>
</div>
<div class="child2">
<div class="child-child">
<div class="child-child-child">
</div>
</div>
</div>
</div>
</code></pre>
<p>Right now I'm going from <code>#top</code> to <code>.child-child-child</code> by doing this. </p>
<pre><code>$('#top').children('.child1')
.children('.child-child')
.children('.child-child-child');
</code></pre>
<p>Do I have to specify the full path like this? I want to omit the middle divs if there's a syntax that would let me do that. But I probably still need to specify whether I want to go through <code>.child1</code> or <code>.child2</code>.</p>
|
javascript jquery
|
[3, 5]
|
903,281 | 903,282 |
Sliding up DIV container
|
<p>How to make a sliding up horizontal DIV container using jquery? So far I have the below-provided code. The problem is that the content of <code><h1 id="filter_content">Content</h1></code> is initially not hidden. Also I've seen very nice looking sliding up menus, something like the first screenshot <a href="http://www.zabbix.com/screenshots.php" rel="nofollow">here</a>. So, when user clicks on +, the content slides up. Where can I actually find a sample code or some example?</p>
<pre><code><div id="filter">
<h1>Filter</h1><br>
</div>
<h1 id="filter_content">Content</h1>
<script>
$('#filter').click(function() {
if ($("#filter").is(":hidden")) {
$("#filter_content").show("slow");
} else {
$("#filter_content").slideUp("slow");
}
});
</script>
</code></pre>
|
php javascript jquery
|
[2, 3, 5]
|
1,646,244 | 1,646,245 |
how to access javascript variable with php code
|
<pre><code> function al(){
var selr = jQuery('#grid').jqGrid('getGridParam','selrow');
if(selr){
<?
include_once("../../DB/singleton.php");
$pDatabase = Database::getInstance();
$c = $pDatabase->query("select c.city_title as 'City' from teamshuffle.tbl_city c, teamshuffle.tbl_sport_city s where c.tblcity_id = s.tblcity_id and s.tblsport_id = " . );
while($r = mysql_fetch_array($c)){
echo("alert(\"" . $r[0] . selr . "\");");
}
?>
}
}
</code></pre>
<p>This is my javascript function. I need to access variable "selr" in the line </p>
<pre><code>echo("alert(\"" . $r[0] . $d . "\");");
</code></pre>
|
php javascript
|
[2, 3]
|
4,246,045 | 4,246,046 |
How to set an alarm for a selected date and time?
|
<p>I have this code from where I can set a time and date from date picker and time picker at once:</p>
<pre><code> private void dialoguetime() {
final Dialog dialog = new Dialog(this);
dialog.setContentView(R.layout.custom_dialogue);
dialog.setCancelable(true);
dialog.setTitle("This is Dialog 1");
dialog.show();
TimePicker time_picker = (TimePicker) dialog
.findViewById(R.id.timePicker1);
hours = time_picker.getCurrentHour();
minute = time_picker.getCurrentMinute();
time_picker.setOnTimeChangedListener(new OnTimeChangedListener() {
public void onTimeChanged(TimePicker view, int hourOfDay,
int minutes) {
// TODO Auto-generated method stub
// Toast.makeText(CustomDialog.this,
// "hourOfDay = "+hourOfDay+"minute = "+minute , 1000).show();
hours = hourOfDay;
minute = minutes;
}
});
final DatePicker date_picker = (DatePicker) dialog
.findViewById(R.id.datePicker1);
Button btn = (Button) dialog.findViewById(R.id.button2);
btn.setOnClickListener(new OnClickListener() {
public void onClick(View arg0) {
// TODO Auto-generated method stub
xDate = date_picker.getYear() + "-"+ (date_picker.getMonth() + 1) + "-"+ date_picker.getDayOfMonth() + " " + hours+ ":" + minute + ":00";
Toast.makeText(
getApplicationContext(),
xDate, Toast.LENGTH_LONG)
.show();
dialog.cancel();
}
}
);
}
</code></pre>
<p>From this I can get a string as a date format like this <code>yyyy-mm-dd hh:mm:ss</code>, now I want to give an alert (as alarm) to the user of that selected time. I have used alarm manager for this but it didn't allow me to select that date?</p>
<p>How can I do this?</p>
|
java android
|
[1, 4]
|
4,782,239 | 4,782,240 |
Is polling in jQuery expensive, and are there alternatives?
|
<p>I have several users accessing my page at the same time, with each client polling (using
setInverval) another php script that reads a value from a database and prints it.</p>
<pre><code>setInterval( "printData();", 300 );
</code></pre>
<p>I'm relatively new to jQuery and javascript, and I'm a bit skeptical of the viability of constantly running this php script and constantly making database queries.</p>
<p>Can someone calm my nerves or provide an alternative to my current method?</p>
|
php javascript jquery
|
[2, 3, 5]
|
2,412,549 | 2,412,550 |
jQuery selection and slideToggle()
|
<p>I've got html like this :</p>
<pre><code><div id=1 class=header onclick="hideit(this.id)">Header1
<div class=content>Some content
</div>
</div>
</code></pre>
<p>There are lots of this structure used in my code I want wo toggle the second div (content) if someone clicks on the header. </p>
<p>I wrote this function but its not working, can anybody tell me why?</p>
<pre><code><script language="javascript">
function hideit(hID)
{
var searcher = "div[id="+hID+"] .content";
$(searcher).slideToggle();
}
</script>
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,047,119 | 5,047,120 |
unable to pass array from jquery to php
|
<p>I need to pass an array to from jquery to php for processing.
i create an array object like this</p>
<pre><code>function Bet(eventId,pick,odds,stake,profit,betType){
return {
eventId:eventId,
pick:pick,
odds:odds,
stake:stake,
profit:profit,
betType:betType
}
</code></pre>
<p>in my submit handler i have this piece of code</p>
<pre><code>var bets = {};
$(".bet-selection").each(function() {
/**
some logic here
**/
}
});
bets.push(Bet(eventId,pick,odds,stake,profit,betType));
});
$.ajax({
url: 'testsubmit.php',
cache: false,
type: 'post',
data: bets
});
</code></pre>
<p>Nothing happens when i submit the form. I was hoping the an array will be submitted to php and i can use print_r to view the structure. Please guys what am i doing wrong and where?
Thank you.</p>
|
php jquery
|
[2, 5]
|
1,685,621 | 1,685,622 |
Disable browsers vertical and horizontal scrollbars
|
<p>Is it possible to disable the browsers vertical and horizontal scrollbars using jQuery or javascript?</p>
|
javascript jquery
|
[3, 5]
|
3,002,998 | 3,002,999 |
Using multiple object types in a dropdown to provide filtering for a data grid
|
<p>In my ASP.Net C# project I have a requirement to display a dropdown containing both people's names and office names.</p>
<p>When the user makes a selection, the event is handled in JavaScript and used to filter the results of a grid. So if the user selects a person's name from the dropdown then the grid displays only the results for that person. If the user selects an office then the grid should show the results for all the people in that office.</p>
<p>The filtering is handled in JavaScript on the OnClientDropDownClosed event of the dropdown.The grid and dropdown are Telerik controls not standard ones BTW. </p>
<p><strong>My question is - what is the best way to determine what type of item the user has selected.</strong>
The Value for the dropdown item is either the person's name or the office identifier.</p>
<p>I'm thinking I could simply add a prefix to the Value and do a substring test for it but that seems a little hacky...</p>
<p>is there a better way to achieve what I want?</p>
|
c# javascript asp.net
|
[0, 3, 9]
|
3,458,989 | 3,458,990 |
'clickable' drop down menu css
|
<p>Hello I'm just trying to figure out the concept of this example menu</p>
<p><a href="http://www.cdrking.com" rel="nofollow">http://www.cdrking.com</a></p>
<p>is it even a drop down menu at all? Sorry for my vague question, I'm still confused between php and javascript implementation. I'm trying to make something like their category menu so the right side will update as clicked.</p>
<p>Any ideas?</p>
|
php jquery
|
[2, 5]
|
5,960,381 | 5,960,382 |
Android storage advice?
|
<p>When I log a user in, I pull down some user data. It's just a userid and stuff like that. A couple of strings really. The thing is I don't want to pull this down every time if it's the same user over and over and so I want to store it locally across sessions. I'm aware of SQLite but is making a table just for 1 row really the best solution? Is there not another, better way?</p>
|
java android
|
[1, 4]
|
1,689,450 | 1,689,451 |
TELEPHONY_SERVICE constant not recognised in one class, but is in another
|
<p>This feels very much like another case of not seeing the forest for the trees.</p>
<p>I've written a small (non-extending) class for my app that, for now, only contains the one method to scrape a supplied URL and return a string. I was hoping to include the Device ID on the end of the query string, so added the following lines:</p>
<pre><code>import android.telephony.TelephonyManager;
import android.content.Context;
...
TelephonyManager m_tmgr = (TelephonyManager) getSystemService(TELEPHONY_SERVICE);
</code></pre>
<p>However, the TELEPHONY_SERVICE constant "cannot be resolved to a variable", according to Eclipse. If I copy and paste these lines into another class in the package (all the other classes are activities, at the moment, which may have something to do with it?), it all works fine.</p>
<p>What's the massively obvious thing that I'm missing?</p>
|
java android
|
[1, 4]
|
5,171,942 | 5,171,943 |
Calling C++ exe functions from C#
|
<p>I'm trying to monitor a running application written in C++ using a different C# application.</p>
<p>In my C++ code I have defined an API:</p>
<pre><code>_declspec(dllexport) //is this even possible when compiling an .exe?
int getSomething();
</code></pre>
<p>Is there a way to call this function from the C# code?</p>
<p>Will the classic approach work:</p>
<pre><code>[DllImport("myexe.exe", CharSet = CharSet.Auto)]
public static extern int getSomething();
</code></pre>
|
c# c++
|
[0, 6]
|
5,821,460 | 5,821,461 |
How listeners work
|
<p>Can someone please tell me how the listener interface works, when you set a onclicklistener, what really happens in the background?</p>
|
java android
|
[1, 4]
|
5,407,567 | 5,407,568 |
Is there a better approach to minify html generated from aspx page
|
<p>I am using the following code to minify html generated from aspx page duuring runtime.</p>
<pre><code>protected override void Render(HtmlTextWriter writer)
{
TextWriter output = new StringWriter();
base.Render(new HtmlTextWriter(output));
String html = output.ToString();
html = Regex.Replace(html, @"\n|\t", " ");
html = Regex.Replace(html, @">\s+<", "><").Trim();
html = Regex.Replace(html, @"\s{2,}", " ");
writer.Write(html);
}
</code></pre>
<p>Is there more better approach to do the same.</p>
<p>Thank you so much.</p>
|
c# asp.net
|
[0, 9]
|
2,894,962 | 2,894,963 |
Send BitMap object (and some other strings) via POST to a server
|
<p>how would i go about sending a BitMap objects (and some other strings, such as name = "kevin") to a server? Does anyone have any examples on how to do this?</p>
|
java php android
|
[1, 2, 4]
|
5,833,042 | 5,833,043 |
Dynamically created checkbox checkedchanged event issue
|
<p>My issue is that i need to create checkboxes dynamically on a textchanged event of a textbox which are all checked and keeping their checked state count in an int variable assiging it to a label; till here all is successfully done but the problem is now if i uncheck any of the checkboxes i want their count to get decreased by one but the checkchanged event is not firing and by unchecking any of the checkboxes all are gone...
here is my code:</p>
<pre><code> if (DDLType.SelectedItem.Text == "Sick Leave")
{
DateTime f = DateTime.Parse(txtFrom.Text);
DateTime t = DateTime.Parse(txtTo.Text);
double daydiff = (t - f).TotalDays;
double p = daydiff;
for (int i = 1; i <= daydiff; i++)
{
string a = f.ToString("ddd");
chklist = new CheckBox();
chklist.AutoPostBack = true;
chklist.CheckedChanged += new EventHandler(CheckChanged);
chklist.ID = "chk" + i;
chklist.Text = a;
chklist.Font.Name = "Trebuchet MS";
chklist.Font.Size = 9;
chklist.Checked = true;
checkcount++;
pnlCheck.Controls.Add(chklist);
if (a == "Thu" || a == "Fri")
{
p--;
chklist.Checked = false;
checkcount--;
}
f = f.AddDays(1);
}
daydiff = p;
lblCheck.Text = checkcount.ToString();
</code></pre>
<p>}</p>
<pre><code> protected void CheckChanged(object sender, EventArgs e)
{
if (!chklist.Checked)
{
checkcount--;
lblCheck.Text = checkcount.ToString();
}
}
</code></pre>
<p>I don't know what is going wrong...</p>
<p>Any help in this regard will highly appreciated
Thanks in advance</p>
|
c# asp.net
|
[0, 9]
|
1,682,198 | 1,682,199 |
Android SharedPreferences Best Practices
|
<p>In an application I have been building we rely on SharedPreferences quite a bit, this got me thinking about what is best practice when it comes to accessing SharedPreferences. For instance many people say the appropriate way to access it is via this call:</p>
<pre><code>PreferenceManager.getDefaultSharedPreferences(Context context)
</code></pre>
<p>However it seems like this could be dangerous. If you have a large application that is relying on SharedPreferences you could have key duplication, especially in the case of using some third party library that relies on SharedPreferences as well. It seems to me that the better call to use would be:</p>
<pre><code>Context.getSharedPreferences(String name, int mode)
</code></pre>
<p>This way if you have a class that heavily relies on SharedPreferences you can create a preference file that is used only by your class. You could use the fully qualified name of the class to ensure that the file will most likely not be duplicated by someone else.</p>
<p>Also based on this SO question: <a href="http://stackoverflow.com/questions/4371273/should-accessing-sharedpreferences-be-done-off-the-ui-thread">Should accessing SharedPreferences be done off the UI Thread?</a>, it seems that accesses SharedPreferences should be done off the UI thread which makes sense.</p>
<p>Are there any other best practices Android developers should be aware of when using SharedPreferences in their applications?</p>
|
java android
|
[1, 4]
|
3,635,191 | 3,635,192 |
add an onclick event to a dynamically created linkbutton
|
<p>What I'm trying to accomplish is to set my dynamically created linkbutton with a onClick command so when click it will run a method in the code behind. This is my code:</p>
<pre><code>protected void Page_Init(object sender, EventArgs e)
{
LoadLeftSide();
}
private void LoadLeftSide()
{
string filepath = Server.MapPath("DataSource.xml");
List<Post> list = PostHelper.GetAllPosts(filepath);
HtmlTable table = FindControl("tbl") as HtmlTable;
HtmlTableRow hearderrow = new HtmlTableRow();
HtmlTableCell heardercell = new HtmlTableCell();
heardercell.InnerText = "Posts:";
hearderrow.Cells.Add(heardercell);
table.Rows.Add(hearderrow);
foreach (Post p in list)
{
HtmlTableRow row = new HtmlTableRow();
HtmlTableCell cell1 = new HtmlTableCell();
LinkButton lnkPost = new LinkButton();
lnkPost.ID =string.Format("{0}" ,Guid.NewGuid());
lnkPost.Attributes.Add("runat", "server");
lnkPost.Text = p.Title;
// lnkPost.CommandName = p.Id.ToString();
// lnkPost.CommandArgument = p.Id.ToString();
//lnkPost.Command += new CommandEventHandler(this.onLinkClick);
lnkPost.Click += new EventHandler(this.onLinkClick);
cell1.Controls.Add(lnkPost);
row.Cells.Add(cell1);
table.Rows.Add(row);
}
table.DataBind();
}
protected void onLinkClick(object sender, EventArgs e)
{
string filepath = Server.MapPath("DataSource.xml");
int id = 1;
Post post=PostHelper.GetPostById(id, filepath);
lblDescription.Text = post.Description;
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
3,850,040 | 3,850,041 |
Animating div waterfall in javascript/jquery
|
<p>I'm trying to animate a waterfall of divs like in duitang.com . i tried the following scripts:</p>
<p><a href="http://jsfiddle.net/XKdKt/3/" rel="nofollow">http://jsfiddle.net/XKdKt/3/</a><br>
<a href="http://jsfiddle.net/NFPKc/" rel="nofollow">http://jsfiddle.net/NFPKc/</a></p>
<p>The second link seems like it's closest to what I want because the div appears from bottom to top unlike the first and second link, but the div under doesnt scroll with the new div.</p>
<p>Can anyone lead me to the right direction to make it look similar to duitang's?</p>
<p>Your help would be greatly appreciated. Thanks.</p>
|
javascript jquery
|
[3, 5]
|
697,061 | 697,062 |
Convert string to float without round off java
|
<p>I want to convert longitude and latitude that I get as a string from my database. The string is correct, and when i try to convert it into double, it is also correct. However when i am convert the double or the string value (i have tried both) into a float value, the last decimal gets round off. </p>
<p>The value of the string or double is 59.858139
The convertion to float is 59.85814</p>
<p>I've tried everything, and this is one desperate example :)</p>
<pre><code>private float ConvertToFloat(double d)
{
float f = 00.000000f;
f = (float) d;
return f;
}
</code></pre>
|
java android
|
[1, 4]
|
570,182 | 570,183 |
Disable checkbox based on text value
|
<p>I need to disable a checkbox when a user enters text into a text area, otherwise it would be active. I have tried most relevant events but I can't get it to work. onkeydown disables for the first press and onchange will work if the user enters something then deletes it. Nothing seems to disable it after they leave the text area.</p>
<pre><code><script type="text/javascript">
function enable_cb(textarea) {
if ($(textarea).val() != "" ) {
$("input.cmb").removeAttr("disabled");
}
else {
$("input.cmb").attr("disabled", true);
}
}
</script>
Comments:<br />
<p><textarea name="issue" id="issue_ta" cols="50" rows="10" class="help" tabindex="2" title="Enter Detailed Description" onchange="enable_cb(this);"></textarea></p>
<p><input name="no_issue" type="checkbox" id="no_issue" class="cmb" />No Issues to Report</p>
<p class="label">Enter Current Vehicle Mileage:</p>
<p><input type="tel" name="record_mileage" class="required" tabindex="3" title="&nbsp;Enter Current Mileage&nbsp;" size="25"/></p>
<p><input type="submit" name="Submit" value="Send"/></p>
</form>
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,877,673 | 1,877,674 |
ASP.NET MembershipProvider -- How exactly does it do encryption?
|
<p>I need to understand the details of how MembershipProvider performs encryption:</p>
<ol>
<li>What algorithm does it use?</li>
<li>Is there any base64 encoding pre-processing or post-processing?</li>
<li>Anything extra it does in addition to the standard algorithm it uses?</li>
</ol>
<p>Given a plain text password to encrypt, please walk me through the exact steps that produce the final encrypted password that's returned.</p>
<p>I think seeing the source code would go a long way in answering my questions, but I haven't been able to find it online. I have only found <a href="http://msdn.microsoft.com/en-us/library/system.web.security.membershipprovider.encryptpassword.aspx" rel="nofollow">this documentation</a>, which does not provide implementation details.</p>
<p>Thanks for any info!</p>
|
c# asp.net
|
[0, 9]
|
4,467,549 | 4,467,550 |
how do i refer to the subject $(this) from a jquery plugin?
|
<p>I'm using <a href="http://colorpowered.com/colorbox/" rel="nofollow">colorbox</a>, i just get undefined as my get values?</p>
<pre><code>$('.banner').colorbox({
opacity: 0.4,
href: 'dialogs/ban_add_edit.php?banner_to_edit='+$(this).attr('id')+'&typeofbanner='+$(this).attr('rel')
})
</code></pre>
|
javascript jquery
|
[3, 5]
|
240,058 | 240,059 |
jQuery, Looping through paragraphs and getting text
|
<p>So basically with jQuery, I am trying to loop through 3 paragraphs containing tweets. The 3 paragraphs are all of class .tweet-text</p>
<p>For some reason, in the following code, $test2 will be set properly to the first tweet's text, but in the each loop, the js crashes whenver i try to set str. Why is this?</p>
<pre><code> var $tweets = $(".sidebar-tweet .tweet-text");
var $test2 = $tweets.text();
alert($test2);
$tweets.each(function(i, $tweet){
var str = $tweet.text();
alert(str);
});
</code></pre>
<p>I've been trying to debug this with Firebug but to no avail. Thanks for the help.</p>
|
javascript jquery
|
[3, 5]
|
132,107 | 132,108 |
Adding a wait in a switch / case?
|
<p>When a user clicks, case MotionEvent.ACTION_DOWN is triggered. When the click is released, case MotionEvent.ACTION_UP is triggered.</p>
<p>I'm interested in determining if ACTION_UP hasn't been triggered within 3 seconds of ACTION_DOWN. Meaning, If 3 seconds have passed since the user has clicked and has not yet released, I want to know, essentially trying to determine a long click.</p>
<p>Is there a way to do such a thing?</p>
<pre><code> switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
break;
case MotionEvent.ACTION_UP:
break;
}
</code></pre>
|
java android
|
[1, 4]
|
2,898,625 | 2,898,626 |
Client side data upload to server
|
<p>I want to make a desktop application in which clients record their data and whenever net is available they upload it to the server. When they upload data to server it uploads only that data which is not in the server database. Other client members can see their data through their account when online. What will be the method to do this?</p>
|
c# asp.net
|
[0, 9]
|
3,388,093 | 3,388,094 |
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]
|
3,823,339 | 3,823,340 |
Getting actual text in freetextbox control
|
<p>I am using <a href="http://www.freetextbox.com/" rel="nofollow">FreeTextBox control</a></p>
<p>in asp.net.When I am getting its Text in my code I am getting the Html code with all the formatting.</p>
<p>If I want to get the actual text (i.e. only text without html tags),then how I should get.</p>
|
c# asp.net
|
[0, 9]
|
82,749 | 82,750 |
Next / Prev pages with Javascript?
|
<p>I'm creating a online training 'powerpoint' like series of pages. It will be pretty straight forward and have the pages set out as such:</p>
<p>page1.php
page2.php
page3.php
...
page20.php</p>
<p>I'll be going old school and use an iframe to hide the address bar as people shouldn't be able to catch onto the naming convention and skip ahead. (Its not too serious, so I want to keep it simple).</p>
<p>What I want to do is based on the current page that they are on, say for example page5.php create links to page4.php and page6.html. Obviously without having to code each page manually. </p>
<p>It would be ideal if ths were a javascript function as I dont want the address to show up in the browsers info bar but I'm open to php tricks as well.</p>
<p>Any ideas how to do this?</p>
|
php javascript jquery
|
[2, 3, 5]
|
1,172,799 | 1,172,800 |
Ventrilo Status on your website
|
<p>I'm looking for some examples of how you would show the status of a ventrilo server on your website. What I would like is the ability to show who is logged on and what channel they are logged into. I have found sites that you can purchase, but would like to either find a open source or free solution.</p>
<p>If there is not a solution already in place, some information on how this would be accomplished in either php or c#/asp.net, as I do have both options available. </p>
<p>Edit:
Now, I would really like to know how this is done.</p>
|
c# php asp.net
|
[0, 2, 9]
|
5,899,254 | 5,899,255 |
Adding a namespace to asp project whenever you create a new class
|
<p>I might be lazy about this but what i'm trying to do is add a using statement by default to all my .cs files when I create a new .cs. This is an asp project and I dont really want to use the web.config.</p>
<p>Thanks!</p>
|
c# asp.net
|
[0, 9]
|
1,204,125 | 1,204,126 |
Load in content to div, slide content when load
|
<p>I have a script that load content from another page into a div based on options in selectbox. I wounder if its possible to add a slide effect when the content gets loaded into the div.</p>
<p>The script looks like this:</p>
<pre><code>$(document).ready(function(){
$("#selectbox").change(function(){
var selectedOption = $('#selectbox :selected').val();
$containerDiv = $('#div_that_recieves_content');
$containerDiv.html("");
switch (selectedOption)
{
case "Option1":$containerDiv.load( "page.html #div" , function(){$(document).trigger("reload");});break;
case "Option2":$containerDiv.load( "page.html #div" , function(){$(document).trigger("reload");});break;
case "Option3":$containerDiv.load( "page.html #div" , function(){$(document).trigger("reload");});break;
}
return true;
});
});
</code></pre>
<p>Thanks.</p>
|
javascript jquery
|
[3, 5]
|
754,973 | 754,974 |
I can load login page but the controls are not getting displayed using jquery ui?
|
<p>I am trying to load a login page through JQuery UI. When I debugged the code, found that it gets debugged to the <code>page_load</code> event and after running the application, the controls in that page is not getting displayed in front end? </p>
<p>In Master page I have a Login button, on clicking the button Login page needs to be loaded using JQuery UI.</p>
<p>Login page has the following code:</p>
<pre><code><asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
<div id="loginPanel" runat="server">
<asp:Label ID="lblUsername" runat="server" Text="Username"></asp:Label>
<asp:TextBox ID="txtUsername" runat="server"></asp:TextBox>
<asp:Label ID="lblPassword" runat="server" Text="Password"></asp:Label>
<asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox>
<asp:Button ID="btnLogin" runat="server" Text="Login" OnClick="LoginClick" />
<asp:Button ID="btnClear" runat="server" Text="Clear" />
<asp:Label ID="lblErrorMessage" runat="server" Text=""></asp:Label>
</div>
</asp:Content>
</code></pre>
<p>JQuery Code:</p>
<pre><code>$.ajax({
url: 'Login.aspx',
success: function (data) {
$('.result').html(data);
alert('Load was performed.');
}
});
</code></pre>
<p>The page control values are getting loaded in the "data" but not getting displayed in the front page.</p>
<p>What do I need to do ?</p>
|
c# jquery asp.net
|
[0, 5, 9]
|
649 | 650 |
ThrowMacValidationError on Iphone & Android
|
<p>I have a web application written in ASP.NET.
I have some wierd problems sometimes in which I get ThrowMacValidationError/Invalid viewstate.
I have noticed that these errors occur in android clients and/or iphone clients.
However, I've tested my site in both devices and did not have this problem.</p>
<p>What can cause this?</p>
<p>Thanks!</p>
<p>Update: It happens on IE9 too sometimes.
This seems to be very 1 out of many requests... I cant point my finger on this.</p>
|
android iphone asp.net
|
[4, 8, 9]
|
4,527,905 | 4,527,906 |
create Method in DAL which returns multiple outputs
|
<p>I have created a method in DAL which return DataSet, but now I want multiple outputs from method because my Stored Procedure has Output Parameters.</p>
<p>Please suggest a way to return DataSet and Output Parameter's value from method.</p>
|
c# asp.net
|
[0, 9]
|
5,779,608 | 5,779,609 |
How do I retrieve values from a PHP array?
|
<p>I have a array stored in a PHP file in which I am storing all the values.</p>
<p>I am trying to loop through the entire array in JavaScript. How should I do that?</p>
<p>The following does not work:</p>
<pre><code>var index = 0;
var info = 1;
while(index<4) {
info = <?php echo $a[?>index<?php];?>
index++;
}
</code></pre>
|
php javascript
|
[2, 3]
|
5,257,250 | 5,257,251 |
Setting width to iframe based on browser using jquery not worked in IE
|
<p>I am using the following code for setting height and width to a div and iframe based on browser window height and width</p>
<pre><code> var newheight = $(document).height();
var newH = parseInt(newheight) - 170;
var newHI = parseInt(newheight) - 215;
var width = $(document).width();
var newwidth = $('#LeftPane').width();
var newW = parseInt(width) - (parseInt(newwidth) + 50);
$('#LeftPane').height(newH);
$("#ifrforms").height(newHI);
$("#ifrforms").width(newW);
</code></pre>
<p>But this code is not working in IE?
It troubles me... if any body knows the solution please help me...</p>
|
javascript jquery
|
[3, 5]
|
2,076,199 | 2,076,200 |
How do you call a Javascript function from an ASPX control event?
|
<p>How do you call a Javascript function from an ASPX control event?</p>
<p>Specifically, I want to call the function from the SelectedIndexChanged event of a DropDownList.</p>
|
asp.net javascript
|
[9, 3]
|
5,845,650 | 5,845,651 |
Use Multiple jQuery and jQuery UI Libraries
|
<p>Is there a way to use multiple jQuery and jQuery UI Libraries in the same source?</p>
<p>I know about noConflict and using multiple jQuery Libraries with this method, however is it possible to use multiple jQuery UI Libraries?</p>
<p>Essentially I would like to use jQuery 1.2.6 and jQuery UI 1.6 together for a certain portion of the page that only works with those libraries</p>
<p>and then for everything else use the latest jQuery Libraries of 1.4.2 and UI 1.8.</p>
<p>Thanks,</p>
<p>-Seth</p>
|
asp.net jquery
|
[9, 5]
|
3,680,546 | 3,680,547 |
Multiple jQuery jPages plugin divs on single page
|
<p>I am trying to figure out how to get jPages to display two unrelated lists on a single page.</p>
<p>The plugin supports multiple navigation panels and I think this may be causing the problem.
Even though the panels control their respective lists they still act as if linked - so for example moving to page two on one list will move the page counter on the second navigation panel to page two, but the list will remain on page one.</p>
<p>I'm sure there is a very simple solution but I can't seem to figure it out with my limited JS knowledge.</p>
<p>My page uses the default configuration, which can be found on the plugin's website <a href="http://luis-almeida.github.com/jPages/defaults.html" rel="nofollow">http://luis-almeida.github.com/jPages/defaults.html</a></p>
|
javascript jquery
|
[3, 5]
|
596,425 | 596,426 |
How to get previous selection of dropdown value when I click button?
|
<p>How to get previous selection of dropdown value when I click button. I refer below coding </p>
<pre><code> $(".addToButton").live('click', function (e) {
var sel = $(this).prevAll(".addToList:first"),
val = sel.val(),
text = sel.find(':selected').text();
});
</code></pre>
<p>But it is not working. How should I get previous selection of dropdown value when I click button?</p>
|
jquery asp.net
|
[5, 9]
|
81,438 | 81,439 |
Why does this super simple jquery not work?
|
<p>I'm having hard time getting this snippet to work. I have made a minimal example. You can view it online: <a href="http://jsfiddle.net/qnnZe/" rel="nofollow">http://jsfiddle.net/qnnZe/</a> where it is <strong>working!</strong></p>
<p>test.html</p>
<pre><code><!DOCTYPE html>
<head>
<title>test</title>
<meta charset="utf-8">
<script src="jquery.min.js"></script>
<script src="test.js"></script>
</head>
<body>
<p>I am going to test right now.</p>
</body>
</html>
</code></pre>
<p>test.js</p>
<pre><code>$("p").click(function () {
$(this).hide("slow");
});
</code></pre>
<p>However, <strong>on my server it does not work</strong>. Here is the link to my server: <a href="http://techinf.de/sleepytime/test.html" rel="nofollow">http://techinf.de/sleepytime/test.html</a></p>
<p>As always, any help appreciated.</p>
|
javascript jquery
|
[3, 5]
|
5,663,273 | 5,663,274 |
Twitter calls fail in php but succed in jQuery
|
<p>I've made a website in which I getting my last tweets win two ways. One by using a jQuery plugin and two by php.</p>
<p>The jQuery plugin is <a href="http://tweet.seaofclouds.com/" rel="nofollow">http://tweet.seaofclouds.com/</a>
The problem I'm facing is the error that php gives me.</p>
<p>If I use file_get_contents($url) without a context it gives me </p>
<blockquote>
<p>failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request</p>
</blockquote>
<p>If I use file_get_contents with a context of "ignore_errors"=>true, it gives me</p>
<blockquote>
<p>array(2) { ["request"]=> string(61) "/1/statuses/user_timeline.json?screen_name=xxxxxx&count=1" ["error"]=> string(74) "Rate limit exceeded. Clients may not make more than 150 requests per hour." }</p>
</blockquote>
<p>The strange thing, and the reason I'm asking this question is that the jQuery plugin always succeds.</p>
<p>If I console.log the request from the plugin, is the same with the url I'm trying to get via php: </p>
<blockquote>
<p><a href="http://api.twitter.com/1/statuses/user_timeline.json?screen_name=xxxxxxxx&count=1&include_rts=1&page=1&include_entities=1" rel="nofollow">http://api.twitter.com/1/statuses/user_timeline.json?screen_name=xxxxxxxx&count=1&include_rts=1&page=1&include_entities=1</a></p>
</blockquote>
<p>Does anyone can tell me what happens?</p>
|
php jquery
|
[2, 5]
|
1,787,486 | 1,787,487 |
change div text on radion button click
|
<p>I want to put the radio button value in the status div. The text of status div should change, according to the radio button selected by the user.
The code that I used bellow is not working. Please help. Thanks!</p>
<p>HTML code: </p>
<pre><code> <form action="">
<input type="radio" name="sex" value="male">Male<br>
<input type="radio" name="sex" value="female">Female<br>
<div id="status"></div>
</form>
</code></pre>
<p>JS code: </p>
<pre><code> $(document).ready(function () {
RadioStatus="";
$("input[type='radio']:checked").each( function()
{
if ($(this).attr('checked');)
RadioStatus=$(this).val();
$("#status").text(RadioStatus);
});
$("input[type='radio']").change(function()
{
RadioStatus= $('input[type='radio']:checked').val()
$('#status').text(RadioStatus);
});
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,294,297 | 1,294,298 |
Should I port my Android app to the iPhone?
|
<p>I have developed an app for the Android and it's working well, finally, and thanks to all the help from StackOverflow!!</p>
<p>Now I am being asked to make it work on the iPhone. I looked at iPhone a while ago but not recently. </p>
<p>What does everyone think? Should I take the time to learn Objective C and iPhone and port the app or forget it?</p>
<p>Are there any books that cross-reference functions so that you can look up how to do something in iPhone that you already have on Android?</p>
|
iphone android
|
[8, 4]
|
2,316,458 | 2,316,459 |
assign object as key value in javascript
|
<p>I am tyring to do something like this:</p>
<pre><code>this.slides = {$('#Page_1') : null,
$('#Page_2') : null,
$('#Page_3') : null};
</code></pre>
<p><strong>Why am I doing this, or what advantage do I gain?</strong><br>
I dont want to use jquery selectors throughout class.</p>
<hr>
<h2>A Solution:</h2>
<pre><code>this.slides = [{"key": $('#Page_1'), "value": null},
{"key": $('#Page_2'), "value": null},
{"key": $('#Page_3'), "value": null}];
</code></pre>
<p><strong>Limitation:</strong> </p>
<blockquote>
<p>The problem with this approach is that you have to iterate through the
whole object each time you want to approach this. You should use the
id as identifier, this is much more efficient. – Christoph </p>
</blockquote>
|
javascript jquery
|
[3, 5]
|
5,739,886 | 5,739,887 |
Message text in android dialog box
|
<p>i want the message text of my dialog box to be center aligned</p>
|
java android
|
[1, 4]
|
520,576 | 520,577 |
JQuery, toggling a class on dynamic content
|
<p>I need to add a class to a within a block of generated content coming from JSON. I believe it's barking on the toggleClass because the HTML is actually not generated yet. I figure I probably need to use .on() or .live() in some fashion.</p>
<p>I am not receiving an error, it's just not adding the class. Again, because the table content is being built dynamically I believe.</p>
<p>Here's the relevant code.</p>
<pre><code>// The data variable is a block of JSON
for(i=1; i < data.length; i++){
foo += '<tr id="'+data[i][2]+'">test</tr>';
// Here's where I am trying to add the class, but it is not working. We check to see if a value in our JSON is true, if so - we change the class.
if(data[i][1]){
$("#"+data[i][2]).toggleClass("newClass"); // finds the ID by unique name
}
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
2,641,507 | 2,641,508 |
Upload half file?
|
<p>Is it possible to upload a specific part of the file rather than the whole file? Say, I want to upload only first 100 bytes of the file, or the rest of the file given offset 100 bytes?</p>
|
php javascript
|
[2, 3]
|
2,402,604 | 2,402,605 |
PHP insert into database
|
<p>I have a web form which saves a part number in 3 split text boxes. I would like to save this part number into the database as the id number of the part number.Is there any way on how the number can be joined and then compared to the id value and used in the insert statement?I read somewhere that you can use implode function to do that.Well i did use implode to store the date but so far regarding this problem, its not been helpful.</p>
<pre><code> <td onmouseover="document.getElementById(\'id_nr_1\').focus();">
St&uuml;cklistennummer'.$pflicht_id_nr.'
</td>
<td align="left" onmouseover="document.getElementById(\'id_nr_1\').focus();">
<input type="text" class="'.$html_klasse_id_nr_1.'" id="id_nr_1" name="id_nr_1" size="2" maxlength="4" value="'.htmlspecialchars($_REQUEST["id_nr_1"]).'" onfocus="this.focus();" onkeyup="FocusWeiter(this.id, \'id_nr_2\');">
<input type="text" class="'.$html_klasse_id_nr_2.'" id="id_nr_2" name="id_nr_2" size="1" maxlength="3" value="'.htmlspecialchars($_REQUEST["id_nr_2"]).'" onfocus="this.focus();" onkeyup="FocusWeiter(this.id, \'id_nr_3\');">
<input type="text" class="'.$html_klasse_id_nr_3.'" id="id_nr_3" name="id_nr_3" size="1" maxlength="3" value="'.htmlspecialchars($_REQUEST["id_nr_3"]).'" onfocus="this.focus();" onkeyup="FocusWeiter(this.id, \'id_nr_4\');">
</td>
</tr>
</code></pre>
|
php javascript
|
[2, 3]
|
3,246,288 | 3,246,289 |
Read client page data asp.net and c#
|
<p>Hi anybody know how to select and read client page data using c# and asp.net?</p>
<p>Here I'm tring to load a page using iframe in my application. Now i want to select some specific text and want to store it in my local database. </p>
<p>Is it possible?</p>
<p>I'm going through snagit tool but it is capturing the selected area but unable to read the content and store it.</p>
<p>Thanks in advance,
Nagu</p>
|
c# asp.net
|
[0, 9]
|
1,363,255 | 1,363,256 |
jQuery Star Rating Plugin
|
<p>Anyone who use jQuery Star Rating Plugin: it is possible to show a label (very poor, etc.), like on this another star rating:</p>
<p><a href="http://orkans-tmp.22web.net/star_rating/" rel="nofollow">http://orkans-tmp.22web.net/star_rating/</a> </p>
|
javascript jquery
|
[3, 5]
|
3,297,331 | 3,297,332 |
javascript array datatable object to string
|
<p>I have a javascript var like</p>
<pre><code>var data = google.visualization.arrayToDataTable([
['Year', 'Sales', 'Expenses'],
['2004', 1000, 400],
['2005', 1170, 460],
['2006', 660, 1120],
['2007', 1030, 540]
]);
</code></pre>
<p>and i want to pass it to a textarea, i try to get as</p>
<pre><code>JSON.stringfy(data, null, '\t');
</code></pre>
<p>but i got some ugly text ...</p>
<pre><code>"{\"cols\":[{\"id\":\"\",\"label\":\"Year\",\"pattern\":\"\",\"type\":\"string\"},{\"id\":\"\",\"label\":\"Sales\",\"pattern\":\"\",\"type\":\"number\"},{\"id\":\"\",\"label\":\"Expenses\",\"pattern\":\"\",\"type\":\"number\"}],\"rows\":[{\"c\":[{\"v\":\"2004\",\"f\":null},{\"v\":1000,\"f\":null},{\"v\":400,\"f\":null}]},{\"c\":[{\"v\":\"2005\",\"f\":null},{\"v\":1170,\"f\":null},{\"v\":460,\"f\":null}]},{\"c\":[{\"v\":\"2006\",\"f\":null},{\"v\":660,\"f\":null},{\"v\":1120,\"f\":null}]},{\"c\":[{\"v\":\"2007\",\"f\":null},{\"v\":1030,\"f\":null},{\"v\":540,\"f\":null}]}],\"p\":null}"
</code></pre>
<p>im trying to get something like this...</p>
<pre><code>['Year', 'Sales', 'Expenses'],
['2004', 1000, 400],
['2005', 1170, 460],
['2006', 660, 1120],
['2007', 1030, 540]
</code></pre>
<p>this is google chart code example.
How can i get it? if i can....</p>
|
javascript jquery
|
[3, 5]
|
3,942,022 | 3,942,023 |
If condition with curly brackets is not working correctly in jQuery
|
<p>This works:</p>
<pre><code>if($('div.login-part').is(':empty'))
$('div.login-part').append('<p>Login</p>');
</code></pre>
<p>But this is not:</p>
<pre><code>if($('div.login-part').is(':empty'))
{
$('div.login-part').append('<p>Login</p>');
$('div.login-part').append('<p>Welcome!</p>');
$('div.login-part').append('<p>What is your name?</p>');
}
</code></pre>
<p>What am I doing wrong?</p>
|
javascript jquery
|
[3, 5]
|
3,535,414 | 3,535,415 |
Can you check if a web application is already running on another browser tab?
|
<p>I have a web application written in ASP.NEt/C# and javascript. It uses session variables.</p>
<p>When I open the application, is there a way to check if the application is running in another tab?</p>
<p>Or do you have any ideas on making session variables unique for each tab?</p>
<p>Any help would be great!</p>
<p>Thanks</p>
<p>Kev.</p>
|
c# javascript asp.net
|
[0, 3, 9]
|
5,400,455 | 5,400,456 |
Jquery How to change url for every ajax respond
|
<pre><code>$(".blok").newWindow({
windowTitle:"Example1",
ajaxURL:"Action.php?task=BlokDuzenleFormGetirBlokId="+$(".blok").attr('id')
});
</code></pre>
<p>when first clicked on blok class a href, newWindow loads from data by <code>$(".blok").attr('id').</code> Then every action sen same url to ajax, with not change. is there a way change url every single respond to call function by unique id parametre or anything like that.</p>
|
javascript jquery
|
[3, 5]
|
1,086,556 | 1,086,557 |
Full Calendar collapse or hide if more than 2 events are set in one day
|
<p>I'm trying to avoid Full Calendar from expanding unexpectedly if there are more than 2 events in one day. Depending on the star date and end date events might spannmore than one day. So the code must be aware of that there might be a spanned event passing through that day of the calendar. Events are coming from controler and looping by smarty between {} tags but if you do not have knowledge about smary just assume it a normal php code. I read the documentation but there wasn't something about such a function. Im planing to implement a button in to the full callendar which is only seen if there is more than 2 daily or spanned event in that day to hide and show the events after 2nd event. I'm using the Full Calendar in monthly view. Does anyone know how to do that?</p>
<p>Here is my jQ:</p>
<pre><code> $('#calendar').fullCalendar({
events: [
{foreach from=$permissions item=p}
{
title: '{$p.start_hour}:{$p.start_min} {$p.fname} {$p.lname}',
start: '{$p.start_date}',
end: '{$p.end_date}'
},
{/foreach}
]
});
</code></pre>
<p>HTML:</p>
<pre><code><div style="float: left; margin-left: 20px;" id="calendar" class="span7"></div>
</code></pre>
|
php jquery
|
[2, 5]
|
2,824,822 | 2,824,823 |
jQuery find and replace second one
|
<p>I was wondering how I would go about finding and replacing some text in a div, but i want to find and replace the second occurrence of that text. For example:"You just added a item, please remove this item" so I would like to find the second "item" and replace it with whatever text I choose.</p>
<p><strong>JS:</strong></p>
<pre><code>var compareCount = $('.compareWidget').find('.compareItem').length;
if (compareCount >= 2) {
$('.message').find('.count').text(compareCount);
$('message').html().replace('item', 'items');
}
$('.message').slideDown("Fast");
setTimeout(function () {
$('.message').slideUp("Fast");
}, 5000);
</code></pre>
<p><strong>HTML:</strong></p>
<pre><code><div id="alertMessage">
<div class="message">
<span>You just added a item to compare, you currently have <span class="count">1</span> item to compare</span>
</div>
</div>
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,882,334 | 5,882,335 |
android : How to know about a new process start in device?
|
<p>I am writing a program which respond when a new process got start.</p>
<pre><code>private final BroadcastReceiver mBatInfoReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context arg0, Intent intent) {
// what to write here
}
};
</code></pre>
<p>I do not know that what to write instead of comments to get processes info.</p>
<p>thanks.</p>
|
java android
|
[1, 4]
|
858,899 | 858,900 |
How to write easy to debug/maintain JavaScript Event Handlers
|
<p>Event Handler can be written in mainly two ways:</p>
<pre><code><input type="button" onclick="clickFunction()" />
</code></pre>
<p>or </p>
<pre><code> $('#btnID).click( function(){ .. });
</code></pre>
<p>Someone has to debug/maintain this code at a later stage. In the first case, we can do "inspect Element" and quickly find what is executed. In the second case, we have to find the right Document Loader code to find where it is assigned. </p>
<p>What is the recommended way?</p>
|
javascript jquery
|
[3, 5]
|
5,691,399 | 5,691,400 |
Phone number in listview
|
<p>I use a ListView for text-items in my APP. But I have one problem: if a put a text with numbers, the numbers are convert to a link to show the phone dial screen. Can I disable this? </p>
|
java android
|
[1, 4]
|
4,678,610 | 4,678,611 |
Carreer opportunities for A C++ developer : should I go for Java or C#?
|
<p>I'm a 5 years experienced software developer, but I basically only know how to program in C and C++.</p>
<p>I would like to expand my knowledge to another "main" language, because I often find myself limited to other interesting career opportunities, because of my lack/void skills in Java and C#.</p>
<p>I noted that C# is more finance oriented in the business.</p>
<p>Java seems to be mostly devoted to android applications, which seem to be an interesting growing field those days.</p>
<p>If you had to choose one of these languages, which one would you go for (or any other one) ? Considering mostly career opportunities.</p>
<p>Thank you in advance</p>
|
java c# c++
|
[1, 0, 6]
|
897,754 | 897,755 |
Tools for rapid layout/interface creations?
|
<p>Does anyone know of any tools (besides DroidDraw) that can help me create the basics of my projects a bit quicker? I'm looking for something that will allow me to very quickly generate the XML for my layouts so I don't have to sit there typing like a robot for so long. </p>
<p>Thanks!</p>
|
java android
|
[1, 4]
|
115,341 | 115,342 |
jQuery - "$ symbol is undefined"
|
<p>I was successfully using some plugin for about 6 months on my website and all of a sudden I started getting this message for one of my scripts: "$ is undefined".</p>
<p>This is the problematic line of code: <code>$.widget("ui.ImageColorPicker", uiImageColorPicker);</code></p>
<p>I'm using this plugin and almost the newest jQuery with noConflict enabled: <a href="http://github.com/Skarabaeus/ImageColorPicker" rel="nofollow">http://github.com/Skarabaeus/ImageColorPicker</a> I didn't change anything for 6 months (I didn't update jQuery). I'm sure it worked fine just 2 weeks ago and now it's broken all of a sudden.</p>
<p>EDIT: Error is gone. I'm removing example website.</p>
|
javascript jquery
|
[3, 5]
|
1,408,703 | 1,408,704 |
Validating Schema of pipe separated Csv file in c#
|
<p>I have a page where users can upload there <strong>pipe separated</strong> "|" csv file. I want to validate the schema & check whether that uploaded file is according to the schema or not ?</p>
<p>Currently I am checking <strong>using conditional operators</strong> whether it has columns name matching in the csv file for <strong>e.g</strong> If Col1 == Col1 then ok else bye. </p>
<p>But i feel this is not proper way to validate schema ? what are the possible options & better way to validate the csv schema.</p>
|
c# asp.net
|
[0, 9]
|
965,175 | 965,176 |
efficient and fast KV store suitable for andoid phones for a million rows?
|
<p>Is there a KV store that can store a million KV pairs, while performaning well in an Android phone without hogging resources?</p>
<p>It should be able to do this fast:</p>
<pre><code>kvstore.deleteByPrefix("image_hash_"); #a million keys have this prefix
for(... #for a million values
kvstore.add("image_hash_"+i.toString(), "true"); #values are small
}
</code></pre>
|
java android
|
[1, 4]
|
1,986,790 | 1,986,791 |
ASP fileupload control cannot be opened with Jquery in IE and Opera
|
<p>I have the following problem when I'm browsing with IE 9 and Opera: I have a hidden aps fileupload dialog, which I trigger when the user clicks on an asp button.</p>
<pre><code><asp:LinkButton ID="btnBrowse" class="button fright marl10" OnClientClick="return openFileDialog()" runat="server" CausesValidation="false"></asp:LinkButton>
</code></pre>
<p>And here is the Jquery:</p>
<pre><code>function openFileDialog() {
$('#uploadPhotoDialog').click();
return false;
}
</code></pre>
<p>uploadPhotoDialog is the ID of the aps fileupload control.</p>
<p>I'll appreciate any answers.
Thanks in advance.</p>
|
c# jquery asp.net
|
[0, 5, 9]
|
2,443,082 | 2,443,083 |
php text field turns numbers into decimals
|
<p>l need help to finish my php project.
l will like to have a text fields V1,V2,V3 and result/output to accept only decimal numbers (4 decimal place ie 0.0000) or automatically turns numbers to four decimal pace and have a read-only field generate the total sum of the 3 text fields without reloading the form. </p>
<p>eg
<code>text field v1+text field v2+text field v3=text field result</code></p>
<p>the text field should accept on four decimal numbers or automatically turn numbers to four decimal place.</p>
<p>I am using the following sum function;</p>
<pre><code>function sum()
{
var TotalLBCReceipts = num("TotalLBCReceipts");
var TotalKaaseReceipts = num("TotalKaaseReceipts");
var TakoradiToFactory = num("TakoradiToFactory2");
var KaaseToFactory = num("KaaseToFactory2");
var SampleResidue = num("SampleResidue");
var Sweepings = num("Sweepings");
var OrganicCocoa = num("OrganicCocoa2");
var Confiscated = num("Confiscated");
var Cuttings = num("Cuttings");
var r = document.getElementById("GRANDTOTAL1");
if (r != null)
{
r.value = TotalLBCReceipts +
TotalKaaseReceipts +
TakoradiToFactory +
KaaseToFactory +
SampleResidue +
Sweepings +
OrganicCocoa +
Confiscated+Cuttings;
}
}
</code></pre>
<p>And grabbing the Values using;</p>
<pre><code>function num(id)
{
var e = document.getElementById(id);
if (e != null)
{
var v = e.value;
if (/^\d+$/.test(v))
{
return parseInt(v, 10);
}
}
return 0;
}
</code></pre>
<p>thanks.</p>
|
php javascript
|
[2, 3]
|
3,135,198 | 3,135,199 |
dynamically generated html buttons: source of onclick event caller
|
<p>I have a DataTable which has a column like such:</p>
<pre><code>string temp = row["date"].ToString();
rowDetail[0] = "<input type='button' onclick='showArchive(this)' value='" + temp + "'/>";
myTbl.Rows.Add(rowDetail);
</code></pre>
<p>So, when I bind myTbl to a datagrid.datasource, these column cells appear as buttons display "date" data. However, in my javascript function where the onclick event takes place, how would I know button/row made the call, so I can grab the rest of the data in that row for processing? I hope that's not lacking too much detail. Thanks all</p>
<p><strong>Edit:</strong> Here's my js event:</p>
<pre><code>function showArchive(btn)
{
__doPostBack('btnShowDates', '/*btn.gridRowIndex*/');
}
</code></pre>
<p>Something like this would be ideal lol.</p>
|
c# javascript asp.net
|
[0, 3, 9]
|
4,709,097 | 4,709,098 |
timer in message application
|
<p>HELLO Developers,
I have taken over a project in android environment which i am completely new to, which imbibes a timer facility so that user can time his sms to be sent. Which messaging API will prove to be a help in this. Hoping to get good response from your side.</p>
|
java android
|
[1, 4]
|
4,147,591 | 4,147,592 |
Access Email Address from DetailView
|
<p>I'm trying to access the email address in the <code>DetailsView</code> but getting this error:</p>
<pre class="lang-none prettyprint-override"><code>Null Reference Exception was unhandled by user code
</code></pre>
<p>This is what I have in my code:</p>
<pre><code>TextBox EmailAddress = this.DetailsView1.FindControl("Email") as TextBox;
string myemail = EmailAddress.Text;
System.Net.Mail.MailMessage mailMessage = new System.Net.Mail.MailMessage();
mailMessage.From = new System.Net.Mail.MailAddress(System.Configuration.ConfigurationManager.AppSettings["fromEmailAddress"]);
mailMessage.To.Add(new System.Net.Mail.MailAddress("myemail")); //ERROR
</code></pre>
<p>So, the code is stopping at this line and getting the error I mentioned:</p>
<pre><code>mailMessage.To.Add(new System.Net.Mail.MailAddress("myemail"));
</code></pre>
|
c# asp.net
|
[0, 9]
|
911,352 | 911,353 |
jQuery binding function on focus
|
<p>I'm writing a little plugin for jQuery and so far I've got this:</p>
<pre><code>(function($){
$.fn.extend({
someFunction: function() {
return this.each(function() {
var obj = $(this);
obj.focus(someInternalFunction(obj));
});
}
});
function someInternalFunction(obj) {
};
})(jQuery);
</code></pre>
<p>The problem is, when i attach someFunction to the object, the object gets focus and binding of someInternalFunction on focus event fails.</p>
<p>Then I tried to bind function to wrap the function call in the other function:</p>
<pre><code>obj.focus(function() {
someInternalFunction($(this));
});
</code></pre>
<p>This code works, but it isn't pretty at all. Is it possible to bind function on focus without wrapping it in the other function?</p>
|
javascript jquery
|
[3, 5]
|
951,901 | 951,902 |
Not Equal To notation in Javascript to use in jQuery
|
<p>Is this the notation to use for Not Equal To in JS, in jquery code</p>
<pre><code>!== OR !=
</code></pre>
<p>None of them work</p>
<p>Here is the code I am using</p>
<pre><code>var val = $('#xxx').val();
if (val!='') {
alert("jello");
}
</code></pre>
<p>Thanks
Jean</p>
|
javascript jquery
|
[3, 5]
|
2,728,947 | 2,728,948 |
can I generate a custom <input type=file>
|
<p>Is there a way to construct another element that can enable posting of files to server?
<br> without using the tag </p>
<pre><code><input type='file'>
</code></pre>
|
php javascript
|
[2, 3]
|
3,913,110 | 3,913,111 |
Use Jquery inside JS file?
|
<p>I have created an external JS file, this JS file contains some methodes that uses JQuery, i can't seem to find a way to refernece the JQuery file on JS file and user it there. Any help would be appreciated </p>
|
javascript jquery
|
[3, 5]
|
5,841,675 | 5,841,676 |
What is "focused" regarding android apps?
|
<p>I keep seeing "focused" and hearing about "focusing" within the development of Android apps. My question is: What is focusing, and how is it applied within Android apps? Is it important? What can you do with it?</p>
<p>I'm sorry if this has been asked, I looked but didn't see anything that clearly explained it. I've looked the the Android development guide, but I couldn't find a decent explanation of what it is and how it works. </p>
|
java android
|
[1, 4]
|
955,517 | 955,518 |
Controls.Add With Comments?
|
<p>I'm currently doing something like this:</p>
<pre><code>var ph = Page.FindControl("phHead");
if (null != ph)
{
var metaTag = new HtmlGenericControl("meta");
metaTag.Attributes.Add("name", "name_goes_here");
metaTag.Attributes.Add("content", "content_goes_here");
ph.Controls.Add(metaTag);
}
</code></pre>
<p>What I need to do is a comment into the same control. Is there a way to create a control that's just plain old <code><!-- comment here --></code> and use it in <code>Controls.Add()</code>?</p>
<p>Thanks</p>
|
c# asp.net
|
[0, 9]
|
6,016,688 | 6,016,689 |
How can I extract images from urls which are in a csv file?
|
<p>i have a csv file which has S.no and Url of the 1500 images : i need to save all the images at a time how can i do it in .net with C# ?</p>
|
c# asp.net
|
[0, 9]
|
2,773,287 | 2,773,288 |
JavaScript equivalent of C#'s DynamicObject?
|
<p>Just to be clear, a class that inherits DynamicObject (in C# of course) is not the same concept as JavaScript's variables being dynamic. DynamicObject allows the implementer to programmatically determine what members an object has, including methods.</p>
<p><strong>Edit</strong>: I understand that JavaScript objects can have any members added to them at run time. That's not at all what I'm talking about. Here's a C# example showing what DynamicObject does:</p>
<pre><code>public class SampleObject : DynamicObject
{
public override bool TryGetMember(GetMemberBinder binder, out object result)
{
result = binder.Name;
return true;
}
}
dynamic obj = new SampleObject();
Console.WriteLine(obj.SampleProperty);
//Prints "SampleProperty".
</code></pre>
<p>When a member of obj is accessed, it uses the TryGetMember to programmatically determine whether the member exists and what its value is. In short, the existence of a member is determined when it's requested, not by adding it before hand. I hope this clarifies the question a little. In case you're wondering, I'm trying to determine if it's possible to make an object in JavaScript, that when the function call syntax is used on it like so:</p>
<pre><code>myAPI.uploadSomeData(data1, data2)
</code></pre>
<p>The uploadSomeData call goes to a "TryGetMember" like function, which performs an $.ajax call using the name "uploadSomeData" to generate the URL, and the return value is the result.</p>
|
c# javascript
|
[0, 3]
|
3,786,743 | 3,786,744 |
fire one set of functions first, then callback to a final function
|
<p>I have an jquery ajax success function which uses a template to put json information in a div, then a modal plugin to fade in a modal. The problem is, the modal is firing before all the content is completely written to the div. Is there a way that I can make this collection of template actions complete before I call the modal fires?</p>
<pre><code> success: function (data) {
//run generic order header through template
$('#order_detail_header').vkTemplate('scripts/templates/header_template.tmpl?<?=time()?>', data);
//run header 2 information through template
$('#order_detail_header_2').vkTemplate('http://scripts/templates/detail_header_2_template.tmpl?<?=time()?>', data);
//run shipment information through template
$('#order_detail_shipment_information').vkTemplate('scripts/templates/detail_shipment_information_template.tmpl?<?=time()?>', data, function(){ $(".tracking_box").hide();});
//run line item information through template
$('#order_detail_line_item_information').vkTemplate('http://www.isco.net/dev/webtrack/scripts/templates/order_detail_line_item_information_template.tmpl?<?=time()?>', data, function(){ $(".tracking_box").hide();});
//run pricing information through template
$('#order_detail_pricing_information').vkTemplate('http://www.isco.net/dev/webtrack/scripts/templates/order_detail_pricing_information_template.tmpl?<?=time()?>', data['order']);
$('#order_detail_modal').reveal({ // The item which will be opened with reveal
animation: 'fade', // fade, fadeAndPop, none
animationspeed: 600, // how fast animtions are
closeonbackgroundclick: true, // if you click background will modal close?
dismissmodalclass: 'close_modal' // the class of a button or element that will close an open modal
});
}
</code></pre>
<p>I tried wrapping the whole thing in an function and putting the <code>.reveal</code> function in a callback, but i must have the wrong syntax or idea. Any suggestions are appreciated. Thank you!</p>
|
javascript jquery
|
[3, 5]
|
1,166,173 | 1,166,174 |
How to display a div area when page loads
|
<p>Suppose i have a div id=x which reside in the middle of the page and i want when that page load content in div x to be shown instead of showing the page from top. Its like appending div id at the end of the url to go for a given div area instead this time no url and i want it when page loads</p>
<p>Thank You.</p>
|
javascript jquery
|
[3, 5]
|
437,662 | 437,663 |
jquery dropdown menu opens repeatedly upon hover
|
<p>I've got a bit of a problem with a jquery menu. I works just fine, but if you hover over the buttons 3 or 4 times, the menu will expand 3 or 4 times repetitively, and all you can do it wait for it to quit. Can somebody please tell me how to stop this? Here's the javascript I'm using:</p>
<pre><code><script type="text/javascript">
$(function () {
$('#dropMenu .level1 .submenu.submenu').hover(function() {
$(this).find('ul.level2,.level3 li,.level4 li,.level5 li,.level6 li').stop(true, true).hide(1000);
$(this).find('ul.level2,.level3 li,.level4 li,.level5 li,.level6 li').stop(true, true).show(1000);
}, function() {
$(this).find('ul.level2,.level3 li,.level4 li,.level5 li,.level6 li').stop(true, true).show(1000);
$(this).find('ul.level2,.level3 li,.level4 li,.level5 li,.level6 li').stop(true, true).hide(1000);
});});
</script>
</code></pre>
<p>Any insight to this would be greatly appreciated.</p>
<p>Thanks</p>
|
javascript jquery
|
[3, 5]
|
2,708,915 | 2,708,916 |
How would I echo selected form values in an HTML element (like a p tag)?
|
<p>Is there a way to show/echo form values in an HTML element as the user fills out a form?</p>
<p>I am creating a giant search form and would like to add a helpful area by the submit button that reminds the user of what they are about to search for.</p>
|
php javascript jquery
|
[2, 3, 5]
|
5,110,927 | 5,110,928 |
Jquery Slidedown/SlideUp
|
<p>I was working on a div that slides down once you click on some text. It slide down just fine, but when you click on the text to slide it up it does nothing. Did I miss something?</p>
<p>You can see the example below.</p>
<p><a href="http://jsfiddle.net/6ZSCL/" rel="nofollow">http://jsfiddle.net/6ZSCL/</a></p>
|
javascript jquery
|
[3, 5]
|
84,412 | 84,413 |
file upload C# asp.net
|
<p>i am trying to upload files in asp.net and putting a specific path to be saved. windows user.</p>
<p>it is outputting me an error :</p>
<pre><code>System.UnauthorizedAccessException was unhandled by user code
Message=Access to the path 'C:\Users\USER\Desktop\fyp2\CMS TEST4\CMS\CMS\Upload' is denied.
</code></pre>
<p>my code is: </p>
<pre><code> var guid = Guid.NewGuid();
if (File.HasFile)
{
var length = File.PostedFile.FileName.ToString().Length;
var ind = File.PostedFile.FileName.ToString().IndexOf('.');
var sdfs=guid.ToString()+File.PostedFile.FileName.ToString().Substring(ind, length - ind);
File.PostedFile.SaveAs("C:\\Users\\USER\\Desktop\\fyp2\\CMS TEST4\\CMS\\CMS\\Upload");
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
1,424,095 | 1,424,096 |
jQuery toggle();
|
<p>I am loading data dynamically by AJAX into a cluetip (<a href="http://plugins.learningjquery.com/cluetip/#" rel="nofollow">http://plugins.learningjquery.com/cluetip/#</a>).</p>
<p>I want to toggle the results from a link like so: </p>
<pre><code>$(document).ready(function() {
$("#calendarLink").live("click",( function() {
$("#result").toggle();
}));
});
</code></pre>
<p>For some reason the above will not work. Can you suggest an alternative? </p>
|
javascript jquery
|
[3, 5]
|
4,456,801 | 4,456,802 |
how might I disable a div when the data inside it reaches 0 possibly using an if else?
|
<p>I have a snippet of javascript that displays the amount of sessions available for an event </p>
<pre><code>for ( var j in data.events[i].sessions ) {
first_session_id = !first_session_id ? data.events[i].sessions[j].id : first_session_id;
session_html +=
'<li id="session_row_'+ data.events[i].sessions[j].id +'">'+ data.events[i].sessions[j].time+
'<div class="right">'+ data.events[i].sessions[j].available +' sessions remaining</div></li>';
}
</code></pre>
<p>at the moment when the sessions become empty or are all booked the value -1 is displayed. What I would like to do is add an if else statement that basically disables or blacks out the .right when we get to 0?</p>
<p>Can anyone advise me on how this might be done?</p>
<p>Regards
Kyle</p>
|
javascript jquery
|
[3, 5]
|
2,483,138 | 2,483,139 |
Is it true that having the Nexus S is much better as an Android developer?
|
<p>Soon, I'll be starting Android development, as I know a bit of Java. I'll also be getting an Android phone. My two options are the Nexus S and the Atrix 4G. I've heard the Nexus series is ideal for developers - can someone tell me why? Why is getting the Atrix bad as a developer?</p>
|
java android
|
[1, 4]
|
895,753 | 895,754 |
How to get user's client IP from a third party from code behind
|
<p>I am using this script to get User's Client IP:</p>
<pre><code><script type="text/javascript" src="http://geoiplookup.wikimedia.org/"></script>
</code></pre>
<p>I can get the IP using JavaScript as <code>Geo.IP</code>, but I need to get it in code behind on button click.</p>
<p>Something like:</p>
<pre><code>protected void Button1_Click(object sender, EventArgs e)
{
string IP = string.Empty;
// IP = ???
// Validation code
}
</code></pre>
<p>Any ideas?</p>
<p>Thanks in advance...</p>
|
c# javascript asp.net
|
[0, 3, 9]
|
2,917,463 | 2,917,464 |
Call javascript function from Global.asax without redirect
|
<p>When in my application occurs an exception (unhandled), i want to stay on the same web page and show an alert. Is it possible?
Example: in page X is raised an uncaught exception, the control flow reaches the global.asax where it is handled by the Application_Error method. I don't want the global.asax to performe a Response.Redirect but I want to remain in page X and show a javascript alert.</p>
<p>Thanks</p>
|
javascript asp.net
|
[3, 9]
|
4,705,537 | 4,705,538 |
Return a view (ListView)
|
<p>Is it possible to return a view (a row in a ListView) ?</p>
<p>I want to disable all the checkboxes:</p>
<pre><code>public void disableCheckboxes()
{
for(int i =0; i < getCount(); i++)
{
View view = (View) getView(i, null, null);
CheckBox checkBox = (CheckBox)view.findViewById(R.id.playlist_checkbox);
checkBox.setVisibility(CheckBox.INVISIBLE);
}
}
</code></pre>
|
java android
|
[1, 4]
|
6,008,719 | 6,008,720 |
javaScript, jQuery - how to convert a timestamp to a date format like Jan 2, or Jan 26?
|
<p>Given a string like:</p>
<pre><code>Sun Feb 06 2011 12:49:55 GMT-0800 (PST)
</code></pre>
<p>How can you convert that to:</p>
<pre><code>Feb 6
</code></pre>
<p>And / Or</p>
<pre><code>Sun Jan 26 2011 12:49:55 GMT-0800 (PST)
to: Jan 26
</code></pre>
<p>Any ideas?</p>
|
javascript jquery
|
[3, 5]
|
3,628,907 | 3,628,908 |
How to make a fade in/out slogan with javascript
|
<p>So I have this code that modifies the contents of a div on refresh.</p>
<p>But I also want it to fade in and out a new random text over a set amount of time. I don't know where to start here's my original code:</p>
<p>HTML:</p>
<pre><code><div id="logo" class="container">
<h1>InsiderIndy</h1>
<p id="myQuote">Slogan</p>
</div>
</code></pre>
<p>JavaScript:</p>
<pre><code><script type="text/javascript">
var myQuotes = new Array();
myQuotes[0] = "Quote1";
myQuotes[1] = "Quote2";
myQuotes[2] = "Quote3"
myQuotes[3] = "Quote4"
myQuotes[4] = "Quote5"
myQuotes[5] = "Quote6"
var myRandom = Math.floor(Math.random()*myQuotes.length);
$('#myQuote').html(myQuotes[myRandom]);
</script>
</code></pre>
<p>Any ideas? Thanks! :)</p>
|
javascript jquery
|
[3, 5]
|
4,403,532 | 4,403,533 |
How to fire button click event from user contol in asp.net
|
<p>I have a time on user control, and button on the web page. On perticular time I want to fire button click event. Please tell me how do this.</p>
|
javascript asp.net
|
[3, 9]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.