« first day (839 days earlier)      last day (4124 days later) » 

2:00 PM
Bye guys have a great weekend :)
 
user652649
bye bye @user1428728198219289128 :P
 
I feel like I've missed a good conversation
 
@wes hehe :P
 
@Smiley thanks, you too. and always remember Tomorrow is Saturday And Sunday comes afterwards
 
dont wish the weekend away @Gordon
:P
 
2:03 PM
wtf, who is doing that?
Very funny
 
in JavaScript, 15 hours ago, by tereško
stop staring ever damned line in chat
 
^^ star that
5
lol
 
user652649
lol
 
user652649
guess who
 
user652649
lol
 
2:05 PM
what's with the stars?
 
All The Stars!
 
Twinkle Twinkle?
 
user652649
stars... are many.
 
There's only one thing that needs to be starred, and we all know what that is
 
@wes who?
 
2:07 PM
I believe it appeared FOUR times on the rigt
 
user652649
lol
 
user652649
i starred daverandom only
 
How are starred choices ordered?
It's not by date, otherwise the top one wouldn't be at the top
And it's not by number of stars, otherwise the 9 cv-pls would be at the top
 
user652649
for some moments the list on the right was totally full of crap.. now star this!
 
@Jimbo I belive it is by time + star level + pin level
I could be wrong though
 
2:10 PM
@Jimbo the "hollow" stars are pinned stars. they get ranked higher than others
apart from that its pretty much by pin/star time i think
 
Posts with more stars stick around for longer though
(unless that's because when more people star it the timer is reset or something)
 
they stick around the same time
it's in descending cronological order for the last star received...
 
user652649
 
@ircmaxell cept for pins
 
What do you think about Bullet PHP? Anyone use it?
 
2:22 PM
@ircmaxell That can't be. Otherwise everything I star would go right to the top of the list again
Which it doesn't.
 
@Neal right
@NikiC It does... Or at least used to
 
I just tried. It doesn't go to the top. Just one or two up
 
yeah, fair enough
don't know if it changed, or I just forgot
 
@MadaraUchiha Shalom ma shlomcha?
 
2:29 PM
@Neal Ma shlomeich is for a girl, Ma shlomcha is for a guy :)
 
@MadaraUchiha :-P I always forget
 
@MadaraUchiha You think I could get away with "Yo Hebro"
 
silly language that has male/female words...
 
For today's news, we have a casperTwo
 
@MadaraUchiha who zat?
 
2:31 PM
casperOne's girl
 
@MadaraUchiha Kind of mean they have a sign saying "no feeding" poor chap, I bet he's hungry!
 
@MadaraUchiha stalker :-P
 
how can i remove al the non utf-8 chars? :/
 
@Neal I'm a moderator now (Anime and Manga) I hear stuff
@Badaboooooom Please don't swear in this room.
 
2:33 PM
ops sorry :/
 
@MadaraUchiha cool
 
@MadaraUchiha get your ass over to cv-pls room please :)
 
@PeeHaa Rojer
 
2:35 PM
thanks
i found this
iconv("utf-8", "utf-8//ignore", $words)
but why this doesn't works ? :/
if $word = "�èùààò(#´À{À � �ÀÈÀÈ˘˚˝� �˙˝˘˙˝˘˙˝˘˙ ˝ ˘ ";
it returns the same :/
 
@Badaboooooom What exactly do you want?
 
user652649
$words = iconv("utf-8", "utf-8//ignore", $words);
 
user652649
 
need to remove all non utf-8 chars in a string
 
@Badaboooooom define "non utf-9 chars in a string"
 
2:41 PM
@wes it doesn't works it returns the same string :/
@Madara all the s**t you can see here "�èùàà"
accented chars are allowed , not the others then
 
@Badaboooooom Define a whitelist, i.e. a list of ALLOWED characters, and remove the rest.
 
damn but it's toooo long to define it manually %)
 
@ba
@Badaboooooom - characters like èùààò are valid UTF8, that's why they pass through your function.
don't expect valid characters to become invalid :)
 
but that is ok, i want accented chars
 
I think you'd end up better using proper regular expression.
 
2:44 PM
i mean all the  ÀÈ˙ÀÈ˙≈”¢Ò≈”Ò
:)
 
user652649
@Badaboooooom your test string killed viper7
 
