instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I would like a test like this one: [Test] public void TestCollectionAssert () { var a1 = new [] { new [] { "a" } }; var a2 = new [] { new [] { "a" } }; Assert.AreNotEqual (a1, a2); //CollectionAssert.AreEqual (a1, a2); CollectionAssert.AreEquivalent (a1, a2); } to p...
stackexchange/codereview
I have a map which shows correctly, the only thing I want to do now is set the zoom level when it loads. Is there a way to do this? Thanks
stackexchange/codereview
When I delete a file from TFS version control and "check-in" the change, the file still exists in my local working directory. Is there a way I can get TFS or Visual Studio to clean-up after itself without having to manually deleting the files myself or changing my workspace to a different directory? Cheers.
stackexchange/codereview
According to Professional Javascript for Web developers array is not a datatype in Javascript: ❑ “undefined” if the value is undefined ❑ “boolean” if the value is a Boolean ❑ “string” if the value is a string ❑ “number” if the value is a number ❑ “object” if the value is an object or null ❑ “function” i...
stackexchange/codereview
I'm trying to implement a twitter iPhone app like interface. (Swipe to replace view in a tableviewcell with a custom view). I'm using Apple's UISwipeGestureRecognizer to recognize the swipe and I'm getting the start location for that swipe using [recognizer locationInView:self.view]. This gives me a CGPoint and I'm usi...
stackexchange/codereview
I'm currently working on the user interface of a win forms application. The primary window is a borderless form whose surface area is almost entirely rendered in the Form.Paint event. A back buffer is created and it's drawn fairly conventionally: private void form_Paint(object sender, PaintEventArgs e) { e.Graphics.D...
stackexchange/codereview
I need to search for the first, last, any, or all occurence of something in something else. To avoid repeating myself (DRY) I came up with the following solution. Of interest are the methods search_revisions() and collect_one_occurence() of both Searcher classes. In SearcherYield I create a generator in search_revision...
stackexchange/codereview
I cann't make my application to apply Windows visual styles. Application.EnableVisualStyles() in program.cs not changing RenderWithVisualStyle property to true. [STAThread] public static void Main(string[] startArgument) { Application.EnableVisualStyles(); Application.SetCompati...
stackexchange/codereview
When a TForm is created in Builder (or Delphi) code is added to main to create these forms at application launch: Application->CreateForm( __classid( TxForm), &xForm ); this makes things easier, but is it wise when the applications has 10, 20, 50, 100 forms? I am assuming that this can grab all kinds of memory and sy...
stackexchange/codereview
Does anyone know why keybinding to ALT+0 thru ALT+9 does not work in WPF? I even tried it in the WPFApplicationFramework Shortcut Key example and nothing happens if you change the Modifier to the ALT Key plus NumPad0. It works with Control and NumPad0 though.
stackexchange/codereview
I am trying to connect to an smtp server that requires authentication. This is the C# code i am using to send the email: var smtpClient = new SmtpClient(); smtpClient.Host = _smtpServerHost; smtpClient.Credentials = new NetworkCredential(_username, _password); smtpClient.UseDefaultCredentials = false; smtpClient.Send(G...
stackexchange/codereview
When I use WCF to expose a DataContract as a SOAP wevservice I get some funky genenerated names, such as: [Flags] public enum EnumType1 { EnumMember1 = 1; EnumMember2 = 2; EnumMember3 = 4; } [DataMember] private Dictionary< EnumType1, Class1> Class1Dictionary; Has this soap representation over the wire: ...
stackexchange/codereview
I'm so stuck on this. I need to retrieve a picture e.g. http://ip:port/icon_contact.png using JavaScript from another server requiring basic authentication. The server can't give base64. Don't worry about x-domain restriction. thanks in advance, louenas
stackexchange/codereview
I have a very large SELECT stored procedure that has multiple return columns and multiple INNER JOINS and LEFT JOINS. I also have a table function with 10 columns and the result set of the table function is based of a user ID. My question is, how do I incorporate the table function into the main SELECT stored procedur...
stackexchange/codereview
Thanks to Hans Passant answering my question here: How do I get an IL bytearray from a DynamicMethod? I was able to get up and running. I am now trying to resolve the Metadata tokens found in the IL emitted, to see what methods are being called, or what not. I am able to resolve that the next token in the method body i...
stackexchange/codereview
i m using jqGrid along with asp.net mvc2... the problem is that i m calling a grid on button click event.. now evertime if i click the button the grid is getting reloaded but the edit and refresh buttons are displayed more than once.. how to solve this problem? here is the image function BindGrid() { if (!firstCli...
stackexchange/codereview
I am trying to use javascript/jquery. I have got below HTML where I want to work on "onclick" event of image link. <div id="galleryContainer"> <ul class="galleryThumbnails"> <li><a href="/99/english/destinations_offers/destinations/asiapacific/india/newdelhi/photo.aspx?item=media_616165_ID0EV&amp;menu=image...
stackexchange/codereview
I now think about write a parser to parse Logical Expressions Relational Algebra to T-Sql Codes and vice-versa! Whether there is an parser to do this? Otherwise how can i do this? What is the basics of writing a parser?
stackexchange/codereview
I am using Xcode 3.2, Mac OS 10.6 and svn for version control. I am using beanstalk for this svn. I created a repository in beanstalk and made changes in Xcode. When I tried to commit the project from SCM, I got this error: Error: 155005 (Working copy not locked; this is probably a bug, please report) Description: Com...
stackexchange/codereview
I was messing around with JAX-RS and made an application which calls REST services which produce JSON. I tried Jersey and everything went fine, but I had to switch to RESTEasy as my application needs to be built with JDK5. I changed my web.xml to something like this: <web-app> <context-param> <param-name>resteasy.s...
stackexchange/codereview
If I pass Label1.Text through a function it treats it as an object and not a string. Which is good. But when I do something like: Dim temp As Object = Label1.Text And then pass it through a function it treats it as a string, which is to be expected. How can I make it so I can set Label1.Text to an object the same way ...
stackexchange/codereview
It is a SED issue. I am working in Quartz Composer (Mac OSX) script to: Open the last .log from a directory. Getting the last text line of that file and remove its 24 first characters. Show the last line each time a new one is created inside the last .log I think this would be so simple. At this moment, I have this d...
stackexchange/codereview
How to add CGMutablePathRef to NSMutableArray?
stackexchange/codereview
Hi I have to upload different files (Images, Videos and Audio). But the system is crashing due to low memory. I have a lot of controls and each have different listeners. Please point me the best way i need to go so that i use the memory efficiently. When i checked using DDMS eclipse, the memory is creeping from screen ...
stackexchange/codereview
How to use paint() such that when repaint() is called the previously drawn object should not get deleted when drawing the new object. That is the drawing area must get UPDATED only and not REDRAWN. In my code when one of many button is clicked, some aplhabet get displayed. I want to have functionality such that when o...
stackexchange/codereview
i this a valid command $fp = fopen($hyphen + ".html","w"); I have declared $hyphen already.But it doesn't seem to be working
stackexchange/codereview
Let's say that I have a rails plugin called "wipy" on GitHub. It has a master branch and it has production branch. I am using Rails 2.3.10. I need to install production branch of this plugin. This is what I do currently: git clone git://github.com/nadala/demo.git git co -b production origin/production cp -rv wipy ~/my_...
stackexchange/codereview
I have heard that the cmd shell passes the entire thing to the command, and then a standard C library delimits it, taking into account spaces and quotes. And that in linux just the shell does it. A program with a while loop, displaying argsv[i] shows how it gets delimited, but not what is done by the shell, and what is...
stackexchange/codereview
Im building a Link Checker function that checks if the link has code 200/301/302. I want to check about 1000 links so i I used the Multi-CURL functionality and i do get all the headers, codes, the URL to which a URL redirected. The Problem is that Multi-CURL executes in parallel adding all the URLs to curl_multi_add_ha...
stackexchange/codereview
I have two JTabbedPanes, JTabbedPane1 & 2 How can I press button in JTabbedPane2 to show JTabbedPane1 ? Here is the code for JTabbedPane: public class TabbedPane extends JFrame { public TabbedPane() { setTitle("Tabbed Pane"); setSize(300,300); JTabbedPane jtp = new JTabbedPane(); ...
stackexchange/codereview
Given this query: select distinct subject_key from mytable Result: subject_key ----------- 90896959 90895823 90690171 90669265 90671321 How do i write a query in Oracle (using Aqua Data Studio backend Oracle 8i) result: subject_key ----------- 90896959, 90895823, 90690171, 90669265, 90671321 THANKS ALL! Should I ...
stackexchange/codereview
MIN/MAX vs ORDER BY and LIMIT To follow up on this question: I found some results very different from what Sean McSomething describes: I have a table with about 300M rows. Select max(foo) from bar; takes about 15 sec. to run Select foo from bar order by foo desc limit 1; takes 3 sec. to run Sean's statement "It looks l...
stackexchange/codereview
I am trying to execute command line arguments via Java. For example: // Execute command String command = "cmd /c start cmd.exe"; Process child = Runtime.getRuntime().exec(command); // Get output stream to write from it OutputStream out = child.getOutputStream(); out.write("cd C:/ /r/n".getBytes()); out.flush(); out.w...
stackexchange/codereview
I have a (seemingly) simple question to read in a string and print it out again using x86 interrupt based assembly. The problem i'm having is accessing the string that has been read in properly. The variable - input db 20, 0, " " is my initial string. After I call the input interrupt, the 0 should no...
stackexchange/codereview
I have two domains, one is a .com domain and the other is a .ca domain. My current host (on the .com domain) does not allow me to register .ca domains, so i registered one with Netfirms. Netfirms will not let me change the namespace to that of my other host, so i am in need of a way to show one url, but view a differen...
stackexchange/codereview
Is it possible, using an Adorner or other means, to dynamically take a UIElement/FrameworkElement and place it within a dynamically created ScrollViwer? I know that the obvious problem will be that you have to detach the element from it's parent element first, but I am looking for an elegant way of doing this.
stackexchange/codereview
I'm building a feature in our ASP.NET application where the feature is simply a background service that runs and deletes some old data. I'm using a System.Timers.Timer to run the service every 12 hours. My question is, how can I build this so that QA can properly test the feature? Obviously I cannot expect QA to wait 1...
stackexchange/codereview
I want 2 or more DLLs in one Assembly. How can I do this in .NET(VS) or is it even possible? thanks..
stackexchange/codereview
I use git clone from github and I deleted some files & modified some files. Now I want to keep my local code & restore to the original form. Is there a command to achieve this?
stackexchange/codereview
$datef = (date("Y-m-d",mktime(0, 0, 0, $_POST['month'], $_POST['day'], $_POST['year']))); Out of interest, i'm using this code above to select records from mysql, which bits would i have to change to specify hours aswell not just month, day and year. The column type is TIMESTAMP if that helps, Thanks
stackexchange/codereview
I'm trying to show a tooltip regardless of a buttons state, but this does not seem to do the trick: <Button Command="{Binding Path=CommandExecuteAction}" ToolTip="{Binding Path=Description}" ToolTipService.ShowOnDisabled="true" Style="{StaticResource toolbarButton}"> <Image Source="{Binding Path=Ico...
stackexchange/codereview
I am trying to do aggregations in case statement. I found 2 ways to do it. Can anyone say what the difference between the 2 is? (CASE WHEN Event = 5 THEN count(*) ELSE 0 END ) Follow_Count GROUP BY Event; SUM(CASE Event WHEN 5 THEN 1 ELSE 0 END) AS Follow_Count
stackexchange/codereview
ECMAScript is pretty straightforward about var. If you don't use var inside a function to declare a variable you assign to you assign to the global scope. This happens because of the way chain scoping works. The executing environment looks for the identifier in the local scope and then moves up until it reaches the glo...
stackexchange/codereview
I'm getting some strange behaviour with my form (using Zend Form). I have a login and register form, if you submit these forms and cause an error, the error message does not go away even after you close the page. It seems that it is being stored in session variables. I have tried using $form->clearErrorMessages(); but ...
stackexchange/codereview
Request you to please help me to solve my problem. I am new to web-services and HTTP. I wrote following code to update data to website. Code run; but I am not able to see my data if uploaded. Here we have facility to see what data is getting uploaded but I am not able to see my data. // Above URL is not real as ...
stackexchange/codereview
i need a some help , executing fallowing task. can any one help to sort out this ? I have list view . each row contains Title (Textview) sub title(TextView) Progress bar progress count(TextView) Download/ Cancel(ToggleButton) while loading adapter i passed List . from where am displaying title , subtitle for each ro...
stackexchange/codereview
I'm using AJAX Control Toolkit with Visual Studio 2005. I don't have the vs template so I don't know what goes in my web.config? Thanks, rod.
stackexchange/codereview
I want to find all employees from a company where the telephone number is NOT empty. Now I have this: db.GqlQuery('SELECT * FROM Employee ' 'WHERE company = :company ' 'AND phone > :nophone', company=company, nophone=None) But this always prints out empty results although there are items with telephone n...
stackexchange/codereview
If I have the follow 2 sets of code, how do I glue them together? void c_function(void *ptr) { int i; for (i = 0; i < 10; i++) { printf("%p", ptr[i]); } return; } def python_routine(y): x = [] for e in y: x.append(e) How can I call the c_function with a contiguous list of el...
stackexchange/codereview
I just created a new project from a template and when I try to build the project I get a "Could not read archive" error for each nib file from the compiler. I did some Googling but could not find an explanation or steps to debug. Has anyone run into this error before or can someone explain what it means? When I try to ...
stackexchange/codereview
I'm in a bit of a situation. You see, when rendering my model with my renderMesh() function, the game was at about 30fps. When rendering to a display list, and running that, the fps went to about 450fps. Thats a gain of 1500%. I was overjoyed by this, for it meant that OpenGL wasn't the cause of the lag, it was the fun...
stackexchange/codereview
We've been working on this for days and we are stumped. This is supposed to be an easy tutortial using TopLink. We are trying to get this to work before we do our real web app. This is the following exception we get: Exception in thread "main" javax.persistence.PersistenceException: No Persistence provider for Entit...
stackexchange/codereview
I've been playing around with something I was hoping I could contribute to the example archive, but I was struggling with extracting the members of a group, and also accessing a thread in a discussion board. From what I gather, discussion boards aren't accessible through Graph calls, but I was hoping someone had any go...
stackexchange/codereview
I need to operate on 64bit integers. I am trying to get the result of 36 raised to the power of 12 as an exercise (and as a requirement). I've used unsigned long long for 64 bit integer on my VS2008 compiler. I've made the code below and can someone explain to me, why my for loop version produces incorrect results whil...
stackexchange/codereview
I can't get the adb to run. From the dos line when I type adb I get "error: write failure during connection. I'm running Motodev's eclipse (probably Ganymede or Galileo) on windows XP. I've reinstalled eclipse and android three times from an administrator's account, and I've removed all virus software from the computer...
stackexchange/codereview
Lets imagine that site A embeds a javascript file using a standard script tag pointing to server B. Next Site A makes a JSONP or AJAX request to a resource on server B. Is there anyway for Server B to definitively know that specific JSONP request originated from a user on Site A, and not a user on another site spoofing...
stackexchange/codereview
I have public static readonly Dictionary<string, EventHandler> CacheHandlers = new Dictionary<string, EventHandler>(); and I have duplicate keys in this dictionary: debugger screenshot: https://i.stack.imgur.com/tuXI7.png How does it happen? Is it a bug in the .net framework or could it be an artifact of concurent usa...
stackexchange/codereview
Given a model with both Boolean and TextField fields, I want to do a query that finds records that match some criteria AND have more than "n" words in the TextField. Is this possible? e..g.: class Item(models.Model): ... notes = models.TextField(blank=True,) has_media = models.BooleanField(default=Fals...
stackexchange/codereview
Here is my text file forms. S1,F2 title including several white spaces (abbr) single,Here<->There,reply S1,F2 title including several white spaces (abbr) single,Here<->There S1,F2 title including several white spaces (abbr) single,Here<->There,[reply] How to change my reg ex to work on all the three forms above?...
stackexchange/codereview
I have a question... I need to build an app multi-thread and my question is: if I have a 2cpu processor, is automatically that my 2 threads are separately one by processor? and if I have 4 threads and my pc have 4cpu, are again 1 per processor? and if I have 4 processor and 2 cpus, how is divided?? thanks in advance
stackexchange/codereview
A Windows service when trying to access the .Body property of a MSMQ message object throws an EOleException - but only when the Xml document contained in this message has an empty list node. The EOleException message complains about insufficient memory (exception code -2147024882). Since the exception only occurs with ...
stackexchange/codereview
How to encrypt java MIDP application? I need to encrypt the application, not obfuscate, I already use ProGuard to obfuscate my application, but the classes files still can be decompiled. I have tried using ClassGuard to encrypt my Mobile Aplication, but ClassGuard does not support MIDP application. It only support java...
stackexchange/codereview
I'm reading some sources for Android, and I read this: OutputStream thumbOut = mCr.openOutputStream(uri); bitmap.compress(Bitmap.CompressFormat.JPEG, 85, thumbOut); thumbOut.close(); when trying to store a bitmap (bitmap) in a database (uri is the URI of a row in the database). As far as I can understand, openOutputSt...
stackexchange/codereview
I am using MVC2 on VS2010 Express edition. I Have a (simplified) page that includes RenderPartial for a dialog. The dialog is supposed to pop up when a button is clicked. However, if I include modal:true as one of the dialog options, then when the button is clicked nothing happens. The dialog does not pop up. When...
stackexchange/codereview
im using spring+hibernate for a desktop application. I'm trying to build it with a layered implementation, so i have: GUI layer --call--> Service layer --call--> DAO layer A small example to better exaplain my situation: // In GUI layer private void actionPerformed(ActionEvent evt){ addUser(); } private void addUs...
stackexchange/codereview
Is it possible to get ALL of the styles for an object using JavaScript? Something like: main.css ------- #myLayer { position: absolute; width: 200px; height: 100px; color: #0000ff; } main.js ------- var ob = document.getElementById("myLayer"); var pos = ob.(getPosition); // Pos should equal "absolute" but //...
stackexchange/codereview
This code works fine when running in the emulator: menuAudio = ScreenManager.Game.Content.Load<Song>("music\\MenuEntry"); // Kick off the music for the title screen if (MediaPlayer.State != MediaState.Playing) { MediaPlayer.IsRepeating = true; MediaPlayer.Play(menuAudio); MediaPlayer.Volume = 1f; } But...
stackexchange/codereview
How do you activate a link when the page loads using javascript? I am trying to open a lightbox when the page loads, here is the link I am trying to activate. <a href="#home_video" rel="facebox">Replay Intro</a>
stackexchange/codereview
Java newbie here, I have a problem that I have been banging my head on the wall for several hours now. Basically, I need to read a text file that contains String, Integer, and Double datatypes. (see below for the file) The text is formatted in two lines. The first line is only the product name, and the second line is ...
stackexchange/codereview
i have a php page which has some variables regarding database i.e server address, username and password etc. config.php will include <?php $dbserver=""; $username=""; $password=""; $database=""; ?> i have a class which contains all the functions required for my website. How can i import my php page variable...
stackexchange/codereview
I want to do something like this in my asp code: <% foreach Record record in listOfRecords { %> <asp:checkbox runat="server" id="employeeIdNumber" /> <p>Employee's Name: <%= record.name %> </p> <p>Employee's Phone Number: <%= record.phoneNumber %></p> <% } %> The problem is that the checkbox id is a string literal. ...
stackexchange/codereview
E.g. var new = canvas.toDataURL("image/png"); I want the base64 that is present in this new variable to be displayed into 2nd canvas element that is present. But it does not display the base64 image using drawimage method. It works if I use say image.png
stackexchange/codereview
I have a swing app with a text box bound to a property on my model (this is a READ_WRITE AutoBinding). The model also has an isDirty property that I want to bind to a button's enabled property. How do I properly notify the binding when I change the state of isDirty. Here is my binding code: BeanProperty<PaChannelConfig...
stackexchange/codereview
I am looking for a pattern, algorithm, or library that will take a set of dates and return a description of the recurrence if one exits, i.e. the set [11-01-2010, 11-08-2010, 11-15-2010, 11-22-2010, 11-29-2010] would yield something like "Every Monday in November". Has anyone seen anything like this before or have any ...
stackexchange/codereview
When the page loads, the GridView (located in an update panel) should be loaded with my first SQL SELECT statement. On the button click, the same GridView will be loaded with new data. What am i doing wrong? On startup, the GridView doesn't appear. Public cmd As New SqlCommand() Public percentp As New SqlComma...
stackexchange/codereview
I'm using Seam 2.2.1 for a little project of mine. I know there is a excel export for richfaces:dataTable but is there something like this for PDFs too? I don't really want to write a PDF export with iText. Regards
stackexchange/codereview
Okay so i have been working on this for a while now, i know this has got to be easier than im making it but what im trying to do is i have my xml preference layout or whatever you would like to call it, on that layout i have several check boxes a list view item and an edit text, what i need to do is get those preferenc...
stackexchange/codereview
i created a edit box but it doesn't show on the window. it shows if the window is not full screen. if it is full screen the edit box goes behind it. here is the function for the edit box HWND editbox=CreateWindowA("EDIT", NULL, WS_VISIBLE | WS_EX_TOPMOST | WS_BORDER | ES_LEFT, ...
stackexchange/codereview
I need to add gallery to my android app. I used gallery in standard way, when pictures are in my folder, but now I need to show pictures when I have just pictures URLs(pictures are on some distant server). How can I achieve that ?
stackexchange/codereview
Suppose I have a game written in C/C++. For simplicity, I have: struct masterStruct { Coords player1; Weapon player1; Gravity player1; ... }; Suppose this struct contains 1000s of variables that relate to the player. I want to be able to create a "snapshot" of the player's state at time t...
stackexchange/codereview
Does JBoss support WebSockets? Where can I find an example? ( I did try looking around for an answer, but ended up confused by product names. There is something called infinispan which might handle websockets, then there is HornetQ which might not be up to date, then there is a patch for Netty... I don't know what t...
stackexchange/codereview
Alright I seem to have a misconception with variable scope with PHP, forgive my lack of the subject as I come from a Java, C# background. Thinking I could make variables accessible to functions or if statements simply by placing it outside it. Below is a snippet of what I'm trying to accomplish: foreach ($nm as $row=...
stackexchange/codereview
I have model 'Human' and this model has integer attribute :age. For example, I use validation for this integer attribute :age. When I add new 'Human' with wrong value of :age (e.g. "2aaa3") it is render me back with error, but it is also cut :age like "2". But I don't want it. I want to leave last wrong value "2aaa3"...
stackexchange/codereview
Why is this code not working? public class A { public Dictionary<int, string> dic { get; set; } } class Program { public static void Main() { A a = new A(); a.dic.Add(1, "a"); } } Error: System.NullReferenceException was unhandled Message=Object reference not set to an insta...
stackexchange/codereview
This is a game were a user enters a random number, then clicks "Play", they'll see a set of boxes appear with randomly generated numbers. The object of the game is to click on the box that has your number to build points. How can I make it so, they lose points if they don't click on the box that has their number. see g...
stackexchange/codereview
Given the string: © 2010 Women’s Flat Track Derby Association (WFTDA) I want: 2010 -- Women's -- Flat Women's -- Flat -- Track Track -- Derby -- Association I'm using regex: ([a-zA-Z]+)\s([A-Z][a-z]*)\s([a-zA-Z]+) It's only returning: s -- Flat -- Track
stackexchange/codereview
It sounds like to me that the Model class holds information about all or nearly all attributes in a program... so should it contain things like getters and setters? Or am I getting the wrong idea?
stackexchange/codereview
I'm working on a Flash magazine. When the magazine loads, it starts fetching all the needed images for the pages. However, I've run into a strange Security Issue :S. Let me try to explain... This is how everything is setup on the server: mydomain.com/view.html <--- the main page that embeds /swf/theviewer.swf ...
stackexchange/codereview
I am trying to build a form for registering a user - using Django's built in user model and using generic views. I can't figure out how to confirm a password. <form action="." method="post"> {% csrf_token %} {{ form.non_field_errors }} <p> {{ form.username.errors }} <label for="username">Username<...
stackexchange/codereview
I want to add some javascript in wordpress, something like if(iNum==0&&iNum+1!=l) It shows up wrong, in the source code I found & became &#038; how do I solve it? Thanks. if(iNum==0&#038;\&#038; iNum+1!=l)
stackexchange/codereview
I've been trying to use a method commonly used to resize an image. Without using this method, here is the code that takes a url of an image. NSData *data = [NSData dataWithContentsOfURL:url]; UIImage *img = [[UIImage alloc] initWithData:data]; cell.imageView.image = img; This works fine. But when I try to use this ...
stackexchange/codereview
The usual clone idiom makes use of covariant return types: struct Base { virtual Base* clone(); }; struct Derived : public Base { Derived* clone(); }; I've read things to the effect that covariant return types were a later addition to C++, and older compilers may not support them. In this case the Derived cl...
stackexchange/codereview
I'm building a monitor app and am having some threading issues. I have, using a cbt hook, injected a dll in to another processes memory. I am reading the memory of the other application at certain addresses. The trouble is I was using a loop to watch the process and basically the app being watched wasn't free to car...
stackexchange/codereview
var v = object.where(a => a.date > DateTime(2000,1,1,)); list = v.ToList(); Ok, so for the following code, i have break points set up on each line. When i get to the first line, I run the code (F5) until it reaches the 2nd line. When i step forward (F11) from the second line, it returns to the first line. When I ru...
stackexchange/codereview
Using Javascript is it possible to listen for browser's file open/save dialog box event. I want to perform an action when I am notified that the save file dialog box has opened now. Specifically I want to hide a loading spinner when dialog box opens (but this could very well be any other action ) I believe I can do tha...
stackexchange/codereview
When should use post vs get? in a REST service on WCF?, below is my interface [OperationContract] [WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json)] string DoLodge(string Id, Lodge value); [OperationContract] [WebInvoke(Me...
stackexchange/codereview
Is there a way to change the css style(defined in the page source) dynamically with Java? I know it is possible to do it with JavaScript. If there isn't, are there other situations where JavaScript is the only choice developing a web app?
stackexchange/codereview
Looks like simple,but doesn't work) When .jsf page is loaded ,values from DB is shown. dao impl chunk: public List<Product> getProducts() { return getHibernateTemplate().find("from Product"); } managed bean chunk: public List<Product> getProducts() { return this.getProductManager().getProducts(); } I intente...
stackexchange/codereview
Possible Duplicate: Which I/O library do you use in your C++ code? I asked this question in a comment to another question, and I was asked to make it a proper question instead. Why do I want to use iostream instead of stdio? More specifically, what do std::getline have to offer over the C equivalent? Please, no lang...
stackexchange/codereview
Recently I encountered this puzzle : int main(){ int arr[7]; int b,c,d,a; a=4; printf("%d",arr[?]); return 0; } The question is to Replace "?" with a integer so that output is 4. I am not sure but I don't think this is solvable in a standard way ?! (Not invoking Undefined Behavior or depending ...
stackexchange/codereview