Dagre-D3 or D3 not working on different server - d3.js

Hy, so unfortunately i cant post my hole source code, neither can i link to it.
But because of this, I'm ok if i don't get a concrete answer, just some guidance.
So my situation is this:
I have made, with the help of dagre-d3.js and d3.js a hierarchy organizational chart. It works perfectly on local (WAMP) environment, but when i try it on the live server, which runs linux (ubuntu), not all the functions are working correctly.
But what i don't understand is that the functions that are not working 100% percent are just front-end svg stuff, so there is no back-end connection when i try these operations.
Locally i tested it with windows 7, 8 on wamp and in chrome, firefox, even internet explorer, and every functionality works, when i load it from the server, some functionalities are not working. And the fact is that i don't get any error messages, so its not like d3.js or dagre-d3.js isnt correctly loadded, because it is, the graph is rendered correctly.
So to finish up, my question is this, can there be some server side configuration which interferes with the rendered SVG graph? And if no, then where should i start looking? How to even check wheres the problem?
Thank you in advance for any kind of guidance.

Ok, so at last i figured it out.
On the live server there was a different version of php which, when using json_encode converted the ids to strings, and because of this the dagre-d3 plugin didn't work as it should have, some functionalities did, but not all.

Related

Texture maps appear black in WebGL examples

I am using an ebook guide "WebGL up-and-running" to learn WebGL. The ebook has an accompanying repository on GitHub to run some examples. The examples work fine (animation, shape, camera movement, etc.) when I run them except the textures aren't right (most appear black while others don't appear in the browser). The problem doesn't lie with the code (I think) as I didn't touch it since downloading from GitHub.
The only instruction from the guide that I didn't follow is a single paragraph that states:
"Finally, get all of this onto a web server. You will need to serve up your pages in order for most of the samples in the book to work. I run a local version of a standard LAMP stack on my MacBook…but all you really need is the “A” part of LAMP (i.e., a web server such as Apache)."
I have no idea what a web server does in this context and don't know how to install it. Could this be the problem? If so please assist me in getting started with a web server. If not, what else could cause the example models not to render properly?
When I run examples from https://threejs.org/examples all of them work fine.

Debugging AngularJS web app in Firefox extensions

I have created a Firefox extension that loads an iframe. That iframe loads a web application built using AngularJS. Is there anyway to inspect what is going on? The application loads but I have 2 input boxes that I am unable to type in.
I've developed the extension in both XUL and using the Add-On SDK and both of them don't allow me to interact with the input box. I've further noticed that when I remove the ng-model attributes, interaction works. It seems like data binding is an issue.
Any ideas?
Thanks
Without seeing the code, it's hard to say what's going wrong. If I were running into this problem (and I've run into similar ones), I generally fall back to editing the Angular source, and adding dump (or console.log) statements to try and trace what's going on. It's pretty terrible, but it usually gets the job done.
Good luck!
This question is kinda old by now, but as a reference for people coming here from a web search:
you might want to look at this SO question that lists some things that can go wrong with AngularJS inside XUL extensions, together with some solutions.

AJAX works online but not on my computer

I've been having problems testing AJAX on my computer, the code works fine online but not on my system, is there something I am missing?
I've had this problem with pretty much any kind of AJAX and even some javascript code. I know the code itself is correctly since it's functioning online as intended, but why wouldn't run on my PC? Everything I am trying to do is basic coding, no database, or advanced functions of any kind, simple interface changes and such.
I don't have any specific code to post since its a general problem i'm having, but any thoughts are appreciated. Could it be a document type issue? I tried blank and a couple of others but none seemed to matter.
Ill bet that you are having a same origin policy issue. If you are loading the page by going to localhost:<port>/app and then your javascript tries to go to anywhere other than localhost the browser will stop it for violating the policy.
I have had strange problems testing AJAX locally before. To fix this I install ultidev's Cassini web server and run the application on that and it seems to work.
You need to set up a webserver with either php running or something like it. A desktop PC is not a web server by default.

Web Performance

Im working on a large site, trying to decrease the load times, and I have bumped into a rather strange issue. Im using google chromes built in developer tools, and I am finding that certain images are getting hung up, and the browser is continuing to look for them. Has anyone encountered this issue before? How do I isolate what is causing this problem?
The site runs a couple of ads, is it possible this error is occurring because of ad networks?
Here is a link to the actual problem: http://i.stack.imgur.com/IEtLA.png (updated)
If you have not done already, use a tool like http://www.webpagetest.org/ to test your site. It will test the site from nominated locations around the world, with the browser of your choice, and you will get waterfall charts for your page.
Just an idea.... If not yet done, try Google's free website testing and optimization tool 'Website Optimizer'. See what it tells you.
Another idea, try accessing the site with another browser, either one, IE, Safari, or FireFox, to see if you get the same issue; if you do then it may be the server for some reason not serving those images.
One more.... To isolate further, if possible, try using only few (one or two) images in your site/pages; if these load then add one or two more images until you encounter the issue, then that image has something and you may replace that image.

JavaFX replace AJAX?

Can JavaFX replace what AJAX do? i went through a couple of articles like this http://www.ajaxlines.com/ajax/stuff/article/ajax_vs_javafx.php. But I am still confused. anyone help??
I don't think this will happen, certainly not at the moment. JavaFX depends on java, there's very little support cross-platform (windows mobile does work but it's very limited). There was talk about set top boxes coming out to run javafx but it doesn't seem to have taken off :\ It's a real shame, in many ways I really like JavaFX. It's a shame they won't open the source. Also for deployment there is a dependancy on a sun server to get some jars (not possible to host on your own server), so when it goes down (and it is a when) then everyones apps stop working!
Javascript keeps my vote unfortunately.
Technically, yes JavaFX can do everything that AJAX can do and more - on a supported platform. Unfortunately JavaFX isn't supported on most smartphones so you won't get the same reach as AJAX. You also need a browser plugin which you don't need for AJAX.
But if these limitations aren't a problem, then I think you will have less misery using JavaFX instead of AJAX.

Resources