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,677,375 | 3,677,376 | pass generic list in context to generic handler ashx | <p>can i pass my generic list to my generic handler through HttpContext?</p>
<pre><code>protected void BtnExportCSV_Click(object sender, EventArgs e)
{
List<Product> products = BLL.GetProducts();
HttpContext.Current.Items["products"] = products;
Response.Redirect("ToCsvHelper.ashx", false);
}
</code></pre>
<p>it's null when it gets to handler. So is the better way to regenerate the products list within the generic handler somehow? what if i want it usable for not just a products list?</p>
| c# asp.net | [0, 9] |
3,487,757 | 3,487,758 | Use javascript to change second select list based on first select list option | <p>I have two drop-down lists populated from an array of same dates stored in a database. I want to use javascript or jquery to change the second drop-down list based on the selection from the first list. So an example would be if the user selects 03/03/2012 in the first, start date list, then I'd like the second list to only show or allow future dates within the array. 3/3, 3/2 and 3/1 would either be greyed out or removed and 3/4, 3/5 would remain as selectable options. Can anyone help with the javascript coding or make another recommendation?</p>
<pre><code><select id='start_date' name='data[sDate]' title='Use the drop list'>
<option value="" selected="selected"> </option>
<option value="03/05/2012">03/05/2012</option>
<option value="03/04/2012">03/04/2012</option>
<option value="03/03/2012">03/03/2012</option>
<option value="03/02/2012">03/02/2012</option>
<option value="03/01/2012">03/01/2012</option>
</select>
<select id='end_date' name='data[eDate]' title='Use the drop list'>
<option value="" selected="selected"> </option>
<option value="03/05/2012">03/05/2012</option>
<option value="03/04/2012">03/04/2012</option>
<option value="03/03/2012">03/03/2012</option>
<option value="03/02/2012">03/02/2012</option>
<option value="03/01/2012">03/01/2012</option>
</select>
</code></pre>
| javascript jquery | [3, 5] |
3,154,720 | 3,154,721 | asp.net C#: PUT httpRequest | <p>I've got an asp.net page that receives a PUT request with the following form:</p>
<p>PUT -Filename- <br>
Header1: value1 <br>
Header2: value1 </p>
<p>i've managed to extract the headers..and MethodType (PUT), however i cant figure out a way to extract the -filename- , i cant even find a variable that sees it..</p>
| c# asp.net | [0, 9] |
3,993,429 | 3,993,430 | How to change tab colour with javascript? | <p>How can I alert the browser content has changed with JQuery / javascript like Facebook, Twitter do where the tab colour changes?</p>
| javascript jquery | [3, 5] |
666,194 | 666,195 | Read remote text file in android | <p>I am very new to android development so forgive my ignorance.
I need to be able to read some text from a remote webpage at say 15 minute intervals. The webpage itself contains just one word with no html tags or formatting. If this is possible if someone could point me in the right direction I'd appreciate it.</p>
<p>Thanks</p>
| java android | [1, 4] |
703,550 | 703,551 | How can I print just an area inside a DIV | <p>I have a page with a top navigation area, a side navigation area, a control button area and somewhere in the middle a DIV with an <code>id="content"</code> that contains content. </p>
<p>I would like to be able to print just the contents of that DIV. I realize I have many lines of code making my other areas invisible and resizing everything but is there some alternative? Is there some way I can just print the contents of the DIV?</p>
| javascript jquery | [3, 5] |
912,804 | 912,805 | Calculate the Date | <p>Friends I am getting two inputs from the user</p>
<pre><code>1.InitDate from DatePicker
2.Difference in between two dates (numberOfDates)
</code></pre>
<p>I need to calculate the FinalDate such that</p>
<pre><code>FinalDate=InitDate+numberOfDates
</code></pre>
<p>What I have done till now</p>
<pre><code>private void CalcLastDate(int days)
{
long millis=days*24*60*60;
Calendar c = Calendar.getInstance();
c.set(settingsFromDate.getYear(), settingsFromDate.getMonth(), settingsFromDate.getDayOfMonth());
long initDate = c.getTimeInMillis();
long longFinalDate=initDate+millis;
}
</code></pre>
| java android | [1, 4] |
5,551,050 | 5,551,051 | The content of the Intent in the BroadcastReceiver | <p>I am learning how to send SMS in android, have seen the code as below:</p>
<pre><code>public class SMSReceiver extends BroadcastReceiver
{
@Override
public void onReceive(Context context, Intent intent)
{
//---get the SMS message passed in---
Bundle bundle = intent.getExtras();
SmsMessage[] msgs = null;
String str = “”;
if (bundle != null)
{
//---retrieve the SMS message received---
Object[] pdus = (Object[]) bundle.get(“pdus”);
msgs = new SmsMessage[pdus.length];
for (int i=0; i<msgs.length; i++){
msgs[i] = SmsMessage.createFromPdu((byte[])pdus[i]);
str += “SMS from “ + msgs[i].getOriginatingAddress();
str += “ :”;
str += msgs[i].getMessageBody().toString();
str += “\n”;
}
//---display the new SMS message---
Toast.makeText(context, str, Toast.LENGTH_SHORT).show();
}
}
}
</code></pre>
<p>Now my question is how do I know what are the contents of Intent object that are passed into onReceive function? As below:</p>
<pre><code>Object[] pdus = (Object[]) bundle.get(“pdus”);
</code></pre>
<p>How do I know there is a "pdus" key in the bundle object?
I can't find any clue in the API doc, anyone know where is the related information located?</p>
<p>I don't only want to know what the SMS intent pass into onReceive function, but also the other system related Intent, but I can't locate any related information in the API doc. I wonder does the information really exist?</p>
| java android | [1, 4] |
3,933,117 | 3,933,118 | What are some examples of the limitations of PHP with JavaScript? | <p>I'm looking for problems I can generalize, recognize later (in design), and say</p>
<blockquote>
<p><em>"Hey, if I continue down this road I'm going to hit trouble. PHP + JS just weren't meant for this."</em></p>
</blockquote>
<p>If I'm using PHP+JS what can't I do? What shouldn't I attempt? What do you suggest instead?</p>
| php javascript | [2, 3] |
5,180,021 | 5,180,022 | how to display pdf document in aspx page using web control? | <p>I have created a Web application, in that user can do his course by reading the PDF document. For that purpose I need to open that PDF file in new aspx page. </p>
<p>Is there any control to open the PDF? Or Is there any other way to open the PDF?</p>
<p>If you know please help me.</p>
<p>Thanks & Regards,
k.kavya</p>
| c# asp.net | [0, 9] |
2,310,007 | 2,310,008 | trying to scale down a click event thats used multiple times for different ids? | <p>Im trying to cut down some code, basically the following click event is used 10 times with the id ranging from #topNavA - #topNavJ, there's only 2 parts of the event that ever changes. Can anyone suggest how I can recycle this code for each click? I've added in comments of the lines that will change from click event to click event but the rest just stays the same? All advice welcome.</p>
<pre><code>$('#topNavA').click(function() {
$footerPush.hide();
$allMultipleElements.hide();
$('#section, #placement, .mobileControls').show(); // This line will change with different selectors
$('.mobileControls h1').replaceWith('<h1>Mobilizing Mobile, AL</h1>'); // This line will change with a different header 1
$('.mobileControls h2').replaceWith('<h2>Overview</h2>'); // This line will change with a different header 2
$('.menuTitle').removeClass('active');
$('.lightbox').remove();
$('#nav li > a').removeClass('active');
$('#nav li span a').css({
'color': '#8F8F8F'
});
$('#topNav').addClass('active');
$(this).css({
'color': '#e8af20'
});
});
</code></pre>
<p>Thanks
Kyle</p>
| javascript jquery | [3, 5] |
393,848 | 393,849 | Initialize TextBox with the Password TextMode | <p>I'm trying to initialize the TextBox with the Password TextMode in my C# code. I do it in Page_Load function. But after the output in a browser there is no text.</p>
<pre><code>this.passwordTextBox.Text = this.GetData().Password;
this.confirmPasswordTextBox.Text = this.GetData().Password;
</code></pre>
<p>How can I assing a value to this property?</p>
| c# asp.net | [0, 9] |
4,540,076 | 4,540,077 | call iframe function from parent window | <p>How to call a javascript function in ifram from parent window.
i have a jsp page which contains an iframe.
jsp page is served by "a.yenama.net" server and iframe is served "b.yenama.net" server.</p>
<pre><code><iframe width="1200" height="640" name="data" id="dataId" >
</iframe>
<br/>
<input type="button" name="data" value="Save data" onclick="callSaveData();" />
</code></pre>
<p>tried below code from parent jsp page and recieved permission denied error in IE</p>
<pre><code>window.frames['data'].callData();
</code></pre>
<p>also tried</p>
<pre><code>document.getElementById('dataId').contentWindow.callData(); //didn't work
</code></pre>
<h2>Function in iframe</h2>
<pre><code>window.callData = function(){
alert('Iframe function');
}
</code></pre>
<p>your help is truly appreciated.</p>
| javascript jquery | [3, 5] |
5,541,115 | 5,541,116 | usage of validate request and enable event validation in page tag of aspx | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2120377/enableeventvalidation-and-validaterequest-difference">enableEventValidation and validateRequest difference</a> </p>
</blockquote>
<p>can someone explain correctly the need of </p>
<pre><code> validateRequest="false"
enableEventValidation="false"
</code></pre>
<p>in page tag</p>
| c# asp.net | [0, 9] |
1,305,071 | 1,305,072 | Find SelectedText by mouse Selection in div jquery? | <p>I want to find it out <code>selected text</code> on div which select by mouse. I found out <a href="http://api.jquery.com/select/" rel="nofollow">.select()</a> method for select. but its not accomplish my problem.</p>
<p>i want to something like : </p>
<pre><code> <div id='mydiv'>Lorem Ipsum is simply dummy text of the printing.</div>
</code></pre>
<p>when i selected <code>simply</code> text using mouse selection.i found it out using <code>jquery</code>.
or something else another selected i want to get it.</p>
| javascript jquery | [3, 5] |
1,659,024 | 1,659,025 | Version of “Drop IO” in asp.net | <p>I would like a use a tool with similar features to drop.io.</p>
<p>Does anyone know a codeplex project that I would implement.
I want something that will allow our clients to upload files such as logs etc for our debugging. In addition, I would like something that is easy for our clients to download files such as our releases. I would like to brand it to our colour scheme.</p>
<p>I know we could write it ourselves, but I can’t believe this has not already been done.</p>
<p>Any thoughts?</p>
| c# asp.net | [0, 9] |
2,803,229 | 2,803,230 | jQuery post inside another javascript function | <p>I have some code like:</p>
<pre><code>function duplicatecheck(value, colname) {
var invoiceLineId = $('tr[editable="1"]').attr('id');
var invoiceLine = {
InvoiceLineId: invoiceLineId,
InvoiceId: invoiceId,
ActivityId: value
};
$.post('/Invoice/InvoiceLineExistsForThisActivity/', invoiceLine, function (data) {
if(data == true) {
return[ false, "An invoice line already exists with this activity"]
}
else {
return[ true, ""];
}
});
}
</code></pre>
<p>The problem is that <code>duplicatecheck</code> is supposed to return a value. The value is inside the <code>post</code> callback function. So <code>duplicatecheck</code> runs and doesn't return anything because <code>post</code> is asynchronous and <code>duplicatecheck</code> finishes before the callback has even run.</p>
<p>Is there a way to make <code>duplicatecheck</code> wait until the callback has finished and return what the callback returns.</p>
<p>Am I going about this completely the wrong way and should be doing something else?</p>
| javascript jquery | [3, 5] |
1,288,434 | 1,288,435 | Get values of textboxes created dynamically | <p>I have a list of textboxes created dynamically accroding to the user selection on aspx page.</p>
<p>I want to get and store into an array the value of these using Jquery, javascript.</p>
<p>how can i do that?</p>
<p>is it possible to loop through all the textboxes in a page?</p>
<p>Thanks</p>
| javascript jquery | [3, 5] |
2,363,910 | 2,363,911 | Change h1 to h2 on site master from content page | <p>I have logo in H1 tags on my master page. Now I have some more important stuff on one of content pages and would like to change H1 on master page to H2,and change H2 to H1 on that content page, what is best way to do it?</p>
<p>Im not talking about CSS style,I need to change markup, it is for optimization purpose.</p>
| c# asp.net | [0, 9] |
1,907,288 | 1,907,289 | Find hyperlinked text and URL | <p>I have a large text in that some word is hyperlinked, I want to know all that text and it's hyperlink url suppose my text is as per below:</p>
<p><em><a href="http://test.com" rel="nofollow">LoremIpsum.Net</a> is a small and simple static site that provides you with a decent sized passage without having to use a <a href="http://test34434.com" rel="nofollow">generator</a>. The site also provides an all caps version of the text, as well as translations, and an explanation of what this famous.</em></p>
<p>Now I want to store that hyperlinked word and it's url in array or hash table, can any one suggest me or provide me some sample code to do this.</p>
<p>Thanks in advance.</p>
| c# asp.net | [0, 9] |
4,495,357 | 4,495,358 | Set focus to textbox | <p>In my web page there is a textbox with width and height equal to 0. This textbox is used to get the scanned bar code value which should not be visible to the user. </p>
<p>Needs:</p>
<ol>
<li>I want to set focus to the textbox, when i click anywhere in the form.</li>
<li>I want to make the cursor invisible.</li>
</ol>
<p>Geetha.</p>
| c# asp.net javascript jquery | [0, 9, 3, 5] |
379,362 | 379,363 | Uncaught ReferenceError JavaScript | <p>Ok, so I have a template which I am using to print a couple of users to a table. </p>
<pre><code>function PrintUsers(item) {
$.template('userList', '<tr onClick="OnUserPressed(${Identifier})">\
<td>${Firstname}</td>\
<td>${Lastname}</td>\
</tr>');
$.tmpl('userList', item).appendTo("#UserTableContainer");
}
</code></pre>
<p>When I press a user I want his/hers unique identifier to be passed to a function called OnUserPressed which I am declaring in the template. The code below is just a test to see if it actually passes the data to the function.</p>
<pre><code> function OnUserPressed(Identifier) {
alert(Identifier);
}
</code></pre>
<p>My problems are these: When I press the first value in the table I get "Uncaught SyntaxError: Unexpected token ILLEGAL". When I press any other value in the table I get "Uncaught ReferenceError: xxx is not defined" where xxx is their unique identifier. So it actually retrieves the ID but I still get an error. </p>
<p>Any thoughts?</p>
| javascript jquery asp.net | [3, 5, 9] |
5,246,109 | 5,246,110 | Can I remove inline event handlers using jQuery? | <p>I have some HTML with an <code>onclick</code> attribute. I want to override that attribute using jQuery. Is there any way to remove the click handler using jQuery? Using <a href="http://jsfiddle.net/qu5zZ/1/" rel="nofollow">unbind doesn't work</a>.</p>
| javascript jquery | [3, 5] |
4,206,096 | 4,206,097 | How to access variable declared in PHP by jquery | <p>For example i declare some variable like test in server side of my PHP</p>
<pre><code>echo('var test = ' . json_encode($abc));
</code></pre>
<p>Now i want to use this test variable in Jquery ..how can i use it?</p>
<p>What function do i need to use it?</p>
<p>For Example i have:</p>
<p>I have back end PHP code something like this</p>
<pre><code>$abc = no
echo "var test= ".json_encode($abc);
</code></pre>
<p>I want jquery to do the following action(client side)</p>
<pre><code>$(document).ready(function(){
function(json) {
if($abc == no )//this i what i want to be achieved
}
}
</code></pre>
| javascript jquery | [3, 5] |
4,866,772 | 4,866,773 | Sqllite database doesnt copy in the sd card in real device | <p>I am copying my database(sqllite) to sd card by this method:</p>
<pre><code>String currentDBPath =
"\\data\\com.powergroupbd.tripmileage\\databases\\tripmileagedatabase";
String backupDBPath = "tripmileagedatabase";
File currentDB = new File(data, currentDBpath);
File backupDB = new File(sd, BackupDbPath);
if (currentDB.exists()) {
FileChannel src = new FileInputStream(currentDB)
.getChannel();
FileChannel dst = new FileOutputStream(backupDB)
.getChannel();
dst.transferFrom(src, 0, src.size());
src.close();
dst.close();
</code></pre>
<p>This is working fine in emulator but when I install it in real device this doesnt show any file in sd card. What I am missing?</p>
| java android | [1, 4] |
3,711,321 | 3,711,322 | get variables from object with jquery or javascript | <p>There is a big object in jquery script, and I want extract it (get variables.
I figure that the need to use ".".
Example: </p>
<blockquote>
<p>data.0.name</p>
</blockquote>
<p>But in my case this not work.
Attached Images with examples. How i can get "code" variable?<img src="http://i.stack.imgur.com/wiMG2.png" alt="enter image description here"></p>
| javascript jquery | [3, 5] |
701,537 | 701,538 | Meaning of :: Operator in C# and PhP | <p>In my work I have come across syntax like global:: (C#) or G:Loading($value) in Php, what do they mean?</p>
| c# php | [0, 2] |
871,023 | 871,024 | How to get values from templatefields in Grdiview SelectedIndexChanged | <p>I have a gridview and sqldatasource.</p>
<pre><code>protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
GridViewRow row = GridView1.SelectedRow;
TextBox rrdp = (TextBox)row.FindControl("name");
txt1.Text = rrdp.text.ToString()
}
</code></pre>
<p>But I'm getting : Object reference not set to an instance of an object. at the txt1.text = //etc..</p>
<p>The columns are itemtemplates , the values are not nulls.</p>
<p>Thanks</p>
| c# asp.net | [0, 9] |
4,136,773 | 4,136,774 | disable jquery datepicker | <p>I have used jquery datepicker in my .aspx page. The control is working fine. What i need is to disable the control if the textbox on which it is linked is disabled. For ex. I am showing datepicker on textbox "txtDateOfAssignment". If the Enabled property of this textbox is false then datepicker should not be active on that. </p>
<p>Anybody have an idea?</p>
<p>Thanks in advance.</p>
| asp.net jquery | [9, 5] |
3,517,985 | 3,517,986 | How to auto submit the suggested value from the autocomplete jQuery script? | <p>Below there is my code that shows a suggested list of words (rpc.php) when the user type 3 and more letters in the textbox. My question is how can I edit it, that when the user select a suggested word, the form is submitted?</p>
<p>Now when I click on a suggested word it places it in the textbox.</p>
<p>I thought of two possible ways.</p>
<ol>
<li>The form is auto submitted when the user selects a suggested word.</li>
<li><p>The suggested word is a link that gets you correctly to the results page. (I can set the desired link through the rpc.php).</p>
<pre><code><script type="text/javascript">
$().ready(function() {
$("#s").autocomplete("rpc.php", {
width: 250,
selectFirst: false,
minChars: 3,
scroll:true,
matchContains: true,
scrollHeight: 250
});
});
</script>
</code></pre></li>
</ol>
<p>this is my form</p>
<pre><code><form method="get" action=".php">
<input type="text" name="s" id="s" class="inputsearch">
<input id="searchform" type="submit">
</form>
</code></pre>
| php jquery | [2, 5] |
3,459,129 | 3,459,130 | How can I reverse the order of HTML DOM elements inside a JavaScript variable? | <p>I need to print out receipts that inserted into my database, and the latest receipt should be on the top of my page. But when I query my database, I store all the data inside a var s, and naturally it will make the data that was inserted earliest on the top of my page, how do I reverse this?</p>
<pre><code>function querySuccess(tx, results){
if(results.rows.length == 0)
{
$("#ReceiptsList").html("<p>You have no receipts captured yet</p>");
}
else
{
var s = "";
for(var i = 0; i<results.rows.length; i++)
s += "<a href='edit.html?id="+results.rows.item(i).id+"'><strong><font size = 3> " + results.rows.item(i).name +"<font></strong>" + "&nbsp;&nbsp;&nbsp;&nbsp;<font size = 1>Date:" +results.rows.item(i).date + "<font></a> ";
}
//I tried s.reverse(); but didn't work, nothing was showed on the page
$("#ReceiptsList").html(s);
}
</code></pre>
| javascript jquery | [3, 5] |
462,891 | 462,892 | How to check if a button has been clicked using javascript? | <p>Here i need to check a button click using javascript i.e)if button A is clicked i will call a javascript function and if button B is clicked i will call another javascript function.</p>
<pre><code>if(document.getElementById('imgBTNExportPPT').clicked == true)
{
ShowDialogExportPPTPOPUP();
}
else if(document.getElementById('btnShowModal').clicked == true)
{
ShowDialogPrintPOPUP();
}
</code></pre>
<p>and</p>
<pre><code> <asp:ImageButton ID="imgBTNExportPPT" runat="server" Width="15" Height="15" border="0"
OnClick="imgBTNExportPPT_Click" ImageUrl="~/Images/PPT_icon.png" />
<asp:ImageButton ID="btnShowModal" runat="server" Width="15" Height="15" border="0"
ImageUrl="~/Images/Print_icon.png" onclick="btnShowModal_Click" />
</code></pre>
<p>is it possible??any suggestion??</p>
| c# javascript asp.net | [0, 3, 9] |
522,687 | 522,688 | Issue i'm facing ; Javascript encode with php variables inside | <p>I seem to be having an issue,
I have a Javascript code,and it contains php variables </p>
<pre><code><?php // Database information
$name="whatever";
$mp3 = "Link/to/track/";
echo "
var myPlaylist = [{
mp3:'mix/4.mp3',
title:'$name',
}]]; </script>";
</code></pre>
<p>Upon trying to encode this,I'm able to encode the Javascript part, but it displays my variable names (in this instance $name) instead of the value(whatever)</p>
| php javascript | [2, 3] |
4,357,842 | 4,357,843 | Losing formating when displaying text as a label | <p>I have a multiline Textbox that I acts as a description field. Large amounts of information can be added to this textbox with spacing and returns. In a Paragraph format. When i display this text later on as a <code>Label</code> I lose all my formatting and it turns into a wall of text. Is there anything i can do to keep the original formatting?</p>
<pre><code>var customerInfo = GetCustomerInfo(itemid);
if (customerInfo != null)
{
ItemID.Text = customerInfo.ItemID.ToString();
Description.Text = customerInfo.Description;
}
</code></pre>
<p>The page Source looks like this </p>
<pre><code> This is a test
this is a test
this is a test
1. test
2. test
3. test
4. tes
</code></pre>
<p>The Label/literal look like this </p>
<pre><code>This is a test this is a test this is a test 1. test 2. test 3. test 4. tes
</code></pre>
| c# asp.net | [0, 9] |
118,922 | 118,923 | How do I refresh dynamic content loaded into a web part inside my existing jvacscript/jquery code? | <p>I have the code that I've pasted below, helpfully supplied by another stackoverflow member. I've added this code into a Kentico web part, and set the cache minutes=0, thinking that would solve my caching issue. It does, but not in IE. Is there any way I can tweak this code to refresh the content when the user comes to the page, or when we have to update the html file?</p>
<pre><code> <SCRIPT type=text/javascript>
// article footer
Date.prototype.getWeek = function() {
var onejan = new Date(this.getFullYear(),0,1);
var today = new Date(this.getFullYear(),this.getMonth(),this.getDate());
var dayOfYear = ((today - onejan +1)/86400000);
return Math.ceil(dayOfYear/7)
};
jQuery(function(){
//Quotes/Testimonials
var today = new Date();
var weekno = today.getWeek();
jQuery('#quotes-wrapper').load('/quotesroller.html div.quote-'+weekno);
});
</SCRIPT>
</code></pre>
| javascript jquery | [3, 5] |
5,275,485 | 5,275,486 | How do I bind a non-breakspace(alt-288 or  ) upon pressing the space bar in javascript? | <p>I'm using OpenMRS, it's an opensource medical records system. OpenMRS has a built-in html editor and I use this mostly in javascripting ang building the forms. In one of my forms,I have a textarea. My client would like his entries(in paragraph or in list) to be indented in the textarea. </p>
<p>Now when you try indenting the paragraph in the textarea then save the changes and preview the form, the paragraph becomes justified instead of retaining the indented lines.</p>
<p>However, if I try indenting the paragraph using ascii code for non-break space by typing <code>&#160;</code> or pressing <code>alt-288</code>, the paragraph becomes indented thus giving me the desired result. Now, the users don't prefer typing or pressing ascii equivalents coz that'll be hassle on their part.</p>
<p>I'm using mostly javascript and jQuery because it's what openmrs supports. If I could somehow bind the non-break space character upon pressing a key then this will work, but I'm at a lost here. How will I do this in javascript or jquery?</p>
| javascript jquery | [3, 5] |
3,550,411 | 3,550,412 | What is the best way to cut the file name from 'href' attribute of an 'a' element using jQuery? | <p>For example I've got the simple code:</p>
<pre><code><ul class="list">
<li><a href="http://www.aaa.com/bbb/ccc/file01.pdf">Download file 01</a></li>
<li><a href="http://www.bbb.com/ccc/ddd/file02.pdf">Download file 02</a></li>
</ul>
</code></pre>
<p>and I wish to store in variables only the file names: file01.pdf and file02.pdf, how can I cut them?</p>
<p>Many thanks for the help.</p>
<p>Cheers.</p>
| javascript jquery | [3, 5] |
2,245,915 | 2,245,916 | Javascript anonymous function vs normal function | <p>What's the difference between:</p>
<pre><code><script type="text/javascript">
$().ready(function() {
InitialDictionary = new Array();
LoadCurrentValues(InitialDictionary);
$("a[id*=SomeLink]").click(function() {
if (!CompareDictionaries(InitialDictionary))
{
alert('Hello')
}
}
)
})
</script>
</code></pre>
<p>and</p>
<pre><code><script type="text/javascript">
$().ready(function () {
InitialDictionary = new Array();
LoadCurrentValues(InitialDictionary);
$("a[id*=SomeLink]").click(CheckValuesChanged(InitialDictionary));
})
function CheckValuesChanged(InitialDictionary) {
if (!CompareDictionaries(InitialDictionary))
{
alert('Hello')
}
}
</script>
</code></pre>
<p>Without going into details into what I'm trying to achieve here, is there any reason why an anonymous method works fine and the call to a funtion doesn't? Shouldn't they produce the same results?</p>
| javascript jquery | [3, 5] |
4,573,914 | 4,573,915 | simple example code for getting text from softkeyboard | <p>Can someone please help me with android java code to launch a softkeyboard from a function call and just get a string in return ??</p>
| java android | [1, 4] |
4,313,283 | 4,313,284 | Making a selection box with custom div frame | <p>I want to make a "big" selection box , </p>
<pre><code> <ul>
<li>
<div class="sbox">
<img src=img/typeA.jpg></img><br/>
<span>Item X</span>
</div>
</li>
<li>
<div class="sbox">
<img src=img/typeA.jpg></img><br/>
<span>Item X</span>
</div>
</li>
<li>
<div class="sbox">
<img src=img/typeA.jpg></img><br/>
<span>Item X</span>
</div>
</li>
</ul>
</code></pre>
<p>When you lick on each "li" , you make a selection , and I will change the border color of it.</p>
<p>But how ? It's not a "" tags , can can you click on that ?</p>
<p>Thanks !</p>
| javascript jquery | [3, 5] |
3,857,802 | 3,857,803 | Swap default field value using pure JavaScript | <p>I've written some code in jQuery for removing/replacing the default value of an e-mail field on focus and blur events. Its' working fine,</p>
<p>But I wanted it in JavaScript .. I've tried several times but I couldn't succeed. </p>
<p>here's my jQuery Code </p>
<pre><code> $(document).ready(function(){
var email = 'Enter E-Mail Address....';
$('input[type="email"]').attr('value',email).focus(function(){
if($(this).val()==email){
$(this).attr('value','');
}
}).blur(function(){
if($(this).val()==''){
$(this).attr('value',email);
}
});
});
</code></pre>
<p>can anyone tell me how to do it in JavaScript,</p>
| javascript jquery | [3, 5] |
1,372,237 | 1,372,238 | textbox value with hard coded dash | <p>I have a textbox in the page. <code><input type="text" id="cell"></code></p>
<p>I have used below jquery....</p>
<pre><code>i = 0;
$(document).ready(function () {
$("#cell").keypress(function () {
i += 1;
if (i == 4) {
var cellValue = $("#cell").val() + "-";
$("#cell").val(cellValue);
}
});
});
</code></pre>
<p>whenever an user types <code>12345678</code> (or any number) it automatically shows <code>123-45678</code>. But problem is when user uses backspace or delete and then starts typing <code>12345678</code> it does not show <code>123-45678</code>. Please help</p>
| javascript jquery | [3, 5] |
2,682,293 | 2,682,294 | $this vs $(this) in jQuery | <p>I've seen some discussions on SO regarding <strong><code>$(this)</code></strong> vs <strong><code>$this</code></strong> in jQuery, and they make sense to me. (See <a href="http://stackoverflow.com/questions/1051782/jquery-this-vs-this">discussion here</a> for an example.)</p>
<p>But what about the snippet below, from the jQuery website plugin tutorial showing how chainability works?</p>
<pre><code>(function ($) {
$.fn.lockDimensions = function (type) {
return this.each(function () {
var $this = $(this);
if (!type || type == 'width') {
$this.width($this.width());
}
if (!type || type == 'height') {
$this.height($this.height());
}
});
};
})(jQuery);
</code></pre>
<p>What does <code>$this</code> represent above? Just when I think I have it figured out ...</p>
| javascript jquery | [3, 5] |
4,537,611 | 4,537,612 | How would i implement swfobject in this jquery overlay? | <p><a href="http://stackoverflow.com/questions/1785762/how-to-add-a-full-sized-image-to-the-center-of-a-webpage-using-jquery/1787976#1787976">http://stackoverflow.com/questions/1785762/how-to-add-a-full-sized-image-to-the-center-of-a-webpage-using-jquery/1787976#1787976</a></p>
<p>The code the guy posted...</p>
| javascript jquery | [3, 5] |
3,967,338 | 3,967,339 | call to js function from aspx source | <p>I wrote a Javascript function in the code-behind like this:</p>
<pre><code>Page.ClientScript.RegisterClientScriptBlock(
Page.ClientScript.GetType(),
"MyScript",
"<script type='text/javascript'>" +
"var urls="+s +
"function carousel(params) { ... }" +
"</script>");
</code></pre>
<p>How can I call to the javascript function <strong>that I wrote in the code-behind</strong> on the client' side (on the level of the ASPX page)?</p>
| c# javascript asp.net | [0, 3, 9] |
2,807,619 | 2,807,620 | jquery/javascript finding the value within a dynamically created element id | <p>I have a dynamically generated html table whose columns have id assigned dynamically.
for ex: </p>
<pre><code> <td id="1">1</td>
<td id="2">2</td>
....
....
<td id="n">n</td>
</code></pre>
<p>in order to get the get value of a specific column I am using
<code>document.getElementById("#myvar").innerHTML</code> or <code>$("td#myvar").html</code> where myvar is variable that contains search element such as 2 or 3 etc. But I dont get any results. If I direcly use a number for <code>document.getElementById("#2").innerHTML</code> , it works. Please advise what to do to get value where id of element is same as the variable declared??</p>
| javascript jquery | [3, 5] |
5,098,495 | 5,098,496 | Select all elements except a div and its contents | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1467226/jquery-target-all-except">jQuery: Target all except ___?</a> </p>
</blockquote>
<p>I've got a script that detects clicks on every element on the page. I'd like that to run on everything except a specific div and its children.</p>
<p>I've tried doing this using the :not selector, but don't really understand how to use that effectively, so I'm not sure if that's the right way to go or not.</p>
<p>Here's some sample code:</p>
<pre><code><div id="clickme">This is good stuff</div>
<div id="dontclickme">This should not get selected</div>
</code></pre>
<p>I'm currently using <code>$("*")</code> for my selector. Is there a way to use that to detect if it's the second div, or any of its children?</p>
| javascript jquery | [3, 5] |
5,364,576 | 5,364,577 | JQXMenu Databind with JSON | <p>I am developing an application where I need to fetch the menu items from a text file.
I am new to JQX.
But while displaying the records its showing nothing.</p>
<h1>My Text File(LeftMenu.txt) as below:</h1>
<pre><code>[{
"text": "Menu1",
"id": "1",
"parentid": "-1"
},
{
"text": "Menu2",
"id": "2",
"parentid": "-1"
},
{
"text": "Menu3",
"id": "3",
"parentid": "-1"
}
]
</code></pre>
<p>==========================================================================</p>
<h1>The code is here under</h1>
<pre><code>// prepare the data for Left Menu
var urlleftpanel = "../../Public/sampledata/leftmenu.txt";
var sourceleftmenu =
{
datatype: "json",
datafields: [
{ name: 'id' },
{ name: 'parentid' },
{ name: 'text' }
],
id: 'id',
url: urlleftpanel
};
// create data adapter.
var dataAdapter1 = new $.jqx.dataAdapter(sourceleftmenu);
// perform Data Binding.
dataAdapter1.dataBind();
var records = dataAdapter1.getRecordsHierarchy('id', 'parentid', 'items', [{ name: 'text', map: 'label' }]);
var records = da.records;
$('#jqxWidget').jqxMenu({ source: records , height: 53, theme: theme, width: '95px' });
</code></pre>
<p>=====================================================================================
Please Help its very urgent</p>
<p>Thanks in Advance</p>
| javascript jquery | [3, 5] |
555,795 | 555,796 | Set text from alert dialog | <p>Heres my code:</p>
<pre><code>AlertDialog.Builder alert = new AlertDialog.Builder(this);
alert.setTitle("What's Your name?");
alert.setMessage("Seems like you're new here! What's your name?");
// Set an EditText view to get user input
final EditText input = new EditText(this);
alert.setView(input);
alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
}
});
alert.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
// Canceled.
}
});
</code></pre>
<p>This opens a Edit text with a ok and cancel button</p>
<p>How do i do this when you hit ok it will change the TextView's text to what ever is inside the box</p>
| java android | [1, 4] |
3,715,060 | 3,715,061 | How to use json response using javascript? | <p>I have a <code>json</code> response in the form :</p>
<pre><code>"Person": [
{
"name": Peter,
"age": "18",
"city": "Ny"
},
{
"name": john,
"age": "15",
"city": "la"}]
</code></pre>
<p>Can anyone suggest how this <code>json</code> response can be read using <code>javacsript</code>?</p>
<p>Thanks!
Ronan</p>
| javascript jquery | [3, 5] |
5,638,863 | 5,638,864 | Optimize memory usage, code selection | <p>I am working on a quite big project:
The program has to do multiple tasks at the same time and each of them does hundreds of complicated calculations each second. The program has to be working 24/7. As I am not a proffessionnal programmer and I don't know how memory and CPU is handled by this kind of program, I request your help.</p>
<p>The program has different functions to do during the week and than during the weekend.
I know two languages pretty well, Python and C#.</p>
<ol>
<li><p>I need this application to be fast, so for the calculations I think c# will handle them more quickly.</p></li>
<li><p>The program has to work 24/7 so I might think that a Python written project with several little scripts that call eachother for the multiples tasks working permanently, would work better than a Big C# code.</p></li>
<li><p>How to write it the best way?</p></li>
</ol>
<p>I am thinking of writing it in pseudo-code like</p>
<pre><code>// During the week
function1 ()
{
do
{
...
huge code and functions call here
...
}
while DateTime < Friday 23:59
if DateTime = Friday 23:59
{
function2()
function1.close
}
}
// During the weekend
function2 ()
{
do
{
...
different code and functions call here
...
}
while DateTime < Sunday 23:59
if DateTime = Sunday 23:59
{
function1()
function2.close
}
}
</code></pre>
<p>What is the best approach for this problem? It is a quite large question but any kind advice is welcomed. Thanks</p>
<p><strong>EDIT</strong>
Question is: the program is quite complicated with hundreds of functions and calculations. I want it to be the fastest and lowest memory consuming. <strong>How to write it best</strong>?</p>
| c# python | [0, 7] |
5,694,570 | 5,694,571 | sending other input with $_FILES php | <p>Im uploading a file using the following jquery..</p>
<pre><code> function ajaxFileUpload(jobid)
{
$("#loading")
.ajaxStart(function(){
$(this).show();
})
.ajaxComplete(function(){
$(this).hide();
});
$.ajaxFileUpload
(
{
url:'addjobrpc.php',
secureuri:false,
jobID:jobid,
fileElementId:'fileToUpload',
dataType: 'json',
success: function (data, status)
{
$('#imageid').val(data.imageid);
if(typeof(data.error) != 'undefined')
{
if(data.error != '')
{
alert(data.error);
}else
{
alert(data.msg);
}
}
},
error: function (data, status, e)
{
alert(e);
}
}
)
return false;
}
</code></pre>
<p>My form looks like this...</p>
<pre><code><form name="form" action="" method="POST" enctype="multipart/form-data">
</code></pre>
<p>I get the filename with $_FILES['fileToUpload']['name']; but how would I get a input that is not part of the file upload? For example Jobid is a hidden field but I can't seem to get the value in addjobrpc.</p>
<p>Thanks</p>
| php javascript jquery | [2, 3, 5] |
5,129,206 | 5,129,207 | I'm using two different jQuery functions and one seems to be canceling the other out | <p>I am trying to use two pieces of jquery for a lightbox and a scroller for a single page website I'm building. They both work fine on their own, but when I put them together on the same page, the scroller seems to cancel out the lightbox, rendering it ineffective.</p>
<p>Here's the lightbox code:</p>
<pre><code><script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto();
});
</script>
</code></pre>
<p>Here's the scroller code:</p>
<pre><code><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<script type="text/javascript">// <![CDATA[
$(document).ready(function() {
function filterPath(string) {
return string.replace(/^\//, '').replace(/(index|default).[a-zA-Z]{3,4}$/, '').replace(/\/$/, '');
}
$('a[href*=#]').each(function() {
if (filterPath(location.pathname) == filterPath(this.pathname) && location.hostname == this.hostname && this.hash.replace(/#/, '')) {
var $targetId = $(this.hash),
$targetAnchor = $('[name=' + this.hash.slice(1) + ']');
var $target = $targetId.length ? $targetId : $targetAnchor.length ? $targetAnchor : false;
if ($target) {
var targetOffset = $target.offset().top;
$(this).click(function() {
$('html, body').animate({
scrollTop: targetOffset
}, 2000);
return false;
});
}
}
});
});
// ]]></script>
</code></pre>
| javascript jquery | [3, 5] |
4,018,273 | 4,018,274 | jQuery's implicit loop goes "both ways"? | <p>Turns out jQuery's "implicit looping" goes both way:</p>
<pre><code> <div class="classOne">
some content
</div>
<div class="classOne">
some content 2
</div>
[...]
$(function() { $('hello world').prependTo($('.classOne')); })
</code></pre>
<p>in this case, the loop will happen at the <code>$('.classOne')</code> section -- <code>hello world</code> will be added to both Divs.</p>
<p>I also tried</p>
<pre><code> <div class="classOne">
some content
</div>
<div class="classOne">
some content 2
</div>
<div class="classTwo">
<a href="http://www.google.com">hello Google</a>
</div>
<div class="classTwo">
<a href="http://www.yahoo.com">hello Yahoo</a>
</div>
[...]
$(function() { $('.classTwo').prependTo($('.classOne')); })
</code></pre>
<p>and there will be "nested loops"... so the 2 links will be added to both Divs</p>
<p>so i think if we have</p>
<pre><code>$('.classOne').prepend($('.classTwo')).prepend($('.classThree'))
</code></pre>
<p>then it will be like 3 nested loops? Is there a rule to the nesting, and which one is the inner loop and which one is the outer loop? And what is the inner loop / outer loop if it is</p>
<pre><code>$('.classOne').prependTo($('.classTwo')).prependTo($('.classThree'))
</code></pre>
<p>?</p>
| javascript jquery | [3, 5] |
4,078,993 | 4,078,994 | Fastest way to set a css property? | <p>I'm busy creating a resizer, but on reloading it first switches from 100% until loading the cookie and setting the width to something fixed:</p>
<pre><code>//set width from cookie, unfortunately we need todo this on docready because #main-container is not done rendering -_-
var width = $.cookie("width");
// Set the user's selection for the left column
if (width != null) {
if (width == "fluid") {
alert("fluid!");
$('#main-container').addClass('width-fluid');
} else {
$('#main-container').addClass('width-fixed');
}
} else {
$('#main-container').addClass('width-fixed');
};
</code></pre>
<p>Any ideas?</p>
<p>Thanks,</p>
<p>Dennis</p>
| javascript jquery | [3, 5] |
4,362,458 | 4,362,459 | Change country name to abbreviation | <p>I'm retrieving some XML-data containing countries among many other things and I would like to link the country name to its abbreviation in order to match them with famfamfam flags.</p>
<p>See the example below:</p>
<pre><code> $('Result',xml).each(function(i) {
var $this = $(this),
user = $this.attr("Username"),
country = $this.attr("Country"),
</code></pre>
<p>So the variable country will fetch the country name, so how can I dynamically change the 247 potential countries to it's abbreviation.</p>
<p>Below is a part of the list of the abbreviations and the full country names:</p>
<pre><code>>FI FINLAND
>FJ FIJI
>FK FALKLAND ISLANDS (MALVINAS)
>FM MICRONESIA, FEDERATED STATES OF
>FO FAROE ISLANDS
>FR FRANCE
>FX FRANCE, METROPOLITAN
>GA GABON
>GB UNITED KINGDOM
>GE GEORGIA
</code></pre>
| javascript jquery | [3, 5] |
1,620,202 | 1,620,203 | Force page to reload from server instead of load the cached version | <p>I have webpage A. The user clicks on a form to submit data, and it takes him to webpage B. When he clicks the back button, I need webpage A to be refreshed from the server, rather that loaded from cache. I have this: <code><meta http-equiv="expires" content="0"></code> but it doesnt seem to work. I have also tried setting a variable on page B (session variable via php) and then check for it on page A and refresh (or not) according to its existence. This doest seem to work either. The basic code for that is:
Page A:</p>
<pre><code><?php
if(isset($_SESSION['reloadPage'])) {
unset($_SESSION['reloadPage']);
echo'
<script>
window.location.replace("/****/****/*****.php");
</script>
';
}
?>
</code></pre>
<p>And on page B:</p>
<pre><code>$_SESSION['reloadPage'] = 1;
</code></pre>
<p>With the PHP solution, it simply keeps trying to refresh the page in a never ending loop. Something in my logic missing? Is this the right way to go about it?</p>
<p><strong>EDIT</strong>
Upon further investigation, when you tell the browser to not cache the page, does that force a full <em>server side</em> refresh as well? That's what I need. A full server side refresh of the page.</p>
| php javascript jquery | [2, 3, 5] |
2,555,723 | 2,555,724 | Session Not Working to show data | <p>My session does not working well. I tried to get the current user's record to be view to them using session in login page, but it showed nothing. This is my line of code that might give u a clue bout my prob. </p>
<pre><code> protected void LoginButton_Click(object sender, EventArgs e)
{
Session["username"] = Login1.UserName;
}
</code></pre>
<p>The page should view the data in the gridview, so i set the setting of the girdview using data source by using session. But its not working at all. The gridview showed empty.</p>
<p>Thank you.</p>
| c# asp.net | [0, 9] |
217,888 | 217,889 | jquery popup error | <p>Am running simple jquery code for opening the popup window in visual studio.Instead of opening in the new window it is navigating and wirking like hyperlinks.I dont know where am going wrong.my code is;</p>
<pre><code><script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js" >
$(document).ready(function (){
$('.examp').popupWindow({
height:500,
width:800,
top:50,
left:50
});
});
</script>
<a href ="http://google.com" title="google.com" class ="examp">open</a>
</code></pre>
<p>this is really a simple problem but i cant found where am going wrong..</p>
| jquery asp.net | [5, 9] |
4,532,099 | 4,532,100 | Set size for Input item using JQuery | <p>There is the following code:</p>
<pre><code>$(".translated").mouseenter(function(){
if ($(this).hasClass("editable")){
return;
}
var h=$(this).height();
var w=$(this).width();
$(this).empty();
$("<input/>", {
type: "text",
height:h,
width:w,
value:$(this).text()
}).appendTo(this);
$(this).height(h);
$(this).width(w);
$(this).addClass("editable");
});
</code></pre>
<p>This code removes text from a <code><div></code> container and inserts an <code><input></code> item into it. But there is the problem: the new <code><input></code> item has height larger than the <code><div></code> container despite the values of the <code>h</code> and <code>w</code>. How can I fix it? </p>
| javascript jquery | [3, 5] |
772,901 | 772,902 | load content while scrolling not working | <p>I am writing a code which i scroll to the bottom of the window it loads another data with the help of php code.
It loads the load_first.php file but not identifies the load_second.php file
What problem in this code see this </p>
<pre><code> <?php $_SESSION['first']=1; if($_SESSION['first']==1) { ?>
<script type="text/javascript">
$(window).scroll(function(){
if($(window).scrollTop() == $(document).height() - $(window).height()){
$('div#last_msg_loader').html('<img src="loading.gif">');
var data="cachekey=" + $('.cachekey').val()+"&cachelocation="+ $('.cachelocation').val();
$.ajax({
url: "load_data.php?last_msg_id="+ID,
data:data,
error:function(error)
{
alert(error);
},
success: function(html){
if(html){
$(".message_box:last").after(data);
$('div#last_msg_loader').hide();
}else{
$('div#loadmoreajaxloader').html('<center>No more posts to show.</center>');
}
}
});
}
});
</script>
<?php
include('load_first.php');
?>
<?php
}
else
{
include('load_second.php');
}
?>
<div id="last_msg_loader"></div>
</code></pre>
<p>Actually this code is used to load the hotel list using xml api of expedia</p>
| php jquery | [2, 5] |
694,397 | 694,398 | Issue jquery ResolveClientUrl asp.net | <p>when i use this in my jquery url it find;</p>
<pre><code> $.ajax({
url: '<%= ResolveClientUrl("~/TestJQueryTabStrip.aspx/DeleteRecord") %>',
type: "POST",
dataType: "json",
contentType: "application/json; charset=utf-8",
data: JSON.stringify({ id: itemId })
});
</code></pre>
<p>but when i want to change this to this;</p>
<pre><code> url: '<%= ResolveClientUrl("~/UserControls/Order/OrderProductLicense.aspx/DeleteRecord") %>',
</code></pre>
<p>it doesnt find. how can i resolve this problem ?</p>
<p>Best Regards</p>
| c# jquery asp.net | [0, 5, 9] |
4,823,160 | 4,823,161 | Why new inetsocketaddress consume a long time | <p>Android running new inetsocketaddress (ip, port), why the program waits for a very long time, probably in 10 seconds, what measures can be improved, or if there are alternative approaches.</p>
| java android | [1, 4] |
3,496,999 | 3,497,000 | Do we still need to check for different browser types in JavaScript? | <p>This is probably a simple question, and I'm slightly embarrassed to ask it, but I've been working with this chunk of JavaScript ad code for a while and it's bothered me that it's never really made sense to me and is probably out dated now with modern browsers. My question is, do we need to check for browser types still, and what is that second bit of script doing?</p>
<pre><code><script type="text/javascript">
document.write('<scr' + 'ipt src="" type="text/javascript"></scr' + 'ipt>');
</script>
<script type="text/javascript">
if ((!document.images && navigator.userAgent.indexOf('Mozilla/2.') >= 0) || navigator.userAgent.indexOf("WebTV")>= 0) {
document.write('<a href="">');
document.write('<img src="" border="0" alt="" /></a>');
}
</script>
</code></pre>
<p>I'd like to clarify that I'm actually calling someone some ad code, so while I could check for browser types, that would really be the responsibility of the keeper of the code. I'd love it if I could get this into jQuery - but I'm having trouble with the call (see my other post below).</p>
<p>What I was wondering is, do I still need to check for these browser types?</p>
<p>Cheers,<br />
Steve</p>
| javascript jquery | [3, 5] |
5,635,188 | 5,635,189 | How do I parse the free format address to save into the DataBase | <p>I have a text area that allow user the type in an address in free format, how do I parse the address user entered into address1, address2, city, state, zip and country and save into DB?</p>
| c# asp.net | [0, 9] |
2,653,028 | 2,653,029 | How can i find roughly time of song from its size | <p>Dear all,
I have a song say about 5.1 mb ,i want to calculate total duration of song before being played on media player the file format is wave file. </p>
| java javascript | [1, 3] |
5,746,615 | 5,746,616 | java: PDF417 barcode containing english and non english unicode | <p>I want to decode a stream of bytes from dePDF417 barcode decoder containing english and non english unicode characters. Please give me any help it's urgent.</p>
| java android | [1, 4] |
5,252,073 | 5,252,074 | ActivityMonitor getHits() doesn't work | <p>I tried this test but getHits() always return 0. Anyone can help me?</p>
<pre><code> public void testSettingsAboutShazamClickOnLink() {
Instrumentation inst = getInstrumentation();
IntentFilter intentFilter = new IntentFilter(android.content.Intent.ACTION_SENDTO);
intentFilter.addDataScheme("mailto");
ActivityMonitor monitor = inst.addMonitor(intentFilter, null, false);
final Intent emailIntent = new Intent(android.content.Intent.ACTION_SENDTO);
emailIntent.setData(Uri.parse("mailto:"));
emailIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
assertEquals(0, monitor.getHits());
inst.getContext().startActivity(emailIntent);
monitor.waitForActivityWithTimeout(5000);
assertEquals(1, monitor.getHits());
inst.removeMonitor(monitor);
}
</code></pre>
| java android | [1, 4] |
4,366,605 | 4,366,606 | How to remove first 3 letters in JQuery? | <p>How can I remove the first three letters of a string in JQuery?</p>
<p>For example: Turn <code>cat1234</code> to <code>1234</code></p>
| javascript jquery | [3, 5] |
1,203,662 | 1,203,663 | How to remove li when dragged outside div. Jquery UI draggable | <p><a href="http://jsfiddle.net/gyjFM/4/" rel="nofollow">jsFiddle</a> to my code. I am unsure of how to detect if the user drags one of the items out of the ol on the right. I want to have it so, when the user drags a li out of the ol on the right and drops it outside the container that li fades out.
Please point me in the right direction.</p>
| javascript jquery | [3, 5] |
3,302,436 | 3,302,437 | Jquery UI Not Loading | <p>I'm trying to use jquery draggable ui , but it seems like the ui is not well imported</p>
<p>I'd run this test :</p>
<pre><code>if(jQuery.ui){
alert("loaded");
}
else
{
alert("not loaded");
}
</code></pre>
<p>And got an "not loaded" alert....</p>
<p>Here are the first code lines of the file i'm writing :</p>
<pre><code><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<?php
$searchQuery = $_POST['searchQuery'];
?>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
</code></pre>
<p>Any idea what might went wrong ? </p>
<p>*I'm already using another jQuery functions which work just fine , so the jquery package is imported for sure , I gurss the problem is the ui import did not success.</p>
| javascript jquery | [3, 5] |
4,294,299 | 4,294,300 | Javascript validation and PHP validation? | <p>I am using jquery validation plugin for validation empty forms. Should I also check this in PHP to be sure on 100%? Or it is ok with javascript validation.
Thanks</p>
| php javascript | [2, 3] |
1,977,322 | 1,977,323 | Removing datebox validations | <p>How to remove JQuery validations in script?? I have 2 dateboxes and not able to remove the "required" thing and also unable to disable this field. I tried, <code>removeClass("required", true)</code> and also <code>document.getElementById("#element").disabled= true</code>. please advice!</p>
| javascript jquery | [3, 5] |
1,050,125 | 1,050,126 | ASP.NET session and wcf Service | <p>I have an asp.net application hosted in IIS and there is a wcf service in this app to do some tasks. </p>
<p>when the main page load, I just use jquery.ajax to call some services and also the internal service to get some data every 2 mins, BUT after session timeout time, the session ends regardless of calling that internal service.</p>
<p>I call local service just to keep session alive But it seems that they are not related. any suggestion to keep that session alive by calling service operation or . . . ?</p>
<p>thanx</p>
| jquery asp.net | [5, 9] |
5,322,521 | 5,322,522 | NoClassDefFoundError with androrm library | <p>Generic collection:</p>
<pre><code>class B {}
class A extends A {}
List<Class<? extends B>> bs = new ArrayList<Class<? extends B>>();
bs.add(A.class);
</code></pre>
<p>Works fine (as expected).</p>
<p>But when i try to use androrm(http://androrm.the-pixelpla.net/) library:</p>
<pre><code>class A extends com.orm.androrm.Model {}
List<Class<? extends com.orm.androrm.Model>> models = new ArrayList<Class<? extends com.orm.androrm.Model>>();
models.add(A.class);
</code></pre>
<p>I get a runtime error:</p>
<pre><code>E/AndroidRuntime(2177): java.lang.NoClassDefFoundError: com.my.android.A
</code></pre>
<p>I can't understand why?</p>
| java android | [1, 4] |
1,659,678 | 1,659,679 | How to get content of div which contains JavaScript script blocks? | <p>I have the following HTML</p>
<pre><code><div id="example">
...some text...
<script type="text/javascript">
... some javascript...
</script>
</div>
</code></pre>
<p>How to get content of <code>#example</code> but also with the JavaScript?</p>
<pre><code>$("#example").html(),
$("#example").text(),
$("#example").val()
</code></pre>
<p>all don't work.</p>
| javascript jquery | [3, 5] |
524,584 | 524,585 | android UTF8 encoding from received string | <p>I am receiving a string that is not properly encoded like "mystring%201, where must be "mystring 1". How could I replace all characters that could be interpreted as UTF8? I read a lot of posts but not a full solution. Please note that string is already encoded wrong and I am not asking about how to encode char sequence. I asked same issue for iOS few days ago and was solved using stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding. Thank you.</p>
<p><a href="http://stackoverflow.com/questions/11786075/ios-utf8-encoding-from-nsstring">ios UTF8 encoding from nsstring</a></p>
| java android | [1, 4] |
931,053 | 931,054 | Double-tap behaviour in android stock browser | <p>I have a page here: </p>
<p><a href="http://lonbus.net" rel="nofollow">http://lonbus.net</a></p>
<p>That I have disabled double-tap zoom on mobile browsers via the inclusdion of the line: </p>
<pre><code><meta name="viewport" content="width=device-width, user-scalable=no" />
</code></pre>
<p>This was done since when pressing buttons on the page it was easy to accidentally trigger a double-tap zoom. </p>
<p>This works. However, on the galaxy s2 phone (maybe others) double-tapping now seems to shift the whole page up or two the left, revealing white bars to the side of the page. Any thoughts as to why this happens...and if there is a way to capture the doubletap event completely and ignore it within the browser? </p>
<p>Research so-far suggests no</p>
| javascript android | [3, 4] |
2,265,295 | 2,265,296 | 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] |
831,530 | 831,531 | Using Android Parcels to preserve state of custom LinearLayout. Issue with arrays | <p>Finally figured how to test this functionality (enabled "destroy activities") and finding more issues with application.</p>
<p>Consider following class where I save properties inside of parcel:</p>
<pre><code>static class SavedState extends BaseSavedState
{
private String mName;
private int mIndex;
private boolean[] mSelectedDamages = new boolean[20];
SavedState(Parcelable superState)
{
super(superState);
}
private SavedState(Parcel in)
{
super(in);
Log.d(LOG_TAG, "SavedState - READING FROM PARCEL----------------------------------------");
mName = in.readString();
mIndex = in.readInt();
in.readBooleanArray(mSelectedDamages);
}
@Override
public void writeToParcel(Parcel out, int flags)
{
super.writeToParcel(out, flags);
Log.d(LOG_TAG, "SavedState - WRITING TO PARCEL----------------------------------------");
out.writeString(mName);
out.writeInt(mIndex);
out.writeBooleanArray(mSelectedDamages);
}
// Required field that makes Parcelables from a Parcel
public static final Parcelable.Creator<SavedState> CREATOR =
new Parcelable.Creator<SavedState>()
{
public SavedState createFromParcel(Parcel in)
{
return new SavedState(in);
}
public SavedState[] newArray(int size)
{
return new SavedState[size];
}
};
}
</code></pre>
<p>I narrowed down issue to this line:
<code>private boolean[] mSelectedDamages = new boolean[20];</code></p>
<p>I had it like this before:
<code>private boolean[] mSelectedDamages;</code></p>
<p>I really don't know how big it's going to be. Where my problem is - seems like if I declare it without initializing then 'in.readBooleanArray(..' fails with NullPointerException. If I pass properly sized empty array than it works. But I don't know size upfront. Does it mean I have to store another int in a parcel? And then declare array before pulling it out?</p>
| java android | [1, 4] |
3,075,595 | 3,075,596 | How to make element grow with window resize (javascript) | <p>I'm in the process of rewriting a "web application" (i.e. not "web page", but a line of business application) from fixed size to free flow.</p>
<p>Earlier this application was fixed in a 1024x768, but now we want the application to scale both in width and height.</p>
<p>Setting width=100% on divs etc solves the width problem. But we are having problems with height.</p>
<p>I'm looking for a javascript solution what will alow me to specify that certain elements should fill the remainder of the visible browser window. And also continue to do this on window resize.</p>
<p>Browser requirements: Internet Explorer 6.0 and up (Firefox etc not an issue).</p>
<p>Usually there is a grid of some kind on the bottom of the screen. This is specified with fixed height today and an overflow: auto; style to make a scrollbar appear if needed.</p>
<p>I'm looking for something like:</p>
<p>HTML:</p>
<pre><code>..
..lots of other elements
..
<div id="bottomGrid" style="width: 100%; height: 200px; overflow: auto;">
I wish this grid would grow with the screen size.
</div>
</code></pre>
<p>And then call something like this:</p>
<pre><code><script language="javascript" type="text/script">
MakeElementGrowWithWindowSize('bottomGrid');
</script>
</code></pre>
<p>I've tried setting height: 100% but that does not work. Changing doctype from XHTML to HTML4 breaks a whole lot of other stuff so I really hope to solve this with some clever javascript (jquery is fine).</p>
<p>As usual we are in a hurry and have little time and money to spend + this is a "huge" application. Rewriting the html and styles are not really an option.</p>
| javascript jquery | [3, 5] |
1,167,003 | 1,167,004 | Android Save Image and read | <p>Hı a have a bitmap(from byte array). I want to save that as PNG file in internal storage. </p>
<p>Then I want load this image to webview ?</p>
<p>How can ı do this ?</p>
| java android | [1, 4] |
4,972,746 | 4,972,747 | How to check whether a value is a number in javascript or jquery | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/18082/validate-numbers-in-javascript-isnumeric">Validate numbers in JavaScript - IsNumeric()</a> </p>
</blockquote>
<pre><code>var miscCharge = $("#miscCharge").val();
</code></pre>
<p>I want to check misCharge is number or not? is there any method or easy way in jquery or javascript to do this?</p>
<p>HTMl is </p>
<pre><code> <g:textField name="miscCharge" id ="miscCharge" value="" size="9" max="100000000000" min="0" />
</code></pre>
| javascript jquery | [3, 5] |
3,356,099 | 3,356,100 | Keeping an item toggled off after refresh/change of page | <p>How could i keep a div hidden after the user goes to another page or refreshes the page? I have the following code in the footer so it loads on every page:</p>
<pre><code>$(document).ready(function() {
$('#clickmebottom').click(function() {
$('#bottomfixtab').animate({
height: 'toggle'
}, 350
);
});
});
</code></pre>
<p>#clickmebottom is an X button that - on click - hides the #bottomfixtab div (small fixed banner at bottom of screen)</p>
<p>Thanks for the help</p>
| javascript jquery | [3, 5] |
3,148,646 | 3,148,647 | Return value of next span | <p>I'm trying to return the value of the next/closet span with a certain class ID. I am super close but I am confused how to use <code>next()</code> and <code>closest()</code> any help would be awesome </p>
<p>HTML:</p>
<pre><code> <table width="80%" cellspacing="0" cellpadding="0" >
<th scope="col">Data</th>
<tr>
<td width="20%"><a href="#" class ="show_data_link">Show Data</a>
<span class="data">1 </span>
</td>
</tr>
<tr>
<td width="20%"><a href="#" class ="show_data_link">Show Data</a>
<span class="data">2 </span>
</td>
</tr>
<tr>
<td width="20%"><a href="#" class ="show_data_link">Show Data</a>
<span class="data">3 </span>
</td>
</tr>
</table>
</code></pre>
<p>JAVASCRIPT</p>
<pre><code>$('.show_data_link').bind('click', function(){
//returns the first class
alert($('.data').html());
//returns null
//alert($('.data').next().html());
//returns null
// alert($('.data').closest().html());
return false;
});
</code></pre>
<p>If I use <code>$('.data').html()</code> i can get the value of the first span just not sure how to get the value of the span that is the closet so the link clicked
<a href="http://jsfiddle.net/BandonRandon/nW4DJ/" rel="nofollow">JSFiddle</a></p>
| javascript jquery | [3, 5] |
4,445,083 | 4,445,084 | i want to wrap the image as well text around the products like mug, t Shirt, crystals | <p>I am working on shopping cart. pls follow the link www.photohaat.com
In the mug section whenever the user upload the image i want to wrap the complete image onto the mug so that he/she will saw the final output immediately.</p>
<p>we develop this shopping cart on PHP language.</p>
<p>I am trying to resolve this problem but unfortunately can't get a success.</p>
<p>If you have any solutions regarding this than please let me know.</p>
<p>Thanks.</p>
| php javascript | [2, 3] |
4,938,133 | 4,938,134 | What are the java equivalents of python's __file__, __name__, and Object.__class__.__name__? | <p>In Python you can get the path of the file that is executing via <code>__file__</code> is there a java equivalent?</p>
<p>Also is there a way to get the current package you are in similar to <code>__name__</code>?</p>
<p>And Lastly, What is a good resource for java introspection?</p>
| java python | [1, 7] |
479,176 | 479,177 | How to find index of an object by key and value in an javascript array | <p><strong>Given:</strong></p>
<pre><code>var peoples = [
{ "attr1": "bob", "attr2": "pizza" },
{ "attr1": "john", "attr2": "sushi" },
{ "attr1": "larry", "attr2": "hummus" }
];
</code></pre>
<p><strong>Wanted:</strong></p>
<p>Index of object where <code>attr === value</code> for example <code>attr1 === "john"</code> or <code>attr2 === "hummus"</code></p>
<p><strong>Update:</strong>
Please, read my question carefully, i do not want to find the object via $.inArray nor i want to get the value of a specific object attribute. Please consider this for your answers. Thanks! </p>
| javascript jquery | [3, 5] |
3,842,935 | 3,842,936 | Operators not working? | <p>ok i did according to your suggestion but somewhat it looks amatuerish ha.. cos it repeats the same thing for each percentage group: css and message. I am wondering if there is another way to change it? If not, i am ok with this..</p>
<p>if (69 < percentDiscount && percentDiscount < 101) {</p>
<pre><code> $(this).find("#percentoff").html('&gt; 70% off');
$(this).find("#percentoff").addClass('badge70');
}
else if (49 < percentDiscount && percentDiscount < 70) {
$(this).find("#percentoff").html('&gt; 50% off');
$(this).find("#percentoff").addClass('badge50');
}
else if (29 < percentDiscount && percentDiscount < 50) {
$(this).find("#percentoff").html('&gt; 30% off');
$(this).find("#percentoff").addClass('badge30');
}
else if (19 < percentDiscount && percentDiscount < 30) {
$(this).find("#percentoff").html('&gt; 20% off');
$(this).find("#percentoff").addClass('badge30');
}
</code></pre>
| javascript jquery | [3, 5] |
5,842,438 | 5,842,439 | JQuery or JavaScript: How determine if shift key being pressed while clicking anchor tag hyperlink? | <p>I have an anchor tag that calls a JavaScript function.</p>
<p>With or without JQuery how do I determine if the shift key is down while the link is clicked?</p>
<p>The following code does NOT work because keypress is only fired if a "real key" (not the shift key) is pressed. (I was hoping it would fire if just the shift key alone was pressed.)</p>
<pre><code>var shifted = false;
$(function() {
$(document).keypress(function(e) {
shifted = e.shiftKey;
alert('shiftkey='+e.shiftkey);
});
$(document).keyup(function(e) {
shifted = false;
});
}
...
function myfunction() {
//shift is always false b/c keypress not fired above
}
</code></pre>
| javascript jquery | [3, 5] |
2,135,568 | 2,135,569 | long Polling webservice | <p>I have a webpage what asks through jQuery json data from webservice after every 1 second. If there is no data then webservice returns null.</p>
<p>The problem is that if client is on site over 24 hours then the browser will collect too much data and will crash. So I decided to set timeout to 60000 in jQuery ajax so it will wait for data and on server side I am trying to to somthing like this:</p>
<pre><code>while(true)
{
if(thereIsData){
System.Web.Script.Serialization.JavaScriptSerializer oSerializer =
new System.Web.Script.Serialization.JavaScriptSerializer();
string sJSON = oSerializer.Serialize(ActionList);
Context.Response.Output.Write(sJSON);
return;
}
Thread.Sleep(1000);
}
</code></pre>
<p>But if I use Thread.Sleep then it will lock entire page. I have tried threading EventWaitHandle and same result entire page is locked until there is data. I also tried creating other webservice but same results. Is there any way that I can do this?</p>
| c# asp.net | [0, 9] |
2,854,771 | 2,854,772 | Android ScheduledThreadPoolExecutor execute delayed task immediatley | <p>I have a background task that I run using the ScheduledThreadPoolExecutor with code like this.</p>
<pre><code>executor.scheduleWithFixedDelay(new BackgroundSync(), 0, 15, TimeUnit.MINUTES);
</code></pre>
<p>BackgroundSync implements Runnable. </p>
<p>Sometimes from a user event I want the delayed event to run now and not when the 15 minute timer goes off. </p>
<p>Some requirements:</p>
<ul>
<li>There should only be one "BackgroundSync" running at a time</li>
<li>Based off an user event I should be able to schedule a BackgroundSync immediately IF its not running already.</li>
</ul>
| java android | [1, 4] |
4,070,572 | 4,070,573 | Is it possible to have a javascript function in php | <p>I have a program which records the time when user clicks the button I have written the timer script in javascript now i want to include this function inside php how can do this.</p>
<p>Thank you,</p>
<p>Swarna </p>
| php javascript | [2, 3] |
773,814 | 773,815 | Best way to push alert to webpage through php/jquery? | <p>Just looking for some guru advice/tips as am building a home automation website for our new house. Will have a php website that each PC (about 10-15) throughout the house will be able to access to perform tasks (eg play movies, music, control lights etc).</p>
<p>On this site, I'd also like to be able to ping a message to all PCs as a handy copy/paste tool (always needing to send links between pcs to view in different room).</p>
<p>What's the best way to go about this? Should I have a jQuery script that's making ajax requests every x secs? Should my php script do this? Would like to make it as efficient as possible, so any clever suggestions or wise words would be most appreciated!</p>
| php jquery | [2, 5] |
5,704,145 | 5,704,146 | R.java: Syntax error on tokens | <p>I'm very new to Android development (have some Obj-C experience with Cocoa Touch though). I was testing my first Android app as I encountered these syntax errors:</p>
<blockquote>
<p>Syntax error on token "100000", invalid VariableDeclaratorId</p>
<p>Syntax error on token "11", delete this token</p>
<p>Syntax error on token "2", delete this token</p>
<p>Syntax error on token "5000", invalid VariableDeclaratorId</p>
<p>Syntax error on token "61", invalid VariableDeclaratorId</p>
<p>Syntax error on token "69", invalid VariableDeclaratorId</p>
</blockquote>
<p>When I double clicked them, they appeared to be in the file <code>R.java</code> and I have no idea how they are caused. </p>
<pre><code> public static final class drawable {
public static final int 100000=0x7f020000;
public static final int 11ba=0x7f020001;
public static final int 2values=0x7f020002;
public static final int 5000=0x7f020003;
public static final int 61=0x7f020004;
public static final int 69=0x7f020005;
.....
</code></pre>
<p>It would be great if someone can tell how this is caused.</p>
<p>[updates]</p>
<p><a href="http://stackoverflow.com/users/2305826/marsatomic">MarsAtomic</a> suggested that it is caused by not following the naming conventions for Android resources and perhaps having rawables named "5000", "69", which is, as a matter of fact, true in this case. </p>
<p>After changing the names, these exceptions didn't occur anymore. </p>
<p>But I would still like to know why having images in numeral names would trigger this. Thanks.</p>
| java android | [1, 4] |
5,388,178 | 5,388,179 | Catch private browsing website address in Android | <p>Is there any kind of a method to catch the website URL when user browse using private browsing in an Android device using JAVA program?</p>
| java android | [1, 4] |
4,315,779 | 4,315,780 | How to replace a td with elements with empty td | <p>Hi i have a structure like </p>
<pre><code><td valign="top" style="width:150px;" >
<img alt="<recipetitle/>" src="http://<rootweburl/>/photos/recipes/Large/<recipephotoname/>" alt="logo" style="float:left;"/>
</td>
</code></pre>
<p>Where <code><recipetitle/></code> and <code><recipephotoname/></code> are parameters and can change .I want to replace this td with a empty td .How will i do that in C#</p>
| c# asp.net | [0, 9] |
3,707,376 | 3,707,377 | Getting value from key pair value into appended property using jQuery | <p>How do I get the value from a key pair value into the rel property of an anchor tag?</p>
<p>When I split the code to put the value in the correct place it doesn't work, the end of the a tag would appear on screen instead value wouldn't be applied. When I look at the resulting code in console in Firebug the rel and href swapped order so the rel is first.</p>
<p>The 'key' should be and is in the correct location but the 'value' needs to be applied to the rel attribute. </p>
<p>What am I doing wrong?</p>
<pre><code>$(function() {
var obj = {"firstThing":"4","secondThing":"6","aThirdThing":"2","anotherThing":"3","followedByAnother":"4"};
$.each(obj, function(key,value) {
$('#newmine').append("<li class='tagBlocks'>","<a href='#' rel=''>",value," ",key);
});
});
</code></pre>
| javascript jquery | [3, 5] |
1,926,280 | 1,926,281 | Using .trigger('click') as soon as program is run | <p>In my spelling game there is a grid populated with hidden words. The aim of the game is to spell the words by clicking on the letters of the alphabet with the use of hints like and image and a sound. </p>
<p>The user knows what word to spell by pressing the next button. This button chooses a word in the grid at random and highlights it. My problem is I need the button to be pressed automatically when the game is run so that the user starts straight away.</p>
<p>I have been able to do this by using</p>
<pre><code> $(document).ready(function(){
$('.minibutton').trigger('click');
});
</code></pre>
<p>The only problem is I do not know where to add this function and when I do it brakes the normal function of the button which is...</p>
<pre><code> $('.minibutton').click(function() {
$('.minibutton').prop('disabled', false);
$('.picstyle').show();
$('td').removeClass('spellword');
var r = rndWord;
while (r == rndWord) {
rndWord = Math.floor(Math.random() * (listOfWords.length));
}
$('td[data-word="' + listOfWords[rndWord].name + '"]').addClass('spellword');
$('td[data-word=' + word + ']').removeClass('wordglow').removeClass('wordglow4').removeClass('wordglow3').css('color', 'transparent');
var noExist = $('td[data-word=' + listOfWords[rndWord].name + ']').hasClass('wordglow2');
if (noExist) {
$('.minibutton').click();
} else {
$("#mysoundclip").attr('src', listOfWords[rndWord].audio);
audio.play();
$("#mypic").attr('src', listOfWords[rndWord].pic);
pic.show();
}
});
</code></pre>
<p>Here is a fiddle... <a href="http://jsfiddle.net/smilburn/Dxxmh/34/" rel="nofollow">http://jsfiddle.net/smilburn/Dxxmh/34/</a></p>
| javascript jquery | [3, 5] |
1,664,386 | 1,664,387 | C# on Linux - Anyone got an opinion based on experience using mono? | <p>Is it worthwhile learning C# if you are a Linux user? There is Mono but it seems destined to always be behind the curve with the constant threat of MS action if they start to lose money.</p>
<p>Currently I am leaning more towards Java as its is fully GPLed and there are no major threats of software patents. It already has a big oss community behind it and has a solid reputation on the server whereas C# still needs to prove itself there.</p>
<p>The big advantage for C# programmers is that they are cheaper than Java developers. I also wonder exactly how portable C# code is though. Can one simply take a C# app written to target Mono and run it on windows?</p>
| c# java | [0, 1] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.