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 |
---|---|---|---|---|---|
5,350,199 | 5,350,200 |
Selecting text on-the-fly from textbox leaves out last character in javascript
|
<p>I'm trying to get the text from a textbox as a user types, so that I can parse it and display information accordingly as the user enters a command. However, it seems as though the function I'm writing is getting the text from the box before the letter is entered into the text box. How do I prevent the function from grabbing the content from the textbox before the typed character is entered? I considered grabbing the id of the key and altering the inputted string accordingly, but I feel like there should be a better way. </p>
<p>The code: </p>
<pre><code>$('#inputConsoleForm').keydown(function(event){
//Get key code
var code = (event.keyCode ? event.keyCode : event.which);
//Get console text (doesn't behave as expected)
var consoleCommand = document.inputConsoleForm.console.value;
function parseConsoleCommand(consoleCommand) {
/* Returns true if command is valid*/
}
if(code === 13) {
event.preventDefault();
if(!parseConsoleCommand(consoleCommand))
alert("INVALID COMMAND LINE");
else
attemptExecute();//Runs the command
}
if(code === 32 || (code >= 48 && code <= 123) || code === 61 || code === 109 || code === 188 || code === 8) {
if(parseConsoleCommand(consoleCommand)){
$(document.inputConsoleForm.console).css("background-color", "#FFDFDF");
}
else{
$(document.inputConsoleForm.console).css("background-color", "");
}
}
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
2,802,243 | 2,802,244 |
How to set custom view for day in CalendarView?
|
<p>I'm developing some Android application, and now I've got the following problem: for some days I need to set custom view, but I haven't found any examples of this feature. I hoped that there was some adapters for CalendarView, but it's false. Please, tell me, how can I do it? Thank you in advance. </p>
<p>UPDATE: I use CalendarView in Android 4.0 (default component)</p>
|
java android
|
[1, 4]
|
1,043,677 | 1,043,678 |
Checkbox list inside datalist
|
<p>I have a checkbox list inside a datalist:</p>
<pre><code> <asp:DataList ID="dtlstfilter" runat="server">
<ItemTemplate>
<div style="display: none;" id='<%#changes(Eval("FilterCode")) %>' class="p7ABcontent">
<p>
<asp:CheckBoxList AutoPostBack="true" Font-Size="12px" ID="chklist" runat="server" ></asp:CheckBoxList>
</p>
</div>
</ItemTemplate>
</asp:DataList>
</code></pre>
<p>And I loaded two list items in this to say 'yes' and 'no'. How can i get the event in the selected checkbox?</p>
|
c# asp.net
|
[0, 9]
|
442,788 | 442,789 |
How do I relay dynamic parameters passed into a functionA() to functionB() called within functionA()
|
<p>I'm trying to relay dynamic parameters from a web page into a function, which then passes them to a call inside the function. For example, take the simplified snippet below, as it is now, passing in the parameters directly is not problem. But how do I pass in a parameter which colorbox accepts without making a parameter for showColorbox() for every possible colorbox parameter? </p>
<pre><code>function showColorbox(title, url, width, height, modal, params) {
$.colorbox({title:title, href:url, width:width, height:height, opacity:0.7});
}
</code></pre>
<p>For instance, colorbox accepts passing in an event function, such as below if I called colorbox directly:</p>
<pre><code> $.colorbox({title:title, href:url, width:width, height:height, opacity:0.7,
onComplete: function() {
$.colorbox.resize();
}
});
</code></pre>
<p>So, without adding some code or making another parameter and parsing it out somehow inside showColorbox(), is there a way for me to pass the onComplete param/code [via showColorbox(....{onComplete:yada yada}) or something] and have them relayed to the $.colorbox() function?</p>
<p>UPDATE:
Ended up using the following successfully, added an extra objParams parameter to the showColorbox() function.</p>
<pre><code>//m_title, m_url, m_width, m_height are from fixed parameters for showColorbox()
var objBase = {title:m_title,href:m_url,width:m_width,height:m_height} ;
var objFinal = {};
//add base parameters passed in directly, fixed params
for(var item in objBase) {
objFinal[item] = objBase[item];
}
//add the parameters from objParams passed in (variable params/values)
for(var item in objParams) {
objFinal[item] = objParams[item]
}
//call function with combined parameters in object
$.colorbox(objFinal)
</code></pre>
<p>None of the callers needed to be updated, but now passing in a new object using parameters which $.colorbox understands works fine! Thanks again!</p>
|
javascript jquery
|
[3, 5]
|
4,405,298 | 4,405,299 |
How to start an activity that is defined in other Android projects?
|
<p>I have defined some common Activities in a library project and want to reuse these activity in my working project.</p>
<p>I declared my library project as Android library, use the fully-qualified name of the Activities and declare them in the AndroidManifest.xml of the new project. However, I get 'Unable to find explicit activity class' error when launching the application.</p>
<p>Any other configurations shall I do in order to start the Activities?</p>
|
java android
|
[1, 4]
|
1,847,929 | 1,847,930 |
How do I add more than one function in my $(document).ready function
|
<p>I have this and it works fine:</p>
<pre><code>$(document).ready(
highlightTableRow
);
</code></pre>
<p>but when I add a second function (see below) the second doesn't work.</p>
<pre><code>$(document).ready(
highlightTableRow,
attachClickLinkHandlerForRowLink
);
</code></pre>
<p>What's the correnct syntax for adding a second function to my ready function? Thanks.</p>
<p>edit: add syntax errors. (eclipse)</p>
<pre><code>$(document).ready(
highlightTableRow(); **// error:Syntax error, insert ")" to complete Arguments**
attachClickHandlerForRowLink(); **//error: Missing semicolon**
); **// error: Syntax error on token ")", delete this token**
var originalRowBackground;
function highlightTableRow(){
$('[class^="contentRow"]:has(a)').live('mouseenter', enterRowFunction).live('mouseleave', exitRowFunction);
}
function enterRowFunction(){
originalRowBackground = $(this).css('background-color');
$(this).css({'background-color': "#EFE3FF", 'cursor': 'pointer'});
}
function exitRowFunction(){
$(this).css({'background-color': originalRowBackground, 'cursor': 'pointer'});
}
function attachClickHandlerForRowLink(){
$('[class^="contentRow"]:has(a)').live('click', clickRowLink);
}
function clickRowLink(){
window.location = $(this).find("a").attr("href");
} **//error: Missing semicolon**
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,292,870 | 5,292,871 |
jQuery equivellent for dynamically create id
|
<p>I am looking for jQuery equivellent for the following. Please help. </p>
<pre><code>var request = document.getElementById('request_' + id1)
var response = document.getElementById('response_' + id1);
modifyText(request.firstChild.nodeValue,response.firstChild.nodeValue);
</code></pre>
|
javascript jquery
|
[3, 5]
|
2,655,172 | 2,655,173 |
How to turn php time function into javascript function?
|
<p>I'm not that good at javascript (yet), so I need some help, with an alternative version of this php script (In javascript)</p>
<pre><code>function until($format = ""){
$now = strtotime("now");
$nextTuesday = strtotime("-1 hour next tuesday");
$until = $nextTuesday - $now;
if(empty($format)){
return $until;
}else{
return date("$format",$until);
}
}
</code></pre>
<p>Just need it to count down, until next tuesday, in a really short way (Not in 20+ lines, like all the other script I've seen)
It should still return a timestamp, if it's possible (Need it for an offline app)</p>
<p>So if anyone could help me, I would be really happy (Not that I'm not happy right now, but I would be even happier) :D</p>
|
php javascript
|
[2, 3]
|
1,175,112 | 1,175,113 |
read javascript object properties
|
<p>let's say I have a JavaScript object of this form:</p>
<pre><code>var myJsObject =
{
A.b: 1
A.c: 2
}
</code></pre>
<p>How do I get the value of let's say <code>A.c</code>?</p>
<p>I tried:</p>
<pre><code>var value = myJsObject['A.c']
</code></pre>
<p>But that gave me the error <code>Uncaught TypeError: Cannot set property 'A.c' of undefined</code></p>
<p>Thank you</p>
|
javascript jquery
|
[3, 5]
|
902,352 | 902,353 |
Converting JS RegEx To PHP Not Working
|
<p>I had this JS/jQuery:</p>
<pre><code>$(this).text().replace(/([^\s]+)/, day);
</code></pre>
<p>which took a line like <code>MAR/26/2013 05:00 PM</code> and converted it to <code>05:00 PM</code>.</p>
<p>But this PHP does not do a proper replacement for some reason:</p>
<pre><code>$time = preg_replace('/([^\s]+)/', '', $dateStr);
</code></pre>
<p>Instead I am left with a string containing one space.</p>
<p>I converted all of my code flawlessly up until the aforementioned line. <code>$(this).text()</code> has the same value as <code>$dateStr</code>.</p>
|
php javascript jquery
|
[2, 3, 5]
|
959,887 | 959,888 |
Radio Button, Text Area and Input check
|
<p>I have a form with all the input fields as class <code>item</code>. When I click submit, it checks, with the following function if all values are filled in.</p>
<pre><code>$.each($(".items"),function(i,e){
// loop through all the items
if(e.value == "" || !$("input[name='"+e.name+"']:radio:checked").length)
if(error.indexOf(e.title) === -1)
error += e.title + "<br/>";
});
</code></pre>
<p>This form comprises of text areas, radio boxes and normal text input fields. It returns all the radio boxes not filled in, as well as all the text inputs not filled in. But then it also returns ALL the text areas, regardless of whether it's filled in or not.</p>
<p>I first thought it was because I specified it to check the value, but it seems the value check does in fact check text areas, so it can't be that.</p>
<p>Could anyone assist me in making it return only empty elements?</p>
|
javascript jquery
|
[3, 5]
|
234,661 | 234,662 |
c# - Click on link to create a table?
|
<p>Hmmm not sure how to exactly ask this. </p>
<p>What i want to do is to be able to click on a link called surname and then below i want a table generated with a list of everyone with that surname from the database.</p>
<pre><code><input type="text" id="surname" name="surname" size="10" /><a href="javascript:surname();">Surname</a>
<input type="text" id="forename" name="forename" size="10" /><a href="javascript:forename();">Forename</a>
<table id = "t" visible="false" runat="server">
<tr>
<th>Surname</th>
<th>Forename</th>
<th>D.O.B</th>
</tr>
</table>
</code></pre>
<p>To get the data the quesry select * from surname will return surname, forname and d.o.b</p>
<p>This is roughly what i have at the moment. I know i have to call a function somwhere and then return something to generate the data in side the table 't' but how?</p>
|
c# javascript jquery asp.net
|
[0, 3, 5, 9]
|
3,741,207 | 3,741,208 |
Error's looping through jquery returned data
|
<p>What I am trying to do is loop through all of the entries and process the selected post to delete. I must not be doing it right because I can't even get console.dir() to even process. Any help?</p>
<pre><code>// process delPost()
$(".firstLastName").click(function() {
delPost();
});
function delPost() {
// this function deletes the current post
var entryId_1 = $("#delpost").attr("delpost");
var entryId = $("#entryId"+entryId_1).val();
var dataString = '&entryId=' + entryId;
console.dir(entryId);
$.ajax({
type: "POST",
dataType: "JSON",
url: "<?=base_url()?>index.php/regUserDash/delPost",
data: dataString,
json: {postedToWall: true},
success: function(data) {
if(data.postDeleted == true) {
// hide the post
$("#entryId"+entryId_1).remove();
}
}
});
}
<a class="firstLastName font1 link-font1"><b><?php echo $row->firstname . " " . $row->lastname; ?></b></a>
<span class="link-font2" delpost="<?php echo $row->idwallPosts; ?>" href="javascript:void(0)" id="delPost">Delete Post</b></span>
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,013,333 | 5,013,334 |
How to Change label on Default page when user controls returns to page?
|
<p>I made a web user control. After the code of user control is returned to the default page, then I want to retrieve some value of user control.
Like the following code...</p>
<pre><code><asp:Label ID="lblmaster" runat="server"></asp:Label>
<uc1:UserControl ID="WebUser" runat="server">
</uc1:UserControl>
</code></pre>
<p>The Label is visible only when the all the operations in user control are done. how this is possible??</p>
|
c# asp.net
|
[0, 9]
|
3,051,596 | 3,051,597 |
(html/css/javascript) Trying to make my Current Page link in the navbar a different color
|
<p>I've been reading around and people recommending only CSS to change the current page navbar link background color but I don't get how that's possible since CSS is static and I won't be able to add/remove the <code>.currentlink</code> class on the links? So right now I'm using JS / jquery to try to add / remove class based on click, but the site refreshes and nothing is saved when I click, so that the class that I added/removed doesn't do anything. May someone guide me the right direction? Example: I click on the last link of the HTML I gave you, but it would just go to that site and since everything refreshes to a new site, the background doesn't change.</p>
<p>HTML</p>
<pre><code> <nav class="clearfix">
<a href="#">home</a>
<a href="#">about us</a>
<a href="#">tour</a>
<a href="index.html">flickr search</a>
<div class="rightnav">
<a href="#">Sign Up</a>
<a href="#">Log In</a>
</div>
</nav>
</code></pre>
<p>CSS</p>
<pre><code>.greybackground {
background: #E6E6E6;
}
</code></pre>
<p>JS</p>
<pre><code>$('nav a').on('click', function(){
$('nav a').removeClass('greybackground');
$(this).addClass('greybackground');
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,177,819 | 3,177,820 |
How to perform multiple page hyperlink clicks with ctrl key
|
<p>I would like to know how (if there's a way) to handle multiple link clicks via the ctrl key.</p>
<p>So for example the user would go to a web page with about 3 hyperlinks on it. Then the user would hold down the ctrl key, then click one link then another. Then when the ctrl key is released, an event will occur (maybe a search based on the combination of both hyperlinks' values).</p>
<p>I am using C# and assume the solution will probably be done in jQuery?</p>
<p>The selection should work similar to how windows explorer does. Where you hold down the ctrl key, then select a file, then another and then cut or paste it somewhere.</p>
<p>I appreciate any help that you could provide as I am struggling to find help elsewhere.
M </p>
|
c# javascript jquery asp.net
|
[0, 3, 5, 9]
|
5,501,028 | 5,501,029 |
Detection of Server
|
<p>Is there a way to have Javascript autodetect wether its server is local(127.0.0.1) or production(http://www.example.com) and set a variable accordingly?</p>
<p>For example in PHP is use this function to do reloads and it works local or production:</p>
<pre><code> public static function reload()
{
$uri = 'http://';
$uri .= $_SERVER['HTTP_HOST'];
header('Location: '.$uri);
}
</code></pre>
<p>This way I won't have to remember to edit my local_on variable when uploading my script from development to production.</p>
|
php javascript
|
[2, 3]
|
4,669,478 | 4,669,479 |
javascript to check if element visible and set "setInterval" accordingly
|
<p><strong>LE2. Any other ideas on how to fix this?</strong></p>
<p>I have this code and can't figure why is not working properly:</p>
<pre><code>$(function autorun() {
if ($("#contactForm").is(":visible")){
setInterval( "refreshAjax();", 150000000000 );
}
else {
setInterval( "refreshAjax();", 15000 );
}
setTimeout("autorun();", 2000)
});
</code></pre>
<p>...</p>
<pre><code><body onLoad="autorun()">
</code></pre>
<p>Right now it keep refreshing the page every 2 secs, even if the "contactForm" is visible.</p>
<p>My logic is: if the "contactForm" is visible, delay the refresh or stop it, keep checking that, but in the mean time refresh the page accordingly to the other statement.</p>
<p>LE.</p>
<pre><code>$(function() {
refreshAjax = function(){$("#flex1").flexReload();
}
});
</code></pre>
<p>LE2. Final solution provided <a href="http://stackoverflow.com/questions/4062466/javascript-script-not-working-and-crashing-ie">here</a> by @Nick Craver </p>
<pre><code>$(function () {
var ajaxTimeout;
function autorun() {
if ($("#contactForm").is(":visible")){
if(ajaxTimeout) {
clearInterval(ajaxTimeout);
ajaxTimeout = false;
}
}
else if(!ajaxTimeout) {
ajaxTimeout = setInterval(refreshAjax, 15000);
}
}
setInterval(autorun, 2000);
});
</code></pre>
<p>Thanks,
Cristian.</p>
|
javascript jquery
|
[3, 5]
|
3,392,610 | 3,392,611 |
Update label C#
|
<p>When the page first load i have a label who has 0 or 1. Look at the code and you will se what i trying to do. But it don't work because the page allready loaded.</p>
<pre><code>protected void rptBugStatus_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
Label lblName = e.Item.FindControl("lblBugStatus") as Label;
if (lblName.Text == "1")
{
lblName.Text = lblName.Text + "Under arbete";
}
else if (lblName.Text == "0")
{
lblName.Text = "Fixad";
}
else { }
}
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
4,824,103 | 4,824,104 |
jQuery ready - how to strip an existing ready handle?
|
<p>I've been asked to perform maintenance on a third party site, I can edit the javascript but not the back end code. This site uses a plugin which sets various styles and events up in a jQuery.ready call. I want to stop it without causing errors. I can insert javascript before and after the plugin in the template but the markup inside the plugin comes from elsewhere. I have tried something like this:</p>
<pre><code><script>
var tmpReady = $.ready;
$.ready = function() {};
</script>
<pluginWhichICanNotChange>
$(document).ready( function(){ BAD STUFF } );
</pluginWhichICanNotChange>
<script>
$.ready = tmpReady;
</script>
</code></pre>
<p>But the BAD STUFF still fires. Anyone any idea how I can strip it!?</p>
|
javascript jquery
|
[3, 5]
|
3,803,700 | 3,803,701 |
How to stretch the image in ImageView?
|
<p>I have an <code>ImageView</code> and I need to load <code>jpg</code> image from SD card into this view. I have following code:</p>
<pre><code>mImageView.setImageBitmap(SDCardUtilities.getBitmapFromSDCard(item));
</code></pre>
<p><code>getBitmapFromSDCard</code> is my function that only make <code>Bitmap</code> from file on sdcard. But often an image is small and doesn't fill the <code>ImageView</code> fully. How can I stretch the image that it will be fill whole <code>ImageView</code>? </p>
|
java android
|
[1, 4]
|
2,824,281 | 2,824,282 |
Compare system date with a date field in SQL
|
<p>I am trying to compare a date record in SQL Server with the system date. In my example the user first register with his name and date of birth which are then stored in the database. The user than logs into the web application using his name only. After logging in, his name is shown on the side where it says <code>"Welcome "player name</code>" using <code>Sessions</code>. </p>
<p>What I am trying to show in addition to his name is a message saying "happy birthday" if his date of birth matches the system date. I have tried working with <code>System.DateTime.Now</code>, but what I think is that it is also comparing the year, and what I really want is the day and the month only. I would really appreciate any suggestion or help. </p>
<p>CODE In Login page:</p>
<pre><code>protected void Button1_Click(object sender, EventArgs e)
{
String name = TextBox1.Text;
String date = System.DateTime.Today.ToShortDateString();
SqlConnection myconn2 = new
SqlConnection(ConfigurationManager.ConnectionStrings["User"].ToString());
SqlCommand cmd2 = new SqlCommand();
SqlDataReader reader;
myconn2.Open();
cmd2 = new SqlCommand("Select D_O_B from User WHERE Username = @username",
myconn2);
cmd2.Parameters.Add("@username", SqlDbType.NVarChar).Value = name;
cmd2.Connection = myconn2
cmd2.ExecuteNonQuery();
reader = cmd2.ExecuteReader();
while (reader.Read().ToString() == date)
{
Session["Birthday"] = "Happy Birthday";
}
}
</code></pre>
<p>Note: I using the same reader in the code above this one, but the reader here is with a different connection. Also, <code>reader.Read()</code> is different than <code>reader.HasRows</code>? </p>
<p>Code in Web app Page:</p>
<pre><code>string date = (string)(Session["Birthday"]); // Retrieving the session
Label6.Text = date;
</code></pre>
|
c# asp.net
|
[0, 9]
|
3,827,952 | 3,827,953 |
Slide div. Jquery
|
<p>I'm using this code to slide divs off the screen:</p>
<pre><code> $('.box').click(function() {
$(this).animate({
left: '-50%'
}, 500, function() {
$(this).css('left', '150%');
$(this).appendTo('#container');
});
$(this).next().animate({
left: '50%'
}, 500);
});
</code></pre>
<p>html:</p>
<pre><code> <div id="container">
<div id="box1" class="box">Div #1</div>
<div id="box2" class="box">Div #2</div>
<div id="box3" class="box">Div #3</div>
</div>
</code></pre>
<p>css:
.box {
position: absolute;
left: 150%;
margin-left: -25%;
} </p>
<pre><code> #box1 {
left: 50%;
}
</code></pre>
<p>It works great. But when I click on the last div, the first one comes back and I can go over all the div again.</p>
<p>I would like it to stop when the last div appears. Could you give me hints on how I can accomplish that?</p>
<p>Thank you for your help.</p>
|
javascript jquery
|
[3, 5]
|
662,344 | 662,345 |
Limitation of String in android
|
<p>Is there any limitation in string in android.
I am getting a response after an http request which is a much bigger string.
My problem is that I am not getting the entire string.
what may be the reason?
I am using this code</p>
<pre><code>response = httpclient.execute(httppost);
String responseBody = EntityUtils.toString(response.getEntity()); // response string
GlobalClass.printLine("Response >> " + responseBody);
</code></pre>
|
java android
|
[1, 4]
|
728,149 | 728,150 |
TimeSpan FormatString with optional hours
|
<p>I have a timespan, <code>ts</code>, that has mostly minutes and seconds, but sometimes hours.
I'd like <code>ts</code> to return a formatted string that'll give the following results:</p>
<pre><code>3:30 (hours not displayed, showing only full minutes)
13:30
1:13:30 (shows only full hours instead of 01:13:30)
</code></pre>
<p>So far I have:</p>
<pre><code>string TimeSpanText = string.Format("{0:h\\:mm\\:ss}", MyTimeSpan);
</code></pre>
<p>but it's not giving the above results. How can I achieve the results I want?</p>
|
c# asp.net
|
[0, 9]
|
3,309,496 | 3,309,497 |
Does being good in jQuery imply being good in JavaScript?
|
<p>I'm pretty efficient in jQuery, having implementing it in several projects for my company. However, I found myself a little lost when reading stuff like <code>node.js</code>.</p>
<p>Do I have to go back to basics and learn the JavaScript language or should I just stick with jQuery?</p>
<p>One more thing I would like to ask: Does coding in plain JavaScript increase performance compared to coding with jQuery? For my own experience, coding heavy, complex combination of animation in jQuery always seems to take up large amount of the computer memory.</p>
|
javascript jquery
|
[3, 5]
|
933,985 | 933,986 |
jQuery toggle() setInterval not working
|
<p>I have this:</p>
<pre><code><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<link href="http://fonts.googleapis.com/css?family=Geo:regular" rel="stylesheet" type="text/css" >
<style>
body {
font-family: 'Geo', serif;
font-size: 32px;
font-style: normal;
font-weight: 400;
text-shadow: none;
text-decoration: none;
text-transform: none;
letter-spacing: 0em;
word-spacing: 0em;
line-height: 1.2;
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script>
<script type="text/javascript">
function cursorAnimation()
{
$(".cursor").toggle();
}
$(document).ready(function()
{
setInterval ( "cursorAnimation()", 1900);
});
</script>
<title>Untitled 2</title>
</head>
<body>
So, what's the deal?<span class="cursor">[WARNING]</span>
</body>
</html>
</code></pre>
<p>and it works -- technically. However, the toggle is working but it's going WAY too fast. I tried messing with setInterval but it's not doing a dang thing... I just want for it to appear and disappear on loop (like a cursor) but without the fading.</p>
|
javascript jquery
|
[3, 5]
|
4,293,114 | 4,293,115 |
Importance of coursera.org courses such algorithm, Computer Visions for an android/Iphone developer?
|
<p>I have been developing mobile apps(android and iPhone both) for few months now and I want to know how important it is to have strong understanding of core subjects such as algorithm, image processing, cryptography in order to be a great developer. These course are offered for free on coursera.org. Would these be beneficial if my goal is to master the mobile application development.
I have worked on small projects at this point which doesn't require the use of complex algorithms, or any other core subjects. At this point I am little confused, whether I should join the coursera.org online courses to broaden my perspective or I should focus more on objective-c/iosSDK and java/androidSdk to improve my programming skills. </p>
|
android iphone
|
[4, 8]
|
4,325,596 | 4,325,597 |
find element at an absolute position
|
<p>How would you use jquery to get the element at a particular x, y coordinate? You can .offset and .position to find absolute and relative position using jquery. </p>
|
javascript jquery
|
[3, 5]
|
3,512,997 | 3,512,998 |
use POST data in jquery callback
|
<p>the code below is a jquery POST request javascript.
i want to use the data I am posting in the callback function. if u take a look, </p>
<pre><code>$('#fb_user_msg').innerHTML = data.comment;
</code></pre>
<p>the above line is trying to include the comment in the html (unsuccessfully). i am sure this is easy but I dont know why I am not getting it right.</p>
<pre><code>$("#submit_js").click(function() {
$.post(
"user_submit.php",
{comment: $("#comment").val(), aid: imgnum},
function(data){
/*alert(data);*/
//$('#greetings').html('Your choice was submitted successfully. Thank You for voting.');
$('#confirm_msg').addClass("on");
$('#care_parent').addClass("off");
$('#fb_user_msg').innerHTML = data.comment;
}
);
});
</code></pre>
<p>please help??</p>
|
javascript jquery
|
[3, 5]
|
2,540,815 | 2,540,816 |
javascript code for comparing 2 dates
|
<p>how to compare 2 dates using java script code in custom validator C# and print the message in a label if the from date is greater than to date</p>
|
c# javascript
|
[0, 3]
|
2,512,024 | 2,512,025 |
Simple way to send e-mail using javascript
|
<p>I wanted to know how to <strong>send e-mail using javascript.</strong>
I dont want to use long functions with tag n all other stuff. Interested in only one/two liner statement which will allow me to send mail.</p>
<p>I have used something like that earlier :</p>
<pre><code>function sendmail(_frm)
{
var eml="[email protected]";
var bod="&body="+_frm.selOne.value+" ¦¦ "+_frm.txtOne.value;
var subj="?subject=Whatever you want";
location.href="mailto:"+eml+subj+bod;
}
At Form tag
<form action="mailto:[email protected]"
enctype="text/plain"
method="POST" onsubmit="sendmail(this);return false;">
</code></pre>
<p>I dont want to use above approach to send mail...</p>
<p>Please provide me your suggestion so that i can send mail very easily by using javascript , like below.
e.g.</p>
<pre><code>function sendmail () {
location.href="mailto:<other stuff>"
}
</code></pre>
<p>Is anyone has any idea about this, please share their ideas here.</p>
<p>Thanks a lot....</p>
|
javascript jquery
|
[3, 5]
|
5,021,941 | 5,021,942 |
jQuery not loading on Master Page when the Content Page is in a child folder
|
<p>I have a site where I am trying to implement a jQuery UI based MessageBox in my master page. Content pages are arranged accoring to business area folders, i.e. '~/Branding/Contracts.aspx'. I find that when I load such a content page, jQuery, which is referenced in the master page as below, does not load. I assume that this is because the browser is requesting 'Branding/Scripts/jQuery '. What can I do about this? I don't have the 'root' operator in a plain 'script' tag.</p>
<pre><code><script src="/Scripts/jquery-1.3.2.js" type="text/javascript"></script>
<script src="Scripts/jquery-1.3.2.js" type="text/javascript"></script>
<script src="Scripts/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script>
</code></pre>
|
asp.net jquery
|
[9, 5]
|
2,168,905 | 2,168,906 |
jquery binding to select changes
|
<p>I have a hidden select which should be automatically selected via a visible select, my jquery is:</p>
<pre><code>$(document).ready(function() {
var selected_val = $('#id_foo option:selected').val();
$('#id_bar').val(selected_val);
$("#id_foo").change(function() {
selected_val = $(this).attr('value');
$('#id_bar').val(selected_val);
});
});
</code></pre>
<p>This works fine, but the page I am working on has the option to add a value to the (visible) select on the fly. How do I bind to this event and add this to the hidden list before updating the selected value?</p>
|
javascript jquery
|
[3, 5]
|
3,618,184 | 3,618,185 |
How to call a javascript function after a fixed time delay from a fixed time considering page refresh
|
<p>I have a use case in which a function needs to be called after 30 minutes from a fixed time. Say the fixed time is 16:30:48 and the function needs to be called after 30 minutes from 16:30:48. User might refresh the page but this should not affect the timing of calling the javascript function. The function should be called at 17:00:48 no matter how many page refreshes the user makes. </p>
<p>Is there a method in javascript that takes the time or Date in a function and execute the function at that time.</p>
<p>Is there a way in javascript to achieve that?</p>
<p>Thanks.</p>
|
javascript jquery
|
[3, 5]
|
2,996,327 | 2,996,328 |
javascript vs. php : pros and cons for code development
|
<p>If a user refreshes a page I need to send the data using php as it accesses a mysql table.</p>
<p>If the user adds content, I don't want to run an AJAX call "first" as I can simply and immediately update the DOM, and then send a one-way ajax call to store it in the mysql table.</p>
<p>So on a referesh I have PHP creating my XHTML and sending it to the Browser.</p>
<p>On user input, I have the DOM update immediately followed by ajax call to put it in the mysql table.</p>
<p>Thing is I have to write code in JS and PHP for each user action that modifies the page.</p>
<p>Should I have the data sent to the Javascript for entry into the DOM and not do less with it in the PHP. What are the tradeoffs from taking user input and converting it to the UI with javascript vs. php?</p>
<p>Should I offload as much as possible to the client to reduce server load?</p>
|
php javascript
|
[2, 3]
|
4,854,814 | 4,854,815 |
Unknown Language Random Code Generator
|
<p>I am trying to understand this code and I am not sure what language it is. It seems to be Java but I am not sure. I apologize if I am posting this incorrectly. I am volunteering and helping with a calendar and trying to find a random generator to work with basic. I am immediately trying to understand what this is doing.</p>
<pre><code>private static uint GetUint()
{
m_z = 36969 * (m_z & 65535) + (m_z >> 16);
m_w = 18000 * (m_w & 65535) + (m_w >> 16);
return (m_z << 16) + m_w;
}
public static double GetUniform()
{
// 0 <= u < 2^32
uint u = GetUint();
// The magic number below is 1/(2^32 + 2).
// The result is strictly between 0 and 1.
return (u + 1.0) * 2.328306435454494e-10;
}
</code></pre>
|
c# java c++
|
[0, 1, 6]
|
5,328,250 | 5,328,251 |
get_File_contents
|
<p>I have a php file that use this function like this :</p>
<ul>
<li>file_get_contents("somewhere/XMLRPC", false, $context);</li>
</ul>
<p>I am going to re write this request in JAVA, but the problem is that I don't know what exactly should I send to my server.
I will appreciate if you could guide me how can I print this request in some way?</p>
|
java php
|
[1, 2]
|
3,234,854 | 3,234,855 |
iPhone server interaction
|
<p>What is the best way to pass data to an iPhone from a server through http? CSV, XML, JSON, ... ?</p>
<p>a) I am required to pass three alpha-numeric (40 char max) strings</p>
<p>b) I am required to pass a key-value pair array</p>
|
php iphone
|
[2, 8]
|
2,418,433 | 2,418,434 |
Uploading multiple files with size restriction in Javascript
|
<p>Can anybody tell me how i can upload multiple files with size restriction in javascript.</p>
|
javascript python
|
[3, 7]
|
5,433,096 | 5,433,097 |
remove unbind attribute in jquery
|
<p>I disabled the click event of image using unbind method. But i dont know how to recover the click event again.
Here is the code,</p>
<p><code><img src="testimg.jpg" id="sub_form"></code></p>
<p>disabled the click event of above image using the code </p>
<pre><code>$('#sub_form').unbind('click');
</code></pre>
<p>How do i recover the click event? I tried with the bind event </p>
<pre><code> $('#sub_form').bind('click');
</code></pre>
<p>but it wont work. </p>
<p>Here, why im going for click event of image is ajax form submission. The code is,</p>
<pre><code>$("#sub_form").click(function() {
var input_data = $('#testform').serialize();
$.ajax({
//my code
});
});
</code></pre>
<p>how can i achieve this after unbind of image is performed. Please do the needful</p>
|
javascript jquery
|
[3, 5]
|
876,410 | 876,411 |
jquery animated menu: how to get active state
|
<p>please can you help a jquery beginner out? I don't really know how to go ahead...</p>
<p>I did a jquery animated menu: <a href="http://bern09.ch/j04_test" rel="nofollow">look at this</a>. the content loads with ajax, so there's not really a page load.</p>
<p>now i have to do the active item part. to give a clicked item a class "on", I did this:</p>
<pre><code>$navig.click(function() {
$(this).addClass("on");
$navig.not(this).removeClass("on");
})
</code></pre>
<p>the item with class "on" has to:</p>
<ul>
<li>animate to active state (similar to the mouseover state), and keep this</li>
<li>other items has to animate back to the normal state (when class "on" is removed)</li>
<li>if you click on a sub item, the parent item has to animate to active state</li>
</ul>
<p>any ideas how to solve it?</p>
|
javascript jquery
|
[3, 5]
|
2,287,135 | 2,287,136 |
Any good alternative for ASP.NET validation controls?
|
<p>Is there easy to integrate ASP.NET with jQuery form validation plugin or any other JS framework to replace standard ASP.NET client validation ?</p>
|
asp.net javascript jquery
|
[9, 3, 5]
|
3,842,609 | 3,842,610 |
jquery - scope of function passed to $().grep
|
<p>It seems that "myFunction" in the following example loses its scope. </p>
<pre><code>$().grep(myArray, myFunction)
</code></pre>
<p>By this, I mean that it no longer has access to the "this" of the scope it was defined in, and "this" becomes the window object. Can anyone explain why this is and if there's a handy way to preserve myFunction's scope? This javascript closure stuff halfway does my head in, but I'm trying to get facile with it.</p>
|
javascript jquery
|
[3, 5]
|
1,592,211 | 1,592,212 |
Get parent class property
|
<p>I have a javascript class that has a method that uses jQuery to send an Ajax request and handle the response.</p>
<p>The problem I am having is that I can't figure out how to get the properties of the initial, parent class from within the jQuery functions. I have tried <code>$(this).parent()</code> but this doesn't get what I need for some reason.</p>
<p>My code is below. Can anyone tell me how to get to the base class from this loop?</p>
<pre><code>function companiesPage()
{
this.childCategoriesSelectid = '#childCategoryid';
this.setChildCategories = function()
{
$.ajax({
url: this.url,
dataType: 'json',
success: function(data)
{
$.each(data.childCategories, function()
{
$($(this).parent().childCategoriesSelectid)//problem here
.append(
$('<option></option>')
.attr('value', this.childCategoryid)
.text(this.name)
);
});
}
});
}
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,994,602 | 1,994,603 |
Using createElement('img') to get .jpeg instead of .png
|
<p>I would like to use createElement("img') to create .jpeg extension instead of .png </p>
<p><a href="http://books.google.ca/books?id=4RChxt67lvwC&lpg=PA685&ots=tgW8zlOSt7&dq=createelement%20javascript%20img%20jpg%20definitive%20guide&pg=PA866#v=onepage&q=png&f=false" rel="nofollow">According to Flanagan's book JavaScript: The Definitive Guide: Activate Your Web Pages By David Flanagan,</a> </p>
<blockquote>
<p>For jpeg image type, the second argument should be a number between 0
and 1 specifying the image quality level.</p>
</blockquote>
<p>I am not sure what the syntax for the code would be.</p>
<p>Is it something like this?</p>
<pre><code>createElement("img",1)
</code></pre>
|
javascript jquery
|
[3, 5]
|
2,581,428 | 2,581,429 |
.xls file generated from php-excel not opening on iphones and android phones
|
<p>I have used the php-excel plugin(<a href="http://code.google.com/p/php-excel/" rel="nofollow">http://code.google.com/p/php-excel/</a>) to generate a .xls
file from mysql database table using php and it opens fine on PC but it doesn't open on
andriod phones,iphones,ipad with the message that unable to open the document.</p>
<p>Please help me rectify the problem.</p>
|
php android iphone
|
[2, 4, 8]
|
491,953 | 491,954 |
Why can't I hide inherited events the same way I can hide properties?
|
<p>I've got a usercontrol which inherits from the UserControl class. There are a bunch of items I want to hide from anyone who uses the class.</p>
<p>I can hide properties just fine...</p>
<pre><code>public partial class userControls_MyControl : System.Web.UI.UserControl {
private new bool EnableTheming {get; set;}
}
</code></pre>
<p>This effectively removes it from being displayed in the editor's IntelliSense.</p>
<p>However, when I try the same thing with events, they still show up...</p>
<pre><code>public partial class userControls_MyControl : System.Web.UI.UserControl {
private new EventHandler AbortTransaction { get; set; }
private new EventHandler OnAbortTransaction {get;set;}
}
</code></pre>
<p>Is there any way to really hide an event? Why isn't the above working?</p>
<p>Thanks in advance.</p>
|
c# asp.net
|
[0, 9]
|
4,055,557 | 4,055,558 |
URL Rewriting in Response Filter
|
<p>We are attempting to rewrite some URLs in our response for an outside proxy server. We noticed that the response is being broken up as it goes through the response filter. We then use regular expressions to locate the URLs and rewrite them. The issue we ran into is that the way that it is broken up (not exactly sure how it gets segmented), we had one URL that was being cut in half between the chunks, and so our regular expression didn't pick it up in either chunk and it was not rewritten.</p>
<p>Ex.</p>
<p>End of Chunk1</p>
<pre><code>"...<body><a href="http://myserver.local/">
</code></pre>
<p>Start of Chunk2</p>
<pre><code>"path/file.aspx">Some link</a>..."
</code></pre>
<p>So our regular expression doesn't pick up the link as a valid URL. We tried pooling our response into a StringBuilder to make sure we have the whole response before we attempt to rewrite the URLs, but that is resulting in the viewstate being corrupted. Any ideas?</p>
|
c# asp.net
|
[0, 9]
|
4,333,197 | 4,333,198 |
jQuery to database - registration form with validation
|
<p>I find this tutorial in 9lessons.com : <a href="http://www.9lessons.info/2011/01/gravity-registration-form-with-jquery.html" rel="nofollow">http://www.9lessons.info/2011/01/gravity-registration-form-with-jquery.html</a></p>
<p>It's about a registration form with validation.</p>
<p><img src="http://i.stack.imgur.com/FAaXS.gif" alt="enter image description here"></p>
<p>I want to send data to DB.</p>
<pre><code>// Submit button action
$('#submit').click(function()
{
var email=$("#email").val();
var username=$("#username").val();
var password=$("#password").val();
if(ck_email.test(email) && ck_username.test(username) && ck_password.test(password) )
{
$("#form").show().html("<h1>Thank you!</h1>");
///// if OK
///// Show thanks
//// else
//// Error, try again
}
return false;
});
</code></pre>
<p>How can I do ?? I searched in internet in jQuery tutorial and I find much codes ... </p>
|
php javascript jquery
|
[2, 3, 5]
|
1,288,745 | 1,288,746 |
How do I use jQuery this and class to affect a div when the user clicks outside the div
|
<p>How do I use jQuery this and class to affect a div when the user clicks outside the div</p>
<p>I have a search that I built that works. I'm stuggling with getting the results to erase the results Only when the user clicks outside of the results or the search box. The following works with the exception that it wipes out the results even if I click IN the search box or the results div. (I imagine that the issue is related to "this" reference in the if statement.)</p>
<pre><code>$('#searchbox').keyup(function(){
$.post("remote.php",{'func':'contactsearch','partial':this.value},function(data){
$("#results").html(data);
// erase the results when user clicks outside the search
$('body').click(function(){
if (!$(this).hasClass('nd_search')) { // erases results even when clicked inside result - why?
$("#results").html('');
$('body').unbind('click'); // remove event handler. add again when results shown.
}
});
});
});
});
<div class="nd_search">
<input id="searchbox" type="text" class="nd_search"/>
<div id="results" class="nd_search"></div>
</div>
</code></pre>
<p>I also tried:</p>
<pre><code> $('body').click(function(event){
if (!$(event.target).hasClass('nd_search')) { ...
</code></pre>
<p>Secondarily, I would rather have the class on only the containing div. How would I change the if statement? </p>
<p>I looked at the other posts about this subject, which got me this far. I'm almost there</p>
<p>Thanks</p>
|
javascript jquery
|
[3, 5]
|
5,987,170 | 5,987,171 |
what's type for data in success: function(data)?
|
<p>Here $fruit is encoded by js_encode() and send back to data in ajax. My questions is what datatype of data is(string or array)?
Thanks in advance!</p>
<pre><code>$.ajax({
type:"post",
dataType:"json",
url:"phpFile.php",
success: function(data) {
}
});
<?php
$fruits = array(array("1","apple"),array("2","pear"));
echo js_encode($fruits);
?>
</code></pre>
|
php jquery
|
[2, 5]
|
2,101,845 | 2,101,846 |
using a selection box to change font with jquery
|
<p>I have 3 text input boxes that i want to allow a user to change the font of, but im not sure how to do this.</p>
<p>This is the code for my preview boxes:</p>
<pre><code><script type="text/javascript">
$(function()
{
$(".line1").keyup(function()
{
var word=$(this).val();
$(".line_preview1").html(word);
return false;
});
$(".line2").keyup(function()
{
var word=$(this).val();
$(".line_preview2").html(word);
return false;
});
$(".line3").keyup(function()
{
var word=$(this).val();
$(".line_preview3").html(word);
return false;
});
});
</script>
<span class="line_preview1"></span>
<span class="line_preview2"></span>
<span class="line_preview3"></span>
<input type="text" name="line1" class="line1" />
<input type="text" name="line2" class="line2" />
<input type="text" name="line3" class="line3" />
</code></pre>
<p>If i could choose the font for each line that would be great</p>
<p><strong>edit for context</strong></p>
<p>i would like to have;</p>
<pre><code><select name=font>
<option>Arial</option>
<option>Verdana</option>
<option>Times New Fubar</option>
</select>
</code></pre>
<p>when a new option is chosen, it would update the css of the specific preview element</p>
|
javascript jquery
|
[3, 5]
|
5,873,194 | 5,873,195 |
What is the problem on this jquery form that checks for number of chars in a textarea?
|
<p>this is a code that enables the submit button if there are more than 100 chars in the textarea. However I can't get it work. Maybe the jquery version is wrong? I don't know.</p>
<pre><code><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<form>
<textarea id="textareaId"></textarea>
<input type="submit" id="submitId" disabled="disabled" />
</form>
<script type="text/javascript">
setInterval(function () {
if(("#textareaId").val().length > 100) {
$("#submitId").removeAttr("disabled");
} else {
$("#submitId").attr("disabled", "disabled");
}
}, 500); //Runs every 0.5s
</script>
</code></pre>
|
javascript jquery
|
[3, 5]
|
677,776 | 677,777 |
reverse the order of the linked list
|
<p>i have a linkedlist, which add an object like a tree, the following is the printout
LinkedList nodeList = new LinkedList();</p>
<p>(result A)</p>
<pre><code>1 : Tester Meeting
2 : Adminstrative & Operational
3 : Functional Committees
4 : Aduit Committee
9 : Supporting Services Development
8 : Medical Services Development
7 : Information Technology Services
6 : Human Resources Committee
15 : test2-2
14 : test2
13 : test1-1
12 : test1
5 : Finance Committee
10 : Regional Advisory Committees
11 : Board Workshop
</code></pre>
<p>(result B)The following should be the right order</p>
<pre><code>Tester Meeting
Adminstrative & Operational
Functional Committees
Aduit Committee
Finance Committee
test1
test1-1
test2
test2-2
Human Resources Committee
Information Technology Services
Medical Services Development
Supporting Services Development
Regional Advisory Committees
Board Workshop
</code></pre>
<p>So, i want to reverse the order of sub-node of Audit Committee of (ResultA) output the result of same as the ResultB, is there any method to sort the specific node of linked list?</p>
|
c# asp.net
|
[0, 9]
|
2,812,530 | 2,812,531 |
pass a variable from js to jquery
|
<p>wondering how I can pass a variable from load js like:</p>
<pre><code><script type="text/javascript" src="script.js?myVar=myValue"></script>
</code></pre>
<p>and use and pass to script.js itself?
I Know about declare variable before, but I'm looking for url way.</p>
<p>Thanks in advance.</p>
|
javascript jquery
|
[3, 5]
|
4,797,420 | 4,797,421 |
Find pixel value for line height when it's "normal" in Chrome
|
<p>I have a textarea whose line-height is set to "normal". However, I can still get the actual pixel value in FireFox:</p>
<pre><code>// firefox
>>> $("#post_body").css('line-height')
"19.1167px"
</code></pre>
<p>Whereas I cannot in Chrome:</p>
<pre><code>// chrome
>>> $("#post_body").css('line-height')
"normal"
</code></pre>
<p>How can I get the actual pixel line height in Chrome?</p>
|
javascript jquery
|
[3, 5]
|
2,633,931 | 2,633,932 |
jquery quantity 1 or more
|
<p>I have some jquery:</p>
<pre><code>if($('div.ProductNameText').text()=='Product1')
{
$("#kitProduct #Quantity").attr("value", "1");
}
</code></pre>
<p>But i want it so that if it finds Product1 then it allows the customer to enter more than 1.</p>
<p>I am overriding the previous jquery which sets it to 25 because that checks if its a kit product.</p>
<p>Here is the kit product code:</p>
<pre><code>function KitOptionsChanged() {
// Get total of selected index... if this is above 0 at least 1 dropdown option has been changed
var totals = 0;
for (var i = 0; i < $('select.selitemoption').length; i++) {
totals += $("select.selitemoption").eq(i).attr("selectedIndex");
}
if (totals == 0) {
// No dropdowns changed from defaults - check textbox
if ($("#kitProduct #KitFormOptions textarea").val() == "") {
// Min value doesn't need to be 25... do i need to anything here?
} else {
//Check current
if (parseInt($("#kitProduct #Quantity").val()) < 25) {
// If it is less than 25 then set it to 25
$("#kitProduct #Quantity").attr("value", "25");
}
if($('div.ProductNameText').text()=='This is product ABC'){
$("#kitProduct #Quantity").attr("value", "1");
}
}
}
else {
// At least 1 index has been changed... set min total to 25.
if (parseInt($("#kitProduct #Quantity").val()) < 25) {
$("#kitProduct #Quantity").attr("value", "25");
}
}
}
</code></pre>
<p>EDIT:added the quantity box html:</p>
<pre><code><input type="text" maxlength="4" size="3" onkeyup="if(typeof(getShipping) == 'function'){getShipping()}" onchange="if(typeof(getShipping) == 'function'){getShipping()}" id="Quantity" name="Quantity" value="1">
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,054,665 | 3,054,666 |
How to get information about events from Google calendar on Java, Android?
|
<p>I need get information about events from calendar of my Android device, but I don't know how to do it. Give me an example please or give me a advice. </p>
|
java android
|
[1, 4]
|
4,872,138 | 4,872,139 |
Rating to other application user's in android
|
<p>i am implementing rating bar in my android application. i want to add rating functionality just like an in android market applications have so that they are rated differently by different users. i just want to implement this functionality in my app but in my app one user can rate other user. how can i implement this into my app? please guide me... </p>
<p>Regards and thanks in advanced...</p>
|
java android
|
[1, 4]
|
4,267,744 | 4,267,745 |
Calling loadUrl several times and waiting until all calls finish
|
<p>I have the following code:</p>
<pre><code>browser.loadUrl("javascript:(function() { getData();})()");
browser.loadUrl("javascript:(function() { showData();})()");
browser.loadUrl("javascript:(function() { putData();})()");
</code></pre>
<p>How to wait until all loadUrl calls finish loading in Android
when calling two or more WebView loadUrl methods one by one?</p>
|
java javascript android
|
[1, 3, 4]
|
5,348,028 | 5,348,029 |
How to use a php code in javascript
|
<p>I want to use php code in javascrip ,but it dosn't work:</p>
<pre><code> <script type="text/javascript">
function edit(pollNo)
{
<?php
$result = mysql_query( 'CALL ret_poll('.pollNo.')' );
$row = mysql_fetch_assoc($result);
echo 'document.poll.pollTitle.value='.$row['title'];
?>
}
</script>
</code></pre>
|
php javascript
|
[2, 3]
|
4,945,445 | 4,945,446 |
What is invalid region in Android?
|
<p>Under "How Android Draws Views" topic, there is such a sentence :</p>
<blockquote>
<p>Drawing begins with the root node of
the layout. It is requested to measure
and draw the layout tree. Drawing is
handled by walking the tree and
rendering each View that intersects
the <strong>invalid region</strong>.</p>
</blockquote>
<p>And I didn't quite understand the term "invalid region".</p>
<p>Here is the <a href="http://developer.android.com/guide/topics/ui/how-android-draws.html" rel="nofollow">source article of the quotation</a>.</p>
<p>Can someone elaborate it?</p>
<p>Thanks.</p>
|
java android
|
[1, 4]
|
5,383,727 | 5,383,728 |
convert bitmap to image c#
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1606784/convert-bitmap-to-image-c">convert bitmap to image c#</a> </p>
</blockquote>
<p>I want to convert a bitmap to an image object and display it .
This is my code:</p>
<pre><code>//using System.Drawing;
Image objImage = Image.FromFile(Server.MapPath("large.jpg"));//From File
int height = objImage.Height;//Actual image width
int width = objImage.Width;//Actual image height
Bitmap bitmapimage = new Bitmap(objImage, width, height);// create bitmap with same size of Actual image
Graphics g = Graphics.FromImage(bitmapimage);
Image bitmap2 = (Image)Bitmap.FromFile(Server.MapPath("logo.png"));
g.DrawImage(bitmap2, (objImage.Width-bitmap2.Width) / 2,( objImage.Height-bitmap2.Height )/ 2);
Response.ContentType = "image/jpeg";
bitmapimage.Save(Response.OutputStream, ImageFormat.Jpeg);
</code></pre>
<p>How can I convert the bitmap image into an image object?
Thank you,
Alina</p>
|
c# asp.net
|
[0, 9]
|
4,496,680 | 4,496,681 |
Count the number of <div>
|
<p>Is it possible using jQuery to count the number of div elements?</p>
<p>I have this code:</p>
<pre><code><div id = "center">
<div class ="name">text text</div>
<div class ="name">text text text ... </div>
<div class ="name">text ...</div>
</div>
</code></pre>
<p>And get number: 3</p>
|
javascript jquery
|
[3, 5]
|
174,719 | 174,720 |
create visitor unique ID?
|
<p>I plan to create visitor unique ID and named as log file, as existing now I use the IP visitor as log file name i.e. logs/127.0.0.1.php but I think this is not <strong>enough</strong> because some visitor using share an IP address for PC's.</p>
<p>The visitor log file itself as setting place of configuration of visitors itself, so I plan to add another unique ID to identify each different visitor so let's say the log file:
logs/127.0.0.0.1-t3451dq.php, -t3451dq as unique ID
so as long as visitor browsing on my website the unique log file as setting configuration for each user (because I use plain text)</p>
<p>Currently I use:</p>
<pre><code><?
$filename = "./logs/".$_SERVER['REMOTE_ADDR'].".php" ; //out put logs/127.0.0.1.php
$data stripcslashes($data);
// each Visitor configuration here...
// bla...bla...
/* Writing file configurations */
$buat = fopen($filename, "w+");
fwrite($buat, "$data");
fclose($buat);
?>
</code></pre>
<p>so I need $filename add the $unique ID as name of their log file. Any ideas how to do that?</p>
|
php javascript
|
[2, 3]
|
995,532 | 995,533 |
jQuery bubble like the one on stackoverflow?
|
<p>I like the orange bubbles that appears on SO as a warning: Is there a jQuery plugin for that? </p>
|
javascript jquery
|
[3, 5]
|
4,214,745 | 4,214,746 |
Checking jQuery event types
|
<p>Let's say, jQuery has <code>scroll</code> event type. Is there a chance to determine whether it's assigned an event handler?</p>
|
javascript jquery
|
[3, 5]
|
699,061 | 699,062 |
Login and authentication via C# and ASP.NET
|
<p>I was just wondering what were the best ways to write login and authentication in ASP.NET. To my knowledge, ways to authenticate are via:</p>
<ul>
<li>implementation of the ASP.NET Permissions Provider against SQL Server</li>
<li>Writing your own function, starting a session for the user at login and clearing the session at logout.</li>
</ul>
<p>Any other ideas?</p>
<p>Thanks.</p>
|
c# asp.net
|
[0, 9]
|
3,141,159 | 3,141,160 |
jQuery effect - What is the name?
|
<p>There use to be a jQuery effect that when you initlized it.. the DIV/CLASS would slide up and fade away at the same time. I know it's not puff... but it was something. I remember becuase I found out about it after doing slide/fade when I was like.. oh I could have done this instead.</p>
<p>But I can't find it on jQuery UI website anymore... help?</p>
<p>I tried searching Google and especially jQuery API: <a href="http://api.jquery.com" rel="nofollow">http://api.jquery.com</a></p>
|
javascript jquery
|
[3, 5]
|
1,808,871 | 1,808,872 |
How to concatenate string and javascript variable inside jquery selector
|
<p>How do I concatenate a string with a javascript variable inside a jquery selector?
If I execute the code below. All the other form elements gets hidden.</p>
<pre><code>var inputatr = $('input[type=text]').attr(); //button
$('input[value=string ' + inputatr +']').hide(); //textbox
</code></pre>
<p><strong>Update</strong></p>
<pre><code><?php for($x=0; $x<4; $x++){ ?>
<input type="text" id="<?php echo $x; ?>" name="<?php echo $x; ?>" value="text<?php echo $x; ?>"/>
<input type="button" name="show<?php echo $x; ?>" value="string<?php echo $x; ?>"/></li>
<?php } ?>
</code></pre>
|
javascript jquery
|
[3, 5]
|
767,058 | 767,059 |
Reuse variable instead of new DOM search
|
<p>I am trying to use the menuBar object I've defined before to do a manipulation on objects within. </p>
<pre><code>var menuBar = $(".menu-bar ul");
var menuActive = menuBar.find("li.active");
menuBar.hover(function(){
menuActive.toggleClass("active");
});
$('.menu-bar ul > li > a[href="'+ window.location.href +'"]').parent().addClass("active");
</code></pre>
<p>What I do not like is to call the DOM search once more to define the active class for link parent. </p>
<p>Any thoughts on how to do it with menuBar variable? </p>
|
javascript jquery
|
[3, 5]
|
5,550,113 | 5,550,114 |
jQuery .inArray If/Else Always Returning -1
|
<p>I have a function that I'm trying to check if a value exists already. However even though values exist it's still returning -1. I'm trying to get my if/else statement working that if an item exists it "alerts" and if doesn't it runs the function addItem();</p>
<pre><code>$(".detail-view button").on("click", function () {
itemExists();
function itemExists() {
var detailID = $(this).attr('id');
var itemArr = [];
$("input#lunchorder_item_entry_id").each(function (index) {
var lunchItemID = $(this).val();
itemArr.push(lunchItemID);
});
addItem();
alert(jQuery.inArray(detailID, itemArr));
/*
if (jQuery.inArray(detailID, itemArr)) {
alert("You have already added this item. If you want to change item details, please remove the item and re-add it to your cart. Thank You!");
} else {
// the element is not in the array
addItem();
} */
console.log(itemArr);
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,106,681 | 5,106,682 |
Remember Me Username and Password
|
<p>Please, help me using the PHP mySQL Remember Me functionality. I am a beginner in PHP</p>
<p>and my code is so :</p>
<pre><code><form method="post" action="login-exec.php">
<table width="400" border="0" align="center" cellpadding="5" cellspacing="0">
<tr>
<td width="150">Username</td>
<td width="250"><input name="username" type="text" class="textfield" /></td>
</tr>
<tr>
<td>Password</td>
<td><input name="password" type="password" class="textfield" /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input name="remember" type="checkbox" value=""> Remember me</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" name="login" value="Login" /></td>
</tr>
</table>
</form>
</code></pre>
<p>Thanks in advance...</p>
|
php javascript jquery
|
[2, 3, 5]
|
497,505 | 497,506 |
Access list box items added on client side
|
<ol>
<li>I have a listbox with runat=server</li>
<li>Items are added to this listbox on the client side, using javascript</li>
<li>I would want to retrieve the items on the server side on the click of a button</li>
</ol>
<p>The problem is in the Buttons's server side click handler, I cannot see the new items added to the listbox. Only the items that were there on page_load are displayed. How do i accomplish what i want to do</p>
<h1>Edit 1</h1>
<p>My Code Is like this</p>
<pre><code> protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (ViewState["gameID"] == null)
{
//Populate Listbox
//Set gameid in viewstate
}
//Add javascript handlers to buttons
btnSomeButton.Attributes.Add("onclick", "aJavaScriptFunction");
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
ListItemCollection x = ListBoxRanks.Items;
//Here items is has just those items that are added to the listbox on page load
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
964,642 | 964,643 |
App just for launching an activity
|
<p>I'm trying to add a shortcut to launch Sound Recorder on App Drawer (not home screen)</p>
<p>So the app should be empty and the only work it has to do is launch Sound Recorder
com.android.soundrecorder/com.android.soundrecorder.SoundRecorder</p>
<p>How can I do that?</p>
<p>I get Force Stop with this:</p>
<p>`</p>
<pre><code><uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="15" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".Recorder"
android:label="@string/title_activity_recorder" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</code></pre>
<p>`</p>
<p>and the java file</p>
<pre><code>`package recorder.audio.dsaif;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
public class Recorder extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent LaunchIntent = getPackageManager().getLaunchIntentForPackage("com.android.soundrecorder.SoundRecorder");
startActivity(LaunchIntent);
setContentView(R.layout.activity_recorder);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_recorder, menu);
return true;
}
}`
</code></pre>
|
java android
|
[1, 4]
|
3,426,371 | 3,426,372 |
How can a simple server load measurement be taken with server side only
|
<p>I am looking for/would like to write a simple load testing script in C# for my server. I would particularly like to measure cpu and memory load (i.e. how little of each are free); I am not concerned about band width.</p>
<p>I guess there methods involving loops and timers but I don't know how Windows Server works - even though it is heavily loaded, the speed at which scripts are run may be unchanged.</p>
<p>I would prefer to keep the bench-marking server side if possible.</p>
<p>I would be very interested to hear from people who have done something similar or who have ideas.</p>
<p>Thanks in advance!</p>
<p>Note: The precision of the reading of cpu and memory load could be as little as red, yellow or green (a traffic light) if that is all that can be done on the server alone.</p>
|
c# asp.net
|
[0, 9]
|
1,391,397 | 1,391,398 |
Opacity based on scroll position
|
<p>The following code, will make the "Go to top" button fade in when the scrollTop() is over 400px, that works fine, but i haven't found a way to make it fade out when i go back to the top.</p>
<pre><code>$("#gototop").css("opacity", "0");
$(window).bind('scroll', function(){
if($(this).scrollTop() > 400) {
$("#gototop").animate({
opacity: 100,
}, 3400);
}
});
</code></pre>
<p>An <strong>else</strong> after the <strong>if</strong> didn't help, i tried different options with my non-ninja skills but none worked. Any ideas on how to make it fade out when the scroll is back at the top?</p>
<p>Thanks.</p>
|
javascript jquery
|
[3, 5]
|
1,335,593 | 1,335,594 |
Use jquery inside or outside document ready
|
<p>Below two scenario give me the same behavior. But What is the difference technically? (I put the below code in the last section of script tags in the body.)</p>
<pre><code>$(document).ready(function() {
$('.collapse').collapse({toggle: false});
$(document).on('click', '#expandAllLessons', function() {
$('div.accordion-body').collapse('show');
});
$(document).on('click', '#collapseAllLessons', function() {
$('div.accordion-body.collapse').collapse('hide');
});
});
</code></pre>
<p>or</p>
<pre><code>$(document).ready(function() {
$('.collapse').collapse({toggle: false});
});
$(document).on('click', '#expandAllLessons', function() {
$('div.accordion-body').collapse('show');
});
$(document).on('click', '#collapseAllLessons', function() {
$('div.accordion-body.collapse').collapse('hide');
});
</code></pre>
<p>Thanks.</p>
|
javascript jquery
|
[3, 5]
|
1,920,241 | 1,920,242 |
changing background image with a for loop
|
<p>i have a table with 3 cells the middel 1 in a black image so it will look like there is a line in the middle of the screen.
now in the other cell i want to show pictures, so i tryed to do a loop that changing the images every second with by hiding the cells and then show them.</p>
<p>the script:</p>
<pre><code>$(window).ready(function () {
//the images sits in a div with a hidden property.
var AlumniumPictures = $("#AlumnimPictureHolder").children();
var ShipozimPictures = $("#ShipozimPictureHolder").children();
//var timer = $.timer(yourfunction, 10000);
for (var i = 0; i < 10; i++) {
$(".almoniyomButtonTD").css({
"background-image": "url(" + $(AlumniumPictures[i]).attr('src') + ")"
});
$(".shipozimButtonTD").css({
"background-image": "url(" + $(ShipozimPictures[i]).attr('src') + ")"
});
$(".almoniyomButtonTD").hide();
$(".shipozimButtonTD").hide();
$(".almoniyomButtonTD").show(1100);
$(".shipozimButtonTD").show(1100);
//for some reson the code dosnt work if im not using the setInterval method.
document.setInterval(1000);
}
</code></pre>
<p>});</p>
<p>this is not working it only show me the first images and then stop.
is there a batter way to do this?
am im doing this right?</p>
|
javascript jquery
|
[3, 5]
|
3,125,307 | 3,125,308 |
What is the importance of Mobile middleware?
|
<p>I am developing one offline application for mobile(Android and IPhone).</p>
<p>I want to connect the application to one enterprise application running on Java Application server. I am using offline capabilities of the device. I want to get some master data from server and Synch back the transaction data to server end of the day.</p>
<p>I want to know which of the following method is better and effective, </p>
<p>I can connect directly to the existing sever using webservice ?
OR
I want to develop some middleware in between the enterprise server and mobile ?</p>
<p>Actually i want to know following things if i develop a middleware,</p>
<ol>
<li>Can we handle network traffic ?</li>
<li>If users increase then middleware helps me really ?</li>
</ol>
<p>If i connect directly to the existing enterprise server by webservice from N number of users, any major problem i will face ?</p>
<p>Thanks a lot.........</p>
|
android iphone
|
[4, 8]
|
3,939,656 | 3,939,657 |
adding html into a div without id
|
<p>i'm trying to add some html code with javascript and jQuery into a div without an id, but with a class</p>
<p>i'm trying to have it done like this, but without success...</p>
<p>flie.js :</p>
<pre><code>$(".myClassName").ready(function(){
$(this).innerHTML = "<img src=\"http://mywebsite.com/img.png\" /> <span>some text</span>";
});
</code></pre>
<p>i'm loading the .js file with this html code</p>
<p>.html file :</p>
<pre><code><div class="myClassName">
</div>
<script>
(function()
{
if (window['ImportFlag'] == undefined || window['ImportFlag'] == void 0) {
var myScript = document.createElement('script');
myScript.type = 'text/javascript';
myScript.src = 'file.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(myScript, s);}
window['ImportFlag'] = 1;
})();
</script>
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,283,155 | 5,283,156 |
Build divs JS functions included in JS or jQuery from ajax & php data
|
<p>If a user checks a form checkbox I want to create a new div. Dynamic data is loaded from ajax and php. I am asking how to create it with JS or jQuery. A simplified version will look something like</p>
<pre><code><div id="ajaxSRC1" class="CLASS">
<a href="javascript:void(0)" onmouseover="return myFunction('ajaxSRC5', 'ajaxSRC6')">
<img src="ajaxSRC2" width="ajaxSRC3" height="ajaxSRC4" alt="..." />
</a>
</div>
</code></pre>
|
javascript jquery
|
[3, 5]
|
48,155 | 48,156 |
JQuery: .LOAD, how to get next call to happen AFTER the .LOAD completes?
|
<p>JQuery: .LOAD, how to get next call to happen AFTER the .LOAD completes?</p>
<p>Basicly Im loading some information into a div which is dynamically adjusting the height of the DIV as it loads. </p>
<p>I then want to run a call to adjust the height of the DIV, but can only properly calculate after the load completes in full.</p>
<p>Thanks!</p>
|
php jquery
|
[2, 5]
|
1,548,409 | 1,548,410 |
How to check whether JavaScript is enabled in client browser using Java code
|
<p>can anyone help me in trying to check whether JavaScript is enabled in client browser using Java code.</p>
<p>Thanks in advance</p>
|
java javascript
|
[1, 3]
|
4,509,031 | 4,509,032 |
Does jQuery add a lag time to checking checkboxes?
|
<p>I have some jQuery code...</p>
<pre><code>$('<input/>').attr('type', 'checkbox').change(function() {
if(this.checked) {
grid.showCol(this.value);
} else {
grid.hideCol(this.value);
}
});
</code></pre>
<p>I notice that when I check/uncheck the checkbox, it takes a long time for the checkmark to appear or disappear. This makes me wonder, is the checkmark supposed to appear <strong>before</strong> or <strong>after</strong> the code in my change event finishes executing? If the checkmark is rendered after, it would make sense why it's taking so long. If not, well, why does it take so long?</p>
<p>If it matters, I'm using Chrome.</p>
<p><strong>Edit</strong></p>
<p>Okay, I found out that e.preventDefault() removes the lag time. But now I have another problem: I still experience this lag time when the label for my checkbox is clicked. How to get rid of this?</p>
|
javascript jquery
|
[3, 5]
|
980,215 | 980,216 |
java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first
|
<pre><code>Frame.gameController.test();
setContentView(Frame.world.getScreen());
Frame.world.setRunning(true);
</code></pre>
<p>its my android code, i am getting error in second line</p>
<p><strong>ERROR/AndroidRuntime(15229): Caused by: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.</strong></p>
<p>any help to solve it. Previously it was working just fine, the problem starts when i take it in another activity.</p>
<p>android 2.2 is platfrom </p>
|
java android
|
[1, 4]
|
2,469,441 | 2,469,442 |
Call Javascript script before page_load method in Master page
|
<p>I need to call a javascript script before the page_load method in the MasterPage.cs.</p>
<p>I need to do this because I want to recover a javascript variable that will be used in the page_Load method.</p>
<p>Someone know how to do?</p>
<p>Thank you,</p>
<p>Quentin</p>
|
c# javascript asp.net
|
[0, 3, 9]
|
3,375,726 | 3,375,727 |
How can I open a link in a new window?
|
<p>I have a click handler for a specific link, inside that I want to do something similar to the following:</p>
<pre><code>window.location = url
</code></pre>
<p>I need this to actually open the url in a new window though, how do I do this?</p>
|
javascript jquery
|
[3, 5]
|
3,799,748 | 3,799,749 |
Create SQL Server table at runtime using asp.net
|
<p>What I need to do is to create a table within my database at runtime to store some data then store it in another table and delete the current or Temp table. It is a security issue where I can not use session or caching in my application any help will be appreciated .</p>
|
c# asp.net
|
[0, 9]
|
5,539,839 | 5,539,840 |
copy contents of div to clipboard
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/400212/how-to-copy-to-clipboard-in-javascript">How to Copy to Clipboard in JavaScript?</a> </p>
</blockquote>
<p>Is there a way to copy the contents of a div into a clipboard using javascript/jquery without using an external plugin?</p>
|
javascript jquery
|
[3, 5]
|
6,014,178 | 6,014,179 |
capture outgoing packet sent by google chat in my application
|
<p>I am familiar in using xmpp library,for android i'm using asmack library.In Google chat also asmack is used.i can write an application to send/receive messages using xmpp.But now i want to track google chat messages in my application.what ever the user do in google chat the same sholud be happening in my application.Suppose that user logged in google chat,in my appication also he is logged in.Sent messages /Incomming messages also should be in sync.i m able to do every thing except synchronizing outgoing sms.How to capture the packet when user is send a message from google chat into my application. ?</p>
|
java android
|
[1, 4]
|
4,613,010 | 4,613,011 |
Configure asp.net Web Controls in external configuration file
|
<p>I've an asp.net web application accessed by different users with different roles.</p>
<p>Now I've to enable/disable and show/hide controls (label, textbox, buttons in grid, third party controls) based on a logic involves context variables and users role.</p>
<p>I want to avoid to write IF statements in <code>onLoad</code> method. </p>
<p>I tried to create an xml file like this:</p>
<pre><code><root>
<page name="page1" mode="insert">
<control id="txtName" property="Visible" value="True" />
</code></pre>
<p>then in a <code>basePage</code> class I tried to cycle all <code>Page.Controls</code> to set property with propertyInfo.</p>
<p>Problems starts when I have ascx inside ascx or gridview with command buttons to disable. </p>
<p>It is possible to configure those control's behaviors in an external configuration file?</p>
<p>Is there a framework allowing this? </p>
|
c# asp.net
|
[0, 9]
|
3,134,640 | 3,134,641 |
writing a code for chess board (8x8), except the verteces are nodes, and edges are connection between nodes.. i.e, 8x8 network
|
<p>I am trying to write a code for just the chess board (8x8), where each vertex is a node, and edges are connections between the nodes. Each node is connected with either 2, 3 or 4 nodes. </p>
<p>I am trying to write the code considering a node as an object. I am new to Graph theory implementation. Please help me out.</p>
<p><a href="http://postimage.org/image/720da4cw1/" rel="nofollow">http://postimage.org/image/720da4cw1/</a> I should me more clear earlier. Each circle represents a node. A square has nothing to do. Every node is connected to its adjacent nodes. </p>
|
java c++
|
[1, 6]
|
502,179 | 502,180 |
How can I know when a certain iframe gets removed from a page
|
<p>Let's say I have an iframe on a HTML page:</p>
<pre><code><iframe src="/script.php"></frame>
</code></pre>
<p>The iframe is inside a modal box window (I'm using a jQuery plugin for modal window: <a href="http://opensource.steffenhollstein.de/templates/modalbox/" rel="nofollow">http://opensource.steffenhollstein.de/templates/modalbox/</a>).</p>
<p>When the modal box gets closed, the iframe inside it is removed from the page's HTML with jQuery remove() method.</p>
<p>How can I notice that the iframe has been removed and execute some javascript code? Basically what I want is to refresh the page once the modal box is closed. This is the close method for the modal box plugin:</p>
<pre><code>jQuery.fn.modalBox.close = function(settings){
// merge the plugin defaults with custom options
settings = jQuery.extend({}, jQuery.fn.modalBox.defaults, settings);
if( settings.setFaderLayer && settings.setModalboxContainer ){
jQuery(settings.setFaderLayer).remove();
jQuery(settings.setModalboxContainer).remove();
jQuery("iframe.modalBoxIe6layerfix").remove();
}
};
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,417,342 | 3,417,343 |
ASP.NET: Stop code execution
|
<p>I have a ASP.NET website where a user gets large data from a DB by clicking a button, but some times the user want to cancel the job(these jobs can take a very long time) and their session will hang while doing this job.</p>
<p>Is there any way to stop the execution of code and clean the already collected data ?</p>
<p>Is the best solution to have a table with all the jobIDs where a bit will determine if the code can continue and let the user change this from a button/link.</p>
|
c# asp.net
|
[0, 9]
|
3,265,263 | 3,265,264 |
How to Convert a integer value to String
|
<p>I have a state drop down on my page and I am saving the ID to the DB column Now when reterving the values I need to retrive the corresponding state name .</p>
<p>Example:</p>
<p>My state is NY<br>
The value saved to DB is 33 </p>
<p>when i am pulling the value from the DB to the screen I need to print NY on my screen .</p>
<p>can some assist me on this please?</p>
|
c# asp.net
|
[0, 9]
|
88,549 | 88,550 |
c# Convert string into URL friendly
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/37809/how-do-i-generate-a-friendly-url-in-c">How do I generate a Friendly URL in C#?</a> </p>
</blockquote>
<p>By URL friendly I mean turning:</p>
<blockquote>
<p>Convert string to DateTime in c#</p>
</blockquote>
<p>into</p>
<blockquote>
<p>convert-string-to-datetime-in-c</p>
</blockquote>
<p>Thank's for any help!</p>
|
c# asp.net
|
[0, 9]
|
6,025,526 | 6,025,527 |
Remove protocol, domainame, domain and file extension from URL
|
<p>let say that in our websites we can have urls like:</p>
<pre><code>http://domainame.com/dir/one-simple-name.html
https://dmainame.com/mail/send.php
https://dmainame.com/mail/read
</code></pre>
<p>etc..</p>
<p>So i would like to retrieve</p>
<pre><code>dir/one-simple-name
mail/send
mail/read
</code></pre>
<p>Whats the best way to achieve it?</p>
|
javascript jquery
|
[3, 5]
|
333,574 | 333,575 |
Fade in/out sound playing in 2 different Divs
|
<p>JQuery has nice visual fadeIn/fadeOut functions that work on different elements such as <code>div</code>. I need the same thing for sound.</p>
<p>More precisely, if two YouTube iFrame API players are playing from within 2 different <code>div</code>, is there a way to fadeIn/fadeOut the sound between them?</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.