« first day (481 days earlier)      last day (4464 days later) » 
00:00 - 18:0018:00 - 00:00

12:00 AM
then how is C++ compiled online?
C++ servers?
 
and if anyone is interested in how I solved my earlier problem:
# Match url if it contains stage
SetEnvIf HOST ".*stage.*" stage
Order Deny,Allow

AuthName "Staging Area"
AuthType Basic
AuthUserFile /path/to/.htpasswd
Require valid-user

#Allow valid-user
Deny from env=stage
Satisfy any
of course if I have an domain name that includes the word stage, I'll have a problem... but since it was just more or less an exercise it's fine
the neat part is the Satisfy any
 
Can anybody help?
Warning: Unknown: open(/tmp/sess_mmd0ru5pl2h2h9bummcu1uu620, O_RDWR) failed: Permission denied (13) in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
 
anyone knows CSS to answer this? stackoverflow.com/questions/9203561/…
 
@SmilingDevil permission problem on the session save path?
 
@markus, It's /tmp?
Should be full permissions.
drwxrwxrwt 4 root root 4096 Feb 8 17:04 tmp
 
12:22 AM
@SmilingDevil looks more like a case for serverfault
I have no clue
 
@markus they told me to come here
lol
 
Is it possible to write the server end in ruby on rails and compile it into php?
?
 
12:49 AM
I wish there was a way to get feedback from when you get downvotes. if you're gonna say that my stuff needs improvement tell me how it can be improved.
 
1:28 AM
I'm having some little trouble with something in Symfony2, can someone help me out ?
 
 
5 hours later…
6:54 AM
Fatal error: Call to a member function getKeyName() on a non-object in C:\wamp\www\testing\libraries\joomla\application\component\controllerform.php on line 286
 
7:04 AM
anyone here ?
?
 
hi.. anyone here
 
yep
im also into a problm actually :P
 
hiii
wht happening
 
hello
need some help in PHP
 
yes
 
7:11 AM
r u free to help out ?
 
tell me what happen
 
ok i have a mysql_query
 
ok
 
which checks in the database for certain names
field name for "name" is "name"
 
ok
 
7:13 AM
so my query is like mysql_query("SELECT * FROM users WHERE id='$myid' AND name LIKE '%$name%'");
i have a variable $newname
by default the value of $newname is zero
if the value of $newname is something (a name)
then i want the query to search the table but excluding the $newname
how do i write the query ??
 
you can use not like
 
how do i write that ?
UNLIKE ?
NOTLIKE ?
 
SELECT * FROM users WHERE id='$myid' AND name NOT LIKE '%$newname%
 
7:31 AM
oh ok :)
 
hii every one
Good morning
i want to do pagination in my script
can anyone help me?
<form action="./wifi_log.php" method="get">
<select name="results_page" id="results_page" onchange="this.form.submit();">
<option value="5" NO >5</option>
<option value="10" SELECTED >10</option>
<option value="20" NO>20</option>
<option value="50" NO >50</option>
</select> results per page
</form>
 
8:20 AM
use $_GET['results_page'] in your sql statement. $sql "select * from foo LIMIT $offset ".$_GET['results_page'];
$sql "select * from foo LIMIT $offset, ".$_GET['results_page'];
 
8:40 AM
$offset =????
 
8:55 AM
here i post two link which helps you
in this easy steps given about pagination
 
php.about.com/od/phpwithmysql/… this thing is working in my code
 
so what is the problem??
 
see the image i have uploaded
 
method you have to write PHP_SERVER
by this you can solve your problem
 
ok
 
9:13 AM
@hardik both links are evil
 
hello @hardik
my problem is solved
0
Q: I want to add pagination in my script

Urvishamy problem:--- This is my wifi_log.php file <?php // find out how many rows are in the table $sql = "SELECT COUNT(*) FROM log_wifi"; $result = mysql_query($sql, $conn) or trigger_error("SQL", E_USER_ERROR); $r = mysql_fetch_row($result); $numrows = $r[0]; // number of rows to show per ...

 
congratz
 
