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 |
|---|---|---|---|---|---|
2,247,625 | 2,247,626 | Which jQuery selector is more efficient? | <p>I was just wondering if there is a reason why I should prefer this</p>
<pre><code><div class="identifying-class">bla bla</div>
<div class="identifying-class">bla bla</div>
var interestingElements = $("div.identifying-class);
</code></pre>
<p>over this</p>
<pre><code><div data-identifyin... | jquery | [5] |
82,479 | 82,480 | How does Java draw text under Windows operating system? | <p>My question relates to the underlying rendering mechanism. Does it use Windows APIs e.g. drawtext, exttextout or does it use a proprietary drawing mechanism? Is this documented anywhere?</p>
<p>More specifically</p>
<pre><code>java.awt.Graphics.drawString
java.awt.Graphics2D.drawString
</code></pre>
<p>Under Su... | java | [1] |
5,040,572 | 5,040,573 | typeof result of 2 undefined variable | <p>I just test the "typeof" in javascript, and really don't know why the result is like this. </p>
<p>/<strong><em>*</em>**<em>*</em></strong>/ </p>
<pre><code>var cota,
plouto;
alert(typeof plouto/cota); //NaN
</code></pre>
<p>/<strong><em>*</em>**<em>*</em></strong>/ </p>
<pre><code>var cota,
plouto;
... | javascript | [3] |
3,246,872 | 3,246,873 | Passing function pointers - semantics | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/6893285/why-do-all-these-crazy-function-pointer-definitions-all-work-what-is-really-goi">Why do all these crazy function pointer definitions all work? What is really going on?</a> </p>
</blockquote>
<p>I would b... | c++ | [6] |
1,976,302 | 1,976,303 | Filtering values against an expression and a list | <p>I'm writing a bot for the IMified network.</p>
<p>I want to filter the items processed by my bot by only accepting certain values into my script.</p>
<p>This is what I'm using right now:</p>
<pre><code>$items = array('botkey', 'userkey', 'network', 'user', 'channel', 'msg', 'step');
foreach ($_POST as $key =>... | php | [2] |
3,886,321 | 3,886,322 | The view controller of a uitabbarcontroller not getting refreshed | <p>i have a uitabarcontroller in which 3 view controller are added .in the 3rd tab i have a picker view which selects some settings based on which data in the 2nd tab changes.When i migrate into 2nd tab the data is not getting refreshed as i have the same old data.How can i refresh the data in the 2nd tab.</p>
<p>NSMu... | iphone | [8] |
5,043,532 | 5,043,533 | how to find out android:requiresSmallestWidthDp for support-screens | <p>How do I figure what value to set the android:requiresSmallestWidthDp under
<p>I would like to support small screens, but I can see that at 3.3 in things start to get cut off.</p>
<p>I don't specify any sizes in the layout. Mainly use relative layout, and wrap_content.</p>
| android | [4] |
3,842,301 | 3,842,302 | Asp.net MVC Medium Trust Remote Host | <p>I’m having issues getting my asp.net mvc application working on my remote host.</p>
<p>The host needs all sites to be working with medium trust.</p>
<p>I’ve modified my machine web.config “\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG” and created a new project so my new application web.config picks up the ch... | asp.net | [9] |
3,215,341 | 3,215,342 | IPostbackeventhandler returning no results for an automated table | <p>I got this code which extends the tablerow to make them clickable. </p>
<pre><code>namespace ClickableTableRow
{
public class ClickableTableRow : TableRow, IPostBackEventHandler
{
public ClickableTableRow()
: base()
{ }
private EventHandler _click;
public event... | asp.net | [9] |
416,226 | 416,227 | StreamCorruptedException when de-serializing through ObjectInputStream | <p>I am trying to test a program and for that I need to access ReadExternal function but I am getting StreamCorrupted exception on ObjectInputStream.
I know I need to use the object written by WriteObject but dont know how to do it...</p>
<pre><code>ObjectOutputStream out=new ObjectOutputStream(new ByteArrayOutputStr... | java | [1] |
4,605,568 | 4,605,569 | Is it possible to resize the canvas in android? | <p>[android]
I have a LinearLayout which contains 2 views, 1st is imageView and th 2nd one have canvas on it.
if I do mLinearLayout.addView(i); and then mLinearLayout.addView(c); it shows both but if I do it in reverse oder (mLinearLayout.addView(c) and then mLinearLayout.addView(i)) the it only shows canvas.
I wanted ... | android | [4] |
748,292 | 748,293 | Android Noteadv2. The confirm button has no click listener | <p>I'm looking at the Noteadv2 in the android tutorials. Everything works just hunky dory, but one small thing. My "confirm button" has no on-click listener. I know why this happens and the code from the solution is effectively identical, but the expectation the tutorial gives you is that you should be able to create a... | android | [4] |
5,612,888 | 5,612,889 | check for valid arguments | <p>So let's define a few functions:</p>
<pre><code>def x(a, b, c): pass
def y(a, b=1, c=2): pass
def z(a=1, b=2, c=3): pass
</code></pre>
<p>Now, what's the best way to, given a pointer to <code>x</code>, <code>y</code>, or <code>z</code> (<code>p</code>), a tuple of args (<code>a</code>) and a dictionary of kwargs (... | python | [7] |
1,970,750 | 1,970,751 | iPhone - content size of a UITableViewController | <p>I am on a view and I will show a TableViewController.</p>
<p>This app is universal. So, when I show this TableViewController on iPad I will show it inside a popover and on the iPhone I will push it with a navigationController.</p>
<p>Inside the tableViewController class I need to know the bounds of the parent view... | iphone | [8] |
3,874,493 | 3,874,494 | Python Help, want to build a function without using Libraries | <p>I want to write a function that will return me the number of days between two dates somethinglike that <strong>def daysBetween(month1,dayofmonth1,month2,dayofmonth2)</strong>. Doesn't matter if the year is not included or not. But I DO NOT want to IMPORT LIBRARIES, cause I Know hoe to do it with Libraries. if any1 ... | python | [7] |
5,056,258 | 5,056,259 | Thinking of two elements as "the same" | <p>I have two jQuery elements, <code>$link = $('<a>')</code> and <code>$input = $('<input/>')</code>.</p>
<p>Although they are two different types of elements, they are in my code (and in my mind!) very linked:</p>
<p>1) Conceptually, they are different representations of one object.</p>
<p>2) They share... | jquery | [5] |
6,000,871 | 6,000,872 | How do I resolve an Object not found error for the MSAS 2008:Memory object? | <p>I created a sample program in that I have written code to get details of particular performance objects Using PDH library function in native C++. However, I am getting error as "Object not found" for "MSAS 2008:Memory" object:</p>
<blockquote>
<p>PDH function PdhEnumObjectItems() is not able to find Object inform... | c++ | [6] |
3,000,638 | 3,000,639 | Programatically recognize android alarm clock notification/ calender event notification | <p>Is it possible to get an event/broadcast, when calender/alarm clock, pops a notification?</p>
| android | [4] |
885,324 | 885,325 | how to assign string array values to varible | <p>hi i am new to iphone. what i am doing is sorting the labels for that i am assigning the string array to temporary string variable as follows:</p>
<pre><code>NSString *tmp = [labels objectAtIndex:j-1];
labels[j-1]=labels[j];
labels[j] = tm;
</code></pre>
<p>but it shows error at last line that is incomplete types... | iphone | [8] |
2,291,692 | 2,291,693 | Insert sentence to DB | <p>I'm working on ASP- and I have build in DB and I want to know how to write a code for insert sentences. on C#???</p>
| c# | [0] |
3,228,286 | 3,228,287 | python datetime question | <p>I have a datetime where the input is hardcoded as <code>datetime.datetime(2008,5,5,16,20)</code></p>
<p>In the same format how to get the current datetime .I am using python 2.4 </p>
| python | [7] |
653,817 | 653,818 | Timer is not implemented the first time | <p>I am trying to implement a timer and it works fine for the most part..
But for the first time , the clock isn't starting but for the rest of the activity it is,
The oncreate method has some problem which I am not able to figure out..Help!</p>
<pre><code>protected void onCreate(Bundle savedInstanceState) {
sup... | android | [4] |
560,379 | 560,380 | Getting error invalid assignment left-hand side | <p>i am suing a function in which i try to limit textarea length but on one condition i am getting the above mentioned error. Please tell me what i am doing wrong?</p>
<pre><code> function limitTextArea(element, limit) {
var $textArea = $(element);
($textArea).keypress(function(event){
if ($textA... | jquery | [5] |
1,834,350 | 1,834,351 | How to run 'python setup.py install' from within Python? | <p>I'm trying to create a generic python script for starting up a python app and I would like to install any dependent python modules if they are missing from the target system. How can I run the equivalent of the command line command 'python setup.py install' from within Python itself? I feel like this should be pre... | python | [7] |
912,431 | 912,432 | Javascript Game Engine | <p>I'm trying to write a javascript game engine myself. I did something like this;
How do you think can make it more useful? Waiting for suggestions. thanks</p>
<p>How do I write less than this initial code, for example?</p>
<pre><code> var jSgame = function(w,h,bgcolor){
if(bgcolor == undefined){
bgcolo... | javascript | [3] |
1,222,529 | 1,222,530 | android.os.NetworkOnMainThreadException with android 4.2 | <p>Here i am using this code load Json. It is work fine with android 2.2 but when i am using android 4.2 it throws <strong>android.os.NetworkOnMainThreadException</strong> exception please give me solution</p>
<pre><code> public class JSONParser {
static InputStream is = null;
static JSONObject jObj = null;
st... | android | [4] |
5,467,671 | 5,467,672 | img tag convert into div tag by using jQuery | <p>I want to change all img tag of a page into div tag by using jQuery.
ex.</p>
<pre><code><img src="http://www.xyz.com/img.png" alt="this text i want in div" />
</code></pre>
<p>by using jQuery it converts into </p>
<pre><code><div>this text i want in div</div>
</code></pre>
<p>How we can do this... | jquery | [5] |
5,628,462 | 5,628,463 | Issue related to state maintenance | <p>I have 10 views with <code>UINavigationController</code> in hierarchy. Now when I want to go back from 10 to 9, and so on with back button, which method should I use?</p>
<ol>
<li><code>popviewController</code></li>
<li><code>popToViewController</code></li>
</ol>
<p>I have set a fixed value for all views. At appl... | iphone | [8] |
3,461,653 | 3,461,654 | Android 4.2.2 RSA disabling | <p>How to disable RSA autentification for android 4.2.2
I has tried following methods:</p>
<pre><code>1) setprop ro.adb.secure 0
getprop still return 1.
2) Root phone and retry method 1
getprop still return 1.
3) Root phone and manually change ro.adb.secure to 0 in the /default.prop
getprop still return 1.
<... | android | [4] |
1,287,806 | 1,287,807 | Static variable definition order in c++ | <p>Hi i have a class tools which has static variable std::vector m_tools. </p>
<p>Can i insert the values into the static variable from Global scope of other classes defined in other files. </p>
<p>Example: </p>
<p>tools.h File </p>
<pre><code>class Tools
{
public:
static std::vector<std::vector> m_tools;
vo... | c++ | [6] |
616,412 | 616,413 | How to snoop on $("<p>") calls? | <p>I was wondering how i snoop on dom modification events. I tried using the $.sub() to listen but it seems a little overfill to use another wrapper from jquery to get this affect. </p>
<p>Demo is here <a href="http://jsfiddle.net/sr5RE/2/" rel="nofollow">http://jsfiddle.net/sr5RE/2/</a></p>
<p>i.e this works</p>
<p... | jquery | [5] |
1,247,776 | 1,247,777 | ASP.Net Wizard - How to clear contents of web controls | <p>I have an ASP.NET wizard control where I loop back, <code>wiz.MoveTo(wiz.WizardSteps[0])</code>, to the first step in the wizard in the FinishButtonClick event handler.</p>
<p>I then also want to clear all content for all controls in the steps?</p>
<p>The problem is that because of viewstate the controls in the wi... | asp.net | [9] |
1,059,315 | 1,059,316 | Avoid to rewrite a file that already exists | <p>I write this simple code to save an image:</p>
<pre><code>// $randomimage contains a random image url.
$content = file_get_contents($randomimage);
file_put_contents('images/'.$randomimage, $content);
</code></pre>
<p>I need a way to NOT rewrite an image with the same name. So, if an image with a certain name alrea... | php | [2] |
5,020,487 | 5,020,488 | URL routing - opposite of GetRouteUrl in Asp.net webform | <p>Assume I have the following defined in global.asax:</p>
<pre><code>routes.MapPageRoute("about", "about", "~/About.aspx");
</code></pre>
<p>In an ashx file, I want to be able to pass in "about" and return "~/About.aspx". I know the opposite can be done via GetRouteUrl, but is there a built-in function for what I'm... | asp.net | [9] |
1,552,966 | 1,552,967 | How to specify height of view to be 1/3 of screen height | <p>I have created a view (actually a webview):</p>
<pre><code><WebView
android:id="@+id/myWebView"
android:layout_width="match_parent"
android:layout_height="@dimen/input_height"
/>
</code></pre>
<p>Which refers to the height in another xml file:</p>
<pre><code><resources>
<dimen name="key_h... | android | [4] |
4,842,812 | 4,842,813 | year in 2year format | <p>How do I get the following to show in a 2 digit year format?</p>
<pre><code>DateTime test = DateTime.Now;
DateTimeFormatInfo dateTimeFormat = CultureInfo.GetCultureInfo("en-US").DateTimeFormat;
Console.WriteLine(test.ToString(dateTimeFormat.ShortDatePattern,dateTimeFormat));
</code></pre>
| c# | [0] |
5,771,604 | 5,771,605 | ANDROID: update runtime contextmenu : add item to context menu after event | <p>hi mate how can i update runtime my context menu ?
after some events i have to add item to context menu.
normal menu has got on onPrepareOptionsMenu(). but context menu have only oncreateCOntextmenu().
how can update my context menu ?</p>
| android | [4] |
5,639,006 | 5,639,007 | icon issue in android | <p>i have developed one application in which getting <strong><em>install app information</em></strong> like name,package name, version,date, icon etc..
now i get all thing in proper manner, nut icon are store in <strong>"private Drawable icon;"</strong> variable.
now i am drag <code><imageview></code> in main f... | android | [4] |
1,792,563 | 1,792,564 | Correlation between Memory Usage of Processes and battery Consumption Android | <p>I've finally figured out a way to get TotalPss for individual processes. Now what I am concerned about is, how to find battery consumption per android process, and if there is no direct way of finding that out, is there any correlation between the memory usage per process and the battery consumption? Any research pa... | android | [4] |
4,824,652 | 4,824,653 | Edittext want to go enable from disable after select the particular item in the spinner items | <p>I'm using Spinner,EditText and Button in one page.The spinner has these items ... </p>
<p>Following:</p>
<pre><code> String[] Items = {
"Alarm",
"Office",
"Meeting",
"Party",
"Lunch",
"Breakfast",
"Supper",
"Home",
... | android | [4] |
4,022,290 | 4,022,291 | Exception in thread "main" java.lang.NullPointerException | <p>I started to learn java yesterday and I wrote the followind program which should print pairs of equal numbers, but when I run it I get </p>
<pre><code>Exception in thread "main" java.lang.NullPointerException
at _aaaa.main(_aaaa.java:26)
</code></pre>
<p>Here is my program:</p>
<pre><code>import java.util.*;
cla... | java | [1] |
4,174,278 | 4,174,279 | jQuery in Wordpress - Why is it not working? | <p>I am using this as my starter template: <a href="http://html5reset.org/" rel="nofollow">www.html5reset.org/</a></p>
<p>It's pretty nice, but I believe something is wrong with jQuery in there.</p>
<p>In the <code>functions.php</code> it says:</p>
<pre><code>// Load jQuery
if ( !function_exists(core_mods) ) {
... | jquery | [5] |
525,384 | 525,385 | Android - Draw bitmap as one color | <p>I have several bitmaps (game sprites) which I'd like to draw into another bitmap, however each non-transparent pixel of the source bitmap should be drawn using a single color, ignoring the original pixel color of the source. Basically, I'm trying to use the sprite as a "stamp" of a single color to be drawn into the... | android | [4] |
180,476 | 180,477 | jQuery mousedown + mouseleave | <p>i'm a begginer currently building a simple jQuery script where i'd like my action to happen when I drag out of its bounds. So i was thinking on detecting a mousedown and inside its function have a mouseleave.</p>
<p>But what happens is not what i'm expecting since everytime i pass my mouse over it - no need to clic... | jquery | [5] |
5,437,284 | 5,437,285 | Where the PHP $_GET superglobal can be used | <p>Can the PHP superglobal $_GET be used and work as intended outside of the form tags? For example, can I do $_GET('select box id') outside of the form tags and have it work as intended?</p>
<pre><code><?php
---Placeholder for DB login info---
switch($_GET['select box id'])
{
case "text shown ... | php | [2] |
4,377,097 | 4,377,098 | add a menu to my application with android | <p>I created a file option_menu.xml: in the directory /res/menu/</p>
<p>I created a file menu.java that contains this code: </p>
<pre><code> @Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.option_menu, menu);
return true;
}... | android | [4] |
4,144,979 | 4,144,980 | Detect height change of a DIV with jQuery using Resize Plugin | <p>I'm using this plugin to check if a size of a DIV is changed:</p>
<p><a href="http://benalman.com/projects/jquery-resize-plugin/" rel="nofollow">http://benalman.com/projects/jquery-resize-plugin/</a></p>
<p>And it works just fine, but I don't want to just detect if a DIV is resized, I want to detect if the height ... | jquery | [5] |
4,697,616 | 4,697,617 | confise when to release memory | <p>i have created one view Controller(A) and this controller is using as a view in my app means i am adding view controllers view property to other view controller(B) view property.
in this case should i release A or their view after adding to b ........??
or relese A controller in dealloc method ???</p>
| iphone | [8] |
4,981,774 | 4,981,775 | Time Ago Help | <p>On following function i used 2 identical variables because inside is different language, i need help to replace this variable $periods[$j].= "";</p>
<p>example:</p>
<pre><code>function showdate($time)
{
$periods = array("second", "minute", "hour", "day", "week", "month", "year", "decade");
$periods2 = arr... | php | [2] |
6,004,376 | 6,004,377 | Page Initialization: Does one need onload? | <p>Regarding this <a href="http://stackoverflow.com/questions/886668/window-onload-is-not-firing-with-ie-8-in-first-shot">SO</a> article and this <a href="http://stackoverflow.com/questions/5168022/the-window-onload-event-is-not-firing-in-ie8">SO</a> article. I looked at these after noticing my web app does not fire i... | javascript | [3] |
4,684,091 | 4,684,092 | Assist with Python script | <p>I have written a code in Python, and I want to change it.
I use it when I am performing a penetration tests in my organization and I want to make my script better.
The script gets a username that I entering and it connect to the SMTP server over port 25 and check if the user exists or not.
Here is the script:</p>
<... | python | [7] |
2,897,763 | 2,897,764 | C# Language Question: priority of matching | <p>I'm reading book "C# Language", and hit this example from Page 123-124:</p>
<p>The meaning of a name within a block may differ based on the context in which the name is used. </p>
<p>In the example</p>
<pre><code>using System;
class A { }
class Test
{
static void Main()
{
string A = "hello, world";
st... | c# | [0] |
228,889 | 228,890 | Android change widget color at runtime UPDATED | <p>I have a widget, with a framelayout.</p>
<p>Is there a way to change my widgets color/shape in runtime? </p>
<p>I am using a shape xml for the background. </p>
<p><strong>update:</strong></p>
<p>i tried:
1,</p>
<pre><code> Paint paint=new Paint();
Bitmap bitmap=Bitmap.createBitmap(100, ... | android | [4] |
2,655,299 | 2,655,300 | What is the purpose of marker interface? | <blockquote>
<p><strong>Possible Duplicates:</strong><br>
<a href="http://stackoverflow.com/questions/4540820/marker-interface">marker interface</a><br>
<a href="http://stackoverflow.com/questions/1023068/what-is-the-purpose-of-a-marker-interface">What is the purpose of a marker interface?</a> </p>
</blockquote>... | java | [1] |
4,331,503 | 4,331,504 | In c# what does the ^ character do? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/3735623/what-are-the-and-operators-used-for">What are the | and ^ operators used for?</a> </p>
</blockquote>
<p>In c# what does the ^ character do?</p>
| c# | [0] |
4,762,872 | 4,762,873 | Hashmap error,i can't load data from string | <p>I m using hashmap for a listview.</p>
<pre><code> map = new HashMap<String, Object>();
map.put("name", R.string.information);
map.put("address", R.drawable.info3);
mylist.add(map);
// ...
</code></pre>
<p>my problem is that i cant load string in my hashmap (R.string.information)..when i r... | android | [4] |
4,006,432 | 4,006,433 | How to share same data between multiple activities in android? | <p>How to share same data b/w multiple activities.Present i'm using Intent but it is not working properly. It means for some activities i need to pass some other data at that time common data which i need to pass that data is losing . so how can i overcome this problem .Please help me regarding this.</p>
<p>Thanking y... | android | [4] |
4,620,012 | 4,620,013 | using stripslashes() discriminately | <p>My php application uses stripslashes() to deal with magic_quotes but I only want it to remove slashes that magic_quotes is putting in, because the user is allowed to supply a \ with his input.</p>
| php | [2] |
844,110 | 844,111 | How to determine if the flight segment is transatlantic or transpacific in PHP? | <p>Given the airport code for the origin and destination region of a flight I need to determine if this flight segment is transpacific or transatlantic. </p>
<p>This is the psuedocode of the best solution I came up with so far.</p>
<p>1.determine the country and the continent(region) of the airport codes.
2.If the o... | php | [2] |
5,416,878 | 5,416,879 | question related to array | <p>I have two array. and I want to concatenate to following format. format is shown as follows. </p>
<pre><code> Getting form values using post method
/************ Getting Form names like Weight,arms Age etc **********************/
foreach ($_POST["form_field_names"] as $key => $values) {
$form_fi... | php | [2] |
4,154,245 | 4,154,246 | how to add naviagationController to tabBar Controller programatically? | <p>In AppDelegate.m i am writing following code for navigationbar.</p>
<pre><code>MaterialsListViewController *materials = [[MaterialsListViewController alloc]initWithNibName:@"MaterialsListView" bundle:nil];
UINavigationController *navigation = [[UINavigationController alloc]initWithRootViewController:materials];... | iphone | [8] |
3,722,663 | 3,722,664 | Set Dialog Theme to Activity in Android using programming code | <p>I want to set a <strong>Dialog Theme</strong> to an <strong>Activity</strong>.
I can achieve this using <strong>Manifest File</strong>.
But I want to set it using programming code.</p>
<p>How I can achieve this ?</p>
<p>Thanks.</p>
| android | [4] |
3,854,541 | 3,854,542 | how do i create and save a data file in a folder of my choice | <p>how do i create and save a data file in a folder of my choice in C++ program?</p>
| c++ | [6] |
3,315,422 | 3,315,423 | startsWith using error in java | <p>defined variable:</p>
<pre><code> LinkedList list1=new LinkedList();
</code></pre>
<p><code>Object get()</code> in list1 obtains a node of list1</p>
<p><code>Object remove()</code> in list1 deletes a node of list1</p>
<p><code>count()</code> is length of list1</p>
<pre><code>for(int i=1;i<list1.count();i++){... | java | [1] |
4,825,190 | 4,825,191 | Bytes in Java? | <p>Thanks for all above answers but didn't really help me well just to give an idea what exactlty i wants to do: I am coding for some sort of packet which has different fields with differnt length in bytes</p>
<p>so field1 is 2 byte long field2 is 3 bytes long field3 is 6 bytes long and when i addup these fields, i sh... | java | [1] |
4,946,220 | 4,946,221 | java Integer reference | <p>I've got a question.</p>
<pre><code>public class Jaba {
public static void main(String args[]) {
Integer i = new Integer(0);
new A(i);
System.out.println(i);
new B(i);
System.out.println(i);
int ii = 0;
new A(ii);
System.out.printl... | java | [1] |
1,301,370 | 1,301,371 | Listen to the Delete action in AddressBook ShowPersonViewController on iPhone | <p>I am writing a dialler application and am i trying to integrate the AddressBook with it. I want to allow the user to Edit the contact directly from within my application but i want to be able to listen to those modifications, if possible. Say for example the user click the delete button in the ShowPersonViewControll... | iphone | [8] |
3,447,974 | 3,447,975 | How to propagate a value back to the enclosing class in Java? | <p>I was looking at this example<a href="http://stackoverflow.com/questions/1703351/how-to-call-a-oracle-function-from-hibernate-with-return-parameter"> Oracle function from Hibernate</a>. It tells in the solution that:</p>
<pre><code>int result = call.getInt(1); // propagate this back to enclosing class
</code></pre>... | java | [1] |
2,923,511 | 2,923,512 | How to display indexDB data on initial page rendering | <p>I have a Web page using JavaScript where I cache a large amount of data which I use to populate option tags of a select statement. I have implemented this using localStorage but it is very very slow (it would be much faster regenerating/reloading from the server). IndexDB looks promising as a solution.</p>
<p>All... | javascript | [3] |
4,341,961 | 4,341,962 | jQuery: Trying to run $.get within .each function | <p>This code does get the index value of each element with the "profileName" class. It also does run a $.get using each index value as the url. But it fails when I try to make it put the ajax response into each element with the "details" class that is the child element of each "profilName" div. Is this doable? </p>
<p... | jquery | [5] |
473,815 | 473,816 | How to loop through :eq for an unknown range using jquery? | <p>How to loop through a jquery each loop using filter :eq for an unknown range?</p>
<p>for example, I would like to loop through the following:</p>
<pre><code>$("#list li:eq("+ i +")").each(function(i)
{
i++;
});
</code></pre>
<p>This code does not work</p>
| jquery | [5] |
30,592 | 30,593 | Jquery: getting value of input checkbox using common class and change() | <p>I have a table of values and need to get the value of a row's checkbox. What is happening is:
If I have a table with 4 rows of data and select the top row, the binding event is being fired for each corresponding row in the table with the same class name. I only want it to fire once and return the value of the row's ... | jquery | [5] |
5,147,708 | 5,147,709 | Jquery slide need content to stay open on hover | <p>Im having trouble with my jquery slide.</p>
<pre><code>$(document).ready(function()
{
$(".events").hover(function()
{
$(this).next().slideToggle(400);
}, function() {
$(this).next().slideToggle(400);
});
});
</code></pre>
<p>When i hover over my image, the hiden content slides out and when im... | jquery | [5] |
3,649,785 | 3,649,786 | Android - failed to open zip archive | <p>I am downloading apk file from web and storing him into Context.getCacheDir(). I am downloading file by HttpURLConnection - I am not asking actually on the code (it is fully working), so I am not posting it here. I successfully initiate download. File is downloaded into cache and then is prompted installation - but ... | android | [4] |
2,063,754 | 2,063,755 | reading lines 2 at a time | <p>Is there a better way to read lines two at a time from a file in python than:</p>
<pre><code>with open(fn) as f:
for line in f:
try:
line2 = f.next()
except StopIteration:
line2 = ''
print line, line2 # or something more interesting
</code></pre>
<p>I'm in 2.5.4.... | python | [7] |
3,829,937 | 3,829,938 | IE window.resize how to stop resizing it? | <p>I recently write a window.resize in javascript for resizing the browser window for certain conditions.e.g. start with vertical resolution 900 keep resizing the browser window until height become 400 then stop resizing. But browser window keep resizing as I clear the handler for it.
Is there any way to just stop brow... | javascript | [3] |
5,278,686 | 5,278,687 | How to do a non-cached 301 redirect? | <p>A while ago all browsers changed their behaviour and started caching 301 redirects, I would like to know how to do a 301 redirect that is not cached in php?</p>
| php | [2] |
5,066,930 | 5,066,931 | How can ImageView link to web page? | <p>is it possible to make an imageview link to a web page such that when user taps on the image, it takes them to a web page?</p>
| android | [4] |
3,728,716 | 3,728,717 | Turn off autosuggest for EditText? | <p>Is there a way to programmatically turn off that autosuggest list which pops up as you type in EditText?</p>
| android | [4] |
2,383,715 | 2,383,716 | Getting null pointer from java.sql.Date setter | <p>I have problem with setting java.sql.Date field in my object.
I got the string from text field, parsed it to java.util.Date, and then created java.sql.Date object from it.
Object is not null, as it prints out, but when I pass it as a parameter to setter, I get null pointer exception.</p>
<pre><code>dt = formatter.p... | java | [1] |
3,420,134 | 3,420,135 | How to avoid to display '#'? | <p>when I click:</p>
<pre><code><a href="#" onclick="plus();">+ 1 </a>
</code></pre>
<p>then in the address bar appears '#' in addition to URL ( example.com/index.php?id=1# ).</p>
<p>Is there a way to avoid that ?</p>
| javascript | [3] |
136,432 | 136,433 | How can I programatically determine if a program is in the user's PATH | <p>I have an application that for debugging purposes launches an editor with a log file. The editor was set to kedit. After a RedHat release update, we no longer had kedit. We simply changed the default editor and added an environment variable to let the user choose what editor they preferred.</p>
<p>The problem is th... | c++ | [6] |
4,859,453 | 4,859,454 | How to save a snap in an android application | <p>I am developing an android application in which a snap will be taken. But I am having trouble to save it in a file and creating the file. Please help.</p>
| android | [4] |
2,026,917 | 2,026,918 | null pointer exception in below code | <p>In below code last sop is not printed having</p>
<pre><code>String A=null;
if (A.contains("xyz")) {
System.out.println("loop1");
}
System.out.println(A);
</code></pre>
| java | [1] |
3,325,938 | 3,325,939 | Adding values from a list of checkboxes to a textbox | <p>I am new to jQuery, so I am not familliar with syntax of it.</p>
<p>The problem I am facing right now is, I have a dropdown list with some values and corresponding checkboxes. When someone selects a particular value from the dropdown i.e checks a checkbox from dropdown, I want to add the 'value' of the checkbox to ... | jquery | [5] |
5,926,132 | 5,926,133 | running a for loop in a foreach loop | <p>I have to write the contents in this format</p>
<pre><code>somename1 value1 value2 value1 value2 ....
somename2 value1 value2 value1 value2 ....
somename3 value1 value2 value1 value2 ....
somename4 value1 value2 value1 value2 ....
somename5 value1 value2 value1 value2 ....
</code></pre>
<p>value1 and value2 a... | c# | [0] |
120,755 | 120,756 | Master Detail Nested Way | <p>I am using Visual Studio 2010 and need to design a master detail form like the following.</p>
<p><a href="http://demos.devexpress.com/ASPxGridViewDemos/MasterDetail/MasterDetail.aspx" rel="nofollow">http://demos.devexpress.com/ASPxGridViewDemos/MasterDetail/MasterDetail.aspx</a></p>
<p>Any suggestions/free compone... | asp.net | [9] |
1,513,309 | 1,513,310 | Disabling JQDialog Resize | <p>For some reason I can't find any documentation in disabling the resize functionality.</p>
| jquery | [5] |
3,458,248 | 3,458,249 | Iterate over an object's "public" attributes | <p>Recently, I find myself writing code like this:</p>
<pre>
for name in dir( object ):
if name.startswith( '__' ) : continue
...
</pre>
<p>Is there a more pythonic way to access the object's "public" namespace?</p>
| python | [7] |
2,989,539 | 2,989,540 | How to play two different source video, when one end, then switch to the next one and loop the step? | <pre><code><!doctype html>
<html>
<head>
<title>Sequential Movies</title>
<script type="text/javascript">
// listener function changes src
function myNewSrc() {
var myVideo = document.getElementsByTagName('video')[0];
myVideo.src = "2.m... | javascript | [3] |
363,262 | 363,263 | how to find id using jquery with complex html? | <p>How to get <code>div45452314234</code> if i click on `Share on Facebook </p>
<pre><code><div id="div45452314234" class="Display">Display</div>
<div class="Actions">
<span>
<div id="count">0</div>
<a>Like</a>
</span>
... | jquery | [5] |
1,746,166 | 1,746,167 | jquery onchange select value has a period on it | <p>I have a select field like so.</p>
<pre><code><select id="v_bl_title" name="v_bl_title">
<option selected="" value="Mr.">Mr.</option>
<option value="Mrs.">Mrs.</option>
<option value="Ms.">Ms.</option>
<option value="Miss.">Miss</option>
<option value="">N... | jquery | [5] |
496,157 | 496,158 | C# calling a static method using a Type | <p>How do I call a static method from a Type, assuming I know the value of the Type variable and the name of the static method?</p>
<pre><code>public class FooClass {
public static FooMethod() {
//do something
}
}
public class BarClass {
public void BarMethod(Type t) {
FooClass.FooMethod()... | c# | [0] |
4,641,377 | 4,641,378 | Javascript function call not behaving the way I expect | <p>here is the html:</p>
<pre><code><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr align="center" valign="middle">
<td width="10" class="pagestyle" onClick="pageNo(-1);" align="right">&laquo;</td>
<td id="pageNum" class="pagestyle">1... | javascript | [3] |
3,901,799 | 3,901,800 | something wrong in this j query | <pre><code>function dowork()
{
$(".wrappedElement").removeClass("wrappedElement");
$(".wrappedElementout").removeClass("wrappedElementout");
var a=$("div#DepPart select option:selected").val();
$("div#TestPart select option[value^=a]").addClass("wrappedElement");
$("div#TestPart select option[value... | jquery | [5] |
2,631,621 | 2,631,622 | How can I block on readline() in python so I don't have to poll? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1475950/tail-f-in-python-with-no-time-sleep">tail -f in python with no time.sleep</a> </p>
</blockquote>
<p>I am trying to monitor a log file that is being written to (like tail -f), and I can't figure out how t... | python | [7] |
4,914,096 | 4,914,097 | Problems with pinch zoom on Android | <p>I recently discovered a bit of code to keep the backgrounds stable, when pinch zooming on iphone/ipad.
However I am running test on my website on my Android, and when I pinch zoom, the background image, which covers the whole site in the body tag, jumps all over the place.
So is there any code that can counteract th... | android | [4] |
60,964 | 60,965 | How to parse Xml in android? | <p>I have an XML Document I want to create a method that will parse the XML which is in Document format to String and return the Strings . How can I do this..Please help me out as I am very new to Android and XML as well.Thanks in advance.</p>
<p>I am trying to do something like this----</p>
<pre><code>public static ... | android | [4] |
5,299,547 | 5,299,548 | How to kill an application permanently? | <p>In my application when I give valid input in url is work fine and give response.When I give invalid input its shows toast message invalid input.But if I give again a valid input again , it show the invalid input message , why is this happening ?
Is there anywhere save history ??</p>
<pre><code>xmlResponse = A("www... | android | [4] |
3,594,462 | 3,594,463 | Enhancing Web Application Security | <p>"The dynamic JavaScript is another part that could use some additions in the future
as well. If another variable could not be found in the future, one could add a bogus
variable to make it even more difficult for an attacker to analyse the code and raise the
cost for the attacker to an extent where it is hopefully n... | php | [2] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.