So i have a excel file on my GitHub that needs to be updated so i plan to update it using a application
How do I push the updated excel file to GitHub directly from the app using a button
(Java language)
Could someone point me in the right direction
Mostly when i search this question the results are about how to push the code to GitHub
If you are using Java you maybe use Gradle(Usually used with android) or Maven as your project builder tool. I just googled quicly "Java git library" for you and JGit came up wich seems to be a fairly simple library to use. Here is a tutotrial on it.
You probably have to initialize the repo as ususal from code or seperately I suggest from code. And you need to implement file handling as well seperatelly from this simple git client implmentation. You might use this other source helpful for that.
But on native android there might be some different library for handling files as well as you should look into intents for passing differernt files or data between applications.
I hope it helps. :)
Related
I'm working on a project that requires to add some features to an existing java application using Netbeans. After searching the net, i founded that I should use "plugins". I didn't hear of plugins before.
I have a java application that I should download it from the net, then lets say I have to add a button, when clicked, calls a function that is written in some class in the application. In other words I want to make a new class that is able to access the classes and functions that are written in this application.
What I understood from searching the net is that:
-In the downloaded project's folder there is a folder named plugins.
-This folder contains zip files that contains classes and other stuff.
-I should make a plugin and add it to this folder in order to add a specific feature to the application.
That's what I know, if there is something wrong in what I said, I'll be thankful to correct to me.
Now, my question is that I want a link or website that can teach me how to create and add a plugin to an existing java application. Thank you :)
That entirely depends on the java application you're talking about. Not every application has a Plugins functionality. And not every Java Application uses the same Plugin API. The best bet is to go to the site of the App you're talking about and see if they offer a documentation about their Plugin API.
i got a web project.i used gof[struts,hibernate,spring,.,.]pattern. actually i not good in struts so my friend taking care of the struts part.well, the problem is ,*
how to merge our project and
we both want to see our code every time whatever the change happen
* .bec we are beginners
You may want to actually keep your project split in modules and use a Code Versioning System(CVS). At the moment, most popular/used are Git and SVN. If you don't have a server, you can use BitBucket to host your code in private or GitHub/Google Code if you want to open source it.
Use SVN or CSV if you have server. other wise you can use online Repository like GitHub.
I'm trying to read pdf files in my android application. I don't want to use the default pdf reader and simply open a new intent because I need my own GUI, and want to use the first page as a cover. Therefore I need to make my own pdf reader. I did some research and came across muPDF and Android PDF Viewer Library.
I tried to follow tutorial to implement Android PDF Viewer Library, from the github description. But the problem is that it loads pdf file forever. Do I need to do something else than just the steps in the description?
I can't find any tutorials for the muPDF library, are there any? How to implement it?
If there is no useful answer for the previous two questions, are there any good pdf library out there with tutorials and good documentation?
Thank you, hopefully, I will be able to solve my problem
MuPDF is a very good library, you can definitely use it. If you need a complete example of Android app using MuPDF, I suggest you to take a look at this customizable magazine app on Github.
first of all, if you want to use MUPDF inside an existing android app project you can follow the guide you find at this link (all credits go to the author, I didn't write this).
I am trying as well to integrate a very simple PDF reading/printing solution inside my app and i am struggling to strip down/simplify the MuPdf application demo you get by following that guide. I already managed (somehow) to remove annotation and file-picking features, but i would really need some help as well to get all the job done. There's really a lot of stuff and absolutely no documentation about this. I am simply trying to read the code and figure out what is needed and what is not, removing features one by one and being driven by the errors you get in catlog.
Also, as we both (if I understood correctly your needs) need just the PDF rendering features, would be great if someone points out how to (if possible) disable some of the unnecessary features built in the MuPDF library when building it from source (as DjVu support, just as an example).
Hope this helps, even if it is not a real answer to your question.
This is how I succeeded in building a MuPDF lib on windows with Cygwin, android-ndk
Download MuPDF 1.3 Source from https://code.google.com/p/mupdf/downloads/list
unzip to folder c:/mupdf-1.3-source
Install Cygwin:
Download and run Run setup-x86.exe from http://cygwin.com/install.html
when installing cygwin, make sure you selected make packages and C++ compilers
Make generate. open cygwin terminal, run
cd /cygdrive/
cd c/mupdf-1.3-source
make generate
Install android-ndk:
download android-ndk-r9d-windows-x86.zip and unzip it to
c:/android-ndk-r9d
Build mupdf lib: on windows cmd console:
preparation:
cd c:/mupdf-1.3-source/platform/android
copy local.properties.sample local.properties
edit local.properties, uncomment
#sdk.dir=C:\\Program Files (x86)\\Android\\android-sdk
and change to
sdk.dir=REAL andforid-sdk Folder
build:
while still on c:/mupdf-1.3-source/platform/android, run:
/android-ndk-r9d/ndk-build
Upon the completion of the build, a folder named libs will be created under
c:/mupdf-1.3-source/platform/android
Create android apk.
Open eclipse, create a new android project from existing code, browse to c:/mupdf-1.3-source/platform/android, now you can create a mupdf apk.
Starting with Android 5.0 you can also use Android's internal PDF renderer and for manipulating PDF you can always use iTextg - just some alternatives for the future.
This SO answer lists some steps on how to rip essential pieces from the MuPDF Java sample app to one's own.
Preferably, I'd like to have a "ready to use" Java library I could attach to as a dependency. Is JNI preventing this or is it simply that no-one's gotten up to doing one?
Well, jmupdf is there (mentioned in this duplicate) but that lists Windows and Linux (not specifically Android) as the tested platforms. It seems desktop and dead to me (no changes in 12 months). At least compared to the vibrance of MuPDF itself.
As a project, I wanted to build a personal website using Java for the server-side code. I am very new to Java and wanted to know if it was possible to write Java using a simple text editor, upload the file into a file directory in Apache Tomcat where the corresponding JS and HTML file sits (for practice purposes only), and then run the web project through the HTML file.
I do this with php through LAMP all of the time, and was hoping Java might work that way as well.
Yes its very much possible. Even though you may find it bit difficult without the help of IDE, this should not make any difference. Convert the files to proper class files and upload it, that should do
Though i agree with above answer.But you can also go for hot deployment plugins for example mvn:jetty plugin for hot deployment of your website, but for that it needs to be maven project.Also grails and many other framework has this features inbuilt.
I just needed to create a little interface for a project. So I decided to take given code and to run it on Google AppEngine. My problem is, that I'm experienced in JavaScript and got some basic knowledge of Java, but I got no clue how a Java webapp has to be structured. I started Eclipse and installed the AppEngine-addon, downloaded Rhino and env.js (which is necessary for the bunch of code I need to run) but then found me in the situation of sitting on this files not knowing where to put them.
It would be great if someone could tell me in which directory to put which files for Rhino (I assume it's "/war/WEB-INF/lib/"), how to add the env.js-file and how to access all these files inside the .java-file which is the index of the app.
I don't know about app engine in particular, but I have had good success using Rhino jsc to compile script files which extend the Servlet API. The end result is a nice WAR file which you can deploy in any servlet container, and perhaps App Engine as well. See here for my relevant blog post about this technique, and here for a sample Eclipse project.
Have you taken a look at this tutorial on running Rhino on GAE?
It's a link from the official "Will it play in App Engine?" thread.
http://www.appenginejs.org/ may be of interest as well.