« first day (1076 days earlier)      last day (3871 days later) » 

6:02 PM
ugh... hate Ubuntu for the time it takes to launch an application @ 8Gb memory, 3.2GHz X4, and GTX560Ti
too lazy to setup an arch or slackware
 
"Hey guys, I made a little thing over the weekend, lemme know what you think?" "FUCK YOU AND YOUR WORK" Standard HackerNews thread.
 
@an1zhegorodov Debian.
 
@an1zhegorodov actually in my experience gentoo is easier to user then slackware
 
@tereško Archwiki is damn good. Or as you would say - it sucks less.
 
so I have heard
 
6:19 PM
/me hates tons legacy code @work and fixing design bugs
 
"design bug" .. what a politically correct way to describe it
 
@tereško I would rather fix hands of HTML coders
 
I am creating something like a notification system in my cms, that if a user logs in, his entry is added to the logs, so that others users should be notified that he logged in, now this is pretty easy for messaging, but am not getting a perfect logic to implement for 1 -> many users... any ideas?
 
Arch wiki is awesome, pity the core OS breaks unless you read the news every time you upgrade system.
 
@Mr.Alien Do you use a database?
 
@an1zhegorodov obv
how can I build a freaky cms without db?
 
@Mr.Alien filestorage for example
 
@Mr.Alien so, you want users to be notified instanly?
 
@an1zhegorodov just like fb does, notify for each action, an article is created, notify, deleted, notify, etc etc, like 1 to many nodes, I have done 1 to 1
 
@Mr.Alien and what's wrong with your one to many relationship?\
 
@an1zhegorodov 1 to 1 I just switch the boolean, how do I switch booleans for each user?
 
@Mr.Alien without seeing details I cannot answer the question
@Mr.Alien what boolean ? you switch it to do what?
 
@an1zhegorodov say I posted an article, say I post a log entry like user 1234 posted a new article, now everyone can see this, now the thing is how do I track whether a particular user has already seen this notification or not, when he see, I will update the boolean to true, but than I need to create a new table with users like everytime a user sees notif, an insert will be carried out for each notification, but this is an insane idea
 
@Mr.Alien You could store all notifications to be shown in your database. Once the noification is shown, you delete the row
@Mr.Alien you'll have to save the state somewhere anyway
 
@an1zhegorodov ok as I said, 1 sees the notification, I can't delete, other user has to see the notification
 
@Mr.Alien strore one record per user
@Mr.Alien ie id, user_id, notification_id
 
6:41 PM
Can some one help me with my question please: stackoverflow.com/questions/19035947/duplication-of-assets
 
@an1zhegorodov ya, so even u have a crazy Idea, 1 system holds 100 user, 1 action costs 100 entries.. hehe, I need to think more nw
 
@LogicLooking Sounds like you need to do some var_dump() debugging to find out what is going on
 
PeeHaa I wouldnt be posting a question if I didnt already do that
How esle would I i know I have duplicates in my array >.>
 
Also I would refactor processCSS and processJS because they do the same thing
@LogicLooking That is var_dumping the end result. That is not debugging
You need to step through your code
 
@PeeHaa Thats how I got to the idea that I am getting duplicates
 
6:45 PM
anyone with good DNS knowledge here? screencast.com/t/VWmpdmcNS I'm setting up amazon webservices webserver. Should I tick on alias on this screenshot?
 
@an1zhegorodov thanks anyways, me off to sleep, will think something by tmrw..
nyt everyone
 
@LogicLooking No
You only checked the end result. Not how you got there
@Mr.Alien lator
Trust me @LogicLooking learning to debug your code is much more valuable than me telling you what is wrong
 
@PeeHaa No I walked through the whole thing Theres something wrong with processCss and Js that is creating duplicates, its not appending the new object its appending all three on too already existing content
 
amagad
 
@LogicLooking , open your code and add echo 1; every time you write to $this->html, that should be a good place to start
 
6:48 PM
@TuralAliyev I'll see if I can check if that's on for me.
 
@Danack ???
 
evening chaps ...
 
this duplication is annoying me
 
jo @PeeHaa
 
6:53 PM
Anyone here want to help me test something? Need someone who has signed up for StackExchange exclusively, and does not have a Facebook account associated with that same email.
 
lol @charles I just went on meta to put a bounty on the flag icon question just to find out I was too late
ok I'm going to close SO main now...
 
emm ... guys, do you think this can be refactored
    protected function findNode( $list )
    {
        $node = $marker = $this->root;
        foreach ( $list as $key )
        {
            if ( $node->hasChild( $key ) === false )
            {
                return $marker;
            }
            $node = $node->getChild( $key );
            if ( count($node->getPaths()) > 0 )
            {
                $marker = $node;
            }
        }
        return $marker;
    }
 
