« first day (1594 days earlier)      last day (3354 days later) » 

12:05 AM
I just wrote this in C… I'm not sure if that's horrible or brillant…
switch (...) {
        case ...:
        case ...:
            // code ...
    if (0) {
        case ...:
            // code ...
    }
        case ...:
        case ...:
            // code...
            break;

        default:
            // code...
}
 
anyone good with php who could private message me to help me with a sql query im trying to get working
 
@bwoebi pretty sure it's horrible
 
Yeah… horrible that this isn't possible in PHP :-D
 
@bwoebi And I just wanted to say that this is the one thing PHP did do right :P
 
Not sure who of us two was being sarcastic now :-P
@NikiC but it looked better than goto…
if it were PHP I'd now had to use goto :s
 
12:39 AM
wiki.php.net/rfc/array-to-string … Eih, why is a change for array-to-string proposed but not for object-to-string (in case __toString() is missing)
 
@bwoebi Because object to string is already a (catchable) fatal, whereas array to string isn't.
 
@Charles it isn't?
 
It emits an E_NOTICE and returns the string 'Array'
 
emits E_NOTICE and returns the string "Object"
 
@bwoebi How do you actually trigger that code path though?
 
12:48 AM
@Charles convert_to_string() is a generic function for string conversions in PHP
sec
 
class Bar {} echo new Bar => "Catchable fatal error: Object of class Bar could not be converted to string"
 
Yeah, you just can trigger that with certain internal classes
 
Makes me wonder if that's a bug or intentional.
 
no, idea… but without pecl exts you won't be able to trigger that
in php-src all object handlers first copy from std_object_handlers…
 
1:33 AM
@bwoebi you mean you don't put your default: clauses at the top? Madness!
 
lulz…
 
Spent 2 hours writing one paragraph for my CV, and it's still not right. I better get this damn job, after all this effort!
Right, I'm off, stay classy room 11
 
2:20 AM
Hey guys, I got a question about php. I'm trying to paginate and it's working though right now the structure I want to be paginated, I'm putting the whole thing in a table in my database. I got something like this * <a href=""><div> ape</div> <div> <img src=""/> </div></a> * which reaches about 350-500 characters. Is this really the way to go about it? Isn't there a way to just make the content on my html page to magically be stored in my database without me actually having to manually
put it in there?
Welp, I'll check back in later, I'll keep loading my stuff into the database, if anybody knows whether this is the correct way to do it or not, please let me know. Thanks :)
 
@NewbieLearner Are you storing html in the database?
 
@NewbieLearner That's generally not good idea. What are you trying to paginate?
 
@Jack Oh, trying to paginate a site. basically a <a href> with few divs and 1 image in it
I've been trying to find some read on it, but haven't had much luck finding anything.
 
@NewbieLearner So kinda link a single page application? Are you using ajax?
*like
 
2:31 AM
@Jack well the index will be the site I'll paginate, the rest of the website will be in simple html. Not sure that answers the question :/ and no, not using ajax
basically a site with a few thousand href images that redirect to relevant subdirectories
 
@NewbieLearner Can I see your sql query?
 
@Jack yeah, is that the pagination code?
Got if from some post in Stackoverflow. It's in jsfiddle jsfiddle.net/86o1kope
 
@NewbieLearner Just having a look now
 
Ok thx, I'm a total newbie when it comes to it coding :(
 
@NewbieLearner No worries, we all have to start somewhere
 
2:47 AM
true :)
 
anyone have any idea why laravel is taking too much booting time (>4s) ?
 
is debug turned off?
 
noop its turned on
i am seeing this in laravel browser debug bar
 
3:03 AM
try running php artisan optimize
 
3:22 AM
@NewbieLearner I would definitely recommend using PDO over mysql_connect. php.net/manual/en/pdo.connections.php
 
+1 for pdo
 
thats what you get after php artisan optimize ?
 
yupp its after php artisan optimize
 
@Jack , Thanks I'll try to switch over to that :)
 
3:25 AM
do u have xdebug on?
(just going to throw random questions, see if it can help)
and also try php artisan optimize --force real quick just in case
 
@RobMullins its off
 
15
Q: What do I do when I feel a person has been rude over multiple questions?

BonoI've seen this person (I'm not sure if I should be pointing fingers here so I'll keep his identity "unknown" for now) be rude (or what I would consider rude anyway) over multiple comments. He sometimes provides comments that try not to help a user, but basically point out that "the other person d...

