Unnamed: 0
int64
302
6.03M
Id
int64
303
6.03M
Title
stringlengths
12
149
input
stringlengths
25
3.08k
output
stringclasses
181 values
Tag_Number
stringclasses
181 values
5,817,856
5,817,857
OnClientClick event not firing
<p>In the webpage I'm building, I have a div that I need to have hidden by default, and for it to appear when the user clicks on a link button. This is the code for the link button and the following div:</p> <pre><code> &lt;asp:LinkButton runat="server" Text="Words &amp; stuff go here" OnClientClick="button_Click"&gt;&lt;/asp:LinkButton&gt; &lt;div id="Calculator" runat="server" visible="false"&gt; //CODE GOES IN HERE &lt;/div&gt; </code></pre> <p>And here is the code in the cs file for the link button:</p> <pre><code>void button_Click(object sender, EventArgs e) { if (Calculator.Visible) Calculator.Visible = false; else if (!Calculator.Visible) Calculator.Visible = true; } </code></pre> <p>I have a breakpoint inside the code behind, and when I debug, the breakpoint is never reached, and I have no idea why.</p>
c# asp.net
[0, 9]
2,427,504
2,427,505
What is your preferred order of elements in the body of program code? Why?
<p>Of course at the top of a .java or .cs file are the package/namespace declaration followed by import/using statement.</p> <p>But what riles me is where should I put the variable declaration? At the top or at the bottom?</p> <p>This is how I prefer;</p> <pre><code>package/namespace declaration import/using declaration of microsoft's/java namespaces import/using declaration of standard 3rd party namespaces import/using declaration of my personal namespaces constructors private methods, each preceded by any private variable that was first used. protected methods, each preceded by any private variable that was first used. public methods, each preceded by any private variable that was first used. inner/nested classes and enums private anon classes assignment protected variables/anon classes assignment public variables/assigned anon classes assignment </code></pre> <p>But I realise many people like to put all the variables right at the top after the package/namespace and import/using declarations. That is troublesome because sometimes the number of variables and assigned anon classed gets too many, and that obscures the visibility of the constructors - the first lines I need to be visible are the constructors because they tell me the signature of instantiation.</p> <p>And then for anon classes that are immediately assigned to a variable - I consider them part of the "structure of variables", so I group them variables.</p> <p>I systematize the placement of my code elements to enable me to easily locate them.</p>
c# java
[0, 1]
2,493,469
2,493,470
Get the number and round to whole number
<p>I'm getting the miles from Google Map API V3 and displaying it in a textbox based on the from and to addresses. I want to parse out the number and round it off to the nearest whole number.</p> <p>Miles = "29.9 mi" // i want the result as 30 Miles = "9.3 mi" // 10</p> <p>I tried Math.round but it's returning NAN.</p> <pre><code>if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); var miles = response.routes[0].legs[0].distance.text; miles = Math.round(miles); $('#TotalMiles').val(miles); } </code></pre>
javascript jquery
[3, 5]
5,827,314
5,827,315
depending upon value of case change the value of radio button
<pre><code>&lt;select id="events" name="event" &gt; &lt;option selected="selected"&gt;Please Select an Event&lt;/option&gt; &lt;option value="1"&gt;Event1&lt;/option&gt; &lt;option value="2"&gt;Event 2&lt;/option&gt; &lt;option value="3"&gt;Event 3&lt;/option&gt; &lt;option value="4"&gt;Event 4&lt;/option&gt; &lt;/select&gt; &lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt; &lt;br&gt;&lt;br&gt; &lt;span&gt;Tickets Required ?&lt;/span&gt;&lt;br&gt;&lt;br&gt; &lt;input type="radio" name="sex" value="female" id="valf"&gt;&lt;span&gt;LADIES x 1 TICKET&lt;/span&gt;&lt;span&gt;{5 Seats Remaining for this event}&lt;/span&gt;&lt;br&gt; &lt;input type="radio" name="sex" value="male" id="valm"&gt;&lt;span&gt;GENTS x 1 TICKET&lt;/span&gt;&lt;span&gt;{12 Seats Remaining for this event}&lt;/span&gt; &lt;br&gt;&lt;br&gt; &lt;span&gt;TOTAL:&amp;nbsp; 12$&lt;/span&gt;&lt;br&gt;&lt;br&gt; </code></pre> <p>Depending upon the selected event change the value of input radio button and depending upon selected radio buttons display the price in total field</p> <pre><code>&lt;script type="text/javascript"&gt; $('#events').change(function() { var selevent=$('#events').val(); switch (selevent) { case '1': alert('You selected 1'); 'Change Value Code of Radio button' At the same time Show total break; case '2': alert('You selected 2'); break; case '3': alert('You selected 3'); break; } }); </code></pre>
javascript jquery
[3, 5]
184,179
184,180
Android how to answer phone, etc with headset button?
<p>I'm not sure how to get started here so I'll ask a fairly general question. </p> <p>Let's say I have a plug-in headset with a button. Now if I have an incoming phone call, can I programmatically make it so that when the user clicks the button on the headset, it answers (or rejects) the call? I can already register the headset clicks so that's not an issue. Also eventually I need to do a multitude of functions such as play/pause music with the button (if the music player is open). </p> <p>Mostly I'm just looking to be pointed in the right direction. Thanks.</p>
java android
[1, 4]
4,821,752
4,821,753
How to fix these type
<p>I have html data like text including image src.when I alert using jquery it works fine. Entire html is displayed in alert box.And then I want to send that entire html data and text and something's id using quary string of JQuery like:</p> <pre><code>$.post('something.php','socialprofileid='+socialprofileid+ '&amp;txtMsg='+msg+'&amp;postedHtmlMsg='+HtmlMsgresult) </code></pre> <p>But I need that entire html data including text and id in php page like get html data, text, id in JQuery alert box</p> <p>I try to use window.btoa function(base64 encoded format) for HtmlMsgresult. After doing base64 encoded format in javascript, when I try to send in php page, it doesn't get any print in php page.</p> <p>Another thing is there any solution Text and htmldata(html text and img src) are combined and then it is done the base64 encode.And then it is send in php page using query string like:</p> <pre><code>if(txtmsg='') { var result=window.btoa(htmldata); } else { var content=text+htmldata; var result=window.btoa(content); } $.post('something.php','socialprofileid='+socialprofileid+'&amp;result='+result) </code></pre> <p>Is it possible to do that? </p> <p>And then I want to insert into database in something.php and then in another page I want to fetch the htmldata and text which are encodded by base64 using jquery. Then it is converted by base64_decode function.</p> <p>But within text and htmldata, How to extract text , htmltext, htmlimgsrc differently from the database table.</p> <p>If u know about these type of problems, please reply me I need your hand Thank you</p>
php javascript jquery
[2, 3, 5]
4,097,818
4,097,819
body html of iframe
<p>Hi my code returns all the html of the iframe. I would like just the body html. Any one know how to amend to suit?</p> <p>Code:</p> <pre><code>alert( $("#uploaderIframe").contents()[0].documentElement.innerHTML ); </code></pre>
javascript jquery
[3, 5]
802,724
802,725
How to set a view state in a master page?
<p>I need to check whether an event is fired from the master page or not. For that i kept a count in the viewstate . This is throwing exception on page load. I'm just calling the below line in a pageload</p> <pre><code>Int32 count = Int32.Parse(this.ViewState["Count"].ToString()); </code></pre> <p>Please help.</p>
c# asp.net
[0, 9]
4,893,016
4,893,017
Passing Session[] and Request[] to Methods in C#
<p>In C#, How do you pass the Session[] and Request[] objects to a method?</p> <p>I would like to use a method to parse out Session and Request paramaters for a .aspx page to reduce the size of my Page_Load method. I am passing quite a few variables, and need to support both POSTand GET methods. For most calls, not all variables are present, so I have to test every variable multiple ways, and the code gets long...</p> <p>This is what I am trying to do, but I can't seem to properly identify the Session and Request paramaters (this code will not compile, because the arrays are indexed by number)</p> <pre><code>static string getParam( System.Web.SessionState.HttpSessionState[] Session, System.Web.HttpRequest[] Request, string id) { string rslt = ""; try { rslt = Session[id].ToString(); } catch { try { rslt = Request[id].ToString(); } catch { } } return rslt; } </code></pre> <p>From Page_Load, I want to call this method as follows to retrieve the "MODE" paramater:</p> <pre><code>string rslt; rslt = getParam(Session, Request, "MODE"); </code></pre> <p>Thanks!</p>
c# asp.net
[0, 9]
4,742,728
4,742,729
Android: Arraylist with multiple elements
<p>I am new to Android. I wonder how to create an arraylist with multiple elements. I have a list like:</p> <pre><code>list1 = ["Circle", Color.WHITE, Color. BLACK, (20,20), (30,30), (40,40)]; </code></pre> <p>This array contains String, int(the color) and coordinates. Is that available to put all of them into an arraylist. If so, how can I merge two lists together. Also, how can I get the value from it? I want to generate some list like above and do some code to merge(combine) them. Thanks!</p>
java android
[1, 4]
3,402,109
3,402,110
Setting tabindex in dynamic table vertically then horizontally
<p>I have a page that is currently generating dynamically created textboxes in a table format. The users are requesting that the tab order be changed from horizontal-vertical to vertical-horizontal. I know that you can use the tabindex attribute to control the tab ordering, but I can't for the life of me figure out the right way to get the sequential number properly for the textboxes. I guess this is more of a math question than anything else!</p> <p>FYI, the textboxes are made while looping two different collections. First collection looped to make the rows, for each row, second collection (which is a property of the first collection objects) is looped to create the columns.</p> <p>Any help would be greatly appreciated. Thanks!</p>
c# asp.net
[0, 9]
4,345,565
4,345,566
Extracting user entry from text box and storing it in a variable in javascript
<pre><code>// text Box &amp;nbsp;&amp;nbsp;&lt;asp:TextBox ID="TextBox3" runat="server" BackColor="Silver" BorderColor="Silver" ontextchanged="TextBox3_TextChanged" style="margin-left: 6px" Width="154px"&gt;&lt;/asp:TextBox&gt; // Submit button &amp;nbsp;&lt;asp:Button ID="Button6" runat="server" BackColor="Silver" onClientclick='store_memID()' style="margin-left: 20px" Text="Submit" Width="102px" Font-Bold="True" Height="28px" /&gt; &lt;script type = "text/javascript"&gt; // Function to caputure client-input- Member_ID. function store_memID() { var mem_ID = document.getElementById('TextBox3').value; return confirm('TimeLine is displayed for: ' + mem_ID); } &lt;/script&gt; </code></pre> <p>When I run the code and enter a value into the text box and then press the submit button:- "Microsoft JScript runtime error: Unable to get value of the property 'value': object is null or undefined".</p> <p><br><br> Else, if I remove the '.value' :-</p> <pre><code>&lt;script type = "text/javascript"&gt; // Function to caputure client-input- Member_ID. function store_memID() { var mem_ID = document.getElementById('TextBox3'); return confirm('TimeLine is displayed for: ' + mem_ID); } &lt;/script&gt; </code></pre> <p>and then run the program, enter value in text box and press submit then i get :-</p> <p>"TimeLine is displayed for: Null"</p> <p>I have been looking into solving this problem. not sure whats going wrong... </p> <p><em><strong>Edit (fix):- Server Side ID for my text box is 'TextBox3' but this doesn't necessarily match up with the client side ID. to get Client Side ID:- '&lt;%=TextBox3.ClientID%>'</em></strong> </p>
javascript asp.net
[3, 9]
1,654,210
1,654,211
Jquery remove and $(this)
<p>I have problem with <code>remove()</code> method. I can't remove <code>$(this)</code> object. My code is:</p> <pre><code>$(".submit_add_type").live("click", function() { var parent = $(this).parent(); var type_value = parent.children('.type_value').val(); var type_name = parent.children('.type_name').val(); var parent2 = parent.parent(); var permission = parent2.attr('id').replace('perm_types_', ''); $.ajax({ url: "/admin/ajax/permission_type_add", type: "POST", cache: false, data: { permission: permission, type_value: type_value, type_name: type_name, }, success: function(text) { if(text.substr(0,2) == "ok") { var id = text.replace('ok|', ''); $(this).remove(); parent.append('&lt;input class="submit" type="submit" name="" value="edytuj" id="edit_type_'+ id +'" /&gt; &lt;input class="submit delete_type" type="submit" name="" value="usuń" id="delete_type_'+ id +'" /&gt;') } else { alert(text); } } }); }); </code></pre> <p>When I change <code>$(this).remove();</code> on <code>$(".submit_add_type").remove();</code> it works perfectly. What could be wrong?</p> <p>The thing is, there can be other objects with this <code>submit_add_type</code> class and I want to remove only a particular one.</p>
php jquery
[2, 5]
2,060,569
2,060,570
Where is main() in Android?
<p>I am new to Android, and was studying the framework and it compelled me to ask this question. Since we are extending Activity in Android, there has to be <code>main</code> somewhere in <code>Activity</code> or there is an hidden class that <code>Activity</code> implements that contains <code>main</code>. </p> <p>I looked everywhere but couldn't find it. I would appreciate if any one could give a clear idea on it.</p>
java android
[1, 4]
1,288,586
1,288,587
Brother QL 720NW Android and iPhone Printing
<p>I want to print label from my Android and iPhone application. Printer is Brother QL 720NW I had tried iprintsdk.com but I am not sure how I can use it. And it seems it is not free.</p> <p>Please help me.</p>
android iphone
[4, 8]
3,068,562
3,068,563
Can we impliment the operator over loading in Web services?
<p>Hi is it possible to implement operator over loading in Web services in .net</p> <p>Mehar</p>
c# asp.net
[0, 9]
4,970,242
4,970,243
show/hide jquery script
<p>I have got show|hide script. It work's good but I need to modify html of this script</p> <p><a href="http://jsfiddle.net/kolxoznik1/nRf5f/" rel="nofollow">http://jsfiddle.net/kolxoznik1/nRf5f/</a></p> <p>like on my schema</p> <pre><code>&lt;!--Links--&gt; &lt;div&gt;link1&lt;/div&gt; &lt;div&gt;link2&lt;/div&gt; &lt;!--Hide divs--&gt; &lt;div&gt;Show1&lt;/div&gt; &lt;div&gt;Show2&lt;/div&gt; </code></pre> <p>and my goal is that html look like this: </p> <p>example html what I want to do</p> <pre><code> &lt;div class="product_menu_categories"&gt;link_1&lt;/div&gt; &lt;div class="product_menu_categories"&gt;link_2&lt;/div&gt; &lt;div class="copy hide"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#" id="prod_1" class="product_menu_link"&gt;test1&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" id="prod_2" class="product_menu_link"&gt;test2&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div class="copy hide"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#" id="prod_6" class="product_menu_link"&gt;test4&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre>
javascript jquery
[3, 5]
656,570
656,571
How to create a runat server DIV in the behind code ? ASP.NET & C#
<p>I'm creating multiple DIVs according to database records at my C# behind code. How could I make them runat server ? </p> <p>Thanks in advance .. </p>
c# asp.net
[0, 9]
5,024,227
5,024,228
Can someone explain this seeming inconsistency in jQuery/Javascript?? (trailing brackets inconsistency on reads)
<p>So, in my example below, "InputDate'" is an input type=text, "DateColumn" is a TD within a table with a class of "DateColumn".</p> <p>Read the value of a discreet texbox: </p> <pre><code>var inputVal = $('#InputDate').val(); </code></pre> <p>Read the value of a div within a table.... </p> <p>This works:</p> <pre><code>$('#theTable .DateColumn').each(function() { var rowDate = Date.parse($(this)[0].innerHTML); }); </code></pre> <p>This doesn't:</p> <pre><code>$('#theTable .DateColumn').each(function() { var rowDate = Date.parse($(this)[0].innerHTML()); }); </code></pre> <p>The difference is the "()" after innerHTML. This behavior seems syntactically inconsistent between how you read a value from a textbox and how you read it from a div. I'm ok with sometimes, depending on the type of control, having to read .val vs .innerHTML vs.whateverElseDependingOnTheTypeOfControl...but this example leads me to believe I now must also memorize whether I need trailing brackets or not on each property/method.</p> <p>So for a person like me who is relatively new to jQuery/Javascript....I seem to have figured out this particular anomaly, in this instance, but is there a convention I am missing out on, or does a person have to literally have to memorize whether each method does or does not need brackets?</p>
asp.net javascript jquery
[9, 3, 5]
1,402,261
1,402,262
Textbox which does two things
<p>I made textbox, but it needs to send data to other application, which have custom formatting (like <code>%B</code> is for bold, and if you want to turn off bold, you type keyword for normal font, and so).</p> <p>So, formatting is much different than usual. I made textbox with buttons that can add keywords for text formatting, and that's working fine, but if I need preview in one label in same app, what is good way to do it? (I made preview button that sends text to label)</p> <p>Obviously, I need to set that <code>%B</code> is starting bold text in label and so for other formatting keywords, unless there is better way?</p>
c# asp.net
[0, 9]
460,085
460,086
Send array from jQuery(ajax) to PHP
<p>class <code>email</code> is an array of email addresses. How do i get the array in jQuery and then send the data with AJAX to send.php along with class <code>title</code> and <code>message</code>?</p> <pre><code> &lt;input type='text' size='30' class='email' value='[email protected]' /&gt; &lt;input type='text' size='30' class='email' value='[email protected]' /&gt; &lt;input type='text' size='30' class='email' value='[email protected]' /&gt; &lt;input type='text' size='30' class='title' value='testing title' /&gt; &lt;input type='text' size='30' class='message' value='testing message' /&gt; &lt;script type="text/javascript"&gt; $(function() { var title = $('.title').val(); var message = $('.message').val(); var dataString = 'title=' + title + '&amp;message=' + message; $.ajax({ type: "POST", url: "send.php", data: dataString, success:function () { } }); }); &lt;/script&gt; </code></pre> <p>send.php</p> <pre><code>&lt;?php $email = $_POST['email']; $title = $_POST['title']; $message = $_POST['message']; foreach($email as $value) { //send email } ?&gt; </code></pre>
php jquery
[2, 5]
1,816,813
1,816,814
how to pass database values in jquery?
<p>Am having several boxes(more than 100) that will create dynamically with</p> <p>Now on each clicking of the box i should slide in one pop up box without page refresh.I downloaded jquery UI(http://jqueryui.com/demos/dialog/#option-position) and used in my project.Now I want to pass the company id on each click of the box to get the details from database.if I click window 5 the company id 5 should pass the get all the other details of the company inside the dialog.</p> <p>jquery code:</p> <pre><code>&lt;script type="text/javascript"&gt; // increase the default animation speed to exaggerate the effect $.fx.speeds._default = 1000; $(function () { $("#dialog").dialog({ autoOpen: false, show: "slide", hide: "explode" }); $("div[id *= 'window']").live('click', function (e) { $("#dialog").dialog("open"); return false; }); }); &lt;/script&gt; </code></pre> <p>Asp.net code</p> <pre><code>&lt;div id="dialog" title="Basic dialog"&gt; &lt;div&gt;&lt;%#Eval("comp_name")%&gt; &lt;/div&gt; &lt;div&gt;&lt;%#Eval("comp_city")%&gt; &lt;/div&gt; &lt;/div&gt; </code></pre>
jquery asp.net
[5, 9]
4,991,130
4,991,131
hide image using jquery if it has no src
<p>If my image doesnt contain a src then i want to hide it using visibility hidden:</p> <pre><code>&lt;img border="0" src="" style="cursor:hand;cursor:pointer;" id="EntityPic543"&gt; </code></pre> <p>How can i do this with jquery?</p>
javascript jquery
[3, 5]
5,387,332
5,387,333
how to get image id
<p>I am creating a list of images dynamically, following is the code</p> <pre><code>&lt;?php for ( $counter = 0; $counter &lt; $obj1-&gt;id; $counter ++) { ?&gt; &lt;tr&gt;&lt;td&gt; Week &lt;?php echo($counter+1); ?&gt; &lt;/td&gt;&lt;td&gt;&lt;?php echo" &lt;a href=\"#hiddenDiv\" rel=\"facebox\";&gt;";?&gt; &lt;img src="tue.png"/ id="image" value="&lt;?php echo $counter+1;?&gt;" &gt; &lt;/a&gt;&lt;/td&gt;&lt;/tr&gt; &lt;?php } ?&gt; </code></pre> <p>when the user clicks on the image a form opens. every image represents a week so i need to uniquely identify on which week user is inserting data. i need id of that image through which i can identify a week. On click at the image following function is called</p> <pre><code>function pc(){ var temp = document.getElementById("image"); alert(temp.value); } </code></pre> <p>but i am getting "undefined". can somebody help me with this?</p> <p>Thanks</p> <p>Thanks in advance</p>
php javascript
[2, 3]
3,263,735
3,263,736
Android 101 - How do i iniate a method within main activity from an onInit?
<p>I need to know code to fix my example below to initate a method within my activity.</p> <p>code:</p> <pre><code> public void onInit(int status) { HowDoIStartThisMethodCorrectly?(); &lt;-- cuz this dosen't start that method. </code></pre> <p>}</p> <p>I need a method within my main activity to run when program starts, so i add to onCreate my onInit method, but not working.. =/ ??</p>
java android
[1, 4]
1,466,862
1,466,863
How to show the info page into new "layer"?
<p>I have a contact link on my website and i don't want to add the simple hyperlink to it, because my contact info is about 5-6 lines of text. </p> <p>After click I want it appear on the page I clicked the link, but in something like window (NO POPUP) - just on a higher layer with a close button. I've made it already with Jquery.animate, that the facebook like button was coming from behind the screen - but now I want something different : ]. </p> <p>How to do it?</p>
javascript jquery
[3, 5]
260,500
260,501
code to run java program from website using php
<p>I have a website and want to be able to allow the user to run a Java file on the server from the website.</p> <p>I want the user to click a button which will run the Java file on the server AND anything printed to standard-out by the Java program will be printed out on the website for the user to see.</p> <p>How can this be done (call Java program from PHP and feed the standard out from the Java file back to the PHP website)?</p> <p>please provide detail code...</p>
java php
[1, 2]
5,473,837
5,473,838
Send JSON with FormData-Object through XHR
<p>I've been trying to send images through AJAX to my PHP script and I got it to work out fine. Now I want to send some serialized info along with the images. I've tried a few things to no avail. Can anyone help?</p> <pre><code>var formdata = New FormData(); var info = $('#upload').serializeArray(); $.ajax({ url: "accept.php", type: "POST", data: formdata, processData: false, contentType: false, success: function (res) { console.log(res); } }); </code></pre>
javascript jquery
[3, 5]
1,762,246
1,762,247
Javascript converting example to real code issue - arrays
<p>I'm trying to use the userBox plugin and in the example we have the following array being built:</p> <pre><code>var data = [ {text: "Adam Adamson", id: "[email protected]"}, {text: "Betsy Boop", id: "[email protected]"}, {text: "Jooles Jooles", id: "[email protected]"} ]; </code></pre> <p>I want to build my array at runtime using JSON data I receive from my webservice. In my code I have tried to mimic this array with the following. </p> <pre><code> var data = new Array(); for (var i = 0; i &lt; msg.d.ListExercise.length; i++) { $("userlist").append("msg.d.ListExercise[i].exercise_value"); if (i &gt; 0 &amp;&amp; i &lt; msg.d.ListExercise.length - 1) { data.push('{text: ' + '"' + msg.d.ListExercise[i].exercise_value + '"' + ' , id: ' + '"' + msg.d.ListExercise[i].exercise_id + '"' + '},'); } if (i == msg.d.ListExercise.length - 1) { data.push('{text: ' + '"' + msg.d.ListExercise[i].exercise_value + '"' + ' , id: ' + '"' + msg.d.ListExercise[i].exercise_id + '"' + '}'); } } </code></pre> <p>From what I understand in the example he building a string array. I have verified that the array is being added to and that the data is being added to it. However, when I pass my array into the plugin code it shows the word 'Undefined' 135 times (the length of the array).</p> <p>My Array looks something like this:</p> <pre><code>{text: "Standard Push-Up" , id: "1"}, {text: "Wide Front Pull-Up" , id: "2"}, {text: "Vertical Punches" , id: "135"} </code></pre> <p>What is the best way to get my data into his array example in javascript?</p>
javascript jquery
[3, 5]
3,990,728
3,990,729
Is possible return more than one return type in a Method?
<p>I use asp.net 4 and c#.</p> <p>I would like to know <strong>if could be possible return more than one return type in a Method</strong>.</p> <p>As example in this method I return only a single bool type.</p> <pre><code> protected bool IsFilePresent() { return File.Exists(Server.MapPath("/myFile.txt")); } </code></pre> <p>But lets imagine I would like return also a string type using in the same method like:</p> <pre><code>string lineBase = File.ReadAllText(Server.MapPath("/myFile.txt")); </code></pre> <p>Is possible to do it?</p> <p>I would appreciate some code example. Many Thanks.</p>
c# asp.net
[0, 9]
5,613,940
5,613,941
Bind event to AJAX populated list items
<p>I have an unordered list with no list items.</p> <p>I get some information from the user, I run it through my database using AJAX and the servers sends back a JSON object response.</p> <p>Then I append each list item I want to display to the list using something like</p> <pre><code>$('blabla').append('&lt;li&gt;information&lt;/li&gt;') </code></pre> <p>My question is, since the li elements were not there at the time the DOM was ready, how can I bind a click event to them?</p> <p>Here is my full code:</p> <pre><code>$(function(){ var timer; $('#f').keyup(function(){ clearTimeout(timer); timer = setTimeout(getSuggestions, 400); }); }) function getSuggestions(){ var a = $('#f')[0].value.length; if( a &lt; 3){ if(a == 0){ $('#ajaxerror').hide(300,function(){ $('#loading').hide(300,function(){ $('#suggest').hide(300) }) }) } return; } $('#loading').slideDown(200,function(){ $.ajax({ url: '/models/AJAX/suggest.php', dataType: 'json', data: {'data' : $('#f')[0].value }, success: function(response){ $('#ajaxerror').hide(0,function(){ $('#loading').hide(100,function(){ $('#suggest ul li').remove(); for(var b = 0; b &lt; ( response.rows * 3); b = b + 3){ $('#suggest ul').append('&lt;li&gt;'+response[b]+' '+response[b+1]+' '+response[b+2]+'&lt;/li&gt;') // MISSING SOME CODE HERE TO BIND CLICK EVENT TO NEWLY CREATED LI } $('#suggest').show(300) }) }) }, error: function(){ $('#suggest').hide(0,function(){ $('#loading').slideUp(100,function(){ $('#ajaxerror').show(300) }) }) } }) }) } </code></pre>
javascript jquery
[3, 5]
174,128
174,129
Large "Cached App Process" in simple android app. Is this a concern?
<p>I've written an android application for tee time reservations at a single golf course. </p> <p>When I look at the "cached app processes" under "running apps" (galaxy nexus running ics) I see that the cached process for my app is 47mb (which is the most of ANY app, the second being gmail at 44mb).</p> <p>Is this something I should be concerned about? </p>
java android
[1, 4]
4,914,824
4,914,825
How to select a range of elements in jQuery
<pre><code>&lt;div id="myDiv"&gt; &lt;a&gt;...&lt;/a&gt; &lt;a&gt;...&lt;/a&gt; &lt;a&gt;...&lt;/a&gt; &lt;a&gt;...&lt;/a&gt; &lt;a&gt;...&lt;/a&gt; &lt;a&gt;...&lt;/a&gt; &lt;/div&gt; </code></pre> <p>If you wanted to select the 2nd, 3rd and 4th <code>a</code> tags in the above example, how would you do that? The only thing I can think of is:</p> <pre><code>$("#myDiv a:eq(1), #myDiv a:eq(2), #myDiv a:eq(3)") </code></pre> <p>But that doesn't look to be very efficient or pretty. I guess you could also select ALL the <code>a</code>s and then do run <code>.each</code> over them, but that could get very inefficient if there were a lot more <code>a</code>s.</p>
javascript jquery
[3, 5]
4,165,852
4,165,853
How to load an external JS library that has code between <script> tags using jQuery
<p>The original code I have is</p> <pre><code>&lt;script type="text/javascript" src="http://platform.linkedin.com/in.js"&gt; api_key: qwerty &lt;/script&gt; </code></pre> <p>I want to make this code happen using jQuery after something has been triggered. Something like this</p> <pre><code>jQuery.getScript('http://platform.linkedin.com/in.js'); </code></pre> <p>The problem is that I am not sure what the api_key part does, I've never seen the combination of a request to external lib and code between script tags. Is there a way to imitate that with jQuery? And also - what does that line do? :)</p> <p>Thanks!</p>
javascript jquery
[3, 5]
4,366,919
4,366,920
How to reference an image inside another tag with 'this'?
<p>I know this is pretty basic, I'm trying to get the 'src' attribute of some images and put them in the same number of #image fields:</p> <pre><code> count = 0; $('.selected').each(function() { count++; // the idea is to get the value from each ".selected img" $('#image' + count).val( this + img ).attr("src"); }); </code></pre> <p>How to reference the image from 'this' ? or what would be the good method ? .... Thanks !</p> <p><strong>EDIT:</strong></p> <p>I have something like this:</p> <pre><code> &lt;li&gt;&lt;img src="..." alt="" class="selected" /&gt;&lt;/li&gt; &lt;li&gt;&lt;img src="..." alt="" /&gt;&lt;/li&gt; &lt;li&gt;&lt;img src="..." alt="" /&gt;&lt;/li&gt; &lt;li&gt;&lt;img src="..." alt="" class="selected" /&gt;&lt;/li&gt; </code></pre> <p>I want to write the src attribute of those img s in this:</p> <pre><code> &lt;input type="hidden" id="image1" name="image1" value="" /&gt; &lt;input type="hidden" id="image2" name="image2" value="" /&gt; </code></pre> <p>Thanks! </p>
javascript jquery
[3, 5]
2,354,299
2,354,300
Synchronous Web Pages
<p>I have a situation where an event have to affect several web pages on an event is triggered.</p> <p>Its like in GMail. I am developing a project based on online stocking trading system for my college. There are asking for a facility where the administrator or the dealer doesn't need to refresh his end of the application to view the new orders placed by the customers at the other end of the application.</p> <p>As I said its like GMail, wait for the event to happen, listen to it and update the page.</p> <p>I am good at JavaScript and jQuery that I can do this within a page: event listeners. But how to do this across several pages.</p> <p>You can also consider another situation: A waiter, a cashier and a cook in a hotel, all have a PDA with them, any of them doesn't have to refresh their instance of web page to update the orders placed.</p> <p>How can I achieve this? Is this possible? I say I am good at javascript but I have my limits and doubts.</p> <p>I use jQuery and PHP.</p> <p>Thanks in advance.</p> <p>PS: I know how to refresh the page or iFrame for every 5 seconds or so.</p> <p><strong>Edit 1:</strong></p> <p>As for additional details, I want to something similar to below that is done in java</p> <pre><code>synchronised(sync) { sync.wait() } </code></pre> <p>The code may not be accurate, this was from my lab experiments. But the concept is similar. Server waits till the client made a move and this is repeated for a lot of time.</p> <p><strong>Edit 2:</strong></p> <p>Another best example is a situation we always face in the internet: Complete a survey or something to enable a content to be downloaded.</p> <p>My trading system needs such a thing. The dealer page always listens for the client page to act with the server. Upon such thing, the dealer page is reacted to that action. In this case placing an order.</p>
php javascript jquery
[2, 3, 5]
2,000,765
2,000,766
Javascript - Object loses it's value on function exit
<p>I've got this strange problem. In my code, I've a variable named "val1" which gets a value after a jQuery calling, but after existing the jQuery function it loses it's value.</p> <p>Here's the code:</p> <pre><code>var val1; $.getJSON('some address', null, function (result) { val1 = result.names[0].name; alert(val1); //first alert }); alert(val1); // second alert </code></pre> <p>On first alert, I get the needed value, but on the second Alert - I get "undefined".</p> <p>Why?!</p> <p>Thanks!</p>
javascript jquery
[3, 5]
322,241
322,242
How to flip images in php?
<p>I am trying to design one website home page. It has 9 grids (boxes) each one having one image, all of them collectively forming a single image, after every 3 seconds each image in the grid should start flipping to show other images, after all images flipped again they need to flip back to form single image</p> <p>I searched for this but I got code just to flip an image not as my requirement written above.</p>
php javascript
[2, 3]
3,668,995
3,668,996
Javascript to back button
<p>I have one GridView with Employee search results in it.</p> <p>This GridView shows results of EmpNo, EmpName, Salary. For each EmpNo cell in the GridView, there is a link to ManageEmployee.aspx page.</p> <p>Till here okay, no problem.</p> <p>In ManageEmployee.aspx page there are two buttons 1.Update, 2.Cancel</p> <p>When user clicks on Cancel button, the page should navigate to Employee results page.</p> <p>Can anybody give suggestion how to do this?</p>
javascript asp.net
[3, 9]
2,498,691
2,498,692
problems adding <li> into <ul> from javascript
<p>I have this following where I would like to dynamically add the list elements to it:</p> <pre><code>&lt;ul name='eval-options' class="inputs-list"&gt; &lt;/ul&gt; </code></pre> <p>I'm adding the list elements with the following js but it is not working</p> <pre><code> $("#eval-options ul").append('&lt;li&gt;&lt;label&gt;&lt;input type="checkbox" name="optionsCheckboxes" value="option1" /&gt;&lt;span&gt;Option one&lt;/span&gt;&lt;/label&gt;&lt;/li&gt;'); </code></pre>
javascript jquery
[3, 5]
1,337,432
1,337,433
Placeholder Not working well
<p>Just wanna ask anyone here knows why when i put a placeholder in my masterpage it became like this </p> <pre><code>[ PlaceHolder "PlaceHolder1" ] </code></pre> <p>It supposed to be a blank editable box right? I cant even write anything there. Help me ya. Thank you.</p>
c# asp.net
[0, 9]
2,127,537
2,127,538
I would like all my select classes including those that might be added later to use select2
<p>I am using the following code:</p> <pre><code>$(".select2") .select2(); </code></pre> <p>All the select2 classes have the the .select2() applied to them. </p> <p>However I have code that adds html (including selects to my web page. Do I need to run the same code above after the new content is added? </p>
javascript jquery
[3, 5]
2,727,424
2,727,425
Android-Send/Receive byte[] via TCP Socket
<p>I would like to send/receive sqlite database files (*.db) in byte[] over TCP socket connection? </p>
java android
[1, 4]
1,583,833
1,583,834
find all form names on a page using jquery or javascript
<p>How can I get all form names exists on a page using jquery??? can I use jquery input selector to find all forms on a page. for example I have a form on page like below</p> <pre><code>&lt;form name="searchForm" id="searchForm" action=""&gt; &lt;input type="text" name="inputname" /&gt; &lt;/form&gt; </code></pre> <p>now i want to find the form name "searchForm" using jquery. so how can i do this??</p> <p>please help me. thanks.</p>
javascript jquery
[3, 5]
5,080,283
5,080,284
How to add accounts to a website ASP.NET C#
<p>I created a new ASP.NET, C# empty website and I have my own database in the <code>App_Data</code> folder. I have a master page as well in the solution.</p> <p>Anyway, I want to create a login page, but my issue is, how would I know whether a user is logged in or not when navigating around the site.</p> <p>To elaborate more, when the user opens the home page, it'll have a label saying "Login" and linking to <code>/login.aspx</code></p> <p>But then when the user logs in, I want the "Login" label at the top to change to, <code>Username</code> + <code>a "Logout" label</code> (which ofcourse logs the user out).</p> <p>My question is, say I go to another page, say <code>/AboutUs.aspx</code>, how would I know, if there is anyone logged in and who is logged in?</p> <p>I've googled this alot and seen many solutions, including <code>Membership Provider</code> and <code>LoginView</code>, but I don't understand both of them (yes, I've read many articles; even MSDN articles).</p> <p>Im not really used to programming with ASP.NET.</p> <p>Any help please! Thanks!</p>
c# asp.net
[0, 9]
5,954,512
5,954,513
Stock java/android sound effects
<p>I'm not sure if this is an appropriate question for this forum, but are there a set of stock sound effects that are available through the Java/Android APIs? I understand how to load and play an audio file programmatically, I'm just wondering if there's any sort of large database of sound effects pre-loaded into the java/android framework. I'm specifically looking for individual notes from a bass guitar - I could record them myself but I need a couple octaves and it'd be a bit of pain to do all the recording and sound editing if there's already stock versions.</p> <p>Thanks.</p>
java android
[1, 4]
5,906,033
5,906,034
How to prompt user to enter a valid mobile phone number?
<p>I am currently developing an Android anti-theft application and I am new in Android development. My apps is able to remotely lock the lost phone, so during configuration, user needs to enter a valid phone number, but how I determine whether the phone number entered is valid? Thanks</p>
java android
[1, 4]
3,258,833
3,258,834
Initializing jQuery.load'ed elements
<p>I'm loading part of my webpage using AJAX, in particular <code>jQuery.load()</code>. With this the usual jQuery pattern</p> <pre><code>$('.classname').click(...) // Handler // or, working with bootstrap $("a[rel=tooltip]").tooltip() // Function </code></pre> <p>or similar obviously don't work any more, because they are called only when the page is loaded. I realize there is jQuery.on for the first example, but how would I implement the second?</p> <p>Is there a simple (builtin) way to also apply these to <code>jQuery.load</code>ed stuff, or do I have to work around it myself? Seems like a problem a lot of people should be having.</p>
javascript jquery
[3, 5]
80,683
80,684
How do I change accordion header with plus and minus symbol?
<p>I don't like the default Accordion icons and I want to change them. This link here:</p> <p><a href="http://jqueryui.com/demos/accordion/#option-header">http://jqueryui.com/demos/accordion/#option-header</a></p> <p>shows the option to change the header but it requires to specify icons. I don't need icons. I just need a simple <code>(+)</code> and <code>(-)</code></p> <p>How can I do that with accordions?</p>
javascript jquery
[3, 5]
39,074
39,075
Recursively replaced element with editor (and back) breaks event listeners
<p>Background: There are some values on my website which shall be editable via JavaScript and Ajax. The Ajax is working fine and I can edit values but after I saved the value I cannot edit it again without reloading the page.</p> <p>I reduced the problem to this: The original element gets replaced with a HTML form. When the form is submitted the form itself is replaced by the new version of the display element, but the event listener is broken.</p> <p>I put together some sample JS code (<a href="http://jsfiddle.net/J8Sa7/" rel="nofollow">JSfiddle</a>) which doesn't work as I expect.</p> <pre><code>var text = $('&lt;em/&gt;').text('click me!'); text.click(function() { var button = $('&lt;input type="button" value="Click me, too" /&gt;'); button.click(function() { $('#container').html(text); }); $('#container').html(button); }) $('#container').html(text); </code></pre> <p>What shall happen:</p> <ol> <li>current value displayed</li> <li>after text <code>click</code>ed text replaced with form (text element saved for simplicity)</li> <li>after button <code>click</code> text displayed again</li> <li><code>click</code> on text works again as in step 2 (doesn't work now)</li> </ol> <p>Why is the <code>click</code> event lost when using the <code>text</code> object again?</p>
javascript jquery
[3, 5]
4,328,550
4,328,551
Label does not display on postback?
<p>I have an <code>asp:Label</code> on a page. When I do a post back via a button click, the label does not show. It shows in some cases such as the following:</p> <pre><code>if(ddlStatus.SelectedValue == "-1") lblMessage.Text = "Select Status"; </code></pre> <p>But it does not show in this case:</p> <pre><code>lblMessage.Text = SendRequest(); SaveRequest(); </code></pre> <p>I can see the value when debugging, it just doesn't appear on the page.</p> <p><code>&lt;span id="PageBody_PageBody_lblMessage" style="color:Red;font-size:Large;"&gt;&lt;/span&gt;</code></p>
c# asp.net
[0, 9]
389,439
389,440
protecting files for download just for user that has credit in his/her acount?
<p>i wanna creat a website for downloading some files (pdf,word,xls, such as these files), each file has pice for example a.pdf is 10$ and b.pdf id 20$. For example usern "x" has 12$, how can i prevent this user for download file b.pdf ? Please giv me suggestions. You know i know that i can have membership system that can hqve roles for accessing folders but how about files ? Or you think i dont need to register users they can pay online price for each file, for example you select a.pdf and you will connect to paypal or others and you`ll pay, if you pay the link will be shown but how about if the user copy the link and send it to him/her friends ? Thank you</p>
c# asp.net
[0, 9]
838,550
838,551
When do we use HashSet<>
<p>i have a small sample .</p> <pre><code>//Class public class GetEntity { public string name1 { get; set; } public string name2 { get; set; } public GetEntity() { } } </code></pre> <p>and:</p> <pre><code>public void GetHash() { HashSet objHash = new HashSet(); GetEntity obj = new GetEntity(); obj.name1 = "Ram"; obj.name2 = "Shyam"; objHash.Add(obj); foreach (GetEntity objEntity in objHash) { Label2.Text = objEntity.name1.ToString() + objEntity.name2.ToString(); } } </code></pre> <p>Code works fine.Same task is done through Dictionary and List.But i want to know when we use HashSet&lt;> , Dictionary&lt;> or List&lt;>.Is there only performance issue or any other things which i dont understand.Thanks.</p>
c# asp.net
[0, 9]
4,019,155
4,019,156
How to make the text bold using jquery
<p>I have this out put.</p> <pre><code>&lt;option value="18277"&gt;Dollar Max Hospice~Mx&lt;/option&gt; &lt;option value="12979"&gt;Routine Adult Physical Exam Visit Limit&lt;/option&gt; &lt;option value="12841"&gt;Is Reverse Sterilization Covered Out of Network?&lt;/option&gt; &lt;option value="12918"&gt;MD CDH PPO Variables 2&lt;/option&gt; &lt;option value="12917"&gt;DC CDH PPO Variables 2&lt;/option&gt; &lt;option value="12833"&gt;Is Sterilization Covered No Network?&lt;/option&gt; &lt;option value="12834"&gt;Is Sterilization Covered In Network&lt;/option&gt; </code></pre> <p>I have a search box and button when i hit Dollar I need to bold the text in my list box. I need to itterate the list box data and make that text as bold.</p> <p>Can any body help me out.</p>
javascript jquery
[3, 5]
2,562,298
2,562,299
Can I hide SMS on Android?
<p>I would like to develop an application for Android 3.0 with only one button... When I click on this button I should HIDE all the SMS sent from a specific phone number.</p> <p>Is it possible?</p>
java android
[1, 4]
954,010
954,011
How to check an element retrieved from DOM is still present in DOM
<p>Let's say I got a DOM element, as a param of an event, for example click.</p> <pre><code>$(document).click(function() { myElement = $(this); }); </code></pre> <p>How can I check later that myElement is still in the DOM? I can't use .length or any other things like that because it still refer to the saved element and the state of the DOM at this moment, right?</p>
javascript jquery
[3, 5]
4,106,556
4,106,557
How to solve this Timeslot issue in C#
<p>I am trying to solve this business issue:</p> <ul> <li>A user gets 10 attempts to login every 5 minutes</li> <li>If a user exceeds 10 attempts, I display a "You need to wait to login" message</li> <li>Once 5 minutes have elapsed, I need to reset the number of attempts and let the user attempt 10 more times.</li> </ul> <p>I'd like to do this without using a <code>Timer</code> and I am storing most of this info in the <code>Session</code></p> <pre><code>public class LoginExp { public DateTime FirstAttempt; public int NumOfAttempts; } </code></pre> <p>I store the <code>FirstAttempt</code> DateTime on Page Load.</p> <p>On the Login button click:</p> <ul> <li>I increment <code>NumOfAttempts</code></li> <li>I need to check if NumOfAttempts &lt; 10 <strong><em>within</em></strong> the same 5 minute time slot. I could get the number of minutes elapsed between <code>FirstAttempt</code> and <code>DateTime.Now</code> and do a mod of 5, but that won't tell me which timeslot this is in (In other words, a user may have attempted 3 times as of the 2nd minute and then comes back in the 7th minute to do an attempt again. The <code>mod</code> would give me the same value.</li> </ul> <p>Any thoughts on how I could do this?</p>
c# asp.net
[0, 9]
75,258
75,259
jquery calculation - NaN and formatting
<p>This is my code: </p> <pre><code>&lt;script src="js/jquery.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="js/jquery.field.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="js/jquery.calculation.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script&gt; $(function() { $('input[name^=sum]').keyup(function() { var sum1 = parseFloat($('input[name=sum1]').val()); var sum2 = parseFloat($('input[name=sum2]').val()); var sum3 = parseFloat($('input[name=sum3]').val()); $('#c_card_amount').val(sum1*sum3/100); $('#total_inc_charges').val((sum1*sum3/100)+sum1); }); }); &lt;/script&gt; </code></pre> <p>My questions:</p> <ol> <li><p>If no value is in <code>sum1</code> the <code>c_card_amount</code> and the <code>total_inc_charges</code> are <code>NaN</code>. How can I put a condition in this that says if no value is in <code>sum1</code> just show 0 in <code>total_inc_charges</code>. I've read about this but I could not figure out the answer in terms of my code. </p></li> <li><p>My second question is: how can I show the numbers in 1,000.00 format for instance? </p></li> </ol>
javascript jquery
[3, 5]
2,593,962
2,593,963
Need to serialize Bitmap in Windows32 mode
<p>I'm using gdi32 Bitmap... Need some Win32 solution to serialize gdi32 Bitmap into stream, then pass its buffer to upper level C# code, and to be able to make deserialization...</p> <p>I know how to do that in MFC, but need Windows 32.. </p> <p>the reason is - </p> <p>Being not so strong with linking Managed C# code to Unmanaged MFC Dll, I need help and sample of how to bind that kind of link.</p> <p>Thanks for ya help</p>
c# c++
[0, 6]
3,163,610
3,163,611
JS statement separator with commas
<p>I found the following js sample and am confused by the syntax. Notice the statements are separated by commas instead of semicolons. Are commas a valid statement separator in js? I have not seen this before.</p> <pre><code> $('selector').each(function () { this.onclick = function () { this.select(); }, this.onblur = function () { }, this.onfocus = function () { }, this.onkeyup = function () { } }); </code></pre>
javascript jquery
[3, 5]
5,267,113
5,267,114
Asp:Image with Link
<p>I would like to place an image in my application. when I click on it I want to move to another page. In general my asp:image to work as link Is that possible ??</p>
c# asp.net
[0, 9]
529,207
529,208
Convert piece of code from c++ to c#
<p>i'm trying to convert code from c++ to c#.. but i'm stuck. Can somebody let me know where i'm wrong?</p> <p>C++ code is:</p> <pre><code>void CALLBACK Test(void *buffer, DWORD length) { BYTE *b=(BYTE*)buffer, temp[20000]; DWORD p=0; while (p&lt;length) { DWORD c=min(length-p, sizeof(temp)); memcpy(temp, b+p, c); c=SendData(dummy, temp, c); if (c==-1) break; p+=c; } } where is SendData(int, byte[], int) </code></pre> <p>And current c# code</p> <pre><code>void Test(IntPtr buffer, int length) { byte[] temp = new byte[20000]; byte[] b = new byte[length]; Marshal.Copy(buffer, b, 0, length); long p=0; while (p&lt;length) { long c=Math.Min(length-p, 20000); Array.Copy(temp, b+p, c); c=SendData(dummy, temp, (int)c); if (c==-1) break; p+=c; } } </code></pre> <p>I'm not sure did I did it correctly, but I can see I cannot apply operator <code>+</code> to <code>b+s</code> because it's <code>long</code> and <code>byte[]</code>.</p> <p>Thanks</p>
c# c++
[0, 6]
2,921,276
2,921,277
Extract dynamically created form data
<p>I've just started using jQuery. One thing I've been using it for is adding rows to a table that is part of a form.</p> <p>When I add a new row, I give all the form elements names like <code>'name_' + rowNumber</code>. I increment <code>rowNumber</code> each time I add a row.</p> <p>I also usually have a Remove Row Button. Even when a row is removed, the <code>rowNumber</code> count stays the same to keep from repeating element names.</p> <p>When the form is submitted, I set a hidden element to equal the <code>rowNumber</code> value from jQuery. Then in PHP, I count from 1 to the <code>rowNumber</code> value. Then for each value, I perform an <code>isset($_REQUEST['name'_ . index])</code>. This is how I extract the form elements that remained after deleting rows in jQuery.</p> <p>Does anyone here have a better technique for accounting for deleted rows?</p>
php jquery
[2, 5]
1,275,856
1,275,857
Frequency from binary input
<p>Background: I have a IOIO which I am using to measure the output from an photodiode, this is the converted into a digital output. I need to find the frequency at which the signal changes between 1 and 0. Everything I have tryed so far has hanged my test app, any suggestions?</p> <p>current code:</p> <pre><code>if(diode == 1 &amp;&amp; frequencyFound == false){ startTime = System.currentTimeMillis(); while((frequencyFound == false)){ if(diode == 0){ while(frequencyFound == false){ if(diode == 1){ double endTime = System.currentTimeMillis(); time = endTime - startTime; frequency = (long) (1.0 / time); frequencyFound = true; } Thread.sleep(100); } } Thread.sleep(100); } } </code></pre>
java android
[1, 4]
511,857
511,858
Gridview : How to make the header text multiline?
<p>I have a gridview and sqldatasource.</p> <p>The default header text for each column is for a single line. Is there any way of making the header *multiline so I can add another line of text under the first one.?</p> <p>Thanks</p>
c# asp.net
[0, 9]
3,741,018
3,741,019
Can't find Database namespace in System.Data.Entity in ONE file
<p>I have no idea. I just created a Global.asax and I'm just trying to use System.Data.Entity.Database and it has no idea what I want.</p> <pre><code>using System; using HROpenEnrollment.Model; using System.Data.Entity; using HROpenEnrollment.Data.EntityFramework; namespace HROpenEnrollment { public class Global : System.Web.HttpApplication { protected void Application_Start() { using System.Data.Entity. } </code></pre> <p>The irritating part is I can use it elsewhere. Here's another file in the same project that works fine.</p> <pre><code>using System; using HROpenEnrollment.Model; using System.Data.Entity; using HROpenEnrollment.Data.EntityFramework; namespace HROpenEnrollment.Data.EntityFramework { public class Populate : DropCreateDatabaseIfModelChanges&lt;OpenEnrollmentContext&gt; { </code></pre> <p>What gives? I get all the way to System.Data.Entity but it won't find anything after that.</p>
c# asp.net
[0, 9]
5,040,682
5,040,683
Logic for prioritising elements in the dom using JS
<p>I have made this fiddle: <a href="http://jsfiddle.net/GMH6q/2/" rel="nofollow">http://jsfiddle.net/GMH6q/2/</a></p> <p>HTML:</p> <pre><code>&lt;div class="feature" id="about"&gt;about&lt;/div&gt; &lt;div class="feature" id="services"&gt;services&lt;/div&gt; &lt;div class="feature" id="products"&gt;products&lt;/div&gt; &lt;label&gt;About&lt;/label&gt;&lt;input type="checkbox" data-id="about" /&gt; &lt;label&gt;Services&lt;/label&gt;&lt;input type="checkbox" data-id="services" /&gt; &lt;label&gt;Products&lt;/label&gt;&lt;input type="checkbox" data-id="products" /&gt; </code></pre> <p>JavaScript:</p> <pre><code>$(document).ready(function(){ var priority = {'about':1, 'services':2, 'products':3}; $('input[type="checkbox"]').change(function(){ var el = $(this).attr('data-id'); if($(this).is(':checked')){ $('.feature').hide(); $('.feature#' + el).show(); } else { $('.feature#' + el).hide(); } }); }); </code></pre> <p>If <code>about</code> is on, then clicking any other checkbox won't have any effect.<br> Likewise if <code>services</code> is on, putting <code>products</code> on won't have any effect, but putting <code>about</code> in, will just show <code>about</code>.<br> If all are on, then <code>about</code> just shows.<br> If all are off, nothing shows.</p> <p>The priority array needs to be integrated in somehow, but I dont know how. If someone could help me with some logic and integrating the array, that would be great!</p>
javascript jquery
[3, 5]
3,247,847
3,247,848
jquery if parent exist else
<p>I need to know if parent exist then I need to do this else this. Here is the code:</p> <pre><code>if ($('#block-slides p a img.alignleft').parent().length) { $(this).parent().parent().css({'max-width' : '100%', 'padding' : '0'}).addClass('clearfix'); } else { $('#block-slides p img.alignleft').parent().css({'max-width' : '100%', 'padding' : '0'}).addClass('clearfix'); } </code></pre> <p>But nothing happen. Any help please?</p>
javascript jquery
[3, 5]
1,498,661
1,498,662
ASP.NET : Invoke codebehind method on Enter Key press in form
<p>I have an asp.net form which has 3 text box and and a asp.net link button control.I want to invoke the button click event handler method when the user press enter key.I used asp.net panel and its default button property.Its working in IE.But not in other Browsers like firefox etc.. Is there any other method to do so ?</p>
javascript asp.net
[3, 9]
3,068,021
3,068,022
Javascript/JQuery perform function when user scrolls near bottom of page
<p>On a prominent news site (sry, can't remember exactly which one) I saw a really cool effect... when you scroll near the bottom of the page, a new element slides down from the top of the browser viewport with a lot of social media options (tweet, share on facebook, etc). I'd like to emulate something somewhat similar... in fact, there's really a ton of things I could think of to do if I knew how to trigger a function when the user is near the bottom of the page...</p> <p>So, my question is very basic: how does one trigger a function when the user has scrolled near the bottom of a dynamically sized page?</p>
javascript jquery
[3, 5]
5,742,659
5,742,660
Need help with jQuery to clone form dropdown (dynamic dropdown)
<p>I am using PHP to generate dynamic dropdown, the dropdown list items are fetched from database.</p> <p>Here's the php code for that and it works.</p> <pre><code>&lt;select name="title[]" id="title"&gt; &lt;?php $categories = Category::find_by_cid(5); foreach($categories as $category): ?&gt; &lt;option value="&lt;?php echo $category-&gt;name; ?&gt;"&gt;&lt;?php echo $category-&gt;name; ?&gt;&lt;/option&gt; &lt;?php endforeach; ?&gt; &lt;/select&gt; </code></pre> <p>What i want to do is, Using jQuery whenever a link with id AddNew is clicked, a new dropdown should appear below that, containing same values.</p> <p>Also, is there any way to execute php code inside javascript??</p> <p>ex :</p> <pre><code>&lt;script&gt; var name = "&lt;?php echo $user-&gt;name; ?&gt;"; &lt;/script </code></pre>
php jquery
[2, 5]
3,920,033
3,920,034
Read csv file using
<p>I am using the below two codes to read the csv file but it returns the same error.</p> <pre><code>'E:\business\business\Document\4112013\20580.csv' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides. </code></pre> <p>I'm not able to fix this issue. Plese help me to solve this</p> <pre><code>SaveLocation = @"E:\business\business\Document\4112013\20580.csv"; string connStr = "Provider=Microsoft.Jet.OleDb.4.0;Data Source=@" + SaveLocation + ";Extended Properties=\"Text;HDR=YES;FMT=Delimited\""; OleDbConnection conn = new OleDbConnection(connStr); conn.Open(); // give full path to the file here OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT * FROM " + SaveLocation, conn); DataSet ds = new DataSet("QueryCSV"); adapter.Fill(ds); DataTable dt = ds.Tables[0]; System.Data.OleDb.OleDbDataAdapter MyCommand = default(System.Data.OleDb.OleDbDataAdapter); System.Data.OleDb.OleDbConnection MyConnection = default(System.Data.OleDb.OleDbConnection); //MyConnection = new System.Data.OleDb.OleDbConnection("provider=Microsoft.ACE.OLEDB.12.0; " + "data source=" + SaveLocation + "; " + "Extended Properties=Excel 12.0;"); //MyConnection = new System.Data.OleDb.OleDbConnection("provider=Microsoft.ACE.OLEDB.12.0; " + "data source=" + SaveLocation + "; " + "Extended Properties='csv;HDR=Yes;FMT=Delimited(,)';"); MyConnection = new System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;Data Source=" + SaveLocation + ";Extended Properties=\"Text;HDR=YES;FMT=Delimited\""); MyCommand = new System.Data.OleDb.OleDbDataAdapter("select * from [Sheet5$]", MyConnection); ds = new System.Data.DataSet(); MyCommand.Fill(ds); </code></pre>
c# asp.net
[0, 9]
5,711,689
5,711,690
Undesired residual effect of mouseenter/mouseleave after clicking on sliding menu
<p>I have a mockup of a menu system I'm putting in place: <a href="http://djinnius.com/GFTest/gftest.html" rel="nofollow">http://djinnius.com/GFTest/gftest.html</a> (there is also a bin here: <a href="http://jsbin.com/orejup/2/edit" rel="nofollow">http://jsbin.com/orejup/2/edit</a> but the text displayed in the green div doesn't work properly) The menu slides out when the little arrow in the upper LH corner is clicked on. I provide a full preview of the menu item in the green div when the menu item is hovered over by the mouse.</p> <p>I would like the menu to elegantly slide in/out of sight like this: <a href="http://jsbin.com/itogor/5" rel="nofollow">http://jsbin.com/itogor/5</a></p> <p>The thing that is special with the above behavior is that if I don't use the positioning and overflow properties as demonstrated in the jsbin, the menu text squishes down as the menu is closed. This is unsightly and distracting.</p> <p>I thought I had the above effect working properly but I ran into a problem that seems to indicate otherwise. I want to change the contents of the green div based on the selection of the slideout menu. However, when you scroll down to the lower items of the menu and click on an item, the contents of the green div are incorrect. It appears that the sliding menu is squeezing the text down and causing a mouseenter and mouseleave event to take place after the click event. This changes the content of the green div to be incorrect. </p> <p>Any thoughts on how to prevent this behavior? I attempted to write a bin (<a href="http://jsbin.com/orejup/2/edit" rel="nofollow">http://jsbin.com/orejup/2/edit</a>) but for some reason the green div text isn't changing. You can still see the undesired effect by examining the console and seeing the mouseenter/mouseleave events occurring after the click event.</p>
javascript jquery
[3, 5]
4,073,419
4,073,420
Change iframe src
<p>For example I have some link in index.html:</p> <pre><code>&lt;a href="message.html"&gt;Go to message page&lt;/a&gt; </code></pre> <p>In other page, iframe.html I have one iframe:</p> <pre><code>&lt;iframe id="iframe" src="profile.html" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt; </code></pre> <p>Can it be done so that, when I click 'Go to message page' link, it redirect me to iframe.html and change iframe src to message.html?</p>
javascript jquery
[3, 5]
5,640,603
5,640,604
JQuery: Disabling top menu for sliding tabs
<p>I getting closer to my goal. But I am having difficulties in disabling the top menu for sliding tabs. My goal is that the user will only navigate the tabs through Previous/Next controls. Some how my code is still not disabling the top menu. Any suggestion why? <a href="http://jsfiddle.net/PS336/102/" rel="nofollow">JSFIDDLE</a> </p> <p>Thanks </p> <p>*<strong><em>JQUERY</em></strong></p> <pre><code>&lt;script&gt; $(document).ready(function() { $('.prev-tab').click(function() { $('.st_tab_active').attr({'disabled': true}); var tab= $('.st_tab_active').parent().prev().children('a'); tab.removeAttr('disabled'); tab.trigger('click'); return false; }); $('.next-tab').click(function() { $('.st_tab_active').attr({'disabled': true}); var tab= $('.st_tab_active').parent().next().children('a'); tab.removeAttr('disabled'); tab.trigger('click'); return false; }); }); &lt;/script&gt; </code></pre>
javascript jquery
[3, 5]
5,825,281
5,825,282
window.location redirect not working in Android
<p>I'm trying to redirect to a different page using javascript. It works nicely with Firefox but not with Android. Here's a sample code:</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt; &lt;head&gt; &lt;meta name="viewport" content="width=device-width" /&gt; &lt;meta content="text/html; charset=UTF-8" http-equiv="content-type" /&gt; &lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; document.write("1: " + window.location.href + "&lt;br /&gt;"); window.location = "http://www.google.com"; document.write("2: " + window.location.href + "&lt;br /&gt;"); window.location.href = "http://www.google.com"; document.write("3: " + window.location.href + "&lt;br /&gt;"); window.location.assign("http://www.google.com"); document.write("4: " + window.location.href + "&lt;br /&gt;"); &lt;/script&gt; &lt;title&gt;Test&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>The goal is to redirect to google.com and I'm trying 3 different approaches. Firefox redirects immediately. Android prints the first location and then stops. If I comment out</p> <pre><code>window.location = "http://www.google.com"; </code></pre> <p>then it prints the first two and stops. And so on. For some reason, I can read window.location just fine but when I try to modify it, the script hangs. Any help would be great. Using Android 2.2.</p>
javascript android
[3, 4]
2,062,193
2,062,194
How to integrate quickbook into asp.net c# website?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/7083744/what-is-the-best-way-to-integrate-with-quickbooks-from-c-sharp-code">What is the best way to integrate with quickbooks from C# code?</a> </p> </blockquote> <p>I have created a asp.net website and I want to integrate quick-book into my website in the accounting section. To do you know process to install quick-book into my website.</p>
c# asp.net
[0, 9]
4,505,311
4,505,312
python, options to parse a javascript web app
<p>Gents, Have to write a python app to communicate and fetch some data from a password protected, javascript enabled web app.</p> <p>The webapp unfortunately requires javascript to run, and refuses to work if javascript is disabled. Therefore, 'urllib2' and 'requests' dont work when trying to fetch data.</p> <p>What are my options at this point? If I grabbed HTTP traffic via some tool such as firebug... and tried re-playing this traffic via some python method... would this work? All I need for the script to do is:</p> <ol> <li>Login into website</li> <li>Change a dropdown item</li> <li><p>Grab a single line of text and logout</p> <p>Thanks guys! </p></li> </ol>
javascript python
[3, 7]
457,561
457,562
Create custom controls dynamically in ASP.NET
<p>I want to create custom control (let's name it <code>DesignPanel</code>) that will allow user to design his own webpage structure that would be stored in a sitemap file. This Design Panel will have child controls inside ( <code>SiteElement</code>). User will build page strcture by connect Site Elements, customize them ( like change name) and <em>add new ones</em>.</p> <p>This last point is main issue for me. Should I add those Site Element controls dynamically like <code>DesignPanel.Controls.Add(new SiteElement())</code> in <code>UpdatePanel</code> control or there is better approach ( adding them to DOM structure by javascript, something diffrent)?</p> <p>I dont need any code or prepared solution, just name techniques that I should look for!</p> <p>thanks!</p>
javascript asp.net
[3, 9]
166,886
166,887
liberal xml parser for c# or java
<p>I am looking for a liberal xml parser, one for java and one for C#, that can "properly" parse</p> <ol> <li>unquoted attribute values</li> <li>non-conjugated attribute</li> </ol> <p>like:</p> <pre><code>&lt;Person id=candy female single phone=555.666.7777 /&gt; </code></pre> <p>rather than</p> <pre><code>&lt;Person id='candy' female='true' single='true' phone='555.666.7777'/&gt; </code></pre>
c# java
[0, 1]
603,338
603,339
jQuery set Hash value
<p>Prototype version</p> <pre><code> var hash = new Hash(); hash.set("date_query", "test"); hash.set("date_search", "1"); </code></pre> <p>Jquery?</p>
javascript jquery
[3, 5]
4,843,446
4,843,447
jquery resize on div element
<p>jquery has the resize()-event, but it just work with window.</p> <pre><code>jQuery(window).resize(function(){/*What ever*/}); </code></pre> <p>This works fine! But when i want to add the event to a div element it doesnt work.</p> <p>E.g.</p> <pre><code>jQuery('div').resize(function()/*What ever*/{}); </code></pre> <p>I want to start an callback when the size of a div-element has changed. I DONT want to start a resizeable-event - just a event to check if the size of a div-element has changed.</p> <p>Is there any solution to do this ?</p>
javascript jquery
[3, 5]
1,560,708
1,560,709
Display Data from text boxes in Grid Format
<p>My Question can i display data in grid format using in javascript/jquery but without fetching data from DB only in front end. suppose: </p> <pre><code>textfield1 textfield2 add more (link) </code></pre> <p>When click on add more link then user entered data display like:</p> <pre><code>Firstname Lastname amit kumar textfield1 textfield2 add more (link) </code></pre> <p>and immediately both textfield blank. Also same next step.</p> <p>pls let me know.</p>
javascript jquery
[3, 5]
4,682,043
4,682,044
implementing a wait for element present for N seconds before interacting with an element with javascript and jQuery lib
<p>I have the following code:</p> <pre><code>var play = function() { $(steps).each(function(i, e) { $(this).is(':visible') ? $(this).click() : console.log($(this).html() + ': not visible'); }); }; </code></pre> <p>The problem with this code is that it <strong>immediately</strong> clicks on the element if it is visible. However, I would like to wait/poll for the element to be present for up to <strong>N</strong> seconds before I click on the element. Any suggestions on how I could implement this? Thanks!</p>
javascript jquery
[3, 5]
499,105
499,106
403 - Forbidden: Access is denied
<p>I have created a folder inside my asp.net solution named admin. I have created few pages inside it like categories.aspx, users.aspx. I uploaded code to my hosting and when i try to access it using:</p> <pre><code>www.mydomain/admin/ </code></pre> <p>I get:</p> <pre><code>403 - Forbidden: Access is denied. You do not have permission to view this directory or page using the credentials that you supplied. </code></pre> <p>I looks like that hosting is looking for default.aspx inside this folder. How can I make users.aspx as default page for this folder ?</p> <p>Please suggest.</p>
c# asp.net
[0, 9]
5,043,630
5,043,631
Create a div containing target div using jQuery
<p>I think that this should be easy, but I'm not able to get it working. I want to target a div or other element using jQuery and then dynamically create a div containing the targeted element, for example:</p> <p>jQuery ('.myclass')</p> <p>How can I create a div with the background-color attribute set to white that contains 'myclass' element?</p> <p>Initially I have: <code>&lt;div class="myclass"&gt;Some HTML elements inside&lt;/div&gt;</code></p> <p>And after executing the jQuery call i want to have: <code>&lt;div style="background-color:#fff"&gt;&lt;div class="myclass"&gt;Some HTML elements inside&lt;/div&gt;&lt;/div&gt;</code></p> <p>I hope that you understand my question...</p>
javascript jquery
[3, 5]
5,727,332
5,727,333
using jquery i want the a div to hide when the input is empty?
<p>For example say i have a text box and a hidden div called suggestions</p> <pre><code>$("#suggestinput").on({ keyup: function(){ $("#suggestions").addClass("active"); }, blur: function () { $("#suggestions").removeClass('active'); } //another event to know if input is empty while on focus, then removeClass('active'); }); </code></pre> <p>The first event is when the user types in the input show suggestion, the second one is blur, so when the user unfocuses on the input the suggestions el will hide, i want a third event to check while on focus if the input is empty remove active class.</p> <p>Working example is here thanks: <a href="http://jsfiddle.net/HSBWt/" rel="nofollow">http://jsfiddle.net/HSBWt/</a> </p>
javascript jquery
[3, 5]
5,239,614
5,239,615
How do I find out the first digit of a textbox value in asp.net/javascript?
<p>I would like to find the first digit of the value in a textbox in order to execute some conditional code. I can get the textbox by using getElementById, and would like to execute my code if the first digit contained within the textbox is 7, 8, or 9.</p> <p>How can I test to see if the first digit of my textbox is between 7 and 9?</p>
asp.net javascript
[9, 3]
302,553
302,554
removing last 3 rows of a table
<p>i have a table and i have two buttons to add and remove rows to this table .</p> <p>so adding row is easy (i get 3 rows via ajax every time) .</p> <p>now i want to be able to remove last 3 rows of table by clicking on remove button so unless there is some kind of function or .... to remove recent additions to my table ! i need to remove last three rows of table myself </p> <p>something like </p> <pre><code>$('#tbl tr:lt(3)').remove(); </code></pre> <p>but last 3 not first ones ! </p> <p>or i have to do something stupid like</p> <pre><code>function remove(){ var i ; for(i=0 ; i &lt; 3 ; i++ ){ $('#table tr:last').remove(); } alert('removed'); } </code></pre> <p>bytheway i just wrote this last piece of code cuz apparently unless there is bunch of cods in my post It does not meet site quality standards !! </p>
javascript jquery
[3, 5]
4,468,645
4,468,646
push an apk file into assets folder programmatically in android
<p>Can i push an apk file into my assests folder programmatically?I wanted to use this apk file in my application.</p> <p>Please forward your valuable suggestions to me.</p> <p>Thanks in advance... Priya</p>
java android
[1, 4]
5,644,931
5,644,932
time count after registry
<p>I saw some website that after you have registered, you can use the service like posting a comment immediately.</p> <p>You may have to wait for 5 or 10 minutes to be able to start, like this StackOverflow website.</p> <p>Once you have asked question, you have to wait 20 minutes to select your answer.</p> <p>If I want to do it in JavaScript or PHP can anyone show me how to do it? I assume you have to compare the time with current time-stamp, but don't know how to exactly implement it. Thanks in advance!</p>
php javascript jquery
[2, 3, 5]
2,851,867
2,851,868
C# Javascript Beautifier
<p>I am wondering if anyone knows of an open source c# library for beautifying javascript. I would like to make use of such a library within my asp net website to make debugging messy javascript easier.</p> <p>There are currently many online websites for this (ie. <a href="http://jsbeautifier.org/" rel="nofollow">http://jsbeautifier.org/</a>) however I would like to have access to such a utility within c#, even if it is just a wrapper for communicating with an online API.</p> <p>Many Thanks, Chris</p>
c# javascript
[0, 3]
701,276
701,277
Using jQuery to find push all links in html to an array?
<p>given a block of html that is a var, not on the actual document:</p> <pre><code>var html_cmt = "Check out this awesome link: https://github.com/jquery/jquery-ui Check out this awesome link: https://github.com/jquery/jquery-ui Check out this awesome link: https://github.com/jquery/jquery-ui Check out this awesome link:" </code></pre> <p>I need to build an array of all links, I have the following but it's only building the first one, not all.</p> <pre><code>var hrefs = new Array(); hrefs.push( $("&lt;div&gt;").html(html_cmt).find('a').attr('href')); </code></pre> <p>Suggestions on how I can create an array of all the links, given html content that is not on the document just a JS var? thank you</p>
javascript jquery
[3, 5]
2,996,167
2,996,168
Cross Domain Ajax Call Jquery
<p>I am trying to call a page with ajax, but from another server. This js code runs from bookmark in any page you want and I need to get some data from my server. How could I do this? or maybe connect directly to the database?</p> <p>I got this code:</p> <pre><code>$j.getJSON(serverUrl+"isLogin.php?callback=?",function(data){ //really no need to do anything here, we're just posting data //but this will output success alert(data); }); </code></pre> <p>isLogin:</p> <pre><code>if ($_SESSION['user'] == ''){ echo json_encode(array("isLogin" =&gt; "false")); } else { echo json_encode(array("isLogin" =&gt; "true")); } </code></pre> <p>How could I make this? I try allot of solutions but none works. This one said no errors, but the alert never appear</p> <p>Thanks</p>
php javascript jquery
[2, 3, 5]
3,454,616
3,454,617
3d games in android
<p>i want to create 3d games for android but i don't have any information about that. i want to do this in most advanced way like big companies. "most advanced way" means i don't use simple tools that rapidly return result but there is no way to creativity and CREATION. I need an standard way with complete resources and so on...</p> <p>i want to know this too: 1- i need a game engine or i can create games with my own engine? how? 2- [important] i need to learn 3D Max or Maya etc...? </p> <p>Every guidance will push me forward. Thanks </p>
java android
[1, 4]
2,926,955
2,926,956
Javascript wich loads images after load web page
<p>my project is in wordpress. In my home page number of images are load from itunes store. It takes to long time n page loading. </p> <p>May i have any javascript so that all the images are load after the load web page.</p>
php javascript
[2, 3]
3,182,704
3,182,705
Java - best way to implement a dynamic-size array of objects
<p>I am a novice with Java.</p> <p>I have to implement an array of objects that changes in size during execution.</p> <p>The code I am writing is going to be ported on Android, too.</p> <p>According to your experience, what's the best class to implement that?</p> <p>Thanks,<br> Dan</p>
java android
[1, 4]
3,162,325
3,162,326
extract text from textarea and paste it in another
<p>Well...how can i do something like this with jquery or javascript:</p> <h2>Example 1:</h2> <p>Textarea 1:</p> <ul> <li>Someone types "World" in the firstline</li> </ul> <p>then the text gets extracts to a variable and then it adds a hello infront of it</p> <p>Textarea 2:</p> <pre><code>Hello World </code></pre> <h2>Example 2:</h2> <p>TextBox 1:</p> <ul> <li>Someone types "World" in the firstline</li> <li>Someone types "Era" in the secondline</li> </ul> <p>Textarea 2:</p> <pre><code>Hello World Hello Era </code></pre>
javascript jquery
[3, 5]
4,872,121
4,872,122
Vibrator on Android
<p>I read a lot about this problem on Stackoverflow but not of the Helps her works at my problem.</p> <p>In my Source Code I have this.</p> <pre><code>vibretor = (Vibrator) this.getSystemService(VIBRATOR_SERVICE); vibretor.vibrate(600); </code></pre> <p>and in the AndroidManifeste.xml I have the Permission</p> <pre><code>&lt;uses-permission android:name="android.permission.VIBRATE"/&gt; </code></pre> <p>this is all right I think because i looked it up at <a href="http://developer.android.com" rel="nofollow">http://developer.android.com</a></p> <p>but it does not worke at all :( So have someone of you a idea how I can get it working?</p> <p>My testing Devices are: Eee Pad Transformer, Samsung Galaxy S2 and Samsung Galaxy Tab 10.1</p>
java android
[1, 4]
1,974,649
1,974,650
paypal donation button integration in asp.net c#
<p>it is required to integrate the paypal donation button in asp.net c# web form, on clicking the donate button an email should be sent to the receiver with capturing the details of the donor like donor name, occupation, address and donation amount etc.</p> <p>Please any help from anyone will be appreciated.</p> <p>thanks</p>
c# asp.net
[0, 9]