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
1,479,447
1,479,448
Check/Uncheck image's checkbox if not dropped/dragged
<p>I have a grid with images and every image has an checkbox to select it (for delete). The grid is sortable.</p> <p>I want to check/uncheck the checkbox only if the image is not drapped/dropped (by simple click only).</p> <p>I have done the following lines</p> <pre><code>$('#images li').click(function() { if ($(this).children('input').is(':checked')) { $(this).children('input').attr('checked', false); } else { $(this).children('input').attr('checked', true); } }); $('#image li').bind('drag',function() { $(this).children('input').attr('checked', false); }); $('#image li').bind('drop',function() { $(this).children('input').attr('checked', false); }); </code></pre> <p>However the "drop" statement look doesn't work. How to do it right way?</p>
jquery
[5]
4,025,045
4,025,046
how to set checkbox value false in datagridview one row
<p>how to set checkbox value false in datagridview one row</p>
c#
[0]
1,742,903
1,742,904
How to get which button submitted the form on ASP .NET page inside FormView Inserted/Updated events
<p>I have two buttons on ASP .NET form: <strong>Save</strong> and <strong>Save &amp; Return</strong>. If user hits <strong>Save &amp; Return</strong> I would like to save data etc. and go to another page. If user hits <strong>Save</strong> I want to stay on current page. </p> <p>But I don't know how to get information which button was clicked inside Updated/Inserted event of FormView. Is there a chance to get it?</p>
asp.net
[9]
2,413,291
2,413,292
Create zip style file without compression
<p>I know that there are many free and not so free compression libraries out there, but for the project i am working on, i need to be able to take file data from a stream and put it into some kind zip or pack file, but without compression, because i will need to access these files quickly without having to wait for them to decompress.</p> <p>Anyone know how this could be approached, or if there are some libraries out there that do this that i am not aware of?</p>
c#
[0]
4,586,204
4,586,205
page scope variables in ASP.NET
<p>I need to access some variables in a page in web application. The scope of variables is just in that specific page. which one is the solution ? Session or ViewState ? or any better solution ?</p> <pre><code> Private Property UserId() As Integer Get If Not ViewState("UserId") Is Nothing Then Return CType(ViewState("UserId"), Integer) Else Return -1 End If End Get Set(ByVal Value As Integer) ViewState("UserId") = Value End Set End Property </code></pre> <p>or </p> <pre><code>Private Property UserId() As Integer Get If Not Session("UserId") Is Nothing Then Return CType(Session("UserId"), Integer) Else Return -1 End If End Get Set(ByVal Value As Integer) Session("UserId") = Value End Set End Property </code></pre> <p>And also Is ViewState custom per user? </p>
asp.net
[9]
1,802,045
1,802,046
Need to make a List
<p>Need to make a List that each line have Image and data (text) </p> <p>what is the right way? with list of table row ? or it is possible with ListView?</p> <p>thanks for your help </p>
android
[4]
3,364,099
3,364,100
How to get browser to navigate to URL in Javascript?
<p>What is the best (correct, modern, cross-browser, safe) way to get a web browser to navigate to a URL of your choice using Javascript?</p>
javascript
[3]
5,731,856
5,731,857
app crash when click on back
<p>When i navigate on click row i push the poinofinterestview but when i click back app crash. but if i comment [nextControllerp release]; it works or 5 or 6 time then it crashes</p> <pre><code>(void)tableView:(UITableView *)TableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [TableView deselectRowAtIndexPath:indexPath animated:YES]; PointOfInterest *nextControllerp=[[PointOfInterest alloc] initWithNibName:@"PointOfInterest" bundle:nil]; if([LocationList count]!=0 &amp;&amp; [LocationListId count]!=0) { nextControllerp.locName=[LocationList objectAtIndex:indexPath.row]; nextControllerp.LocationId=[LocationListId objectAtIndex:indexPath.row]; [self.navigationController pushViewController:nextControllerp animated:YES]; } [nextControllerp release]; UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStylePlain target:nil action:nil]; self.navigationItem.backBarButtonItem=backButton; [backButton release]; } </code></pre>
iphone
[8]
2,946,118
2,946,119
Is there cast in Java similar to <reinterpret_cast> in C++
<p>I get in my function message array of bytes and type of object, I need to restore object from bytes. Is there in Java any cast like in C++ ?</p>
java
[1]
5,166,205
5,166,206
Passing string into Onchange
<p>I am having a hard time passing a string constant into an onchange event. code example which i am trying:</p> <pre><code>var rvalue = "hi"; var r1 = '&lt;label style="vertical-align:2px;"&gt;Group by: &lt;/label&gt;' + '&lt;select id="pwx_documents_range_groupby" onchange="ravi('+rvalue+');"&gt;' + '&lt;option value="listview" selected="selected"&gt;List View&lt;/option&gt;&lt;option value="notetype"&gt;Note Type&lt;/option&gt;&lt;option value="author"&gt;Author View&lt;/option&gt;'+ '&lt;option value="cat"&gt;Cat&lt;/option&gt;&lt;/select&gt;' </code></pre> <p>This is just sample code.. But the question is once drop down change it will call ravi function and throw me the error 'hi' is undefined. If i am passing 0 instead of hi it works great. I am totally surprise why it will not accept the string.</p> <p>Anybody have any idea that would be great help.</p>
javascript
[3]
4,822,491
4,822,492
How to post data in part of a form using jquery
<p>I have a form like this:</p> <pre><code>&lt;form id="abc"&gt; &lt;div id="xyz" &gt; //some elements &lt;/div&gt; &lt;/form&gt; </code></pre> <p>I have bound the submit event like this:</p> <pre><code>$(function(){ $('#abc').submit(function(event){ //I want to post the data (form fields stored in element 'xyz') $.post(/**/); }); }); </code></pre> <p>How may I post only the elements in div 'xyz' ?</p> <p><strong>[Edit]</strong></p> <p>When I use $(#id).serialize(), I am getting the (url encoded) key value pair. I merely want the value. the data I am trying to extract is in a textarea. It consists of a set of emails, separated by a comma. I want to post the emails to the server. I can either post the data as a JSON array (which means I will have to parse the string clientside), or send the string to the server - which is better practise?</p>
jquery
[5]
1,597,908
1,597,909
Looking for any tool for check C# program on types of OS on one computer
<p>i'am Looking for any tool for check C# program on type's of OS on one computer</p> <p>for example: Win 98....Win XP...Vista...7...</p> <p>is there any free and good tool ?</p> <p>thank's in advancec</p>
c#
[0]
1,681,351
1,681,352
Is there a way to use features in Android 2.1/2.2 while keeping a minSDK version to 3?
<p>I have a project that is just using Android 1.5 for programming, but with the proliferation of other handsets and some cool features in Android 2.2, we'd like to support the features without losing support for 1.5 or forking a new code base. Is it possible to do with Android SDK?</p> <p>I do have some sense of the "ugly" way to do it, as in keeping the same code base but have a build system that builds different versions for the platforms and keep different Java files around that get added in our out of the build based on which version is selected. I'm hoping someone else has solved the problem based on the many versions of apps in the market that run on multiple Android versions.</p>
android
[4]
998,586
998,587
Is echo slower than not using echo?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1394478/php-echo-vs-openclose-tag">php echo vs open&amp;close tag</a> </p> </blockquote> <p>For example. Is this:</p> <pre><code>&lt;p&gt;Hello welcome to my site&lt;/p&gt; &lt;p&gt;Your name is &lt;? echo $name; ?&gt;!&lt;/p&gt; &lt;p&gt;Your age is &lt;? echo $age; ?&gt;!&lt;/p&gt; &lt;p&gt;Your email address is &lt;? echo $email; ?&gt;!&lt;/p&gt; </code></pre> <p>Faster or slower than this:</p> <pre><code>&lt;? echo "&lt;p&gt;Hello welcome to my site&lt;/p&gt;"; echo "&lt;p&gt;Your name is " . $name . "!&lt;/p&gt;"; echo "&lt;p&gt;Your age is " . $age . "!&lt;/p&gt;"; echo "&lt;p&gt;Your email address is " . $email . "!&lt;/p&gt;"; ?&gt; </code></pre> <p>If the site is getting millions of page views...?</p>
php
[2]
4,765,551
4,765,552
Echoing variables in PHP without calling them
<p>Let's say I have something like this:</p> <pre><code>echo "This is a $variable"; echo "&lt;?php echo $var; ?&gt;"; </code></pre> <p>How can I make it simply output:</p> <pre><code>This is a $variable &lt;?php echo $var; ?&gt; </code></pre> <p>Instead of trying to parse the variables?</p>
php
[2]
4,930,425
4,930,426
C# - Input string was not in a correct format
<p>I am working on a simple windows forms application that the user enters a string with delimiters and I parse the string and only get the variables out of the string. So for example if the user enters: </p> <pre><code>2X + 5Y + z^3 </code></pre> <p>I extract the values 2,5 and 3 from the "equation" and simply add them together.</p> <p>This is how I get the integer values from a string.</p> <pre><code>int thirdValue string temp; temp = Regex.Match(variables[3], @"\d+").Value thirdValue = int.Parse(temp); </code></pre> <p>"variables" is just an array of strings I use to store strings after parsing.</p> <p>However, I get an error saying, "Input string was not in a correct format" when I run the application.</p>
c#
[0]
2,174,781
2,174,782
How to increment the string value during run time without using dr.read() and store it in the oledb db?
<p>Here is my code, everything is working fine the only problem is with the ReadData() method in which i want the string value to be increment i.e AM0001,AM0002,AM0003 etc. This is happening till the execution of the program once i stop the execution of program, the second time when i run the program the same value i.e AM0001 is getting return. Due to this i am getting a error from oledb because of AM0001 is a primary key field.</p> <p>enter code here:</p> <p>class Jewellery : Connectionstr {</p> <pre><code> string lmcode; public string LM_code { get { return lmcode;} set { lmcode = ReadData();} } string mname; public string M_Name { get { return mname; } set { mname = value;} } string desc; public string Desc { get { return desc; } set { desc = value; } } public string ReadData() { string jid = string.Empty; string displayString = string.Empty; String query = "select max(LM_code)from Master_Accounts"; Datamanager.RunExecuteReader(Constr,query); jid = LM_code;// this is working on first execution, the second time when i run the program the value null defined in LM_code. if (string.IsNullOrEmpty(jid)) { jid = "AM0000";//This string value has to increment at every time, but it is getting increment only one time. } int len = jid.Length; string split = jid.Substring(2, len - 2); int num = Convert.ToInt32(split); num++; displayString = jid.Substring(0, 2) + num.ToString("0000"); return displayString; } public void add() { String query ="insert into Master_Accounts values ('" + LM_code + "','" + M_Name + "','" + Desc + "')"; Datamanager.RunExecuteNonQuery(Constr , query); } </code></pre> <p>Any help will be appreciated.</p>
c#
[0]
3,387,319
3,387,320
Behavior of delete operator in javascript
<p>It seems in JavaScript you can’t <code>delete</code> function arguments but you can <code>delete</code> global variables from a function.</p> <p>Why this behavior?</p> <pre><code>var y = 1; (function (x) { return delete y; })(1); // true (function (x) { return delete x; })(1); // false </code></pre>
javascript
[3]
693,990
693,991
Math.max and Math.min outputting highest and lowest values allowed
<p>so I'm trying to make a program that will output the sum, average, and smallest and largest values. I have everything basically figured out except the smallest and largest values are outputting 2147483647 and -2147483647, which I believe are the absolute smallest and largest values that Java will compute. Anyway, I want to compute the numbers that a user enters, so this obviously isn't correct.</p> <p>Here is my class. I assume something is going wrong in the addValue method.</p> <pre><code>public class DataSet { private int sum; private int count; private int largest; private int smallest; private double average; public DataSet() { sum = 0; count = 0; largest = Integer.MAX_VALUE; smallest = Integer.MIN_VALUE; average = 0; } public void addValue(int x) { count++; sum = sum + x; largest = Math.max(x, largest); smallest = Math.min(x, smallest); } public int getSum() { return sum; } public double getAverage() { average = sum / count; return average; } public int getCount() { return count; } public int getLargest() { return largest; } public int getSmallest() { return smallest; } } </code></pre> <p>And here is my tester class for this project:</p> <pre><code> public class DataSetTester { public static void main(String[] arg) { DataSet ds = new DataSet(); ds.addValue(13); ds.addValue(-2); ds.addValue(3); ds.addValue(0); System.out.println("Count: " + ds.getCount()); System.out.println("Sum: " + ds.getSum()); System.out.println("Average: " + ds.getAverage()); System.out.println("Smallest: " + ds.getSmallest()); System.out.println("Largest: " + ds.getLargest()); } } </code></pre> <p>Everything outputs correctly (count, sum, average) except the smallest and largest numbers. If anyone could point me in the right direction of what I'm doing wrong, that would be great. Thanks.</p>
java
[1]
2,568,345
2,568,346
What's the best way to retrieve the position of an element relative to one of its ancestors?
<p>I have a td inside a table. </p> <p>What's the best way to get its position relative to the table?</p> <p>Should I be using offset, position or something else?</p>
jquery
[5]
1,245,777
1,245,778
How can I only allow access to webpage at certain times of day?
<p>I am creating a website in which people order takeaways online. How can I only allow access to webpage at certain times of day? e.g. 5pm - 12pm etc...</p> <p><strong>Update:</strong></p> <p>I have figured out a solution which works with number of answers:</p> <pre><code>&lt;?php if (date('G')&gt;17) { header('Location: /closed.php'); exit(); } ?&gt; </code></pre>
php
[2]
5,521,508
5,521,509
apktool decompiler missing xml files in res folder
<p>I am using apktool to decompile the apk to get the res file. I downloaded the apktool and used command (apktool –d myapp.apk), it is extracting the res file but in value folder some xml files are missing.Please let me know the solution.Thanks..</p>
android
[4]
3,407,995
3,407,996
Long Running task in android
<p>I want to do long running task, But if I use Activity or Service then it gives Timeout </p> <p>exception, and if I use <strong>doInBackground(Context... params)</strong> which uses <strong>AsyncTask</strong> class </p> <p>But i want to do syncronse task</p> <p>plz help if there is any other better alternate for this</p>
android
[4]
3,159,230
3,159,231
How do i get a href value from a link inside li list?
<p>Here is a <a href="http://jsfiddle.net/nLyqA/" rel="nofollow"><strong>Fiddle</strong></a></p> <p>I want to get the <code>href</code> attribute, I use <code>$(this).attr('href')</code> but it does not work!</p> <p><strong>HTML</strong> : </p> <pre><code>&lt;div class="wrap_atletas_interno"&gt; &lt;ul&gt; &lt;li class="atleta"&gt; &lt;a href="teste.html"&gt; &lt;div class="nome_86_atleta"&gt;Antônio&lt;/div&gt; &lt;img src="atletas/antonio_86px.jpg" /&gt; &lt;/a&gt; &lt;/li&gt; &lt;li class="atleta"&gt; &lt;div class="nome_86_atleta"&gt;Cauê&lt;/div&gt; &lt;img src="atletas/caue_86px.jpg" /&gt; &lt;/li&gt; &lt;li class="atleta"&gt; &lt;div class="nome_86_atleta"&gt;Dudu&lt;/div&gt; &lt;img src="atletas/dudu_86px.jpg" /&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <p><strong>JavaScript</strong> :</p> <pre><code>$('.atleta').click(function (e) { e.preventDefault(); $('.atleta').removeClass('atleta_atual'); $(this).addClass('atleta_atual'); var h = $(this).attr('href'); alert(h); $.get(h, function (data) { //$(".detalhes_atleta").html(data).fadeIn("slow"); alert(h); }); }); </code></pre>
jquery
[5]
3,436,693
3,436,694
C# How does the MailAddress constructor validate mail addresses
<p>In reading about what would be the best way to validate a mail address via regular expressions, I came across with an attempt to validate with</p> <pre><code>try { new MailAddress(input); } catch (Exception ex) { // invalid } </code></pre> <p>What method does the <code>MailAddress</code> class use to ensure a mail address is valid?</p>
c#
[0]
2,441,127
2,441,128
"Simply Javascript" Question
<p>Im new to javascript. I've been learning for about a month and am currently reading the Simply Javascript book by Kevin Yank and Cameron Adams. </p> <p>The fist few chapters started out really well but the book got really difficult in the chapter about events. They go on about the problems with events listeners and say here just use these functions we made to make it easier. </p> <p>Im just wondering whether this is good advice should I just use their functions without really understanding how they are working, and should just try and plug through this chapter and hope that the next topics are a bit easier to understand. </p> <p>If anyone has some other advice on where to start learning or some exercises I could do that would be great aswell. </p> <p>Thanks</p>
javascript
[3]
806,909
806,910
How to setup a virtual server?
<p>I want to create a website on my PC but the PHP wont work. </p> <p>Is there any software that will allow me to simulate a server on my PC in order to get this (the website) done?</p>
php
[2]
3,594,515
3,594,516
Best way to access variables unique to derived class through container of baseclass
<p>So I have a vector of pointers to baseclass, which is used to hold all instances of derived classes.</p> <p>Base class:</p> <pre><code>#ifndef BASE_H #define BASE_H Class Base { public: virtual void DoSomething(); }; #endif </code></pre> <p>A derived class:</p> <pre><code>#ifndef DERIVED_H #define DERIVED_H #include "base.h" Class Derived : public Base { public: void DoSomething(); float y; }; #endif </code></pre> <p>With these things being stored inside:</p> <pre><code>std::vector&lt;Base*&gt; theVec; </code></pre> <p>The question being, what is the best way to access the float variable "y" that exists only in Derived?</p> <p>I could have a virtual function in Base that is specified in Derived to return a variable, where access looks like:</p> <pre><code>theVec[0]-&gt;GetVar("y"); </code></pre> <p>but when Derived is likely to have multiple variables of different types that are not in base this seems like it will end up being quite messy. Are there any ways to make access to a unique variable in Derived more generic? </p> <p>Any suggestions would be greatly appreciated!</p>
c++
[6]
2,008,380
2,008,381
How to overload a destructor?
<p>How do I overload a destructor?</p>
c++
[6]
1,508,330
1,508,331
Event Raise on Service
<p>Think I have a service that play musics , Also I have an actvity that bind to this service , I want when this service started a new music , raise an event and Activity shows a toast , how can I do this , like here </p> <pre><code>Service service = new se... BindToService(); service.OnMediaPlayerStarted(new Event( public void run() { }; )); </code></pre> <p>I want to craete a custom event like MediaPlayerStarted and when </p>
android
[4]
1,562,168
1,562,169
406 error in the Java code
<p>i am writing java code for calling REST API's .</p> <p>i am getting 406 error with the following code</p> <pre><code> public List&lt;BlogBean&gt; view_blogsbytagXml(String tag,String limit) { final String VIEW_BLOGSBYTAG1="api/blogs/tag/"+tag+".xml?limit="+limit+""; return webResource.path(VIEW_BLOGSBYTAG1).header(ConfigurationUtil.AUTHENTICATION_HEADER, authentication) .accept(MediaType.APPLICATION_XML_TYPE).get(new GenericType&lt;List&lt;BlogBean&gt;&gt;(){}); } </code></pre> <p>The connections are , private final WebResource webResource; private final String authentication;</p> <pre><code>authentication = ConfigurationUtil.getAuthenticationKey(); ClientConfig config = new DefaultClientConfig(); Client client = Client.create(config); webResource = client.resource(ConfigurationUtil.BaseURI); </code></pre> <p>i am getting 406 error in the above code</p> <p>but when i gave the String as</p> <pre><code> final String VIEW_BLOGSBYTAG="api/blogs/tag/"+tag+".xml"; </code></pre> <p>it doesnt show the error for me .. </p>
java
[1]
1,103,275
1,103,276
Embedding HTML tags into ASP.Net page
<p>I am trying to convert a few old ASP pages to ASP.Net and have run into a problem. In one of the pages, the previous coder set up a way to list items from a database that a user searches for using HTML tags. I know that in ASP HTML can be distinguished in functions by using the &lt;% operator. I was wondering: is there anything like this in ASP.Net that I can use to set up the same listing capabilities?</p>
asp.net
[9]
461,554
461,555
Horizontal Scroll View
<p>I have a horizontal scroll view, and inside I have a number of image views, they go across the screen and altogether are wider than the screen.</p> <p>I've tried to scroll through them using touch, but nothing happens, am I missing something?</p>
android
[4]
2,788,978
2,788,979
Javascript $ reference error
<p>I am new to Javascript and jQuery and I am the code below is from Jquery and Javascript. My problem is that when I run this code, I am getting an error in my error console which says : </p> <pre><code>ReferenceError: $ is not defined. </code></pre> <p>I have no idea why it is not recognizing the $ sign. </p> <pre><code> &lt;link href="../_css/site.css" rel="stylesheet"&gt; &lt;script src="../_js/jquery-1.7.2.min.js"&gt;&lt;/script&gt; &lt;script&gt; $(document).ready(function() { $('body').hide().fadeIn(3000); }); &lt;/script&gt; &lt;/head&gt; </code></pre>
javascript
[3]
3,599,012
3,599,013
Resource id # 4 php
<p>everytime i try and add one to the second column of a certain name, it changes the value to 5, if i echo my event it says it is equal to resource id #4. Anyone have any fixes?</p> <pre><code>&lt;form action="new.php" method="POST"&gt; &lt;input type="text" name="input_value"&gt; &lt;br /&gt; &lt;input name="new_User" type="submit" value="Add to Users"&gt; &lt;input type="submit" name="event_Up" value="Attended Event"&gt; &lt;?php //Connect to Database mysql_connect("localhost", "root", ""); //If Add New user butten is clicked execute if (isset($_POST['new_User'])) { $username = $_POST['input_value']; $make = "INSERT INTO `my_db`.`profile` (`Name`, `Events`) VALUES ('$username', '1')"; mysql_query($make); } //If Event up is pushed then add one if (isset($_POST['event_Up'])) { $username = $_POST['input_value']; $event = mysql_query("SELECT 'Events' FROM `my_db`.`profile` WHERE Name ='$username'"); $newEvent = $event +1; $update = "UPDATE `my_db`.`profile` SET Events = '$newEvent' WHERE Name = '$username'"; mysql_query($update); } //Print Table $data = mysql_query("SELECT * FROM `my_db`.`profile`"); Print "&lt;table border cellpadding=4&gt;"; while($info = mysql_fetch_array($data)) { Print "&lt;tr&gt;"; Print "&lt;th&gt;Name:&lt;/th&gt; &lt;td&gt; ".$info['Name'] . "&lt;/td&gt;"; Print "&lt;th&gt;Events:&lt;/th&gt; &lt;td&gt;".$info['Events'] . " &lt;/td&gt;"; } Print "&lt;/table&gt;"; ?&gt; </code></pre>
php
[2]
2,861,032
2,861,033
amember help getting username
<p>Hi eveyone when a user logs in they are taken to a page where they can play mp3 and download them but for the user can download a mp3 my script checks a data base for the download limit all users start off with 5 downloads per month .I need amember to store the logged in user name to a variable so that mysql knows where to look </p> <pre><code>$q=mysql_query("UPDATE downloads SET mdr = '4' WHERE username = '$y'"); </code></pre>
php
[2]
586,530
586,531
How to launch a Android Service when the app launches?
<p>I'm still fresh to Android and Id think the below config works for launching my service when the app launches.</p> <pre><code> &lt;service android:name=".PlaylistUpdaterService"&gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;/service&gt; </code></pre> <p>But this is not the case. What did I miss?</p>
android
[4]
448,087
448,088
writing into a text file line by line
<p>I am writing a text into a file..I am getting a column from database and stored it in a string and writing it in a text file....That column contains c# code and it is writing like a single line with small squares for next line(space)...i need to write it line by line...Here is my code...</p> <pre><code>using (var dest = File.AppendText(Path.Combine(_logFolderPath, "a.txt"))) { dest.WriteLine(line.TrimStart()); } </code></pre> <p>Any suggestion?? </p>
c#
[0]
5,036,264
5,036,265
formal Concept Analysis Tool
<p>i need an Open source FCA ( formal Concept Analysis) Tool build by .net ( will be great if C# with any version)</p> <p>i currently used conexp 1.3 ( java one ) but im not good in Java as a Programming language.</p> <p>so any body know ? </p>
c#
[0]
5,967,719
5,967,720
Java Huge data store
<p>I have a requirement to store huge amount of data in Java/collection API. Which would be suitable for that Array or Arraylist. And why</p>
java
[1]
5,373,907
5,373,908
How to keep center item of listview with one color always while scrolls in android
<p>i have a listview. the center item of list should be in diff color.when scrolls.,the items comes at that particular position should change that color &amp; contin. back to original colr after cross that position. do u know how it is?</p>
android
[4]
5,806,956
5,806,957
How to make integrated Barcode Scanner Android working properly
<p>I currently develop a bookmarking application. So I used the zxing project to scan the ISBN, however I don't know why after integrating the scanner it seems not working well. Sometimes, it catch well the barcode, but when I repeat it takes long time and gets wrong number. It seems odd to compare with this app <a href="https://play.google.com/store/apps/details?id=com.mobiloucos.bookmark&amp;feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5tb2JpbG91Y29zLmJvb2ttYXJrIl0." rel="nofollow">Reading Progress</a>. The application also request user to download an external Barcode Scanner from xzing, and it works very well. So did I integrate the Barcode Scanner in wrong way (Im not using zxing as a lib). </p> <p>This is my code:</p> <pre><code> public void scan(View view) { Intent intent = new Intent("com.google.zxing.client.android.SCAN"); intent.putExtra("SCAN_MODE", "ISBN"); startActivityForResult(intent, 0); } public void onActivityResult(int requestCode, int resultCode, Intent intent) { if (requestCode == 0) { if (resultCode == RESULT_OK) { String isbn = intent.getStringExtra("SCAN_RESULT"); Intent i = new Intent(MainActivity.this, ResultActivity.class); i.putExtra("isbn", isbn); startActivity(i); } else if (resultCode == RESULT_CANCELED) { Toast.makeText(this, "You messed up", Toast.LENGTH_SHORT).show(); } } } </code></pre> <p>I used the mode "QR_CODE_MODE" but it even doesn't work at all so I change to ISBN mode</p>
android
[4]
1,371,484
1,371,485
JQuery anonymous function not firing
<p>JQuery newbie. </p> <p>With this code the alert for '2' works, but never the alert '1'. I can switch around the order and get the same result, and JQuery must be loaded otherwise neither would work. So whats the problem with the declaration of the anonymous function?</p> <pre><code> &lt;script type="text/javascript"&gt; $(document).ready(function () { alert('1'); }); $(document).ready( alert('2') ); &lt;/script&gt; </code></pre>
jquery
[5]
4,089,022
4,089,023
AppendTo does not work as desired
<p>When I say, <code>msg.appendTo(ele.parent().next())</code>, the msg successfully gets appended to a <code>&lt;p&gt; with class=foo</code></p> <p>How can I specify it explicitly in the statement?</p> <p>I tried <code>msg.appendTo(ele.parent().next().find('.foo'));</code></p> <p>but it doesn't work</p>
jquery
[5]
3,534,774
3,534,775
how to debug navit
<p>I have a sourcecode from navit and want to expand one function and install it on samsung galaxy tab, but I have no idee how to debug it on my notebook. I can use ms visual studio or eclipse as IDE. Could someone please help me?</p>
android
[4]
829,471
829,472
Putting the system to sleep on Android
<p>I'm developing an application for Android 1.6 and newer which contains a functionality that switches the phone to sleep.</p> <p>I tried to find a way of how to do that and I found the <strong>goToSleep</strong> method in the <strong>PowerManager</strong> class, but unfortunately the usage of that method requires <strong>android.permission.DEVICE_POWER</strong> permission which is a system level permission allowed only for system apps only.</p> <p>Does anybody know an alternative way of forcing the phone to go into sleep mode or how to sign an application to gain the above mentioned permission and to allow the usage of the <strong>goToSleep</strong> method? Thank you!</p>
android
[4]
2,931,567
2,931,568
How to show a image background when button is scelected or clicked
<p>i have this code in the button click to show selection image when the button is clicked</p> <pre><code> UIImage *img1 = [UIImage imageNamed:@"settingpress.png"]; [_btnclick setImage:img1 forState:(UIControlStateHighlighted+UIControlStateSelected)]; [img1 release]; </code></pre> <p>but i didn't get the image ,my button is a UIButton in xib with custom button not the Roundrect.what is the error in my code. thanks in advance.</p>
iphone
[8]
124,137
124,138
Why might the "fatal error C1001" error occur intermittently when using msbuild?
<p>Possibly related to my last question (note: different error code):</p> <ul> <li><a href="http://stackoverflow.com/questions/4371556/why-might-the-fatal-error-c1075-error-occur-intermittently-when-using-msbuild">Why might the "fatal error C1075" error occur intermittently when using msbuild?</a></li> </ul> <p>On our nightly 64-bit build, we see this error appear intermittently:</p> <pre><code>Generating Code... c:\program files\microsoft visual studio 9.0\vc\include\xtree(944) : fatal error C1001: An internal error has occurred in the compiler. (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c[0x51120030:0x000E00AB]', line 182) To work around this problem, try simplifying or changing the program near the locations listed above. Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information Internal Compiler Error in c:\Program Files\Microsoft Visual Studio 9.0\VC\bin\x86_amd64\cl.exe. You will be prompted to send an error report to Microsoft later. Build log was saved at "file://c:\Buildbot\synergy\1.4-win64\build\bin\synergy.dir\Release\BuildLog.htm" </code></pre> <p>See <a href="http://pastebin.com/zMMzFfFt" rel="nofollow">full log output</a>. </p> <p>I get the feeling that this error will be much harder to solve (if this is even possible) than the error from my last question, since it could be a bug in the compiler (but I'm hoping this isn't the case).</p> <p>Is there anything that can be done to work around this problem? Maybe there's a hotfix that I can't find? Perhaps I should just contact Microsoft through connect?</p>
c++
[6]
4,178,383
4,178,384
Hide Div on Window Maximize & Resize > 1600px - JQuery
<p>How would I hide a HTML div when the browser window is either maximized or resized greater then 1600px using jquery?</p> <p>I currently have it set so the div hides when the page is greater then 1600px on load but cannot get it to hide when the window is maximized or resized after the page has loaded. Below is the code I have used:</p> <pre><code>if ($(window).width() &gt; 1600) { $('#next').hide(); $('#back').hide(); } </code></pre> <p>Any help would be greatly appreciated.</p> <pre><code>$(window).bind('resize', function(){ if ($(window).width() &gt; 1600) { $('#next').fadeOut(); } else { $('#next').fadeIn(); } }); </code></pre>
jquery
[5]
4,535,812
4,535,813
PyRun_InteractiveLoop globals/locals
<p>I am trying to set local/globals variables in PyRun_InteractiveLoop call. Cant figure out how to do it, since, unlike exec counterparts, loop doesn't accept global/local args.</p> <p>What am I missing? </p>
python
[7]
267,525
267,526
purpose of this javascript test function
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/3911690/question-on-this-javascript-syntax-what-does-this-do">Question on this JavaScript Syntax (&ldquo;What Does This Do?&rdquo;)</a> </p> </blockquote> <p>what is the purpose of this line of code: <code>/xyz/.test(function(){xyz;})</code>. I have seen it in many pieces of code, but never understood why it's there. What's its purpose? I know that it's a regex function and returns a boolean based on if a match was found.</p>
javascript
[3]
6,016,842
6,016,843
Reading and writing pickles to an encoded stream
<p>A file format commonly used in our system is base64 encoded pickles - at the moment I can translate to and from strings in this trivial format with some simple code like this:</p> <pre><code>def dumps( objinput ): """ Return an encoded cPickle """ return cpickle_dumps( objinput ).encode( ENCODING ) def loads( strinput ): """ Return an object from an encoded cpickle """ return cpickle_loads( strinput.decode( ENCODING ) ) </code></pre> <p>I'd like to implement a new function, called "load" which works much like the standard pickle load function except that it will read just enough bytes from a stream and then return the decoded object. The trick here is to read just enough bytes - the cPickle.load function does this, it pops bytes off the stream until the pickled data is complete. My new function needs to look like this:</p> <pre><code>def load( stream_input ): """" Return just one object popped from the stream. If the stream has ended, raise an exception Do not over-read the stream. </code></pre> <p>How might I do this when the data is base64 encoded pickle? The difficulty here seems to be that it's not obvious that this can be done either by wrapping the cPickle.load function or by wrapping the input stream, an additional difficulty is that what may be one-byte of pickle data may be encoded to more than one byte of base64 so it's not clear how to adapt stream_input.read(n) into something which is guaranteed to return n bytes of decoded data when the encoded input stream is base64.</p>
python
[7]
286,823
286,824
inserting data into MYSQL database using python
<p>I am trying to insert data into MYSQL database using a python script and when i execute my program i get an error "Not enough arguments for format string" at the following line.</p> <pre><code>_cursor.execute("INSERT INTO `md_patentinfo` (patentno, filed) VALUES ('%s',STR_TO_DATE('%s','%M %d,%Y'))" %(patent_number,issue_date)) </code></pre> <p><strong>MORE INFO ON THE ABOVE LINE :</strong> in the above line i am inserting <code>patent number</code> and <code>Issue date</code> into my table and i am using the <code>STR_TO_DATE</code> to convert the date value in <code>%B %d,%Y</code> format to <code>%M,%d,%Y</code>.</p> <p>Please help me out</p>
python
[7]
556,636
556,637
Executing function at specified time
<p>I want to execute some code at 12 o clock everyday. The only way I can think todo this is to</p> <ol> <li>sleep until 12 o clock </li> <li>execute code</li> <li>sleep 24 hours (minus time takes to run code) </li> <li>goto 2</li> </ol> <p>Is there a built in API I could use to schedule events like this?</p> <p><em>I cannot use cron jobs or anything similar, this must be in a python script</em></p>
python
[7]
5,730,588
5,730,589
No "Distribution Provisioning Profiles" tab
<p>Today under developer.apple.com member center > iOS Provisioning Portal > Provisioning menu when clicked only brings up the "Development Provisioning Profiles" it has to "Distribution Provisioning Profiles" ! Any idea why this is so? Any change in the way we need to create "Distribution Provisioning Profiles"</p>
iphone
[8]
4,106,437
4,106,438
How does the load() function allow the user to provide a callback?
<p>In javascript it's very popular for libraries/frameworks to let us define a callback function for post-processing of data.</p> <p>eg.</p> <pre><code>load("5", function(element) { alert(element.name); }); </code></pre> <p>I wonder how the load() function looks like to be able to let the user provide a callback?</p> <p>Are there good tutorials for this?</p>
javascript
[3]
4,530,465
4,530,466
How to retrieve class names of all child elements at multiple level in jquery?
<p>I want to retrieve class names of child elements at multiple level. I'm trying following, but it only gives the class names of rear child elements. What am I doing wrong ?</p> <pre><code> &lt;script type="text/javascript"&gt; $(document).ready(function(){ thisP=$("#myParagraph"); getChildStyles(thisP); //function function getChildStyles(thisobj) { var classNames; var classNames1; $(thisobj).children().each(function(){ classNames+=$(this).attr('class'); if($(this).children().length&gt;0) { classNames1+=getChildStyles($(this)); } classNames+=classNames1; }); return classNames; } }); &lt;/script&gt; </code></pre> <p>And the HTML, </p> <pre><code> &lt;ul id="myParagraph" class"mainUL"&gt; &lt;li id="LIOne"&gt;ksjdfhsdf&lt;/li&gt; &lt;li id="LITwo"&gt;skdjfkdsf&lt;span class"span1Class"&gt;&lt;span class="span2class"&gt;&lt;/span&gt; &lt;/span&gt;&lt;/li&gt; &lt;li id="LIThree" class="thirdLIClass"&gt;edroiutret&lt;/li&gt; &lt;/ul&gt; </code></pre>
jquery
[5]
3,294,540
3,294,541
Change checkbox values on button click
<p>I have a tableview with all cells having a button each. Each button is designed as a checkbox and has the functionalities of checkbox. I have a toolbar in the same view, and on the click of a toolbar button I need to change the value of all the checkboxes in the table. Right now I am not able to find a solution for this. Any help will be appreciated. Thanks.</p>
iphone
[8]
5,136,828
5,136,829
binding dropdownlist in repeater's item template using an sql datasource
<p>We are having some performance issues with a page and I wanted to ask about this. If I have a repeater and in the itemtemplate of the repeater I have a dropdownlist bound to an sql datasource, will that selectcommand be called once per each item even though the same result is returned each time? If so, as a quick fix, would enable caching set to true and a cache duration specified ensure that that query is run only once per page life cycle? I know I should be using object datasource, but I want to try to fix this quickly for now. Thanks in advance.</p>
asp.net
[9]
1,559,878
1,559,879
Idiomatic way to print arbitrary number of items from a list on each line
<p>I want to print data from a list, such as:</p> <pre><code>['0.10', '0.15', '-0.25', '0.30', '1.50', '1.70'] </code></pre> <p>However, rather than printing one element in the list using something like:</p> <pre><code>for item in list: print item </code></pre> <p>I want to print an arbitrary number of items from the list on each line. I can think of many messy ways to do it and I saw an answer which used the grouper recipe from the itertools page on the docs. I'm happy to use that, but I suspect there might be a better way of doing it.</p> <p>An example output I might like would be:</p> <pre><code>0.10 0.15 -0.25 0.30 1.50 1.70 </code></pre> <p>Or:</p> <pre><code>0.10 0.15 -0.25 0.30 1.50 1.70 </code></pre> <p>So the number of items on each line isn't necessarily a factor of the number of items on the list. Some lines may end with fewer elements if the list is too short.</p>
python
[7]
5,256,474
5,256,475
Convert array to have specific keys which have prefix "suf_"
<p>I have an associative array. In this array some keys have prefix "suf_". how I create a new array with these suffixed key and value? see the example below</p> <pre><code>Array ( [buildings_sum] =&gt; [accidental_damage] =&gt; 0 [landslip_cover] =&gt; 0 [loss_of_rent] =&gt; [loss_period] =&gt; [contents_sum] =&gt; [suf_household_contents_sum] =&gt; [damage_cover] =&gt; 0 [suf_tobacco_stock_sum] =&gt; [stock_sum] =&gt; [suf_buisness_interruption] =&gt; gb [suf_buisness_interruption_indemnity] =&gt; 24 Months [suf_increased_cost] =&gt; vb [suf_increased_cost_indemnity] =&gt; 24 Months [employer_liability] =&gt; 0 [liability_sum] =&gt; 2000000 [property_owner_liability] =&gt; 1000000 [goods_sum] =&gt; hvb [freezer_stock] =&gt; bv [money_night_safe] =&gt; vb [money_locked_safe] =&gt; bv [money_not_locked_safe] =&gt; cv [private_dwelling_money] =&gt; fcv [suf_change_machine_money] =&gt; cfv [suf_gaming_machine_money] =&gt; 0 [personal_accident] =&gt; cfv [glass] =&gt; cv [book_debts] =&gt; cv [suf_cover_guest] =&gt; 0 [terrorism_cover] =&gt; 0 [legal_expenses_cover] =&gt; 0 [loss_of_licence] =&gt; 0 [risks_cover] =&gt; 0 [voluntary_excess] =&gt; 250 [compulsory_excess] =&gt; h ) </code></pre>
php
[2]
1,120,419
1,120,420
How to determine which code is faster?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/111368/how-do-you-performance-test-javascript-code">How do you performance test JavaScript code?</a> </p> </blockquote> <p>I am currently trying to learn some JavaScript using js-assessment, which can be found here: <a href="https://github.com/rmurphey/js-assessment" rel="nofollow">https://github.com/rmurphey/js-assessment</a>.</p> <p>I have written the following code, which let's you find duplicates in an array:</p> <pre><code>function duplicatesInArray(arr) { var test; var res = []; for (var i = 0; arr[i]; i++) { test = arr[i]; for (var j = i + 1 ; arr[j]; j++) { if(arr[j] === test) { res.push(arr[j]); break; } } } return res; } </code></pre> <p>Which works fine, but here's an anwser I've found on github (it works too):</p> <pre><code>function anotherDuplicatesInArray(arr) { var seen = {}; var dupes = []; for (var i = 0, len = arr.length; i &lt; len; i++) { seen[arr[i]] = seen[arr[i]] ? seen[arr[i]] + 1 : 1; } for (var item in seen) { if (seen.hasOwnProperty(item) &amp;&amp; seen[item] &gt; 1) { dupes.push(item); } } return dupes; } </code></pre> <p>My question is: how can I test which code is better?</p>
javascript
[3]
585,911
585,912
How to get a picture from url site and store it to device?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/3296850/android-how-to-store-images-from-url-save-it-in-sd-card">Android: How to store images from url &amp; save it in SD card</a> </p> </blockquote> <p>I parse a xml file from web</p> <p>and it has a picture url like this: <a href="http://xxxxxx.jpg" rel="nofollow">http://xxxxxx.jpg</a></p> <p>then I use a </p> <blockquote> <p>private String url_picture = "http://xxxxx.jpg";</p> </blockquote> <p>I want to store the picture in to the device</p> <p>How can I do?</p>
android
[4]
2,202,610
2,202,611
Jquery Drop Down Box Click Outside
<p>I am trying to make it so when i click outside the box the box scrolls up but i cant manage to get that done.</p> <p><a href="http://jsfiddle.net/t9hq9/19/" rel="nofollow">http://jsfiddle.net/t9hq9/19/</a></p> <pre><code> &lt;style type='text/css'&gt; #content { width: 400px; border-left: 10px solid #FA802F; border-right: 10px solid #FA802F; text-align: center; padding: 100px 0px 100px 0px; display: none; } #bottom{ width: 420px; height: 100px; background-color: #FA802F; -webkit-border-bottom-left-radius: 50px; -moz-border-bottom-left-radius: 50px; border-bottom-left-radius: 100px; -webkit-border-bottom-right-radius: 50px; -moz-border-bottom-right-radius: 50px; border-bottom-right-radius: 100px; } &lt;/style&gt; &lt;script type='text/javascript'&gt;//&lt;![CDATA[ $(window).load(function(){ $('#bottom').toggle( function() { $('#content').slideDown(); }, function() { $('#content').slideUp(); }); });//]]&gt; &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="content"&gt;CONTENT&lt;/div&gt; &lt;div id="bottom"&gt;&lt;/div&gt; &lt;/body&gt; </code></pre>
jquery
[5]
5,485,761
5,485,762
Functions defined on a object within a prototype
<p>I'm trying to define functions on a object within a prototype like in this example:</p> <pre><code>function Particle = { this.calculate.x = 0; } Particle.prototype.calculate.calculateX = function() { //do calculation } var particle - new Particle(); </code></pre> <p>If I explore particle in the browser console the 'calculate' object is visible but without any of the functions defined on it.</p> <p>What am I missing? Is it even possible to define an object prototype in this way?</p> <p>Cheers!</p>
javascript
[3]
552,563
552,564
A JavaScript language problem
<p>In the following example</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;meta charset="utf-8"&gt; &lt;title&gt;Untitled Document&lt;/title&gt; &lt;script&gt; var str = '11'; str = str++; alert(str); // 11 &lt;/script&gt; </code></pre> <p>why is the result <code>11</code> and not <code>12</code>?</p> <p>In this example the result is <code>12</code>:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;meta charset="utf-8"&gt; &lt;title&gt;Untitled Document&lt;/title&gt; &lt;script&gt; var str = '11'; str++; alert(str); // 12 &lt;/script&gt; </code></pre> <p>Why is this so?</p> <p>Thank you!</p> <hr> <pre><code>var str = 10; var re = str++; alert(re); // 10 alert(str); // 11 </code></pre> <p><code>str</code> will return 10 to <code>re</code> first, and then increments <code>str</code> itself to 11.</p> <p>But</p> <pre><code>var str = 10; var str = str++; alert(str); // 10 </code></pre> <p>In this case, <code>str</code> return 10 to <code>str</code> first, and then <code>str</code> should increments <code>str</code> itself to 11.</p> <p>But it doesn't. Can anyone explain this?</p> <p>Thank you!</p>
javascript
[3]
199,980
199,981
XCode4 : Changing BundleID
<p>I created an app which called say Foo in XCode. </p> <p>When I decided to publish this app, I wanted to name the app FooApp instead of Foo. So, that is the bundleID that was created.</p> <p>The problem now is that the bundle ID's in XCode vs. iTunesConnect do not match.</p> <p>I tried to edit info.plist but it seems to mess up my project and it will no longer run at all.</p> <p>Any suggestions?</p>
iphone
[8]
4,008,817
4,008,818
Loading images/videos on top of webpage's content
<p>I have seen several websites where an image shows up on top of everything else. What is this script/library called that helps you accomplish this?</p>
javascript
[3]
1,801,251
1,801,252
Design item template with xaml
<p>I have to design a calculator like interface. i'm utterly confused with how to do this.can any provide me with an insight? how to bind data with these buttons at runtime.?</p>
c#
[0]
1,079,173
1,079,174
Stepping through array with time delay
<p>I have tabs on my page each containing unique content. I want to automatically rotate the tabs and content without them being clicked upon. As soon as the page loads I want this function to begin using <code>window.onload = function()</code>.</p> <p>I have the following JavaScript array:</p> <pre><code>var HomeTabs = [1, 3, 5, 7, 9, 11] </code></pre> <p>I want to know how to show HomeTab 1 for 10 secs and then move to HomeTab 3 and then after 10 secs move to HomeTab 5 in that order, not random. when it gets to HomeTab 11 it then goes back to HomeTab 1 again.</p> <p>I have a script to change the tab which is <code>ChangeTab(1)</code>, where one is the number of the tab I want to show.</p>
javascript
[3]
4,920,769
4,920,770
I've error in getDefaultToolkit and CreateRobot() while building robot class in android as same as java for capturing screen?
<pre><code> Toolkit toolkit =Toolkit.getDefaultToolkit(); if (toolkit instanceof ComponentFactory) { peer = ((ComponentFactory)toolkit).createRobot(this, screen); } </code></pre> <p>In above code i've error in 1st and 3rd line.</p>
android
[4]
2,001,294
2,001,295
How can I include more than one Javascript file?
<p>I want to use more Javascript files on one canvas, but I can't connect them. For example I want to write a Javascript file that contains all functions and an other Javascript file which is using them.</p> <p>Show me a guide, how can I make this connection?</p> <p>Thanks.</p> <p>This is the first javascript file :</p> <pre><code>var canvas = null; var ctx = null; window.onload = function () { canvas = document.getElementById('myCanvas'); ctx = canvas.getContext('2d'); line (100,100,300,300); } </code></pre> <p>This is the secnond file:</p> <pre><code>function line (x1,y1,x2,y2) { ctx.beginPath(); ctx.moveTo(x1,y1); ctx.lineTo(x2,y2); ctx.stroke(); } </code></pre> <p>And this is my html file:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Tutorialok&lt;/title&gt; &lt;script type="text/javascript" src="CanvasElement.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="line.js"&gt;&lt;/script&gt; &lt;style&gt; #myCanvas { border: 1px solid #9C9898; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;canvas id="myCanvas" width="800" height="600"&gt; Sorry your browser Does not support canvas element! &lt;/canvas&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>The first file cant find the second files function.</p>
javascript
[3]
1,297,737
1,297,738
opening a html page on the client from server side
<p>On the server I receive xml from a webservice, I use xslt transformation on this xml to create a htm page. Now I need to show this htm page to the user by opening it in a new browser window. How do I achieve such functionality? My website is written in ASP.NET.</p> <p>I have tried using</p> <p>Response.Write(""); Response.Write("window.open('" + Server.MapPath("~/App_Data/HTMLPage.htm") + "','_blank')"); Response.Write("");</p> <p>But this throws me an access denied error.</p> <p>Thanks in advance. </p> <p>Chandrasekhar</p>
asp.net
[9]
367,190
367,191
displaying/adding to/removing from a list of items in asp.net?
<p>Users on my site can have any number of email addresses linked to their account. I'm making a page to do this. On page load, all the email addresses associated with a user are pulled from the database and displayed on the page. Then, the user should be able to add, edit and remove these emails.</p> <p>Lots of websites need to do this, so I thought there might be existing tools that provide this functionality. Do any of the existing Controls do something like this?</p> <p>I looked through the documentation, but there are lots of controls and it is hard to tell what it is possible to do with them.</p> <p>I could make my own implementation, but I hate to reinvent the wheel (and it feels like this is something people should need to do all the time.)</p> <p>Any suggestions?</p>
asp.net
[9]
4,584,472
4,584,473
How can I clear a timer when a variable is set to true?
<p>I'm just trying some JS animations, and I have animated a box that moves within borders, but I would like the animation to stop when the box hits one of the borders. This is one of the functions I use:</p> <pre><code>function AnimMoveRight() { var interval = setInterval("moveRight(10)", 40); if (hitRight == true) { clearInterval(interval); } } </code></pre> <p>The <code>moveRight(10)</code> changes the box'position for 10 pixels to the right. <code>hitRight</code> is set true when the box hits the right border. Well, obviously, this code doesn't work, it just keeps on looping the <code>moveRight()</code> function. Now, my question is, how do I cancel the interval from within the <code>AnimMoveRight()</code> function?</p>
javascript
[3]
4,945,797
4,945,798
How to show toolPopup for text longer than control (Textbox) length?
<p>Is there an easy way to say, on textboxHover, if the text inside the box or in other control isn't completely visible, have a popup tool come up showing the complete contents of the box? Just like <img src="http://i.stack.imgur.com/BBi9d.png" alt="enter image description here"></p>
c#
[0]
2,024,652
2,024,653
How to install a shared library to a non standard path in Android?
<p>I have a userspace driver that gets picked up by a daemon. The daemon looks for userspace drivers in a specific directory (system/foobar/drivers). How can i tell Android.mk to install the shared library into system/foobar/drivers instead of system/lib.</p>
android
[4]
4,651,765
4,651,766
Writing a specific line from one text file to other text file using c#
<p>I Am using sharp develop. I am making a Win App using C# . I want my program check a text file named test in drive c: and find the line which contains "=" and then write this line to other newly created text file in drive c: . </p>
c#
[0]
1,524,659
1,524,660
Overwrite entire object in place
<pre><code>x = something_mutable y = x z = x # sometime later make z reference something else, e.g. a list my_list = [1, 2, 3] # how to make x, y, z to reference my_list without using x and y explicitly ??? </code></pre> <p>Is it possible? Not really going to use it, but curious.</p> <p>Related question. How to erase the entire list/dictionary content and copy in place the entire content of another list/dictionary. I know how to do it, but curious how gurus would do it. Python is big and I just started learning it (trying hard no to code C in Python :)).</p> <p>Thanks.</p>
python
[7]
3,115,294
3,115,295
How to implement shoping cart application for iphone?
<p>I have implemented one iphone application in which i want to add shoping cart functionality.I have no idea about how to implement this functionality so please give me idea about that. I have seen ebay and amazon application in app store i want to implement that type of application.</p>
iphone
[8]
2,913,321
2,913,322
Python function confusion
<p>While programming with python I am often confused with the following ambiguity:</p> <p>should it be: function(a) or a.function(). Although the question is too general and can someone tell me which situation happens when?</p>
python
[7]
352,645
352,646
traceroute command not working in android
<p>I am trying to execute <code>traceroute</code> command following way:</p> <pre><code>Runtime r = Runtime.getRuntime(); Process p = r.exec("traceroute google.com"); BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream())); while ((inputLine = in.readLine()) != null) { Log.d(tag,inputLine); } </code></pre> <p>But it is giving me the following error:</p> <blockquote> <blockquote> <p>java.io.IOException: Error running exec().<br> Commands: [traceroute, 202.164.36.66]<br> Working Directory: null<br> Environment: null</p> </blockquote> </blockquote> <p>It works fine for <code>ping</code> or any other command of linux, please help.</p>
android
[4]
1,353,339
1,353,340
How to extract the title of a youtube video using python
<p>I want to extract the title,img thumb etc of a youtube video ? how can i do this in python </p>
python
[7]
1,504,591
1,504,592
jQuery add variable
<p>I found a script <a href="http://stackoverflow.com/a/10400225">here</a> that equalizes the height of divs in a row (bootstrap). How do you add 20 for instance to the new height it calculates?</p> <p>Here is the script and a jsFiddle: <a href="http://jsfiddle.net/MVP3C/" rel="nofollow">http://jsfiddle.net/MVP3C/</a></p> <pre><code>$('.well, .alert').height(function () { var h = _.max($(this).closest('.row').find('.well, .alert'), function (elem, index, list) { return $(elem).height(); }); return $(h).height(); }); </code></pre>
jquery
[5]
1,584,988
1,584,989
Object literals in javascript. How to access quoted "prop s" of object?
<p>In javascript tutorial I've see the next object definition:</p> <pre><code>var myObject = { validIdentifier: 123, 'some string': 456, 99999: 789 }; </code></pre> <p>What the purpose of such key-value pairs with quoted ones as keys? How one could operate with such values?</p>
javascript
[3]
242,740
242,741
How to parse a Double value from a scanner object in a loop and pass to a new Array?
<p>Ok, I'm a bit closer but still getting a few errors. Netbeans is telling me my loanArray is not initialized and that it can't find the readLine() method? Also, my attempt to close in my finally block is listing errors. Here's my code-</p> <pre><code>// generate 2 constants for use in the array lookup values. final int YEARS = 0; final int INTEREST = 1; //create the array double loanArray[][]; try{ FileReader readTerms = new FileReader ("MortgageTerms.txt"); BufferedReader loanTerms = new BufferedReader(readTerms); java.util.Scanner termScan = new Scanner(loanTerms); while(termScan.hasNext()){ for(int i=0;termScan != null; i++) loanArray [i][YEARS]= Integer.parseInt (termScan.readLine()); loanArray [i][INTEREST] = Double.parseDouble (termScan.readLine()); } } catch (FileNotFoundException e){ javax.swing.JOptionPane.showMessageDialog(null, "Error, File not found"); return; } catch (IOException ex){ javax.swing.JOptionPane.showMessageDialog(null, "There was an IO error"); return; } finally{ if (termScan!=null){ termScan.close(); } } </code></pre>
java
[1]
365,829
365,830
UIImagePickerControllerSourceTypeCamera problem
<p>How to open Camera in application like the default Camera application with photolibrary in botttom of it?</p>
iphone
[8]
1,875,506
1,875,507
What is the best possible way to pass a Mulitline String as function argument?
<p>What will be the Best practice to pass Multiline String as a Javascript function's argument.</p>
javascript
[3]
1,106,767
1,106,768
File Upload With Progress
<p>I know this has been discussed a number of times, but the problem I'm having at the moment is finding a solution that is easy to work with and does not require much hacking around.</p> <p>I want to be able to upload a file, and report on its progress. I've been playing with SWFUpload, and it seems like a bit to much messing around for my liking. Integrating it with code igniter just seems like it's going to cause headaches.</p> <p>I want a visual progress indicator of some sort to show the user their upload hasn't stagnated. Even if it was just a spinner saying "Uploading. Do not close this window until upload is complete." that would be enough for me.</p> <p>Security is the most important. Using something like SWFUpload is going to require passing variables to the upload form such as the user ID and other information I'd rather not give snooping noses the opportunity to sniff.</p> <p>Any possible solutions. Help is much appreciated.</p>
php
[2]
3,542,530
3,542,531
How to Get total missed call Value fron android Call log?
<p>I want to get Total number of missed call from Call log ,and to set that value in textView</p> <p>i Saw this code somewhere.. but i am not getting result </p> <p>public int getMissedCall(){ String[] projection = { CallLog.Calls.CACHED_NAME, CallLog.Calls.CACHED_NUMBER_LABEL, CallLog.Calls.TYPE }; String where = CallLog.Calls.TYPE+"="+CallLog.Calls.MISSED_TYPE;<br> Cursor c = this.getContentResolver().query(CallLog.Calls.CONTENT_URI, projection,where, null, null); c.moveToFirst();<br> return c.getCount(); }</p> <p>I want to get int value.So that that i can set that value in TextView Of my app..</p> <p>thanks</p>
android
[4]
3,886,622
3,886,623
i want to convert List<object> to ArrayList but not getting any output
<p>here is my code...</p> <pre><code>[WebMethod] public ArrayList GetDataByModuleName(string ModuleName) { ArrayList m = (ArrayList)BAL_GeneralService.GetDataByModuleName(ModuleName); return m; } </code></pre> <p>but not getting any output...</p>
asp.net
[9]
4,596,721
4,596,722
How can I execute some code 1 time when space bar is pressed and keeps being pressed in java
<p>I've been working on my game and now, my player needs to shoot. He does shoot but to decrease the ammo, it keeps decreasing as long as I hold the space bar. I'd like to know a code that lets me remove -1 ammo each time the spacebar is pressed and even if it's still pressed. Thanks, hope you answer me soon!</p>
java
[1]
651,089
651,090
How to create percentage image
<p>I am learning PHP and I just made a simple voting poll. It works and shows the percentage for each question (there are 3 questions in total), but I want also to show a bar that shows the percentage as well (so if the first question is 50% and the bar is 100px, the bar for that question should be 50px).</p> <p>Here are the vars that have the final number (percentage).</p> <blockquote> <p>$fr = round(($f / $total) * 100); $sr = round(($s / $total) * 100); $tr = round(($t / $total) * 100);</p> </blockquote>
php
[2]
2,386,289
2,386,290
Why won't this jQuery function perform properly?
<p>I'm a total noob when it comes to jQuery but I am trying to learn. What in tarnation am I doing wrong here?</p> <pre><code>function MakeCall(url) { var result; $.ajax({ url: url, dataType: "text", success: function(txt) { result = txt; return; } }); alert(result); return result; } </code></pre> <p>EDIT:</p> <p>ok, sorry about that bit of stupidity... i've fixed that part. now my problem is that the alert where it is now is returning "undefined", even though the result is getting set properly in the success function...</p> <p>Thanks so much...</p>
jquery
[5]
4,161,717
4,161,718
need help in contrast stretching
<p>i have found this formula and its description on a site</p> <pre><code>l(x,y)=(l(x,y)-min)(no of intensity levels/(max-min)) + initial intensity level </code></pre> <p>where, I( x,y ) represents the images, on the left side it represents the output image, while on the right side it represents the xth pixel in the yth column in the input image. In this equation the "min" and "max" are the minimum intensity value and the minimum intensity value in the current image. Here "no. of intensity levels" shows the total number of intensity values that can be assigned to a pixel. For example, normally in the gray-level images, the lowest possible intensity is 0, and the highest intensity value is 255. Thus "no. of intensity levels" is equal to 255.</p> <p>i have converted it into code, have i correctly converted it?</p> <pre><code>for(int y = 0; y &lt; bmp.bmHeight; y++) { for(int x = 0; x &lt; bmp.bmWidth; x++) { COLORREF rgb = dc.GetPixel(x, y); BYTE r = GetRValue(rgb); BYTE g = GetGValue(rgb); BYTE b = GetBValue(rgb); BYTE p,p1; if(r&lt;g) { p=r; p1=g; } else { p=g; p1=r; } if(b&lt;p) p=b; if(b&gt;p1) p1=b; BYTE bw = (RGB(r, g, b)-p); bw=bw*(255/(p1-p)); bw+=p1; dc.SetPixel(x, y, RGB(bw, bw, bw)); } </code></pre>
c++
[6]
105,172
105,173
ASP.NET get windows username outside of page
<p>I have an Existing ASP.NET reporting application using windows authentication. A lot of the report generation code is in separate classes and has a core error logger that I didn't write, this error logger I believe was built for windows apps as it uses WindowsIdentity.GetCurrent().Name. In the case of ASP.NET I believe this will return the account running the ASP.NET pages at the server.</p> <p>I believe using User.Identity.Name on the pages would be the correct way to do this but it is not available from within the report generation classes only on the page. Is there a way to obtain it withing the error logger class without passing it as an extra parameter. </p> <p>There are hundreds of report classes so I dread to have to go through and add a parameter to every one.</p>
asp.net
[9]
3,976,928
3,976,929
Is there a way to test an iPhone App on my iPod touch without registering with Apple?
<p>Is there a manual way to load an iPhone App onto the iPod touch?</p>
iphone
[8]
4,529,308
4,529,309
Reach a windows form title text?
<p>I wonder how I can reach the title text in a windows form from a reference of the object like this</p> <pre><code> reference. ??? = "Title one"; </code></pre> <p>Help is preciated! Thanks!</p>
c#
[0]
5,104,205
5,104,206
LG optimus black android mobile front camera issue
<p>i am using LG optimus black android mobile.I tried to use front camera using parameters.set("camera-id",2); but unable to access front camera it always uses back camera. I am using android version 2.2. any ideas?</p>
android
[4]
5,719,331
5,719,332
Print an ASCII art diamond
<p>This is a homework question I got for my programming course at school, and I'm kind of lost, so please help. Here is the question:</p> <blockquote> <p>Write an application program that prints a diamond of asterisks (*) on the screen. The number of lines in the diamond is given by the user. As an example, if the user requested a diamond with 7 lines, the following would be displayed.</p> </blockquote> <p>Here is what I have so far:</p> <pre><code>{ int nlines; int nsp; cout &lt;&lt; "enter the number of lines (must be more then one)" &lt;&lt; endl; cin &gt;&gt; nlines; while((nlines)&lt;=0) { cout &lt;&lt; "enter the number of lines (must be more then one)" &lt;&lt; endl; cin &gt;&gt; nlines; } nsp=(nlines - 1)/2; for(int currspace = 1; currspace &lt;= nsp; currspace++) { cout &lt;&lt; " "; } cout &lt;&lt; "*" &lt;&lt; endl; for( int currentline = 0; currentline &lt; nlines; currentline++) { for( int currentaster = 0; currentaster &lt;= currentline; currentaster++) cout &lt;&lt; "*"; cout &lt;&lt; endl; } return 0; </code></pre>
c++
[6]