thank you
 
9:29 AM
r u frm gujarat??
@urvisha
 
ya
 
m from ahmedabad
 
good
 
r u developer??
 
ya
 
9:34 AM
in which compny?
 
sorry
 
k.
 
Anyone good at jquery/php here?
 
yes
 
Am sure what i need to know is pretty basic
was that a yes to me?
@hardik was that a yes to me
 
9:35 AM
yup
 
OK I included a jquery slide to my php site which worked very well
 
somewhat
 
however when I add a duplicate slide to the same page, only the first one will work and not the second one I added
how do you explain that?
I cant seem to see where I am going wrong
 
if possible then paste ur code
there is possiblity of conflicting your jquery
 
9:51 AM
Ok here goes:
This is how I include it in the php code:
<div class="col4"> <?php include("jqbanner/EntebbeJuniorAd.html");?>
<?php include("jqbanner/EntebbeJuniorAd.html");?>
</div>
 
anybody knows joomla???
 
Good morning
 
good morning
 
and the EntebbeJuniorAd.html file loolke slike this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Simple JavaScript Rotating Banner Using jQuery</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script src="jqbanner/js/jqbanner1.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" media="screen" href="jqbanner/css/jqbanner1.css" />
the js file:
// Simple JavaScript Rotating Banner Using jQuery
// www.mclelun.com
var jqb_vCurrent = 0;
var jqb_vTotal = 0;
var jqb_vDuration = 5000;
var jqb_intInterval = 0;
var jqb_vGo = 1;
var jqb_vIsPause = false;
var jqb_tmp = 20;
var jqb_title;
var jqb_imgW = 460;
var jqb_imgH = 250;

