instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I am a Django n00b and am looking at the "MasterSlaveRouter" example located in the Django docs: http://docs.djangoproject.com/en/dev/topics/db/multi-db/ In the example, if the "master" were to go down, would Django automatically switch to the slave so the site didn't go down? If not, does anyone have any tips/recommen...
stackexchange/codereview
Hey I have a question for javascript. I need to assign an href value to an anchor tag or asp:HyperLink. SOMETHING. that will allow me to link text in a dialog popup to an href that a function specifies. Here is my code. <'custom:JQueryDialog I made' runat=server ID="dialogPopUp" AutoOpen="false" CloseOnEscape="true...
stackexchange/codereview
I have a XAMl string table that is working a treat when i need to refer to it from my controls in XAML. However I could also do with being able to access it for use in other sections of code - such as validation messages in my model. As you cannot add a resource file to a silverlight I beed to use this. someone must kn...
stackexchange/codereview
I've got this validation script for my form (a survey). It loops through all answers, and checks if it is a radiobutton, a checkbox, input or textarea question. Based on that, it respectively checks for an input with the value checked (both radio and checkbox), or a value other then "" (input/textarea) (it's not that m...
stackexchange/codereview
I'm struggling to get a regexp (in Ruby) that will provide the following "one, two" -> "one" "one, two, three" -> "one" "one two three" -> "one two three" I want to match any characters up until the first comma in a string. If there are no commas I want the entire string to be matched. My best effort so far is /.*(?=,...
stackexchange/codereview
I'd really appreciate a hand getting my fixed-header table scrolling in IE7. In IE7, my tall data table is forcing its containing DIV to expand vertically, and preventing that DIV's scrollbar from showing. I'm using the excellent cross-browser (including IE7) scrolling, fixed-headers table layout solution from: http:...
stackexchange/codereview
Can anyone kindly guide me as to how to implement a dynamic auto complete widget in android. My requirement is, as I type a letter, a thread will work and will return an array with 5 suggestions maximum. I need to display these 5 suggestions in an auto complete list view. Experts please guide as to how to implement the...
stackexchange/codereview
Why isn't it possible to have this: def main(args:Array[String]) { val whatever:String // Have it uninitialized here if(someCondition) { whatever = "final value" // Initialize it here } } I don't understand why this shouldn't be legal. I know that I can make it a var, but why do we have to initial...
stackexchange/codereview
I'm using this code to change the wallpaper of the android home WallpaperManager wm = WallpaperManager.getInstance(this); wm.setBitmap(myBitmap); I would like to set the background to a drawable. Is this possible?
stackexchange/codereview
I'd like to use a 1x1 size Nine-patch image from Android drawable resources. When I'm trying to display it with <ImageView> in my layout xml file, this one is never showing up on the Android emulator device. Here's the xml code below: <?xml version="1.0" encoding="UTF-8"?> <LinearLayout xmlns:android="http://schemas.an...
stackexchange/codereview
I received an swf (AS3) file that works when you pass it variables through flashvars. I can't recompile it to work in a different way because we only bought the compiled swf, not the source. We could use it in an HTML page, but the problem is we must use it (in a sort of proprietary) Windows form (fundamentally, an ap...
stackexchange/codereview
I work with a team that develops MPI-based C++ numerical applications. The group uses cxxtest for constructing individual unit tests or small suites, but 1) there are some complications aggregating across directories with cxxtest's usual features and 2) there are some integration tests that are simply easier to impleme...
stackexchange/codereview
I have three images and I would like them to First Image: fadeIn, wait a while, then fadeOut; Second Image: (on the same place) fadeIn, wait a while, then fadeOut; Third Image: (on the same place) fadeIn, wait a while, then fadeOut; //do something... I have this stupidity so far. $(document).ready(function() { ...
stackexchange/codereview
This is a simple question about how Python handles data and variables. I've done a lot of experimenting and have Python mostly figured out, except this keeps tripping me up: [edit: I separated and rearranged the examples for clarity] Example 1: >>> a = [[1], 2] >>> a[0:1] [[1]] >>> a[0:1] = [[5]] >>> a [[5], 2] # The a...
stackexchange/codereview
In our product we use a number of external libraries. We do our logging with log4j, and most libraries do so as well, so we get most of the messages in our appenders fine. But there are several libraries that just use System.out and System.err. So I am looking for a way to redirect System.out and System.err to our log4...
stackexchange/codereview
I have a node.js Express application with a basic user authentication system where the session is stored in redis. I'd like to write and re-use a current_user() function that populates a JSON representation of the logged in user (if there is one) in a current_user variable. Here is the code to retrieve the user: if( re...
stackexchange/codereview
You know, like the CLR does. Is anyone even admitting the lack of runtime generic information is a problem, and working to solve it?
stackexchange/codereview
Is manipulate Silverlight in automated-tests possible? If yes - How can I do that? Alternatively can I find anywhere helpful information? thanks
stackexchange/codereview
I have two objects, and one inherites from the other. the parent object sends an ajax request to send some contact email. if i use the child to send the request, all data is empty ... why is that? the ajax request is sent (to the right url as well) but the data object is empty. var contact_A = function(){ var self ...
stackexchange/codereview
I am able to get certificate collection in particulaer store by using the following statment. X509Store.Certificates But not sure how I can get the list of certificate store names present under current user or local machine. I also checked the StoreName enumeration but it only lists the standard store names but not th...
stackexchange/codereview
What good is an indeterminate progress bar that is frozen because of course its on the same thread? Is there a way to keep it running? Possibly multi-threading?
stackexchange/codereview
if in the Site.Master file we have something like <div id="menu-container"> <ul id="menu"> <li> <%: Html.ActionLink("Frontpage", "Index", "Home")%></li> <li> <%: Html.ActionLink("Content", "Index", "Content")%></li> <li> <%: Html.ActionLink("Winners", "Ind...
stackexchange/codereview
char* fun(char *s) { char buffer[50]; int i=0; while(*s){ if(isdigit(*s)){ buffer[i++]=*s; } s++; } buffer[i]='\0'; return buffer; } int main(){ char *s="o34"; char *p="off"; p=fun(s); while(*p){ printf("%c",p); p++; } //printf("%s",fun(&s[0])); //puts(fun(s)); g...
stackexchange/codereview
This is a followup from stl allocator, copy constructor of other type, rebind I am using std::map and want a custom allocator that can reuse the storage for the internal nodes. The items being stored are pointers, so I'm not talking about reusing them, just the internal allocations for the map. The main requirements is...
stackexchange/codereview
gcc 4.4.4 c89 Is there a better way to do this? I have the following code to read in from a text file. The text file contains lines like this: 4 5 6 1 5 7 5 9 5 3 5 7 8 3 2 3 7 2 3 4 5 3 7 9 3 2 5 6 I have given only 2 lines example, but there could be more and each with different lengths. What I need to do is get th...
stackexchange/codereview
I am trying to move a div Left a specified amount of pixels I'm using a slider that I got from here: http://carpe.ambiprospect.com/slider/archive/v1.3/ So from the example my div looks like this: <div class="horizontal_slider" id="your_slider_id" style="left: 0px;" onmousedown="slide(event, 'yo...
stackexchange/codereview
Is it actually part of BluePrint? What do they do? +column(!main_content_width) +clearfix Where can some intro docs be found for it? thanks.
stackexchange/codereview
A data provider (java, hibernate) has an API for accessing instances of JPA-annotated classes. A web-service (jax-ws) is exposing the API to the network clients. A bit of a problem I'm thinking to solve is that a client of the data provider cannot be easily reconfigured to either use the provider directly or over the w...
stackexchange/codereview
I'm working on a functionality in my asp.net web site that enables the user to download some files as a zip file. I'm using the DotNetZip library to generate the zip file. My code looks like this: protected void OkbtnZipExport_OnClickEvent(object sender, EventArgs e) { var selectedDocumentIds = GetSelectedDoc...
stackexchange/codereview
I would like to make a decorator which could be used with or without a parameter : Something like this : class d(object): def __init__(self,msg='my default message'): self.msg = msg def __call__(self,fn): def newfn(): print self.msg return fn() return newfn @d('T...
stackexchange/codereview
We have the scenario to pass the XML file as input to the applications and validate the schema and transactions, Is there any FitNesse fixture framework available to simulate this?
stackexchange/codereview
I use the oracle.jdbc.pool.OracleDataSource for connection pooling. I would like the pool to check whether the connection was not closed properly and to catch it up. I tried the following: ods = new OracleDataSource(); ods.setConnectionCachingEnabled(true); ods.setConnectionCacheName(CACHE_NAME); Properties cacheProp...
stackexchange/codereview
Which font is supported by the Nokia phones(s60)? I used the Arial,Arial Narrow but I could not see clearly.( I'm developing apps based on the nokia qt sdk in mac 10.6)
stackexchange/codereview
I am using Sharepoint Designer 2007 and doing the Custom Validations(through Aspx controls). The validations are working perfectly. But the issue is when there is a validation failure, I have Corrected the failed fields and leave the other fields as it is. In this case I am not getting any values from unchanged fileds ...
stackexchange/codereview
For the life of me I cannot understand the XML::Twig documentation for entity handling. I've got some XML I'm generating with HTML::Tidy. The call is as follows: my $tidy = HTML::Tidy->new({ 'indent' => 1, 'break-before-br' => 1, 'output-xhtml' => 0, 'output-xml' => 1, 'char-encodi...
stackexchange/codereview
I am trying to create a form and i get an error in these lines. else { //report the errors. echo '<h1> Err... </h1> <p> The following error(s) have occured</p>'; foreach ($errors as $msg) { echo "--$msg<br />\n"; } echo '</p><p>Please Try Again.</p><p><br/></p>'; } So, what's wrong?? Here's the...
stackexchange/codereview
I'm wondering how this is typically done at a high level. Please correct me if I'm wrong, but from what I understand, normally you could have some sort of validation. But if you have access to the source code, anyone could see how to send data to the server (or make your own server for that reason). Is there a viable s...
stackexchange/codereview
I have done some really serious refactoring of my text editor. Now there is much less code, and it is much easier to extend the component. I made rather heavy use of OO design, such as abstract classes and interfaces. However, I have noticed a few losses when it comes to performance. The issue is about reading a very l...
stackexchange/codereview
In Google Closure Compiler I get the warning WARNING - dangerous use of the global this object Here is an example. The error line and offset refers to the beginning of the word this function aToggle() { if(shown) toggle.show() else toggle.hide() $(this).text(shown ? 'Click to hide' : 'Click to show') ...
stackexchange/codereview
I am also quite a newby to jqGrid and need some help please. I need custom validation on a field I am editing. I looked at the examples and tried the following code below but get the error "Custom function should be present in case of custom checking!". Please help a newbie out!!! <?php $grid->SelectCommand = 'SELECT *...
stackexchange/codereview
I need to add href=" before an http:// if this http:// doesn't follow href=" or src=" Following code partly works. Partly means it considers <a href=" only but not src=" $str= preg_replace( "/(?<!a href=\")((http|ftp)+(s)?:\/\/[^<>\s]+)/i", "<a href=\"\\0\"> target=\"blank\">\\0</a>", $str ); Thank you ...
stackexchange/codereview
I use remote server to store values into MySQL database. I don't use any SELECT queries, only INSERT, DELETE and UPDATE. When I execute 70,000 queries I have trouble with speed. I was trying mysql_unbuffered_query and I saw little performance profit but it's still too slow. I remember that some functions in PHP allow m...
stackexchange/codereview
I have three pages: The first inserts some info into the DB. The second inserts some new info into the DB, when it is requested The third shows this information How to notify the third page when the second updates the info?
stackexchange/codereview
Hi I have two Message Driven Beans (MDBs) running on Websphere Application Server v7. It is connecting to, and receiving messages from Websphere MQ v6. On the Queue Manager, we notice that the number of open channel connections keeps on growing, and appears as though the MDBs are not releasing these connections. I am n...
stackexchange/codereview
I am programming an application in Ruby which creates a new thread for every new job. So this is like a queue manager, where I check how many threads can be started from a database. Now when a thread finishes, I want to call the method to start a new job (i.e. a new thread). I do not want to create nested threads, so i...
stackexchange/codereview
Existing backend services will be opened for more clients (adding a Web Service Layer to the Web-Frontend client). Currently, XML Schema is used for validation of DTOs, but since the frontend is out of our control, we will have to move extended tests (eg. interdependency tests) from the frontend layer to a new "valida...
stackexchange/codereview
I'm writing a game using cocos2d-iphone and our stages are defined in .plist files. However, the files are growing large - so I've developed an editor that adds some structure to the process and breaks most of the plist down into fixed fields. However, some elements still require plist editor type functionality, so I ...
stackexchange/codereview
I have a php function ( "mconnect") for connecting to mysql . Sometimes in full load i get a blank page with "[]mconnect: mysql_connect" In this function i have custom messages for mysql error 1040 and 2002 -- connection errors In logs nothing appears when this error occur I use lighttpd 1.4.28 with php-cgi 5.2.0 and m...
stackexchange/codereview
I have a class .tab{filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f5ffff', endColorstr='#e8f2f8');} and when one of the tabs is selected I want to remove the filter: .tab.selectedtab{/*what do I put here to remove the filter?*/}
stackexchange/codereview
I have the following update statement : UPDATE D SET D.Xtra1 = CASE when ExtendedProperties.PropertyName="Transmittal Number" then ExtendedProperties.PropertyValue else NULL END, D.Xtra2 = CASE when (ExtendedProperties.PropertyName=...
stackexchange/codereview
I'm finding that a NSFetchRequest is returning different results for a count and for an execute. I have a Product entity and a Size entity. A Product has many Sizes. I have two products, productA and productB. ProductA is only available in size1 and productB is available in both size1 and size2. Given the NSPredicate ...
stackexchange/codereview
I'm using Oracle SQL developer, or Oracle SQL* Plus
stackexchange/codereview
I have C# application that sends an XML document to a server via HTTPS Post. The problem is that the server receives only the first line <?xml version="1.0" encoding="UTF-8"?>. Here is a truncated version of my code (important parts only). What could be causing this problem? Is there modify in my code? SSL connecti...
stackexchange/codereview
INSERT INTO jos_race_calendrier_regional (id, evt_code, evt_date_comp, evt_station, evt_activite, evt_comite, evt_club_num, evt_club_nom, evt_nom, evt_dt, org_nom, org_adresse, org_adresse2, org_adresse3, org_ville, org_site, cont_nom, cont_tel, cont_gsm, cont_fax, cont_mail, epr_codex, epr_date, epr_sexe, epr_regroupe...
stackexchange/codereview
I want to disable UIButton dragging in Xcode, is there anyway to do that? any solution would help Thanks
stackexchange/codereview
I'm trying to set up a new Zend project using Zend Server CE under OS X 10.6 First, I have downloaded and successfully installed Zend Server CE: opening http://localhost:10081 in my browser shows the dashboard, and everything seems to be working fine. Than I created a new project, following the tutorial: $ cd /usr/...
stackexchange/codereview
I have the following models: class Tag(models.Model): name = models.CharField(max_length=20) class Entry(models.Model): title = models.CharField(max_length=100) date = models.DateField() tags = models.ManyToManyField(Tag) In a view I create a list of Entry object and want to show the elements in the template:...
stackexchange/codereview
To make a long story short, I have dynamic pages on a website that display reviews. If there are no reviews associated with a particular city/county/area/etc the mysql query returns 0 rows which triggers the following code: if (!$validRevQuery) { header("HTTP/1.0 404 Not Found"); include("http://{$PDS['site']}/...
stackexchange/codereview
I have a .NET project that access the .config file (web.config typically) to get configuration information. If I access this .NET project from a classic ASP application how does it handle reading data from the web.config or app.config? Can it? FYI - Using System.Web.Configuration.WebConfigurationManager.OpenWebConfi...
stackexchange/codereview
I have made small web-app in jsp with a start page with login and some restricted pages with logout, -everything controlled with filters and servlets. I started making it because I wanted to learn how to use filters and servlets, and think I have succeded in that very well. Everything works fine when I just ensure eve...
stackexchange/codereview
I am looking for advice on how to associate a purchase with a particular user, (for example, a game center user) basically the user who makes the purchase. The purchase is a consumable item or subscription, so it can't be restored. My overall design using server product delivery mode is largely working, but it doesn't ...
stackexchange/codereview
What are the most common ways of losing or having overwritten code when sharing a repository with another developer? I say this after working with several share repos where magically a lot of my information disappears. What are some safe workarounds? I use Github.
stackexchange/codereview
I am trying to set up auto discovery using UDP multicasting, and am using some sample code from the internet. this seems to work ok when I run the client and the server on the same machine, but when I run them on different machines, either with a machine running in a VM on my machine (virtualBox) or on other 'real' ma...
stackexchange/codereview
Where do I find the SSIS tools in Visual Studio 2010 Ultimate? I'm at a new job so new computer / new setup / new everything. I can't find them anywhere! Is there a specific edition of SQL Server that includes these tools? The DB is SQL Server 2005, SSMS is 2008, VS is 2010.
stackexchange/codereview
NSFileManger has this method: - (NSArray *)mountedVolumeURLsIncludingResourceValuesForKeys:(NSArray *)propertyKeys options:(NSVolumeEnumerationOptions)options the docs say it's for iOS 4.0; That sounds interesting. So I can plug in an USB stick now some time soon? Or can I do so already via the 30-pin connector (if I ...
stackexchange/codereview
I have a problem with authentication: Users that have valid domain credentials are logined using NTLM authentication (i send "WWW-Authenticate: NTLM " header and 401 status in my jsp filter. Then IE authenticate user using NTLM and everything is fine. I have other users (connected to lan with their own computers) and...
stackexchange/codereview
I want php to print a class on each fourth list-item. Is that possible? <ul> <li>List-item 1</li> <li>List-item 1</li> <li>List-item</li> <li class="new_class">List-item</li> <li>List-item 1</li> <li>List-item 1</li> <li>List-item</li> <li class="new_class">List-item</li> </ul>
stackexchange/codereview
Has anyone tried to compile a flex project that uses Cairngorm with command line?
stackexchange/codereview
I am implementing MAPKit Based application, In that I had a problem with the pins display. Some times they are coming on top of the callOut view. I used the following code to send the pins back: - (void)mapView:(MKMapView *)mapView didAddAnnotationViews:(NSArray *)views { for (MKAnnotationView* annotationVie...
stackexchange/codereview
I've wired up IPreInsertEventListener and IPreUpdateEventListener to manage audit logging in my app, which is using NHibernate as the ORM layer. The problem I'm having is that the OnPreInsert() event is fired when the object is persisted, but is not fired for each inserted child object as well. In my case, I have a Can...
stackexchange/codereview
Im trying to achieve a nice fade to color effect when you mouse over links in jQuery. So far I have: $('a').hover( function () { $(this).animate({ color: '#fff' }, 1000 ); }, function () { $(this).animate({ color: '#000' }, 1000 ); }); Which actually does work fine. However, imagine if the links are navigati...
stackexchange/codereview
I have a row-vector with arbitrary values. I am interested in the column IDs of the columns which contain a value <= a specified threshold the number of columns which lie below the threshold. Is there a more elegant way to compute this in MATLAB than using a for-loop?
stackexchange/codereview
I have a routine I would like to streamline. Currently on my registration page you can either enter a key (returning user) or sign up. Once you fill out a form, the form is processed by a script on another server (includes some CRM database inserts so it has to be on the same server as the CRM) I am doing client side v...
stackexchange/codereview
I am facing a very common issue regarding "Selecting top N rows for each group in a table". Consider a table with id, name, hair_colour, score columns. I want a resultset such that, for each hair colour, get me top 3 scorer names. To solve this i got exactly what i need on Rick Osborne's blogpost "sql-getting-top-n-row...
stackexchange/codereview
I am having a runtime error that I can not for the life of me figure out. My program almost does what I want it to, but there are some corrupted characters that print out as gibberish. The program is supposed to take in a text file that represents a forest of trees, build the forest of trees, then traverse the forest...
stackexchange/codereview
I think my question is easy. However it is surprising that I couldn't find any easy solution. I'm developing an open source Java library project on Netbeans and like many others I want to release it as binary.jar, source.jar and javadoc.jar. Is there a way to generate them automatically on Netbeans? I know maven can d...
stackexchange/codereview
I have an application which has around 800 images. Is there any way to re size the images to specific size. I have tried using the following code: UIImage *image = [[UIImage imageNamed:recipeObj.recipeImage] _imageScaledToSize:CGSizeMake(64.0f, 61.0f) interpolationQuality:1]; cell.imageView.image = image; This co...
stackexchange/codereview
Fatal error: Call to undefined method Request::getParam() in C:\wamp\www\Admin\corporate\for-upload\activecollab\application\modules\system\controllers\CompaniesController.class.php on line 219 in controller class I've written $this->request->getParam('is_owner'); and in request I've passed $router->map('people_compa...
stackexchange/codereview
I have a read only database (product) that recides on its own Sql Server 2008. I already optimized queries by looking at most expensive queries in activity monitor - report. I ordered the report by CPU-cost. I now have something like 50 queries/second and no query is longer than 300ms. CPU-Time is ok (30%) and Memory i...
stackexchange/codereview
Why are ints and doubles immutable? What is the purpose of returning a new object each time you want to change the value? The reason I ask is because I'm making a class: BoundedInt, which has a value and an upper and lower bound. So I was wondering: should I make this type immutable too? (Or should it be a struct?)
stackexchange/codereview
I've read the documentation but I'm still confused. Can someone please explain what a protocol is? (You could give code examples but I'm really looking for an explanation)
stackexchange/codereview
I'm looking at a crash dump. Some variables seem perfectly viewable in windbg, while others just say "memory access error". What causes this? Why do some variables have sensical values while others simply list ? It appears that all the problems are associated with following pointers. I'm certain that while many of thes...
stackexchange/codereview
I wanted to retrieve rows from the mysql database and order them by votes: votes_up + votes_down = votes table: posts{id, post_text, votes_up, votes_down, date} ORDER BY votes
stackexchange/codereview
Here's a good one to reflect on: http://en.wikipedia.org/wiki/Kakuro I'm attempting to make a solver for this game. The paperwork is done (reading an initial file with a variable number of columns and rows. It's assumed the input file follows the rules of the game so the game is always solvable. Take your time to read ...
stackexchange/codereview
Is it possible to store a templated class like template <typename rtn, typename arg> class BufferAccessor { public: int ThreadID; virtual rtn do_work(arg) = 0; }; BufferAccessor<void,int> access1; BufferAccessor<int,void> access2; in the same container like a vector or list edit: The purpose for this is...
stackexchange/codereview
I have a small WPF application that writes some basic information to the registry during program execution. The application is packaged with Windows Installer. How can I tell the Windows Installer to uninstall registry entries that were created during program execution when the program is uninstalled through the cont...
stackexchange/codereview
So, I have a task to find number of substrings in given string. I can't use any C libraries for doing this task. stringExist can only have 2 strings as a parameters. My solution is working, but I have a feeling that there should be a more elegant way to do this task. Solution 1: as it turns out, it doesn't work correct...
stackexchange/codereview
I'm trying to figure out how I can best save the map data for a 2d ORPG engine I am developing, the file would contain tile data (Is it blocked, what actual graphics would it use, and various other properties). I am currently using a binary format but I think this might be a bit too limited and hard to debug, what alte...
stackexchange/codereview
All my service methods use a facade to talk to the business logic. This means that in the facade the DataContracts (I'm using WCF) are translated to entities (Entity Framework) and then passed on to the business layer. The problem I'm facing right now is that I want to put certain validation logic in the business logic...
stackexchange/codereview
Let's say I create a repository, add x files to it and commit. Say the size is a Mb after the initial commit. Is there any way to estimate how large the repository is going to be in one years time? If the lines of code has increased by 10%, will the repository have grown accordingly? How does number of commits, branc...
stackexchange/codereview
Where is the SQL Analyzer? I did a full install, I don't see it anywhere in the menus. If for some reason is just doesn't exist any more, what are some viable alternatives?
stackexchange/codereview
function validate_request_form(){ var valid = true; if ( document.request_form.firstname.value == "" ) { alert ( "Please fill in first name" ); valid = false; return false; } return valid; } $j('#video-request-form').submit(function() { if (!validate_request_form() ) return false; }); I am usin...
stackexchange/codereview
Is after_validation hook called every time, even when the validation is failed? I tried a couple tests and it seems like it!
stackexchange/codereview
I have been asked to create a PDF form that will be sent to a user, they fill it out and then they click a button on the PDF that emails it to a specified email address. I know this can easily be done in Adobe LiveCycle but we currently dont have that and I am trying to avoid using anything other than Acrobat and Read...
stackexchange/codereview
http://www.dreamincode.net/forums/xml.php?showuser=335389 Given the XML above, how can I iterate through each element inside of the 'lastvisitors' element, given that each child group is the same with just different values? //Load latest visitors. var visitorXML = xml.Element("ipb").Element("profile").Element("latestvi...
stackexchange/codereview
I am trying to solve a lesson in my study. I am going to have an abstract class, CFigure, on top and different figures below, currently I have made a circle class. I am going to call this from a C# program. But when I try to build my code I get the following error messages: unresolved token (06000001) arealBeregnerCP...
stackexchange/codereview
To check does preferences exist I tried this way, but it shows null every time(maybe because I saved preferences in different view): String def = null; String test = getPreferences(MODE_PRIVATE).getString(PREF_GAME,def); if(test == null) Log.v("main", "no saved data"); To delete preferences I tried editor.clear(), bu...
stackexchange/codereview
I am using JQuery. I am having below jquery which I am using to show the page fragment, it load the page fragment while the main page is loading. $(document).ready(function() { $(".load-fragment").each(function() { var $objThis = $(this); var fname = $objThis....
stackexchange/codereview
hey all.. i want to make a simple login page. I have prepared two textfield. <input type="text" id="user"> <input type="password" id="password"> <input type="button" id="go"> i want after click #go script can check: if #user value != "admin" then #password value != "qaubuntu" will show and JS alert. but if data same...
stackexchange/codereview
I want to have a copy of the currently running instance. When i change a value in the copy, original object is also affected. The copy acts as an instance. How to avoid this? I need to create an independent copy of the calling object. Set operator+(Set s){ Set temp = *this; for(int i=0; s...
stackexchange/codereview