« first day (1683 days earlier)      last day (3265 days later) » 

Med
10:04 AM
Hi all
 
hi people
 
10:34 AM
I have installed ubuntu 15.04, so when installing php, the version 5.6 is installed, how to install now 5.5?
 
why would you want to install older php version ?
 
im getting an error using php 5.6
 
then fix the code
 
the problem would be solved using 5.5
is not my code, is vendors code
 
then you probably shouldnt be using it to begin with
 
10:37 AM
(alternatively, get the vendor to fix their code)
 
Hi
 
hi
 
hello
i have one query with for loop
for($i=0; $i< count($_REQUEST['group_id']); $i++)
{
$group_id = (isset($_REQUEST['group_id'][$i])) ? $_REQUEST['group_id'][$i] : 0;
}
this is my for i am getting id like 123 i want id like 1,2,3
how it is possible
 
10:53 AM
You can try just to implode the array content with a comma and a space.

http://php.net/manual/en/function.implode.php
 
yes me try
but no result with it
 
$arr = [1, 2, 3];
echo implode(", ", $arr);
 
$a = implode(",",$group_id);
echo $a;
is it ok?
 
But I don't see why you are iterating to get the last element of the array.
 
me try like this
 
10:56 AM
Ah, look that $_REQUEST["group_id"] may be another type of data, not an array.
You will not successfully get its value by applying count to it.
 
than wat i do
 
Are you trying to generate an array from 1 to a given number there?
 
means
@HaskellCamargo if me echo group_id than it's give me value inside for loop
what should i do to store my group_id in array
 
For sure, because you're iterating it. But I don't see what is your entry point and its type. I see what your code does, but I don't see why it does.
I think this might be useful: php.net/manual/pt_BR/function.range.php
 
hi guys
 
11:00 AM
@John hi
@HaskellCamargo what should i do to store my group_id in array any another way for it
 
I have 10k cities in db and I want to populate all that select option tag in faster way
how can I do that?
 
@ziiweb What is the error?
 
But that is really the easiest way.
 
@John You want to add 10k options in a single select?
 
@PeeHaa yup
 
11:03 AM
hi. anybody knows opencart? I need help
 
like for swapping we use for loop and take 1st and last index value and swap
and for other key value also we do the same
same kind of logic
 
posted on May 26, 2015 by kbironneau

/* by Félix Piédallu */

 
@John That doesn't sound like a sane solution
 
@John faster what?
 
Sane is an understatement here
 
11:04 AM
faster sql query, faster frontend rendering
 
> For example, if the child class defines an optional argument, where the abstract method's signature does not, there is no conflict in the signature. This also applies to constructors as of PHP 5.4. Before 5.4 constructor signatures could differ.
is this for real?
 
@PeeHaa then what do you suggest?
 
like, why on earth one want to make constructors compatible?!
 
@John Autocomplete
 
@SergeyTelshevsky faster adding values in option tag
 
with javascript?
 
@PeeHaa do you want me to use jquery library
 
anyone on opencart?
 
@SergeyTelshevsky with PHP itself
 
Or just plain jabbascript
Adding 10k options in a single select makes imo no sense
 
11:07 AM
@John well if you really need to (I agree with PeeHaa), then perform a select query, create the html for it and cache it
 
Select2 has an option for lazy processing, but it's definetely terrible for dynamic requests.
I use it in some applications, but I make the connection by hand and I use monads to work with computations that may fail.
 
@zerkms You wouldn't, but equally you wouldn't declared an abstract ctor either...
In the real world for people who do sane OOP the 5.4 change is irrelevant
 
One of the features of my project is to implement prototypical OO programming in PHP, taking all things, also shapes, as objects.
 
@HaskellCamargo i donr get any anawer with it
 
well... showing 10000 options in select is nothing special, talking about performance
 
11:12 AM
@HaskellCamargo i dont get any answer with it
 
@HaskellCamargo uggggghhhh that is... horrible
 
That's cute, pure and beautiful. :3
 
btw @zerkms only difference is 3v4l.org/8qmtr vs 3v4l.org/LX0s9, LSP is not applied to ctors unless you do something (stupid) that implies you want it to be - i.e. declare it abstract or in an interface
 
@HaskellCamargo so... lots of extends?
 
@John anyway, I suggest you to make 2 selects, at least, the first is the select of the first letter, or even better - two letters, the second one is the filtered one that you load dynamically
 
11:16 AM
Juuuust going to leave this here:
user image
2
 
> Kids these days, with their tags, and their releases, and their distributed version control systems. In my day, we used Visual Source Safe, and we ....actually didn't like it.
lol @Danack
 
@Patrick No, inheritance is made by cloning.
We yet use Source Safe here, yay.
 
@HaskellCamargo Not even Microsoft uses Source Safe.
 
Oh, Yeah, but Totvs does.
And I also work with Clipper/Harbour, Broh.
 
@HaskellCamargo which language do you think of when you do this in PHP?
 
11:21 AM
Self, an almost pure OO language with basis on Smalltalk.
It proofs another way of OO instead of the archaic class system.
That's the supported OO model in the language I'm designing in the moment.
 
Archaic is not the right word for a constantly evolving system I think
 
Oh, yeah, it really is.
The OO model per se is not an enough evolved model for achademic and extremally complex purposes.
 
And prototype based OO is?
 
It works fine for applications such as general systems, but the model is so disturbed from the original OO definition.
 
