Hey guys, I've got a question to see which way I should tackle a situation. Basically basically through php I'd like to sort of save a 4x 8 table to the google drive. It's basically a php page that i've created that has a table and nothing else, with strings inside each box. I'm not sure if I can basically print screen the page to pdf format and then upload the pdf file or directly upload to google drive the table itself as a pdf document.
I've already got the code to upload a pdf file to google drive done. But saving the table to a pdf file is a mystery to me. Or maybe it should be that we save the table directly to the drive instead of to my computer first and then to google drive. Does that make sense?
I have some question regarding email send through my server. i am sending email to gmail user account in header from address also [email protected] and sending through my server so user got mail but with warning phishing message. how should i Remove this phising message?
@RonniSkansing Yes exactly. I'm not sure if Google Drive is part of Google Cloud, but yeah the code i have checks if you're logged in to Gmail, then uploads a specific pdf from your computer to google drive.
@RonniSkansing The html to pdf conversion part before the upload and then saving that pdf on to my computer. Or if there's a way to directly put the pdf on to Google drive
@Nileshpatel make sure the domain's TXT records contain the IP of the server you are sending the mail from.. if you say your email is from @gmail.com and you are not gmail.com then it will warn the recipients of possible phishing stuff
@SecondRikudo bullshit. When (not if) you start to gain weight, it will put additional pressure on your knees. If you haven't done anything, those knees will start hurting.
@salathe he's speaking so loudly Tyreal hears the voice of "about 10 devs" complaining ... I'm so annoyed about that, why don't they see they are being dicks ...
@SecondRikudo If you want to compare extremes, then compare them to superfat people... The statistics will look different for recreational athletes. But let's not get completely offtopic here :)
The following conversation I had with a colleague of mine: Me: "Why aren't we using thread safe php?" Colleague: "Cause SQL Server doesn't work with thread-safe driver." Me: "That's not true it runs after versions 2005.", and I send him some links. Colleague: "Yeah but I prefer Mircrosoft's driver, we have tried with other drivers and we have problems with the dates." Me: "What kind of problems?" Colleague: "Returns a DateTime object instead of string" I am like *facepalm* at that point of the conversation
so we are using non thread safe cause he didn't know how to use ReturnDatesAsStrings => true in the connection options of the PDO
what do you mean by windows based network? My PC at work runs windows with Zend_Server, and all the code is on my machine, the dev server is running mssql and my php configuration is connected to the server DB
threads have a scalability problem, as I'm sure you know ... in addition it would be tempting to use threads at the frontend, where they should never be used ....
what I'm saying is, having a threaded installation is great, useful for this kind of thing, and probably a good idea to separate out front from backend anyway if you have more than one physical (or virtual I guess) machine ... but at the frontend, use the recommended setup of nginx/fpm and don't let the frontend website create threads in direct response to a request, ever ...
because of that ^
you have a limited amount of cores on which to execute threads, thread per client makes no sense, remember yesterday I said look at it with the inverse perspective, so you want clients per thread, in other words, a thread is only useful at the frontend if that thread is a non-blocking I/O thread so that there are client_s_ per thread and not client per thread ...
the threading model of PHP is thread per client, so don't put that at the frontend because it will not scale ... use the threading model exposed to you by pthreads at the backend and have those processes communicating over the wire with frontend normal services ...
@Patrick Leg day isn't a stupid concept. Leg day exists because it's part of a balanced workout. I separate muscle groups for each day of the week so I don't have to spend 2 hours in the gym each time.
of course all of this is only a problem at a particular point, it's a scale isn't it ... I'm not saying it doesn't work to create threads at the frontend, 8 per client, I'm saying there will come a point that such a design would become it's own bottleneck ... of course by that time you might be rich, and can hire me :D
@Fabien I do full body workouts (squatting 3x per week) and I am out of the gym in less than an hour (including shower) :) Separating upper/lower or push/pull/legs is fine if you squat at least twice a week. Less than that and you will get DOMS every time and your progress will be much slower
In my head it's a bit like this: Multiple users can make multiple requests which causes for php-cgi processes to spawn on the server. Then for each process there is thread pool which utilizes all the cores. Which means that there might be two concurrent php threads both using pools of N threads where N is the number of cores.
two is a number you picked out of the air, that part of the equation is unknown and is the number of clients, so in your system, T=Cl*8 Threads = Clients * 8, a more scalable solution is (always) Threads = Cores * Load, where load is variable and with a sensible default of ~1 ...
you can achieve this by separating out those parts that require concurrency into something we'll call the "backend", the backend is a process with one pool of threads (Cores * Load), communicating with everything else, which we'll call the "frontend" over some simple network protocol most probably (IPC), so the frontend can still be a fast nginx/fpm setup, without the overhead of a ZTS install, without temptating, and it will scale ... for as long as you can add hardware and design
@Fabien What is your workout schedule? I really find it nearly impossible to get time for gym or swimming. :( Maybe you have some magic formula for organizing schedule. :Ь
gist.github.com/krakjoe/6437782 I skipped this yesterday because you said you knew java, but I show that to everyone because it explains a few things you should know ... maybe give it a read, then your set ;)
@Leri yeah that's too short... Takes me an hour and the gym is pretty much next door. You don't have flexible hours? I thought that's quite common in IT.
@Fabien Yeah, but the problem with me is that I work on my start up plans at nights... Maybe, I find a gym that works 24 hour and workout in the morning.. /me will have no sleep anymore in that case
@Leri It's tough to fit in with your own work schedule but mostly you just need to force it. The hardest part about going to the gym is actually going.
@Leri It's a lot easier staying in shape than it is getting there. But you can spend the next 5 years thinking about how you should or simply do it within the next year. 1 year of sacrifice, just do it.
@Patrick Fair point. If I find gym nearby I can go to the gym before getting home (however, these 2 months were awful.. I mean I was leaving from work at 1-2 am. Fixed one out already).
I had a home gym in my garage for a while. It actually makes it harder to work out, you don't get the routine/habit going that you get from going to a gym. But if you do it, buy a power rack, a bench, an olympic barbell and weights. No fancy machines.
@johnnyTrak You have 2 options. 1. If that variable does not need to be secure, do calculations on clientside and confirm only when it has its final result. 2. use sessions. Since you use Joomla take a look at their relevant docs, however don't forget to read up on php manual at first, so you understand what is wrapped in Joomla.
@Leri I am actually a really big sport science nerd, my bookshelf is full of verkoshansky, zatsiorsky etc... I even was involved in a SaaS of a famous MMA S&C Coach until he booted me out because one of his clients offered to do it for free (Yes, I started to take money upfront or do contracts after that...)
I have this idea of a software where you do a few tests, enter your goals (sport etc) and enter the test results and you get your next 2 month training block created for you. I have it pretty much planned out, but I realize that people are way to lazy to get off their behind and do the tests/pay for it...
I am stupid. I just realized I have one of europe's best S&C coaches next door to my BJJ gym and his assistance coach trains with us... I should go talk to him about doing this as a joint venture. With a proper name behind it the idea might have some merit
@Jimbo Definitely. My idea is to gather data from professionals athletes and file those test results. Then compare the user with the average of his sport and decide that way what he needs to work on.
It wouldn't be for bodybuilding though, I am not very interested in that. More about athletes (martials arts, rugby, etc) that want to improve performance in their sport.
But you don't need anything fancy for that. Do a few months of starting strength followed by an intermediate bodybuilding program, watch your diet and you will look great in a year. It's not exactly hard if you put the time and effort in.
Especially with the internet resources these days, all the big communities have good FAQ's with all the information you need. There is no money in that unless you aim for the people you can scam with false promises (bodybuilding supplements, ahem...)
@Patrick It's not quite that easy from my personal experience. At age 10 I was quite fat kid. I started swimming by that time it took nearly 4 years to lose weight (I mean getting in good shape).
@Leri Well losing/gaining weight is all about diet. If you eat too many calories the best exercise program won't help you. bodyrecomposition.com is a good site, everything based on science and not some fads.
@Patrick Really, nice resource. I'd say the best resource I've seen so far. Honestly, I can't trust to a guy who is professional athlete for 20-30 years and says that with his program I'll be in that shape in a year.
My advice is don't focus so much on trying to find the most efficient way to do things. Definitely research, read around, keep up to date with it all but the most imperative thing is actually doing something and sticking to it.
@SandipPingle 1. Zend 1 is pretty ancient. 2. The error is clear. Role is missing and solution would be straightforward i.e. add missing Role.
I have no experience with zend (neither 1, nor 2), but if I was given a project with that problem as the first thing I'd find out what Role is in terms of Zend 1, then find where and how they are created, so I could find if the Role that is used is created and if it's not create one.
Introduction
Since we've figured out that your strings can have any length, then your issue boils down to - how to split string with any length to it's chunks of some length in MySQL. Unfortunately there is a serious problem in MySQL, that prevent us from doing this in "native" way. And this pro...
WTF is the point of ReflectionObject if you can't retrieve the object over which you're reflecting? It's about as useful as A extends B { }, adding nothing of value.
@Ocramius Probably file under "No one cares" but technically ZendCode violates the zend license, as it doesn't have the copyright notice or the BSD terms and conditions in it. "Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer."
@HamZa yes but some mot popular crm like getBase, mailcimp are sending From @gmail and also to @gmail address. that means something we are not know how to send mail to gmail by using Our server.
@tereško Which is something they should have actually fixed - being able to write plugins for the Composer/PSR style autoloader instead of it being a single way of doing things.
@tereško In 74 years that will stop someone from being able to copy the Zend code....
And that is why I get annoyed with Phil Sturgeon so much. Every time he gets involved in a debate it seems to turn out into a really exclusionary way of thinking, trying to find the One True Way of how to do things like classloaders, cache interfaces etc. Instead of making things compatible in fluid ways that are open to future expansion.
the author is set in xml looks like you can't ... I wanted a blog and would be okay there I guess ... bjori just didn't want to say lets set up a blog without knowing I would write for it, so said test it there ...
@Fabien and I'm glad I am too, I can't deal with that ...
@Gordon well there isn't, we were trying to get something going, we'd talked about editing and what not, but all this kinda ruined whatever we were going to do ...
if the guy who has control over dns saying they'll create the entry for you if you do A then B is not a go ahead, I dunno what is ... and I'm not blaming bjori at all, I think we all did something good ...
@JoeWatkins i guess the main issue there is not the post itself but rather who is allowed to post what on php.net on behalf since it's pretty much official then
I wrote about ng there, to counter nonsense, and to get something started ... an internals blog, a factual one, that the blogosphere can use as a reliable source of information about what is really happening and why ...
@Gordon there is a problem in any community that needs to decide what the facts are before communicating them, I understand what I am looking at when it comes to anything that patches zend, I understand what it is and what it isn't and don't require a consensus for that ... shoot me for using inspiring language, it wasn't meant to be an isolated thing, but the beginnings of us talking to the world, so make a joke and be inspiring I thought ...
@JoeWatkins what I mean is that I understand people want to get asked or be involved before an announcement like this is made from the official php site
First and foremost, you did what you thought was right, and you took the initiative to do that. That needs to be recognized. All these people bitching need to recognize, that right or wrong, you showed up. Which is far more than most do, and should be encouraged. Were toes stepped on? Probably. Could it have been done better? Probably. But that doesn't mean it's not a good thing. And anyone saying it shouldn't be done doesn't realize the problem it solves. Which is a problem IMHO...
@JoeWatkins sorry, was asleep when the whole thing went down