« first day (746 days earlier)      last day (4202 days later) » 

@sujathan , sessions are tied to a cookie
and cookies usually are tied to a specific domain
@sujathan read php.net/manual/en/function.setcookie.php .. especially the part about domain parameter
 
@cyril No because they are properties. Also you can't extend the prototype of DOM elements in a reliable way - IE just simply doesn't let you do it.
@cyril pastebin.com/TP3zmkVx - JSFiddle doesn't display it right because the dimensions of the document element are wrong
A lot of it is a bit nasty...
Seems to work more or less the same everywhere though.
That extra <div> will probably need display: none
It is necessary because IE won't do getElementsByTagName on tags it doesn't recognise
 
user1125394
great, for innerText I'v seen ghow you do, or else
 
user1125394
in JavaScript, 7 mins ago, by rlemon
Element.prototype.superText = function() {
      return this.textContent || this.innerText;
};
 
@cyril Yes, but you'll find that Element.prototype won't work everywhere
 
user1125394
 
@cyril Yes I was just looking at that, it is certainly a decent option. Personally I'd do it with a couple of object types and display it a bit differently, I'll build you an example if you give me an hour or so (have to do some real work)
 
user1125394
thx no pb ;)
 
greetings to you too hake
 
How do I "decode"/"unescape" a PHP formatted string without eval(). I don't need to support variables in between doublequotes, eg: "a $test" =>a $test
 
morning guys ......... @hakre you too...:-)
 
2
Q: Simulate php array language construct or parse with regexp?

NinFrom an external source I'm getting strings like array(1,2,3) but also a larger arrays like array("a", "b", "c", array("1", "2", array("A", "B")), array("3", "4"), "d") I need them to be an actual array in php. I know I could use eval but since it are untrusted sources I'd rather not do th...

 
12:43 PM
@hakre In short, use tokenizer? Is that the answer?
 
@Christian I'd say there are more than one answer to the question, this is just what came to mind that's fitting. It uses eval though, so probably a no-go for you - even if it's done safely.
 
I'm going with Gordon's (which ironically enough, is what I did two weeks ago but for a different situation)
 
lol wrong answer gg, mom
@Christian I meant this originally: stackoverflow.com/questions/7873354/…
ups which now turns out I duplicated @NikiC's answer somehow ;)
 
Hello
Please help me with my question stackoverflow.com/questions/13158380/…
 
see the comment =P
 
1:01 PM
@NullPointer morning
 
thank you! "The advantages of using centralized global ACL are as follows: Centralized place to access and manage ACL rules, resources, and roles; Maps nicely to the MVC controller/action architecture.
The disadvantages are as follows: Centralized ACL could become large and hard to manage, No means to handle modules, We would need to re-implement access controls in order to use our Domain in a web service, as they are based on action/controller"
it is from "Keith Pope Zend Framework 1.8 Web Application Development"
 
the "no means to handle modules" actually depends on the granularity that you provide
gonna take a quick look at that book .. do you have page number ?
 
@tereško page #253, chapter "ACL in MVC"
@tereško + "ACL in the Domain layer"
 
this describes what you are currently using
an ACL system that does the checks withing the structure
also , the person who wrote the code from "Storefront ACL" should be kicked several times on the general principle
one should not do computation and hardcode values in the constructor
anyway ...
 
1:20 PM
@tereško Ok, using ACL for controller/action is ok, but how can control ACL rules if in single method/action we're going have different access levele for different input values? For example: controller action `editUser($userId). Admin is allowed to execute this method with any $userId values. But concrete user can use this method only with self $userId. I suppose, that asnwer will be to separate this action into two actions (one for admin, second for user)?
Sorry for my awful English. :)
 
you can place ACL at two levels:
- what parts user can access ( controllers + actions )
- what information it can retrieve ( services )
so yes , the solution is to have ACL on model layer, but not inside it
ACL should be the traffic cop which directs the cars , not an annoying bastard in the shotgun-seat telling you what to do
 
