logs archiveIRC Archive / Freenode / #php / 2006 / June / 3 / 1
foo
Haha. I think I killed the conversation.
Wolfpaws
yep
murdered. You'll hang for this!
foo
(Action) runs
theoCode
is there a way to connect to a openoffice base database with php, through odbc or otherwise?
Wolfpaws
google for it
theoCode
I have been.. I am not finding anything
hence why I came on here to ask
zircu
i'm not sure why you would want to
Wolfpaws
zircu: That's the new 'access'
zircu
that re-enforces my question :)
         

Wolfpaws
*nod* :)
zircu
they are usually used for desktop db's
theoCode
yup, like keeping track of my cd collection
Jymmm
heh, at least he didn't say his MP3 collection =)
Wolfpaws
lol
theoCode
heh
Jymmm
VERY COOL.... http://mrl.nyu.edu/~jhan/ledtouch/index.html
I think I'm gonna make one (or something like it)
punkyMunky3000
say ya'll, Is it possible to make an array w/ duplicate keys
arpad
no
punkyMunky3000
crap
NeoThermic
Jymmm: Hmm, I don't quite get how that is working
Jymmm
$arr[][][]
NeoThermic it's using the LED's as INPUTS
punkyMunky3000
how about something like array_search that will search the key vals
Wolfpaws
array_keys
punkyMunky3000
thx
NeoThermic
how though? I thought LED's were output compomnets only
twodeko
howdy all
is there a way to take two MySQL datetime fields and find the difference between the two times
Jymmm
NeoThermic Usually yes, but by revere biasing the LED's your able to use them as inputs.
twodeko
like "3 hours 4 minutes"
Wolfpaws
twodeko: #mysql
         

