« first day (976 days earlier)      last day (3972 days later) » 

12:01 AM
@ircmaxelldo do you think database normalization is good at any cost? I am on a project and I get query with like 9 left join. Everything I have read about mysql say "keey things separately" but I feel like 9 joints... it make long query. Maybe it's normal and I am just not used to it. I never have stuff that big
but I am experiencing problem I never had before, it's challenging :)
 
@Happyninja Well, I think that depends on the domain and what you're doing. If you are concerned about the actual length of the query string and the ability to read it then I would say keep it normalized. If you're concerned about performance that's something else entirely.
Whether or not 9 JOINs on a query is "normal", I'm not sure. But I personally work in a system where complex queries commonly have 9+ JOINs in them.
Of course that system isn't one you would want to emulate or use as a "normal baseline" :P
 
@cspray I am concerned about the ability to read it. I am used to comment my query and now I feed like I can't
 
@Happyninja Then I would say this is problem should be solved with proper formatting for maximum readability and the appropriate comments. I absolutely would not denormalize a database to make queries easier to read
I was in a similar boat about 2~ years ago. I had never seen any queries that complex before
But as you read them and work with them more often you'll find it is easier to figure out what they're doing.
 
@cspray okay, thanks you :)
 
One of the things that I've found makes queries easier to read is to use heredoc
YMMV :P
 
m59
12:18 AM
I don't have a question so much as I would like to talk something out with someone.. I'm working on my content manager and really want to let javascript handle most of the output through angularjs (doesn't matter if you don't know what that is). I really love everything about this approach, but it ruins SEO, since crawlers won't see any content (js is retrieving it all).
The only thing I can see that can be done is to install a special browser on the server that can get the js output and cache it for the crawlers to use, but that won't work on shared servers, I think.
 
Hello
I have some issues with simplexml_load_file() function
 
@m59 Most of the time what I've seen is people will make a static copy of the site with no JS for SEO purposes
Ultimately I don't think there's any easy solution for this
 
m59
do you think the crawlers will start considering js eventually??
it's so stupid that they don't.
it seems pretty easy for it to wait on the ajax calls to finish and then get that html
 
Well, the crawler can't be sure how JS impacts site content in that way
 
m59
sure it can.
 
m59
Once everything is actually loaded, then you get the html
rather than looking at the source only
 
What if that content is dependent on user interaction or some other JS event that doesn't ever get invoked by the crawler?
 
m59
That's another issue, but nowhere near as of importance, imo
If the content isn't initially there at all, it must not be that important.
I'm referring to content that is there as soon as anything is there....the exact same scenario as if php had output it.
 
Well, Google tells you how to setup to allow their crawler to be AJAX aware
 
m59
Hmm..
 
12:28 AM
See link I posted
Also, if it is the exact same scenario as PHP had output it why wouldn't you just have PHP output it?
 
m59
Oh, right, but like I said, that needs something I can't really use. I know the suggested solution.
Using php to do it causes a mountain of issues.
That's why I'm building a cms to begin with lol.
The templating system is so much more clean if js does it.
 
@m59 How? PHP has pretty powerful templating capabilities
 
m59
angularjs
I don't even need page reloads.
 
I don't understand how angularjs means templating in PHP is a mountain of issues?
 
m59
Not that php is the issue, but that I like the angular approach.
Just thinking RESTFUL and all...
I feel like server side should just give me information
and let JS handle view since it can manipulate the dom
and that means that the server has less to send
so faster load
 
12:37 AM
I have 1 gold... yeah.
 
All this may be true but if you want SEO you have more work ahead of you this route. And really beyond using Google's suggested solution I don't know anything else you can do
Other than having a static version of the site that doesn't use JS that SEO can use
Which is also a usability win
But I don't know your use case
 
m59
Well, maybe it would be worth going for a php templating system...
 
m59
1:00 AM
thanks @cspray
 
@m59 No problem
 