guys could you check why the dropdown is not working in topbar mysweethome.info
 
especially since model layer is much more complicated then controllers .. which would mean that modifying access grants , if they are inside model layer structures, becomes much more complicated .. well , not true, if you use services as top-level abstraction for model layer
 
Can anyone find the problem in my code? I have one mysql table with the row index in which are 3 numbers 6, 10 , 2 when im take the with a querry and implode the querry i get this: 10

10, 2

10, 2, 6
 
@NullPointer because there is an error in JS
 
1:31 PM
@tereško could you tell me where i am missing/going wrong
 
@tereško :))) lol thank you so much! Best answer!
Is it possible to find INTERESTING REMOTE job (I'm from Russia) as PHP programmer?
 
Possible? Sure!
 
Likely? nope!
 
@rlemon your solution for carsol work great could you tell me why the dropdwon not working now ..? mysweethome.info
 
@NullPointer we went over this
     <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
      <script src="js/custom.js"></script>
    <script src="bootstrap/js/bootstrap.min.js"></script>
    <script src="bootstrap/assets/bootstrap-dropdown.js"></script>
    <script src="bootstrap/assets/bootstrap-collapse.js"></script>
    <script src="bootstrap/assets/bootstrap-carousel.js"></script>
what do you see wrong with the order of these things
put custom at the end
also you haven't implemented the dropdown like the docs tell you to
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
<ul class="dropdown-menu"> <!-- I believe this is missing some stuff -->
 
1:39 PM
@Kirzilla , when i find one, i will let you know =P
 
@rlemon pasted the custom.js at last but not working
 
read everything else I wrong then the docs
 
(though in my case it would be from latvia , but that's close enough)
 
I'm not going to fix it for you
 
@tereško yeah, almost neighbors :)
 
1:42 PM
@rlemon no problem ..... thankyou
for your time
 
@rlemon you should use a loader script probably.
 
not my code
 
@tereško Thanks:-)
 
@rlemon I see. I should read first.
 
1:54 PM
@SomeKittens :D
 
@SomeKittens that's basically every user under 200 rep
 
user50049
@SomeKittens HA! That's going into my SO meme collection
 
...you have a SO meme collection?
 
user50049
@SomeKittens Heh, yep. Mostly made by Will
 
user1125394
awesome! :)
 
2:20 PM
That's something like what I would do. It's thrown together pretty quickly so it's not perfect, but I like that approach much more that laying text over an input.
Also note that it is jQuery free and should work everywhere, even IE6 (although only tested down to IE8, but I am confident it will work lower)
 
hi all
 
user1125394
@DaveRandom almost as good as Stack Overflow question post one, but would require some ajax to fetch each tag's description etc...
 
@cyril Same idea. If you want that effect where it all happens inline, you just have the input styled to be invisible (no border, bg etc) as the last element of the container, and insert the tag elements before it. A little more code but not a lot.
 
user1125394
glad to avoid the monospace thing I did
 
I've been doing it for a while now but I am still not sure about the "Injecting the constructor instead of a factory" approach. I personally kind of like it, I think it's quite a tidy way to do it (factories are messy in JS if you want to maintain private instance members) but JS purists like @rlemon will probably have a heart attack.
 
2:34 PM
@NikiC hiya!
 
In today's ironic news, thedailywtf.com is down.
 
@SomeKittens Is that todays ?
 
oop, fixed now.
@DaveRandom That'd be amazing if Alex pulled that off.
 
user1607528
Is it possible to buy alexa rank? Or fake it?
 
@Muhammet Yes. First, have a decent idea. Spend money on a good design/dev team to create a great site. Then buy lots of advertising.
 
user1607528
2:43 PM
@SomeKittens, not thay way, There is a website made by someone I know, and it has a rank inside 50,000. But I don't beleive it made it up there.
 
2:58 PM
maybe it was featured in reddit/digg/hn or some other social bookmarking site
 
