« first day (1800 days earlier)      last day (3151 days later) » 

2:01 PM
@Abe I haz a mixer and a "synth" jsdaw.pieterhordijk.com \o/
 
@PeeHaa ... that was too loud..
 
@kelunik That's why there is a mixer :P
 
Oh wow...I didn't know these chat rooms existed
 
Run while you still can! :)
 
Problem is I had Spotify at about 40% and main sound on "full" volume. ;-)
 
2:04 PM
@kelunik hehehe
BAM SOUNDWAVE IN YO FACE
 
I've tried two different vendors for proxies, I'm getting 120-140 second cURL response times...that can't be "normal?"
 
@SuperNoob When happens when you do the request directly? Are they paid proxies?
 
Fortunately, double clicking play breaks it.
 
w/out curl <1 second
paid, proxybonanza
 
@kelunik huh? I thought I fixed that
 
2:06 PM
@bwoebi Yes, please. Dart-style (not C# style).
 
Nope I did not...
 
And the stop watch doesn't run anymore.
 
I just wrote a script to go through all IP's and test time, hopefully there are at least a couple fast connections in the list.
 
@kelunik Also related to the double play?
 
Nope, just doesn't work.
 
2:07 PM
Hmm works for me
stop button is also wonky though
 
Let me ask this w/ another angle: what's a faster/more reliable paid proxy out there?
 
What;s the reason you are using a proxy?
 
Uncaught TypeError: levels.forEach is not a function
JsDaw.Interface.Model.Mixer.Mixer.getHighestLevel @ Mixer.js:28
(anonymous function) @ Mixer.js:19
(anonymous function) @ bubble.js:22
JsDaw.Core.EventManager.EventManager.get @ bubble.js:19
JsDaw.Core.Loop.Loop.run @ controlled_indicator.js:29
 
hide server ip
 
@PeeHaa ouch, THAT was loud
 
2:09 PM
@kelunik This is why I don't do frontend stuff... :P
 
Frontend sucks, yeah...
 
What browser are you on?
 
Chromium, probably version 44.
 
@SuperNoob Well I dunno enough about proxies to tell you which are not crap
@kelunik Should be fine
 
Thanks. It's driving me crazy
 
2:18 PM
@LeviMorrison Can you please tell me the exact (semantic) difference…? Or are you only talking about the syntax?
 
It's syntactic but quite large.
 
But actually, I think getters are useless. We need just setters IMHO.
 
We need final properties.
 
Because actually more than 90% of the getters I see are just directly returning a protected/private property.
I imagine it like:
 
I think what the C# people like is automatic getters and setters. What value does that have, really?
If you can get and set why not just public variable?
 
2:23 PM
public $variable (int $value) ~> {
    if ($value < 0) {
        throw new \DomainException('$variable must be a positive integer');
    }
    return $value;
};
no need for getters, honestly.
@LeviMorrison or do you have cases where we'd need actual logic in getters?
@LeviMorrison Alternatively I propose an even simpler:
 
@bwoebi Yeah, when it is completely artificial.
 
public $variable ~> {
    if (!\is_int($this->variable) || $this->variable < 0) {
        throw new \DomainException('$variable must be a positive integer');
    }
};
 
I have a condition in mysql:
0 < $var< (SELECT id FROM table ORDER BY id DESC LIMIT 1)
 
I don't like the magic $value.
 
also I have a INSERT query like this:
INSERT INTO AnOtherTable(id, content) VALUES (?) ON DUPLICATE KEY UPDATE content = VALUE(content)
 
2:32 PM
@LeviMorrison forgot to change, better?
 
Now I want to implement this: IF condition was true then INSERT query execute ... how?
 
Eh, I like get and set better.
 
@LeviMorrison this means: when it throws it's going to be changed back.
Because accessors are in 95% of cases anyway only validation.
and if they aren't… getter and setter methods are still an option
 
@Sajad the ID usually is auto_increment
 
@tereško ah yes, that is just a test
 
2:35 PM
set variable(int $value)  {
    if ($value < 0) { throw new DomainException(); }
    $this->variable = $value; // this is always the part that is curious
}
 
well, the amount of columns and amount of values is not matching there
you probably will get an error
 
@LeviMorrison I'm not really a fan of having a shadow variable here.
 
@LeviMorrison What language is that?
 
@HassanAlthaf None, but close to Dart.
 
@tereško yes yes. but that is not important, it is just a test. I want to know, how can I implement this structure: IF condition == TRUE THEN INSERT ... ?
 
2:36 PM
@LeviMorrison Oh okay.
 
@HassanAlthaf none. Just throwing ideas around to implement something in PHP.
 
Nice.
Can I suggest something?
 
sure
 
How about something like ArrayList and HashMap like in Java?
 
@bwoebi I didn't have a shadow variable – I was thinking within a setter it just doesn't call the setter if it the variable is assigned.
 
2:37 PM
And the ability to have same method name with different arguments like in Java in PHP?
 
But I don't know shrug.
I still like that better than the last proposal we had.
 
@Sajad you cannot. Not in MySQL. Though it is possible in other popular RDBMS'es. The google keywords are: "sql contraints"
 
:-(
 
I have heard from many people that MySQL is shit.
 
in mysql you can only do the check for unique values
 
2:38 PM
What is the best SQL RDBMS?
 
@LeviMorrison definitely. Honest question… Is there any use case where you'd better use get {} instead of a real getter method?
 
It's a syntax thing.
 
@HassanAlthaf you just now asked "which is best internet explorer browser"
 
@tereško I realised and fixed it. Lmao
 
@tereško your mean is ON DUPLICATE ? anyway ok thanks
 
2:39 PM
// would call the getter
$bar = $foo->bar;
 
Also, directly writing the value to a property prevents too many unexpected side effects.
 
@Sajad yes. In mysql you can only do the 'on duplicate'
 
@LeviMorrison yes. What for? $foo->bar has a value. It can return exactly that value.
There is a reason why we have methods… to designate actual logic happening.
 
I think people like having a separation between logic regarding "properties" and "methods" or something.
 
@HassanAlthaf people will usually recommend PostgreSQL, if you do not provide any other conditions. If you are working for corporation and need "cover your ass", the Oracle is popular. And if you are working withing .NET infrastructure, MSSQL is a good choice (latter is used by stackoverflow)
 
2:41 PM
I think it is also a future-compat thing in some languages.
If you ever want to do something before setting a variable if they are directly accessing it they have to rewrite the code.
 
@tereško Isnt MSSQL microsoft sht?
 
But if you use a setter the setter gets called and no code using it has to change.
(Similarly with getters)
 
I'm not sure.
That is basically a behavior break hidden behind an unchanged API.
Don't think that's a good thing.
Sometimes it's more clever to intentionally break the API even if it's technically avoidable.
 
@HassanAlthaf yes it is. But it's a decent RDBMS.
and it has very good integration with other Microsoft products
 
@tereško decent and shit for one same thing… nice.
 
2:45 PM
@bwoebi I read the question from, as "isn't it the microsoft shit"
 
oh… okay
 
*wrong
oh, @HassanAlthaf, and if you need something portable, then SQLite is a good choice
 
@bwoebi Theoretically they can change the impl without breaking the external API.
 
3 mins ago, by bwoebi
Sometimes it's more clever to intentionally break the API even if it's technically avoidable.
I like the premise of properties to not invoke actual side-effects/state changes. It just should set the damn property if possible.
The only logic really should be figuring out the if possible.
everything else, while still possible, is rather a dirty hack… which obviously can be legitimate in some cases, but shouldn't be encouraged.
 
Hmm.
I think part of the issue is that we have too many magic methods.
 
2:51 PM
@LeviMorrison not sure how that's related?
 
It makes it more difficult to do things like merging symbol tables.
 
sure, but how is that related to this particular issue here?
 
The fact that property accesses are different from method retrieval and are also different from constant access makes our object behavior really crappy.
And adding the notion of "getters/setters" just makes it even messier.
 
Which is why I'm only proposing the notion of setters, but not getters.
 
I don't think that would pass.
 
2:54 PM
@tereško Yeah, that definitely is a good choice! :P
 
@LeviMorrison Why?
 
Damn, is Oracle good? @tereško
 
@bwoebi "Having setters and no getters is only a half solution" type opinions.
 
@LeviMorrison We surely will be able to motivate our changes. Additionally, when we add setters, we don't shut the doors for future getters.
@LeviMorrison right, that's why we'll have to persuade people why it actually is a full solution.
 
I don't think it is a full solution. You don't seem to see the need for getters for properties that don't actually exist, but if you look in languages that have this feature it's a really highly used aspect.
 
2:57 PM
@LeviMorrison not using any such language, so can't tell. Can you please show me good usages of getters?
 
@HassanAlthaf it is a really expensive solution. But it also has more functionality. Though, based on the record of company who makes it, the security might be spotty.
Oracle Corporation hates security researchers with passion
3
 
.. oh, and they are the people who too Google to court, because they decided to have a copyright on API
 
In my country, some of the richest companies use Oracle.
 
@bwoebi I can't find the link but one example that I've seen that I thought was compelling was a date and time like object.
It only stores one value, but you can retrieve things in different units.
And similarly set things in different units.
And it does all the conversions but only stores one unit underneath.
 
3:02 PM
@LeviMorrison which is why you then only expose the timestamp directly.
 
Logically though the "seconds" and "minutes" are properties, not methods.
 
Because actually, e.g. when you $date->s += 70; … yeah, what happens? the thing overflows on 59->60.
and implicitly changes then the method property too.
 
@bwoebi It can take that kind into account – why couldn't it?
 
You wanted to actually change one thing, not two.
 
That's just a documentation thing.
 
3:05 PM
@LeviMorrison If it's just about documentation, then we should use much more magic … it's anyway documented………
 
Hopefully you realize that using an API differently than the way it was intended is a different thing than magic.
 
That's IMO not an argument.
 
Foo->doBar() didn't do what I wanted it to do!
 
@tereško sorry for asking again, but my exact question is this: (still you believe this it impossible in the MySQL?) : How to check a value exist in the tableA before inserting in the tableB?
 
@LeviMorrison How do I know what's intended? There's a minutes property and I just want to add $n minutes.
 
3:07 PM
@bwoebi Adding 70 minutes should change the hours – if it shouldn't then you would error on the attempt and the hour would never change.
 
@bwoebi Ugggh are we talking about those wonderful datetime properties?
 
@PeeHaa looks like.
 
Hours and minutes and seconds are all "views" of time in general.
 
Correct. They are views. And views usually have the property of being immutable.
 
Hey! Getters with no setters!
I'm not sure how to persuade you to see it but getters are in my opinion a very elegant solution to this issue…
Oh well.
I'm going to go take a shower.
 
3:11 PM
@LeviMorrison readonly properties are somehow unnatural.
If you want something one way, that's exactly what methods are great for!
the point is: hours/minutes/seconds etc. are derived from one other property.
 
3:26 PM
@kelunik final properties will probably lead to people using reflection to abuse them as internally mutable readonly properties…
 
@Sajad depends. Do want to insert a row, if the value exists of it doesn't exist
 
@bwoebi That's your excuse for not introducing them?
We have them internally, so why not in userland?
 
@kelunik That's not an excuse, that's a thought about them. And might actually be an argument in favor.
but TBH, I think that may be just covered by readonly properties in general.
 
user4433485
Hello
 
@bwoebi final properties are readonly properties.
 
3:45 PM
I suck at server config and routing
 
@SuperNoob You just have the wrong software ;-)
 
Well this client insisted on a NGINX setup...but I'm not even sure that's the issue
I have almost zero bash knowledge
 
bash? I doubt you need to use it when working with nginx
 
I'm trying to figure out what's up w/ the config. running a curl proxy request on my webfaction server < 1 second response. Client server, 120+ seconds
--in case it's not clear, I have no clue what I'm doing :)
 
