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,825,991 | 1,825,992 | Using PHP to Extract Content From Tags | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/3577641/how-to-parse-and-process-html-with-php">How to parse and process HTML with PHP?</a> </p>
</blockquote>
<p>Given an HTML file, how can PHP be used to extract strings from each, say, <code><font></co... | php | [2] |
4,888,850 | 4,888,851 | Error in Simple Cursor Adapter, not working | <pre><code>Cursor searchCursor = getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
new String[] {"_id",Phone.DISPLAY_NAME}, Phone.DISPLAY_NAME + " like ?",
new String[]{ "%" + cc.get("contactName").toString() + "%"}, null);
startManagingCursor(searchCursor);
while(searchCu... | android | [4] |
334,940 | 334,941 | Android - Honeycomb - Action Bar tab fragments save/restore state | <p>In the docs it says to ensure you save a fragment's state when using tabs with the action bar so that when you switch tabs the fragment will look as it did before. How is this done? Using the sample for handling tabs, onSavedInstanceState is not called when the tab is switched so where would I save the state? Do I d... | android | [4] |
4,662,470 | 4,662,471 | Windows Service application app.config | <p>I developed a Windows service application and in my <code>app.config</code> file I need to encrypt my password and decrypt in my application. </p>
<p>How can I do this ?</p>
| c# | [0] |
4,008,123 | 4,008,124 | iPhone Dev. Apps: "Promo Codes" button in iTunes is missing | <p>I have got a few apps in my iTunes Developer Backend.
Since yesterday the "Promo Code" button is missing in some of my apps details view. The rest of my apps have still this button and I can download promocodes. Does any one know this problem and maybe solved it?</p>
<p>Thx :-)</p>
| iphone | [8] |
1,293,477 | 1,293,478 | C# Modulus Counting | <p>Good Day,</p>
<p>I am writing an application where I'm downloading a file that is over 30MB. I am keeping track of how many bytes that have been currently been downloaded.</p>
<p>My question is:</p>
<p>I want to determine when I go past 1M, 2M, 3M and so forth.</p>
<p>My logic is:</p>
<pre><code>int totalFileS... | c# | [0] |
2,425,922 | 2,425,923 | What is the difference between setting properties to the global object and the window object? | <pre><code>this.f = function() {};
window.d = function() {};
d();
f();
</code></pre>
<p>Any difference?</p>
| javascript | [3] |
5,496,035 | 5,496,036 | Change browser time | <p>Is there any way to change the browser's time without manipulating the system clock?</p>
| javascript | [3] |
2,931,804 | 2,931,805 | Method with Var Method input? | <p>In C#:</p>
<p>Is it possible define a method that <strong>input parameter</strong> is any <strong>method</strong>?</p>
<p>Let me better description:</p>
<p>I want a method with signature </p>
<pre><code>bool IsDoit(var method)
{
try
{
method(...);
return true;
}
catch{return false... | c# | [0] |
192,503 | 192,504 | Get Another Process' QueryPerformanceCounter() | <p>I'm trying to run QueryPerformanceCounter() function from a particular process and get its return value to my C# application. Since those two processes (my application and the application i'm trying to affect) are different, what kind of strategy should i follow?</p>
| c# | [0] |
1,791,647 | 1,791,648 | Canvas Larger Than Screen | <p>I am drawing a grid and I want it to be larger than the screen size so that a user can drag the screen left/right/up/down to get to the rest of the grid.</p>
<p>What is the best way to do that? I've tried drawing a larger bitmap to the canvas, but didn't get anywhere. </p>
<pre><code> protected void onDraw(Canva... | android | [4] |
2,681,752 | 2,681,753 | Dendropy interpop module python | <p>I'm currently trying to work with the python Dendropy library and include some PAUP commands inside my code.</p>
<p>I'm using the tutorial mentioned in the <a href="http://packages.python.org/DendroPy/tutorial/paup.html" rel="nofollow">python library</a>, but it's giving me an error.</p>
<p>So what I'm doing is I'... | python | [7] |
4,081,106 | 4,081,107 | static method - when to return an array argument as void and return as an array? | <p>I've been reading this section about static methods and about passing arrays by call-by-reference. So my question is: When is it ever a good time to return an array argument as an array as opposed to void?</p>
<p>Thanks in advance!</p>
| java | [1] |
3,308,296 | 3,308,297 | getApplication use in onClick method | <p>I use Application to access my data.
And while buttom be click, I want to use the data which in Application.
I use below code:</p>
<pre><code>b.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
MyData md = (MyData)this.getApplication();
md.setName("");
md.setIP("");
}
});
</code></p... | android | [4] |
4,086,991 | 4,086,992 | Is this an example of selectors? | <p>I see the following piece of code</p>
<pre><code>input[type='button']text:visible:enabled:first
</code></pre>
<p>What does this code do. Which feature of jquery is this? Is this selector example? Any links to read more on it?</p>
| jquery | [5] |
2,364,561 | 2,364,562 | I am using addClass/removeClass and "data-" attribute to show/hide divs. How can I add next/previous? | <p>I am trying to work out the template for an ebook. This is what I have at present: <a href="http://jsbin.com/otakab/2/edit" rel="nofollow">http://jsbin.com/otakab/2/edit</a> But the next/previous doesn't work. Can you supply working code?</p>
<pre><code>// Following function works
$(function() {
$(".pageNumbe... | jquery | [5] |
842,150 | 842,151 | How to detect shortcut in Home screen | <p>I have an app that allows you to create "shortcuts" in Home Screen. But can i detect if the "shortcuts" already exist, i didn't have to create it again.
Thanks.</p>
| android | [4] |
4,838,621 | 4,838,622 | How to detect context in Views | <p>I have simple template system for my View, something like:</p>
<pre><code><h2>%var1%</h2>
</code></pre>
<p>And when I want escape variable i use filter:</p>
<pre><code><h2>%var1|html%</h2>
</code></pre>
<p>But I want to write "system" to detect context of current variable. System will ret... | php | [2] |
948,618 | 948,619 | How can I cast a Long to an int in Java? | <pre><code>Long x;
int y = (int) x;
</code></pre>
<p>Eclipse is marking this line with the eror: Can not cast Long to an int.</p>
| java | [1] |
4,319,075 | 4,319,076 | Overloaded output operator in base class | <p>I have a number of classes that represent various computer components, each of which have an overloaded <code><<</code> operator declared as follows:</p>
<pre><code>friend ostream& operator << (ostream& os, const MotherBoard& mb);
</code></pre>
<p>Each returns an ostream object with a uniqu... | c++ | [6] |
4,279,050 | 4,279,051 | jQuery - Reversing the sequental fade-in plugin | <p>I'm wondering if there ar any ways to make this plugin: <a href="http://www.thewebsqueeze.com/web-design-tutorials/sequential-fade-in-jquery-plug-in.html" rel="nofollow">http://www.thewebsqueeze.com/web-design-tutorials/sequential-fade-in-jquery-plug-in.html</a> showing fade in items at the top?</p>
<p>Thanks a lot... | jquery | [5] |
501,800 | 501,801 | How does this method work? | <p>I have often come across this way of registering an action listener.</p>
<p>Though I have been using this method recently but I don't understand how's and why's of this</p>
<p>Here is one :{</p>
<pre><code>submit=new JButton("submit");
submit.addActionListener(new ActionListener(){ // line 1
public void ... | java | [1] |
468,209 | 468,210 | AVPlayerItem metaData notifications | <p>I've a HTTP live streaming app. that its videos contains metadata, I need to trigger an event when metadata faced but using AVPlayerItem!!!
How can I do that??</p>
| iphone | [8] |
193,859 | 193,860 | How can we add shadow on the image only rounded and other part same as previous? | <p>We can give a shadow effect all above the image but if we wanna give the shadow for some particular shape like as circle and the other part of image does not effected by the shadow then what should i do to handle this ?</p>
<p>thanks in advance .</p>
| android | [4] |
3,466,083 | 3,466,084 | How to deal with the certain pattern of tuples | <p>if </p>
<pre><code>list_1 = [(1, 1), (1, 3), (1, 4), (2, 2), (2, 3)]
</code></pre>
<p>Consider an element of the tuple as (i, j) Now we know if we know that if we know that if (1, 3) exists then (1,1) and (1,2) should exists if any one of it is missing an error is reported. The error detection should be done one b... | python | [7] |
5,471,050 | 5,471,051 | php __get method and visbility types behavior | <pre><code>class Magic{
public $a="i";
public $b=array("a"=>"A","b"=>"B","c"=>"C");
public $c=array(1,2,3);
public function __get($v)
{
echo "<br/>get->$v";
return $this->b[$v];
}
public function __set($var,$val)
{
echo "<br/>set->$var: $val,... | php | [2] |
653,882 | 653,883 | How to reach "globals" from inside a class in PHP | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1877136/access-global-variable-from-within-a-class">Access global variable from within a class</a> </p>
</blockquote>
<p>I got the following code:</p>
<pre><code>
$foo = 'foo';
class bar
{
public function ... | php | [2] |
1,865,086 | 1,865,087 | How Would I have a Gift App or Add App Store Rating Button into an app | <p>I know that apps in the App Store have a gift this app and ratings button links right in the app that link directly to the page. How would I get the URL of my apps gift this app and rating page?</p>
<p>Regards.</p>
| iphone | [8] |
4,025,505 | 4,025,506 | Loop won't stop at given value | <p>I was trying to create a sliding panel that will hide itself with a simple js animation.
Here the developing link: <a href="http://carportal.webpronto.it" rel="nofollow">http://carportal.webpronto.it</a>
just click on "hide panel" to see the search tab go left.</p>
<p>The issue is the following:
I tried to give a v... | javascript | [3] |
4,142,887 | 4,142,888 | What is purpose of using `void` here? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/666936/what-is-the-point-of-void-in-javascript">what is the point of void in javascript</a> </p>
</blockquote>
<p>What is purpose of using <code>void</code> here ? if just remove <code>void()</code>, it should a... | javascript | [3] |
5,805,860 | 5,805,861 | Does List.subList keep a reference to the original list? | <p>If I have a variable</p>
<pre><code>LinkedList list
</code></pre>
<p>and repeatedly do the following to extract the tail of 'list'</p>
<pre><code>// Some operation that adds elements to 'list'
// max_size = some constant
list = (LinkedList) list.subList(list.size()-max_size, list.size());
</code></pre>
<p>do I e... | java | [1] |
4,098,491 | 4,098,492 | How to stripe rows with jQuery while excluding some particular rows | <p>I'm using the following to stripe rows:</p>
<pre><code>$(".stripeMe tr:even").addClass("alt");
</code></pre>
<p>I have a table with some rows. To mark the rows for the user I set one (or more rows) to have</p>
<pre><code>style="background-color: red;"
</code></pre>
<p>Is there a way to continue to use my existi... | jquery | [5] |
5,313,993 | 5,313,994 | Why am I forced to os.path.expanduser in python? | <p>I'm sure it's intentional, so can someone explain the rationale for this behavior:</p>
<pre><code>Python 2.7.2 (default, Oct 13 2011, 15:27:47)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from os.path import isdir,expanduser
... | python | [7] |
455,886 | 455,887 | Find out value of child custom control from parent custom control at client side | <p>How to find out the value of child custom control from parent custom control on client side.</p>
| asp.net | [9] |
4,635,394 | 4,635,395 | StringBuilder performance in C#? | <p>I have a <code>StringBuilder</code> object where I am adding some strings like follows:</p>
<p>I want to know which one is better approach here, first one is this:</p>
<pre><code>StringBuilder sb = new StringBuilder();
sb.Append("Hello" + "How" + "are" + "you");
</code></pre>
<p>and the second one is:</p>
<pre><... | c# | [0] |
1,489,449 | 1,489,450 | Android spinner prompt text not showing | <p>The first year from the data array is shown instead of the text from prompt in my spinner. I tried adding the prompt in XML, but I also tried from code. Furthermore, it gives me a "resource not found error", when adding the spinnerSelector attribute.</p>
<h3>XML</h3>
<pre><code><Spinner
android:id="@+id/spi... | android | [4] |
796,579 | 796,580 | What is wrong with this code??? it says the error Identifier expected | <pre><code> public static Dictionary<uint, Items.GroundItem> ItemFilter(Client C, Dictionary<uint, Items.GroundItem> oggettiInteri)
{
Dictionary<uint, string> Filtr = new Dictionary<uint, string>();
Dictionary<uint, Items.GroundItem> Rientro = new Dictionary<uint,... | c# | [0] |
473,944 | 473,945 | Rand() function cause error when I replace static value with random value | <p>What am I doing wrong</p>
<p>I have this script, and added the <code>$randnumber = rand(100, 500);</code> function to it, this should generate a random number for me between 100 and 500.</p>
<pre><code> $randnumber = rand(100, 500);
function word_limiter( $text, $limit = $randnumber, $chars = '0123456789' )
... | php | [2] |
1,204,848 | 1,204,849 | how can i insert a break line after a ul element - using Jquery | <p>I would like to insert a br after the first UL element
I have used both after and insertAfter but it inserts it multiple times.
thanks in advance</p>
<pre><code> <div id="usual1">
<ul class="tabs1">
<li><a href="#Home" class="selected">Home</a></li>
<li><a href="#NewPage... | jquery | [5] |
2,520,758 | 2,520,759 | can we send messages to user even when the application is closed in iphone sdk? | <p>i m making an application where data is accesed from website and displayed with an application.i have made an action which will tell the user that new data has arrived.this will work properly if the application is open .but if the application is closed than ,is there any way to tell the user that new data has arrive... | iphone | [8] |
1,670,891 | 1,670,892 | cross-platform splitting of path in python | <p>I'd like something that has the same effect as this:</p>
<pre><code>>>> path = "/foo/bar/baz/file"
>>> path_split = path.rsplit('/')[1:]
>>> path_split
['foo', 'bar', 'baz', 'file']
</code></pre>
<p>But that will work with Windows paths too. I know that there is an <code>os.path.split()<... | python | [7] |
5,301,727 | 5,301,728 | how to display the go back style UIBarButtonItem programmatically | <p>When One of my app nagivate from one controller ti another, the 'go back' UIBarButtonItem disappear, so I wrote codes:</p>
<pre><code> UIBarButtonItem *barButton1 = [[UIBarButtonItem alloc] initWithTitle:@""
style:UIBarButton... | iphone | [8] |
3,005,893 | 3,005,894 | Intercept Phone Calls to display contact Info | <p>This question is more of a "is it possible" question.</p>
<p>Is it possible for Android to use a different contact list from an application when displaying the identity of an incoming caller?</p>
<p>So for example, if a person calls and their identity is in the apps contact list, but NOT in the internal devices co... | android | [4] |
1,033,283 | 1,033,284 | Help with __add__ | <p>I am trying to understand how <code>__add__</code> works:</p>
<pre><code>class MyNum:
def __init__(self,num):
self.num=num
def __add__(self,other):
return MyNum(self.num+other.num)
def __str__(self):
return str(self.num)
</code></pre>
<p>If I put them in a list</p>
<pre><code>d... | python | [7] |
2,660,445 | 2,660,446 | A way to get at non-static information from Static Context | <p>I know you can't static members from instance members.</p>
<p>But lets say I have in one assembly this:</p>
<pre><code>public class ClassA
{
public List<order> GetOrders(int orderID)
{
...
}
}
</code></pre>
<p>Then in another assembly this:</p>
<pre><code>public static ClassB
{
priv... | c# | [0] |
3,425,124 | 3,425,125 | Replace string using php preg_replace | <p>Hi all i know preg_replace can be used for formatting string but i need help in that concerned area my url will be like this</p>
<p><a href="http://www.example.com/index.php/" rel="nofollow">http://www.example.com/index.php/</a><br>
also remove the http,https,ftp....sites also</p>
<p>what i want is to get
result ... | php | [2] |
2,073,375 | 2,073,376 | Javascript Date Sorting | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/4365116/javascript-date-sorting-by-convert-the-string-in-to-date-format">Javascript date sorting by convert the string in to date format</a> </p>
</blockquote>
<p>Hi, </p>
<pre><code>2010-11-08 18:58:50
2010-1... | javascript | [3] |
732,801 | 732,802 | ajax star rating control not updating | <p>i am using ajax based star rating control... i have created a usercontrol for it... on my page i have placed the usercontrol... their is strange behaviour... on rating_changedd event i set the readonly to true and update the database... but after postback when page reload it still allow me to update the rating... </... | asp.net | [9] |
1,491,152 | 1,491,153 | How to set time range in a day using UIDatePickerView | <p>I am using UIDatePickerView, just like we can set the date range using "maximumDate" and "minimumDate", is there any way to set time range in a day like from 9.00 am to 6.00 pm ?</p>
| iphone | [8] |
2,953,535 | 2,953,536 | "Minimal" source files to create Android app using Eclipse + ADT | <p>I am trying to understand the anatomy of a MINIMAL Android application, using Eclipse + ADT (Android Development Toolkit).</p>
<p>Please can you advise what is the MINIMAL set of source files I need, for example :-</p>
<pre><code>src / package / MainActivity.java
res / layout / activity_main.xml
res / menu / activ... | android | [4] |
3,635,976 | 3,635,977 | Java: Do Thread pools execute tasks simultaneously or sequentially? | <p>My understanding of thread pool is that that when you pass a thread pool a method it picks a thread from its active pool and sends the method off to be executed. My understanding of a thread is that if you put some code in it, it will run through the code without stopping until it is told to sleep or stop.</p>
<p>M... | java | [1] |
4,507,554 | 4,507,555 | jQuery grab specific img src folder name | <p>So my img src generates like this <code>img/0001/name0001/img0001.jpg</code> and im trying to grab <code>/name0001/</code> only any idea ? thanks!</p>
<p>my code:</p>
<pre><code>var parent = $('.img');
$(parent, document).click(function() {
var dirz = this.src;
var dirb = dirz.split('/')[2... | jquery | [5] |
2,924,572 | 2,924,573 | show a message if the filename already exists | <p>I am using c# .net windows form application.
i have to save few inputs in defaultsetting.xml file but if there is invalid file with same file name "defaultsetting.xml" i should show msg in the status bar.. How can I do this?</p>
| c# | [0] |
4,099,466 | 4,099,467 | Cross-references and garbage collection | <p>There is an application with an extensive object graph. This graph mainly consists of a set of subgraphs which are connected to the rest of the graph through the only reference. But internally each such subgraph has some number of cross-references among objects. Once in a while such a sub graph needs to be thrown aw... | java | [1] |
5,337,693 | 5,337,694 | Hide function is not working | <p>I have simple hide and show function but it is not working. any help would be appreciated </p>
<pre><code><head>
<script type="text/javascript">
$(function(){
$('a').click(function(){
var visible= false;
if(visible){
$('div').hide('slow')
}
else {
$('div').show('slow')
}
... | jquery | [5] |
3,406,058 | 3,406,059 | How can I create a carousel? | <p>I looked for answers on this, but I can not find an example that could help me. I am looking to do a carouselle of this form can finger-scroll with arrows.</p>
<p><img src="http://i.stack.imgur.com/nRpsA.png" alt="enter image description here"></p>
<p>Thanks for the help</p>
| android | [4] |
1,652,198 | 1,652,199 | jquery, post multiple variables | <p>I am brand new to jquery and trying to modify a basic script from php academy.</p>
<p>the jquery script is:</p>
<pre><code><script type="text/javascript">
function get() {
$.post('getpeopleinjobs.php', {
postvarfname: form.firstname.value,
postvarlname: form.d = surname.value
}, funct... | jquery | [5] |
3,452,591 | 3,452,592 | Problem building following upgrade to Android 2.3 | <p>I picked up the new 2.3 version of the SDK platform and tools, and when I build, I get eight instances of the error below. Then errors about missing resources. Presumably my resources have failed to build.</p>
<pre><code>W/ResourceType( 8168): Bad XML block: header size 146 or total size 3145924 is larger than da... | android | [4] |
248,032 | 248,033 | Display latest image in directory ending in | <p>I'd like to display the last modified image in a directory that ends in a specific way.</p>
<p>I have it working to display the last file in the directory I only don't know how to go about filtering the result to only display the latest in the directory ending in "wide-block.jpg"</p>
<pre><code><?php
$base_url ... | php | [2] |
3,907,572 | 3,907,573 | How do I convert a string into a variable reference? | <p>I have to add a lot of shared folders from a configuration file. the names are very long, but all ends in "Name", "Domain", "Username" and "Password".</p>
<p>An example is:</p>
<pre><code>AddSharedFolder(
myConfigurationHandler.MyConfiguration.MyService.RSController.repositoryName,
myConfigurationHandler.MyCon... | c# | [0] |
2,812,528 | 2,812,529 | Remove all script elements using JS | <p>I am trying to remove all script elements from a HTML page. But for some reason, I can only remove about half of them using the below:</p>
<pre><code>function t(){
var r = document.getElementsByTagName('script');
for (var i = 0; i < r.length; i++) {
if(r[i].getAttribute('id') != 'a'){
... | javascript | [3] |
5,904,291 | 5,904,292 | Merge two list with some order rule in python | <p>I don't know how to give an accurate title, but here's the problem.</p>
<p>The problem:</p>
<p>I want to give a ranking list (imagine some top list) with some position preserved already.</p>
<p>Say I got 7 slots <code>[1, 2, 3, 4, 5, 6, 7, 8]</code> and some has already preserved postion 1, 3, 4, 7, 9. (As we onl... | python | [7] |
5,034,516 | 5,034,517 | Handling network disconnect | <p>I am trying to do "long polling" with an HttpWebRequest object.</p>
<p>In my C# app, I am making an HTTP GET request, using HttpWebRequest. And then afterwards, I wait for the response with beginGetResponse(). I am using ThreadPool.RegisterWaitForSingleObject to wait for the response, or to timeout (after 1 minute)... | c# | [0] |
2,866,292 | 2,866,293 | Identifying a Javascript object | <p>I am having a problem identifying a javascript object</p>
<pre><code>function A(x, y){
this.boo = function(){
}
}
var aa = new A("1", "2");
aa.boo();
</code></pre>
<p>In the code, is 'aa' a javascript object? Does it inherit properties from object.prototype too? If yes, how can I be sure (from a novice).<... | javascript | [3] |
991,146 | 991,147 | how to erase an image drawn by canvas? | <pre><code> @Override
protected void onDraw(Canvas canvas) {
// TODO Auto-generated method stub
Log.d("dd","draw");
mBitmap=BitmapFactory.decodeResource(this.getResources(),R.drawable.image1);
canvas.drawBitmap(mBitmap, srcRect,dstRect,null);
mBitmaps=BitmapFactory.deco... | android | [4] |
5,561,580 | 5,561,581 | setTitle text appearance | <p>I'm using Theme.Dialog on one of my activities. I'm using setTitle(mMyTitle) to set the title. I would also like to set the textAppearance. How would I go about this?</p>
<p>I'm not sure if I can make my own title layout for this, since I'm already using Theme.Dialog.</p>
| android | [4] |
4,736,963 | 4,736,964 | Do return true; continue the script till end in the same function? | <p>My function goes something like this</p>
<pre><code>function multiple_delete($checkbox, $table, $url, $picture1 = 0, $picture2 = 0, $picture3 = 0){
$count = count($checkbox);
for($j=0;$j<$count;$j++)
{
$delete_id = $checkbox[$j];
$query = "SELECT * FROM $table WHERE id = '$delete_id'";
$resul... | php | [2] |
4,383,647 | 4,383,648 | javascript prev next fuction | <p>I have asp.net code as</p>
<pre><code><div class='OuterDiv'>
<div class='InnerDiv' id='product_827'>
<a onclick="javascript:ajaxLightboxPopup(827,'', this)" href="javascript:void(0);"
style='text-decoration: none;'>
<img width='85' height='85' src='pngs/10094... | javascript | [3] |
2,126,733 | 2,126,734 | How to make child page for each story of parent webpage.? | <p>I have posted stories from database to my view.php page.i want to link each story's title with its own webpage (child page of view.php page).for example..</p>
<pre><code>view.php?id=123
</code></pre>
<p>is linked to story no .1 and</p>
<pre><code>view.php?id=124
</code></pre>
<p>is linked to story no. 2</p>
<p... | php | [2] |
2,149,145 | 2,149,146 | How to prevent numbers in the input box and just display text? | <p>I found a script that works but I have no idea how it is working. </p>
<p>The <code>split()</code> method this example uses is giving me painful headache. Does anyone have an idea of how that <code>split()</code> method is working in this example? Can we pass numbers as first argument to <code>split()</code> method... | javascript | [3] |
5,994,382 | 5,994,383 | Java Scaling Font with AffineTransform | <p>Anyone have an example snippet showing how to scale a Font using AffineTransform?</p>
<p>Thanks.</p>
| java | [1] |
3,186,625 | 3,186,626 | How to apply effects to only newly appended nodes (jQuery) | <p>I am loading in html via AJAX and appending it to a DIV but I want to be able to select the newly loaded in html and apply a hide().fadeIn() to elements in that newly appended html.</p>
<p>Current function looks something like this</p>
<pre><code>wall = new Object();
wall.showWall = function (options) {
// Us... | jquery | [5] |
3,950,063 | 3,950,064 | where can i host PHP Zend framework application? | <p>I've created a PHP Zend framework based application and would like to test it by hosting it somewhere. Can anyone please tell me if any free webhost providers exist that has support for zend framework ?</p>
<p>Your help's really appreciated.</p>
| php | [2] |
4,118,350 | 4,118,351 | Jquery: add one line to each class | <p>I have class <code>dot</code> and have html code like that:</p>
<pre><code><span class="dot">Text1</span>
<span class="dot">Text2</span>
<span class="dot">Text3</span>
</code></pre>
<p>I want to add to each element who has class <code>dot</code> additional text automatically. Fo... | jquery | [5] |
5,010,622 | 5,010,623 | When would one use the BRICK permission? | <p>In Android, there used to be a permission with the name <a href="http://developer.android.com/reference/android/Manifest.permission.html#BRICK">BRICK</a> that could be used to potentially disable the device. Other than hearing it as an urban myth, I do not really know if this permission can really be used to brick a... | android | [4] |
5,323,197 | 5,323,198 | jQuery val() function not replacing String correctly | <p>So how the code was supposed to work is that "Logged in as" is being replaced by "Hello":</p>
<pre><code>$("strong:contains('Logged in as:')").val(function (i, w) {
return w.replace("Logged in as:", "Hello");
});
</code></pre>
| jquery | [5] |
3,389,816 | 3,389,817 | Block USB mass Storge or USB Port pro grammatically? | <p>I am working on Device Administrator application,As per requirement I have to block the USB port or USB Storage to prevent device communication through USB.Is it possible to do with Java code? -please share me any sample code or Docs. Thanks in advance..</p>
| android | [4] |
2,416,463 | 2,416,464 | a total sum of 2 textviews | <pre><code>private int ScoreCount;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.score);
final TextView TotalScore = (TextView) findViewById(R.id.TotalScore);
final TextView One... | android | [4] |
579,759 | 579,760 | string::erase() gives different result in linux/windows | <p>I have a piece of code which reads in a line from a file, then removes the whitespace and tells you the length of the string. In windows it works as I expect it to, however in linux it returns a different result.</p>
<p>Code:</p>
<pre><code> // Find how many characters are in the first line
std::string line... | c++ | [6] |
2,222,524 | 2,222,525 | Packing values into a single int | <p>Let's say I have a couple of variables like apple, orange, banana</p>
<p>I have 8 apples, 1 orange, 4 bananas.</p>
<p>Is it possible to somehow convert those values into a single integer and also revert back to their original values based on the computed integer value?</p>
<p>I found an example online.</p>
<pre>... | java | [1] |
1,130,928 | 1,130,929 | Resources NotFoundException? | <p>I'm getting crash reports from android marketplace:</p>
<pre><code>android.content.res.Resources$NotFoundException: Resource ID #0x....
</code></pre>
<p>I get about 17 of these a week. It's pointing me to the following in my code:</p>
<pre><code>context.getResources().getDrawable(R.drawable.foo);
</code></pre>
<... | android | [4] |
5,222,944 | 5,222,945 | How do I create a help overlay like you see in a few Android apps and ICS? | <p>I am wanting to create help overlays like the ones you see when ICS loads for the first time or in apps like ES File Explorer or Apex Launcher (there are more, but I can't think of them right now). Is this just a relative layout with one view sitting on top of the other? I haven't been able to find any sample code f... | android | [4] |
5,810,994 | 5,810,995 | Code echoing a \n somehow | <p>I am using the following code to share my sessions between PHP and Node.JS.</p>
<p><a href="http://pastie.org/4874088" rel="nofollow">http://pastie.org/4874088</a></p>
<p>What the problem is, is that as I have to include it at the beginning of every script, I get a weird problem:</p>
<p>Basically somewhere along ... | php | [2] |
4,222,033 | 4,222,034 | Accessing Label inside a Row in JQuery | <p>I have a textbox and labels inside rows of a table. To access the textbox I'm using<br>
<code>data= $(this).find('#txtName').val();</code></p>
<p>Now I'm not able to access the label in the same way. The label is rendered as<br>
<code><label for="Total">$65.00</label></code></p>
<p>How can I access the... | jquery | [5] |
5,779,181 | 5,779,182 | JQUERY - Waiting for window.location.href to Complete | <p>I am using the following line to kick off main.php which loads an iframe:</p>
<pre><code> window.location.href = '/main.php?token='+obj.token;
</code></pre>
<p>I need to wait for the iframe to complete loading so the $_GET token can be obtained.</p>
<p>After this I want to run the below line to remove the token f... | jquery | [5] |
68,730 | 68,731 | Read asp.net Page Import Directive at runtime | <p>Is there any way to read the asp.net Import directives at runtime? I have an ExpressionBuilder that is passed a number of class names. Right now I have to fully qulify these names but if I could read the namespaces from within the ExpressionBuilder, I can save myself a lot of typeing...</p>
<pre><code><%@ Import... | asp.net | [9] |
4,106,352 | 4,106,353 | How can I convert the special character \u0097 into NsString? | <p>How can I convert the special character <code>\u0097</code> into NsString?</p>
| iphone | [8] |
3,093,345 | 3,093,346 | IF- ELSE condition - run the code in the ELSE section | <p>I have got the following IF condition code:</p>
<pre><code>if ((depth <= min_depth ) && (leaf_colour == "red")){
for (i = 0; i < array_2D.length; i++) {
var leaf_size = array_2D[i][1];
if (leaf_size == 10 || leaf_size == 11){
alert("Error message.");
bre... | javascript | [3] |
1,598,330 | 1,598,331 | XML Parsing.....is AML is supported in iPhone | <p>I m comfortable with XML Parsing....but my response is coming in AML Aras markup language...could any one let me know,,is AML is supported by iPhone...if YES how can i Parse AML response.....appropriate code will be appreaciated</p>
<p>Thank you in advance</p>
| iphone | [8] |
4,864,785 | 4,864,786 | Monitor apps power usage | <p>Is there a way to programmatically access the <code>settings->about phone->battery usage</code> stuff? We'd like to monitor how much power our app is using.</p>
| android | [4] |
4,311,752 | 4,311,753 | Developing FM App for android | <p>Is this possible to develop FM App for android just like how we using in all mobiles?. I'm staying in Bangalore, Karnataka, India and here FM channels are like Radio Indigo (91.90MHz), Radio One (94.30MHz), Radio City (91.10MHz) and others, so i want to access these channels from my app. Is there any tutorial link o... | android | [4] |
3,317,007 | 3,317,008 | Format as currency in Javascript | <p>I have a variable which is made up of a multiplication of 2 more variables</p>
<pre><code> var EstimatedTotal = GetNumeric(ServiceLevel) * GetNumeric(EstimatedCoreHours);
</code></pre>
<p>Is it possible, and if so how, or what is the function called to format this as currency? I've been googling only I cant find ... | javascript | [3] |
4,033,805 | 4,033,806 | How to set the WebChromeClient to open the new page in the same view? | <p>I load the url in the WebView but, when the user click some button the new url is loaded in the android browser not in my webview. What should I do?</p>
<p>Thanks in advance.</p>
| android | [4] |
4,452,448 | 4,452,449 | Exact Word Regex | <p>I used this from another question that I asked
(<a href="http://stackoverflow.com/questions/12908277/whole-word-php-regex">Whole Word PHP Regex</a>)</p>
<pre><code>$partnumber = "4.7585";
$productname = "Eibach 4.7585.880 Sport Plus Kit";
if(preg_match('/[^\B\.]'.preg_quote($partnumber).'[^\B\.]/i', $productna... | php | [2] |
3,554,778 | 3,554,779 | @property @synthesize | <p>Why you do @synthesize and @property things on Xcode? What is the explanation in really simple terms?</p>
| iphone | [8] |
940,035 | 940,036 | How to completely black out background on Android dialog? | <p>I am showing an Activity with dialog theme (android:theme="@android:style/Theme.Dialog")</p>
<p>When I pop up this activity, I want to completely blacken out the background activity. Currently, the activity underneath has too much clutter, and even though it is blurred, it is still too visible.</p>
<p>Thanks.</p>
| android | [4] |
1,628,982 | 1,628,983 | adjusting container position with scrolling | <p>I am attempting to make it so that a set of elements in a div container constantly are present in the a Viewport. I have tried a couple of different approaches but they seem to have repainting issues.</p>
<p><strong>Question:</strong> Any major optimizations to improve performance and remove the visual side effects... | javascript | [3] |
3,083,272 | 3,083,273 | Debug android application | <p>I am developing an Android application where I get the following exception while writing to the database:</p>
<pre><code>An exception occurred: android.database.sqlite.SQLiteException
</code></pre>
<p>But it doest say anything else(not even the stack trace). </p>
<p>In general I find it very difficult to debug an... | android | [4] |
2,390,383 | 2,390,384 | target previous $this | <p>How do I target $this (from 'each' context) from inside 'click' function. I want to remove awkward .parents().find() code.</p>
<pre><code>$('.layout.responsive').each(function () {
$('.area.optional', this).before('<a href="#" class="toggle_responsive" onClick="return false">Show details</p>').hide(... | jquery | [5] |
5,734,804 | 5,734,805 | How to loop through an array that is nested within an object? | <p>I'm trying to get the contents of data within the subject array using jquery. How can this be done ? I tried using <code>$.each</code> but couldn't get the contents . </p>
<pre><code> "student": {
"name": "sdfdsf",
"age": 3,
"subject": [
{
"science": "dfsdfdfd",
"book":... | jquery | [5] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.