Daily Archives

Articles indexed Thursday April 29 2010

Page 11/119 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Why does Maven have such a bad rep?

    - by Dan
    There is a lot of talk on the internet about how Maven is bad. I have been using some features of Maven for a few years now and the most important benefit in my view is the dependency management. Maven documentation is less than adequate, but generally when I need to accomplish something I figure it once and than it works (for example, I remember when I implemented signing the jars.) I don’t think that Maven is great, but it does solve some problems that without it would be a genuine pain. So, why does Maven has such a bad rep and what problems with Maven can I expect in the future? Maybe there are much better alternatives that I don't know about? (For example, I never looked Ivy in detail.) NOTE: This is not an attempt to cause an argument. It is an attempt to clear the FUD.

    Read the article

  • How to organize a large number of objects

    - by shane
    We have a large number of documents and metadata (xml files) associated with these documents. What is the best way to organize them? Currently we put them into a series of nested folders: /repository/category/date(when they were loaded into our db)/document_number.pdf and .xml We use the path as a unique identifier for the document in our system. This is more versatile than putting them all in a single flat folder. also it is independent from our database/application, so we can reload them in case of failure. Yet, it introduces some limitations. for example we can't move the files once they've been placed in this structure, also it takes work to put them this way. What is the best practice? How websites such as Scribd deal with this problem?

    Read the article

  • Android ListView background colors always showing grey.

    - by fiXedd
    I have a ListView that I'm populating from a custom ListAdapter. Inside the Adapter (in the getView(int, View, ViewGroup) method) I'm setting the background color of the View using setBackgroundColor(int). The problem is that no matter what color I set the background to it always comes out a dark grey. It might also be worth noting that I'm using the Light theme. Relevant (simplified) bits of code: AndroidManifest.xml: <activity android:name=".MyActivity" android:theme="@android:style/Theme.Light" /> MyAdapter.java: @Override public View getView(int position, View convertView, ViewGroup parent) { LayoutInflater inflater = LayoutInflater.from(mContext); View av = inflater.inflate(R.layout.my_row, parent, false); av.setBackgroundColor(R.color.myRow_red); mName = (TextView) av.findViewById(R.id.myRow_name); mName.setText("This is a name"); return av; } Any ideas/suggestions?

    Read the article

  • Run Windows XP on a usb drive virtually on Windows XP?

    - by Russell
    I am sick of not being able to run and install certain applications on my work computer due to admin restrictions (eg: Adobe AIR) . I have heard of smaller versions of Windows running on a usb thumb drive and have looked into it but can't find anything on running windows virtually from a usb drive. I would like to be able to login to this particular computer, insert my usb drive and then open up another version of windows installed on the thumb drive while still being able to use the windows I logged in on (literally be able to alt+tab between the main desktop and the virtual desktop from the usb drive). Is this even possible? For further clarification: The version of windows has to be Windows XP and there is no other option available for what I want to do. Looking forward to a response.

    Read the article

  • Flex Tile that expands as items are added to it

    - by Lost_in_code
    <mx:Tile width="100%" height="20"> <mx:Button label="btn"/> <mx:Button label="btn"/> <mx:Button label="btn"/> <mx:Button label="btn"/> <mx:Button label="btn"/> <mx:Button label="btn"/> </mx:Tile> The above Tile has a height of 20. When I add 50 new buttons to it, a vertical scrollbar is added. How can I make it not show the scrollbar but change it's height dynamically so that all the added items are always shown. Kinda like an "expanding" tile.

    Read the article

  • Workflow for academic research projects, one-step builds, and the Joel Test

    - by Steve
    Working alone on academic research sometimes breeds bad habits. With no one else reading my code, I would write a lot of throw-away code, and I would lose track of intermediate results which, weeks or months later, I wish I had retained. My recent attempts to make my personal workflow conform to the Joel Test raised interesting questions. Academic research has inherently different goals than industrial software development, and therefore some aspects of the Joel Test become less valid. Nevertheless, I find these steps to be still valuable for academic research: Do you use source control? Can you make a build in one step? Do you have an up-to-date schedule? Do you have a spec? Of particular use is the one-step build. I find myself more organized now that I have implemented the following "one-step build": In other words, I have a single script, build.py, that accepts Python code, data, and TeX as inputs. The outputs are results, figures, and a paper with all the results filled in. (Yes, I know "build" is probably not accurate in this context, but you get the idea.) By consolidating many small steps into one, I am not backtracking as much as I used to. ...but I'm sure there is still room for improvement. Question: For research projects, which steps of the Joel Test do you still value? Do you have a one-step build? If so, what does yours consist of, i.e., what inputs does it accept, and what output does it generate?

    Read the article

  • When sending headers to download a PDF, Safari appends .html

    - by alex
    Here is the request and response headers http://www.example.com/get/pdf GET /~get/pdf HTTP/1.1 Host: www.example.com User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Connection: keep-alive Referer: http://www.example.com Cookie: etc HTTP/1.1 200 OK Date: Thu, 29 Apr 2010 02:20:43 GMT Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8i DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 X-Powered-By: Me Expires: Thu, 19 Nov 1981 08:52:00 GMT Pragma: no-cache Cache-Control: private Content-Disposition: attachment; filename="File #1.pdf" Content-Length: 18776 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html; charset=utf-8 ---------------------------------------------------------- Basically, the response headers are sent by DOMPDF's stream() method. In Firefox, the file is prompted as File #1.pdf. However, in Safari, the file is saved as File #1.pdf.html. Does anyone know why Safari is appending the html extension to the filename?

    Read the article

  • c# - embed activex control remote desktop

    - by user328447
    scenario: user 1 is presenting his or her desktop to user 2. user 2 can view what's happening on user 1 on his(user2)'s screen, but cannot control it. got a hint from somewhere that by embedding activex control rdp will allow me to do so but i do not know where to start? is this sort of like collaboration? any help would be greatly appreciated ! thanks in advance !

    Read the article

  • My images are blurry! Why isn't WPF's SnapsToDevicePixels working?

    - by Zack Peterson
    I'm using some Images in my WPF applcation. XAML: <Image Name="ImageOrderedList" Source="images/OrderedList.png" ToolTip="Ordered List" Margin="0,0,5,5" Width="20" Height="20" SnapsToDevicePixels="True" MouseUp="Image_MouseUp" MouseEnter="Image_MouseEnter" MouseLeave="Image_MouseLeave" /> But, they appear fuzzy: Here's a zoomed-in, side-by-side comparison. An original is on the left: Why doesn't that SnapsToDevicePixels="True" line prevent this problem?

    Read the article

  • SCO Files Motion for Judgment As a Matter of Law, or For a New Trial

    <b>Groklaw:</b> "SCO has filed its "renewed" motion for judgment "as a matter of law", with its supporting memorandum. They ask the judge to rule over the heads of the jury and decide that the jury "simply got it wrong" when it ruled that SCO didn't get the copyrights in 1995 from Novell. In the alternative, they'd like a new trial."

    Read the article

  • what can cause a folder to become indestructible?

    - by JustJeff
    I have a directory that I want to delete, but windows (xp sp3) is giving me the run-around and the folder is now effectively indestructible. Attempts to open the folder, either via explorer or cmd.exe are met with 'd:/temp/foo Is Not Accessible. Access is denied'. Attempts to delete the folder result in 'Cannot delete foo: The directory is not empty' So I can't delete it because supposedly it's not empty, but windows won't let me in it for some reason, so I can't clean it out first. There's nothing in it of consequence, and basically I just want to delete it at this point. Thinking that some other process must have a lock on it, I used the SysInternals 'handles' and Process Explorer to look for open handles with the directory name. These turned up no matches. (The directory name is not actually 'foo', it is something more unique but 'foo' is easier to type here). I put the machine through a restart, and the problem persists. I did a search for the folder name with regedit, to see what other apps might be aware of it. No match. The properties dialog was mildly interesting. The Read-Only attribute is 'semi-checked', i.e., the grayish check mark you get when some parts are and some parts aren't. Naturally I immediately unchecked this, and tried to delete the folder. No go. Opening properties again reveals the gray check mark next to Read-Only has returned. All the stats, size, size on disk, files, folders, all these are zero. There do not appear to be any shares on the folder, so that's not it either. Finally, I tried opening the partition's properties, and running the Tools/Error Checking utility. This didn't turn up any problems either. Fwiw, this directory was created by [a popular gui zip tool] when I tried to unpack a tar-and-zipped archive created on another system with command line utils. The archive was definitely corrupt, but I've never seen such a file do anything worse than crash the zip app, and certainly never leave permanent glitches in the file system. So what else can possibly be going on to make this folder behave this way?

    Read the article

  • No properties file found Error for ReloadableResourceBundleMessageSource

    - by samspot
    I'm trying to use a reloadable spring resource bundle but spring cannot find the file. I've tried tons of different paths, but can't get it to work anywhere. In the code below you'll see that i load both the spring bundle and the regular one from the same path variable but only one works. I've been banging my head against this for far too long. Anybody have any ideas? logfile INFO 2010-04-28 11:38:31,805 [main] org.myorg.test.TestMessages: C:\www\htdocs\messages.properties INFO 2010-04-28 11:38:31,805 [main] org.myorg.data.Messages: initializing Spring Message Source to C:\www\htdocs\messages.properties INFO 2010-04-28 11:38:31,821 [main] org.myorg.data.Messages: Attempting to load properties from C:\www\htdocs\messages.properties DEBUG 2010-04-28 11:38:31,836 [main] org.springframework.context.support.ReloadableResourceBundleMessageSource: No properties file found for [C:\www\htdocs\messages.properties_en_US] - neither plain properties nor XML DEBUG 2010-04-28 11:38:31,842 [main] org.springframework.context.support.ReloadableResourceBundleMessageSource: No properties file found for [C:\www\htdocs\messages.properties_en] - neither plain properties nor XML DEBUG 2010-04-28 11:38:31,848 [main] org.springframework.context.support.ReloadableResourceBundleMessageSource: No properties file found for [C:\www\htdocs\messages.properties] - neither plain properties nor XML INFO 2010-04-28 11:38:31,848 [main] org.myorg.test.TestMessages: I am C:\www\htdocs\messages.properties Messages.java package org.myorg.data; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.PropertyResourceBundle; import java.util.ResourceBundle; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.context.support.ReloadableResourceBundleMessageSource; public class Messages { protected static final Log logger = LogFactory.getLog(Messages.class); private static ReloadableResourceBundleMessageSource msgSource = null; private static ResourceBundle RESOURCE_BUNDLE; public static final String PATH = "C:" + File.separator + "www" + File.separator + "htdocs" + File.separator + "messages.properties"; private Messages() { } public static String getString(String key) { initBundle(); return msgSource.getMessage(key, null, RESOURCE_BUNDLE.getString(key), null); } private static void initBundle(){ if(null == msgSource || null == RESOURCE_BUNDLE){ logger.info("initializing Spring Message Source to " + PATH); msgSource = new ReloadableResourceBundleMessageSource(); msgSource.setBasename(PATH); msgSource.setCacheSeconds(1); /* works, but you have to hardcode the platform dependent path starter. It also does not cache */ FileInputStream fis = null; try { logger.info("Attempting to load properties from " + PATH); fis = new FileInputStream(PATH); RESOURCE_BUNDLE = new PropertyResourceBundle(fis); } catch (Exception e) { logger.info("couldn't find " + PATH); } finally { try { if(null != fis) fis.close(); } catch (IOException e) { } } } } } TestMessages.java package org.myorg.test; import org.myorg.data.Messages; public class TestMessages extends AbstractTest { public void testMessage(){ logger.info(Messages.PATH); logger.info(Messages.getString("OpenKey.TEST")); } }

    Read the article

  • Is this valid EJB-QL?

    - by Yishai
    I have the following construct in EJB-QL several EJB 2.1 finder methods: SELECT distinct OBJECT(rd) FROM RequestDetail rd, DetailResponse dr WHERE dr.updateReqResponseParentID is not null and dr.updateReqResponseParentID = ?1 and rd.requestDetailID = dr.requestDetailID and rd.deleted is null and dr.deleted is null IDEA's EJB-QL inspection flags the use of the two object FROM RequestDetail rd, DetailResponse dr with an inspection which says: Several ranged variable declarations are not supported, use collection member declarations instead (e.g. IN(o.lineItems)) The queries themselves function fine (as in return the expected results) on JBoss 4.2. Is IDEA all wet here, or is there a valid issue with the query? And what is the actual preferred alternative syntax for such a query?

    Read the article

  • A btter way to represent Same value given multiple values(C#3.0)

    - by Newbie
    I have a situation for which I am looking for a more elegant solution. Consider the below cases "BKP","bkp","book-to-price" (will represent) BOOK-TO-PRICE "aop","aspect oriented program" (will represent) ASPECT-ORIENTED-PROGRAM i.e. if the user enter BKP or bkp or book-to-price , the program should treat that as BOOK-TO-PRICE. The same holds good for the second example(ASPECT-ORIENTED-PROGRAM). I have the below solution: Solution: if (str == "BKP" || str == "bkp" || str == "book-to-price" ) return "BOOK-TO-PRICE". But I think that there can be many other better solutions . Could you people please give some suggestion.(with an example will be better) I am using C#3.0 and dotnet framework 3.5

    Read the article

  • Run a JasperServer reprt via PHP and pass over the querystring.

    - by Ronedog
    I'm using Web Services to run some reports created in iReport on JasperServer. Inside the .jrxml file I can see the xml that holds the SQL for the report. Is it possible to pass this querystring over to JasperServer via Web Services, instead of hard coding the definition inside the .jrxml file. This is the string I would build in PHP, then pass over to JasperServer to be used in the execution of the report. <queryString> <![CDATA[SELECT * FROM table WHERE j=2]]> </queryString> Basically, I'm trying to find a way to dynamically create the SQL in PHP, then pass the SQL over to Jasper to run the report...is it even possible? Thanks.

    Read the article

  • Nhibernate 3.0 and FluentNHibernate

    - by Keith Nicholas
    is anyone building the truck NHibernate and FluentNhibernate together? How's it working? are you using it for production systems? How is the Linq support? Is it nearly ready for release? Is there a nice and concise way to keep up to date with what is going on in the world of NHibernate? (ie, without having to read lots of blogs, and mailing lists )

    Read the article

  • Robust unit-testing of HTML in PHP

    - by asbja
    I'm adding unit-tests to an older PHP codebase at work. I will be testing and then rewriting a lot of HTML generation code and currently I'm just testing if the generated strings are identical to the expected string, like so: (using PHPUnit) public function testConntype_select() { $this->assertEquals( '<select><option value="blabla">Some text</option></select>', conntype_select(1); // A value from the test dataset. ); } This way has the downside that attribute ordering, whitespace and a lot of other irrelevant details are tested as well. I'm wondering if there are any better ways to do this. For example if there are any good and easy ways to compare the generated DOM trees. I found very similar questions for ruby, but couldn't find anything for PHP.

    Read the article

  • Comparing GWT and Turbo Gears

    - by sechastain
    Anyone know of any tutorials implemented across multiple web application frameworks? For example, I'm starting to implement GWT's Stock Watcher tutorial in Turbo Gears 2 to see how difficult it will be to do in Turbo Gears 2. Likewise, I'll be looking for a Turbo Gears 2 tutorial to implement in GWT. But I hate to re-create the wheel - so I was wondering if anyone was familiar with such projects and/or would be interested in helping me work on such a project. Thanks, --Spencer

    Read the article

  • redoing object model construction to fit with asynchronous data fetching

    - by Andrew Patterson
    I have a modeled a set of objects that correspond with some real world concepts. TradeDrug, GenericDrug, TradePackage, DrugForm Underlying the simple object model I am trying to provide is a complex medical terminology that uses numeric codes to represent relationships and concepts, all accessible via a REST service - I am trying to hide away some of that complexity with an object wrapper. To give a concrete example I can call TradeDrug d = Searcher.FindTradeDrug("Zoloft") or TradeDrug d = new TradeDrug(34) where 34 might be the code for Zoloft. This will consult a remote server to find out some details about Zoloft. I might then call GenericDrug generic = d.EquivalentGeneric() System.Out.WriteLine(generic.ActiveIngredient().Name) in order to get back the generic drug sertraline as an object (again via a background REST call to the remote server that has all these drug details), and then perhaps find its ingredient. This model works fine and is being used in some applications that involve data processing. Recently however I wanted to do a silverlight application that used and displayed these objects. The silverlight environment only allows asynchronous REST/web service calls. I have no problems with how to make the asychhronous calls - but I am having trouble with what the design should be for my object construction. Currently the constructors for my objects do some REST calls sychronously. public TradeDrug(int code) { form = restclient.FetchForm(code) name = restclient.FetchName(code) etc.. } If I have to use async 'events' or 'actions' in order to use the Silverlight web client (I know silverlight can be forced to be a synchronous client but I am interested in asychronous approaches), does anyone have an guidance or best practice for how to structure my objects. I can pass in an action callback to the constructor public TradeDrug(int code, Action<TradeDrug> constructCompleted) { } but this then allows the user to have a TradeDrug object instance before what I want to construct is actually finished. It also doesn't support an 'event' async pattern because the object doesn't exist to add the event to until it is constructed. Extending that approach might be a factory object that itself has an asynchronous interface to objects factory.GetTradeDrugAsync(code, completedaction) or with a GetTradeDrugCompleted event? Does anyone have any recommendations?

    Read the article

  • .NET application per-machine/per-user licensing

    - by MainMa
    I am about to implement a very basic licensing feature for my application. A serial number may be granted per-machine (or per-operating-system) or per-user (as for CAL in Windows Server: if my application is used by several users on one machine or if it is used by one user on several machines). For per-operating-system licensing, I use SerialNumber of Win32_OperatingSystem. For per-user licensing, I use: WindowsIdentity currentIdentity = WindowsIdentity.GetCurrent(); if (currentIdentity != null) { SecurityIdentifier userSid = currentIdentity.User.AccountDomainSid; Console.WriteLine(userSid); } A hash of an obtained OS serial number or SID is then stored in the database, associated with application serial; each time the program starts, it queries the server, sending hash of OS SN/SID and application serial. Is it a right thing to do it or is it completely wrong? Will it work on every Windows machine? (For example, using motherboard serial is wrong)

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >