I have been trying to embed the Neo4j Graphs that I am able to see in the Neo4j browser, in a web application.
I was initially taking reference from this website.
https://github.com/neo4j-examples/movies-php-neoclient
and
http://neo4j.com/developer/example-project/#_example_project_description
These github examples don't seem to run. Can someone help me with this.
Thanks
You didn't clearly explain the problem you're having.
Anyway, this file static/movies.cypher in the source folder of the Github repo has been changed from this to a mere 15 line code. But that has made it inconsistent with the other files. So basically yeah, the project is broken.
Your page must be looking blank like this:
Now you can copy-paste the contents from the link into your local static/movies.cypher file and it should look similar to this site.
Alternatively, you can replace Actor with Person and ACTS_IN with ACTED_IN in that file and you'll get a smaller six node graph instead.
You might need these two links too:
http://localhost:8080/reset
This will delete the existing graph and try to re-import it.
You'll need to use it after everytime you modify the static/movies.cypher file.
http://localhost:8080/import
This will import the statics/movies.cypher and execute it.
So basically it'll re-create the graph.
Related
I've been implementing a google drive connector into a web application.
Basically when a known event is triggered in the page it launches a webhook which communicates with the 'drive-connector' in order to generate a document and fill it with some information.
This 'drive-connector' is a custom PHP which uses the Google Drive API to create folders and files. I am able to create the folders and files and give the files the desired content.
To give the content to the drive document I use an HTML template (https://developers.google.com/drive/api/v3/manage-uploads) which is allowed by the API, before uploading it I change some variables inside the template with the data that comes from the webhook, all well for now.
The problem
I'm able to upload the HTML document, once I replace the variables for the desired data, but It has to be very simple and without much css. When I try to upload the document from a more worked and beautiful template Google Drive doesn't recognize many CSS and it changes the appearence of the document. I can't put a header nor a footer. Many fields are moving from its places and making a mess of the whole document.
In order to make it easier for me to replace the variables in the template I choosed to use HTML anyways I'm starting to think that would be easier to use a .doc or .odt template ( I would need to use a library in order to do that )
My question
Is good to use an HTML document as template for the google drive document? Or should I change the way I am trying to achieve this?
Thanks in advance
Observation: Since I don't really have problem with my code I haven't put any line of code, how ever If you need the HTML template to guess if it has any problem, just tell me.
EDIT 1 -> I've found this: How can developers edit a Google Doc programmatically? Is there a Docs API?
It is not the answer of my question but seems to have some solutions to my problem. Anyways I don't get much clear in that post, I haven't found the proper documentation so I'm still fighting to get this.
EDIT 2-> Reading again the documentation I thought that I could make the document firstly in the google drive and then using the API download it as HTML, this way I would have the template but I'm not sure if I could modificate it has I wish. If this works I will reply my own question and close the post
After trying this I could not upload the HTML which was exported from the google doc. The error that the google api gives me is: code 400 message: bad request
Finally I could find a work around!
Anyways It is not a very effective and good way of doing it.
As I explained in my EDIT 2, I tried to download a google drive document created in google drive by hand and export it has HTML, so I had the template in HTML. Then I added my variables for future dynamic replacements and everything works more or less fine.
I solved the problem of the bad request modifying a bit the document, seems like you cannot have exacly the same document twice in the drive, after changing some lines of code It started to work.
Anyways I don't feel like this is a definitive and fine way of doing what I want so I will keep the post open for if somebody knows a better way of achieving this.
Situation
I have a website written in PHP.
In PHP, I can extract the text inside a pdf file uploaded to the same website and so on.
I found the tabula-java github repo.
So what's the issue?
I have tried the mac app for tabula. I noticed that I needed to highlight a certain section of the pdf before the table data can be converted.
However, that's not what I want to accomplish. I want to run tabula in the background and on demand. When my website receives a file upload and certain conditions are satisfied, I want to call the tabula as a service somehow and feed it the unstructured data and then get back the tabulated data.
How do I go about doing this?
One way is to wrap the tabula-extractor command line command and return the results into your application.
For example, in R, the tabulizer package works this way.
Today I was looking for my cached page of my website then I find that Google indexed lot of spammy pages which I cannot find in my website.
My website is a college website but in Google there are pages of "nike air max 95 at jd sports" and all my url's are rewrite but in Google it showing a new url (this is similar like my URL: http://example.com/?nike-max-air-343.html).
When I try to find this page in my website I didn't find any of these pages. Kindly provide me any possible solutions so the Google can't list a
"This site maybe Hacked"
message on SERP.
Whenever this happended to me I started the lookforbadguys.php script, you can find here
https://gist.github.com/jasperf/3191259
Copy this file into the DOCUMENT_ROOT of your page and then call in browser
http://example.com/lookforbadguys.php
It then scans your file-system under document root for suscpicious file names and code
It may create a long list of hits, and you have to check every single one (if you don't know exactly that you made it yourself). This is tedious, but I works.
One little hint: Save the output of the scan as html file and open that file in browser. This prevents the script to scan on reload.
After that you must identify the security holes of your server.
You may have to update installed software and/or your scripts.
I don't think you have to do anything. I had a similar warning today.
"Hacked by Andreas Rehm 2006..." seems to be part of the source code for the file on line# 353
Source for file OLERead.php on grad.clemson.edu
I have been scouting the web for a pdf editing tool for quite some time now. And it would therefore be nice with some suggestions/recommendations to the problem.
I have read a bunch of other topics around StackOverflow, but havent quite been able to find a full solution yet.
The case: I have an application written in php/javascript on a linux server and recently it has become a requirement for my customers that they are able to edit Pdf documents direct in the browser. The functions i need are primarily the ability to make annotations and to draw on the PDF. That means. They load an already uploaded PDF-document and edits it and then saves it in PDF-format again. All done within the browser.
The second requirement is that the program must save pdf document in PDF-format again, since i have an Ipad app with all of this functionality, and i need them to play nicely together. It is therefore not an option to save an image of html of something like that.
I read a comment suggesting the Zend framework, and it did sound quite useful. However i have developed my own platform from the ground, and therefore my second question is, if it is possible to embed only the PDF-tool from Zend or something?
Thank you in advance.
ps. If i missed a simular subject that answers exactly this, please let me know and i'll delete again.
There are several libraries that can be used to edit PDF-files. To name a few: Tcpdf, fpdf and Zend_Pdf.
The later can be used even without the complete ZendFramework. But be cautious: Currently it only allows editing of PDF-Files up to version 1.4.
If you need speed you should also have a look at the PDFlib which could be tweaked to support your usecase
I have a dynamic web site (php/mySQL/Ajax on a Linux server), I need to take automatically a photo (snapshot) of each web page periodically (If I can find the way to do the snapshot... I can use cron) and save this image to the database (I also know how to do this...my only problem is the photo!).
I can't do it manually, so I need an script which take the snapshop for me, without displaying the web page, i.e directly from the .php files.
How is it possible?
Thanks!
http://browsershots.org/ may work for you, they have an api
You can use the GD functions imagegrabscreen() or imagegrabwindow() to take a screenshot.
Note that they're only available on Windows at the moment.
Looks like this might answer your question, I have seen it done with php and flash but wasn't privy to the inner workings, if the link doesnt help then you could research that route.