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,561,910 | 1,561,911 | How to work with TranslateAnimation in android? | <p>I have moved the button from left to right using TranslateAnimation but after that button click listiner is not working for new location . </p>
| android | [4] |
5,368,720 | 5,368,721 | question related to Autorotation | <p>hi when i delete the application and then on first page if i rotate from portrait landscape then it rotates but on second time it not
why?</p>
| iphone | [8] |
3,478,254 | 3,478,255 | private constructor usage in class | <p>If there is a private constructor, does the JVM insert a call to the super constructor? </p>
<p>I'm referring to the <code>super()</code> call in that private constructor.</p>
<pre><code>class Alpha {
static String s="";
protected Alpha(){
s+="alpha";
}
}
class SubAlpha extends Alpha{
pri... | java | [1] |
3,310,090 | 3,310,091 | number logic program needed for id generation | <p>program to output <strong>all 4 digit numbers</strong> where no prior digit is greater than latter.</p>
<p>Numbers should be 1-9(including 1 & 9).</p>
<p>Numbers can be like 1234,2345. First digit should be less than second, second should be less than third, third should be less than fourth.</p>
| php | [2] |
3,744,401 | 3,744,402 | layout margin for text view programmatically | <p>If I use xml file I have a option called layout_margin (for example layout_margin ="1dp" for text view ) but I want to set programmatically and I dont know how to do it.</p>
| android | [4] |
2,007,356 | 2,007,357 | using printrand within a url? | <p>is there any way to use printrand() or something similar to generate random numbers from inside of a url call in a php script or html page? Basically, have a url, but on each load, I need the page to call url(dot)com/blah####blah with the #s being random each time.... How can I accomplish this?</p>
| php | [2] |
2,199,335 | 2,199,336 | Jquery plugin scope question (closures) | <p>I'm trying to make a plugin and am running into some problems:</p>
<pre><code>(function($){
var users = {};
$.fn.plugin = function(){
//blah, but alters users
}
$.fn.utility_function = function(){
// uses users
}
});
</code></pre>
<p>What's happening is that when I run two inst... | jquery | [5] |
2,523,058 | 2,523,059 | Android ftp download failure from HTC to Samsung | <p>i had uploaded .3gp videofile from HTC legent using FTP and download it in samsung but the download file shows unsupported.But when use same mobile for upload and download it works fine.can any one help me?</p>
| android | [4] |
4,833,164 | 4,833,165 | extract left of the question mark | <p>Is there a quick way to grab everything left of the question mark?</p>
<pre><code>http://blah/blah/?blah
to
http://blah/blah/
</code></pre>
| c# | [0] |
3,444,592 | 3,444,593 | Finding Device width | <p>How to find the device width using the view port meta tag. </p>
<p>Also wants to display the device width in the console with </p>
<p>java script.</p>
| javascript | [3] |
4,933,361 | 4,933,362 | Getting the Variables of a function listed in the construct? | <p>I'm not an amazing developer so please bear with me, but I've begun using classes and functions, and I really like how I can write a library. A single page where all my PHP can go. I was thinking though, my life would be a millon times easier if I could check the variables of a function in the construct, and escape ... | php | [2] |
1,739,257 | 1,739,258 | Most efficient way to obtain data from a list of objects? | <p>I have a list of objects like this (created from PHP then json encoded):</p>
<pre><code>{"10":{"10":["4","7","2","2","0","32"],"11":["5","22","1","1","0","0"]}}
translated:
{"X":{"Y":["unique_id","data","data","data","data","data"],"Y":["unique_id","data","data","data","data","data"]
</code></pre>
<p>But im tryi... | javascript | [3] |
1,778,972 | 1,778,973 | click on a mapview marker to open a certain actvity-android development | <p>Here's my prob,what i would like to do is to click on a gmap marker and that should take me to another activity.
as long as i know i should use the method onTap but i don't really getting how i should do it.
here's my code:</p>
<pre><code> protected boolean onTap(int index) {
SAXParserActivity saxParser... | android | [4] |
5,164,989 | 5,164,990 | Android video streaming Socket MediaRecorder (Broadcasting) | <p>I'm beginner work with android. But I very need your help.
I have a project with streaming video Broadcasting video. I can not find good sample, where will be realized recording Video from Camera, sending (uploading) stream to server and downloading (getting streaM) from server to Player.
Please help me with this qu... | android | [4] |
809,880 | 809,881 | Need to know when it's a new day, i.e., when the time is 00:00:00 | <p>I think I read somewhere that there's a system event for when the time changes (each second?) but are there other levels of granularity such as when the hour changes?</p>
<p>I have a <code>TabActivity</code> for a 7 day TV Guide - the indicator for the first (leftmost) always shows 'Today' with the others showing a... | android | [4] |
3,685,121 | 3,685,122 | php exceptions extra parameters | <p>Is it possible to add an extra parameter when trowing an exception?</p>
<p>When i trow an exception I send along the error message but i would also like to send along the name of the field in a extra parameter. Something like</p>
<pre><code>throw new Exception('this is an error message', 'the field');
</code></pre... | php | [2] |
29,590 | 29,591 | javascript image problem | <p>how cand i add a value to the class element in an image?</p>
<p>for src and align it works, and it adds the values to src and align:</p>
<pre><code>src : this.inputs['src'].value,
align : this.inputs['align'].value,
</code></pre>
<p>but when i write class it becomes highlighted and it dosen't add the value to the... | javascript | [3] |
1,321,329 | 1,321,330 | Mapping Execution of Program | <p>I am learning Java, and I was wondering whether there was some way of "mapping" the execution of a Java piece of code.</p>
<p>Ie:</p>
<p>Some kind of software which step by step executed the program and returned something like:</p>
<p>At line x this method is called and changed variable a from value b to value c.... | java | [1] |
2,112,332 | 2,112,333 | Javascript history does not work | <pre><code>document.addEventListener('DOMContentLoaded', function () {
displayRecentUrls("recentUrls");
});
function displayRecentUrls(divName) {
var popup = document.getElementById(divName);
var ul = document.createElement("ul");
popup.appendChild(ul);
var microsecondsPerWeek = 1000 * 60 * 60 * 24 *... | javascript | [3] |
2,848,462 | 2,848,463 | Python: has_key , I want to print the value of the key with if statement | <p>could you please help me with this.</p>
<p>I want to print the value of the key with if statement. it is have one OR other value if it is not , but not for one , for all.</p>
<p>my try:</p>
<pre><code>wp = {'tomatos': , 'patotoes': , 'milk':0.5'cheese':, 'eggs':0.25,'meat':2}
x= ' item is not available in this st... | python | [7] |
1,331,099 | 1,331,100 | Operators vs Functions in C/C++ | <p>Someone recently asked me the difference between a C++ standard operator (e.g. new,delete,sizeof) and function (e.g. tan,free, malloc). By "standard" I mean those provided by default by the compiler suite, and <em>not user defined</em>. Below were the answers I gave, though neither seemed satisfactory.</p>
<p>(1)... | c++ | [6] |
4,638,611 | 4,638,612 | dynamic alertdialog with radio buttons | <p>I am trying to make the item list dynamic, so i can add to it on runtime, but i have no idea. CharSeqence isnt dynamic, and no clue how to use the adapter option, how could i change my code to be dynamic? </p>
<pre><code>private void alertDialogLoadFile() {
AlertDialog.Builder alert = new AlertDialog.Builder(t... | android | [4] |
3,208,657 | 3,208,658 | Error when binding gridview data to a datatable | <p>I've a gridview in which i bind some data to it.After binding it i want to get the gridview content in a new data table.</p>
<p>Here's my c# code</p>
<pre><code> Datatable dt_NewTable = new DataTable();
foreach (GridViewRow gvRow in gdMainDetails.Rows)
{
DataRow dr = dt_NewTa... | c# | [0] |
5,173,444 | 5,173,445 | JQuery center plug-in which extend the functionality | <p>i got a piece of code for centering any element by jquery.</p>
<pre><code>(function($){
$.fn.centerIt = function(settings){
var opts = $.extend({}, $.fn.centerIt.defaults, settings);
return this.each(function(settings){
var options = $.extend({}, opts, $(this).data());
var $this = $(this);
... | jquery | [5] |
4,354,625 | 4,354,626 | How can I leave a message in crashlog when I catch an exception? | <p>I want to leave a message in crashlog when I catch an exception. Does NSLog() work?</p>
| iphone | [8] |
682,258 | 682,259 | Check which php functions will work in a specific php version | <p>At least this shows I'm not afraid to look stupid. Here it goes:
At some point while writing my php project, I determined that it would need php verion 5.2 to work properly. I didn't document why. Now, a user is asking me what will break if they run my app on 5.1 and I simply can't remember.</p>
<p>Is there any ... | php | [2] |
63,674 | 63,675 | Problem in Datetime conversion in c# | <p>I have a problem while converting a string whose value is <code>dd.mm.yyyy</code> to <code>DateTime</code> in c#</p>
<pre><code>string OriginalDateFormat = "28.06.2009";
DateTime dt= Convert.ToDateTime(OriginalDateFormat);
</code></pre>
<p>Throwing an exception <code>"String was not recognized as a valid DateTime.... | c# | [0] |
928,869 | 928,870 | UITableView Selection & Deselection | <p>I am having two tableviews if the 1st table row gets selected then automatically deselect the row in 2nd table if it is previously selected. Kindly anyone help me in this. Thanx in advance.</p>
| iphone | [8] |
2,236,583 | 2,236,584 | Receive intent when user clears data | <p>is it possible to receive some intent, when user clicks "Clear data" button in Manage Application section while app is running?</p>
| android | [4] |
595,736 | 595,737 | How to convert MS Access date to string in C# | <p>I was able to gather data from Access into my texboxes, but the dates won't stop giving errors. Is there a way to grab dates or is that impossible? No where on this site can I find a souluiton to convert dates to strings to display into a textbox. Any help would be great or I have to change the database dates to str... | asp.net | [9] |
1,513,929 | 1,513,930 | How to have exceptions that doesn't need to be caught in Java? | <p>I would like to throw a custom exception that will be determined at runtime. Currently I have to either add throws to the function or surround it with a try catch. What I want is for this exception to not be caught at all. It is a fatal exception and will show the programmer the error and what he can do to fix it. T... | java | [1] |
3,568,810 | 3,568,811 | create a pathName | <p>I want to get the image of a path, but if I use this:</p>
<pre><code>String pathname="/path/img.png";
</code></pre>
<p>If I use the following method:</p>
<pre><code>Bitmap icon = BitmapFactory.decodeFile (pathname);
</code></pre>
<p>The variable icon returns me null.</p>
<p>I don't know to create the pathname.<... | android | [4] |
260,897 | 260,898 | Below LinearLayout Not Showing? | <p>Only ScrollView is visible?Y so? </p>
<pre><code><?xml version="1.0" encoding="utf-8"?><LinearLayout android:id="@+id/LinearLayout01"
android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<ScrollView android:id="@+id/Scrol... | android | [4] |
748,858 | 748,859 | Need explanation for the jquery code | <p>i got a code which can be used to notify user when all images download complete but the flow of the code is not very clear to me. can anyone explain please in detail.</p>
<p>what one() function and what it does...how load() function is calling</p>
<p>here is the code</p>
<pre><code>$("#loadingDiv").show();
var nI... | jquery | [5] |
305,563 | 305,564 | Unable to include external jars | <p>I am not able to include include external jars from command line on ubuntu linux while compiling my java program.My external jars are in /home/ubuntu/lib directory
Im using this:</p>
<p>javac -cp /home/ubuntu/lib c.java</p>
<p>but it fails to compile.Can anyone suggest what im doing wrong?</p>
| java | [1] |
3,121,502 | 3,121,503 | EncodeParameters deinterlace bmp | <p>I'm looking for a way to take in a 32 bit bitmap and save it again however deinterlacing the frames. When the image is taken two fields are visible but only the last one is necessary. Is this possible to do using EncoderParameters. This is what I've tried so far:</p>
<pre><code>using (Image source = Image.FromFile(... | c# | [0] |
1,429,425 | 1,429,426 | Compare a dict to itself and remove similar keys efficiently | <p>I would like to compare elements in a dictionary to one another, and remove items according to some comparison criteria. And I'd love it to be efficient. I have a function that can do this, but it repeatedly copies the dictionay. Surely there is a superior way:</p>
<pre><code>mydict = {1:5,2:7,3:9,4:9,7:7,8:0,111:4... | python | [7] |
851,684 | 851,685 | Calling javascript function from objectiveC | <p>I have a function/method in .html file and I need to call that function from objective C code. I have a page with UIWebView and we need to call and pass few parameters to javascript function in .html file. Please let me know if anybody has any answers. Thanks. </p>
| iphone | [8] |
1,712,492 | 1,712,493 | Handling changing of dispaly orientation android | <p>I`ve locked my display orientation with </p>
<pre><code> this.setRequestedOrientation(
ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
</code></pre>
<p>in my <code>onCreate()</code> method and thats, of course, works fine. Now I want to handle the changing of my display orientation. I want to rotate my Ima... | android | [4] |
1,081,417 | 1,081,418 | parseInt Alternatives for parsing numerical strings | <p>Assuming I have a numerical string:</p>
<pre><code>var foo = "0";
</code></pre>
<p>Assume I want to parse it as a number, and increment it assigning the value to <code>bar</code> (just an arithmetical example), I know I could do:</p>
<pre><code>var bar = parseInt(foo, 10)+1;
</code></pre>
<p>But I believe the ab... | javascript | [3] |
5,833,974 | 5,833,975 | hide view in interface builder when there are multiple views | <p>This is probably a dumb question, but I can't seem to figure it out. In IB, if I have two UIViews, that are subviews of the main UIViewController.view that I basically show and hide depending on the user's input, is there a way to hide one of the views while working in IB. All the text/buttons are on top of each o... | iphone | [8] |
242,160 | 242,161 | how can i make a textfield that only accepts letters backspace and spacebar only | <p>i need to have a textfield that does not show anything if the user typed special characters or numbers. i have this Name textfield and i need to narrow it to letters input only. the user can also backspace and shift (by using keypress or keytyped or keyrelease whichever be better) </p>
<p>EDITED.</p>
| java | [1] |
5,217,371 | 5,217,372 | Recursive implementation of permutations in Python | <p>I apologize that there have already been many posts about this problem. However, I am having a hard time seeing where I am going wrong in my own implementation. So I am trying to write a function that takes in a string and returns all of it's possible permutations in the form of a list. </p>
<p>Theoretically it sho... | python | [7] |
285,628 | 285,629 | Fetching data from Internet in background and showing ProgressDialog or ProgressBar | <p>I am developing an application which require accessing a website for
data, and will show that data on device. I wants to fetch data from
Internet in background and show ProgressDialog or ProgressBar on
device and when application receive response from server app will
dismiss the dialog or bar and will show data .<... | android | [4] |
627,181 | 627,182 | ASP.Net Typed Datasets life span | <p>What happens to a dataset when your done using it. For example if I create and fill a dataset for a grid, when the user leaves that page or logs out I assume the dataset is still in memory?</p>
<p>Does each user get their own instance of the dataset? In other words, if 2 users hit the same page that uses a grid are... | asp.net | [9] |
503,565 | 503,566 | Sharing data between tabs | <p>I am getting some glitches while making a tab enabled application.<br>
I want to share data, between two tabs of my application.
How can I achieve the same?</p>
<p>Rgds
Robert</p>
| android | [4] |
822,002 | 822,003 | C# - Am I replacing perfectly good code? | <p>I had a quick function to format a date, here it is:</p>
<pre><code>public static string archiveServerDateTime(string datetime)
{
DateTime tempDateTime = DateTime.ParseExact(datetime,"dd.MM.yyyy HH:mm:ss", null);
return tempDateTime.ToString("yyyy/MM/dd:HH:mm:ss");
}
</code></pre>
<p>only t... | c# | [0] |
5,605,086 | 5,605,087 | Global Variables Bad | <p>Ok after reading this article and also some of the examples I am still not clear on what global variables mean. So its say private variables in your class are global?</p>
<p><a href="http://www.c2.com/cgi/wiki?GlobalVariablesAreBad" rel="nofollow">http://www.c2.com/cgi/wiki?GlobalVariablesAreBad</a></p>
<p>So can... | c# | [0] |
2,949,264 | 2,949,265 | volatile vs. mutable in C++ | <p>I have a question about the difference between volatile and mutable. I noticed that both of the two means that it could be changed. What else? Are they the same thing? What's the difference? Where are they applicable? Why the two ideas are proposed? How to use them in different way?</p>
<p>Thanks a lot. </p>
| c++ | [6] |
775,816 | 775,817 | Making part of the view transparent/overlay while the rest isn't | <p>I'd like to show an overlay view similar to what you see when you perform a 'Search in Contacts app where the SearchBar is visible under the toolbar while the gray overlay covers up all of the content below.</p>
<p>For my view, I'd like to have an UITextField and button shown visible while the rest of screen is gra... | iphone | [8] |
4,374,487 | 4,374,488 | how can I impelement bitblt function in Android | <p>I want to move a part of my screen to left or right in Android like BitBlt function in C++ and C# or a same method by which I can move part of my screen, but I didn't find any thing to do that. Could you help me to move a part of my screen in canvas of OpenGL to left or right side ?
Thank you in advance.</p>
| android | [4] |
2,543,967 | 2,543,968 | Is there any case where len(someObj) does not call someObj's __len__ function? | <p>Is there any case where len(someObj) does not call someObj's <code>__len__</code> function?</p>
<p>I recently replaced the former with the latter in a (sucessful) effort to speed up some code. I want to make sure there's not some edge case somewhere where len(someObj) is not the same as someObj.<code>__len__</code... | python | [7] |
4,573,651 | 4,573,652 | unordered_map max_size | <p>I am using <code>std::unordered_map</code> and was trying to get the memory consumption so I did the following:</p>
<pre><code>#include <iostream>
#include <unordered_map>
using namespace std;
int main(){
unordered_map<int, int> map;
map[21] = 12;
cout << map.size() << e... | c++ | [6] |
4,121,709 | 4,121,710 | Javascript .pac file | <p>Is there a way to get a browser to read a .pac file without having the user manually point the browser's automatic config file at the URL?</p>
| javascript | [3] |
815,285 | 815,286 | simple for loop help needed in php | <p>I have 568 rows in my csv file and my for loop looks like this</p>
<pre><code>$csv = array();
$file = fopen('names.csv', 'r');
while (($result = fgetcsv($file)) !== false)
{
$csv[] = $result;
}
fclose($file);
for ($row = 0; $row < 568; $row++)
{
echo "Serial no:<br/>";
echo "Name:".$csv[$row][1]."";... | php | [2] |
3,554,885 | 3,554,886 | Image With Asp.Net Web Application | <p>I have a problem with Images I have a image which is at root directory like “C:\Mh\mahesh1” and tried to upload by following ways but won’t works.</p>
<pre><code>Defaults.aspx.cs
namespace UITI
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{... | asp.net | [9] |
5,477,177 | 5,477,178 | Toolbar over UIKeyboardTypeNumberPad with a 'Done' Button | <p>Looking to add a toolbar over UIKeyboardTypeNumberPad with a 'Done' Button. Has any one seen a good current tutorial? Is this the correct approach? Thanks. </p>
| iphone | [8] |
941,900 | 941,901 | Passing object references between modules | <p>I am rather new to javascript and trying to learn some of the best practices. I am unclear as to why I can't access the ctx reference in the following code. The log outputs a context2d reference from myApp.init(). Can I not expose a private object variable in the return statement of the myApp module? I thought I... | javascript | [3] |
3,587,645 | 3,587,646 | What is the fastest way to find out how many non-empty lines are in a file, using Java? | <p>What is the fastest way to find out how many non-empty lines are in a file, using Java?</p>
| java | [1] |
4,644,999 | 4,645,000 | ASP.Net circular reference situation | <p>I have the following code and everytime i try to compile, I get the error "/Website/InsightLogo.ascx has a circular reference!" I am assigned to fix up somebody els' code, so please excuse any odd mistakes</p>
<pre><code><%@ Control Language="vb" AutoEventWireup="false" CodeBehind="InsightLogo.ascx.vb" Inherits=... | asp.net | [9] |
800,435 | 800,436 | questions on 0xff | <p>I am working on a C++ code. Not very sure what the code below is trying to do. Would like someone's help on it.</p>
<pre><code>int pval = t_gamma[depth[i]];
int lb = pval & 0xff;
switch (pval>>8) {
case 0:
depth_mid[3*i+0] = 255;
depth_mid[3*i+1]... | c++ | [6] |
5,701,613 | 5,701,614 | Can we define a delegate inside a method in C#? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/359320/creating-a-delegate-type-inside-a-method">Creating a delegate type inside a method</a> </p>
</blockquote>
<p>Hi All,</p>
<p>Can we define a delegate inside a method in C# ?</p>
| c# | [0] |
1,960,811 | 1,960,812 | how to retrieve a string in xml parsing? | <p>How to retrieve a string from a web service url using XML Parsing.</p>
| iphone | [8] |
1,031,796 | 1,031,797 | Fill A Variable Size Array | <pre><code>int* HT;
int HTc = 500;
HT = new int[HTc] = {-1}; //Fill array with -1
</code></pre>
<p>I get the <em>warning</em>: </p>
<blockquote>
<p>extended initializer lists only available with -std=c++0x or
=std=gnu++0x</p>
</blockquote>
<p>I'll assume this means it isn't compatible with the ANSI standard, whi... | c++ | [6] |
1,339,857 | 1,339,858 | How to package an ASP.NET application to prevent customers from modifying it? | <p>Is there a tool or some general approach to packaging all the files of an ASP.NET application into binary form to prevent modification once its deployed? I am thinking there would be a set of signed binaries and a config file for settings that we allow the customer to modify. Has anyone attempted this, is it even ... | asp.net | [9] |
5,109,803 | 5,109,804 | HTML Output from XML and strange characters | <p>Im using CURL to fetch Twitter RSS, then write those tweets to Wordpress.</p>
<p>Here is an example of the XML:</p>
<pre><code> <title>Bob: Twitter&#8217;s @Anywhere Platform Is Now Live - http://bit.ly/b54cTS</title>
</code></pre>
<p>I then write this to Wordpress, but the result is:</p>
<pre><... | php | [2] |
5,320,047 | 5,320,048 | How to add two map tangs in single xml file in Android | <p>I am creating tab bar in my application. For one tab i set map activity as tab spec content and add overlay on it. now i have to move on next map as user clicks on overlay.
In short I have to create two layouts each on has map and at run time i have to set visibility and one after other.
For that i create one XML la... | android | [4] |
2,108,878 | 2,108,879 | Importing modules with variable paths? | <p>I have dev and production systems.</p>
<p>My production system is different from my dev system in that that it adds one directory to the beginning path.</p>
<p>for eg. on dev system:</p>
<p>main->module1->module2</p>
<p>becomes on production:</p>
<p>project_name->main->module1->module2.</p>
<p>Because of that ... | python | [7] |
4,850,723 | 4,850,724 | Find if first character in a string is upper case, Java | <p>In java, Find if first character in a string is upper case without using regular expression.</p>
| java | [1] |
5,471,414 | 5,471,415 | formate date in javascript | <pre><code>var mydate = new Date();
var theyear = mydate.getFullYear();
var themonth = mydate.getMonth() + 1;
var thetoday = mydate.getDate();
txtbox.value="04-Jul-2012"
</code></pre>
<p>I have to convert todays date and txtbox date in "04/07/2012" format how i do it.</p>
<p>I have to compare todays date with txtbo... | javascript | [3] |
2,634,847 | 2,634,848 | Get the folder path under cursor? | <p>I'am working on my small project: Crypt container. To unlock it - just plug-in specifig usb flash-drive and unplug it to lock container. </p>
<p>So, GUI of program is very simple - just ListView. If you want to add files into continer - drag'n'drop items to them.</p>
<p>But i have a problem - when user want to dec... | c# | [0] |
4,654,977 | 4,654,978 | Define "custom" integer-based type? | <p>I have a program that is interfacing with an external library that, among other things, has an unsigned 12-bit value packed in a larger struct.</p>
<p>This used to be 8 bits, so we simply marshaled it as a byte.</p>
<p>Now that it's 12 bits... I can use a ushort, but that opens up issues of (a) range checking and ... | c# | [0] |
5,734,672 | 5,734,673 | jQuery's if $('#foo').is(':hidden') and $('#foo').slideUp() not working when "display: none !important"? | <p>This one works: </p>
<blockquote>
<p><a href="http://jsfiddle.net/fGnL7/3/" rel="nofollow">http://jsfiddle.net/fGnL7/3/</a> </p>
</blockquote>
<p>using</p>
<pre><code>$(document.body).click(function () {
if ($("div:first").is(":hidden")) {
$("div").slideDown("slow");
} else {
$("div").slideUp("sl... | jquery | [5] |
1,484,227 | 1,484,228 | Generate start and ending datetimes in UTC based on a PST date | <p>I am taking in a parameter that is a date in PST timezone which will be in the format of "YYYY-MM-DD" (e.g. "2011-08-15"). This parameter is optional. I have 2 questions that I've been struggling with.</p>
<p>I need to calculate the start and end datetime in <strong>UTC</strong> for this date.</p>
<p>So if the i... | php | [2] |
5,438,988 | 5,438,989 | Custom HttpHandler never running | <p>Forgive me if this is basic. I've never made one before and can't seem to figure out why it's not working. I wrote a little handler to do some parsing on CSS files. I added this:</p>
<pre><code> <system.web>
<httpHandlers>
<remove verb="*" path="*.css"/>
<add verb... | asp.net | [9] |
5,185,687 | 5,185,688 | Pointer to member variable | <p>The following program output is always 1 1 1. In "Inside the c++ object model" book, it is mentioned that it will give offset. The purpose is also to find out object layout. But, I am confused with the output. Used g++ 4.5.2 </p>
<pre><code>class Test
{
public:
float a;
float b;
float c;... | c++ | [6] |
2,104,084 | 2,104,085 | How to confirm only html files exist in a given folder and if not then how to prompt the user to specify a folder with only html files within | <p>I would like to create a python script that will do 3 things: <li>1) Take user input to navigate to a file directory</li><li>2) Confirm the file contents (a particular set of files need to be in the folder for the script to proceed)</li><li>3) Do a Find and Replace</li></p>
<p>The Code as of now: </p>
<pre><code>i... | python | [7] |
6,006,641 | 6,006,642 | Using .join() in Python | <p>Very simple and quick question. Take this list for example: </p>
<pre><code>a = ['hello1', 'hello2', 'hello3']
','.join(a)
</code></pre>
<p>I would like to have 'and' instead of a comma before the last element of the list. So I would get:</p>
<blockquote>
<p>hello 1, hello 2 and hello 3</p>
</blockquote>
<p... | python | [7] |
2,727,462 | 2,727,463 | C# Letter Count | <p>Hi I have a variable <code>'test'</code> string
I need to know how many times they were placed in the variable text <code>"<title>"</code></p>
<p>thanks</p>
| c# | [0] |
67,051 | 67,052 | Android way to use Bitmaps from Camera.setPreviewCallback | <pre><code>camera.setPreviewCallback(new Camera.PreviewCallback() {
private long timestamp=0;
public synchronized void onPreviewFrame(byte[] data, Camera camera) {
Log.e("CameraTest","Time Gap = "+(System.currentTimeMillis()-timestamp));
timestamp=System.currentTimeMillis();
Bitmap mFac... | android | [4] |
3,692,246 | 3,692,247 | Unsure about these operators being used in this way | <p>This code example comes from <a href="http://www.cplusplus.com/doc/tutorial/templates/" rel="nofollow">http://www.cplusplus.com/doc/tutorial/templates/</a> :</p>
<pre><code>template <class myType>
myType GetMax (myType a, myType b) {
return (a>b?a:b);
}
</code></pre>
<p>What I am confused about is the "a... | c++ | [6] |
2,766,221 | 2,766,222 | Step through all children and remove all styles | <p>I have a sharepoint site that is driving me crazy trying to remove all the junk code so I can apply my design. I am curious if jquery could strip out all css from all elements inside the containing div?</p>
<p>For example, how could I strip all css formatting from this html using jquery?</p>
<pre><code><div id=... | jquery | [5] |
1,334,060 | 1,334,061 | New Google Plus Navigation? | <p>Any ideas on how the new navigation in Google Plus is coded (where you hit the "< HOME" button and it pops out a list of activities ("Stream", "Profile", "Messenger", etc)).</p>
<p>I initially have been thinking it is a PopupWindow...</p>
<p>Thoughts?</p>
| android | [4] |
3,112,943 | 3,112,944 | Python 2.7 syntax error | <p>I'm new in Python. Does anyone know why there is syntax error as below? </p>
<pre><code>self.update( { (u,v) : t for (u,v),t in old_items if u in new_vert and v in new_vert } )
^
SyntaxError: invalid syntax
</code></pre>
<p>Thank you. :)</p>
| python | [7] |
3,762,530 | 3,762,531 | jQuery return false weird behavior | <p>I have a piece of jQuery code that toggles a description paragraph for a given td when users click on an anchor tag, see code below. My problem is that if I put the return false statement as shown, the code works fine in IE but in FF it would not show the description at all, which is expected. When I put the return... | jquery | [5] |
3,899,997 | 3,899,998 | PHP Strict standards: Creating default object from empty value - How to Fix? | <p>All,</p>
<p>I have the following PHP5 code. </p>
<pre><code>$request = NULL;
$request->{"header"}->{"sessionid"} = $_SESSION['testSession'];
$request->{"header"}->{"type"} = "request";
</code></pre>
<p>It appears that line 2 and 3 are producing the following error:</p>
<pre><code... | php | [2] |
2,818,116 | 2,818,117 | jQuery modal stack with ajax forms | <p>I have a simple function that opens a url inside a modal and there can be multiple modals on the page. In one such example the user would open up a modal from another modal say to edit some content that is currently being show in the first modal.</p>
<p>The problem is when the form inside the second modal is submit... | jquery | [5] |
1,442,392 | 1,442,393 | My script is renaming uploads randomly | <p>The script I have should upload the file, resize and rename with the appropriate size. It is doing that, but instead of renaming the with only the last part it renames it with a temp name only. Here is the script, any help would be greatly appreciated. I have uploaded the script <a href="http://www.filefactory.co... | php | [2] |
2,851,109 | 2,851,110 | jquery attr not working in ie8 | <p>Can someone help me figure out why the code here is not working? I am pretty sure it has something to do with the .attr: <a href="http://jsfiddle.net/nBcrY/1/" rel="nofollow">http://jsfiddle.net/nBcrY/1/</a></p>
| jquery | [5] |
5,443,287 | 5,443,288 | How do you check for end of line in c++? | <p>I have to accept space separated integers from user but stop when i encounter a new line.
For example: </p>
<pre><code>3 5 7 9
23 47
6
</code></pre>
<p>In this example I must store <code>3, 5, 7, 9</code> in array 1, <code>23, 47</code> in array 2, <code>6</code> in array 3.
Unfortunately, I don't know how to chec... | c++ | [6] |
5,702,817 | 5,702,818 | to return an html result in loop in a function to a different page | <p>I have a class</p>
<pre><code>class files{
function displayhtml(){?>
select name="df">
for($i=0;$i<10;$i++){?>
<option value="<?php echo "$i"; ?>"><?php echo "$i"; ?></option><?php
}?></select><?php
}
}
?>
</code></pre>
<p>I have a fil... | php | [2] |
1,364,192 | 1,364,193 | Is there a way to send app statistics to play console? | <p>I know that when app crashes a bug report is sent to my developer console.
Now I'd like to add a statistics usage function: for example each week app gathers my app's preferences settings and send them to my dev console. This way I could see what users like more and, on the other hand, what has to be improved. </p>
... | android | [4] |
693,332 | 693,333 | Disable "history.go(-1)" on certain pages | <p>I want to be able to disable "history.go(-1)" on certain pages.
I'm thinking if is there a way to clean up the Javascript's history object. Ideas?
"history.go()" seen to be not functioning too well on certain browsers such as IE. Is that true? Any solution for that?</p>
| javascript | [3] |
5,811,909 | 5,811,910 | Visual Studio.NET like property window in ASP.NET | <p>Looking for a VS.NET like property window that can be embedded in ASP.NET page, which will allow users to change decorated proerties of a class.</p>
<p>any guidance is much appreciated</p>
<p>thanks</p>
| asp.net | [9] |
1,203,823 | 1,203,824 | C# ThreadPool context switch logic | <p>I've been testing out some code that uses <code>ThreadPool</code> in C# and I noticed that a lot of unnecessary context switch occurs. While one thread is executing regular statements it gets context switched. They literally seem to be going back and forth for every line. I was wondering what the logic behind this w... | c# | [0] |
1,612,371 | 1,612,372 | Error when using str_replace() convert from ' to " | <pre><code><?php
$str='<p style="text-align: center;">
<img style="width: 448px; height: 321px;" src="http://admin.vn/images/images/car_1.jpg" alt="">
</p>';
$search='"';
$replace=''';
$string= str_replace($search,$replace,$str);
echo $string;
?>
</code></pre>
<p>When I echo $string is result n... | php | [2] |
925,019 | 925,020 | how to use fobs4jmf.jar for both mac and windows | <p>i am using jdk1.6 and in the Apllicatoin i have included fobs4jmf.jar(57kb) for playing videos on windows and for mac fobs4jmf.jar(78kb) they are working properly
but i want to make a final jar of the application which will use windows jar for windows and mac jar foe mac dynamically
how it is possible</p>
| java | [1] |
5,678,494 | 5,678,495 | How to send All objects of Mutable Array to Another Class? | <p>I want to send Mutable Array with all its objects from my First Class to Second Class. I have no idea how can i do this please anybody tell me the way... </p>
| iphone | [8] |
2,933,021 | 2,933,022 | How to resize bbcode linked image to fix within the current div height and width? | <p>Hi I have a comment posting function where public user can link and display images using </p>
<p>Something like [img]http://www.google.com/img.png[/img]</p>
<p>Issue is that user may link to an image that is of extremely large height and width which is more than the height and width of the div it is in causing som... | javascript | [3] |
32,057 | 32,058 | How to update session.setAttribute(name,value) value, where the is same? | <p>I have a situation where I need to update the value of a setAttribute where the name remains same. Consider the following situation as example-<br/>Suppose I have three JSP: abc.jsp, xyz.jsp, pqr.jsp. Now at first abc.jsp runs then control forward to xyz.jsp & then forward to pqr.jsp. Now after execute pqr.jspth... | java | [1] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.