1:14 AM
`INSERT INTO table1 (x,y) VALUES ('x1','y1'),('x2','y2')`
i want mysqli_insert_id() to return all the inserted id
Is that possible?
 
@ChrisPappas , did your read documentation about it?
 
@sectus yeap
but i didn't find something
i know this is possible because phpmyadmin show all the inserted id's
well, i think inserted id's would be a sequence of int
If i know only the last one
I know all of them
!!
 
@ChrisPappas , it's not true...
@ChrisPappas , but i am not sure. You must explore about autoincrement id.
 
m59
@cspray what are the best template frameworks for php?
 
1:30 AM
@m59 I personally don't use a templating framework
 
m59
oh
 
PHP has plenty of templating functionality and features without the need for an extra layer over templates imo
Twig is one I hear being popular though
 
m59
ah yeah, I guess I could make my own pretty quickly.
<div position="feature" ng-repeat="feature in featured">
  <div class="featurette">
    <img class="featurette-image pull-right" ng-src="{{feature.imgSrc}}">
    <h2 class="featurette-heading">{{feature.heading}}<span class="muted">{{feature.headingMuted}}</span></h2>
    <p class="lead">{{feature.content}}</p>
  </div>
</div>
 
m59
That's what angular looks like.
 
1:30 AM
Yea
Handlebars basically right?
 
m59
yep.
 
@ChrisPappas , what version of PMA do you use?
 
@sectus Version information: 3.5.7, latest stable version: 4.0.4
but i am not sure, that what i was said about pma was true
:P
Can they fixed it?
It's very bad this bug
 
@ChrisPappas , some documentation This means that the value returned by the LAST_INSERT_ID() to a given client is the first AUTO_INCREMENT value generated for most recent statement affecting an AUTO_INCREMENT column by that client.
But PMA do this $insert_id + $num_rows - 1
It's mean that they just adding number of affected rows to LAST_INSERT_ID
@ChrisPappas , it's not a bug.
you can turn off foreign key checks before truncate
 
1:46 AM
Quick OT question: When we fill a circle, what's that shape then called?
 
yeap, i just see that
 
So if a circle is only the line around the edge, what is the thing called that is not just the line but the area within the line as well?
 
@ŠimeVidas , russian has two different words for this... but google translate gives equal translation of those.
 
@sectus Yes croatian too: krug i kruznica
 
@sectus $insert_id + $num_rows - 1 is the auto_increment variable?
Or the id of the last inserted record?
 
1:48 AM
@ŠimeVidas , yes.
 
Damn
How do english people differentiate between those two...
 
@ChrisPappas , only for last record. But i am not sure about that it will be always truly value.
@ŠimeVidas , how many colors do you have in rainbow?
 
@sectus Infinite?
16.7 million?
 
@ŠimeVidas , russians has 7 common colors.
 
Well it's not like this is standardized in Croatia :)
zuta, narancasta, crvena, zelena, plava, ljubicasta, smedja, crna
 
1:53 AM
@ŠimeVidas , where did you seen black color in rainbow?
 
Haha
I was just reciting the common color names
 
@ŠimeVidas If you really need to differentiate the two, you can say 'circle' vs 'filled circle'.
 
