Search Results

Search found 132 results on 6 pages for 'marcel levy'.

Page 1/6 | 1 2 3 4 5 6  | Next Page >

  • Video on Architecture and Code Quality using Visual Studio 2012–interview with Marcel de Vries and Terje Sandstrom by Adam Cogan

    - by terje
    Find the video HERE. Adam Cogan did a great Web TV interview with Marcel de Vries and myself on the topics of architecture and code quality.  It was real fun participating in this session.  Although we know each other from the MVP ALM community,  Marcel, Adam and I haven’t worked together before. It was very interesting to see how we agreed on so many terms, and how alike we where thinking.  The basics of ensuring you have a good architecture and how you could document it is one thing.  Also, the same agreement on the importance of having a high quality code base, and how we used the Visual Studio 2012 tools, and some others (NDepend for example)  to measure and ensure that the code quality was where it should be.  As the tools, methods and thinking popped up during the interview it was a lot of “Hey !  I do that too!”.  The tools are not only for “after the fact” work, but we use them during the coding.  That way the tools becomes an integrated part of our coding work, and helps us to find issues we may have overlooked.  The video has a bunch of call outs, pinpointing important things to remember. These are also listed on the corresponding web page. I haven’t seen that touch before, but really liked this way of doing it – it makes it much easier to spot the highlights.  Titus Maclaren and Raj Dhatt from SSW have done a terrific job producing this video.  And thanks to Lei Xu for doing the camera and recording job.  Thanks guys ! Also, if you are at TechEd Amsterdam 2012, go and listen to Adam Cogan in his session on “A modern architecture review: Using the new code review tools” Friday 29th, 10.15-11.30 and Marcel de Vries session on “Intellitrace, what is it and how can I use it to my benefit” Wednesday 27th, 5-6.15 The highlights points out some important practices.  I’ll elaborate on a few of them here: Add instructions on how to compile the solution.  You do this by adding a text file with instructions to the solution, and keep it under source control.  These instructions should contain what is needed on top of a standard install of Visual Studio.  I do a lot of code reviews, and more often that not, I am not even able to compile the program, because they have used some tool or library that needs to be installed.  The same applies to any new developer who enters into the team, so do this to increase your productivity when the team changes, or a team member switches computer. Don’t forget to document what you have to configure on the computer, the IIS being a common one. The more automatic you can do this, the better.  Use NuGet to get down libraries. When the text document gets more than say, half a page, with a bunch of different things to do, convert it into a powershell script instead.  The metrics warning levels.  These are very conservatively set by Microsoft.  You rarely see anything but green, and besides, you should have color scales for each of the metrics.  I have a blog post describing a more appropriate set of levels, based on both research work and industry “best practices”.  The essential limits are: Cyclomatic complexity and coupling:  Higher numbers are worse On method levels: Green :  From 0 to 10 Yellow:  From 10 to 20  (some say 15).   Acceptable, but have a look to see if there is something unneeded here. Red: From 20 to 40:   Action required, get these down. Bleeding Red: Above 40   This is the real red alert.  Immediate action!  (My invention, as people have asked what do I do when I have cyclomatic complexity of 150.  The only answer I could think of was: RUN! ) Maintainability index:  Lower numbers are worse, scale from 0 to 100. On method levels: Green:  60 to 100 Yellow:  40 – 60.    You will always have methods here too, accept the higher ones, take a look at those who are down to the lower limit.  Check up against the other metrics.) Red:  20 – 40:  Action required, fix these. Bleeding red:  Below 20.  Immediate action required. When doing metrics analysis, you should leave the generated code out.  You do this by adding attributes, unfortunately Microsoft has “forgotten” to add these to all their stuff, so you might have to add them to some of the code.  It most cases it can be done so that it is not overwritten by a new round of code generation.  Take a look a my blog post here for details on how to do that. Class level metrics might also be useful, at least for coupling and maintenance.  But it is much more difficult to set any fixed limits on those.  Any metric aggregations on higher level tend to be pretty useless, as the number of methods vary pretty much, and there are little science on what number of methods can be regarded as good or bad.  NDepend have a recommendation, but they say it may vary too.  And in these days of data binding, the number might be pretty high, as properties counts as methods.  However, if you take the worst case situations, classes with more than 20 methods are suspicious, and coupling and cyclomatic complexity go red above 20, so any classes with more than 20x20 = 400 for these measures should be checked over. In the video we mention the SOLID principles, coined by “Uncle Bob” (Richard Martin). One of them, the Dependency Inversion principle we discuss in the video.  It is important to note that this principle is NOT on whether you should use a Dependency Inversion Container or not, it is about how you design the interfaces and interactions between your classes.  The Dependency Inversion Container is just one technique which is based on this principle, but which main purpose is to isolate things you would like to change at runtime, for example if you implement a plug in architecture.  Overuse of a Dependency Inversion Container is however, NOT a good thing.  It should be used for a purpose and not as a general DI solution.  The general DI solution and thinking however is useful far beyond the DIC.   You should always “program to an abstraction”, and not to the concreteness.  We also talk a bit about the GRASP patterns, a term coined by Craig Larman in his book Applying UML and design patterns. GRASP patterns stand for General Responsibility Assignment Software Patterns and describe fundamental principles of object design and responsibility assignment.  What I find great with these patterns is that they is another way to focus on the responsibility of a class.  One of the things I most often found that is broken in software designs, is that the class lack responsibility, and as a result there are a lot of classes mucking around in the internals of the other classes.  We also discuss the term “Code Smells”.  This term was invented by Kent Beck and Martin Fowler when they worked with Fowler’s “Refactoring” book. A code smell is a set of “bad” coding practices, which are the drivers behind a corresponding set of refactorings.  Here is a good list of the smells, and their corresponding refactor patterns. See also this.

    Read the article

  • Import excel files with image in php/mysql

    - by Marcel
    Hi all! I want to make an import script which allows users to upload their excel file (extension not important) to my php application. The application should reconize a list of items (so far so good). The difficulty in this case is that the excel files contain images...I've read information about phpexcel library but it does not say anything about images. Anybody ideas? Regards, Marcel

    Read the article

  • Real time SQL database updates between multiple VB.NET clients

    - by Marcel
    Hi, I hope somebody can help me out on this question. I'm using a SQL database and I'm writing a VB.NET client application. This application is used on multiple computers at the same time. If one of the clients makes an update to the database I would like to have the other clients to be aware of the update. Has ony one already done this before? Thank you very much! Marcel

    Read the article

  • Removing associated entity JPA

    - by Marcel
    Hi I have a question regarding JPA persistence in Glassfish. Situation: I have a Supplier class that has a 1:n bidirectional relation to SupplierAddress. I would like to have the following behaviour: If I remove the SupplierAddress object from the List in the Supplier object and update it via the merge(supplierobject), the SupplierAddress tupel/object should be deleted. Is there an annotation do configure it like this or do I have to delete it manually. Any help would be very appreciated. Greetings Marcel

    Read the article

  • Keeping up to date with PeopleSoft Global Payroll Australia legislation

    - by Carolyn Cozart
    The Temporary Flood and Cyclone Reconstruction levy (flood levy) will now apply to individuals for the 2011-2012 year. Tax Laws Amendment Bill 2011 was tabled in parliament in February 2011 and received royal assent in April 2011. The tax tables, however, were released last week in May 2011. To find out  the details of what is changing in Global Payroll Australia as well as targeted delivery dates, please visit the Knowledge Center on Support.Oracle.com. Click on the Knowledge tab. Simply type in keywords ‘Global Payroll Australia Position’. If further amendments are made, we will revise the document accordingly. Let the Oracle/PeopleSoft team help reduce the stress and anxiety of these changing times by staying informed. PeopleSoft is working hard to get you the information you need. The information is just a few clicks away.

    Read the article

  • Trace Flag 610 – When should you use it?

    - by simonsabin
    Thanks to Marcel van der Holst for providing this great information on the use of Trace Flag 610. This trace flag can be used to have minimal logging into a b tree (i.e. clustered table or an index on a heap) that already has data. It is a trace flag because in testing they found some scenarios where it didn’t perform as well. Marcel explains why below. “ TF610 can be used to get minimal logging in a non-empty B-Tree. The idea is that when you insert a large amount of data, you don't want to...(read more)

    Read the article

  • PowerShell dataGridView - Copy only one Row into an other dataGridView

    - by Marcel L.
    I´ve got a very short question about the "dataGridView". I´m developing with the Microsoft PowerShell and I want to copy one Row (from $dataGridView1) to the other ($dataGridView2). With this Code I can only Copy the Value of the last focused Cell. I´ve tried to make this for a whole Row, but it´s only working with Cells. Here is my Code: **$btnListeAdd.Add_Click({ $Row = $dataGridView1.Rows[ $dataGridView1.CurrentCell.RowIndex ] $dataGridView2.Rows.Add( $dataGridView1.CurrentCell.Value ) $dataGridView1.Rows.Remove( $Row ) }) $tabListe.Controls.Add($btnListeAdd)** Only the market Cell in $dataGridView1 (similar Column 1 or 2) will be cloned in Column1 in $dataGridView2 - in a extra Row, yey. Thanks for helping me. Please show mercy. It´s my first day with the PowerShell. Kind regards, Marcel L.

    Read the article

  • MigLayout JTextArea is not shrinking when used with linewrap=true

    - by Marcel
    Hi. If I use a JTextArea with MigLayout like this: MigLayout thisLayout = new MigLayout("", "[][grow]", "[]20[]"); this.setLayout(thisLayout); { jLabel1 = new JLabel(); this.add(jLabel1, "cell 0 0"); jLabel1.setText("jLabel1"); } { jTextArea1 = new JTextArea(); this.add(jTextArea1, "cell 0 1 2 1,growx"); jTextArea1.setText("jTextArea1"); jTextArea1.setLineWrap(false); } then the JTextArea grows and shrinks perfectly when resizing the window. When I set the linewrap to true the JTextArea is not shrinking when I make the window smaller again. I would very much appreciate any help. Thanks Marcel

    Read the article

  • good documentation about "avoid catching throwable", in context of weblogic server

    - by Marcel
    hi all, i am currently refactoring an existing codebase (EJBs...) to rip out all blocks where a Throwable is catched inside of the EJB. try { ... do some business logic } catch(Throwable t){ ... log and swallow ... :-( } i want/need to convince the people around me with proper documentation that "catching throwable" is a no-go for an EJB (we have lots of discussions around this :-(( ). weblogic will handle all the "Error" conditions and maybe invalidate EJBs and put fresh(working) EJBs into the pool. catching Throwable would undermine all these security nets provided by weblogic. and catching throwable is bad practice anyway (but people here are reluctant and use the "throwable" hammer everywhere). is anyone able to point me to some online docs where this behaviour is explained (for weblogic or jboss or...). i searched via google and had a look at the weblogic docs but wasn't able to find anything, just generic java doc. any help highly appreciated cheers marcel

    Read the article

  • How to measure sum of collected memory of Young Generation?

    - by Marcel
    Hi, I'd like to measure memory allocation data from my java application, i.e. the sum of the size of all objects that were allocated. Since object allocation is done in young generation this seems to be the right place. I know jconsole and I know the JMX beans but I just can't find the right variable... Right at the moment we are parsing the gc log output file but that's quite hard. Ideally we'd like to measure it via JMX... How can I get this value? Thanks, Marcel

    Read the article

  • FLVPlayback, go fullscreen smooth?

    - by Marcel
    Hello, Im looking into using and customizing FLVPlayback in a project. How to go about this is clear, but I noticed 1 anoying thing. When going fullscreen, first Flash player goes fullscreen and then briefly shows the FLVPlayback component in its original size, before jumping to show the video itself fullscreen. I noticed on Youtube this doesnt happen. How can I escape this 'flicker' and have the video go fullscreen as the videos do on youtube? Thanks a lot for any tips! Marcel

    Read the article

  • GlassFish Starting Up Java SE Client - No Initial Context Exception

    - by Marcel
    Hi I have developed a java se client that calls some session beans on a glassfish server. I connect to the bean remote interface like this. context = new InitialContext(); em = (ICrudService) context.lookup("java:global/BackITServer/CrudServiceImpl"); This works fine from inside eclipse (gf-client on build path). When I export my project as a runnable jar and call it on the console with java -jar BackItClient.jar I get a NoInitialContextException. MMMM. I would very much appreciate some help. Thank You Greetings Marcel PS: Do I really have to pack all the jars which gf-client is referencing into my jar?

    Read the article

  • How to document experimental or incomplete APIs like @deprecated?

    - by Michael Levy
    Is there a good term that is similar but different than "deprecate" to mean that a method or API is in the code base but should not be used because its implementation is not complete or will likely change? (Yeah, I know, those methods shouldn't be public, yada yada yada. I didn't create my situation, I'm just trying to make the best of it.) What do people suggest? Experimental, Incomplete, something else? If I'm building javadoc documentation for this API that is still in flux, should I use the @deprecated tag or is there a better convention? To me @deprecated implies that this API is old and a newer preferred mechanism is available. In my situation, there is no alternative, but some of the methods in the API are not finished and so should not be used. At this point I cannot make them private, but I'd like to put clear warnings in the docs.

    Read the article

  • Listing common SQL Code Smells.

    - by Phil Factor
    Once you’ve done a number of SQL Code-reviews, you’ll know those signs in the code that all might not be well. These ’Code Smells’ are coding styles that don’t directly cause a bug, but are indicators that all is not well with the code. . Kent Beck and Massimo Arnoldi seem to have coined the phrase in the "OnceAndOnlyOnce" page of www.C2.com, where Kent also said that code "wants to be simple". Bad Smells in Code was an essay by Kent Beck and Martin Fowler, published as Chapter 3 of the book ‘Refactoring: Improving the Design of Existing Code’ (ISBN 978-0201485677) Although there are generic code-smells, SQL has its own particular coding habits that will alert the programmer to the need to re-factor what has been written. See Exploring Smelly Code   and Code Deodorants for Code Smells by Nick Harrison for a grounding in Code Smells in C# I’ve always been tempted by the idea of automating a preliminary code-review for SQL. It would be so useful to trawl through code and pick up the various problems, much like the classic ‘Lint’ did for C, and how the Code Metrics plug-in for .NET Reflector by Jonathan 'Peli' de Halleux is used for finding Code Smells in .NET code. The problem is that few of the standard procedural code smells are relevant to SQL, and we need an agreed list of code smells. Merrilll Aldrich made a grand start last year in his blog Top 10 T-SQL Code Smells.However, I'd like to make a start by discovering if there is a general opinion amongst Database developers what the most important SQL Smells are. One can be a bit defensive about code smells. I will cheerfully write very long stored procedures, even though they are frowned on. I’ll use dynamic SQL occasionally. You can only use them as an aid for your own judgment and it is fine to ‘sign them off’ as being appropriate in particular circumstances. Also, whole classes of ‘code smells’ may be irrelevant for a particular database. The use of proprietary SQL, for example, is only a ‘code smell’ if there is a chance that the database will have to be ported to another RDBMS. The use of dynamic SQL is a risk only with certain security models. As the saying goes,  a CodeSmell is a hint of possible bad practice to a pragmatist, but a sure sign of bad practice to a purist. Plamen Ratchev’s wonderful article Ten Common SQL Programming Mistakes lists some of these ‘code smells’ along with out-and-out mistakes, but there are more. The use of nested transactions, for example, isn’t entirely incorrect, even though the database engine ignores all but the outermost: but it does flag up the possibility that the programmer thinks that nested transactions are supported. If anything requires some sort of general agreement, the definition of code smells is one. I’m therefore going to make this Blog ‘dynamic, in that, if anyone twitters a suggestion with a #SQLCodeSmells tag (or sends me a twitter) I’ll update the list here. If you add a comment to the blog with a suggestion of what should be added or removed, I’ll do my best to oblige. In other words, I’ll try to keep this blog up to date. The name against each 'smell' is the name of the person who Twittered me, commented about or who has written about the 'smell'. it does not imply that they were the first ever to think of the smell! Use of deprecated syntax such as *= (Dave Howard) Denormalisation that requires the shredding of the contents of columns. (Merrill Aldrich) Contrived interfaces Use of deprecated datatypes such as TEXT/NTEXT (Dave Howard) Datatype mis-matches in predicates that rely on implicit conversion.(Plamen Ratchev) Using Correlated subqueries instead of a join   (Dave_Levy/ Plamen Ratchev) The use of Hints in queries, especially NOLOCK (Dave Howard /Mike Reigler) Few or No comments. Use of functions in a WHERE clause. (Anil Das) Overuse of scalar UDFs (Dave Howard, Plamen Ratchev) Excessive ‘overloading’ of routines. The use of Exec xp_cmdShell (Merrill Aldrich) Excessive use of brackets. (Dave Levy) Lack of the use of a semicolon to terminate statements Use of non-SARGable functions on indexed columns in predicates (Plamen Ratchev) Duplicated code, or strikingly similar code. Misuse of SELECT * (Plamen Ratchev) Overuse of Cursors (Everyone. Special mention to Dave Levy & Adrian Hills) Overuse of CLR routines when not necessary (Sam Stange) Same column name in different tables with different datatypes. (Ian Stirk) Use of ‘broken’ functions such as ‘ISNUMERIC’ without additional checks. Excessive use of the WHILE loop (Merrill Aldrich) INSERT ... EXEC (Merrill Aldrich) The use of stored procedures where a view is sufficient (Merrill Aldrich) Not using two-part object names (Merrill Aldrich) Using INSERT INTO without specifying the columns and their order (Merrill Aldrich) Full outer joins even when they are not needed. (Plamen Ratchev) Huge stored procedures (hundreds/thousands of lines). Stored procedures that can produce different columns, or order of columns in their results, depending on the inputs. Code that is never used. Complex and nested conditionals WHILE (not done) loops without an error exit. Variable name same as the Datatype Vague identifiers. Storing complex data  or list in a character map, bitmap or XML field User procedures with sp_ prefix (Aaron Bertrand)Views that reference views that reference views that reference views (Aaron Bertrand) Inappropriate use of sql_variant (Neil Hambly) Errors with identity scope using SCOPE_IDENTITY @@IDENTITY or IDENT_CURRENT (Neil Hambly, Aaron Bertrand) Schemas that involve multiple dated copies of the same table instead of partitions (Matt Whitfield-Atlantis UK) Scalar UDFs that do data lookups (poor man's join) (Matt Whitfield-Atlantis UK) Code that allows SQL Injection (Mladen Prajdic) Tables without clustered indexes (Matt Whitfield-Atlantis UK) Use of "SELECT DISTINCT" to mask a join problem (Nick Harrison) Multiple stored procedures with nearly identical implementation. (Nick Harrison) Excessive column aliasing may point to a problem or it could be a mapping implementation. (Nick Harrison) Joining "too many" tables in a query. (Nick Harrison) Stored procedure returning more than one record set. (Nick Harrison) A NOT LIKE condition (Nick Harrison) excessive "OR" conditions. (Nick Harrison) User procedures with sp_ prefix (Aaron Bertrand) Views that reference views that reference views that reference views (Aaron Bertrand) sp_OACreate or anything related to it (Bill Fellows) Prefixing names with tbl_, vw_, fn_, and usp_ ('tibbling') (Jeremiah Peschka) Aliases that go a,b,c,d,e... (Dave Levy/Diane McNurlan) Overweight Queries (e.g. 4 inner joins, 8 left joins, 4 derived tables, 10 subqueries, 8 clustered GUIDs, 2 UDFs, 6 case statements = 1 query) (Robert L Davis) Order by 3,2 (Dave Levy) MultiStatement Table functions which are then filtered 'Sel * from Udf() where Udf.Col = Something' (Dave Ballantyne) running a SQL 2008 system in SQL 2000 compatibility mode(John Stafford)

    Read the article

  • What filesystem for an external Harddrive (Linux/Mac/Windows)

    - by Marcel
    What Filesystem should I use for an external USB harddrive (500GB), with possibility to share with a Mac and Windows systems, for example at the office. Now it is NTFS but back in the day the NTFS support was not stable under Linux and I think it is not supported on a Mac. I would just use FAT32, but it has 4GB file size limitation, do I overlooked any other option? I looked here: filesystem types for partitions but a Mac is not mentioned. edit Windows is the least important, I am not sure if I need Windows support at all. So what would I use just for Linux and Mac?

    Read the article

  • Should I reorder partitions regarding performance

    - by Marcel
    I have in principal 3 big partitions on my Netbook. One Windows, one for shared files, one for Ubuntu. I recently find out (using hdparm) the the hardisk seems to have much better perfomance on the first 2/3 (~ 60MB/s) than on the last 1/3 (~ 40MB/s). I am thinking to delete the second partition and create new partitions for "swap" and / directly after Windows. Does this effort make sense? I also wanna upgrade to 10.4/10.10 but keep the option to go back to the old system, so maybe I install ubuntu completely in a/this new partition?

    Read the article

  • Cisco PrecisionHD USB Camera (Detected but no video)

    - by Marcel Bissonnette
    I'm having an issue with my Cisco PrecisionHD USB Camera. It is detected but does not show video (using "Cheese Webcam Booth"). Any ideas? (I'm a newbie with ubuntu) Specs: Ubuntu 12.10 32bit Dell Latitude E6400 Cisco PrecisionHD USB Camera (USB 2.0) connected directly into laptop (no docking station) Troubleshooting: Using the command lsusb, I find the following device: Bus 002 Device 003: ID 1f82:0001 TANDBERG PrecisionHD Camera '+ more devices like audio, finger swipe, Linux foundation 2.0, 1.1 So what now? Thanks. MB

    Read the article

  • How can I remove old kernels/install new ones when /boot is full?

    - by Marcel
    I know this question is asked many times before, however with me it is just a bit different I guess. # df -h Filesystem Size Used Avail Use% Mounted on /dev/sda3 224G 5.2G 208G 3% / udev 1.9G 4.0K 1.9G 1% /dev tmpfs 777M 260K 777M 1% /run none 5.0M 0 5.0M 0% /run/lock none 1.9G 0 1.9G 0% /run/shm /dev/sda2 90M 88M 0 100% /boot /dev/sda6 1.9G 514M 1.3G 29% /tmp My boot partition is full. Current Kernel: # uname -r 3.2.0-35-generic All Kernels: # dpkg --list | grep linux-image ii linux-image-3.2.0-32-generic 3.2.0-32.51 Linux kernel image for version 3.2.0 on 64 bit x86 SMP ii linux-image-3.2.0-34-generic 3.2.0-34.53 Linux kernel image for version 3.2.0 on 64 bit x86 SMP ii linux-image-3.2.0-35-generic 3.2.0-35.55 Linux kernel image for version 3.2.0 on 64 bit x86 SMP iF linux-image-3.2.0-37-generic 3.2.0-37.58 Linux kernel image for version 3.2.0 on 64 bit x86 SMP iF linux-image-3.2.0-38-generic 3.2.0-38.60 Linux kernel image for version 3.2.0 on 64 bit x86 SMP iU linux-image-generic 3.2.0.37.45 Generic Linux kernel image So I thought of removing the 3.2.0.32-generic kernel with: # sudo apt-get purge linux-image-3.2.0-32-generic Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: linux-generic : Depends: linux-headers-generic (= 3.2.0.37.45) but 3.2.0.38.46 is to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). No success. When I try apt-get -f install it also fails: # apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: linux-headers-3.2.0-34 linux-headers-3.2.0-35 linux-headers-3.2.0-34-generic linux-headers-3.2.0-35-generic Use 'apt-get autoremove' to remove them. The following extra packages will be installed: linux-generic linux-image-generic The following packages will be upgraded: linux-generic linux-image-generic 2 upgraded, 0 newly installed, 0 to remove and 9 not upgraded. 5 not fully installed or removed. Need to get 0 B/4,334 B of archives. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? y Setting up initramfs-tools (0.99ubuntu13.1) ... update-initramfs: deferring update (trigger activated) Setting up linux-image-3.2.0-37-generic (3.2.0-37.58) ... Running depmod. update-initramfs: deferring update (hook will be called later) The link /initrd.img is a dangling linkto /boot/initrd.img-3.2.0-38-generic Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-37-generic /boot/vmlinuz-3.2.0-37-generic update-initramfs: Generating /boot/initrd.img-3.2.0-37-generic gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-3.2.0-37-generic with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.2.0-37-generic.postinst line 1010. dpkg: error processing linux-image-3.2.0-37-generic (--configure): subprocess installed post-installation script returned error exit status 2 Setting up linux-image-3.2.0-38-generic (3.2.0-38.60) ... Running depmod. update-initramfs: deferring update (hook will be called later) The link /initrd.img is a dangling linkto /boot/initrd.img-3.2.0-37-generic Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-38-generic /boot/vmlinuz-3.2.0-38-generic update-initramfs: Generating /boot/initrd.img-3.2.0-38-generic gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-3.2.0-38-generic with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.2.0-38-generic.postinst line 1010. dpkg: error processing linux-image-3.2.0-38-generic (--configure): subprocess installed post-installation script returned error exit status 2 dpkg: dependency problems prevent configuration of linux-image-generic: linux-image-generic depends on linux-image-3.2.0-37-generic; however: Package linux-image-3.2.0-37-generic is not configured yet. dpkg: error processing linux-image-generic (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of linux-generic: linux-generic depends on linux-image-generic (= 3.2.0.37.45); however: Package linux-image-generic is not configured yet. linux-generic depends on linux-headers-generic (= 3.2.0.37.45); however: Version of linux-headers-generic on system is 3.2.0.38.46. dpkg: error processing linux-generic (--configure): dependency problems - leaving unconfigured Processing triggers for initramfs-tools ... No apport report written because the error message indicates its a followup error from a previous failure. No apport report written because MaxReports is reached already update-initramfs: Generating /boot/initrd.img-3.2.0-35-generic gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-3.2.0-35-generic with 1. dpkg: error processing initramfs-tools (--configure): subprocess installed post-installation script returned error exit status 1 No apport report written because MaxReports is reached already Errors were encountered while processing: linux-image-3.2.0-37-generic linux-image-3.2.0-38-generic linux-image-generic linux-generic initramfs-tools E: Sub-process /usr/bin/dpkg returned an error code (1) Any help would really be appreciated. Update: I did: sudo rm /boot/*-3.2.0-32-generic /boot/*-3.2.0-34-generic After that the following problem with apt-get -f install: root@localhost:/# apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following extra packages will be installed: linux-generic The following packages will be upgraded: linux-generic 1 upgraded, 0 newly installed, 0 to remove and 9 not upgraded. 1 not fully installed or removed. Need to get 0 B/1,722 B of archives. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? y dpkg: dependency problems prevent configuration of linux-generic: linux-generic depends on linux-image-generic (= 3.2.0.37.45); however: Version of linux-image-generic on system is 3.2.0.38.46. linux-generic depends on linux-headers-generic (= 3.2.0.37.45); however: Version of linux-headers-generic on system is 3.2.0.38.46. dpkg: error processing linux-generic (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. Errors were encountered while processing: linux-generic E: Sub-process /usr/bin/dpkg returned an error code (1)

    Read the article

  • JPA association table is not deletable

    - by Marcel
    Hi I have a problem with JPA (EclipseLink). I am not able to delete a association table. This is the situation: Product 1:n to ProductResource Resource 1:n to ProductResource I first set the product and resource attributes of ProductResource. If I then try to delete the ProductResource object nothing happens (no sql is generated - no exception). If I comment out both OneToMany annotations in ProductResource I can delete the object. I can also delete the object when product and resource attributes are not set. If I comment out only the annotation above the ressource attribut the ProductResource object gets deleted upon the deletion of the product object (cascade=CascadeType.ALL). I hope someone could give me a hint. Thank you. Product Resource: public class ProductResource implements Serializable { @ManyToOne(fetch=FetchType.EAGER, cascade=CascadeType.MERGE) private Product product; @ManyToOne(fetch=FetchType.EAGER, cascade=CascadeType.MERGE) private Resource resource; Product: public class Product implements Serializable { @OneToMany(mappedBy="product", fetch=FetchType.EAGER, cascade=CascadeType.ALL) private List<ProductResource> productResources = new ArrayList<ProductResource>(); Resource: public class Resource implements Serializable { @OneToMany(mappedBy="resource", fetch=FetchType.EAGER, cascade=CascadeType.ALL) private List<ProductResource> productResources = new ArrayList<ProductResource>(); Greetings Marcel

    Read the article

  • crawl websites out of java web application without using bin/nutch

    - by Marcel
    hi :) i am trying to using nutch (1.1) without bin/nutch from my (java) mojarra 2.0.2 webapp... i am searching at google for examples, but there are no examples how i can realize this :/ ... i get an exception and the job fails :/ (i think of cause something with hadoop)... here is my code: public void run() throws Exception { final String[] args = new String[] { String.format("%s%s%s%s", JSFUtils.getWebAppRoot(), "nutch", File.separator, DIRECTORY_URLS), "-dir", String.format("%s%s%s%s", JSFUtils.getWebAppRoot(), "nutch", File.separator, DIRECTORY_CRAWL), "-threads", this.preferences.get("threads"), "-depth", this.preferences.get("depth"), "-topN", this.preferences.get("topN"), "-solr", this.preferences.get("solr") }; Crawl.main(args); } and a part of the logging: 10/05/17 10:42:54 INFO jvm.JvmMetrics: Initializing JVM Metrics with processName=JobTracker, sessionId= 10/05/17 10:42:54 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same. 10/05/17 10:42:54 INFO mapred.FileInputFormat: Total input paths to process : 1 10/05/17 10:42:54 INFO mapred.JobClient: Running job: job_local_0001 10/05/17 10:42:54 INFO mapred.FileInputFormat: Total input paths to process : 1 10/05/17 10:42:55 INFO mapred.MapTask: numReduceTasks: 1 10/05/17 10:42:55 INFO mapred.MapTask: io.sort.mb = 100 java.io.IOException: Job failed! at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1232) at org.apache.nutch.crawl.Injector.inject(Injector.java:211) at org.apache.nutch.crawl.Crawl.main(Crawl.java:124) at lan.localhost.process.NutchCrawling.run(NutchCrawling.java:108) at lan.localhost.main.Index.indexing(Index.java:71) at lan.localhost.bean.FeedingBean.actionStart(FeedingBean.java:25) .... can someone help me or tell me how i can crawling from a java application? i have increased the Xms to 256m and Xmx to 768m, but nothing changed... best regards marcel

    Read the article

  • fitnesse test framework, arbitrary properties for test and queries/test runs based on them?

    - by Marcel
    hi, our testers have the requirement to store multiple properties for a test that are not present in the "properties". e.g. they want to store priority, a description(not in the wiki page itself) and so on. they don't want to use the tagging mechanism. is there a way to store any kind of new xml node in the properties.xml for a test? these properties should then be used to: query the fields via the search screen run tests based on the "SuiteResponder" ?suite=xxx&TAGx=abc&TAGy=cde they should be returned by "?properties" responder. they should appear in the test history of the test run in essence they want to store any kind of "meta" information in the properties.xml and work with them in all kinds of ways, search, run etc. does anybody here know if there is already something available in that direction? if not i think we have to "pimp" these features into fitnesse to make our testers happy. thanks a lot any help appreciated marcel ps: i've also posted the question in the yahoo fitnesse group

    Read the article

  • JPA behaviour...

    - by Marcel
    Hi I have some trouble understanding a JPA behaviour. Mabye someone could give me a hint. Situation: Product entity: @Entity public class Product implements Serializable { ... @OneToMany(mappedBy="product", fetch=FetchType.EAGER) private List<ProductResource> productResources = new ArrayList<ProductResource>(); .... public List<ProductResource> getProductResources() { return productResources; } public boolean equals(Object obj) { if (obj == this) return true; if (obj == null) return false; if (!(obj instanceof Product)) return false; Product p = (Product) obj; return p.productId == productId; } } Resource entity: @Entity public class Resource implements Serializable { ... @OneToMany(mappedBy="resource", fetch=FetchType.EAGER) private List<ProductResource> productResources = new ArrayList<ProductResource>(); ... public void setProductResource(List<ProductResource> productResource) { this.productResources = productResource; } public List<ProductResource> getProductResources() { return productResources; } public boolean equals(Object obj) { if (obj == this) return true; if (obj == null) return false; if (!(obj instanceof Resource)) return false; Resource r = (Resource) obj; return (long)resourceId==(long)r.resourceId; } } ProductResource Entity: This is a JoinTable (association class) with additional properties (amount). It maps Product and Resources. @Entity public class ProductResource implements Serializable { ... @JoinColumn(nullable=false, updatable=false) @ManyToOne(fetch=FetchType.EAGER, cascade=CascadeType.PERSIST) private Product product; @JoinColumn(nullable=false, updatable=false) @ManyToOne(fetch=FetchType.EAGER, cascade=CascadeType.PERSIST) private Resource resource; private int amount; public void setProduct(Product product) { this.product = product; if(!product.getProductResources().contains((this))){ product.getProductResources().add(this); } } public Product getProduct() { return product; } public void setResource(Resource resource) { this.resource = resource; if(!resource.getProductResources().contains((this))){ resource.getProductResources().add(this); } } public Resource getResource() { return resource; } ... public boolean equals(Object obj) { if (obj == this) return true; if (obj == null) return false; if (!(obj instanceof ProductResource)) return false; ProductResource pr = (ProductResource) obj; return (long)pr.productResourceId == (long)productResourceId; } } This is the Session Bean (running on glassfish). @Stateless(mappedName="PersistenceManager") public class PersistenceManagerBean implements PersistenceManager { @PersistenceContext(unitName = "local_mysql") private EntityManager em; public Object create(Object entity) { em.persist(entity); return entity; } public void delete(Object entity) { em.remove(em.merge(entity)); } public Object retrieve(Class entityClass, Long id) { Object entity = em.find(entityClass, id); return entity; } public void update(Object entity) { em.merge(entity); } } I call the session Bean from a java client: public class Start { public static void main(String[] args) throws NamingException { PersistenceManager pm = (PersistenceManager) new InitialContext().lookup("java:global/BackITServer/PersistenceManagerBean"); ProductResource pr = new ProductResource(); Product p = new Product(); Resource r = new Resource(); pr.setProduct(p); pr.setResource(r); ProductResource pr_stored = (ProductResource) pm.create(pr); pm.delete(pr_stored); Product p_ret = (Product) pm.retrieve(Product.class, pr_stored.getProduct().getProductId()); // prints out true ???????????????????????????????????? System.out.println(p_ret.getProductResources().contains(pr_stored)); } } So here comes my problem. Why is the ProductResource entity still in the List productResources(see code above). The productResource tuple in the db is gone after the deletion and I do newly retrieve the Product entity. If I understood right every method call of the client happens in a new persistence context, but here i obviously get back the non-refreshed product object!? Any help is appreciated Thanks Marcel

    Read the article

  • `# probe: true` in /etc/rc.d/init.d/* files on a RedHat system

    - by Chen Levy
    Some files (e.g. nfs, nfslock, bind) in my /etc/rc.d/init.d/ directory have in their comment header a line such as: # probe: true I found that those particular scripts has the probe verb i.e.: service nfs probe But this is due to the fact that the mentioned scripts has code that deals with the probe verb. I find no mention of the # probe: true notation in chkconfig man page, nor in any related man pages. Googleing for it also didn't help. Is there a real significance for that line, or is it pure documentation?

    Read the article

  • Limit vsftp upload to a given set of file-names

    - by Chen Levy
    I need to configure an anonymous ftp with upload. Given this requirement I try to lock this server down to the bear minimum. One of the restrictions I wish to impose is to enable the upload of only a given set of file-names. I tried to disallow write permission to the upload folder, and put in it some empty files with write permission: /var/ftp/ [root.root] [drwxr-xr-x] |-- upload/ [root.root] [drwxr-xr-x] | |-- upfile1 [ftp.ftp] [--w-------] | `-- upfile2 [ftp.ftp] [--w-------] `-- download/ [root.root] [drwxr-xr-x] `-- ... But this approach didn't work because when I tried to upload upfile1, it tried to delete and create a new file in its' place, and there is no permissions for that. Is there a way to make this work, or perhaps use a different approach like abusing the deny_file option?

    Read the article

1 2 3 4 5 6  | Next Page >