@wes who's viper? :D
 
ÀÈ˙ÀÈ˙≈”¢Ò≈”Ò are also perfectly valid UTF8 chars :)
 
daaamn )
 
UTF8 is huge, it contains nearly anything you can type.
Use RegExp
 
2:45 PM
and what about  ?
and �
 
that's also valid
 
also the � ? :O
 
your font just doesn't support them
but the encoding does
 
but :O ....omg
 
UTF8 got more characters then Arial you use to type.
 
2:46 PM
hm ok
 
1
Q: how many characters are there in UTF-8

emre22I am trying to understand this but i don`t get it. If UTF-8 is 8 bits, Does it not mean that there can be only maximum of 256 different characters? The first 128 is same with ascii. But it says UTF-8 can support upto million of characters? How does this work?

 
For 99% of cases: UTF8 contains everything. Even stuff beyond scope of nearly all of the PC fonts.
 
ok but in a web site scenario which is the best practice on this?
you can't leave chars like �
 
user652649
@MadaraUchiha congratulations for the newborn :P best wishes
 
2:47 PM
@wes You're congratulating me? It's casperOne's kid :D
 
I'd recommend either leaving it as it is, or using regexp with a list of characters you consider "valid".
 
user652649
lol... don't know who casperone is, so forget about it :P
 
hehehehe
 
@MarcinWolny really you think that reading � is good for users ? :/
 
@wes He's a moderator :P
@Badaboooooom Define a whitelist of characters you wish to allow
Until you do that, we don't even have a base for discussion.
 
2:49 PM
It's not "good", but in terms of programming - it's a valid character that's perfectly fine to display. It's not PHP fault that you don't use the font with that character! :)
 
well i just would like to allows all the keyboards chars
but not the specials
like alt+shift chars
(i'm on macosx alt+shift = special chars)
 
well :)
ok i'll do a manually list
array ;)
and replace them into strings ;)
 
user652649
@Badaboooooom you may restrict to iso8859 iconv("UTF-8", "ISO-8859//TRANSLIT//IGNORE", $words); en.wikipedia.org/wiki/ISO/IEC_8859
 
well not so bad idea @wes
 
user652649
2:51 PM
but depends by which languages you want to allow
 
really not so bad :)
 
^ this
 
problem is understand which language is not allowed
me i'm allowing all langs
no langs limit i mean
 
user652649
so why are we talking? :P you can't allow all languages with iso8859
 
Then chinese folks are screwed! ;P
 
2:53 PM
@wes Well, now you'll know me as the guy that deleted your account =P J/K =)
 
user652649
ahah @casperOne
 
@wes ok, and which are not allowed ? :D
 
user652649
congratulations for the newborn :P
 
@casperOne congrats
;)
 
Thanks for the well wishes and thanks to @MadaraUchiha for showing you guys, much appreciated.
@MadaraUchiha Thank you very much =)
 
2:54 PM
@casperOne dunno who you are but congrats
 
user652649
@Badaboooooom lot of languages... depending by which version of 8859 youre using
 
daaamn )
ok i make a hand list )
of chars
bye bye )
 
user652649
lol
 
thanks guys
:D
 
@Badaboooooom Be careful cause even in europe we use different ISO encodings. Depending on a country.
 
2:55 PM
@Badaboooooom Just an SO mod. We're not liked much so we're scrubbed from the memory of the users. =)
 
@Badaboooooom � should only show up if something messed up. It is used to replace broken input.
 
Eeeeeek a mod. Act normal all!!!!! Look busy!!!!!
 
Well, or if the user actually typed that...
 
@R.MartinhoFernandes and characters not supported by your font
 
you are scaring me guys, too scared
:D
 
2:55 PM
@PeeHaa ha, yeah, sometimes we have that effect.
 
@R.MartinhoFernandes could be i'm on Codeigniter
using xss clean method
 
@R.MartinhoFernandes and I have interacted (from Lounge<C++>)
Anyways, thanks for the well-wishes. I have to tend to the little one for a bit. You guys take care.
 
later @casperOne
 
@casperOne Oh, congrats! Later.
 
@casperOne gratz and take care!
 
3:00 PM
@MarcinWolny The font may use the same glyph for unmapped characters, but it won't be U+FFFD, it will only look like it.
 
user652649
someone knows if there is a way/hack for to control the white-space between two adjacent inline-block elements? i wish to emulate that <span>1</span><!--
--><span>2</span>
 
user652649
 
margin right?
 
user652649
@MarkH i'm not sure that will be crossbrowser/system.. probably it will not
 
3:03 PM
@Jack will take a look at these :)
o_O woot... I jumped like 2 times between 100 rep and 99 rep... weird.
someone nasty plays with -1 button >_>
 
@MarcinWolny Because the question is not constructive.
 
Why not?
 
Because answers can't reliably be measured ... i.e. can't tell whether one answer is better based on facts.
 
guys what's wrong in this array? $array = array('ı','»','”','’','¢','‰','›','⁄','','≈','¿','±'‚'À','È','Ì','Ò','Æ','Ù','Œ'‌​,'Ø','∏','{','}','Å','¯','˘','˙','˚','¸','˝','˛','ˇ','Ç','∞','◊','≥','‡','Á','É','Í'‌​,'Ó','Ú','·','—');
can't understand what's wrong it returns syntax error, unexpected T_STRING, expecting ')'
 
3:13 PM
well, the better one is that which provides SQL injection that works on PDO or gives more "nasty" examples of XSS code, or provides some ideas how can I attempt session/login theft on my website. Thought it's quite... clear :)
at least.. I tried to make it clear.
 
@Badaboooooom Do some basic debugging yourself :)
 
i did :O
for me nothing wrong :/ how it could be %)
maybe it doesn't likes ' and it wants "
 
Don't guess. That's not debugging.
 
ok but what you mean by debug?
i checked deeply if i forgot any comma or quote
and i don't :/
 
What have you done to debug it? Have you isolated the problem piece or is your way of debugging "ask in some chatroom"
 
3:17 PM
i isolated each value
 
@Badaboooooom eg. try to remove half of it, see if errors, then add half of that half, see if errors, etc. etc. until you find one bit that does error. Fix it. Profit.
 
stackoverflow.com/questions/14649232/… .. this must have several duplicates
 
this works 'ı','»','”','’','¢','‰','›','⁄',''
this not 'ı','»','”','’','¢','‰','›','⁄','','≈','¿','±'‚'À','È'
:/
can you believe this? :/
 
3:21 PM
and the real problem is this damn 'À' :D
dunno why
unbelieavable
anyway fixedd :/ removing that value :/
thanks
 
U+00C0? I don't see how that would cause trouble.
 
@R.MartinhoFernandes sometimes i really believe in ghosts
 
What are you whitelisting this for (i.e. what kind of field is it), anyway? You should probably whitelist based on character properties, like "all letters, digits, and punctuation".
 
i'm whitelisting all chars i don't want
2
special chars as you can see
for me is s**t
:P
 
That's called blacklisting, I think.
 
3:27 PM
oh yeah )
i preferr )
 
I don't consider À a special char. What's special about it?
Maybe I say so because my native language uses it, but I feel very annoyed when a website prevents me from using perfectly fine text.
 
special i mean shit )
well you'll ever need one of these $array = array('ª','œ','°','‘','˜','€','ı','»','”','’','¢','‰','›','⁄','','≈','¿','±','È'‌​,'Ì','Ò','Æ','Ù','Œ','Ø','∏','{','}','Å','¯','˘','˙','˚','¸','˝','˛','ˇ','Ç','∞','‌​◊','≥','‡','Í','Ó','Ú','·','—','™','`','¥','~','æ','ª','�');
?
 