Jymmm
NeoThermic: http://motestruments.com/led-touch-sensor-circuit/
twodeko
Wolfpaws, i have them in a php array
and figured the time() function would do something like this
Jymmm
NeoThermic I think it's totally fscking cool... no more mechanical switches, can be installed almost anywhere.
Wolfpaws
I have doubts that time() would do something like that...
Jymmm
and cheap as can be
Wolfpaws
twodeko: Use MySQL date functions. #mysql
||cw
twodeko: strtotime() and do some math
twodeko
thanks Wolfpaws
NeoThermic
Jymmm: wow. I never knew you could do that.
Jymmm
NeoThermic Basically, it's exploiting the physics of LEDs
NeoThermic
I'll have to try that myself
Exploiting physics, one LED switch at a time!
Jymmm
NeoThermic I already have a BASIC STMAP and LEDs, so this will be cool.
Kamil-
hello
anyone?
Wolfpaws
!tell Kamil- about g1
Kamil-
which variable do i need to retrieve information from site
Wolfpaws
$_SERVER or $_VAR usually
er... $_ENV
mattmcc
What sort of information? :)
Wolfpaws
oh, that too :)
Kamil-
top 10 albums from a link
Wolfpaws
Er... What?
Kamil-
i read w3schools tutorial, they dont have this $_SERVER or $_VAR in their tutorial
Wolfpaws
Ah... I understood "server"... php.net/file_get_contents()
Xen0n
which has less overhead? checking if a class exists, and including its file if it doesnt, or just using require_once ?
Wolfpaws
minus ()
Xen0n
both will achieve the same effect, yes?
Wolfpaws
I'd go with require_once()
||cw
Xen0n: just require_once, the backend C code is faster than running 2 php lines
Xen0n
well, i use require_once() for the include anyway... but i should skip if (class_exists($class)) first if there are no files with duplicate classes, yes?
acidjazz_
ok so i need to use/write a function that gives me the difference of two variables, no matter what cars or how big they are, so like $var1 = 'qweqwebobqweqwe123' $var2 = 'qweqweqweqwe' the function will return 'bob123', etc. any ideas?
Xen0n
actually... ugh..
||cw, just realised, a little more complicated - i need to check for file existance too...
require_once would create a fatal error...
or.. should i use include_once and suppress errors, then check the return value?
hmmm
not making much sense here i dont think :(
Crell42
Is there any memory difference between 5 arrays and an array of those same 5 arrays?
TML
acidjazz_: Using PHP5?
Crell42: Sure
acidjazz_
TML: yes php5
TML
acidjazz_: join("", array_diff(str_split("qweqwebobqweqwe123"), str_split("qweqweqweqwe")));
Crell42
TML: How much?
TML
Crell42: about the size of one array structure
Give or take a few bytes
Crell42
Is that a constant size?
TML
No
Crell42
Is it enough to justify an API that is incapable of handling multi-dimensional arrays as a way to create a table?
TML
No
Well...not IMO, but that's really up to the API author.
bewest
is php5 backwards compatible to run all php4 scripts?
Crell42
The API author is my coworker who I really think is incompetent about now.
TML
bewest: Absolutely not
acidjazz_
TML; thats on a character basis
TML; i need this to accomodate order as well
TML
Crell42: I'm rather incompetent about now as well. I'm much better about 6 weeks from now, and I get even better the further off from "now" we get.
acidjazz_: What do you mean?
acidjazz_: That does in-order traversal of both arrays simultaneously, so you'll get the "diff" out in the same order as the were in the input.
Crell42
TML: LOL. One of those weeks, eh?
TML
Crell42: No, I've just never been any good at dealing with the "Now"
I'm more of a "live six weeks in the future at the cost of the present"
(kind of guy)
Xen0n
Hmmm
This might be asking something stupid.... but is it possible to have a public static method that is NOT inherited by subclasses?
TML
Xen0n: php.net/language.oop5.final
Xen0n
i thought final meant it couldnt be overloaded....
TML
Xen0n: I misunderstood your question, it would seem
Xen0n
hehe
TML
Oh, you mean it's not *visible* in the child?
Xen0n
i mean its not there...
Crell42
TML: hehe. T'would be nice to be able to.
Xen0n
but i guess making it private in child would have same effect
can do that?
TML
Xen0n: Well, it's going to be there, because it's in the parent, and it's public.
Xen0n
right
TML
You can't change the rules of OOP arbitrarily. :)
Xen0n
and i cant change its access either?
hehe
I didnt think i could
But i thought maybe there was a part of OOP that i had overlooked :P
TML
Why would you even want such a thing?
Xen0n
hehe
Because i want to be lazy and drop my factory class
roll the static methods into the main class
but never mind ^_^
TML
o.O
Xen0n
was just a thought - if its not possible, i'm not going to sweat it
and anyway, i should probably keep those static methods OUT of the main classes :D
TML
yes
Xen0n
hehe
TML
Hence the "o.O"
Xen0n
Dont mind me - i used up all the energy in my body today, not firing on all cylinders...
I really love the "singleton" design pattern though
nice for breaking a project up into modules
cwebber
is any1 running php4 on nsapi?
Xen0n
Another efficiency question - which is better, loading all the classes you know you are going to need, and then using __autoload() for the rest, or just letting __autoload() load everything as needeD?
timmy2
j #web
Xen0n
does __autoload() create any significant overheads?
cwebber
are there any incompatabilites i should watch for when moving from php4 to php5?
Xen0n
cwebber, depends on how much your scripts rely on PHP4 "quirks"
Phaaze
can you have an and in an if statement? if($this == '1' and $that == '1') { }
Xen0n
register_globals et al.
Phaaze, yup - but a lot of people prefer to use &&
Phaaze
Reason being?
Xen0n
possibly more readable that way, i think
Phaaze
Is there a reason or just personal preference against the and/&&
McFly
and I prefer to use if('1' == $this && '1' == $that)
Phaaze
Also would have have to do if(($this == '1') and ($that == '1') {}?
Xen0n
http://uk.php.net/manual/en/language.operators.php#language.operators.precedence
TML
Phaaze: They have difference precedence
McFly
putting the string first will catch the error of using = instead of ==
TML
McFly: While true, I've never once, not in 11+ years of programming, made that error.
Jy
McFly, i learned that the hard way to do 1 == $this years ago when i had $this = 1 and overlooked the single = for at least an hour
McFly
TML: I've made it way too many times to count, you're obviously more careful than I
Xen0n
TML, you must be the most perfect typist in the world then
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 next »