4
lol
 
now its 1.87s ... i have just stop downloading :/
 
teresko love
 
@BenjaminGruenbaum lol
 
3:37 AM
@NewbieLearner Your headed in the right direction anyway. Will let you know if I figure it out
 
@Jack btw mysqli is also quite good
 
@Jack baby steps in the right direction :) and no worries about it, as long as it will work and doesn't break in the future then it's all good :D.
 
@NullPoiиteя True that
 
4:15 AM
@NewbieLearner You have an extra closing div on this line: ``
$outputList .= '<div>' . $firstname . '</div><div>' . $country . ' <div></div>';``
That could be causing some weirdness
And this line <div><?php print "$outputList"; ?></div> Should be more like <div><?php echo $outputList; ?></div>
Theres no need to wrap $outputList in quotes
 
4:31 AM
@BenjaminGruenbaum was it teresko?
 
@crypticツ yes read the whole thing there is a link to his profile lol
 
haha, I didn't even need to read it. I saw the MVC tag and knew at once.
 
To be fair - those people were being idiots.
 
Our client requirement is like to disable options like Save as & print options in browser. We figured it out for print. Is it really possible to disable save as?
 
4:48 AM
@YuvaRaj Why would you do that?
I would hope that there's nothing you can do to disable 'Save As...' functionality
Stop trying to break the user's browser is the real solution
 
They don't need this option in order to avoid their employees not to saves the data. So, we can do tweak only in browser not via php?
 
So the data is being viewed in the browser?
But you want to prevent them from saving on to the computer the same information they're looking at in the browser...
Just... think about that for a minute. Not only is what you're wanting to do just bad for usability but it is also completely futile. If the employee can SEE the data on their computer they already have it saved there.
They can always copy/paste, screenshot the browser, just take the raw HTML if they want to
 
yes it being viewed by browser...just they want to is to disable right click, save as, print options. Through JS and CSS Media query, we figured it to disable print and right click. Now, save as is problem.
so, it can't be done in php?
 
...
I'm saying it shouldn't be done at all
 
Alright!
 
5:55 AM
@ircmaxell speaking of which. shouldn't the destructor be called in this case? eval.in/293582
i mean even if the construction failed, the constructor was still called anyway, the same should be for the destructor. in my example a file pointer is left open because the destructor isn't called
 
6:18 AM
hello
 
zan
Good Morning buddies
how is your boyeebird
 
6:32 AM
@zan mornign
 
zan
hi
@NullPoiиteя so did you have all this " google SOLID, buy GOF, buy POEAA, buy Clean Code, learn Refactoring, lookup GRASP, DDD, CQRS, DCI "
your profile is good, thanks for pointing
 
@YuvaRaj There's no point. They can just disable JS in any case.
 
@zan you are welcome ... (: thank Gorden and Ircmaxell
 
@BenjaminGruenbaum I loled at this:
your description of the rude person reminds of me of everyone who is active under the c and c++ tags. — Sam I am 12 hours ago
good morning btw
 
Guys, any ideas what apt-get source is licensed under?
GPL
 
6:52 AM
@zerkms Yes, GPL
 
7:02 AM
good mornings
 
mornings
 
Does anyone know then if I have to license my code under GPL if I make a direct translation of a GPL v2 C++ into JS opensource code? programmers.stackexchange.com/q/274520/18348
 
good morning
 
@hakre very good morning
 
7:17 AM
@zerkms you're doing a translation of a copyrighted work. GPL grants you the rights for this as long as you license the translation (which is normally a derivative work) as well under GPL. Just keep the license.
 
okay. I also though that I will translate it, cover with tests and reimplement from scratch
then it will be possible to relicense
 
It's still a translation. And not a re-implementation in the sense that you create an independent new work.
you would need to do a clean-room implementation which is already flawed as you admitted to know the original work.
 
morning
 
@hakre uhm, so I cannot do that after I ever looked at the code?
it sounds weird
 
I'm not your lawyer, but there's a reason why companies normally do that part strictly.
 
7:23 AM
hi all
 
hmmmm
 
And actually for what it's worth, are you doing this as an individual?
 
I've heard about cases when really big companies did that, but I thought it was some other tricky reason
Yep
 
Why the hassle?
 
I don't
I just want to be a "good person"
And not to say I "don't like" GPL v2 specifically, I just found that whole case curious
 
7:24 AM
Ask the original authors to change to GPL v2+.
 
if anyone here has already dealed with postGis extensions for postgresql, you may help please, i have troubles with some functions / data types... explanation here : chat.stackoverflow.com/rooms/71671/postgresql-postgis :)
 
