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
4,764,405
4,764,406
Add URL into Javascript
<p>How to add this :</p> <p>type: "POST", url: "login.php", in JS code below (exactly in comment "do your ajax call and processing here...":</p> <pre><code>$(document).ready(function() { $("#submit_butt").click( function() { var conf = { frequency: 5000, ...
javascript
[3]
1,618,697
1,618,698
How do I extract the Maps API Key from the keygen files?
<p>I generated a Maps API key by selecting Export Android Application from Eclipse. I created a new keystore and assigned a password to it. After completion of the process I found two files in the newly created keystore...</p> <p>HelloGoogleMaps.apk roys_android_key</p> <p>My question is how do I extract My certifica...
android
[4]
5,177,588
5,177,589
When will I get an arraystoreexception and a classcastexception with respect to generics?
<p>My understanding is that you get an <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/ArrayStoreException.html" rel="nofollow">ArrayStoreException</a> when you try to insert an object of incompatible type. </p> <pre><code>Object[] array = new String[1]; array[0] = 1; </code></pre> <p>Can someone explain...
java
[1]
1,548,988
1,548,989
Is it worth it to switch from home-grown remote command interface to using JMX
<p>Without knowing too much about JMX, I've always assumed that it would be the best approach for building in remote management to our standalone Java server application. Our server application has some minimal remote control capability, using text commands sent via TCP/IP socket to it.</p> <p>Using the home grown app...
java
[1]
866,964
866,965
TypeError: cannot concatenate 'str' and 'builtin_function_or_method' objects
<p>What is wrong with this code?</p> <pre><code>def welcome(name): print "congrats! You created your first Python bank account"+ name print "Hello welcome to the Python bank Account" print"To begin please enter your name" name=raw_input welcome(name) </code></pre>
python
[7]
1,108,623
1,108,624
Is there any Sound filtering library in android
<p>I want to capture an audio and convert it into byte array.<br> But when I record the audio, noise gets added to it. </p> <p>Is there any filtering library in android so that I can remove noise in it.</p> <p>Regards,<br> Sneha</p>
android
[4]
5,475,376
5,475,377
How to read eventObject in .click() handler?
<p>I have the following object:</p> <pre><code>function Controller() { $(".button").click(this.handleClick); } Controller.prototype.handleClick = function(event) { console.log("Clicked: "+event.target.id); }; ... return Controller; }); </code></pre> <p>Is the way I'm reading the eventobject in handleClick() ...
jquery
[5]
4,082,172
4,082,173
uint is 32 bits no matter the system is 32 or 64 bits?
<p>in C#, uint is a UInt32 type so it will be always 32 bits long no matter the OS is 32 or 64 bits. Am I right?</p>
c#
[0]
142,252
142,253
IEnumerable<IMyInterface> Implicitly From Class[] But Not From Struct[]. Why?
<p>Given:</p> <pre><code>public interface IMyInterface{ } public class MyClass:IMyInterface{ public MyClass(){} } public struct MyStruct:IMyInterface{ private int _myField; public MyStruct(int myField){_myField = myField;} } </code></pre> <p>Why can I write:</p> <pre><code>IEnumerable&lt;IMyInterf...
c#
[0]
1,339,115
1,339,116
Android timer set delay
<p>I have a service class in my Android app which uses a timer. The timer is set to run at a delay of 1min (60000ms). I want the user to be able to dynamically change this delay. Normally, in java I could just use timer.setDelay(); but Android does not have this function. </p> <p>Service class so far:</p> <pre><code>...
android
[4]
2,729,163
2,729,164
Issue with pointer to character array C++
<p>I have what I thought should be a very simple snippet of code to write, though I'm unable to compile for a reason which I do not understand.</p> <p>The following simplified code will not compile: </p> <pre><code>char buffer[9] = "12345678"; char* pBuffer = &amp;buffer; </code></pre> <p>Compiler (g++) throws the f...
c++
[6]
5,384,431
5,384,432
Sementation fault 11 in simple SWITCH
<pre><code>int main(){ MyBase *mb; int choice; cout &lt;&lt; "Select: "; cin &gt;&gt; choice; switch (choice) { case 1: mb = new Test1(); break; case 2: mb = new Test2(); break; case 3: mb = new Test3(); break; case 4: mb = new Test4(); b...
c++
[6]
5,407,020
5,407,021
Memory leak using raphael.js with hover
<p>There is a serious memory leak happening using the Raphael library pie chart WITH the hover attribute. If I remove the code that includes the hover attribute it works great and when I add it back in the memory footprint steadily grows and hovering over the piechart increases the memory footprint even more so. Unli...
javascript
[3]
4,432,970
4,432,971
Change in appearance - Widget
<p>How do I choose the appearance of the widget? I mean to give users a choice of looks. Enter into the options and chooses the example of the ListView (To know how to do it) but how to do that when you look (I think that ImageButton) actually reads the selected layout.</p>
android
[4]
5,791,747
5,791,748
exiting a running command in python
<p>I'm new to python. I'm writing a script that calls a command line tool and displays the output from the command on the screen. The issue is that after the command runs it doesn't exit on it's own, it requires manual typing of ctrl-c to stop and continue on with the rest of the python script. Does anyone know how I c...
python
[7]
4,796,454
4,796,455
Contextual Action Bar menu forces items into oveflow menu when there is room
<p>I have a contextual action bar with three menu items, so only three icons. There is definitely room on the cab, but only one icon shows and the other two are forced into the oveflow menu. If I use android:showAsAction="always" in all three menu items then they all show and there is room. However, I would rather use ...
android
[4]
598,681
598,682
Could i convert a jar file to exe?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4330936/java-jar-to-exe">(Java) jar to exe</a> </p> </blockquote> <p>What if i want to run a .jar program on a pc that doesnt have the JDK...?</p> <p>would it possible?</p>
java
[1]
2,042,533
2,042,534
Need iPhone card flip effect , can't figure out how to do it
<p>I'm writing a card game and need a animation to flip them over from one side to the other along the y axses. What would be the easiest way to do this? Is there any good tutors? This is what I did:</p> <p>Found some sample code for using UITransitionView. But it comes up as undeclared on my sdk, and I found out ...
iphone
[8]
5,138,856
5,138,857
What is the best file format for configuration file?
<p>I need a good config file format. I plan on putting to table schema. Like symfony, ruby on rails, etc. What is the best file format for configuration file ? Yaml or XML or JSON encoded file ? Which is the best for this purpose ?</p>
php
[2]
2,933,478
2,933,479
Best way to determine if a file is empty (php)?
<p>I'm including a custom.css file in my template to allow site owners to add their own css rules. However, when I ship the file, its empty and there's no sense loading it if they've not added any rules to it.</p> <p>What's the best way to determine if its empty?</p> <pre><code>if ( 0 == filesize( $file_path ) ) { ...
php
[2]
1,609,807
1,609,808
Find subsequences of strings within strings
<p>I want to make a function which checks a string for occurrences of other strings within them. However, the substrings which are being checked may be interrupted within the main string by other letters.</p> <p>For instance:</p> <pre><code>a = 'abcde' b = 'ace' c = 'acb' </code></pre> <p>The function in question sh...
python
[7]
5,561,256
5,561,257
c++ euclidean distance
<p>This code compiles and runs but does not output the correct distances.</p> <pre><code>for (int z = 0; z &lt; spaces_x; z++) { double dist=( ( (spaces[z][0]-x)^2) + ( (spaces[z][1]-y)^2) ); dist = abs(dist); dist = sqrt(dist); cout &lt;&lt; "for x " &lt;&lt; spaces[z][0] &lt;&lt; " for...
c++
[6]
3,410,444
3,410,445
Show result of long task after a ProgressDialog
<p><br> I have an application which runs a long task and returns a value. While the task is running, a <code>ProgressDialog</code> shows the progress. After the task is done I want to show the result in a <code>TextView</code>. I run the task in a FutureTask.<br> My problem is that if I try to get the result, the <code...
android
[4]
1,479,912
1,479,913
edit Xml File using C#
<p>this is my xml file...</p> <p> </p> <p> --> </p> <p></p> <pre><code>&lt;!--Daily Genarated File Path--&gt; &lt;add key="DailyFilName" value="C:\DailySummary.xls"/&gt; &lt;!--Weekly Genarated File Path--&gt; &lt;add key="WeeklyFilName" value="C:\WeeklySummary.xls"/&gt; &lt;!--Log File Path--&gt; &lt;add key=...
c#
[0]
4,435,216
4,435,217
how to get values from drop down list in php
<p>I have several drop down lists in a table, I am trying to retrive the value of the drop down list if its not 0.</p> <p>I have a table of items each item has the drop down list. Below is how I create the drop down list, I give it the tableid as a name because this is a unique identifier for the particular product.</...
php
[2]
5,111,692
5,111,693
C# how to dynamically cast an object?
<p>I am building a helper object that has a property called Mailer. In reality Mailer can be either a System.Net.Mail.MailMessage or a Mono.System.Net.Mail.MailMessage. So I would preferably only want 1 declaration of mailer. </p> <p>For example I don't want:</p> <pre><code>private Mono.Mailing.MailMessage MonoMessag...
c#
[0]
5,703,247
5,703,248
OOP. Calling methods from within methods
<p>How do I call class methods from functions within the class? My code is:</p> <pre><code>var myExtension = { init: function() { // Call onPageLoad }, onPageLoad: function() { // Do something }, } </code></pre> <p>I've tried ...</p> <pre><code>onPageLoad(); </code></pre>...
javascript
[3]
717,770
717,771
any building tool can automatically understand file dependencies in C++ project?
<p>I have a project with 50+ <code>.h</code> files and 50+ <code>.cpp</code> files. I'm using <code>make</code> to build a project, which looks something like this (it's just a piece of an entire file):</p> <pre><code>HEADERS := $(shell find $(INCLUDE) -name "*.h") %.obj: %.cpp $(HEADERS) $(CPP) $(CPPFLAGS) -fPIC ...
c++
[6]
3,303,680
3,303,681
What is the difference between $('#___') and $('.___') in JQuery
<p>I often see these 2 selectors, what is the difference? Thanks</p>
jquery
[5]
1,218,433
1,218,434
Compiler optimization of references
<p>I often use references to simplify the appearance of code:</p> <pre><code>vec3f&amp; vertex = _vertices[index]; // Calculate the vertex position vertex[0] = startx + col * colWidth; vertex[1] = starty + row * rowWidth; vertex[2] = 0.0f; </code></pre> <p>Will compilers recognize and optimize this so it is essentia...
c++
[6]
1,253,027
1,253,028
preventDefault() is not working
<p>My Goal is to remove the action of checkbox checking by clicking on its label Below is my code.. </p> <pre><code> $('TABLE TBODY TR TD').each(function() { $(this).find('input').each(function() { $('label for='+$(this)+'').preventDefault(); ...
jquery
[5]
754,521
754,522
Dynamically creating image tag to show when silverlight is not installed
<p>I'm using Silverlight.CreateObject to create a silverlight object dynamically. when silverilght is not installed it shows its own patent image from microsoft. I want to replace this image with mine...how can I do this??</p>
javascript
[3]
1,356,836
1,356,837
How to split the string in C#?
<p>Note: </p> <pre><code>string s="Error=0&lt;BR&gt;Message_Id=120830406&lt;BR&gt;" </code></pre> <p>What's the most elegant way to split a string in C#? </p>
c#
[0]
1,704,751
1,704,752
Is there any value in creating an Integer object from an int?
<p>I was walking through some code and came across these lines:</p> <pre><code>public final static int CM_VALUE = 0x200; public final static Integer CM = new Integer(CM_VALUE); </code></pre> <p>Do anyone know why the author held the value in hex before passing it back to <code>Integer</code>? Does doing it this way a...
java
[1]
670,349
670,350
How do I find and replace HTML entities with jQuery?
<p>I've constructed a calendar template for a Drupal site using an HTML table, and I've got jQuery to add a class 'no-text' to each empty cell: </p> <pre><code>$('table.calendar td:empty').addClass('no-text'); </code></pre> <p>This works well, but my problem is that the CMS WYSIWYG editor automatically adds the HTML ...
jquery
[5]
3,597,984
3,597,985
Calling class attribute without creating an instance to that class
<p>I would like to initialize a class, then call an attribute which was set during the initialization, but without creating another instance. As a test example:</p> <pre><code>class t1: def __init__(self, skipInit=False): if not skipInit: print 'Initialized' self.var = 123456 ...
python
[7]
3,842,359
3,842,360
Find the differences - 14x14 Images
<p>I have 23 images, they all are 14 pixels x 14 pixels.</p> <p>In each one there's a letter on a white background (255 255 255 RGB).</p> <p>I want to compare them and find unique blank pixels to identify that letter.</p> <p>For example after that comparing procedure I would like to say that a image 14x14 that has t...
php
[2]
1,303,752
1,303,753
Java: Could not reserve enough space for object heap
<p>I am trying to allocate 2 gigs of ram to a java application started from a bat file using this line of code:</p> <pre><code> @echo off "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -Xmx2G -Xms1G -jar craftbukkit-1.2.5-R4.0.jar pause </code></pre> <p>When I attempt to run it like this, however, it spits out ...
java
[1]
5,815,259
5,815,260
Generate a random string with a specific bit size in java
<p>How do i do that? Can't seems to find a way. Securerandom doesn't seems to allow me to specify bit size anywhere</p>
java
[1]
5,913,434
5,913,435
Adding space to each array output
<p>I'm trying to add a space after each output but its only appearing on the last output</p> <pre><code>if ($en['mm_wmeet']) { $tmp = explode(",", $en['mm_wmeet']); for ($i = 0; $i &lt; count($tmp); $i++) { $en['mm_wmeet'] = $tmp[$i]. "&amp;nbsp;"; } } </code></pre>
php
[2]
735,086
735,087
Post Json Object on server using HttpPost
<p>I have to send json array to the server from android application. i'm able to send data through httpget but i want to send it through httppost i saw the examples but my data are not posting.</p> <p>i get the response code 200 even i'm passing the wrong parameter in url what's the reason behind this. </p> <p>here...
android
[4]
908,875
908,876
Ignore serialize some object fields at runtime (Dynamic Ignore)
<p>I have a webmethod which return an object ASResponse :</p> <pre><code> [WebMethod] public ASResponse test() { return new ASResponse (); } </code></pre> <p>Question :</p> <p>Is it possible to customize the SOAP response by force the compiler do not serialize some ASResponse class fields ( ...
c#
[0]
3,704,715
3,704,716
Don't understand serialize()
<p>I'm looking at this function: serialize() for PHP and I don't really understand what is it's function. Can someone provide a simple example with output? </p>
php
[2]
907,974
907,975
Blip Slideshow plug in Mootools/jQuery conflict
<p>This particular site uses the Blip Slideshow plug in (because it's fed by a Picasa web rss feed) and also a jQuery powered slider. The plug in inserts the Mootools script links ahead of the jQuery ones in the header which breaks the slider. I can push the Mootools links to the footer but then Blip doesn't work. The ...
jquery
[5]
4,400,133
4,400,134
Run app on iTouch w/o iTunes
<p>I have written a small app using Ojective-C w/ XCode. It's only for personal fun and I don't want to pay Apple $99 to just let it run on my iTouch. Is there any alternative for me to run it on iTouch instead of iPhone simulator? Please give me some suggestion.</p>
iphone
[8]
2,045,714
2,045,715
solve a bad Url to clean Url in php?
<p>when I spide a website ,I got a lot of bad url like these. <code>http://example.com/../../.././././1.htm</code> <code>http://example.com/test/../test/.././././1.htm</code> <code>http://example.com/.//1.htm</code> <code>http://example.com/../test/..//1.htm</code></p> <p>all of these should be <code>http://example.co...
php
[2]
2,856,237
2,856,238
Python Cartesian Product
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/533905/get-the-cartesian-product-of-a-series-of-lists-in-python">Get the cartesian product of a series of lists in Python</a> </p> </blockquote> <p>I'm trying to figure out some logic that I just can't wrap my h...
python
[7]
2,877,844
2,877,845
Copy Speed of Process
<p>think I have a process that perform Copy function with system.io.File.Copy , how can I get copy speed of my process ?</p>
c#
[0]
1,110,824
1,110,825
php date manipulation
<p>I am designing a software for leave management in php.I actually need a simple function in php which takes a given date as parameter(i.e any date) and no of days to be added to it as the parameter and returns the resultant date.</p> <p>The function should accept date in 'YYYY-MM-DD' format and also return resulting...
php
[2]
3,274,424
3,274,425
Why would I use Angular?
<p>From the basic Angular tutorial, it seems like all it does is fetch some JSON from an API and display it. Also, there's its double binding magic.</p> <p>But why would I use it instead of a backend solution (like Rails) that builds the view in the backend and serves it to the user, with everything in place already? ...
javascript
[3]
307,959
307,960
javascript date increment
<p>I want to set a text box with a date (in dd/mm/yyyy format) 14 days ahead to current date in javascript . can any one help me regarding this ? </p>
javascript
[3]
3,208,969
3,208,970
how to convert "2012-04-30" date into "04-Apr-2012" format
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/6065507/formatting-dates-using-a-format-class-or-otherwise-if">Formatting Dates using a Format class (or otherwise if )</a> </p> </blockquote> <p>I am using "My Sql" Db, In my DB table,i am storing Date in "2012...
java
[1]
5,147,574
5,147,575
Reading UTF-8 file and writing plain ANSI?
<p>I have an UTF-8 file (it's a csv).<br> I need to read line by line this file do some replace and then write line by line into another file.</p> <pre><code> BufferedWriter bw = new BufferedWriter(new OutputStreamWriter( new FileOutputStream(fileFix), "ASCII") ); bw.write(""); //clean current fil...
java
[1]
3,379,956
3,379,957
PHP SID not showing
<p>I cannot get my SID working ...</p> <pre><code>&lt;?php session_start(); // Or maybe pass along the session id, if needed echo '&lt;br /&gt;&lt;a href="page2.php?' . SID . '"&gt;page 2&lt;/a&gt;';?&gt; </code></pre> <p>does not show up SID number but session_id is working not sure if I am missing something. THnks<...
php
[2]
4,040,484
4,040,485
Reading if-statement one by one
<p>Bassicly i want the user to input "4" and then display the next question but when the user } q=1;</p>
android
[4]
3,370,531
3,370,532
Passing primitive types to a Bundle
<p>When i use Intent.putExtra to a Bundle to pass a int value, is that primitive bumped up to an Object first. I though only Parceable or Serializable objects could be passed to a Bundle. How about primitives. Is this bumped up to an Integer ?</p> <p>Kind Regards.</p>
android
[4]
2,179,462
2,179,463
What is the best way to create a HashMap of String to Vector of Strings in C++?
<p>Criteria, don't want creating copies of objects all over the place. Should be fast, memory efficient and should not create leaks. Should be threadsafe.</p> <p>Ideally I would want to store pointers to vectors in the HashMap, but I am worried about memory leaks that way.</p> <p>Is this the best way?</p> <pre><code...
c++
[6]
3,390,635
3,390,636
Split Paragraphs Java: i want first 50 words in one variable from string
<p>I have</p> <pre><code>String explanation = "The image-search feature will start rolling out in the next few days, said Johanna Wright, a Google search director. "Every picture has a story, and we want to help you discover that story she said."; </code></pre> <p>there are total number of words are 300</p> <p>In Ja...
java
[1]
907,114
907,115
C++ operator overloading cheatsheet
<p>Does anyone have a summary of boilerplate declarations for C++ operator overloading? A one page pdf would be nice. It would help us forgetful people having to stop and think about where to put our <code>const</code> and <code>&amp;</code> and <code>friend</code> etc.</p>
c++
[6]
4,697,020
4,697,021
tokenise a string and building a multimap
<p>I have string like below:</p> <pre><code>"1-1-2-1,1-1-3-1,1-2-3-4,2-3-4-5,2-3-5-8" </code></pre> <p>i want tokenise the string and store it in a multimap,so that the map looks like below:</p> <pre><code>key value 1-1 2-1 1-1 3-1 1-2 3-4 2-3 4-5 </code></pre> <p>well, i can split the string us...
c++
[6]
5,907,391
5,907,392
How do I get this variable to be global?
<p>The problem here is that I do not know where to define the variable <code>wage</code>, before its use in the if-else block to make it a field variable, so it can be recognized and used by Eclipse.</p> <p>The code just below will give me the error at the last line of code: <code>wage</code> cannot be resolved to a v...
java
[1]
483,031
483,032
adding UISearchBar in Navigation based application
<p>I have added UISearch object on view in Navigation based application.</p> <p>But when i run the application, only table view is visible, why UI Search object is not visible.</p> <p>Thanks in advance, iSight</p>
iphone
[8]
5,870,471
5,870,472
Why won't this function work in an Object-Oriented style of javascript?
<p>I am trying to access the function as a method of the person object why won't it access the method and do what the function is supposed to do? </p> <pre><code>function Person(name, age, location) { this.name= name; this.age = age; this.location = location; this.test = function() { alert("TEST"); }; } va...
javascript
[3]
4,559,978
4,559,979
How to get the content using jquery
<pre><code>&lt;table class="subTable"&gt; &lt;tr&gt;&lt;td&gt;09:00&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;18:00&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td colspan="3"&gt;&lt;!-- 呜呜呜旺旺旺旺王旺旺旺旺wwwwww --&gt;呜呜呜旺...&lt;/td&gt;&lt;/tr&gt; &lt;tr class="nomoreEvents" style="display:none;"&gt;&lt;td colspan="3"&gt;&lt;sp...
jquery
[5]
31,338
31,339
Accessing standard call ringtones in iphone sdk
<p>Is it possible to access (ie. list) and then play standard ringtones through the iPhone SDK? I've had a good search through the SDK but can't find anything obvious.</p> <p>Note I'm not talking about changing ringtones - just being able to have the user select a standard ringtone and then play it from an applicatio...
iphone
[8]
680,177
680,178
Store Objects in ApplicationContext
<p>When my application goes to background , my (static and singleton) objects are cleared. So I tried to store these objects in <strong>Applicaton Context</strong> . I am using the following code.</p> <p>Accounts.create(getApplicationContext()) will be called once to store the accounts instance.</p> <p>Is that possib...
android
[4]
802,254
802,255
How much text can fit into a string.xml file?
<p>Android: I am programming an app that is beginning to use a massive amount of text. I'm putting all of my text in a string file and calling it from there and then placing portions of it into a textview.</p> <p>Is there a limit to that or is there a better way to store text (in a file or database?) and then retrieve...
android
[4]
1,270,807
1,270,808
Generating combinations in c++
<p>I have been searching a source code for generating combination using c++. I found some advanced codes for this but that is good for only specific number predefined data. Can anyone give me some hints, or perhaps, some idea to generate combination. As an example, suppose the set S = { 1, 2, 3, ...., n} and we pick r=...
c++
[6]
3,290,277
3,290,278
How to upload image into sqlite db in android and view it?
<p>I am a beginner in android development. And I want to make a photo sharing application so that once the application is installed on the android device the user can upload his/her image. I have seen a lot of examples but nothing works for me. Please help I am newbie.</p>
android
[4]
4,005,137
4,005,138
Progress Dialog in Android
<p>can i keep progress dialog anywhere in activity?? if possible then how can i do it???</p>
android
[4]
1,349,368
1,349,369
Show custom dialog when spinner is being clicked
<p>Currently, I have the spinner in <code>dialog</code> mode.</p> <pre><code> &lt;Spinner android:spinnerMode="dialog" android:id="@+id/genderSpinner" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom=...
android
[4]
3,233,035
3,233,036
jQuery .click() super simple but don't know what is going on
<p>So I don't quite understand why my function is not working. </p> <p>So I have a div that gets a class added to it using .addClass and then resizes to the width and height of the window. When I try to make "close" the div to return the original size it the click function does not work. I have included my code below...
jquery
[5]
2,172,447
2,172,448
Access the base class method with derived class objects
<p>If I am using shadowing and if I want to access base class method with derived class objects, how can I access it?</p>
c#
[0]
3,916,212
3,916,213
Detect HTML tags in a string
<p>I need to detect whether a string contains HTML tags. </p> <pre><code>if(!preg_match('(?&lt;=&lt;)\w+(?=[^&lt;]*?&gt;)', $string)){ return $string; } </code></pre> <p>The above regex gives me an error:</p> <pre><code>preg_match() [function.preg-match]: Unknown modifier '\' </code></pre> <p>I'm not well up o...
php
[2]
5,199,924
5,199,925
User.Identity.Name is blank ASP.NET
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/7839567/why-does-httpcontext-current-user-identity-name-return-blank">Why does HttpContext.Current.User.Identity.Name return blank</a> </p> </blockquote> <p>This website has been setup for a very long time and l...
asp.net
[9]
3,489,381
3,489,382
Passing parameters to SAP Crystal report in ASP.NET application
<p>I have a SAP Crystal report, which was converted from VB6 project to VC 2011. This report uses TTX-file and has a couple of parameters. It not uses database connection. </p> <p>I'm looking for answer for 2 questions:</p> <ol> <li>What should be alternate to ttx-file in VC 2010 Web application?</li> <li>How to pass...
asp.net
[9]
5,563,398
5,563,399
Separate two numbers which are joined by a dash
<p>Could anyone please tell me how I can separate the following numbers.</p> <pre><code>12255252-675765675 </code></pre> <p>So they can be called separately:</p> <pre><code>$number1 = 12255252; $number2 = 675765675; </code></pre>
php
[2]
2,272,156
2,272,157
How to return multiple values in java?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/457629/how-to-return-multiple-objects-from-a-java-method">How to return multiple objects from a Java method?</a> </p> </blockquote> <p>Will it possible to return two or multiple values from a method to main in j...
java
[1]
2,094,433
2,094,434
Get the letters (ABCDE) between two letters (AE) using C#
<p>I need to get the letters as an array on passing two letters using C#</p> <p>For ex.: When i pass <code>"AE"</code>, i need to get the {A,B,C,D,E} as an array. and passing <code>"FJ"</code> should return {F,G,H,I,J}.</p>
c#
[0]
976,628
976,629
Best practices to handle JSON data for API SDK
<p>The company I work for has an API and I am porting that API over to PHP. Right now, the API returns to me a large JSON object and I'm trying to figure out how I should handle the data. I could have a whole bunch of "get" methods, like:</p> <pre><code>$t = new APIThing(); $t-&gt;getJSONObjects(); for ($i=0; ...) { ...
php
[2]
3,360,592
3,360,593
Append text at after the url with the help of jquery
<p>I'm using this code to grab a url from a clicked link:</p> <pre><code>var newurl = $(this).attr('href'); </code></pre> <p>I want to add a string to that url.</p> <p>For example, my current url is:</p> <p>mydomain/test.jsp</p> <p>I want to make it:</p> <p><a href="http://testdomain.com/mydomain/test.jsp" rel="n...
jquery
[5]
4,092,712
4,092,713
UIGestureRecognizer equivalent for hitTest: withEvent:
<p>I have two views: view A (huge scroll view (map) with scrolling, zooming, etc.) and its subview B (with same size as A, subclass of uiview, only for drawing of routes). Before that I used hitTest: withEvent: function to forward all user events to A. But now, I have to recognize tap event on view B. I added UITapGest...
iphone
[8]
5,201,629
5,201,630
php how to make URL link on view
<p>i did one chat application ,</p> <p>in the my chat pings area am displaying my pings, if i enter url that is displaying as TEXT but instead i want to display as URL ,</p> <p>How to display url are Link the view, </p> <p>Advise...</p> <p>Example ,</p> <pre><code>x says:hi Good Morning, y says:Hi GM, x says:Chk t...
php
[2]
3,283,862
3,283,863
How can i put navigationbar after a splash screen?
<p>I an new in iphone application i want to put Nevigation controller after a splash screen so how can i put?Is there any way to put nevigationbar in my application without Splash Screen. </p>
iphone
[8]
675,496
675,497
Correct way to setup a function call from event?
<p>Is this the way to setup my event to call a function?</p> <p>I have this in a document.ready</p> <pre><code>$(document).on('change', "[data-viewlink]", function () { UpdateViewLink($(this).attr("id")); } ); </code></pre> <p>The <code>UpdateViewLink()</code> function is surrounded by a <code>fu...
jquery
[5]
965,883
965,884
How can I set the value of a textbox through PHP?
<p>So I have this empty textboxes in a registrationg page. The user enters some data, hits continue and then there's a confirmation page. If the data is incorrect, the user hits go back to go correct whatever was wrong. However, when he goes back, all the textboxes are empty. So the first thing that comes to my mind is...
php
[2]
1,221,493
1,221,494
c# identifier expected?
<p>I am trying to create a program to copy all the files from one directory to another. But I am running in a basic issue. It says indentifier expected when I try to compile on line 52.</p> <pre><code>using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; namespace Cons...
c#
[0]
1,663,880
1,663,881
javascript class problem
<p>Examine this code</p> <pre><code> var _class=function() { this.Test=100; this.Callback=function(msg) { alert(msg+"\r\n"+this.Test); } } function run(call) { call("Hello world"); } var obj=new _class(); run(obj.Callback); </code></p...
javascript
[3]
3,325,063
3,325,064
email authentications
<p>hey can any one suggest me is there any API or example for authenticating email addresses in iphone app</p>
iphone
[8]
2,393,974
2,393,975
return statement in a function as class
<p>I am confused about the return statement in a function that serves as a class. See the example code below:</p> <pre><code>&lt;html&gt; &lt;body&gt; &lt;script type="text/javascript"&gt; function test() { this.abc = 'def'; return 3; } var mytest = new test(); document.write(mytest + ', ' + (typeof mytest...
javascript
[3]
4,470,825
4,470,826
How can I disable the next button in liquid jquery carousel?
<p>Im using jQuery Liquid Carousel plugin and i dont know how to disable previous and next button .Can you please help me?? </p>
jquery
[5]
109,078
109,079
What's the difference between double exclamation operator and Boolean() in JavaScript?
<p>I know that <code>!!variable</code> will convert variable into a boolean value and the function <code>Boolean()</code>, according to the ecma262 spec, will also perform a type conversion by calling <code>ToBoolean(value)</code>.</p> <p>My question is: what's the difference? Is <code>!!</code> better in performance ...
javascript
[3]
1,225,455
1,225,456
Send and Receive messages between registered users
<p>I have a website I am implementing and I want to add a functionality to send and receive messages between registered users. What is the best way to go about implementing it in C# asp.net?</p> <p>Thanks</p>
asp.net
[9]
29,870
29,871
Fatal error: Call to undefined function empty()
<p>Any idea why I'm getting this strange error? "Fatal error: Call to undefined function empty()"</p> <pre><code>function newpart($name,$country,$bday_day,$bday_month,$bday_year,$gender,$pass1,$pass2,$email,$option1,$secondOption1,$secondOptionLevel1){ $this-&gt;name = $name; $this-&gt;country = $...
php
[2]
2,009,249
2,009,250
Reverse loop for date display
<p>I've been trying to figure this out and can't seem to get it.</p> <p>Here is the code..</p> <pre><code> $m= date("m"); $de= date("d"); $y= date("Y"); for($i=0; $i&lt;=6; $i++){ echo "&lt;br&gt;"; echo date('m/d',mktime(0,0,0,$m,($de+$i),$y)); echo "&lt;br&gt;"; } </code></pre> <...
php
[2]
313,790
313,791
How can I create a user defined data structure in pyton
<p>In python, how can I create a data structure like</p> <pre><code>class Person { String firstName; String lastName; } </code></pre> <p>and then I create a structure of 'Person' object.</p> <p>Thank you.</p>
python
[7]
4,501,222
4,501,223
PHP: How to get an array's value by its numeric offset if it's an associative array?
<p>I have an associative array which when var dumped looks like this:</p> <pre><code>Array ( [tumblr] =&gt; Array ( [type] =&gt; tumblr [url] =&gt; http://tumblr.com/ ) [twitter] =&gt; Array ( [type] =&gt; twitter [url] =&gt; https://twit...
php
[2]
1,375,292
1,375,293
comparison if statment should be called twice but it is only called once when comparing an Integer
<p>I have a function that takes a Integer array and a boolean array. If the value in the Integer array is the highest value and the boolean array is true, the value in the trackerArray is set to true. This is a simplified version of my code that produces the error...</p> <pre><code>package com.thisis.a.test; public...
java
[1]
3,641,290
3,641,291
Join Declaration and Assignment or not to join...That is the question
<p>There are 2 school of thoughts on debugging. One says declare your variable first, then assign...for easier debugging.</p> <pre><code>int myInt; myInt = GetSomething(); </code></pre> <p>or there is a school of thought that says that's just not clean, just do this:</p> <pre><code>int myInt = GetSomething(); </cod...
c#
[0]
4,521,133
4,521,134
I am able to get current location using gps connection only after half an hour in Android?
<p>I am working in location based project. I am able to get current location in some android mobiles quicker. But I am able to get current location in some android mobiles, only after some half an hour. I only need to use GPS connection. So, I disabled "Use wireless networks" and enabled "Use GPS satellites". I need to...
android
[4]