Hey guys
 
user50049
@tereško Could be one of those crap autosurfing junk browser toolbar nets full of zombified ancient versions of IE, but those are exceedingly rare these days.
 
botnet-style solutions are kinda overkill with this sort of problem
 
Hello
How do you add a string onto the end of a row again?
like..
say I had a string called 'hey' in the database
how would I run a query to add 'man' on the end of it?
would I just simply use...
UPDATE people SET text=text + 'man'
?
 
user1125394
does'nt work like that
 
user1125394
3:11 PM
you'd first read it then write it with the new appended value
 
umm
I'm pretty sure someone did it before
in one query
 
user1125394
ah maybe, I'm not mysql expert, ask others
 
hello dear dudes
 
Hello
@tereško knows sql well
maybe he knows the answer
 
Is there a way of making a virtual machine act as a server for localhost?
 
3:16 PM
yes
there is
 
@MeLight yes, VM systems let you forward guest ports to host
 
@tereško so it's a config I have to set in VirtualBox?
 
yes
 
@tereško do you know the answer to my question?
 
so in any case it will have to be forwarded to the hosting machine? Even if I want it available globally and only locally?
 
3:18 PM
2
Q: SQL UPDATE all values in a field with appended string CONCAT not working

FresheyeballHere is what I want to do: current table: +----+-------------+ | id | data | +----+-------------+ | 1 | max | | 2 | linda | | 3 | sam | | 4 | henry | +----+-------------+ Mystery Query ( something like "UPDATE table SET data = CONCAT(...

@MeLight wut ?
 
I mean, if I want to access the virtualbox pages from another machine, not the host
?
 
it works
if you forward the host's 80th port to guess then anyone, including you can access that port .. that's of course if your router is configured for that
 
in wordpress how do I style an "a" link individually?
 
with CSS
 
yeah I'm trying that and got it to hid the text but now it doesn't click
 
@benlevywebdesign If you hide it, you can't click it. That's how links are normally handled by the browser. P.S.: Disabling author-styles in your browser will allow you to click the link again (because it's displayed again),
 
@benlevywebdesign If the link has no text (or is not displaying the text) it probably has either 0px x 0px or 1px x 1px dimensions, so there is either actually nothing or pretty much nothing to click.
 
I has text and I don't want it to have text because I use an image
 
@benlevywebdesign So just wrap the anchor round the image and don't give it any text
<a><img></a>
 
3:35 PM
see at the very the bottom the white nav with next and previous
its in php and it creates an a link
 
http://thenazg.blogspot.com/2012/10/improving-my-use-of-database-lookup.html
Planet PHP
Improving My Use of Database Lookup Tables in PHP
Chuck Burgess
1351696620
 
@benlevywebdesign Don't use background-image:, put the image in an <img> tag and wrap an <a> around it
 
@DaveRandom , I would actually disagree .. though, i do not know the exact context
 
it is php so the code looks like this:
`<?php posts_nav_link( ' ', '<img src="' . get_bloginfo('stylesheet_directory') . '/images/rightarrow.png" />'); ?>`
 
IIRC you'll have to give border: none; to the <a> tag to prevent stupid browsers putting a blue outline round it
@tereško I thought people might not like that. Care to explain the right way to do it? The context is it's currently a <div> with background-image:, the image should be clickable.
 
3:40 PM
if the picture is part of content , it should be <img> tag , if it is a part of design - use CSS's background
 
hi all :)
 
So how do you make it clickable without using JS then? An anchor with no text nodes and a background image?
(does that work? too busy to test)
 
its part of the layout of the blog benlevywebdesign.com/wordpress/?paged=2
and its for the page navigation to go back or forwards
 
@DaveRandom what is taht you cannot make clickable ? an empty <a> tag ?
 
Yes. Presumably you'd have bugger about with the css of the anchor in order to get the image to display full height?
I'll freely admit that I largely suck at css.
 
3:47 PM
actually you issue seems to be semantic HTML
you fail to distinguish content and design
> Whenever I've wondered about how something in Erlang works, I have never been disappointed in the answer. I almost always leave with the impression that the designers did the “right thing.” I suppose this is in contrast to Java, which does the pedantic thing, Perl, which does the kludgy thing, Ruby, which has two independent implementations of the wrong thing, and C, which doesn't do anything.
 
Quite possibly so. I am not a designer. I make things do stuff.
 
i spent ~4 years are front-end developer
CSS is not something that designers should do
 
<div id="pageright"><?php posts_nav_link( ' ', '<img src="' . get_bloginfo('stylesheet_url') ); ?>
</div>
 
and how do you do format code on chat here
 
user50049
3:49 PM
@SomeKittens Or, we have lots of low hanging fruit :P
 
@TimPost Yeah, he mentions that.
 
when I try it never works
 
user50049
@benlevywebdesign Paste the code into the textarea, highlight it and hit ctrl-k
 
> You see there, PHP running at front with 68 minutes average accepted answer time, either it’s too easy or there’re too many of them.
 
@TimPost ah thanks
 
user50049
3:52 PM
Or just indent four spaces to the right (ctrl-a + ctrl-k is usually more convenient for most things)
 
<div id="pageright"><?php posts_nav_link( ' ', '<img src="' . get_bloginfo('stylesheet_url') ); ?></div>
thats the code for the right arrow link
 
user1125394
4:21 PM
can I share with you the magnificent in session dictionnary made by someone in the team I work pastebin.com/10cRRgLe
 
I assume that's sarcasm.
 
any idea
...lol
 
user1125394
putting a dictionnary in every user's session? how many users does it take to make apache crash if the dictionnary is heavy, say 1MB
 
4:52 PM
ugh
 
rad
hello people
 
user1125394
@DaveRandom I've not looked further but there should be more elegant way to bind the compltion list than using <datalist>, could be done with local storage indexeddb... anyway even if it's small, will put your script in a separate file with /*author: DaveRandom */ the project is under apache license
 
5:14 PM
hi
 
any help on my issue?
 
@DaveRandom , don't use loops like this : for (i = 0; i < tags.length; i++) {
it's actually harmful
 
@tereško How? It's tidier than for-in and semantically identical (isn't it?)
 