:P
Don't they have a sysadmin?
 
3:50 PM
Not sure.
I was hired as a developer to build a PHP app. I can do most of that, but I didn't realize I would have to be messing with server stuff conf
 
meh I assume you can send an invoice for it either way
 
...flat rate app build
I'll email them tomorrow and discuss the issues delaying developement.
 
now im confused
 
What about?
 
4:05 PM
I do echo $_FILES['userfile']['name']; and get Undefined index userfile erorr and i do echo $_POST['userfile'] and I get what i want, the filename...
shouldn't the first return the file name when it exists?
@PeeHaa could you take a look please?
 
Did you set the form's enctype?
 
nooo
 
Well you should :P
 
lol right, thanks man
 
np
 
4:22 PM
I thought using sudo: false to enable containerisation on Travis was meant to make it start running quickly.....
 
It should
 
user1804599
Started working on a new compiler /cc @NikiC.
 
@Sajad did you get the book?
 
@PeeHaa I think maybe they're under a DOS attack.....the webshite isn't even loading now.
 
actually various sites have been twitch in past few days
I have been hearing some stuff about chinese making a clusterfuck
 
4:27 PM
Oh. AWS being awesome - traviscistatus.com
 
:(
 
iMDB down, medium down, heroku can't boot new dynos. And apparently it's all because of an Amazon DynamoDB *partial* outage in *one* region.
 
So. So far after trying to investigate why the latest version of ImageMagick doesn't pass the travis tests I have found that:
* all versions of IM since about 6.9.1-5 are borken.
* The tests don't pass for any version in Ubuntu installed via Puphet.
* Travis has been completely killed.
I think I'm going to stop investigating before there is a full collapse of the universe at the quantum level.
@kelunik Amazon are known to lie about the status of their outages, so it might be more than that. I've experienced them saying "We are seeing a delay in provisioning instances" when actually what they mean is "No one has been able to create an EC2 instance for the past 6 hours".
 
@kelunik Cloud hosting FTW
 
Abe
@DaveRandom @marcio add padding-left:34px; to your #sidebar
 
4:35 PM
cloud hosting is great. unless it becomes that popular you then one day again need to do it yourself.
 
I would like to store some extra information in shipping track table in magento? Should I create field in table or is there other way to achieve it?
 
Anonymous
Has anyone duplicated & used a single cookie from one host to another?
 
Anonymous
any experiences?
 
@AjmeraInfo I don't think anyone uses magneto here.
@samayo wat? aka what are you trying to do?
 
Ahh.
 
4:43 PM
^ you are doing it wrong @samayo
 
Anonymous
I want to take... let's say, my github cookie and just place it in my server, so the server can access github as if I was logged in permanently. Obviously, OAuth would do the task, but there are other reasons involved for not using OAuth.
 
"but there are other reasons involved for not using OAuth"
being?
 
Anonymous
Site I am trying to access does not use OAuth.
 
Just act like a normal user using a http client if the service doesn't support other ways of accessing content
 
@tereško I have sent that link for mi friend, He downloaded it. But I should go next to him and give him a external-hard and he copies for me, why?
 
Anonymous
4:46 PM
This could have been easier somehow if I used the linux GUI tools, but from command line only, it's a bit tricky. I don't know if I could copy the Windows cookie and use it in Linux. I could send it to the site I want to access via cURL headers .. and such.
 
Anonymous
Anyways, worth trying :/
 
No it is not
Sharing cookies is a crap solution
Log in using curl and store the dedicated cookie
Also a crap solution but waaay better than sharing between machines
 
May the code complete me, as I complete it
4
 
Anonymous
Yeah, but that requires writing more cURL code. As long as the cookie does not contain the user agent details my solution would work faster.
 
@RonniSkansing Confucius
 
4:50 PM
lol =)
 