7:09 PM
I managed to remove the duplication
but now I cant call my method any where but the header :(
 
@tereško Maybe move the inner foreach to a separate method, but I think it looks okish as is
 
that inner return messes things up
 
yeah
 
I dont like how $node is being over written, in the inner foreach. If it wasnt you could put the two if statements into functions ...
 
I kinda agree with @LogicLooking
 
7:13 PM
its just my thoughts
 
that's all good and true, but what can be done about it
 
:P
 
I assume there is not mystery in what is being done
so the question is: should it be refactored and if "yes" then how?
 
do you have tests for it?
 
nope, it's code from autoloader ... I cannot write test for component that is required to run tests
 
7:14 PM
yes, and by teh way told you - IMO
write tests?
the*
 
@lusitanian We now have two milestones. Are you ok with this and the dates?
 
$node should never be over written like it is, Id slap the person for doing that. What if you need access to the original node object later?
 
It doesn't get "written". That code is just walking a tree-like structure.
 
My understandinis: $node = $marker = $this->root; (node is instantiated)
$node = $node->getChild( $key ); (Node is over written // bad)

But hey what do I know
 
I would expect it to return null btw instead of marker
Or I am reading it wrong ™
 
7:18 PM
i think im reading it wrong
either way i dont like it
 
moment please ...
 
whats the best way to add dependency injection to my class to append new assets to the array?
I can post an updated version of the class if you need
this time ill just post on gist
 
gist it please
 
one sec
@PeeHaa See line 50 for how I would "like" to use this class: https://gist.github.com/AdamKyle/2465d61df3d901013f6a

I know how DI works, I am just not sure how to use it here. If any one has any examples on how I can append values and then spit them out that would be great.
 
$node = $node->getChild( $key ); does not overwrite anything
it just moves the handler
 
7:26 PM
This scares me @LogicLooking
> // The following should be able to be called any where in the application, and just append new asets.
 
lots of things scare me
but back to my questionm
 
That implies global state
 
well header.php is global across the app >.>
 
So you need to set it in your header file. That is not the same as "any where in the application"
 
@SirKnowsaBit are you trolling me? oO
@PeeHaa No no... I want to call createAsset ANY WHERE
 
7:27 PM
Being able to "any where in the application" will drive you insane when testing the thing
2 messages moved to bin
 
@PeeHaa The set up, so call the class and then call render. Should be done inheader - obviously. But its the method createAssets() I want to be able to call that any where
 
@LogicLooking That still implies global state
 
How?
explain
I would use di to create an instance of the Asset class
 
and then just pass it new assets
@PeeHaa Your reading just a comment, your not understanding the whole thing let me fix that
@PeeHaa lets see you say I want global variable garbage now: gist.github.com/AdamKyle/2465d61df3d901013f6a
 
7:30 PM
Well yeah :P If that comment is true you just found a really weird way of creating a global :P
 
read it again
Now back to setting up DI
I could use the factory pattern and pass the clas an array of default assets
but that wouldnt make much sense
 
It's not the DI that scared me ;) If you inject into everything it is still a kinda global ;)
 
you mean scares
not scared
 
Pick one
 
imho, both can apply
 
7:32 PM
but really there is no need to be able to call something from anywhere throughout your application
 
I nee to create assets on the fly
so yes there is
unless you know a better way
 
By not doing that ;)
 
THEN SHOW ME A BETTER WAY PLEASE
 
... I might know, but since this might turn into hour long lecture, I will abstain
 
>.>
I should be able to create an asset as a default, by passing it to the constructor of the clas and rendering it in the header and then some where else like on the login page add an asset for that page on the fly
thats the purpose of the class
I dont want createAssets in global space
 
7:35 PM
How are you rendering the actual page at some point?
Do you have some rendering thingy somewhere where you just wires together the header / body etc?
 
Acording to how this framework is writen:

header.php is just "required" into the pages via a global variable (horrible horrible way of doing things)
I didnt write this garbage, well iw rote the class im having issues with, but im trying to "extend" this framework
 
nvm :)
 
fuck no
its not
I already have an asset loader for that
this is work
anyw ays its apprent this isnt going to work
either that or some one knows how to help me but wonr
 
@LogicLooking Well if header is always just included and the execution of it is before the login thing is executed you would have to switch the order of execution
 
what do you mean?
 
7:39 PM
0
Q: validating in cakephp model compare two fields

