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,273,882 | 1,273,883 | Get image url from a <img> tag via preg_match | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/3820666/grabbing-the-href-attribute-of-an-a-element">Grabbing the href attribute of an A element</a> </p>
</blockquote>
<p>there is image:</p>
<pre><code><img id="image" src="/dxkxkx.jpg" />
</code></pre>... | php | [2] |
2,125,901 | 2,125,902 | JavaScript cleaner/purifier? | <p>Is there any way to cleanup JavaScript code? </p>
<p>I want to enable users to post arbitrary JS but i want to filter some of it out, like eval and document.write. Do you know of any tool that can do this?</p>
| javascript | [3] |
1,242,542 | 1,242,543 | Security and Global variable | <p>Is there any security risks to using a global variable (singleton) initialized in the global.asax file. I plan on storing app settings like connection strings in there.</p>
<p>Thanks </p>
| asp.net | [9] |
2,126,117 | 2,126,118 | Set an element as percentage width using a variable? | <p>How do you set an element as percentage width using a variable?</p>
<pre><code>var progBarValue = $('.days-due').text();
$('.bar').width(progBarValue%);
</code></pre>
| jquery | [5] |
4,619,936 | 4,619,937 | java.lang.VerifyError in Android application | <p>Hello I get this error every time I'm trying to open an activity</p>
<pre><code>java.lang.VerifyError: com.karriapps.smartsiddur.Saharit
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1429)
at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
at android.... | android | [4] |
5,923,360 | 5,923,361 | Include separate project as a view in xml | <p>So, I have created a complex view in a separate Eclipse ADT project. It consists of items laid out in XML and then the items animated in an activity.</p>
<p>What I want to do is convert this so that I can include it as a view in another project I am working on.</p>
<p>I have an idea that I need to create a class ... | android | [4] |
5,201,677 | 5,201,678 | C#: loop through appdomains in assembly | <p>how to loop through appdomains in assembly?</p>
| c# | [0] |
5,781,028 | 5,781,029 | Inline functions in C++ | <p>Hii ,</p>
<p>I am a novice in C++. I did read about inline functions and understood them right. But <a href="http://www.parashift.com/c++-faq-lite/inline-functions.html" rel="nofollow">this</a> site says that "We get an 'unresolved external' error if we write the definition of an inline function in one .cpp file an... | c++ | [6] |
3,331,047 | 3,331,048 | how to get javascript calender value on server side | <p>I am new on Asp.net. I am using Javascript calender It use Input tag.if I use <code>runat="server"</code> so that I can get value on cs page then it does not display calender. How can I get calender value from input tag to .cs page </p>
| asp.net | [9] |
4,372,347 | 4,372,348 | Adding the same function to many elements (using js prototypes?) | <p>In my application, I receive a collection of Comments with JSON.</p>
<p>Then, I want to add functions to every item in this collection, so for example if a Comment has <code>comment.first_name</code> and <code>comment.last_name</code>, I want to build <code>comment.full_name()</code>.</p>
<p>So far, I'm doing:</p>... | javascript | [3] |
4,158,719 | 4,158,720 | Get AD Account Via asp.net | <p>This might be a simple question. I am creating a website were authentication will be using an AD Account. AD username will be stored in SQL Server Database Table and when a customer tries to open the website it will take his/hers AD Account and make sure it exists in the database and if so it will let them into the ... | asp.net | [9] |
4,251,514 | 4,251,515 | Add a variable in an existing variable name in javascript | <p>in the beginning i declare a variable like this:</p>
<pre><code>var content = "likes";
var main_likes_data = true;
</code></pre>
<p>And later i want to change the variable to false, but i need to add a new variable like this:</p>
<pre><code>main_" + content + "_data = false;
</code></pre>
<p>But this does not w... | javascript | [3] |
5,808,184 | 5,808,185 | Retrieve Regeistered users info - asp website | <p>i have created an intranet website using visual studio(c#) , i have published it as well and it works fine . the website has a registration page and lets user to create accounts , my problem is whenever someone registers in website , i would like to see the list of registered users and assign them permissions(member... | asp.net | [9] |
3,560,517 | 3,560,518 | Applying an event handler to elements through a loop in Javascript | <p>I would like to add an Event Handler for all of my <code><td></code> tags. I've tried the following:</p>
<pre><code>var allSquares = document.getElementsByTagName("td");
for (var i = 0, len = allSquares.length; i < len; i++){
allSquares[i].addEventListener('ondragover', allowDrop, false);
}
</code></pre>... | javascript | [3] |
1,851,197 | 1,851,198 | Which dll should I use to create excel file with dynamic data and to do conditional formatting depending upon the dynamic data in c# | <p>I want to create a excel file with multiple sheets containing dynamic data and I want to do conditional formatting depending on the data, so which dll should I use that is freely available.</p>
| c# | [0] |
304,085 | 304,086 | Crazy talk (paranoid about initialization) | <p>I learned long ago that the only reliable way for a static member of be initialized for sure is to do in a function. Now, what I'm about to do is to start returning static data by non-const reference and I need someone to stop me.</p>
<pre><code>function int& dataSlot()
{
static int dataMember = 0;
retu... | c++ | [6] |
4,598,807 | 4,598,808 | Make a long int easier to read | <p>I'm working on a fairly simple console application but I got one little problem. It's very hard to read large numbers unless you go close to the monitor and look very carefully. It's very important that the user immediately can see how much it is. For example, which of these is the easiest to read?</p>
<pre><code>1... | c# | [0] |
4,165,434 | 4,165,435 | How to make an exception for "," and "." in KeyPress Event? | <p>Note: This is not about EXCEPTIONS!</p>
<p>I'm trying to make a textbox accept everything but Symbols and Punctations... but I need to allow "," and "." . I'm using:</p>
<pre><code>if (char.IsPunctuation(e.KeyChar) == true)
{
e.Handled = true;
}
if (char.IsSymbol(e.KeyChar) == true)
{
e.Handled = true;
... | c# | [0] |
1,952,133 | 1,952,134 | convert this string into decimal | <p>Sounds easy but when I tried to achieve i'm stock about how is the formatter to make this conversion this are some examples of strings that i need to convert to decimal</p>
<pre><code>00.24
48.34
01.24
</code></pre>
<p>Does anybody know how can i Accomplish this?? I tried like this</p>
<pre><code>try
{
decimal... | c# | [0] |
4,338,066 | 4,338,067 | Javascript passing parameters into function | <p>Hey, i cant seem to get this to work, im a little confused on how im supposed to pass the colour paramaters:</p>
<pre><code>function colourGreen(red, green, blue)
{
document.getElementById("button1").style.backgroundColor = 'rgb(red,green,blue)';
}
</code></pre>
<p>.............
.......... | javascript | [3] |
2,387,373 | 2,387,374 | Create anonymous type from string | <p>So I have a anonymous type which I have used ToString on, and put into a file. It looks like this (and remarkably like JSon...):</p>
<pre><code>{ Name = Name, Description = Description, Status = Pending, Key = Template, SubmittedBy = MyName, Identity = 2fb7a40b-e07a-4f1a-a48b-2c2720567f35 }
</code></pre>
<p>now I ... | c# | [0] |
4,007,040 | 4,007,041 | How to build multi dimensional array for store this? | <p>I want to store information like below with a key like key = activity window then other info under it, then another key etc..</p>
<pre><code>key: 'activity window'
name: 'Recent Activity'
iconCls: 'activity'
module: 'activity-win'
</code></pre>
<p>any idea how to put this into a multi dimensional array?</p>
| php | [2] |
54,178 | 54,179 | Why can't I assign a new value to "this" in a prototype function? | <p>Why can I do this:</p>
<pre><code>Array.prototype.foo = function() {
this.splice(0, this.length);
return this.concat([1,2,3]);
}
</code></pre>
<p>But I can't do this:</p>
<pre><code>Array.prototype.foo = function() {
return this = [1,2,3];
}
</code></pre>
<p>Both functions destroy the value of this a... | javascript | [3] |
4,037,139 | 4,037,140 | Javascript windowwidth - resize | <p>I'm trying to figure out with this isn't working.
It used to take care of height instead of width, but i simply can't get it it work.
Anyone could point me in the right direction of the problem perhaps?</p>
<pre><code> function getWindowWidth() {
var windowWidth = 0;
if (typeof(window.inn... | javascript | [3] |
5,333,135 | 5,333,136 | Is there a way to convert Class object to Java source string? | <p>I use <code>Class.forName("classname")</code> to get a Class object, I want to convert to Class object to String, which means decompile the java file, and show this string to GUI.</p>
<p>How can I do? Thanks</p>
| java | [1] |
4,104,647 | 4,104,648 | How do I load an image in PHP | <p>I'm completly newbie to PHP.
i want a code to load a image to PHP server and then send it to browser.
for example i want to once page named sample.php is requested, in response send an image to browser...
in other words, I want to create a PHP file that acts like a proxy...</p>
<p>Thanks all</p>
| php | [2] |
3,882,189 | 3,882,190 | How to authenticate users before downloading files? | <p>For example, if users want to download /webroot/files/bigimage.jpg, they are given a URL www.domain.com/download.php?filename=bigimage.jpg. Then,</p>
<ol>
<li>How to prevent unauthenticated users
to access the file bigimage.jpg?</li>
<li>If an authenticated user visits that
URL, I want to trigger the download
behav... | php | [2] |
4,613,879 | 4,613,880 | Navigation bar (iphone) | <p>I have created email functionality view in which everything is working fine, but the color of a navigation bar item is not changing like other views. I have used below code for navigation color but 1 navigation bar button item is left with default color. How do I change it?</p>
<pre><code>controller.navigationBar.b... | iphone | [8] |
3,952,697 | 3,952,698 | how to swap an element with jquery? | <p>I have the following setup within my HTML document...</p>
<pre><code><div id="logo"><h2>my top logo</h2></div>
<div id="one"><p>this is the first section with stuff in it</p></div>
<div id="two"><h1>this is the section section with stuff in it</h1>&l... | jquery | [5] |
5,242,584 | 5,242,585 | Building JavaScript objects representing a tree | <pre><code>function createObjects(element, depth){
element.label = element.getElementsByTagName("label")[0].firstChild.nodeValue;
element.url = element.getElementsByTagName("url")[0].firstChild.nodeValue;
element.depth = depth;
if(treeWidths[depth] == undefined){
treeWidths[depth] = 1;
}... | javascript | [3] |
4,081,815 | 4,081,816 | Removing useable time slots from an array | <p>I'll ask my question in a moment first allow me to explain what I've done and am trying to accomplish.</p>
<p>Goal: Only show times that are available for a service to be booked on a muli-staff calendar.The import thing here is that services have minimum booking times (in minutes) </p>
<p>Approach:</p>
<p>Steps</... | php | [2] |
2,378,748 | 2,378,749 | socket permission in java | <p>Through java applet I am trying to get socket connection from a client to the server. I encountered "Access denied - SocketPermission". Please let me know the changes I need to make in the Applet and in the server program.</p>
<p>Thanks,
John</p>
| java | [1] |
4,466,141 | 4,466,142 | c#: reading html source of a webpage into a string | <p>i would like to be able to read the html source of a certain webpage into a string in c# using winforms</p>
<p>how do i do this?</p>
| c# | [0] |
4,266,431 | 4,266,432 | Native Heap Maximum size and release of memory | <p>I am a little bit confused about the native heap on android, I would
like know the native heap max size, there is a way to know it? </p>
<p>Like </p>
<pre><code>getRuntime().maxMemory()
</code></pre>
<p>which I use for know the maximum limit of VM heap. </p>
<p>Another question is relative at how the native ... | android | [4] |
75,432 | 75,433 | Need help in understanding a small part of a basic class in c++? | <p>Can somebody explain me what is being done in the CVector CVector::operator+ (CVector param). How does the dot operator work with temp. I understand when you do object.function() but how does it make sense to do object.object does this just set them both equal to each other? Confused!!</p>
<pre><code>#include <i... | c++ | [6] |
3,804,773 | 3,804,774 | "The Web is not marked as an application in IIS" | <p>I am using IIS 5.1 and .Net 2005. I'm getting an error while opening a .NET application as local ISS.</p>
<pre><code>Error - The Web is not marked as an application in IIS.
</code></pre>
<p>I have checked the directory in IIS and it seems everything is in right place.</p>
<p>How might I resolve this?</p>
| c# | [0] |
2,141,634 | 2,141,635 | Parse Multi-Part Email with Sub-parts using Python | <p>I am using this function to parse an email. I am able to parse "simple" multi-part emails, but it produces an error (UnboundLocalError: local variable 'html' referenced before assignment) when the email defines multiple boundaries (sub-parts). I would like the script to separate the text and html portions and retu... | python | [7] |
600,133 | 600,134 | Can I call constructor within an arithmetic expression? | <p>I am implementing a Matrix class and I overloaded the <code>*</code> and <code>+</code> operators. I also have a constructor:</p>
<pre><code>Matrix (int row, int col, const elemType &init_val)
</code></pre>
<p>that constructs a matrix initialized to hold init_val in all positions. So based on this implementat... | c++ | [6] |
1,489,023 | 1,489,024 | Android, on touch listener and padding? | <p>As soon as I set padding on one of my image views, the click function does not work:</p>
<pre><code>myImageView.setOnTouchListener(new View.OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
switch (event.getAction() & MotionEvent.ACTION_MASK) {
//do stuff
<... | android | [4] |
1,324,507 | 1,324,508 | How to remove an appended() image using jquery? | <p>In my web application I have around 10 headings with same class name, so when a user click on that a loading image will be appended to them and some data will be filled via ajax in a div then after this whole processing i just want to remove that loading image.</p>
<p>Here is my code:</p>
<pre><code>jQuery('.reply... | jquery | [5] |
535,184 | 535,185 | Android Emulator for Tablet | <p>My PC is core i-5 with 4gb RAM.</p>
<p>whenever i try to run an AVD in eclipse it comes fast, if i want to run an AVD for TAB it take 5 to 10 minutes. Is there any way to make it fast? Also some time it comes with blackscreen says open gl es API problem type something</p>
<p>Also after fast run, i dont close it, i... | android | [4] |
882,761 | 882,762 | Is there any difference between setData and changeData? | <p>I don't see any difference between the two functions.</p>
<p>Using the following JavaScript code:</p>
<pre><code>var x = {};
$(x).bind({
setData: function (event, key, value) {
console.log("setData()", key, value);
},
changeData: function (event, key, value) {
console.log("changeData()", key, value)... | jquery | [5] |
2,928,627 | 2,928,628 | Alternatives to adding dynamically generated inline JavaScript | <p>Generating inline JavaScript in HTML has always made me feel dirty and after having used <a href="http://en.wikipedia.org/wiki/Yahoo!%5FUI%5FLibrary" rel="nofollow">YUI</a> a bit I get the sense that it's best to leverage HTML elements as an alternative. Would it be insane to use a hidden <ul> to store keys an... | javascript | [3] |
2,749,982 | 2,749,983 | Moving an image 10px on hover and changing opacity | <p>I have my code below which works well but i also want to move the image down 10px and back again on mouseout as well as putting the opacity back to 0.7.</p>
<pre><code>$('#drinksList section a img').load(function() {
$(this).data('height', this.height);
}).bind('mouseenter mouseleave', function(e) {
... | jquery | [5] |
4,320,329 | 4,320,330 | Having a button open an alert window, create a new button, and then open a new alert window | <p>This is my basic code without the html header and ending. I am trying to do a javascript button push to help people realize the dangers of clicking on random links or buttons from within a web page. I have been able to get everything but the show_alert2 function to work. I am very new to javascript so I might just b... | javascript | [3] |
2,495,669 | 2,495,670 | How can I play a video? | <p>How can I play a video in Android? Where do I put my video file?</p>
| android | [4] |
4,779,608 | 4,779,609 | how to make "Farm Flip - Memory Match for Kids" like memory based game | <p>i'm about to developp a memory game for children <a href="http://itunes.apple.com/gb/app/farm-flip-memory-match-for/id380346867?mt=8" rel="nofollow">like</a>,i have 6 different images show in in random order in 12 places. note(each image show twice) and i want to know how to set images randomly and how to mach UIIm... | iphone | [8] |
37,335 | 37,336 | HELP! jCarousel won't initialise properly! | <p>HELP!</p>
<p>My code:</p>
<pre><code><script src="jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="jquery.tabs.pack.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$('#container-1').tabs(... | jquery | [5] |
3,887,348 | 3,887,349 | On InMobi Addtracker My application is not getting reported | <p>I am using inmobi in my android application.
For that i am using InMobiAdTrackerAndroid.jar with this jar i am following documentation.</p>
<p>1: We are using following codes inmy application Launcher class
IMAdTrackerUtil.setLogLevel(LOG_LEVEL.VERBOSE);
IMAdTrackerAnalytics.getInstance().startSession(getApplicati... | android | [4] |
115,602 | 115,603 | Session for multiple files when logged in? | <p>I have <strong>/admin/</strong> folder with multiple files in it that get POST/GET and do certain things with my data base. The question is do I need to do (<code>if $_SESSION['isAdmin'] == true</code>) at the beginning of every file to enable access to those files only to <strong>admin</strong> who is logged in or ... | php | [2] |
1,974,735 | 1,974,736 | custome control event in list view android | <p>I have a listview. which is mase by custome control..
and custome control class extends baseadapter class.
one of my custome control is button..
so onclick of that particular button I have to find position of row..
pleas tell me howz it possible</p>
| android | [4] |
2,105,542 | 2,105,543 | How to pass argument to a jquery function through an onClick event? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/3273350/jquery-click-pass-parameters-to-user-function">jquery .click pass parameters to user function</a> </p>
</blockquote>
<pre><code> $('#topleft').click(function (x) {
loadPopupBox();
$("#popupinn... | jquery | [5] |
816,597 | 816,598 | starting an .exe file from c++ in windows | <p>I try to start an a program from my code in c++ Visual studio.
I tried those cmds: </p>
<pre><code>system( "\" C:/Program Files (x86)/scilab-5.3.3/bin/WScilex.exe\"");
system( "start" C:/Program Files (x86)/scilab-5.3.3/bin/WScilex.exe\"");
system( "\" C:\\Program "" Files""(x86)\\scilab-5.3.3\\bin\\WScilex.exe""... | c++ | [6] |
1,261,669 | 1,261,670 | visual c sharp progress bar with background worker | <p>i have the following code that updates my progress bar in visual c sharp. it works fine and the bar moves for each percentage. but i also have code that i got from a post on another site, that is suppose to put the progress bar value in the middle of the progress bar as % percentage. it displays the % of the progres... | c# | [0] |
5,850,664 | 5,850,665 | set setInAnimation and setOutAnimation while starting activity | <p>I have the following situation </p>
<pre><code>TabActivity>group activiyt>(A->B->C)
</code></pre>
<p>Here A,B and C are activities. And me loading like this</p>
<pre><code> setContentView(this,getLocalActivityManager().startActivity("zero",intent.addFlags(Intent.FLG_ACTIVITY_CLEAR_TOP)) .getDecorView(... | android | [4] |
936,105 | 936,106 | Parsing Domain From URL In PHP | <p>I need to build a function which parses the domain from a URL.</p>
<p>So, with <code>http://google.com/dhasjkdas/sadsdds/sdda/sdads.html</code> or <code>http://www.google.com/dhasjkdas/sadsdds/sdda/sdads.html</code>, it should return <code>google.com</code>; with <code>http://google.co.uk/dhasjkdas/sadsdds/sdda/sda... | php | [2] |
4,733,081 | 4,733,082 | How to access/escape PHP object member with a $ character in its name? | <p>I'm decoding some JSON (from the Youtube data API) with json_decode and it gives me an object that looks like this when var_dump()ed:</p>
<pre><code>object(stdClass)[29]
public 'type' => string 'text' (length=4)
public '$t' => string 'Miley and Mandy! KCA VIDEO WINNERS' (length=34)
</code></pre>
<p>How c... | php | [2] |
4,399,395 | 4,399,396 | How to check if an application is present in /system/app folder? | <p>I want to check if a specific apk is present in system app folder. How can I do that?</p>
| android | [4] |
5,514,542 | 5,514,543 | How to create e-book store with php? | <p>How do I create a downloadable ebook store with PHP? Please suggest any tutorial!</p>
| php | [2] |
3,550,713 | 3,550,714 | Can I mutiple select object variables in jQuery? | <p>Something like doesn't work, what's the work around?</p>
<pre><code>var tgtCol = $('td[aria-describedby=tblGrid_Subject]');
var tgtHdr = $('#tblGrid_Subject');
$(tgtHdr, tgtCol).attr('colSpan', '3');
</code></pre>
| jquery | [5] |
38,608 | 38,609 | CollectionChanged event gets executed for non associated object | <p>I have two ObservableCollection objects and obj1 has attach to collection change event. Obj1 has a value from obj2 by obj1 = obj2. When I add any item on obj2 it execute collection changed event of object 1. I could not understand why this is happening.</p>
<blockquote>
<pre><code> public MainWindow()
{
... | c# | [0] |
874,949 | 874,950 | Performance issue with javascript spell check | <p>After integrating spell checking into our web application with <a href="http://javascriptspellcheck.com/" rel="nofollow"> Javascript Spell Check </a> we are facing performance problem with the application. The application slows down after some time and it affects normal actions like scrolling the web page. Has any... | javascript | [3] |
5,195,437 | 5,195,438 | How can I switch the activity of the content of a tab in Tabhost | <p>I have created a TabHost and in 1 of the tab, I have added the content using </p>
<pre><code> mTabHost.addTab(mTabHost.newTabSpec("tab1")
.setIndicator(getString(R.string.dialerIconLabel),
getResources().getDrawable(R.drawable.ic_tab_dialer))
.setContent(inten... | android | [4] |
4,514,604 | 4,514,605 | highlight a text in textview | <p>How can we highlight a text in textview like the imgage shown below,the user tap the select verse it hilight the verse in yellow color and a popup window apper for that verse for doing action.How to do this?
Thanks in advance.<img src="http://i.stack.imgur.com/o1Jrc.png" alt="enter image description here"></p>
| iphone | [8] |
5,270,337 | 5,270,338 | Define Variable with Function | <p>I need help explanation of this script</p>
<pre><code>var test = {
property_1 : 'aaa',
property_2 : 'bbb'
}
var place = function(str, ph){
return test[ph];
}
</code></pre>
<p>What is the meaning of definition <code>place</code> and what will be return type of that function?<br>
I can't understand from... | javascript | [3] |
1,535,041 | 1,535,042 | Help with google maps link for Iphone | <p>i have a google maps link which will open the google map application...@"http://maps.google.com/maps?q=cupertino"...instead of a specific location i want it to open with the current longitude and latitude..would the link be like @"http://maps.google.com/maps?q=ll" like that...or is there a different way to do it?</p... | iphone | [8] |
2,954,806 | 2,954,807 | Remove tags that created after page load with jQuery | <p>I have small application:
<a href="http://jsfiddle.net/Bwdf6/4/" rel="nofollow">http://jsfiddle.net/Bwdf6/4/</a></p>
<p>But with click on delete, tags that created after page load doesnt remove.
Is there any way to remove tags that created after page load?</p>
<p>Thanks in advance</p>
| jquery | [5] |
1,490,892 | 1,490,893 | webview : how to handle javascript code from multiple web pages | <p>In a WebView, how do you access the JavaScriptInterface from multiple web
pages, and not just from the page that you load via mWebView.loadUrl("http://10.241.139.45:9081/amexco/login.html")</p>
<p>e.g.</p>
<p>In my project's assets folder, I have:</p>
<pre><code>login.html
page1.html
page2.html
</code></pre>
<p... | android | [4] |
251,700 | 251,701 | Using RandomFileAccess to temporarly cache audio data | <p>I'm currently using a simple byte array buffer to cache live audio data and than playback this data. So it's constant reads and writes on this buffer. My problem is that I sometimes need this buffer to be atleast 1MB and I know that allocating that much memory is most likely not a good idea. So therefore I'm lookin... | android | [4] |
3,740,367 | 3,740,368 | why private value of the obj can be changed by class instance? | <pre><code>#include<iostream>
using namespace std;
class A
{
private:
int value;
public:
A(int init):value(init){}
void changevalue(A &a){a.value = 100;}//why a's value can be changed?
void printvalue(){cout << value << endl;}
};
int main(int argc , char *... | c++ | [6] |
5,386,784 | 5,386,785 | JavaScript typewriter script not working | <p>Well basically I tried to make a typewriter script from scratch, for my little terminal web app junkie xD</p>
<p>Well, I've got this JavaScript thingy:</p>
<pre><code>var str = "dude";
var num = 1000;
for (var i = 0, len = str.length; i < len; i++) {
var num = num + 100;
var dude = str[i];
setTimeout('document.... | javascript | [3] |
1,719,765 | 1,719,766 | how different between & new class and new class in php | <p>hello i need ask from different between </p>
<pre><code>$var=new class;
$var= & new class;
</code></pre>
<p>and if different in stack and speed code </p>
<p>thank you</p>
| php | [2] |
4,411,553 | 4,411,554 | com.google.android.maps not available | <p>I'm new to Android and I'm using IntelliJ to develop. I'm going through various tutorials, etc and now I'm trying to run/compile Wrox project that uses com.google.android.maps</p>
<p>IntelliJ wouldn't compile, it complains that this package does not exist.</p>
<p>How do I add it to project? I have everything downl... | android | [4] |
4,690,027 | 4,690,028 | DataGridView of C#.net | <p>How to set event when we change the value of DataGridView1. That means when I changed the value of cell, I want to display the text in another cell. </p>
<p>Example : Old Cell value = Nepal
I am typing on this cell : N
NE
NEP
Every changed o... | c# | [0] |
4,174,836 | 4,174,837 | Function to generate alpha numeric sequence number based on input number | <p>I am trying to develope a routine in C# that will take a given input integer and return a 6 character alpha numeric string based on a predefined possible set of characters.</p>
<p>The possible characters to use are: </p>
<p>"0123456789ABCDEFGHJKLMNPQRSTUVWXYZ" (note that the letter "I" and "O" are not in the set.)... | c# | [0] |
6,033,694 | 6,033,695 | How to set background dynamically for an imageView from SD card? | <p>I have the path of the image that is present in my SD card .i want to set this as the background for an imageview. Is that possible to use the same method as from URl?
Please help..</p>
| android | [4] |
5,986,980 | 5,986,981 | Where can I get a good study guide for java? | <p>Please suggest me some good website to collect java materials for more specific.</p>
<p>Thanks in Advance.</p>
| java | [1] |
1,492,088 | 1,492,089 | set the position for pop up | <p>Im new to jquery.
I'm loading the pop up in my asp.net application.
I want set the postion for pop up.
Now its opening at center postion.
please let me know how can I show the pop up on top.
Can I mention the pixels for top postion?
Please let me know how to do it.</p>
<p>here is my code</p>
<p><code>var popup = 0... | jquery | [5] |
3,887,208 | 3,887,209 | Android 3.2 remove title from action bar | <p>I'm working with eclipse, android 3.2. and a virtual machine running android x86. (v3.2)</p>
<p>I use the Holo theme and I want to remove the action bar title and icon. So I do </p>
<pre><code>@Override
public void onCreate(Bundle savedInstanceState)
{
ActionBar actionBar = getActionBar();
actionBar.setDis... | android | [4] |
1,152,122 | 1,152,123 | Why cant I step into this loop in Visual Studio | <p>For some reason, Visual studio will not step into this code and I cant see the contents of the variable k and p</p>
<pre><code> for(int k=0; k<6; k++)
{
for(int p=0; p<6; p++)
{
if(k=0)
{
leve... | c++ | [6] |
5,703,236 | 5,703,237 | javascript undefined variable - doesn't seem like it? | <p>Sorry for the long code, but my environment does not support script tags.</p>
<p><a href="http://pastebin.ca/2105293" rel="nofollow">http://pastebin.ca/2105293</a></p>
<p>I try to call loadbang (line 976) and get</p>
<pre><code>_r.Multistrokes[z].name is undefined
</code></pre>
<p>I thought I defined it right th... | javascript | [3] |
4,695,571 | 4,695,572 | C# - Error Using Code Previously Posted Here | <p>I am attempting to use the code found in the answer here: <a href="http://stackoverflow.com/questions/2553008/directory-move-doesnt-work-file-already-exist">Directory.Move doesn't work (file already exist)</a></p>
<p>This is exactly the method I need, but when I try to add it to my code, the line</p>
<p><code>... | c# | [0] |
5,838,922 | 5,838,923 | Layout for android | <p>I need to have a layout for my widget, but I don't know how to arrage my images on widget screen.</p>
<p>I need to have 4 small Images on first row</p>
<p>then 2 Images on 2nd row</p>
<p>1 Image on 3rd row</p>
<p>and 1 Image on 4th row</p>
<p>Could you please someone create the xml file ?</p>
| android | [4] |
3,947,129 | 3,947,130 | PHP output buffer is not empty? | <p>I have this peculiar problem. I am making an AJAX call to a PHP page. In case of error I am returning the string "error" to success: <code>function(msg)</code> i.e. msg will have the value "error". But for some reason it is sending back "error" but with a line break preceding it. And this fails the condition when i ... | php | [2] |
2,050,792 | 2,050,793 | Value gets passed to function without me clicking the button | <p>When I try to pass a value when a button is clicked the value gets passed anyway (even without me clicking the button). This is not supposed to happen because I want to hide an image only when the button is clicked
Why is this happening? </p>
<pre><code>for ( i = 0; i < divs.length;i++){
knopdiv[i] = docum... | javascript | [3] |
5,853,377 | 5,853,378 | how to test a string for letters only | <p>how could I test a string against only valid characters like letters a-z?...</p>
<pre><code>string name;
cout << "Enter your name"
cin >> name;
string letters = "qwertyuiopasdfghjklzxcvbnm";
string::iterator it;
for(it = name.begin(); it = name.end(); it++)
{
size_t found = letters.find(it);
}
</c... | c++ | [6] |
4,560,319 | 4,560,320 | document.createElement('img') vs. new image() | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/6241716/is-there-a-difference-between-new-image-and-document-createelementimg">Is there a difference between <code>new Image()</code> and <code>document.createElement("img")</code>?</a> </p>
</blockquote>
<p>On ... | javascript | [3] |
2,677,240 | 2,677,241 | Killing COM object from C# | <p>I have a COM object that we are calling from C#. This works great, and I have my own pool of objects that I can use whenever I want. Now I need to kill the object. I've tried releasing the COM object explicitly and then garbage collecting from another thread, but that does nothing. Does anyone have any other ideas t... | c# | [0] |
5,043,035 | 5,043,036 | auto complete jquery | <p>how do I make the auto complete jquery (multiple) start with the char (not any chars contained)? so if the user types 'j, it only list word starts with 'j' not all words containing j</p>
<p>thanks</p>
| jquery | [5] |
5,367,978 | 5,367,979 | Can anyone tell me how to download whole project in android? | <p>I want to download the whole project from this link:</p>
<p><a href="http://www.netmite.com/android/mydroid/packages/apps/Contacts/" rel="nofollow">http://www.netmite.com/android/mydroid/packages/apps/Contacts/</a></p>
<p>Can anyone guide me?</p>
| android | [4] |
1,755,952 | 1,755,953 | PHP CLI stopped working | <p>On my dedicated CentOS linux server my PHP CLI has stopped working. I have scripts written by a developer that require CLI and these scripts were working until yesterday. Another oddity that happened at the same time was that the symbolic link in /usr/local/bin/ to php was lost. I recreated that but it's still not w... | php | [2] |
3,858,444 | 3,858,445 | alter some attributes of an html/xml string | <p>I have some strings that are a sequence of html paragraphs:</p>
<pre><code><p style="text-align: justify;"><strong> strong text> <a href=\"skhf\">alink</a></p>
<p> another par </p>
</code></pre>
<p>I want to change paragraph and link style, so adding/removing attributes... | android | [4] |
2,803,769 | 2,803,770 | Turning on error reporting for a JavaScript segment? | <p>I haven't worked in JS since 1999, so I'm quite rusty. I remember working in it in the past, and I was able to enable some kind of error reporting. Right now, when I have a syntax error in a script, no error is reported in the browser. Is there a directive or something to enable error reporting in a JS file?</p>
| javascript | [3] |
5,530 | 5,531 | How can I manage the location of my application icon in android | <p>After installing my application, I want to locate the application icon into my folder, not directly appear at the main menu .
How can i write to change it after app installed .</p>
| android | [4] |
4,467,014 | 4,467,015 | android: how to read the date & time from system alarm services | <p>for example i setup system alarm to 4:25 and i close the program. (the server is working) </p>
<pre><code>How_Many_Day = 1;
Total_Day = How_Many_Day * 24*60*60*1000;
Intent myIntent = new Intent(AndroidAlarmService.this, MyAlarmService.class);
pendingIntent = PendingIntent.getService(AndroidAlarm... | android | [4] |
1,100,122 | 1,100,123 | can I know which Keyboard Key has been pressed before hitting Enter | <p>can I know which Keyboard Key has been pressed before hitting Enter.is there any way to capture such key pressed event in c++ ??Please provide a short example of it.
i'm using VC++ on Windows 32bit.</p>
| c++ | [6] |
1,546,954 | 1,546,955 | Custom Sorting Python Dictionary | <p>So I have a dictionary that looks like this when I print it:</p>
<pre><code>{'10': -10, 'ZT21': 14, 'WX21': 12, '2': 15, '5': -3, 'UM': -25}
</code></pre>
<p>I want to sort these in a custom manner, which I define. Let's say the way I want it to be sorted (by key) is <code>ZT21</code>, <code>10</code>, <code>WX21<... | python | [7] |
900,333 | 900,334 | why is resource management order important? | <p>In Stroustrup's book The C++ Programming language, He mentions "It is typically important that resources are released in the reverse order of their acquisition"
why the order is important?</p>
<pre><code>void acquire()
{
acquire resource 1;
...
acquire resource n;
use resources;
release resource n;
...
rele... | c++ | [6] |
1,516,240 | 1,516,241 | facebook friend status | <p>how to get status update of user friends from facebook for iphone app</p>
| iphone | [8] |
5,075,687 | 5,075,688 | Draw arrow dynamically ina android | <p>I am developing an app , in which i want to make diff shapes like arrow,rectangles, lines, free draw etc dynamically on finger touch, i am able to draw line, free draw, rectangles but i am not getting the arrow.i also search a lot on google but didn't find anythng relevant.Please suggest if someone has a solution. <... | android | [4] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.