logs archiveIRC Archive / Freenode / #php / 2015 / June / 26 / 4
fleetfox
well, formating html is pretty pointless
CausaMortis
fleetfox, depends, its not really readable at this point :p
new0
"Wondering" (quick note) what would be best for php debgging tool? XDEBUG? and if yes (using it now) in what edito is bestr? (using Eclipse) Visual Studio, netbeans, Notepad++, Sublime-text?
CausaMortis
fleetfox, i guess you have a point though.. the whole idea is that people dont have to fool around with hmtl anymore
SomeDev1080
Still having SoapServer::handle complain that it can't find a procedure that is reported by SoapServer::getFunctions to be available. WSDL caching is disabled. Any ideas?
new0: XDebug works pretty nice with Netbeans. Had issues with Eclipse in the past but didn't try for a while.
_eddy
which will take longer? is it better to pick all the cherry in a field into a basket then sort out the bad one later or is it better to pick it and sort out the bad one straight way?
laszlof
.
SlashLife
CausaMortis: HTML doesn't *need* to be human readable (especially not in times of Firebug et al). However if you want to have need looking source for your website, then formatting just that snippet is pretty pointless; puke it into your document and format the whole document.
I think HTMLTidy can do that for you.
new0
SomeDev1080, tnx. i am using it now (eclipse) only for debug and Sublime-text for coding and notepad++ for quick things (encoding and such) but the first time i used something after maybe notepad++ i think it was netbeans and i like that. hope it's really better than buggy (sometime) eclipse
         

CausaMortis
I realise that it is pointless in a way, but if I wanted to be able to view the source in a file manager I would prefer it to look good. Now there might be libraries like codemirror that could do this automatically but yea
_eddy
laszlof, i have this method which select everything into another table then in this table, something else will sort out the bad data. so i am wondering if to do it one by one or all of it at onces then pick it out one by one
SlashLife
CausaMortis: There's PHP binding for HTMLTidy.
http://php.net/book.tidy
laszlof
_eddy: if you're looping your data twice, you're probably going about it the wrong way
SlashLife
I'm not 100% sure it does the formatting, though. It's just a small shimmer of remembering *something* about it.
laszlof
I would filter out the bad data as you pull it.
_eddy
laszlof, i was thinking the same. Because the first step i have done is pick all the cherries then i will loop over to pick out the bad one
SlashLife
_eddy: If you can do it at the same complexity in one pass: Do it in one pass.
CausaMortis
SlashLife, cheers. I stumbled upon that earlier and it is supposedly able to do the job :> will definitely take a look at it
_eddy
http://kopy.io/U0fPi this is the first step in which i pick out the needed data
laszlof
that looks like an insert
_eddy
laszlof, its a insert into by select
laszlof
so by "picking" you mean, putting into another table
_eddy
yes la
laszlof,
laszlof
so this is a SQL question, not really PHP
SlashLife
_eddy
laszlof, its php also because am using php to do this
laszlof, will give you a brief idea of what i am doing so you can help me better
SlashLife
_eddy: "I have a problem with my washing machine." - "We're a Ford service station; we don't do washing machines." - "Well, it is Ford related because I brought it here in my Ford."
laszlof
pretty much
nanohard
haha
         