Oh, they has it
In geometry, a disk (also spelled disc) is the region in a plane bounded by a circle. A disk is said to be closed or open according to whether or not it contains the circle that constitutes its boundary. In Cartesian coordinates, the open disk of center (a, b) and radius R is given by the formula :D=\{(x, y)\in {\mathbb R^2}: (x-a)^2+(y-b)^2 while the closed disk of the same center and radius is given by :\overline{ D }=\{(x, y)\in {\mathbb R^2}: (x-a)^2+(y-b)^2 \le R^2\}. The area of a closed or open disk of radius R is πR2 (see π). The ball is the disk generalised to metric spac...
 
@Danack Shouldn't the filled circle be called circle, and the other one a "circle outline"...?
Ah of course...
A closed disk is the correct term.
But then again, how many people think of a filled circle when you say disk -.-
 
@ŠimeVidas nah - circle is just the outline. 'Filled' works for any shape e.g. filled square, filled ellipse.
"how many people think of a filled circle when you say disk -.-" Only the mathematics department.
 
1:58 AM
Well I assume everyone who's had a good math education...
So most of us computer folks
 
0
Q: Accessing Object with Key as Number PHP

SSH ThisI have an object that looks like this: stdClass Object ( [page] => stdClass Object ( [1] => stdClass Object ( [element] => stdClass Object ( [background_color] => stdClass Object ... ...

Can someone help me close this as dupe of stackoverflow.com/questions/10333016/…
I've wasted my cv on the wrong dupe =(
@ŠimeVidas fwiw, if you told me disk (disc) I would point at a CD or hard drive ;-)
 
2:13 AM
@Jack Done.
 
@Nile Much obliged~
 
Ya know what's a royal pain in the ass? Debugging code running in a separate process
 
With gdb? :)
 
@Jack I don't have much experience with gdb. I'm using my IDE's internal debugger.
 
So how does it become a separate process? forking?
 
2:29 AM
While running a PHPUnit test in a separate process
A new PHP process is created
 
Ahh
 
But if the test case fails, you can just isolate it, no?
 
The script just ends abruptly with no output
But on that line
@Jack The test case is not failing
 
What badge... i can get easy?
 
2:30 AM
When calling stream_get_contents the script just crashes
 
@Jack you deal much with saving settings with NSUserDefaults on iphones?
 
@cspray Then isolate that and run it with ... gdb =D
I truly suck at debugging in Windows
 
@Jack Yes, I'm starting to see I'll have to figure that out
Blech, I don't use Windows :P
At least not at home
 
@sectus civic duty maybe?
 
@Jack , sure, why not... i have already half of it.
 
2:44 AM
Disciplined is too bronze for me :)
 
@Jack not all of use are geniuses rich with gold badges =oP
 
You don't have to be a genius to get one ... take the unsung hero for instance.
@sectus You need to convince OP's of 20 questions to only accept your answer, don't upvote :)
 
for 55k he has only 9 badges .. thats quite low
 
who~nvm I see :D
 
@tereško The list is short but distinguished :)
 
2:50 AM
I'm on my way to getting my bronze CodeIgniter badge =o( *ashamed*
 
hahah codeigniter hahahah, congrats :D
 
@Jack , i'll keep it in mind
 
I've got 17 upvotes on CI ... how did that happen?
I'm trying to get gold before gold, but it's really hard lol
 
i have over 30 in C#
 
Were those questions also tagged with ? :)
 
2:54 AM
@Jack have you tried joining Anonymous Repwhores ?
3
@Jack probably
 
@tereško Why would I need to try? :)
 
@tereško , where to sign?
 
@sectus You'd have to ask Kolink, he's the only one who knows the secret hand shake
 
I think my temp dumbness has costed me some easy java reps last night
even though I am trying to get more C++ reps
but there aren't many C++ questions
 
I lost my 90+ day streak recently
 
2:57 AM
@Telkitty猫咪咪 , create your own questions :^ )
 
i have a 400+ day "streak" ... which makes me sad
 
@tereško You really need that holiday.
 
@sectus according to the mass repwhores, elite are the ones with a lot of elite answers and no questions :p
 
i guess it starts today
 
@Telkitty猫咪咪 , ask questions and answer them... Are you need to get rep or to be elite?
 
3:00 AM
200+ rep is enough to use most 'features'
 
neither ... lol, I think time is best spent on writing innovative, popular apps, but that's just my limited personal opinion :)
 
Need two more upvotes in , four more in and then nine more in either asp.net or objective-c haha
Darn Generalist.
 
