« first day (911 days earlier)      last day (4263 days later) » 

12:00
hm?
@NikiC with this dataset it must be the best option (only max 1000 ranges)
sorry
@NikiC btw is there a function to check this nicely sorted array by key (i guess) because using 8Mb of array data for in_array() seems a bit overkill (i think)
@NikiC you added in 'base 2' also ? as another optimization?
@kaᵠ A very fast alternative for in_array() is to use array_flip() and isset()
counting is not an option here.. at least i don't see it
12:05
Actually it's faster with larger arrays
unless.. maybe.. obly if aplying an O(n) algo over the whole palindrome array
counting mega-giga-peta-terra-gazilions is not fast!
hope that ^ describes a gogol to a good enough degree
lol
@kaᵠ how did you run the file via CLI ?
anyway, that huge array can be flipped once generated, that's gonna happen fast enough, so depends on how you wanna implement... on the square or the squared.
@HamZaDzCyberDeV on linux just type php index.php
WAAAAAAAAAAAT
and it runs, remember use \n instead of <br>
hahahah, what's the problem? it's a script... @HamZaDzCyberDeV
12:10
It runs like a matrix code here lol
@HamZaDzCyberDeV on windolls you should be able to do the same
that's what it's supposed to do, till it slows down
The only difference is I can't really read what's going on lol
@kaᵠ as "more or less" base 2
after all the outer and the middle digit can be 2 and not just 0 1
countof(1) + 2*countof(2) can not be greater than 9 (though that's rather hard to use)
@NikiC first use actual base3 then saw another improvement so, base2 + 2's in some places, better, but no cigar....
128MB wasn't enough
Gonna give it 1GB :p
12:13
died @HamZaDzCyberDeV ?
@HamZaDzCyberDeV stop. edit
what should I edit ?
@HamZaDzCyberDeV line 56, 69, 103 (where it's saved in an array) comment those
@kaᵠ @NikiC I only looked at it briefly, but why not eval.in/16329?
12:15
countof(1) ?
it's always nice to look at piece of code .. and notice, that there is a rising urge to vomit
3
roflmao
@Gordon because that code will fail at range(1, 1000000000000) ?
@Gordon that's really sweet! but needs to get up to 1 gogol :D code-jam problem
@tereško :p
12:17
@tereško you're welcome :)))
// --- snip --
else if ($action == 'SAGLABAT')
{
    $buttons['mainit']['content'] = '<button style="font-size: 11px; font-family: Tahoma; border: 1px solid #D0D0D0;" id="mainpazin" '
                .   'onclick="setAction(\'?ACTION=SAGLABAT\',this); '
                .   'top.$(\'#mainpazin\').css(\'background-color\',\'#cccccc\');">'
                .   $this->kernel->msg->get('form.timeout-administr.save').'</button>&nbsp;';
    unset($fields['funkIzsT']['disabled']);
    unset($fields['neaktT']['disabled']);
just kill me now
ahahhahaha ^^^^ that's even worse
... than anything
Fatal error: Out of memory (allocated 53215232) (tried to allocate 36 bytes) in /tmp/execpad-da80a43741ac/source-da80a43741ac on line 13
@kaᵠ I'm testing with small input now
12:21
@HamZaDzCyberDeV my code doesn't solve, it's Just the generator (useful for large1 and for large2 with a bit more work)
@Gordon is there something that can return all the keys of an array that are in a specified range?
@kaᵠ check the RAM usage :p
@HamZaDzCyberDeV if you're running it in the browser... you're doing it wrong, open up cmd, goto php folder, execute: php c:\path\to\script.php
@kaᵠ No, I;m using the CLI, It's just that I open too much tabs in Opera
@HamZaDzCyberDeV how much are you at? over 42?
12:28
@kaᵠ please fix the ( bug
Ah, I'm retrying again, with some lines commented out ...
hi all
@NikiC bug what where?
aaa, i kinda like it like this atm @NikiC plan to fix though
@kaᵠ The links, what I mentioned yesterday :)
One of the stupidest cases I have ever seen, he asks an enigmatic question then answers it...
And both the question and answer sucks...
12:32
@kaᵠ Imperfect regular expression matches irritate me :D
@Ihsan "member for 4 years, 7 months" and almost 2K rep
@HamZaDzCyberDeV Maybe drunk or something...
@kaᵠ Btw, do you think @HamZaDzCyberDeV's problem about the word lists can be solved using (mostly) regular expressions?
@HamZaDzCyberDeV I have 1K+ reps and I am still stupid... :)
12:34
@Ihsan I don't think so :)
@HamZaDzCyberDeV I mean reps do not make us clever... thx anyway...
@NikiC me too, but it's a WIP now, using it because: while( $i <= abs($val) ) { print_r( $array[$i] ); }
@NikiC My first approach was to generate all permutations, and bruteforce it
@Ihsan true :)
maybe a simple way would be to just generate the regex /(here|go|the|words) ((?!\1)(?1)) ((?!\1|\2)(?1)) ((?!\1|\2|\3)(?1)) .../x?
@NikiC regex approach was just the top-of-my-head idea for that, maybe using regex with 1mil chrs won't work?
12:37
@kaᵠ my main concern is that there might not be enough capturing groups :D
@NikiC Damn never though about that ....
@NikiC exactly the approach i thought of (generate as or, use a global find), but then again... 1 mil chrs
though now that I corrected it, it will actually be quite a large regex
and i though of some way without replace, to conserve some time... needs more thought (and to find the damn google jam link for that problem)
@kaᵠ why would you need replace?
12:39
that's the way hamza approached it
not sure I get it
and i wouldn't use just regex, only regex assistance, huge regex<-me not like
Huge regex <- me like. But probably not supported in this case ^^
@NikiC hamza replaced all words with their numercal index, then searched the string again for numerics
@kaᵠ link to code?
@NikiC c'mon (btw: you might want to drop in the regex room, some guy had a short and interesting rant - talking about you're article also)
@HamZaDzCyberDeV y u non-english comments :(
@NikiC It was to help someone who does speak french
Creer = create
:P
btw the comments aren't relevant since I removed the explanation part above ...
12:43
// Enlever le commentaire pour voir ce qui se passe ! =
remove the comments to see what happened...
@Ihsan Remove the comment to see what's going on :p
yep..
Euh, sometimes I have to "tell" some obvious things ...
:D
hope to see you soon... gotta go...
12:46
(ejects out of the cockpit into the sky)
@NikiC @HamZaDzCyberDeV where are you at? got to gogol?
@kaᵠ I'm not running it
@HamZaDzCyberDeV you gonna wait another 2 hrs for it.... (hope you're saving the output :D)
"saving the output" o.O ? I just ran the script, I hope you made it to save the output looool
FYI if you had done some exec("rm -rf"); command I wouldn't notice xD
45 digits
12:58
@HamZaDzCyberDeV roflmao !!! ok, so i guess it's the same in windows: php file.php > output.txt
I'm wondering if you use hiphop 4 php, if it would increase drastically the performance of this script !
it doesn't save by default, only prints
@kaᵠ :youkidding me: loooooooool
No I just did
php file.php input.in xD
@HamZaDzCyberDeV really wondering that too, would be a nice comparison
@kaᵠ do you need the ouput ?
13:00
@HamZaDzCyberDeV so.... php file.php input.in > output.txt
yes!!!! that's the purpose of the script!!! generate the gazilions of palindromes
@kaᵠ I though the purpose here was to see the perfomance of it lol
@HamZaDzCyberDeV also when doing that, you're not gonna see anything (in linux i have a handy command to check tail -f file.txt while running)
@HamZaDzCyberDeV yeah... performance, but if you need the data you should save
Hmmm, I shall then retry from 0 lol
Hope it won't create a 10GB output.txt file :p
~8mb @HamZaDzCyberDeV
@kaᵠ ok !
13:15
When I saw that comment xD
 
1 hour later…
14:26
@HamZaDzCyberDeV why do you even have WAMP to begin with ?
4
@tereško No specific reason, maybe because I'm a noob and followed a tutorial way back, and still sticked to it until now ?
anyway I hate XAMPP ><
What do you guys suggest?
I guess it's fine as a windows beginner environment.
why would you ever install XAMPP or WAMP or FreeNoobServerSuperEasyRulez ever ?
14:29
i have problem with magento login, have anyone idea abt it?
But I for instance installed a linux VM, and manually installed PHP, Nginx and MySQL.
@tereško @MadaraUchiha suggestions please
@tereško Because you don't need anything better for a local development environment for small projects.
41 secs ago, by Madara Uchiha
But I for instance installed a linux VM, and manually installed PHP, Nginx and MySQL.
^ that would be reasonable
I don't see why would I go and install it on a separate VM, I don't want to start a VM everytime I want to script some PHP
14:31
after installing magento , i do login in admin and after once logout i cant do login in magento admin, its shows invalid username and password.
@tereško @HamZaDzCyberDeV @MadaraUchiha @Nubcake Plz frined help me
@Michel06 Didn't we tell you that there are no Magento users here?
@Michel06 Sometimes, I really do wonder HOW IN THE WORLD DO PEOPLE GENERATE THOSE PROBLEMS that I NEVER encountered !
@HamZaDzCyberDeV We wonder the same about your problems sometimes :)
1. because you do not pollute your base OS
2. it is easy to keep up to date
3. you can have different environments
4. .. like duplicate of your production environment
5 starting VM takes 20-30 seconds
14:33
@HamZaDzCyberDeV , all my comemeber also wonder from that bt what can i do ? if erroe generate
@MadaraUchiha I didn't mention any "problems"
@MadaraUchiha :) lolzzzzzz
@tereško 1. Neither does installing WAMP/XAMP really
2. That's true, no arguments here.
3. Like I said, users who install those stuff don't need it anyway.
4. Again, no arguments there, users do fail there
What sort of encryption does anyone recommend if you want to send a password to the server for hashing with it's unique salt ?
5. WAMP takes less.
@Nubcake Why do you need encryption?
14:36
@Nubcake HTTPS
@MadaraUchiha I cannot hash it beforehand because I don't have it's salt
@MadaraUchiha @tereško the only reason for me to install it on a VM is to train myself installing/configuring php on a linux env.
@tereško I meant the data sorry like , aes ,base64 etc
@Nubcake generate it yourself, who do you think should generate it for you?
lolwut ?
1 min ago, by Nubcake
What sort of encryption does anyone recommend if you want to send a password to the server for hashing with it's unique salt ?
please, rephrase
14:37
something like sha1(microtime() . $userID . $userName . "SomeRandomString"); is more than enough.
If i want to send a password to the server
For it to be hashed there because I store my unique salts in the db
What method should I encrypt the password with
what
Cipher*
351
Q: How do you use bcrypt for hashing passwords in PHP?

