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
744,687
744,688
Derived to base class conversion
<p>How does the conversion between derived and base class internally occurs and how does compiler knows or does it store the size of object?</p> <p>For example in the following:</p> <pre><code>class A { public: A():x(2){}; private: int x; }; class B : public A { public: B():A(),y(5){}; private: int y; }; class ...
c++
[6]
2,545,886
2,545,887
Quick Jquery slideUp/Down question
<p>Hey guys quick question, I have a function and it works when you click close, it slides up. However I want it to slide down by default when you first go to the page and it is just appearing right now, not sliding down.</p> <pre><code>$(document).ready(function(){ $("#related2").slideDown(); $(".close2").c...
jquery
[5]
5,720,151
5,720,152
sort datatable according to datetime column
<p>I am using DataTables to display some data and it works great but I want to customize it slightly and not sure how.</p> <p>i want to show record which are sorted according to datetime in desending order when datatable will be drawn...</p>
jquery
[5]
5,070,864
5,070,865
How can i change scroll bar track color from a set position?
<p>I have two horizontal scroll bars and they move together, My two documents are different widths.</p> <p>The scroll bar that will not scroll all the way must have red highlighting on the position it wont affect the web browsers scrolling.</p> <p>In the picture below the right hand web browser is at its full webBrow...
c#
[0]
1,291,244
1,291,245
Is it possible to find object's class in the list of objects?
<p>I've got a list of objects = { obj1,obj2,obj3 }</p> <p>Every class of the objects is inherited from the same interface</p> <pre><code>interface IObjects class Obj1:IObjects class Obj2:IObjects class Obj3:IObjects </code></pre> <p>And I want to find object of Obj1 class for examp. How to do it?</p>
c#
[0]
4,742,758
4,742,759
Instantiating a legacy COM object in C# dynamically (using its ID in a string)
<p>In Python, when I want to use this COM object, all I do is <code>win32com.client.Dispatch("Myapp.Thing.1")</code> and it gives me an object which I can call methods and such on. </p> <p>I want to do this in C# and, shockingly, I can't seem to figure out how. I do <em>not</em> want to use one of those automatically ...
c#
[0]
754,285
754,286
Automatic line break in asp.net textbox control
<p>I have a scenario in my application, by saving a text of length 20000 chars without line break in between.When i retrieve the same to an asp.net textbox control my UI is stretching to the length of these 2000 chars in a single line . I have to wrap the text automatically inside text box. Can any one help to solve ...
asp.net
[9]
4,197,935
4,197,936
ImageIcon not displayed after creating jar
<p>i'm trying to make a small project in java with no luck if i'm compiling the program with eclipse everything is good, but when i'm i creating the jar file i get a blank window</p> <p>this is the image i declared for:</p> <pre><code>public ImageIcon BACKGROUND = new ImageIcon() ; </code></pre> <p>I have tried to d...
java
[1]
691,479
691,480
Getting the list of distribution lists using ewp api in c#
<p>I want to get all distribution lists &amp; the members of those lists using the ewp api in c#. I made the connection to the outlook server and I can get the calendar information of mine using c#. But I couldn't find a way to get the distribution lists.</p>
c#
[0]
1,950,835
1,950,836
Hovering list items with nested divs
<p>I'm using an old jquery version, that's why live() is used below.</p> <pre><code>$('#searchresult li').live({ mouseenter: function () { $(this).addClass('active'); }, mouseleave: function () { $(this).removeClass('active'); } }); </code></pre> <p>My html stru...
jquery
[5]
4,517,437
4,517,438
Store a huge html string in a string variable
<p>I have this html string:</p> <pre><code>&lt;h1&gt;MDPI Open Access Information and Policy&lt;/h1&gt; &lt;div class="info-intro"&gt;All articles published by MDPI are made available under an open access license worldwide immediately. This means: &lt;ul&gt; </code></pre> <p>And i would like to store this in a s...
android
[4]
1,447,174
1,447,175
C++ return local object
<p>Several co-workers and I are having a debate about what happens when a local variable (allocated on the stack) is returned from a C++ method. </p> <p>The following code works in a unit test, but I believe that is only because the unit test is lucky and doesn't attempt to reuse the memory on the stack used by obj. <...
c++
[6]
1,725,626
1,725,627
How to delete files from iPhone's document directory which are older more than two days
<p>I have an App in which I record the sound files and store it in apps Document Directory.</p> <p>What I want is, it should contain only yesterday and to days older files and remove all others from the folder in iPhone app. Is there any way to do this?</p> <p>Thanks ..</p>
iphone
[8]
3,411,517
3,411,518
how to call activity from inputmethodservice and pass data to Inputmethodsevice from activity
<p>I have a soft keyboard as a inputmethodservice calling an activity. A button is pressed and a scanner is activated. The scanner activity captures a set of data then returns the data to the inputmethodservice for filling in a text field on a browser.</p> <p>How do I return the scan value of the activity back to the ...
android
[4]
409,534
409,535
Nutiteq GPS tracking
<p>iam a newbie for this kind of development. im trying to create an android application which involves GPS tracking. i am using Nutiteq because i have to use openstreetmap as the default map. please help me.</p>
android
[4]
1,069,845
1,069,846
double truncates at 7 characters of output
<pre><code>double fat = 0.2654654645486684646846865584656566554566556564654654899866223625564668186456564564664564; cout&lt;&lt;fat&lt;&lt;endl; </code></pre> <p>results in:</p> <blockquote> <p>0.265465</p> </blockquote> <p>Should it be 7 charcters longer? I thought that a double could hold more than that?</p> <...
c++
[6]
5,387,480
5,387,481
Navigating to a project document from a LinkButton
<p>I am trying to get an excel file to popup on a page in a new window when a user clicks an asp:linkbutton on a webform. I am setting it up to use the OnClick function and in the code behind I do a respond.redirect to the location of the excel file in the project. You can see this in the code below. For some reason it...
asp.net
[9]
3,138,685
3,138,686
Uploading video to Youtube from PHP driven webpage
<p>It is possible to upload a video file from my own webpage on you tube without using google. If yes how to do it?</p>
php
[2]
370,897
370,898
Need for disabling Viewstate
<p>I understand the use of View state. Any material that talks about view state, explains the need and use of it. However there is an option provided at every control level/ page level to disable it as well.</p> <p>In what circumstances we might want to disable the viewstate of a page or control? </p> <p>From an onli...
asp.net
[9]
1,219,599
1,219,600
When we go for Abstract class and when we go for Interface?
<blockquote> <p><strong>Possible Duplicates:</strong><br> <a href="http://stackoverflow.com/questions/56867/interface-vs-base-class">Interface vs Base class</a><br> <a href="http://stackoverflow.com/questions/479142/when-to-use-an-interface-instead-of-an-abstract-class-and-vice-versa">When to use an interface ins...
java
[1]
3,617,376
3,617,377
ASP.NET - Dynamically created button
<p>I have added a dynamically created button in my Webform. But its click event is not working. Can anyone please explain why?</p> <p>This is my code:</p> <pre><code> Button save = new Button(); save.ID = "btnSave"; save.Text = "Save"; save.Click += new System.EventHandler(this.Save_Click); Webform...
asp.net
[9]
2,328,070
2,328,071
Traceview maximum record time?
<p>I am using Debug.startMethodTracing and Debug.stopMethodTracing to optimize a piece of code that takes about 30 sec to execute but when I open the trace file with trace view it only shows me about 6.5 secondes of trace data. </p> <p>Any clues ?</p>
android
[4]
3,623,598
3,623,599
weird ! and space character while sending mail
<p>So here is my situation : On a godaddy server, I've got a php script which sends periodically html emails (a kind of newsletters). And for a reason I can't explain, in some of the emails I send (always at the same exact spot), a ! character appear, along with an unusual space. Here are some example : </p> <ul> <li>...
php
[2]
636,608
636,609
Difference between eval and setTimeout execute string code
<p>I know that <code>eval</code> and <code>setTimeout</code> can both accept a string as the (1 st) parameter, and I know that I'd better not use this. I'm just curious why is there a difference:</p> <pre><code>!function() { var foo = 123; eval("alert(foo)"); }(); !function() { var foo = 123; setTimeo...
javascript
[3]
1,587,118
1,587,119
ObjectFile problem
<p>I have created sample application in iphone 2.0... Now i want to make this application as object files ...</p> <p>How can i do this?</p> <p>Can anyone help me ? Thanks in advance.....</p>
iphone
[8]
2,519,498
2,519,499
Is the value of i defined after: int i, j = 1;
<p>Given:</p> <pre><code>int i, j = 1; </code></pre> <p>Is the value of <code>i</code> defined? If so, what is it?</p> <p><sup>I suspect this is a duplicate, but it's somewhat hard to search for - if anyone can find it let me know.</sup></p>
c++
[6]
2,164,114
2,164,115
Deleting line breaks in a text file with a condition
<p>I have a text file. Some of the lines in it end with lf and some end with crlf. I only need to delete lfs and leave all crlfs.</p> <p>Basically, my file looks like this</p> <blockquote> <p>Mary had a lf</p> <p>dog.crlf</p> <p>She liked her lf</p> <p>dog very much. crlf</p> </blockquote> <p>I need...
c#
[0]
1,369,865
1,369,866
jQuery write in a text input
<p>I have a form upload</p> <p>I need a jQuery function that will write in a hidden text input what is written in the input file.</p> <p>So I have :</p> <pre><code>&lt;input class="addFile" id="field2" name="fileLyric" type="file" /&gt; </code></pre> <p>Whatever will be written there by the uploading (obviously the...
jquery
[5]
5,946,060
5,946,061
Why do two regex literals in my Javascript vary on a property?
<p>I read in <em>Javascript: The Good Parts</em> by Douglas Crockford that javascript regular expression literals share the same object. If so, then how come these two regex literals vary in the <code>lastIndex</code> property?</p> <pre><code>var a = /a/g; var b = /a/g; a.lastIndex = 3; document.write(b.lastIndex);​ ...
javascript
[3]
1,074,251
1,074,252
Is it possible to access private variable of javascript function
<p>Suppose I have a JavaScript function. and it contain a variable x;</p> <pre><code>function A(){ var x = 12+34; } </code></pre> <p>Is it possible to access x from outside function x?</p>
javascript
[3]
2,771,874
2,771,875
database implementation in window based application
<p>I am new in iPhone programming. I am making an application in which there is need of database implementation to store the data. But I dont know how should I start for it. Application is window based. Please give me some hint so that I would be able to implement database concept.</p> <p>Thanks alot.</p>
iphone
[8]
2,017,366
2,017,367
Android Set up Question - Which API Level do I Install?
<p>I'm trying to set up the Android SDK on Ubuntu. Someday I want to make apps that can reach most of the market.</p> <p>I've heard I need to make the apps compatible with Android 1.6 for this. Does that mean everything I install should be for Android 1.6 (API level 4?). Will I have any trouble running the apps on ...
android
[4]
17,167
17,168
i cant pass from array in the textfields numbers
<p>Hi I have to do a lottery with numbers when I first choice in a panel when I press Start it should serve me a panel with figures given them passed to the constructor panel but while I normally displays the panel the numbers in the <code>JTextField</code> does not apper.</p> <p>The code when I press the button to ma...
java
[1]
3,183,332
3,183,333
Java Coding Style
<p>I have been programming in java for around 3 to 4 years now...but the frequent feedback am getting is that am not using methods effectively.People above me are stating that good coders do keep the lines of code within a method within 25 lines.But how much ever i struggle or try to implement more methods ...i keep wr...
java
[1]
5,022,816
5,022,817
Site structure in PHP, with examples...Please
<p>I've been reading about site structure in PHP, but whenever I read or ask questions about site structure, I get something like this</p> <pre><code> /application /config application.ini /controllers /views /models bootstrap.php /var /log /tests /controllers /views ...
php
[2]
766,613
766,614
How to extract declarations (a .hpp file) from implementation (a .cpp file)?
<p>I was wondering if there was a tool (maybe GNU C++ compiler) to obtain from a .cpp file full of functions a .hpp file with the mentioned functions declarations.</p> <p><strong>Example</strong>:</p> <p>I have:<br> magic.cpp</p> <pre><code>int foo() { return 42; } char bar() { return 'z'; } </code></pre> <p>And I ...
c++
[6]
4,238,643
4,238,644
Content Providers or Application Cache directory for storing image path
<p>i am trying to perform an action where i can access and tag images stored in the sd-card from my application based on certain actions. i would like to know the best way to temporary store the image path or the images, so that the application always remembers the set tagged images when ever it gets restarted(so the ...
android
[4]
1,879,990
1,879,991
How to give my paid app to someone for free
<p>I have an app on the app store which is a paid-for app. Is there a way of giving my app away to certain people via email for free? </p> <p>I don't mean 'gifting it' because that would cost me 30%. I mean completely free for both parties?</p>
iphone
[8]
5,087,743
5,087,744
php date ('m') is show single digit month and not double
<p>according to php.net date('m') should should 01 but i'm getting 1 instead</p> <pre><code>dirloc = date('Y') . "/" . date('m') . "/" . $word_id . "/"; </code></pre>
php
[2]
4,529,285
4,529,286
Unable to add to object prototype
<p>I have this Object Literal: </p> <pre><code>var RPSPlayer = {....} </code></pre> <p>and I want to make new "children" from this object by using:</p> <pre><code>var player1 = new Player(randomPlay); </code></pre> <p>When I try to add a function to a <code>Player</code> prototype like this:</p> <pre><code>functio...
javascript
[3]
1,494,103
1,494,104
how to properly execute if in android?
<p>Can anyone please tell why the <code>if</code> statement never gets executed even though I enter <code>ran</code> in the edit text field and press <kbd>ok</kbd>? When the user enters <code>ran</code> and presses the button <kbd>ok</kbd>, I want another button to become visible which enables him to stop the current a...
android
[4]
3,073,172
3,073,173
URL in JOptionPane
<p>How can I add a clickable URL into a JOptionPane (in the middle of a text) ?</p>
java
[1]
2,659,155
2,659,156
Mini calendar to control main calendar
<p>I am using <a href="http://arshaw.com/fullcalendar/" rel="nofollow">arshaw's fullcalendar</a> on my website - I want to have a mini version of this calendar on my admin page that I could use for admin functions. The main calendar for public viewing should have admin functionality disabled.</p> <p>What is the best w...
jquery
[5]
4,011,957
4,011,958
PHP assigment operator =&
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1768343/reference-assignment-operator-in-php">Reference assignment operator in php =&amp;</a> </p> </blockquote> <p>What does the <em>=&amp;</em> assigment operator mean in PHP? I could not find any reference in...
php
[2]
934,140
934,141
How can I ensure my c# string ends in a period?
<p>I have c# strings looking like this:</p> <pre><code>"abc"; "def."; </code></pre> <p>When I read these into another variable I need some simple way to check the last character of the string and if it's not a period then append a period to that string. </p> <p>Does anyone have any ideas of a simple way I could do t...
c#
[0]
5,591,497
5,591,498
Real World C++ library
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/777764/what-modern-c-libraries-should-be-in-my-toolbox">What modern C++ libraries should be in my toolbox?</a> </p> </blockquote> <p>I am starting to get serious into C++ development. To that end, I want to lear...
c++
[6]
3,991,094
3,991,095
How to manipulate width of multiple images in javascript
<p>I have multiple images and i wnat to place all of them in a single line.How should i manipulate the width of images such that the sum of width of al images does not exceed the browser's width.??</p>
javascript
[3]
3,895,324
3,895,325
Can I use jQuery to change the contents of links on a page?
<p>I have HTML looking like this:</p> <pre><code>&lt;div id="control"&gt; &lt;a href="/xx/x"&gt;y&lt;/a&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="/C003Q/x" class="dw"&gt;x&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/C003R/xx" class="dw"&gt;xx&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/C003S...
jquery
[5]
4,834,495
4,834,496
How to select spans that have a specific attribute in javascript
<p>I'm trying to manipulate spans that have the "email" attribute, this is my code:</p> <pre><code>var spans = document.getElementsByTagName("span"), index, node, emailAttr; for (index = 0; index &lt; spans.length; ++index) { node = spans.item(index); emailAttr = node.getAttribute("email"); if (emailAt...
javascript
[3]
5,358,479
5,358,480
indexes in a list
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/8184768/comparing-lists-python">comparing lists python</a> </p> </blockquote> <p>I have 1 original list such as:</p> <pre><code>original = [1, 2, 3] </code></pre> <p>and another list with nested lists (with th...
python
[7]
5,698,950
5,698,951
jquery find nearest class and remove it
<p>I am trying to remove <code>list_product</code> entire block if that particular <code>delete</code> class is clicked. I am very new to jquery and still learning.</p> <pre><code>&lt;div class='list_product'&gt; &lt;div class='row'&gt; &lt;div class='delete'&gt;x&lt;/div&gt; &lt;div class='title'&...
jquery
[5]
3,403,809
3,403,810
How to set the Android progressbar's height?
<p>My <code>activity_main.xml</code> is below, as you see, the height is set 40 dip. </p> <p>And in MyEclipse, it looks like below:</p> <p><img src="http://i.stack.imgur.com/evdoE.png" alt="enter image description here"></p> <p>But when I run it on my phone, it looks like below:</p> <p><img src="http://i.stack....
android
[4]
4,944,883
4,944,884
Refiring an event when dynamic html is loaded?
<p>I have div#1 that is clickable and expands another div#2. Now when div#2 loads dynamic htmlbut at the same time div#1 has dynamic text ... on first load the expand event fires, but when the dynamic data is written it re-writes div#1 and div#2 so afterwards it does not fire the expand event?</p>
jquery
[5]
4,504,540
4,504,541
How can I extract 3 random values from an array?
<p>I build my MyObject array with :</p> <pre><code> MyObject[] myObject = (from MyObject varObj in MyObjects select varObj).ToArray(); </code></pre> <p>and now, I'd like to extract 3 random MyObject from this array! How can I do it on C#?</p> <p>Of course, if array lenght is &lt;3 I nee...
c#
[0]
2,895,722
2,895,723
Jquery display block after partial page load
<p>here is my code:</p> <pre><code>$("a").live('click', function(){ history.pushState({}, '', this.href); popstate(this.href); $("#loadpage").css("display", "block"); return false; }); popstate = function(url){ url = '/ajaxlinks/ajaxlink'+window.location.pathname.substr(1); if (url == '/ajaxlinks/ajaxlink'){url = '/aj...
jquery
[5]
707,915
707,916
MyTouch android phone's menu button doesn't work
<p>I am writing an action game, but I noticed that when there are a lot of actions going on during the game, the menu button on my MyTouch phone doesn't work. I have to pause the game before the menu buttons work. </p> <p>I tried raising the priority of the activity thread by doing this:</p> <pre><code>&lt;uses-permi...
android
[4]
1,996,296
1,996,297
How can I make li background visible as well with jQuery?
<p>Javascript as below:</p> <pre><code>$(function(){ div = $("#titlelist"); ul = $('#titlelist li'); ul.css({overflow: 'hidden'}); ul.each(function(){ $(this).css({overflow: 'hidden'}); $(this).mouseenter(function(e){ $(this).css({overflow: 'visible', bac...
jquery
[5]
3,145,122
3,145,123
creating testsuite in python
<p>I have python scripts, such as a.py, b.py, c.py located in say directory A:</p> <p>I want to create test suite which will execute all those python scripts sequentially. Those scripts are no a unit test. Those are regular python scripts.</p> <p>Please let me know how do I run them in test suite and generate report ...
python
[7]
1,114,362
1,114,363
How To Zoom ImageView in Android
<p>I have an ImageView declared in main.XML . I want it to be Zoomed . How can this be done in Android?</p> <p>Thanks in Advance</p>
android
[4]
2,835,747
2,835,748
Java Script - Extract number from string
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1849149/how-might-i-extract-the-number-from-a-number-unit-of-measure-string-using-java">How might I extract the number from a number + unit of measure string using JavaScript?</a> </p> </blockquote> <p>How to ex...
javascript
[3]
1,875,284
1,875,285
jQuery - Detecting when a user clicks OUT of an input type Text Field
<p>I want to detecting when a user clicks OUT of an input type Text Field, not in.</p> <p>Here's what I have but both events are firing on click inside (focus):</p> <pre><code>&lt;input id="title" val="hello" /&gt; $("#title").focusout(function() { console.log('inside'); }).blur(function() { console.log('out...
jquery
[5]
1,466,765
1,466,766
How to sort this jQuery element to this
<p>I want to make id="a" element div to be the second div in the div.b element. And I want to how to make id="a" element div to be the last div in the div.b element. </p> <p>Here is the code:</p> <pre><code>&lt;div class='b'&gt; &lt;div&gt;a&lt;/div&gt; &lt;div&gt;a&lt;/div&gt; &lt;div id="a"&gt;I want t...
jquery
[5]
4,667,176
4,667,177
validate combobox in javascript
<p>I have written the below code. But it does not show me the alert message when I don't select the other value and click onto the submit button. I don't want to use <code>getElementbyId</code>. I am using the name attribute of the HTML.</p> <pre><code>&lt;HTML&gt; &lt;HEAD&gt; &lt;TITLE&gt;ComboBox Validation&lt;/TIT...
javascript
[3]
3,580,450
3,580,451
How to get Client IP address in PHP?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1437771/how-can-i-get-the-clients-ip-address-in-a-php-webservice">How can I get the client&rsquo;s IP address in a PHP webservice?</a> </p> </blockquote> <p>How can I get Client IP address using PHP? I want to k...
php
[2]
5,683,533
5,683,534
Get day of week in PHP with strftime()
<p>What is the most reliable way to get the day of the week?</p> <ul> <li><code>strftime("%u")</code> (1 = moonday to 7 = Sunday) </li> <li><code>strftime("%w")</code> (0 = sunday to 6 = moonday)</li> </ul>
php
[2]
1,276,157
1,276,158
why would you assign this to another variable?
<p>At the start of <a href="http://documentcloud.github.com/underscore/docs/underscore.html" rel="nofollow">the source code for underscore.js</a>, you see this:</p> <pre><code>var root = this; var previousUnderscore = root._; </code></pre> <p>So the question becomes why didnt the author just write:</p> <pre><code>v...
javascript
[3]
3,405,358
3,405,359
Get list of dictionary elements ordered by dictionary key
<p>I have a dictionary <code>d</code> for which the keys are all strings. Now when I do:</p> <pre><code>for key in d: print(d[key]) </code></pre> <p>I get the elements of <code>d</code> is some "random" order. How can I force the element of <code>d</code> to come out sorted by the lexicographical order?</p>
python
[7]
4,751,667
4,751,668
Windows 7 adb driver for arnova 10b g3
<p>I have downloaded the arnova adb driver from <a href="http://www.archos.com/support/support_tech/updates_adb.html?country=us&amp;lang=en" rel="nofollow">http://www.archos.com/support/support_tech/updates_adb.html?country=us&amp;lang=en</a></p> <p>When I select the folder it is in to update the driver for the AN10B...
android
[4]
3,861,174
3,861,175
inserting checkbox values to database
<p>I have a php form with some textbox and checkboxes which is connected to a database I want to enter all the details into the database from the form.All the textbox values are getting entered except the checkbox values.I have a single column in my table for entering the checkbox values and the column name is URLID.I ...
php
[2]
4,254,019
4,254,020
Remove ArrayList Object from Memory
<p>I have a bunch of Objects in an <code>ArrayList</code>, if I call <code>ArrayList.remove(object)</code> Do I need to do anything else to remove the object from memory? I am adding and removing objects from this list at a fairly very quick pace, so if it doesn't get removed from memory I it will start taking up space...
java
[1]
3,828,252
3,828,253
how to handle media button to stop a song?
<p>I have one service in which I am playing a song. Now I want to stop the song when i press volumn up and down button.</p> <p>i used broadcast receiver also with the following code but it doesn't help me</p> <p>if (intent.getAction().equals(Intent.ACTION_MEDIA_BUTTON)) { player.stop();<br> }</p> <p>please ...
android
[4]
464,778
464,779
creating a nested list class within python
<p>I can't figure out what I'm doing wrong. I have to create a nested list(of possible solutions to a problem), so I created a class that appends a solution to a list of existing solutions(since each solution is being calculated one at a time)</p> <p>This function works fine:</p> <pre><code>def appendList(list): ...
python
[7]
4,210,069
4,210,070
How to assign multiple selection (checkbox) to gridview in c#
<p>We need multiple selection on gridview through checkboxes, how can we do it? Give me solution for this problem in C#.</p>
c#
[0]
4,648,456
4,648,457
multiple try/except in a single function does not work
<pre><code> def creating_folder_for_csv_files(cwd): try: os.makedirs(cwd+'\\migration_data\\trade') except os.error, e: print "Could not create the destination folder for CSV files" # end of first try/except block try: os.makedirs(cwd+'\\migration_data\\voucher') exce...
python
[7]
5,614,381
5,614,382
Bitset in java 5
<p>What is usage of bitset in java?</p>
java
[1]
4,615,653
4,615,654
Reducing code redundancy in C#
<p>I'm new to tinkering with C#, and so far that's the extent of it. I'm just tinkering for a small project I have.</p> <p>The redundancy is driving me crazy, though. Writing long lists of similar code taking up line after line just doesn't sit well with me.</p> <p>I have a few tabs with checkboxes and radio buttons ...
c#
[0]
4,478,166
4,478,167
invalid pointer error when trying to return object by value
<p>I have a class, Matrix</p> <pre><code>class Matrix { private: int cols; int rows; int **matrix; public: //constructors and methods friend Matrix addandupdate(Matrix a, Matrix b); } </code></pre> <p>I have the function addandupdate defined outside as below,</p> <pre><code>Matrix addandupdate(M...
c++
[6]
3,306,864
3,306,865
Is there a way for php to make a file name match an id
<p>here is my code</p> <pre><code>&lt;div id="lara"&gt;&lt;a href="http://anywhere.com/work/lara.jpg"&gt;some crap&lt;/a&gt;&lt;/div&gt; &lt;div id="jerk"&gt;&lt;a href="http://anywhere.com/work/jerk.jpg"&gt;some crap&lt;/a&gt;&lt;/div&gt; &lt;div id="yessir"&gt;&lt;a href="http://anywhere.com/work/yessir.jpg"&gt;so...
php
[2]
2,944,773
2,944,774
How do I get the span text within the list item using jQuery?
<p>I have t he following list item:</p> <pre><code>&lt;li class="item" id="44"&gt; &lt;div class="name"&gt;Bogstadveien&lt;/div&gt; &lt;div&gt; &lt;span class="city"&gt;Oslo&lt;/span&gt;, &lt;span class="country"&gt;Norway&lt;/span&gt; &lt;/div&gt; &lt;/li&gt; </code></pre> <p>Upon clicking the list it...
jquery
[5]
337,259
337,260
jquery-ui-dialog: why does clicking on elements inside dialog spawn more dialogs?
<pre><code>$(top.document).ready(function () { $(document).click(processAction); function processAction(e){ var clicked = e.target; newDialog("You've Clicked On A Link !") function newDialog(mytitle){ var $dialog = $('&lt;div id="myunique"&gt;&lt;/div&gt;') .html("&lt;a href='http://sss.com'&g...
jquery
[5]
4,136,957
4,136,958
before closing the Application browser should prompt conformation
<p>I have a small requirement..</p> <p>if the user dint sign off or log off then he try's to close the browser IE clicking on 'X' (top right of IE or Firefox browser ) then i need to ask a conformation message like "Are you sure you want to close ?" ... I am using Master page in my application and i tried the event : ...
asp.net
[9]
4,991,055
4,991,056
How to create duplicate objects in an array
<p>I would like to copy the 3 objects in my array until there is a total of 50. How do I go about doing this?</p> <pre><code>var listings = [ { address: "123 41st St", bedrooms: 2, bathrooms: 2, image: "img/1bdrm_a.jpg" }, { address: "234 52nd St", bedrooms...
javascript
[3]
3,684,643
3,684,644
Pattern for a Singleton contaning lists
<p>I have various small lookup tables in my application where I don't want to query the database every time they are requested. So I want to only read these once when the singleton object is first requested. The only issue I can see is if a user wants to edit records in these tables, I need to reset and reload the ob...
java
[1]
2,713,402
2,713,403
JQuery, fade in background pic on click
<p>I want background images to fade in "on click" and here is what i got right now. And it´s working, but i want the images to fade-in on click...</p> <pre><code>$(document).ready(function() { //this represents window.load in javascript. //now to select the element suppose you have anchor tag &lt;a&gt; with id=clickm...
jquery
[5]
3,687,587
3,687,588
Does is_file() use include paths?
<p>If I add a path to the include_path, will the php function: is_file() then use this path to search for a filename that I pass to it?</p>
php
[2]
4,954,900
4,954,901
state at compile time not known
<p>I need a way to Parse an string into an integer value in c#. The problem is the user chosses a string from a combo box which contains strings such as "AAAAA" or "5". That means only at run time it is known if the parameter is a real string or an string which can be parsed to an integer. I tried around with reflectio...
c#
[0]
3,729,994
3,729,995
How to choose a selector based on the index position of an array using jquery
<p>I have div's set up that represent the days of a pay-period and an array that holds the employee times each day- What Im trying to do is .text the input time in the correct div for that day. The 'wt' below is the wArray.length. What am I missing? I have also tried using jquerys :nth child selector and had no luck ...
jquery
[5]
3,951,388
3,951,389
Can you call a CLR Injection into SQL Server from C++?
<p>Does anybody know if you can you call a CLR Injection into SQL Server from C++?</p>
c++
[6]
1,858,694
1,858,695
How to translate a button from its relative position to the bottom of the screen?
<p>I would like to translate a button from its relative position to the bottom of the screen.</p> <p>I am doing the TranslateAnimation using Java code.</p> <p>The following is the code snippet of what I've already did:</p> <pre><code>Display display = getWindowManager().getDefaultDisplay(); int screenHeight = displa...
android
[4]
5,609,083
5,609,084
Android: Set power of vibration
<p>I'm currently working on a project, where I'd like to use the vibrating motor situated inside the Android phone. </p> <p>I'd figured out, that setting the right permission in the manifest and getting an instance of the vibrator:</p> <pre><code>Vibrator v = (Vibrator) game.getSystemService(Context.VIBRATOR_SERVICE)...
android
[4]
5,762,292
5,762,293
How to access resource file in C#?
<p>i have add .zip file to my resource how can i access that zip file ?</p>
c#
[0]
1,640,598
1,640,599
How do I determine the owner of a process in C#?
<p>I am looking for a process by the name of "MyApp.exe" and I want to make sure I get the process that is owned by a particular user. </p> <p>I use the following code to get a list of the processes:</p> <pre><code>Process[] processes = Process.GetProcessesByName("MyApp"); </code></pre> <p>This gives me a list of pr...
c#
[0]
4,225,826
4,225,827
Context sensitive app for iPhone
<p>For something like the Notes or Reminders on the iPhone, Apple makes the app look like a yellow sheet of notepad paper, or a white sheet of notepad paper. I was wondering the basic premise on how someone goes about that. </p> <p>For the Reminders app, I'm guessing they just use that off-white color for the backgr...
iphone
[8]
3,165,034
3,165,035
Retrieving content from a bean without having to worry about returning a null?
<p>Suppose you have some content that is guaranteed to have some value. Your job is to find it when given something <code>like</code> it.</p> <p><strong>This works:</strong></p> <pre><code>public KVPair getKvpForKey(String keyValue) { KVPair kvpInThisContent = null; for (KVPair kvp : kvContent) { if ...
java
[1]
395,898
395,899
AppWidget image quality
<p>I have an image with transparency which I need to place on the AppWidget. The transparent areas look fine on Motorola Droid, but on some other devices (e.g. HTC Hero) I got a lot of ugly noise. The manual says:</p> <p>"In some cases, devices have low pixel depths that can cause visual banding and dithering issues. ...
android
[4]
5,117,821
5,117,822
How can i know the body content is outputed (then cannot use the header function)?
<p>How can i know the body content is outputed (then cannot use the header function)?</p>
php
[2]
4,119,480
4,119,481
iphone xml handing
<p>I want my app to read a XML via internet. </p> <p>Also I want to keep the previously download xml so next time I may not need to download again until certain hours is passed or whatever period of time according to settings.</p> <p>Do you recommend me to download it first and store locally before process it? Or sho...
iphone
[8]
3,553,757
3,553,758
How to draw a rotated text in a Meta file
<p>I am in need to draw a rotated text of any angle in a desired location and the image should be in emf format .so that it can be a editable text in the office documents.I need this to be done using c# or GDI commands.</p> <p>Please,if it possible post me with a sample code snippet.</p> <p>Thanks, Lokesh</p>
c#
[0]
767,384
767,385
Iphone Image Processing Image APIS
<p>I wanted to know about image processing APIs in Iphone like increasing or decreasing brightness of an image , rotating image ,scaling image etc. How can I achieve this in Iphone?</p>
iphone
[8]
4,143,971
4,143,972
Java unchecked code
<p>I write a simple class (the merit of StringPools themselves is not my question; I have specific reasons for wanting this class):</p> <pre><code>import java.lang.ref.WeakReference; import java.util.WeakHashMap; public final class StringPool { private WeakHashMap m_pool = new WeakHashMap(); public String i...
java
[1]