@DaveRandom I see; so it's not me dumb
 
11:27 AM
Prototype based programming, with a good implementation, allows you to abstract and express the domain of your problem in the language in such way class-based don't. Take as an example the encapsulation by closures.
I recommend this article, read if you want. That's a nice referrence. robotlolita.me/2011/11/19/for-sugary-object-oriented-js.html
It follows a different model, in whole, such strange while starting.
 
@zerkms I would argue that PHP's behaviour in that case is correct, the incorrect thing is the people who use that "feature". The alternatives would be to outright ignore what the developer wrote and allow signature variance anyway (this would be a bigger wtf IMO) or to throw an error when people try and do it (would personally be OK with this but can see why others wouldn't like it).
 
@HaskellCamargo it has it's advantages, but it surely is not something you use in complex purposes
 
Mornings
 
Morning @RonniSkansing o/
 
@RonniSkansing morning!
 
11:32 AM
=] sup
 
I guess it is the inverse. It might be some what complex now, but, of the OO models, yet is the more expressive by far.
 
Somebody please help me
1
Q: Why it's echoing blank in following function code? Not able to understand some steps from code. Please explain

user2839497I've one HTML string <img src="http://54.174.50.242/file/pic/emoticon/default/smile.png" alt="Smile" title="Smile" title="v_middle" /> I'm getting blank for the above HTML string. why so I'm not understanding. The above string is passed as an argument to the below function i.e. the variable $fee...

 
However, I yet prefer functional programming/stack-based concatenative programming rather than imperative/OO.
 
8 mins ago, by Haskell Camargo
The OO model per se is not an enough evolved model for achademic and extremally complex purposes.
I need to make a 'shit haskell programmers say' blog.
 
@HaskellCamargo I worked with Lua pretty much, and I have to say, I love it, but I can't imagine how would I work on a big project with 10+ devs in it
:)
 
11:35 AM
@user2839497 That's simple. You explicitly assign an empty string to $feed_status
 
@Sherif:Please consider this line also :if($feed_status == '') {
$feed_status = strip_tags($temp);
}
 
@user2839497 3v4l.org/W9MCS
The entire string is a tag. Calling strip_tags on that string results in an empty string.
 
@Danack Just create a markov chain of language.oop5 and Dante's Inferno
 
@Sherif:BUt I'm not getting why it's not replacing it with \\ue056 since the matching string is present within <img> tag
 
Has anyone found any reason to use __invoke() method at all?
 
11:41 AM
@user2839497 Break the problem down into smaller chunks. Isolate the bits and pieces you don't get and run them independently just like I did with your strip_tags predicament.
It's called debugging.
You could also try stepping through the code with something like xdebug and figure out at which point you made an error in your logic.
 
I don't really believe you know the real definition of OO according to his creator, Alan Kay.
Ah, and, although people call me Haskell, as nickname, yes, I'm a haskeller and programming languages designer.
Don't take it so serious. We talk about technical aspects.
Please, don't take the title so serious, and the text is long enough for a morning: smashcompany.com/technology/…
 
You sound exactly like someone who just came out of college.
 
@Sherif:Are you talking about me?
 
@HaskellCamargo sticking to the original word without changing things when more information is available is a dangerous approach. See the guys who follow books that were written a few millennia ago...
 
No I'm talking Mr Haskell over there.
 
11:49 AM
@Sherif:ok
 
"OOP is an expensive disaster which must end" - never have I heard or read a bigger amount of tosh
(and that's from someone who has heard people proclaiming Laravel to be a good framework)
 
@Patrick Well, half the books these kids read in college these days were written about a decade before they reached their desks. By the time the information is disseminated the students are already trying to apply outdated knowledge in practice.
 
@Jimbo given how many people do it wrong, there is some truth to that
 
Then they go get a job and the real world hits. They suddenly realize 90% of what they learned in school just doesn't work in the real world anymore. When half the companies in the Valley are using technologies that have only had books written about them in the last 12-18 months, you just can't count on the schools keeping up.
 
@Gordon Yeah, it's always about using the right tool for the job. But using such an obtuse blanket statement like that is just daft
 
11:53 AM
It's just a title meant to capture your attention.
... if it's on the Internet it must be true ...
 
holyshit, i missed a foot in mouth insertion
 
On the Internet we do not have feet. Just keyboards and mice.
 
@Sherif This happens because, today, universities create codemonkeys, not academics, as should be its purpose. I don't say that it must have no market in this, but that this is not the main focus.
 
@PeeHaa hey man, whats this Feedr app all about?
 
@HaskellCamargo academics? please don't use swearwords... ;)
 
11:57 AM
@Sherif of mice and keyboards
 
@HaskellCamargo Let me ask you a question. Have you ever built anything in Haskell that people found to be pragmatically useful?
And believe me when I say I already know the answer to that question before you answer it.
There are about a handful of people in this world that I know of that have managed to build anything of pragmatism in Haskell.
 
I also work with Haskell and functional languages here, but I don't mean this is meant to be used to general purposes.
 
I mean it is a nice way to take the academic side of the things, the concepts, the true concepts about computer programming and how a language works, no by creating Java/PHP codemonkeys.
 
@Sherif most of them probably work at facebook too
 
11:59 AM
@HaskellCamargo That's my point. As a software engineer, no one is going to hire you for your academia and theory, because businesses don't run in a lab. They run in the real world where things aren't pure and safe.
 

« first day (1683 days earlier)      last day (3265 days later) »