instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I have a user control that uses two unordered lists with two asp:Repeaters inside to dynamically build a menu from a web.sitemap file. (http://msdn.microsoft.com/en-us/library/aa581781.aspx#aspnet_tutorial03_masterpagesandsitenav_cs_topic5) Now I want to show the selected MainMenu node and SubMenu node. To do so, I use...
stackexchange/codereview
I want to be able to display a tooltip centered above my control. I know how to customize the XAML used to display the tooltip using the TooltipService, however, the placement options the TooltipService makes available only allow you to specify top, bottom, left, right, etc. They don't let you specify an alignment onc...
stackexchange/codereview
I would like to start developing my cocoa app on two different machines. I'm not sure of the easiest way to achieve this, but was considering using my dropbox folder. Will xcode be ok with this? Is this a common approach and does it work well? Are there some common 'gotcha's I should look out for?
stackexchange/codereview
Ruby's date/time helpers are useful but I found a discrepancy. It seems that 12.months does not equal 1.year. Check 1.month and you'll find it's equal to 30.days and, of course, 12 * 30.days = 360.days, 5.25 days short of an actual year's length. I came across this when I set access to certain components of our web sit...
stackexchange/codereview
i am using VS.NET 2008 with MS SQL server 2005 to develop a window form application but everytime i got new error in connection or after conected, in my current code the connection opened but doesnt work after that in transaction of queries. maybe i have problem while making new DB or new datasource also m not that sat...
stackexchange/codereview
Currently I have a number of divs of undefined length/height. they contain a few hyperlinks as a list. The almost-desired effect is achieved by giving these divs float:left; width:150px; margin: 10px; However, in the scenario of the first div containing just 1 link, and the second div containing 10 I get the following ...
stackexchange/codereview
I'm trying to make a field similar to the facebook share box where you can enter a url and it gives you data about the page, title, pictures, etc. I have set up a server side service to get the html from the page as a string and am trying to just get the page title. I tried this: function getLinkData(link) { link = ...
stackexchange/codereview
Could anybody tell me what is wrong with this code ?? jQuery(document).ready(function(){ var val = ["Hourly", "Daily", "Weekly", "Monthly", "Yearly"]; var myArr = ["Weekly", "something"]; $( myArr ).each(function( j ){ if ( $.inArray( myArr[j] == val ) ) { alert( 'yes, Matched !!' ); ...
stackexchange/codereview
I have installed API for using new feature of C# 5 but some strange things happens. i am able to use async keyword but VS 2010 tell me that "Can not find Task-Related types.Are u missing to a reference to AsynCtpLibrary.dll ?" And also i see some errors on compile time like " compiler required member 'System.Runtime.C...
stackexchange/codereview
I am doing a project in linux kernel and I wanted to know what does this checkstack.pl do? I have never studied perl so cant understand the program. It will be great if I could understand the program conceptually if not line by line. Any effort appreciated. Source: link text suppose i want to write the code of my own t...
stackexchange/codereview
I have a setLayout(new GridLayout(5,5,3,3)); 5 rows and 5 columns. On the first row I want one big row. You know how in excel, where you would merge cells. So I just want to merge the 5 columns only on the first row. I am putting a JLabel on the first row, and its very annoying that I need to have multiple JLabels for ...
stackexchange/codereview
I have a string containing a set of ActiveRecord models and I would like to do the same query for every model passed as string. model_type = 'Comment' id = 1 record = model_type.find(id) model_type = 'Post' id = 1 record = model_type.find(id) How can I do that?
stackexchange/codereview
Currently I have the code: <!-- More html code above --> <div id="loading" style="display: none;"> <div align="center"> <img src="/loading.gif" style="padding:10px;" /> <div id="lmessage"></div> </div> </div> <!-- More html code below --> <!-- ...... --> <script> $("#buttonSubmit").click(functi...
stackexchange/codereview
I'm trying to get a horizontal StackPanel with some text, and then a button stuck all the way to the right hand side. I tried this: <StackPanel Orientation="Horizontal"> <TextBlock VerticalAlignment="Center" FontSize="14" Margin="5,0,0,0">Ahoy!</TextBlock> <Butto...
stackexchange/codereview
I'm trying to call String.format() having a String and Object[]. How can I do it?
stackexchange/codereview
I am describing a problem for which it took me quite some time to learn the answer. The "GenericKeychain" example is a good start at providing a wrapper for sharing keychain data between applications when using the accessGroup in the init. However, implementing this in my app yielded an obscure error code (which took f...
stackexchange/codereview
I used the above mentioned collective idea's delayed_job plugin. according to the Railscast by Ryan beats.. 1.) I installed the plugin... on my widows machine.. 2.) When i do ruby script/generate delayed_job i get an error saying "Couldnt find 'delayed_job' generator ..... Please help. Thanks Sandeep
stackexchange/codereview
i have an asp.net-mvc site and there is some information that i want to show on every page. I have created a class called BaseViewModel and each of the viewModel classes inherit from BaseViewModel. The Site.Master view binds to the BaseViewModel directly. Right now the base class has one property called MenuLinks. Th...
stackexchange/codereview
I'm trying to execute a command in the background using PHP so the web application can continue to load, but having no luck so far. The command is for a live streaming application, so involves the following: <stream pre-process> | ffmpeg <options> | <stream segmenter> I can stick the above in a script and execute it f...
stackexchange/codereview
I have request SELECT IF(f.date_term=3,t.quarter*f.date_term ,''), IF(f.date_term=6,t.halfyear*f.date_term,''), IF(f.date_term=12,t.year*f.date_term,'') but this is not work. how to make a condition? I need one value IF ( date_term == 3 ) {select quarter} ELSE IF ( date_term == 6) {halfyear} ....
stackexchange/codereview
I started working on a way to automate creation of my database accessors. I am looking for something compatible with PHP >= 5.2. My first go at it resulted in this: class FancyPDOBase extends PDO{ /////////////////////////////////////////////////////////////////////////////// ////Magic ////////////////////////////////...
stackexchange/codereview
Hi could any one explain to me the various ways in which the term "wrapping" is used in programming lingo? I have heard it being used in many contexts esp compilers
stackexchange/codereview
scenario: i have a model anel opened in whci i have a commandlink which opens another model to search for data adn the data is poplated in a datatable with a link in one of the column. On click of the link i need to fetch the row data an populate the value inside the parent model panel . Proble...
stackexchange/codereview
I am planning to develop a jigsaw puzzle game. Now I already have images and image pieces, so we don't need algorithm to cut the image in pieces. On the UI side there would be two sections First section contains the broken images in random order. Second section contains the outline of the full image. User need to drag...
stackexchange/codereview
This is driving me nuts - I have been round and round in circles, and this no joy. I am loading multiple dynamic images, and have a simple Javascript object which I instantiate for each image, and which has a callback to render the image once it has loaded asynchronously. I have verified that the callback code works j...
stackexchange/codereview
I have wpf application that calls wcf service with forms authentication. I added Service Reference to my solution, and in service configuration checked Generate asynchronous operations. In code behind I created client to that reference, than I attached event to fire after async method is completed, then username and pa...
stackexchange/codereview
I have a class hierarchy with an abstract base class and 4-5 subclasses. I want to use NHibernate's table-per-class-hierarchy mapping method to map these to a single database table to reduce the number of joins my queries generate. However, one of those subclasses has a not-null property which the other subclasses lack...
stackexchange/codereview
I'm working with an existing codebase and there are a lot of classes like: [Serializable] [CollectionDataContract ( Name = "DogList", ItemName = "Dog", Namespace = "Namespace" )] public class DogList : List<Dog> { } According to the documentation I've found here: http://msdn.microsoft.com/en-us/library/aa3...
stackexchange/codereview
How is it possible to access the types of the parameters of a lambda function in c++? The following does not work: template <class T> struct capture_lambda { }; template <class R, class T> struct capture_lambda<R(T)> { static void exec() { } }; template <class T> void test(T t) { capture_lambda<T>::exec()...
stackexchange/codereview
This mysql table has an autoincrement field. I want to duplicate some rows. I thought I will use a temporary table: CREATE TEMPORARY TABLE tmptab SELECT * FROM mytab WHERE somecondition = 1; Before copying the data back to mytab I can now do some updates in tmptab. UPDATE tmptab ... /* some updates */; Because mytab ...
stackexchange/codereview
I want to be able to loop through all of the strings in a simple class, i.e. do the following: FormDebugMetrics debugMetrics = new FormDebugMetrics(); foreach(string d in debugMetrics) { if (!string.IsNullOrEmpty(d) {..} } By my class is like this (without a public definition for 'GetEnumerator': publ...
stackexchange/codereview
I want to do a query that fetchs the rows ordered by the value of a column and in the same time i want it fetches first the rows that has a concret value in that column. For example: it es fr it es fr If i want to show the rows with "es" first of all, the result would be: es es it it fr fr Regards Javi
stackexchange/codereview
My brain had a segfault this morning trying to understand exactly how and when C# can work out the type of an object from a reference to that object. Consider the following highly unoriginal example code: class Foo { public virtual void Baz() { } } class Bar : Foo { } class Program { static void Main() { F...
stackexchange/codereview
i need code to check browser type what i want is something like this <?php //check browser type if( $browserTYPE = 'Firefox') { echo ('1'); } else echo('2'); F1! f1!
stackexchange/codereview
Can you take things like the poll app from the tutorial and display them in an iframe or frameset? The tutorial is great and the app is very nice, but, how often do you go to a site with a whole page dedicated to a poll? I was trying to think about how you do it using the urls.py file, but couldn't wrap my head around ...
stackexchange/codereview
I cannot figure out how to build a REST API web service for VB.NET. I can't find any tutorials on the internet and the Microsoft templates only come in C#. Anyone have any links that could help me out?
stackexchange/codereview
I am trying to develop an MVC site that implements dotnotopenauth. I have a user table, provider table and a user to provider table. I am storing the returned auth string. I am using forms auth cookies for user authentication. I am wonder, and this could be a very simple question for someone... how to protect certain c...
stackexchange/codereview
According to this, void* has no RTTI information, therefore casting from void* is not legal and it make sense. If I remember correctly, dynamic_cast from void* was working on gcc. Can you please clarify the issue.
stackexchange/codereview
I'm trying to execute a query using a PreparedStatement in Java. I am getting error number 1064 when I try to execute my query (syntax error). I have tested this in MySQL query browser with substituted values which works fine. What's wrong with my code? Here's the relevant code: String query = "select MemberID, Member...
stackexchange/codereview
I try to play a alertSound, but I have 4 error, this is my function: #import "AudioToolbox/AudioServices.h" +(void)jouerSon:(NSString *)fichierSon:(NSString *) extensionFichier { NSString* soundPath = [[NSBundle mainBundle] pathForResource:fichierSon ofType:extensionFichier]; CFURLRef baseURL = (CFURLRef) [NSURL fileU...
stackexchange/codereview
I have written a database class but can't access the method from within: class database{ . . private $mgc; private $real; public function insert($table,$values,$row = null){ . . for($i = 0; $i < count($values); $i++){ $values[$i] = safe_value ($values[$i]); } . . } public function safe_value( $value ) {...
stackexchange/codereview
I have been reading up on using Shibboleth 2.0 as a Single Sign On technique. One confusion I have is whether it is possible for the Identity Provider (IdP) to send back to Service provider (SP) an email attribute that can indicate to the web app exactly Who is logging in. For example, if user Joe is directed to regis...
stackexchange/codereview
I want to prompt the user to enter a database name and warn him if it is invalid. Is there an easier way than actually trying to create the database and checking the result? No biggy, I'm just curious. PHP and MySql, but I need it to be ODBC compliant.
stackexchange/codereview
I'm writing an iPhone app, and I want to handle multitouches. I'm using cocos2d libs. So I've made a CCLayer subclass and set it to be a CCStandartTouchDelegate. For some reason I don't want to use UIGestureRecognizer and to build a correct logic I should know the answers for these questions: If I tap the screen with ...
stackexchange/codereview
class C() { num =4; int[] a = new int[5]; } in a new class if i called C C c1 = new C(); how can i use array a..??
stackexchange/codereview
Ok so i have a variable named $total_cost which is equal to 529700 I need the value to be $5,297.00 this value is coming out of a mysql decimal 10,2 field I need to now come up with a subtotal of 2% and a shipping of 8.25% based on whether the user is in the state Lets just assume all the users are from this state, h...
stackexchange/codereview
I've got an application being build by Maven that is a mixed Groovy and Java project. Using the GMaven plugin(v1.3), I can easily run Groovy tests against Java and Groovy classes. And during builds of the application, my java classes get linked against the augmented stub files that declare methods from GroovyObject....
stackexchange/codereview
I am using HttpWebRequest to connect to a URL. This url keeps the connection open so that it can pump the data to the client over the internet. A custom pub/sub if you will. It is a simple GET. The response headers I get looks something like this: HTTP/1.1 200 OK Connection: close Date: Tue, 09 Nov 2010 23:02:11 GMT ...
stackexchange/codereview
I'm trying to use boost::regex_replace with a custom formatter. I need to pass a method from an object because some member is needed in the replacing function. The signature of my replacing method is: std::string MyObject::ReplaceStr( boost::match_results<std::string::const_iterator> match) const When calling rege...
stackexchange/codereview
How do I set the Startup page in Silverlight? Not sure if am googling for the wrong terminology or it just does not seem to be mentioned anywhere. Cheers
stackexchange/codereview
I've been using the UrlRewrite IIS plugin for about a month on our production site. I created a single redirect rule using the supplied template/wizard, the resulting config enrty is as follows: <rewrite> <rules> <rule name="CanonicalHostNameRule1" enabled="true"> <match url="(.*)" /> ...
stackexchange/codereview
This seems like a strange one. Not even sure if it is possible!! I have a UIWebView that loads a local html page. On this html page I have a button. I want to click on the button and then call an IBAction in Xcode. How would I go about this? Or can you even do this??? Thanks guys, Stefan.
stackexchange/codereview
I've nearly completed a tiny winforms app (.net 3.5) and the last thing remaining is a printout. The printout is pretty simple. It is printed on an A4 landscape page and consists of three identical columns (those are 3 copies of a support ticket). Each column has a bit of fixed text, a logo image, and a few fields from...
stackexchange/codereview
My application requires graph library and I am using achartengine graph library. My app requires graph to be only 50% of the screen and other part is used to display some other information. Is it possible have xml resource file for achartengine's graph APIs and how to do it? I tried to find an example but didn't find ...
stackexchange/codereview
Rails 2.2.2 didn't have find_in_batches functionality (or find_each). Is there a plugin that provides this? I haven't been able to find one.
stackexchange/codereview
I'm working on a simple web application with Scala. The plan is to obtain JSON data from an external API, and insert it into a template (unfortunately, obtaining the data in XML is not an option). I've tried working with Twitter's scala-json library, but I can't get it to compile properly (the code on github fails to u...
stackexchange/codereview
I want to hide some strings in my .exe so people can't simply just open the .exe and look at all the strings there. I don't care about the strength of the encrypting method, so I will probably use XOR etc. How can I do this at compile time? That way my strings won't be stored in the .exe but the encrypted versions wou...
stackexchange/codereview
I am running the following: Windows 7, Python 2.5, and SQL server 2005, with SQLNCLI as provider. I have one table, its name is TABLE and its fields are FIELD0, FIELD1, FIELD2. You can find SQLNCLI.msi here: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=d09c1d60-a13c-4479-9b91-9e8b9d835cdc&displaylang=en ...
stackexchange/codereview
I want to implement ksoap2 web service using HTTPS(HTTP over SSL). I searched a lot over net but didn't find any tutorial for this. However, I found a tutorial for HTTP which works fine. Has anyone worked on something similar ? Any code provided will be really helpful.
stackexchange/codereview
How would I get my JSON string to my asp.net using jquery I am confused about using web methods or arrays or functions all the examples i have seen are in C#. All i want is to take the json string parse it. Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load cmd.Connection = conn ...
stackexchange/codereview
I'm having a strange problem when resizing a canvas' parent, which happens to be a ChildWindow. From a high level, this is what I'm trying to do when a user clicks on a button: Unhide a row, by setting the RowDefinition height from 0 to something larger. Resize the canvas, since everything inside is taller. Resize the...
stackexchange/codereview
In order to detect IE most Javascript libaries do all sort of tricks. jQuery seem to add a temporary object into your pages's DOM to detect some features, YUI2 does regex on the user agent in its YAHOO.env.ua = function() (file yahoo.js) After reading this answer it came in my mind that it's true, in order to detect ...
stackexchange/codereview
How does endianness affect enumeration values in C++? Is the size of an enum dependent upon how many enumerations there are and thus some enums are 1 byte, while others are 2 or 4 bytes? How do I put an enumeration value into network byte order from host byte order?
stackexchange/codereview
I have a Person class with the following constructor: public Person(String name, int age, char gender, Person c1, Person c2) where c1 is the left child and c2 is the right child. I want to write a method that counts the number of Persons that match the given gender, either M or F: public int countGender(char gen) { ...
stackexchange/codereview
i've inserted a view before an established table view if that makes sense. ie. i had an app with a first and second view, then i put another view before the first view, now the content doesnt show up in the (now) third view!? Any ideas why that would be? Would i make to make some changes in the app delegate maybe?? Tha...
stackexchange/codereview
Is there an event listener to use to detect whenever I am leaving a particular frame on my timeline? If I am correct, Event.FRAME_EXIT only works on the newer versions of Flash. Is that correct? (I am working with CS3.)
stackexchange/codereview
I have a small DBase, it coordinates tools in 6 separate shops. Selecting the name of the shop you want to look at updates the SQL of the qryInventory just fine so its looking at the correct table, but I have not been able to get the subform to update. I've looked all over the next and found several variations of thi...
stackexchange/codereview
I want to write scripts which access my internet banking data. Mostly read-only stuff for drawing graphs and sending alerts and so on. But I don't want to write my internet banking login details in plaintext in a script. How do I resolve this dilemma? I'd like to be able to run things from cronjobs/periodically if poss...
stackexchange/codereview
I'm currently running Ruby 1.9.2p0 on a Windows XP 32-bit machine. Ever since we've upgraded to Ruby 1.9, I cannot get any form of debugging to work at all. I've been told that you need the new ruby-debug19 gem in order to get things running. Problem is, my company's proxy prevents the gem dependency manager from co...
stackexchange/codereview
Consider the following scenario: I'm running my application which, during its execution, has to run another process and only after that 2nd process finishes inner specific initialization, can my first process continue. E.g: ... // Process1 code does various initializations here Process.Start("Process2.exe"); // Wait un...
stackexchange/codereview
Can i put an array in mysql select ? $usersArray = array(34, 23, 17, 17, 56); $result = mysql_query("SELECT * FROM users WHERE user_id=$usersArray"); Can i do that ?
stackexchange/codereview
I have a html like this: <div id="container"> <div id="c1"> </div> <div id="c2"> </div> </div> And I have this css codes: <style type="text/css"> html, body { height: 100%; } body { margin: 0; padding: 0; } #container { height: 100%; background: #CCFF...
stackexchange/codereview
In relation my other question, I've tried to write a small program that sets a files short name given it's long name. However I'm always getting an exception thrown: Error: The parameter is incorrect on FAT32 Error: The handle is invalid on NTFS Edit: I now appreciate that I cannot call the API under FAT32 FYI: I'm r...
stackexchange/codereview
I search for Math editors for writing formulas in asp.net I want something like exist in http://math.stackexchange.com , Could any suggest a free good one ?
stackexchange/codereview
I use this way to remove an emelment from a dict: d["ele"] = data ... d["ele"] = None I think by this I can remove the reference on the original element so that the removed data can be freed, no memory leak. Is it the right way to do this?
stackexchange/codereview
I am writting a daemon server using python, sometimes there are python runtime errors, for example some variable type is not correct. That error will not cause the process to exit. Is it possible for me to redirect such runtime error to a log file?
stackexchange/codereview
There must be something fundamental about interfaces/generics I have not yet learned. I hope to learn it now. Here is the scenario: I have this interface and class: public interface IInterface { string TestValue { get; set; } } public class RealValue: IInterface { public string TestValue { get; set; } } If...
stackexchange/codereview
I have created a UITableViewCell and I am trying to display it in one of my table, but for some reason it doesn't come, the table is coming empty. And when I click on the one of cell in the table it takes me down to next level, which means the custom UITableViewCell is not getting rendered properly. Here is my custom ...
stackexchange/codereview
Has anyone managed to install CCK on drupal 7? I am getting lots of errors. The reason that i want that is because CCK does not create 2 tables per field, it creates only one table per content type which is more efficient. Thanks
stackexchange/codereview
I'm trying to tweak a gedit style so that user-defined functions have a different colour. I've searched through http://library.gnome.org/devel/gtksourceview-2.0/stable/lang-reference.html but I couldn't find anything. I thought <style name="def:function" /> might do it, but it seems have no effect in gedit. <?xml versi...
stackexchange/codereview
Hi I am building an application which is supposed to be primarily powered by Ajax.It has an Ajax based navigation where when a person clicks a link, he is shown some data in an adjacent div.I am doing it by stopping the default action in a JavaScript function and doing an xhrGET But the problem is that if the user dis...
stackexchange/codereview
Can more than one JavaScript handler register to an event such as window.onresize? I tried using +=, but that had no effect. Only = and that obviously replaces any previously assigned events.
stackexchange/codereview
My game gui api supports 2 backends. They both work similarly and use event queues. The problem is that I do not want my API to handle the whole game's events, only peek at an event and do something, then let the game do whatever with it. That's why I cannot just give it the event queue. My issue is that, I will have a...
stackexchange/codereview
why does this work <script type="text/javascript"> var mycallback = function() { $('user_session_username').focus(); }; </script> page.visual_effect :appear, 'user-response', :afterFinish => "mycallback" whereas neither of the below statements work page.visual_effect :appear, 'user-response', :afterFin...
stackexchange/codereview
My code: @Override public void onKeyPress(KeyPressEvent event) { if (event.getCharCode() == KeyCodes.KEY_ENTER) { registerButton.click(); } } This is attached to a TextBox, and it does fire when I press enter. event.getCharCode() is just zero, not 13. When I press tab, it's 0, and when I press es...
stackexchange/codereview
I noticed that the text of the Softkeyboard in landscape mode doesn't show the same characters as I see in the EditText field in portrait mode. I use a keylistener for the EditText to only accept special chars: private class MyKeylistener extends NumberKeyListener { public int getInputType() { return InputT...
stackexchange/codereview
why to use $ sign at the end of the sheet name when usign Excel sheet to retrieve the value. For Example if i am writting OleDbDataAdapter da = new OleDbDataAdapter("SELECT * FROM [SHEET1$]", ocon); what is the purpose behind adding that '$' sign at the end of the sheet name?
stackexchange/codereview
Edited: Please note, when I mention performance comparison, it is not performance comparison of C++ pass-by-reference vs. pass-by-value. It is more to test whether the underlying algorithm of CPLEX (to solve linear programs) runs better when CPLEX objects are passed by value or passed by reference. Hello All: I need to...
stackexchange/codereview
I have two properties of ObservableCollection<string> type (in separate projects); What I want to do is to bind these two using reflection and SetBinding like this - //Get the PropertyDescriptor for first collection property PropertyDescriptor relatedPropertyDesc = prop.Find(firstCollPropName, false); Binding relatedPr...
stackexchange/codereview
If you click the body of the html once and wait until the ball is offscreen its fine. However if you clicked 2+ times you'll notice the ball moving faster. When you click the body again to make the ball come back it is still faster then it should be. Why? http://jsfiddle.net/44nwt/10/ -edit- in firefox on my page (i ha...
stackexchange/codereview
I have a test app that is linked with some DLLs (or .so's). In my main app I defined a global new/delete like this: void* operator new(size_t n) { .... } void operator delete(void* p) { ... } But I noticed the operators are only called for things I allocate in my main app, but not if one of the DLLs does. How...
stackexchange/codereview
I'm using Entity Framework 4.0 to access data in a table with a unique column constraint. If the constraint is violated, an exception occurs when I call SaveChanges(), as expected. My question is whether I should allow the exception to be thrown in the first place. I could alternatively do a select to avoid insertin...
stackexchange/codereview
I want to select value from uipickerview and display it in textfield and also hide after selecting. I tried following but it scrolls once and display last value of scrolling in textfield and hide textfield. I don't want it i want user to scroll multiple time and selecting row. - (void)pickerView:(UIPickerView *)thePick...
stackexchange/codereview
I am trying to test ClickOnce in my local PC. I set the necessary check boxes for updates and publish the project. First I publish the project to a local folder and then install. I diuble click the executable created from installation and it works fine. Then I update the app code and do another publish. bit now when I ...
stackexchange/codereview
Possible Duplicate: Removing an activity from the history stack Suppose I have three activities on my stack, like this A → B → C. I would like to terminate B and replace it with an activity D, so that the stack looks like this : A → D → C. The intended effect is to have a "screen chooser" activity C. It opens on top...
stackexchange/codereview
Hi I have an array, I need to change the keys, in an orderly manner but don't change the order the values are. e.g. $a = array ( 0=>'h', 1=>'blabla', 2=>'yes' ); I used unset($a[1]); but i need the key to restart calculating the keys 0,1,2 ... etccc so i don't end up with: array( 0 => 'h', 2 => 'yes' ) but it ...
stackexchange/codereview
I am developing an Android App on which I get a list of events from DB and put them on a ListView. Every item can be clicked to see event details and every detail can be clicked to see statistics on that detail. What is the best approach for populating data? I have an activity that launches a new instance of the same a...
stackexchange/codereview
In my code a timed event launches a ModalDialog. If the user switches tabs before the event the tab blinks but that is it. Is there a way to make the browser switch to the tab the dialog is on? Thank you Cheers for all your advice. I should of said before but code will only be run through IE and the users are not allow...
stackexchange/codereview
I am working on a magazine/portfolio application that is intended to be readable offline, saved as an icon on the home page. This is using a lot of images, but while I can keep the images down to a respectable size (200 KB or less, with alterations for iPhone vs iPad) the amount for the page surpasses the 5 MB limit fo...
stackexchange/codereview
I want to generate an XML Schema based upon a class, just as you can do with the Xsd.exe tool. E.g. xsd.exe /type: typename /outputdir:c:\ assmeblyname. Is there a way to do this by using classes in the .NET Framework instead of using the standalone tool? I'm sure I've seen information about task references or simil...
stackexchange/codereview