indagoI have a model Interesttype where i want two fields to be validated one should not be more than the other and none should be less than a particular set value. Here is my model. class Interesttype extends AppModel { public $primaryKey = 'int_id'; public $displayField = 'int_...

 
I'm assuming the assets are rendered in the header. If the header thing is execute before the login thing you would have a hard time running createAssets from anywhere, because the assets will already be rendered
 
so your saying render the header last
if I understand you correctly
 
@LogicLooking That would be the only way it is going to work if you want to be able to add assets from "anywhere"
 
I kindof wish this was wordpress >.>
ok thanks
 
7:44 PM
@LogicLooking Said no one ever :P
 
@PeeHaa WordPress is better then some asian guy cobbling together Zend, Symphony and what evr else in here with out actually using those frameworkjs
>.>
makes me cry my self to sleep
this is why php is hated so much - idiots
 
@LogicLooking well yeah... cannot argue about that fact that some people should not be allowed to write code :P
But I also think the same about rasmus so it is not bound to people from asia :)
 
rasmus? and my statement wasnt racial
it was general
 
Generally... asian
 
7:50 PM

HTML / CSS / WebDesign

This room is now defunct. RIP.
BTW as much as I hate iAnything. The fact you can debug ios safari using desktop safari dev tools is pretty fucking awesome
 
Sorry guys I as under the impression he was dynamically creating the css >.>
 
30 messages moved to bin
 
ugh... alright i'll look elsewhere. You guys are stubborn. Definitely not "HelpingHands"
 
omg
stfu
due to how this douche renders the header I have to rethink my asset class
thanks moron - please stop coding now
 
there is this magical option in this chat: "ignore user"
 
7:58 PM
oh I am new to chat - appoligies
 
@tereško What is the least sucky e-commerce PHP thing you have ever encountered?
 
php method to make string all lowercase (particularly a session variable)
?
 
strtolower
 
@PeeHaa that's like asking one to pick out the prettiest piece of shit in the outhouse
4
 
8:00 PM
@tereško Yep I know :P
Pick a nice turd for me :D
 
all my encounters have been thoroughly scrubbed from my brain .. cannot help you there
 
k np
 
Thanks guys... I guess i'll do it on the php side of the page. <sarcasm>thanks for the hospitality</sarcasm>
 
ooooo the ignore is fun
 
I've only ever used magento and it pretty much blows
 
8:03 PM
@PeeHaa , if I had to make a blind choice, I would go with opencart.com
 
@tereško Been there done that
:(
If I would have a shitload of time and would have been bored as hell I would fix the situation myself :P
in JavaScript, 1 min ago, by SomeKittens
HOLY TOAST. Just won the Listserv Lottery (http://thelistserve.com/)
 
@PeeHaa This might be a stupid suggestion - write your own?
 
what about prestashop.com , @PeeHaa
 
@tereško That's one I haven't really look into yet. Might give it a spin
 
@PeeHaa Oops
 
8:10 PM
naah .. looks horrible
 
:(
 
@ Anyone who could help me.
I'm trying to hook up a simple fancy box to an image using php a database and timthumb to resize the images. The problem I think I'm having is a conflict with in timthumb and fancybox.

Here is the string of php code:
<a class=\"fancybox\" rel=\"parts\" href=\"$path\" title=\"$title_reg Lake of the Ozarks Missouri\">

Here is the $path code:
$path = "/timthumb/timthumb.php?src=/parts/$id/1.jpg&a=c&w=760&auto=auto&q=65";
 
this has nothing to do with PHP
 

JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
 
8:14 PM
FIGURED IT OUT
 
@Gordon So, now I look at it, it seems that they sent it an address @daverandom tld that I don't remember where I ever posted it online. I have a feeling I put it on my CV once but that's it. On related note, you and your modness, how do I change the email address associated with my SE OpenID account?
 
why do I always think of things that complicate everything ?
 
KISS FTW!
 
especially things that begin with "And what if I input this ..."
 
@DaveRandom go to your SE profile page logged in
you will see a link called 'my logins'
click 'add more logins' then remove the old one from list.
 
8:28 PM
Hello. I've just joined StackExchange. Does anyone know where I can chat about git?
 
@User17670 There is no dedicated git room AFAIK
 
@User17670 you can create a Git chatroom, as there is currently not one. =o)
 
@crypticツ Don't you need repz to start a room?
Aw it's only 100
 
Mmm... thanks. For immediate help, I guess my best bet would be to just ask on the forum, since I'd likely be the only one in it...
 
@User17670 what forum?
 
8:31 PM
and while some people are here, a question - *what would be the best way to document configuration options*:
- make some github-wiki entry,
- append to one large `README.md` file,
- add the explanation in the location when the component that is going to be configured is,
- place the documentation `*.md` file in the directory where configurations will reside
 
The StackExchange forum. I mean... the place where people ask and answer questions
 
@User17670 it's not a forum O_0
 
I dunno if you'd call it a 'forum' or what
What is it?
'The Q&A'?
 
its a Q&A site, you should make sure to read this stackoverflow.com/questions/how-to-ask before you start asking questions.
otherwise you will likely end up having your questions closed and/or not answered.
 
Yah, yah. I know how it works
 
8:35 PM
@User17670 well calling it a forum made me think otherwise =oP
 
Does anyone else find the fixed header on the new PHP beta site to be a distraction?
 
@Shea @LeviMorrison We've got a complainer here
;)
 
@Shea: me :P
 
I Don't want to complain or anything, it's just so hard to skim through content when it's so "out of the normal"
 
Ah he already is handling it :)
@Shea j/k
 
