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
510,559
510,560
Filtering integers out of python command line arguments
<p>so I wrote a program and I want to pass it either a filename and an integer or just an integer. Whats the best way to determine which argument is the integer? This is what I have:</p> <pre><code>import sys if len(sys.argv) &gt; 1): for e in sys.argv: try: bio = map(e, int) except: ...
python
[7]
3,578,298
3,578,299
Missing Locales in Java?
<p>I've found a number of missing countries in java locales- If I print out a list of available locales, </p> <pre><code>TreeSet&lt; String &gt; m = new TreeSet&lt; String &gt;(); for ( Locale l : Locale.getAvailableLocales() ) { m.add( l.getDisplayCountry() ); } for ( String s : m ) { System.out.println( s );...
java
[1]
2,783,325
2,783,326
How can I make use of PHP data cache in export to csv or txt
<p>What is the advantage of PHP data cache ?</p> <p>Where i can use that , is it good only for browser search or</p> <p>it is good for data export to csv or text also .</p> <p>How can i achieve data cache using PHP?</p>
php
[2]
4,676,157
4,676,158
Attribute value is URI encoded on set
<p>I want to set an <code>attribute</code> of a DOM element using <code>element["attribute"]</code>, but the value is <code>URI encoded</code>. For instance, if the value is <code>q=test&amp;r=123&amp;s=456</code> and after I append it into the DOM, the value becomes <code>q=test&amp;amp;r=123&amp;amp;s=456</code>.</p>...
javascript
[3]
5,852,468
5,852,469
phpfox ;_How to give href to variable in php
<p>I want to display the variable with hyperlink. Does anyone know how to give? I have applied the below method for href:</p> <pre><code>&lt;div style="width:50px;height:20px;float:right"&gt; &lt;a href="#" onclick="$.ajaxCall('forum.UnFlag', 'user_id={$aThread.user_id} &amp;thread_id={$aThread.thread_id} &amp;rat...
php
[2]
5,363,088
5,363,089
how to Disable multiple selected dropdown values in javascript
<p>I have one add button if i click it then it generates one new line having one dropdown(Multiple selection allowed) ,now if i ve selected some value in the dropdown next time if i press add button again it will generate the same dropdown in a new line but i want user should not able to select the previously selected ...
javascript
[3]
1,909,564
1,909,565
Converting back from toString to Object
<p>Is there any way to convert from toString back to the object in Java?</p> <p>For example:</p> <pre><code>Map&lt;String, String&gt; myMap = new HashMap&lt;String, String&gt;(); myMap.put("value1", "test1"); myMap.put("value2", "test2"); String str = myMap.toString(); </code></pre> <p>Is there any way to convert th...
java
[1]
3,900,847
3,900,848
Is there any way to exit the application when home button is pressed on Android?
<p>I want to kill the app when user presses the home button. Is there any way to do this on Android?</p>
android
[4]
2,850,044
2,850,045
#ifdef in C#
<p>I would like to do the below but in C# instead of C++</p> <pre><code>#ifdef _DEBUG bool bypassCheck=TRUE_OR_FALSE;//i will decide depending on what i am debugging #else bool bypassCheck = false; //NEVER bypass it #endif </code></pre>
c#
[0]
955,409
955,410
Gathering data from other website via an api
<p>Let's start with some quick info. I am a student doing an internship at a semi-big company as a web developer. Now I got an assignment to find a way to make scraping of websites cleaner.</p> <p>This company hosts a pretty big website (at least, they hope to get big) and have a page where you can see info from other...
php
[2]
1,484,858
1,484,859
dateFromString returning wrongDate
<p>I am converting an NSString like @"12:25 AM May 27 2011" into NSDate.But as I convert it using the following code</p> <pre><code>NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"hh:mm a MMM dd YYYY"]; NSDate *date = [[dateFormatter dateFromString:@"12:25 AM May 27 2011...
iphone
[8]
5,191,405
5,191,406
how to define a data source method
<p>How to define data source method.</p>
iphone
[8]
5,036,814
5,036,815
How the int.TryParse actually works
<p>I've looked for int.TryParse method implementation, how it works actually, but I haven't found. I have to know, about a string, whether it's a numeric value, but I don't want to convert it at the this time. So I need only the bool result from tryparse. So the questions are:</p> <p>1, Is there any function wich can ...
c#
[0]
1,723,040
1,723,041
Is ASP.NET still worth learning or is it being replaced by frameworks like JQuery
<p>We have been using ASP.NET for a big project for > 5 years. Recently, we find that JavaScript is a preferred way of rendering data on the page. So I would like to ask if others are also moving in the direction of JavaScript / WebServices / JSON and thus ASP.NET is becoming irrelevant ?</p> <p>Also, does anybody eve...
asp.net
[9]
2,026,747
2,026,748
How to export the contents of the string or textbox to txt file that remains the same format (If string has 5 lines, txt file will has 5 lines)?
<pre><code>if (saveFileDialog1.ShowDialog() == DialogResult.OK) { FileInfo Myfile = new FileInfo(saveFileDialog1.FileName); StreamWriter wri = Myfile.CreateText(); wri.WriteLine(Richtextbox.Text); wri.Close(); } </code></pre> <p>When I export to a text file, all the lines in richtextbox stick into one ...
c#
[0]
3,464,410
3,464,411
How do you get JQuery to wait until an effect is finished?
<p>I am sure I read about this the other day but I can't seem to find where. I have a fadeOut event after which I remove the element and JQuery is removing the elemnt before it has a chance to finish fading out. What is the solution to this again?</p>
jquery
[5]
5,002,037
5,002,038
jQuery .val() returns empty string
<p>It feels like jQuery is messing with me, although it's probably a simple issue. My code get's to the DOM-element that i want to get the value of, but when i add .val() it returns an empty string.</p> <pre><code>$('tr.invoice td[data-attr=Payed] div.true').closest('tr').find('td[data-attr=Expiration]') Returns this:...
jquery
[5]
1,249,063
1,249,064
Reverse of number in PHP not showing correct output
<p>I have made a program to reverse the number but every time <code>0</code> gets appended to the result.</p> <pre><code>$num = 675; $rev = 0; while($num &gt; 0) { $temp = $num % 10; $rev = ($rev * 10) + $temp; $num = (int) $num / 10; } echo $rev; //result is 5760 </code></pre>
php
[2]
5,988,730
5,988,731
Animating from offscreen with TranslateAnimation causes adjacent view to be clipped
<p>Right now I have a view that I'm just popping onto the screen by changing the view from GONE to VISIBLE, and I instead want to have a TranslateAnimation that shifts the view onto the screen. As soon as the animation starts the view on the right becomes clipped though. I assume this is because the parent view is taki...
android
[4]
3,933,246
3,933,247
java apache poi importing into netbeans 6.9
<p>i downloaded apache.poi-src-3.7-20101029.zip and i want to use this package in my java application using netbeans 6.9 to get use of doc files.</p> <p>How to configure that zip file into netbeans to get use of the package into java application</p>
java
[1]
4,506,989
4,506,990
Why can't I appendChild to the specified DIV?
<p>In some cases it is possible for me to use appendChild() to add to a div, but in other cases it does not work and I am trying to understand why:</p> <p><strong>Works:</strong> I have other code examples where something like the following code works fine:</p> <pre><code>function fnAppend(){ var oNewNode = docume...
javascript
[3]
5,005,751
5,005,752
PHP get first few charactors and remove from string
<p>Does anyone know how to remove the first few characters from a string and remove them in PHP.</p> <p>Like in the string "str_filename" I need to remove the "str_" and save the "filename".</p> <p>But it has to remove as many charactors as it takes to get to the "_".</p> <p>In other words, i need to remove all the ...
php
[2]
1,785,548
1,785,549
android - How to integrate magnifying glass to my app
<p>I want to integrate "magnifying glass" in my android app.The Magnifying glass should appear when long pressed on a certain point on image then particular part of image should appear in magnifying glass with zooming that touched area.I searched many websites about this magnifier but i don't found any useful link/dat...
android
[4]
5,031,966
5,031,967
outlook start time to java calendar?
<p>How to change the outlook start time to java calendar</p> <p>In outlook I set start time = Tue 7/13/2010 5:00 p.m. When i parse the ics file it gives the data like this </p> <pre><code> ...... BEGIN:VEVENT DTSTART:20100713T113000Z DTEND:20100714T120000Z ........ .......... </code></pre> <p>i have to set sta...
java
[1]
5,634,893
5,634,894
Retrieve Button value with jQuery
<p>A simple one, I'm trying to retrieve the value attribute of a button when its been pressed using jQuery, here's what I have:</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function() { $('.my_button').click(function() { alert($(this).val()); }); }); &lt;/s...
jquery
[5]
4,652,373
4,652,374
Efficiency: Creating an array of doubles incrementally?
<p>Consider the following code:</p> <pre><code>List&lt;double&gt; l = new List&lt;double&gt;(); //add unknown number of values to the list l.Add(0.1); //assume we don't have these values ahead of time. l.Add(0.11); l.Add(0.1); l.ToArray(); //ultimately we want an array of doubles </code></pre> <p>Anything wrong wit...
c#
[0]
2,222,155
2,222,156
Find position and get before and after?
<pre><code>$x = "P-29042011386693"; $array = "P-28042011135870,P-28042011132333,P-28042011384621,P-29042011386693,P-29042011384190,P-29042011388434,P-29042011382454,P-29042011385512,P-29042011383902"; $array = explode(",", $array); $count = count($array); $search = array_search($x, $array); if (($search &gt; 0) &amp;&...
php
[2]
5,776,997
5,776,998
Javascript file uploads
<p>Any alternate thing in javascript to make a file upload control ?</p> <hr> <p>actually the problem was, i am creating file upload control dynamically using htmlwriter, and when i use request.form[fileuplodctrl].tostring() , i am getting only the file name not path... </p> <p>can any one suggest me any other ways ...
javascript
[3]
3,970,565
3,970,566
How fix Fatal error: Out of memory (allocated ) (tried to allocate bytes) in php
<p>I read value of a file csv as:</p> <pre><code> //$mypath . '/' . $filename &lt;=&gt; ../abc.csv $val = file_get_contents($mypath . '/' . $filename); $escaped = pg_escape_bytea($val); $model-&gt;addFileImport($tmp, $data['email'], $escaped); </code></pre> <p>My file ia ab...
php
[2]
4,562,333
4,562,334
what is the purpose of double implying?
<p>for example:</p> <pre><code>const decimal dollars = 25.50M; </code></pre> <p>why do we have to add that <code>M</code>?</p> <p>why not just do:</p> <pre><code>const decimal dollars = 25.50; </code></pre> <p>since it already says <code>decimal</code>, doesnt it imply that <code>25.50</code> is a decimal?</p>
c#
[0]
654,813
654,814
why doesn't this code loop?
<pre><code>var fadeCounter = 0; function fadeNext() { window.fadeCounter++; s = '#slide' + window.fadeCounter; $(s).fadeIn(1000,fadeNext); //forgive typos above, code works, what doesn't: if (window.fadeCounter == 8) window.fadeCounter = 0; //code will loop up to 8, then stop. why? } //initiate loop fadeN...
jquery
[5]
5,080,215
5,080,216
Identifying App Installations
<p>so there a nice blog to Identifying App Installations using the following code</p> <pre><code>public class Installation { private static String sID = null; private static final String INSTALLATION = "INSTALLATION"; public synchronized static String id(Context context) { if (sID == null) { ...
android
[4]
5,519,850
5,519,851
jQuery error in using css function after get function
<p>It seems the syntax below is wrong because I am getting an error "css is not a function" in Firefox. What's the correct syntax? I am trying to add a css property to the first object in the set.</p> <pre><code>$("div[id$='rvReport']").get(0).css("overflow", "auto"); </code></pre>
jquery
[5]
4,099,699
4,099,700
KEY CHAIN export for iphone sdk (puplic keys and privates key and certficates,...)
<p>I have all Key chain configuration details in my old laptop for the iphone sdk now i have a new labtop to make my iphone development applications how can i move all Key chain details to the new labtop how the export,import works .</p> <p>Many thanks,</p>
iphone
[8]
4,538,366
4,538,367
Can classes be referenced outside App_Code?
<p>I know this seems pretty basic, but I've been working with MVC for awhile and I'm not sure what works with asp.net. </p> <p>Is it possible to organize code outside the App_Code directory or into separate projects? How would this be done?</p>
asp.net
[9]
4,252,756
4,252,757
getElementsByTagName returning strings
<p>My ultimate goal here is to get a list of radiobuttons and check/uncheck them. Here is my code:</p> <pre><code> for (var radio in document.getElementsByTagName('input')) { if(typeof (radio) != "string") alert(radio); } </code></pre> <p>The <code>alert</code> never gets called.</p> <p>Th...
javascript
[3]
2,127,622
2,127,623
which return comply with C++ standard
<pre><code>class A {}; class B { public: B(const A&amp; 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]
5,776,050
5,776,051
I need the seekbar thumb in center of seekbar height
<p>I am using the one seek bar In my Application and I set the one custom drawable (shape) to set thumb. </p> <p>Following is my drawable(seekbar_circle_normal.xml) code snippet : </p> <p></p> <pre><code>&lt;item&gt; &lt;shape android:shape="rectangle" &gt; &lt;solid android:color="#FDC300" /&gt; ...
android
[4]
690,914
690,915
converting a Tree to newick format. java
<p>I'm having problems converting a binary rooted tree to newick format. The full explanation for such a format can be found: <a href="http://code.google.com/p/mrsrf/wiki/NewickTree" rel="nofollow">http://code.google.com/p/mrsrf/wiki/NewickTree</a></p> <p>An example of a newick format would be as follows:</p> <p>for ...
java
[1]
4,460,065
4,460,066
Android Intent for media player plays mp3 but does not display information(Title, Artist, Album Art)
<p>It is very easy to call an intent for the native Android Media Player to play an MP3 file. e.g.</p> <pre><code>Intent intent = new Intent(android.content.Intent.ACTION_VIEW); Uri data = Uri.parse("file:///sdcard/bigTune.mp3"); intent.setDataAndType(data,"audio/mp3"); try { startActivity(intent); ...
android
[4]
2,826,635
2,826,636
How to modify the framework to support muti-skin?
<p>How to modify the frmework to support muti-skin? The effect is like HTC desire HD which can change the skin dynamically. The skin is from a separate apk. Who can give me some precious advice? Thank you very much!</p>
android
[4]
807,648
807,649
Frame by Frame Animation Optimization
<p>I am getting an <code>OutOfMemoryException</code> when I try to load all the frames needed for a one-time animation. The frames (when combined) is about 1.5MB, each frame is 320x480 in size. It's a same picture across all frames, varying in size and position. I am wondering if i could just do the animation for the I...
android
[4]
5,531,579
5,531,580
How can I change the unselected item to selected item from dropdown list without using the iterator function in Jquery?
<p>How can I change the unselected item to selected item from dropdown list without using the iterator function in Jquery?</p>
jquery
[5]
2,767,076
2,767,077
Please help me to sort out this java.awt.BoxLayout can't be shared or NullPointerException
<p>The below code "Boxlayout example complies well but throws me the below exception at runtime:</p> <pre><code>Exception in thread "main" java.lang.NullPointerException at java.awt.Container.addImpl(Container.java: 1027) at java.awt.Container.add(Container.java: 935) at javax.swing.JFrame.addImpl(JFrame.java: 545) a...
java
[1]
5,462,485
5,462,486
Play AVAudioPlayer From A Sleeping iPhone
<p>I am creating a alarm application. I am using Audio Session in my main delegate class.</p> <pre><code>OSStatus result = AudioSessionInitialize(NULL, NULL, interruptionListenerCallback, self); UInt32 category = kAudioSessionCategory_MediaPlayback; result = AudioSessionSetProperty(kAudioSessionProperty_AudioCategory,...
iphone
[8]
5,660,373
5,660,374
Adding dynamic value to a function
<p>I am trying to implement a plugin:</p> <pre><code>$(".myTbl th:nth-child(1)").truncate({ width: "200", after: "&amp;hellip;", center: false, addtitle: true }); </code></pre> <p>Instead of using a fixed value for width, I have a script that calculates it dynamically and sets it into ...
jquery
[5]
2,339,333
2,339,334
Google's Mobile View from Android
<p>How is there always mobile view whenever I go to google page through my Android emulator. What decides that the request is coming from mobile apps.</p>
android
[4]
2,787,296
2,787,297
AIM client on android
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/3840095/aol-im-api-for-android">AOL IM api for android</a> </p> </blockquote> <p>Hi All, i want to develop AIM client application in android ,is there any AIM api for android released?...</p> <p>Thanks in advan...
android
[4]
3,848,561
3,848,562
Pass custom parameters to subactivity
<p>Is there any way to pass custom parameters from a activity to a sub-activity?</p> <p>I tried to do it via a constructor by creating a object of the sub-activity in the main-activity and passing the desired parameters. But when i start the sub-activity via a Intent the program fails.</p> <p>The parameter I'm trying...
android
[4]
1,621,959
1,621,960
C++ Memory Management diffrences with Heap Allocation and Frame Allocation
<p>I am slightly confused about how memory management works in C++, I understand when you use pointers (new/delete) but I'm lost when it comes to Frame allocation.</p> <p>Say I have a simple class (Using QT Classes)</p> <pre><code>class Demo { public: Demo(); ~Demo(); QString AString() con...
c++
[6]
3,946,259
3,946,260
Returning an empty list with 'or' syntax using Parsley
<p>I'm trying to match a word using Parsley. The grammar that I'm using only works when I make a rule for a generic word. However, I would like to know why it doesn't work the way it is shown from Allen Short's presentation and sample code here (<a href="http://bit.ly/1025Qxo" rel="nofollow">http://bit.ly/1025Qxo</a>) ...
python
[7]
1,553,768
1,553,769
Looping forward items in an array
<p>I'm trying to create a job roster for my Boy Scout Troop, and I'm having a bit of an issue generating jobs.</p> <p>I've got an array that contains jobs for the people. I then use a loop to display a job associated with a person.</p> <p>Is there any way I could have the job move one up?</p> <p>For example:</p> <p...
php
[2]
4,514,029
4,514,030
Can we display Notifications in our activity other than status bar?
<p>I wanted to display latest messages and incoming call alerts in my activity. Can I override that in my activity inside a list view?</p>
android
[4]
3,146,297
3,146,298
Screen orientation not working in android GingerBread
<p>I am trying to implement Accelerometer sensors for android2.3.3 , i am able to get successfully get the accelerometer X,Y,Z values, but when i am trying to rotate the screen from portrait to landscape mode i am not able to view the display properly.Althought the functrionalaities are working(i.e. If i am touching an...
android
[4]
2,915,882
2,915,883
ImportError: /path/pyexpat.so not defined in file libexpat.so.0
<p>I am getting this error when trying to run a classic python code written by x-colleagues. </p> <p>Can u anyone help me out with solving this issue. I have googled throughly and couldn't find any solution.</p> <p><code>Python version : 2.4.3</code></p> <p><code>ImportError: /usr/lib/python2.4/lib-dynload/pyexpat....
python
[7]
3,210,412
3,210,413
Cannot refer to a template name nested in a template parameter
<p>I have the following code:</p> <pre><code>template &lt;typename Provider&gt; inline void use() { typedef Provider::Data&lt;int&gt; D; } </code></pre> <p>Where I'm basically trying to use a template class member 'Data' of some 'Provider' class, applied to 'int', but I get the following errors: </p> <pre><code>...
c++
[6]
4,811,320
4,811,321
PHP - Removing Duplicate Punctuation?
<p>Suppose you have the following string: <code>Hello... how are you!!?? I'm bored!!</code></p> <p>I want back-to-back punctuation to be removed wherever possible, and for question marks to be retained in the event of a situation similar to "!?". The filtered string should appear as follows:</p> <p><code>Hello. how a...
php
[2]
720,136
720,137
Javascript Prompt displaying executed value
<p>I've this code:</p> <pre><code>&lt;input type="button" value="Test Short URL" onClick="javascript:void(location.href='http://taimoorsultan.com/y/yourls-api.php?signature=05e2685fc7&amp;format=simple&amp;action=shorturl&amp;url='+escape(location.href))&amp;prompt('Shorten URL', 'shorturl');"&gt; </code></pre> <p>Ac...
javascript
[3]
430,454
430,455
Files type to upload aiff
<p>In a form used to upload music I check the files type, I want to allow people to upload mp3, wav and aiff. I found $_FILES['music']['type'] == 'audio/wav' and $_FILES['music']['type'] == 'audio/mp3' but I can't manage to find the appropriate type for the aiff files. Can anybody help me please?</p> <p>Thanks</p>
php
[2]
5,918,960
5,918,961
ASP.NET Web Service ONLY returns Documentation Page for all calls
<p>A client has a ASP.NET web service on a shared server (hosted environment). You can go to the web service URL and view the documentation page (xxxxx/service.asmx?WSDL) and see all the methods. Using a tool such as SoapSonar you can execute any of the methods, but the response is always as if you sent (xxxxx/service....
asp.net
[9]
3,206,291
3,206,292
replace callback function with matches
<p>need to replace <code>&lt;wiki&gt;this page&lt;/wiki&gt;</code> to <code>&lt;a href='wiki/this_page'&gt;this page&lt;/a&gt;</code><br> using callback function:</p> <pre><code>text = text.replace(/&lt;wiki&gt;(.+?)&lt;\/wiki&gt;/g, function(match) { return "&lt;a href='wiki/"+match.replace(/ /g, '_')+"'&...
javascript
[3]
1,760,582
1,760,583
Why did i get this error?
<p>here's the code: </p> <pre><code>class Acount { int sum ; String owner ; //these seem to make sense //a constructor or two public Acount () { this.sum = 0 ; this.owner = "John Doe" ; } public Acount (String name) {this.sum = 0 ; this.owner = name ; } public Acount (String name, int su...
java
[1]
1,238,229
1,238,230
Android Emulator and MMS
<p>does android emulator supports MMS messaging? im looking for a solution for my app, please some help.</p>
android
[4]
1,634,277
1,634,278
setContentView in a different thread
<p>I am writing a server client on android platform. If one of the client send a message one of them, firstly message goes to server and server sends it to client. When a receiver client receive the message, i have to <code>setContentView</code> so I need to open messaging screen. But it takes the messages in a differe...
android
[4]
2,043,976
2,043,977
PHP 5.4 not available for windows + Apache?
<p>I'd like to install the new PHP 5.4 on my Windows machine. I'm running Apache 2.2 on it. Reading the info on <a href="http://windows.php.net/download/" rel="nofollow">http://windows.php.net/download/</a>, it says "If you are using PHP with Apache 1 or Apache2 from apache.org you need to use the VC6 versions of PHP"....
php
[2]
58,237
58,238
How can I stop a HTML page after the <head>...</head> loads using javascript?
<p>I have a URL rewriting proxy server (EZproxy) that can be set up like this to provide one-click access to target URL's, providing an authentication challenge when needed but getting out of the way when it's not needed. </p> <p><a href="http://url-rewriting-proxy-server.com/login?url=http://target-url.com" rel="nofo...
javascript
[3]
358,538
358,539
how to get grand total dynamically using jquery
<p>I have dropdown of nationality with its related price for rooms of hotel.Now I want to dynamically add the prices shown and output it.</p> <pre><code>&lt;div class="Total"&gt;&lt;/div&gt; &lt;div class="rum_name"&gt;Room name&lt;/div&gt; &lt;div class="nationality"&gt; &lt;select class="sel_nationality" name="natio...
jquery
[5]
2,763,336
2,763,337
targeting specific jQuery element with identical class name
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4868599/how-to-select-an-element-by-class-inside-this-in-jquery">How to select an element by class inside &ldquo;this&rdquo; in Jquery</a> </p> </blockquote> <p>I'm newer to jQuery...I think this has something t...
jquery
[5]
541,827
541,828
google api calendar add event
<p>i tried to insret event to my google calenadr trow javaScript code :</p> <pre><code>&lt;script&gt; var apiKey = 'AIraSyDFMA8t3fTM6cqflPEDys1rXhPffARFiEs'; var clientId = '---------'; var scopes = 'https://www.googleapis.com/auth/calendar'; // The Calendar entry to create ...
javascript
[3]
1,766,935
1,766,936
How to using GetChanges() in DataTable
<p>I have been developing some application with DataGridView binded to DataTable. So, now I need to do 1 thing: user can edit some fields, and when he clicks by "Save" the application must change some fields programmatically. I'm trying to use this code, but it doesn't work:</p> <pre><code>private void toolStripMenuIt...
c#
[0]
3,606,866
3,606,867
get position (index) of td element identified by class name
<p><br/> i have this code</p> <pre><code>&lt;tr id="3" class="gradeA odd focus row_selected"&gt; &lt;td class="center"&gt;Kids Footwear 2&lt;/td&gt; &lt;td class="sorting_1 center focus"&gt;200&lt;/td&gt; &lt;td class="center"&gt;50&lt;/td&gt; &lt;td class="center"&gt;200&lt;/td&gt; &lt;td class="c...
jquery
[5]
2,989,486
2,989,487
Javascript disabled, short questions
<p>Just some short Q regarding javascript and websites.</p> <p>1- By javascript enabled, does it mean to have 'sun java' installed and enabled in the browser settings? Or does every browser have javascript enabled always?</p> <p>2- If javascript is disabled, my website for example wouldn't work at all, so what does m...
javascript
[3]
6,000,798
6,000,799
php dynamic array checking
<p>Hy,</p> <p>I have a multidimensional array with sub arrays and stuff like this :</p> <pre><code> [21] =&gt; Array ( [80] =&gt; [83] =&gt; [A4] =&gt; Array ( [80] =&gt; ) [85] =&gt; [A6] =&gt; Ar...
php
[2]
5,840,911
5,840,912
How do you implement Lazy Loading images in listView
<p>I'm referring to this popular marked answer: <a href="http://stackoverflow.com/questions/541966/android-how-do-i-do-a-lazy-load-of-images-in-listview">Android - How do I do a lazy load of images in ListView</a></p> <p>Perhaps, I don't fully understand the code, but how exactly would I apply it to my getView in my a...
android
[4]
1,177,975
1,177,976
which is better way to get an xml returned from web request for parsing
<p><em><strong>I need to read an xml output returned from a php file through a web request in my android app.</em></strong></p> <p>Hence, I have used Asynctask to read the xml file as byte by byte storing in a byte type array in background thread and then put the array in a text file. After completing the async task,...
android
[4]
5,509,405
5,509,406
hide default keyboard on click in android
<p>i want to hide the soft keyboard when i click out side of editbox in a screen. how can i do this?</p>
android
[4]
1,319,334
1,319,335
Jquery statement that won't J
<p>Can anyone help me with my jquery statement... </p> <p>I have a 'share' box - on submit I want to 'force' the 'share' (user, date and message) to the screen below my cl_share_hide_me class ...so that the user does not have to reload the page to see his/her share.</p> <p>I have gotten this far but not able to go fu...
jquery
[5]
1,587,369
1,587,370
View state vs Hidden field in asp.net
<p>How can we take decision for viewstate and hidden field in ASP.NET.</p> <p>In my case i am using page cross post back and by using public properties of first page i am accessing them in second aspx page. </p> <p>After getting public variable in second aspx page i need to access those value in second page but as so...
asp.net
[9]
3,154,810
3,154,811
How to load class at runtime in android app?
<p>In my android project I've two layouts in that first layout having one button if i click that button I need to display the second layout in the same layout for this I created a view by using <code>LayoutInflater</code> and attached it to "Table Layout" which is present in first layout.</p> <p>Everything should be f...
android
[4]
3,122,691
3,122,692
what is the difference between -> and =>? what is ::?
<p>Im a bit new to javascript and I am trying to understand how backbone.js and understand how it works, however there are times that I run into lines like this: </p> <pre><code>"admin"=&gt;password_hash("pass",PASSWORD_BCRYPT) </code></pre> <p>I understand this code is crypting the pass however i dont understand the...
php
[2]
4,044,023
4,044,024
Protect code/content by domain name
<p>I am writing a javascript product but it will be licensed to individual domain names. So in order to protect it from copy and pasted from the demo or from one site to another the code should only allow itself to run properly when it's on the right domain.</p> <p>The encryption can be done server side by php when a ...
javascript
[3]
2,491,717
2,491,718
Will a nested function always have to be redefined?
<p>For architecture and namespacing purposes, I want to do this:</p> <pre><code>function outer (arr) { function inner(arrElement) { return doStuffTo(arrElement); } var results = []; arr.forEach(element, index, array) { results.push(inner(element)); } return results; } </code></pre> <p>So basical...
javascript
[3]
2,821,823
2,821,824
Python exclusive loop
<p>I want to loop through a <code>list</code> and separate the current element from others. Like this : </p> <pre><code>for e in the_list: function_call(e, &lt;the_list but e&gt;) </code></pre> <p>Is there an elegant way to do that ?</p>
python
[7]
5,486,299
5,486,300
stack trace when debug on android device
<p>when I debug my android app using emulator, the stacktraces and error messages are shown in Eclipse's Logcat.<br> However, when I debug on my physical android device, when app crashes there is no stacktrace shown in eclipse. Is there anything i need to configurate in order to get stacktrace when debugging on physic...
android
[4]
2,866,625
2,866,626
Is it a good idea to use static type?
<p>I know the difference between static type and other types but I am not sure which is to used where. Now I am using static types in all places to avoid object instantiation. Is it a good idea to use it that way ? Is there any particular disadvantage in using static type in all places ??</p> <p>EDIT</p> <p>What do y...
java
[1]
3,201,642
3,201,643
What is [] + [] in javascript
<p>What are the values of []+[], []+{}, {}+[], {}+{}? And How?</p> <p>This my console log</p> <pre><code>&gt;{} + {} &gt;NaN &gt;[] + [] &gt;'' &gt;{} + [] &gt;0 &gt;[] + {} &gt;[Object object] </code></pre> <p>Also</p> <pre><code>&gt;var a = [] + {} &gt;a &gt;[Object object] &gt;var b = {} + [] &gt;b &gt;[Object o...
javascript
[3]
2,065,166
2,065,167
"with" keyword in javascript
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/61552/are-there-legitimate-uses-for-javascripts-with-statement">Are there legitimate uses for JavaScript&rsquo;s &ldquo;with&rdquo; statement?</a> </p> </blockquote> <p>I recently discovered that in javascript, on...
javascript
[3]
3,207,339
3,207,340
window.onbeforeunload message localization
<p>I'm using a page unload trigger to warn the user of unsaved changes while leaving the page/closing the tab/etc... and this works fine.</p> <pre><code>//Exit event if (!changes_saved) { window.onbeforeunload = confirmExit; } function confirmExit() { return "Your changes will be lost if you leave this page!"; } <...
javascript
[3]
5,485,893
5,485,894
What datatype is the output?
<pre><code> pos_tag(word_tokenize("John's big idea isn't all that bad.")) [('John', 'NNP'), ("'s", 'POS'), ('big', 'JJ'), ('idea', 'NN'), ('is', 'VBZ'), ("n't", 'RB'), ('all', 'DT'), ('that', 'DT'), ('bad', 'JJ'), ('.', '.')] </code></pre> <p>Don't recognize the syntax at all. How would I iterate over this checkin...
python
[7]
3,378,175
3,378,176
system properties
<p>can anybody tell how to get system properties of a remote computer in a network ?</p> <p>i would like write a code in c#</p>
c#
[0]
5,646,137
5,646,138
Javascript - Debugging window.print()
<p>I am being forced to abuse HTML. I am creating an html webpage that is actually a form meant for print output. In other words, this should be a PDF. It isn't. It won't be cause the 3rd party stuff costs too much and at this point I do not have time to convert it all. </p> <p>It is all HTML and I print it via ...
javascript
[3]
1,614,766
1,614,767
How do I get all elements of a particular type in javascript?
<p>I need to hide all elements of type 'section' in my document apart from one with a particular ID.</p> <p>In jquery this would be easy</p> <pre><code>$("section").hide(); $("section#myId").show(); </code></pre> <p>How would I do this without jquery??</p> <p>(I need it to happen as soon as the page loads and to no...
javascript
[3]
306,500
306,501
List.Count resets to zero
<p>I want to create a list with 11 entries, but <code>List.Count</code> resets to zero after this code. </p> <p>There are no entries added to the list. What is wrong?</p> <pre><code>List&lt;Animation&gt; animations = new List&lt;Animation&gt;(); animations[0] = new Animation(new List&lt;Rectangle&gt;(10), ...
c#
[0]
4,066,736
4,066,737
c# problem with mediaplayer
<p>my media player is not working i have imported dll of windows player. And i have a folder name called upload in my application itself.In the first button i will upload the audio and in the second button im getting the filename using session and using it in the second button when ever i click second button media play...
c#
[0]
2,419,491
2,419,492
Get cell by column name using xlrd
<p>If I have two rows in an excel (.xls) sheet, like a key-value pair, is there a way to get the value (row1) by entering in the key (row0) in xlrd?</p> <p>For example, if I have <code>(0,0) = COLOR</code> and <code>(1,0) = RED</code>, how would I do something like:</p> <pre><code>value = sh.col_values("COLOR") ? </c...
python
[7]
2,865,445
2,865,446
Group data by frequency
<p>I am trying create a trending system that displays which keywords are trending by checking the occurrence of their usage. I have able to get the count of occurences of the keywords into an array like this</p> <pre><code>$keyword_occurences = array("pheed"=&gt;5, "php"=&gt;7, "love" =&gt; 700); </code></pre> <p>Ho...
php
[2]
2,747,959
2,747,960
Viewing all photos in a folder in android on the web
<p>I am running a web server and storing all my photos at a folder called photos. Now I want the android application to list all the photos under that particular folder(It can be a slide show or a grid view). I know how to load an image from a url . But I am really unsure about how to view all the images stored on a fo...
android
[4]
5,404,807
5,404,808
jquery child element problem
<p>I have a list, with each list element having a textarea and an img. When I hover over one of the list's textareas, I want the respective img to change src. </p> <p>The problem is that when I hover over a textarea on one of the lists, all the imgs on the list change, not just the one on that list item.</p> <pre><...
jquery
[5]
5,024,469
5,024,470
Hindi Font Support
<p>I am developing an android application that is in Hindi. </p> <p>The major issue with that application is that it is working on Samsung devices, but fails to work on Motorola devices. </p> <p>Please suggest me solution for this issue.</p>
android
[4]
1,241,253
1,241,254
addClass/removeClass
<p>{I want to be able to add a class to the body then remove that class and replace it with the new class on click of the 'a tag' html element, this is as far as I've got, adding the class, each click adds another class:</p> <p>Can this be done by checking the a link for a class of selected instead of .click</p> <p>h...
jquery
[5]