instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
UPDATE: I had posted this on UI.stackexchange also for views on different kinds od visualisation. I am posting this here for finding out the programming techniques and tools required to do so. Let us have the following three sets of information Now I want to combine all of this data and show it all together. Tell...
stackexchange/codereview
Hi I was trying to apply a box shadow to my main content box but it doesn't work correctly in IE. Rather than applying the shadow to the edges of the box like in firefox & chrome it seems to apply shadw to the content. here are the filters im using: /* For IE 8 */ -ms-filter: "progid:DXImageTransform.Microsoft.Sha...
stackexchange/codereview
Many people refer ConcurrentMap as a cache. Is it a good idea to do this: public List<Task> listTasks(final ProcessDefinition def, final boolean filterEnumerated) { final String CACHENAME = def.getName() + "-v" + def.getVersion() + "-Tasks"; ConcurrentMap<String, List<Task>> cache = (ConcurrentMap<String, List<...
stackexchange/codereview
Clarification: I am trying to make the portlets sortable, but trying to connect them with any columns that are siblings I would like my web-application to automatically apply the jquery ui sortable interaction to all divs with the class .column. There are two little tricks that I need in this solution, no its not as s...
stackexchange/codereview
Ok, so I need to build this application where I'll read images from a www.flickr.com account and use the images in my Python app. How will I do that? Any ideas? Thanks.
stackexchange/codereview
Do you know of a way to use JQuery for getting JavaScript elements of a web page? For example, getting all JavaScript function names that are used in page and so on. Thank you!
stackexchange/codereview
I have a ViewGroup that gets inflated dynamically. I have set Id's to all the inflated views. I am still not able to retain the inflated ViewGroup whenever the orientation is changed. Any particular check that i am missing here ?
stackexchange/codereview
I need to intrecept some methods and their attributes by using annotations as point cuts, but how can I access those method attributes. I have following code that succesfully can run code before method is run, but I just don't know how I can access those attrbiutes. package my.package; import org.aspectj.lang.Proceedi...
stackexchange/codereview
I am trying to show achievement title when the player earns that. I am doing it exactly like Apple's GKTapper sample: NSLocalizedString(ach.identifier, NULL) (ach is of type GKAchievement) In GKTapper this line returns the title (e.g. "One tap!"). But in my own application, this returns the Achievement ID (e.g. com.co...
stackexchange/codereview
I have a Java web service that when no item is found I want a null object to be returned. Instead, I'm getting back an instance with all properties set to null. I can check for the item having a null property, but would prefer the item returned itself to be Null. @WebMethod @WebResult(name="item") public item findItem...
stackexchange/codereview
I want to use protobuff in a Java application to facilitate serialization and I have a question about this quote from the Google web site Protocol Buffers and O-O Design Protocol buffer classes are basically dumb data holders (like structs in C++); they don't make good first class citizens in an object model. ...
stackexchange/codereview
Everything's in the question title I guess... I tried the findmyip kind of site, but the IP addresses for 3g usb sticks are no good to indicate the device's position...
stackexchange/codereview
Consider the configuration to be First: Not buffered, blocking(synchronous) As I understand MPI is an API, so when we do the mpi_send blocking function call, does the sender function/program get blocked? OR Does the MPI API function mpi_send get blocked, so that the program can continue its work till message is sent? S...
stackexchange/codereview
Installing and running Rails 3 and Ruby 1.9.2 on Windows 7 went rather smooth. It's only now that I want to run autotest that I'm running into problems. The error looks frustratingly simple, but I can't figure out how to solve it. I have the following gems in my Gemfile: gem 'autotest' gem 'autotest-rails-pure' But ...
stackexchange/codereview
I have a menu scene, help scene, settings scene and game scene. When i enter into game scene, it loads some data string from a .plist file into a NSMutableArray. I am doing this reading and loading procedure as follows- + (void) addObjectsToArray:(NSMutableArray*) mutableArray fromFile:(NSString*) filePath { NSStri...
stackexchange/codereview
When I run my package that has a script component with a reference to my custom assembly, I get this error message 'Could not load file or assembly..' Thanks!
stackexchange/codereview
I need to patch Rack with the following patch: http://github.com/rack/rack/commit/dae12e088592ee69545b5f2f81b87f4959859164 What's the best practice for doing this? Should I gem unpack, apply the patch, then repack the gem and ship it with capistrano to make sure my version of the gem gets to the destination server? can...
stackexchange/codereview
I have a situation with IE and a table that I am inserting from a XML document sent to it by a server, I don't understand why i can't see the table in IE but in the other browsers i can. <element id='addCSS' name='reply'> <div id='appendCSS' main='true' father='@style_div'> <table border='1' width="100%" > <col al...
stackexchange/codereview
I'm running my application on a virtual machine. Every time an exception is being thrown, I get this message in event log. The "vmStatsProvider" is successfully initialized for this virtual machine. This application that I'm writing connect to another server to get notification in a form of string. I want to find ou...
stackexchange/codereview
I want to read a large InputStream and return it as a String. This InputStream is a large one. So, normally it takes much time and a lot of memory while it is excuting. The following code is the one that I've developed so far. I need to convert this code as it does the job in a lesser time consuming lesser memory. Can...
stackexchange/codereview
I have multiple views fueling entity framework, and some of the views don't return all the fields as their brethren. for EF's sake, i need to ensure that all views return the same signature. So in the views that have less fields, i simply add missing columns: ,Column1 ,Column2 ,null Column3 since Column3 is not in t...
stackexchange/codereview
Ok, so this is my issue. I have a page that lists a bunch of categories under a subdomain. I'm trying to clean the cache for that page if the user is logged in. In the action I'm using this: if ($this->getUser()->isAuthenticated()) { if($cache = $this->getContext()->getViewCacheManager()) { $cache->remove('cate...
stackexchange/codereview
I was following an example found here on StackOverflow, and everything went well until I need to register my types. My web application is running on Silverlight 4, with Prism and MVVM. The example is using "Microsoft.Practices.Unity" (it's a windows form application) Bootstrapper.cs protected override void Configur...
stackexchange/codereview
Briefly under a single producer - single consumer scenario, I used a mutable object for synchronization and passing data and messages between producer and consumer. Shared buffer is a ConcurrentQueue of byte arrays. To implement a circular buffer and prevent heap fragmentation and frequent object swapping by GC I used ...
stackexchange/codereview
I have a ViewModel with Property int DepartmentColor. Of course I can not bind the int value to a CellStyle in XAML. Should I make a IntToStyleConverter or should I fumble around with the Style class in the ViewModel like convert the int to a SolicColorBrush and assign it to a Style etc... Is the latter the way to go w...
stackexchange/codereview
I have a web service which is essentially a wrapper for a DAO. I am calling the web service/DAO to request a collection of entities. The "parent" entity class contains a collection of "child" entity objects, i.e. a one-to-many relationship. The DAO method call which fetches the "parent" entity collection (i.e. myDA...
stackexchange/codereview
I have a fairly large, sophisticated algorithm that uses a std::priority_queue. In some cases, I want the queue to be a min-queue, and in others, a max-queue. So I have to provide a comparator type that does one or the other. Since the comparator is a template parameter, it is fundamentally part of the type of the s...
stackexchange/codereview
I'm used to svn to use svn:propset to set bugtraq URLs, pus^H^H^Hcommit them to the server and all users who clo^H^H^Hcheckout from it have the settings. In git I can store them in my local or repository specific configuration, but other users who clone from it don't benefit from it: they simply don't get my bugtraq co...
stackexchange/codereview
I'm working on translating a small package from C++ to Java. I've never really used C++, so some of the syntax is a bit of a mystery. In particular, I'm having difficulty working out what the Java equivalent to this would be: file: SomeClass.cpp SomeClass::SomeClass( BitStream* data, const char* const filename ) : ...
stackexchange/codereview
I'm writing a printing application and i having trouble with dmCopies field of DEVMODE structure. This field specifies number of document copies printed. When i print multipage document (two pages and more) - setting up dmCopies works fine, but when one-page document printed dmFields ignored. First i think that problem...
stackexchange/codereview
I have a WPF combobox that I would like to bind to an observable collection of Teams on my ViewModel class e.g. class Team { public int Id { get; set; } public string Name { get; set; } public int CountryId { get; set; } } class ViewModel { public ObservableCollection<Team> Teams { get; set; } public IDic...
stackexchange/codereview
I am using JPA (OpenJPA). I have following entries in my persistence.xml: <property name="openjpa.RuntimeUnenhancedClasses" value="supported"/> I also have Serviceoffering class listed in persistence.xml. I am getting following exception when I try to run my JPA-related code. What can be the problem? No metadata was f...
stackexchange/codereview
I encounter a unbelievable strange problem: The libxml parser I'm using makes a difference between " and ". Is there one? The following attribute makes the error: name="New Headway_the third edition" if I replace the " character with the " I enter with my keyboard everything is working fine... I allready proved, that...
stackexchange/codereview
I had a look at the source of Slurp and I would love to understand how does slurp() work: sub slurp { local( $/, @ARGV ) = ( wantarray ? $/ : undef, @_ ); return <ARGV>; } Where is the file even opened?
stackexchange/codereview
CSS and Mark up:- <style type="text/css"> .mySprite { float:left; display: block; margin-bottom: 5px; } .container, .id0, .mySprite div { width: 728px; height: 243px; } .id0, .mySprite:hover div { background-image: url(images/image.jpg); background-repeat: no-repeat; } .container { position:relative; } .id0 { z-...
stackexchange/codereview
SELECT id FROM customers WHERE type IS NOT Null; Versus: SELECT id FROM customers WHERE NOT type IS NULL; The data that either of the above will return will be exactly the same. What is the difference and why would one of them be preferable? Edit: It seems to me that there might be a difference when it comes to perfo...
stackexchange/codereview
I'm trying to solve the problem of the second day but with no success yet. My goal is: For certain taxonomy term ID (for example 1) I need to get at least one imagefield filepath of nodes, which belong to that term id (tid 1) Below are three queries which give me what I need. All works fine but I know it looks reall...
stackexchange/codereview
I think I have a pretty easy problem to solve, but I have been beating my head against the wall for hours trying to get past it! I have an adapter that loads a list of URLS: adapter=new MyAdapter(this, lStrings); list.setAdapter(adapter); The list of URLS looks like this: private String[] lStrings={ "http://www.doma...
stackexchange/codereview
If I am connected to a customer site over Citrix XenApp - are all of my keystrokes logged? Just wondering because I chat with friends on my computer and check things like sports and email while I'm logged in, and would not if I knew it was tracking me.
stackexchange/codereview
I want to develop simple 2d opengl game with animation.in that animation I have to clip the image frame and draw it. Any single tutorial link or book which gives step by step Teachings to animate the image frame(sprite) and to do calculation.
stackexchange/codereview
Is it possible to create an infinite world, where the world is generated using an algorithms? Does XNA support vertex loading during runtime?
stackexchange/codereview
I have a plist that is binary plist. Do i need to convert it before I can use it? or can my application read the plist?
stackexchange/codereview
I have to start a new Spring MVC project and I've been reading about Roo and it looks quite nice, especially for someone like me who comes from an RoR background. However, the objects we'll be presenting to our users are really just documents which are already stored in our internal databases, so we have no need for an...
stackexchange/codereview
I am trying to figure out how ScriptBlock.GetNewClosure() works. Based on this thread (see Stej's answer) I have this code: $i = 1 $block1 = { $i } $i = 2 $block2 = { $i } $i = 3 $block3 = { $i } & $block1 & $block2 & $block3 The output is: 3 3 3 which is expected, because when the ScriptBlocks are...
stackexchange/codereview
I'm writing some code that has to cascade delete records in a certain database, and I noticed a drop in performance as the database has more records in it. When I just fill the database it doesn't seem like there is a big drop in performance between the start of the filling and right at the end, yet when I do a cascade...
stackexchange/codereview
Imagine you have a field _items in a class. You can initialize it at the point of declaration: class C { IList<string> _items=new List<string>(); } Now I want to convert this field to an auto generated property, but the initialization is now invalid: class C { public IList<string> Items=new List<string>(); {get; s...
stackexchange/codereview
I want to switch slave db if master fails. I found Master/Slave switch, but its for reading writing (seems very logical, but not this case). Can you give " db failure" strategy in zend?
stackexchange/codereview
This is the first time I'm use jQuery dialog_modal confirmation. I want to use this before deleting data inside ajax function. I'm still confused how to put this script correctly. Before using this dialog I have some script like: $('#delete').click(function() { var params = $('#deletedata').serialize(); ...
stackexchange/codereview
Here is my code which create the coupon code on the fly: $productId = (int) $this->getRequest()->getParam('id'); $discountprice=$_POST['product']['discountprice']; $model = Mage::getModel('salesrule/rule'); $couponCode=generateUniqueId(8); $model->setName($couponCode); $model-...
stackexchange/codereview
I'm new to Linq to Sql and am trying to do the following in C#. I have a table that's a key/value store (that also has an fk to a user). I want to do a search off the key names and values as an or. On the front end, I allow them to add "filters" that are key names, then they can search for a value. So they can searc...
stackexchange/codereview
I'm using the plugin from here: http://www.uploadify.com/ I have setup a simple test case, select a file etc & I get a "HTTP Error" when I try to upload. Here is the relevant code from my header.. <script type="text/javascript" src="../js/jquery.js"></script> <script type="text/javascript" src="../js/swfobject.js"></sc...
stackexchange/codereview
I have a custom tool "NafestisGenerator" of which I need to apply to every ".ntf" file. The question is, how do I tell visual studio (using the Custom tool Generator sample from Microsoft) to use the "NafestisGenerator" custom tool on every ".ntf" file?
stackexchange/codereview
I would like to implement a functionality in Drupal that allows users to trade among themselves. So for example user 1 can ceate an ad and other users can buy it. Has anyone heard about module that can be used in order to do this? Thanks
stackexchange/codereview
what's the difference between a jQuery function $.FunctionName = function(){ alert('Hello!') } and normal javascript function? function FunctionName(){ alert('Hello!') }
stackexchange/codereview
I am running windows 2003 server. I had no problems doing a dw_1.saveas for a pdf until about 2 weeks ago when the hosting company decided to do a software update on the server. Now when I do a save as the file size is 0 kb. Any ideas?
stackexchange/codereview
I am having issues adding a label to the rows of a matrix. Here is the code I currently have: Probability = ['Hole 1', US_par3_Win, par3_Draw, EU_par3_Win; 'Hole 2', US_par3_Win, par3_Draw, EU_par3_Win] I added the labels with single quotes, but am getting an error. Could anyone guide me in the right di...
stackexchange/codereview
I would like to update my Maven pom.xml with the latest hibernate, hibernate-annotations, and ehcache dependencies. I read the hibernate download page and the ehcache donwload page. All my tries at interpreting it seem to fail. Can someone write out the snippet that should go into pom.xml? Cryptic hibernate download pa...
stackexchange/codereview
For my last project i was using many frames in my delphi application ,so i dicided to create dlls and put them inside the dlls(ALL created in Delphi) i have gone through many websites and came up with the code that works but for that example i have to compile both apps and dlls with build with runtime packages which me...
stackexchange/codereview
Create a controller: public abstract class MyBaseController : Controller { public ActionResult MyAction(string id) { return View(); } } Than create another specific controller that inherit from MyBaseController: public class MyController : MyBaseController { } There is a view called MyAction.aspx in ...
stackexchange/codereview
My app uses 2.0 sdks (bluetooth toggle and service api changes) and in the manifest has <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="5" /> It runs perfectly fine on 1.5/1.6 devices, but when I uploaded it to the Market, it no longer shows up on 1.5/1.6 phones Please help!
stackexchange/codereview
I use Doctrine on my PHP web application with a MySQL database. I have a little problem with my request : $q = Doctrine_Query::create() ->select('event.EventDate, event.EventId, player.PlayerId, player.FirstName, player.LastName, player.Login, player.Email, event_period.EventPeriodId, e...
stackexchange/codereview
I have following code structure, where i am trying to change the css file href during runtime. I also have the Update Panel, Script Manager in the page. It looks like that CSS file is not getting changed/loaded by the browser. I am not able to understand why? <head> <link runat="server" id="link1" type="text/css" hre...
stackexchange/codereview
I have code loading in the titles of some films into the title attribute of their respective thumbnails, this format is thus: Artist Name - 'Song Title' I had this code initially: $return .= "' title='"; $return .=$video['title']; $return .= "'>"; Obviously the first single quote was causing the title attribute to e...
stackexchange/codereview
I have the function bellow. I want to add support for iso8601 time format but I just can't get it to work. Since I in php can't do (string)$tag->iso8601.time. Is there a way to get the iso8601.time element? The tag is a SimpleXMLElement. private function _tagToPhpType($tag) { /* * <i4> or <int> four...
stackexchange/codereview
I have a file main.py like this: import node.py [my code...] and a node.py like this: [more of my code] When executing main.py, I get this error: File "/home/loldrup/repo/trunk/src/src/main.py", line 2, in <module> import node.py ImportError: No module named py
stackexchange/codereview
What is the easiest, most friendly and robust E-Commerce Shopping Carts for a Zend Framework developer. I want invest my time in something forward-looking. I'm also interested in a solution with a big tutorial base. It should be free. I found this solutions for PHP/MySQL : Magento Commerce Opencart PrestaShop OsComme...
stackexchange/codereview
We'd like to restrict the maximum upload file size in our web site. We've already set the appropriate limits in our web.config. The problem we're encountering is if a really large file (1 GB, for example) is uploaded, the entire file is uploaded before a server-side error is generated, and the type of the error is di...
stackexchange/codereview
Here is the situation, I have installed and configured ClearCase Multisite,I did a mkreplica from SITEA (/dev) to SITEB (/dev). My import went successfully on SITEB. I happen to do few syncreplicas too on Both( SITEA and SITEB). I had both configured on Win2003. Now the SITEB Operation system Win2003 happen with some...
stackexchange/codereview
I'm curious about how works feature on many social sites today. For example, you enter list of movies you like and system suggests other movies you may like (based on movies that like other people who likes the same movies that you). I think doing it straight-sql way (join list of my movies with movies-users join wit...
stackexchange/codereview
Is there any reason to migrate from MySql to SQL server 2008 if one's main concern is the blocking of SQL injection attacks? Does Linq2Sql or EF provide additional protection?
stackexchange/codereview
In my webapp, I want to set a default cookie to store a locale of 'en_US'. I have functionality in place for the user to change this successfully. However, I've removed a lot of scriptlets on my .jsp and replaced with some JSTL tags to set a default cookie value, but it doesn't seem to work. It seems that I can't acces...
stackexchange/codereview
Is it possible to set a color of a specific input field using jquery? I would like to set a border to red if it fails some validations that I wrote and turn it back to black if it is fine. Any way to do this?
stackexchange/codereview
Possible Duplicates: Why doesn't Java have compound assignment versions of the conditional-and and conditional-or operators? (&&=, ||=) Why does a “&&=” Operator not exist? Today at work I wrote the following LOC (the real identities of b and b1 are confidential :) b &&= b1; // meaning b = b && b1; I stared at it...
stackexchange/codereview
I'm trying to use set-itemproperty to add an item to: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Installation Sources $InstallationSources = Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup" -Name "Installation Sources" $test = $InstallationSources."Installation Sources" + "C:\Test\I38...
stackexchange/codereview
Firstly, sorry about the long question... but this is doing my head in. Any help would be greatfully accepted. I've written the following function to return data from a mysql database: function injuryTable() { # get all players that are injured and their injuires... $sql = "SELECT players.id, players.injury_id,...
stackexchange/codereview
I think this is because I'm floating all three divs "columns" to the left, inside of the main body div. How can I tell the main body div to expand as big as it needs to fit the content divs? Here it's with min-height: And here with the min-height taken away: Here is my relevant code. #body { border:1px solid blue...
stackexchange/codereview
Is there a difference in the performance of UIView animation vs CA Animation blocks? I understand they are all interfaces to Core Animation, but am looking to squeeze the most performance vs resources per animation. Thanks.
stackexchange/codereview
I'm about to make a decision about the ideal technology for audio/video chat and I need your expert advice, specifically on the client side. java media framework doesn't seem mature enough, fms seems ok but are there any java clients for flash media server or Red5? any clues, guides appreciated. thanks
stackexchange/codereview
I am trying to pass a context from my app delegate to my rootview, then to my secondary view. The secondary view is where all the data is really loaded, the rootview is just a quick synopsis of a few key points. When I instantiate the context in appDelegate i log to check if it is not nil: NSManagedObjectContext *conte...
stackexchange/codereview
I know nothing about javascript, and not a whole lot about programming, but I wanted to create a page which checked the user's os, and if they are using a mobile OS (iphone, android, etc...), forward them to a mobile website, and if they are using a computer, forward them to the normal website. Here is the page I made:...
stackexchange/codereview
As I remember, on Windows, all the gems get installed relative to c:\ruby192, so can we actually have different paths such as c:\ruby187_rails238 c:\ruby187_rails301 c:\ruby192_rails301 c:\ruby192_try and therefore have 2 Ruby installations and 2 gemsets for each of them, and create more gemsets as needed this way. (...
stackexchange/codereview
I'm working on a ListActivity which will display a bunch of numbers (weights). I would like to change the background of a specific row in the ListView. To do this I have created a custom implementation of the ArrayAdapter class and have overridden the getView method. The adapter accepts a list of numbers and sets the b...
stackexchange/codereview
I just want to ask how to convert the number to String. What I want to output is "000000" incremented per second "0000001". I tried different methods but it will output to 1,2,3... I tried this but still won't work. $(document).ready(function(){ xx(); var x = 0; function xx() { x++; if(x.length==5)...
stackexchange/codereview
I'm developing a site in Drupal 6 that will be translated to over 10 idioms. For the main content, I'm using CCK + i18n. But there are some text in the site's layout that I'm not sure how to translate. For example, let's suppose that it's a site that sells software. In the page that lists all available software (which ...
stackexchange/codereview
I have a list that I want to be able to store 20 values. What would be a good approach to deleting older values. A better example would be, imagine a change history and I wan't to be able to store 20 latest changes, while older ones go away. Is there a special thing in C# that will let me do that or do I have to either...
stackexchange/codereview
Possible Duplicate: Is recursion ever faster than looping? I was first trained to program seriously in C, about 15 years ago. My employer wanted highly optimized code for computationally difficult tasks. I remember being advised more than once to rewrite recursions as loops, even at the expensive of readability, i...
stackexchange/codereview
I want to connect to a mongodb database using excel macros, does anybody knows how to acomplish this task?
stackexchange/codereview
I'm trying to compute de Bruijn sequences for alphabets which have a number of characters which is not a power of two. For alphabets with a 2^k characters, calculating de Bruijn sequences is easy: There are several simple rules, such as "Prefer Ones" and "Prefer Opposites" which work for generating B(2,n). B(2^k,n) is ...
stackexchange/codereview
I have a query that Gmail is ignoring display:none. What to do? In email HTML for hiding a row or div.
stackexchange/codereview
I have requirement where as an attachment user can add a link from sharepoint So that we can save the link[path] of the attachment instead of actual attachment. For this we are planning to design a column which is varchar(512) . Intially we thought this would fit any type of URLs effectively ,but sometimes we found thi...
stackexchange/codereview
This is what I have written so far. It compiles, and, as far as I can tell, it should 'work' - if you were to give your computer an infinite amount of time to compute the answer ! I was just wondering if anyone would please be able to give me a way to optimise this so that my program will tell me the highest palindrom...
stackexchange/codereview
Hai Friends, I want to display a toast message to the user, when there is poor or no internet connection, so i have written the following code in my activity. ConnectivityManager conMgr = ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE); if ( conMgr.getNetworkInfo(0).getState() == Net...
stackexchange/codereview
I am trying to CSS assigned inside the head tag using JS, its not working for IE any idea why? IE just show "Unknown runtime error". <html> <head> <style id="style_id" type="text/css"> </style> </head> <body> <p>This is the test Text</p> </body> <script> var st = document.getElementById("style_id"); st.innerHT...
stackexchange/codereview
what would be the easiest way to parse this date format below in java?: 2010-09-18T10:00:00.000+01:00 i read the DateFormat api in java and could not find a method that takes a string or even this type of date format as a paremeter to parse? When i mean by parse i mean i want to extract the "date (day month and year)"...
stackexchange/codereview
Say I've written a custom membership provider which extends System.Web.Security.MempershipProvider. This sits in its own project. overriding the ValidateUser method looks like this: IList<User> Users; using (ISession sess = NHibernateHelper.GetCurrentSession()) { Users = sess.CreateQuery("se...
stackexchange/codereview
public K[] toArray() { K[] result = (K[])new Object[this.size()]; int index = 0; for(K k : this) result[index++] = k; return result; } This code does not seem to work, it will throw out an exception: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to ... Could someone tell m...
stackexchange/codereview
i have an String like: String msg= <?xml version="1.0" encoding="UTF-8" standalone="no"> <validateEmail> <emailid>abc@gmail.com</emailid> <instanceid>instance1</instanceid> <msgname>validatemsg</msgname> <taskid>task1</taskid> </validateEmail> how i am able to convert t...
stackexchange/codereview
Using asp.net 4.0, been trying to follow this: http://msdn.microsoft.com/en-us/library/ms998306 Also tried using eventlogprovider and the mail provider. Silence. Is there anything I should know about healthmonitoring, like it doesn't work in 4.0? Currently me web.config looks like this: <healthMonitoring enabled="true...
stackexchange/codereview
I have a JSP page that surprisingly stops rendering when it deployed to a server. But when I place JavaScript alert() at different positions on that page the page start rendering as it should. Eventually, when I remove those alerts the page keeps on rendering. When I run that page on my eclipse as localhost it runs fin...
stackexchange/codereview
On OS X if you close the last window, the application still is living and, if focused, shows a menu bar (without any window). What is the simplest SWT example code demonstrating this behavior? Thanks in advance.
stackexchange/codereview