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
740,567
740,568
LayeredDrawable - Set of item during runtime sets it to white
<p>I'm currently trying to set the background of a layer-list during runtime with a fetched image.</p> <p>I've use code like that to set the drawable within the layer-list with the fetched drawable:</p> <pre><code> ImageView vw = (ImageView)findViewById(R.id.imgVw); LayerDrawable drawable = (LayerDrawable)vw.g...
android
[4]
5,921,224
5,921,225
PHP static variables memory usage
<p>I have been wondering for a while already how does static variables work regarding memory use and should that even be really considered?</p> <p>I understand that static variables will only use up one area of memory, doesn't matter how many instances there are of the class itself. So in this sense, it should be wise...
php
[2]
185,401
185,402
What is the disadvantage of Java not having real properties?
<p>So, it's said quite often it's a disadvantage of Java that it does not have properties like <a href="http://msdn.microsoft.com/en-us/library/x9fsa0sw%28VS.80%29.aspx" rel="nofollow">C#</a></p> <p>What advantage, over the getXX/setXX java-bean style properties would we get if Java gets "native" support for propertie...
java
[1]
5,336,293
5,336,294
forwarding to a html file whose directory name changes
<p>I have folder structure like the following</p> <p>-> Parent folder <br> ---> <em>version</em>_HTML (folder)<br> -----> index.html (file)</p> <p>I would like to use an HTML file with javascript at the <em>version</em>_HTML level which will look for the file index.html in the subfolder and open it, as the folder nam...
javascript
[3]
4,851,801
4,851,802
Help me simplify this JS code
<p>I'm a beginner in JS and want to know a way to simplify this code. There are 7 different divs with iframes, and also 7 different links. I have shown 1 div with iframe and 1 link. I have no idea where to start. Any help would be greatly appreciated.</p> <p>NOTE: The code works to my needs, but I just need to simplif...
javascript
[3]
219,804
219,805
about php setcookie
<p>I have one problem about php setcookie.<br /> When user upload file in my server, it will set the cookie to store the filename.<br /> setcookie("user", $filename, time()+3600);</p> <p>In output code:<br /> You recently uploaded: echo $_COOKIE["user"];<br /> Example: You recently uploaded images: abc.zip</p> <p>But...
php
[2]
5,968,856
5,968,857
Get value from a JS string
<p>I have a string, example "hello word:abc there"</p> <p>I need to get the value after the value 'word:', so in the above case the answer would be 'abc'.</p> <p>"abc xyz word:2 hhh yyy" = '2'</p> <p>etc.</p>
javascript
[3]
3,009,321
3,009,322
How to get range of data types in c#?
<p>How to get range of data types in c sharp .net ? For example if I wish to get range of uint datatype, how can I get it through code ?</p>
c#
[0]
2,571,384
2,571,385
When to use virtual destructors in a c++ application
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/461203/when-to-use-virtual-destructors">When to use virtual destructors?</a> </p> </blockquote> <blockquote> <p>Possible Duplicate of <a href="http://stackoverflow.com/questions/461203/when-to-use-virtual-de...
c++
[6]
3,670,792
3,670,793
Calculate Amount of Days between Events - Android
<p>I been looking thru the Android API and been looking for a way to calculate the number of days between the current date and a future date. I'm pretty new to android and i havent done java in a few years. Whats the easiest method to calculate this?</p> <p>Thanks</p>
java
[1]
2,889,034
2,889,035
execute jquery in asp.net
<p>How does this work?</p> <pre><code>protected void btnLogin_Click(object sender, EventArgs e) { //$.blockUI(); //select from DB; //$.unblockUI(); } </code></pre> <p>Thanks From Allllll</p>
jquery
[5]
5,095,916
5,095,917
What a strange error in JS formatting of a new object?
<p>My javascript code that produces a syntax error:</p> <pre><code>var x = { a: 123 }; </code></pre> <p>The same code without an error:</p> <pre><code>var x = { a: 123 }; </code></pre> <p>What the heck?</p>
javascript
[3]
3,902,228
3,902,229
MediaController positioning over VideoView
<p>I have a VideoView that takes up the top half of the Activity in portrait orientation with the bottom half of the screen showing some images and text. I am playing a rtsp video stream in the video view when the Activity starts. I have attached a MediaController to the VideoView via the following code:</p> <pre><c...
android
[4]
3,603,165
3,603,166
event.srcelement || event.target dosent work in ff
<p>hi my code dosent work in ff ... event.target and event.srcelement and </p> <p>window.event.srcElement; dosent work in firefox ... please help me </p> <p>my version of fire fox is : 15.01</p>
javascript
[3]
3,639,825
3,639,826
How to change current unlock settings to "Password"(Enter a Password to Unlock Screen) through Programming?
<p>I am developing an app in Android 2.3.3</p> <p>Here is my criteria..</p> <p>When the user installs my app, the default unlock setting / the current unlock settings should be changed to Password (Enter a Password to Unlock Screen) or to a PIN, but not others. This is mandatory.</p> <p>How do i implement this?</p>
android
[4]
222,173
222,174
Keep UITableViewCell color when move UITableView rows
<p>I have an UITableView, I set the color of the first row as Green.</p> <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSInteger row=[indexPath row]; NSInteger section=[indexPath section]; static NSString *SimpleTableIdentifier1 = @"Cell...
iphone
[8]
4,008,680
4,008,681
Javascript if else statement optimisation
<p>I want to ask about optimisation in JavaScript <code>if else</code> statement.I have the code like this </p> <pre><code>if ( thisIsTrue ) printMe("someMessage"); </code></pre> <p>And the code can be optimisation like this</p> <pre><code>thisIsTrue &amp;&amp; printMe("someMessage"); </code></pre> <p>The quest...
javascript
[3]
4,151,979
4,151,980
Adding pagination to a repeater
<p>Is there a way to add pagination to a repeater to display say 5 items per page?</p>
asp.net
[9]
3,526,819
3,526,820
How often do you implement the big three?
<p>I was just musing about the number of questions here that either are about the "big three" (copy constructor, assignment operator and destructor) or about problems caused by them not being implemented correctly, when it occurred to me that I could not remember the last time I had implemented them myself. A swift gre...
c++
[6]
4,100,534
4,100,535
problem with selector in iphone?
<p>i am having a application where i am generating the uibuttons dynamically want to use same @selector...Now as sooon as event is generated i wanna check for values and pass it to thtroughthat selector how can i implement this code? can anyone tell me a tutorial sort where buttons are dynamically generated and check ...
iphone
[8]
858,191
858,192
JQuery if then CSS background change
<p>Basically I need a background image to change if another one is showing. This is only for one page of many. This is what I have so far but it isn't working.</p> <pre><code>if ($('#container').css('background') === 'url("/images/container1.png") no-repeat') { $('#container').css('background','url("/images/contai...
jquery
[5]
2,242
2,243
what does the role of l.strip() in this statement
<pre><code>lines = [l.split() for l in inpf.readlines() if l.strip()] </code></pre> <p>In the above statement, what does <code>l.strip()</code> do? </p> <pre><code>lines = [l.split() for l in inpf.readlines()]. </code></pre> <p>Will the above statement will not suffice?</p>
python
[7]
315,219
315,220
How to select jquery elements containing a certain character string?
<p>Say I have the following:</p> <pre><code>&lt;div id="hellokat"&gt;&lt;/div&gt; &lt;div id="hellodog"&gt;&lt;/div&gt; &lt;div id="byekat"&gt;&lt;/div&gt; &lt;div id="byedog"&gt;&lt;/div&gt; </code></pre> <p>I know I can select divs individually with $('#hellokat') and $('hellodog'), but I want to select all divs co...
jquery
[5]
3,958,540
3,958,541
PHP. What does "return($var & 1);" mean?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/6201134/callback-function-return-returnvar-1">callback function return return($var &amp; 1)?</a> </p> </blockquote> <p>Example code:</p> <pre><code>&lt;?php function odd($var) { // returns whether the input...
php
[2]
2,869,469
2,869,470
How can I call a static method from a class if all I have is a string of the class name?
<p>How would I get something like this to work?</p> <pre><code>$class_name = 'ClassPeer'; $class_name::doSomething(); </code></pre>
php
[2]
2,803,343
2,803,344
Why Except function applying Distinct?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2975944/except-has-similar-effect-to-distinct">Except has similar effect to Distinct?</a> </p> </blockquote> <p>I'm having two <code>List&lt;String&gt;</code> like</p> <pre><code>lstOne = { "A", "B", "C" ,"C" ,...
c#
[0]
851,651
851,652
TableViewCell remains selected/highlighted will this be rejected by apple
<p>I have a tableview with a TableViewCell that remains selected/highlighted. When a user goes to the detail section, and returns, the selected row remains highlighted. </p> <p>So, will they reject this app? Kindly let me know :( </p> <p>Thanks</p>
iphone
[8]
3,747,973
3,747,974
Error: must be str, not generator in Python
<p>I am using python and here is a piece of my code:</p> <pre><code>wp = open(outfile, 'w') fields = line.split('\t') gene_ID = fields[0] chr = fields[1] strand = fields[2] start = int(fields[3]) end = int(fields[4]) bc = {'A': 'T', 'C': 'G', 'G': 'C', 'T': 'A', 'N':'N'} if strand == '+': wp.write(chr_strin...
python
[7]
4,281,637
4,281,638
How does the Java for each loop work?
<pre><code>List&lt;String&gt; someList = new ArrayList&lt;String&gt;() // add "monkey", "donkey", "skeleton key" to someList </code></pre> <pre><code>for(String item : someList ){ System.out.println(item); } </code></pre> <p>What would the equivalent for loop look like without using the for each syntax?</p>
java
[1]
1,311,434
1,311,435
Encrypting connection string: "This operation does not apply at runtime"
<p>I have a console application and it has app.config. When I run this code:</p> <pre><code> class Program { static void Main() { ConnectionStringsSection connSection = ConfigurationManager.GetSection("connectionStrings") as Connecti...
c#
[0]
2,265,712
2,265,713
How to fill up a nested class?
<p>I have the following class:</p> <pre><code>public class ExternalClass { public string Name {get;set;} public class InternalClass { public int SomeNumber {get;set} } } </code></pre> <p>How do I insert data, for example the number 123, into the property SomeNumber of InternalClass? </p> <...
c#
[0]
3,002,918
3,002,919
Can the time on a CountDownTimer be updated?
<p>The CountDownTimer default Constructor takes the values millisInFuture and countDownInterval. If the user stops the timer, changes his settings to a different millisInFuture length, how would I go about changing the millisInFuture value without creating a new CountDownTimer object?</p> <p>I've tried making a getMil...
android
[4]
99,711
99,712
use removeClass() on selected class
<p>I have a DOM element with 2 classes attached.</p> <p>I wanted to know if I can call the element with one of the classes, and remove the other class attached.</p> <p>Let's say this is the code:</p> <pre><code>&lt;span class="leave stay"&gt; a &lt;/span&gt; </code></pre> <p>and the jQuery is :</p> <pre><code>$('....
jquery
[5]
2,594,777
2,594,778
How to implement an interface like this in Android application?
<p>good afternoon</p> <p>How could I get a design like this in my android application?</p> <p><a href="http://s2.subirimagenes.com/otros/previo/thump_7851660img20120718wa0000.jpg" rel="nofollow">http://s2.subirimagenes.com/otros/previo/thump_7851660img20120718wa0000.jpg</a></p> <p>That is, divided into three areas w...
android
[4]
2,746,397
2,746,398
Android ftp download failure from HTC to Samsung
<p>i had uploaded .3gp videofile from HTC legent using FTP and download it in samsung but the download file shows unsupported.But when use same mobile for upload and download it works fine.can any one help me?</p>
android
[4]
3,617,712
3,617,713
how to dynamically change height of text area jquery?
<p>I have a text area which gets populated by jquery dynamicaly when a user clicks on a button.</p> <p>What i would like to happen is once the text area is populated is for the height of it to expand so all the text inside it can be seen?</p> <p>this is the text area: </p> <pre><code>&lt;textarea type="text" id="no...
jquery
[5]
2,676,103
2,676,104
Questions for Context in Android. How does it work and why?
<p>I'm trying to figure out what is the use of the context when it is being passed back into the constructor in an example below , can anyone help to give a more layman explanation and its possible use ? Thank you ! </p> <pre><code>public static class DatabaseHelper extends SQLiteOpenHelper { public final Context...
android
[4]
4,345,965
4,345,966
problem with cancel the alarm manager pending intent
<p>I have app which reminds people to so their task. So there is one pending intent,now the user can delete the alram when he wants to. Ib this code there is just one pending intent for multiple user alarms so I am confused on cancelling that particular alarm where extras is <code>"pill"</code>. The remaining alarms sh...
android
[4]
3,103,084
3,103,085
jquery creating events when mouseenter and mouseleave
<p>I am trying to rock a simple image back and forth on a mouseover using jquery. The image id is "img".</p> <pre><code> $(document).ready(function () { $("#img").bind('mouseenter', function () { $('#img').rotate(43); }); $("img").bind('mouseleave', function () { $('...
jquery
[5]
5,634,604
5,634,605
Rounding the Double Values
<h1>Rounding Issue</h1> <p>For Example </p> <ol> <li>598.59 ya 591.45 to be convert 600.</li> <li>541.0 to be convert 550.</li> <li><p>541.59 to be convert 550.</p> <p><em><strong>Just check the last 2 digit ignore the decimal value. if last 2 digit in between 11- 19 it will converted 20 if 21-29 then will converted...
java
[1]
3,101,068
3,101,069
Python importing modules that all import another module that is the same
<p>What i want to is, I have foo.py it imports classes from bar1, bar2, and they both need bar3, e.g.</p> <p>foo.py</p> <pre><code>from src import * ... </code></pre> <p>src/ __ init__.py</p> <pre><code>from bar1 import specialSandwichMaker from bar2 import specialMuffinMaker </code></pre> <p>src/bar1.py</p> <pre...
python
[7]
1,358,089
1,358,090
Find DLL name by having name of the Namespace
<p>In the code there is a line like this:</p> <pre><code>Company.Security.Logs.LogEvent myLog = null; </code></pre> <p>Now in another project I want to do the same but I don't know which "reference" should I add to my project? So how do I know in which of the references in this project we have this Security class?</p...
c#
[0]
146,394
146,395
get keywords in input and store them in an array with jquery
<p>I was wondering how I could store a query such as this in an array : <code>"hello again world"</code></p> <p>the keywords would be in an input field with id = status, and would have to be split by " ". Also how would I escape certain words and characters in this array as matched by the words/characters in the arr...
jquery
[5]
4,152,938
4,152,939
How would I go about this?(Android Whack-A-Mole Project)
<p>I'm making a simple whack-a-mole game as my first mini-project for android. I'm not sure how to go about this. I know the basics of setting everything up and such but I'm not sure how to animate the moles and make it so that when the mole is in the up position it can be tapped and a point will be counted. I know I c...
android
[4]
2,673,462
2,673,463
How to have Java liked style static initialization in C++
<p>I was wondering, is it possible to have static initialization as Java style in C++? If not, what is the alternative way?</p> <pre><code>// .h class A { protected: static CBitmap bitmap; }; // .cpp CBitmap A::bitmap; // Error! static { global_initialization(); bitmap.LoadBitmap(IDB_BITMAP); } </code></p...
c++
[6]
4,540,544
4,540,545
Writing array to text file with tab delimiters, on one line
<p>I feel like this should be an easy question, but its totally bugging me. I have a string array, of size 64, called items. I want to write each item of items to a text file, with each value separated by a tab. When I try the following code though, it writes each item + tab, then a new line. How do I get all of the ar...
c#
[0]
5,318,603
5,318,604
Representing a set of URLs in a list as a tree structure
<p>I have a list of dicts that stores URLs. It has simply two fields, <code>title</code> and <code>url</code>. Example:</p> <pre><code>[ {'title': 'Index Page', 'url': 'http://www.example.com/something/index.htm'}, {'title': 'Other Page', 'url': 'http://www.example.com/something/other.htm'}, {'title': 'About Pa...
python
[7]
1,252,347
1,252,348
Android bring activity to front
<p>We have a requirement to have our application always be on top. Effectively we need to create a kiosk mode for the device. These devices will be supplied to users so they are only using our application on the device.</p> <p>We have done some research into trapping all possible key events such as the user pressing...
android
[4]
2,478,927
2,478,928
Set the Height of View to Make It Square By Knowing Only Its Width Weight
<p>I have this scenario: A horizontal LinearLayout that fills the container and <code>weightSum=100</code>, and two views inside with weight of 50 each.</p> <p>Now how do I make these two views square (e.g. the height must be equal to their width). The number of LinearLayout rows is unknown, so basically, I can not wr...
android
[4]
977,190
977,191
SyntaxError: missing : after property id
<pre><code>$('.pagination ul li').each({ if( $(this).index(this) &gt; 2 ) { $(this).hide(); } }); </code></pre> <p>SyntaxError: missing : after property id whats the problem?</p>
javascript
[3]
2,521,890
2,521,891
extract data from site and put into a file
<p>got this project where the client has lost their database,hence i got to look up into their current(live)site and retrieve information... problem is that there is too much data that i have to copy and insert into the database which is taking a lot of time ...could you suggest some code which could help me ?</p>
php
[2]
56,043
56,044
How to name classes with similar semantic in Java?
<p>For example, in C#, <code>Foo</code>, <code>Foo&lt;T&gt;</code>, <code>Foo&lt;T1, T2&gt;</code> could have similar semantic but are different classes. But in Java, I can't name classes like that. How to name them? I don't think <code>Foo</code>, <code>Foo1&lt;T&gt;</code>, <code>Foo2&lt;T1, T2&gt;</code> are appropr...
java
[1]
2,869,850
2,869,851
Use of | (or) operator in C#
<p>I am wondering if this two approaches are equivalent? Is one of them better than the other?</p> <p>First:</p> <pre><code>bool x = foo(); bool y = bar(); if(x || y) { //... } </code></pre> <p>Second:</p> <pre><code>if(foo() | bar()) { //... } </code></pre>
c#
[0]
681,458
681,459
Getting Error while using SESSIONS in PHP
<p>I am passing some values through a SESSION variable as below</p> <p>Page 1: (creating the session variables)</p> <pre><code>&lt;?php session_start(); &lt;html code Come here&gt; $_SESSION['fname']=$fn; $_SESSION['fimg']=$fim; $_SESSION['fnum']=$fnum; $_SESSION['from']=$fl; $_SESSION['to']=$tl; ?&gt; </code></pre> ...
php
[2]
3,719,992
3,719,993
hide cursor in textbox using javascript?
<p>How to hide cursor in asp.net textbox using JavaScript? I don't want see blink thing in textbox.</p>
javascript
[3]
4,333,950
4,333,951
custom android button look and feel
<p><img src="http://i.stack.imgur.com/JeQkc.png" alt="enter image description here"></p> <p>The two buttons in the bottom of the screen are Scan and Leads, if we click on any button, the view of the button is visible like pressed as u see in image for lead button, this view will change according to the button click, a...
android
[4]
2,174,551
2,174,552
How to move a tablview row?
<p>I am making an app in which I want to move the row.So I can do it by</p> <p>[self.tableList setEditing:YES animated:YES];</p> <p>where "<strong>tableList</strong>" is my table's name but whenever I am running this line.I am not able to get the icon for move which usually comes at right side for moving a cell inste...
iphone
[8]
629,326
629,327
Trying to test a ASP.NET website over a LAN
<p>I have a XP Pro and Vista machine setup on a workgroup LAN, normal case with NAT router/adsl modem. Latop is wireless.</p> <p>The XP Pro laptop has IIS on it and I have written an ASP.NET app.</p> <p>When I try to access the app from browser on the Vista PC I get an error saying can't connect to site.</p> <p>I ha...
asp.net
[9]
2,469,588
2,469,589
I am drawing several circles in android how to center number (text) inside of it using canvas.drawText
<p>I am drawing the text using canvas.drawText, the rectangles using canvas.drawRect. I can get the current top,left,right,bottom easily, I think the text size actual calculations to subtract from center points 9x,y) is what I need (I may be wrong)</p>
android
[4]
2,604,986
2,604,987
How to get name and email of every person in address book contacts
<p>I am new to iphone.now I am struck in my project in the task of getting all the names and email address of every person which are placed in address book contacts in to an array.if any body know this one can you please help me to solve this issue.</p>
iphone
[8]
318,053
318,054
How to store the file in a string
<p>I am trying to store this file in a string.but i don know how to do it??can you<br> please help me.This is my program</p> <pre><code>using System; using System.Collections.Generic; using System.Text; using System.IO; using System.Diagnostics; namespace Sample_Program_For_CC_ utility { class Program { static voi...
c#
[0]
5,348,149
5,348,150
Single word Palindrome Checker (True or False)
<p>Right now, what I have is a code that I can test a single word whether it is a Palindrome or not. I have to input the word, and it will tell me whether it is a Palindrome (True) or if it is not (False)</p> <p>I need to create one that Asks for a single word, then provides a True of False based on the word that is t...
python
[7]
3,815,510
3,815,511
DOM alphabetical insert
<p>This function inserts a DOM element ('a') into a div (Bb1c). I want to update it so that it does an alphabetical insert based upon the the name of the bookmark (c[1].value). Bb1c basically conatins a list of bookmarks and when I add one I want it inserted alphabetically.</p> <p>The already inserted links are in a...
javascript
[3]
2,751,070
2,751,071
how to resolve issue with drag and drop plugin accessibility (WAI-ARIA) and screen reader?
<p>how to resolve issue with drag and drop plugin accessibility (WAI-ARIA) and screen reader?</p>
jquery
[5]
2,820,236
2,820,237
dx.bat hangs while processing .class files
<p>I'm using dx.bat to prepare my java code and java libraries I'm using for device. I have several .jar's, and the tool always hangs on the same class. It doesn't finish or report any errors. If I remove the .jar that contains that class, then dx.bat completes successfully, but the app won't run, of course, because...
android
[4]
5,854,725
5,854,726
How can I make driving navigation app on Android
<p>How can I draw an Arrow showing the driving direction in MapView ?.</p>
android
[4]
3,354,315
3,354,316
When can I access an object member directly in memory? No getters called
<p>It is usually allowed to do something like that (no comments on the code please :-))</p> <pre><code>class SimpleClass { int member; }; SimpleClass instance; int* pointer = (int*) &amp;instance; </code></pre> <p>However, if I define my class as:</p> <pre><code>class SimpleClass { virtual void foo(); i...
c++
[6]
3,698,503
3,698,504
Clear element.classList
<p><a href="https://developer.mozilla.org/en-US/docs/DOM/element.classList" rel="nofollow"><code>element.classList</code></a> is of <a href="https://developer.mozilla.org/en-US/docs/DOM/DOMTokenList" rel="nofollow"><code>DOMTokenList</code></a> type.</p> <p>Is there a method to clear this list?</p>
javascript
[3]
1,640,062
1,640,063
ViewState integrity check and invalid authentication ticket failures
<p>Before anyone says it, Yes we have validation &amp; machine key explicitly specified in Web.config</p> <p>Yet we are still getting this error from time to time. I've spent an awful long time trying to track down this problem and have come up completely empty.</p> <p>We do have load balancing using TMG but we've re...
asp.net
[9]
2,966,446
2,966,447
connecting to client system using ip address
<p>I am doing a chating program in java.How can i Connect the server to a particular client system by entering its IP address? </p>
java
[1]
4,846,635
4,846,636
How to detect stream_copy_to_stream errors?
<p>I've got a bit of code which, simplified, looks something like:</p> <pre> $fout = fsockopen($host, 80); stream_set_timeout($fout, 10*3600); // 10 hours $fin = fopen($file, 'rb'); // not really a file stream, but good enough proxy here $readbytes = stream_copy_to_stream($fin, $fout); if(!$readbytes) die('copy failed...
php
[2]
4,551,381
4,551,382
How can i put the image in the section of table in the titleForHeaderInSection method?
<p>hi all i have so confused to make an image in the table's header section , and i have make put the image in the cell of table but i cannot understand how to make put image in the section part of table . here is my code of that method ..</p> <ul> <li><p>(NSString *)tableView:(UITableView *)tableView titleForHeaderI...
iphone
[8]
2,094,612
2,094,613
Three tier Architecure Using Linq in Asp.net 3.5
<p>Hi i want example of three tier Architecture code or any link when i can find that code can any body help me regarding this.... </p>
asp.net
[9]
3,551,760
3,551,761
Why isn't this simple PHP Forloop working?
<p>First here's the code:</p> <pre><code>&lt;?php $qty = $_GET['qty']; for($i=0; $i &lt; $qty; $i++) { setcookie('animals', $_COOKIE['animals'].'(lion)', time()+3600); } ?&gt; </code></pre> <p>Here's what I'm trying to do:</p> <p>I want to set the value of the "animals" cookie to "(lion)". The number of insta...
php
[2]
3,338,773
3,338,774
How to copy a file in filesystem?
<p>I would like to know the best way to copy a file in the filesystem? (android java function )</p> <p>(sdcard/video/test.3gp -----> sdcard/video_bis/test2.3gp)</p> <p>Is there an example somewhere? </p> <p>Regards</p>
android
[4]
3,703,560
3,703,561
Specifiying keyword arguments with *args and **kws
<p>I've found a behavior in Python that has baffled and irritated me and I was wondering what I got wrong...</p> <p>I have a function which should take an arbitrary number of arguments and keywords, but in addition should have some default-valued keywords that comprise it's actual interface:</p> <pre><code>def foo(my...
python
[7]
5,355,948
5,355,949
Change PDF DPI without effecting it Height & width?
<p>I am creating a PDF using <strong>Leadtools</strong>. i need a pdf of specific height &amp; width with particular <strong>DPI (600)</strong> If I set DPI using leadtools, it changes the height ,width also.. Is there any other library or dll which can be used to change dpi without effecting its height &amp; width??</...
c#
[0]
4,002,337
4,002,338
.class expected error
<p>I am trying to write some code to print out a square made up of '*'s. The problem is that I get an error saying '.class expected' after the variable 'int stars'. I'm not sure what this means. </p> <pre><code>class Main { public static void main( String args[] ) { int sqaure = 5; int line = 1; while ( line &lt;= ...
java
[1]
1,799,215
1,799,216
Does Facebook allows to invite user's friends?
<p>Does Facebook allows to invite the user friends on external website? For example accessing a user's friends and send the private message to all of them or email them? Is it considered spam or its allowed?</p>
php
[2]
1,082,746
1,082,747
how can I assign a variable to hold an image in php
<p>I was just wondering if I could have a variable to hold an image, I'm using phpmailer to send email and I need an image to be attached to it,</p> <p>so I was wondering if I could put the image in a variable and use </p> <pre><code>$mailer-&gt;AddAttachment($image); </code></pre> <p>to send the email with attachme...
php
[2]
5,955,647
5,955,648
Java dynamic proxy questions
<p>1.Does dynamic proxy instance subclass the target class? The java doc says the proxy instance implements "a list of interfaces", says nothing about subclassing, but through debugging, I saw that the proxy instance did inherit the target class properites.What does the "a list of interfaces " mean? Can I exclude thos...
java
[1]
3,232,817
3,232,818
Preincrement faster than postincrement in C++ - true? If yes, why is it?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/24901/is-there-a-performance-difference-between-i-and-i-in-c">Is there a performance difference between i++ and ++i in C++?</a> </p> </blockquote> <p>I heard about that preincrements (++i) are a bit faster than po...
c++
[6]
3,202,772
3,202,773
how i solve this error The type or namespace name 'ThemeInfo' could not be found
<p>how i solve this error</p> <p>The type or namespace name 'ThemeInfo' could not be found (are you missing a using directive or an assembly reference?) </p> <p>AssemblyInfo.cs</p> <pre><code>using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.InteropServices;...
c#
[0]
5,871,048
5,871,049
Three layer deep malleable strings
<p>I'm trying to implement a three layer deep data structure. It is easy to do until you add the requirement of being able to move around the children and or fields, then it becomes a nightmare. </p> <p>Parent(Index, ID) -> Children(Index) -> Fields(Index, string) </p> <p>So for example, the data might look like t...
c#
[0]
6,022,605
6,022,606
https loading issue for jquery plugins
<p>My site is a https secured. Recently I added one jquery plugin and also added google adsense plugin. After doing this when I opened my website in Chrome I found that in the URL there is a red cross of https:// instead of a normal green color one. After quite research I concluded its due to adding those external plug...
jquery
[5]
1,222,008
1,222,009
Android development, Source file organization/notation best practices?
<p>Android lists coding standards but does not seem to go into how source (Activity's, etc) files should be organized. As my project grows im wondering how I should be breaking up the classes or if I just just leave a mess of 20 files in the src folder. It does not seem like there is any sort of notation (like Hungaria...
android
[4]
3,328,315
3,328,316
i have a arraylist where i am verifying particular object is existing or not but even it exists it always returns false
<p>hi i have class called userdata which returns the Userarraylist which is of type User. when ever i try to use contains method to check particular property is existing or not it always returns false why? </p> <p>Actually i want the array list to be generic which should return the objects that are set in array list.<...
java
[1]
5,096,506
5,096,507
Changing colormatrix of x y co-ordinates of image
<p>i am developing an app which allows user to color the images. i have the color matrix of the color i want to apply,but the problem is instead of changing color of x y coordinates whole image gets colored. i don't know how to apply the colormatix to specified coordinates of the image. i am using </p> <p>matrix = new...
android
[4]
5,442,424
5,442,425
jQuery: undo things when history:back?
<p>hey guys, i know this question might be too easy, but i have no idea how to solve this.</p> <p>when submitting a form i'll fadeIn a Loading-Image. When submitting the form was a success the page redirects blabla...</p> <p>Now when I hit the BACK Button in my browser and i visit the previous page with the form the ...
jquery
[5]
5,835,126
5,835,127
how to sort a list of 2D points using C#?
<p>Sort a list of points in descending order according to X and then Y.</p>
c#
[0]
4,046,436
4,046,437
why can not the value of primitive type variable be changed?
<pre><code> public class testtype { private int a; private double b; testtype(int a,double b) { this.a=a; this.b=b; } public void maketoequal(testtype oo) { oo.a=this.a; oo.b=this.b; } void trytoequal(int c) { c=this.a; } public static void main(String[] args) { ...
java
[1]
1,945,553
1,945,554
NTLM: How to determine if a machine account is a member of security group
<p>Is there an easy way in .NET code to determine if particular machine account (e.g. MYSERVER001$) is a member of an NT security group? I would also like to do the same check for an NT user or an NT group (check whether they belong to a particular group)</p>
c#
[0]
4,832,092
4,832,093
Extract specific url from tags with a class name ( php )
<p>I'm trying to get the url inside of these tags : I'm a beginner coder , an explanation will be very welcome !</p> <pre><code>`&lt;a class="classname" onmouseover="montre('element-name');" onmouseout="cache();" href="THIS-IS-THE-URL.html"&gt;something&lt;/a&gt;` </code></pre>
php
[2]
808,116
808,117
Convert byte [] to ArrayList<Object>
<p>I have a byte [] that i obtained using Object ArrayList</p> <p>Can anyone tell me how to convert my byte [] to Object ArrayList? </p> <ul> <li><p>coveting arraylist like this</p> <pre><code> ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream oos = null; oos = new Objec...
java
[1]
4,727,334
4,727,335
How to get just the name of the parent folder in the directory where a script is running in php?
<p>I would like to get just the name of the parent folder of which a script is currently running in the directory?</p> <p>if we have a script called foo.php with a path of "/Users/Somone/Sites/public/foo.php", how can i go about just getting "public"out of the that file path and not the entire directory tree?</p> <p>...
php
[2]
2,589,207
2,589,208
Action returning void and taking parameter, with ternary operator
<p>I want to write an Action which only takes a PerformanceCounterCategory as a parameter. I know there is Action&lt;>, Func&lt;> and Delegates and there is some distinction between these, but I am not sure what it is. Can someone please tell me what the difference is (I read somewhere that Action does not return, or t...
c#
[0]
315,890
315,891
Toggling image border color on click
<p>Referencing this Fiddle ( <a href="http://jsfiddle.net/j5uGN" rel="nofollow">http://jsfiddle.net/j5uGN</a> ), how can I toggle a clicked image's border color between <code>#efefef</code> and <code>#3f96cf</code> so that it is <code>#efefef</code> when the image appears to be unchecked (aka has a class of "nocheck")?...
jquery
[5]
3,576,999
3,577,000
jQuery, "this", from parent function?
<p>I am trying to build my first Plugin for jQuery and I've the following code. I want to grab a default text, that I did set as $(this).text but it doesn't work this way. I've tried with parent and stuff like that, but without lucky.</p> <p>Any idea?</p> <p>Thanks.</p> <pre><code>(function($) { $.fn.functionName =...
jquery
[5]
2,655,949
2,655,950
How can i add a folder to PATH for an ASP.NET exe?
<p>i use several exes for my asp.net prj. they include ffmpeg and imagemagik. I know i can easily put this in my path but i may want to switch between different version in different builds. How do i add the path based on my exe? doing it in code is ok. I'm thinking about using a prefix path as a workaround and just set...
asp.net
[9]
3,787,272
3,787,273
Are proxies illegal?
<p>I made an class in php to get coordinates from Google and Yahoo, using proxies, and want to make the code available online. So what I want to know, is this somehow illegal, to use proxies to get data from Google or Yahoo when the block your ip after 50,000 request, or there is no problem about that?</p>
php
[2]