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,935,003 | 4,935,004 | How can I tell if my mobile network is available or not on the iPhone? | <p>i have one application in iphone in which i have to show notification when mobile SIM network is not present .i want also notification when network back .</p>
<p>and how can also i know how much other network available ?</p>
| iphone | [8] |
5,636,043 | 5,636,044 | Set Cursor Position in custom edittext | <p>I have a custom EditText which is empty and I want to set the cursor position using the co-ordinates(x,y) i get from ontouch event. Wherever I touch i should be able to move the cursor to that position and should be able to type the text from there. Help me out...</p>
| android | [4] |
4,522,456 | 4,522,457 | I am looking for an example of DataColumnsWithJoins usage? | <p>I am looking for an example of <a href="http://d.android.com/reference/android/provider/ContactsContract.DataColumnsWithJoins.html" rel="nofollow">DataColumnsWithJoins</a> usage? Do you know any?</p>
| android | [4] |
5,370,796 | 5,370,797 | Extending a Java class | <p>There are two classes </p>
<pre><code>public class Account
{
public Acconut()
{
//constructor
}
}
public class SavingsAccount extends Account
{
}
</code></pre>
<p>while doing the inheritance i have got an error message "cannont find symbol Symbol: constructor Account()" what might be the error... | java | [1] |
2,844,695 | 2,844,696 | Returning a reference can work? | <p>I used to think returning a reference is bad as our returned reference will refer to some garbage value. But this code works (<code>matrix</code> is a class):</p>
<pre><code>const int max_matrix_temp = 7;
matrix&get_matrix_temp()
{
static int nbuf = 0;
static matrix buf[max_matrix_temp];
if(nb... | c++ | [6] |
824,671 | 824,672 | What do I need to add to my .htaccess so <? gets recognised as <?php? | <p>It seems my server is not responding to <code><?</code>, and needs <code><?php</code>. How can I make it recognise <code><?</code> as well?</p>
| php | [2] |
4,914,960 | 4,914,961 | Assign an additional parameter to the the C# class object | <p>I have a method GetProduct, which returns a Product Object and say, i want to return an additional parameter along with the object, how can i implement it? In my below example , how can i return 'isExists '?</p>
<pre><code>public Product GetProduct()
{
---
----
bool isExists = true
return new Product(... | c# | [0] |
4,162,635 | 4,162,636 | Installing different versions of the same iPhone project? | <p>While I'm prototyping games, I frequently need to go back to compare with older versions, to better get a feel of if I'm on the right track or not. But it's a lenghty process to have to check out the old version and re-export everytime I need to check a specific version. It'd be so much smoother if I could simply la... | iphone | [8] |
2,884,994 | 2,884,995 | textview not updating as expected | <p>I have multiple <code>TextView</code> and <code>EditText</code> fields in two different activities. When I go to my Edit screen, I can input values and the corresponding <code>TextViews</code> are updated. The problem is that if I were to edit just one <code>TextView</code>, then the other <code>TextViews</code> go ... | android | [4] |
1,580,498 | 1,580,499 | Security issue accessing microsoft interop dll sending email | <p>We have a simple piece of code here that recently stopped working and I have tried many 'things' to try and resolve the error.</p>
<p>The code</p>
<p><code>Application outLook = new Application();</code> :)</p>
<p>The error</p>
<blockquote>
<p>Retrieving the COM class factory for component with CLSID
{0006F... | asp.net | [9] |
5,516,930 | 5,516,931 | lock-less technique to pass double update from one thread to another | <p>Assume I have shared <code>double</code> variable. Thread <code>A</code> updates it several thousands times per second. In another thread <code>B</code> I want to be notified somehow about "update" every time this happens.</p>
<p>I was tried to avoid notifications completely and just use <code>while(true)</code> lo... | c# | [0] |
4,834,440 | 4,834,441 | how to make dynamic year in select option | <p>pls help me how could i make a dynamic year inside the select option.
heres my code and this one gives me a result of separated year. how could i make the result just in one select option?</p>
<pre><code> $yrnw = date("Y");
$lyr = 1;
$lstyr = $yrnw - $lyr ;
$sy = 10 + $yrnw;
for($i=$yrnw; $i<$sy ; $i++){
$ls... | php | [2] |
1,769,358 | 1,769,359 | string.format conundrum | <p>for me where the following simple string.format() doesn't work !!</p>
<pre><code>return string.format(Resources.ABCSTRING, fieldName, fieldType);
</code></pre>
<p>where Resouces.ABCSTRING is</p>
<pre><code> {1} _{0};
internal {1} {0}
{
get { return _{0}; }
set
{
_{0}... | c# | [0] |
1,323,079 | 1,323,080 | Error While Reading the file /C:/Users/Lulzim/Cities.txt (No such file or directory) | <p>what about this code, this is not working too??
What is wrong here??</p>
<pre><code>FileInputStream fis;
final StringBuffer storedString = new StringBuffer();
try {
fis = openFileInput("C:/Users/Lulzim/Cities.txt");
DataInputStream dataIO = new DataInputStream(fis);
... | android | [4] |
389,513 | 389,514 | How to read a musical file using python and identify the various frequency levels of the notes? | <p>please help me with the python...this is my project topic...</p>
| python | [7] |
2,216,841 | 2,216,842 | How to "include" third party modules into my python script to make it portable? | <p>I've developed a little script that searches through a wallpaper database online and download the wallpapers, I want to give this script to another person that isn't exactly good with computers and I'm kinda starting with python so I don't know how to include the "imports" of the third party modules in my program so... | python | [7] |
4,925,156 | 4,925,157 | explicit filepath to file in parent directory | <p>I have a situation where I have two config files.<br>
A base config which resides in a parent directory, and a sibling config in a sibling directory.<br>
To date, the sibling looks to the parent with a simple </p>
<pre><code>require_once "../parent_config.php";
</code></pre>
<p>However I now want to pass the sibli... | php | [2] |
3,605,606 | 3,605,607 | javascript prototyping: why doesn't this work? | <p>I'm looking at trying the following code:</p>
<pre><code>var classA = function() {};
classA.prototype = { x: 4, y: 6 };
classA.prototype.prototype = { z: 10 };
var foo = new classA();
alert(foo.z);
</code></pre>
<p>Why does the alert come back as undefined? Shouldn't javascript follow the prototype chain to find ... | javascript | [3] |
2,629,092 | 2,629,093 | Best practice to reference the parent activity of a fragment? | <p>I've been working a lot with fragments lately and I was just curious as to what the best practice is for using a reference to a fragment's parent activity. Would it be better to keep calling getActivity() or have a parentActivity variable initialized on the onActivityCreated callback.</p>
| android | [4] |
3,057,741 | 3,057,742 | is it possible to not reload user control when redirect to a page? | <p>I have created a user control for side menu navigation and when user clicks on one of the item on a menu, it displays details of the company and information. Now it is redirecting to different page for each company using passing parameter (ex. company.aspx?ID=10) and everytime when I clicked, it refreshes whole page... | asp.net | [9] |
3,227,899 | 3,227,900 | Interface builder and memory management | <pre><code>@property (nonatomic, retain)IBOutlate UITextField *userName;
</code></pre>
<p>this property is to connect with TextField in IB.</p>
<ol>
<li><p>Can we write <code>[userName release]</code> in <code>dealloc</code> to free the memory or it will be handled by IB.</p></li>
<li><p>Can i write <code>@property(n... | iphone | [8] |
5,231,658 | 5,231,659 | Print value of number (int) spelled out | <p>is there an out-of-box way to spell out an int in C#? For example if I have:</p>
<pre><code>int a = 53;
</code></pre>
<p>I want to print:</p>
<pre><code>"fifty three"
</code></pre>
<p>not</p>
<pre><code>"53"
</code></pre>
<p>If not, does anybody have any examples on how to accomplis this?</p>
<p>Thanks!</p>
| c# | [0] |
3,628,061 | 3,628,062 | <img /> scale to closest fit aspect ratio | <p>I want to make the logo (in the top left corner) always keep its aspect ratio, but I also want it to stay in the right place, for <em>any</em> browser. Here's my code:</p>
<pre><code><body>
<img src="/home/istom/Dropbox/bcs logo border.png" width="25%" height="25%" style="position:absolute;top:6%;left:9.7%... | javascript | [3] |
3,172,498 | 3,172,499 | Set link href based on link text with jQuery | <p>I have:</p>
<pre><code><a class='special' href='#'>something</a>
<a class='special' href='#'>anything</a>
</code></pre>
<p>I need to make it with page load:</p>
<pre><code><a class='special' href='something'>something</a>
<a class='special' href='anything'>anything</a&... | jquery | [5] |
1,675,555 | 1,675,556 | Looping through with dates syntax issue | <p>I have created a fixture generator for football/ soccer games...</p>
<pre><code> for ($round = 0; $round < $totalRounds; $round++) {
for ($match = 0; $match < $matchesPerRound; $match++) {
$home = ($round + $match) % ($teams - 1);
$away = ($teams - 1 - $match + $round) % ($t... | php | [2] |
256,345 | 256,346 | Allow only 3 numbers | <p>I want to make a javascript (or jquery) function that works onChange and allow only to write 3 numbers : 5, 15 or 25 </p>
<p>If the user write an other value (example 3 or 4...), the input have to be reset to 0</p>
<p>How can I do that?</p>
| javascript | [3] |
838,731 | 838,732 | Sorting a particular column of datatable of string type that contains numeric data | <p>I have a datatable (.Net) with multiple columns. One of the columns say RollNo is of string type but contains numeric data. Eg. <strong>1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14</strong>. I am trying to sort using the following:</p>
<pre><code>string sql =
"Select StudentID, RollNo, AdmissionID,(FirstName + ... | c# | [0] |
1,072,389 | 1,072,390 | create one activity application | <p>I want to create an activity that uses the intent action for Screen_off - is there an easy way to do this? I keep getting lost as to where I should start - does the screen_off activity need to be defined somewhere and then referred to?</p>
| android | [4] |
983,096 | 983,097 | How to animate a set of jQuery objects one at a time (instead of all at once) | <p>I'm trying to build a picture slider. (I know there are tons of plug-ins out there, but this is more for educational purposes).</p>
<p>Basically, I have a set of images with z-index: 0. What I am trying to do is take the set of images, then select each one of the images and change the index to 1, animate the opacit... | jquery | [5] |
2,626,711 | 2,626,712 | set a random string for a variable in PHP | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/4233407/get-random-item-from-array">Get random item from array</a> </p>
</blockquote>
<p>I need a code to set a random string for a variable.
of course I have the string and they are not generated.
I can put the... | php | [2] |
3,596,545 | 3,596,546 | How can I capture androids scrollstop event natively? (without using jQuery Mobile) | <p>I've got access to the full-on jQuery, not mobile. It would seem that putting in code like;</p>
<pre><code>$(document).on("scrollstop", function(){
alert(1);
});
</code></pre>
<p>isn't going to help me without jQuery Mobile. Is there any other way I can capture the scroll event consistently in Android? (2.x an... | android | [4] |
5,792,621 | 5,792,622 | Slide show effect in iphone | <p>I want to create on slide show in my iphone application which open if the user don't touch the screen for 30 second , for that i have made on method which reset the time when user touch the screen . </p>
<p>I have used nstimer class to handle timer event .</p>
<p>my problem is that even if invalidating the timer t... | iphone | [8] |
1,659,568 | 1,659,569 | feeding dynamic variable names into $_POST | <pre><code>isset($_POST['"$daysofweek[i]"'])
</code></pre>
<p>I tried different variations but i can't get it to detect. I have an array with all the days of the week and I want to check every POST variable. </p>
<p>It's probably really simple, but im stuck.</p>
<p>Thanks</p>
| php | [2] |
5,471,030 | 5,471,031 | Difference between char* and char[] | <p>I know this is a very basic question. I am confused as to why and how are the following different. </p>
<pre><code>char str[] = "Test";
char *str = "Test";
</code></pre>
| c++ | [6] |
1,878,586 | 1,878,587 | BaseAdapter not allow INTENT action | <p>An extended class with <code>BaseAdapter</code> will not allow me to jump from one activity to the second ::
it give me syntax error :: </p>
<pre><code>holder.capture.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
intent_request = new Intent(this, SaxParser2.cl... | android | [4] |
3,838,932 | 3,838,933 | Bind a DropDownList to IEnumerable | <p>I have a method:</p>
<pre><code>public static IEnumerable<Datarow> getInfo (string test)
{
some functionality and adds two columns in datatable dt.
now how can i return dt from this method (question 1)
}
</code></pre>
<p>I have to bind the method returned value to a dropdown list named <code>ddlist</... | asp.net | [9] |
5,032,745 | 5,032,746 | jquery "everyTime" function | <p>I'm trying to refresh my recent list every 5 seconds. I was looking at ajax and found jquery.</p>
<p>I found a function known as "everyTime"</p>
<p>This is what I have so far, I don't really know how to get it to work... It's not working:\</p>
<pre><code><html>
<head>
<script src="http://code.jquer... | jquery | [5] |
2,576,046 | 2,576,047 | Issues regarding scrollTop in JavaScript | <p>I want the Alert message <code>hello</code> to be displayed when the vertical scrolling on the page exceeds 100px. I tried doing but it didn't work.</p>
<p>JavaScript Code:</p>
<pre><code>function fixSearch(body) {
var a=body.scrollTop;
if(a>100)
{
alert("Hello");
}
}
</code></pre>
<p>HTML Code</p>
<pre><c... | javascript | [3] |
5,300,782 | 5,300,783 | Changing URL displayed in address bar | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1039725/how-to-url-re-writing-in-php">How to: URL re-writing in PHP?</a><br>
<a href="http://stackoverflow.com/questions/7088651/how-can-i-keep-the-same-url-in-the-address-bar-for-every-page">How can I keep the sa... | php | [2] |
2,651,750 | 2,651,751 | Numbers in Javascript and effective range | <p>All numbers in Javascript are 64bit (8 bytes) floating point numbers
but why the effective range of JavaScript is 5e-324 (negative) to 1.7976931348623157e+308 (positive)?</p>
| javascript | [3] |
3,337,071 | 3,337,072 | Run PHP Function once | <p>Is there a way to run a PHP FUNCTION "fun();" only once when a logged in user accesses a page multiple times?</p>
<p>here is the function.</p>
<pre><code><?php
$connect = //connect to database
function fun()
{
//loop declare begin
$quer = "SELECT * FROM sffedorvsdan WHERE username = '$_SESSION[userna... | php | [2] |
4,125,040 | 4,125,041 | Set StringBuilder before use? | <p>Does a StringBuilder variable need to be initialized to lets say string.empty in case you don't end up appending anything in the end and need to return something?</p>
<pre><code> public static string ToSemiColonList<T>(this IEnumerable<T> list, Func<T, string> func)
{
StringBuilder ... | c# | [0] |
320,056 | 320,057 | Insert in multiple relative tables | <p>I have two tables:
<strong>eventcategory</strong>
<img src="http://i.stack.imgur.com/PUh3T.png" alt="enter image description here"></p>
<p><strong>initplayer</strong>
<img src="http://i.stack.imgur.com/xD3Iu.png" alt="enter image description here"></p>
<p>What i want is to insert the table initplayer.</p>
<p>In o... | php | [2] |
5,236,986 | 5,236,987 | Android Autocomplete textview multilines | <p>I want to show 2 lines in autocomplete textview suggestion list. I have customer information such as customerid, customername and address. I want to show customername in first line and customer address in 2nd line. Is it possible to show multilines in Autocomplete textview?</p>
<p>thank you</p>
| android | [4] |
4,757,668 | 4,757,669 | Stub out network on android device | <p>I need to stub out the GSM network on a test android device for testing some parts of an application. Is this possible?</p>
<p>Thanks</p>
| android | [4] |
4,337,895 | 4,337,896 | value of decoded json | <p>I try to get item from dict, which was decoded by json:</p>
<pre><code>data = [ { 'a':'A', 'b':(2, 4), 'c':3 } ]
data_string = json.dumps(data)
decoded = json.loads(data_string)
decoded['c']
</code></pre>
<p>So it shows the next:</p>
<pre>
Traceback (most recent call last):
File "", line 1, in
TypeError: list ... | python | [7] |
1,062,324 | 1,062,325 | How to convert SESSION Variable to Integer Type in C# | <p>I am using C#</p>
<p>I am trying to check whether my login attempt is not more than 3, I mean with below condition</p>
<pre><code>if (((int)Session["LoginAttempt"]) != 3)
{
}
</code></pre>
<p>In Login failed condition I am doing increment like below:</p>
<pre><code>Session["LoginAttempt"] = ((int) Session["Logi... | c# | [0] |
1,878,959 | 1,878,960 | Joining Lists using Linq returns different result than corresponding SQL query? | <p>I have 2 tables</p>
<p>TableA:</p>
<pre class="lang-none prettyprint-override"><code>TableAID int,
Col1 varchar(8)
</code></pre>
<p>TableB:</p>
<pre class="lang-none prettyprint-override"><code>TableBID int
Col1 char(8),
Col2 varchar(40)
</code></pre>
<p>When I run a SQL query on the 2 tables it returns the fol... | c# | [0] |
2,555,253 | 2,555,254 | Can you give me a Programming problem in java | <p>I am learning java on my own. I have books to read. but i feel i am not really coding anything significant . Can you guys give me any programming problem that would really help me get more practical experience rather than a theoretical experience with java ?</p>
<p>Appreciate it.</p>
<p>silverkid</p>
| java | [1] |
5,024,085 | 5,024,086 | customErrors mode="Off" in web.config but still Server Error in '/' Application | <p>I deployed an asp.net website to a shared server..... </p>
<p>I got the error </p>
<p><code>Server Error in '/' Application.</code></p>
<p><strong>Runtime Error</strong></p>
<p><code>Description: An application error occurred on the server. The current custom error settings for this application prevent the detai... | asp.net | [9] |
173,077 | 173,078 | 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] |
2,445,057 | 2,445,058 | getListenerList or getListeners | <p>I'm curious about which method should be used to retrieve the list of listeners from an EventList. The Oracle docs example shows getListenerList and then traversing backwards through it in the fireXXXEvent method, but I'm wondering if getListeners would be a better choice?</p>
<p>Thanks</p>
| java | [1] |
3,220,337 | 3,220,338 | Using Type.GetType() function to get the type of the class from the different namespace | <p>I want to call a class and its method with the name of the class and the method name will be known at run time. the class i want to call is a in a different project ClassLibrary. .The namespace of the class which is to be called i have added reference of it to my current project. and wrote the following code to call... | c# | [0] |
3,407,748 | 3,407,749 | How to perform Redo Undo operation in EditText | <p>I want to know is there any method or any link or tutorial to perform redo undo operation in Android edittext. If any one knows than please let me know.</p>
| android | [4] |
5,225,779 | 5,225,780 | Export a excel file witout any dialog+asp.net,c# | <p>I am exporting a excel file from "c:Test\data.xls" using the responce object
like:</p>
<pre><code>response.AddHeader("Content-Disposition", "attachment; filename=" + FileName + ";");
</code></pre>
<p>it is opening a dialog box.But Now we don't need the dialog box.we want to directly open file without dialog.
Can a... | asp.net | [9] |
1,161,516 | 1,161,517 | Origin null is not allowed by Access-Control-Allow-Origin (Synchronous, no jQuery) | <p>The first thing I would like to say is that I looked around for an answer to this for quite some time, but everything I found was about jQuery. This is not about jQuery. </p>
<p>I have some code (below), but when I ran it in Firefox then Firebug gave me this big, incomprehensible exception. I tried it in Google Ch... | javascript | [3] |
4,440,447 | 4,440,448 | How do I add items to an array in JQuery | <pre><code>var list = [];
$.getJSON("json.js", function(data) {
$.each(data, function(i, item) {
console.log(item.text);
list.push(item.text);
});
});
console.log(list.length);
</code></pre>
<p>list.length always returns 0. I've browsed the json in firebug and it well formed; everything looks ... | jquery | [5] |
5,750,976 | 5,750,977 | Why is a default ctor needed for this inner (nested) struct? | <p>I am trying to compile code similar to the snippet below:</p>
<pre><code>class System
{
private:
struct Configuration
{
Configuration(/*params*/);
Configuration(const Configuration&);
Configuration& operator=(const Configuration&);
~Configuration();
/* member variabl... | c++ | [6] |
4,248,412 | 4,248,413 | Can I split jQuery into two files? | <p>As you know, the max MTU for TCP is 1500. The iPhone doesn't cache files bigger than 25kb.</p>
<p>Has anybody tried to split jQuery into two separate files?</p>
<p><img src="http://i.stack.imgur.com/h5CK4.png" alt="enter image description here"></p>
<p>jQuery 1.5.2 is 29.1kb. How can I split jQuery 1.5.2 into two... | jquery | [5] |
5,445,513 | 5,445,514 | Python class structure ... prep() method? | <p>We have a metaclass, a class, and a child class for an alert system:</p>
<pre><code>class AlertMeta(type):
"""
Metaclass for all alerts
Reads attrs and organizes AlertMessageType data
"""
def __new__(cls, base, name, attrs):
new_class = super(AlertMeta, cls).__new__(cls, base, name, attrs)
# do stuff to... | python | [7] |
3,865,237 | 3,865,238 | PHP dom - How to get the contents within a span tag that includes a hyperlink | <p>I've done this before but can't find my code snippet.</p>
<p>I'd like to parse an html file and pull everything into my browser that sits between some span tags. There are other span tags in the html that I do not want so I figured I would limit the parsing to just the span tags that have the same css class. Can so... | php | [2] |
2,092,856 | 2,092,857 | How do I reference an object instance from a class initialization? | <p>Here is a small example. I want to reuse the mongodb object in many other methods in this class, without initializing it within each function.</p>
<p>Or is there a better approach in general?</p>
<pre><code> <?php
class Model_Users extends Model
{
public static function _init()
{
$mongodb = \M... | php | [2] |
342,012 | 342,013 | Accessing theme customizer farbtastic object instances | <p>I have multiple individual color pickers set up in the theme customizer, which results in several instances of the farbtastic color picker.</p>
<p>I am trying to find the jQuery/JavaScript instance variable for each of these, just can't seem to find a reference to them anywhere. I want to be able to set each farbta... | javascript | [3] |
3,624,452 | 3,624,453 | Jquery Find Replace | <p>I have following HTML code</p>
<pre><code><a href="javascript:void(0);" onClick="javascript:OpenNewWindow('/help_email.asp?ProductCode=122030', 350, 250);" class="pricecolor colors_productprice"><b><span class="PageText_L657n"><br><input type="Button" font face="arial" size="2" color="#ff... | jquery | [5] |
1,654,340 | 1,654,341 | search for innerHTML value in a table | <p>how can I search in a table for a row with a specifik innerHTML value?</p>
<pre><code><table>
<tr><td>test</td><td>100</td></tr>
<tr><td>test</td><td>200</td></tr>
<tr><td>test</td><td>300</td></tr>
<... | jquery | [5] |
4,876,091 | 4,876,092 | How to rectify transformer exception | <p>I am doing application with parsing XML file. I used TransformerFactory to modify XML file. when i use TransformerFactory in android 2.2 version its working fine, at the same time when using TransformerFactory in android version 2.1 i am getting Transformer exception. Can anybody know how to rectify transformer exce... | android | [4] |
2,855,090 | 2,855,091 | Console information to window | <p>I already know how to catch standard output of a console window, BUT my problem is the case when I get the process with GetProcesses/orByName and do not Start() it myself. Here is the code:</p>
<pre><code>public ProcessCaller(ISynchronizeInvoke isi, Process MárFutóAlkalmazás)
: this(isi)
{
//alapbeállítások
F... | c# | [0] |
154,311 | 154,312 | which return comply with C++ standard | <pre><code>class A {};
class B
{
public:
B(const A& a, int i = 10) : m_a(a), m_i(i) {}
private:
int m_i;
A m_a;
};
B getB(void)
{
//return B(A()); // Method one
//return A(); // Method two
}
</code></pre>
<p>Both method one and method two pass the compilation of VS2010.</p>
<p><strong>... | c++ | [6] |
3,519,558 | 3,519,559 | How to find out the Encoding of a File? C# | <p>Well i need to find out which of the files i found in some directory is UTF8 Encoded either ANSI encoded to change the Encoding in something else i decide later. My problem is.. how can i find out if a file is UTF8 or ANSI Encoded? Both of the encodings are actually posible in my files.</p>
| c# | [0] |
3,236,998 | 3,236,999 | Traversing directories to count number of files with a specific string | <p>I have a directory with several levels of sub-directories. All the files in the directories are html files (approx. 500 in total), and I'd like to go through each file to see if if contains a "sub_middle_1col" division. I found a great tutorial at palewire.com and have used that as my base. The two difficulties I am... | python | [7] |
260,343 | 260,344 | How can i store audio file in sqlite..? | <p>I want to save recorded file and after that i want to save in sqlite database. How it possible?
Give me some proper guideline on that..
Ayn suggestion welcomes...</p>
| iphone | [8] |
2,505,655 | 2,505,656 | How to append dom with a item count | <p>I have to insert dom object with a count of times like <code>$('ul').append('<li>',5); //5 times</code></p>
<p>I know how to do that with for loop but i am looking elegant way.</p>
| jquery | [5] |
223,581 | 223,582 | How can I get co-ordinates of transperent portion from Image | <p>I use an image . I made some portion of the image transparent. Now How can I find the co-ordinates of the transparent portion of the image so that I am able to find the actual area of the non-transparent area.. I want some methodical way to find..</p>
<p>please do needful</p>
| android | [4] |
2,169,542 | 2,169,543 | PHP: display in "Today" only, not in "Yesterday" too | <pre><code>$today = time() - (3600*24);
$Yday = time() - (3600*48);
$getMsgsToday = mysql_query("SELECT * FROM users_msgs WHERE uID = '$USER' AND date > $today");
$countToday = mysql_num_rows($getMsgsToday);
$getMsgsYday = mysql_query("SELECT * FROM users_msgs WHERE uID = '$USER' AND date > $Yday");
$countYday ... | php | [2] |
2,358,781 | 2,358,782 | PHP - assigning function return to variable | <p>I have a PHP script that returns a random password. How do I echo out the password that is generated?</p>
<pre><code><?php
function generatePassword($length=9, $strength=0) {
$vowels = 'aeuy';
$consonants = 'bdghjmnpqrstvz';
if ($strength & 1) {
$consonants .= 'BDGHJLMNPQRSTVWXZ';
}... | php | [2] |
2,380,500 | 2,380,501 | How to make script paths inside user control independent of page hierarchy | <p>My website is organized in the following folder structure</p>
<pre><code>Root
Pages
CustomerManagement
DepartMentManagement
Script
UserControls
</code></pre>
<p>Now i have a user control inside userControl Folder. I have to use a external js file. So i use it this way</p>
<pre><code><script typ... | asp.net | [9] |
2,087,010 | 2,087,011 | How to read and update row in file with Java | <p>currently i creating a java apps and no database required
that why i using text file to make it
the structure of file is like this</p>
<pre><code>unique6id username identitynumber point
unique6id username identitynumber point
</code></pre>
<p>may i know how could i read and find match unique6id then update the co... | java | [1] |
2,614,415 | 2,614,416 | ASP.NET masterpage public variables error | <p>I have public variable 'MessagePlaceholder' on MasterPage and a Class that accesses this property like that setting it's value to string from getMessage();</p>
<pre><code>((HttpContext.Current.Handler as System.Web.UI.Page).Master as MasterPage).MessagePlaceholder = getMessage();
</code></pre>
<p>which gives me an... | asp.net | [9] |
124,803 | 124,804 | Should C++ 'interfaces' have a virtual destructor | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2691611/destructors-for-c-interface-like-classes">Destructors for C++ Interface-like classes</a> </p>
</blockquote>
<p>Consider a simple example of a C++ abstract class, used to model an interface:</p>
<pre><co... | c++ | [6] |
3,988,863 | 3,988,864 | getting an index of a character | <p>I'm having a problem getting an index of the character '-' of a string. Let me explain my problem.
First I have to read a line from a text file. The only line in the text file is "Beta = 62.5 * (Sigma – Delta) / 125"</p>
<pre><code>StreamReader rdr = new StreamReader(openPath, Encoding.Default);
w... | c# | [0] |
4,997,974 | 4,997,975 | Can not access the mBuffer | <p>I use the below code:</p>
<pre><code>Bitmap myBmp = Bitmap.createBitmap( 720, 1280, Config.ARGB_8888 );
byte []data = myBmp.mBuffer ????
</code></pre>
<p>But I find that the mBuffer of android.graphics.Bitmap can not be accessed. And there is no hint for this in Eclipse. </p>
<p>How to solve this?</p>
| android | [4] |
4,141,935 | 4,141,936 | Split comma-separated input box values into array in jquery, and loop through it | <p>I have a hidden input box from which I'm retrieving the comma-separated text value (e.g. <code>'apple,banana,jam'</code>) using:</p>
<pre><code>var searchTerms = $("#searchKeywords").val();
</code></pre>
<p>I want to split the values up into an array, and then loop through the array.</p>
| jquery | [5] |
2,444,785 | 2,444,786 | Insert html before the head tag (not in or between them) using JavaScript | <p>I need to insert a comment before the html tag and before the doctype tag (if present) like..</p>
<pre><code><!-- HelloWord -->
</code></pre>
<p>From a previous quest the following code did the job where an attribute was to be inserted "inside" a tag, however this quest is different...</p>
<pre><code>docume... | javascript | [3] |
3,993,587 | 3,993,588 | parse rss feed using javascript | <p>I am parsing an RSS feed using PHP and JavaScript. First I created a proxy with PHP to obtain the RSS feed. Then get individual data from this RSS feed using JavaScript. My issue with with the JavaScript. I am able to get the entire JavaScript document if I use <code>console.log(rssData);</code> with no errors. If I... | javascript | [3] |
2,842,068 | 2,842,069 | Help with basic Python function | <p>I have a function to connect to a database. This code works:</p>
<pre><code>def connect():
return MySQLdb.connect("example.com", "username", "password", "database")
</code></pre>
<p>But this doesn't:</p>
<pre><code>def connect():
host = "example.com"
user = "username"
pass = "password"
base = ... | python | [7] |
85,099 | 85,100 | How do I check if an array element exists? | <p>I'm looking for Java's equivalent of PHP's <a href="http://php.net/manual/en/function.isset.php" rel="nofollow">isset()</a>;</p>
<pre><code>int board[][]=new int[8][8];
...
if(isset(board[y][x]))
// Do something with board[y][x]
</code></pre>
<p>Does such a function exist in Java?</p>
<p>Edit: Sorry, what I mea... | java | [1] |
1,000,504 | 1,000,505 | Is the constructor of a class called if you declare a object of that class as an instance variable of another class? | <p>For example, if i have a class like this;</p>
<pre><code>#import "B.h"
class A
{
B object;
};
</code></pre>
<p>would B's constructor get called when I created a A object?</p>
| c++ | [6] |
3,759,738 | 3,759,739 | The steps to becoming an iPhone Developer | <p>First some background:</p>
<p>The company I work for have decided to create an iPhone App for our main product and nominated me to do this work. I've been a professional C# developer for over 5 years and although I have used other languages (Java, C++ etc), I have not used them to a professional standard and not f... | iphone | [8] |
117,863 | 117,864 | Noninterrupting keyevents while preserving individual keystrokes | <p>I am designing a keyboard interface through javascript, and I want to define keystroke combinations, like shift+rightkey or ctrl+tab. But after tinkering with javascript, as seen <strong><a href="http://jsfiddle.net/Arcym/ENUj2/7/" rel="nofollow">here</a></strong>, I've noticed that all keyevents are interrupting. I... | javascript | [3] |
4,570,544 | 4,570,545 | Strange Javascript behaviour | <p>I am using JQuery to append images, like this:</p>
<pre><code>$('#event_list_main').append('<img class="listed_event" id="event_'+event_counter+'" data-count="'+event_counter+'" src="final_tutorial_buttons/event.png" height="50" width="50" onclick="highlight();" />');
</code></pre>
<p>I am assign a <code>hig... | javascript | [3] |
2,648,678 | 2,648,679 | How to add a map as a class field? | <p>I want to add a dictionary that maps an object to a list of objects as an instance variable to a class. What is the idiomatic way to do it in Python? Here's how I've done it:</p>
<pre><code>class MyClass:
def __init__(self):
self.myDict = { None : [None] }
</code></pre>
| python | [7] |
1,191,943 | 1,191,944 | How often do you find javascript disabled on browsers? | <p>I have started using ajax/jQuery in our websites / application. There are many plugins that support degrading the javascript to browsers that dont have javascript enabled and techniques to support this. What are peoples thoughts on javascript support, we build applications rather than just websites and are looking t... | javascript | [3] |
4,936,709 | 4,936,710 | Can I call a jquery function from a click? | <p>I am trying to do something similar to the alert box that we get here on SO when we get new comments and answers, the orange box that sticks to the top of the screen, I have something similar but I am trying to get an X close link on it, to close it on click</p>
<p>Here is what I have but it is giving me errors say... | jquery | [5] |
2,456,575 | 2,456,576 | Formatting a number with leading zeros in PHP | <p>I want have a variable which contains the value 1234567.</p>
<p>I want it to contain exactly 8 digits i.e. 01234567.</p>
<p>Is there a PHP function for that?</p>
| php | [2] |
3,025,452 | 3,025,453 | PHP 5.3 pass function by reference | <p>Is it possible to pass functions by reference?</p>
<p>Something like this:</p>
<pre><code>function call($func){
$func();
}
function test(){
echo "hello world!";
}
call(test);
</code></pre>
<p>I know that you could do <code>'test'</code>, but I don't really want that, as I need to pass the function by re... | php | [2] |
4,081,500 | 4,081,501 | search certain characters in an if statement | <p>.what i want to do is search for certain Initials inside a retrieved record from a database. for example i have a record like this.. "SGA, MNFA, JGA" how do I code an If statement that will search if SGA is present inside the record. If it is found then proceed, if not, then an else statement will be performed.</p>
... | php | [2] |
1,452,347 | 1,452,348 | How to optimize the login option in android? | <p>HI,</p>
<p>I want to create Login option in my application , so that once a person gets login that device creates token which is saved over server. From next time whenever he/she operates the application, directly goes to next label by checking that token keyvalue pair over server.IT requires login page only when t... | android | [4] |
3,872,674 | 3,872,675 | UITableView cell background color | <p>how to set different background colors for cells in a UITableView
(specifically rainbow color for seven cells)</p>
| iphone | [8] |
2,938,965 | 2,938,966 | Calculation results not displaying in totals table javascript | <p>I'm trying to create a paycheck calculator, but when I enter the hourly rate and number of hours and hit calculate, all I'm getting is <em>undefined</em> in my totals table. Here is my javascript:</p>
<pre><code>var $ = function (id) {
return document.getElementById(id);
}
function updateTotal () {
var rate;
var... | javascript | [3] |
3,722,205 | 3,722,206 | Detect intent-filter received by app | <p>I'm building an app that is registered for the intent filters IMAGE_CAPTURE (Camera) & PICK (Gallery).</p>
<p>For the Activity, how do I detect which intent filter was received?</p>
| android | [4] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.