user1804599
Code Complete
 
Anonymous
I find the name Confucius always confusing :)
 
@tereško I want vote inserts if Votes.post_id is exist in the Posts.id
 
Anonymous
Ok, I have to ask. Does anybody know any person living in Switzerland who can give me a job?
8
 
5:04 PM
@Sajad that would be ensured by foreign key
if foreign key constraint is violate, PDO would throw an appropriate exception
 
5:15 PM
@tereško can you please explain me more a bit about this comment ?
 
it shouldnt require any addition explanation
 
ok :-)
 
Anonymous
@tereško What do you think about this question? chat.stackoverflow.com/transcript/message/25823479#25823479
 
So, who's going to put another - vote to my answer? stackoverflow.com/questions/32682005/sql-logical-error
 
@JosipIvic your answer is wrong
have a nice -1
 
Anonymous
5:19 PM
lol
 
Anonymous
@JosipIvic damn you, Y U not let me downvote you?
 
Anonymous
answer 404
 
also the question is actually missing
 
@tereško ah I got it now. I can not use foreign key, because gist.github.com/sajadshafizadeh/9de2ce034aa54b134561
 
5:22 PM
you keep saying that you cannot use foreign keys and really want to use triggers .. so ... I don't really care
if you dont want to use the way I recommend, there is nothing I can do about it
also, @Sajad, pleass tell me that you are not making a new table for each post
 