8:45 PM
Hack it
 
Yeah, I suppose. I just don't want to be that guy though, to nitpick it
 
@Shea At least 6 people agree with you
 
Well, to be fair, three of those votes are me. (you're allowed up to three votes per topic)
 
You are ? :P
 
I'm not a fan of fixed headers/navbars in general.
 
8:49 PM
FWIW I would not mind if the header would not be set to fixed position.
 
@LeviMorrison the old site the default category for the search was a function since it the most common thing someone would search, but the new one it goes to a search listing page which you have to then click the function from the results. =o( Also, was there looking into adding a search submit button so if you are dragging/pasting a term you don't have to reach for keyboard.
 
The only fixed elements I've found to not be a distraction or annoyance are sidebars; more generally, components that don't eclipse any other content.
 
@crypticツ I have historically delegated search.
It seems, like always, I'll have to do it myself :)
 
:-)
 
@JoeWatkins are you here? :-)
 
8:52 PM
@DanLugg Yes, exactly
 
@LeviMorrison What are the "We have reasons to put it there" reasons?
 
@JoeWatkins just managed to get the following work:
 
@bwoebi I am
 
./sapi/cli/php -r 'class thing { protected function out($a) { echo $a; } } $a = new thing("YAY!\n") { public function __construct($a) { $this->out($a); } }; var_dump($a);'
YAY!
object(Class$$1)#1 (0) {
}
 
@PeeHaa Search is the dominant navigational element used on the site.
 
8:53 PM
@bwoebi show me patch
 
I am considering moving it out of the header and onto a side bar, though.
 
@JoeWatkins minute
 
@LeviMorrison That is indeed a valid point
 
If we moved the search into the sidebar, then we could try managing a fixed left-nav.
And normal header.
 
8:54 PM
I think that would be huge improvement as well
 
Thanks for considering this :)
 
Having the left-nav be fixed is actually much harder than you might think.
 
My boss sent me a question a few minutes ago about something working in Firefox. I replied with this reference:
10 hours ago, by tereško
user image
 
Most useful post evah
> Tune It Like This

> Use less white, makes difficult to read. Use less images, use css and color efficiently. Plz don't add advertise, support localization, allow scroll and fill new or remaining pages data like facebook
 
8:56 PM
> like facebook
Request denied.
 
@LeviMorrison Why not just have a check box to toggle between static/absolute?
 
@LeviMorrison True fact. Bootstrap got it right, barely.
 
@Shea No. This makes maintenance harder. It's already a unmaintainable nightmare.
 
@JoeWatkins It's way more complex parsing logic, but I think it's worth it…
 
@bwoebi why have you removed new_object ?
@bwoebi I really don't ...
 
8:58 PM
@JoeWatkins not necessary?
 
+%expect 8
 
@JoeWatkins that's fine.
 
this is exactly what I wanted to avoid ...
 
the reasoning is:
 
@bwoebi no, it's not fine.
 
8:59 PM
if the class name is a variable, it SHOULD shift to the reference_variable and not to the anon class
 
%expect should stay as it is
 
@ Anyone who could help me.
I'm trying to hook up a simple fancy box to an image using php a database and timthumb to resize the images. The problem I think I'm having is a conflict with in timthumb and fancybox.

Here is the string of php code:
<a class=\"fancybox\" rel=\"parts\" href=\"$path\" title=\"$title_reg Lake of the Ozarks Missouri\">

Here is the $path code:
$path = "/timthumb/timthumb.php?src=/parts/$id/1.jpg&a=c&w=760&auto=auto&q=65";

Link to site: http://davesautocare.pdslo.com/autoparts.php
 

« first day (1076 days earlier)      last day (3871 days later) »