Unnamed: 0
int64
302
6.03M
Id
int64
303
6.03M
Title
stringlengths
12
149
input
stringlengths
25
3.08k
output
stringclasses
181 values
Tag_Number
stringclasses
181 values
4,721,875
4,721,876
.NET website lightweight framework
<p>I'm looking for lightweight framework to build my custom website. Originally I'd love to get a platform that implements user registration, login, logout and probably account management at some point. The thing is I don't want to have any "extras" there and I don't want to develop sign-up/login part again...</p> <p>What options do I have? I was looking at mojoPortal, but there's a lot of restrictions and features I'll never use. </p> <p>Any suggestions?</p> <p>PS. .net 2.0/3.5</p>
c# asp.net
[0, 9]
5,561,401
5,561,402
String evaluation function in JavaScript
<p>Is there any built-in function in JavaScript like <code>eval</code> built-in function in Python? notice: <code>eval</code> function take an equation as string and returns result. for example assume variable <code>x</code> is 2, then <code>eval("2x+5")</code> returns 9. </p>
javascript python
[3, 7]
5,319,495
5,319,496
How can i pass $.ajax object to another function?
<p>This function will be using in general ajax calss:</p> <pre><code>function f_AjaxFunction(_param) { var objectWillReturn; $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: 'WS/wsGenral.asmx/f_QueryAndGetResultAsJson', data: "{_sParam:'" + _param + "'}", dataType: "json", success: function(data) { var txt = ""; try { objectWillReturn = data; } catch (err) { alert(err.description); } } }); return objectWillReturn ; } </code></pre> <p>This function is calling the other function which is above:</p> <pre><code> function f_HavaDurumu(_paramm) { var obj; obj = f_AjaxFunction(_paramm); $("#spanShow").html(obj.d); } </code></pre>
javascript jquery
[3, 5]
4,986,202
4,986,203
Find the next input field and set focus if it is empty- jquery
<p>i have form with many input fields like this,</p> <p><a href="http://jsfiddle.net/WPDF9/1/" rel="nofollow">http://jsfiddle.net/WPDF9/1/</a></p> <p>i am trying to loop the element which has name distanceSlabCost </p> <pre><code>$(":text[name^=distanceSlabCost]").each(function(i){ var curTxtBox = $(this); var nextTxtBox = // find the next text field (?) var nextTxtFieldId // find the id of next text field (?) }); </code></pre> <p>How to get the id of the next textField element there? also ,there if the value of next field is empty set focus to that field.</p>
javascript jquery
[3, 5]
5,539,173
5,539,174
Basic API that returns longitude and latitude from an address using JavaScript or PHP
<p>I am quite new to JavaScript and I am looking for a basic API or function that I can feed an address as a string value and it returns me the longitude and latitude of that address. I have a series of addresses in a DB and I want to add the longitude and latitude values for each of them.</p> <p>Thanks</p>
php javascript
[2, 3]
361,339
361,340
jQuery alternative for document.activeElement
<p>What I wanted to do is figure out whenever the user is engaged with an INPUT or TEXTAREA element and set a variable flag to true... and set that flag to false immediately after the user is no longer engaged with them (ie. they've clicked out of the INPUT/TEXTAREA elements). </p> <p>I used jQuery's docuemnt.ready function to add the onclick attribute to my body element and assign it to my getActive() function.</p> <p>The code for the getActive() function is as follows:</p> <pre> function getActive() { activeObj = document.activeElement; var inFocus = false; if (activeObj.tagName == "INPUT" || activeObj.tagName == "TEXTAREA") { inFocus = true; } } </pre> <p>I'd really like to keep by project withing the jQuery framework, but can't seem to find a way of accomplishing the same logic above using JUST jQuery syntax.</p>
javascript jquery
[3, 5]
1,522,808
1,522,809
TopLeft & Bottom right longitude and lattitude value of MapView in Android SDK
<p>I am implementing a map based Android application. In that I am trying to get display the pins at TopLeft and Bottom right. The following is my code that I tried. But I am not able to display it. Can you please suggest a way to get these cordinate.</p> <pre><code>public GeoPoint topLeft(GeoPoint mapCenter, int latspan, int langspan) { int lat = (mapCenter.getLatitudeE6()) + (latspan/2); int lang = (mapCenter.getLongitudeE6()) - (langspan/2); return new GeoPoint(lat, lang); } public GeoPoint bottomRight(GeoPoint mapCenter, int latspan, int langspan) { int lat = (mapCenter.getLatitudeE6()) - (latspan/2); int lang = (mapCenter.getLongitudeE6()) + (langspan/2); return new GeoPoint(lat, lang); } </code></pre>
java android
[1, 4]
5,762,743
5,762,744
Stop method execution until another activity finished
<p>Good day to everyone!</p> <p>I need to stop method execution until another activity will end. At the moment I'm trying to do it in this way:</p> <pre><code> private boolean isPausedWhileSplash; public void showSplashWorldChangeAd(String oldWorldName, String newWorldName) { overridePendingTransition(R.anim.fade_in, R.anim.fade_out); Intent intent = new Intent(this, SplashScreen.class); intent.putExtra(SplashScreen.MSG_STRING_KEY, oldWorldName + " -&gt; " + newWorldName); intent.putExtra(SplashScreen.OLD_WORLD, oldWorldName); intent.putExtra(SplashScreen.NEW_WORLD, newWorldName); startActivityForResult(intent, RESULT_OK); isPausedWhileSplash = true; while (isPausedWhileSplash) { } } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); isPausedWhileSplash = false; } </code></pre> <p>But it's not working.</p> <p>Can you help me?</p> <p>Thanks!</p> <p><strong>UPD:</strong> Maybe there is any way to prevent view from drawing? Because all what I need right now is delay calling of methods, which will redraw view of this activity. Now I have the new world drawn before the splash screen, saying about the world change, is shown, which is not looking good.</p>
java android
[1, 4]
5,420,293
5,420,294
jQuery DatePicker and .NET- one calendar control but multiple instances on one .aspx page
<p>Scenario: I have an .aspx page containing multiple collapsible panels. Each panel represents a different report. To run a report, you click a panel and the report's user controls will appear. The date range control I created could be contained "within" more than one panel. </p> <p>The code below does not work in the multiple panels instance. It sets all of the "to date" text boxes equal to the start date instead of just the active panel's "to date" text box.</p> <p>How do I only work with the text boxes in the panel I have expanded?</p> <p>Thanks for your help!</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function(){ $('#dFrom').datepicker(); $('#dTo').datepicker(); $('#dTo').click(function(){ try{ var from = $('#dFrom').datepicker("getDate"); $('#dTo').datepicker("setDate",from); } catch(Error) { alert(Error); } }); }); </code></pre>
asp.net jquery
[9, 5]
3,252,888
3,252,889
Javascript variables within attributes
<p>With php it's easy to do something like this</p> <pre><code>&lt;? $x = "Joe"; echo "My name is $x"; ?&gt; </code></pre> <p>But I'm having trouble doing something similar with javascript</p> <pre><code>var div = document.createElement("DIV"); x="SomeValue"; div.setAttribute("id", (x)); div.setAttribute("onMouseDown", "SomeFunction((x))"); </code></pre> <p>where obviously I want x to be "SomeValue", but every time I look at the output, it just says x instead of the value.</p>
php javascript
[2, 3]
2,575,441
2,575,442
Is it possible to run Android apps in JVM?
<p>I am trying to run symbolic testing on Android apps to collect some information, for example, the execution tree. Thus I want to run it in JVM instead of the emulator because there are a lot of existing symbolic testing tools for Java applications. </p> <p>I tried to run HelloAndroid which is a sample app outputting "Hello Android" on TextView by </p> <pre><code>java -cp ./ -cp $ANDROID_LIB/android.jar HelloAndroid.class </code></pre> <p>where HelloAndroid.class is compiled Java class before converting into .dex. But JVM is keeping complaining that </p> <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: HelloAndroid/class Caused by: java.lang.ClassNotFoundException: HelloAndroid.class </code></pre> <p>I am confused because I've already specify the HelloAndroid class. And there is no complex statements or calls into Android library in the source code:</p> <pre><code>package com.example.helloandroid; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class HelloAndroid extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView tv = new TextView(this); tv.setText("Hello, Android"); setContentView(tv); } } </code></pre> <p>I am new to Android and am struggling to make this small app to execute in JVM. So would you please give me some suggestion? I am wondering if I am on the right way, I mean try to execute simple apps in JVM? Thanks!</p>
java android
[1, 4]
1,790,758
1,790,759
How to return a value from a inner class?
<p>My code is here:</p> <pre><code>public static boolean showConfirmationDialog(Context context, String title, String dialogContent) { AlertDialog.Builder builder = new AlertDialog.Builder(context); builder.setIcon(android.R.drawable.ic_dialog_alert); builder.setTitle(title); builder.setMessage(dialogContent); builder.setPositiveButton("Confirm", new OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // what to do ? } }); </code></pre> <p>right now, I want to return true after I clicked the "confirm" button. so how do I return "true" from a inner class - OnClickListener for the method.</p> <p>Need some help, thanks.</p>
java android
[1, 4]
1,730,872
1,730,873
% characters unexpectedly added in the middle of filename or folder name
<p>I have web search form, When i submit my search in the search box, The result are returned but with contains % in the file name. for example. the original file name is abc.jpeg, so the result returned will be a%bc. or if a folder is found with, so its the same for the folder name. if a folder name is jack, in the result it will be ja%ck. I have the text box (as a search box, and i have set the value of the search text box as) &lt;%search text%> Thanks for the help and taking time to read it. I am using Asp.net, C# and Access DB.</p> <p>code :</p> <pre><code>iscBuilder.AddSelect("* "); iscBuilder.AddFrom("[table1] "); iscBuilder.AddWhereClause("( column_name like('%" + pQuery + "%') or column_name like('%" + pQuery + "%') or column_name like('" + pQuery + "%') or column_name like('" + pQuery + "%') )"); iscBuilder.AddWhereClause("(column_name like( '" + path + "') or column_name like( '" + path + "')) order by column_name"); OleDbConnection sqlconConnection = (OleDbConnection)DatabaseConnection.Instance.GetConnection(); OleDbCommand sqlcmdCommand1 = new OleDbCommand(iscBuilder.ToString(), sqlconConnection); sqlcmdCommand1.CommandType = CommandType.Text; This is how i call the function: public XmlDocument GetSearchResults(string pQuery, string path,int from , int to) { List &lt;T&gt; ts= T.GetF().Getresult(pQuery, path); return createXMLThumnails(thmbNails,from , to); } </code></pre> <p>Have nice day</p>
c# asp.net
[0, 9]
1,218,557
1,218,558
Javascript to find a certain text
<p>I have a table whose values are displayed from a database but on the 8th row second column it displays a value i.e. 8 which is a Canadian province i.e. 'Ontario' now i want the name of the province instead of the values. This is what the old site used and therefore, i do not want to change the data in the database as the it is really big in size. I want to use javascript so that it only shows this for the user to read rather than changing the values in the database.</p> <p>The data is displaed in a table</p> <pre><code>&lt;table&gt; &lt;tr&gt;&lt;/tr&gt; ...8th row&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;Value lies here i.e. '8'&lt;/td&gt;&lt;/tr&gt; &lt;/table&gt; </code></pre> <p>Here is how i want it</p> <p>if the value is "0" it should show "Alberta"</p> <p>if the value is "1" British Columbia</p> <p>if the value is "2" Manitoba</p> <p>if the value is "3" New Brunswick</p> <p>if the value is "4" Newfoundland</p> <p>if the value is "5" Nova Scotia</p> <p>if the value is "6" Northwest Territories</p> <p>if the value is "7" Nunavut</p> <p>if the value is "8" Ontario</p> <p>if the value is "9" Prince Edward Island</p> <p>if the value is "10" Quebec</p> <p>if the value is "11" Saskatchewan</p> <p>if the value is "12" Yukon</p> <p>"Thanks but the form is on a different page than where it shows the value" It should be using a if else statement that if 8th row second column shows '8' then the value should display as 'Ontario'</p>
javascript jquery
[3, 5]
983,083
983,084
Validate entered number to be integer or "half"
<p>I am getting input from the user and it needs to be either a whole number or some multiple of <code>0.5</code>.</p> <p>For example, <code>7</code>, <code>23</code> and <code>5.5</code> are all valid but <code>3.1</code> and <code>2.7</code> are not.</p> <p>In other words, if the user keys in <code>2.3</code>, there will be an alert telling them that they can only key in <code>2.5</code>.</p> <p>How do I go about performing this validation?</p>
javascript jquery
[3, 5]
5,966,291
5,966,292
sending an arraylist back to the parent activity
<p>i am trying to pass an arraylist back to my parent activity</p> <p>Here is the simple code.</p> <pre><code>private ArrayList&lt;Receipt&gt; receipts = new ArrayList&lt;Receipt&gt;(); Intent data = new Intent(); data. // what to do here? setResult(RESULT_OK, data); //************************************ </code></pre> <p>This is basic receipt Class</p> <pre><code>public class Receipt { public String referenceNo; public byte[] image; public String comments; public Date createdOn; public Date updatedOn; </code></pre> <p>Tell me how can i add it in my intent and how can i retrieve it back in parent activity from </p> <pre><code>onActivityResult(final int requestCode, int resultCode, final Intent data) </code></pre>
java android
[1, 4]
2,771,448
2,771,449
Configuration files per enviroment
<p>I'm working on a project with several environments (Local,Development,Main,Prod,Live) that have several config files (Web, ConnectionStrings Windsor, Smtp, Appsettings, Nlog, etc).</p> <p>The current strategy used is to have one of these config for each branch and to maintain the configs by hand and not to merge any changes.</p> <p>What are the more elegant options for storing and deploying config files in this sort of set up?</p>
c# asp.net
[0, 9]
3,975,584
3,975,585
jQuery Selecting elements by dynamic name with square brackets (fiddle incl)
<p>How can I make this fiddle work: <a href="http://jsfiddle.net/gAHwW/" rel="nofollow">http://jsfiddle.net/gAHwW/</a></p> <pre><code>function $escape(string) { return string.replace(/\\(\[|\]\\)/g,'\\\\$1'); } $(function() { $('input[type="button"]').click(function() { alert($escape( $(this).attr('id') )); // to show you what the escape does $('#' + $(this).attr('id')).hide(); // doesn't work $('#' + $escape( $(this).attr('id') )).hide(); // doesn't work $('#alsosquare[]').hide(); // doesn't work //$(this).hide(); // works //$('#alsosquare\\[\\]').hide(); // works }); });​ </code></pre> <p>I need to select elements by their name/id dynamically, and their names/ids can have square brackets.</p> <p>Thanks!</p>
javascript jquery
[3, 5]
3,259,430
3,259,431
New to C# and trying to use a global variable
<p>Is it possible to use global variables in C#? I'm coming from mainly a PHP background so variables are either accessible everywhere or just a <code>global</code> definition away.</p> <p>My main issue is I have a <code>User</code> class that I built myself to wrap around the current <code>users</code> table on my company's database. I am defining it in the MasterPage but can't seem to access it from the actual pages (I don't know if there's a better word to describe them but they are the pages that inherit the styles and format from the MasterPage)</p> <p>Any general tips or implementation practices for me?</p> <p><strong>EDIT</strong>: here's some code snippets of what I'm trying to do:</p> <p><em>Site.master.cs</em></p> <pre><code>public partial class SiteMaster : System.Web.UI.MasterPage { public User user = new User(); } </code></pre> <p><em>logout.aspx</em></p> <pre><code>&lt;%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="logout.aspx.cs" Inherits="logout" %&gt; &lt;%@ MasterType virtualPath="~/Site.master"%&gt; </code></pre> <p><em>logout.aspx.cs</em></p> <pre><code>public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { User user = Master.user; } } </code></pre>
c# asp.net
[0, 9]
4,572,960
4,572,961
Is there an UriAgilityPack / UrlAgilityPack?
<p>I'm always trying to figure out some url/uri methodology with asp.net to manipulate a uri/url.</p> <p>It'd be nice to have:</p> <pre><code>UriAgilityPack uri = new UriAgilityPack("http://some.com/path?query1=value1"); </code></pre> <p>or</p> <pre><code>UriAgilityPack uri = new UriAgilityPack().LoadSiteRelative("~/path?query1=value1"); </code></pre> <p>Then with</p> <pre><code>enum Schemes { Http, Https } uri.Scheme = Schemes.Https; </code></pre> <p>and/or</p> <pre><code>foreach(QueryItem item in uri.Query) // do something with item </code></pre> <p>and/or</p> <pre><code>uri.Query.Add("AddToCart", 5) </code></pre> <p><code>string s = uri.ToString() // <a href="https://some.com/path?query1=value1&amp;AddToCart=5" rel="nofollow">https://some.com/path?query1=value1&amp;AddToCart=5</a></code></p> <p>or</p> <pre><code>string root = uri.RootPath // /path?query1=value1&amp;AddToCart=5 string relative = uri.RootRelativePath; // ~/path?query1=value1&amp;AddToCart=5 </code></pre>
c# asp.net
[0, 9]
4,265,517
4,265,518
How to remove all endRequest handlers in PageRequestManager?
<p>How to remove all endRequest handlers in PageRequestManager?</p>
c# asp.net
[0, 9]
533,637
533,638
Events lost after popup window from colorbox
<p>I'm using colorbox in asp.net but after popup show and close it .if i want like ie:logout i can't it is located to the popup location not doing the event.and this problem happen in chrome .in IE and Firefox when i click logout nothing happen.</p> <p>Need help</p>
jquery asp.net
[5, 9]
2,584,000
2,584,001
jQuery .length() speed implications
<p>Whenever I want to find if an element exist in the DOM I use the following code.</p> <pre><code>if($('#target').length){ // do stuff. } </code></pre> <p>This works well and I use it quite a lot on client sites.</p> <p>Question: How fast is this method? What are the speed implications when this is used a lot in a project? </p>
javascript jquery
[3, 5]
5,412,075
5,412,076
JQuery function won't fill textarea after it is edited
<p>I have an issue with a textarea which is filled dynamically out of a database by userinput.</p> <p>All works fine, but as soon as the content of the textarea is edited, it won't update itself after the next function call.</p> <p>I already stumbled over this <a href="http://stackoverflow.com/questions/4722914/jquery-append-not-appending-to-textarea-after-text-edited">thread</a>, which is telling me that i should use the val() method. I did, but it did not work. I also tried to set the function asynchronous to prevent my clear() function from being executed just after the textarea was filled by php, but also, not working.</p> <p>Here is my Code:</p> <p><a href="http://pastebin.com/efTp0Wgi" rel="nofollow">HTML / JS</a></p> <p><a href="http://pastebin.com/BwMR8G2v" rel="nofollow">PHP</a></p> <p>Thanks in advance :)</p>
php jquery
[2, 5]
456,151
456,152
Appending a css class to a textbox javascript
<p>Is it possible to add the css class named <strong>color</strong> to the textbox define inside the javascript below?</p> <pre><code>&lt;script type="text/javascript"&gt; newTextBoxDiv.after().html('&lt;label&gt;Colors and price: #'+ counter + ' : &lt;/label&gt;' + '&lt;input name="colors[]" value="" &gt;'); &lt;/script&gt; </code></pre> <p>thanks</p>
php javascript
[2, 3]
2,398,796
2,398,797
Calling a server side method in client side in asp.net
<p>This is the JavaScript that I have to use in my ASP.NET page, how to change it so that it works in ASP.NET?</p> <pre><code>&lt;script type="text/javascript"&gt; window.onload = function () { /** * These are not angles - these are values. The appropriate angles are calculated */ &lt;% Message message = (Message)request.getSession().getAttribute("message"); out.print("var pie1 = new RGraph.Pie('pie1',"+Statistics.messagePercentStats(message.getMessageID()) + ")"); %&gt; // Create the pie object pie1.Set('chart.key', ['Read', 'Received', 'Not Received']); pie1.Set('chart.colors',['#86cf21', '#eaa600', '#e01600']); pie1.Set('chart.title', "Message Status"); pie1.Set('chart.align', 'left'); pie1.Set('chart.shadow', true); pie1.Set('chart.radius', 80); pie1.Set('chart.labels.sticks', false); pie1.Set('chart.highlight.style', '2d'); // Defaults to 3d anyway; can be 2d or 3d if (!RGraph.isIE8()) { pie1.Set('chart.zoom.hdir', 'center'); pie1.Set('chart.zoom.vdir', 'up'); pie1.Set('chart.labels.sticks', false); pie1.Set('chart.labels.sticks.color', '#aaa'); } pie1.Draw(); } &lt;/script&gt; </code></pre> <p>How should I change this line to get value from my class which is named <code>messagePercentStats</code>?</p> <pre><code>RGraph.Pie('pie1',"+Statistics.messagePercentStats(message.getMessageID()) + ")"); %&gt; </code></pre>
c# asp.net
[0, 9]
2,084,482
2,084,483
Is there a more elegant way to write this?
<pre><code>$(function () { $('#button').click(function () { $('html, body').animate({ scrollTop: $(document).height() }, 400); return false; }); $('#top').click(function () { $('html, body').animate({ scrollTop: '0px' }, 400); return false; }); }); </code></pre> <p>I'm using that code to scroll to the bottom/top of the page. I'm wondering if there is a better way to write that? I'm new to jquery so I'm not sure but I've heard using <code>event.preventDefault()</code> may be better instead of <code>return false</code>? If so, where would I insert that?</p>
javascript jquery
[3, 5]
360,588
360,589
Javascript jQuery replace a variable with a value
<p>I have this line of Javascript jQuery code</p> <pre><code>$.post('/blah', { comment_id: 1, description: ... }); </code></pre> <p>However, what I really need is the ability to change <code>comment_id</code> to something else on the fly, how do I make that into a variable that I can change?</p> <p><strong>EDIT</strong> </p> <p>Clarification, I meant changing the value of <code>comment_id</code> to say <code>photo_id</code>, so the left side of the assignment.</p>
javascript jquery
[3, 5]
4,975,277
4,975,278
Need help automate iPhone keyboard input throught javascript
<p>I am trying to automate iPHone UI testing throught JavaScript.</p> <p>I am in a compose mail page and I need to enter email-id in the TO,CC &amp; BCC fields. I have the focus in TO field and keyboard is displayed. To field is UIATextField, however the usual way of entering data into textfield is not entering the data.</p> <p>I used the following code</p> <pre><code>var app = UIATarget.localTarget().frontMostApp(); app.keyboard().elements()["go"].tap(); </code></pre> <p>But did no good for me :(</p> <p>I want to input the email address([email protected]) through the displayed keyboard.</p> <p>Please help me with a code snippet. Also please let me know how to change the focus from "TO" field to "CC" which are one below the other.</p> <p>The <code>Header</code>, <code>Body</code> buttons on the page are a <code>segmentedControls</code>. I am not able to tap them using the code snippet.</p> <pre><code>var app = UIATarget.localTarget().frontMostApp(); app.segmentedControls()[0].buttons()["Body"].tap(); </code></pre> <p>Please help me with this.</p> <p>Thanks in Advance Kiran</p>
javascript iphone
[3, 8]
1,332,003
1,332,004
Switching xml string files
<p>I am working on a bilingual app menu. I am currently at a dilemma on how I would be able to switch the languages easy. At first I thought I could use String.xml file to store the data passed out in English then later on Chinese and just switch xml string file for a chinese menu but the String.xml can only use a unique name ID.</p> <p>Is there any other way of doing this? In which I can create another string array and call it instantly like String.xml?</p> <p>Any suggestions would be greatly appreciated, I am always willing to listen and get better if what I put down was no appropriate.</p>
java android
[1, 4]
2,751,122
2,751,123
JS show hide feild diappear when clicking submit
<p>I have a php form which has a dropdown list and a text which show and hide based on drop down list value. The problem is when I click submit button and there is validation error the onload function work and the text hide ,,, it should stay visible or invisible depending on the drop down list.</p> <p>Here is what Im doing:</p> <pre><code>&lt;script type="text/javascript"&gt; function showfield(name){ if(name != 'High School') document.getElementById('div1').style.display="block"; else document.getElementById('div1').style.display="none"; } function hidefield() { document.getElementById('div1').style.display='none'; } &lt;script&gt; </code></pre> <p>Im calling the hidefield function here on body on load:</p> <pre><code>&lt;body onload = "hidefield()"&gt; </code></pre> <p>and the other function on the drop downlist </p> <pre><code>&lt;select name="education" size="1" class="text" id="education" onchange="showfield(this.options[this.selectedIndex].value)"&gt; </code></pre> <p>Hope some one can help.</p>
php javascript
[2, 3]
3,849,488
3,849,489
basic question: creating a button (or anything)
<p>I'm relatively new to Android development and Java (learning both simultaneously sort of...). </p> <p>My question is: if I set up a button in main.xml, I still need to actually create the button in my Activity, right? Like the XML just controls the look of the button, but you need to actually create a button by doing something like</p> <pre><code>private Button myButton; </code></pre> <p>Just wanted to make sure I had this clear conceptually. You create an object in your class and then just tell Android to do something like </p> <pre><code>myButton = (Button) findViewById(R.id.my_button); </code></pre> <p>Just wanted to make sure I'm clear on this. </p>
java android
[1, 4]
1,925,985
1,925,986
Jquery delegation on jquery collection/domRef but selector string
<p>I have a scenario where I have actual dom reference to dom element and want to delegate event to that dom reference.</p> <pre><code>var domRef = $('.selector'); // I want something like this. $(document).on('click', domRef, function() { }); </code></pre> <p>I know it makes no sense to use it this way in the above code but I have a used case for myself where I want such functionality. I would appreciate can provide me solution without debating on the reason for following such practice. </p>
javascript jquery
[3, 5]
2,584,321
2,584,322
C# coding for colours not working completely
<p>I have a pie chart and I wanted 3 specific colours there i code this: but only the red colour is displayed. Instead of green it display blue. Instead of the yellow is a dark gold colour. Is this code correct? If so why are the colours not displayed correctly?</p> <pre><code>foreach(PatientAllergy alrg in inpatientAllergies) { if(alrg.Description == "Allergies") alrg.Color = newSolidColorBrush Colors.Green); else if (alrg.Description == "No Allergies") alrg.Color = newSolidColorBrush(Colors.Red); else if (alrg.Description == "Unknown") alrg.Color = newSolidColorBrush(Colors.Yellow); } completionHandler(patientAllergies); </code></pre>
c# asp.net
[0, 9]
5,128,001
5,128,002
How do I find out how many times a function is called with javascript/jquery?
<p>Perhaps an odd question but here it goes: I have a function which I call periodically and within that function I need to know which iteration I'm in, or how many times the function has been called. A simplified version of the problem: </p> <pre><code>jQuery( document ).ready( function(){ setInterval( "myFunction()", 3000 ); }); function myFunction() { alert( "I have been called X times" ); } </code></pre> <p>So, how do I figure out the X in the above code?</p>
javascript jquery
[3, 5]
3,081,569
3,081,570
Freetextbox Problem
<p>I tried to use firefox but my <a href="http://freetextbox.com/" rel="nofollow">freetextbox</a> didn't work. However, when I use IE6 it works properly. I tried to use google chrome and an updated version of IE and it's also working. Has anyone else had this problem? Is it a bug?</p>
c# asp.net
[0, 9]
4,512,543
4,512,544
How to create Fibonacci Sequence in Java
<p>I really suck at math. I mean, I REALLY suck at math. I'm trying to make a simple fibonacci sequence class for an algorithm I'll be using. I have seen the python example which looks something like this:</p> <pre><code>a = 0 b = 1 while b &lt; 10: print b a, b = b, b+a </code></pre> <p>The problem is that I can't really make this work in any other language. I'd like to make it work in Java, since I can pretty much translate it into the other languages I use from there. This is the general thought:</p> <pre><code> public class FibonacciAlgorithm { private Integer a = 0; private Integer b = 1; public FibonacciAlgorithm() { } public Integer increment() { a = b; b = a + b; return value; } public Integer getValue() { return b; } } </code></pre> <p>All that I end up with is doubling, which I could do with multiplication :( Can anyone help me out? Math pwns me. </p>
java python
[1, 7]
2,114,025
2,114,026
Get element from string
<p>I have a large string in a variable that includes a whole bunch of HTML tags.</p> <p>I want to get the value of a hidden input field within the string and store it in its own var.</p> <pre><code>&lt;input type="hidden" value="WantThis" /&gt; </code></pre> <p>Can anyone help me out at all?</p>
javascript jquery
[3, 5]
4,170,171
4,170,172
How Do I Store A PHP Variable In JS For Use With jQuery?
<p>I'm wondering where I would put code to take a variable from PHP (used in numbering classes) and store it in a variable that jQuery can access?</p> <p>Here is an example:</p> <pre><code>$(".object1-22").hover(function(e){ $(".object2-22").show(); }, function(e) { $(".object2-22").hide(); }); </code></pre> <p>So in my code, I have two objects. When you hover over the 22nd instance of object1, I want it to <em>only</em> display the 22nd instance of object2.</p> <p>How could I perform this task?</p>
php jquery javascript
[2, 5, 3]
3,650,658
3,650,659
Completing jQuery animations on page unload
<p>Is there a way to perform a jQuery animation before a user navigates away from a page by clicking on a link, or clicking the back/forward buttons. </p> <p>It seems like doing the animation in response to an unload event would be sure to cover all the conditions under which a user may leave a page. </p> <p>However, the new page is loaded before the animation can complete. I could do a busy wait, but that isn't very elegant. </p> <p>Alternatively, I could intercept clicks on anchors. But that doesn't account for back/forward clicks and possibly other conditions under which user would navigate away from a page.</p> <p>Yes, I understand that this type of behavior is frowned upon because it leaves the user waiting. However, I am attempting to do this in a very particular situation in which I believe the pros outweigh the cons. </p>
javascript jquery
[3, 5]
1,722,869
1,722,870
How to select all textareas and textboxes using jQuery?
<p>How can I select all textboxes and textareas, e.g:</p> <pre><code>&lt;input type='text' /&gt; </code></pre> <p>and</p> <pre><code>&lt;textarea&gt;&lt;/textarea&gt; </code></pre> <p>on a page and have the property <code>style.width="90%";</code> applied to them?</p>
javascript jquery
[3, 5]
1,006,754
1,006,755
How to compare Integer with integer array
<p>i am new to android. I want to know how to compare Integer with integer array. There is a set of integer array (Ex) array_int={1,2,3,4} and single integer int i=2, here i want to compare both integers,and in case if single integer appears in array integer, i want to break the process. </p> <pre><code>for(i=0;i&lt;integerArray.length;i++){ if(singleinteger!=integerArray[i]){ // some action } else{ // Stop the action } </code></pre> <p>In this case it compares both integer. and at the time when two integers are equal process getting break, otherwise it iteration action till the loop getting end. </p>
java android
[1, 4]
5,508,873
5,508,874
How to send SMS from asp.net application
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1125332/sms-from-our-site">sms from our site</a> </p> </blockquote> <p>I want to send SMS from my asp.net application. Suppose there will be 2 text boxes in my UI, one for mobile or cell phone number and another one is for message writing. When I will click the submit button then this SMS will be send to that cell number. I want to use my cell phone number as transmission number. Please inform me the possible ways. I am using asp.net C# </p>
c# asp.net
[0, 9]
292,663
292,664
virtual function
<p>what are virtual functions? what is pure virtual function? please explain with example</p>
java c++
[1, 6]
1,538,477
1,538,478
jQuery - Animation when page changes
<p>I have this website: <a href="http://www.heinesiebrand.nl/demo/" rel="nofollow">http://www.heinesiebrand.nl/demo/</a></p> <p>When the user is on the 'Home'-page, it sees a quote on top of the page. When you go to another page, that disappears. This now happens in a 'hard' transition, and i want to smooth that up using jQuery.</p> <p>What I have so far is the following (note: I'm using Wordpress):</p> <pre><code>&lt;script type="text/javascript"&gt; &lt;?php if (is_front_page()) { ?&gt; $("#animation").animate({ min-height: "140px" }, 500 ); &lt;?php } else { ?&gt; $("#animation").animate({ min-height: "40px" }, 500 ); &lt;?php } ?&gt; &lt;/script&gt; </code></pre> <p>And the part to be animated:</p> <pre><code>&lt;div class="contentwidth-footer" id="animation" style="min-height: 35px;"&gt; &lt;?php if (is_front_page()) { display_tagline($post-&gt;ID); } ?&gt; &lt;/div&gt; </code></pre> <p>This doesn't work, so do you guys have any suggestions? Thanks!</p>
javascript jquery
[3, 5]
4,653,839
4,653,840
KCfinder: How to allow public folder
<p>I'm using KCfinder with CKeditor all works good, I have sessions enabled to allow uploading into a users private folder, but how can I show the public folders to the user as well. </p> <p>Here is my session code that I use. </p> <pre><code>&lt;?php $_SESSION['KCFINDER'] = array(); $_SESSION['KCFINDER']['disabled'] = false; // Activate the uploader $_SESSION['KCFINDER']['uploadURL'] = "upload/Files"; $_SESSION['fold_type'] = "MyAccountName"; ?&gt; </code></pre>
php javascript
[2, 3]
797,290
797,291
Disable a function
<p>I have a tooltip that I want to disable. It is from <a href="http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery" rel="nofollow">this site</a> and is basically set and called as follows:</p> <pre><code>this.tooltip = function(){....} $(document).ready(function(){ tooltip(); }); </code></pre> <p>I don't want to unbind the hover or mouseover events since they are also tied to other effects. I have tried to disable without success as follows (at the bottom of the page):</p> <pre><code> $(document).ready(function(){ this.tooltip = function() {} }) </code></pre> <p>and</p> <pre><code> $(document).ready(function(){ function tooltip() {} }) </code></pre> <p>Am I missing something?</p>
javascript jquery
[3, 5]
3,272,367
3,272,368
Sync multiple tracks in android
<p>I invest my few days but not getting the correct answer.</p> <p>I am developing an application in which 12 tracks should executes parallely and they are, but my problem is that the start time is not same.</p> <p>Actually my question is about to sync my 12 tracks. All the tracks start at one time, there should not be millisecond difference between all tracks. If there any difference occurs then tracks mixing can not be done perfectly.</p> <p>My code which play all the tracks on button click.</p> <pre><code> mp1_track_a.start(); mp1_track_b.start(); mp2_track_a.start(); mp2_track_b.start(); mp3_track_a.start(); mp3_track_b.start(); mp4_track_a.start(); mp4_track_b.start(); mp5_track_a.start(); mp5_track_b.start(); mp6_track_a.start(); mp6_track_b.start(); </code></pre>
java android
[1, 4]
23,643
23,644
How to make something like stackoverflow's similar title search
<p>*<em>UPDATE:</em>*I've already answered my question. But you can still give me advise and i'll take your answer as selected</p> <p>NOTE: If you don't need to know what I want to do with the codes, just skip the first several paragraphs and directly see the codes and tell me why they doesn't work without error.</p> <p>I want to make something like stackoverflow's similar title search when you enter your title in the ask page. </p> <p>I need to split words to make regex and then search in the database. Since my application is in Chinese(no spaces between each words) and I think splitting chinese into meaningful phrases using PHP is too hard. I have an idea splitting it in the client side using javascript according to chinese IME's characteristic that, for example, if you want to type the word "你好中国" in chinese, people usually type "nihao[space]zhongguo" in IME(note where the space bar is), since '你好'(nihao - hello) is a phrase and '中国'(zhongguo - china) is another. So when people press space bar i record the word he entered before the space and start a timer of 2 seconds , if he or she enters another words clear the timer and continue to record if he or she doesn't, send each words recorded to the server. </p> <p>Qustion is, is this a good idea? Are there any other convenient way to do this? And why these lines i wrote to test won't work without error.</p> <p>script:</p> <pre><code>$(function(){ var i=0; $('#t').keyup(function(e){ if(e.keyCode==32) { eval("a"+i+"=$(this).val()"); i++; var timer=setTimeout("for(b=0;b&lt;i;b++){alert(eval('a'+b));}",1000); if($("#t").keydown()) { clearTimeout(timer); } } }) }) </code></pre> <p>html:</p> <pre><code>&lt;input id="t"/&gt; </code></pre>
php javascript
[2, 3]
3,451,768
3,451,769
Jquery .next() help
<p>I use the following code to hide and show a box on a bunch of search results. Each result has its own toggle and box to show and hide. The problem I have is that clicking any one of the toggles will show and hide ALL of the boxes on the page and NOT just the box for the one result. How can I do this?</p> <p>Thanks</p> <pre><code>jQuery(document).ready(function ($) { $("div.MoreResultsTrigger").click(function (e) { $("div.MoreResultsTrigger").next().slideToggle('fast'); }); }); </code></pre> <p><strong>UPDATED CODE USING HOVER</strong></p> <pre><code> $('a.MoreResultsTrigger').hover( function () { $(this).next().show(); }, function () { $(this).next().hide(); } ); </code></pre>
javascript jquery
[3, 5]
3,470,421
3,470,422
What language should I write my 2D game in?
<p>I'm thinking of writing a game. It's inspired by Minecraft/Terraria (but don't worry it will be different). </p> <p>My main question is what language I should write it in -- it'll be relatively simple graphics, more like Terraria than Minecraft. I know Java relatively well and Minecraft is written in it, but C++ seems like the industry standard for game development. However, I know next to no C++. I'm willing to learn but am worried how it will turn out for my first real project in the language. </p> <p>In addition to that, I'd also like suggestions on a good game engine for the language that you suggest. I'd like it to run on:</p> <ul> <li>Windows for sure</li> <li>Linux for sure</li> <li>Mac for sure</li> <li>Android would be really nice</li> <li>iOS is optional</li> </ul> <p>Thank you in advance!</p>
java c++
[1, 6]
3,295,186
3,295,187
Android Clock Application: acceses which existing libraries?
<p>I am trying to use the existing alarm clock code available <a href="http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/2.2_r1.1/com/android/alarmclock/ClockPicker.java" rel="nofollow">here</a> Does anyone know what layers in the android framework are used/touched upon in this application? Being more specific, I want to know if this is just a UI application or if it uses some other existing libraries in the android framework( Like middleware libraries etc)</p>
java android
[1, 4]
128,901
128,902
Redirecting on a single search result?
<p>When a user does a search on my website, and there is only one entry, then I want to redirect the user to the search result. The current way that I am doing this is poor. Here is how I am currently doing this:</p> <p>If there is only one search result on the search result page, then I render a hidden input with an ID of "redirect" and a value of the link to redirect to. In the javascript, if the hidden input with ID "redirect" exists, then the user is redirected to the value of the element.</p> <p>It's a poor way to do this because the single search result is loaded first, so the user actually sees that there is one search result. Then, it loads after, say, 3 seconds.</p> <p>Is there a better way to do this?</p>
php javascript jquery
[2, 3, 5]
461,115
461,116
how to call python code in javascript to display bar chart
<p>i have written python code which gives me i/p to chart(json data) but i am not getting how to get these data in my javascript.</p> <p>i want to display it in google app engine</p> <p>i want to do it in same way as we can do it with PHP.</p>
javascript python
[3, 7]
2,226,818
2,226,819
get set access in javascript object literals
<p>Using object literals for the first time and it seems I don't quite understand them right. What I need is private variables with the scope of the object and therefore accessible to all functions in the object literal.</p> <p>Here's the issue:</p> <p>I have a simple object literal for a map object</p> <pre><code>var mapObj = { init: function (lat, lng, documentID) { var myOptions = { center: new google.maps.LatLng(lat, lng), zoom: 18, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById(documentID), myOptions); return map; }, setMarker: function (lat, lng, map, contentObj) { var myLatlng = new google.maps.LatLng(lat, lng); var marker = new google.maps.Marker({ position: myLatlng, map: map, title: "Hello World!", content: contentObj }); } }; </code></pre> <p>This is all fine, and I get to use it as mapObj.init(....) and mapObj.setMarker(...) which work perfectly.</p> <p>What I want to be able to do is store some of these variable values - like 'map' in the init() method, and then have it accessible for other methods. For e.g. I should not need to pass 'map' in the setMarker, as the mapObj should hold the map internally after the init method.</p> <p>Similarly I'd like to be able to do mapObj.getMap() to access the map object created in init.</p> <p>I'm unable to figure out how it works. Declaring var map as</p> <pre><code>var mapObj { var map } </code></pre> <p>for e.g throws errors. </p> <p>Am I expecting this to work too much like C#? Should I be using the classic javascript 'class' constructions? Any pointers will help so I can move on.</p> <p>Thanks</p>
javascript jquery
[3, 5]
1,657,221
1,657,222
get the details of child checkbox while clicking on the parent checboxes
<p>I have set of checkboxes with select all and deselect all options... Is it possible to get the details( id, class, name) of the child checkboxes associated each main checkbox while clicking on select all option..</p> <p><a href="http://jsfiddle.net/nBh4L/2/" rel="nofollow">http://jsfiddle.net/nBh4L/2/</a></p> <pre><code>$(function(){ $('.selectAll').on('click', function(evt){ var group = $(this).attr('data-group'), isChecked = !!($(this).prop('checked')); $('input[value="' + group + '"]').prop('checked', isChecked); }) $('.entity').on('click', function(evt){ var group = $(this).attr('value'), siblings = $('input[value="' + group + '"]'), isChecked = true; siblings.each(function(idx, el){ if(!$(el).prop('checked')) { isChecked = false; return; } }) $('.selectAll[data-group="' + group + '"]').prop('checked', isChecked); }) })​ </code></pre>
javascript jquery
[3, 5]
3,101,501
3,101,502
Prevent user from chaning tokens within input box
<p>How to prevent the change of certain elements, tokens, within a textarea with javascript or jquery? For instance I have this string in an input</p> <p>this is normal text {this can't be changed 1}. This is more text. {This can't be changed 2 }. And some more text</p> <p>If a user tries to change text within the curly brackets I want to prevent that from happening.</p> <p>I thought of finding the indexes of the start and stop indexes of the tokens and when a user tries to change an element, I would see if it falls within that range.</p> <p>Is there a different approach that I can use?</p>
javascript jquery
[3, 5]
3,104,849
3,104,850
How to acces it from a different class
<p>Ok I kinda got stucked on the basics.I have a method in class that shows a notification in the notification bar. I tried to make it static but if I make it static,some functions won't work.</p> <p>So if I have the following function in x.class,how can I access it from y.class? Because I tried with static,and with objects,but all failed.</p> <pre><code> void notify(String i) { String ns = Context.NOTIFICATION_SERVICE; NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns); int icon = R.drawable.icon; // icon from resources CharSequence tickerText = "gogu la telefon"; // ticker-text long when = System.currentTimeMillis(); // notification time Context context = getApplicationContext(); // application Context CharSequence contentTitle = "My notification"; // message title CharSequence contentText = "Hello World!"; // message text Intent notificationIntent = new Intent(this, MilkyWaySearcherActivity.class); PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0); // the next two lines initialize the Notification, using the configurations above Notification notification = new Notification(icon, tickerText, when); notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent); notification.ledARGB = 0xff00ff00; notification.ledOnMS = 300; notification.ledOffMS = 1000; notification.flags |= Notification.FLAG_SHOW_LIGHTS; mNotificationManager.notify(BIND_AUTO_CREATE, notification); } </code></pre>
java android
[1, 4]
4,930,814
4,930,815
How to change javascript code to Jquery?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/10828381/how-to-convert-javascript-code-to-jquery-code">How to convert Javascript code to Jquery code?</a> </p> </blockquote> <p>I need to convert this javascript code to Jquery?</p> <p><code>eval("document.forms[0].strKey" + intDimId).value + "," + tarr[i];</code></p> <p>Can you please help me how to change the above code to jQuery</p> <p>Thanks,</p> <p>Rajasekhar.</p>
javascript jquery
[3, 5]
3,886,712
3,886,713
Hiding routeparameters from URL when using RouteTable
<p>I'm using a <code>RouteTable</code> and I'm looking to hide the routeparameters from the URL. The relevant code is:</p> <pre><code>RouteTable.Routes.Add("EditItem", new Route("{editMode}/{itemId}.aspx", new PageRouteHandler("~/EditPage.aspx"))); </code></pre> <p>And the code that refer to that page is:</p> <pre><code> &lt;a href="&lt;%# Page.GetRouteUrl("EditItem", new {editMode = "view", itemId = Eval("EntryId")}) %&gt;" </code></pre> <p>The thing is that I would like to block the user from seeing the itemId parameter and still be able to view the item. Is it possible to send the parameter to the new page without showing it in the URL?</p> <p>An example for such a "problematic" URL is <code>www.mysite.com/view/1234.aspx</code> and ofcourse, I wouldn't like the user to see the 1234 part. (itemId)</p>
c# asp.net
[0, 9]
3,783,302
3,783,303
countdown bar android example
<p>any help to display this simple countdown on progress bar?</p> <pre><code>new CountDownTimer(30000, 1000) { public void onTick(long millisUntilFinished) { mTextField.setText("seconds remaining: " + millisUntilFinished / 1000); } public void onFinish() { mTextField.setText("done!"); } }.start(); </code></pre> <p><a href="http://developer.android.com/reference/android/os/CountDownTimer.html" rel="nofollow">http://developer.android.com/reference/android/os/CountDownTimer.html</a></p>
java android
[1, 4]
1,787,540
1,787,541
Aid with this isue
<p>Here is my camera class:</p> <pre><code>public void setPosition( float x, float y ) { positionX = x; positionY = y; } public void applyTransform(GraphicsContext c) { c.getCanvas().translate(-getPositionX(), -getPositionY()); c.getCanvas().scale(getScale(), getScale()); } public RectF getCamRect(int width, int height) { camRect.top = getPositionY(); camRect.left = getPositionX(); camRect.bottom = camRect.top + ((float)height * (1.0f / getScale())); camRect.right = camRect.left + ((float)width * (1.0f / getScale())); return camRect; } </code></pre> <p>And here is where I render the cam rect to test.</p> <pre><code>@Override protected void onDraw(Canvas canvas) { graphicsContext.setCanvas(canvas); graphicsContext.clear(); camera.applyTransform(graphicsContext); RectF screen = camera.getCamRect(getWidth(), getHeight()); graphicsContext.getCanvas().drawRect(screen, p); </code></pre> <p>I would expect the cam rectangle to span the whole screen regardless of the transformation applied but instead it runs away as I move meaning I guess my top left calculation is wrong, but its size is correct.</p> <p>What could be wrong?</p> <p>Thanks</p>
java android
[1, 4]
1,736,674
1,736,675
Differences between C++ and Java compilation process
<p>I have high level idea on the differences between C++ and Java compilation. But, I want to really understand and dive deep. can you suggest any references or blogs ?</p>
java c++
[1, 6]
4,368,254
4,368,255
not able to shuffle a JSONArray
<p>I am trying to shuffle a JSONArray and a get a subset(JSONArray). So for example if my JSONArray has 5 entries, I want to generate a JSONArray with random 3 entries out of 5 in it. Below is the code for shuffling the JSONArray. Problem is that the output JSONArray has backslash() characters introduced before every occurance of double quotes("). Not sure why is this hapening. Any help from someone. Also any suggestions on how can i pick first 3 random entries of 5 from a JSONArray</p> <pre><code>public JSONArray getRandomJSONArray(JSONArray jArray){ List&lt;String&gt; stringArrayMaster = new ArrayList&lt;String&gt;(Arrays.asList(jArray.toString())); Collections.shuffle(stringArrayMaster); JSONArray randomJArray = new JSONArray(stringArrayMaster); return randomJArray; } </code></pre>
java android
[1, 4]
2,649,253
2,649,254
jQuery prevent stop() from giving fixed height to element
<p>I have the following lines of code:</p> <pre><code>$(".product-list .product").hover(function() { $(this).find('.product-description').stop().slideDown("slow"); }, function() { $(this).find('.product-description').stop().slideUp("slow"); }) </code></pre> <p>Now the problem is, when I move fast enough, and then hover the element again, the .product-description get stuck to the height of the old event.</p> <p>For example:</p> <ol> <li>mouseover: element -> animates -> full height: 200px</li> <li>mouseleave: element -> animation stops -> animates -> height: 0 (default height now: 100px)</li> <li>mouseover: element -> animates -> full height: 100px (but should be 200px)</li> </ol> <p>And yes I already tried by getting the normal height - but the problem is, that I use clearfix what jQuery can't really handle.</p> <p>Thanks for any advice</p>
javascript jquery
[3, 5]
4,636,380
4,636,381
how to check wifi or 3g network is available on android device
<p>Here, my android device supports both wifi and 3g. At particular time which network is available on this device. Because my requirement is when 3g is available I have to upload small amount of data. when wifi is available entire data have to upload. So, I have to check connection is wifi or 3g. Please help me. Thanks in advance. </p>
java android
[1, 4]
1,447,800
1,447,801
Using JQuery, how can I make a field editable, but user can't type?
<p>I have a field that has a date control popup when the user clicks in it. The problem is, that the user can also enter invalid dates.</p> <p>Is there a way using Javascript to leave the field editable, but prevent the user from typing any numbers?</p>
javascript jquery
[3, 5]
1,118,618
1,118,619
Canvas.DrawCircle inverting circle when radius is < 1
<p>I'm having some trouble with the following code, it appears to drawn the circle inverted (inside out). If I change the radius parameter from 0.25f to 1.0f then it does draw a circle. </p> <pre><code> /* this changes the scale to 0 to 1 */ float scale = (float) getWidth(); canvas.save(Canvas.MATRIX_SAVE_FLAG); canvas.scale(scale, scale); Paint basicpaint= new Paint(); basicpaint.setAntiAlias(true); basicpaint.setColor(Color.RED); handScrewPaint.setStyle(Paint.Style.FILL); canvas.drawCircle(0.5f, 0.5f, 0.25f, basicpaint); </code></pre> <p>Can someone set me straight?</p> <p>UPDATE: I am using SDK version 14, if I switch to version 4 this code works. Before you ask, no I can't switch version as there are API's in 14 that I need for my app.</p>
java android
[1, 4]
3,805,722
3,805,723
Android. Call system dialog
<p>Is there a way to open the system dialog <code>settings-&gt;location &amp; security-&gt;Install from SD card</code> programmatically from my application? </p>
java android
[1, 4]
2,213,775
2,213,776
Running a javascript function that is in an external .js file from within the script? (attached by src=) Using PHP
<p>I'm using PHP code to generate the tag in the tags of my webpage.</p> <p>I'm using PHP so that if a particular GET variable has been set (in this case, 'savedsearch') it runs a functions from the external javascript file I'm attaching to the web page.</p> <p>Here's the code I'm using:</p> <pre><code>&lt;?php //check if a saved search has been used if (isset($_GET["savedsearch"])) { $savedsearch=$_GET["savedsearch"]; echo "&lt;script type='text/javascript' src='search.js'&gt; window.onload=sendsearch($savedsearch); &lt;/script&gt;"; } else { echo "&lt;script type='text/javascript' src='search.js'&gt;&lt;/script&gt;"; } ?&gt; </code></pre> <p>This isn't working (doesn't run the function if the savedsearch is set)... is running a functions like this possible?</p> <p>Is there any other way I can do this without having any javascript or PHP in the body of my page?</p> <p>Help appreciated and thanks in advance.</p>
php javascript
[2, 3]
2,939,534
2,939,535
Android UI Thread
<p>i am using threads to do few tasks. and after that i want to access the main thread via runOnUiThread(). but how to determine whether that ui thread still running or not?</p>
java android
[1, 4]
778,822
778,823
Android memory leak tool?
<p>Is there any good visual tool which can be used to detect memory leaks in Android?</p>
java android
[1, 4]
3,924,402
3,924,403
Check for required exact keyword(s) in text (javascript)
<p>I need to be able to check for required keyword(s).</p> <p>Here's what i'm currently using:</p> <pre><code> // Check for all the phrases for (var i = 0; i &lt; phrases.length; i++) { if (value.toLowerCase().indexOf(phrases[i].toLowerCase()) &lt; 0) { // Phrase not found missingPhrase = phrases[i]; break; } } </code></pre> <p>The problem is that it'll say 'random' is fine if 'randomize' is included.</p> <p>I found this: <a href="http://stackoverflow.com/questions/4785340/how-to-check-if-text-exists-in-javascript-var/4785521#4785521">how to check if text exists in javascript var</a> (just an example)</p> <p>But not sure of the best way to incorporate it in jQuery with the possibly to check for multiple keywords.</p>
javascript jquery
[3, 5]
4,986,312
4,986,313
Make a path for create a file in Java (Android)
<p>Given a File object how can I create the path for saving it?</p> <p>I tried file.mkdirs() but for example if the file's path is:</p> <pre><code>/mnt/sdcard/downloads/myapp/temp/song.mp3 </code></pre> <p>it also creates a folder named "song.mp3" inside temp.</p> <p>How can I do it correctly?</p>
java android
[1, 4]
1,640,421
1,640,422
Event not firing on dropdown list when disabled
<p>This client side script is being added to buttons in our existing codebase. It basically shows a pop-up that the system is busy whenever a long running process is occuring. this works fine for buttons, however the btn.disabled = true line causes the SelectedIndexChanged event to never fire(when using it on a button, the click even still fires). If I comment out that line, it fires fine. The object is disabled to prevent double clicking. Any ideas on why its not firing? This code is being registered as a client script block, so any changes affect all of the buttons using this code on a page. </p> <pre><code>@"&lt;script language='javascript' type='text/javascript'&gt; function BB(btn, msg, btnID) { bb1 = new BusyBox('iBB1', 'bb1', 4, '" + ContentImageUrlPath + @"/gears_ani_', '.gif', 125, 147, 207, msg); btn.disabled = true; bb1.Show(); __doPostBack(btnID,''); return false; }&lt;/script&gt;"; </code></pre> <p>Here is the code as seen on the page</p> <pre><code>&lt;select id="foo" onchange="return BB(this, 'Processing','ddlRoadsAssessment'); setTimeout('__doPostBack(\'foo\',\'\')', 0)" name="foo"&gt; </code></pre>
asp.net javascript
[9, 3]
2,145,512
2,145,513
Javascript: How to hijack input type=submit on click behavior?
<p>I got a button: </p> <p>Whenever I click on it, it submits to a form.</p> <p>I want to hijack this behavior, so when I click, it calls a JS function instead. How do I do this? I added:</p> <pre><code>$('input.submit').live('click', addFood); </code></pre> <p>The problem is it still submits to the form. When I remove "type="submit", it works. </p> <p>I don't want to remove the HTML code. it'a also bound to CSS, and I don't want to change CSS because I'm afraid of messing it up =)</p> <p>So question is: how do to change behavior of submit button so it doesn't submit to form but calls my Javascript (JQuery) function?</p>
javascript jquery
[3, 5]
3,634,073
3,634,074
How can I detect DOM ready and add a class without jQuery?
<p>I want to rewrite this line without using jQuery so it can be applied quicker (and before the downloading of the jQuery library). The line is...</p> <pre><code>$(document).ready(function() { $('body').addClass('javascript'); }); </code></pre> <p>If I added it to the <code>html</code> element instead, would I be able to leave off the DOM ready part? One problem with this though is the validator doesn't like the class attribute on the <code>html</code> element, even if it is inserted with JS.</p> <p>So, how would I rewrite that without jQuery?</p>
javascript jquery
[3, 5]
1,019,176
1,019,177
FadeOut, Replace HTML & FadeIn
<p>I'm having a few issues getting a simple JQuery function to work that fades an element out, replaces the image within and fades back in again.</p> <p>My function looks like this:</p> <pre><code>function nextPage() { $("#leftPage").fadeOut("slow", function() { $("#leftPage").html="&lt;img src='page4.jpg'&gt;"; $("#leftPage").fadeIn("slow"); }); $("#rightPage").fadeOut("slow", function() { $("#rightPage").html="&lt;img src='page5.jpg'&gt;"; $("#rightPage").fadeIn("slow"); }); } </code></pre> <p>The fade in/out section works fine but the HTML is not being replaced with the new images. Can you see a problem with this?</p>
javascript jquery
[3, 5]
1,529,920
1,529,921
jQuery selector does not work on dynamic created content in ie7 and ei8
<p>I have this elements on my site which are added dynamically on jQuerys document.ready function.</p> <p>The problem is that I can't select those element using regular jQuery selectors. The JavaScript runs fine in ie9 and other browsers. I think the reason why it does not work is because the content that I'm trying to alter is added dynamically.</p> <p>How do I solve this issue?</p> <p>Code:</p> <pre><code>$('.dynamic').each(function(index) { $('textarea, input[type=radio], input[type=checkbox], select, input[type=text]', this).each(function() { var array = $(this).val().split('|||'); var elements = new Array(); var target = String('.dynamic_'+$(this).attr('id')); $(target).each(function() //this does nothing in ie7 and 8, seems the target selector is messed up :S { elements.push($(this)); }); for (val in array) { var count = Number(val); $(elements[count]).val(array[val]); } }); }); </code></pre> <p>Thanks</p>
javascript jquery
[3, 5]
518,548
518,549
When and why to 'return false' in javascript?
<p>When and why to 'return false' in javascript?</p>
javascript jquery
[3, 5]
650,461
650,462
Continuation of Count difference between two numbers
<p>I have <a href="http://jsfiddle.net/vQnHz/5/" rel="nofollow">this Example</a> which does not work in IE, but works in all other browsers can you take a look. What is the problem here? Note: This is a continuation of <a href="http://stackoverflow.com/questions/7117875/count-number-of-days-between-2-dates-in-javascript">this</a></p> <p><strong>Updated</strong> : The problem is my example works in chrome but gives NaN in IE 8 and firefox 6. </p> <p>My Code</p> <pre><code>var cellvalue="2011-08-18 11:49:01.0 IST"; var firstDate = new Date(); var secondDate = cellvalue.substring(0, cellvalue.length-4); alert(diffOf2Dates(firstDate,secondDate)); function diffOf2Dates(todaysDate,configDate) { /*var udate="2011-08-18 11:49:01.0"; var configDate=new Date(udate);*/ var oneDay = 24*60*60*1000; // hours*minutes*seconds*milliseconds var firstDate = todaysDate; // Todays date var secondDate = new Date(configDate); var diffDays = Math.abs((firstDate.getTime() - secondDate.getTime())/(oneDay)); return Math.ceil(diffDays); } </code></pre> <p><strong>Note: My format</strong></p> <pre><code>2011-08-19 11:49:01.0 IST </code></pre>
javascript jquery
[3, 5]
5,197,779
5,197,780
How to translate java "?" operator in C#?
<p>I would like to know the translation of this java code in C#</p> <pre><code>n = (length &gt; 0) ? Math.min(length, buffer.length) : buffer.length;//Java code </code></pre> <p>Can it be equivalent to this in C# ?</p> <pre><code>if(length &gt;0) { n = Math.min(length, buffer.length); } else { n = buffer.length; } </code></pre>
c# java
[0, 1]
5,422,954
5,422,955
Adding src attribute to <script>
<p>I have this: </p> <pre><code>script_url = 'http://externaldomain.com/script.js' div_id = 'div'+Math.floor(Math.random() * 1000000); document.write('&lt;div id="'+div_id+'"&gt;&lt;scr'+'ipt id="banner-to-load"&gt;&lt;/scr'+'ipt&gt;&lt;/div&gt;') </code></pre> <p>After DOM is ready i do this: </p> <pre><code>$('#banner-to-load').attr('src',script_url) </code></pre> <p>Now, <code>script_url</code> appended, but nothing happens. External script has some functions and <code>document.write</code>, but they don't work. How can i run external script? Or if i run it <code>document.write</code> inside will rebuild my already compiled DOM?</p>
javascript jquery
[3, 5]
254,383
254,384
JQuery function to select checkboxes
<p>I need a function that accepts a parameter with its id example a div and after that loops inside the div to look for checkboxes and if there is/are any checks if its value is checked and returns true if every checkbox is checked returns false.</p>
asp.net javascript jquery
[9, 3, 5]
5,971,198
5,971,199
Temporary disabling a Submit Button
<p>I have a form which upload a big file to server. Something like this:</p> <pre><code>&lt;form id="myform" action="myaction.php"&gt; &lt;p&gt; &lt;!--fields --&gt; &lt;/p&gt; &lt;input type="submit" class="submit" value="Send" /&gt; &lt;/form&gt; </code></pre> <p>I need to prevent the user resubmit the form while the previous processing is not ready. How can I disable submit button before processing and enable the button after submit action?</p>
javascript jquery
[3, 5]
1,367,773
1,367,774
ASP.Net How do I execute a dynamic JavaScript and prevent a postback
<p>I have and ASP button and 2 Labels.</p> <pre><code>&lt;asp:Button runat="server" ID="btnHide" /&gt; &lt;asp:Label runat="server" ID="lblName"&gt;&lt;/asp:Label&gt; &lt;asp:Label runat="server" ID="lblPosition"&gt;&lt;/asp:Label&gt; </code></pre> <p>I have created a dynamic JS script.</p> <pre><code>string jsbtnHide = @"document.getElementByID('" + lblName.ClientID + @"').value = ''; document.getElementByID('" + lblPosition.ClientID + @"').style.display = 'none';"; </code></pre> <p>I assign the script to the button. I've tried both "OnClick" and "OnClientClick".</p> <pre><code>btnHide.Attributes.Add("OnClick", jsbtnHide); </code></pre> <p>However I cannot get the script to execute successfully and without a postback. I've tried adding OnClientClick="return false;" both dynamically and to the ascx file. Dynamically seems to be ignored, though it appears correct in FireBug. OnClick doesn't seem to prevent the Postback. When the script does run, lblName doesn't change to '', haven't got this to work once.</p> <p>What am I doing wrong? I've been at this for days :(</p>
c# javascript asp.net
[0, 3, 9]
4,858,948
4,858,949
How to return false in javascript function from JQuery calling [web method] in asp.net
<p>So in default.aspx I have the code</p> <pre><code> &lt;script type="text/javascript"&gt; function validateForm() { test(); //here should return true or false and exit validateForm so not to run InsertUpdateData() InsertUpdateData() } &lt;/script&gt; &lt;script language="javascript" type="text/javascript"&gt; (function test() { var areaId = 98; $.ajax({ type: "POST", url: "GridViewData.aspx/GetRegions", data: "{areaId:" + areaId + "}", //data:99 , contentType: "application/json; charset=utf-8", dataType: "json", success: function artybones(data) { // alert(data.d); if (data.d == "Foo 98") { alert("its true"); } else { alert("its false"); } } }); }); &lt;/script&gt; </code></pre> <p>in GridViewData.aspx I have</p> <pre><code>&lt;script runat="server"&gt; [WebMethod] public static string GetRegions(int areaId) { return "Foo " + areaId; } &lt;/script&gt; </code></pre> <p>When I call test() from javascript i want it to return false but cant seem to geta value from test. Can someone post the code to do this? I know i am close..thanks in advance to those who post..</p>
c# javascript jquery asp.net
[0, 3, 5, 9]
392,994
392,995
Start a phone call from a service
<p>I am trying to write an android service, to amongst other things, start a phone call. I have got the service to do other things: listen on network, accept a connection, process text and respond with text. I am now trying to set up a call.</p> <p>So far I have, the bit to set up the call is it the extra unnecessary {}, when I paste the code in the extra {} in to the activity that starts this service, the call is set up. The only thing I see different is the context. So what am I doing wrong?</p> <pre><code>public class Service extends android.app.Service { @Override public int onStartCommand(Intent intent, int flags, int startId) { { android.content.Intent intent2 = new android.content.Intent( android.content.Intent.ACTION_CALL, android.net.Uri.parse("tel:012345556789")); this.startActivity(intent2); } return Service.START_NOT_STICKY; } </code></pre> <p>stack</p> <pre><code> Thread [&lt;1&gt; main] (Suspended (exception RuntimeException)) ActivityThread.handleServiceArgs(ActivityThread$ServiceArgsData) line: 2673 ActivityThread.access$1900(ActivityThread, ActivityThread$ServiceArgsData) line: 141 ActivityThread$H.handleMessage(Message) line: 1331 ActivityThread$H(Handler).dispatchMessage(Message) line: 99 Looper.loop() line: 137 ActivityThread.main(String[]) line: 5039 Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method] Method.invoke(Object, Object...) line: 511 ZygoteInit$MethodAndArgsCaller.run() line: 793 ZygoteInit.main(String[]) line: 560 NativeStart.main(String[]) line: not available [native method] </code></pre>
java android
[1, 4]
2,767,026
2,767,027
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>&lt;input type="text" id="surname" name="surname" size="10" /&gt;&lt;a href="javascript:surname();"&gt;Surname&lt;/a&gt; &lt;input type="text" id="forename" name="forename" size="10" /&gt;&lt;a href="javascript:forename();"&gt;Forename&lt;/a&gt; &lt;table id = "t" visible="false" runat="server"&gt; &lt;tr&gt; &lt;th&gt;Surname&lt;/th&gt; &lt;th&gt;Forename&lt;/th&gt; &lt;th&gt;D.O.B&lt;/th&gt; &lt;/tr&gt; &lt;/table&gt; </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]
792,134
792,135
Javascript/jQuery to resize randomly the pictures on load?
<p>Instead of creating thumbnails for my images, I would like to show the original images in my page. For viewing purposes, I still need to resize these images but instead of adding a <code>width:200px</code> on them, I want to display each image in a div container but with size randomly chosen from three choices.</p> <p>These 3 types of div containers (and therefore the images appearance) will have 3 different sizes, all with the same width. 300x100, 300x200, 300x400.</p> <p>Of course, upon refresh, the images may have a different size now.</p> <p>How can I do this ?</p>
javascript jquery
[3, 5]
3,951,643
3,951,644
"super of super" in extented classes (alter variable in super class of super class)
<p>The question is more Java, but I want to implement it in Android:</p> <p>Suppose there are 3 or more classes extending each other:</p> <pre><code>class A { ... int color; ... } class B extends A { ... } class C extends B { ... // I want to alter color of class A inside here } </code></pre> <p>Is this possible without setting a <code>super.color = 4</code> in <code>C</code> and setting another <code>color=4</code> and <code>super.color = 4</code> in <code>B</code>??</p> <p>e.g. is it possible to write something like <code>super(super(color=3))</code> within class C ?</p>
java android
[1, 4]
933,370
933,371
Convert ASP.net source code to PHP
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1291985/how-to-convert-php-source-code-to-asp-net-code">How to convert Php source code to Asp.net code</a> </p> </blockquote> <p>Can we convert ASP.net source code into PHP .</p> <p>Any helpful answered much appreciated .</p> <p>Thanks Regal Singh</p>
php asp.net
[2, 9]
4,726,932
4,726,933
Want to change image src of ImageButton using javascript on client click
<p>I tried this first which is not working:</p> <pre><code>&lt;asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="minus.gif" OnClientClick="this.src='plus.gif';"/&gt; </code></pre> <p>Another method:</p> <pre><code>&lt;asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="minus.gif" OnClientClick=" return changeImg(this)"/&gt; function changeImg(cnt) { if(cnt.src='minus.gif') { cnt.src='plus.gif'; } else { if(cnt.src='plus.gif') { cnt.src='minus.gif'; } } return false; } &lt;/script&gt; </code></pre>
javascript asp.net
[3, 9]
1,176,414
1,176,415
How to respond without html in asp.net
<p>Easy question perhaps.</p> <p>Okay, I have a post to my page and need to respond with one string. </p> <p>in php, you could simply do something like this:</p> <pre><code>&lt;?php die ("test"); </code></pre> <p>then you can place this page on a webserver and access it like this:</p> <pre><code>localhost/test.php </code></pre> <p>so, I need to do exact same thing in c#.</p> <p>When I try to respond with:</p> <pre><code> protected void Page_Load(object sender, EventArgs e) { Response.Write("test"); Response.End(); } </code></pre> <p>I'm getting: <code>"&lt;html&gt;&lt;head&gt;&lt;style type="text/css"&gt;&lt;/style&gt;&lt;/head&gt;&lt;body&gt;test&lt;/body&gt;&lt;/html&gt;"</code> as a response.</p> <p>How can I make asp.net to just return exact response, without html?</p> <p>I know that I probably missing some basic knowledge, but cannot find anything online.</p>
c# asp.net
[0, 9]
3,419,346
3,419,347
asp.net pass sender to server with jquery
<p>I want to call a C# function in my aspx.cs file with jQuery. The function looks like:</p> <pre><code>protected void Fill(object sender, EventArgs e) { ...do s.th. with sender... } </code></pre> <p>in the function im getting my control I want to work with by doing a cast on the sender. How to pass the sender to server with jquery?</p>
c# asp.net
[0, 9]
4,817,614
4,817,615
progressdialog preventing contentview switch?
<p>Whenever I attempt to set content view after dismissing the progress dialog I get an error like... </p> <p>04-13 14:40:38.043: WARN/System.err(801): android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. 04-13 14:40:38.073: WARN/InputManagerService(59): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@44dde3f0</p> <p>My code is like...</p> <pre><code>ProgressDialog dialog = null; //class variable. dialog = ProgressDialog.show(Login.this, "", "Logging you in. Please wait...", true); new Thread() { public void run() { try{ //serious work here! } dialog.dismiss(); setContentView(R.layout.blaa); } catch (Exception e) { e.printStackTrace(); } } }.start(); </code></pre> <p>What's causing this?</p>
java android
[1, 4]
3,481,885
3,481,886
Dynamically change MasterPage and ContentPlaceHolderID of asp content tag?
<p>I have a page which initially inherited from MastePage.master . And I want to use the same page but with different masterpage(MasterPage2.master) at some other place in my project. For that I am using the following code.</p> <pre><code>private void Page_PreInit(object sender, EventArgs e) { if (Request.QueryString["Update"].ToString() == "New") { this.MasterPageFile = "MasterPage2.master"; Content con = new Content(); con = (Content)this.FindControl("Content1"); this.Content1.ContentPlaceHolderID = "ContentPlaceHolder2"; } } </code></pre> <p>I am also trying to set the asp content tag's ContentPlaceHolderID to ContentPlaceHolder2 which is from MasterPage2.master. Initially it was ContentPlaceHolder1.</p> <p>But I am getting null value at con = (Content)this.FindControl("Content1");</p> <p>Thanks</p>
c# asp.net
[0, 9]
1,940,127
1,940,128
How can I implement a countdown timer in an ASP.NET page?
<p>I want to show a countdown timer on the top right corner of my ASP page. It should start from 00:00:30 and decrement it to 00:00:00. Then it again start from 30 sec. </p> <p>Can anyone help me?</p>
javascript asp.net
[3, 9]
1,079,496
1,079,497
trigger failure in jquery trigger
<pre><code>$(document).ready(function(){ jQuery("#but1").bind("click",function(e){ alert(e.name); }); jQuery("#but1").trigger({name:'Dmy', surname:'My'}); }); </code></pre> <p>The alert fails to pass the data, why is that?!? the alert says 'undefined'. </p> <p>What am I doing wrong, why I fail to pass the data?</p> <p><a href="http://jsfiddle.net/RTXxY/23/" rel="nofollow">JSFiddle</a> here.</p>
javascript jquery
[3, 5]
1,754,132
1,754,133
Validation on confirming Alert
<p>Script</p> <pre><code>&lt;script language="javascript" type="text/javascript"&gt; function FinalFunction() { //Your First Script return confirm('Are you sure about to submit the test?'); } &lt;/script&gt; &lt;asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="javascript:FinalFunction();" OnClick="Button1_Click" /&gt; </code></pre> <p>This script is showing the confirmation alert message but either on clicking OK or Cancel Button, the page is redirecting to another page.</p> <p>What I want is when I click on the Cancel Button, the page should be on same page, it should not redirect to another page.</p> <p>How do I do it?</p>
c# javascript asp.net
[0, 3, 9]