Gah
I hate the dreaded �
Had to work around that with a load of htmlentities and UTF-8 for the Polish language
 
yep and the same hate for the others :/
it's unreadable
 
@Jimbo Encoding... you're doing it wrong if you had that
 
@Badaboooooom Why not? My language uses several of those.
 
which ones?
 
Århus is one of the largest cities in Denmark.
 
If you simply use utf-8 everywhere you can display most languages just fine
 
i removed some of that listed above
forget about letters i allowed all
just signs
 
3:31 PM
@Jimbo Yes, that's the right approach
 
€ is the Euro symbol, FFS.
 
@NikiC :D Took me a while!
 
Though really, why would anyone ever want to use htmlentities?
 
Because they don't know any better
 
I didn't want to :(
 
3:32 PM
ok i removed my array :D
you always scare me )
 
@Jimbo Why did you use it then?
 
Consider the fact that you needed to type � in this chat.
Now imagine that this chat blacklisted � for no real reason.
Have fun.
 
@NikiC My page already had UTF-8 charset but didn't display correctly - it was something to do with the data being pulled from the MySQL table (even though it was at UTF-8 :/)
 
@Jimbo If that happens you should fix the problem rather than using htmlentities...
 
@R.MartinhoFernandes yep but this chat is about coding )
if i need to read a book that char really brokes my mind )
 