Vilx-Every now and then I hear the advice "Use bcrypt for storing passwords in PHP, bcrypt rules". But what is bcrypt? PHP doesn't offer any such functions, Wikipedia babbles about a file-encryption utility and Web searches just reveal a few implementations of Blowfish in different languages. Now Blo...

Please read, thoroughly.
14:38
@HamZaDzCyberDeV get a PC (any PC) plug it in your local network, install *(nix|nux|bsd), webserver, php !
You don't need to store the salt separately, blowfish has it saved in the hash itself
so upeople have not idea abt magento , right?
@Nubcake password hashing should happen on server, you should NOT invent any magical encryption for the password that is going to be sent to the webserver
@kaᵠ I'd rather start a VM (8gb ram)
you can run a development environment with a 256MB VM
hell , you can use even less, just make swap larger
14:40
@tereško true, ok what OS (version) do you recommend ?
Hey guys one question. Does anyone know why this query doubles the results?

SELECT product_description.name as name, product.image as iurl FROM product_description, product WHERE product_description.product_id=product.product_id AND product.product_id in (33,28)
@tereško I know but I posted a topic similar to what I'm asking and someone said that I should encryption with the password if I'm trying to get the salt from the db which they said was a bad idea.
a standalone server does wonders (get a low energy little box even)
@kaᵠ will it work if i glue i to my laptop , when traveling ?
@HamZaDzCyberDeV anything that does not have graphical environment
@tereško lol
14:41
@tereško you're doing it wrong, but yes
@Nubcake I don't need to tell you again, right?
3 mins ago, by Madara Uchiha
351
Q: How do you use bcrypt for hashing passwords in PHP?

