instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
As far as i understand ViewModel communicates with View via databinding. But how can one create in ViewModel UIElements for View. Thanks.
stackexchange/codereview
How to know that user is in my page for more than 20 minutes using java script.
stackexchange/codereview
i want to list all the NIC card address using a vc++[v6] code.I want to send broadcast messages to all NIC in a system. How can i do that.
stackexchange/codereview
I'm trying to make a Windows Phone 7 app that will save some images off the web, I have no idea where I can or if I can save images from the web to the phone. What can I do to save images?
stackexchange/codereview
I'm developing a new app, I haven't previously written an app which will cater for OS 4 phones. I know theres now multi tasking, so I have to cater for apps resuming, but I'm not sure how? Also theres retina graphics, I'm not sure if its best to resize my own x2 images or let the phone do it? Also, it seems that the i...
stackexchange/codereview
I am using swfLoader to load external flash movies in my flex/actionscript code. If the loaded swf was made for the newer flash player versions ( I believe 9.0 or more) it loads as a flash.display.MovieClip object which has methods for play/pause and go to frame. However if the loaded swf was made for older flash playe...
stackexchange/codereview
aclass.h @interface aClass : NSObject { NSString *name; } @property (nonatomic, retain) IBOutlet NSString *name; @end aclass.m @implementation aClass @synthesize name; - (void)dealloc { [name release]; [super dealloc]; } - (void)test1 { name = @"hello"; } - (void)test2 { self.name = @...
stackexchange/codereview
My question is when I say the char **szWords; IS szWords: PPAnsiChar; char **szWords; IS szWords: array of array of AnsiChar; also the pfloat *pScoreAcc; IS ScoreAcc: PSingle; pfloat *pScoreAcc; IS ScoreAcc: array of Single; are they the same? In my case, array of array of AnsiChar; is working on my project an...
stackexchange/codereview
I want to convert a recursive function to a iterative one. What I normally do is, I initialize a queue, put the first job into queue. Then in a while loop I consume jobs from queue and add new ones to the queue. If my recursive function calls itself multiple times (e.g walking a tree with many branches) multiple jobs a...
stackexchange/codereview
I have an application that works fine on tomcat, but when I deployed it on Oracle Application Server, I get some errors. I need to log some values in my code but cannot do that... When I write System.out.println("bla bla") in my code, I couldn't see that msg on the log files Why that? NOTE, I am taking about applicati...
stackexchange/codereview
Is it possible to get a generic result from the dynamic object. I'm trying to create a dynamic wrapper around the Json.Net JObject class. It works but when returning an array, I always have to return them as List<object>. What I would have preferred would be List<T>. dynamic d = new DynamicJson(json); var result = d.Ge...
stackexchange/codereview
Does .NET framework have a collection of icons for use in Windows Forms or WPF application somewhere? How does one use it? For example, how do I use it as an application window icon? I recall, if you want to display a message box there is a choice to show different icons, I suppose there are more icons in the framewor...
stackexchange/codereview
I wrote a java app to capture screen into true color images, make parts of them transparent, and write them to disk as PNG files with transparency using ImageIO. Now to conserve space I am thinking of converting true color images to 8-bit 256 colors images, making one of the colors transparent, and writing them as GIFs...
stackexchange/codereview
I have an upload page in django powered site. The end-users upload the documents from that page. The back end processing of that uploaded document can take several minutes. How do i handle multiple end-users' request in the back end? I have thought of using thread for each end-user's request. However, i am finding it d...
stackexchange/codereview
I want to know how i can write a mysql query which checks how many record exists in other table ? table 1 : names id name -- ---- 4 john 5 mike 6 jenny table 2 : cars id name_id car -- ------- --- 1 4 bmw 2 4 wv 3 6 honda query = "SELECT * FROM names WHERE id = '4'" <- in that query i also w...
stackexchange/codereview
A friend and I would like to create a website to manipulate Facebook data. The structure is: a PHP web role (contains the web page, user OAuth login, interacts with queues, and interacts with SQL Azure database) an F# worker role (does statistics and quite heavy data extractions) The process is (assuming a new user):...
stackexchange/codereview
I just opened my visual studio 2005 solution file with multiple projects and all the files in the solution appear to be checked out. Every file in this solution has "check-mark" next to it. I DONOT want to check out the file and accidentally check it in. In solution file, there are over 70 projects. Each project close...
stackexchange/codereview
I have a editable combobox that text is bound to an object property. I have associated a exceptionsValidationrule with the text property and it is working and turning the control red. I need to also disable a button but I can't seam to find how to check the validation.haserrors in this case my XAML for the combo box...
stackexchange/codereview
Can anyone tell me how I can discover if the user has enabled/disabled that annoying click when they type, I'd like to use that as a default to indicate whether I should make a click when they click something. Thanks, vic
stackexchange/codereview
With the upcoming WP7 release, I am wanting to develop against the framework. I have an iPhone and don't want to get away from using that service. I know Visual Studio has tools to emulate the WP7 device for testing one's apps but this is not a true test. I was wondering if it is possible to get a WP7 without a serv...
stackexchange/codereview
I want the easiest and simplest way to push events into user's Google Calendars from Python Django. I don't want to read their events or do anything else, just push the events they create in my application to their Google calendar once. Secondary is to possibly delete events in their google calendar (if the event I pu...
stackexchange/codereview
I'm encountering some weird problem. Apparently, I would like to delete the rows of my choice in flexigrid. However, when I'm selecting the rows and click 'Delete' button I only see how many items I actually selected but, for some reason, it's not passing the rows ids. In JS code when I'm running some test I noticed th...
stackexchange/codereview
Is there right way to get Url to android market app ? I read some answer here but I did not success to get any ?
stackexchange/codereview
As I know that in C, we can use function pointer and this is called during run-time (1). By definition from wikipedia: Dynamic programming language is a term used broadly in computer science to describe a class of high-level programming languages that execute at runtime many common behaviors that other langu...
stackexchange/codereview
I have a backend software that needs to be able to communicate with a gecko-based web browser (and vice-versa). What is the best way to realize this? Since HTTP is rather one-way (with the exception of e.g. reverse AJAX which I consider to be quite "hacky") I am wondering how to do this. Would creating an NPAPI-based ...
stackexchange/codereview
I have a view controller that controls the switching between views. I would like one of the views to signal the view controller to switch to another view (and can't figure out how I can do this.) To be more clear (hopefully): My view controller inserts a subview. That subview has a UITableView. I'd like, when you s...
stackexchange/codereview
I have this code NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"yyyy-mm-dd'T'HH:mm:ss.SSSSS"]; NSDate *date = [NSDate date]; NSString *timeStamp = [dateFormatter stringFromDate:date]; after running this date is equal to 2010-11-05 21:45:56 GMT and timeStamp is equal...
stackexchange/codereview
My site has started having issues with the application pool crashing while using Reporting Services manager. This is happening at more than one installation. I have seperated both the Reports and ReportServer web sites into their own application pool to single out the issue and have localized the issue to ReportServe...
stackexchange/codereview
I have a SQL Script that inserts about 8000 rows into a TABLE variable. After inserting into that variable, I use a WHILE loop to loop over that table and perform other operations. That loop is perhaps 60 lines of code. If I run the TABLE variable insert part of the script, without the while loop, it takes about 5 seco...
stackexchange/codereview
I have been trying to learn Prolog and came across this syntax on some example code. solve(Hs) :- Hs = [_,_,_,_,_], member(h(_, _, _, _, dog), Hs). This is only a portion of the code, but I'm confused with the h(_,_,_,_,dog)does. Any help would be greatly appreciated!
stackexchange/codereview
Whenever I need to add dynamically allocated object into a vector I've been doing that the following way: class Foo { ... }; vector<Foo*> v; v.push_back(new Foo); // do stuff with Foo in v // delete all Foo in v It just worked and many others seem to do the same thing. Today, I learned vector::push_back can throw ...
stackexchange/codereview
My web application has used a URL-Rewrite module, it work well on IIS 6. But when I migrate to IIS 7 and configure the managed pipeline mode to "classic" then the URL-Rewrite module does not work. Web Sever return "configuration error" with message "... does not implement IHttpHandlerFactory or IHttpHandler". This is t...
stackexchange/codereview
I have a data structure as follows: public struct StateItem { public DateTime Moment; public int SomeValue; public int Id { get { return Moment.Hour + Moment.Minute + Moment.Second + SomeValue ; } } public over...
stackexchange/codereview
Do you know any way to generate doc and docx files with PHP and without COM component? I've tried PHPWord, which creates docx files, but these cannot be opened in OpenOffice because they cause it to crash. I've also tried PHPDocx, but it didn't generate any files at all.
stackexchange/codereview
I have an Array with approximately 1,000 Objects, each of which has a precise coordinate value. What I would like to do is take a Search button that I have and, when pressed, detect the current location and calculate 10 nearest Objects to this location. Any advice for the best way to go about this? Thanks.
stackexchange/codereview
StreamReader class has both close and dispose method. I want to know which method to call to clean up all resources. If making use of using block, I think it will call its dispose method. Will it be enough to clean up all the resources.
stackexchange/codereview
Suppose you have already an unreliable lossy channel between 2 peers. Which methods can you suggest to transfer data reliably and also without performance loss? Also the underlying protocol is not TCP (which is already reliable). (I used lossy channel to generalize the question.) ( AFAIK, some methods exist like RDT (r...
stackexchange/codereview
I have a situation in which i am fetching top row from a temporary table and doing a functionality using that details. The temporary table will be updated with the new uploaded file details. I do have an aspx page which does this functionality. The web page is triggered using a task scheduler at some interval of time. ...
stackexchange/codereview
I'm trying to understand the concept of data binding in Spring-MVC with Velocity (I'm learning this framework and porting an app to this platform). I'm used to getting form variables using request.getParameter("username"), in the Spring world it seems that I can perform validation and such against "form objects" e.g. a...
stackexchange/codereview
What is this undefined behavior thing that I keep reading about? Why would demons fly out of my nose?
stackexchange/codereview
When i code my program, i need to use filesystem.file to be imported in my action script. But when i import that, Adobe Flash Professional CS5 did'nt know the library. Could anybody know about it.. or i must downloaded the new version or maybe only package?
stackexchange/codereview
I've been studying Prolog for a few weeks ago and something trivial I keep getting stuck on is coming up with solutions using append. For example, if I have a pattern matching rule that looks something like pattern( foo(X,Y), L1, L ) :- % some code to go through a list (where the foo-pattern is) % and add the ...
stackexchange/codereview
We are using JOSSO framework for single sign on. It is working properly in Spring 2.5.6. It seems strict XML schema validation is introduced in Spring 3, JOSSO XSD's are not updated since long time, hence we get errors during startup of server. Is there any way to disable Schema Validation in Spring 3 (Probably make it...
stackexchange/codereview
I'm currently working on styling a TabControl, and have a maybe weird idea : What if I would like to have a default ControlTemplate for all my tabs in my application, but specify a different DataTemplate for each TabControl (depending on the data I want to show)? What do you think of that? Do you know if there's a solu...
stackexchange/codereview
can anybody tell me(code) how i can send/schedule email using quartz
stackexchange/codereview
i have a picture, a supposed symbol of a company i would like to convert that image to text and then display it, such that it appears as an image to the user, (when the user zooms in he realizes that the image is made up of combination of letters) it being letters, i can manupilate it usig css is thr a tool out ther...
stackexchange/codereview
I have a problem with the following piece of PHP script: <?php abstract class root { protected $con; protected $sql; protected $query; protected $row; protected function __construct__() { require_once("db.settings.php"); $this->con = mysql_connect(DB_HOST, DB_USER, DB_PASS) or die(mysql_error($this->con)); ...
stackexchange/codereview
In our web application we have multiple web pages. Contacts module is One of the widely used module. The entire module consists of 3 pages. The First page displays the Contact details with several Server controls, the second page is contact history with all the history about the contact and 3rd page again some more de...
stackexchange/codereview
I'm getting the following error Value of type 'System.Web.Mvc.MvcHtmlString' cannot be converted to 'Integer'. on @Html.ActionLink("edit", "Edit", "Users", New With {.id = Model.ID}, Nothing) Here's the code @If (Model.isUserMatch) Then @<div> @Html.ActionLink("edit", "Edit", "Users", New With {.i...
stackexchange/codereview
I have a single entry master with country name in a gridview . I have to edit the data in a grid view in asp.net c#. I want to validate the textbox inside edit template to see if the user enters invalid characters. I want to validate that using simple javascript code. I tried [a-zA_Z] in regular expression validator.....
stackexchange/codereview
My problem is pretty simple; I have text file filled with double precision floating point numbers which I need to read in and store in a matrix. I know how to open the file but from there I'm not sure how to parse out the data and convert it. The numbers are separated by spaces and newlines and each is preceded by a ...
stackexchange/codereview
I load from NSUserDefaults in my object's init method. Can I save to NSUserDefaults in my object's dealloc method? Something exactly like: -(void)dealloc { NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; [userDefaults setObject:self.filenamesArray forKey:self.defaultsKey]; [userDefault...
stackexchange/codereview
I tried to read data from my database to find out is I inserted it correctly. However, the following code has some bug. $pwdcrypt = SHA1($pwd); $userregisterquery='INSERT INTO user (email, password) VALUES ('.$email.', '.$pwdcrypt.')'; echo $userregisterquery; mysqli_query($link, $userregisterquery); // echo "Kant...
stackexchange/codereview
Right now I am still using flash as primary player and have a HTML5 fallback, because its still buggy especially when it comes to codes. However my question is, if I have a video source in an HTML5 video tag, and the source actually delivers a document (with correct content type headers etc of course) with an header r...
stackexchange/codereview
I am in the middle of developing my first GWT application which will consume data from a RESTful API. What I am trying to figure out is the best way to structure my entire application. Should the GWT client side make contact with Java server-side which then contacts the API or should GWT itself just contact the API dir...
stackexchange/codereview
I want to develop an expert system(or knowledge based system to be more general) that troubleshoots computer hardware problems. I have chosen Python as my language and Pyke as my inference engine. The problem is that i don't know from where to start or how to design the facts and rules that i will act upon. I searched ...
stackexchange/codereview
I am having great deal of trouble trying to find the driver needed for the Lg Optimus (Sprint) so that I can begin using App Inventor program. I connect my phone but no notifications show that it is connected, only charging. I'd appreciate it if someone could help me out. edit Any details would be useful even if it's ...
stackexchange/codereview
I am using jQuery 1.4 and I am trying to append DIVs that contain javascript files from another domain. I have the following inline code at the end of the body, just after loading jQuery: <script src="jquery-1.4.3.min.js"></script> <script src="scripts.js"></script> <script type="text/javascript"> $(document).ready(fun...
stackexchange/codereview
I am doing this assignment, make a program that solves sudoku. I have a panel with a grid of SudokuTextBox extends JFormattedTextField. I have a MaskFormatter so that it only accepts one integer per text box. Then in my panel I have this code when a key is relesed. public void keyReleased(KeyEvent e) { SudokuTextBox...
stackexchange/codereview
Does the Visual Studio 2008 Report Viewer (for a Winform) support adding checkboxes or radio buttons? Currently I am trying to create a report (via wizard or manually) based on a MySQL based dataset. It appears that all fields all treated as textboxes even though I would like to have some checkboxes to represent true...
stackexchange/codereview
I'd like to think this is obvious, but before I submit a bug report, I want to know that I'm not doing it wrong. I have this view using ASP.NET MVC3 RC, with Razor: <div class="miniProfile"> Joined: @FormatTime(Model.Joined)<br /> @if (!String.IsNullOrWhiteSpace(Model.Location)) { Location: @Model.Locat...
stackexchange/codereview
In a classical example of asp.net/mvc authentication LogOn action gets LogOnViewModel and returnUrl string to do an authentication and redirect to previous Url. [HttpPost] public ActionResult LogOn(LogOnViewModel model, string returnUrl) { if (ModelState.IsValid) if (!FormsAuthentication.Authenticate(model.UserName...
stackexchange/codereview
Tonight I've been taking a look at some code I've been working on over the last few days, and began reading up on move semantics, specifically std::move. I have a few questions to ask you pros to ensure that I am going down the right path and not making any stupid assumptions! Firstly: 1) Originally, my code had a fun...
stackexchange/codereview
i want to load different images in different screens depending on some action performed on some screen.That is depending on the action performed on one screen it calciulates some result and based on that it should load images on different screens.but this should happen onLoad. can anyone give me some solution
stackexchange/codereview
I need to config realm on tomcat 6 for oracle 11g to work for jBPM workflow. So I created a file: jbpm-console.xml under Catalina/localhost like this: <Context> <Realm className="org.apache.catalina.realm.JDBCRealm" driverName="oracle.jdbc.driver.OracleDriver" connectionURL="jdbc:oracle:thin:@myip:1524:mydb...
stackexchange/codereview
So I was reading about Entity Framework and based on my agile development scenario I decided to go with POCO objects. But now I'm having some extra problems I don't know how to get away with. I'm working with RIA services and Silverlight so when I'm going to Save an object of the server side I have to attach the object...
stackexchange/codereview
Few facts first: 1. I can only use ActionScript 2. 2. All files are within the same domain (i.e "http://www.example.com"). I have a loader SWF which acts as a selection tool ("auto_magic.swf") located at "/" in the website (the root folder). A User selects the tool he needs (it's a mechanical diagnostic system) and t...
stackexchange/codereview
I have the following : $.ajax({ type: "post", url: "something.cfm", data: formData, cache: false, success: function (result) { $("#formSub").html( '<input type="button" name="btnSave" id="btnSave" class="submitButton save" value="Save" disabled="disabled"/>' ); }, error: function (xmlHttpReq...
stackexchange/codereview
is it any way (with IMAP) to retrieve only updated messages for some period of time? (or, perhaps, only their flags). what i mean, with example: i've checked my mbox with imaplib.IMAP4_SSL(...) at 4.00pm; at 4.15pm i've gone to gmail web interface and marked one of my mails as "read"; at 4.30pm i want to check all upd...
stackexchange/codereview
Possible Duplicates: Href for Javascript links: “#” or “javascript:void(0)”? Why is it bad practice to use links with the javascript: “protocol”? As question says . . Which approach is better ? <a href='javascript:func()' >blah</a> or <a href='#' onclick='func()' >blah</a>
stackexchange/codereview
I have a function that I want to call from within a class method. The function is in a file called mergeSort.cpp. Here is a snippet of the .cpp file that the class is implemented in: // other includes #include "mergeSort.cpp" // other methods void Servers::sortSites() { mergeSort(server_sites.begin(), server_sites.en...
stackexchange/codereview
Right now I have about 60 Message types which are passed to a getStuff(Message) method of a class which implements ContainerOfThings. There are multiple variations of an ContainerOfThings such as BoxOfStuff and BagOfTricks both of which realize the getStuff(Message) method which generates a string based on member varia...
stackexchange/codereview
Briefly explain the reason for the (non)periodicity of a signal using MATLAB functions like isperiodic(signal) ... any thing like this?
stackexchange/codereview
I am trying to authenticate login using a POST method. However, I am getting a IOException and the Stream close. This is part of my code. String content = ""; boolean keepGoing = true; int status = -1; String _AuthenticationHash = getAuthDa...
stackexchange/codereview
I've been trying to get some features developed for my app which I don't have time to develop myself. And I wondered if there was a site / market place where I could buy plugins / components / features ? Don't know what the terminology is plugins ?
stackexchange/codereview
I've been looking into why the debug build of our open scene graph plugins can't be loaded correctly (error code 14001, ERROR_SXS_CANT_GEN_ACTCTX). After much googling I've found out that the problem is that e.g. the freetype debug dll has a manifest that depends on both VC90 and VC80 debug crts. Since I built the DLL...
stackexchange/codereview
I have looked through a few other questions, and tried a few options, but still a bit of a loss. EDIT - JUST TO SHOW THE ACTUAL AJAX CALL BEING MADE.. $.ajax({ type: 'GET', url: 'AJAXget/getPostcodeCheck.ashx', data: 'postcode=' + postcode, async: false, timeout: 10000, success: postcodeCallback...
stackexchange/codereview
i know im doing something stupid here but its been a few years since i worked with foreign keys, projects i was always on we did it with code not the db. here are my tables: delimiter $$ CREATE TABLE `show_survey_name` ( `idSHOW_survey_name` int(11) NOT NULL auto_increment, `name` varchar(255) NOT NULL COMMENT 't...
stackexchange/codereview
I have sql containing 8 table joins which takes time to fetch the data considering the amount of joins in the sql. I could create a temp table and simply the sql which might help speed up the data retrieval process. i am trying to fetch the data using this sql in perl cgi dbi. Does it makes sense to create a temp tabl...
stackexchange/codereview
Even though I have read a lot about it I can't get my head around the prototype concept. Why is there a String and String.prototype? If I have "cat": Is that a String or an Object? Does it inherits all properties/methods from String or String.prototype? Why is there a String and String.prototype? Should I call String ...
stackexchange/codereview
Currently I am using custom made Java search engine. This Java engine uses Lucene to index MySql records. The are several problems with search engine: 1- Search results are not accurate. 2- It do not use weighting algorithms to make most matching result on top. 3- It consumes lot of memory. 4- Very hard to maintain, fo...
stackexchange/codereview
What would be the best way to detect if the SessionState has died in order to send the user to a "Session Expired" page? I've successfully configured the app (in Web.config) to do this when the authentication cookie is gone (there's a setting for that), but so far I haven't found an effective way to do something simila...
stackexchange/codereview
I want to get a list of the latest commits on a certain remote Git repository. However, I do not want to create a clone because that takes too long. With SVN, I can simply pass along a username and password. With Git I haven't found an option to do this. Also, is there an XML output option like with SVN?
stackexchange/codereview
I have two domains, domain.com and main.com. I need to go to main.com and return to domain.com How to do these redirects without looping? And I can`t add GET parameter. domain.com → main.com → domain.com
stackexchange/codereview
A lot of people have the problem that when they start from nautilus a JAR-application, that the CWD (Current Working Directory) is set to their home folder (and not the folder in which the JAR is in). This is a bug in Nautilus, not especially Linux. If you know a trick to make it easier to start a Jar correct instead o...
stackexchange/codereview
I have a method in my class that accepts an object by reference. It decorates that object to extend the functionality. basically... public function addObject( &$object ) { $object = $this->decorate( $object ); } I'm trying to write a convenience method addObjects() but it's not changing $object This does not work....
stackexchange/codereview
I have a very large amount of code written in VBA that I need to migrate to a .Net application. It isn't practical to rewrite all of it as there is just too much, so I was wondering if there is a way to call these vba functions from .NET Thanks. Update: I've been investigating these and it turns out they aren't approp...
stackexchange/codereview
I am a college student taking a intro to programming C#. That being said, We have created a form that asks for various input. Once you click the "calculate" button, the program checks the input fields for correct format. If it is incorrect, it creates an error. How would I create a input dialog box (like that of VB) wi...
stackexchange/codereview
I'm writing the code for a form, and submitting it to a php file using $.get(). On submitting the form, Firebug responds with the error : Failed to load source for: http://localhost/llm/llm.php?name=afaf If I only write http://localhost/llm/llm.php?name=afaf in the address bar then it works properly! Here's my html an...
stackexchange/codereview
char *getInput2(char *param) { int data_len; data_len=atoi(getenv("CONTENT_LENGTH")); char input[9]; fgets(input, 9, stdin); return strdup (input+6); } and char *getInput2(char *param) { char input[9]; fgets(input, 9, stdin); return strdup (input+6); } why the ouptut of above func...
stackexchange/codereview
is there any way for me to open an WPF application from a WinForms app ? I've been trying this ProcessStartInfo procInfo = new ProcessStartInfo(@"path-to-app-exe"); But no luck, hope someone can give me some pointers. Thanks /sushiBite
stackexchange/codereview
Does anyone have information on developing a LDAP server in Delphi? I have a multi-function printing device that needs to authenticate a user over LDAP. There are a set of rules that should be checked before the approval can be given to the user to print. These rules need to be implemented server side, so that the prin...
stackexchange/codereview
I am beginner to drupal and doesn't know more about it I am amazing about drupal theme works. And I would like know drupal theme's flow of execution. If i open theme folder..., there is a file like page.tpl, template.tpl,node.tpl and more... In which order the drupal reads all those theming file...
stackexchange/codereview
I have implemented an OpenID IdP and an RP. They seem to be working-- the RP is contacting the IdP and is redirecting to the IdP for authentication. The only problem is when I am on the authenticate/authorize page it says "This site failed verification." I dug around in the code a little and saw a few things that it...
stackexchange/codereview
I have a feeling that me asking this question may suggest that my design needs some refactoring, but here goes.. NHibernate constructs classes using a empty no argument constructor and then sets the properties. What if I wanted to do some logic after the object is constructed and properties are instantiated? Is there ...
stackexchange/codereview
Okay, I'm trying to make a div fit to the size of the browser window. SO I have a div with height:100%. This is all well and good. However, this contains a table (in an ASPX control I can't change the code of, etc., etc.), and many levels down there's a div with "height:1869px" (and overflow:auto and position:relative...
stackexchange/codereview
We have a new requirement that every entity must have a user-assignable ID: public class Entity { public int ServerId { get; set; } public int UserId { get; set; } } The ServerId is an auto-generated ID using HiLo and the UserId is the user-specified ID. However, if the user does NOT set a UserId, it should de...
stackexchange/codereview
In C++ I can do the following: template<typename T, typename V> struct{ void operator()(T _1, V _2){ _2.foo( _1 ); } }; which lets me arbitrarily decide to use any object which has some method called "foo" that takes some type "T" without specifying in advance either the argument type of the "foo" func...
stackexchange/codereview
I have a php form and I want to display or hide certain fields dependant on what I select in a drop down. I have code below which works: $(document).ready(function() { $('div.pupname').hide(); $('div.pupnid').hide(); if ($("#perpetrator").val == "1") { $('div.pupname').hide(); $('div.pupid'...
stackexchange/codereview
I have a problem concerning Google cache my old content URLs while I created a new website I have an old website where the old webpages are dead now and created a new website with new webpages. Because I have old content so when people search on Google for old content the old URLs appear in the search results (as it wa...
stackexchange/codereview