How do I copy my Selenium project from one laptop to another? - selenium-webdriver

I have developed a hybrid framework using a maven project, POM, TestNG, etc. It's running fine now I wanted to copy the entire project from one laptop to another laptop so on first laptop I can continue with my work and second laptop I can use it just to execute the scripts which will same my lot of time.
On daily basis I take backup on OneDrive. I have some questions:
Can anybody guide me how to copy the entire project? Do I need to have the same version of Java and Eclipse on second laptop? Anything else need to be installed?
On a daily basis how do I get the backup data from 'OneDrive' to a second laptop?

This sounds like you want a repository. Use Github, Gitlab, Bitbucket, just.. git in general. That's exactly what this is for.
As for your Java and Eclipse versions, you need to look at your running version of selenium, what packages you are using, etc, and determine for yourself what Java version you should be running. The latest version of the jdk is going to have everything the earlier ones had, so it's usually a safe bet to use the latest stable version. Your Eclipse version should always be the latest as well as it is just an IDE and shouldn't have any impact on how your program runs.
Another option is to use a virtual environment (a virtual-env) and upload that to your git repository, this is a localized version of java present inside the project, that can be carried along with it, although this bloats your repository massively.

Try using git and github and you don't have to take backup and need to work on a specific laptop

Related

Couchbase C API doesn't have n1ql.h anymore?

A couple years ago I wrote a small utility program for my employer, which accessed a Couchbase cluster via the Couchbase C SDK. I've just returned to it to add some new features, installed the Couchbase C SDK on my Ubuntu 20.04 development system via the instructions found here, and tried to compile my code, and it complains that it can't find libcouchbase/n1ql.h. When I checked, sure enough, the file is nowhere to be found on my machine.
I've tried installing all of the packages provided by their repository, none of which seem to provide that file. I've also tried removing them all and installing libcouchbase from source, with no luck (the instructions seem completely out of date); searched it manually but that file isn't in there either. Even grepping for other items that I know have to be in there, like lcb_N1QLHANDLE, doesn't turn up anything.
There's obviously something I'm missing, but I can't even see the shape of it. Have they moved the N1QL code to a separate repository? Gotten rid of it entirely? Renamed it without updating the documentation?
The utility you wrote was probably built using an older version of libcouchbase than what's in the "master" branch on GitHub. If you check out the tag 2.10.7 you can see the n1ql.h header here:
https://github.com/couchbase/libcouchbase/tree/2.10.7/include/libcouchbase
Installation instructions and other documentation for version 2.10 are here:
https://docs.couchbase.com/c-sdk/2.10/start-using-sdk.html

Julia package add (zip master file from github)

I am trying to install/add manually the *.jl-master.zip files, I am doing this because I have a computer without access to internet but I don't know how to do the offline installation.
The version of Julia is 1.3.0 and the O.S. Windows 10
I had tried this,
Instruction I followed
but for me It does not work.
Thanks
Regards
Installing Julia packages offline is very difficult due to the fact how binary dependencies work.
You have basically two options:
buying JuliaTeam/JuliaPro from Julia Computing (maybe someone who is using it will ever see that thread and could share their experience?)
hacking
Regarding the second option the best bet is to install all required packages on a different machine having and copy the .julia folder to your offline machine (or, depending on your configuration folder referenced by the JULIA_DEPOT_PATH system environment variable).
However, in most cases you will need to rebuild several packages. The problem is that Julia packages have several binary dependencies that come from different sources. This problem has been noted by the Julia community and is being addressed by the Julia Artifacts mechanism.
Today the most common step is to manually edit deps/build.jl file in each Julia package that is downloading binary resources in its build process and make the build code to point to files in your local repository. Once done you can rebuild the package offline by running using Pkg;Pkg.build("PackageName").

Setting up a workflow for autoformatting a git repository (C)