@tereško My point is not about TRIGGER, I can not use foreign key because I have not just one Posts table
 
@tereško I have a separated table for each Posts table. because I have several structure
 
wut
@JosipIvic no
if you continue to beg for votes here, it will end really really bad for you
 
I know, just asking because I need to go out.
removed
:*
 
5:29 PM
@JosipIvic I strongly recommend going for quality not quantity.
 
really really strongly
 
and not begging. here or anywhere.
 
my bad. I'm not going for quantity, don't give me a hard time here.
 
Getting enough hydration is also sound advice.
 
also floss regularly
 
5:32 PM
@Danack if you mean "beer", then it really doesnt count as hydration
 
@JosipIvic you're trying to deceive either us or yourself. For example.
 
np, tnx for down votes.
 
@JosipIvic you actually could focus on getting some active bounties
 
I got mine first one the other day! :)
 
Any examples of a function that calculates wait period for API limits?
 
5:36 PM
those, even if bounty is not awarded to you, generate a lot votes .. and they tend to be actually interesting
also, bounties are not limited by 200-point cap
 
srsly?
 
yes
 
Well, I'm user for a few week now. Still catching up some stuff.
 
we have a long-standing issue with low quality question and answers in
and most of the regulars are quite fed up with that bullshit
 
4,871 results for almost the same problem? srsly?
 
