![]() He was targeting Node.js for Light Table, but as I said, I didn't realize what Node really was. When I first heard Chris Granger speaking I'll confess that I didn't immediately see what was going on. I came away with a better understanding of how fast this system can be and started thinking about how I should try working with it.īut then came Clojure/conj last year and it all gelled. ![]() This last Strangeloop had several talks about JS, and about the efficiency of the various engines, despite having to continue supporting some unfortunate decisions early in the language's design (or lack of design in some cases). When ClojureScript came out, I was interested, but again without a specific UI project in mind I kept putting off learning about it.Īt this point I'd heard about node.js, but had been misled into thinking that it was for server-side JS, which again didn't seem that interesting when the server offered so many interesting frameworks to work with (e.g. So the browser didn't feel like the right platform for me. Since then, I've thought that it might be interesting to write some projects in JS, but my interests are usually in data processing rather than on the UI front end. It was a good learning exercise and it's proven to be useful for talking to Jena. I practiced what I learned on Robusta, which is both a SPARQL client library for JS, and simple UI for talking to SPARQL endpoints. I'd only had a smattering of exposure to JS at that point, so I decided to pick up Douglas Crockford's JavaScript: The Good Parts, which I quite enjoyed. JS was a strong theme at Strangeloop 2011, where it was being touted as the next big Virtual Machine. Htag.For a little while now I've been interested in JavaScript. Htag = document.querySelector('.green-h3') Let htag = document.querySelector('.green-h3') If then # SQLQUERY contains an empty string.Įcho "There have been no new documents added to the CMS in the last 7 days." > /root/bin/mailtextĬonst jobContainer = document.querySelector('.job-description') I mean:Įcho "TO:" $RECIPIENTS > /root/bin/mailtextĮcho "SUBJECT:" $SUBJECT $DATE > /root/bin/mailtextĮcho "SELECT name AS NAME,MIN(id) as ID,MIN(created_at) as CREATED,MIN(CONCAT(' as URL from pages WHERE deleted_at IS NULL AND name NOT LIKE 'AO%' AND name NOT LIKE 'KB%' AND name NOT LIKE 'Odoo%' AND name NOT LIKE 'WK%' AND draft=0 AND created_at > DATE_SUB(NOW(), INTERVAL 7 DAY) GROUP BY name \G" | mysql -u root -D bookstack > /root/bin/mailtextĬat /root/bin/mailtext | /usr/sbin/sendmail -tĭATE=$(date DATE_SUB(NOW(), INTERVAL 7 DAY) GROUP BY name \G" | mysql -u root -D bookstack)Įcho "FROM:" $SENDER > /root/bin/mailtext Was this a classic SingleEntityAuthorUsers relationship I would have build it as a ManyToMany item, but here it's different.Īuthor would probably contain two ManyToOne relations (one with the User entity and one with either the Document or the Video entity) plus the entity type field, but I really don't know how to code the "Document orVideo`" part. The problem is that I cannot understand how to build this in Doctrine. entity: is a constant like document or video to know to which entity the relation refer to.author_id: is the user_id who authored the entity.entity_id: is the id of the document or video.I would like to use just a single associative Author associative entity, like this: Each User can have none or more document or video. Each document or video can have one or more author. The relation represent the User who wrote the document or recorded the video. I'm trying to implement a relation between the entities Document and Video (actually there are many more, but for simplicity sake let's say are just two) and the User entity. ![]() ![]() I'm developing a custom content management system with Symfony 5 and Doctrine. Going to need a little bit more of the logic as it seems that you might have over complicated a simple process which is completely fine as it happens from time to time On another note you should switch to PDO as mysqli is not secure at all if you do not escape queries correctly. That would automatically do the same thing over and over for every user that submits the form. User Form -> User Inputs Data (Submits Form) -> ajax handles the posting to the php file -> let ajax wait for a response from php on success -> refresh the page using jquery. Have you tried using ajax in the mix between the form and user inputs ?
0 Comments
Leave a Reply. |