@Telkitty猫咪咪 well .. vote to questions ratio can be used as marker for making an estimate .. for example Maxell's ratio is over 50
 
s/Need/Want/
 
@tereško yes, that & acceptance ratio, and votes ...
 
3:10 AM
Hello all. I'm running into an issue altering a PHP dynamically Cascading Style Sheet. I'm attempting to alter a WordPress plugin (GD Star Rating) in order to remove the thumbs down for voting purposes. Any ideas?
0
Q: GD Star Rating plug-in: Altering Dynamic Cascading Style Sheet

panoramicI’m in the midst of creating a page that allows users to vote for one of two competing images. I’ve used the GD Star Rating plug-in for WordPress in the past, but am struggling with altering the output in accordance to my specifications. Ideally I would like to eliminate the thumbs down option,...

 
sounds like you are looking for a quick workaround for a stupid idea
 
That would ideal, but why is it a stupid idea?
 
CSS should be static. That way it can be cached.
 
@tereško What do you mean by votes to questions ratio?
 
@panoramic commenting "echo sprintf(".gdt-size-%s.gdthumb.gddw" lines didn't work?
 
3:13 AM
Instead of altering CSS you should be just adding or removing classes to HTML tags
@Jack look at how many votes you have .. divide it by how many answers + half of your questions that you have posted
 
@tereško it's WP... he just needs a solution, not rewriting the entire thing, good pointers though
 
@kaᵠ Nope. Once I commented out the lines that specifically referenced gdthumb.gddw, the thumbs up disappeared as well.
@tereško I'll have to look into that since the jerry-rigged solution has been unsuccessful.
 
@panoramic post the generated css in your question along with a snippet of related (generated) html
 
@tereško How many votes I have? Where am I looking, the tags section?
 
s/votes/reputation
 
3:18 AM
Ah, but rep also contains bounties of course :)
 
so what ?
you earned bounties for answers
 
@Jack your ratio would be 22.778
 
Kolink has 19, IrcMaxell has 50
 
and @tereško has 30.546
 
I'm pretty bad at housekeeping =/
Otherwise the ratio would be 28 :)
 
3:26 AM
a ratio of 10 would be textbook rephorse
y 28?
 
55375 / (2424 - 481)
I have 481 zero score answers that weren't accepted.
But I can only delete 5 each day, so it's taking forever.
 
don't delete if they are useful
 
It would take me almost 100 days =S
 
maybe promote
 
I've tried, trust me.
 
3:28 AM
improve?
 
i have like 5 answers that i tend to "promote" .. it's more like "i have no patience to explain this AGAIN ... just read this .. maybe something rubs off on you"
 
@kaᵠ Added the HTML and generated CSS
 
also , i am overusing "like" and "this"
 
great @panoramic
 
The promoting answers for me are DOMDocument, PDO and using string functions instead of regular expressions, amongst others :)
 
user652649
3:57 AM
morning
 
4:25 AM
morning
 
-1
Q: Update mysql table based on another

David542I have a scenario where a lot of information in one column was deleted. Here's what I'm doing to restore: In a backup (which has the column information), import that as a new table. Then, update the original table with the new column information where it is currently null. How would I do the fo...

Sure, why not ask people you don't know whether a query will mess up or not.
1
A: Validating if file was uploaded via PHP's HTTP POST

KolinkIf you're already using move_uploaded_file, you don't need to check is_uploaded_file is_uploaded_file can be useful for example if you're uploading an image that will then be processed and returned to the user, without actually being saved anywhere permanant on the server, for example.

Doh! Captain Obvious to the rescue ^^
 
4:40 AM
Strange, shouldn't that question have hit the "first post" queue first?
 
@Jack Yeah , should be. This question got closed within 1.5 minute :)
 
@YogeshSuthar I believe instead of code review site review is more appropriate for this :P — swapnesh 34 secs ago
lol
 
hahaha
 
formatting my phone for 25th time this week
 