_eddy
SlashLife, dont get it
CausaMortis
SlashLife, :D with the added benefit of code validation/correction for.. who knows.. when I might need it x]
laszlof
hes saying that just because you're using PHP to execute the SQL statement, doesnt mean that its a PHP issue
SlashLife
_eddy: Your problem is with the SQL you're doing, not with PHP. Your problem would be exactly the same if you were doing it through the MySQL command line client. You have an SQL problem. The fact that you happen to use PHP to access it doesn't change that.
laszlof
but go on.
SlashLife
CausaMortis: I hope you don't. Tidy is *very* good at *guessing* what you wanted to do with your broken markup - but that doesn't change the fact that it is, in fact, guessing.
So don't feed it broken markup unless you really really have to.
(And if you have to: Don't feed it broken markup, either, but fix whatever generated the broken markup to begin with.)
kokut
Is it viable to request a different document if the browser is mobile or something?
_eddy
SlashLife, have you head of postcode lottery?
heard*
laszlof, also
SlashLife
You just mentioned it.
:P
kokut
i mean, without a redirect, same document but rendered differently without js
SlashLife
kokut: It is. And I'd hang you if you did that to pages vital to me. Most mobile sites are crap.
kokut: Question is: Do you really need a different document?
Is it important that it is a *MOBILE* client?
If so: Why?
_eddy
this system is similar. a user needs to meet some criteria to be eligable for a draw. anyways in the previos kopi url above shows the first cretria. I have selected all the short_postcode(e.g.) LS4 so everyone within the LS4 who has met those criteria have been entered into the draws table(this table basically holds records about all the shortcodes which are eligable for a draw today(the attribues in this table are short_postcode_id and isactive field)), i
have another table called draw_pool(attributes are user_id and draw_id), (this table should hold data about all the users and shortcode_id which will then be randomly select from) but issue is how do i populate this table, do i do it at onces(e.g. select all the users in postcode AB12 loop throught it and then flag that field has done) populate this table with a single query?
fleetfox
kokut: yes, but detection is falky and you have to do it clientside
kokut
SlashLife: i want to render a different document if the browser window is below a certain width
_eddy
if i am to loop throught it which makes more sense how do i keep track when i have finish the draw for a short postcode?
kokut
fleetfox: i specifically asked for a server side solution because i dont feel like rewriting all my DOM with js
fleetfox
kokut: are you aware of "responsive" and "media queries"
kokut
Guess i could do it with ajax or something?
fleetfox: yes i need a different document structure...
believe me i would save all the time i can in this project
SlashLife
kokut: Ok, that's a much better definition, so you don't care that much for mobile clients, but clients beneath a certain screen width - and possibly touch enabled.
fleetfox
it's not about saving time, with sane markup you can do almost any mobile and desktop layout
SlashLife
kokut: Do you really want a different document, or just a different representation of the same document?
fleetfox
having seperate app for mobile is the hard way
kokut
SlashLife: i need a different document structure, whatever is easier
SlashLife
Because you can get very far with a well thought of document structure and CSS media queries.
Flexbox will even allow you to "reorder" elements.
kokut
well maybe ill have to think about that
i have a large column on my left that i need to be changed to a vertical layout below 768px
charlie_
I have a form that creates a file. Im using uniqid to generate the filename. Am I reading this right that if 2 people submit at exactly the same time they would both use the same name? http://php.net/manual/en/function.uniqid.php
SlashLife
And as a last suggestion: Make the mobile layout the default and use media queries to load the more sophisticated layouts as an afterthought.
kokut
SlashLife: good advice, i'm gonna do that for the newer documents ill be working on :)
SlashLife
Because usually those devices which you consider "mobile" by their specifications have a lower bandwidth - they don't need to load the big layouts.
pihpah
Should inline comments begin with a capital letter or a small one? I mean // this is a comment vs // This is a comment.
PsychoBoB
Hey Guys
<script language="javascript"> this tag language are deprecated?
Alright?
Krisostoomus
hi guys
how many of you use smarty?
:D
guess no-one
dividedbyzer0
Someone. Somewhere.
SomeDev1080
Krisostoomus: I have to use it.
SuperTyp
I have this in my error log: http://pastie.org/10260110 I remember that I tried to use this lib but I dont really need it and I want to get rid of it, how?
Sharaal
Krisostoomus: twig > smarty imo
Krisostoomus
put this library to your ext directory
you need to add it to php.ini
what are you trying to do there with it?
SuperTyp
thank you I was blind...
CausaMortis
anyone here that could recommend me a good read on file system based storage?
ss23
Little more context on what you mean, CausaMortis?
Like, good ways to store lots of files on the file system?
fleetfox
folders are nice
CausaMortis
ss23, yes. basically just the do's and don'ts. approaches that are considered best practice. efficiency
ss23
Sweet, I know what you mean/want, but dunno any resources to link :P
fleetfox
tbh, don't store anything on disc, use blob storage
ss23
Eh
« prev 1 2 3 4 5 6 7 8 9 10 11 12 next »