instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I'm thinking about which threading library to use for a relatively small C++ project that has to run on x86, x86_64 and powerpc architectures. The project is using ActiveMQ, which provides the decaf::lang::Thread and decaf::util::concurrent facilities. I have no experience with this library and cannot find any tutorial...
stackexchange/codereview
Hi I'm new to Magento, so we installed the Magento Simple checkout which is working fine but when you add a product it takes you to the cart (checkout/cart) which is fine but then it suddenly jumps to (checkout/onepage). Both pages look pretty similar except the cart page gives me the option to keep shopping and change...
stackexchange/codereview
When using this code I get the above error: var userSettings = new UserSettings() { Username = TextBox_Username.ToString(), Password = TextBox_Password.ToString(), Operator = OperatorList.O2 }; var settings = IsolatedStorageSettings.ApplicationSetting...
stackexchange/codereview
I need a Rails plugin that gives you the chance to purely separate HTML and any logic in your views. Views should be classes reading the separate markup and replacing it with dynamic content where needed. Basically Effigy from github does this. I am looking for something like Wicket, but on the Rails base. I can rememb...
stackexchange/codereview
Can I save a file without the save as dialog?
stackexchange/codereview
Ok so here's what I've googled: It seems there is an uploaded file named "image.php" that is uploaded in a qcubed directory. That image.php file contains the following base64 code: aWYoaXNzZXQoJF9QT1NUWydlJ10pKWV2YWwoYmFzZTY0X2RlY29kZSgkX1BPU1RbJ2UnXSkpO2VjaG8gJzMxMzkzNjJlMzIzMzMxMmQzMTM3MzIyZTMyMzgzYTY5NjY2MTYzNjU3MjZ...
stackexchange/codereview
Has anyone tried changing content of the CallContext from a WPF menu? In our app we have an environment string stored in callcontext - on the server it is converted to a db connectionstring (using ILogicalThreadAffinative + .net remoting). On the client it is possible to switch between environments, when changed the n...
stackexchange/codereview
Is there an embeddable scripting language for .Net which supports some kind of yield (program stops and yields control back to host... With next run it continues where it left off)? Furthermore it should be possible to save the state of the vm, and let it continue at some later point. Edit1: I've looked at lua, and whi...
stackexchange/codereview
I am new to jquery and may be my question is very basic. I am implementing an expandable panel in jQuery and above that i have an image of + which is when clicked the panel will expand. i want to change that image to - when the panel is expanded. So basically i want to change the + image to - once + is clicked. Below ...
stackexchange/codereview
I just shoot myself in the foot and would like to know whether there were actual reasons to make this situation possible. And anyway, this question can stay for the convenience of the future foot shooters. Suppose we have a nullable value in vb.net: Dim i as Integer? We want to assign a value to it, basing on a condi...
stackexchange/codereview
Example: url is http://www.mydoman.com/test.aspx/88 I click an asp:Button which cause a postback, but now the url comes up: www.mydoman.com/test.aspx/test.aspx There is nothing special in the button, just id and runat. This only happens when I start with the "/88" in the starting url? Why, and how can I prevent the dup...
stackexchange/codereview
I'm using Blogengine.Net as my blog engine. I'd like to provide SEO friendly addresses like: http://www.mysite.com/post/پسسیبتجدید.aspx But blogengine changes the characters to not SEO friendly codes like: http://www.mysite.com/post/d8aad8a7d9bedb8cdaa9-da86d987d8a7d8b1.aspx My question is: If you're familiar with ...
stackexchange/codereview
What will be the output of the following code? #include<stdio.h> int main() { int a[4]={4096,2,3,4}; char *p; p=a; printf("\n %d",(int)*(++p)); return 0; } sizeof int = sizeof(void*) = 4 bytes According to me the output should be 16 on a little endian machine and 0 on a big endian machine. Am I ri...
stackexchange/codereview
I'm trying embed an Excel file into my Delphi 5 application, so I can avoid my users just deleting the file accidentally. Using the embedded file, I create it on disk with a Save dialog, and then open it with the Excel := CreateOleObject('Excel.Application'); method. I've seen examples on how to load a resource, using ...
stackexchange/codereview
I am trying to use Ext GroupingView but its simply listing the rows without grouping my code for GroupingStore: //......................................................// _store = new Ext.data.GroupingStore({ autoDestroy: true, proxy: new Ext.data.MemoryProxy({ items: [] }), remoteSort: true, groupOnSo...
stackexchange/codereview
I have a .NET 3.5 assembly which is being run as a COM+ server component, and I want to call a method in this class from VBScript (a Classic ASP page). This is the method outline; public bool FillArray(ref string[] arrayToFill) { ... } My VBScript is as follows; Dim myComponent, result, myArray Set myComponent = ...
stackexchange/codereview
yesterday i was reading an article that touched on twitter and made mention of how it can be influential if someone like Tim O'Reilly makes a suggestion then his 1.5 million followers on twitter will react to such tweets and cause some sort of reaction. weather tweets and/ or the entire online social media ecosystem is...
stackexchange/codereview
Right now my app sends out email notifications. I'd like to allow the user to reply directly to the email, which then gets ingested by my app and inserted into the database. Are there any Rails gems, services, tutorials that can point me in the right direction. Also, probably need to make the reply-to email have a UID,...
stackexchange/codereview
I'm wondering what the correct way to go about Automation (like Selenium) is. I was told that I shouldn't put ID's on elements, because this can lead to JS errors (if duplicate ID's exists) and can cause an elements CSS classes to become singletons. I would agree with this, but not having IDs can make Automation a pain...
stackexchange/codereview
I have a software which I will be using. The software has a number of textboxes and I cannot get an access to the code. How can I automatically populate these textboxes through my own databases? So for example I have a win form of another vendor which has textfield of: First Name Last Name Address Now I want to popul...
stackexchange/codereview
Is there any way to display contact picker that has both number and contact name? Now I'm calling picker: startActivityForResult( new Intent(Intent.ACTION_PICK,Contacts.Phones.CONTENT_URI), 1); But in a result I get only Contact names without visible numbers. To make thing...
stackexchange/codereview
i'm trying to execute this query : Code: this.getHibernateTemplate() find("select distinct ci.customer " + "from CustomerInvoice ci " + "where ci.id in (?) " , ids); with ids as a List, id is of type Long when executing i get exception Code: java.lang.ClassCastException: java.util.Arra...
stackexchange/codereview
I currently have an NSData with valid PNG data: NSData* imageData = [bitmapRep representationUsingType:NSPNGFileType properties:nil]; I've written this data out to a file: [imageData writeToFile:@"test.png" atomically:YES]; And compressing it with OptiPNG or PNGCrush yields promising results (25%+ compression). I'd lik...
stackexchange/codereview
I'm creating an Android application that will register an Observer and listen for events, I will probably use one of the suggestions by Mark in this previous question. However, my question is, how can I create a "stub" on Android that I can use to fire events at my applications observer? For the purpose of this example...
stackexchange/codereview
I have a menu that asks for the user to pick one of the options. Since this menu is from 1 to 10, I'm using input besides raw_input. My code as an if statement that if the number the user inputs is from 1 to 10 it does the option. If the user inputs any number besides that ones, the else statement says to the user pick...
stackexchange/codereview
I send a lot of data through jquerys getJSON method, an example of a function is function doSomething(sid){ if(sid){ $.getJSON("ajax/ajaxDoSomething.php",{sid:""+sid+""}, function(data){ //alert(data); if(data.success == true){ $('#add_vote_div').html('vote received'); $...
stackexchange/codereview
CreateDocument(string templatePath) { Document doc = OpenDocument(templatePath); Picture pic = GetLogo(); AddLogo(doc, pic, templatePath); } AddLogo(Document doc, Picture logo, string templatePath) { Picture placeholder = doc.FindLogoPlaceholder(); if (placeholder.Size != logo.Size) { t...
stackexchange/codereview
Can anyone explain to me why every constant in AT&T syntax has a '$' in front of it? Why do all registers have a '%'? Is this just another attempt to get me to do a lot of lame typing? Also, am I the only one that finds: 16(%esp) really counterintuitive compared to [esp+16]? I know it compiles to the same thing but wh...
stackexchange/codereview
What would you recommend for recognizing all characters from a screenshot? The screenshot is perfectly clear (only black text on a white background), also I can choose any standard font for the text (installed on Windows). I have tried some OCR ways (Tesseract and such), but it made mistakes in recognizing some charact...
stackexchange/codereview
System specs: C# client using .NET 3.0. WCF services hosted as windows services on App Servers. MSSql Server 2008R2 DB for data storage. Hashes of user passwords are stored in the DB for authenticating users. My problem is, I do not know how to securely authenticate the client to the server, using the hash of the clien...
stackexchange/codereview
I have integrated Facebook into my Android application. It was worked fine before last week. Since a couple of days ago (before it was working fine) I now sometimes get an error when posting to wall page saying An error occured with holyplanets connect. Please try again later. Please help me to resolve this issue. Than...
stackexchange/codereview
what is list definition in moss
stackexchange/codereview
I'm trying to build an updater using msiexec to uninstall a program, then install the newer version. Here's my code: command = "/x{[uninstall string here]}"; command += "/qn+ /Le c:\\test\\msilog.txt"; ProcessStartInfo psi = new ProcessStartInfo("msiexec"); psi.Arguments = command; //psi.UseShellExecute = true; //psi.V...
stackexchange/codereview
after migrating from mvc2 - mvc3 with minor issues ... I encounter the following problem when calling Membership.GetAllUsers it seems that instead of System.Web.Security.SqlMembershipProvider WebMatrix.WebData.SimpleMembershipProvider is kicking in. I am using WebMatrix to get razor helpers to work with MVC3. Tried a b...
stackexchange/codereview
This is my c++ code HANDLE hPipe = ::CreateNamedPipe(_T("\\\\.\\pipe\\FirstPipe"), PIPE_ACCESS_DUPLEX, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE, PIPE_UNLIMITED_INSTANCES, 4096, ...
stackexchange/codereview
I have a webapp packaged as a war which I deploy in Jetty (version 6.1.25). The web app makes use of log4j. I would like to be able to configure the webapp logging via a config file which is external to the war (i.e. not burnt in). I've tried using a custom context WebAppContext with an extra class path property pointi...
stackexchange/codereview
I am writing a client library for a web service using CXF. The service uses a mutable key to manage sessions and, optionally, allows a session to be kept alive. I have built a client Client and I want to provide the ability for uses of the library to choose their type of session management i.e. either a manager which ...
stackexchange/codereview
I am trying to write a crude app to loop round querying some of the HTTP Header fields that come back from my server in order to find out which servers are responding OK. My servers respond with a header like this: server = server1 (or server2, server 3 etc). Unfortunately when I do this I get the same server name back...
stackexchange/codereview
How to get the ItemCount for a ListCollection, without actually getting all the list items in SharePoint using SOAP? Is there a SOAP webservice for that?
stackexchange/codereview
Hello I'm trying to build a website using Team Build 2010 (TFS and stuff), but it gives me this error: The type or namespace name 'something_ascx' does not exist in the namespace 'ASP' (are you missing an assembly reference?) As I went to google, I found out that ASP is a 'pseudo' namespace which can't be referenced w...
stackexchange/codereview
What is the meaning of dot in asp.net and what is the meaning of net?
stackexchange/codereview
I'm trying this SQL statement but I keep getting an error Run-time error '3061': Too few parameters. Expected 4. The statement I am trying to execute is: sSQL = "INSERT INTO MasterTable (AdmissionNumber, Surname, Forename, TutorGroup) VALUES (intAdmissionNo, strSurName, strForeName, strTutorGroup)" CurrentDb.Execute ...
stackexchange/codereview
Could anyone tell me what exactly 'SCORM' is? And if it's possible to use with .net? Can any one give me a sample code which is already implemented in asp.net with c# Thank you
stackexchange/codereview
How would I best achieve the following: I would like to find and replace values in a string in PHP unless they are in single or double quotes. EG. $string = 'The quoted words I would like to replace unless they are "part of a quoted string" '; $terms = array( 'quoted' => 'replaced' ); $find = array_keys($terms); $r...
stackexchange/codereview
I am trying to mock out or similar the Query extension method applied to an nhibernate-3 session. Similar to the following... public IQueryable<Entity> GetEntities { return entities = Session.Query<Entity>(); } Where the Query extension method returns an IQueryable collection. I can clearly mock out the Session obj...
stackexchange/codereview
I dont understand what seems to be the problem here...my app just crashes. And i get the followin logcat error: ERROR/dalvikvm(1270): Could not find class 'intentTest.xyz.com.second', referenced from method intentTest.xyz.com.intentTest$1.onClick 1.intentTest.java: package intentTest.xyz.com; import android.app.Activi...
stackexchange/codereview
Googling didn't help
stackexchange/codereview
chooser = new JFileChooser(); chooser.setSize(300, 200); if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) { ....... } This doesn't work. Always opens in default size.
stackexchange/codereview
AM getting below error while converting json response into NSdictionary in json parsing... ERROR:-JSONValue failed. Error trace is: ( Error Domain=org.brautaset.JSON.ErrorDomain Code=3 UserInfo=0x4d38270 "Unrecognised leading character" ) any suggestion...
stackexchange/codereview
I have an EditText which when some text entered the virtual keyboard appears and when I press enter I can't get focus in my second EditText, but some times it works. Anybody please help. edittext.setOnKeyListener(new OnKeyListener() { public boolean onKey(View v, int keyCode, KeyEvent event) { if (keyCode...
stackexchange/codereview
I'm working with some hardware which has a DLL. I believe it has two methods of calling the functionality (from using a DLL spy app). It currently works in VB6 using Public Type Versions Pname As Long Manuf As Long VMajor As Long VMinor As Long VState As Long End Type Public Declare Function FLASH_GetV...
stackexchange/codereview
I have a problem with an ifstatement in a StringTokenizer method i think it is due to it being a char array, I have tryed to convert it but it seems not to work any help would be aprecheated thanks harry. char[] password = loginPass.getPassword(); StringTokenizer st = new StringTokenizer(theText, ","); if (thisToken.eq...
stackexchange/codereview
I know that using DataSets are a big evil, but as the service is not under my control and the prospect of creating a proxy service is a no go.... What i'm trying to see is if anyone has created class structure that can be deserialized using the kSoap serializer, or am i smoking the wrong stuff. Going to start it in th...
stackexchange/codereview
I have no experience running programs from the command line, and I wish to run mscordmp from the command line which is a VS utility. The documentation shows as such: mscordmp [options] /pid processID /out outputFile but when I run from command line it says not recognised. Do i need to ensure a specific prompt? A...
stackexchange/codereview
I have the following XML code <para>Lorem ipsum <link>dolor</link> sit amet</para> which I want to transform to <para>Lorem ipsum </para><link>dolor</link><para> sit amet</para> In other words: I'd like to split the para element at the position where link element is. Are there any hints?
stackexchange/codereview
I've read how the anchor tag is holy, it should not be used with javascript: <a href="javascript:(alert('no!'))">Popup</a> that it should ONLY be used for a link to another page: <a href="/grassIsAlwaysGreener.html">Take me over there</a> So what is the proper use of the anchor tag with javascript? Should I be using: ...
stackexchange/codereview
I've tried simply copying and pasting a storyboard into a resource dictionary but it doesn't work. So how can i successfully move a storyboard animation into a resource dictionary so that the main xaml file is as clean and readable as possible? Here is an example of code i want to move into animationResource.xaml <!-- ...
stackexchange/codereview
I want to refactor many similar controls that only differ in the value of a single property (besides positioning properties). Imagine that I have an user control (let's call it UC1) that have a Label. The Label.Content should be value + ":" where value is passed through a Property to the user control. I could implement...
stackexchange/codereview
http://www.flickr.com/photos/fraserspeirs/4329430635/in/set-72157623224262135/ The above is a link basically showing the form fill view of the numbers app on the iPad. Any idea as to how to achieve such a functionality which sort of looks like our vanilla tabs on Chrome?
stackexchange/codereview
In project there is a DataGridView. I have a little bit of code that I which displays information based on the cell that was clicked. My problem is how to detect if the user clicked on a column or row header (anything other than a cell). All this is tied to the 'dataGridView1_CellMouseDown' method, and I'm using the Hi...
stackexchange/codereview
I want to get all visible columns (Hidden == false) for specific list in sharePoint site, I tried to look through the SharePointWebService.Lists.GetList(listName), but couldn't find anything useful, also checked the methods provided by the Lists WebService and also nothing new, Please advice.
stackexchange/codereview
I have a query with many wheres and orders criterias. One of the fields of the select is 'price' (element price) but I would like to have also (in every row) the maximun price of all the selected elements. I tried to include MAX aggregate function on select hoping that this will return desired value, but insetead of th...
stackexchange/codereview
I am trying to compile my boost simple code: #include <iostream> #include <boost/thread.hpp> void workerFunc(const char* msg, float delay_ms) { boost::posix_time::milliseconds workTime(delay_ms); std::cout << "Worker: running, message = " << msg << std::endl; // Pretend to do something useful... boost::this_thread::...
stackexchange/codereview
I am catching an INT signal in java using the following code: Signal.handle(new Signal("INT"), new SignalHandler () { public void handle(Signal sig) { log.warn("Received SIGINT signal. Will teardown."); task.tearDown(); // Force exit anyway System.exit(1); ...
stackexchange/codereview
as I know that we need the /release switch for linker to create the checksum value, can anyone tell me what is this for?
stackexchange/codereview
Does any one have any suggestion to learn Archimate? I need some study guide. I used a book called "Enterprise architecture at work" but I gave up on fifth part named "Language for Enterprise Modelling" it was very vague to understand.
stackexchange/codereview
In the introduction video of Google Wave they talk about a problem with chat in webapplications. In many webapplications you see a message like: <name> is typing.. (before the message is submitted) Google came up with an idea "to show each character typed while typing" to avoid this annoying message. How do you create ...
stackexchange/codereview
I tested calling a soap 12 webservices with ksoap2. I used this code to call the webservice: SoapObject request = new SoapObject(NAMESPACE, NAME); request.addProperty("id", ID); request.addProperty("name", "test@test.de"); request.addProperty("pw", "password"); request.addProperty("listid", 501); SoapSerializationE...
stackexchange/codereview
In a server side extension for SmartfoxServer (which uses Rhino) I had a piece of Javascript similar to this: response["xpos"] = properties.get("xpos"); send(JSON.stringify(response)); This caused errors. What happened? Because properties is a Java Map, when a number is put into it, it's autoboxed into a java.lang.Dou...
stackexchange/codereview
I am using ICSharpCode.SharpZipLib.Zip.FastZip to zip files but I'm stuck on a problem: When I try to zip a file with special characters in its file name, it does not work. It works when there are no special characters in the file name.
stackexchange/codereview
I am working in C++ in linux. I am wondering is there a BinaryReader and BinaryWriter equivalence of the C# in linux? Thanks.
stackexchange/codereview
I have a trait "Foo" with some methods. I want to mix this trait to any class. But I dont want to write something like val b = new Bar with Foo I need something like where I just pass a class and it is mixed with Foo. I want to mix with this trait only i.e it is fixed that all classes should be mixed with Foo trait o...
stackexchange/codereview
I'm investigating Zepto.js for a mobile project but not finding much documentation on the .anim action. I know it is webkit specific but which parts of the webkit animation css does it work with? For example, 3d transforms?
stackexchange/codereview
A stored procedure is given that can't be changed. It returns a cursor with a number of columns in the result. Is there a simple way in Oracle to BULK COLLECT INTOonly a subset of columns provided by the cursor? FOR loops and new collection types should be avoided. I would not like to fetch all data from the cursor, ju...
stackexchange/codereview
I have a folder of .txt files which I want to store in a hash. Then compare the file against an array of specific words. While counting the amount of times the specific words occur.
stackexchange/codereview
I have an ancient web service client that needs to talk to my WCF 4.0 service. The client is a large old system in a another company that is not going to change. We have new clients that needs WCF functionality, so we have it, but now some more work is needed to support the old client. I have decorated several parts of...
stackexchange/codereview
I'm working on an app that uses Core Data and NSFetchedResultsController. A major component of the app is the filtering down items in an indexed table view based on a set of 15 or so pre-defined switches that correspond to a property or relationship of my Managed Objects. In most of my situations, I'm searching through...
stackexchange/codereview
use DateTime::TimeZone::Local; use Test::More tests => 1; my @input = (1 .. 10 ); my (@output) = sort { DateTime::TimeZone::Local->TimeZone(); $a cmp $b } @input; is_deeply(\@output, \@input); Output: 1..1 Can't return outside a subroutine at /usr/local/share/perl/5.8.8/DateTime/TimeZone/Local.pm line 72. # ...
stackexchange/codereview
jQuery('.slide').css('opacity','1').animate({ opacity: 0 }, { duration: 9999, complete: function() { this.moveSlideAcross(); // animates a slide across the screen } }); I've set the duration for 9999 and it's animating really really fast....
stackexchange/codereview
I want to translate my html page from English to arabic and arabic to english. I am using "jquery.translate.js" plugin. this plugin will translate my language Am using json file to indicate the changes in the language using span id of the HTML elements. langfiles-ar-SA.json { "ProfileSpan" : "Profile", "Fr...
stackexchange/codereview
I have the following five Moose attributes: has ['summary_file', 'html_file', 'url1', 'url2', 'txt_file'] => ( is => 'rw', isa => 'Str', required => 0, lazy => 1, default => sub { confess "Attribute not set"; }, ); I would like to: Make each of them use its own builder (e.g. se...
stackexchange/codereview
I am new to ANTLR and am trying to parse queries using the following grammar SearchEngineQuery; options { language = CSharp2; output = AST; } tokens { AndNode; } LPARENTHESIS : '('; RPARENTHESIS : ')'; AND : 'and'; OR : 'or'; ANDNOT : 'andnot'; NOT : 'not'; NEAR : 'near'; fragment CHARACTER ...
stackexchange/codereview
I have a query that performs quite nicely when run like this: SELECT YADAYADA FROM MYTABLE WHERE FVAL <= 100 AND TVAL >= 100 Since there's an index for (FVAL,TVAL), the query is totally optimal as a nonclustered index seek for the whole query. Now, it'd be nice to use a constant returned from a user defined function h...
stackexchange/codereview
what is the right use of window.open in IE8? window.open('prova.php','prova','width=350,height=250'); is good in firefox but not in IE8
stackexchange/codereview
I am loading an image from a URL provided by a third-party. There is no file extension (or filename for that matter) on the URL (as it is an obscured URL). I can take the data from this (in the form of NSData) and load it into a UIImage and display it fine. I want to persist this data to a file. However, I don't know w...
stackexchange/codereview
I have a Biztalk orchestration that posts to a http site. the response that comes back is of xmlDocument type, but it only contains a 0, no html/xml at all. All I want to do is set that 0 to a string or something to output it, but I cannot use any of the xmldocument functions because the xml is not well formed, and I c...
stackexchange/codereview
Possible Duplicate: Negative doubles or floats in Haskell (macports) I am new to haskell, and when I try to enter negative floating point numbers (e.g. -1.0) into ghci or use them in modules, I keep getting segmentation faults. How do I give negative floating point values to variables w/o causing seg faults? My ap...
stackexchange/codereview
I am planning to immerse myself in the functional programming paradigm and make the thought process second nature to me. The .Net/Mono is the only framework/objectmodel I am familiar with and I dont want to learn any other type system. That makes F# an obvious consideration since the burden of learning a new type sys...
stackexchange/codereview
I am trying to use the Youtube DataAPI to upload a video to our site's YouTube account. I have been using the examples provided in the documentation for Browser-based uploading and I am able to get the basic example to work. The problem is I can't seem to translate this into a method that I can use with jQuery. In m...
stackexchange/codereview
I am about to run a machine learning program which might take a day or two to complete; I do not want to run it on my laptop, but on a remote server. Now I am thinking if I ssh into the machine and run the program there, and close the ssh session, how will I know next time I ssh into the machine if the program is still...
stackexchange/codereview
How to call interface builder press UIButton.(Navigation based )
stackexchange/codereview
I am currently using Java API to get accelerometer values in 5Hz, which is below my requirements. I want to achieve at least 50Hz. Is there any way to increase the sampling rate of accelerometer? Regards
stackexchange/codereview
I'm using Delphi7. I know that I can use BoldDays in OnGetMonthInfo event of a TMonthCalendar to pass an array of days that I'd like to appear in bold. My problem is that if a new calendar entry is saved, I can't call the OnGetMonthInfo event manually. Using MyCalendar.Date:=IncMonth(MyCalendar.Date, -1); MyCalenda...
stackexchange/codereview
The only way that some JDBC drivers to return Statement.RETURN_GENERATED_KEYS is to do something of the following: long key = -1L; Statement statement = connection.createStatement(); statement.executeUpdate(YOUR_SQL_HERE, Statement.RETURN_GENERATED_KEYS); ResultSet rs = statement.getGeneratedKeys(); if (rs != null && r...
stackexchange/codereview
I asked this question earlier but wasn't as clear as I should be. Basically I wish to change HTML content (that contains external javascript - see below) depending on windows size/screen res. The question is now changed to better reflect what I need to do. Also I would like this to be done via an external javascript fi...
stackexchange/codereview
I'm creating ajax based application. Now I'm working with client side javascript. I created controller which works correctly according to application logic, but i have problems with updating views which contains checkboxes. Here is short example of what I'm doing: <script type='text/javascript'> var model = { 'chk1...
stackexchange/codereview
My problem is im creating a large nested PHP array which is parsing information from multiple external sources. On the first return I would like to cache this data. Im pretty new to caching so don't really know what I should be looking for, any good or bad methods or even if this is common practise! Have googled but n...
stackexchange/codereview
Background: I have an object model that needs to be extended by adding several attributes to a few types, which can vary across installations. For example, my 'user' objects need to have a few extended attributes. On some sites 'users' need several identifiers whereas in other sites 'users' need other attributes like e...
stackexchange/codereview
Does anybody know how I can backup an VMWare ESXi server with C#.net? Thanks
stackexchange/codereview
I have the following boxes: a) A Windows box with Eclipse CDT, b) A Linux box, accessible for me only via SSH. Both the compiler and the hardware required to build and run my project is only on machine B. I'd like to work "transparently" from a Windows box on that project using Eclipse CDT and be able to build, run and...
stackexchange/codereview