jQuery(document).ready(function() {
jqb_vTotal = $(".jqb_slides").children().size() -1;
$(".jqb_info").text($(".jqb_slide").attr("title"));
jqb_intInterval = setInterval(jqb_fnLoop, jqb_vDuration);

//Horizontal
$("#jqb_object1").find(".jqb_slide").each(function(i) {
good morning Donut
 
Why won't you ask on SO?
 
9:56 AM
Whats SO?
 
 
<rant>PHP's DateTime class sucks, the work is done in the constructor and there is no easy way to set the DateTime object to the current date using a method of the class.</rant> (unless I'm wrong)
 
hellow masters
i need some helps
 
Shot!
 
yes hardik
 
10:00 AM
@Paul $now = new DateTime
 
@Gordon Yes, I was trying to avoid having a factory. I guess I'll have to though.
 
i have query in joomla 16
 
@Paul i dont understand
 
srry 1.6
joomla1.6
 
@Gordon I was wanting to inject the DateTime object and then set the time later.
 
10:03 AM
@hardik say
 
@Paul new DateTime('today'); will give today's date with time set to 00:00:00. new DateTime will give today's date with current time
 
@milap i m now creating new components...
 
yes
 
category aubcategory and product
in product page
 
@Gordon Yes, that would be the time at the point of injection. I am avoiding new in my class. I guess the time at the point of injection will be sufficient in this case anyway.
 
10:06 AM
when i select category from drop down then subcategory value also want to change
how i can do this
is there any way to use ajax in model
 
@Paul if you want to set the timestamp to now you can also use
$dateTime = new DateTime('2010-10-10');
$dateTime->setTimestamp(time());
echo $dateTime->format(DateTime::ISO8601);
 
Why doesnt duplicate Jquery slides work in one php file?
 
@Gordon The thing that really annoys me is that DateTime::modify ignores 'now'. Hmm, yes, that looks like the best way to do it. My mocked object will be able to handle the call to time() nicely when I test.
 
Anyone know?
 
10:21 AM
@SirBT this is an offtopic in this chat. Jquery doeesn't work in PHP files at all. it works in the browser
 
Morning
Does anyone know, why if I delete record with doctrine and call save method, the amount will be the same after this. And after few more seconds it is fially as expected.
 
how to use javascript Array in to php Array
 
@hardik json_encode / decode
 
k
 
hi everybody
 
10:28 AM
@NikiC Hi
 
sup?
 
@NikiC, Hi @NikiC
 
does anyone know how many emails I can send in one go before the server will get blacklisted for spamming?
rough estimate?
 
@Gordon 7
 
@salathe function rand() { return 7; } ^^
 
10:43 AM
@salathe damn. thats not good.
 
10:54 AM
facebook does send around 7 000 000 a day I believe
SPF record may help.
 
@ColShrapnel interesting. will check. thanks.
 
@col.Shrapnel jquery does work in PHP
 
@SirBT wtf?
 
@ NikiC how come I cant have two duplicates of a JQuery slide.
Only one can work at a time. how come
if include it a php file like this:
<div class="col4"> <?php include("jqbanner/EntebbeJuniorAd.html");?> <br>
<?php include("jqbanner/EntebbeJuniorAd.html");?> </div>
only the first one will work
 
jquery is used on client side , php is a server-side language
there is no possible way , @SirBT , for php to work WITH jquery
 
It is very possible, I run it in xampp, at it works just fine.
 
11:25 AM
 
        <div class="col4"> <?php include("jqbanner/EntebbeJuniorAd.html");?> </div>
this runs jut fine
 
@tereško your head must hurt a lot :D
 
@NikiC , i actually have scarf infront of my laptop , mostly to protect my elbows
 
So no one can help me on this?
 
you do not even grasp the difference between client-side and server-side .. so , no , noone can help you
 
@teresko I do grasp the difference between the two very well. Thats why I can make a jquery application (that only is supposed to run on a client side) run on a server-side. Let me see you try that...
 
@SirBT who is supposed to move sliders on the server side?
 
@ColShrapnel the guy using the IDE. That's why it's called slIDErs ;)
 
@Col.Shrapnel no one is to move the sliders to the server side. I just want to know why I cant duplicate two or more jquery sliders on a single page
 
11:41 AM
that is a javascript question , and the short answer is : "because you have never learned javascript and do not understand IDs are used"
 
@SirBT that is better phrasing. just ask in the proper section of chat or main site and no doubts some jquery pro will answer it.
This is PHP chat here. We may have some knowledge in jquery as a side technology but it isn't our specialization.
 
cannot but notice that @tereško is ruder than @ColShrapnel
 
@Gordon True true
@Col.Shrapnel thank you for the advice
 
11:59 AM
hey can anyone help me in zend framework
 
Depends on your question :-)
 
12:13 PM
how do I get the number of digits in an int number?? is there a method for it??
@DesaiAjay I started studying ZF.. depending on ur doubt, I can try to help u.
 
@rogcg strlen(str_split($number))
 
@rogcg logarithm with base 10
 
why simple strlen() doesn't fit?
 
@ColShrapnel Right. No idea why I wrote str_split...
 
@tereško logarithm with base 10 worked!
 
12:58 PM
is that possible to use ajax in xml file????
 
@hardik , maybe , but you should not even try
 
my model is generate one option tag...
 
additionally , i would like to point out that "ajax" is a marketing term , and seldom apply to modern uses or XHR
@hardik , you are still making no sense
 
why?
i know model is only for database query
 
no , model is a layer which contains two groups of structures : domain business objects and data access objects
 
1:04 PM
$db = JFactory::getDBO();
$query = new JDatabaseQuery;
$query->select('#__helloworld.id as id,greeting,#__categories.title as category,catid');
$query->from('#__helloworld');
$query->leftJoin('#__categories on catid=#__categories.id');
$db->setQuery((string)$query);
$messages = $db->loadObjectList();
$options = array();

if ($messages)
{
foreach($messages as $message)
{
$options[] = JHtml::_('select.option', $message->id, $message->greeting . ($message->catid ? ' (' . $message->category . ')' : ''));
this is my model function
 
while this is quite appalling , this has nothing to do with your original question
7 mins ago, by hardik
is that possible to use ajax in xml file????
 
ya
 
what did you mean by it , and why do you think that this would patch your solutions ?
 
but i m in big confusion
 
then maybe start by explaining the problem , and not show me bits and pieces of your "solution"
 
1:07 PM
ok
i have one product page....
in this there is two drop down
one is category and another is subcategory
both of this come from different model throw xml file
how i can manage when user select category then and then he able to see subcategory
to it's relevent category
 
you attach JS event on which requests data from server , and then populate the second dropdown ..
at which stage do you encounter a problem ?
 
at the last stage i found this...
 
( i find it surprising that people still use XML instead of JSON for this )
 
i used jason for ajax
JSON
but form is create using XML file
 
and where are you having problems exactly?
 
1:19 PM
i have one product page....
in this there is two drop down
one is category and another is subcategory
both of this come from different model throw xml file
how i can manage when user select category then and then he able to see subcategory
to it's relevent category
i got solution
yead
yeppi... :)
 
what was the problem?
 
can someone help me with some simple regex??? I need to match from a line.
$subject = array("cpu 109231023 01293102 31029 3102931029 301923 10923",
            "cpu0 11092 109 9283 249834 9238 29083 9283 9283 9283",
            "cpu1 11092 109 9283 249834 9238 29083 9283 9283 9283",
            "cpu2 11092 109 9283 249834 9238 29083 9283 9283 9283",
            "cpu3 11092 109 9283 249834 9238 29083 9283 9283 9283");
I need to verify the line starts with 'cpu(n)' and not just 'cpu'
 
Try 'whois google.com' from terminal. p0wned much?
ouch
 
@rlemon, are you going through the array using foreach or something?
 
yea i had a dumb mistake... I was /^cpu(0-9)/ and not /^cpu[0-9]/
this is why I try not to write much regex
 
2:01 PM
you could try this
function startsWith($haystack, $needle)
{
$length = strlen($needle);
return (substr($haystack, 0, $length) === $needle);
}
 
this is why you should try to write much regex
OMG, a 5-liner
 
preg_grep('/^cpu\d/', $subject)
 
2:20 PM
wow.. even I was just stuck in regular expression
i am trying to pull out ending 01 from this string, $str = "check me-01";
 
hello can anybody help with something please?
 
what u need @Nebunel?
lets help each other while nobody is here with us
 
i want to learn how to make cms`s, how can i start? i haven`t found tutorials, only templates
 
first make your directory structure where and how will u place your files.
images, view files, modelling files, controling files and classes.
 
ok, but it involves an engine, template, configs,classes,. With the classes,config,template i can handle and the engine i am trying Smarty. But i can`t get the concept, how to make the cms work
 
2:25 PM
prepare your database schema according to your requirements and project scenario
oops...... smarty. Even I am not familiar with it.
I thought you are about to make your own structure.
 
but i am, only i understod that is better to use an engine with large website (specialy with cms)
 
I usually use procedural programming and codeigniter as well.
 
codeigniter is pretty beautifull and simple.
 
yes, even i have heard that. But for large website I am comfortable with codeigniter. I dont wanna mess with smarty right now until i dont get enough free time.
 
i heard smarty is very very good, and i want to be better in the web-development bussines...
still trying to get the regular expresion gor the string
hold up a minute please
 
2:29 PM
yiiframework is also recommended for large scale website. I am just a beginner in that. Cant help u much with that.
oh thanks @Nebunel :)
 
need help in joomla??
:(
 
are u offering?
 
need help... anyone knows joomla
no
 
in the string will be and float numbers?
 
yes
actually no
 
2:33 PM
@SalmanKhimani its not like nobody is here. its rather that the dialogue between you two is scaring us too much to respond ;)
 
haha
good to see u joining us
 
try "[0-9].*"
 
or even for floating numbers "^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$"
 
Hey guys,
As this room had all my fav ppl here i thought id ask here first, does anyone know how to use centos
 
2:36 PM
@Nebunel it returns Array ( [0] => check me-01 ) :(
$str = "check me-01";
$strArr = preg_split("#^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?#",$str);
print_r($strArr);
by the way what is this wildcard for. [e] ?
 
@StephenWolfe apart from being a yes/no question, asking "how to use $operatingSystem?" is a pretty broad question. what do you mean by "how to use"
 
2:54 PM
@Gordon lol sorry, my linux server has gone down and I need to transfer files from one disk to another
 
Good Morning
 
@ircmaxell mornin' sir
 
what's going on?
 
Greetings @ircmaxell
 
@StephenWolfe man rsync
 
3:05 PM
how's it going?
 
hi @ircmaxell
 
Hi all
 
yo
 
3:23 PM
Afternoon folks
Would anyone have an idea why a C ZLIB compressed/b64_encoded string yields rubbish data when using the PHP b64 decode/followed by ZLIB uncompress?
the original data (C-wise) was stored in a struct, where each (instance/counter) contained a float (for example [something+1] would be 1024.5 and [something+2] would be 912.1)
 
4:17 PM
2
Q: Combine an echo and a print in one statement

Michielecho "1" . (print '2') + 3; returns 214. How does the script end up with *14?

love it
> Did you just down voted all other answer than yours ? – FMaz008 8 mins ago
> @FMaz008 no, I did because all answers except mine are wrong. – Gordon 6 mins ago
:D
 
@Gordon
 
@NikiC indeed
 
5:00 PM
What is removed there?
 
@NikiC he wants to be your valentine.
 
@salathe OP temporarily accepted one of the wrong answers ;)
 
codepad.viper-7.com/bJyDHp => crashes locally but not on viper :(
 
different build
 
@NikiC i didnt even know PHP has these functions
 
5:05 PM
isn't ereg stuff deprecated ?
 
@Gordon I didn't either ^^ Fuzzing result
 
at least the simple ( not multibyte stuff ) was
 
@tereško Not the multibyte versions. ereg was mainly deprecated because it didn't support multibyte :)
@tereško Yep, maybe crashes only on debug
 
@NikiC , so being 8x slower then preg had no impact on said decision
not that it would surprise me
 
@tereško I honestly don't know why those functions exist, so don't ask me ;)
 
5:08 PM
when it come to php , "common sense" is a misnomer
 
if Im making a POST request with jquery to insert data in database, and php should return success or fail, should I return this value with return or echo ?
 
@rogcg , depends on where are you returning it
to the client's js app ?
 
yeah
 
trying to ensure this uri routing is done correctly for subsections within my controller... I've come up with this. paste.ubuntu.com/835446 <- output should be "resumed100"
 
then you will use echo or something similar
because you need to create an output , which you return to javascript
 
5:16 PM
got it..
 
@rlemon , you sure about it ? because A() isn't passing anything to route() ..
 
that is a ripped out copy of the code... I likely missed something.
 
it works with what I have implemented.
 
that doesn't make sense
 
5:23 PM
Like I said i missed something... in the copy $this->route(func_get_args())
 
yeah ... that might fix it
 
3 mins ago, by rlemon
that is a ripped out copy of the code... I likely missed something.
my question is how to get rid of the 'if()' check... i messed around with exit but that was a bad idea.
 
if( $this->route() ) return; this ? or this if( $method ) {
 
if( $this->route(func_get_args()) ) return; I messed around and where route() has return false I exit so I could get rid of the if() return but that caused other issues...
function route( $args ) {
     if( condition ) {
           // call func
          exit;
     }
}


$this->route(func_get_args()); // if a condition in route() is met do not process the rest of this function
echo "Hello World!";
but then the function I call before exit calls another class, which does not run.. no errors.
so i'm staying away from exit.
 
i get the feeling that you are asking for fix in your patch of a solution for a problem .. .
 
5:32 PM
no, i'm asking if there is a way to simplify the code any more so I don't have to repeat the if check with each method that can possibly be rerouted.
I don't know if this is really a patch either.. CodeIgniter routing and uri helpers do not (easily) allow rerouting of methods/arguments.. so I wrote this little function to do it for me. but call it what you will.
 
still staring at your code
 
but it seems I have die, exit, and return for possible choices... and none (without additional checks) will exit the parent function as well (without exiting the program)
 
naah .. sorry .. i dont get the problem
 
lol, there is no problem. I'm just trying to reduce the amount of code I have to repeat.
function A() {
		if( $this->route() ) return; // this line gets repeated, so I was trying to make it as small as possible
		echo "resumed";
	}
function Aa() {
		if( $this->route() ) return;
		echo "resumed again";
	}
function Aab() {
		if( $this->route() ) return;
		echo "something else";
	}
 
yeah i'm with teresko. you're not understandably explaining your needs. exit; is too long?
 
5:39 PM
ugh. I don't know proper terminology for all things... so I struggle trying to explain myself. I apologize.
 
> Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
 
to clarify, there is no bug in the code.. I'm trying to optimize the check because it is reused.. let me see if I can't get a better example.. one sec..
 
its okay :] that pretty much defines programming chat.. its a wonder anyone gets their point across
 
you can replace "debug" with "optimize" in that quote
goes of to state at fridge content .. maybe some inspiration will strike me
 
paste.ubuntu.com/835487 Here is a (hopefully) better example of what i'm trying to achieve
it's like 3 lines of code difference... and like 9 characters per 'check', I know it's not a big deal... however i'm sure knowing HOW to do this will help me in the future...
 
5:45 PM
Gah, don't pass objects by reference.
Bad PHP developer, bad!
No cookie!
 
@Charles My PHP experience is limited. and most of it was from early 2000's (02-06).. if you see ways to improve by all means enlighten me. :P
 
No soup for you
 
i thinks this whole thing violates SRP
 
Hey does anyone run their own servers?
 
Sure. In PHP 5, objects are references, so you don't need to ever expressly handle them by reference. `$f = new stdclass(); $e = $f; $f->derp = 'lol'; echo $e->derp;'
gah, sutpid formatting
gah, stupid sutpid.
 
5:48 PM
@Charles turns out I didn't need to pass it by ref... wonders why I thought I did...
 
@StephenWolfe 40 of'em. Why?
 
@StephenWolfe , testing server - yes , most of regulars here do .. public server - only few
 
And yeah, @tereško has a point. Building the routing of requests into the object that handles them is a violation of the Single Responsibility Principal and may make your code more complex than it needs to be.
 
@Charles well my dedicated server just needed rebuilding, and i have all the files on one off the raid drives, and that is being mounted. only problem is i wish to recover all the files/databases and put them back into plesk. i was hoping i could just copy the whole directories and replace them
 
@tereško it does.. but it was a easy way to allow multiple sections to be grouped under a larger whole... and I didn't think having one controller invoke another would be good. call it bad design.. but so far it has been working.. so far..
 
5:51 PM
@StephenWolfe *hiss* Plesk... *hiss*
 
Unless you took a backup using the control panel and can restore it like that, then you're going to have a lot of fun putting things back into just the right place in a way that their wacky configuration crap likes. You might have better luck asking about this process over on Server Fault.
 
@Charles i hate any kind of webserver lol
@Charles well after speaking with fasthost the crappest company in the world they think that i can do this. i have next to no exspirence with lunix
 
@rlemon one controller invoking other usually goes by the name HMVC
 
@StephenWolfe Good luck.
 
5:53 PM
@Charles im just hoping it workds like windows when u replace files it all just works
 
It might. Or it might not, depending on what is being replaced.
 
you pay for that 'simplicity' just saying..
 
well I would .... like to even get the qmail set back up too
 
then start "learning linux"
 
5:55 PM
Well I am right now. I am gutted this server was never configured for backups lol
 
@tereško Thanks! I will read up on this and likely be making some changes to the structure of my code..
 
00:00 - 18:0018:00 - 00:00

« first day (481 days earlier)      last day (4464 days later) »