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 |
|---|---|---|---|---|---|
1,415,415 | 1,415,416 | How to get natural order of values? | <p>Below code is not giving me order of values .Please correct me to get order of values while printing .</p>
<pre><code>Iterator<Search> iterator = parts.iterator();
MultiHashMap pen = new MultiHashMap();
StringBuilder sb = new StringBuilder();
List list = null;
while(iterator.hasNext()) {
Search req = (Se... | java | [1] |
6,026,553 | 6,026,554 | Android programming using eclipse, | <p>I need to know how to develop database driven application, i have three tables. how to put data in database and how to report them?</p>
| android | [4] |
5,703,864 | 5,703,865 | how to get the date-time for a particular city in C#? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/55901/web-service-current-time-zone-for-a-city">Web service - current time zone for a city?</a> </p>
</blockquote>
<p>Just wondering whether there is a public web service (without reading from local machine time... | c# | [0] |
3,075,707 | 3,075,708 | How to handle the more than two images in the tableview? | <p>Iam developing one application.In that i use the 4 rows for table view.Each row contain the imageview.Every imageview canget the image from CAMERA.My problem is after getting the third image,images will be appear at different positions.ANd if u scroll the tableviewthen imageviews will got the black color.Images not ... | iphone | [8] |
1,074,444 | 1,074,445 | Getting hash tagged words from a string with PHP | <p>I am trying to create an array of all of the hash tags in a given string and then loop through them and echo each one to show that they have been stored. What could I be doing wrong?</p>
<pre><code><?php
$string= "Went for an awesome bike ride today! #biking";
preg_match_all('/#(\w+)/',$string, $matche... | php | [2] |
3,001,489 | 3,001,490 | Issue getting the height of an element | <p>I'm trying to get the height of an element with jQuery, but for some reason it always returns <code>0</code>.</p>
<p>I load content using ajax in a container. This content is hidden by default (<code>display: none</code>). Before showing the content I need to retrieve the height of an element in the new content.</p... | jquery | [5] |
4,027,691 | 4,027,692 | Failsafe looping trough array of urls | <p>How can I loop trought an array of external websites and not fail catastrophically if one of the websites doesn't respond? Consider the following psuedo code:</p>
<pre><code>$urls = array(list of urls);
foreach ($urls as $url) {
try {
$page = get_page($url);
$title = $page['title'];
catch(Exception $e... | php | [2] |
2,223,010 | 2,223,011 | <T> cannot be resolved to a type | <p>I want to change the return type of this method to a class (<code>ReturnContainer</code>) that can hold the <code>tupelo</code> object in addition to another return value that I need to send back to the calling method.</p>
<p>I've never worked with this <code><T></code> concept in Java before so I don't how t... | java | [1] |
2,539,339 | 2,539,340 | jQuery assign css class to divs in loop | <p>I have these html structure here,</p>
<pre><code><div class="myCaption">
<h2>caption 1</h2>
<h2>caption 2</h2>
<h2>caption 3</h2>
<h2>caption 4</h2>
<h2>caption 5</h2>
</div>
</code></pre>
<p>I wonder how to use jquery to add a Class "act... | jquery | [5] |
581,835 | 581,836 | Cutting a string with regular expression | <p>I have a string containing some tags in it.</p>
<p>Example: <strong>asp.net vb6 crystal-reports</strong></p>
<p>I use a regular expression to cut this string into several tags like below:</p>
<pre><code>string[] technos = Regex.Split(technoString, @"\W+");
foreach (var techno in technos)
{
...
}
</code></pr... | c# | [0] |
335,556 | 335,557 | Return a random word from a word list in python | <p>I would like to retrieve a random word from a file using python, but I do not believe my following method is best or efficient. Please assist.</p>
<pre><code>import fileinput
import _random
file = [line for line in fileinput.input("/etc/dictionaries-common/words")]
rand = _random.Random()
print file[int(rand.random... | python | [7] |
2,652,024 | 2,652,025 | What ever happened to Java and Sun? | <p>What happened to Java and Sun? The community surrounding them had some of my favorite tools and software to develop with. The Java platform anyway, still looked like it had some promise to it: Groovy and Grails. Why does all of this seem to be going the way of the dodo lately?</p>
<p>(Yes, I know their stock price... | java | [1] |
623,185 | 623,186 | How to call functions/methods inside objects in python | <p>Here is my code.</p>
<p>How do I execute the print_point line? <strong>Edited to work. Thank you</strong></p>
<pre><code>class Point:
def __init__(self, x=0, y=0):
self.x = x
self.y = y
def distance_from_origin(self):
return ((self.x **2) + (self.y **2)) **.5
def print_point(p)... | python | [7] |
2,674,199 | 2,674,200 | prompt cancel button not working | <p>function name
I have give </p>
<pre><code>var name != " " || var name!= null
{
go
}
}
</code></pre>
<p>cancel is posting to next page.I should stop it.</p>
| javascript | [3] |
5,585,884 | 5,585,885 | .toggleClass not working with .live | <p>I'm trying to get a .toggleClass working on a form that I have multiple text/inputs in but its not working the way I'd like. I want all the input[type="text"] fields on the page to have this functionality. Some fields are static and some are added with .append and .live those are not working right. Basically I want ... | jquery | [5] |
2,239,301 | 2,239,302 | Incorrect Device API version in android | <p>I am new to android. In my application I tried to call a SOAP web service, but when I run the project it says: Required API is 9,but Device API is 8.</p>
<p>What can I do for that. </p>
| android | [4] |
5,865,493 | 5,865,494 | Method signature through call stack introspection | <p>Is there any way of finding the signature of a called method through call stack introspection. Do we have any alternatives for finding out the same. I do not have the source code and have only bytecode files</p>
<p>Thanks in advance. </p>
| java | [1] |
91,343 | 91,344 | How to create grid button on iphone. 10/10 matrix | <p>How to create Grid of Buttons on iphone.
10/10 matrix...</p>
<p>I found NSMatrix for MAC ... Not for iphone...</p>
<p>any alternative way to create grid of button on my view.</p>
<p>@Thanks in advance.</p>
| iphone | [8] |
5,083,488 | 5,083,489 | Android package replace intent | <p>In my application I am listening for following 3 intents by using broadcast receiver.</p>
<pre><code>ACTION_PACKAGE_REPLACED
ACTION_PACKAGE_REMOVED
ACTION_PACKAGE_ADDED
</code></pre>
<p>The problem is that whenever I reinstall some application First I get
<code>ACTION_PACKAGE_REMOVED</code> then I get <code>ACTIO... | android | [4] |
6,023,239 | 6,023,240 | SQLite+Android book | <p>I've been looking around for some examples to explain SQLite in android. I failed to create a simple application called find a doctor, where you search for a doctor then you get the result back with doctors' name and address. </p>
<p>Well, does any of you guys know a good book that take you through handling SQLite ... | android | [4] |
5,334,763 | 5,334,764 | Split long text into string array | <p>I need a method to split a string into an array of smaller strings, spliting it by word count. It is, I'm looking for a function like that:</p>
<pre><code>function cut(long_string, number_of_words) { ... }
var str = "word1 word2 word3 word4 word5 word6 word7 word8 word9 word10 word11 word12";
var arr = cut(str, 3)... | javascript | [3] |
718,846 | 718,847 | When defining a derived class, why is the base class marked "public?" | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/860339/difference-between-private-public-and-protected-inheritance-in-c">Difference between private, public and protected inheritance in C++</a> </p>
</blockquote>
<p>One of the examples in my lecture notes is</... | c++ | [6] |
5,025,332 | 5,025,333 | How Can I access the first result? | <pre><code> $tmp = mysql_query("SELECT commercial FROM Channels WHERE name='".mysql_real_escape_string($_POST['name'])."'");
while( $row = mysql_fetch_assoc($tmp))
{
echo $row['commercial'];
}
</code></pre>
<p>I only want to access the first element.
not in a while loop</p>
| php | [2] |
5,560,859 | 5,560,860 | How to recognize any four ints in Python | <p>I am trying to scrape a series of websites that look like the following three examples:</p>
<pre><code>www.examplescraper.com/fghxbvn/17901234.html
www.examplescraper.com/fghxbvn/17911102.html
www.examplescraper.com/fghxbvn/17921823.html
</code></pre>
<p>Please, keep in mind that there are 200 of these websites an... | python | [7] |
2,805,978 | 2,805,979 | Why are there so many string classes in the face of std::string? | <p>It seems to me that many bigger C++ libraries end up creating their own string type. In the client code you either have to use the one from the library (<code>QString</code>, <code>CString</code>, <code>fbstring</code> etc., I'm sure anyone can name a few) or keep converting between the standard type and the one the... | c++ | [6] |
2,057,139 | 2,057,140 | I want to print any text without using Print function in java? | <p>I want to print any text without using system.out.println() in java? It is possible If yes
then how; Any idea.</p>
| java | [1] |
444,758 | 444,759 | jQuery Object Not able to find the class | <p>I am not sure why but jQuery find function is not able to find the class using the class name. </p>
<p>Here is the result from Visual Studio immediate window which shows that there is a class called TBLCONTENTS but when searched using the find method it returns nothing.</p>
<pre><code>optionRows[0].className
"TBLC... | jquery | [5] |
4,110,679 | 4,110,680 | Is it possible to bind more than one column to a DropDownList's DataTextField? | <p>The following is my code...</p>
<p><strong>DropDownList2.DataSource = td.DataSet
DropDownList2.DataSource = td
DropDownList2.DataTextField = td.Columns("Name").ColumnName.ToString
DropDownList2.DataValueField = td.Columns("VendorCode").ColumnName.ToString
DropDownList2.DataBind()</strong></p>
<p>Now I have a requi... | asp.net | [9] |
2,132,865 | 2,132,866 | Gallery of TextViews, using styles etc | <p>I want to use <code>Gallery</code> as a horizontal menu so I've taken the code for the <a href="http://developer.android.com/resources/tutorials/views/hello-gallery.html" rel="nofollow">Gallery tutorial</a> to use <code>TextView</code>s instead of <code>ImageViews</code> by using a <code>String[]</code> and changing... | android | [4] |
2,588,516 | 2,588,517 | How do I generate a random number within my javascript code? | <p>I'm using some 3rd party javascript to generate a slideshows within each of the posts on a blog. Each slideshow must have a unique ID to work properly. I figured the easiest way to do this would be to generate a large random number for each slideshow when it's loaded on the page.</p>
<p>Below is a snippet of the ... | javascript | [3] |
480,762 | 480,763 | PHP crop image from base64_decode | <p>i am generating a screen grab jpg using html2canvas from this code. However i cant target a particaular div so i am grabbing the entire screen.</p>
<pre><code>$canvasImg = $_POST['img'];
$data = base64_decode($canvasImg);
$File = "z.jpg";
$Handle = fopen($File, 'w');
fwrite($Handle, $data);
fclose($Handle);
</co... | php | [2] |
2,382,766 | 2,382,767 | NSScanner, reaching the end of parsing string | <p>I have a string that's like</p>
<p>"Condition: <strong><em>some text which can have a comma in it but not always</em></strong>, Type <em><code>more text</code></em> Product: <strong><em>more text, can be NULL sometimes</em></strong></p>
<p>What I did was:</p>
<pre><code>NSString *condition = @"Condition:";
NSStri... | iphone | [8] |
3,576,310 | 3,576,311 | get the Bitmap from ImageView in a ListView | <p>I have a <code>ListActivity</code> that displays two pieces of information in each line of the list (one image sett in an <code>ImageView</code> and a text description set in a <code>TextView</code>). These information I get through a XML file from a download. Every thing works fine!!!!! :-).</p>
<p>On <code>OnList... | android | [4] |
2,480,116 | 2,480,117 | Select all li's but not children | <p>I have this code:</p>
<pre><code>$li = $("li", this)
</code></pre>
<p>Which is selecting all of the <code>li</code>'s in my code. This works fine however I want <code>$li</code> to exclude the <code>li</code>'s that are within a submenu.</p>
<pre><code> <ul id="navigation">
<li><a href="... | jquery | [5] |
933,418 | 933,419 | Difference Between Javascript Wrapping Methods | <p>It is generally accepted that Javascript code should be wrapped in a function to prevent leaking to the global scope and just assign whatever you need outside of each function to the <code>head</code> object (<code>window</code> in web browsers).</p>
<p>I've seen two primary methods of this in the wild:</p>
<p><st... | javascript | [3] |
293,110 | 293,111 | how to get all objects of a given type in javascript | <p>I want to retrieve all objects (not DOM elements) of a given type created with the "new" keyword.</p>
<p>Is it possible ?</p>
<pre><code>function foo(name)
{
this.name = name;
}
var obj = new foo();
</code></pre>
<p>How can I retrieve a reference to all the foo objects ?</p>
| javascript | [3] |
2,765,186 | 2,765,187 | When should I define my own copy ctor and assignment operator | <p>I am reading effective C++ in Item 5, it mentioned two cases in which I must define the copy assignment operator myself. The case is a class which contain const and reference members. </p>
<p>I am writing to ask what's the general rule or case in which I must define my own copy constructor and assignment operator?<... | c++ | [6] |
1,190,183 | 1,190,184 | Another way to compile java without servlet-api | <p>Up to this point I used the Tomcat installation that comes with servlet-api.jar to compile my java files. Is there another way to compile it? Simply using the JDK?</p>
| java | [1] |
4,516,427 | 4,516,428 | How to copy an add on of android sdk to android android sdk | <p>Can anyone tell me the steps to copy an installed add on in android sdk to android android sdk.</p>
<p>My problem is now that add on is not available in google now(this is pretty old sdk).</p>
<p>Now I want to copy this add on to new sdk so that while creating new android project, it will ask to create project bas... | android | [4] |
298,137 | 298,138 | How to loop my data for PHP | <p>I have some data which was json decoded and looks like this:</p>
<pre><code>stdClass Object
(
[6] => stdClass Object
(
[13] => stdClass Object
(
[buildingId] => 1
)
)
[8] => stdClass Object
(
[2... | php | [2] |
4,337,991 | 4,337,992 | Counting number of characters in a file C# | <p>How do you count the number of characters in a file using C#?</p>
| c# | [0] |
3,988,324 | 3,988,325 | Where is the jQuery API on `$.`? | <p>I saw this somewhere,</p>
<p>For example there is the <code>each</code> function to iterate over objects and arrays:</p>
<pre><code>$($arr).each(
function(idx)
{
//do stuff
}
);
</code></pre>
<p>But then there is the format $.each($arr, function);</p>
<p>What is this "<code>$.</code>"? Does it have a na... | jquery | [5] |
2,562,574 | 2,562,575 | Can I use JQuery Slidshow in my Commercial Project | <p>I would like to use <a href="http://caroufredsel.frebsite.nl/" rel="nofollow">http://caroufredsel.frebsite.nl/</a> this jquery gallery in my commercial project. It is under MIT licence, I already searched about this licence on net but am still confusing whether we can use this or not... anyone please help me out... ... | jquery | [5] |
3,848,429 | 3,848,430 | c# read attribute value | <p>ich have a xml file with the following structure:</p>
<pre><code><layer1 name="this is layer1">
<messages>
<message name ="com_request">0</message>
<message name="send">1</message>
<message name="request">2</message>
</messages>
</layer1>
<... | c# | [0] |
3,097,411 | 3,097,412 | Change event is not working in this scenario | <pre><code><table>
<tr>
<td><input type='checkbox'><span>Text1</span><input type='text'></td>
</tr>
<tr>
<td><input type='checkbox'><span>Text2</span></td>
</tr>
<tr>
<td><input type='checkbox'><span>... | jquery | [5] |
3,628,385 | 3,628,386 | How to test executable JAR? | <p>I have a simple class in executable JAR file:</p>
<pre><code>public final class Main {
public static void main(String[] args) {
System.out.println("hello, world!");
System.exit(-1);
}
}
</code></pre>
<p>Now I'm trying to test this class/method:</p>
<pre><code>public class MainTest {
@Test public voi... | java | [1] |
2,438,929 | 2,438,930 | Android LivePerson Agent? | <p>Is there a liveperson agent for android? Specificly one which pushes notifications to your phone when people request a chat.</p>
| android | [4] |
4,150,992 | 4,150,993 | How do I clear a String local to a method? My text gets appended everytime the method is run | <p>I have a local String in a method like so:</p>
<pre><code>String jString = new String();
</code></pre>
<p>or</p>
<pre><code>String jString = "";
</code></pre>
<p>The result is the same.</p>
<p>Later in the method I append:</p>
<pre><code>for(int i = 0; i != someArrayList.size(); ++i) {
jString += someArray... | java | [1] |
4,930,604 | 4,930,605 | Easiest way to convert array into xml string? | <p>So I'm trying to convert an array to an XML document (just outputting it as a string). I know php has <code>json_encode</code> built in and it works fine, but I can't seem to find any good XML equivalents.</p>
<p>Basically, the array is the result of a <code>PDOStatement->fetchAll();</code> </p>
<p>I'd like the... | php | [2] |
5,345,457 | 5,345,458 | Creating count-down application for desktop background c# | <p>I would like to write a small application which will be a countdown application, it's basically should have no frame and no background - just a counts the time from now to a date set in app.config.</p>
<p>I know how to write the countdown itself. My problem is that I don't know which kind of application can have no... | c# | [0] |
2,407,772 | 2,407,773 | What is causing this behavior, in our C# DateTime type? | <pre><code>[Test]
public void Sadness()
{
var dateTime = DateTime.UtcNow;
Assert.That(dateTime, Is.EqualTo(DateTime.Parse(dateTime.ToString())));
}
</code></pre>
<p>Failed :</p>
<pre><code> Expected: 2011-10-31 06:12:44.000
But was: 2011-10-31 06:12:44.350
</code></pre>
<p>I wish to know what is happening be... | c# | [0] |
993,160 | 993,161 | difference between object code and embeded code? | <p>i have a doubt difference between object code and embeded code .
thank you.</p>
| asp.net | [9] |
4,529,439 | 4,529,440 | List_view getting items back | <p>I have 3 different function in an activity namely , main category,sub_category and list of items. By clicking main category it displays sub_category and same like list of item.I want to give back option, in order to view back functions. for example at the time of viewing list_of item by clicking back option, i want ... | android | [4] |
305,126 | 305,127 | finding substring c++ | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/236129/how-to-split-a-string">How to split a string?</a> </p>
</blockquote>
<p>Hi,</p>
<p>I have a string say "1,0,1", how can i get the substring separated by comma operator.</p>
| c++ | [6] |
4,933,214 | 4,933,215 | C# elegant way to check if a property's property is null | <p>In C#, say that you want to pull a value off of PropertyC in this example and ObjectA, PropertyA and PropertyB can all be null.</p>
<p>ObjectA.PropertyA.PropertyB.PropertyC</p>
<p>How can I get PropertyC safely with the least amount of code?</p>
<p>Right now I would check:</p>
<pre><code>if(ObjectA != null &... | c# | [0] |
4,820,530 | 4,820,531 | how to get raw folder uri path and save in internal memory in android? | <p>here my code.where is my errors errors.the errors is file not found exception.</p>
<pre><code>Uri video = Uri.parse("android.resource://com.ring.app/raw/"+a[i]+".mp3");
file= new File(video.toString());
try
{
inputStream= new FileInputStream(file);
fos = super.openFileOutput("output"+i+".mp3", MODE_WORLD_READABLE... | android | [4] |
4,897,958 | 4,897,959 | cancel load page in javascript | <p>I define a link <a href="http://www.example.com">Hello</a>.when i click this link javascript should check the link is exist/valid.if true,the page should be load or the page should resirect to another page.i am using javascript ajax to check the page exist/not.i am using the condition xmlhttp.status == 2... | javascript | [3] |
5,646,933 | 5,646,934 | typedef synonymous substitution | <p>My understanding is typedef acts as a synonym for a type, or can be used as an alias for a particular type. Also, the simplified codes below built perfectly. The question here is if I change the second line in the main function to :</p>
<pre><code>Array<int>::ArrayIter<T> pa = a.begin(); // substituti... | c++ | [6] |
1,962,467 | 1,962,468 | Is there is reliable way to find out which revision of ECMA-262 my browser supports? | <p>How do I find out if my browser supports Javascript 1.5 or not? using javascript of course. (or should I have googled or binged some more?)</p>
| javascript | [3] |
2,449,447 | 2,449,448 | Problem in login page in asp.net | <p>I have created a login page. In this page i used div tag which is mapped with images for good design purposes. i have enabled the forms authentication in web.config. </p>
<p>So finally images i mapped in div is not appearing in the login page.
please help me!</p>
| asp.net | [9] |
5,584,338 | 5,584,339 | How do I inherit a variable with prototype? | <p>I'm just setting up a little framework for my canvas, I haven't used Prototype a lot, but it seems to be pretty damn awesome, just having one little problem, the <code>create</code> function is not inheriting the width and height from the <code>new</code> function, how might I do this? Code:</p>
<pre><code>function... | javascript | [3] |
3,486,955 | 3,486,956 | document.writeln doesn't write to a new line | <p>I was just writing some simple code and I noticed that using document.writeln doesn't write to a new line, permit me to demonstrate...</p>
<pre><code> // this is my JSON object
var myObject = {
"firstName": "John",
"lastName": "Smith",
"age": 25,
"address": [{
"Address1": "11 My Street",
"Address2" :... | javascript | [3] |
132,439 | 132,440 | Javascript: alert checking for mouseover and mouseout firing multiple times | <p>Writing a code that does the following:</p>
<ol>
<li>Adds a mouse listener to a web-page on load</li>
<li>Checks what element the mouse is positioned over</li>
<li>If the mouse is positioned over an anchor tag then execute a certain functionality if it stays there for a certain period of time before leaving. For no... | javascript | [3] |
1,618,856 | 1,618,857 | PHP error message: call to undefined function | <p>(Disclaimer) MY php experience is approx 2 hours old and I have know idea what I am doing. </p>
<p>This is my error and I am wondering how do you know where the error is, for example.</p>
<p>as rendered in my browser, this is my error.</p>
<pre><code>Fatal error: Call to undefined function array_key_exist() in
... | php | [2] |
2,453,293 | 2,453,294 | can user see session information | <p>If I start a session with php , can user see session vars with cookies ?</p>
<p>I want to keep some settings of user infrmation in a session , but I do not want user know them .</p>
<p>thanks.</p>
| php | [2] |
803,114 | 803,115 | Accessing method from another class | <p>I have a simple button which will open up the <code>AddStation</code> form (this button is placed on the <code>MainForm</code> form):</p>
<pre><code>var AddStation = new AddStation();
AddStation.Show();
</code></pre>
<p>It shows the form fine, however the form <code>AddStation</code> has a save button. When this b... | c# | [0] |
2,672,774 | 2,672,775 | How can I convert a byte array to a bitmap and stream the images through a web server? | <p>The project I am working on is capturing a frame from a security camera, with the help of <a href="http://en.wikipedia.org/wiki/Arduino" rel="nofollow">Arduino</a> UNO and <a href="http://nootropicdesign.com/ve/" rel="nofollow">Video Experimenter shield</a>. Then I am sending the frame as byte arrays through a seria... | java | [1] |
3,978,932 | 3,978,933 | Modify all img src tags in a particular way | <p>I want to use <a href="http://phpthumb.sourceforge.net/" rel="nofollow">phpThumb</a> to resize all images in the content divs of my pages when they are served up to mobile devices.</p>
<p>So in my page templates for mobile devices I need to change all <code><img></code> tags in <code><div id="content></... | php | [2] |
4,109,022 | 4,109,023 | What is wrong with next jQuery code? | <p>can you help me why it returns error.</p>
<p>part of code /publications/deleteItem/' + valueClicked works ok, i checked (proper item is properly deleted). </p>
<pre><code>var valueClicked = 123456;
$.ajax({
type: "post",
url: '/publications/deleteItem/' + valueClicked, // 100% works!
success: function(... | jquery | [5] |
4,254,170 | 4,254,171 | Append tag at the place of an Event | <p>I have a Ul like this</p>
<pre><code><ul class="fine">
<li>One</li>
<li>Two</li>
<li>Three</li>
</ul>
</code></pre>
<p>On clicking Li i want to add an <code><textarea></code> under that corresponding li
like this</p>
<pre><code><li>One</li>
<li&... | jquery | [5] |
46,468 | 46,469 | Processing files with C# in folders whose names contain spaces | <p>There are plenty of C# samples that show how to manipulate files and directories but they inevitably use folder paths that contain no spaces. In the real world I need to be able to process files in folders with names that contain spaces. I have written the code below which shows how I have solved the problem. Howeve... | c# | [0] |
868,606 | 868,607 | Better way to output days of the week between other functions | <p>I am new to c++. What is a better way to do this? I am trying to output the days of the week and also put functions between the days. I want to output Monday separate from outputting the other days of the week.</p>
<pre><code>#include <iostream>
#include <string>
#include <ctime>
using namespac... | c++ | [6] |
954,847 | 954,848 | Do machine.config/web.config in .NET Framework 3.0/3.5 and .NET Framewor 1.1/1.0 cascade? | <p>I made a change in my machine.config for a 1.1 application and then later I upgraded the application to .Net Framework 3.0/3.5. Will that configuration change still apply or do I have to make that change in my local web.config for the 2.0 machine.config/web.config? Thank you in advance.</p>
| asp.net | [9] |
1,124,893 | 1,124,894 | Custom method to native event object. | <p>For quite some time I think that it is possible to add custom method to native Event object. How do you think? I have not found a way. I would be grateful for any opinions and recommendations.</p>
<p>Best regards. </p>
| javascript | [3] |
2,481,517 | 2,481,518 | python and assigning variable values in if statements | <p>I'm somewhat of a beginner in python and I swear I got a very similar program to what I'm doing right now to work. But, for some reason, I can't make it work. I was able to pinpoint my problem and created a fake program to play around with it. Here is what the program:</p>
<pre><code>global heading
global heading2
... | python | [7] |
4,935,145 | 4,935,146 | xEditable wysihtml5 giving unexpected text area | <p>I use xEditable (bootstrap) to allow me to edit text on pages. In my HTML code I have the following:</p>
<pre><code><span id="1" class="xEditableManyToOne" data-pk="1" data-type="wysihtml5"
data-name="desc" data-url="/POST">
</code></pre>
<p>It should give a formatted editable area, but I just get the stan... | javascript | [3] |
4,807,249 | 4,807,250 | extend click event for plugins? | <p>is it possible to extend normal events for plugins in a general way?</p>
<p>e.g.
say i have a plugin A which does stuff and react to the click event on an element
i would now to perform some actions when that element is clicked, and AFTER i have done my stuff i want the plugin to do whatever it does onlick.</p>
<p... | jquery | [5] |
2,381,924 | 2,381,925 | How to extract number and String in java | <p>i want to extract number and add these numbers using Java and String remain same.</p>
<p>String as-</p>
<pre><code>String msg="1,2,hello,world,3,4";
</code></pre>
<p>output should come like- 10,hello,world</p>
<p>Thanks</p>
| java | [1] |
299,734 | 299,735 | Looped function calling not looping correctly! (C++) | <p>I am doing a homework for my Systems Programming course.
I have to implement a University simulation.
I have a Course abstract class, and child class of it ComputerScienceCourse (and a bunch of other child classes that don't affect what I'm going to ask).
and I have a Student abstract class, and child class of it Co... | c++ | [6] |
2,942,046 | 2,942,047 | How to save image in photo album? | <p>I am using GLImageProcessing sample code.I want to save modified image in photo album how it possible.please help me.</p>
| iphone | [8] |
4,326,840 | 4,326,841 | I/O Relative Paths | <p>I'm having a problem with relative paths in my program. The absolute path to the file which I want to use is:</p>
<pre><code>C:\Users\User\Documents\Projects\Project1\src\files\test.txt
</code></pre>
<p>Now, I'm unsure of how to make this a relative path, I've tried:</p>
<pre><code>.\files\test.txt
</code></pre>
... | java | [1] |
1,126,324 | 1,126,325 | Is there a better way to declare an object | <p>Currently I check if sed object already exists as to not wipe it if it does, then create the object.</p>
<pre><code>if (typeof result === 'undefined') {
results = {};
}
</code></pre>
<p>It's just that I come from using PHP where you don't really have to declare things as much as you do in JS.</p>
<p>Though I ... | javascript | [3] |
4,585,612 | 4,585,613 | PHP - Cleaning Rich Text Area Input | <p>I am using a rich text box in my application and am looking at ways to clean the input before storing it in a database. Because I want to allow some HTML through I was thinking of using strip_tags with the allowed tags specified, something like this:</p>
<pre><code>public function cleanRichInput($text)
{
return... | php | [2] |
1,438,106 | 1,438,107 | ArrayList cast to PriorityQueue + java | <p>I am having this problem that I had used Arraylist in my entire program up till now and now I need its functioning to be that of priority queue too.</p>
<p>So I did the obvious that seemed to me and casted it like <code>PriorityQueue z = (PriorityQueue) x</code>
where x was arraylist.</p>
<p>At runtime this gave ... | java | [1] |
4,534,739 | 4,534,740 | .before()/.after() element without it closing automaticly | <p>This is what I'm trying to do.</p>
<p>I am calling on a xml file and creating alto of div around the content from the file. What I want to do is to add a div around every 15 div. The divs have the class "item". The items are enclosed in a div called "container".</p>
<p>I first try to add a open <code><div></... | jquery | [5] |
4,930,138 | 4,930,139 | Generating random test cases | <p>I am working on a library and need to test it. There are several operations (as functions) defined in my class which can be called in any order by the client.</p>
<pre><code>Operation1(param1, param2)
Operation2(param3)
.
.
.
OperationN(paramX, paramY, paramZ)
</code></pre>
<p>param1, param2 etc are integers/doubl... | java | [1] |
5,153,606 | 5,153,607 | Script randomly cuts off | <p>I've made a VERY basic website which takes an array of image URLs, zips them, and returns the zip location. The problem is that the script cuts off at some point.</p>
<p>One of the following usually happens:</p>
<ul>
<li>not all the pictures are copied</li>
<li>not all pictures are copied and the last picture has ... | php | [2] |
5,714,218 | 5,714,219 | Ping in ASP.NET | <p>I can ping using console app, but I want to ping from ASP.NET, the problem is that, ping object doesn't show ping.send(....).
Is it not possible to ping from ASP.NET Web App?</p>
<p>for image please visit : <a href="http://coscientech.blogspot.com/2010/09/ping-trouble-aspnet.html" rel="nofollow">http://coscientech.... | asp.net | [9] |
1,040,569 | 1,040,570 | How to examine SharedPreferences from adb shell? | <p>Now that we can <a href="http://developer.android.com/guide/developing/tools/adb.html#sqlite">Examining sqlite3 Databases from a Remote Shell</a>, is it possible to examine SharedPreferences from adb shell? Since it would be much more convenient to examine and manipulate SharedPreferences from command line when debu... | android | [4] |
3,867,776 | 3,867,777 | Save contact to app database CursorIndexOutOfBoundsException | <p>In this code I keep getting an error, I know its how I'm saving the contact to the database. because if I take out the cdata/cdata2 and just put a string it works fine. Any help will be appreciated.</p>
<p>How do I convert this to accept the string from the contact?</p>
<pre><code>switch (item.getItemId()) {
... | android | [4] |
5,194,707 | 5,194,708 | Login encrypt password to compare | <p>Updated code still not working?</p>
<pre><code><?php
$host="localhost";
$username="root";
$password="power1";
$db_name="members";
$tbl_name="users";
string sha1 ( string $Password [, bool $raw_output = false ] )
$link = mysql_connect("$host", "$username", "$password")or die("cannot connect. Please conta... | php | [2] |
4,822,347 | 4,822,348 | Navigation bar common to all activities | <p>I have been looking for options on how to place <strong>Navigation bar</strong> common to all activities. Still can't figure out the best way to do it. The Navigation bar should have a title for screen and a back button. Or may be two in some activities.<br>
What is the best practice I should follow?</p>
<p>Thanks<... | android | [4] |
3,261,990 | 3,261,991 | Find Replace a Function in JQuery | <p>I have a HTML page where there are many <code><a onclick="javascript></code></p>
<p>What i need to do using Jquery is find the below tag as it is </p>
<p><code><a onclick="javascript:OpenNewWindow('/help_options.php?ID=2', 350, 250);" href="javascript:void(0);"></code></p>
<p>and replace it with </p>
... | jquery | [5] |
2,111,938 | 2,111,939 | can an child class access parent class property data? | <p>I have a child class extending a parent class.</p>
<p>In my parent class have a protected property that stores config data. In the parent class this property has all the configuration files needed.</p>
<p>But in the child class I cannot access that data. How can I bring over the config property data into the child... | php | [2] |
2,370,121 | 2,370,122 | Update Datatable and DatagridView with database Changes by Timer | <p>Scenario : i have a database table that is being updated frequently by some services.</p>
<p>I have a c# Winforms Application that load this table in a datagridview by binding a datatable as Datasource, then i whant to add a Timer that every 10 seconds update a the content of a datatable with the last changes in th... | c# | [0] |
3,899,704 | 3,899,705 | Structuring a combination of 'functions' in a cohesive manner | <p>My application needs to use a bunch of variations of the code below. There are roughly six or seven variations of the code below, but I'm having trouble organizing them.<br>
At first, I created a class and separated them into functions but for some reason all of the functions stopped working. Just glancing over the ... | php | [2] |
4,584,368 | 4,584,369 | Trigger a loaded page's ready state | <p>With JQuery I am trying to load a page in another, and have the ready state of that loaded page be triggered.</p>
<p><strong>Page1.html</strong></p>
<pre><code>$(document).ready(function() {
$("#content").load("Slides/page2.html");
});
</code></pre>
<p><strong>Page2.html</strong></p>
<pre><code>$(document).r... | jquery | [5] |
5,837,692 | 5,837,693 | How to reset textbox values in dialog after destroy? | <p>I have a dialog in which there are 2 textboxes. I want to reset the textboxes values once the dialog is destroyed. How can I do that?</p>
<p>If I have entered values in the textboxes and clicked cancel, reopening the dialog will show the data entered previously.</p>
<pre><code>function setDialogWindows($element) ... | jquery | [5] |
5,871,647 | 5,871,648 | Is there a popular C++ service framework? | <p>... like Remoting or WCF in C# or Java RMI?</p>
<p>I am learning c++ and need a simple to use tcp service framework with built in binary serialization for c++ to c++ communication. </p>
<p>Thanks</p>
| c++ | [6] |
3,534,091 | 3,534,092 | Rock Paper Scissors Java game | <p>I am writing a Rock Paper Scissors Java game. Here is the code:</p>
<pre><code>import java.util.Scanner;
public class RPS {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String personPlay; //Player A -- "R", "P",... | java | [1] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.