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,167,359
4,167,360
Android multi lined text with virtual keyboard suggestion off
<p>I need to disable the soft keyboard suggestion.</p> <p>I have found this:<br> <code>inputtype="textNoSuggestion"</code><br> But when I set this, I'm not able to type the multi lined text?</p>
android
[4]
1,216,881
1,216,882
Where to store currently selected item id?
<p>I'm trying to write an asp.net app which searches a sql db and returns/updates the data.</p> <p>I want to be able to hold the currently selected id of the item my user has selected. For example a doctors surgery would select a patient record then be able to browse the app without having to re-select that patient on...
asp.net
[9]
4,974,952
4,974,953
pagerAdapter reference a programmed layout android
<p>I'm usually use pager adapter to scroll through different layouts, but this time my layouts were created with java code instead of xml. Normally when choosing the resource id I reference R.layout.file. Having created the layout with java code, I'm not aware how to reference the resource. Does anyone know how to do t...
android
[4]
2,340,567
2,340,568
What am I doing wrong? PHP script with nothing visibly wrong
<pre><code>&lt;?php $file = fopen("configuration.conf","w+"); $settings['LogEnabled'] = "true"; $settings['Pass'] = "pass"; $settings['ShowWarning'] = "true"; fwrite($file,serialize($settings)); $path = "configuration.conf"; $file2 = file_get_contents($path); $settings2=unserialize($file2); echo($settings2['LogsEna...
php
[2]
4,510,109
4,510,110
How to get image of barcode?
<p>I am using ZXing api to read barcode from a image and i can read barcode using below code but i want also image of barcode which capture by api please let me know how to get it. </p> <p>IntentIntegrator.initiateScan(Activity);</p> <p>Thanks</p>
android
[4]
4,584,839
4,584,840
Error starting executable, no provisioned ios device is connected
<p>Why am I seeing this error? Is it looking for my real iphone device to be connected to install it on their?</p> <p>I just downloaded the views sample code from: <a href="http://www.sunsetlakesoftware.com/sites/default/files/Fall2010CourseNotes/views%20and%20controllers.html" rel="nofollow">http://www.sunsetlakesof...
iphone
[8]
2,770,579
2,770,580
Render a static html page or html markup in a file somewhere inside a asp.net page
<p>I am using asp.net 3.5 and want to render the contents of a static html file into an asp.net page that contains a master page in one of the contentplaceholders. I have considered using an iframe but would like to avoid that if possible. Alternatively, if it's simpler I would like to just read in some text in a fil...
asp.net
[9]
479,777
479,778
Looping a Background Worker Task
<p>I have some code inside a background worker <code>DoWork</code> event which check if a process is running or not. The code in the <code>DoWork</code> does the following:<br/> -> If the process is not running, check again twice<br/> -> If the process is running, check if it is responding<br/> -> If the process is run...
c#
[0]
5,439,156
5,439,157
What does "EGPCS" mean in PHP?
<p>I found the following code in <code>php.ini</code>. what does that mean?</p> <p>And "PHP registers" -- what is that?</p> <pre> ; This directive describes the order in which PHP registers GET, POST, Cookie, ; Environment and Built-in variables (G, P, C, E & S respectively, often ; referred to as EGPCS or GPC). Reg...
php
[2]
2,720,156
2,720,157
"un"toggling a div with jQuery
<p>I'm using jQuery's .toggle method to create a menu that opens and closes when a div is clicked. Here is my code: </p> <pre><code>$(".header").toggle(function() { $(this).find(".parent").fadeIn("fast"); $(this).css("background-color","red"); }, function() { $(this).find(".parent...
jquery
[5]
5,264,932
5,264,933
How can I have my page access functions from a .vb file in App_Code?
<p>I made a new page in our website that needs to access some functions that are in App_Code/modFunctions.vb. I tried simply calling the functions but it says not found in current context. So here are the file locations, starting at the root of the site:</p> <pre><code>/App_Code/ModFunctions.vb /users/export.aspx </co...
asp.net
[9]
1,628,984
1,628,985
full path of a folder in c#
<p>i need to get the full folder path in a windows project using c#.I tried with path.getFulPath(filename).bt it returns the application path+filename.how can i get the actual path like "D:\eclipse_files\ads_data"?</p>
c#
[0]
2,067,024
2,067,025
Interpolating an angle counter clockwise?
<p>Right now 'm using linear bezier to interpolate angles:</p> <pre><code> float CardAnimation::valueAt( float valueA, float valueB, float t ) const { return (1.0f - t) * valueA + t * valueB; } .... if(m_startCard.m_angle != m_endCard.m_angle) { m_targetCard-&gt;m_angle ...
c++
[6]
5,899,423
5,899,424
How can I execute a specific chunk of code when my application crashes?
<p>Is there a way that I can execute a specific chunk of code when my application crashes? (i.e. If my application crashes, I would like to safely close some streams) </p>
c#
[0]
3,669,889
3,669,890
Using Directory.GetFiles with regex-like filter
<p>I have a folder with two files:</p> <ul> <li>Awesome.File.20091031_123002.txt</li> <li>Awesome.File.Summary.20091031_123152.txt</li> </ul> <p>Additionally, a third-party app handles the files as follows:</p> <ul> <li>Reads a <code>folderPath</code> and a <code>searchPattern</code> out of a database</li> <li>Execu...
c#
[0]
3,380,489
3,380,490
When are views drawn in android?
<p>I want to get the size of a view that is in my activity but I am not able to get that information in any of the activity lifecycle callbacks (onCreate, onStart, onResume). I'm assuming this is because the views have not been drawn yet. At what point are views drawn and is there a callback I can put my code so I can...
android
[4]
4,315,450
4,315,451
Python: Max retries exceeded with url: /x.php (Caused by <class 'socket.gaierror'>)
<p>I have set up a database and php file running on my host and I run a python code that uploads a json file every 5 minutes using the Requests module. After about 6-8 hours, the app crashes and produces this error:</p> <pre><code>Max retries exceeded with url: /rpitest2.php (Caused by &lt;class 'socket.gaierror'&gt;:...
python
[7]
2,215,090
2,215,091
Error C++ | ISO C++ forbids assignment of arrays
<p>I have a problem which I can not solve. If this query is answered as "yes", then should anrede = female.</p> <p>Dev++ gives me this error: ISO C++ forbids assignment of arrays</p> <hr> <pre><code>char anrede[10]; printf("Anrede: female?? Yes/No"); scanf("%s", &amp;anrede); if(anrede == "Yes"){ anrede = "fem...
c++
[6]
3,804,857
3,804,858
How to enable element using siblings jquery
<p>Looking below i would like to get the value of the cnhor element and if its equal to "Guide" enable the corresponding button. Tried the below but couldn't get it to work.:( Have a feeling i'm almost there. Thanks</p> <pre><code> $("button").siblings("a").each(function () { var b = $(this).text()...
jquery
[5]
5,919,209
5,919,210
Preventdefault working on Google Chrome but not on Firefox for <select> element
<p>So if you try the following code: <a href="http://jsfiddle.net/LNfZT/29/" rel="nofollow">http://jsfiddle.net/LNfZT/29/</a></p> <p>It works perfectly on Chrome but not at all on firefox. Does anyone have any idea why?</p>
jquery
[5]
4,315,995
4,315,996
Change a website's directory names per installation
<p>Is there a way that I can have different directory names per installation of a website? As in I would need to rename the directories at build time or some similar solution. I am currently using MSBuild with CruiseControl.NET.</p> <p>An example would be I have a module in my website called Bug Tracking which is then...
asp.net
[9]
4,449,635
4,449,636
What is the correct syntax for `.live()` binding of the 'hover' method?
<p>We call a <code>.live()</code> method like this:</p> <blockquote> <pre><code>$('.link').live('click', loadContent); </code></pre> </blockquote> <p>But what about if I'm binding to <code>hover</code> instead, which calls for two functions separated by a comma? When I put in this:</p> <blockquote> <pre><code>$('.th...
jquery
[5]
1,842,464
1,842,465
How to allow user to install apk file one once on android phone?
<p>Hi i have develop an android application in which i want to prevent user to create multiple account on our ftp server from one android device for which i create configuraton file and store boolean value which is by defult one but when user create account its value change to true. but there is an issue when user unin...
android
[4]
5,383,815
5,383,816
jQuery new added inputs are not submitted
<p>I have a lot of PHP generated input fields. Once I add new fields with jQuery they are not submitted if they are empty. However the static ones are sent even if they are empty.</p> <p>How should I fix that ?</p> <p><strong>CODE:</strong></p> <pre><code>&lt;form id="sendform" action="pdf.php" method="post"&gt; &lt...
jquery
[5]
1,888,033
1,888,034
Simple add function to a adjacency matrix
<p>I'm developing an adjacency matrix so i can try and use a DFS to solve the euler circuit problem. This is the relevant code to my question:</p> <pre><code>public class Graph { private int numVertex; private int numEdges; private boolean[][] adj; public Graph(int numVertex, int numEdges) { this.numVertex = num...
java
[1]
1,733,013
1,733,014
How to change the date formet in datatables columfilter plugin(date filter)?
<p>I am using datatables column filter plugin:-</p> <pre><code>It has default date filter as this formet:-24/07/2012 But I have to filter the data in this format:-24-07-2012..?? </code></pre>
jquery
[5]
2,241,284
2,241,285
Is it possible to build an iphone view WITHOUT using Interface Builder?
<p>So Interface Builder does things to save time but what if I want to do without it ? In C# all code generated is clear and understandable, in interface builder this is hidden so I'd like at least during learning phase do things from scratch: any sample code to do so ?</p> <p>Seems Apple makes things very hard so as ...
iphone
[8]
5,306,347
5,306,348
Getting "Indirect modification of overloaded property has no effect" notice
<p>I want to use a Registry to store some objects. Here is a simple Registry class implementation. </p> <pre><code>&lt;?php final class Registry { private $_registry; private static $_instance; private function __construct() { $this-&gt;_registry = array(); } public function __get($...
php
[2]
4,993,918
4,993,919
Will the pointer ever be different than expected in this case?
<p>Say I have a Listener class.</p> <p>I have class A and class M which both implement the listener class. Class A has 4 M's.</p> <p>Each M has 1 A, but not as an A, as a Listener base class. (So downcasted A because M knows nothing about A).</p> <p>When A gets a message from 1 of them M's it needs to be able to kno...
c++
[6]
4,801,835
4,801,836
How can I save captured images from webcam with different file names in C#
<p>How can I save images captured from webcam to my <code>c:/</code> drive with different file names? </p> <p>I have been able to capture image webcam and save it on my c:/ drive, but am having slight problems. I want each time an image is saved,it should not overwrite the old captured one already saved on my c:/ </...
c#
[0]
6,014,566
6,014,567
Assets Confusion
<p>I'm utterly confused. There's an 'assets' folder in my project, but the AssetManager does not refer to this folder. So I have three questions:</p> <p>First, where is the folder that AssetManager refers to?</p> <p>Second, how do I put files into that folder?</p> <p>Third, how do I access the files that I put into ...
android
[4]
443,075
443,076
Removing word + wildcard number from string
<p>I have a string that is</p> <pre><code>$str = "testingSUB1"; </code></pre> <p>How can I strip out <code>SUB*</code> from the string? I assume using <code>preg_replace</code> but I'm not good with matching what I want with regex.</p> <p>Does anyone know how I can do this?</p> <p>Thank you</p>
php
[2]
6,032,115
6,032,116
How many widgets per application are supported in Android?
<p>Can I have more than one widget per app on home screen of Android for the same application? That is to display at once on home.</p>
android
[4]
5,731,302
5,731,303
jQuery .append Issue
<p>This is my code:</p> <pre><code>$('.add').click(function(){ $('#test').append("&lt;div class='tab selected'&gt;TEST&lt;/div&gt;"); }); $('.tab').click(function(){ $('.tab').removeClass('selected').addClass('unselected'); $(this).removeClass('unselected').addClass('selected'); }); &lt;input type='button...
jquery
[5]
2,914,590
2,914,591
Android push notifications - how can I extract the device id?
<p>From the Google cloud push tutorials, I am running this code when a user first starts the app:</p> <pre><code> GCMRegistrar.checkDevice(this); GCMRegistrar.checkManifest(this); final String regId = GCMRegistrar.getRegistrationId(this); if (regId.equals("")) { GCMRegistrar.register(this, ...
android
[4]
1,744,251
1,744,252
zed shaw's exercise 15 open function
<p>I am a little stuck with zed shaw's exercise 15. Actually I had no problem with the original program, but the problem is when I try out the extra credit where he asks us to use raw input instead of argv.</p> <p>so, this is the code I used</p> <pre><code>filename=raw_input("enter filename :") print "here's your fil...
python
[7]
2,072,939
2,072,940
How to place listview inside a scroll view
<p>I have a <code>RelativeLayout</code> and below that i have a <code>ListView</code>. I have to place these inside a <code>ScrollView</code>. Any help will be deeply appreciated.</p>
android
[4]
5,060,732
5,060,733
Service architecture, continuously running vs. wake up
<p>I have an application that wakes up at frequent intervals (once per minute) to do some stuff in the background. I will be using the <code>AlarmManager</code> to schedule the wake ups.</p> <p>I am looking at two different ways of structuring a <code>Service</code> to do the background work:</p> <ol> <li>keep the s...
android
[4]
4,013,785
4,013,786
C# Threading arguments are invalid
<p>i got this Code from an Old post</p> <pre><code>public delegate void Worker(); private static Thread worker; public static void Init(Worker work) { worker = new Thread(new ThreadStart(work)); worker.Start(); } public static void Work() { string result = testing; } </code></pre> <p>I modify the code b...
c#
[0]
1,481,935
1,481,936
Android AudioTrack cannot be INITIALIZED
<p>I have a problem with initializing android AudioTrack. I have Nexus One with android 2.3.3.</p> <p>Here is my code:</p> <p>int _rate = AudioTrack.getNativeOutputSampleRate(AudioManager.STREAM_SYSTEM);</p> <p>int buffersize = AudioRecord.getMinBufferSize(_rate, AudioFormat.CHANNEL_IN_MONO, ...
android
[4]
2,452,740
2,452,741
Remove class using javascript
<p>I need to remove the specific class attribute from all the element in the page. That is we need to remove the particular class from all the elements of the current html page. We only have the class name as the reference (which we need to remove from that page) and nothing else.</p> <p>Please note that <strong>i can...
javascript
[3]
1,814,695
1,814,696
n00b needs some PHP syntax guidance
<p>If you look at <a href="http://www.cruc.es/?paged=12/" rel="nofollow">http://www.cruc.es/?paged=12/</a> and go to the bottom of the page you'll see the bottom navigation with the next and previous options. I've been able to make the page numbers work by changing <em>page</em> to <em>paged=</em> in the code. I don't ...
php
[2]
627,317
627,318
Extract a substring up to 1000th comma
<p>I have a string (comma seperated)</p> <p>For example: </p> <pre><code>a,bgf,sad,asd,rfw,fd,se,sdf,sdf,... </code></pre> <p>What I need is to extract a substring up to the 1000th comma.</p> <p>How to achieve this in Java?</p>
java
[1]
1,500,372
1,500,373
What is the javascript code to know whether the browser has mp3,audio encoding,video encoding and printing capability?
<p>I want a javascript code to know whether our browser has Mp3,audio encoding,video encoding and Printing capability or not.For example if i will click a button on 1st page on the next page i want to see the output like</p> <p>Mp3 Capable:True/False Audio Encoding Capabilty: True/False Video Encoding Capability: True...
javascript
[3]
3,285,852
3,285,853
How to delete an image from sd-card in android if uri of the image is available?
<p>The image the uri is available. i want to delete the image using that uri. please help.</p>
android
[4]
4,470,120
4,470,121
Does Process.StartInfo.FileName accept long file names?
<p>Looks like it's not.</p> <p>If I convert the file name to its short value, then Process.Start() works.</p> <pre><code>Process runScripts = new Process(); runScripts.StartInfo.FileName = @"C:\long file path\run.cmd"; runScripts.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; runScripts.StartInfo.UseShellExecute ...
c#
[0]
1,844,331
1,844,332
Copy constructor for a generic doubly-linked list
<pre><code>template &lt;class T&gt; class list { public: //stuff list(const list &amp;cctorList); //cctor private: struct node { node *next; node *previous; T *info; } node *firstNode; //pointer to the first node (NULL if none) node *lastNode; //pointer to the last node...
c++
[6]
5,628,168
5,628,169
self.title vs self.navigationItem.title
<p>What is the purpose of the <code>title</code> property of UIViewController, can't the title already be set with <code>navigationItem.title</code> ?</p> <p>Both seem to work, I'm just wondering why there's this seemingly duplicated functionality.</p>
iphone
[8]
3,546,775
3,546,776
Thread dump showing Runnable state, but its hung for quite a long time
<p>We are facing an unusual problem in our application, in the last one month our application reached an unrecoverable state, It was recovered post application restart.</p> <p>Background : Our application makes a DB query to fetch some information and this Database is hosted on a separate node.</p> <p>Problematic cas...
java
[1]
1,482,235
1,482,236
What is the native keyword in Java for?
<p>While trying <a href="http://www.sporcle.com/games/robv/java_keywords">this puzzle</a> I came across the <code>native</code> keyword. I have never seen nor used it earlier. What is it used for?</p>
java
[1]
5,388,803
5,388,804
how convert ILIST<string> to ILIST <object> at C#?
<p>I want to convert <code>ILIST&lt;string&gt; to ILIST &lt;object&gt;</code></p> <p>How can achieve this using C#? </p>
c#
[0]
3,313,127
3,313,128
An update question!
<p>Here's the problem I'm facing: trying to do my own application update I download the update apk from a web server on the sd card and then I launch the Package Installer with the downloading path (while the old application is running). So far after the package installer starts and the user agrees to install the appli...
android
[4]
1,158,783
1,158,784
Can anyone know how to setting cross web browser cookie
<p>I'm a php developer but not experience in training now and got a task that if someone open website from firefox then cookie must be saved in chrome, opera and other browsers too.</p>
php
[2]
4,701,733
4,701,734
Create a calendar from scratch
<p>My aim is to create a calendar from scratch that displays 30 days as onclickable values so when a user presses the 2nd it should display fields where the user can type information. It would then store it into a SQLite table. </p> <p>I thought about some solutions. I can make a calendar by creating textview with 30 ...
android
[4]
3,628,359
3,628,360
Error when trying to use DroidBox
<p>I am researching how to analyze the application Android use <a href="http://code.google.com/p/droidbox/" rel="nofollow">DroidBox</a>. But when start analyzing :</p> <p><code>./droidbox.sh file.apk</code> </p> <p>get error as follows:</p> <pre><code>android@honeynet:~/tools/droidbox$ ./droidbox.sh a.apk ./droidbox...
android
[4]
4,635,312
4,635,313
Extract letters from a field and make it on another
<pre><code>public class Driver { // fields private String Id; Id = name.substring(0, 3); public Driver(String f1, String f2, int f3, String f4) { // constructor } } </code></pre> <p>Well, I've changed the code. It's much clear. I want to extract the first three letters from nomC, the fir...
java
[1]
3,755,270
3,755,271
listView.addHeaderView() giving "null pointer exception"
<p>I have a requirement that I need to add header to my list view .</p> <p>Below is my code for achieve the same..</p> <pre><code> ListView listView; listView = (ListView) findViewById(R.id.list_view); //View header = View.inflate(this , R.layout.header, null); LayoutInflater ll = (LayoutInflater)...
android
[4]
1,953,446
1,953,447
use of equals() method in comparator interface?
<p><code>equals()</code> method is available to all java collection classes from the <code>Object</code> class. This method is also declared in <code>Comparator</code> interface, so what is the purpose of declaring this method in Comparator? in which case is it used and how?</p>
java
[1]
1,703,634
1,703,635
How to change default Android's Desktop application?
<p>I hear that the Android's desktop is an application that I can change. I'm searching for some information about how to do that.</p>
android
[4]
5,054,028
5,054,029
adding rating system to detailviewcontroller
<p>hello does anyone know a rating system that can be implemented for iphone detail view that allows user to rate the services offered. ive used touchcustoms however i cant figure out how to implement it...</p>
iphone
[8]
4,688,392
4,688,393
Cut a line out of a string with Regex
<p>I'm looking for a solution for removing line 2 out of a string in C#. Of course, I could just read line by line, but with a regex, it would be much better and more elegant. As an example:</p> <p>Before:</p> <pre><code>this is line 1 this is line 2 this is line 3 this is line 4 </code></pre> <p>After:</p> <pre><c...
c#
[0]
4,042,401
4,042,402
Android TabSpec.setIndicator New Line
<p>hey just wondering how I can put a new line in the TabSpec.setIndicator(char sequence) method?</p> <p>"\n" doesn't seem to work, here is my code:</p> <pre><code>TabHost.TabSpec spec5=host.newTabSpec("tag5"); Intent in5=new Intent(this, GridList.class); spec5.setIndicator("Trip\nLogger"); sp...
android
[4]
5,981,959
5,981,960
Display image through JavaScript function
<p>I'm writing a javascript function that basically flips the coin and I'm trying to get it to return image but so far no luck. I use img src tags to assign value to a variable but somehow I suspect that does not work and I wanted to check with you guys on how this is actually done?</p> <p>Here is my code:</p> <pre...
javascript
[3]
2,641,029
2,641,030
Setting new value in a grid
<p>I have a strange issue with an exercise I'm doing (game of life). In the middle bit of code, the line nextgeneration.set(livex, livey, live); causes the program to stop running. Any ideas? </p> <pre><code>int lifeGenerator(Grid&lt;int&gt;&amp; nextgeneration, Grid&lt;int&gt;&amp; birthsanddeaths) { for (int dea...
c++
[6]
3,240,205
3,240,206
query co-ordinates
<p>Hi I've got a DIV that holds a sprite that has around 40 emoticons on it. Its 200px * 100px and each emoticons is around 25*25px.</p> <p>I want to be able to use a mouse over to explain each emoticon - eg: ':) smile'.</p> <p><img src="http://i.stack.imgur.com/DygVC.png" alt="this one"></p> <p>I've been advised to...
jquery
[5]
592,289
592,290
How to know where the input/element goes to after the blur event?
<p>I tried this, but it is undefined:</p> <pre><code>alert($(ev.relatedTarget).attr('name')); </code></pre> <p>I have a combobox (textbox and a button), I don't want the code to continue processing if the input goes to its partner control(button). I want to detect from textbox blur that it is leaving the whole combob...
jquery
[5]
4,925,666
4,925,667
Calling html javascipt function from external javascript
<p>In my project i am using external javascript file. but my requirement is i need to call the xhtml file's javascript function from the external javascrit function.</p> <p>Please provide some suggestion</p> <p>Thanks in Advance.</p>
javascript
[3]
5,622,772
5,622,773
NullPointerException on NetworkInfo
<p>I am programming a service that runs when you boot the phone, but you need an Internet connection and connection to send SMS operator. I wrote a function to <code>ConnectionManager</code> as in other post appears, but I always get the same answer: <code>NullPointerException</code>, when I do the following:</p> <p>I...
android
[4]
2,209,786
2,209,787
Jquery repeat div on click not clone
<p>I need to repeat a div on click under the initial div that is on the page, ie a div with a class exists with a button within it that when clicked repeats the div directly after the div that is already there, this is in a form so needs to be written to the page and submitted if it exists. JQuery clone wont manage thi...
jquery
[5]
3,760,236
3,760,237
How change the page on page init or load events depends on mobile device (iPhone)?
<p>I have an asp.net C# website. Because of iPhone doesn't support flash i want to change a theme of my site on page load or init if user using it. Could any one show me (code in c#) how to determine that user is browsing my website using iPhone or iPad, not a blackberry, or android etc. Thanks</p>
asp.net
[9]
3,835,611
3,835,612
Exporting to excel probelm in exporting number feiled
<p>Hi i have one grid which contain phone numbers..and whike am exporting to it phone number field is automatically taken as numeric filed and phone number is displaed as exponential .. do any one know to solve it?? thanks in advance</p>
c#
[0]
1,700,484
1,700,485
NodeList value does not get updated?
<p>This statement simply would not update the value of the node in question! Could you please tell me why this is the case or if I'm doing something wrong here?!?</p> <pre><code>for (int i = 0; i &lt; list.getLength(); i++) { temp = list.item(i).toString(); System.out.println(temp.substring(temp.indexOf("\"")+1, t...
java
[1]
2,443,376
2,443,377
C++ optimise away private variable
<p>Does ISO C++ (11) permit a private non-static class member variable to be optimised away? This could be detected:</p> <pre><code>class X { int x; }; assert (sizeof(X) &gt;= sizeof(int)); </code></pre> <p>but I am not aware of a clause that demands the assertion above. </p> <p>To clarify: (a) Is there a clause in ...
c++
[6]
2,266,621
2,266,622
Compare Datatable with another to see if it has right format
<p>I have 2 DataTables: TableNumber containing mobile numbers and TableCode which contains a mix of all possible mobile codes which is 6 digits long all. i want to create a list to have only numbers which its 6 first digits are from TableCode, so any number which its first digits are not in TableCode will not be consi...
c#
[0]
3,860,851
3,860,852
Activator.CreateInstance needs another object to be instantiated
<p>I am instantiating my objects with the classical</p> <pre><code>object myObject = Activator.CreateInstance(myType); </code></pre> <p>code and if works fine. The thing is that, now, Id like to instantiate an object and in its constructor, there is a reference to another object. So if I just do the code above, I got...
c#
[0]
5,841,094
5,841,095
System stop responding and throws yami i/o error
<p>I need suggestion about YAMI library . I have a system which receives Json string from external interface and parse that received string and send that message to internal ip address for the required action. The exchange of messages within the internal ip address has been taken care by Yami library. everything works...
c++
[6]
5,163,551
5,163,552
how can i cast Long to BigDecimal
<p>hi can any tell me how to cast <code>Long</code> to <code>BigDecimal</code></p> <p>thanks In Advance</p>
java
[1]
1,177,796
1,177,797
Problem using elem.dataset with IE and JSFiddle
<p>In this JSFiddle I created on Chrome, I find that it's unable to work on IE (I'm using IE9). Any reason as to this: <a href="http://jsfiddle.net/ZSB67/" rel="nofollow">http://jsfiddle.net/ZSB67/</a>.</p> <pre><code>var backImage = [ "http://alm7.wikispaces.com/file/view/RedBackground.bmp/144018347/RedBackground...
javascript
[3]
4,799,048
4,799,049
jQuery Convert a div's text into vertical
<p>Lets say i got this div</p> <pre><code>&lt;div&gt; Convert This into a vertical Text &lt;/div&gt; </code></pre> <p>While searching for a way in which i can convert this text into a vertical text.</p> <p>I found out something like this :</p> <pre><code>$('div').html($('div').text().replace(/(.)/g,"$1&lt;br /&...
jquery
[5]
1,116,292
1,116,293
App always showing landscape mode in tablet
<p>I have made an app which is working fine in emulator as well as small and medium size phones.But while running in tablet,it always shows landscape mode only.I have also used separate layout and layout-land layouts.I am not getting the reason behind it.This is the code:</p> <pre><code>public class SplashActivity ext...
android
[4]
4,468,207
4,468,208
Java Plotting Graphs
<p>I recently asked about how to plot graphs in Java and I was recommended JFreeChart. After researching it I couldn't find a way to do what I want to (simply plot some Point objects that are listed in an ArrayList and then draw a line through them as they are listed in the list). I would appreciate it if someone could...
java
[1]
1,861,723
1,861,724
How to block the main thread until all the other threads finish executing?
<p>This is a newbie question. I start 10 threads from my main thread. How do I stop the main thread from continuing until all the other threads finish?</p>
python
[7]
3,172,295
3,172,296
what is ... mysql_real_escape_string? dangerous?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/12859942/why-shouldnt-i-use-mysql-functions-in-php">Why shouldn’t I use mysql_* functions in PHP?</a> </p> </blockquote> <p>hye, Can i use a code in php like this:</p> <pre><code>$s_username = addslashes(strip_...
php
[2]
1,049,731
1,049,732
Don't overwrite in <div> but add to <div>
<p>I have made a script which shows content in a &lt; div > when you push a button, but when i push another button (while there is already content in the &lt; div >) it overwrites the content. So only the new content shows and the old content disapears. </p> <pre><code>function HandleResponse(response) { document.g...
javascript
[3]
4,271,358
4,271,359
is this a correct way to make sectioned list in android?
<p>i have to make a sectioned list in my application. For this i am using the following approach:</p> <ul> <li>make a listview to contain the headers of each sections</li> <li>the xml inflated in the getview of each item in the above list consists of a textview and a tablelayout</li> <li>the custom adapter used to mak...
android
[4]
27,435
27,436
Basic question on Java's int
<p>Why does the below code prints 2147483647, the actual value being 2147483648? </p> <pre><code> i = (int)Math.pow(2,31) ; System.out.println(i); </code></pre> <p>I understand that the max positive value that a int can hold is 2147483647. Then why does a code like this auto wraps to the negative side and prin...
java
[1]
1,334,982
1,334,983
How do I change the time to Taipei?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/10087819/convert-date-to-another-timezone-in-javascript">Convert date to another timezone in javascript</a> </p> </blockquote> <p>How to make this program get Taipei's time? Is their something to fix? or do I n...
javascript
[3]
3,338,424
3,338,425
Android: How to set the name of the compiled APK?
<p>This question seems embarassingly simple, yet it vexes me still. I am using the standard ADT and Eclipse Android environment to build my Android app. The apk is named after the project name in Eclipse, but I want to name the apk something different...How can I customize the name of the apk artifact that is produced ...
android
[4]
6,801
6,802
Loop until steady-state of a complex data structure in Python
<p>I have a more-or-less complex data structure (list of dictionaries of sets) on which I perform a bunch of operations in a loop until the data structure reaches a steady-state, ie. doesn't change anymore. The number of iterations it takes to perform the calculation varies wildly depending on the input.</p> <p>I'd li...
python
[7]
5,226,197
5,226,198
Reading string from vector until whitespace in C++
<p>This is probably easy but im not sure how. I tried searching multiple websites and yes Google and couldn't find anything on this. </p> <p>My vector <code>result[0]</code> looks like this</p> <pre><code>A3 * * B4 * * </code></pre> <p>Declaration</p> <pre><code>vector&lt;string&gt; result = v.formVectorFile("Prj3 ...
c++
[6]
1,601,427
1,601,428
What it means: Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.Cache.SetAllowResponseInBrowserHistory(false);
<p>While searching for authentication ,i found above two line written .what it means? please tell me.</p>
asp.net
[9]
3,498,796
3,498,797
C++ Error Reporting Interface
<p>I'm designing an interface that can be used to report errors in C++. (I'm working with a legacy system where exceptions are out of question.) In my youthful naivety, I started along these lines while designing my API:</p> <pre><code>bool DoStuff(int amount, string* error); </code></pre> <p>Return value signals suc...
c++
[6]
95,308
95,309
Implementing jQuery "closest"
<p>I am using this jQuery function to find the parent element with class name "viewCommentsExp".</p> <pre><code> $('.viewCommentsExpBtn').click(function(e){ e.preventDefault(); var trackid= $(this).parent().find(".trackidField2").val(); var parent = $(this).parent().parent().parent().find(".viewCommentsExp"); ...
jquery
[5]
5,975,045
5,975,046
MapView in TabActivity
<p>In my application I am using tabHost and TabWidget with 5 tabs..On Tab1, I want to show Map with current locaion..Here my </p> <pre><code> currentActivity extends TabActivity </code></pre> <p>But in Tab1(daeafult tab1), I want to show map with current location...Pls help</p>
android
[4]
4,191,970
4,191,971
How to pass array element one by one in text box in php
<p>i am Reading the file contents and passed it in explod function("=",$string) ,it gives me two array parts[0].parts[1] seprated by = .parts[1] array displays all the values of the variable .now how can i use these values one by one to pass in the text box .The variable value comes in this way (value1 ...
php
[2]
4,163,798
4,163,799
Android HttpPost socket timeout when android goes to sleep in background service
<p>I have an android app that uses a background service for uploading data.</p> <p>When we go upload data, everything works fine. Even when we make the display sleep, everything works.</p> <p>However, this was while we were connected to Eclipse via USB. Once we disconnected the device, started to send the data and ...
android
[4]
4,921,124
4,921,125
android Call Forwarding programatically
<p>I want to forward any calls received to another predefined phone number. I have searched forums and found some contradictary answers. so i m confused.</p> <p>First I looked at this post <a href="http://stackoverflow.com/a/5735711">http://stackoverflow.com/a/5735711</a> which suggests that it is not possible through...
android
[4]
5,352,638
5,352,639
What is a light python library that can eliminate HTML tags? (and only text)
<p>I know that NLTK has it. But any else?</p>
python
[7]
3,340,169
3,340,170
global variable is undefined
<pre><code>import socket import sys import urllib port = 6669 mac = "e448c7a96170" try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) ip = socket.gethostbyname( mac + '.rtn.iptv.svt.sciatl.com') sock.connect((ip, port)) print(ip) sock.send("getdom;ipg") print "Message Sent" wh...
python
[7]
2,528,121
2,528,122
Pass associative array to Javascript function
<p>How can I pass associative array in the below code. I dont wish to create a variable </p> <pre><code>uiDialog([MyURL,null,'GET'],false); </code></pre> <p>Some thing like this</p> <pre><code> uiDialog([url:MyURL,data:null,method:'GET'],false); </code></pre> <p>I know I can do something like </p> <pre><code>var a...
javascript
[3]