You can then upgrade to GPL v3.
 
At least that is better
 
And less work for you. I would kindly ask them, a good reason is license compatibility.
 
I have already sent question to GNU :-D
god, opensource is hard
 
7:33 AM
posted on February 26, 2015 by kbironneau

/* by Gambi */

 
good mornig..
 
7:49 AM
What's a current best practice for hashing URLs for filename caching? sha1() fine? or rather up the bits even more using hash() ?
 
sha1 is fine
 
@mark what is the original task?
 
cache remote images
 
and why do you need to hash something?
 
I can't have a filename with an url in it? ;-)
 
7:53 AM
?
oh I see now
 
I'll go with sha1(), it oughta be fine.
 
May as well sha256.
 
Yeah thought soo. Yeah, will do that. Otherwise I'm feeling like I stumbled over "640k are enough" things
 
 
1 hour later…
8:56 AM
stackoverflow.com/a/2430234/4251625 this is bloody brilliant
2
 
Morning
 
9:10 AM
anybody pls help me on this stackoverflow.com/questions/28735427/…
 
9:30 AM
hello
is there anyone of u knw phpList?
 
posted on February 26, 2015 by kbironneau

/* by Domas */

 
10:22 AM
lolwut - Apparently Dmitry's solution now is for developers to write their own type-checker callback o_O
What could possibly go wrong!
 
ThW
Morning
@AllenJB :-(
 
Morning fine people of room 11
@FrontpageExpert lol
 
@PeeHaa , are able to perform some abuse work?
 
@PeeHaa good morning lord of room 11 :D
 
@sectus You are asking me to abuse something / someone? Shoot! :)
 
10:33 AM
@PeeHaa , kind of... Somebody downvoted rapidly my question.
 
@sectus I'm 99% sure it will be reverted tonoght
 
@sectus let mod know .. Boltclock is in html/css/room
 
Thanks.
 
@AllenJB it's an interesting idea, I hate the idea of a userland function doing it, what I wouldn't mind is either an internal API, so that an extension could implement a proper type system, or if it has to be user land thing, then need to compile a subset of AST to machine code so we don't keep calling into userland ...
 
@JoeWatkins How's the medieval flue coming along?
Why does this work for the without www, but not for the www?
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !\.(png|jpg|gif)$ [NC]
RewriteCond %{HTTP_HOST} ^domain1.nu$ [NC]
RewriteCond %{HTTP_HOST} ^www.domain1.nu$ [NC]
RewriteCond %{REQUEST_FILENAME} !redirect\.html$ [NC]
RewriteRule ^(.*)$ /redirect.html [R=301,L]
I suck at apache rewrites
 
10:44 AM
.... now somebody upvoted rapidly... ...
 
@PeeHaa still ruining me, now I got abscesses, face is all swollen, and feel like I been punched in my right eye ...
 
Nvm splitted into two rewrite blocks
@JoeWatkins Omg that sucks.
Pic? :P
 
didn't sleep for more than 45 minutes at a time last night ...
 
Gesus
So not working today?
 
10:45 AM
you can't really see it now, you could yesterday, it looks a little better today but feels much much worse ...
 
not really doing anything ...
 
Also is it contagious? As in will your kids have it too next week?
 
interestingly, you can carry the virus without symptoms, because the kids have probably had exposure before, their immune system can fight it off, but while fighting (and winning) it's still transferable, I don't have any immunity to it and so ruined ...
 
small pox?
 
10:50 AM
How can I "force" string keys in array that are numeric (ordered from 0 ... n)?
Basically $array[(string) 0] = $value;
 
@DejanMarjanovic $foo = ['1apples' => 'foo']; :P
But seriously there is not reason to need this imo :)
 
Trolololo
 
Why do you need them to be string?
 
Because by some magic, most of the are now, just want to quickly fix, failing on production.
Goes like... ['0' => , 1 => ...]
 
@DejanMarjanovic huh? Impossibru :P
 
10:54 AM
It's possibru.... by converting object into array.
 
 $array = 5 =>
    object()[271]
  '0' =>
    object()[255]

$input = string '0' (length=1)
Yes, probably that shit... @sectus
 