5:41 PM
@tereško this question is really fucky question, sometimes I have this problem, when I use redirect
it bother me all the time!!
 
@JosipIvic welcome to
 
@Sajad it actually isn't. It just means that you were sending some content before sending the intended headers
 
greeting guys
 
@tereško no, I never don't send anything before sending anything! I just want to redirect header("Location: www.example.com");
 
i'm in deep down some weird error
 
5:43 PM
going off, thanks for few starting advices about votes and about quality and about asking / delivering same question/answer.
 
here is the error message i'm encountering while testing it on online server
"PHP Warning: Cannot modify header information - headers already sent by (output started at /home/mdrccom/public_html/e-diary/password_recovery.php:109) in /home/mdrccom/public_html/e-diary/password_recovery.php on line 121"
 
@Sajad well .. "content" can be sent unintentionally
 
and while in localhost this mssg doesn't appear
 
for example a warning message could be considered a content
 
i mean error
 
5:44 PM
and so can be a space before <?php at the top of the file
 
@tereško oh really?! a warning message is a content?! ow!!
@tereško no no, I checked it already
maybe my problem is a warning message
what is this? no-op
 
Anonymous
@PeeHaa Can you pin my request for job hunt to the right of this room?
 
Anonymous
I want to see if someone has anything for me.
 
ok i didn't know what output was being sent before the header("")
but i eventually came to resolve this by using javascript
print'
		<script>
			window.location.assign("password/recovery.php");
		</script>';
dunno if it's good to use or not instead of header() , but it did solve my problem
 
6:11 PM
@kelunik Well, they can be written to exactly once, isn't it that?
 
Well, at least in Java they have to be initialized after the constructor is run and can't be changed after that, so they're read-only, yes.
 
@kelunik But actually much more useful would be when they were readonly externally and writable with private scope, no?
 
