tag:blogger.com,1999:blog-34409529.comments2017-07-25T08:31:41.439+01:00Nuno Sousa's CornerNuno Sousahttp://www.blogger.com/profile/12985958024778979830noreply@blogger.comBlogger13125tag:blogger.com,1999:blog-34409529.post-24719055544735023452017-07-25T05:31:44.496+01:002017-07-25T05:31:44.496+01:00It can be done with some tweaking, here is how to ...It can be done with some tweaking, here is how to do it on linux.<br />1) change return part of main():<br /> CU_basic_run_tests();<br /> CU_pRunSummary runSummary = CU_get_run_summary();<br /> unsigned int exitValue = runSummary->nTestsFailed + runSummary->nAssertsFailed;<br /> CU_cleanup_registry();<br /> if (CU_get_error())<br /> return CU_get_error();<br /> return exitValue;<br />}<br /><br />2) run test as follows:<br />make CTEST_OUTPUT_ON_FAILURE=1 testAnonymoushttps://www.blogger.com/profile/17263344037384286275noreply@blogger.comtag:blogger.com,1999:blog-34409529.post-44492576103171197012016-01-30T09:20:54.146+00:002016-01-30T09:20:54.146+00:00nice postnice postAnonymoushttps://www.blogger.com/profile/12205550068734298020noreply@blogger.comtag:blogger.com,1999:blog-34409529.post-68659041529804500922011-11-01T12:00:42.568+00:002011-11-01T12:00:42.568+00:00nice post for the beginners...thanks :)nice post for the beginners...thanks :)bhavin kapadiahttps://www.blogger.com/profile/05227345910918258726noreply@blogger.comtag:blogger.com,1999:blog-34409529.post-81074270122147007242011-03-15T08:22:14.544+00:002011-03-15T08:22:14.544+00:00The idea of getting the SWAP inside LVM is have it...The idea of getting the SWAP inside LVM is have it encrypted too. You don't want any password that was swapped out to be available to anyone who steals your laptop.<br /><br />As for gentoo using it: it will use it when it is needed, but since gentoo can be really optimized you end up not using it many most of the time. I've used it when rebuilding things like libreoffice.Nuno Sousahttps://www.blogger.com/profile/12985958024778979830noreply@blogger.comtag:blogger.com,1999:blog-34409529.post-47087831881434735922011-02-11T17:49:12.007+00:002011-02-11T17:49:12.007+00:00Thank you for the nice hints. I was googling for a...Thank you for the nice hints. I was googling for a way of integrating CUnit into CTest framework and found your post.<br /><br />I am using CMake to create Visual C++ projects and it did create a RUN_TESTS target for me. But it looks like CTests relies on the test executable return values to report whether they failed or not. CUnit, on the other hand, as far it doesn't have any internal problem (e.g. memory allocation), the executable will always run successfully, regardless of the test results.<br /><br />One can say that I could have the test functions return failure if the test fails, but then again, I don't want the testing to abort on the first error. What we need is a report with the results for all tests, such as the CUnit executable will output to the standard output.<br /><br />Thus, CTests doesn't look much useful for integrating with CUnit. I ended up just adding a "test" target only to build the CUnit test executable. But I still have to run it on a terminal to see the results.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-34409529.post-13107761950972177912010-05-08T18:15:55.599+01:002010-05-08T18:15:55.599+01:00Come on, just clean the computer of that crapy OS....Come on, just clean the computer of that crapy OS. :) Keep a VM with it "just in case" as you say.<br /><br />I must admit that Sony is getting lower and lower scores on my geek interest score. The hardware they sell is rather good, but the software, the limitations imposed (as in the recent PS3 upgrade disabling the other OS booting), are making me despise all Sony products (computer or otherwise).Anonymoushttps://www.blogger.com/profile/11524286250810257349noreply@blogger.comtag:blogger.com,1999:blog-34409529.post-90734912011753746082010-01-08T07:56:59.571+00:002010-01-08T07:56:59.571+00:00Are you sure it's a good idea to put the SWAP ...Are you sure it's a good idea to put the SWAP partition inside the LVM ??<br />It seems to work that way but Gentoo is almost not using it at all.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-34409529.post-29812871457896288732009-12-17T14:21:55.870+00:002009-12-17T14:21:55.870+00:00Add
"-J-Dswing.aatext=true -J-Dawt.useSystem...Add <br />"-J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=on" <br />in your '/etc/netbeans-/netbeans.conf'<br />in the end of 'netbeans_default_options' line (inside the quotes..duh).<br /><br />Every time you start netbeans AntiAliasing will be there.Ivan Vhttps://www.blogger.com/profile/11128666836506809031noreply@blogger.comtag:blogger.com,1999:blog-34409529.post-80571304393803323402009-10-30T13:08:57.019+00:002009-10-30T13:08:57.019+00:00Thanks for such a nice post. I really like your bl...Thanks for such a nice post. I really like your blogJames Smithhttp://www.coverity.com/noreply@blogger.comtag:blogger.com,1999:blog-34409529.post-86637842906366523932009-01-22T10:08:00.000+00:002009-01-22T10:08:00.000+00:00Hi!I'm using a TomTom Go v3 Europe. Since it runs ...Hi!<BR/><BR/>I'm using a TomTom Go v3 Europe. Since it runs Linux under the hood I found a tool called tracker that tracks your movements as both an itenerary for later replay and GPX, which is great for OpenStreetMap.<BR/><BR/>NunoNuno Sousahttps://www.blogger.com/profile/12985958024778979830noreply@blogger.comtag:blogger.com,1999:blog-34409529.post-10893253039122562382009-01-22T10:02:00.000+00:002009-01-22T10:02:00.000+00:00Hi!"I decided to hack my GPS to track my trips and...Hi!<BR/><BR/>"I decided to hack my GPS to track my trips and share them"<BR/><BR/>Just for curiosity, what model is your GPS ? <BR/><BR/>I had to "hack" mine also. It's a shame that such basic funcionality is not supported by Autos GPSs. It is available long ago by marine/outdoor GPSs.<BR/><BR/>EduEduhttps://www.blogger.com/profile/14672533709220217407noreply@blogger.comtag:blogger.com,1999:blog-34409529.post-90970490997102693772008-03-14T14:06:00.000+00:002008-03-14T14:06:00.000+00:00Hello Ioannis.As I see it you have two ways to mak...Hello Ioannis.<BR/><BR/>As I see it you have two ways to make this more beautiful/better...<BR/><BR/>You can create a Runnable and use it directly or in the EDT, with a Utility class. Something like:<BR/><BR/>Runnable doInEDT = new Runnable() {<BR/> public void run() {<BR/> // Swing Code<BR/> }<BR/>}<BR/>MySwingUtilities.runInEDT(doInEDT);<BR/><BR/>The method of the MySwingUtilities would be something like:<BR/><BR/><BR/>public void runInEDT(Runnable work) {<BR/> if(!SwingUtilities.isEventDispatchThread()) {<BR/> SwingUtilities.invokeLater(work);<BR/> } else {<BR/> work.run();<BR/> }<BR/>}<BR/><BR/><BR/>Of course that we will have to ask yourself what is better invokeLater, or invokeAndWait. Maybe even two utility methods.<BR/><BR/>The other way is to use the new SwingWorker class. It is available since Java 5 I believe, but you can find it for Java 1.4 on the web.<BR/>The SwingWorker class accepts tasks that have a part that is executed outside the EDT and a part that runs on the EDT. You can even have interim results being pushed to the UI. It is a powerful API, if you use it right because the SwingWorker can use an ExecutorService of Java, from the concurrency utilities. This way you get a single Thread Pool for background tasks.<BR/><BR/>I hope this helps guide you in the right path ;-)<BR/><BR/>Cheers,<BR/>NunoNuno Sousahttps://www.blogger.com/profile/12985958024778979830noreply@blogger.comtag:blogger.com,1999:blog-34409529.post-70556126195846752402008-03-14T12:56:00.000+00:002008-03-14T12:56:00.000+00:00My greetings from the Netherlands.It seems to me y...My greetings from the Netherlands.<BR/>It seems to me you are an expert on Swing. A question:<BR/><BR/>I have pages and pages of code where many times JLabel, JTextField, JTextArea, JProgressBar get updated. Unfortunately, it seems that most of it is not running on the EventDispatchThread. <BR/><BR/>The question i have is:<BR/><BR/>What is the best way to deal with such issues? how can I make sure that GUI-code is running on EDT?<BR/><BR/>I have seen fragments of code like this:<BR/><BR/> static public void updateSearchString(String _msg)<BR/> {<BR/> if(!SwingUtilities.isEventDispatchThread()) <BR/> {<BR/> SwingUtilities.invokeLater(new Runnable(){<BR/> public void run(){<BR/> textfield.setText(_msg);<BR/> }<BR/> });<BR/> }<BR/> else<BR/> {<BR/> textfield.setText(_msg);<BR/> }<BR/> }<BR/><BR/><BR/>but I cannot imagine a long program to be calling these fragments for every single object that needs to be refreshed. Isnt there a more elegant way to do such dispersed GUI-updates??<BR/><BR/>If you find the time to answer, please do so using my email address:<BR/><BR/>xanthopoulos@yahoo.com<BR/><BR/><BR/>cheers<BR/>ioannisAnonymousnoreply@blogger.com