instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
test.mxml: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()" x="0" y="0" width="703" height="609" xmlns:ns1="*" > <mx:Script> <![CDATA[ import flash.events.*; // stuff private function onUncaughtError(e:UncaughtErrorEvent):void { //Do Stuff } Th...
stackexchange/codereview
im trying to delete a HTML select list. This is what im using: var size = DID(SourceDiv + Number).options.length; DeleteSelectElements(SourceDiv+Number,size); function DeleteSelectElements(Div,Len){ var k; var Length = Len for (k = 0; k < Length; k++) { DID(Div).options[k] = null; } } DID ...
stackexchange/codereview
I use server based sorting(in the db) using orderby clause. But now that I want to support multiple locales, how should I pass the locale information to the DB via hibernate layer. I have pre-defined views to which I add criteria and order in the hibernate layer.
stackexchange/codereview
I'm trying to identify a memory leak using visualvm. I found some candidates by comapring snapshots, but since there are too many of these, I would like to narrow the search by locating the oldest instances on the heap. Is there a way using OQL to search for such instances? I did some googling, but didn't find any answ...
stackexchange/codereview
This is likely a a novice question, but google surprisingly did not provide an answer. I have this rather artificial method T HowToCast<T>(T t) { if (typeof(T) == typeof(string)) { T newT1 = "some text"; T newT2 = (string)t; } return t; } Coming from a C++ background I have expected th...
stackexchange/codereview
I wasn't clear how to correctly name this question. Case 1 Assume that I have the following directory structure. foo | +- bar/__init__.py | +- bar.py If I have from foo import bar How do I know which bar (bar.py or bar/__init__.py) is being imported? Is there any easy way to automatically detect this from occurring? ...
stackexchange/codereview
Should be fairly simple for someone who knows regex. I am unfortunately not among those in the know. How can one append ellipsis to anything over 27 chars in the below example, so that the fourth link listed will appear as http://iamanextremely.com/long/lin? <?php $input = <<<EOF http://www.example.com/ http://example...
stackexchange/codereview
I would like to add more padding to the column margins in my NSTableView (ie. more gap between the left side of the column and the column text). Calling setIntercellSpacing does the trick for the rows, but it leaves the column heading margin unaffected. Can anyone offer a solution? Thanks
stackexchange/codereview
I want to parse multiple command line arguments using boost::program_options. However, some arguments are strings enclosed in double quotes. This is what I have - void processCommands(int argc, char *argv[]) { std::vector<std::string> createOptions; boost::program_options::options_description desc("Allowed opti...
stackexchange/codereview
I am working on a .net mvc web application that has a bunch of web parts on the homepage. I realize that a webpart is a .net forms terminology, but wasn't sure what to name those mini sections. So anyways, for now these sections are called when that page is rendered, but eventually I will plug in JQuery and call thes...
stackexchange/codereview
I would like to parse/convert DateTime (or FileTime) data type which is int64 and measured in "ticks" which are 100-nanoseconds units, to a datenum or a better date & time format in Matlab. I must use a counter with a high resolution 64bit as the difference between time stamps can be a couple of microseconds and the "s...
stackexchange/codereview
This question is a sort of extension to this question: Perform some cleanup when deleting a record in Symfony/Doctrine I'm doing this and it's working fine, except for one problem: if the delete fails and the transaction is never committed, the postDelete method still runs and the files are deleted anyway. What would b...
stackexchange/codereview
I recently installed Redmine and started configuring a plethora of items such as roles, statuses, projects, issues, and that kind of good stuff. But to my surprise I found no section for clustering issues into roadmaps. I've searched everywhere in the Administration's settings and there's nothing that could activate th...
stackexchange/codereview
I used to open files that were in the same directory as the currently running Python script by simply using a command like: open("Some file.txt", "r") However, I discovered that when the script was run in Windows by double-clicking it, it would try to open the file from the wrong directory. Since then I've used a comm...
stackexchange/codereview
I am a Coldfusion wiz, but my JVM error logs are filling up with the following types of errors. Could someone shed some light on these for me and how to fix? Much appreciated. Searched for an hour everywhere and found no good answer or much of any reference. That LCK part has me baffled, as the actual cfm file does...
stackexchange/codereview
I need to implement a simple message bus: One process only thus no need do D-Bus. Publish/subscribe to typed events (Could even be QObjects) I was thinking of using QSignalMapper to tag the "named events", then re-emitting from a slot or connecting the publishers signal to the subscriber's signal... Any suggestions ...
stackexchange/codereview
I need to receive a multicast stream but filter incoming packets by source MAC address on CentOS 5.5. I'm planning to use libpcap library. Is it possible to join/leave multicast group using libpcap? If yes, how to do that? Thanks
stackexchange/codereview
My domain is http://www.somename.com. I want if an user type {path to website}/index.php, it should redirect him to {site name} basically I want to remove that index.php from the URL. and one more thing, it should work both for {www.sitename} {sitename} any idea is greatly appreciable. Thanks in advance.
stackexchange/codereview
I have a little mess with a web application. I works in the development environment, and now I'm trying to publish it to another folder still in my own computer, so one of my colleages could try it without bother me. So I went to "Publish" in "Visual Studio", created a new "Web Application", and then I published the ap...
stackexchange/codereview
I'm using Rails 3.0.1, RSpec-Rails 2.0.1 and Webrat 0.7.1. I have the following test: describe PagesController do describe "GET 'main'" do it "should have the right title" do get 'main' response.should have_selector("title", :content => "My title") end end end The HTML of pages#main checks out...
stackexchange/codereview
I wonder if it is possible to write something like this in the .m file: @interface MyController () {//ERROR here Foo *privateFoo; } @end I did it but I get : Expected identifier or '{' before '{' token, I think I heard/watch a video (WWDC2010) saying this is possible or will be possible and currently only some ar...
stackexchange/codereview
how do i check which tabs is active using jquery tabs?
stackexchange/codereview
In my iphone app, It is a requirement that I enable the user to upload the database file (.sql) from the front end of the app or through iTunes and the app should display the data based on the file he/she uploaded. How should I go ahead with implementation? Please give your suggestions. Please Help. Thanks!!
stackexchange/codereview
my model using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace amief.Models { public class WebsiteModels { public static void getPagesForPage(int pageId, dbDataContext db, List<page> myPages) { var pages = (from p in db.pages wher...
stackexchange/codereview
I want to change MULTISET column of the table, and my code looks something like this: PreparedStatement pstm = preparedStatement("UPDATE table SET mc = MULTISET{?, ?} WHERE ..."); pstm.setString(1, "..."); pstm.setString(2, "..."); pstm.execute(); And I get error: "Illegal attempt to convert a collection type into ano...
stackexchange/codereview
How does typekit.com work ? There are many site like typekit allow css designers to use custom fonts ? but how ? How can I make a site like typekit ? What technology is used ? Are there any open source ?
stackexchange/codereview
Hi I am currently creating a date time field for sharepoint in XML My field is created but no default formula is added. Do i need another tag to say i want to have a defaultformula . The schema i have is <Field <!-- Some properties here-->> <DefaultFormula>Today +182</DefaultFormula> <FieldRefs> </FieldRefs> </Field...
stackexchange/codereview
What's the easiest way to populate a SQLLite table with data off a URL? I'm writing a Delphi web app that will generate a file on a server for my Android app to download. In Delphi, I'll probably save it as a .csv file and use bulk import to import into MS SQL Server. What's the easiest / best practice way to do this i...
stackexchange/codereview
My android application is running good on emulators form 1.5v to 2.2v when I installed .apk file on SAMSUNG GALAXY-3 v2.1 screen sizes are not matching.But the same .apk file supporting the UI on SAMSUNG v1.5 I want to run my application on any screen sizes.
stackexchange/codereview
I need something like rfc822.AddressList to parse, say, the content of the "TO" header field of an email into individual addresses. Since rfc822 is deprecated in favor of the email package, I looked for something similar there but couldn't find anything. Does anyone know what I'm supposed to use instead? Thanks!
stackexchange/codereview
What is the meaning of the function return(0); while writing code for a simple "hello world" program ?
stackexchange/codereview
I can create CSS gradients in IE6/7/8/9/FF3.6+ and Chrome (see below). My question is: How would one create a gradient in Opera? .gradient{ /*Mozilla Firefox 3.6*/ background-image: -moz-linear-gradient(top, #dcdcdc, #c6c6c6); /*Webkit aka Google Chrome*/ background-image: -webkit-grad...
stackexchange/codereview
I have an XML file that looks like this <comments> <text> <![CDATA[ <!--cached-Tue, 02 Nov 2010 17:50:50 +0000--> this is on the first line <br /> This is on the second line ]]> </text> <text> <![CDATA[ ...
stackexchange/codereview
In my python program i have used a lot of modules and am trying to have a count of the functions called and the call chains involved. Is there a tool/module in python which will provide me with these statistics.
stackexchange/codereview
I've recently started learning Spring Batch in order to make use of some of its more advanced features like asynchronous batch processing, job stopping, and scheduling to replace some existing batch processing functionality, and implement new batch processing functionality. Right now, I'm trying to figure out how to d...
stackexchange/codereview
Ok so i'm trying to subclass a ListView control. I'm using SetWindowLong(). Consider this code: WNDPROC oldProc; WNDPROC newProc(hwnd, msg, wparam, lparam) // not proper code, but you get the idea { // some code here } MainProc(...) { oldProc = SetWindowLong(control_hwnd, GWL_WNDPROC, (LONG) &newproc); } At the set...
stackexchange/codereview
I have linkbutton within the repeater. The ID of the repeater is "lnkbtn". I have a datatable containing a column called as "Questionnumber". The "Questionnumber"(column) contains records such as 1,2,3,16,24.....so on. I want to set the ID of the linkbutton dynamically.This id must be respective to the "Questionnumbe...
stackexchange/codereview
in Servlet which types of requst (protocols)will handle. ? i mean , http, https,
stackexchange/codereview
Could some body explain me why we do serialization an what is profit of this ? can we put serialize word on method or not, like in the following program on complete class the serialization is done can i do it on a method or a variable Serializable] public class StudentInfo { //Default Constructor public Student...
stackexchange/codereview
I want to invoke one/many functions of a native library but I am unsure on the type mappings. The function in particular I am currently trying is as follows, here is the small console app which I am spiking in: extern char *tgetstr (const char *name, char **area); And here is my attempt at mapping this to use in a .N...
stackexchange/codereview
I have an object ivar foo inside a NSManagedObject subclass bar that I need to be there at all times, as long as the object exists. To make sure foo is created properly, I've subclassed awakeFromInsert to create foo when bar is created. I've done the same in awakeFromFetch, to make sure foo is there when bar is fetched...
stackexchange/codereview
I'm having a problem with StyleCop that's driving me nuts. I recently installed it on a new machine and every time I go to edit the master settings file (either via Visual Studio or the StyleCop editor), I'm getting the following error: The settings file could not be saved: Access to the path 'C:\Program Files (x8...
stackexchange/codereview
I work in a computational biology lab, where we have several folks working on multiple projects, mostly in R (which is what I care about for this post). In the past, people would simply develop their code for each project, which may or may not involve boilerplate code copied over from previous projects. One thing tha...
stackexchange/codereview
I have two models in my rails app with a has many and belongs to association. Category has many items and Item belongs to category. These models are associated in the normal way through a category_id column in the Item model. I'm looking for a quick way of finding all elements in the database with broken associations. ...
stackexchange/codereview
Ok I made this batch file that looks for a file on computers backs it up and replaces it. We can call the file we are looking for file.a and the file that is going to replace it file.b (they share the same name) So right now when the batch script finds file.a it makes a copy of file.a in the same director named its fil...
stackexchange/codereview
I would like some help with this Working code: regex to match xxx.domain.com $HTTP["host"] =~ "^[^.]+\.domain\.com$" { evhost.path-pattern = vhosts_dir + "/company/domain.com/subdomains/%3/" } Www not working: (regex to match domain.com is working) else $HTTP["host"] =~ "^([^.]+\.)?domain\.com$" { evhost.path-pat...
stackexchange/codereview
I'm currently reading Jon Skeet's C# in depth 2nd edition and the following question came to my mind: How's the compiler able to choose between list.Sort(Comparison<T>) and list.Sort(MyComparison<T>) in the following example: // MyComparison has the same signature as Comparison<in T> public delegate int MyComparison<in...
stackexchange/codereview
Apologies for the trivial question, but im having problems with the examples i find on microsoft support website. Could someone please show me how to declare the libraries require (above main) for the ArrayList so that i can just define it as such: ArrayList a = new ArrayList(); I cant get the libraries for 'ArrayLis...
stackexchange/codereview
I'm trying to figure out if i have the general idea behind the assignment operator for Doubly Linked Lists using a current node (no front or back). This is my pseudo code. I need to get this concept down. If anyone can help, that would be sweet. Loop to start temp = temp->back loop to count if 0 receive...
stackexchange/codereview
Pretty much says it all... I've added a couple of targets to my UIButton, I just need to know if I need to remove them before the UIButton is released (and dealloc'd), or is it okay just to assume it'll tidy itself up? Thanks! EDIT: The scenario is this: A UIViewController which creates a button and has targets set as ...
stackexchange/codereview
I was wondering if it would be a good idea to design an abstract MAIL-API for haskell. The API would basically be designed as an (tagless) EDSL. MAIL API terms could then be "evaluated" with a switchable interpreter. These interpreters could then make use of a particular and already existing library. Someone in need of...
stackexchange/codereview
I wonder what the difference is between Cloudant and CouchOne.
stackexchange/codereview
I have a TabControl and each Tab can contain the same UI but with different data. In any tab the user can click on a button and bring up a popup. This sets a Style property to the ViewModel telling it what style to use for the popup UI. The Style gets bound to a custom DependecyProperty that is attached to a custom Pop...
stackexchange/codereview
I'm using jQuery to convert a column of hyperlinks within a gridview into UI dialogs. This gridview is in an updatepanel, and for one of the dialog's buttons I perform a __dopostback on this updatepanel, which refreshes the changes I've made within the dialog. It all works rather nicely, apart from one small issue.... ...
stackexchange/codereview
After reading the documentation (http://stw.castleproject.org/Windsor.Installers.ashx) I've found a strange part: Although technically it's OK to call Install multiple times, or register components outside of installers it is considered good practice to encapsulate all registration in installers, and to install all in...
stackexchange/codereview
I need to have different markers for different mapTypes, and I'm pushing them to a MarkerClusterer. I "hide" the markers with: cluster.set("map", null); cluster.resetViewport(); cluster.redraw(); And "show" them with: cluster.set("map", MAP); cluster.resetViewport(); cluster.redraw(); The problem is that MarkerCluste...
stackexchange/codereview
Okay, so I'm about finished with my latest project, a (admittedly not very good) implementation of Tic Tac Toe in Common Lisp (the whole program available here), but I'm stuck on one last part; I can't figure out how to get my function that checks for a winner working. The function (and its subordinate function) look l...
stackexchange/codereview
Is there a standard way to tell when a page was last modified? Currently I am doing this: URLConnection uCon = url.openConnection(); uCon.setConnectTimeout(5000); // 5 seconds String lastMod = uCon.getHeaderField("Last-Modified"); System.out.println("last mod: "+lastMod); However it looks like some sites do not ha...
stackexchange/codereview
It seems to be really hard to improve the performance of a UIWebView, especially for websites like Mashable or Ars Technica, where tons of scripts are loaded and long, multi-page articles are common. I'm aware of 3 similar questions, but they both have no working solution: UIWebView scrolls jerkily - private API calls...
stackexchange/codereview
Is the proper way to use the UNIQUE KEY in my MySQL table? MySQL data. id pid aid 1 2 3 2 3 2 3 3 4 MySQL table. CREATE TABLE ab ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, pid INT UNSIGNED NOT NULL DEFAULT 0, aid INT UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (id), UNIQUE KEY (pid, aid) );
stackexchange/codereview
Does anyone know of any examples of a two-legged Oauth provider in ruby? Preferably one done using the oauth gem. Thanks. Edit: I was able to solve this, it was surprisingly simple, which explains the lack of examples.
stackexchange/codereview
I'm using Visual C++ 2010 Express and I just started learning C++. So when I want to run this code: #include <iostream> using namespace std; int main(){ cout << "Hello World! "; return 0; } It works, but the program exits immediately after I started it, how should I keep the program alive?
stackexchange/codereview
I want to apply operations from the OpenCV computer vision library, in real time, to video captured from my computer display. The idea in this particular case is to detect interesting features during gameplay in a popular game and provide the user with an enhanced experience; but I could think of several other scenario...
stackexchange/codereview
I have the following code, which loops through an array of menuoptions and on each iteration, creates a ScaledRect object and pushes it to a vector. This vector is a member of a struct. I have verified that the ScaledRect is created with the correct values, yet when I print back the contents of the regions vector ( in...
stackexchange/codereview
I have a question on the test command in the KornShell (ksh). I know -ne is for comparing integers and != is for comparing strings. How will the test command behave if one argument is a string and the other is an integer? I have below conditions in my code and both are working properly. Code: myCount=1 myCount=`expr $...
stackexchange/codereview
I am trying to find a way to pull 10 random records and then order those 10 records by a field. I have tried the following: SELECT name FROM users ORDER BY RAND(), name LIMIT 10 but it does not order by name with 10 rows returned, just return 10 random record in any order. Is there a way to order by rand() and a fiel...
stackexchange/codereview
I know there must be a simple answer to this but I've looked and looked. Suppose I form an ItemNumbered list at some point in the notebook. Then at some other point I want a new ItemNumbered list starting with number 1, but without resetting the original list. At present when I try to form the second list it always sta...
stackexchange/codereview
I am logging into oracle as a simple user.I want other user who are logged in to the same database as i am ,be able to see and manipulate tabels and stored procedure. I used grant privilege to achieve this. grant all on tablename to user; but it is not working ie on querying the table it is showing no such ta...
stackexchange/codereview
What event can i use to run code when a user visits another page then hits back to load my page again? I wrote window.onload = function() { ... and it works when i hit refresh but not forward then back.
stackexchange/codereview
I have a list of locations that I use to display pushpins on Bing Maps. I then zoom the map to show the pushpins. This is how I do it in the code behind: Location location1 = new Location { Latitude = -36.736108, Longitude = 174.688411 }; Location location2 = new Location { Latitude = -36.738756, Longit...
stackexchange/codereview
Where can I find a list of all legal time names for R function as.POSIXct? as.POSIXct("1970-01-01",tz="CST") generates a warning that "CST" (Central Standard Time) is unknown.
stackexchange/codereview
I'm trying to use uTorrent webUI API. I think this is a pretty n00b question but there's little documentation about this API on the web, sorry. my server uses file_get_contents($url) and I get the data I want. but in a format I do not understand. for example: { "build": BUILD NUMBER (integer), "label": [ ...
stackexchange/codereview
How would i prevent text from being automatically formatted when added to a RichTextBox, or better yet, override the formatting that does occur? For instance, the following code sets the text, but then creates a formatted link to a server. rtbSomeField.Text = "\\\\just some text"; Results in I understand why it's do...
stackexchange/codereview
I'm running nosetests on a remote server. On my local server my test.ini and development.ini files are in the same directory. On my remote server, they are not. If I try to run just nosetests on the remote server, I get: IOError: File '/foo/bar/development.ini' not found Is there an option to specify the location o...
stackexchange/codereview
I did not find any post or tutorial related to the topic mentioned above. Basically, I am have a page viewed in webbrowser control. the page is a form . if the form is submitted successfully I get transfer to success page(using HttpContext.Current.Server.Transfer) and if I get transfered to that page , I would like so...
stackexchange/codereview
The type or namespace name 'c' could not be found (are you missing a using directive or an assembly reference?) I do have this namespace added "using System.Web.UI.WebControls;" why this error ?? protected void DoSomething(Control control)( { foreach (Control c in control.Controls) { ...
stackexchange/codereview
Hi Guy's any idea on how to make this work? <?php $themename_orig = get_bloginfo ( 'name' ); $clean = toAscii($themename_orig); $shortname_opciones = $clean; ?> body { background:url("<?php echo $shortname_opciones."_bg_img"; ?>") no-repeat scroll center top <?php echo $shortname_opciones."_color_bg"; ?>...
stackexchange/codereview
As per PHP documentation, mysql needs to be enabled with PHP. http://www.php.net/manual/en/mysql.installation.php PHP 5.0.x, 5.1.x, 5.2.x MySQL is not enabled by default, nor is the MySQL library bundled with PHP. Read this FAQ for details on why. Use the --with-mysql[=DIR] configure option to include MySQL support. Yo...
stackexchange/codereview
I have an xml which needs to be parsed. my $parser = new XML::Parser(Handlers => {Init => \&handle_Init, Start => \&handle_Start, Char => \&handle_Char, End =>\&handle_End, Final => \&handle_Final}); $parser->parsefile("ababab.xml"); In the handle_Char subroutine , as soon as I find a...
stackexchange/codereview
I want to submit a zend form but with lowercase values. Whatever user use case but I want to get form value as lowercase. I am creating form like this. $elements = array(); $element = $this->CreateElement('text', 'LastName'); $element->setLabel('Last Name'); $element->addFilter( 'StringToLower' ); $elements[] = $elem...
stackexchange/codereview
I'm using a number formatter jquery library available here http://code.google.com/p/jquery-numberformatter/ I found a problem in IE while using this. The following code var number = "0.2343"; alert($.formatNumber(number, {format:"#,##0.00") ); returns 0.23 in firefox but .23 in IE Could anyone tell me how I can get 0....
stackexchange/codereview
Recently I have studied k-nearest neighbour and decision trees and I am quite curious about the difference between the two,i.e,for task like seperating a target function "return 1 if x2>x1,return 0 otherwise",then choosing Nearest Neighbour would be good here since decision tree will invovle too many splits. So I am ju...
stackexchange/codereview
How to generate a graph of the dependency between all modules of a Maven project (excluding third party libraries like JUnit, SLF4J, etc.)? I couldn't find a way to include all modules into one graph using m2eclipse. Thanks.
stackexchange/codereview
I have two div tags, one is for the search and the other is for the results. What I need is for when the submit button is clicked the results are returned and placed into the results div (with an iframe) and the search div should become hidden and the results div should be made visible. search div is initially set to v...
stackexchange/codereview
This is for a Rails question. Since my Thinking Sphinx somehow couldn't index the associate Model A, I am looking for a temporary solution. Model A: -has columns: name, city Model B: -has_many model A's -has column: country -I want to add a column called "tag" in Model B Let's say we have: B1 - United States of America...
stackexchange/codereview
I have a class hierarchy representing different language constructs: Expression <- NumericLiteral UnaryExpression BinaryExpression IndexingExpression IteratedExpression ... The objects of these classes form complex tree hierarchies on which I h...
stackexchange/codereview
This isnt a homework question. I took data structures at a Community College and now that i am at the university i talked to the teacher about there data structures class. Now, since its really different and the class i took transferred, He gave me one of there assignments and said play with it. We never did any contai...
stackexchange/codereview
How can I detect whether a line (direction d and -d from point p) and a line segment (between points p1 and p2) intersects in 2D? If they do, how can I get their intersection point. There are lots of example how to detect whether two line segments intersects but this should be even simpler case. I found this but I do n...
stackexchange/codereview
here is a challenging question for a javascript expert and/or someone who has worked with jquery plugin cycle see my demo: http://jsfiddle.net/atoswchataigner/L8fNS/ question: i can't get the js to display the image for the pager in the nav div (pagerAnchorBuilder in the js) best viewed in firefox thank in advance, Wil...
stackexchange/codereview
I have problems with MySQL Connector (MyConnector) it seem there is a problem when I modify my connection via ODBC, I can create new entries, but I am unable to edit them.. I found a patch for windows 7, 32Bit. but I also need a fix for Windows 7, 64bit.
stackexchange/codereview
I'm designing/building a site, and like a good little developer I've been keeping an eye on how things render in all the popular browsers - the current versions of Firefox, Chrome, Safari (for Windows) and Chrome, and Internet Explorer (8, not the 9 preview). Anyway, everything looked absolutely fine in Chrome to me, b...
stackexchange/codereview
I'm looking for is a "Best Practices" approach for setting up Apache httpd (2.2) with Tomcat 6 so that we can: Allow JSP files to be served for directory listings (e.g. http:/www.example.com displays index.jsp via DirectoryIndex index.jsp). Hide the extensions of all URLs (both *.html and *.php files served by Apache ...
stackexchange/codereview
I am developing a tool like memory leak detector. I can track the placement new but how can i track the placement delete. I did a lot of R & D and i found that placement delete cant be called directly, it is called by constructor at the time of exception. So how can i keep the track of placement delete against placemen...
stackexchange/codereview
if i use table name instead of class name in HQL query like this: select classname.field name as obj from table name and i have specified mapping in hbm file. but it show exception: table name is not mapped and second thing is i have use on keyword in query then it show exception: unexpected token: on
stackexchange/codereview
I have two models and one admin model: class Person(models.Model): firstname = models.CharField(maxlength=50) surname = models.CharField(maxlength=50) class Friends(models.Model): person1 = models.ForeignKey("Person") person2 = models.ForeignKey("Person") friendship_made = models.DateField() cla...
stackexchange/codereview
i have a main Activity called Main which has onActivityResult Method. protected void onActivityResult(int requestCode, int resultCode, Intent data, Bundle extras) { Log.i("in OnActivityResult", "in OnActivityResult"); super.onActivityResult(requestCode, resultCode, data); Log.i("in OnActivityResult",...
stackexchange/codereview
I have multiple MySQL tables with names of the form "Shard_0", "Shard_1", "Shard_2" ... "Shard_n" All of them have identical table structure. They all live in the same database. Say I want to add a column to all those tables. Is there a way to do that programmatically? Something like: # pseudo code for i in range(...
stackexchange/codereview
X509Certificate is only instantiatable using the contents of a certificate (.cer file). How to instantiate this object using a .p12 file that contains both the certificate and the private key?
stackexchange/codereview
Question: We have a situation at work where we would like to run the following scripts: xcopy /s c:\STANDAARD_DETAILS_V2\PDF\8.1A.pdf C:\STANDAARD_DETAILS_V2\TEMPDUMP del /s "C:\STANDAARD_DETAILS_V2\TEMPDUMP\*.pdf" However the I.T. manager is dead against batch scripts is there a html or javascrip code/ equivelent f...
stackexchange/codereview
This question is Ruby related. Suppose I want to have the test unit for my class in the same file as it's definition. Is it possible to do so? For example, if I'd pass a "--test" argument when I run the file, I'd want it to run the test unit. Otherwise, execute normally. Imagine a file like this: require "test/unit" c...
stackexchange/codereview