Path length of node_modules) kills jhipster project - path

Creating nice project stubs using jhipster has worked fine until recently.
Now on Windows 7 the node_modules look like deeply recursive folders, deep enough to grab a hole into the FS. As a consequence maven is not capable anymore of building the project.
Can anybody out there help a jhipster newbie?

It's because the path length is limited on Windows. You could try to generate your project at the root of your hard drive, that should give you more chances to make it work -> other people have it working on Windows, so it should be OK

Related

Libraries load order on Tomcat 8+ from a single folder

Do anyone know what's the libraries load order based on, in a single folder on Tomcat 8?
Here is my situation:
There is this customer java application deployed on tomcat that, for some reasons, has a class in multiple libraries in the same webapp-shared folder. I know it's wrong, everyone knows that, but this customer refuses to fix this.
We have to deploy this application on kubernetes, so we created a Dockerfile and everything else, and it's working correctly most of the time.
When a pod is deployed on some nodes, it seems that the load order of the libraries is different, and that causes the application to not work properly.
So, basically, what I'm asking is: is there anyone who actually knows what's the load order based on? Is it the filesystem used? Is it the docker overlay? Can it be the LC_COLLATE? Is it actually pseudo random?
These nodes are basically identical and I'm really having a hard time trying to find out what the difference could be.
Thank you.
The only ordering specified by the Servlet Specification is that classes in /WEB-INF/classes have precedence over /WEB-INF/libs/*.jar.
In Tomcat 7 and earlier the order of libraries in the libs depended on the underlying filesystem, so that it would break when you move your web application to a different OS or to a different Java EE server. In Tomcat 8 and later it is random by design. As random as a HashSet is.
See discussion in Bug 57129. Regarding Resources and PreResources see configuration reference.

Linking to an external www-folder - Tools for Apache Cordova (VS 2015)

For a project I'd like to use an existing website as a base for a cordova app. My project setup looks as follows:
One Solution with two projects
A ASP.NET webservice project (with website aka html/js/css)
An tools for apache cordova project
I don't want to copy the html/js/css files from the website on every build. Instead, I thought I could get away with some kind of a link to the www-folder in the ASP.NET project. I tried several approaches:
Creating a filesystem link (tried 'mklink' with parameters /D and /J - /H is not working for directories
Editing the .jsproj file and add a tag to link to the other project's www-folder
The second approach didn't work at all. Just got some weird errors when trying to load the project again (saying something about file duplicates).
The first approach worked a little bit: It is working, when targeting the windows platform. It is NOT working, when targeting iOS.
When targeting iOS, everything is copied just fine to the platforms\ios folder (read, all the content of the linked www folder is copied to the platforms\ios\www folder). But it is not copied correctly to the remote build tool on Mac OS X! It really just copies the directory link as a file. Remotebuild then failes with a 'missing www directory in top level' message.
Any suggestions how to add a link so the content is copied (instead of the actual link)?
Is there a way to take detailed influence on the build process for specific platforms?
Is there a way to create a hardlink to a directory in windows? What are the drawbacks?
I'd really like to avoid copying the files on build (which would be simple enough with a prebuild script), because there's a high risk of loosing changes made while debugging.
I'm aware that setting a link is also not the best solution, since it has to be done per machine and can't be checked in to a version control system. So, if somebody knows of a better aproach to handle my scenario, let me know.
I work on the Tools for Apache Cordova in Visual Studio at Microsoft.
I'm sorry but VS-TAC does not support add as link. To prevent confusion we removed the option in update 3.
The best solution I can give you is to copy files from one project to another. Another user asked this question a week ago and came up with a hacky solution. Please see this for more information:
VS2015 typescript cordova add as a link
Sorry for the trouble and thank you for the feedback!

Compiling an Xcode project from a network folder

I'm trying to compile an iOS project in xcode from a network folder and I get all sorts of issues, most of them about files not being found on the first build command.
Most of the time it just says it hasn't found the headers inside other headers. If I hit Build again, the previous errors go away and new ones appear. Other times it just says "xxx.h" Resource temporarily unavailable. Hitting build again, ofcourse that is available but some other header is now unavailable, and it just makes things very frustrating.
PS: I am connected to a network folder from a Windows System using SMB. Sometimes if I disconnect, and reconnect to the network folder it briefly works flawlessly for like 3 seconds, and then starts spewing off resource unavailable errors. Unfortunately my build process lasts longer than 3 seconds :|.
UPDATE : It seems like the cause was disk access latency. I am running an OS X Virtual Machine and connecting to my real machine's HDD. I have now moved the entire VM to an SSD drive and everything works much smoother and it seems I don't have these issues anymore, so disk access times make all the difference :).
UPDATE 2 : For some reason I'm getting this error again. No idea what changed the situation.
Seems like it could be referenced files that aren't copied to project folder. I have lots of projects that are located on a server resource and as long as all the resources used by the project are included in the project it works fine.
That said, my personal choice these days is to house all of my projects in Dropbox. Still have to be careful of forgetting to copy any added files into the project folder, but it is lots easier for me to manage working on these apps on the various machines I work from.
In my experience, trying to work with an Xcode project that resides on a network share is completely hopeless. As you say, all sorts of random errors, some of the time, but not all the time. I simply have a "special" folder on the Mac that is instead shared to the OTHER machines on my network, and anytime I want to work on an Xcode project, I copy the project over into that "local" folder (and back when done). Highly inefficient and error-prone, but in my experience the only thing that works reliably (pretty sad really!)

How to migrate Delphi or clone Delphi registry settings?

I have two PCs both with XE2. I thought that I had installed identically on both but have problems installing 3rd party packages on one while the other is just fine.
I want the same on both anyway. The easist would probably just to "migrate" the working set-up by moving in into my Dropbox folder. Can I do that? If so, how?
If not, can I (easilly) backup my registry settings on one machine and then import them on the other?
I suppose I could just sort out the problem on the one PC, but am not having much luck so far. I would rather invest the time in only having one Delphi setup. And since I am moving lots of other stuff to DropBox anyway ...
The tool for this is now built into Delphi XE8 and higher.
It's found here:
C:\Program Files (x86)\Embarcadero\Studio\20.0\bin\migrationtool.exe
Online documentation:
http://docwiki.embarcadero.com/RADStudio/Rio/en/Settings_Migration_Tool
Install CnPack wizards from http://www.cnpack.org
From the CnPack toolbar select IDE Config Backup/Restore (image below) and save this file somewhere safe
Copy the components to the second delphi machine . Keep the exact same directory structure.
I store my components as follows this helps backing up, moving etc., but you can use your own structure
D:\components_bds\DCU
D:\components_bds\BPL
D:\components_bds\ComponentsThemselves
Use the restore config file from CnPack to restore your components on the new machine
This is also useful if your testing components that you plan to remove later and keeping a backup of your installation incase something goes wrong you can save time with new delphi installation if hard drive dies. Keep a copy on flashdrive or somewhere safe
You may compare/diff the config file created by cnPack using a tool like Beyond Compare and see what the differences are to find out why third party components give problems on one of the machines. It may be a Delphi registry/installation problem or a problem in the paths of the thirdparty components. Components need to be installed in an order perhaps it did not find the needed dcu or dll it depends on.
I don't know of any way to do so with DropBox. Here's an old post I made (related to Delphi 7, but with correction of registry keys still applicable) in the CodeGear newsgroups; hopefully it will help.
(It probably goes without saying, but back up the existing registry settings on the destination machine before starting by using RegEdit and exporting them, just in case. You'll at least be able to get back to the point you're at now if something goes wrong by deleting the imported entries and then importing the saved ones.)
You can't, without some difficulty anyway. (Especially if you have
third party components installed, as they may have placed files in the
%SYSTEM% folder you may not know about.)
You may be able to (for going from the old computer to the new
computer running the same exact version of Windows!) by exporting the
registry keys under HKCU\Software\Embarcadero and
HKLM\Software\Embarcadero from the old machine, and then after
installing Delphi on the new machine (in the exact same folder
location) importing that registry file.
Many of the compiler, linker, and other settings are configured on a
per-project basis, and should transfer over when you move your source
code to the new machine.
Third-party components are a problem, as I mentioned above. You may be
able to get away with using the registry export/import if you copy
each third-party component set from the old computer into exactly
the same location on the new machine before importing the registry
file. You'll probably have to track down some .BPL files that end up
in the $(BDS)\Bin and possibly other folders under the $(BDS)
tree; the IDE will tell you about missing stuff when you try and start
it. Make sure you answer "Yes " when asked if you want to try and load
it again next time!
Most of my development is hobby stuff or wannabe releases. Instead of dying trying to move my XE2 Pro from my Dell Inspiron N7110 Win 7 machine to my new Win 10 SSD machine, I'm seriously thinking of switching to Lazarus. I've used Lazarus 2.x with Indy 10, ZeosLib, and Firebird and successfully created a working distributed internet system. I also created Lazarus version of my XE2 Blackjack program. When compared to XE2, Lazarus (IMO) has only two weakness and neither are deal breakers for me. BTW, I have successfully duplicated Lazarus (with all installed components) from one machine to another simply by copying and pasting the Lazarus directory and it works. Try that with Delphi.
Sam

How do I package a rails as a standalone executable

I've been developing a web application and a lot of customers are asking if they can host the application in their network (for security reasons). I have been looking for a way to package up a rails app into a single executable (with server and all), but haven't been able to find anything. My other requirement is that we distribute it without the source. Because of that I was looking at JRuby and Warbler. The end product should run on linux or windows. Has anyone done anything like this before, or can anyone point me in the right direction.
Thanks
My best guess would be to use JRuby and the JRubyCompiler, although I have no idea if you could compile a whole rails project (including all the required gems). I got it to compile a small ruby script though. Anyway, if you succeed, you could package those in a jar or war and deploy that as a contained application.
It doesn't sound like you necessarily need to package it as an executable, as long as the code is obfuscated. I personally haven't needed to protect any of my code, but a quick google search returned this product http://rubyencoder.com/. I'm sure there are others out there, but the basic idea is that your code is unreadable and cannot be reverse engineered. This would allow you to run a standard rails environment without giving access to your source code.
If you have the budget and really want to outsource this, the Github guys partnered with BitRock to build their cross-platform installable product (Github Firewall Install). BitRock has this case study on their website.

Resources