ThreeJS Modularity - Separating Three from html - three.js

I'm trying to make my little app a little more modular. It would be awesome if I could move all of the Three stuff out of the html page, and into its own js file.
Included "import * as THREE from 'three'" at the top of my JS, but couldn't figure out how to avoid "Cannot use import statement outside a module." Went with this: "let THREE= import("../build/three.module.js") " at the top of the module, which didn't give me the same error, but now it doesn't recognize "THREE".
Struggling through a number of different google searches, but haven't found what I'm looking for..
This was interesting: here but I either didn't understand it, or it didn't help me get where I needed to be.
Thoughts? Anything is much appreciated. Thanks.

Ok, looked harder, and found a couple of solutions. Posting links here.
Link 1 - Webpack Solution
Link 2 - Webpack Solution
Both are pretty good tutorials meant for someone going through this for the first time. (Like me.) One or both require payment at some point for the more in-depth topics. But - there are solutions for the problem above that are accessible for free.
Good luck.

Related

is there a specific way to write xpaths into rapidminer for web crawling

I have tried so many options, over many days to try and extract data. I don't know where I am going wrong.
for example, I am on the website reviewcentre.com and am looking at car selling site reviews.
I am struggling badly to retrieve information, most of my xpaths appear incorrect.
Where can I best learn how to do this properly, I have spent days at this.
https://www.reviewcentre.com/car_dealers/we_buy_any_car_-_wwwwebuyanycarcom-review_14068020
I know how to copy xpaths, but when it comes to rapidminer, I can't extract the data.
I know I am doing it wrong, but I don't know what's right unfortunately.
examples include
//*[#id="ReviewTitle-14068020"]
h:html/h:head/h:title/text()
this one works!
//*[#id="ReviewBox-14068020"]/div[1]/div[2]/p[2]/span
I have no problem it appears retrieving the xpath from the website, but using it for extracting data on rapidminer is not working at all..Would really appreciate if anyone can point me in the right direction.
Obviously, you don't want to use unique IDs in your xpaths.
Make sure you have understood the concept of xml namespaces, too.

What is a good link to examples of enaml being used with traits and matplotlib?

I have done GUI construction but not in Python. From other stack exchange questions and my own investigation. It looks like I want to use enaml and traits for the bulk of this work. Are there any links or references to help me get started.
This is a scientific application integrating matplotlib plots and text boxes and buttons (Very simple I think). I have gone through this example but don't understand it too well http://code.enthought.com/projects/traits/docs/html/tutorials/traits_ui_scientific_app.html
I have also gone through the Enthough Chaco examples and don't get very far. Has somebody built a program that I could run and look at their code? Or is their a repository of examples I am not aware of? I found the enaml examples but the example with matplotlib is basic and does not show me how to connect my algorithms to the plots. Thanks in advance!
Not a full answer, but for additional context:
1) Use https://github.com/nucleic/enaml, along with https://github.com/enthought/traits-enaml
2) Example:
https://github.com/nucleic/enaml/blob/master/examples/widgets/mpl_canvas.enaml

Pagination with Letters as index

I may have misunderstood what index is, after reading my question, you'll soon realize so please correct me if i was wrong. anyhow,
Is there any tutorial on paginating in codeigniter. Something that is simple and concise, i don't need complex ones since ill have hard time understanding the whole code.
A B C D
Ants
Airplane
Something like above, instead of number paging, would it be possible to paginate by first letters?
Ive encountered alot of sites that have these although im not sure if coding this would need any add-ons.
I think you have to build one. already this topic is disccused in CI forum.
Please check the forum link:
http://ellislab.com/forums/viewthread/164849/

Joomla model associations

I have been working with CakePHP which has model associations such as hasMany, belongsTom etc...
Now I am working with Joomla and need this type of functionality.
All I need is a point the right direction such as a link describing it as I cannot seem to find something about it on Google.
take care,
lee
There' is a world of difference between the two, and goes far beyond a simple answer on SO. The API Docs are quite extensive, and there are many decent examples. Developing a Model-View-Controller (MVC) Component for Joomla!2.5 will likely also give you some good reference. Additionally, with 9000+ open source extensions available, it's usually quite easy to find one that comes close to what you want to do in order to have some sample code to work from.

What does the sharp and exclamation mark (#!) stand for in a url? Don't even know how to look for an answer

I have seen these "domain.com/#!/" formated urls, and driven merely by curiosity I chose to ask you people... what is that used for? A kinda "exclamated-hashtag" if you know what I mean.
I see it on sites such as "hypem.com" or "buzzchips.com", both of them delivering asynchronous dynamic content in a similar way.
I uploaded a tiny shot just so you actually see what I see, here and there.
It appears to be a standard for allowing dynamically created content to be crawled.
You can see a good explanation of this under the SEO heading for the following answer:
https://softwareengineering.stackexchange.com/questions/46716/what-should-a-developer-know-before-building-a-public-web-site/46760#46760

Resources