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
936,631
936,632
Indexing State Changes in Python nparray
<p>I have steps taken from walkers and increases in pressure for each step. I want to determine the start and stop of each step and the time it occurred. This code works great so far to determine when the pressure rises or falls below a threshold (foot lands and lifts off). Now I have true/false states in the above_...
python
[7]
5,387,585
5,387,586
Login encrypt password to compare
<p>Updated code still not working?</p> <pre><code>&lt;?php $host="localhost"; $username="root"; $password="power1"; $db_name="members"; $tbl_name="users"; string sha1 ( string $Password [, bool $raw_output = false ] ) $link = mysql_connect("$host", "$username", "$password")or die("cannot connect. Please conta...
php
[2]
1,334,997
1,334,998
Retriving unique set of elements from different Sets
<p>What method can be used to return a set of elements that can be found only in set a or set b, but not in both Sets ?</p>
java
[1]
3,652,692
3,652,693
C# String Comparison
<p>I am making an application i have to compare two strings for a specific word</p> <p>for eg </p> <pre><code>string a="abc"; string b="abcController"; </code></pre> <p>I have to compare <code>a</code> and <code>b</code> to match abc</p> <p>I am using <code>Equals</code> or <code>CompareTo</code> but these are not ...
c#
[0]
1,711,330
1,711,331
jquery status box pop up and hide after a short while
<p>sorry if I did show you the code because I am not sure how to implement it, I am try to develop a status box using jquery, so I have a button so when the button get clicked, the status box will pop up show message like "button is clicked" and disappear after 10 seconds, but I am not sure how to do it, any one could ...
jquery
[5]
2,271,565
2,271,566
Create comma-delimited string
<p>I'm looking to find a neat way to create a comma-delimited string from an array. This is how I'm doing it now...</p> <pre><code>for(i=0;i&lt;10;i++) { str = str + ',' + arr[i]; } str=str.substring(1) return str; </code></pre> <p>... but it feels a bit untidy.</p>
javascript
[3]
5,306,287
5,306,288
How to find in which container tree resides
<p>I have dhtmlx tree. In one div i placed that tree. I have multiple divs and in each div I have one tree which will generate dynamically. When i click on the any node of tree i can get the id of that node. Now how to find in which div that tree resides by using jquery. </p>
jquery
[5]
3,495,041
3,495,042
How to print one character at a time on one line?
<p>How would one print the string "hello world" onto one line, but one character at a time so that there is a delay between the printing of each letter? My solutions have either resulted in one character per line, or a delayed printing of the entire string at once. This is the closest I've gotten. </p> <pre><code>impo...
python
[7]
3,411,315
3,411,316
Create Script Tag Within Javascript and Call Function Right After
<p>I have some code where I am trying to include a script file and then call a function inside the script file. The code is:</p> <pre><code>function includeJS(p_file) { var v_js = document.createElement('script'); v_js.type = 'text/javascript'; v_js.src = p_file; document.getElementsByTagName('head')...
javascript
[3]
334,371
334,372
after deploy the site need exact domain name with jquery
<p>I am going to deploy my site and I need to get the domain name after deploying the site. It is very simple if the address was <code>www.domain.com</code> then the domain name is <code>domain.com</code> but if the client deploys the site as a sub domain like <code>subdomain.domain.com</code> then how can I get exact...
jquery
[5]
343,565
343,566
Remove restore button from maximized tabs in .NEt
<p>i am developing an application in C#.Net in which i have implemented mdi.all mdi childs are opened in maximized state in tabs. i want tabs to have only the "close" button. but whenever a child is opened minimize ad restore buttons appear with it.. i CAN disable the minimize button but what to do with RESTORE button....
c#
[0]
5,088,817
5,088,818
Android SDK platforms between Linux and Windows
<p>I'm dual booting Windows 7 and Ubuntu 12.04 Linux. Can I just copy my existing Android SDK platforms from my windows partition to the linux partition? Or are the platforms different? I don't want to waste time redownloading all the packages again. </p>
android
[4]
3,705,533
3,705,534
I want my SlideToggle() Slow or add the Time
<p>Hello I want my animate SlideToggle() it slide up and slow or I can put the time, when I click the link please help. please See Code Below. I try to put the .slideToggle("slow") but dont' work.</p> <pre><code>$(function() { $('#bottom_menu li a').click(function(e) { e.preventDefault(); animateSl...
jquery
[5]
2,091,518
2,091,519
HOw can i remove the uiview background black color
<p>I am developing one application.In that i set the one image as background for uiview like below </p> <pre><code>projectview=[[UIView alloc]initWithFrame:CGRectMake(200, 0, 640, 700)]; UIGraphicsBeginImageContext(projectview.frame.size); [[UIImage imageNamed:@"board.png"] drawInRect:projectview.bounds]; UIImage *lb...
iphone
[8]
4,771,843
4,771,844
Web Site Thumbnail?
<p>I posted a link of my website on facebook, but it uses an image for a thumbnail that I don't want(it is an image inside my website). How can I govern which thumbnail is used for my web site on any web page(facebook etc) ?</p> <p>Thank You</p>
asp.net
[9]
2,459,736
2,459,737
Set permissions in binary
<p>I saw in school a system that set permissions using binary string.</p> <p>Let's say 101001 = 41</p> <p>So : </p> <ul> <li>1 can be permission to page 1</li> <li>2 can be permission to page 2</li> <li>4 can be permission to page 3</li> <li>8 can be permission to page 4</li> <li>16 can be permission to page 5</li>...
php
[2]
80,571
80,572
how to create an application that creates the resource files dynamically reading from an excel sheet using c#?
<p>My requirement is create an application that creates the resource files dynamically reading from an excel sheet . </p> <p>In that i have done with reading values from excel. and I know how to create resource file dynamically .But I am not getting any idea how to create resource file dynamically by reading values f...
c#
[0]
58,288
58,289
More Pythonic conversion to binary?
<p>Here is a contrived example of how a lot of our classes return binary representations (to be read by C++) of themselves.</p> <pre><code>def to_binary(self): 'Return the binary representation as a string.' data = [] # Binary version number. data.append(struct.pack('&lt;I', [2])) # Image size. ...
python
[7]
5,372,766
5,372,767
getting data from edittext placed in listview
<p>I created a list with textview &amp; edittext using holder... it looks like</p> <pre><code> Textview Edittext --------------------------------- Textview Edittext --------------------------------- Textview Edittext --------------------------------- </code></pre> <p>but I cant get the data fro...
android
[4]
2,367,219
2,367,220
How can I set the value of C# Custom Attibutes?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2160476/how-to-set-attributes-values-using-reflection">How to set attributes values using reflection</a> </p> </blockquote> <p>How can I set the value of custom attribute, this custom attribute is used in the me...
c#
[0]
626,809
626,810
Err sequence number mismatch while i receive data from Recv() in socket programming C++?
<p>Sending some data through socket programming and waiting for the acknowledgement through receiving the data from the socket. But i receive lot of <strong>Err sequence number mismatch</strong>. I am new to C++ and really don't know what does it mean, can anyone please describe why this is coming? And how do i know th...
c++
[6]
1,375,062
1,375,063
Can I use Dependency Injection for All Dependencies?
<p>All my PHP is Object Orinted and I want to use dependency injection for all dependencies ( i.e. classes that need other classes to work ). Is this O.K?</p> <p>I think I posted to much information to be readable...but if you want specifics there are <a href="http://stackoverflow.com/questions/10237028/code-library-...
php
[2]
659,674
659,675
Response Code From Server
<pre><code>public static boolean testConnection() { try { // TODO add your handling code here: System.setProperty("http.proxyHost", "some proxy name"); System.setProperty("http.proxyPort", "some port"); URL a = new URL("http://" + Variables.serverName + ":" + Variables.serv...
java
[1]
777,263
777,264
Java array initialization
<p>What happens when we print reference variable of array initialization?</p> <pre><code>int[] it=new int[10]; sop(it); </code></pre> <p>What is the result? </p>
java
[1]
1,166,828
1,166,829
can cURL operations be inside the API server side code?
<p>I see an example server side API that has cURL operations, I thought cURL is supposedly client side request. The following class API is the server side code but inherited from newtwork class which has a bunch of uCurls operations.</p> <blockquote> <p>class Api extends Api\Network</p> <pre><code>abstract class Ne...
php
[2]
1,193,668
1,193,669
Finding midnight from a stored variable
<p>I have a web page that will allow customers to enter a date/time and I want to be able to stored that variable and then add to that time until Midnight, store that as a second variable and pass it to my sql server. Is there an easy way to do that?</p>
asp.net
[9]
3,651,348
3,651,349
c++ code review
<pre><code>if (ad &amp;&amp; (etag = strrcasestr_len(ad,strlen(ad), "&lt;/XHTML-STRIPONREPLY&gt;", 21))) { </code></pre> <p>here ad and etag are const char*</p> <p>when the custom function strrcasestr_len returns NULL</p> <p>will the expression evaluate to (ad &amp;&amp; null)</p>
c++
[6]
1,221,434
1,221,435
What substitute should we use for layerX/layerY since they are deprecated in webkit?
<p>In chrome canary, layerX and layerY are deprecated, but what should we use instead ?</p> <p>I've find offsetX but it doesn't work with Firefox. So to get layerX without warning on webkit, I've done that :</p> <pre><code>var x = evt.offsetX || evt.layerX, y = evt.offsetY || evt.layerY; </code></pre> <p>But thi...
javascript
[3]
4,634,126
4,634,127
Get visual graph of heap memory usage in Java over a span of time
<p>I am currently using Visual VM to monitor the heap memory usage of my Java application. However I would like to somehow see the heap memory usage over a span of time and not just get a snapshot. Is there a way to do this using Visual VM? If yes, how? If not, what tool can I used to do this? </p>
java
[1]
3,661,586
3,661,587
Having trouble assigning to a generic delegate in C#
<p>My problem is as follows:</p> <pre><code>public abstract class A {} public class B : A { public static IList&lt;B&gt; MyMethod(){ return new List&lt;B&gt;();} } public delegate IList&lt;T&gt; MyDelegate&lt;T&gt;() where T : A; ... public static void CalledMethod&lt;T&gt;() where T : A{ MyDelegate&lt;T...
c#
[0]
1,938,186
1,938,187
How to import package modules as __main__ aliases inside __init__.py?
<p>I would like to import all modules inside a package as aliases in __main__ using __init__.py so they can be called simply from interactive mode. For example, here is a sample file tree:</p> <pre><code>foobar/ __init__.py foo.py bar.py </code></pre> <p>and from the python interpreter I want to be able t...
python
[7]
5,740,947
5,740,948
Printing answers for FizzBuzz using winforms
<p>I have tried to do the FizzBuzz question using the C# and I could do it as the message boxes. But I need to print the answers one by one in a text box using winforms. How can I do this. I have stated the code with this. Please can you help me.</p> <pre><code>private void button8_Click(object sender, EventArgs e) { ...
c#
[0]
4,306,884
4,306,885
Getting a StackOverflowError after updating project to use JDK1.7.0
<p>I'm working on a collaborative java project and we had to upgrade to jdk1.7.0 due to some problems with generic types. I installed 1.7 and setup my environment variables and when I tried to compile the code using jdk1.7 I ended up with a nasty StackOverflowError and I'm not sure why. The code compiled fine in 1.6 ...
java
[1]
124,100
124,101
Java stop word library
<p>Is there any stop words library in java ?</p> <p>Example:Write a java program to read input from a file, and then sort the characters within each word. Once you have done that, sort all the resulting words in ascending order and finally followed by the sum of numeric values in the file.</p> <ul> <li>Remove the spe...
java
[1]
5,541,561
5,541,562
PHP - styling code efficiently
<p>I'd need an advice.</p> <p>After 4 months working on a project (after another developer), fixing bugs and upgrading, the main developer asked me to rechange coding style to what he prefers. I'm working with the framework he developed. The style he prefers (and I wasn't warned before about that) is if(): .. endif; ...
php
[2]
2,358,667
2,358,668
How to get each file's extension in a given folder in PHP on Windows XP?
<p>E.g:</p> <p>folder name:</p> <pre><code>myFonlder </code></pre> <p>files in myFolder</p> <pre><code>myFolder.01.mkv myFolder.02.mkv myFolder.03.avi myFolder.04.mts ... // each file's extension may be different. </code></pre> <p>So,how can I extract the extension of each file?</p> <p>Thank you very much!!</p>...
php
[2]
2,955,281
2,955,282
javascript associative array initialization error?
<pre><code>&lt;script&gt; var tids = { 308: 1, 312: 1, 313: 1, 314: 1 }; &lt;/script&gt; </code></pre> <p>results in "missing } in XML expression with an arrow pointing to the first colon in the JS error console. Isn't this a valid declaration?</p>
javascript
[3]
2,822,459
2,822,460
Highlight only selected text using jQuery
<p>so I'm trying to highlight user selected text. Essentially the user can drag the mouse (while clicked) to select some random text on the page (anything within<code>&lt;p&gt;</code> tags). On mouseup I want to change that text to be highlighted and bold.</p> <p>The requirements for this are that the text selected an...
jquery
[5]
4,802,546
4,802,547
uninstall a software programatically in java
<p>I want to know if there is a way to uninstall a software programatically using java. <br/> Suppose if I have Firefox installed on my windows machine then how could I use java program to uninstall it.</p> <p>Thanks.</p>
java
[1]
4,031,823
4,031,824
How to disable tab key globally except for all forms in a page with JavaScript?
<p>I'm making a single page app that is launching next week, for a pretty huge client, and going live for a pretty big event and well, there's still a ton to finish before then.</p> <p>There's 100+ 'pages' which are all loaded within a single 700px x 600px window, and I had learned not long ago you could tab through t...
javascript
[3]
1,688,043
1,688,044
Using RandomFileAccess to temporarly cache audio data
<p>I'm currently using a simple byte array buffer to cache live audio data and than playback this data. So it's constant reads and writes on this buffer. My problem is that I sometimes need this buffer to be atleast 1MB and I know that allocating that much memory is most likely not a good idea. So therefore I'm lookin...
android
[4]
4,993,256
4,993,257
change large image when we click on small image
<p>There is a link give below open this and then click <code>table styles</code>.Its show all samples of tables when we click these small size table images then its shows in large image area.</p> <p><a href="http://www.pooltables.com/coventry-pool-table/?icid=in00007" rel="nofollow">http://www.pooltables.com/coventry-...
javascript
[3]
4,279,083
4,279,084
jQuery .each() this and element
<p>Inside a .each() callback, is there any difference between <code>this</code> and the second argument of the callback function?</p> <p>For example, in the following code:</p> <pre><code>$("example").each( function(index, element) { // body }); </code></pre> <p>is there any difference between <code>this</code> ...
jquery
[5]
5,046,049
5,046,050
how to delete written data from external storage?
<p>I'm using following function to write a object to external storage.</p> <p>After using it i want to delete that object from external storage to free memory. Can any one guide me what should i do?</p> <pre><code>public boolean saveObject(List&lt;DalCategories&gt; obj) { if (android.os.Environment.getExternalSto...
android
[4]
4,223,256
4,223,257
URL querystring with a php include
<p>I'm trying to include a file to output in a tab on a page. The file itself will pull up just fine, but when I try to add the required querystring to it, it gives me a "failed to open stream: No such file or directory" error.</p> <p>I've tried just a straight include and tried setting the querystring as a variable....
php
[2]
3,227,826
3,227,827
Extract domain from link
<p>I'm looking for a bullet proof way to extract domain (with tld) from any given link - an eqivalent of <code>dirname($path)</code> let's call it domainname($link).</p> <pre><code>echo domainname("http://example.com/index.html?a=123%1231"); </code></pre> <p>should print "example.com"</p>
php
[2]
2,953,377
2,953,378
Property is getting set to null after I set it to something?
<p>I've got a custom control and one of the properties is:</p> <pre><code>public List&lt;SelectionBox&gt; Boxes { get; set; } </code></pre> <p>In the control constructor I have:</p> <pre><code>this.Boxes = new List&lt;SelectionBox&gt;(); this.Boxes.Add(new SelectionBox("", Color.Red)); </code></pre> <p>Before Initi...
c#
[0]
5,936,881
5,936,882
Web interface for a C++ program
<p>I am developing a project for the end of my studies. This project is basically acting as a server, is cross-platform and developed in C++.</p> <p>I was wondering if it was possible to make a web interface that could be used like for instance the <code>listener</code> design pattern to log what the program does. Thi...
c++
[6]
4,280,222
4,280,223
Multiple foreach statements in PHP script
<p>Here is my current code:</p> <pre><code>foreach ($swears as $bad_word) $body = str_ireplace($bad_word, "", $body); </code></pre> <p>It's filtering bad words, but I'd like to also filter a ":" to a "-" in the body. How can I have multiple foreach statements in my script?</p>
php
[2]
4,979,767
4,979,768
Diagnose issues in .NET code deployed to a production environment, C# .NET
<p>I want to find out what methods or tools in general can be used diagnose issues in .NET code deployed to a production environment. </p> <p>Thanks!</p> <p><strong>Update</strong></p> <p>The types of application on live: Web application, WCF application.</p>
c#
[0]
2,847,831
2,847,832
Asyc Task return Arraylist retrieve it?
<pre><code>new DownloadFilesTask().execute(myPrefs.getString("IP", ""), null, null); </code></pre> <p>I returns an Arraylist from the dobackground method..how to put it into my arraylist?</p> <pre><code>Arraylist al=null; al=new DownloadFilesTask().execute(myPrefs.getString("IP", ""), null, null); </code></pre> <p...
android
[4]
954,421
954,422
How to open a Excel file using a command button in C#
<p>I want to create a button so that when pressed it opens a excel document. the name of the excel file is Solution.xls and it is placed in the desktop</p>
c#
[0]
5,167,451
5,167,452
How to access internet from android emulator?
<p>i have used below steps for setup the my emulator </p> <p>1.C:\Program Files\android-sdk-windows\tools>adb shell 2. # sqlite3 /data/data/com.google.android.providers.settings/databases/settings.db 3. sqlite> INSERT INTO system VALUES(99,’http_proxy', '10.10.8.1:8080');</p> <p>after that i closed adb shell command ...
android
[4]
3,849,580
3,849,581
Fade out text at special width
<p>I have a div which is 200px in width and 60 in height. I want to show some text in that div. As long as it is shorter than 200px everything is fine. But when it is wider I want the text to fade out, so it has maybe 100% black at 180px and is completely invisible at 200px width.</p> <p>Can I achieve this with jQuery...
jquery
[5]
5,478,569
5,478,570
Screen Flicker and bad resizing on window Resize
<p>Please see this jsFiddle for reference: <a href="http://jsfiddle.net/Surfer/Gk8FS/" rel="nofollow">(jsFiddle) Div Resizing</a> <em>[to see what I'm having the problem with, resize the <strong>Results</strong> pane]</em></p> <p>Here is my jQuery code for this example:</p> <pre><code>function resizeRightLeftDivs() {...
jquery
[5]
1,269,927
1,269,928
How can I achieve this effect with jQuery
<p>I really like the effect of the blocks moving towards you and slight animation in this effect, this developer seems to be using Mootools, and ideas on how to achieve this or a similar effect in jQuery?</p> <p><a href="http://ultranoir.com/en/#!/blog/home/" rel="nofollow">http://ultranoir.com/en/#!/blog/home/</a></p...
jquery
[5]
4,350,321
4,350,322
how to access contents of Object If I dont know the structure in c#?
<p>I have an object and I dont know its structure until runtime. so is there any way to access data from the object ?</p> <p>thanks.</p> <p>ps: I cant think of any other details to provide, please ask me if this isnt enough!</p>
c#
[0]
3,212,908
3,212,909
What is the diifference between ScriptManager.RegisterStartupScript() and ScriptManager.RegisterClientScriptBlock(), as both does the same thing?
<p>Hi I am just wondering why some people suggest RegisterStartupScript() to call client side js while some suggests RegisterClientScriptBlock(). </p> <p>Please make me clear whats the difference between the two as they doing the same operations, for using js statement calls and which one is preferable if I only use ...
asp.net
[9]
1,902,577
1,902,578
Defauly Bit rate while record audio by Android phone
<p>I am working on one Android Application, In this app I like to record audio. And for Information I used these parameter :- </p> <pre> recorder.setOutputFormat(MediaRecorder.OutputFormat.RAW_AMR); recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); </pre> <p>But now I like to know what is the default...
android
[4]
72,694
72,695
string class disposable method
<pre><code>private void test() { string tst = null; try { tst = "abc"; } catch (Exception) { throw; } finally { tst = null; } } </code></pre> <p>My query is - Is it meaningful to type <code>tst = null;</code> in the finally block as the st...
c#
[0]
5,893,099
5,893,100
Is there anything more efficient than an array of objects in javascript to store large amounts of data?
<p>My application gathers acceleration 10 times a second, therefore I have a need to store thousands of rows of data. Currently I have an object which is a list of other objects to store it all - anything more efficient than that?</p> <pre><code>var arr = []; function dataPoint(x, y, z, tstamp) { this.xAccel = x;...
javascript
[3]
3,949,492
3,949,493
get current device location after specific interval
<p>I want to capture current location (latitude and longitude) of android device after specific interval (say 30 mins).. My class (or service ?? not sure what to use ) will start listening to <code>LocationManagerListener</code> when device booting completed. What is the best way of implementing this? how we can make u...
android
[4]
26,688
26,689
Resources on iPhone
<p>I just want to know how this works out. I made a folder and placed it inside of my xcode project. I placed images inside of these folders. What I am wondering is if even though this folder is on my xcode project is it calling to all the resources inside to where they are on the computer instead of being in the proje...
iphone
[8]
854,078
854,079
Can hashCode() have dynamically changeable content?
<p>In my implementation, I have a class A which overrides equals(Object) and hashCode(). But I have a small doubt that is, while adding the instance of A to HashSet/HashMap the value of the hashCode() is x, after sometime the value of the same hashCode() changed to y. Will it effect anything?</p>
java
[1]
5,154,854
5,154,855
Include File Vulnerability
<p>I try to read Claroline source code to learn from their coding.<br> In index.php file, at the first line of code, they write</p> <pre><code>unset($includePath); // prevent hacking </code></pre> <p>You can see full claroline source code from <a href="http://phpxref.free.fr/claroline/nav.html?index.php.source.html" ...
php
[2]
1,657,194
1,657,195
how to parse xml in this formate
<pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt; &lt;!-- Edited by XMLSpy® --&gt; &lt;CATALOG&gt; &lt;CD&gt; &lt;TITLE&gt;Empire Burlesque&lt;/TITLE&gt; &lt;ARTIST&gt;Bob Dylan&lt;/ARTIST&gt; &lt;COUNTRY&gt;USA&lt;/COUNTRY&gt; &lt;COMPANY&gt;Columbia&lt;/COMPANY&gt; ...
iphone
[8]
31,772
31,773
For loop in jQuery. How to?
<p>How can I replace this for-each loop with jQuery?</p> <pre><code>$(document).ready(function(){ hidebutton = $("#hideall"); hidebutton.click(function(){ for(i=1;i&lt;=6;i++){ var countrylist = document.getElementById("Country-"+i); countrylist.style.display = "none"; ...
jquery
[5]
1,557,225
1,557,226
jQuery vertical text scroll
<p>I have the following code, and it's behaving differently in <strong>CodePen</strong>, <strong>JSFiddle</strong> and in my browser. It only works perfectly in CodePen.</p> <p>Essentially I would like it to infinitely scroll from top to bottom without stopping. </p> <p>Here are both examples of the code in action, <...
jquery
[5]
1,134,558
1,134,559
C#. How to start
<p>Like, the real post was about VisualBasic. But it seem I looked on "Questions that may already have you answer" and I noticed answer, that C# application are seen more likely than VB.net, so... I am turning question around because you can do more in C# than in VB.net . So my question is.</p> <ol> <li>Is there progr...
c#
[0]
674,911
674,912
Java Concurrent API's
<p>Can some one please explain how <strong>CAS(compare swap)</strong> machine instructions are leveraged by <strong>java concurrent API's</strong>?</p>
java
[1]
1,332,584
1,332,585
Do i need the soft keyboard .java files in project?
<p>I've copied the soft keyboard .java files into my project. I've got the keyboard to pop up in my view, but something tells me that i don't need the keyboard src files directly in my project unless I want to change the keyboard. I've commented out some of these files and the keyboard still pops up. do you just use th...
android
[4]
3,672,800
3,672,801
run javascript when opening another page
<p>I'd like to open another web page from javascript (like default navigating, not fullscreen iframe or window.open) and run some javascript code upon loading it.</p> <p>Steps:</p> <ol> <li>Define a javascript function</li> <li>Navigate to another page</li> <li>Browser runs function in new page context</li> </ol> <p...
javascript
[3]
2,939,456
2,939,457
Encoding of string in java
<p>I am actually confused regarding encoding of string in a language. I had some of these questions .... Please help me if you know the answer to them....</p> <p>1) What is the native encoding of java strings in memory ie when I write <code>String a = "Hello"</code> in which format will it be stored. Since java is mac...
java
[1]
5,160,512
5,160,513
problem with update panel in internet explorer
<p>i am using my usercontrol in Updatepanel. i think thats why it is giving me error </p> <p>Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Respons...
asp.net
[9]
4,508,198
4,508,199
Bad practice in php?
<p>I have some PHP code that generates a calendar and then outputs html to display it. </p> <p>To display it on a page all I need to do is <code>&lt;?php include('calendar.php'); ?&gt;</code>. </p> <p>Is this bad practice?</p>
php
[2]
2,241,416
2,241,417
On C++ global operator new: why it can be replaced
<p>I wrote a small program in VS2005 to test whether C++ global operator new can be overloaded. It can.</p> <pre><code>#include "stdafx.h" #include "iostream" #include "iomanip" #include "string" #include "new" using namespace std; class C { public: C() { cout&lt;&lt;"CTOR"&lt;&lt;endl; } }; void * oper...
c++
[6]
4,700,734
4,700,735
using jquery.noConflict()
<p>I have two files. HTML and .js files. in code.js, I have written jquery code and in HTML file, I am including code.js as following:</p> <pre><code>&lt;script src="jquery-1.4.2.js"&gt;&lt;/script&gt; &lt;script src="jquery.interval.js"&gt;&lt;/script&gt; &lt;script src="code.js"&gt; jQuery.noConflict(); var $jcode =...
jquery
[5]
1,748,513
1,748,514
Package Installer misbehavoir
<p>I am unable to understand and fix the following behavior displayed by the Package Installer : in my application when I press on a "update application" button I download from a web server un update apk (in case there is) and start the Package Installer afterwards to install the package. Everything goes well and after...
android
[4]
2,303,982
2,303,983
Raw folder url path?
<p>How can I get the url of the raw folder? I do not want to access my asset via id but by path instead.</p> <p>Thanks for any help that you can provide!</p>
android
[4]
2,080,984
2,080,985
jQuery Slide Right/Left
<p>I have the following JS:</p> <pre><code>$(document).ready(function () { $(".LeftColumn").hide(); $(".SidebarToggle").toggle(function () { $(this).addClass("active"); $(this).text("Hide Sidebar"); $(this).attr("title", "Hide Sidebar"); //$(".LeftColumn").fadeIn("fast"); ...
jquery
[5]
2,671,485
2,671,486
scrollView issue in android
<p>Hello In my android appl;ication I am using a table inside a scrollview and below that there is a footer. Now the issue is the last row of the table is covered by the footer and is not visible. Is there any solution for this. My layout xml is</p> <pre><code> &lt;ScrollView android:id="@+id/Scroll" ...
android
[4]
5,945,760
5,945,761
iPhone: NSAttributedString
<p>Is there any way to concat two NSAttributedString ? Or NSAttributedString and NSString ? I tried something like this:</p> <pre><code> NSAttributedString *attr = [NSString stringWithFormat:@"...%@", attributedString]; NSLog (@"%@", [attr string]); </code></pre> <p>But thats not work...Any sug...
iphone
[8]
1,814,822
1,814,823
Call to a member function on a non-object
<p>Have a cycle, it often works function Clear. But sometimes I get an error </p> <pre><code>Call to a member function on a non-object </code></pre> <p>I do not care because of what is happening to me important that the cycle is not interrupted to do this?</p> <pre><code>$html-&gt;clear(); </code></pre>
php
[2]
5,104,940
5,104,941
How do I make a TwoLineListItem?
<p>I want to make a setings menu like this:<br><br><img src="http://i.stack.imgur.com/GqSiS.png" alt="enter image description here"></p> <p>Is there a definitive guide on how to make <code>TwoLineListItem</code>'s anywhere?</p>
android
[4]
4,387,141
4,387,142
Why does a javascript object property assignment via the dot notation NOT trigger a setter defined for that property?
<p>Any Javascript ninjas or people who have read ECMA-262 5th care to explain the following behavior?</p> <pre><code>var obj = { p: {}, set prop(val){ for (var key in val){ this.p[key] = "Set: " + val[key]; } }, get prop(){ return this.p; } } obj.prop = { // Assignment triggers setter f...
javascript
[3]
2,848,228
2,848,229
Extracting content from Jar file
<p>I'm looking for a way to extract data from a jar file. What i need is information about a certain class file including: - Constructor name - Public methods (getters, setters and actions.) - Perhaps if included the javadoc</p> <p>For example, in Eclipse, when you type your variable and you press '.' behind it, it gi...
java
[1]
5,812,909
5,812,910
JQuery - $(this).attr('name')
<p>I have a name attribute assigned to a hyperlink. When I do the following in my JQuery link_name does not return anything. Am I doing something wrong? </p> <pre><code> $("body").delegate("a", "click", function (event) { var link_name = $(this).attr('name'); alert(link_name); </code></pre>
jquery
[5]
4,982,583
4,982,584
"The type B cannot be a superinterface of C; a superinterface must be an interface" error
<p>Let's assume I got this interface A:</p> <pre><code> interface A { void doThis(); String doThat(); } </code></pre> <p>So, I want some abstracts classes to implement the method doThis() but not the doThat() one:</p> <pre><code> abstract class B implements A { public void doThis() { Sy...
java
[1]
4,417,648
4,417,649
Possibly silly question about strings and references in C#
<p>Good afternoon,</p> <p>I'm sorry if this question is too silly, but I don't know much (almost anything) about .Net's memory management system, and I really need to clear up this doubt... I have a <code>Dictionary&lt;String, Int32&gt;</code> which I need to use, and now I need a tree whose nodes are labeled with the...
c#
[0]
4,548,014
4,548,015
jQuery access "previous" div
<p>Here's my scenario.</p> <p>I have a DIV </p> <pre><code>&lt;div class="first"&gt;&lt;/div&gt; </code></pre> <p>if I click on an element inside this div, it generates another div, call it</p> <pre><code>&lt;div class="second"&gt;&lt;/div&gt; </code></pre> <p>now, can I click on an element inside second div to ac...
jquery
[5]
233,012
233,013
FilterQueryProvider, filter and ListView
<p>I have a database as follows:</p> <pre><code>------------------------------ BOOK NAME | BOOK FORMAT | COUNT | ------------------------------ Android | HTML | 1 WPF | PDF | 10 Symbian | PS | 2 Windows | HTML | 2 </code></pre> <p>I am showing this database to the user by making...
android
[4]
896,867
896,868
xml parser problem?
<p>i have tabbar controller, first tab is for Tableview controller.but i do xml parsing in appldidfinish method , in the xml parse didEndElement, i calculate items count and i give it into first tab's Tableview controller's numberOfRowsInSection,but after xml parsing finished, the following method wont be called. tabl...
iphone
[8]
1,149,478
1,149,479
Splitting Data Based on Data Value
<p>I have a Data like below.</p> <pre><code>OrderDate OrderID TotalOrderPrice ********************************* 1/10/2010 ABC 100 1/10/2010 ABC 200 1/20/2010 ABC 150 1/26/2010 ABC 100 1/10/2010 EDF 200 1/20/2010 EDF 110 1/26/2010 EDF 120 ****************...
c#
[0]
3,602,981
3,602,982
How come this variable echo's as 16?
<pre><code>$body = "Artist: " + $artist + "Size: " + $size + "Time: " + $time + "Concept: " + $concept + "Time: " + $time + "Mod: " + $mod + "Details: " + $details; </code></pre> <p>When I try to echo this variable, all that comes out is '16.' </p> <p>Can you guys help?</p>
php
[2]
4,278,237
4,278,238
how to change the font size using jquery from the dropdown list
<pre class="lang-html prettyprint-override"><code>&lt;div class="card"&gt; &lt;div id="name" class="badge"&gt; &lt;div id="address" class="badge"&gt; &lt;/div&gt; &lt;select id="font-size"&gt; &lt;option value="12"&gt;12&lt;/option&gt; &lt;option value="14"&gt;14&lt;/option&gt; &lt;optio...
jquery
[5]
224,000
224,001
Lucene SpellChecker.Net dll
<p>I have added spellchecker.net dll to my application but it throws this error message:</p> <p>The type name 'Net' does not exist in the type 'SpellChecker.Net.Search.Spell.SpellChecker'</p> <p>Any help is appreciated.</p> <p>Thank You.</p>
asp.net
[9]
5,373,482
5,373,483
Algorithm used by C# MACTripleDES.ComputeHash()
<p>can any one provide me with references on how this function is internally implemented.</p>
c#
[0]
3,391,159
3,391,160
android.R.id.empty broken in Xoom/Honeycomb?
<p>I have been trying to make radio buttons without the dot which toggles. I have been successful by doing this:</p> <pre><code>myRadioButton.setButtonDrawable(android.R.id.empty); </code></pre> <p>this works fine in all devices before Honeycomb 3.0.x. When I try and use the "empty" resource on the Xoom i get an erro...
android
[4]
2,017,467
2,017,468
.position() and .offset returning NULL off my target
<p>Im trying to check the position of an element on this page, and if its below a certain point I want to change the font color to something readable, but .position and .offset(which is what I should be using) are both returning NULL.</p> <p>Here is my jquery, the alert is in there for testing purposes:</p> <pre><cod...
jquery
[5]
3,216,100
3,216,101
convert a line of python code list comprehension / cross product (create a poker deck as a list of two characters strings: rank, suite) to C#
<p>how would you convert this code</p> <pre><code>poker_deck = [r+s for r in '23456789TJQKA' for s in 'SHDC'] </code></pre> <p>to C#?</p> <p>I came out with this:</p> <pre><code>char[] figures = "23456789TJQKA".ToCharArray(); char[] suites = "SHDC".ToCharArray(); List&lt;string&gt; deck = new List&lt;string&gt;(); ...
c#
[0]