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 |
---|---|---|---|---|---|
1,065,811 | 1,065,812 | how to pass value from asp.net server control using jQuery? | <p>I UPDATED the code with code behind. I'm doing something dynamic with the label contrtol.</p>
<p>I have the following jQuery code working as it is (passing the value of 'test") but what I want to do is to pass the value of the label control (lblNames). I'm using the label control to collect the uploaded file names. Is there a way?</p>
<p>jQuery:</p>
<pre><code>$(document).ready(function () {
$("#btnUpload").click(function () {
$("#Notes", top.document).val('test');
});
});
</code></pre>
<p>ASPX code:</p>
<pre><code><asp:Label ID="lblNames" runat="server" visible="true" ></asp:Label>
</code></pre>
<p>Code Behind:</p>
<pre><code> Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpload.Click
Dim fileExt As String
fileExt = System.IO.Path.GetExtension(FileUpload1.FileName)
If (fileExt <> ".exe") Then
Dim fileNames As New List(Of String)
Try
Dim hfc As HttpFileCollection = Request.Files
lblFiles.Text = String.Empty
lblNames.Text = String.Empty
For i As Integer = 0 To hfc.Count - 1
Dim hpf As HttpPostedFile = hfc(i)
If hpf.ContentLength > 0 Then
fileNames.Add(hpf.FileName)
hpf.SaveAs(Server.MapPath("/directory") & "\" & System.IO.Path.GetFileName(hpf.FileName))
lblFiles.Text += "<b>File: </b>" & hpf.FileName & " " & " Uploaded Successfully! <br />"
lblNames.Text += hpf.FileName & ", "
Else
lblWarning.Text = "Please choose a file to upload."
End If
Next i
Catch ex As Exception
End Try
</code></pre>
| asp.net jquery | [9, 5] |
649,106 | 649,107 | How to write a script when successful online Order made ,sends receipt to network printer?? | <p>Is there a script that when someone places a successful online order, it will send a command to a network printer to print of a receipt of the order?</p>
| php javascript | [2, 3] |
5,178,111 | 5,178,112 | Jquery increment numbers with a limit of 5 | <p>I'm adding text fields with a onclick. What I'm trying to do is limit the amount of boxes to about 5.</p>
<p>I also need to increment the number to use as an ID.</p>
<p>my code: </p>
<pre><code>jQuery('#add_slider_image').click(function() {
var i = 0
var plus = ++i;
jQuery('.form-table').append("<tr><td><input type'text' value='' name='slider[]' /><input type='button' name='sliderbut' value='Upload' id='button' rel='"+ plus +"' /></td><tr>");
var count = jQuery.('#button').attr('rel');
if(count=5){
alert('Limit reached');
}
})
</code></pre>
<p>THanks</p>
| javascript jquery | [3, 5] |
994,381 | 994,382 | How to capture android screen and stored it in GIF formate? | <p>i have one animated GIF file in my screen and it is animated perfectly in my screen and now i want to capture screen programatically of my application with the animated GIF so how can we do it?</p>
| java android | [1, 4] |
4,138,052 | 4,138,053 | Format number with locale specific settings | <p>I want that JS or jQuery formats my number by locale.</p>
<p>So for example number 999666555444333.22</p>
<p>might be as</p>
<pre><code>999'666'555'444'333.22
</code></pre>
<p>or </p>
<pre><code>999.666.555.444.333,22
</code></pre>
| javascript jquery | [3, 5] |
1,386,839 | 1,386,840 | How to use an array value as field in Java? a1.section[2] = 1; | <p>New to Java, and can't figure out what I hope to be a simple thing.</p>
<p>I keep "sections" in an array:</p>
<pre><code>//Section.java
public static final String[] TOP = {
"Top News",
"http://www.mysite.com/RSS/myfeed.csp",
"top"
};
</code></pre>
<p>I'd like to do something like this:</p>
<pre><code>Article a1 = new Article();
a1.["s_" + section[2]] = 1; //should resolve to a1.s_top = 1;
</code></pre>
<p>But it won't let me, as it doesn't know what "section" is. (I'm sure seasoned Java people will cringe at this attempt... but my searches have come up empty on how to do this)</p>
<p><strong>Clarification:</strong></p>
<p>My article mysqlite table has fields for the "section" of the article:</p>
<pre><code>s_top
s_sports
...etc
</code></pre>
<p>When doing my import from an XML file, I'd like to set that field to a <code>1</code> if it's in that category. I could have switch statement:</p>
<pre><code>//whatever the Java version of this is
switch(section[2]) {
case "top": a1.s_top = 1; break;
case "sports": a1.s_sports = 1; break;
//...
}
</code></pre>
<p>But I thought it'd be a lot easier to just write it as a single line:</p>
<pre><code>a1["s_"+section[2]] = 1;
</code></pre>
| java android | [1, 4] |
491,270 | 491,271 | Similar to Pass in Python for C# | <p>In python we can .. </p>
<pre><code>a = 5
if a == 5:
pass #Do Nothing
else:
print "Hello World"
</code></pre>
<p>I wonder if it a similar way to do this in C#</p>
| c# python | [0, 7] |
290,575 | 290,576 | Can i put a background for any particular activity in emulator? | <p>I want to give a background image to my application. Please suggest me the solution.</p>
| java android | [1, 4] |
349,910 | 349,911 | save changes function returning element exists in the <ModificationFunctionMapping> element | <p>I have LINQ query where I am using a join and getting results in annonymous type like this:</p>
<pre><code> var DropShipEmailNotices =from c in context.WC_DropShipEmailNotices
join o in context.Nop_Order on c.orderid equals o.OrderID
select new { c, o };
</code></pre>
<p>Then I loop the records and trying to update the datetime of WC_DropShipEmailNotices</p>
<pre><code> foreach (var notices in DropShipEmailNotices.ToList())
{
.......
......
notices.c.EmailTimeStamp = DateTime.Now;
context.SaveChanges();
}
</code></pre>
<p>but I am getting this exception on save changes:</p>
<pre><code>Unable to update the EntitySet 'WC_DropShipEmailNotices' because it has a DefiningQuery and no <UpdateFunction> element exists in the <ModificationFunctionMapping> element to support the current operation.
</code></pre>
<p>How to fix it ?</p>
| c# asp.net | [0, 9] |
3,499,001 | 3,499,002 | Calling a Javascript function after AJAX call | <p>I have a javascript function to which I am being passed a functionName that I need to call after making a ajax call. The ajax call is returning some html that contains a reference to a js file. The functionName being passed to my funtion is in the html but it is referencing an object in the js file. What I am noticing that the object sometimes exists and sometimes doesnt. Is there a way to ensure that the object always exists(or wait till it exists) and then only call the javascript function. Please note that I have no idea what the object variable is, so is there a way to ensure that the script file has been loaded in dom and then make the call to the function.</p>
<pre><code> function(functionName)
{
$.ajax({
url: properties.url,
type: properties.type,
data: properties.data,
dataType: properties.format,
success: function (data) {
// data contains <div>myname</div><script src="/myfile.js" type="text/javascript"></script>
// Put the data in some div
BindData(data);
// How to ensure that the script myfile.js is loaded in dom before I call eval
eval(functionName);
} );
}
</code></pre>
| javascript jquery | [3, 5] |
1,707,320 | 1,707,321 | C# Null reference when parsing a float | <p>I have the following code below. Which works great expect I want to allow MaxDemand to be a null value. But since i'm parsing a string it seems to error if I don't put in some value.</p>
<p>Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.</p>
<p>Whats the best solution to implement an error handling solution? I tried float.TryParse but can't get that to work.</p>
<p>Thank you for looking over my issue.</p>
<pre><code> protected void GridView3_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
float Cost = 0.0F;
float Consumption = 0.0F;
int InvoiceID = 0;
float MaxDemand = 0.0F;
DateTime ServiceFrom = new DateTime();
DateTime ServiceTo = new DateTime();
foreach (string key in e.NewValues.Keys)
switch (key)
{
case "TotalInvoice": Cost = float.Parse(e.NewValues[key].ToString());
break;
case "EnergyInvoiceID": InvoiceID = int.Parse(e.NewValues[key].ToString());
break;
case "Consumption": Consumption = float.Parse(e.NewValues[key].ToString());
break;
case "ServiceFrom": ServiceFrom = DateTime.Parse(e.NewValues[key].ToString());
break;
case "ServiceTo": ServiceTo = DateTime.Parse(e.NewValues[key].ToString());
break;
case "MaxDemand": MaxDemand = float.Parse(e.NewValues[key].ToString());
break;
}
UpdateInvoice(InvoiceID, Cost, Consumption, ServiceFrom, ServiceTo, MaxDemand);
GridView3.EditIndex = -1;
PopulateAccountHistory();
}
</code></pre>
| c# asp.net | [0, 9] |
1,203,875 | 1,203,876 | How to handle image click under Button click event | <p>Hi all i am having 2 imagebuttons a gridview and a button. Now if i clicked on Image button i will show a grid. Now under button click i would like to capture which image button was clicked if 1st image button is clicked i would like to some values and if 2nd one is clicked i would like to show another</p>
| c# asp.net | [0, 9] |
701,020 | 701,021 | Extract an image from a video hosted on a web site | <p>I need to extract an image/thumbnail from a video hosted on some website. For exemple, the host could be youtube.com or whatever.com and i want to extract an image for a precise frame, i.e 2:12. </p>
<p>I have the direct URL for the video. I searched and found how to do it for youtube or vimeo, they provide xml or json with a path to the thumbnail. However i can't find how to do it for a web site that doesn't provide those informations.</p>
<p>Ive downloaded FFmpeg, but it doesn't seem to offer to extract an image from a video hosted on some web site.</p>
<p>Any other tool or any idea to make a tool myself ?</p>
<p>Thanks</p>
| c# asp.net | [0, 9] |
701,898 | 701,899 | disabling an input button | <p>I want to disable this button on document ready but I'm new to it so please help:</p>
<p>Here is my code: </p>
<pre><code> $(document).ready function {
setTimeout("check_user()", 250);
}
</code></pre>
<p>please help</p>
| javascript jquery | [3, 5] |
799,370 | 799,371 | Files accessed by aspx webforms and socket server. Lock file management issues | <p>I got a primitive website, where the aspx webform and socket server access flat files, which stores the data. The socket server writes the data to the file with File.Write calls and the aspx webform uses File.Readln calls to read the data from the file. Both the web form and socketserver will be accessing the same exact files to read and write. I think there may be an issue with locking the files. I think it is the higher priority for the server to quick write to the file and release any lock on the file. The webform should be able to read without interrupting the writing process of the server. What is the best way to do this? Is it with the using streamwriter?</p>
<p>Any help is appreciated.</p>
| c# asp.net | [0, 9] |
549,187 | 549,188 | How to expend ListView on whole screen on Android? | <p>I have ListView, but it takes up little space and contains scroll. But I need to disable scroll, that ListView take up whole screen. How can I do it? </p>
<p>I need to make list like this: <a href="https://market.android.com/details?id=com.cineplex.app" rel="nofollow">https://market.android.com/details?id=com.cineplex.app</a> (2 picture from right). How can I do it? </p>
| java android | [1, 4] |
4,767,555 | 4,767,556 | jQuery - Library or Framework? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/7062775/is-jquery-a-javascript-library-or-framework">Is jquery a javascript library or framework?</a> </p>
</blockquote>
<p>jQuery: The Write Less, Do More, JavaScript <strong>Library</strong>.</p>
<p>Why do people call it a framework when it clearly isn't? Also, why does jQuery call itself a library and Mootools calls itself a framework?</p>
<p>I'm in a debate. Mootools, jQuery, Prototype, they are libraries. Are they not?</p>
| javascript jquery | [3, 5] |
2,658,668 | 2,658,669 | Add item in order to a list | <p>What is the best way to add an item to an ordered list?</p>
<p>I want that when an item changes the value the value of that control is placed on a list.</p>
<p>Example</p>
<p>-radiobutton value = radiobuttonvalue;<br>
-checkbox value = checkboxvalue;<br>
-textbox value = textboxvalue;<br></p>
<p>clicks: first on the checkbox than radiobutton and last textbox.</p>
<p>output:<br></p>
<pre><code><ul>
<li>radiobuttonvalue</li>
<li>checkboxvalue</li>
<li>textboxvalue</li>
</ul>
</code></pre>
<p>so i that it doen't matter in wich control is clicked first, the output is always in the same order.</p>
| javascript jquery asp.net | [3, 5, 9] |
1,965,768 | 1,965,769 | QueryString Link | <p>I have the following code which works for a postbackurl on a button. What I need to do is do something similar, but with an:</p>
<pre><code><a href></a>
</code></pre>
<p>in asp.net. How can I do that? Thanks for your help!</p>
<pre><code><a href="negativestorydetail.aspx?tag=<%# Eval("Tag") %>" style="color: #ff0000; text-align: center; margin: 15px; line-height: 30px; text-decoration:none; font-size: <%# GetTagSize(Convert.ToDouble(Eval("weight"))) %>"><%# Eval("Tag") %></a>
</code></pre>
<p>C# CODE:</p>
<pre><code>protected string GenerateLinkDetails(object companyId, object projectName, object projectId) {
return string.Format("~/projectdetails.aspx?guid={0}&name={1}&role={2}&member={3}&company={4}&project={5}&proj_id={6}", id, name, company_role, mem_id, companyId, projectName, projectId);
}
</code></pre>
<p>ASP.NET CODE:</p>
<pre><code><asp:Button ID="LinkButtonDetails" runat="server" Text="DETAILS" PostBackUrl='<%# GenerateLinkDetails(Eval("CompanyID"), Eval("ProjectName"), Eval("ProjectID")) %>' />
</code></pre>
| c# asp.net | [0, 9] |
1,034,664 | 1,034,665 | jQuery Color Plugin - $.Color is not a function error | <p>I am trying to make the example from <a href="https://github.com/jquery/jquery-color" rel="nofollow">jquery-color</a> work, but it's giving me the <code>$.Color is not a function</code> error. What am I doing wrong?</p>
<p>Relevant code bit:</p>
<pre><code>$("#sat").click(function(){
$("#block").animate({
backgroundColor: $.Color({ saturation: 0 })
}, 1500 );
});
</code></pre>
| javascript jquery | [3, 5] |
3,198,859 | 3,198,860 | How to fade out text when it is about to move out of visual range? | <p>How to fade in and out text when it is about to move out of visual range? Maybe the question is a little bit vague, but what I mean is this:</p>
<p><img src="http://i.stack.imgur.com/0lQRR.png" alt="fade in or out when text is to be out of visual range"></p>
<p>How do I achieve that? Perhaps with jQuery or something?</p>
| javascript jquery | [3, 5] |
1,821,496 | 1,821,497 | modal close button | <p>I have a div which is in a class="modal", and I written a function in jQuery that closes this div when i press "esc" :</p>
<pre><code>$(document).keypress(function (e) {
if (e.keyCode == 27) {
if ($('.modal:visible > .icon32').length) $('.modal:visible > .icon32')[0].click();
}
});
</code></pre>
<p>everything works perfect in firefox, but in chrome does not, what could cause this problem?</p>
| javascript jquery asp.net | [3, 5, 9] |
370,997 | 370,998 | Android must have Expandableview whose id is | <blockquote>
<p>Your content must have a ExpandableView whose id is attribute is
'android.R.list'</p>
</blockquote>
<p>This is the error message I am getting from Logcat. Which is confusing me as my XML is this</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ExpandableListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</LinearLayout>
</code></pre>
| java android | [1, 4] |
3,337,894 | 3,337,895 | Label in gridview changes but change does not postback | <p>I have a gridview with a label, along with some JavaScript and jQuery to make the label editable.</p>
<p>However, when I postback and debug in my code behind I do not see the change.</p>
<p>How can I make it so I can get the change on the server?</p>
<pre><code><asp:GridView ID="gvGroups" runat="server" AutoGenerateColumns="False"
CssClass="table table-hover table-striped" GridLines="None" >
<Columns>
<asp:TemplateField HeaderText="Name" SortExpression="GroupDescription">
<ItemTemplate>
<asp:Label ID="lblName" CssClass="edit" runat="server" Text='<%# Eval("GroupDescription") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
function makeLabelsEditable() {
$(".edit").focusout(function () {
setLabel(this);
});
$(".edit").click(function () {
editLabel(this);
});
}
function editLabel(source) {
source.innerHTML = '<input type="text" maxlength="40" value="' + source.innerHTML + '"/>';
$(source).unbind('click');
source.children[0].focus()
}
function setLabel(source) {
if (source.children[0].value != '') {
$(source).click(function () {
editLabel(this);
});
source.innerHTML = source.children[0].value;
}
}
</code></pre>
| c# javascript asp.net | [0, 3, 9] |
3,504,612 | 3,504,613 | namespace conflict | <p>I got:</p>
<pre><code>using System.Diagnostics;
using System.Reflection;
namespace Site
{
public abstract class General
{
private static string _version;
public static string Version { get { return _version; } }
static General()
{
Assembly assembly = Assembly.GetExecutingAssembly();
FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo(assembly.Location);
_version = fileVersionInfo.ProductVersion;
}
}
}
</code></pre>
<p>The code works fine and I can get the version anywhere I need accessing <code>Site.General.Version</code>. Now I'm trying to use the inline tag <code><% = Site.General.Version %></code> but I'm getting a error message saying <code>System.ComponentModel.ISite</code> does not contain a definition or 'General'.... I think there's a namespace conflict because of the <em>interface</em> <code>ISite</code>.</p>
<p>How can I solve this?</p>
| c# asp.net | [0, 9] |
3,409,075 | 3,409,076 | jQuery Tree View and wp_list_pages | <p>I'm looking to use the <a href="http://www.dynamicdrive.com/dynamicindex1/treeview/index.htm" rel="nofollow">jQuery TreeView</a> script on wp_list_pages to get a nice collapsable-tree effect going. </p>
<p>The script requires that I add some classes to the list elements such as:</p>
<pre><code><ul id="red" class="treeview-red">
</code></pre>
<p>So I tried putting this in my template:</p>
<p>First, load scripts on my template page via wp_enqueue_script() </p>
<pre><code>wp_enqueue_script("av_jquery_tree");
get_header();
</code></pre>
<p>Where "av_jquery_tree" is defined in a plugin:</p>
<pre><code>function av_jquery_tree() {
wp_register_script('jquery.treeview', get_template_directory_uri() . '/js/jquery.treeview/jquery.treeview.js', array('jquery'), '1.0' );
wp_register_script('jquery.cookie', get_template_directory_uri() . '/js/jquery.treeview/jquery.cookie.js', array('jquery'), '1.0' );
wp_enqueue_script('jquery.treeview');
wp_enqueue_script('jquery.cookie');
}
add_action('wp_enqueue_scripts', 'av_jquery_tree');
</code></pre>
<p>Second, In order to add the class and id to the first ul element on the page, I just insert this script above the call to wp_list_pages:</p>
<pre><code><script>
jQuery(document).ready(function(){
jQuery("ul").first().attr("id", "red").addClass("treeview-red");
});
</script>
</code></pre>
<p>Unfortunately, my output is just a bunch of red lines across wp_list_pages. Also keep in mind that I'm using the Suffusion Theme, which <a href="http://aquoid.com/forum/viewtopic.php?f=4&t=7466&p=32243#p32243" rel="nofollow">preloads jquery</a>.</p>
| jquery javascript | [5, 3] |
5,252,867 | 5,252,868 | jQuery querystring | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/901115/get-querystring-with-jquery">get querystring with jQuery</a> </p>
</blockquote>
<p>How do I get the value of a querystring into a textbox using jQuery?</p>
<p>Lets say the url is <a href="http://intranet/page1.php?q=hello" rel="nofollow">http://intranet/page1.php?q=hello</a></p>
<p>I would like the "hello" to be in the textbox.</p>
| javascript jquery | [3, 5] |
3,098,466 | 3,098,467 | jQuery 1.6.1 add a new node in XML | <p>jsFiddle URL : <a href="http://jsfiddle.net/rcrathore/Y8DpM/" rel="nofollow">http://jsfiddle.net/rcrathore/Y8DpM/</a></p>
<p>I am trying to add a new node in XML using jQuery. Following code works fine in Firefox, Safari and Chrome but giving error in IE8:</p>
<pre><code> <div id="result"> </div>
<div id="result2"> </div>
<script type="text/javascript">
<!--
var xml = "<root><node1><node2>TEXT1</node2></node1></root>" ;
var $xml = $($.parseXML(xml)) ;
var newData = "<node3>234</node3>" ;
var $newData = $($.parseXML(newData));
var newNode = null;
if (typeof document.importNode == 'function') {
newNode = document.importNode($newData.find('node3').get(0),true);
} else {
newNode = $newData.find('node3').get(0)
}
try {
$(newNode).appendTo($xml.find("node2"));
/* expected TEXT1234*/
$("div#result").html($xml.text());
/* expected 234*/
$("div#result2").html($xml.find("root > node1 > node2 > node3").text());
} catch (e) {
alert(e) ;
$("div#result").html("Error: " + e.description);
}
//-->
</script>
</code></pre>
<p>The error description on IE8 is "Wrong number of arguments or invalid property assignment". </p>
<p>Is there a way to fix this on IE8?</p>
| javascript jquery | [3, 5] |
3,960,396 | 3,960,397 | Android How to set String array into a single textview | <p>I'd like to try to set string array as text of the textview. How can I do that?</p>
<p>Below is what I've tried so far:</p>
<pre><code>String[] word = { "Pretty", "Cool", "Weird" };
tv.setText( word.length );
</code></pre>
<p>But it's throwing some errors. I'm new to Android/Java</p>
| java android | [1, 4] |
539,610 | 539,611 | Create new div arround anchor link when clicked | <p>How can I achieve this behaviors onclick with jquery :</p>
<p><strong>default state:</strong></p>
<pre><code><a href="something.html">Anchor</a>
</code></pre>
<p><strong>click state</strong></p>
<pre><code><div class="highlight">
<a href="something.html">Anchor</a>
</div>
</code></pre>
| javascript jquery | [3, 5] |
4,539,043 | 4,539,044 | jQuery Set Cursor In Home Key | <p>I want after type two number in filed append <code>/</code> and set cursor in home. </p>
<p>My mean of the home is, <code>Home</code> key on the keyboard :
<img src="http://www.barcodeman.com/altek/mule/kbemulator/keypics/key.home.up.png" alt="enter image description here"></p>
<p>I try as: (In my code instead run Home key this adding <code>$</code>)</p>
<pre><code><input type="text" class="num" maxlength="2"/>
$(".num").keypress(function(e){
var val = this.value;
var value = val + String.fromCharCode('36');
(val.length == '2') ? $(this).val(value+'/') : '';
});
</code></pre>
<p><strong>DEMO:</strong> <a href="http://jsfiddle.net/3ePxg/" rel="nofollow">http://jsfiddle.net/3ePxg/</a></p>
<p>How can done it?</p>
| javascript jquery | [3, 5] |
994,104 | 994,105 | milliseconds to UNIX timestamp | <p>Anyone have any idea how I would go about converting a timestamp in milliseconds from 1970 (from android's System.currentTimeMillis();) to a UNIX timestamp? It need only be accurate to the day.</p>
<p>I figure I could divide by 1000 to get seconds, and then divide by 86 400 (number of seconds in a day) to get the # of days. But I'm not sure where to go from there.</p>
<p>Many thanks.</p>
| java android | [1, 4] |
636,232 | 636,233 | Call javascript function on page_load event | <p>In asp.net website, inside <strong>.aspx</strong> i have following code</p>
<pre><code><script type="text/javascript">
function callme(option) {
document.getElementById("t1").value = option;
}
</script>
<div id="content" runat="server"></div>
<input type="text" id="t1" />
</code></pre>
<p>On code behind file inside <strong>Page_Load</strong>:</p>
<pre><code>content.InnerHtml = MyClassObject.MyMethod(...);
</code></pre>
<p>Inside <strong>MyClass</strong>:</p>
<pre><code>public String MyMethod(...)
{
... //some code
String str1 ="<select id=\"s1\" onchange=\"callme(this.value)\">" +
" <option value=\"1\">One</option>"+
" <option value=\"2\">Two</option>" +
" <option value=\"3\">Three</option>" +
"</select>";
... // some code
return str1;
</code></pre>
<p>Whenever i select any option from dropdownlist it reflects its value inside the textbox t1.
But at page load the textbox remains empty. I cannot use default value as the values of the dropdownlist are changing at runtime.
How can I add first value of dropdownlist to textbox t1 on page load?</p>
| javascript asp.net | [3, 9] |
1,190,488 | 1,190,489 | Drawing a line between 2 divs | <p>I need to draw a line between 2 divs. I currently use jQuery.</p>
<p>The following is my HTML code. I need to draw a line from the div with id <code>friend1</code> to the div with id <code>friend2</code>.</p>
<pre><code><div style="top:30px;left:95px" id="friend1" original-title="Rafael Rosenberg1">
<a href="./profile.php?id=1"><img src="http://graph.facebook.com/100000796250125/picture" border="0" height="50" width="50"/></a>
</div>
<div style="top:30px;left:250px" id="friend2" original-title="Rafael Rosenberg2">
<a href="./profile.php?id=1"><img src="http://graph.facebook.com/100000796250125/picture" border="0" height="50" width="50"/></a>
</div>
</code></pre>
| javascript jquery | [3, 5] |
5,778,770 | 5,778,771 | jQuery addClass Issue - trying to find an element by ID | <p>I have a menu which links to anchors on the page. There are a couple of additional pages that can also link back to the home page with these anchors on.</p>
<p>I have some jQuery which changes the color of a menu item when it clicked. So if I click on About on the homepage, it goes to the about anchor and highlights about in blue. If I click on about from the blog page though, it goes to the home page, and the about anchor but it doesn't highlight the menu item as that jQuery is only triggered by a click event. I am trying to therefore manually trigger the highlight when page loads if it sees an anchor in the URL.</p>
<p>The HTML is:</p>
<pre><code><ul id="navigation">
<li id="item_0"><a href="#home" class="active">Home</a></li>
<li id="item_1"><a href="#about">About</a></li>
<li id="item_2"><a href="#projects">Projects</a></li>
<li id="item_3"><a href="#locate">Locate</a></li>
<li id="item_4"><a href="/blog">Blog</a></li>
</ul>
</code></pre>
<p>As you can see - the class="active" is applied to < a> tag of the active menu item.</p>
<p>I'm trying to use the following jQuery JS to check on page load for anchor tags, and highlight the relevant one.</p>
<pre><code>$(document).ready(function(){
var hash = window.location.hash;
switch(hash){
case "#about":
$('#navigation li a').removeClass("active");
$('item_1', '#navigation li a').addClass('active');
break;
}
});
</code></pre>
<p>Can anyone help with whats going wrong?</p>
<p>Thanks in advance for your help!</p>
| javascript jquery | [3, 5] |
2,823,031 | 2,823,032 | how apply Theme in dynamically master Page? | <p>is there override PreInit in Master Page? or Inheritance of PreInit Possible in MasterPage?</p>
| c# asp.net | [0, 9] |
2,047,802 | 2,047,803 | CMS Controlled Android Application? | <p>Is this possible? creating an application that a person can add details or announcement via CMS? </p>
| java android | [1, 4] |
1,640,169 | 1,640,170 | How to shorten URL's with YOURLS in Python | <p>I am using a Twitter Client called Polly (for Ubuntu 12.10) and it lacks one feature I like to have. The ability to shorten URL's with YOURLS.</p>
<p>I know of another Twitter Client (Hotot) that has this ability, but Hotot is written in Javascript, while Polly is written in Python.</p>
<p>I am a (beginner) Web Designer, and do know computer programming. I was wondering if there was a way to convert Javascript to Python?</p>
| javascript python | [3, 7] |
4,960,334 | 4,960,335 | Unknown character / word | <pre><code>Sentences :
Test Your Skills 1, ... 2, ... 3, ....
Specify Your Skills 1, ..2, ...3, ....
Check Your Skills 1, ..2, ...3, ....
</code></pre>
<p>..</p>
<pre><code>restofsentence="Your Skills"+ ? ;
String test = "Test" + restofsentence
String specify = "Specify" + restofsentence
String check = "Check" + restofsentence
</code></pre>
<p>How can I define restofsentence variable, "?" must define any number</p>
<p>'test = "Test Your Skills 6" ', 'test = "Test Your Skills 36" ' all must be pair without using loop because we dont know last number</p>
| java android | [1, 4] |
3,681,643 | 3,681,644 | efficiency of jquery toggler | <p>Here's the link to my code: <a href="http://jsbin.com/edago3/edit" rel="nofollow">http://jsbin.com/edago3/edit</a></p>
<p>I would love to find out what improvements could be made to make it smaller and more efficient.</p>
<p>Any help is appreciated.</p>
| javascript jquery | [3, 5] |
2,768,891 | 2,768,892 | Prevent function from running while user is scrolling | <p>How can I do something like this?</p>
<pre><code>myfunction () {
if (notscrolling) {
// do stuff
}
}
</code></pre>
<p><strong>This is the best solution that I could find:</strong></p>
<p>It gets the current scroll position, then gets it again 5 milliseconds later. If the numbers are the same, then the page is not scrolling! No global variable required.</p>
<pre><code>myfunction () {
var a = $(document).scrollTop();
setTimeout(function() {
var b = $(document).scrollTop();
if (a === b) {
// do stuff here cuz its not scrolling :) !!!!
}
}, 5);
}
</code></pre>
| javascript jquery | [3, 5] |
5,479,236 | 5,479,237 | How can I make a box hide when mouse hovers other element | <p>Im making a webpage and at the moment it has a full screen background image with an overlaying div containing all the page text content slightly off center an about 500px wide so the image is visible behind it. I'd like to be able to hover the mouse over the background image which would cause the text box to close close up exposing the background image to be fully viewed, however the content box needs to open again when the mouse moves </p>
<p>I hope that makes sense, can anyone help me?</p>
| javascript jquery | [3, 5] |
138,454 | 138,455 | Can I call OnCommand programmatically? | <p>I have in the master page an overridden method for <code>OnCommand</code> method.</p>
<p>Can I call it programmatically through any page uses the master page?</p>
<p>I mean something like the following:</p>
<pre><code>CallOnCommand("CommandName", "CommandArg");
</code></pre>
| c# asp.net | [0, 9] |
5,945,062 | 5,945,063 | How to Skip ReadOnly and Disabled inputs while using .focus() | <p>how would this code be modified so it does not <code>.focus()</code> the first form object if it is <code>readonly</code> or <code>disabled</code> and to skip to the next form input for focus?</p>
<p>Currently it returns an error if the first input box is disabled, but i would also like to skip to the next input box if it's readonly too, and if all inputs are disabled and readonly, then it should not focus anything.. </p>
<pre><code> <script language="javascript" type="text/javascript">
// Focus first element
$.fn.focus_first = function() {
var elem = $('input:visible', this).get(0);
var select = $('select:visible', this).get(0);
if (select && elem) {
if (select.offsetTop < elem.offsetTop) {
elem = select;
}
}
var textarea = $('textarea:visible', this).get(0);
if (textarea && elem) {
if (textarea.offsetTop < elem.offsetTop) {
elem = textarea;
}
}
if (elem) {
elem.focus();
}
return this;
}
</script>
</code></pre>
<p>Actually using <code>input:enabled:visible</code> fixes alot of my issues, but i'm still trying to figure out if readonly, to skip to the next one.</p>
| javascript jquery | [3, 5] |
4,829,624 | 4,829,625 | ASP.NET DropDown returning value of SelectedText instead of SelectedValue | <p>What am I missing?
I am constructing dropdowns, like this, from code-behind:</p>
<pre><code> ListItemCollection oL = new ListItemCollection();
foreach (var item in edata)
{
ListItem oListItem = new ListItem();
oListItem.Text = item.StatusName; //"StatusName"
oListItem.Value = item.Id.ToString(); // "StatusId"
if(item.Id == statusid)
{
oListItem.Selected = true;
}
oL.Add(oListItem);
}
</code></pre>
<p>But when I try to pick SelectedItem.Value like this, it should return StatusId but it is returning StatusName. What am I missing? </p>
<pre><code>EventStatusDropDownList1.SelectedItem.Value
</code></pre>
| c# asp.net | [0, 9] |
4,008,147 | 4,008,148 | How to go previous page of current page , while clicking browser back button | <p>There is three pages say step1.php, progress.php, step2.php</p>
<p>the flow is step1-> progress-> step2</p>
<p>So once we reach at step2 and press browser back button, it will go to <strong>progress</strong> page.</p>
<p>I wants it should go to step1, while clicking the back button of browser,on step2</p>
| php javascript jquery | [2, 3, 5] |
2,217,957 | 2,217,958 | OutputStream is not available when a custom TextWriter is used | <p>this is my function which converts pdf to png image, it's throwing an error on
this line--> stream.WriteTo(Response.OutputStream); Is there some thing wrong??</p>
<pre><code>protected void CreatePngFromPdf()
{
try
{
string PDFLocation = string.Format(@"\\XXXX\{0}\{1}\{2}.pdf", Yr, Loc.Substring(0, 4), Loc.Substring(4, 4));
Utilities.WebPDF.PDF WebPDF = new DocuvaultMVC.Utilities.WebPDF.PDF();
WebPDF.Credentials = new NetworkCredential(@"xyz", "xyz");
byte[] png = WebPDF.StreamPdfPageAsPngResize(PDFLocation,PageNumber, 612, 792);
MemoryStream ms = new MemoryStream(png);
MemoryStream stream = new MemoryStream();
int newWidth = 612;
int newHeight = 792;
System.Drawing.Image newImg = System.Drawing.Image.FromStream(ms);
Bitmap temp = new Bitmap(newWidth, newHeight, newImg.PixelFormat);
Graphics newImage = Graphics.FromImage(temp);
newImage.DrawImage(newImg, 0, 0, newWidth, newHeight);
newImg.Dispose();
temp.Save(stream, ImageFormat.Png);
stream.WriteTo(Response.OutputStream);
temp.Dispose();
stream.Dispose();
}
catch (Exception ex)
{
Response.Write(ex.Message.ToString());
}
}
</code></pre>
| c# asp.net | [0, 9] |
218,576 | 218,577 | Why does php insert backslash while replacing double quotes | <p>I'm wondering why php adds a backslash when i remove double quotes.</p>
<pre><code><input type="text" name="number" id="number" />
<input type="button" name="button" id="button" value="Button" />
</code></pre>
<p>Say they user enters the value 5-1/2" and i'm passing it to a processing page via jquery's .get method.</p>
<pre><code>$('#button').click(function(){
$.get('determine.php?number='+$('#number').val(),function(data){
$('#response').html(data);
});
});
</code></pre>
<p>Here is my processing page.</p>
<pre><code>determine.php
$number = $_GET['number'];
$number = str_replace(array('"', "'"), '', $number);
echo $number;
//echos 5-1/2\
</code></pre>
<p>Why is the backslash there?</p>
| php javascript jquery | [2, 3, 5] |
3,940,791 | 3,940,792 | python receive data from android | <p>how to send stored data in a string format from android to python for example !!</p>
<pre><code>String s1=DoubletoString(loc.getLatitude());
String s2=DoubletoString(loc.getLongitude());
</code></pre>
<p>i want to send the s1 & s2 data to python how to send it !! any help ???</p>
| android python | [4, 7] |
3,848,034 | 3,848,035 | How to run automatic "jobs" in asp.net? | <p>I want to have my website do a number of calculations every 10 minutes and then update a database with the results. How exactly do I set such a timer, i am assuming it would be in global.asax?</p>
| c# asp.net | [0, 9] |
3,963,273 | 3,963,274 | Syntax to access variables in viewstate | <p>I want to retain a variable between postbacks, so I write an accessor to put it into viewstate. Which one of these is the best way to access it? Or is there a better option?</p>
<p>Option 1:</p>
<pre><code>private int Status
{
get
{
try
{
return (int)ViewState[@"__Status"];
}
catch
{
return 0;
}
}
set
{
ViewState[@"__Status"] = value;
}
}
</code></pre>
<p>Option 2:</p>
<pre><code>private int Status
{
get
{
if (ViewState[@"__Status"] is int)
{
return (int)ViewState[@"__Status"];
}
else
{
return 0;
}
}
set
{
ViewState[@"__Status"] = value;
}
}
</code></pre>
<p>Thanks</p>
<p>Edit: I'm using C# 2.0</p>
| c# asp.net | [0, 9] |
4,405,717 | 4,405,718 | Suitable technology for web portal | <p>We want to devlop a web portal which will contain
- Search Facility
- Add/Delete/Update Facility
- Discussion forums
- Articles
- Rating/Feedback etc.</p>
<p>Which is best suited for this JAVA OR PHP? Also which framework is bes</p>
| java php | [1, 2] |
1,283,620 | 1,283,621 | How does Wordpress handle HTML Tables interaction with jQuery | <p>I have javascript that gets the width of a table and reduces the css fontsize of text within the table until the table width is less then the width of its parent div.</p>
<p>The code bellow shows the principle ONLY.</p>
<p>This approach works out side Wordpress. Within Wordpress the fontsize is reduced to 0px and the width of the table width shrinks, but remains wider than the width of its parent.</p>
<p>Outside wordpress the browser adjust the table width to fit the text.</p>
<p>So how does Wordpress handle HTML Tables different?</p>
<pre><code>function ShrinkTable() {
var FontSize = parseInt($("#tbl").css('font-size').replace('px', ''),10);
var TabWidth = jQuery("#tbl").width();
var DivWidth = jQuery("#narrorColumn");
if (parseInt(DivWidth.css('width').replace('px', ''),10) <= TabWidth) {
jQuery("#tbl").css('font-size', FontSize - 1 + 'px'); /* you can change 4 with any number, the smaller is better but it may require more loop */
//Shrink the font while div width is less than table width
ShrinkTable();
}
}
</code></pre>
| jquery javascript | [5, 3] |
5,231,866 | 5,231,867 | CS0246: The type or namespace name 'sconnection' could not be found (are you missing a using directive or an assembly reference?) | <p>I am new i asp.net. i create website in asp.net with c# and database sql server 2005 . when i run in visual studio its working fine. But when i run on localhost the error is occurred. Please solve my problem. the error is
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. </p>
<p>Compiler Error Message: CS0246: The type or namespace name 'sconnection' could not be found (are you missing a using directive or an assembly reference?)</p>
<p>Source Error:</p>
<pre><code>Line 15: public partial class _Default : System.Web.UI.Page
Line 16: {
**Line 17: sconnection c = new sconnection();**
Line 18: protected void Page_Load(object sender, EventArgs e)
Line 19: {
</code></pre>
<p>Source File: d:\SIPLWEB\WebSite\Default.aspx.cs Line: 17 </p>
<p>Thanks</p>
| c# asp.net | [0, 9] |
2,659,692 | 2,659,693 | jquery - struggle with javascript variables | <p>I am having a bit of difficulty with a Jquery function. As I am very unsure of the language, I wonder if anyone can help.</p>
<pre><code>$('.editableWC').editable('<?php echo base_url();?>ratesheet/editrowwendCall/<?=$editable['url'];?>/',
{
callback: function(value){
$(this).data('bgcolor', $(this).css('background-color'));
if(value == this.revert)
{
$(this).animate({ backgroundColor: "red", color: "white" }, 400);
$(this).animate({ backgroundColor: $(this).data('bgcolor'), color: "black" }, 400);
}
else
{
$(this).animate({ backgroundColor: "green", color: "white" }, 400);
$(this).animate({ backgroundColor: $(this).data('bgcolor'), color: "black" }, 400);
}
},
name : 'value',
style : 'display:inline; position:relative; right:120px;',
width : '100px',
height: '16px',
onblur : 'submit'
});
</code></pre>
<p>This is my code. It simply checks the posted item in php validation and gets posted back the original value if does not meet the validation, or the new value if it does.</p>
<p>So, the code is supposed to see if the returned value is the same as the original and if no change, show red for unsuccessful, or green for successful (if value is different). The green does work, however It does not recognised the original value post back to be the same as the this.revert value. </p>
<p>What happens with this code is if value is unchanged = green
if value is change and meets validation = green
if value is changed, does not meet validation = no animation at all. when it wants to flash red.</p>
<p>I'd appreciate any help as I am quite out of my depth when it comes to javascript.</p>
| php jquery | [2, 5] |
299,654 | 299,655 | javascript function does not work within jquery $(document).ready block | <p>I am trying to call a javascript function from an onclick trigger.</p>
<p>html section:</p>
<pre><code><div class="my_radio">
<input type="radio" name="my_radio" value="1" onclick="my_func()"/> first button
</div><!-- end of class my_radio -->
</code></pre>
<p>And the js/jquery section is :</p>
<pre><code><script type="text/javascript">
$(document).ready(function(){
function my_func(){
alert("this is an alert");
}
});
</script>
</code></pre>
<p>It does not work.</p>
<p>but if i keep the js function out of the $(document).ready section, it works. Following is the relevant code snippet:</p>
<pre><code><script type="text/javascript">
$(document).ready(function(){
function my_func111(){
alert("this is an alert");
}
});
function my_func(){
alert("this is an alert");
}
</script>
</code></pre>
<p>works.</p>
<p>1) Why does not the first js.jquery code snippet work?</p>
<p>2) How can I get the first js/jquery code snippet working ?</p>
<p><strong>EDIT :</strong></p>
<p>SO FAR AS I KNOW, $(document).ready is executed when the web page loads completely. so how can I prevent my_func to be active before or after the complete page-loading if i write my_func outside $(document).ready? </p>
| javascript jquery | [3, 5] |
1,402,159 | 1,402,160 | reading content of .aspx using javascript | <p>i am using javascript to read the content of .aspx page. but i am not able to read it. i am using javascript as:</p>
<pre><code>function edit(headtext,totext, bodytext, footertext){
alert('lll');
//var xmlDoc=new ActiveXObject("MSXML.DOMDocument");
xmlDoc.async="false";
xmlDoc.load("theme3ex.aspx");
var students = xmlDoc.documentElement;
alert('0000');
var student = students.childNodes(0);
document.getElementById('txtareahead').innerHTML = headtext;
document.getElementById('txtareato').innerHTML = totext;
document.getElementById('txtareabody').innerHTML = bodytext;
document.getElementById('txtareafooter').innerHTML = footertext;
location.href = "MailSender.aspx";
}
</code></pre>
<p>is there any problem eith my javascript..</p>
| javascript asp.net | [3, 9] |
3,623,890 | 3,623,891 | DateTime Model Binder, works for IE and Chrome but not for Firefox | <p>i have created a DefaultModelBinder to work with DateTime</p>
<p>the format is "dd-MM-yyyy"</p>
<p>this DefaultModelBinder works fine with IE and Chrome,</p>
<p>but it does not work in Firefox ??</p>
<p>any help regarding this.</p>
<p>Update : {As Requested}</p>
<pre><code>public class DateTimeBinder : DefaultModelBinder
{
public override object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
{
var vpr = bindingContext.ValueProvider.GetValue(bindingContext.ModelName);
if (vpr == null)
{
return null;
}
var date = vpr.AttemptedValue;
if (String.IsNullOrEmpty(date))
{
return null;
}
bindingContext.ModelState.SetModelValue(bindingContext.ModelName, bindingContext.ValueProvider.GetValue(bindingContext.ModelName));
try
{
var realDate = DateTime.Parse(date, System.Globalization.CultureInfo.GetCultureInfoByIetfLanguageTag("en-GB"));
bindingContext.ModelState.SetModelValue(bindingContext.ModelName, new ValueProviderResult(date, realDate.ToString("yyyy-MM-dd hh:mm:ss"), System.Globalization.CultureInfo.GetCultureInfoByIetfLanguageTag("en-GB")));
return realDate;
}
catch (Exception e)
{
bindingContext.ModelState.AddModelError(bindingContext.ModelName, e);
return null;
}
}
}
</code></pre>
<p>Global.asax:</p>
<pre><code> ModelBinders.Binders.Add(typeof(DateTime), new DateTimeBinder());
ModelBinders.Binders.Add(typeof(DateTime?), new DateTimeBinder());
</code></pre>
<p>Update2: [Images Added]</p>
<p>Firefox :
<img src="http://i.stack.imgur.com/A7NZG.png" alt="Firefox Image"></p>
<p>This is the validation Issue in Firefox.</p>
<p>Internet Explorer :
<img src="http://i.stack.imgur.com/EAtNy.png" alt="Internet Explorer Image"></p>
<p>NOTE : the request is not being sent to the SERVER, this is client-side validation from the MVC , which displays the error in FIREFOX.</p>
| c# asp.net | [0, 9] |
1,199,255 | 1,199,256 | Multi Lang., need to change text on radio button | <p>I need to change text on the radio button.</p>
<p>Currently there is the text in English and required it to change in Arabic language.</p>
<p>Any information is greatly appreciated.</p>
| c# asp.net | [0, 9] |
1,806,303 | 1,806,304 | external javascript file from asp.net C# page | <p>i have some javascript functions written in an external javascript file.
and i have included the file in my asp.net page head section.
however i m not able to understand how do i call the functions from the code behind file.
e.g, i want to call a certain function 'tacount' on onkeypress event of a textbox. how can i possible do that?</p>
| c# javascript asp.net | [0, 3, 9] |
4,559,501 | 4,559,502 | Array to retrieve information without database | <p>I want to write code on my application to declare an array that retrieve 20 people information without database just using object to each one of them.</p>
<p>How can I declare it and retrieve this information?</p>
<p>I want code or at least some websites that helps me.</p>
<p>Note: the 20 people fill the form of their information on my application also.</p>
<p>Big Note: the 20 people fill the form by my app and send it to my server then I have an activity that show the people the recent form as list.</p>
<p>How can I retrieve these information to put it on activity?</p>
| java android | [1, 4] |
5,422,888 | 5,422,889 | How to sort a table consisting of multiple TBODY tags? | <p>Say there are 3 TBODY tags inside one single table containing 3,4 and 5 number of columns.
Is it possible for all the TBODIES to get sorted if any column header on say TBODY1 is clicked.
I want the whole table to get sorted , not just the columns in one particuular TBODY.
I had some reason for which I had to use multiple TBODY's inside one single table.
Can anyone guide me on this ?</p>
<p>Thanks</p>
| javascript jquery asp.net | [3, 5, 9] |
260,241 | 260,242 | PHP / C++ space calculations for parcel packing | <p>I am working on a shopping cart project which requires a 'postage calculator' based on items that the person has in their cart.</p>
<p>Obviously I will be storing the item's dimensions incl. weight and padding in a database and will also store the parcel (box) size and weight that the items will go in to, incl. box padding.</p>
<p>Figuring the weight of the parcels will be easy but I was wondering how to go about figuring how to pack the box via PHP, that is, I would like the code to 'play tetris' with the items to make sure they get the best possible fit, giving accurate postage costs.</p>
<p>Does anybody have any ideas on how best to achieve this or does anybody know of a PHP Class or function that can do this?</p>
<p>EDIT: When I said 'best possible fit' maybe I was being optimistic! Having the script try every possible combination of package distribution within the parcel would be over the top, however I could improve the speed by writing the algoritm in C++ and running the program in PHP when the user 'checks out', the return value being an array with the parcel size and weight (which are all that are needed to calculate postage costs)</p>
| php c++ | [2, 6] |
4,121,915 | 4,121,916 | Applying and changing the classname of selected radio with scripting | <p>I have a form that has a radio button set. When the page loads, I want use some simple scripting that immediately apply a classname to the label of the corresponding input and when the user click on another radio button in the set to remove that class and apply the classname to the newly selected radio button label.</p>
<p>Any ideas how this can be done?</p>
<p>JSFiddle: <a href="http://jsfiddle.net/eYDV4/" rel="nofollow">http://jsfiddle.net/eYDV4/</a></p>
<pre><code><form id="myForm" action="" method="post">
<input type="radio" id="radio1" name="myRadio" value="radio1">
<label for="radio1">radio1</label>
<input type="radio" id="radio2" name="myRadio" value="radio2">
<label for="radio2">radio2</label>
<input type="radio" id="radio3" name="myRadio" value="radio3" checked="checked">
<label for="radio3">radio3</label>
<input type="radio" id="radio4" name="myRadio" value="radio4">
<label for="radio4">radio4</label>
</form>
</code></pre>
| javascript jquery | [3, 5] |
1,741,163 | 1,741,164 | Get browser URL with jQuery | <p>I have this code</p>
<pre><code>var pathname = window.location.pathname;
</code></pre>
<p>That take the current browser url</p>
<p>How can i paste the pathname into an html element like a p tag?</p>
| javascript jquery | [3, 5] |
61,703 | 61,704 | parse float with two decimals, | <p>this is the input</p>
<pre><code><input type="text" name="price" class="solo-numeros">
</code></pre>
<p>with this function</p>
<pre><code>$(".solo-numeros").blur(function() {
var numb = parseFloat($(this).val().replace(/\D/g,"")).toFixed(2);
$(this).val(numb);
});
</code></pre>
<p>i try to change the result from the input to a float with two decimals</p>
<p>so i try </p>
<pre><code>555.61
</code></pre>
<p>but on blur the value change to</p>
<pre><code>55561.00
</code></pre>
<p>why is that???? </p>
| javascript jquery | [3, 5] |
2,594,666 | 2,594,667 | jquery - change a drop down menu to a list | <p>Is there a way to convert a drop down menu to be a list using jquery... so:</p>
<pre><code><select>
<option>1</option>
<option>2</option>
<option>3</option>
</select>
</code></pre>
<p>to</p>
<pre><code><ul>
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
</code></pre>
<p>Thanks</p>
| javascript jquery | [3, 5] |
2,965,024 | 2,965,025 | Dynamically populate form field, based on two other fields | <p>Say we have a form field and want to populate it with a images based on two other fields. Say these are called COLOUR and STYLE. So if style is 'A' and colour is black, we want to display the unique image representing these choices. If style is 'B' and colour black, another image.</p>
<p>So what is missing from the following?:</p>
<pre><code>add_filter("pre_render", "populate_dropdown");
function populate_dropdown($form){
if($form["id"] != 1)
return $form;
foreach($form["fields"] as &$field)
if($field["id"] == 1){
$field["content"] = "DYNAMIC STUFF HERE";
}
return $form;
}
</code></pre>
| php jquery | [2, 5] |
4,075,705 | 4,075,706 | How do I make C# talk to PHP session | <p>I have a C# web-app that I want to integrate with a PHP shopping cart, it this possible? </p>
| c# php | [0, 2] |
3,948,361 | 3,948,362 | Android: Set Default soft keyboard | <p>I have created a softkeyboard application. I would like to set it as my default soft keyboard while installing. Is it possible to add code in my softkeyboard application coding to set this keyboard as default keyboard while installing? </p>
| java android | [1, 4] |
3,975,458 | 3,975,459 | How does one add arrays of elements to the DOM in jQuery? | <p>Coming to jQuery from a functional background, I am fond (perhaps unreasonably so) of elegant chains of functions. I often find myself dealing with arrays of elements, such as those that may result from $.map, and my ability to manipulate these arrays in the DOM seems quite limited. Here's some sample code that runs through the results of a Google search, rendering the result titles:</p>
<pre><code>var newResultsDiv = $('<div id="results" />');
$.each(searcher.results, function() {
newResultsDiv.append('<p>' + this.title);
});
$("#searchresults").append(newResultsDiv);
</code></pre>
<p>I find this excessively verbose. Ideally, I would do something along these lines instead:</p>
<pre><code>$.map(searcher.results, function(elem) {
return $('<p>' + elem.title);
}).wrapAll('<div id="results" />').appendTo('#searchresults');
</code></pre>
<p>I've tried this out, along with several variants using different forms of append and wrap. They all appear to be incapable of handling the plain-old-Javascript array that jQuery.map spits out. They're designed to work with jQuery's own set collection. At least, that's my guess, as messing around with these functions in the Firebug console seems to confirm the problem.</p>
<p>I am hoping that someone here has the wisdom to show me an elegant way to do what I'm trying to do. Is there one?</p>
| javascript jquery | [3, 5] |
3,866,908 | 3,866,909 | Equivalent verbatim operator for java | <p>Does java have an equivalent operator or language construct as the verbatim operator(@) in C#?</p>
| c# java | [0, 1] |
3,344,936 | 3,344,937 | DataGrid - How to display the content of a hidden TemplateField on mouseover | <p>i'm using a DataGrid to display informations (e.g. names and addresses of bookstores), and i want to display the opening hours in a tooltip onmouseover. The information i want to show onmouseover is in a TemplateField which Visible porperty is set to false.</p>
<p>How can i achieve that? Must i use javascript and css ?</p>
<p>Thanx</p>
| c# asp.net | [0, 9] |
3,023,918 | 3,023,919 | Add a random number every 24 hours | <p>i need a script that automatically add a random number (between 1 and 5) every 24 hours and stores it in a text file, then after 24 hours creates a new random number and adds it to the previous result in the text file, i managed to do something close but still needs a refresh button to take effect, but i want it to automatically do it, so if 1 user visits the page every day, and one visits the page once a month, they should both see the same number (which will be read from the text file).</p>
<p>Here is my code so far:</p>
<pre><code><?php
$dataFile = "amt.txt";
$date1 = date("H:i:s");
$date2 = date("H:i:s",filemtime("amt.txt"));
$diff = abs(strtotime($date2) - strtotime($date1));
$secs = floor($diff);
if ($diff < 86400) {
echo "$date1 \n";
echo "$date2 \n";
printf($secs);
exit;
}
if (!file_exists($dataFile)) {
$amt = 0;
}
else {
// Otherwise read the previous value from
// the file.
$amt = (int) file_get_contents($dataFile);
}
// Generate the new value...
$Number = rand(1,5);
$total = $amt + $Number;
echo "$". $total ."/-";
// And dump it back into the file.
if (!file_put_contents($dataFile, $total)) {
// If it fails to write to the fle, you'll
// want to know about it...
echo "Failed to save the new total!";
}
?>
</code></pre>
<p>basically i want to show a fake number of subscribers which logically should increase with time. So i want to update the number on daily basis, then because i am having this on my website as the number of monthly subscribers, so when a user visits the website any time should see the same figure as any other user visitng the website on that exact time. Hope this is clearer now.</p>
| php javascript jquery | [2, 3, 5] |
5,723,735 | 5,723,736 | Difference between element.each and .each(element) in jquery | <p>What is the difference between </p>
<pre><code>$(element).each(function(){
});
</code></pre>
<p>And </p>
<pre><code>$.each("element",function(){
});
</code></pre>
| javascript jquery | [3, 5] |
3,459,318 | 3,459,319 | Change the title of ThickBox | <p>I would like to change the text that appears in the ThickBox in the top panel. Right now it looks like this (HTML from Firebug):</p>
<p><a href="http://test2.richardknop.com/thickbox.jpg" rel="nofollow">http://test2.richardknop.com/thickbox.jpg</a></p>
<p>So I would like to change this part of the HTML:</p>
<pre><code><div id="TB_closeAjaxWindow">
<a id="TB_closeWindowButton" title="Close" href="#">close</a>
or Esc Key
</div>
</code></pre>
<p>To for example:</p>
<pre><code><div id="TB_closeAjaxWindow">
<a id="TB_closeWindowButton" title="Close" href="#">close</a>
</div>
</code></pre>
<p>I have read the documentation page for ThickBox plugin and there isn't mentioned any way to do this.</p>
| javascript jquery | [3, 5] |
3,328,717 | 3,328,718 | Converting Jquery to Javascript | <p>Sorry, I am am very poor at JQuery.</p>
<p>I got one code for my requirement which is Jquery. Can any one please convert it into plain javascript</p>
<pre><code>$(window).scroll(function() {
var scrollTop = $(window).scrollTop();
$("#mybox").css("top", scrollTop + "px");
});
</code></pre>
<p>css part</p>
<pre><code>#mybox
{
position:absolute;
width:200px;
height:50px;
background-color:red;
}
</code></pre>
<p>I am using it display a floating link at the bottom of the page even if user navigated through the page</p>
<pre><code><script type="text/javascript">
window.addEventListener('scroll', function() {
var scrollTop = window.pageYOffset;
document.getElementById('worklist').style.top = scrollTop;
});
</script>
<div id="worklist" style="position: absolute; bottom: 5px; right: 50px;">
<a href="LinkHere"><h2>Work List</h2></a>
</div>
</code></pre>
| javascript jquery | [3, 5] |
3,479,387 | 3,479,388 | Generating a JavaScript array from a PHP array | <p>Suppose that I have a string <code>$var</code>:</p>
<pre><code>//php code
$var = "hello,world,test";
$exp = explode(",",$var);
</code></pre>
<p>Now I get the array as <code>exp[0],exp[1],exp[1]</code> as <code>'hello'</code>, <code>'world'</code> and <code>'test'</code>, respectively.</p>
<p>I want to use this all value in javascript in this:</p>
<pre><code>var name = ['hello','world','test'];
</code></pre>
<p>How can I generate that JavaScript in PHP?</p>
| php javascript | [2, 3] |
5,059,606 | 5,059,607 | How do webservers "ignore" URI components? | <p>For example loading the below link simply reloads the page and removes the extraneous extension:</p>
<p><br>http://stackoverflow.com/questions/6718602/how-does-stackoverflow-and-other-sites-remove-file-extensions-for-webpages.abc123</p>
| php asp.net | [2, 9] |
2,519,218 | 2,519,219 | check that a collection is not empty | <p>How do you check that <code>data.results</code> in the following is not empty before trying to perform actions on it?</p>
<pre><code>$.getJSON(myurl, function(data) {
// if data.results is not empty
// {
// console.log(data.results.size);
// }
});
</code></pre>
| javascript jquery | [3, 5] |
649,286 | 649,287 | How to define Global Arrays? | <p>Code example:</p>
<pre><code> <script>
var data = new Array();
data[0] = 'hi';
data[1] = 'bye';
</script>
<script>
alert(data[0]);
</script>
</code></pre>
<p>This gives the following error: <code>data is not defined</code></p>
<p>How do you make something like this work? Especially if the first <code><script></code> block is being loaded on the page by ajax, and the second block is working from it. jQuery solution is acceptable.</p>
| javascript jquery | [3, 5] |
5,948,412 | 5,948,413 | Java - Encrypt part of the file(audio & image) instead of the whole file? | <p>I read something about this here
<a href="http://stackoverflow.com/questions/5003328/android-increase-speed-of-encryption">Android - Increase speed of encryption</a></p>
<p>I need to only encrypt part of the file(audio & image). Is this possible? Can somebody provide snippet of both encryption and decryption if it's possible?</p>
<p>Thanks in advance =)</p>
| java android | [1, 4] |
5,533,445 | 5,533,446 | get the src from img tag | <p>I am using ajax to grab a page.</p>
<p>withing a table lies an imagesrc i want to grab.. It is wrapped around an A tag with a class name</p>
<p>i use the following</p>
<pre><code>$response.find(".infobox tr").each(function(){
$a=$(this).find(".image").html();
}
</code></pre>
<p>but it returns the image tag <code><img src="http://uwww.domain.com.au/image.jpg" height="333" width="256"></code></p>
<p>i have tried the attr("src") and other methods but to no avail.. is there a trick i am missin</p>
| javascript jquery | [3, 5] |
820,977 | 820,978 | Too many jquery plugins? | <p>I'm developing a website, but I realized that, in addition to the link to my main javascript file, and the link to the jquery file, it's beginning to look like I'm going to have links to three or more plugins also.
I'm just wondering if this is good practice? The site I'm building is a web app, so I need a lot of functionality, but I don't want to be a plugin glutton. Is it considered good to append all the javascript plugins together into one file so as to only have to download one file, or will I run into problems? </p>
| javascript jquery | [3, 5] |
2,861,282 | 2,861,283 | Jquery ignore elements with "disabled" class | <p>I'm using jquery and creating event handlers like this:</p>
<pre><code>$('#some_selector a.add').live('click', function(){...});
</code></pre>
<p>However, I need to <strong>not execute</strong> handlers when an element has <code>disabled</code> class. Then I wrote the following to achieve this:</p>
<pre><code>$('#some_selector a.add:not(.disabled)').live('click', function(){...});
</code></pre>
<p>But I'm tired of watching over all the places that I need to add <code>:not(.disabled)</code>, sometimes I forget to add it and so on. Moreover, if I have an anchor element and my handler prevents default action on it, than adding <code>:not(.disabled)</code> will cause browser to open next page instead of doing nothing. </p>
<p>So is there a way to set up automatic disabling on handler execution when an element meets some condition (like having "disabled" class)?</p>
| javascript jquery | [3, 5] |
2,227,569 | 2,227,570 | Load an Image from the Gallery in Android | <p>I'm currently doing a Widget in Android. It is on the market and it's free.
I want to surprise the users by let them choose a picture they want to show in the widget.</p>
<p>Now...</p>
<p>If the widget is clicked, a PreferenceActivity appears. <-- Works!</p>
<p>In this Activity the user should be able to choose a picture from the phone picture gallery. <-- HOWTO?</p>
<p>After the User selected the prefered picture, the picture path or the drawable object should be stored in the SharedPreferences. <-- Would be really nice!</p>
<p>Is there any solution?</p>
<p>Thx!</p>
| java android | [1, 4] |
3,685,356 | 3,685,357 | setImageResource from a string | <p>I would like to change the imageview src based on my string, I have something like this:</p>
<pre><code>ImageView imageView1 = (ImageView)findViewById(R.id.imageView1);
String correctAnswer = "poland";
String whatEver = R.drawable+correctAnswer;
imageView1.setImageResource(whatEver);
</code></pre>
<p>Of course it doesnt work. How can I change the image programmatically?</p>
| java android | [1, 4] |
2,645,738 | 2,645,739 | How can I duplicate this in jQuery? | <p>I have this code:</p>
<pre><code>/* Modify the footer row to match what we want */
var nCells = nRow.getElementsByTagName('th');
nCells[1].innerHTML = iPageCPSV;
nCells[2].innerHTML = iPageCGV;
nCells[3].innerHTML = iPagePPSV;
nCells[4].innerHTML = iPagePGV;
</code></pre>
<p>It works just fine as it is. However I have added another <code><tr></code> into the section now. And I am having trouble figureing out how to populate the <code><th></code> in the second <code><tr></code></p>
<pre><code><tfoot>
<tr style="background-color: #DDDDDD;">
<th align="right" colspan="6">
Page Total:
</th>
<th align="left"></th>
<th align="left"></th>
<th align="left"></th>
<th align="left"></th>
</tr>
<tr style="background-color: #DDDDDD;">
<th align="right" colspan="6">
Downline Total:
</th>
<th align="left"></th>
<th align="left"></th>
<th align="left"></th>
<th align="left"></th>
</tr>
</tfoot>
</code></pre>
<p>Before I added the second <code><tr></code> with more <code><th></code> everything worked. It still works, I just don't know how to populate the data into the second row. Can anyone help me modify the existing JavaScript or tell me how to duplicate it into jQuery?</p>
| javascript jquery | [3, 5] |
5,905,455 | 5,905,456 | Creating a board game with javascript | <p>I am trying to create a game like jeopardy where the user clicks on a button and gets a question they need to answer. The problem is I can't tell which square was clicked and I also can't hide the board from the user when they're answering a question. I am fairly unfamiliar with javascript and I wouldn't mind using a library or a plug-in. </p>
<p>Edit: </p>
<p>I'm sorry if my question wasn't in the right format this is my first question here. So what I have so far is this: </p>
<p>function fillBoard(width,height)
{
var stepWorth = 100; </p>
<pre><code>var board = document.getElementById("buttonsFrame")
while(board.firstChild)
board.removeChild(board.firstChild)
var spans = new Array(width)
for(var i = 0; i<width; i++)
{
spans[i] = document.createElement("span")
spans[i].parent = board
board.appendChild(spans[i])
}
for(var h = 0; h < height; h++)
{
for(var w = 0; w < width; w++)
{
var but = document.createElement("li")
but.appendChild(document.createTextNode("$" + stepWorth * (h + 1)))
but.data("tile",{xPos:w, yPos:h, worth: stepWorth * (h + 1)})
but.parent = spans[w]
spans[w].appendChild(but)
var sp = document.createElement("span")
sp.appendChild(document.createTextNode( w + ',' + h))
sp.parent = spans[w]
spans[w].appendChild(sp)
}
}
</code></pre>
<p>}</p>
<p>The user clicks load board and the board fills up. To find out which button was clicked I used a hidden span next to every button ( tag) but I feel like this is not a good solution. My problem is that I want to load my questions from an xml file so I need the index of the button on the board to load the correct question I can't load just any question.
I wanted to do something object oriented but it's too damn strange with javascript. I have experience with .Net and this javascript is just too annoying please help me! </p>
| javascript jquery | [3, 5] |
5,682,151 | 5,682,152 | jQuery selector with variable, not updating when variable changes | <p>'I am trying to do something like the below that will run a function when clicking the "hit" class only when the parent "box" id is correct.</p>
<pre><code>var selected = 1;
$('#box-' + selected + ' .hit').click(function(){
selected = randomFromTo(1,5);
});
</code></pre>
<p>The <code>selected</code> variable changes depending on other actions on the page but I can't get the function to work after any change - it stays fixed to the initially selected "box" id. I can imagine why this might be, as jQuery has taken a snapshot of that string and nothing is telling it update it but I can't figure out how to get around this.</p>
<p><strong>Edit:</strong> added the selected variable's instantiation and where it gets set. I've left out the UI changes that would make this more understandable to a user.</p>
| javascript jquery | [3, 5] |
2,901,860 | 2,901,861 | Control loading order of cross domain java scripts | <p>I'm working on a mobile web site wherein I pull in elements, using Xpath, from a parent site/domain and recreate them on a different domain. The trouble is that most of the elements that I pull in have inline styles attached by the Dojo JS framework. I tried removing these styles using this jQuery code</p>
<pre><code>$('#elementID').removeAttr('style');
</code></pre>
<p>and it seems to work fine while the page is loading but once the page finishes loading the Dojo scripts attach the inline styles again. I read <a href="http://stackoverflow.com/questions/19035/javascript-load-order">here</a> that cross-domain scripts are loaded after the scripts of the site itself. Nonetheless, is there any way to control the script loading order?</p>
| javascript jquery | [3, 5] |
2,671,535 | 2,671,536 | How to handle extra commas in csv file | <p>I am creating a csv file in Android. At some places content contains commas how can i handle those commas.</p>
| java android | [1, 4] |
262,517 | 262,518 | how to add 2 values of textbox in asp.net using javascript | <p>I have 2 textbox in my asp.net page and also have one hiddenfield in my asp.net page , my hiddenfield will always have numeric value like 123.00 , and in my one textbox also I will always have numeric value like 20.00 now I want to add this hiddenfield value and textbox value and display it into second textbox thru javascript </p>
<p>I wrote the following code to do this </p>
<pre><code>var amt = document.getElementById("txtsecond");
var hiddenamt = document.getElementById("AmtHidden").value
var fee = document.getElementById("txtFirst").value;
amt.value = hiddenamt + fee;
</code></pre>
<p>this should give me result like 123.00+20.00 = 143.00 but this is concatnating hiddenamt value and fee value and giving me result like 12320.00 in my first textbox </p>
<p>can anybody suggest me what is wrong in my code and what is the right way to get desired value</p>
| asp.net javascript | [9, 3] |
1,284,300 | 1,284,301 | Pass variable from one function of JS to another function of javascript | <p>I am calling Showmenu() javascript function from C# and passing one variable to this function. Now i want to use this variable in another function of javascript.</p>
<pre><code> <script type="text/javascript" >
var strmenu;
function ShowMenu(strmenu) {
alert(strmenu);
}
alert(strmenu);
ddsmoothmenu.init({
mainmenuid: strmenu,
orientation: 'h',
classname: 'ddsmoothmenu',
contentsource: "markup")}
</script>
</code></pre>
<p>I am calling <code>ShowMenu(strmenu)</code> function in c sharp.....like</p>
<pre><code>menu_Sysadmin.Attributes.Add("OnClick", "javascript:return ShowMenu('sysadmin')");
</code></pre>
<p>I want to use <code>strmenu</code> from <code>showmenu()</code> in <code>ddsmoothmenu.init()</code> as a parameter.
alert shows value but when am trying to use <code>strmenu</code> as globally it is not working...:-(</p>
<p>its very urgent for my project plz help me.plz plz.</p>
<p>Thanks in adv.</p>
| c# javascript asp.net | [0, 3, 9] |
5,316,014 | 5,316,015 | Why 'keydown' event works like 'keypress' event? | <p>The next sample code outputs 'keydown' message many times while I hold a button down. The docs <a href="http://api.jquery.com/keydown/" rel="nofollow">says</a> that the keydown event happens once for one push of the button. So, the keydown event works like the keypress event in the next example.</p>
<pre><code><!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title></title>
<script type='text/javascript' src='jquery.js'></script>
<script type='text/javascript'>
function onLoad()
{
$( '#text' ).on( 'keydown', function() { console.info( 'keydown' ) } );
}
</script>
</head>
<body onload='onLoad()'>
<input type='text' id='text'>
</body>
</html>
</code></pre>
<p>I tested it on Windows, Firefox 19.0.2 and Google Chrome 25.0.1364.152. Also I created a <a href="http://jsfiddle.net/7Jxcq/" rel="nofollow">fiddle</a> (the problem can be reproduced). JQuery versions for which problem is reproduced: 1.8.2, 1.9.1.</p>
<p>Update.</p>
<p>I did realize the problem: <a href="http://stackoverflow.com/questions/7686197/how-can-i-avoid-autorepeated-keydown-events-in-javascript">How can I avoid autorepeated keydown events in JavaScript?</a>.</p>
| javascript jquery | [3, 5] |
1,285,286 | 1,285,287 | How to set time zone for calendar event programmatically? | <p>In android app, while inserting calendar event, how to set time zone for that inserting calendar event. Any help is really appreciated and thanks in advance...</p>
| java android | [1, 4] |
2,722,166 | 2,722,167 | Multiple MainActivities start on startActivityForResult() in Android | <p>guys,<br>
I've been working on a native Android application for some time and now I am at the end of it there is still a problem I need help with.<br>
<a href="https://github.com/mvelikov/sdiet-android" rel="nofollow">My project at github</a><br>
There is the following problem - when user starts the application for the first time the app will ask him "When does your diet cycle starts?" with a datepicker popup. I am using <strong>SharedPreferences</strong> to store the result user has picked from the popup. I have separate <strong>DatePickerActivity</strong> from the <strong>MainActivity</strong> one that takes care of this datepicker that I start with <strong>startActivityForResult()</strong>. The <strong>DatePickerActivity</strong> passes the result to the <strong>MainActivity</strong> using an <strong>Intent</strong>.<br>
When I debug the app I see <strong>finish()</strong> in <strong>DatePickerActivity</strong> is started twice and the <strong>MainActivity</strong> is started more than one this cause the datepicker popup to show once again.<br>
Once the start date is set in the system there is no problem with these activities and application works fine.<br>
Then comes the moment when user wants to reset the date - using the basket icon with text like "Изчисти" and the datepicker once again appear twice. </p>
<p>I hope I've been clear enough with my explanation and I am looking fowrard to hearings from you.<br>
Best Regards,<br>
Mihail</p>
| java android | [1, 4] |
775,695 | 775,696 | How can I browse the local network from a web client using C#? | <p>Our web client needs a way to browse the local network and select location for file storage. This will then be returned to the webpage as a UNC name.</p>
<p>On a native client this easily accomplished by using Shell32 functions.</p>
<p>I've looked at ASP FileUpload, but that returns the file vs. a specific directory.</p>
<p>EDIT: Another option would be to execute this on the clientside using javascript.</p>
| c# javascript | [0, 3] |
4,452,497 | 4,452,498 | how to incorporate a c# variable into parameters of javascript function | <p>I am trying to put a path kept in a string variable (named "ruta") into the parameters of the <code>swfobject.embedSWF</code>funtion but I don't know how to incorporate a c# code into javascript code. Can someone help me please?? thanks!!!!!</p>
<pre><code><%TarjetaPL tarjetaPl = null;
string ruta = null;
if (Session[Constantes.TarjetaSeleccionada] != null)
{
tarjetaPl = new TarjetaPL((Tarjeta)Session[Constantes.TarjetaSeleccionada]);
ruta = "../../content/images/" + tarjetaPl.TipoDeTarjeta.Banner;
}%>
<script type="text/javascript">
swfobject.embedSWF((HERE COMES THE PATH KEPT IN THE VARIABLE "ruta"), "flashBanner", "300", "120", "9.0.0");
</script>
</code></pre>
<p>The problem is that the code doesn't even recognize the " <% %> " tag to incorporate c# on it!</p>
| c# javascript | [0, 3] |
5,553,516 | 5,553,517 | Convert Java code to C# | <p>Please help convert the following Java code to C# ?</p>
<pre><code>String[] titles = new String[] { "Alpha", "Beta", "Gamma", "Delta" };
List<double[]> x = new ArrayList<double[]>();
for (int i = 0; i < titles.length; i++) {
x.add(new double[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,13,14,15 });
}
</code></pre>
<p>And what is this code doing? </p>
<p>Thanks</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.