-
Posts
5,717 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Adam
-
Including content of JS file into gulpfile.js
Adam replied to denno020's topic in Other Programming Languages
Gulp runs in the node environment, so you can just use node's module loader to import the data within arrayfile, then export it as an array for your Gulp script to import. arrayfile.js: module.exports = { somefile: require('./somefile'), someotherfile: require('./someotherfile') }; gulpfile.js: var data = require('./arrayfile'); console.log(data.somefile); console.log(data.someotherfile); You could export an array from arrayfile.js (the name of which obviously doesn't make much sense when you export an object), however having named properties to access a different file's data feels a little more elegant, and is better for readability. -
This isn't valid syntax: CKEDITOR.instances."editor2"(...) You'll get an error thrown for an unexpected string there. Assuming editor2 is a property of instances, then you can just use this: CKEDITOR.instances.editor2(...)
- 3 replies
-
- jquery
- validation
-
(and 1 more)
Tagged with:
-
While I wouldn't agree that it looks totally different in every browser, I wouldn't say that I like the look of it. The colours don't work together, the images look bad quality, everything just seems unorganised. If you're hoping to get work from this website I would seriously invest a bit of time into learning a bit about design, or just go with something simple.
-
Why over 3112? Strikes me as an odd number to limit it to.
-
By "moved to another table" I presume you just mean normalised? It really depends on what kind of functionality you're going to provide. If it's just a basic send mail wrapper then you probably don't need to worry, given it will be sent in the CC header in exactly that format. If however you want to provide a more advanced address book, and/or provide some kind of filtering of sent mails, then I would probably normalise the data. Normalising the data complicates the code of course, so unless you have the need to do it I wouldn't bother -- KISS.
-
Secure API and JSON to show content on another domain?
Adam replied to Cobra23's topic in Frameworks
Ouch -
After saving the data in the database, you need to retrieve the last inserted ID, and then redirect the user to another URL with that ID passed as some kind of parameter. This other URL will then run a script that fetches the information back from the database using the ID passed in the URL, and then display it in some kind of template. Individually they're all relatively simple things to do; just google them separately, and put the pieces together.
-
Given the scale of the current crisis, I could be willing to help free of charge, but would need to know more about your charity and whether it's likely to do any good (no offence).
-
Generate number and verify it's uniqeness in mysql or advance by 1
Adam replied to Jason89002's topic in PHP Coding Help
Why would it? Just set the initial value to whatever is the latest record's ID. -
Are there pitfalls or other considerations when purchasing an SSL cert?
Adam replied to sKunKbad's topic in Miscellaneous
Generally the only difference is the encryption level, liability insurance and whether you get the full green bar. Seeing the green padlock is apparently important now to users, as they're made more aware of web insecurities, and of course Google now rank you higher for having an SSL cert. SSL should not be a worrying factor of speed these days. If someone is having issues then it's more than likely the server at fault, not a direct result of having an SSL certificate. Bottom line is definitely have an SSL cert if you're selling stuff, but realistically I wouldn't worry about paying out of the arse for anything advanced. Run of the mill will do until you enter the major bucks revenue wise. -
I tried to connect to the IRC server But it said you need not bother Server is down, probably forever Heartbroken, I cried for an hour Half an hour later IRC is still down.
-
Do your homework.
-
Can't believe you registered just to post that. CodeIgniter sounds perfect for you.
-
What specifically about Composer does your sysadmin deem unsafe, when you have the ability to upload anything you want via FTP or whatever? Screw him anyway, he clearly has no idea; just use a local composer.phar copy (assuming you have SSH access to the server.)
-
I'm not sure how you came to this conclusion; from every benchmark I've ever seen, node.js beats PHP in comparable situations. Especially in this kind of scenario. If you've performed any kind of benchmarking (results?) and have seen PHP seem favourable, you should be providing specifics. 'Their style' is just the same as any other node application/library. It takes time to adapt to writing the majority of your code asynchronously, in order to get the best out of node. If you've been writing it in a way that goes against its nature, it's not hard to imagine why you're not seeing the performance others are seeing.
-
Can you show the actual output from the server when you try logging in with a password (-p argument)? From what you have posted it seems like password authentication isn't allowed, in which case you will need to add your public half of a key (see here for how to generate the key: https://help.github.com/articles/generating-ssh-keys/), but if you can't SSH to it, you can't add your key to the authorised keys file on the server. So do you have any other form of access? Who maintains the server?
-
I'm not entirely sure what you mean by this, hosting and running the PHP code locally? If so then you'll need to install a HTTP server (generally Apache), PHP itself, and most likely a database server (generally MySQL). You'll be able to find literally millions of tutorials on how to install each of these individually, or as an OS-specific package like MAMP or WAMP.
-
Yes. You would need to make the repo private if you don't want them publicly accessibly.
-
I agree with KevinM1. In the near future there's only going to be 2, maybe 3 dominant frameworks; Symfony2, Laravel, and last and least Zend2. Laravel in all honesty is very good, but it lacks the maturity and widespread use that Symfony2 has managed to establish. Having said that, you get the feeling Laravel is going to be pretty big in the future. The next year or two of framework wars will be interesting as they push each other.
-
My friend... If you're at the level of writing your own framework with route expressions of that complexity but you don't know regular expressions; you should really be learning them first.
-
Well it's obviously authentication related, given the mention of OAuth2. Plus the exception is called "Google_Auth_Exception". Hate to say it, but are you 100% the username and password are correct?