Vilx-Every now and then I hear the advice "Use bcrypt for storing passwords in PHP, bcrypt rules". But what is bcrypt? PHP doesn't offer any such functions, Wikipedia babbles about a file-encryption utility and Web searches just reveal a few implementations of Blowfish in different languages. Now Blo...

3 mins ago, by Madara Uchiha
Please read, thoroughly.
@MadaraUchiha I'm still reading that but it's sort of different in my case
@Nubcake , if you do not like reading, maybe you should consider hiring a developer
6
@tereško a little box like that with decent fw rules can be online 24/7 connected to the intermegawebs, or.. glue it to your laptop
14:44
@kaᵠ FUN FACT: my ISP wants to ask more money for new customers that downloads more than "the usual".
@kaᵠ that's something that i will be investing in near future
I'll be back []->
@HamZaDzCyberDeV my ISP canceled the the 20Mbit inet plan , and instead forced everyone onto 50Mbit one which costs $2 more
@tereško really cool/useful to have
@HamZaDzCyberDeV ok Terminator9
@tereško that's really worth it, but the force is bad, that should be illegal
@NullCatPonyPuppyPointer too many aminals
With bcrypt does it mean that passwords don't have to be hashed and sent to the server for verification i.e it can happen on the client side? I'm not sure I've understood someones anwser in this topic stackoverflow.com/questions/4795385/…
@crypticツ i love those .. :)
15:01
@Nubcake what the fuck are you talking about ?!?
why would you hash a password in a browser ?
@tereško it's cheaper? =oP
cheaper... nice!
@crypticツ did you remember to add the costs of bandwidth ?
@crypticツ also it reduce load on server .... so its best idea ... lol :P
15:05
When I need data crunched I send it to a random visitor to be done client-side
5
wtf did I just read?
seems it's important stuff @Ocramius, pay attention please
@Ocramius its client side password hashing and it will best idea in the word after 3ed word war
giving a star should cost reputation
8
.______________________.
Uby
Uby
15:07
@crypticツ that's a GREAT idea!
parallel computing at its best
@Uby It's how I get my taxes done
next is client-side SQL querying
Uby
Uby
@kaᵠ client-side DB sharding
@kaᵠ btw make sure you are not using mysql_* api its deprecated so use pdo :P:P
15:09
You're all way back
I already handled parameter escaping client side. The client directly sends me prepared statements
actually... client-side piecing together a website from n^x domains (already happening, jQuery, CDN's, image hosting, etc)
@NullCatPonyPuppyPointer I'll use mysql_* functions whenever I wish with clientside jabbascript !
15:25
I'm back :p
@kaᵠ only 80 more reputation points and you will be able to cast close-votes too
@Jocelyn yea... 82 then you gonna see me doing this too :)))
16:05
@kaᵠ You can still even if you don't have the reputation yet
@MadaraUchiha i do it from time to time, but don't have the cv-plugin
@kaᵠ Why not?
@MadaraUchiha actually my forked version of dave's linkifier is the only plugin i use, don't like using too many of those..
I'm using Opera :lol:
16:13
@HamZaDzCyberDeV can I have your autograph?
it's such a rare event...
I don't have any, may I ask you why ?
lol
16:25
siege is such a pile of crap, buffer overflows and such all over the place
@igorw whatcha working on?
Max
Max
hey
is Service Locator kinda anti-pattern?
C# devs say so
@metal_fan yes. mainly because SLs are injected and then all classes using it have a dependency on the SL which hampers reuse. It's also pretty much Global state.
16:39
@Gordon what should be used instead then?
@metal_fan just dependency injection
@metal_fan Dependency Injection. Either manual or with Factories or with a Dependency Injection Container
@Gordon isn't DiC anti-pattern as well?
@metal_fan no? O_o
@Gordon the latter is only the case if your services are stateful. which is likely going to give you problems even without an SL.
@metal_fan what makes you think that?
16:45
`/* bootstrap.php */


$pdo = new Pdo_Provider(require('/sql_params.php'));

$session_adapter = new Session_Adapter_PDO($pdo);
$session = new Session($session_adapter);


$adapter = new Config_Adapter_SQL($pdo);
$config = new Config($config_adapter);


$i18n = new i18n($config);


// Ok guys, now I have 3 instances I need to use in presenters (MVP)
// $i18n, $config, $session, $pdo


abstract class MVP_Abstract_Presenter
{

public function __construct()
{
// how would I access them all:
// $i18n, $config, $session, $pdo
If SL and Registry are anti-patterns?
@igorw well, SLs are often just Singleton Registries
@Gordon the only difference between Registry and SL is that, SL would be injected while Registry would come from global scope, right?
@metal_fan yes, so to say. A Registry usually doesn't have the logic to instantiate services though.
I'm wondering if it's not against the rules to ask the same question about PHP i have in the forums here
@igorw how to access objects from bootstrap.php somewhere in presenter? if so, any ideas ?
16:49
I do apologize it's my very first time in the chat
@GorillaForce link the question eventually
@Gordon I guess its minor difference
@metal_fan well, it's what makes the SL a SL and not just a Registry :)
24
A: Dependency Hell — how does one pass dependencies to deeply nested objects?

GordonIt's a common misconception that dependencies need to be passed through the object graph. To summarize the example Miško Hevery gives in Clean Code: Don't look for things, a House that needs a Door, doesnt need to know about the Lock in the Door: class HouseBuilder { public function buildHou...

@Gordon and for those cases I totally agree.
1
Q: How To Delete a LEFT OUTER JOIN

GorillaForceI am at the moment trying to delete a LEFT OUTER JOIN I created for a CMS website on PHP my LEFT OUTER JOIN looks like this: $sqlQuery = "SELECT filename FROM phpland LEFT OUTER JOIN images ON phpland.image_id = images.id WHERE phpland.id = '$pageid' "; In this case phpland and images are the...

16:52
@Gordon well, then I should bootstrap an application in a presenter?
public function buildHouse() kinda adheres so
@metal_fan no, you should bootstrap all you need in the bootstrap from the inside out. that is, if your presenter needs something, you inject it in the bootstrap already
$foo_presenter = ... would go into the bootstrap
user1642018
hello, all
abstract class Mvp_Presenter_Abstract { public function __construct(){ /* I need to access so many objects here from bootstrap.php*/ } } The problem is that, if i keep injecting those objects, I end up injecting about 12-16 objects to constructor. @Gordon
user1642018
i need direction., i am developing system where main system server serves the paths of images and few urls to clients and clients website gets filled with this data, so should i use xml / json or something else to server data ?
user1642018
16:59
it should be fast and very light on server
@metal_fan that usually means that your presenters are doing too much, and you should factor out those responsibilities into smaller services.
@metal_fan what @igorw just said. what are the objects you need in there?
$config, $i18n, $pdo, $session, $cookie, $themeManager, $acl, $profile, $notifications, $validator, $errorContainer
I could access $notifications via $profile but it would break the LoD
@igorw Yes, you're correct, but Presenter itself acts as a service, in this case (because I'm taking objects from bootstrap.php)
definitely way too much
but I have to cook now. later.
@rdlowrey it's insane how much an echo on the console impacts performance.
17:06
@metal_fan that's too much. You are doing too much work in that presenter.
with siege, 1K concurrency for 20 seconds, I went from 40K total transactions to 25K, only by adding an echo on every request.
@Ocramius that presenter is abstract and singular. Should I create small abstract presenters then? But then I may end up code duplication (would have the same properties in different presenters)
@Ocramius I've seen ZF solves that by putting bootstrap into a class and abstracting by MVC events.
like public function onBootstrap(MVCEvent $e){...}
but the problem is that Its not the way to go for Model View Presenter (in my own estimate)
because MVP isn't event-driven
@metal_fan the risk with so many dependencies is building a big ball of mud
17:40
@metal_fan lolwut
17:51
How can I check the processing speed / time of a php function
@RashidFarooq Is that what you asked for ?
@HamZaDzCyberDeV Yes. Thanks
@RashidFarooq Don;t forget to upvote the question/answer !
18:14
@tereško Would a domain object instance contain a __construct method, or is that just tight coupling? Especially since I'm using a domainObjectFactory
where can i find that password hashing on GitHub, someone who comes here made it, looks like uncle buck xD
Thanks that's it
Anonymous
18:32
bonsoir a tous
Bonsoir :)
bonsoir mes amis
@phpNoOb bonne nuit :)
honhonhonhonhon
lol godaddy gives example code to connect to their databases and it uses mysql_* functions
18:42
@NickFury this is worse =o(
well this myt be a common question ... how to find the number of subgraph instances in a given datagraph
i am too retard to understand how does a VF2 work and how to use it
Anonymous
@blackbee I don't know how VF2 works either, does that mean I am too retard?
@NickFury usually not. Unless you are using DAO's for communication with data mappers.
it depends on the perspective...
@tereško Thanks! and one more question, would I have foreign key row in my domain object ?
18:50
well i decided to break the incedence matrix of the datagraph into the order of the subgraph .... for example if the subgraph is 3x4 then i divide the 6x5 datagraph matrix into 3x4 submatrix es and then compute the permutation of each submatrix and match it with the input matrix .... but how to find the permutation??
or perhaps there can be a better easier way with O(nlogn) complexity than O(n^2)
@NickFury you would have foreign keys in your database. There is no rule that says you DO should be tied to one , many of no DB table
2 messages moved to bin
lmao is that a bad thing? Just want to thank you for all of your answers, I feel like an AR sized weight has lifted off my shoulders.
It's not too late to change
@PeeHaa埽 your gravatar is amazing lol
knock knock
19:00
who's there?
Anonymous
Ohh, that is soo @PeeHaa埽
@NickFury help me plz
Hi guys
and gals
Can some one assist me with pretty URL's or otherwise known as clean URL's? I seem to have problems with the process of using them.
@blackbee lol I have no idea what you're talking about up there.
@RahulKhosla search SO, there are plenty of questions about them.
How do I make class static variables visible outside the file?
19:08
@NickFury SEO*? And I already have done so, my problem is abit more complex. Im wanting to change my "home.php" to url.com/home/ and my shops.php to url.com/shops/
@RahulKhosla uh no SO == StackOverflow, and I think you're looking for htaccess
@NickFury Thanks, il take a look around and maybe post a question.
@tereško
Maybe someone can help me with this: stackoverflow.com/questions/16003269/… :)
I think I also might be in the wrong room.
19:23
@RahulKhosla just make all traffic redirect to an index.php and then determine the route from the request.
or if you're truly that lazy, use stackoverflow.com/a/16003293/710827
anyway, you have enough answers to go through lol
19:35
hi guys after uploading my website i keep getting the following errors: Warning: session_start() [function.session-start]: Cannot send session cookie AND Warning: session_start() [function.session-start]: Cannot send session cache limite
I've checked all the fixes for my code: I've removed all the spaces in the code and saved as UTF-8 without BOM but I still have the same error on my site
@Kaos is it a headers already sent error? If so check out this
@crypticツ Yes it is
@crypticツ I've also looked at that post but I don't know where I'm going wrong. Plus the line where it displays an error for my code has no spaces or output. Could I please show you my code to take a quick look?
post the exact full error message first
you can remove your username or whatever from filepath, but keep rest intact
What's wrong with the 3rd parameter in is_callable($instance, false, 'prepare')?
Fatal error: Cannot pass parameter 3 by reference
This is probably a PHP5.3 problem?
yup..
@NickFury you can't pass a constant like that
19:46
string 'prepare'?
it has to be is_callable($instance, false, $var)
@crypticツ Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/bfsonntn/public_html/test.php:6) in /home/bfsonntn/public_html/test.php on line 50

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/bfsonntn/public_html/test.php:6) in /home/bfsonntn/public_html/test.php on line 50
the 3rd argument is passed by reference, you can't pass a constant by reference, you need to pass a variable instead. @NickFury
@crypticツ alright, makes sense I guess :P
@Kaos ok pastebin the FULL contents of test.php and post the link I'll check it out
19:48
Thanks @crypticツ
1 message moved to Trash can
@Kaos please pastebin it pastebin.com
Anonymous
http://stackoverflow.com/questions/16003593/php-how-to-make-if-work-only-if-one-exact-button-is-pressed

« first day (911 days earlier)      last day (4263 days later) »