Depends. Often enough immutable states are good enough there.
 
6:29 PM
I am intrigued as to what the rules are:
 
Hi Guys I have a domain on my server that keeps redirecting itself to http when i type in https. There is nothing in the .htaccess file that should be doing this. When I add a redirect from http to https in i get a redirect loop. Anyone know how to narrow down my search fro the cause?
 
which is better option for redirecting ?
header in php or window.location in js
 
header in php
 
@Danack just enter the opposite team field and crossing the line and touch any of the opponent without being caught :)
 
posted on September 20, 2015 by ralt

ralt/hermes 1.1

 
6:37 PM
but it gives error most often @StephenWolfe
that output has already been sent
while i don't see anything being sent before it
 
u need to send it before anything else
 
the header function
 
no html should be sent
it should be the very first thing to run
 
i just used </head></html>
before it
 
before that
the logic should run
then it should load the page
 
6:39 PM
i need to include something in head tag from my library
 
844
Q: How to fix "Headers already sent" error in PHP

Moses89When running my script, I am getting several errors like this: Warning: Cannot modify header information - headers already sent by (output started at /some/file.php:12) in /some/file.php on line 23 The lines mentioned in the error messages contain header() and setcookie() calls. What could...

 
1
Q: PHP - Redirect Before HTML Page Load

JSP64I have basic PHP code at the top of my Home page to redirect the user to a login page if the user is not logged in. Before the user successfully redirects, the HTML loads and JavaScript makes some AJAX requests for user information. While no sensitive information is at risk, it is a waste of se...

 
so that's why using <html><head>....</head></html>
 
Just do it before you render the page
 
can i use die along with header
in case header is failed to be send then location in die would be accessed?
 
6:46 PM
Read above
 
7:13 PM
@Leigh "1337"... is that a real phone number?
 
o/
 
posted on September 20, 2015 by krakjoe

Fix #489 (WIN64 bug)

 
It has a syntax error, anybody know what is that?
IF EXISTS (SELECT MAX(id) FROM table > 1)
BEGIN
    INSERT INTO votes(value) value(1)
END
 
value(1) -> values (1)
?
 
the error changed, but still there is an error
 
7:31 PM
this is old, but amusing, I can't remember how I got here ... github.com/travis-ci/travis-ci/issues/925
travis-ci.org has decided to follow the Mega.com paradigm
nutter ...
 
@ScottArciszewski he's trying to implement foreign keys by not using foreign keys
.. again
 
this code has this error: #1062 - Duplicate entry '0-0-0' for key 2
INSERT INTO votes(value)
    SELECT 1
        FROM table
        WHERE 0 < 1 < (SELECT MAX(id) FROM table)
there is any solution for solving that?
 
@Feeds 5 hrs turnaround time on win64 related flaw? that's impressive work!
 
@hakre did you actually make it? Or are just sightseeing ?
 
@Sajad what would be a solution in your eyes? the error looks correct, so it is the solution in my eyes.
@tereško just followed the issue report top down. - so issue-stalking :)
 
I was talking about the tomato soup
 
8:06 PM
@tereško ah that one. great taste. I had the pleasure to eat the Caramelised onions, chillli toasts and goat’s curd and basil oil one of the three.
Just wanted to pass along the recipes in case there are other soup lovers here (which I think you are).
 
I will add it to "must try" list, especially since there still are fresh tomatos in the farmer's markets
 
8:19 PM
I guess we have the local ones here for some more weeks, but not so many.
 
@hakre problem solved! thanks
 
8:36 PM
oh god why is this so bloody contentious
 
You appear to be assuming that Lester is sane
 
@Andrea just ignore this thing, it's worse than what we had in sth thread
 
@nikita2206 it's a bikeshed
 
@Andrea it's a honeypot ^^
 
php internals loves a good bikeshed
 
8:46 PM
It doesn't. Just a few people…
 
no, the mailing list loves them
internals is plagued by it
 
sky is blue, cloud is white , and rocket science is confusing...
 
@Andrea ¯\_(ツ)_/¯
 

« first day (1800 days earlier)      last day (3151 days later) »