I want to set up a workflow that allows me to have a git repository with a uniform/consistent formatting. The developers (approx. 30) should be able to commit properly formatted changes to their local repository easily, independent of their operating system (either some Linux or Windows 10) and independent from their IDE. Changes shall be pushed to a Linux server which administrates the remote repository.
From my point of view there are two steps necessary to ensure that the remote repository is properly formatted:
Format the current state of repository according to a set of rules.
Format the files affected by every new commit according to these rules.
The first step can be implemented easily by running an auto-formatting tool (e.g. clang-format) on the complete repository. The implementation of the second step can be further divided into two substeps:
2a) Client side: Format a commit properly before pushing it to the server.
2b) Server side: Check if the repository will be properly formatted after the changes of the commit are applied.
The second substep (2b) can be implemented easily (simlar to step 1). However, the implementation of the first substep (2a) is more demanding and I would like to reach out to the community for tipps/tricks/ideas.
So far I've had a closer look on the Eclipse autoformatter and clang-format:
The Eclipse autoformatter can only be used when Eclipse is installed, I haven't found a Eclipse autoformatter standalone application. Is it possible to run the eclipse autoformatter from the command line without a GUI?
clang-format is a unix tool which I cannot install and run standalone on a windows system. I've seen there is a LLVM executable for windows but I am not sure if the installation will inflict any undesired changes to my system. Is anybody using LLVM/clang-format on windows?
Are there other auto-formatting tools for C which work on Linux and Windows 10? Is anybody successfully using python scripts for this purpose?

Debugging Codename One app on Android Studio

I need to debug my CN1 app on Android. That's why I successfully followed the instructions given in this Codename One tutorial (I copied and updated the gradle files dependencies content as explained).
I am a little bit confused now with the updated sources part.
There is a portion we didn’t get into with the video, copying updated sources directly without sending a build. This is possible if you turn on the new Android Java 8 support. At this point you should be able to remove the libs jar file which contains your compiled data and place your source code directly into the native project for debugging on the device.
If I change things in the native implementation file and if I launch the debug process it seems to work. But do I have to remove the userClasses.jar file from libs directory ? When is this jar file being called actually ?
Furthermore can I also make changes to the CN1 code from Android Studio (eg changes in Main Class) or these need a proper build process on the servers ?
UPDATE November 22nd 2016
In my experience the first time you want to debug your app in Android you need to copy paste your source files AND the userClasses.jar (in libs folder). When you update ONLY the native implementation files you can run a debug without sending a build. But if you change something in the CN1 code it won't be reflected in Android as long as you don't update the userClasses.jar (seems logical since Android does not know anything about CN1).
Any piece of information appreciated,
Cheers,
The build server doesn't have access to your code, just the jar with bytecode/data files and the user jar is "almost" that jar.
We run some bytecode processing such as retrolambda and other things so it isn't exactly what you compiled when you built the project.
If you copy and paste your source directory into the project you will need to remove that jar so you won't see duplicate classes. You will also need to enable Android Studios Java 8 language support to get that to work.

Is there an offline MinGW installer?

I am learning C and I want to install MinGW on my laptop. The MinGW installer is a web-installer, it requires the computer to have access to the internet when installing. But the problem is that my computer's not connected to the internet. So it can't be installed.
So I am thinking of downloading the complete offline installer on my smart-phone and transfering it to my PC through blue-tooth.
I have already tried TDM-GCC, but even that requires me to download somthing.
So is there an offline installer to MinGW? If yes where can I get it?
I did not find an offline installer for MinGW,but instead I found a better Windows port; which is MinGW-W64
From http://mingw-w64.yaxm.org/doku.php:
Mingw-w64 is an advancement of the original mingw.org project, created to support the GCC compiler on Windows systems. It has forked it in 2007 in order to provide support for 64 bits and new APIs. It has since then gained widespread use and distribution.
Now to answer this question: it has to be mannually installed by downloading the zip file. It won't require additional download.
You can download it from link : https://github.com/jonasstrandstedt/MinGW
You need to extract the MinGW folder in C:\ eg: c:\MinGW . Then what you need to follow the steps given in the link above. In CodeBlock IDE go to settings>compiler>Tochain Executables. There you need to click on auto detect or specify the folder manually.
The most direct answer to the question "Is there an offline MinGW installer?" is "maybe, but it would be a snapshot from the past, and it's almost certainly not up-to-date with the latest available released versions." The individual packages are made available (almost) as soon as they're released, so capturing everything in a self-contained installer is a moving target.
But, you can use the standard installer offline with a bit of prep work if you use MSYS2's pacman, which manages dependencies and grabs all the right versions for you.
The details are given in an answer to another question (https://stackoverflow.com/a/46791235/).

Resources