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,747,630
5,747,631
extension method parameter in gridview databind
<p>I'm binding an object to a gridview. The object (LeClient) consists of several variables, two of which are related to its phone number. One variable contains a string of digits (LePhone) and the other contains an int that represents the country code (LeCountryCode). I have an extension method for strings that works ...
c# asp.net
[0, 9]
3,165,582
3,165,583
jQuery() on a complete, well-formatted HTML document string results in a Syntax Error, unrecognized expression
<p>I've got a document I'm pulling in with <code>$.ajax()</code>, and my <code>.done()</code> callback looks like this:</p> <pre><code>function (data, text_status, jq_xhr) { var $what_i_want = $(data).find('#what-i-want'); } </code></pre> <p>where <code>data</code> is a string that contains the entirety of an HTML ...
javascript jquery
[3, 5]
2,819,089
2,819,090
Passing and getting hyperlinks into a single JQuery function
<p>What I would like to do is to take several links that may be on a page and send only the link that was clicked on to a PHP script to be parsed.</p> <pre><code>&lt;a href="?something=2&amp;id=100&amp;somethingelse=55" class="link"&gt;My First Link&lt;/a&gt; &lt;a href="?something=3&amp;id=400&amp;somethingelse=65" c...
javascript jquery
[3, 5]
890,452
890,453
Set Referer header in asp.net
<p>&nbsp; This should be an easy question, but I've been unable to solve it. I'm trying to change the Referral header prior to redirecting the page of an HttpResponse object. I know this can be done in an HttpWebResponse, but can't get this to work for a standard Page.Response.<br /> &nbsp; I'm trying to just set th...
c# asp.net
[0, 9]
3,222,563
3,222,564
Listview: Bind data from db to label control by column id not name
<p>Appologies if this has already been visited a 1,000 times over but I cant think how to word my search to get the result.</p> <p>I've inherited a crappy db structure where various table use the same column names, meaning that various stored procedure return result with duplicated column names such as 'id'.</p> <p>S...
c# asp.net
[0, 9]
1,307,224
1,307,225
How to improve the security on a ASP.NET site?
<p>I have an ASP.NET site and some clients want a better layer of security for accessing it. The site today asks for a username and password, but a lot of clients want to restrict the access to some machines and I need to do this on my server side. So, I'm asking for some advice.</p> <ol> <li><p>Use a VPN to restrict ...
c# asp.net
[0, 9]
3,347,357
3,347,358
Find assigned EventHandlers in debug in asp.net / C#
<p>I am having an issue with asp.net and a third party control that is embedded in a user control. I want to assign an event handler to one of the third party control's events. It allows the assignment but the event handler never get's touched. I believe that I am either messing up the event handler assignment or as...
c# asp.net
[0, 9]
664,342
664,343
Android java code to change displayed spinner
<p>Is there a way in android java to change the displayed spinner item to another item in the spinner list?</p> <p>If I have a spinner that has three items in its arrary can I change the value displayed to the second or third item in the arrary? I want to create a button that will change all my spinner displayed valu...
java android
[1, 4]
955,770
955,771
Change image size on click of button in jQuery
<p>I am working on image upload and I need to add functionality for image shapes. </p> <p>There are buttons for landscape, portrait, square and panoramic. When the user clicks any of these, the div shape will change accordingly. </p> <p>This is the code for the square shape but when I click on the square shape, it st...
php jquery
[2, 5]
1,069,100
1,069,101
How to work with calendar on emulator on Java, Android?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/7537494/how-to-use-calendar-in-emulator">How to use Calendar in Emulator?</a> </p> </blockquote> <p>I use calendar for my application, and app works on real device and doesn't work on emulator. But I need check ...
java android
[1, 4]
2,114,487
2,114,488
How to get the name of clicked image and compare it with a php variable?
<p>Two images, placed by php: </p> <pre><code>echo "&lt;img onclick='test()' src=\"/img/Sun.png."\"&gt;"; echo "&lt;img onclick='test()' src=\"/img/Moon.png."\"&gt;"; $x = "Sun.png"; </code></pre> <p>js: </p> <pre><code>function test(){ if (clicked_image_name == $x) ...do something </code></pre> <p>So, how to get...
php javascript
[2, 3]
3,631,044
3,631,045
how to pass a checkbox value using <a href
<p>example.php ~ when i check the checkbox in example.php webpage.. then i click the print button, the value will be pass on example1.php <pre><code>if($items) { foreach($items as $i) { print"&lt;input name='checkbox[]' type='checkbox' id='checkbox[]' value='$i-&gt;logi_id'&gt;"; } } echo...
php jquery
[2, 5]
4,127,711
4,127,712
java Script User Define $ function like jquery
<p>I'm trying to Create user define $ function as i cannot use Jquery in existing project.</p> <p>I want to get this function as work as Jquery $('ID')</p> <p>Please give me some hint Any hint OR Example for Example</p> <pre><code>function $(element) { } var value = $('elementID').value </code></pre> <p><strong>U...
javascript jquery
[3, 5]
2,704,871
2,704,872
How to create a javascript class or module, I need 2 instances on a page
<p>I am wrapping common javascript functions that will work on elements on a page.</p> <p>My page has 2 of these elements (textareas), so I will need to create 2 instances and then I want to do this:</p> <pre><code>var textArea1 = new SomeClass(); var textArea2 = new SomeClass(); textArea1.init("ta1"); textArea2.ini...
javascript jquery
[3, 5]
3,830,463
3,830,464
JQuery - generating a grid from a list of words
<p>Currently this script takes the words from the list and generates a grid, giving the words random positions each time. When the words are generated I want them to be split into individual characters, into cells next to each other so the word still makes sense - how do I do this? </p> <pre><code> var listOfWords = ...
javascript jquery
[3, 5]
1,146,194
1,146,195
disable text selection while pressing 'shift'
<p>I'm implementing item selection functionality in javascript (using jQuery). <i>item</i> is a li that contains some html.<br /> the user can click on one item (makes it selected) and then shift-click on another item to select all the items in between. this basically works OK, however the shift-click also selects (hig...
javascript jquery
[3, 5]
1,699,385
1,699,386
best way to store php data on a page for use with javascript/jquery?
<p>Ok, so im trying to work out the fastest way of storing data on my page without slowing the page load:</p> <ul> <li>I need to store information in the page to be later used by jquery.</li> <li>My page is an events page and i want to attach data to each event anchor.</li> <li>there are 100+ events to attach data to....
php javascript jquery
[2, 3, 5]
5,432,069
5,432,070
android change selected tab background color
<p>I came from objective-c and I am an Android newbie. I am using following method that intends to change tabColor for index 0. But I would like to change default grey tab when selected. Thank you.</p> <pre><code>mTabHost.getTabWidget().getChildAt(0).setBackgroundColor(Color.CYAN); </code></pre>
java android
[1, 4]
2,870,918
2,870,919
Android set margin of buttons declared in xml file programmatically?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2481455/set-margins-in-a-linearlayout-programmatically">Set margins in a LinearLayout programmatically</a> </p> </blockquote> <p>I have bunch of widgets in my layout.I have set layout_marginTop in layout file bu...
java android
[1, 4]
3,908,371
3,908,372
JQuery jVal plugin running out of space on form
<p>I am using the JQuery plugin jVal. This plugin validates user input. If the user makes an error the input box is turned red and a fly out message says what is wrong. This works great for forms where there is one Label and one input per visual row. This falls apart when you have multiple labels and inputs pe...
asp.net jquery
[9, 5]
1,614,222
1,614,223
ASP.NET - Accessing copied content
<p>I have a class library project which contains some content files configured with the "Copy if newer" copy build action. This results in the files being copied to a folder under <code>...\bin\</code> for every project in the solution. In this same solution, I've got a ASP.NET web project (which is MVC, by the way)....
c# asp.net
[0, 9]
2,325,305
2,325,306
part of my JS being printed at bottom of HTML
<p>I can't figure out why but at the bottom of my HTML output I have this portion of my JS being printed:</p> <pre><code>cel: function() { $( this ).dialog( “close” ); } } }); /* END REFRESH */ }); </code></pre> <p>which is at the end of my jQuery functions, like so:</p> <pre><code>var $newChange = $('&lt;div&gt;&l...
javascript jquery
[3, 5]
1,181,302
1,181,303
Dynamic Javascript File newline & carriage return
<p>I am building a JS page dynamically with php using .htaccss to make .php into .js</p> <p>All works well apart from the output of the JS.</p> <p>IE</p> <pre><code>$data = array('one', 'two'); foreach($data as $d){ echo "document.write('This is a test for array item ".$d."'); \r\n"; } </code></pre> <p>Problem...
php javascript
[2, 3]
631,082
631,083
Android - How to change header/footer view elements for existing ListView?
<p>Say I add a header view to my list view using the typical method like so:</p> <pre><code>View header = getLayoutInflater().inflate(R.layout.list_header, null); TextView headerText = (TextView) header.findViewById(R.id.my_textview); headerText.setText("This is my header!"); myListView.addHeaderView(header); myListV...
java android
[1, 4]
4,129,615
4,129,616
Save URL of AJAX loaded page, so it can be loaded after a refresh
<p>We have an application writted in PHP. Its main view is for example: <code>/pages/index</code>.</p> <p>Now when the user clicks on certain links, it pulls in other Views via ajax. ie. a call may look like <code>/pages/publish</code>, so the PHP outputs the relevant html for the publish section back to the index vie...
php javascript jquery
[2, 3, 5]
776,621
776,622
Retrieve database content without linebreak
<p>(asp.net C# project)</p> <p>I am trying to show contact info in my footer, I receive the info from the database, but in my administrator panel I have CKEditor which adds linebreaks. So, what my problem is that I'd like my text in my footer to have no linebreak, is there any way of doing this?</p> <p>How it looks i...
c# asp.net
[0, 9]
3,057,269
3,057,270
compress file at client-side
<p>I want to upload a file to server, but is there any way(using javascript) to compress the image at client-side before upload?</p>
asp.net javascript
[9, 3]
2,309,083
2,309,084
Build textarea with formatting controls - how to get selected text
<p>Just for fun, I want to build simple text formatting tools for a textarea. To begin, I want to be able to enclose high-lighted text in a textarea with ** if it is to be in bold format (just like stackoverflow's textarea editor). I've written the following code, which works most of the time, but it does have a bug,...
javascript jquery
[3, 5]
5,563,945
5,563,946
jquery 'attribute contains' selector with a dynamic value
<p>Let's say that i have a variable <code>questionId</code> which is an integer, and i want to find <code>tr</code> elements that have the fragment (<code>"question_"+questionId</code>) in their id. How can i do this? I thought that i would be able to do it with the jquery <a href="http://api.jquery.com/attribute-con...
javascript jquery
[3, 5]
1,319,023
1,319,024
How can I print the contents of a link?
<p>I want the contents of a link get printed by jQuery. What do i do?</p> <p>Following is my code:<br> <strong><a href="http://jsfiddle.net/9zLGZ/" rel="nofollow">DEMO:</a></strong></p> <pre><code>&lt;a href="#" onclick="window.print(); return false;"&gt;Print&lt;/a&gt; ​ $(document).ready(function() { $('ul#too...
javascript jquery
[3, 5]
2,398,902
2,398,903
In eclipse showing response from url
<p>I am very new to programming and with alot of help from people on this site I have been able to make alot of progress. This time I am kinda stuck - I have been able to make a login screen and make a call but nothing shows back once the call is made.</p> <p>If anyone can help I would appreciate it, again I am very n...
java android
[1, 4]
5,310,250
5,310,251
Adding jQuery .click() to dynamically created HTML
<p>On my web app, I am dynamically creating a live feed using jQuery to parse a JSON object and dynamically creating table rows in html (see my earlier question <a href="http://stackoverflow.com/q/5773976/258813">here</a> for an example )</p> <p>Every table row I dynamically create from the JSON object, I add an image...
javascript jquery
[3, 5]
1,075,343
1,075,344
comparing 2 strings alphabetically for sorting purposes
<p>I'm trying to compare 2 strings alphabetically for sorting purposes. For example I want to have a boolean check like <code>if('aaaa' &lt; 'ab')</code>. I tried it, but it's not giving me correct results, so I guess that's not the right syntax. How do I do this in jquery or Javascript?</p>
javascript jquery
[3, 5]
1,029,106
1,029,107
Removing elements from array dynamically
<p>So I've learnt how to add elements to an array dynamically - how about removing them?</p> <p><strong>jQuery</strong></p> <pre><code>$(document).on('change blur', '.roomFac', function () { var park = $("#park2").val(); var lecturestyle = $("#lecture_style2").val(); var roomstructure = $("#ro...
php jquery
[2, 5]
1,473,237
1,473,238
question about 128 bit number
<p>can i represent 128 bit number in java? or in c++?</p>
java c++
[1, 6]
1,475,543
1,475,544
server-side programming
<p>I'm looking to program something for an Android machine. Basically I want the phone to communicate with a server, sending it TCP/UDP packets, and I want the server to reply to the phone an answer depending on the packet received. </p> <p>I did it while ago, with 2 PC's it wasn't really a problem. I had my "server ...
java android
[1, 4]
3,083,313
3,083,314
keep last value of input box after submit with java script or php?
<p>i wanna keep last value of input box after submit and this is my code .<br> but my code dosent work </p> <pre><code>&lt;input type="text" name="name" value="&lt;?php echo $_GET['name'];?&gt;" /&gt; </code></pre> <p>should i use javascript or php ?</p>
php javascript jquery
[2, 3, 5]
1,045,605
1,045,606
Data option change isn't picked by jquery
<p>I've got div like this :</p> <pre><code>&lt;div id="something-1" data-options='{"pause":"YES","delete":"NO", "kill":"NO"}'&gt;&lt;/div&gt; </code></pre> <p>What I got going on is some ajax request and changes the data options like this :</p> <pre><code>$('#something-1' + item.id).attr("data-options", '{"pause":"Y...
javascript jquery
[3, 5]
4,146,175
4,146,176
javascript dont work with jqeury in the same page
<p>I am having a problem with my code, which is a mix of jquery and plain javascript. I use jquery to show and hide some <code>div</code>s and the js to refresh a <code>div</code> by loading a page inside the <code>div</code>. The plain js code doesn't work as is, but if I delete the jquery code it works fine. </p> <...
javascript jquery
[3, 5]
935,892
935,893
How to get id of current draggable and resizable?
<p>How to get id of current draggable and resizable ? I have like </p> <pre><code>$('.demo') .resizable({ start:function(event,ui){ $(ui).item.attr('id); } }) .draggable({ start:function(event,ui){ $(ui).item.attr('id); } }); </code></pre> <p>but it returns undefined. Does anyone know solution ?</p>
javascript jquery
[3, 5]
1,402,401
1,402,402
can i store datatable for the further refinement
<p>i have a datatable with the results i just want to refine the results using this datatable... i am trying to do it but this datatable is distroyed each time page is refreshed......</p>
c# asp.net
[0, 9]
4,251,268
4,251,269
how to pass data from javascript to winforms user control
<p>I have a windows user control hosted in IE.</p> <p>how can i paas input from webpage ( propably from javascript ) to win forms user control</p> <p>can any one help me in solving this problem.</p> <p>it is urgent.</p> <p>Thanks.</p>
asp.net javascript
[9, 3]
4,941,371
4,941,372
open dialog to download pdf
<p>I have a gridview in which I have provided an option for the user to download the pdf files. When they click on the pdf icon sometimes it open the pdf file in a new tab and sometimes it starts downloading. How can i make it download always?</p>
c# asp.net
[0, 9]
3,431,394
3,431,395
increment variable on set interval using javascript?
<p>First of all this is the mini javascript script:</p> <pre><code> f = 1 $(".thumb").hover(function() { intervalId = setInterval($(this).text(f++), 400)); }); </code></pre> <p>Im trying to get the .thumb text to increase while the users moise is over it, It increases when i hover out and hover over again, ...
javascript jquery
[3, 5]
662,100
662,101
Can I iterate through table using JQuery and collect values in three arrays?
<p>Can I iterate through table with id="tbl" using JQuery with three columns and collect this value in three javascript arrays ? </p>
javascript jquery
[3, 5]
2,998,212
2,998,213
Android JSON receive issue
<p>I have a string problem, I used the below code for recieving JSON data from an URL, the code is working fine, but the problem is I am not getting full data only half of the JSON values are coming, I would like to know whether there is reason for this, if so means how to solve this problem. JSON string is very big</p...
java android
[1, 4]
4,167,234
4,167,235
string length in java
<pre><code>String h; h=(String) Tok.nextElement(); System.out.println("" + ++n +": "+h); h.trim(); System.out.println("The length of h :"+n+h.length()); wordlist[now]=h; System.out.println("Now length is"+wordlist[now].length()); </code></pre> <p>This "\u0B9A\u0BBF\u0BAF\u0BA9" is the string assigned to h.The outpu...
java android
[1, 4]
1,342,403
1,342,404
Get empty space in container
<p>How to get an empty (in example white) area in a container with Javascript? Is there a ready jQuery function or something equal?</p> <p><img src="http://i.stack.imgur.com/7uFo9.png" alt="screen"></p> <p>I need the width, height, left and top position of the 'empty' white area in Javascript.</p> <p><strong><a href...
javascript jquery
[3, 5]
5,675,856
5,675,857
How To exporting to Excel parent and nested GridView data?
<p>I have a gridview and some nested gridview inside it, when I try to export gridview data to Excel I get downloaded entire web page, I am sure it is beacause of nested gridviews.</p> <p>How can I export parent and nested gridview data into an Excel sheet?</p> <p>I use the following code to export to excel</p> <pre...
c# asp.net
[0, 9]
2,483,257
2,483,258
Checking Number of Selected Checkboxes
<p>I saw the <a href="http://docs.jquery.com/Is" rel="nofollow">is</a> function in jQuery, and it returns me, for example, if any of the checkboxes are selected.</p> <p>I need to do a check for how many checkboxes had been selected by the user, because my app requires something like "select two of these". Is there a q...
javascript jquery
[3, 5]
3,906,368
3,906,369
Maintain return URL in live id integration
<p>I am creating an application in which I am using Live Id authentication. When the user tries to access an authenticated page, I am redirecting the user to Live Id sign in page. Is it possible to return the user to the previously asked page (from which he was redirected). Some thing like return URL.</p> <p>Actually ...
c# asp.net
[0, 9]
666,686
666,687
How can I display a dialog box for making a choice before a CALL is processed in android?
<p>I would like to intercept outgoing calls and pass them to a VOIP application. I see that the Google Voice application has a feature for displaying a question before each call is actually initiated. It provides the user with the choice:</p> <ul> <li>Initiate call via Google Voice</li> <li>Initiate call via standar...
java android
[1, 4]
2,627,154
2,627,155
How to find the index of a clicked element from an array with jquery?
<p><strong>How can I find the index of a clicked anchor tag from an array with jquery???</strong></p> <p>I want to search if there is an element that eqqal to clicked element, and if is true return the index of that element.</p> <p>i tried with something like this but it return with -1</p> <pre><code>$('#id').click(...
javascript jquery
[3, 5]
1,835,427
1,835,428
Can't bind DataTable to GridView
<p>Hey guys I've just started programming and I'm running into a problem. The new Datatable i created doesnt show in GridView2 when button1 is clicked. Although it is filled with data from the "planning" table(checked that dtPlanning is filled with the TextBoxes in comment).</p> <p>So in short: I want to get DataTable...
c# asp.net
[0, 9]
3,062,512
3,062,513
how to convert docx to pdf in asp.net without MS office installed on server
<p>I just want to ask is there any way we can convert .docx files into PDFs without MS office installed on my server?</p> <p>Is there any adobe SDK which can help me to perform this action in ASP.NET?</p> <p>If there is any free (open source) API please let me know, or any paid which help to achieve this solution?</p...
c# asp.net
[0, 9]
612,523
612,524
Lose contact with resources - why
<p>Im developing in eclipse with 5 activities, but suddenly I loose contact with all my resources.</p> <p>Have anyone experienced this phenomenon and knows what to do about it? I have already tried cleaning up the project but no luck</p> <p>Update: I managed to resolve the issues by deleting the project and then impo...
java android
[1, 4]
4,504,029
4,504,030
How to trigger a certain button using a custom attribute
<p>I'm getting the variable through the url. <a href="http://mysite.com/?category_id=1" rel="nofollow">http://mysite.com/?category_id=1</a> I want to trigger a button using a category-id attribute:<br/> <code>&lt;a class="cat-item" category-id="1" href="#"&gt;</code></p> <p>I don't have problems getting the parameter ...
javascript jquery
[3, 5]
5,244,472
5,244,473
Kill one thread in sleep mode in android
<p>I have an android application, that have one thread, which will run after each 1 minute. So my problem is, when i click one button, i have to reset the app, that means, it'll be a fresh app. So now when i clicked on that button, all the database and shared preference will clear. But the thread will start again.</p> ...
java android
[1, 4]
3,659,593
3,659,594
Is it safe when compare 2 float/double directly in Java?
<p>Is it safe if I use comparision like this (a is int, b and c is float/double):</p> <pre><code>a == b b == c </code></pre> <p>It may hear ridiculous, but in my old programing language, sometimes 1 + 2 == 3 is false (because left side returns 2.99999999999...). And, what about this:</p> <pre><code>Math.sqrt(b) == M...
java android
[1, 4]
454,853
454,854
Vertical scrolling parallax background effect
<h2>Background</h2> <p>I have been asked to write a script that will create a vertical scrolling parallax background effect for a project. My initial attempt looks a little something like this:</p> <pre><code>(function($){ $.fn.parallax = function(options){ var $$ = $(this); offset = $$.offset(); ...
javascript jquery
[3, 5]
1,537,257
1,537,258
How to get a variable to the element from a function in .data()
<pre><code>var el = $('#someElement'); el.data('f', function() { console.log(this); // return an object to the window }); </code></pre> <p>So i would like something that return me an object like "el" from inside the function.</p> <p>The reason is that the element is going to be duplicated and i don't know on which...
javascript jquery
[3, 5]
5,945,430
5,945,431
Using variables in Asp.NET Control Attributes in Html View
<p>I wonder if there is any way to do this:</p> <pre><code>&lt;asp:Label ID="lblSomething" runat="server" Visible="this.ShowLabel"/&gt; </code></pre> <p>and in the code behind:</p> <pre><code>public bool ShowLabel {get;set;} </code></pre> <p>I know some of you may ask me why I need it but I find this approach clean...
c# asp.net
[0, 9]
4,572,206
4,572,207
How do I add slashes to a string in Javascript?
<p>Just a string. Add \' to it every time there is a single quote.</p>
javascript jquery
[3, 5]
3,756,398
3,756,399
Continue execution of the code after alert message from clientside
<p>I've to send mail using webappplication.All works fine but i've to show a confirm message if attachments are not selected.In that confirm box when ok is clicked execution of the code should continue,when cancel button is clicked it should return.</p> <p>This is my code</p> <p>Code behind</p> <pre><code> protected...
c# javascript
[0, 3]
2,058,670
2,058,671
How to make my App modular?
<p>Hi and thanks for your attention.</p> <p>I have an Android App (Java) whose code is growing (and eventually will need to grow more and more).</p> <p>So I have to face the fact that I have make it somehow modular to make it manageable.</p> <p>So I am here to ask some advice on how to go about it.</p> <p>Basically...
java android
[1, 4]
4,527,595
4,527,596
Does an alternative to .closest() exist?
<p>this is a snippet from my code:</p> <pre><code>$(&quot;#myid&quot;).append($(&quot;p:contains('text')&quot;).closest(&quot;div&quot;).clone()); </code></pre> <p>I tried to get the first closest ancestor div-element of p containing 'text'.</p> <p>I'm looking for an alternative to .closest() because I have to use j...
javascript jquery
[3, 5]
1,824,880
1,824,881
Is it possible to apply multiple ColorFilters on a Drawable?
<p>Is it possible to apply multiple ColorFilters on a Drawable by i.e. apply the first ColorFilter on the drawable and then apply a second one on the mutated drawable?</p> <p>Sample Code:</p> <pre><code>@Override public View getView(int position, View convertView, ViewGroup parent) { View returnView = super.getDr...
java android
[1, 4]
5,965,404
5,965,405
how to UnSelect all rows in GridView - asp.net?
<p>how to UnSelect all rows in GridView - asp.net ?</p> <p>if i select one row in GridView and make any refresh, how to unselect this row ?</p> <p>thanks</p>
c# asp.net
[0, 9]
3,524,323
3,524,324
Vector-Java equivalent in PHP?
<p>Is there a:</p> <p>1> Vector(Java) class<br> 2> ListIterator<br> 3> Single Linkedlist </p> <p>equivalent available in PHP?</p>
java php
[1, 2]
1,122,112
1,122,113
Call jquery from php
<p>I have a form with Name : input and a submit. When pressed, it posts to the same php file. My first check is basically <code>if(!$name) { call jquery to insert error class }</code>. I have the jquery set up in a function but I'm not sure how to call the function from the if statement.</p>
php jquery
[2, 5]
4,186,461
4,186,462
javascript alert like gmail chat on chat updation
<p>I want Popups on new chat or popups when chat updated like gmail... For Example if I am on other tab and gmail chat is updated then it shows on title.. I just want this type of code which shows when my database is updated or after every 10 seconds and once I clicked on it then it should not show again and again.... ...
javascript jquery
[3, 5]
3,230,427
3,230,428
How to restore checkbox state
<p>I have one buton on my jsp and clicking that button user will see jquery dialog box as popup,which is having several checkboxes. That popup will also have two button save and cancel.</p> <p>I would like to restore state of checkbox.for better understading please follow below steps</p> <ol> <li>user clicks on showp...
javascript jquery
[3, 5]
3,366,098
3,366,099
jquery inquiry: passing message without a new pageload
<p>Please forgive the awkwardness of this question, I honestly don't know how to phrase a better query...</p> <p>The situation:</p> <p>I have a basic contact form within an xhtml/php page that I'm in the process of upgrading. I recently added a new unrelated jquery plugin on this page, so I would like to use the jqu...
php jquery
[2, 5]
4,216,403
4,216,404
How to get a collapsible bottom bar Jquery?
<p>I want to do something like this:</p> <p><a href="http://devheart.org/articles/jquery-collapsible-sidebar-layout/" rel="nofollow">http://devheart.org/articles/jquery-collapsible-sidebar-layout/</a></p> <p>But I would like the separator bar to be vertical such that the sidepanel is on the bottom and content is on t...
javascript jquery
[3, 5]
1,338,369
1,338,370
Am I using $(this) or .click incorrectly?
<p>I am trying to build a simple FAQ page with answers that slideDown and Up when their questions are clicked. When the user clicks on a something with class "question" I want mytarget to become '#' + [that question's id] + 'ans' so the appropriate answer slides down.</p> <p>The toggleSlide part works when I just give...
javascript jquery
[3, 5]
1,154,626
1,154,627
How to push values to a multi-dimensional array
<p>I can't figure out how to push values to a dynamic multi-dimensional array. This is the code i have:</p> <pre><code>function compareNumbers(){ var count = $('.finishedRow').length; var inputtedNums = new Array(); for(var i=0; i&lt;count; i++){ $('.finishedRow').eq(i).find('li').each(function(j){...
javascript jquery
[3, 5]
962,989
962,990
Add active class to menu "parent" item if URL has a a /directory/ listing
<p>trying to add a CSS class to a a parent item when the URL contains a directory path.</p> <p>For instance if my url is</p> <p><code>example.com/directory/about.html</code></p> <p>I want to add a CSS class an item in my top navigation if it contains <code>/directory/</code> in it. </p> <p>so in this case, <code>ex...
javascript jquery
[3, 5]
1,035,339
1,035,340
Select distinct elements in listview when click item
<p>I have a list view with custom adapter, with an Image Button and a Text View.</p> <p>I want to open a context menu when a press is made on the Image Button, and open another context menu if i press the Text View.</p> <p>How can I do this??</p> <p>This is my onClickListener</p> <pre><code>lv.setOnItemClickListene...
java android
[1, 4]
1,188,674
1,188,675
JQuery/PHP - Only showing a button for Administrator account
<p>I have a web site which allows users to logon to a control panel that allows users to change content of the web site.</p> <p>When creating the users you can set the account type: (PHP)</p> <p>i.e. <code>UserAccount::get_accounttype() == 1</code> full access</p> <p>and <code>UserAccount::get_accounttype() == 0</co...
php jquery
[2, 5]
4,552,456
4,552,457
What does jQuery object contain?
<p>let's say, i have this code:</p> <pre><code>&lt;ul&gt; &lt;li&gt;&lt;strong&gt;list&lt;/strong&gt; item 1 - one strong tag&lt;/li&gt; &lt;li&gt;&lt;strong&gt;list&lt;/strong&gt; item &lt;strong&gt;2&lt;/strong&gt; - two &lt;span&gt;strong tags&lt;/span&gt;&lt;/li&gt; &lt;li&gt;list item 3&lt;/li&gt; ...
javascript jquery
[3, 5]
120,480
120,481
When should I create a new activity?
<p>When should a new activity be created in android? Should I create a new activity for each large task or just switch views? What's best practice?</p>
java android
[1, 4]
2,754,108
2,754,109
jQuery OnClick not firing my event
<p>I have a jQuery which is like this:</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function () { $("#txtAgentName").click(function (event) { alert("I am ready!"); }); }); &lt;/script&gt; </code></pre> <p>What I am assuming that this should fire if I click ...
javascript jquery asp.net
[3, 5, 9]
5,635,972
5,635,973
jQuery: Returning the text from first-child or self
<p>I am trying to get the text inside an element and I only want to get the text if it's inside the first-child of a placehoder div or if there are no childrent and it's only text inside.<br /> So the two scenarios are:</p> <pre><code>&lt;div id="wrap"&gt;text1&lt;/div&gt; </code></pre> <p>and</p> <pre><code>&lt;div...
javascript jquery
[3, 5]
336,253
336,254
Problem with adding integers in an array
<p>I'm trying to loop through my totals in order to get a grand total for my web app. So far the code I am working with is the following:</p> <pre><code>function calcAllFields() { var name = parseFloat($('div [name = total[]]').text()); var totArray = $.makeArray(name); var total = 0; for (var i = ...
javascript jquery
[3, 5]
1,552,101
1,552,102
Differences between ScriptManager and ClientScript when used to execute JS?
<p>Can somebody explain for me what the differences are between ScriptManager and ClientScript?</p> <p>ClientScript works well when I use it in Button_Clicked event, but it doesn't work when I use it in the GridView_RowUpdated of a GridView. (The GirdView is wrapped inside an update panel). Then I tried ClientScript a...
c# asp.net
[0, 9]
4,547,731
4,547,732
Send commands between two computers over the internet
<p>I wish to control my computer (and usb devices attached to the computer) at home with any computer that is connected to the internet. The computer at home must have a program installed that receives commands from any other computer that is connected to the internet. I thought it would be best if I do this with a web...
java php javascript python
[1, 2, 3, 7]
1,740,844
1,740,845
JQuery - append rather than replace content using .innerHTML?
<p>Below is a function that retrieves a users older wallposts, 16 at a time, and appends each chunk of 16 to the end of the current list in the div called "sw1".</p> <p>It works fine, except in the case where there is currently a wallpost that contains a video/embedded object that is currently in the process of playin...
javascript jquery
[3, 5]
121,843
121,844
Abstracting an id attribute in C# or Java
<p>I am designing an API. Here are some example methods from an interface:</p> <pre><code>Entry findEntry(int processId); Entry findEntry(int processId, Filter filter); </code></pre> <p>where <code>processId</code> refers to some unique identifying information. However I don't really know what the type of <code>proce...
c# java
[0, 1]
3,165,303
3,165,304
Copy with clipboard manager that supports old and new android versions?
<p>I'm trying to copy text programatically on android, the most voted answer on another question provided these lines but when using them I get error: Class requires API level 11 (current min is 8):</p> <pre><code> ClipboardManager clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE); ClipData cli...
java android
[1, 4]
339,857
339,858
$ prefix for variables with jquery, global namespace
<p>I know this is probably obvious...but what exactly is jQuery doing when I prefix a variable name with '$'. I know this is placing the variable in the global namespace, but why?</p>
javascript jquery
[3, 5]
2,164,733
2,164,734
How to make sure requests are from my website?
<p>Some smartass people are using my api-centric web app to clone my service and make it appear like their own. Is there a way to make sure all ajax requests are for/from my website?</p> <p>Sure I could use the referrer header but they could easily fake it.</p>
javascript jquery
[3, 5]
5,596,274
5,596,275
Unfortunately your <Project name> has stopped working.
<p>i am a really NOOB and new coder. I started learning Java and recently created this application on eclipse. It is a dollar to euros converter. Everytime i try to run the code on eclipse i get error saying the application has stopped working.</p> <pre><code>TextView dollars; TextView euros; RadioButton dtoe; RadioBu...
java android
[1, 4]
5,118,637
5,118,638
Inconsistent pseudo random between c++ and c#
<p>I'm attempting to convert a pseudo rand function from c++ to c# but it doesnt seem to return the correct values. Its important that i use a consistent set for encryption so i cant just use a random number.</p> <p>this is the function in c++.</p> <pre><code>int get_pseudo_rand() { return( ((_last_rand = _last_ran...
c# c++
[0, 6]
73,107
73,108
How can you reference code written in another language in the App_Code folder in ASP.Net?
<p>Due to legacy issues I have two folders under App_Code directory. One for VB.Net and another for C#. Problem is, I have a service in the C# folder that needs to leverage a class in the VB.Net folder but they dont seem to know about each other. Any ideas are welcome :)</p> <p>Thanks in advance!</p> <p>Trev</p>
c# asp.net
[0, 9]
85,760
85,761
how to get buttonId was pressed in android
<p>I have a problem with the following piece of code:</p> <pre><code>OnClickListener button_listener = new View.OnClickListener() { @Override public void onClick(View v) { ImageButton ibutton = (ImageButton) v; if(player == 0) { ...
java android
[1, 4]
1,456,728
1,456,729
Does Integer.valueOf() in java translate to int.Parse() in C#?
<p>I am trying to learn java from a C# background! I have found some nuances during my journey like C# doesn't have an Integer as reference type it only has int as a primitive type; this lead me to a doubt if this translation would be correct! </p> <pre><code> String line ="Numeric string";//Java string line = "Num...
c# java
[0, 1]
1,480,003
1,480,004
JQuery each: Pause & Continue iteration after a click
<pre><code>$.getJSON('http://example.com', function(data) { $.each(data.songs, function(index, song) { //Paused &amp; waiting for a click $("#next").click(function() { alert("Processing the next object..."); }); }); </code></pre> <p>I would that JQuery analyze the next object only after th...
javascript jquery
[3, 5]
3,572,149
3,572,150
jquery/javascript- calculate days on this week given week number and year number
<p>i'm looking for a simple way to calculate the calendar days when given a week and year number using jquery/javascript.</p> <p>Example: Week 18, Year 2012 would result in a list of starting with sunday</p> <pre><code>2012-04-29 2012-04-30 2012-05-01 2012-05-02 2012-05-03 2012-05-04 2012-05-05 </code></pre> <...
javascript jquery
[3, 5]
3,517,114
3,517,115
php and jquery image selector
<p>I was on flickr and I saw this function whereby you can scroll photos (thumbnail) without loading the page. It's probably using jQuery or json but does anyone know whats the proper name for this kind of function or is there any available libraries? I've uploaded a screenshot..</p> <p><img src="http://i.stack.imgur...
php javascript jquery
[2, 3, 5]
5,865,516
5,865,517
UI goes blank for a second when bringing up Modal Pop Up Extender
<p>I have an asp.net repeater and it has an edit button which brings up a Modal Pop Up extender (MPE) where a user enters modified values and then submits the changes in the MPE. When the MPE appears after the Edit button in the repeater is clicked - the whole page is reloaded - because the screen goes blank for a seco...
c# asp.net
[0, 9]