@Mr.Alien Android phones are shit. Buy Iphone5 :P
 
4:47 AM
Use XFS, it's cool :)
@YogeshSuthar haha
 
@YogeshSuthar Nah, I am kinda obsessed with cleanliness... 1 game fails and I format my phone :p I don't uninstall it
 
@YogeshSuthar i dont want to site review i need help for css validator if you dont want to give solution please dont waste time. and sorry for this.. i have a employes and my works on css so i want to clear this error. — savan 1 min ago
 
Please dun waste time @YogeshSuthar
So basically he has inline scripts that are causing almost all the errors? lol
 
@Jack hahaha. Actually I haven't written any comment after the 1st one.
 
Yeah .. and I'm not sure how the fact that he has an employee makes any point.
In fact, if you have an employee, you can make them do it =D
 
4:51 AM
Any idea why a javascript function name that is generated dynamically by PHP would not be treated/trigger as a proper javascript function?
 
@Mr.Alien That's why buy either buy iphone OR any basic phone of Nokia :P
 
@Swodahs What's the name of the function?
 
the PHP would be: <?=$prodadd?>()
 
@YogeshSuthar I still have a Sony walkman phone .. still works, and battery life is awesome in today's standards.
@Swodahs Hey I know you, you've asked that before
 
but when i look at source code it reads 1prodadd()
 
4:54 AM
And I told you to prefix it with something right?
 
I asked it about 20 minutes ago, just no resolution
 
$1prodadd will work.
 
LOL nah, I am happy with android
 
1
A: PHP in a javascript function name

JackI would suggest to prefix your script generated function names with a dollar sign or underscore; these characters may be used anywhere inside an identifier (including the start). The older ECMAScript definition stated that they were reserved for machine generated variable names, but that stateme...

That should work just fine.
 
@Jack Sony fails when it comes to their default shell and they also fail when their pixels die
 
4:55 AM
@Mr.Alien Shell? What shell?
 
@Jack give me a min to look that over. thanks
 
@Mr.Alien Pixels? What Pixels?
 
@jack I apologize, I guess I wasn't scrolling down far enough in my post and never saw your answer. my apologize
 
@Swodahs Before you reach the answers, on the left side it will say how many answers are posted.
 
@Jack Shell - OS android, the system is diff than samsung, also they don't have a inbuild task manager, also I've seen, screen pixels die - more than 50% of sony phones
 
4:57 AM
@Mr.Alien I'm afraid you don't know what phone I speak of
 
@Jack yeah, but at 12:30 to 1 am the brain ain't always catching the obvious
 
@Jack the pixel thing is common with all phones but yes, walmans always rock ;)
 
@Jack Old phones was working properly and last long for many years. But now-a days smartphones made by cheap manufacturers are not even last long for even a year.
 
iPhone isn't cheap ;-)
 
4:59 AM
I liked the model where it used to rotate and open, I guess 270i, it was bad cuz it had just 256mb of internal memory and didn't had support for memory card too
@Jack @YogeshSuthar Actually apples are not worth the money
 
@Mr.Alien Which phone you are using?
 
@Mr.Alien Worth it so far.
 
@YogeshSuthar Tab 2
 
@Mr.Alien Samsung is the worst mobile manufacturer company.
 
I've been playing with the GPro ... it's not bad, but the interface truly sucks!
 
5:01 AM
@Jack I can buy a quality laptop in that price which can do double work that iphone does, obv we cant compare a phone and a laptop but again, apple is not worth it
@YogeshSuthar Doesn't matter, tab 2 is superb, 17K is not that big compared to 40K iphone
 
@Mr.Alien I can't really get a quality laptop for $600 here :)
 
which almost does the same job
@Jack We do get here ;)
 
Damn you =p
 
LOL
 
iphonez don't do work :lol: they mostly are shown off and full of crappy apps
 