3:34 PM
@Jimbo Somewhere along the line something was not UTF-8
 
ebook )
 
I know, I tried to - I did everything from changing the Tables type to UTF-8, to changing the whole DB to UTF-8
 
@Badaboooooom Why would it be in the book in the first place? If someone typed it, they probably meant to have it here, no?
 
It wouldn't put them properly in the DB and substituted � for this weird upside down double cross
 
@Jimbo And you also set the connection to UTF-8? (Which really is the most important part)
 
3:35 PM
what if accidentaly they put it in there without reason )
 
properly set the connection to UTF-8
 
90% don't know what a keyboard is i think
90% peoples on the web distract and newbie when browsing the web
 
@NikiC I did something along the lines of: MODIFY COLUMN value VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin
Also tried utf8_general_ci
Not sure about connection...
 
@Jimbo That sets the column charset
 
so they types strange chars, hate them and can't understand how to remove them
 
3:37 PM
@Badaboooooom Whfat iff thfey accfidentally pfut ifn thefre somfe "f" charfacters?
 
The connection charset is set in the PDO DNS
 
better to remove them when not needed )
 
Or using mysql_set_charset if you're on that
 
@R.MartinhoFernandes lol i'll never read your books
 
Or SET NAMES utf8. Though that's not a good idea because it doesn't change the client encoding
 
3:37 PM
Is it your website's job to fix your user's typos?
 
@R.MartinhoFernandes my web site do all, also coffee for tyred users )
 
@NikiC I think I did SET NAMES utf8
I remember SET NAMES
 
set names utf8 makes the server aware .. but not necessarily the client.
 
Yet, I might've done some double reversed character set crap somewhere... I was relieved after 7 hours of trying to get it working by using htmlentities() - I'd rather not break it again :P
 
anyway ... i lost half a day in this chat need to go ahead daaaamn ))
see you guys !! thanks a lot
 
3:39 PM
@Jimbo In your defense, MySQLs charset handling is TOTAL CRAP. It has seven (or was it nine?) different charset settings and it's no wonder people get confused over it
 
The point is: there nothing special about À or Ö or many other characters. They are only "special" if you have an Anglo-centric view of the world.
 
@R.MartinhoFernandes Well, someone who is "foreign" is merely someone from somewhere not around the person who suggests that the new person is a "foreigner". The difference is perspective, as this also applies to the "foreigner" who may think the original person to be "foreign". Let's translate this to À or Ö characters. These are only "special" if they're not regular and are foreign to the user - it's not an anglo-centric view at all. It's perspective.
 
@NikiC yeah, and 3 different "rollup" settings (which set some or most of the 7)
 
My point is, it depends on the person. So there's no point bitching about it, it's an opinion that can't change.
(Unless, of course, À or Ö become common use for the "non-foreigners" - but that's obvious and there's no need to go into that)
 
@ircmaxell And the documentation is very imprecise
 
3:43 PM
yup
 
@NikiC Thanks, I'll bear this in mind for the future - if I use "foreign" characters like those in the Polish alphabet
 
My conclusion for the day: When people say "PHP needs Unicode support" they really mean "It should be easier to get MySQL charsets to work"
 
folks, sorry for the wrong place to say, but I'm looking for ideas (preference to help problem of worlds, any cause) for contribute with my expertise in front-end dev and design UI. I'm just help improve and create some apps/websites that have a "REAL PROBLEM" to solve. can someone suggest me? or how can I search these kind of projects on google.
 
@Jimbo It's "anglo-centric" if it's foreign to anyone who isn't an Anglophone.
 
mbstring.func_overload, what could possibly go wrong?
 
3:47 PM
@igorw uhh...
 
@igorw covers eyes, it will all be ok, it will all be ok
 
can sopmeone suggest me something?
 
F* you USD. Just saying.
 
wait what?
 