@sectus TIL
In that case I would do it the other way around @DejanMarjanovic
@DejanMarjanovic Do you really need those indices?
Or can you get away with array_values?
 
Need keys, they are "options" for USSD, will just fix the stuff to be int as good Lord said.
 
Also why the fuck do you have numbers as property names to begin with or am I missing something cc @sectus
 
@PeeHaa Because fuck you :D
 
10:57 AM
@DejanMarjanovic Amen
@DejanMarjanovic :P
 
@sectus Yeah. @DejanMarjanovic got what he deserves
:)
 
ThW
@PeeHaa RewriteCond %{HTTP_HOST} ^(www\.)?domain1\.nu$ [NC] <- second and third rule merged and not in conflict any more
 
Nobody deserves this...
 
@ThW Yeah for some reason I thought multiple lines already did an OR
 
ThW
11:04 AM
@PeeHaa :-)
 
@ThW ty
@sectus Clearly you don't know @DejanMarjanovic ;)
 
came to the conclusion i would prefer int => weak+coerced and int! => strict compared to dual mode.
 
is it a retarded idea to pay 250€ for a PSU ?
 
@tereško does it come with blackjack, and hookers ?
 
no, but it comes with 1200W (of which I need at least 1000W)
 
11:16 AM
that's a lot ...
what's that for ?
I have a 450w psu iirc
 
gaming pc, the idea is to expand the build to 2 video cards (which alone will eat 700W without overclocking)
 
I guess if it's needed
seems like a lot though ...
 
hence, the question
 
you get what you pay for, and you seem to plan to use nearly all of what you are getting ...
 
11:30 AM
@tereško no its not retarded
although 1200 is more than you'll need
 
by my rough calculations, I will need over 1000, when build is complete
 
yeah I don't believe that
SLI 980 under load are 550 watts
add another 300 for the rest of the system + overclocking
I'd get one of these: newegg.com/Product/…-17‌​-139-044--Product
 
@MarcelBurkhard I intend to have two of these: newegg.com/Product/Product.aspx?Item=N82E16814202129
 
I have AX760 and 770 SLI, works just fine (fan doesn't even need to spin)
oh yeah right
AMD is another story entirely
go for 1200 W :D
 
@tereško ETC for build?
 
11:38 AM
I'd only use SLI 290X when it's cold outside though... :D
 
Hi @MarcelBurkhard
 
hi @JavaFan
 
please could you possibly help me in xampp config
Is there is what is called CFG server
 
@Fabor week
I am getting the video card tomorrow
and then I need PSU, SSD and few Fans ... and a monitor
 
are you going to get a freesync monitor?
 
11:44 AM
@MarcelBurkhard I am actually looking at EVGA's 1200W psu
@MarcelBurkhard I want a 1440p screen and there are none with freesync
I probably will but a monitor and then in winter upgrade to freesync .. and give my mine to brother
 
I got one of these, dirt cheap, fast international shipping.. you'll pay some VAT though in my case 40$ amazon.com/Perfect-QNIX-Evolution-2560x1440-Monitor/dp/…
I overclocked mine to 105hz stable
 
do they have an ultra-wide version ?
 
and the colors are awesome compared to TN panels imo
nope
 
=/
 
11:46 AM
yeah, I would love to get one of those
but they cost an arm and a leg
 
check this out: teksyndicate.com/videos/… (I haven't read much on those though, no idea how they overclock.. )
 
oh ..
 
well nevermind its only 1080p
 
noticed 5 sec ago
buying this one would be reaaally expensive: pcmonitors.info/samsung/…
and it would only be 60Hz
 
I guess you want 3440x1440@96hz+ ?
 
11:50 AM
would be nice
not sure if really viable at this time
 
I think that exceeds the bandwidth of dual-dvi
 
the card has displayport 1.2
 
1.2a or 1.2?
 
simple 1.2
 
I think you'll need a card that is not out yet for 3440x1440 > 60hz
and tbh I don't think a 290X can push that many fps at 3440x1440
16:9 1080p -> 2073600 pixels
21:9 1440p -> 4953600 pixels
 
11:57 AM
hi i need a complete library of pdo for database implementation from where can i download it?
 
I don't like those so much
 
what ?
 
cuz It's like wrapping a nice piece of chocolate with a pile of shit
2
 

« first day (1594 days earlier)      last day (3354 days later) »