5:03 AM
@Jack well I changed the code around that generates the function name so now the served result is: prodadd1() - however, it still will not trigger the script. - But again, if I manually hard code the exact same thing it works. - Something in PHP generating that function name and the onclick event is stoppping it.
 
@Jack Awesome place to buy computer stuff here
@kaᵠ <- Sensible
 
@Mr.Alien We can't buy Core i5 laptop in 33K.
here
 
@YogeshSuthar I can bring you i7 in that rate
 
@Mr.Alien But it will be assembled and don't have actual bill.
 
anyone who has worked with mongo db with c# here?
0
Q: Getting InvalidOperationException Exception from c# mongodb driver for queries that return large dataset

jaminatorI have a restful service in c#.net that talks to mongodb. When I return about 20,000 records to client the service works fine. But increasing the returned data set causes below exception on server side: System.InvalidOperationException: Server instance xxx.xxx.xxx is no longer connected. ...

 
5:05 AM
@YogeshSuthar Laptop, not a computer ;) I've never seen an assembled laptop
@jaminator Wrong place, de route..
 
@Mr.Alien In India we can do anything. :)
 
@YogeshSuthar LOL that's a different thing ;) and btw without bill will cost you more chaeper
 
@Mr.Alien So can you bring i7 in 35K with original company bill?
Because I want to buy laptop.
 
@YogeshSuthar Laminton zindabad
 
lol 33k /^ 35k
 
5:09 AM
@kaᵠ My budget is 35K. :)
 
@YogeshSuthar Here you go, 1st monster under 35K
 
@Mr.Alien But the laptop should be of from Sony,Acer,Asus,Toshiba.
 
Acer, toshiba are cheapest... take a look at flipkart.. you can assume 2K down from the price quoted there
 
@Mr.Alien It's awesome but not in Core i3-5-7 range. :(
 
5:12 AM
@YogeshSuthar that is a beast
 
@Mr.Alien Yeah but I don't want to buy HP, DELL, Compaq, Lenovo laptops.
 
@YogeshSuthar Any specific reason?
 
@Mr.Alien Their batteries not working properly after 1 year, I have so many friends complaining about them.
 
@YogeshSuthar Don't expect too much from laptops, any laptop, whether you buy a cheap 20K laptop or 80K mac... its same everywhere, you need to replace battery in a year
 
how much is that in USD?
 
5:17 AM
@Mr.Alien No, for Sony and Acer we don't have to.
@kaᵠ 55Rs = 1$
 
@kaᵠ The HP one? as of current rate it's around 600-625 USD
@YogeshSuthar I've used 3 laptops, I've acer too, it is showing a message to replace the battery currently on the taskbar
 
@Mr.Alien When did you buy that means how much time ago?
 
@YogeshSuthar 1 n a half year..
 
So it's more than a year :)
 
@YogeshSuthar Again - Don't expect too much from laptops, any laptop, whether you buy a cheap 20K laptop or 80K mac... its same everywhere, you need to replace battery in a year
so in short whatever you buy, you've to replace battery after a year
 
5:23 AM
@Mr.Alien Anyways I will go lamington and inquire about as my need. Hey have you worked with Yii framework?
 
@YogeshSuthar Nope, and ya lamington is better, get a dos version, install the OS yourslf, wil save you 3K
 
@Mr.Alien So will I get Original company bill from them or not?
 
@YogeshSuthar why not, you've both options with you, also that's not a small market 4-5 stores, there are 100 stores to look out for
 
@Mr.Alien I went there around 6 years ago when I buyed my assembled Desktop.
 
@YogeshSuthar I visit there every 3-4 months to buy some or the other thing
 
5:30 AM
@Mr.Alien So you knows from which store we can get good things at cheap rate. :P
 
no definite, 1 store over there, is monarch I guess, it's not cheap but they sell quality, it;s about 7-10th shop after we cross the bridge
1st lane
@YogeshSuthar Oh yes, here you go
 

« first day (976 days earlier)      last day (3972 days later) »