Unnamed: 0 int64 65 6.03M | Id int64 66 6.03M | Title stringlengths 10 191 | input stringlengths 23 4.18k | output stringclasses 10
values | Tag_Number stringclasses 10
values |
|---|---|---|---|---|---|
5,142,291 | 5,142,292 | Count height of all divs | <p>I need to count total height of all divs, but I get a height of just one...</p>
<pre><code>var myHeight = function() {
var dHeight = 0;
$(".myItem").each(function() {
dHeight += $(this).height();
});
return dHeight;
}
</code></pre>
<p>Does this look right?</p>
| jquery | [5] |
2,097,515 | 2,097,516 | Javascript Runtime error | <p>why i am getting runtime error in javascript at </p>
<blockquote>
<p>var ClientID = document.getElementById("ClientIDTextBox").value;</p>
</blockquote>
<p>and my code is:</p>
<pre><code><script type="text/javascript">
var ClientID = document.getElementById("ClientIDTextBox").value;
if (ClientID ==... | javascript | [3] |
967,406 | 967,407 | Edit text file programmatically | <p>How can we modify a text file from android, such as </p>
<ul>
<li>append at the end of the file.</li>
<li>clear data at any intermediate position and also blank lines in it.</li>
</ul>
<p>Is there any option to delete a particular line from the text file, I read so many tutorials regarding this all have mentioned ... | android | [4] |
86,641 | 86,642 | Header file declaration in iPhone | <p><br>
What is the difference between them:-</p>
<p>Approach 1:-</p>
<pre><code>@interface EffortView : UIView {
}
@property (nonatomic, retain) UIView *homeView;
@end
</code></pre>
<p>Approach 2:-</p>
<pre><code>@interface EffortView : UIView {
UIView *homeView;
}
@property (nonatomic, retain)... | iphone | [8] |
2,580,100 | 2,580,101 | the nearest td value | <p>I have a table:</p>
<pre><code><table>
<thead>
<tr>
<td>some1</td>
......
<td>some2</td>
<th>count</th>
<th>EditCount</th>
</tr>
</thead>
<tbody>
<tr>
<td>som... | jquery | [5] |
1,284,349 | 1,284,350 | question about malloc function | <p>i am new in c++and can anybody give me a few example how use malloc in c++ code?</p>
| c++ | [6] |
2,347,921 | 2,347,922 | PHP foreach() define 2 things? | <p>I'm trying to define both ['name'] and ['tmp_name'], but i'm having no idea how to do so?</p>
<p>Here is my code:</p>
<pre><code> foreach ($_FILES['uploads']['name'] as $filename) {
// Do stuff
}
</code></pre>
<p>But inorder to complete and move the file, I need the <code>$_FILES['uploads']['tmp_name']</code... | php | [2] |
5,897,445 | 5,897,446 | How do I validate an email address with an if statement while removing the built-in validation? | <p>In my form I have a list item with an input type of "email".<br>
Well the problem with this is whenever I do not enter a valid email address in the input box, a pop-up shows up saying, "Please enter an email address." So my question is how do I remove this pop-up and apply my own validation??
I tried putting novali... | php | [2] |
4,029,154 | 4,029,155 | Dynamic label that changes based upon event handler | <p>I have a snippet of HTML that is part of a form where there are two input's. Via CSS I have managed to make the label associated with each input to sit inside their corresponding input to act as a placeholder.</p>
<p>Now, with some standard JS (not JQuery I'm afraid), I wanted to capture the event that the user doe... | javascript | [3] |
951,172 | 951,173 | what is the best way to detect the source of buffer overflow in c++ for windows? | <p>I would like to know what is the best way to detect a buffer overflow in windows for c++. I would like to find buffer overflows on the stack as well as the heap.</p>
| c++ | [6] |
5,401,784 | 5,401,785 | Grouping Elements of a List based on attributes of the elements | <p>I have the following list</p>
<pre><code>List=[
('G1', 'CFS', 'FCL', 'R1'),
('G3', 'LOOSEFREIGHT', 'MIXEDLCL', 'R9'),
('G4', 'CFS', 'FCL', 'R10'),
('G2', 'LOOSEFREIGHT', 'LCL', 'R4'),
('G1', 'CFS', 'FCL', 'R2'),
('G2', 'LOOSEFREIGHT', 'LCL', 'R5'),
]
</code></pre>
<p>Now I want to group... | python | [7] |
2,029,465 | 2,029,466 | Terminal emulator an Android 2.1 | <p>I want add new fonts for Android. I found a tutorial that asks me to open a terminal emulator. I can't find this terminal emulator:</p>
<blockquote>
<p>On your Droid, open up a terminal emulator application -- I used
"Android Terminal Emulator" -- and
type this exactly (make sure to be
case-sensitive and do... | android | [4] |
2,883,046 | 2,883,047 | How to show my activity when the notification shade is pulled down | <p>Is it possible to make my activity to foreground when the notification shade is pulled down?.<br>
My application is a simple VoIP application. My incoming call screen activity is shown behind the notification shade if it is pulled down. <br/>Is there any way to hide the notification shade when my activity starts?.I... | android | [4] |
4,837,098 | 4,837,099 | What does some_name()->some_func() mean in PHP? | <p><strong>What does some_name()->some_func() mean in PHP?</strong></p>
<p>I found something like this in a user controller method in a CodeIgniter application. I was wondering what that is and I couldn't find it anywhere. Code sample:</p>
<pre><code>try
{
Connect()->login($_POST);
}
catch(Exception $e)
{
...
... | php | [2] |
5,908,241 | 5,908,242 | Scrolling to the top without href...? | <p>Here's what I started out with, </p>
<pre><code> $("a[href='#top']").click(function() {
$("html, body").animate({ scrollTop: 0 }, "slow");
return false;
});
</code></pre>
<p>Which works great with </p>
<pre><code><a href="#top">...</a>
</code></pre>
<p>However, I need something similar... | jquery | [5] |
5,907,760 | 5,907,761 | Transfering properties from one object to another with similar definition | <p>There must be an easier way...</p>
<pre><code> void TransferFrom(object obj) {
foreach(PropertyInfo prop in this.GetType().GetProperties()) {
prop.SetValue(this, obj.GetType().GetProperty(prop.Name).GetValue(obj, null), null);
}
}
</code></pre>
<p>I have two separate libraries wi... | c# | [0] |
3,315,926 | 3,315,927 | how to animate a set of images? | <p>how to animate a set of images, but I have a large set of images, 300 to be exact,</p>
<pre><code> Background.animationImages = [NSArray arrayWithObjects:
[UIImage imageNamed:@"001.jpg"],
[UIImage imageNamed:@"002.jpg"],
... | iphone | [8] |
2,314,100 | 2,314,101 | load into the next element | <p>I would like the follow code to load a series of "holder" classes. However the after() method seems to be nesting the holders.</p>
<p><strong>Current code</strong></p>
<pre><code><div class="holder" >
<a href="test.html" class="link">lorem ipsum</a><br />
</div>
<script type="... | jquery | [5] |
4,941,128 | 4,941,129 | Hide files between multiple instances of same android activity | <p>I need to launch multiple versions an activity from my activity but as they all have the user id of the launching activity they can all see each others data in the filesystem. Is it possible to prevent this, is there anyway of starting an activity so that its data will be hidden from other instances with the same u... | android | [4] |
4,450,150 | 4,450,151 | Can't create input when data null with javascript | <p>I have a sample code</p>
<pre><code><script type="text/javascript">
function remove_news(id) {
try {
$('news_list').removeChild($('news_'+id));
$('news_list').removeChild($('input_news_'+id));
if($('news_list') == '') {
var input = document.createElement('input');
... | javascript | [3] |
4,237,721 | 4,237,722 | how can i change the background color of tabcontainer tab bar in c#? | <p>i did't find any property of a tab container to change background color of the bar that contains the tabs how can i do so? </p>
| c# | [0] |
253,954 | 253,955 | jQuery - missing } after function body | <p>Where is problem: I got error: missing } after function body</p>
<pre><code>(function($) {
$(document).ready( function() {
$("div.area_map").click( function () {
alert('clicked');
$('img.hoverswap', this).css({
position:"absolute",
left:"0px",
top:... | jquery | [5] |
3,609,874 | 3,609,875 | Suppress echo from PHP include file | <p>I have a file <code>PHP01.php</code> which:
- performs a function
- creates an array
- echo's some message</p>
<p>I need to include this file in another php script, say <code>PHP02.php</code> as I need access to the array it created. But when I jquery POST request to <code>PHP02.php</code>, the data it returns als... | php | [2] |
1,461,086 | 1,461,087 | status bar icon should be different from launcher icon | <p>I am using android 4.2 SDK, by default the status bar shows the launch icon but I want to use a different icon for the app's Launch icon and status bar icon</p>
<p>what I am doing</p>
<p>
<pre><code> android:icon="@drawable/ic_launcher"
android:name=".CommonMethod"
android:logo="@drawable/toolbar_logo"
... | android | [4] |
3,831,222 | 3,831,223 | Override the methods of classes from a .war file | <p>I have a base application war file say homeApp.war. This contains default operations which user can carry out on the web browser. Now I need to extend the operations available on the same application using that .war file. Like I need to add the extra menus, some shortcuts like icon for log out etc. Please let me ... | java | [1] |
2,440,640 | 2,440,641 | Android Drag/Animation of Views | <p>I'm not a programmer, but I'm trying to learn android development, and having a blast. </p>
<p>Lately I've hit a fork in the road, and I don't know that any of the directions I can identify will meet all my needs. This is where you (the experts) can help ;) </p>
<p>Endpoint: I want to have the user touch a ball, a... | android | [4] |
4,188,348 | 4,188,349 | JQuery: using closest and find functions to show hidden div | <p>Initially all smart-suggestion divs are hidden. I am trying to show the the 'smart-suggestions' div belonging to the closest 'prod-name-container' div that the user clicked on. I tried using closest() and find(), but it did not work and I am not sure why it isn't working.</p>
<p>Markup</p>
<pre><code> ... | jquery | [5] |
666,441 | 666,442 | How to exclude duplicate content from this piece of code? | <p>hope someone can help me out with this piece of code:</p>
<pre><code><?php
$righe_msg = file("dati.txt");
$num = 5;
$selected = array();
while (count($selected)!=$num)
{
$rand = rand(0,count($righe_msg)-1);
$selected[$rand] = $righe_msg[];
}
$numero=0;
foreach ($selected as $sel)
{
$dato = explo... | php | [2] |
1,655,926 | 1,655,927 | Get Array from string.xml | <p>I have a string in my <code>string.xml</code> whose structure is like this.</p>
<p>string.xml</p>
<pre><code><string name="my" formatted="false">As*#*Bs*#*Cs</string>
</code></pre>
<p>and I am fetching this string in my main file like this.</p>
<p>main.java</p>
<pre><code>String h1 = getResource().g... | android | [4] |
3,371,324 | 3,371,325 | Pulldown control on Android 2.3.3 (API10) | <p>I am developing an app in which the main display needs to be as uncluttered as possible, but with quick and easy access to menu controls.<br>
What I would like to implement is similar to the main pulldown control (for Data, WiFi, BT on/off and so on) but am unsure what would be the best way to go about it.<br>
I'm v... | android | [4] |
3,473,497 | 3,473,498 | iPhone - threads | <p>What is the difference between using this</p>
<pre><code>[self performSelectorOnMainThread:@selector(doStuff:)
withObject:myObject
waitUntilDone:YES];
</code></pre>
<p>instead of simply</p>
<pre><code>[self doStuff:myObject];
</code></pre>
<p>in terms of CPU load? Or ... | iphone | [8] |
4,804,170 | 4,804,171 | JQuery hide does not remove the space of the object? | <p>I am using some jquey code where I hide a list item...</p>
<pre><code> $("ul.items").each(function() {
$("li:gt(4)", this).hide();
</code></pre>
<p>My problem is that .hide seems to hide the element but the space for it is still allocated.</p>
<p>Is there a way to remove this space... like display:none on css... | jquery | [5] |
145,586 | 145,587 | How to play flv video in android? | <p>I want to display my <strong>FLV</strong> <em>video</em> in <strong>emulator</strong>. Anybody who have already work on this?
Basically I need to play video from particular <strong>URL</strong> and <strong>assets</strong> <em>folder</em>. So just help on this topic.</p>
| android | [4] |
1,720,375 | 1,720,376 | How to serve this file with these HTTP headers? | <p>I am using a shared hosting, so I can't edit Apache settings.
I need to allow users to download a .crx file in this way:</p>
<pre><code>1) The file has the content type application/x-chrome-extension
2) The file is not served with the HTTP header X-Content-Type-Options: nosniff
3) The file is served with one of the... | php | [2] |
1,927,359 | 1,927,360 | Windows Java command line to know the memory settings | <p>I'm looking for a windows command line that would tell me at how much the memory settings have been set to start an application.</p>
<p>What is the default for Windows 7 JRE 1.6 if I do "java -jar my.jar" ?</p>
<p>thanks</p>
| java | [1] |
5,559,929 | 5,559,930 | How to use Google-hosted jQuery UI source? | <p>I need to load the jQuery UI files, and would like to do it from Google.
Currently I upload:</p>
<pre><code><script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script>
<script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.draggable.js"></script>
<... | jquery | [5] |
2,760,815 | 2,760,816 | How to modify a class's data tag inside onClickListener? | <p>Please help me with this, i never ever understanded how things work inside onClickListener, so:</p>
<p>Got my own class:</p>
<pre><code>public class ItemFrame extends LinearLayout{
int item_id;
public ItemFrame(Context context){
super(context);
}
public int getItem_id() {
ret... | android | [4] |
4,196,950 | 4,196,951 | Overriding equals() and hashCode() in Java | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/27581/overriding-equals-and-hashcode-in-java">Overriding equals and hashCode in Java</a> </p>
</blockquote>
<p>All,</p>
<p>I have defined my class and which to override equals() and hashCode () methods as well.... | java | [1] |
3,289,929 | 3,289,930 | PHP Convert Date format Y-m-d to m-d-Y | <p>I want to make my date format in <code>Month-Date-Year</code>. Current format is <code>Year-Month-Date</code>. How do I do that in PHP?</p>
| php | [2] |
3,706,274 | 3,706,275 | Problem with making object callable in python | <p>I wrote code like this</p>
<pre><code>>>> class a(object):
def __init__(self):
self.__call__ = lambda x:x
>>> b = a()
</code></pre>
<p>I expected that object of class a should be callable object but eventually it is not.</p>
<pre><code>>>> b()
Traceback (most recent call last... | python | [7] |
2,316,505 | 2,316,506 | How to calculate the time difference between unix time stamps? | <p>I am creating time stamps in PHP using time();</p>
<p>I have the $current_time and $purchase_time. How do I make sure that purchase_time is less than 24 hours of current time?</p>
| php | [2] |
2,875,360 | 2,875,361 | Generate 4000 unique pseudo-random cartesian coordinates FASTER? | <p>The range for x and y is from 0 to 99.</p>
<p>I am currently doing it like this:</p>
<pre><code>excludeFromTrainingSet = []
while len(excludeFromTrainingSet) < 4000:
tempX = random.randint(0, 99)
tempY = random.randint(0, 99)
if [tempX, tempY] not in excludeFromTrainingSet:
excludeFromTraini... | python | [7] |
1,567,729 | 1,567,730 | iphone default SDK preferences | <p>I Keep building projects and then have to do a find and replace for the automatically commented out copy right information in each page. It gets my name right but then it's puts my day job in as the company at the top of each page. It's annoying and also a point where my day job employer could claim rights to my off... | iphone | [8] |
294,186 | 294,187 | How do I run JavaScript in a console like environment? | <p>I'm trying to follow the the examples here</p>
<p><a href="http://eloquentjavascript.net/chapter2.html" rel="nofollow">http://eloquentjavascript.net/chapter2.html</a></p>
<p>and</p>
<pre><code>print('blah');
</code></pre>
<p>Keeps trying to send to a physical printer when run in a browser. I just want console o... | javascript | [3] |
4,135,995 | 4,135,996 | What are possible differences between window.location.reload() and window.location = document.URL? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2405117/difference-between-window-location-href-window-location-href-and-window-location">Difference between window.location.href=window.location.href and window.location.reload()</a> </p>
</blockquote>
<p>Is th... | javascript | [3] |
84,880 | 84,881 | Small through-request data storage | <p>Is there any solutions or practices of how to organize small local data storage to keep some data between requests (no cookies or another sending data to server)?</p>
| javascript | [3] |
3,956,474 | 3,956,475 | How can i move my jquery modal to here and there | <p>i create a modal , which i cannot move, it showing somewhere i specify the position.</p>
<p>I want to move the dialog modal.</p>
<p>is there any parameter for that.</p>
| jquery | [5] |
737,950 | 737,951 | Parallel DB/WS Calls | <p>I am building a set of web services with the intent to aggregate similar data sets across multiple backends (through db calls and service calls). Some of the queries could take more than a couple of seconds to run, and if I stack these requests sequentially, there is a chance the total run time would be outside of ... | java | [1] |
2,507,367 | 2,507,368 | can we resign the already signed jars in java? | <p>I mean i have jar with old signature. and i want it to resign with the new signature. So is it possible? </p>
<p>If yes need little info about how?</p>
| java | [1] |
5,278,587 | 5,278,588 | Why is it that I can't reference a global variable directly in PHP? | <p><strong>I'm curious to know why the following code behaves differently?</strong></p>
<p><em>The following does not work:</em></p>
<pre><code>$_variable &= global $_global;
echo $_variable;
</code></pre>
<p><em>The following works:</em></p>
<pre><code>global $global;
$_variable &= $_global;
echo $_variabl... | php | [2] |
4,614,627 | 4,614,628 | scandir error: Invalid argument supplied for foreach() | <p>Can anyone help me out with this code? I can't seem to get it to work!</p>
<pre><code><?php
$file = scandir("../");
foreach ($files as $file) {
if(is_dir($file) && $file != '.' && $file != '..' && $file != 'images') {
$folders++; // Counter
} elseif(is_file($file) &&a... | php | [2] |
4,962,269 | 4,962,270 | How do I add a browse file system button to a Visual Studio app? | <p>I am looking to add a browse button to a visual studio app something simular to the the dialog box in the 'fileupload' tool. I am looking to be able to graphically select any file from my computer or a computer across a network.</p>
| asp.net | [9] |
1,528,786 | 1,528,787 | What is a difference between abstract and virtual? | <p>both abstract and virtual are going to be override in child class than whats a difference.</p>
<p>is it Virtual method have body and abstract is just a signature ????</p>
| c# | [0] |
5,094,852 | 5,094,853 | SimpleOnScaleGestureListener only receives onScaleBegin event | <p>I'm trying to implement an onscalegesturelistener.
My problem is, that the SimpleOnScaleGestureListener only receives the onScaleBegin event.
The other events aren't being reported. I'm using a Nexus One for testing</p>
<pre><code>public class ZoomHandler extends SimpleOnScaleGestureListener {
public float zoom;
... | android | [4] |
5,540,571 | 5,540,572 | How to compare two different sets of arrays | <p>I'm trying to create a "secret santa" type of program that keeps track of who sent to who. I have a database that stores the shuffled sender and receiver id's, but what I'm having a problem with is creating how to match next months senders and receivers. It needs to make sure that the sender is not sending to the ... | php | [2] |
3,075,284 | 3,075,285 | Making ringtone of music files on Iphone | <p>Is it possible to edit music files stored on iphone in app and create ringtone from them?</p>
<p>Any help would be appreciated.</p>
| iphone | [8] |
1,008,319 | 1,008,320 | Error while loading large amount of data in a tableviewcell | <p>Ha ii everybody,i have a problem with my tableview cell,i am loading bible verses on the basis of chapter in a tableview,but unfortunately when the chapter psalms loaded the application freeze throwing an exeption that </p>
<pre><code>done
2011-11-09 11:25:50.636 Bible[1556:207] CoreAnimation: ignoring exception: -... | iphone | [8] |
4,825,572 | 4,825,573 | jQuery get element's attribute 'loop' | <p>I try to get an attribute of a div element using jQUery 1.6.2</p>
<p>html</p>
<pre><code><div id="scroller" loop="2"></div>
</code></pre>
<p>js</p>
<pre><code>$('#scroller').attr('loop')
</code></pre>
<p>The above js would always return undefined.</p>
<p>I try to upgrade jquery to 1.6.4, then the ... | jquery | [5] |
2,083,456 | 2,083,457 | sync Android autocorrect with MS Office? | <p>I rely very heavily upon my MS Office customized autocorrect settings. I even use it to write complete sentences, by just inputting a code. Is there a way to sync or export Windows autocorrect to Android?<br>
Thank you very much in advance</p>
| android | [4] |
4,427,951 | 4,427,952 | Can't horizontally center TextView | <p>I'm new to android and I'm trying to create a simple TextView thingy. I can't horizontally center it, though. Here's my main.xml: </p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:... | android | [4] |
623,117 | 623,118 | I want to distribute a Java application | <p>I want to distribute a Java desktop application for Windows.
Which is the best method?</p>
<p>Convert a .jar fiel to an EXE file and bundle it with <a href="http://en.wikipedia.org/wiki/Nullsoft_Scriptable_Install_System" rel="nofollow">NSIS</a>.</p>
<p>Or is there any another method?</p>
<p>I want it for a Windo... | java | [1] |
1,490,167 | 1,490,168 | Java == for String objects ceased to work? | <pre><code> public class Comparison {
public static void main(String[] args) {
String s = "prova";
String s2 = "prova";
System.out.println(s == s2);
System.out.println(s.equals(s2));
}
}
</code></pre>
<p>outputs:</p>
<pre><code>true
true
</code></pr... | java | [1] |
4,170,570 | 4,170,571 | Customize the video | <p>I have recorded a video by placing a view over it with the cameraOverlayView option, while recording it displays my view, but when i try to save it and watch, the view isnt appearing.</p>
<p>Can anyone help me in fixing this issue?</p>
<p>Thanks in advance.</p>
| iphone | [8] |
325,138 | 325,139 | Merging lists into a single array with unique elements | <p>I have five lists <code>List<String></code>. I want to get a single array which contains all elements from those lists, eliminating any repartitions. What could be the best way to do this?</p>
<p><strong>`Edit: Can someone also comment on the performance of HashSet in comparision to List. I am concerned about... | java | [1] |
2,949,898 | 2,949,899 | Filtering a list based on a second list | <p>Here is what is probably a simple question, but I wasn't able to find a straightforward answer for on my own.</p>
<p>Given two lists, one with only a list of ids, the other with all data, including some ids that we don't care about:
<br><code>all_data = [['abc', 123], ['cde', 234], ['fgh', 345]]</code>
<br> <code>i... | python | [7] |
3,789,276 | 3,789,277 | c# object defining property nullable or not | <p>I have an object that contains the date of an event. In the database, I have a field called something like ObjectEventDateUTC that stores the UTC time at which the event occurred.</p>
<p>For now, I'm defining the c# objet class like this:</p>
<pre><code>public class MyObject
{
public DateTime EventDateUTC { get... | c# | [0] |
147,405 | 147,406 | php and html table logic | <p>So I have an table that has values from database:</p>
<pre><code>$result=mysql_query("SELECT * FROM database WHERE date = '$period'") or die (mysql_error());
while ($row_result = mysql_fetch_array($result) {
$article = $row_result['article'];
...
//It shows something like this:
id | article | some more da... | php | [2] |
2,651,774 | 2,651,775 | what is the solutions for software causeed connection abort:socket write error.i am new to using jscape | <p>I am jscape for for uploading files to ftp,can u help say what is the cause for Software caused connection abort: socket write error"? .as i am using daemon thread which contineously checking my local directory and uploading files to remote directory</p>
| java | [1] |
1,420,549 | 1,420,550 | Check if a predicate evaluates true for all elements in an iterable in python | <p>pretty sure there is a common idiom but couldn't find it with google..<br>
Here is what I want to do (in java):</p>
<pre><code>// Applies the predicate to all elements of the iterable, and returns
// true if all evaluated to true, otherwise false
boolean allTrue = Iterables.all(someIterable, somePredicate);
</code>... | python | [7] |
4,840,418 | 4,840,419 | How can I select the top 10 from a dictionary in .NET? | <p>I have a dictionary which is sorted like this:</p>
<pre><code>var sortedDict = (from entry in dd
orderby entry.Value descending select entry
).ToDictionary(pair => pair.Key, pair => pair.Value);
</code></pre>
<p>How can I select top 10 from this sorted dictionary?</p>
| c# | [0] |
2,070,109 | 2,070,110 | Is it possible to "refresh" or "rerun" a jQuery selector after the DOM might have changed? | <p>I have a page that loads a complicated set of forms. In this set of forms, there are password fields. These password fields have show/hide toggle switches which, when any of them are clicked, ALL the password fields are replaced with equivalents of themselves in the DOM with their types toggled between "text" and "p... | jquery | [5] |
5,721,914 | 5,721,915 | How to stop the Eggplant script while checking for a condition | <p>My current Eggplant script will check for the next available screen for "X" seconds, after that i need to stop the script automatically.</p>
<p>How do i do that?</p>
<p>Thanks,
Siva</p>
| android | [4] |
4,012,465 | 4,012,466 | Setting/adding custom content view for ProgressDialog: requestfeature() must be called | <p>So I would like to add a custom imageview to a ProgressDialog:</p>
<pre><code>LinearLayout root = (LinearLayout)findViewById(R.id.root);
ProgressDialog pdialog = new ProgressDialog(context);
pdialog.setTitle("Wait");
pdialog.setMessage("Loading...");
pdialog.addContentView((ImageView)findViewById(R.id.imageV3iew1),... | android | [4] |
5,101,855 | 5,101,856 | Authentication php mail | <p>i'm using mail, its working fine but now I need to use a more source mail server. The code below is what I'm using how the I add authentication to it?</p>
<p>trying to add</p>
<pre><code>smtp: "mail.newserver.com"
port: "25"
timeout: 60
auth: yes
user: name
pass: word
</code></pre>
<p>current</p>
<pre><code>$to ... | php | [2] |
1,685,820 | 1,685,821 | Why main() method is needed in java main class | <p>I know we can compile and run a java program successfully without a main() method, but why we still need main() method in java's main class?</p>
| java | [1] |
4,615,759 | 4,615,760 | Without using the parameters in URL, what are the ways to access other pages in php | <p>Without passing the parameters in URL, how can we send the variables to other pages and use the functionalities in that pages in php. How can we implement this?</p>
| php | [2] |
3,154,763 | 3,154,764 | How to apply .each() only for certain parents? | <pre><code>$("table").each(function(){
//Code goes here
}
</code></pre>
<p>I want use this(above code ) for whose parents class attribute "featured". so from below example I want include only 1) ex.
ex:</p>
<p>1) </p>
<pre><code><div class="featured">
<table>
</table>
</div>
</code></pre>
<... | jquery | [5] |
50,504 | 50,505 | displaying characters and how many times they appear? | <p>I get a string from the user and then put it in a char array. Now I want to display all the characters in the string along with how many times they appear. My code is as follows Please Correct me ?</p>
<pre><code> using System;
class count
{
public void charcount()
{
int i ;
int count = 0;
... | c# | [0] |
5,692,245 | 5,692,246 | ASP.NET is it possible to access public page variables from ListView.EmptyDataTemplate? | <p>is it possible to access public page variables from ListView.EmptyDataTemplate ?</p>
<p>Can i do that and if can, how ?</p>
<p>thanks</p>
| asp.net | [9] |
409,158 | 409,159 | How to know margin-left auto pixels from the left side? | <p>I am using jQuery mousemove to follow cursor by image (I am doing this for only one div). I have centered whole page (margin-left: auto ; margin-right: auto;). But here comes problem:</p>
<pre><code>$('.friendSelection').mousemove(function(e){
$('.follow').show();
$(".follow").css({l... | jquery | [5] |
4,912,517 | 4,912,518 | How to get document of specific group in sharepoint using C# | <p>Last 3 days i have tried to get ListItem of specific Group in Sharepoint. Bt till now i could not find solution. Can any one give solution? </p>
| c# | [0] |
333,488 | 333,489 | Using jquery: Show an ajax-loading gif for each image being loaded until the that indivisual image is loaded fully | <p>Using jquery how to show a loading gif until a image is completely loaded and then remove the loading gif and show the actual image. This should happen independently on all images inside the page. Here is an example: </p>
<p><a href="http://jwt.com/" rel="nofollow">http://jwt.com/</a></p>
<p>Here is my attempt whi... | jquery | [5] |
2,703,293 | 2,703,294 | Prevent jquery submit on enter press on specific field | <p>How can I cancel the jquery submit from running when I press the enter key on a specific input field? </p>
<p>Something like this:</p>
<pre><code>var $canSubmit = true;
$('#profile_form')
.keyup(function(e){
if (e.keyCode == 13 && e.srcElement.name == 'countrySearch') {
$ca... | jquery | [5] |
4,998,693 | 4,998,694 | How do I get rid of the "u" from a decoded JSON object? | <p>I have a dictionary of dictionaries in Python:</p>
<pre><code>d = {"a11y_firesafety.html":{"lang:hi": {"div1": "http://a11y.in/a11y/idea/a11y_firesafety.html:hi"}, "lang:kn": {"div1": "http://a11y.in/a11ypi/idea/a11y_firesafety.html:kn}}}
</code></pre>
<p>I have this in a JSON file and I encoded it using <code>jso... | python | [7] |
4,745,951 | 4,745,952 | Learning c++ from a C# background | <p>I want to learn c++ as I will be working on image recognition, etc.</p>
<p>I have a few years solid experience in C# and I have made stuff with C# so I'm not lacking experience. What is a good book which will help me make the transition (I will still be doing C# as it is my main skill)?</p>
<p>Also, would you agre... | c++ | [6] |
3,422,189 | 3,422,190 | ClassNotFoundException when using custom Parcelable | <p>I use a custom Parcelable to carry some data to a BroadcastReceiver. Here is what i do:</p>
<p>I register my intent and set the extra Parcelable on it along with an extra classloader (intent.setExtraClassLoader(..)). Next i schedule the execution of the broadcast via an AlarmManager.</p>
<p>So when the AlarmManage... | android | [4] |
2,876,191 | 2,876,192 | Best practice for caching images read from an inputstream in Java | <p>I have a servlet that acts as a proxy for fetching images by reading the images as bytes off a HttpURLConnection input stream and then writing the bytes to the response output stream. Here's the relevant code snippet:</p>
<pre><code>HttpURLConnection connection = (HttpURLConnection)url.openConnection();
connection... | java | [1] |
3,928,959 | 3,928,960 | HTTP handler vs HTTP module | <p>Can someone explain in less than 2 sentences the difference between both? Yes, I know google can provide hundreds of answers but not one in 2 clear sentences:)</p>
<p>Thanks</p>
| asp.net | [9] |
2,281,879 | 2,281,880 | send message to a window handle | <p>I'm running an exe through which I get a handle of a control in another exe. Now what I want to do is send messages to the particular handle from my exe.</p>
| c# | [0] |
665,024 | 665,025 | how to get image height from dom tree using jquey when height attribute is not set | <p>I want to get image height and width when it is not set from height attribute and not also set in css. Real height and width of image which we get in dom tree or when browser render image with image's original height and width.
I tried following but didn't worked,</p>
<pre><code>$("#idname img").attr('height');
</c... | jquery | [5] |
5,351,929 | 5,351,930 | How To Find div in Master from ascx? | <p>I need to find a div in the master page from a webusercontrol.ascx<br>
I tried it with:</p>
<blockquote>
<p>HtmlGenericControl Mydiv = (HtmlGenericControl)Page.Master.FindControl("dvAlert");</p>
</blockquote>
<p>But that doesn't work.</p>
| c# | [0] |
3,242,691 | 3,242,692 | How can an object be initialized within its own class? | <p>I was under the impression that a new object can be created if there is a existing class for it.</p>
<pre><code>public final class Suit implements Comparable {
private String name;
private String symbol;
public final static Suit CLUBS = new Suit( "Clubs", "c" );
</code></pre>
<p>How does this work? What i... | java | [1] |
2,202,640 | 2,202,641 | Is there any way to determine which function called myFunction in javascript? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1333498/determine-calling-function-in-javascript">Determine calling function in javascript</a> </p>
</blockquote>
<p>Suppose I have a function in javascript, and I want to know who is the caller. Is this possibl... | javascript | [3] |
1,933,218 | 1,933,219 | Background application without ui | <p>I am new to android development. I want to make one background application, so that it keeps running in background, and it's without any UI, and even its icon do not appear on desktop.
In short it's a stealth application.<br>
Is it possible?</p>
| android | [4] |
466,655 | 466,656 | Determine if begindate is weekend | <p>I need to check if the selected date from a datepicker is not on a weekend. The function needs to keep checking if the new startdate is a weekend. Also it need to add days to the startdate if a weekend occurs.</p>
<p>Code should be something like this:</p>
<pre><code>int startday = Datepicker1.SelectedDate;
if (st... | c# | [0] |
2,611,784 | 2,611,785 | Round button in android.. avoid presses "outside" the button? | <p>I have created/tried to create, a round button for android by using the ImageButton "widget".
But since that type of button is treated as a square and my png-image also is treated as a square with a transparent background, then how do I avoid the user from beeing able to press outside the round button?.. cause as fo... | android | [4] |
4,039,339 | 4,039,340 | How to create C# list of ALL file associations(friendly application names & executables) for file type | <p>I want to create a list/dictionary of all the friendly application names and their executable paths & commands for a specific file type. I've used AssocQueryString but it only returns one instance value.</p>
<p>For example:</p>
<p>The file type ".cs" on my PC has got many application associations for it when I... | c# | [0] |
1,483,443 | 1,483,444 | How to Reduce process time in process of encrytion and sending to server and fetching then decryption the Data? | <p>I was trying to figure out How to Reduce process time in process of encryption the data and sending to server and fetching from server then decrypting the Data?</p>
<p>I am trying to do this in Android but I am thinking if the above thing could be done</p>
<p>Can somebody help me in this?</p>
| android | [4] |
1,118,254 | 1,118,255 | Alternative to nested `for` loops in Python | <p>I am trying to compare a list of forbidden folders read from a file. But we have to check if the task has the parent ID of the folder and then if that folder matches the forbidden folder. The lists I am looping through can contain many items.</p>
<pre><code>for task in tasks:
#Check the task is on their timeshe... | python | [7] |
378,410 | 378,411 | Equals implementation in a java-class which implements an interface that extends Iterable? | <p>How would one implement equals in a java-class which implements an interface that extends Iterable?</p>
<p>The interface</p>
<pre><code>public interface MyInterface extends Iterable<String> {
...
}
</code></pre>
<p>The concrete class</p>
<pre><code>public class MyClass implements MyInterface {
private S... | java | [1] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.