user1125394
because .length is computed everytime in JS I think, from what teresko said sometime ago
 
5:26 PM
for (i = 0, var length = tags.length; i < length; i++) {
 
user1125394
var len = tags.length;
for (i = 0; i < len; i++) {
 
No, length is a property that is only updated when the array is modified isn't it? It's not like count() in PHP - or at least, that's what I thought.
 
Oh, right. Noted.
@cyril One last very minor modification: jsfiddle.net/DaveRandom/ygRbS/20/embedded/result
(the additional margin wasn't being set on the input when you remove the last tag with the link)
@tereško What's your opinion on injecting the constructors of the child objects as dependencies (like a factory but not a factory, because every factory implementation I've seen in JS sucks IMHO)
laterz
 
user1125394
@DaveRandom great but too bad I'll have to uglyfy this in jquerymobile jsfiddle.net/ca11111/ygRbS/23 (al the site is built with)
 
5:48 PM
@SomeKittens for( var i = 0, l = arr.length; i < l; i++ ) { you had var in the wrong spot
 
Anyone has some experience with setting up sqlite3 + php on Amazon EC2?
I'm having substantial difficulties here:
1
Q: PHP + SQLite3 on Amazon AMI (EC2)

DreenI have a similar question to this one, I want sqlite3 php support on my EC2 (standard Amazon AMI), but PHP was compiled with --without-sqlite3. How can I add sqlite3 support? Its software from repository so I can't just rerun the ./configure script More info: I tried installing it from PECL wi...

 
6:09 PM
stackoverflow.com/q/13163119/871050 Please find a duplicate for it
And hi
 
http://thenazg.blogspot.com/2012/10/turn-those-if-branches-around.html
Planet PHP
Turn Those IF Branches Around
Chuck Burgess
1351704180
 
Evening
@Feeds stop screwing up
 
user1125394
6:26 PM
@tereško see the first comment php.net/manual/en/book.gettext.php
 
we usually call it "a hack"
 
user1125394
@DaveRandom it doesn't look so well with jCrapMobile but will work with tags css to improve it thx again fiddle.jshell.net/ygRbS/25/show/light
 
user1125394
the red cross is a 'X' I guess, it's hard to undertand how it's work, there is no object just functions in functions lol
 
user1125394
6:42 PM
function SelectionTagInput(tagCollection, domElement) {
  var self = this,
      noTagsMsg = 'No tags selected';
  function getKeyCode(e) {
    return window.event ? window.event.keyCode : e.keyCode;
  }
 
user1125394
damn, where is SelectionTagInputConstructor declared
 
user1125394
from SelectionTagInput apparently
 
@cyril you should take this to javascript room
 
user1125394
 
6:59 PM
@DaveRandom it seems like you are tying to force a prototype-based language work like class-based one
 
7:12 PM
hello
I am a php newbie and was wondering what this line mean't in some code I came across
if ($row_counter & 1) {
I looked up '&' and it seems to be either a bit thing, or references both of which i kinda understand, but in this situation it doesn't seem to either
 
user1125394
returns true if $row_counter has it's first bit =1
 
why would they do that, like that? seems kinda strange, I would just say mod 2, or something
 
user1125394
like it is case for numbers like ...........1 in binary
 
cool, well now I know. Thanks!
 
user1125394
Operations on bits at individual levels can be carried out using Bitwise operations in the C programming language. Bits come together to form a byte which is the lowest form of data that can be accessed in digital hardwares. The whole representation of a number is considered while applying a bitwise operator. Bitwise operators C provides six operators for bit manipulation. {| class="wikitable sortable" ! Symbol || Operator |- | & || bitwise AND |- | l || bitwise inclusive OR |- | ^ || bitwise exclusive OR |- | > || right shift |- | ~ || one's complement (unary) |} Bitwise AND "&" {| ...
 
7:26 PM
hey, who here loves php? and who here uses php because they have to at work?
 
@FunBeans Yes, and yes.
 
I use it because I choose to. I don't love it or hate it. It's a tool that helps me accomplish my goals.
 
Anybody ever implemented "non-static" CSRF tokens in a xhr heavy website?
I just cannot figure out a way that it works and is still useable
 
user1125394
maybe try js room
 
@tereško So how do I avoid tightly coupling the constructors?
...and evening all
 
7:32 PM
@DaveRandom Evening dave
 
@DaveRandom what constructors ?
 
user1125394
var myFooBar = {
    function test() {}
}
 
no, it's :
var myobject = {};
 
@tereško the newable functions
 
user1125394
7:38 PM
thx need to learn, that's like developer.mozilla.org/en-US/docs/JavaScript/…
 
@cyril actually you should begin by reading : eloquentjavascript.net
all of it
 
user1125394
you already told me ;) it's long
 
then get a different hobby
 
OH SNAP
 
if you are unable to read a book , you should not try to become a developer ... try working in marketing , maybe
 
7:42 PM
DOUBLE SNAP!!
 
user1125394
yes every js developper should... but my work wil stop soon, and probably do more research
 
@tereško would you like to share your thoughts about "javascript the definite guide book"?
 
@tereško Thanks for making sure I don't get anything done in the house for another night :-P
 
@Tarun never read it. It stick to "Eloquent JavaScript" and the "Good Parts" books, supplemented with 24h+ of lectures and two years in ##javascript IRC channel
 
Its a miscellaneous of good resources
 
posted on October 31, 2012 by Chris Shiflett

My family and I are fine. We have power, running water, and Internet. Many are not so lucky. Dozens lost their lives. Millions are without power. Billions will be spent repairing the damage. Sandy won't be soon forgotten. There are numerous ways you can help. Here are just a couple of examples off the top of my head: Text REDCROSS to 90999 to give $10 to American Red Cross Disaster R

 
one of your delvotes depends on it
 
> You have already voted to delete this post
That user seriously is spitting out some crap with his last questions: stackoverflow.com/users/201934/numerical25?tab=questions
Either dupes, stupid mistakes (too localized) or just off topic :(
First time I have seen Your common sense happy:
*high five* :) — Your Common Sense Feb 2 at 9:52
:P
 
9:20 PM
@MadaraUchiha , you could take this--^ one
 
@tereško this?
 
yes
 
It's funny how Yii has a CLogger :P
 
talk about good names
 
Hey
is there a way to do dynamic session names?
like..
$_SESSION['number'.$count];
 
session names of what ?
 
like..
number1
number2
those being dynamic
say I visited a page
with the _get variable..
?num
then I wanted to make a session with that number
so I want to make a session called $session['num1'];
or whatever number was from the _GET
how would I do this?
 
@JordanRichards $_SESSION['number'][$count];?
 
would that work?
as in.. would that make a session called..
 
9:36 PM
That's kinda why it's an array?
 
$_SESSION['numcount']
if I did ..
if(isset($_SESSION['num1']))
 
The $_SESSION superglobal variable is just that, a variable.
It can be set to whatever value you want.
 
ok..
but what I'm asking is..
 
So yes, it can be set as a multidimensional array as well
 
although you've done it as an array
will it still be all in one when you check it, by this I mean.. it won't be called $_SESSION['num'][1]
wait a min..
that would be fine anyway if it was
so what is it?
 
9:46 PM
@JordanRichards However you set it, it'll be kept that way.
 
neat :)
done it, worked :D
I've done a profile view counter
I know they can delete sessions anyway..
but still
minimises the amount of refresh bots ;)
 
@MadaraUchiha There you go
 
Yey! :D
 
@DaveRandom I know you clicked on the first question on the list, because it says +10 Could we implement a better search? on the right (I clicked the first one on the list too)...
 
9:56 PM
Onwards to the 3k milestone!
@ShaquinTrifonoff It's still a good feature request
SO search sucks. That's part of the reason why we get so many duplicates.
 
@MadaraUchiha I know. I often use Google instead too.
 
Those who do bother searching, are blocked by this wall of absolute suckness, and just ask away.
 
@ShaquinTrifonoff It's a good question I hadn't upvoted - I did read it before I upvoted it, I don't give rep away for nothing. You don't get owt for nowt.
 
When I get filthy rich (with meta-rep), I'll bounty it to bump it up a bit
Right now, I'll just take my editing privileges and shut up :D
 
@DaveRandom Of course I read it, did you think that I didn't read it??
 
10:00 PM
@ShaquinTrifonoff No it just sort of sounded like you were suggesting I hadn't...
 
10:33 PM
-30
Q: What to do if high reputation users are downvoting/closing your question without actual reasons?

Radiohttp://stackoverflow.com/questions/13100847/transparent-pixel-renders-different-on-pc-and-iphone#comment17806276_13100847 In this clearly stated question I got an absolutely non-sense answer from a high reputation user who offers me a solution that is not related to the question being asked. ...

Ouch. Dude lost 90 rep.
 
he/she did not have any to begin with
 
> +100 15:04 assoc Association Bonus
And:
> This account is temporarily suspended to cool down. The suspension period ends in 3 days.
:-)
 
@SomeKittens So the question got downvoted by high rep users :P What irony...
...and closed, too...
 
10:51 PM
stackoverflow.com/q/13167726/727208 .. I honestly think it would be in the interests of OP
 
@PeeHaa Did you see the About Me for that user? Hate everyone. :P
 
@ShaquinTrifonoff :-)
 

« first day (746 days earlier)      last day (4202 days later) »