@NikiC I don't recall having some major issues with Unicode and charsets, maybe proper education would be better :)
@ircmaxell Referring to my statement?
 
3:53 PM
@webarto yes
 
@ircmaxell I'm $400 (and increasing) per month, compared to 6 months ago.
 
huh?
 
@Korhan ping
 
400 what?
 
Hi all
@DaveRandom ping
@NikiC how are you doing
 
3:58 PM
@ircmaxell xe.com/currencycharts/?from=USD&to=BAM&view=1Y In July 2012 $1 was 1.6 of local currency, and now it's 1.4, meaning there is .2 difference per dollar. On the other hand, euro ratio stayed the same, 1€ = 1.95 of local currency.
 
so the USD is geting weaker
 
@webarto I think that is needed in a general context, actual. It is not a PHP-specific problem. Well PHP or MySQL or whatever tools may have specific usage issues, but the education can be done in a generic manner. Do you know of a good link about it?
 
@ircmaxell Any sign of improving? :)
 
It has been for a while
it's all relative though
 
I have sent people to nedbatchelder.com/text/unipain.html before, but it has a bunch of Python-related stuff.
 
4:01 PM
@R.MartinhoFernandes True dat, kunststube.net/encoding this is good, although not actually related to MySQL, but in general...
 
@Baba pong
No joy yet :-(
 
@DaveRandom Which hosting do you recommend ?
 
@webarto Thanks, I'll check that out.
 
@ircmaxell in india its going to stronger .. in just 1 year its increase 44 to 53
 
yeah
 
4:03 PM
@Baba For what, for your thing? What country do you want the servers in? (If you have a pref)
 
@ircmaxell I'll just stash them and wait for better days :) Thanks
 
@DaveRandom the solution is for Nigeria .. the servers can be in UK ...
@DaveRandom or us is cheaper :)
 
@Baba Can't recommend anything in the US (although I'm sure the 'Muricans in here can point you somewhere), the last couple of setups I've had in the UK have been in Metronet rackspace but I don't think they do hosting as a commercial solution, my previous employer was (and still is) quite friendly with them. What kind of traffic are you looking at when you go live?
 
@DaveRandom not much for a start but about 10m - 30m request per day after POC
 
10m - 30m ? huge ...
@Baba dont know much about peer1.com but may be useful
 
4:18 PM
@NullPointer do they host financial critical solutions too ?
 
@Baba dont know but you can chat with them
 
@NullPointer Oh ok
 
@DaveRandom may i ask why ?
 
@NullPointer Its expected to get to 50m - 100m per day in another 2- 3 years
 
@Baba is it your personal ?
 
4:22 PM
@NullPointer naaa its not a social application ..... Its for filling and monitoring taxes ... eGoverment tax solutions for African countries
@NullPointer Can you see why the numbers are huge ?
 
@Baba 50m - 100m ?
 
@NullPointer yeap
 
i wish my website will get that much traffic ....
@Baba looks like its government project .. so no other choice
 
@NullPointer any Government Project for a country with large number would definitely hit such numbers
lol funny title
 
4:39 PM
Gah I'm tired, I keep putting !impotent instead of !important in CSS
2
And yes, I know !important shows a fundamental problem somewhere in the architecture, but it can't be helped if you have to override some massive CSS that cannot be changed
 
@Jimbo If you're not part of the solution, you're part of the problem
 
@orourkek Well that's just a load of bollocks
I have no choice in this, haha, I have no access to the big CSS file my company uses in the framework
 
where can I put php code so you guys can look at it and tell me why the F its not working
 
4:58 PM
Hey guys, say I have an array like this:
array(
[0] => array(
["CORRECT"] => 1
),
[1] => array(
["CORRECT"] => 3
),
[2] => array(
["CORRECT"] => 4
),
[3] => array(
["CORRECT"] => 1
)
)

And I'm trying to get an output array like so:
$correct = array(0, 2, 0, 1, 1);

Where the 0th index represents how many array items had 0 correct (so 0), and the 1st index represents how many array items had 1 correct (2), and so on.

I know a foreach and a temporary array would work fine for this, but I'm trying to figure something out that isn't too big for code, since I do this a lot.
Sorry for the wall of text too.
 
why don't you post your question to the main site?
 

« first day (839 days earlier)      last day (4124 days later) »