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,032,849 | 1,032,850 | How to mark date in monthCalendar? | <p>How I can paint an arbitrary day with red color and bold font, and some other day in green color?</p>
<p>Thanks in advance.</p>
| c# | [0] |
4,663,503 | 4,663,504 | How do you store an int or other "C# value types" on the heap (with C#)? | <p>I'm engaged in educating myself about C# via Troelsen's Pro C# book.</p>
<p>I'm familiar with the stack and heap and how C# stores these sorts of things. In C++, whenever we use <code>new</code> we receive a pointer to something on the heap. However, in C# the behavior of <code>new</code> seems different to me:</p>... | c# | [0] |
5,060,384 | 5,060,385 | Can I hook when user copy or paste on TextView? | <p>When user copy or paste on TextView,
Is there anyone explains me what happen on TextView.
If some methods called while user click 'Copy' or 'Paste' in menus,
I'd like to hook them and replace them with my own one.</p>
<p>Here is what I want to do.
1. user copy or paste some string to my TextView.
2. some string cop... | android | [4] |
4,938,245 | 4,938,246 | Android running application in the background - Beginner | <p>I am a beginner in Android development, and i need to know the following;</p>
<ol>
<li>I need my application to operate in the background, even if the user gets a call my application should run uninterruptedly. Can this be done ? I have heard that android only allows 1 application to run in a given instance</li>
</... | android | [4] |
3,596,152 | 3,596,153 | Missing return statement | <p>I am getting the following errors in my code:
-Missing return statement
-Cannto find symbol in the second method</p>
<p>Here is my code:</p>
<pre><code>import java.io.*;
import javax.swing.JOptionPane;
public class Converter {
public static void main(String[] args) throws Exception{
//BufferedReader ... | java | [1] |
2,612,872 | 2,612,873 | Design question regarding Adpater on GridView | <p>Hi have a GridView with my own Adapter class. This GridView displays TextViews as its items (simplified):</p>
<pre><code>@Override
public View getView(int arg0, View convertView, ViewGroup arg2) {
final LinearLayout linearLayout;
if (convertView == null) { // if it's not recycled, in... | android | [4] |
249,897 | 249,898 | javascript function is not a function | <p>This is the javascript code im using.</p>
<pre><code><script language="javascript" type="text/javascript">
function cancelevent()
{
input_box=confirm("Are you sure you want to cancel?");
if (input_box==true) {
document.cancelevent.submit();
} else {
}
}
</script>
</cod... | javascript | [3] |
659,010 | 659,011 | How to Search File and give path to process builder | <p>I am using process Builder to execute external command using java</p>
<p>Here is Code:</p>
<pre><code>command.add(System.getenv("ProgramFiles") +"\\IrfanView\\"+"i_view32.exe ");
command.add("D:\\BMP\\*.bmp /import_pal=D:\\default.pal /convert=D:\\ABC\\*.bmp")
</code></pre>
<p>How can i Get Path if <code>i_view32... | java | [1] |
1,868,473 | 1,868,474 | user input and acceptance inside a function | <p>My function accepts user input and then do somework when user clicks ok.</p>
<p>private void cannyToolStripMenuItem_Click(object sender, EventArgs e)
{
canny();
}</p>
<pre><code>private void canny()
{
// get user input
// if user clicks ok
if (ok button is clicked)
... | c# | [0] |
2,669,786 | 2,669,787 | Python how to exit main function | <blockquote>
<p><strong>Possible Duplicates:</strong><br>
<a href="http://stackoverflow.com/questions/73663/terminating-a-python-script">Terminating a Python script</a><br>
<a href="http://stackoverflow.com/questions/949504/terminating-a-python-program">Terminating a Python Program </a> </p>
</blockquote>
<p>... | python | [7] |
5,896,074 | 5,896,075 | How to display a button on page after a period of time in ASP.NET? | <p>I want the button to display exactly 2 minutes after the page loads. Is this possible?</p>
| asp.net | [9] |
107,387 | 107,388 | Redirect a page for a specific time peroid | <p>I am trying to create a 302 redirect which waits for 18 seconds after redirecting and then goes back to the parent page. </p>
<p>Here is what I have done,</p>
<pre><code><script type='text/javascript'>
(function (){
if (document.cookie.indexOf(welcomeCookie) != -1 ||
document.cookie.indexOf(dailyWelcom... | javascript | [3] |
1,444,933 | 1,444,934 | What's the correct way to connect pages of my website? | <p>I'm just starting web-developing now (I do have experience with C#). And I've seen a recommendation to use <code>Web.sitemap</code> to have a list of pages of my website. Does this help? Will I be able to use this <em>instead</em> of having links on my web pages somehow? And what about being accessible to Google so ... | asp.net | [9] |
865,787 | 865,788 | How to synchronize things | <p>I have been wondering this forever. I don't know how things can happen at the same time.</p>
<p>I want to know how to sync in java without separate threads. For example, in a real video game how do things hapen at the same time without separate threads?<br>
How would a person move two limbs at the same time in the ... | java | [1] |
914,662 | 914,663 | Html 5 Android PhoneGap | <p>I am developing an android application. In that, I am trying to get the image in the javascript, but its not loading. Can someone help me to get the image in the javascript in the phone gap android app...</p>
<p>Code: </p>
<pre><code><img src="img/nextIcon.png" /></span>'
</code></pre>
| android | [4] |
5,301,845 | 5,301,846 | Load and Render a .aspx file in a Server Control | <p>As far as I know server controls doesn't have a .aspx file. So I need to load a aspx file in order for it to work like a template for my server control, and render my server control content.</p>
<p>How can I do that?</p>
| asp.net | [9] |
782,180 | 782,181 | Refreshing a ListView automatically in android as Pull Down to Refresh functionality of iPhone | <p>I have a problem as, I am creating an app as a social networking app in which there are posts from users, these posts are shown in a listview but the posts are updated only when we recall the same activity because parsing is mandatory for the same. I want that the listview should be automatically refreshed when we p... | android | [4] |
2,101,384 | 2,101,385 | innerText shows content but doesn't allow me to change it | <p>I have a JS function activating after an onclick event on an A tag. Here is the code :</p>
<pre><code>(function(MTM) {
MTM.selectAllNone = function(e) {
var string = e.target.textContent || e.srcElement.innerText;
var list = document.getElementById('my-div');
var inputs = list.getElementsByTagName('in... | javascript | [3] |
1,360,733 | 1,360,734 | How do i fill an objects attributes dynamically? | <p>I am trying to save an object with a variable amount of "cols". The number of cols is equal to the number of headers. This is how the code looked before: </p>
<pre><code>if(isset($_POST['submit'])){
$sub = new Sub();
$sub->product_id = $_POST['product_id'];
$sub->col1 = $_POST['col1'];
$sub-&... | php | [2] |
2,386,642 | 2,386,643 | how to run my code support for landscape and portrait in android | <p>i am writing two xml files for landscape and portrait and create res/layout-land folder,execute my code but did not work portrait mode,have any setting set for work my code for landscape and portrait..please give any sample code for that.</p>
<p>Thanks All </p>
<pre><code><?xml version="1.0" encoding="utf-8"?&g... | android | [4] |
4,981,563 | 4,981,564 | How do I move the ball on a particular angle in the Android canvas? | <p>How do I move the ball on a particular angle in the Android canvas?</p>
| android | [4] |
4,652,786 | 4,652,787 | Editing screenshots in iTunes Connect after iPhone app was approved | <p>In the new iTunes Connect App Management interface -- I believe it changed recently, I could be wrong though -- how do I edit the screenshots for my localized (approved and live) iPhone app?</p>
<p>Unfortunately, the web upload form had a bug which actually required the screenshots to be provided in reverse order (... | iphone | [8] |
4,074,840 | 4,074,841 | Multi Domain PHP Post and Redirection | <p>There are many similar questions on the same. I have tried to look far and even tried using the comments and suggestions provided for the similar questions but I am stuck. I can't achieve what I want to. </p>
<p>Both domains are owned by me (Abc.com and xyz.com) and I have full right/access on them</p>
<ul>
<li>Us... | php | [2] |
1,840,404 | 1,840,405 | Why does jQuery have undefined in its argument signature, and why does it pass window in again? | <p>I see jQuery is wrapped with...</p>
<pre><code>(function( window, undefined ) {
...
})(window);
</code></pre>
<p><a href="http://code.jquery.com/jquery-latest.js" rel="nofollow">Source</a>.</p>
<p>I see it passes in <code>window</code> again (my guess to make accessing it faster), but why is <code>undefined</c... | jquery | [5] |
1,538,996 | 1,538,997 | Why must I define a commutative operator twice? | <p>I wonder if I must define a commutative operator (like <code>*</code>) twice!</p>
<pre><code>public static MyClass operator *(int i, MyClass m)
{
return new MyClass(i * m.Value);
}
public static MyClass operator *(MyClass m, int i)
{
return new MyClass(m.Value * i);
}
</code></pre>
<p>What's the logic beh... | c# | [0] |
4,561,697 | 4,561,698 | ASP.NET + Connecting/Interacting to a Web Service | <p>I have an ASP.NET Web Application that needs to connect to/interact with an existing set of web services. This is going to sound like a vague question, but, I'm not sure of the address to bind to.</p>
<p>When I look at the server on which the web services reside on, I have found a .wsdl file. I have used this .wsd... | asp.net | [9] |
1,555,508 | 1,555,509 | Difference between /// and #region in c# | <p>what is the difference between /// and #region ...#endregion
comment statements in c#? And which one the best?.</p>
| c# | [0] |
2,574,030 | 2,574,031 | Using only native PHP function to get array values from a list array inside an array | <p>I have an array below:</p>
<pre><code>$arr = array(
array(
'name' => 'ABC'
),
array(
'name' => 'CDF'
),
array(
'name' => 'GHI'
)
)
</code></pre>
<p>How can I convert to just with native function in PHP:</p>
<pre><code>$arr = array( 'ABC', 'CDF', 'GHI');
</c... | php | [2] |
5,346,603 | 5,346,604 | asp.net getting the selected HtmlInputRadioButton or HtmlInputCheckbox | <p>using asp.net 4.0</p>
<p>I'm generating HtmlInputRadioButton like the following into a table control. </p>
<pre><code><table runat="server" id="table_impact" cellspacing="1"
cellpadding="4" enableviewstate="true"> </table>
</code></pre>
<p>Code is </p>
<pre><code>HtmlInputRadioButton rbd = ... | asp.net | [9] |
896,257 | 896,258 | Android: Alert Dialog | <pre><code>@Override
protected Dialog onCreateDialog (int id) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(R.string.instant_alert_screen_title);
builder.setInverseBackgroundForced(true);
ListView aa = new ListView(this);
aa.setAdapte... | android | [4] |
1,308,717 | 1,308,718 | Setting up new iPhone Dev Environment for existing app | <p>This might be a weird question, but I'll try anyway.</p>
<p>I set up my dev environment with certificates etc on an old MBP, built an app and released it on the App Store. I've since upgraded to a new MacBook Pro, but didn't move over any certificates, so can no longer build my application.</p>
<p>Have I completel... | iphone | [8] |
526,081 | 526,082 | run python command line interpreter with imports loaded automatically | <p>I would like to play around in the python interpreter but with a bunch of imports and object setup completed. Right now I'm launching the interpreter on the command line and doing the setup work every time. Is there any way to launch the command line interpreter with all the initialization work done?</p>
<p>Ex:</p... | python | [7] |
5,591,124 | 5,591,125 | Uninstantiated class attribute | <p>Hello I need an uninstantiated class attribute and I am doing this:</p>
<pre><code>>>> class X:
... def __init__(self, y=None):
... self.y = list()
</code></pre>
<p>Is this ok? If no, is there another way of doing it. I can't instantiate this attribute in <code>__init__</code> cause I woul... | python | [7] |
5,756,482 | 5,756,483 | class::data_member vs class_object.data_member | <hr>
<p>I just saw <a href="http://stackoverflow.com/a/672886/888051">a post</a> in which I found something I never saw before, in short here it is:</p>
<pre><code>class A {
public:
int _x;
};
void foo(A *a_ptr, int *m_ptr)
{
cout << (*a_ptr).*m_ptr << endl; // here
}
int main()
{
A a;
... | c++ | [6] |
4,061,549 | 4,061,550 | Make document read-only in Android | <p>I use below code to open .doc file by call other application.<br>
But I don't want the file be modify.<br>
So I want to set file to read only.<br>
Or any other method to avoid user modify file.<br>
The file format may *.doc, *.docx, *.ppt, *.pptx, *.pdf, *.txt.</p>
<pre><code>File file = new File(FilePath);
String ... | android | [4] |
470,511 | 470,512 | GetView method getting called after changing focus [Android] | <p>I have seen <a href="http://stackoverflow.com/questions/6551855/arrayadapters-getview-method-getting-called-automatically-on-edittext-focus-e">this question</a> asked by "vbjain", but answer that are given are not satisfactory for me.</p>
<p>I am also facing same problem, I have a huge list where i need to do exten... | android | [4] |
6,002,775 | 6,002,776 | Byte[] Array to String | <p>I want to output a Byte[] array to a string so I can send it along a HTTPRequest. Can it be done? And will the server pick up the data and create a file from it? Or does some special encoding need to be done?</p>
<p>The file is an image. At the moment I have: </p>
<pre><code>Byte[] fBuff = File.ReadAllBytes("C:/pi... | c# | [0] |
2,935,152 | 2,935,153 | Show a true modal dialog box without button | <p>The following code will produce a truely model dialog box, with close button. Truely model means, when you click on the area other than dialog box, the dialog box will remain active and will not close.</p>
<pre><code>AlertDialog alert = builder
.setCancelable(false)
.setPositiveButton(context.getResources()... | android | [4] |
2,640,563 | 2,640,564 | In android how should i get phone number of sms sender? | <p><strong>In android how should i get phone number of sms sender?</strong></p>
<p>I make application which sends sms but takes money charges for that, <strong>so can i send sms without charging money?</strong> please tell me</p>
| android | [4] |
2,382,707 | 2,382,708 | php fails to store any _SESSION or _GLOBALS variable | <p>I am storing a session and a global variable in file1.php. However, when I try to access those from file2.php I get nothing. I am using php 5.1.6.</p>
<pre><code>$_SESSION['abc'] = $a;
$GLOBALS['def'] = $b;
</code></pre>
<p>Any idea?</p>
<p>Thanks in advance.</p>
| php | [2] |
5,548,000 | 5,548,001 | Switch or If statement quicker in PHP, and why | <p>Does a switch or If statement quick to execute, where there are atleast 10-20 conditions</p>
<p>Thanks
Dave</p>
| php | [2] |
5,190,602 | 5,190,603 | Java Collection methods | <p>I'm starting to learn Java and I have a question about generics.</p>
<p>In this methods from <code>Collection<E></code> interface: </p>
<p><code>boolean containsAll( Collection <?> c);<br>
boolean removeAll(Collection<?> c);<br>
boolean retainAll ( Collection <?> c);</code></p>
<p>Why is ... | java | [1] |
3,455,700 | 3,455,701 | Need to show div after .validate is complete | <p>I am using the validate plugin for jQuery and want to show a loading div and hide the submit button after the validation is complete. The next page takes a while to load show I need to show a loading .gif and some text to let the user know what is happening.</p>
<p>I can't do a simple on click show div1 and hide th... | jquery | [5] |
3,887,288 | 3,887,289 | What is the difference between these two ways to start an activity? | <p>First off, I'm totally new at all of this and am mostly learning be searching the internet for directions on how to do what I want and then figuring out how to use it.</p>
<p>So I've found these two versions of how to start an activity, but I don't really understand the difference. Is one better than the other? O... | android | [4] |
6,017,586 | 6,017,587 | Translating string to another lang using array | <p>I want to translate all the keys from the array that occur in this string: </p>
<pre><code>$bar = "It gonna be tornado tomorrow and snow today.";
</code></pre>
<p>and replacing it with the value using this array: </p>
<pre><code> $arr = array(
"tornado" => "kasırga",
"snow" => "kar"
);
</code></pre>
... | php | [2] |
1,133,274 | 1,133,275 | Main method in a static inner class.? | <p>I've learnt that the only public class in a Java file must also have the main method. However, below you can see the main method inside an inner class instead?
What is the rule with regard to the main method definition in a source file?</p>
<pre><code>public class TestBed {
public TestBed() {
System.out... | java | [1] |
3,506,498 | 3,506,499 | format from tuple to float in python? | <pre><code>def tong_thoigian (self,kr,uid,ids,context={}):
obj=self.browse(kr,uid,ids,context=context)[0]
kr.execute('''select name,giolam from x_giolam where name=%s'''%(obj.ma_luong))
kq=kr.fetchall()
tong=0.00000
for i in kq:
tong+=kq[1]
self.write(kr,uid,ids,{... | python | [7] |
4,924,177 | 4,924,178 | list< T >::iterator or syntax error? | <p>I'm currently getting the following compile errors:</p>
<pre><code>In function 'int main()':
error: expected primary-expression before '>' token
error: missing template arguments before 'i'
error: expected ';' before 'i'
error: 'i' was not declared in this scope
</code></pre>
<p>I've highlighted the line the fi... | c++ | [6] |
3,958,357 | 3,958,358 | Which is better to use: $arrayName['literal'] or $arrayName[literal]? | <p>Both are working fine. I'm just curious how php parse the two. Do they have difference on speed, efficiency, etc. Why does php allow us to use both?</p>
| php | [2] |
5,152,600 | 5,152,601 | Display unicode characters in TextView Android | <p>There are a number of posts all over the internet on this topic, however none of them have been able to isolate and solve the problem.</p>
<p>I am trying to show some special UTF-8 encoded symbols stored in a SQLite database using a TextView, however all it shows is boxes. I understand what this means is that right... | android | [4] |
4,374,958 | 4,374,959 | override $(element) expression to achieve the same functionality as $(element).length | <p>Is it possible what I have mentioned in the title?</p>
<p>I would like to use this for checking existence of an element like so:</p>
<pre><code>if($('#item')){...}
</code></pre>
<p>Any ideas?</p>
<p>That's the code where I use it:</p>
<pre><code>if($('#auto_redirect_in_3_s').length)//I "wished" $('#auto_redirec... | jquery | [5] |
1,838,949 | 1,838,950 | Create shortcut on desktop C# | <p>I want to create the shortcut(any exe) on desktop. I want to use some API function in C#.I am using framework 3.5. How can i do that? </p>
<p>Thanks & Regards</p>
<p>Vipin Kumar</p>
| c# | [0] |
1,553,333 | 1,553,334 | Switch + Enum = Not all code paths return a value | <p>I'm just curious why this code...</p>
<pre><code> enum Tile { Empty, White, Black };
private string TileToString(Tile t)
{
switch (t)
{
case Tile.Empty:
return ".";
case Tile.White:
return "W";
case Tile.Black:
... | c# | [0] |
1,007,626 | 1,007,627 | Adding Javascript to a website | <p>I have been making websites by myself for a few months now and although I understand the concept of how to add Javascript to a site, I am really struggling with how to best go about it and would have liked some experienced developers opinions/advice.</p>
<p>I have read countless times on SO that it is best practice... | javascript | [3] |
5,608,151 | 5,608,152 | Dynamically modify the content of a Sliding Drawer | <p>I would like to be able to change the content of a sliding drawer when the user clicks on a radio button . For example if user checks radio button "A" and then opens the sliding drawer , it contains 2 edit boxes and a spinner. After the sliding is closed if the user clicks radio button "B" and opens the slider aga... | android | [4] |
2,991,765 | 2,991,766 | How to get <tr> object via jQuery using one of cell content for example **Some Text**? | <p>How to get <code><tr></code> object via jQuery using one of cell content for example <strong>Some Text</strong>?</p>
<pre><code><tr style="border: 1px solid #07234B; border-collapse: collapse;">
<td style="border: 1px solid #07234B; border-collapse: collapse; padding: 2px 2px 2px 2px;">
Som... | jquery | [5] |
4,740,047 | 4,740,048 | A logcat error on Android EditText | <p>This is my code. I would like to save my strings into the shared preference. </p>
<pre><code>private String sla;
private String b;
private String c;
//EditText aa=(EditText)findViewById(R.id.et1);
EditText aa2=(EditText)findViewById(R.id.et2);
EditText aa3=(EditText)findViewById(R.id.et3);
SharedPreferences setting... | android | [4] |
532,898 | 532,899 | why cant i use ttk in python? | <p>when i type from Tkinter import ttk it say that there is no module named ttk and also on many websites online the t in tkinter is always lowercase but when i type tkinter in python it throws an error. why is that?</p>
| python | [7] |
4,664,397 | 4,664,398 | is there such thing as resetting radio button? | <p>i would like to create a reset button that will unchecked the checked radiobutton in windows form.. can i just clear it by using radiobutton.Clear();?</p>
| c# | [0] |
1,736,798 | 1,736,799 | PHP serialize - Store an image | <p>Would it be possible to write a script that gave the user the ability to upload a file (Image gif,jpg,png) and the <code>serialize</code> it and store as text?</p>
<p>Essentially the user doesn't have any storage so wouldn't be able to upload a file and store as a file, but I've hijacked a profile field that can st... | php | [2] |
1,251,162 | 1,251,163 | How to save a webpage as image from a web application | <p>Is it possible to save web page as image with web application? if yes then how?.I searched and searched and searched but all examples i found were for windows application and i'm facing lot of trouble while converting that code for web application.</p>
<p>Any help or suggestion would be appreciated.</p>
| c# | [0] |
316,775 | 316,776 | How to ensure zoom controls always shown on a MapView? | <p>I'm having awful problems with this. I have a MapView, in my activity I set the flag to show the zoom controls, and it works. But then the user navigates to another activity, comes back to the map, and the zoom controls have gone.</p>
<p>Is there a simple way to ensure the zoom controls are always present, or do I ... | android | [4] |
5,637,945 | 5,637,946 | use javascript to read a link resource without ajax | <p>Not sure if it's possible but how do I read a resource from a url using javascript without ajax?</p>
<p>for example, the following url is a static text file containing json encoded text</p>
<p><a href="http://mysite.s3.amazonaws.com/jsonencodedcontent.txt" rel="nofollow">http://mysite.s3.amazonaws.com/jsonencodedc... | javascript | [3] |
2,155,924 | 2,155,925 | How do I fade out text when scroll to a div using jQuery | <p>I want add fade out to my footer text when click on scroll to footer div</p>
<p>Here an example <a href="http://jsfiddle.net/JpsjX/" rel="nofollow">http://jsfiddle.net/JpsjX/</a></p>
<p>So here, when I click <code>Scroll to footer</code> link and I want add some animation on text <code>I want to Fade Out This Text... | jquery | [5] |
5,020,208 | 5,020,209 | Java regex to split by comma but ignore comma inside comments | <p>I need regex to split the string by Comma(,) but ignore the comma in commented part
I tried a lot after changing your regex.It was not succesful
eg.</p>
<pre><code>Command=RTRV-EQPT, Completion Code= DENY, Error Code= II:AC, Problem Description= /* Input Inva,lid *******ACcess =iden:tifier */, Comment=null,
</code... | java | [1] |
3,144,868 | 3,144,869 | Looper and Handler in android | <p>Any body can define and provide me sample for looper and handlers in anroid. (i.e Pipeline Threading in andorid).
Thanks</p>
| android | [4] |
5,717,718 | 5,717,719 | zero length arrays | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1036666/what-is-the-usage-of-array-of-zero-length">What is the usage of array of zero length?</a> </p>
</blockquote>
<p>What is the purpose of zero length arrays.Are they of any use or just like that because the... | java | [1] |
5,809,084 | 5,809,085 | Java: Currency symbol based on ISO 4217 currency cod | <p>Below program prints the Currency symbol given the ISO 4217 currency code.</p>
<pre><code>import java.util.*;
public class Currency{
public static void main(String args[]) {
Currency myInstance = Currency.getInstance(args[0]);
System.out.println(myInstance.getSymbol());
}
}
</code></pre>
... | java | [1] |
597,009 | 597,010 | Why did I need to specify a specific class to import in python? | <p>I just upgraded to Python 2.7.1 (on Mac) so I could use OrderedDicts.</p>
<p>After trying to run the following script:</p>
<pre><code>import collections
test = OrderedDict()
</code></pre>
<p>I got:</p>
<pre><code>NameError: name 'OrderedDict' is not defined
</code></pre>
<p>I fixed it with:</p>
<pre><code>fro... | python | [7] |
1,252,558 | 1,252,559 | Javascript getElementByID().innerHTML() not working | <p>I'm new to Javascript and for some reason I can't get the following code to work and it's driving me crazy!</p>
<p>It's</p>
<pre><code> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xm... | javascript | [3] |
876,522 | 876,523 | Move Magnifier window | <p>I want to use my Android phone to control the magnifier on Windows 7. I can call it by simulating the shortcut key "WIN" + "+". Then, I got the magnifier on the screen. When I tried to move the magnifier window, it usually could be done by moving the mouse pointer. The problem is when I use <code>SetCursorPos</code>... | c# | [0] |
1,918,480 | 1,918,481 | Sandboxing with javax.script | <p>I'd like to add scripting functionality to an app that runs in a Java EE container. The javax.script API seems ideal, since I can support multiple languages with one API; the catch is, the scripts may be coming from untrusted sources, so I need to restrict what they can do. Basically, here are my requirements:</p>
... | java | [1] |
4,158,018 | 4,158,019 | Javascript: Adding days to any date | <p>I've read through a number of topics now and have not found one quite on point.</p>
<p>Here's what I'm trying to do:<br>
1) Parse a bill date that is provided in the format mm/dd/yy and is frequently not today<br>
2) Add a variable number of days to the date. The terms are saved in the dueTime array below. I limit... | javascript | [3] |
2,905,765 | 2,905,766 | Get all controls from composite for a specific control type | <p>how do i get an specific control type (e.g. all buttons) from a single composite inside a swt page?</p>
<p>Regards
mmm...</p>
| java | [1] |
1,087,546 | 1,087,547 | Object creation error : Object reference not set to an instance of an object | <p>I am trying to create an object of class <strong>appManager</strong> in <strong>Processor</strong>. The object creation is throwing an error in logs. if I comment the below line, application works fine. </p>
<p>appManager obj = new appManager ();</p>
<p>Error:
"Object reference not set to an instance of an objec... | c# | [0] |
4,892,878 | 4,892,879 | Heavy Constructors or use a method | <p>Both of these methods are kind of working for me, but I'm not sure what the recommendation would be from a "good practice" point of view.</p>
<p>I have a class which performs various control functions within my library, so needs to initialise all sorts of objects and properties.</p>
<p>Is it okay to put all this l... | c# | [0] |
946,341 | 946,342 | How does compiling happen only for the first time in projectless development? | <p>I read these words in a book:</p>
<blockquote>
<p><strong>Projectless development simplifies debugging</strong>: When creating a web project, you must recompile the entire application when you change a single page. With projectless development, each page is compiled separately, <em>and the page is only compiled w... | asp.net | [9] |
996,807 | 996,808 | ASP.NET gone FUBAR on a production machine | <p>Today we tried to put an ASP.NET application I helped to develop on yet another production machine. But this time we got a very weird error.</p>
<p>First of all, from all the ASP.NET pages, only Login.aspx was working. The rest just show a blank screen when they should have redirected to Login.aspx. The HTTP respon... | asp.net | [9] |
2,017,384 | 2,017,385 | How can I show datas on gridview when selecting a dropdownlist in ASP.NET? | <p>I have a dropdownlist and a gridview. When Dropdownlist is selected , gridview should show the data. </p>
| asp.net | [9] |
4,716,646 | 4,716,647 | How to make loop | <p>This would helps me a lot to understand how does loop works</p>
<p>Let say i've database table <code>my_table (id,words)</code> and here is example of database</p>
<pre><code>INSERT INTO `my_table` VALUES (1,'hello manal');
INSERT INTO `my_table` VALUES (2,'nice manal');
INSERT INTO `my_table` VALUES (3,'pretty ma... | php | [2] |
4,828,571 | 4,828,572 | Is there a way to force just a single character from the onscreen keyboard | <p>I'd like to invoke the Android onscreen keyboard to just retrieve a single character. Is there a way to do this?</p>
<p>I am working on a hangman application and need to take input one character at a time. The plan is to have a text area for each guessed letter, and display the soft keyboard when the user selects a... | android | [4] |
44,397 | 44,398 | errors in android.permission.INJECT_EVENTS | <p>I have designed 2 applications, </p>
<p>1) Which is a <code>service</code> and is running in the <code>background</code>. </p>
<p>2) Which runs in the foreground, which just has an <code>EditText</code>. now, i want to insert some values into EditText using the service. In logs i found, the error <code>not allowed... | android | [4] |
2,738,317 | 2,738,318 | How can I detect an overlapping elements using JQuery? | <p>How can I detect that an element has overlapped another ?</p>
| jquery | [5] |
2,466,795 | 2,466,796 | Is there any way to run user uploaded pages securely on PHP? | <p>I would like to upload files (php sites/applications) to given directory and run them there, within my web server. However, already a simple shell_exec call can cause serious consequences.</p>
<p>All the things I can think of are setting the pages directory outside the public_html and setting the permissions automa... | php | [2] |
2,201,046 | 2,201,047 | Run progress bar while switching Activity | <p>im stuck in a situation where i am switching from activity 1 to activity 2.
i am using Thread.sleep(5000) to start another activity after 5 seconds
But the progress bar which i want to run for five seconds also sleeps with the first activity
Pleaze help me as to when i click next Button on first activity a progress ... | android | [4] |
3,488,528 | 3,488,529 | C# for web using VS2010 | <p>sorry i know its prolly been posted before, but i can't quite seem to get the answer i'm looking for and i have scooped for hours....
So, simple, i'm just looking for books that specialise in c# web applications for visual studio 2010, not VB or windows apps, but specialised c# web apps using VS2010, form controls, ... | c# | [0] |
726,229 | 726,230 | Using a Regular Expression Validator for numbers in a textbox | <p>How can I use a Regular Expression Validator to ensure that only a number like 3.00 is entered into a text box?</p>
| asp.net | [9] |
4,122,487 | 4,122,488 | How to find out which view is focused? | <p>I need to find out if any view is focused inside an Activity and what view it is. How to do this?</p>
| android | [4] |
3,605,839 | 3,605,840 | Creating a form from an object in python | <p>Ok.. I am a noob to Python but work with PHP a lot.</p>
<p>Basically I am trying to figure out how to take an object -- for example:</p>
<pre><code>{key:value,key:value}
</code></pre>
<p>or</p>
<pre><code>{key:[value,value,value],key2:value2}
</code></pre>
<p>and turn them into forms:</p>
<pre><code><input ... | python | [7] |
4,981,533 | 4,981,534 | jquery toggle div based on radio button selection | <p>I have a radio button group on a survey form whose html looks like:</p>
<pre><code><label>Would you like to compete?</label>
<input type="radio" name="compete" value="2" id="competenoradio" >
<label for="compete_no">No</label>
<input type="radio" name="compete" va... | jquery | [5] |
101,481 | 101,482 | Performance implications when using singleton from non-singletons in Java? | <p>Suppose there are several instances of a class simultaneously calling service methods defined in a singleton class. </p>
<p>Can some one explain to me what happens at the low level when a method is called in a singleton when that method is already being executed by some other instance of the class? I am thinking th... | java | [1] |
2,564,106 | 2,564,107 | how to perform insert, update and delete operations in Gridview binded with LIST OBJECT | <p>I need to develop a master detail form in which i want to bind gridview control with a list object..on every insert, update and delete it should update the list object accordingly and on submit button I want to loop through the list object and add items in database. On Update it should update the item exactly the sa... | asp.net | [9] |
4,071,190 | 4,071,191 | Nullpointerexception and onPause(): a mystery | <p>I'm writing a game on Android and this issue has stumped me. I overrode onPause() to enable the game to save its data to internal storage when it is not visible anymore. It works correctly until three or four times of pressing back or home. I get this instead:</p>
<pre><code>Thread [<1> main] (Suspended (exce... | android | [4] |
5,628,982 | 5,628,983 | Can anyone explain me the difference between these two loopings? | <p><a href="http://jsperf.com/jquery-each-vs-for-loop/108" rel="nofollow">http://jsperf.com/jquery-each-vs-for-loop/108</a> </p>
<pre><code>for (var b = a[0], len = a.length; len; b = a[--len]) {
newArray.push(
b
);
}
</code></pre>
<p><strong>and</strong></p>
<pre><code>for (var i = 0, len = a.length; i &l... | javascript | [3] |
4,629,888 | 4,629,889 | getWindow().getAttributes()/setAttributes() not working when screen orientation is changed | <p>I was writing a code for screen flashing. Screen flashes repeteadly in some interval so i have done that job on asynctask. Everything is working ok until i change my screen orientation (at runtime i.e i have settings preference in my project also where i can change orientation).
Here is the very rough code:</p>
<pr... | android | [4] |
374,537 | 374,538 | Text extractor php | <p>I have this page <a href="http://inviatapenet.gethost.ro/sop/test1.php" rel="nofollow">test1.php</a> on this other page <a href="http://inviatapenet.gethost.ro/sop/test.php" rel="nofollow">test.php</a> i have this php code running:</p>
<pre><code> <?php
libxml_use_internal_errors(true);
$doc = new DOMD... | php | [2] |
1,011,373 | 1,011,374 | Stream identification in Android OpenTok Android SDK | <p>At present I am using <a href="http://www.tokbox.com/opentok/api" rel="nofollow">OpenTok</a> android SDK for my application. I am stuck with the issue of how to know which stream is associated to which user.</p>
<p>For example, suppose there are four users A, B, C, D that are publishing their streams to each other ... | android | [4] |
1,452,412 | 1,452,413 | Multiple File Upload on a single button click | <p>I have added AJAX Controls. Is it possible to upload multiple files using "AsyncFileUpload" control ? If so, how will you do it ? If not, is there any third party multiple file upload controls to be used in ASP.Net using C# ?</p>
| c# | [0] |
4,397,215 | 4,397,216 | Saving Listview(records) offline in database in Android...? | <p>I am new to Android development. I am fetching records using API and showing it in a listview, but that only works when I am connected to internet. I want to save those records offline so that the user can see them offline too. </p>
<p>Please help me with it..<br>
Please provide some code sample.<br>
Thanks</p>
| android | [4] |
2,079,818 | 2,079,819 | Error when using static member variable in multiple cpp files with Windriver diab | <pre><code>//A.h file
class A
{
private:
static int i;
public:
static void testStatic()
{
//This function uses static member variable i.
cout << "This function uses static member variable i" << endl;
}
};
//B.h file
class B: public A
{
public:
B()
{
}
~B()
{
... | c++ | [6] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.