1,038 Posted Topics

Member Avatar for happygeek

Well, my opinion, which is probably insanely misguided is that it is much like the magnetic charge on a floppy disk's magnetic tape. Which would take a bit more than a fridge magnet to wipe it out but then again memory is exponentially more volatile then the aforementioned floppy disk. …

Member Avatar for ShawnCplus
0
342
Member Avatar for ShawnCplus

I ran across the need to view a specific line of a file so I wrote this up. You can view a line or a range of lines for a file or compare two files. Check the command for the syntax. Drop it in /usr/bin/sln and enjoy.

Member Avatar for ShawnCplus
0
228
Member Avatar for ShawnCplus

So you've got this big long function chain and PHP's oh-so-helpful [B]Fatal Error[/B] messages aren't helping at all. Here's a quick example of how to do a function backtrace without throwing exceptions. [B]Output[/B]: [code] =>[0] => Array ( [file] => someFile.php [line] => 4 ) => Hello World [/code]

0
80
Member Avatar for ShawnCplus

This is a recursive function I made to draw purely CSS bar graphs. You pass it an array of data and the total amount, example: [code=php]$someData = array('Oranges'=>4, 'Apples'=>10); $total = 14; echo drawCSSGraph($someData, $total);[/code] Also, you can pass it options in the form of an array or as space …

Member Avatar for ShawnCplus
-1
144
Member Avatar for Shaffer

I think you mean capitalize. If you capitolize it you turn it into money. I wasn't aware PHP was the philosopher's stone of the 21st century

Member Avatar for Shaffer
0
149
Member Avatar for avgprogramerjoe

A caeser cypher with a shift of 13 is known as ROT13 just incase you didn't know that and it's the easiest cypher I know of to code besides an XOR

Member Avatar for ShawnCplus
0
143
Member Avatar for darkscript
Member Avatar for ShawnCplus
0
594
Member Avatar for eXceed69

It is true '\0' means the end of a string but that is because it is the ASCII NULL code. A string can contain an '\0' before the actual end of the array though nothing after it will be seen when printing the string and there will be another NULL …

Member Avatar for Ancient Dragon
0
134
Member Avatar for ShawnCplus

This program was inspired by my college math 1 class. It takes the values of a1, a2, b1, b2, c1, c2 and solves, displays the equation and shows the work. It also stops if the equation is dependant or inconsistent (Zero division) Cramer's Rule if a1x+b1y=c1 and a2x+b2y=c2 then x=((c1*b2)-(c2*b1))/((a1*b2)-(a2*b1)) …

0
3K
Member Avatar for ShawnCplus

I created a bowling game, Which for the most part works correctly. I toiled for hours trying to figure out how to do the scoring so i gave up. Its fairly simple code so not much of a description needed.

Member Avatar for ShawnCplus
0
2K
Member Avatar for ShawnCplus

Well its fairly self explanatory, its a program that shows that calculates the hypotenuse using the pythagorean theorum, It displays the values of the sides and shows a crappy ascii art right triangle with the values input and the later found values

Member Avatar for manutd
0
215
Member Avatar for ShawnCplus

Ok I greatly modified a tutorial to have a completely different interface, a highscore list and a little tiny really rare easter egg. to get the highscore list. I want to figure out how to sort the highscore list if it is possible. And dont worry about it freaking out, …

0
167
Member Avatar for ShawnCplus

This is the first program I wrote, well besides Hello world. I put about a lot of hours into this code, it started as a divisional calculator than i evolved it so it would ask your name and calculate your average and i was messing around with the system ("") …

Member Avatar for ShawnCplus
0
889
Member Avatar for eagleeye

system ("cls") and other system commands are handy to get a list of all possible system lines that i know of just go Start>run>cmd>help, it gives a list of all commands that you could use some usefull ones are color ie. system("color A") would change the text on the console …

Member Avatar for ankit_the_hawk
0
308
Member Avatar for BlackDice
Member Avatar for venomlash
0
122
Member Avatar for Barman007

Well you have an unclosed/broken tag here on line 62 that may be causing issues [code=html] <div <!--Div class added by Damion -->[/code] Aside from that grab firebug([url]http://getfirebug.com[/url]) for firefox and toy around with the CSS until you get it where you want it then just copy into your file.

Member Avatar for Airshow
0
116
Member Avatar for mark2326l

Your php configuration probably has error_reporting set to 0, set it to 30719 and you'll start seeing errors instead of white screens

Member Avatar for mark2326l
0
213
Member Avatar for Devendra1
Member Avatar for ryuslash
0
116
Member Avatar for feoperro

Javascript strings don't have a trim function, to add one you can do something like [code=javascript] String.prototype.trim = function () { return this.replace(/^\s+|\s+$/, ''); }; somevar = "I have a string with trailing spaces "; somevar_trimmed = somevar.trim(); // "I have a string with trailing spaces" // So yours will …

Member Avatar for Hangfire
0
76
Member Avatar for Susan.LK

[QUOTE=Susan.LK;966249]Hi, I think i am missing something obvious. The popup should bring up a page passing an id. Currently nothing happens but i can see the id is being passed into the varaiable when hovering over Link, how can this be chnaged. Below is part of the code thanks[/QUOTE] A) …

Member Avatar for Susan.LK
0
92
Member Avatar for diafol

Is there some absolutely halting reason that the joomla stuff can't be hosted on the same server? It's not like its that hard to port a database and rsync code

Member Avatar for diafol
0
90
Member Avatar for sam023

PHP has built-in constructs that make it look like a templating language so you don't need the bloat of another templating class. I also prefer this method as people dealing with the files don't have to know what braces mean but its obvious what endwhile means. [code=php] <?php while($row=mysql_fetch_array($result)): ?> …

Member Avatar for somedude3488
0
98
Member Avatar for agrarian

Don't try to mix creating your own json strings [code=php] $objJSON = array('sample' => null); // whatever $objJSON['sample'] = $arr; $objJSON = json_encode($objJSON); echo '<script type="text/javascript">var myJSON = ' . $objJSON . ';</script>[/code]

Member Avatar for agrarian
0
2K
Member Avatar for Jord09

Looks like you have carriage returns in the data do [code=php] fwrite($fp, str_replace("\n", '', (date('d M - H:i') . '||' . $route_dept . '||' . $route_dest . '||' . $route_dist . '||' . $route_demd) . "\n");[/code]

Member Avatar for Jord09
0
105
Member Avatar for cwarn23

Some tips for your code cwarn: Don't use preg_* functions unless absolutely necessary, if you're comparing a static string use strpos or stripos. Define reused regular expressions in one place (you use [icode]/(.*)[.]([^.\?]+)(\?(.*))?/[/icode] three times in the same script, define it once in a variable and use it that way, …

Member Avatar for cwarn23
1
303
Member Avatar for david777

Resource #1 search the forums before posting, Resource #2, use google Resource #3, php.net *quietly ponders how many people will get the hidden PHP joke*

Member Avatar for jay_412
0
87
Member Avatar for crazy4fun

[QUOTE=crazy4fun;953692]I'm new to this technology. I'd be glad if somebody help me in starting this and guiding me where to start? and how to start? to learn this new technology.[/QUOTE] A) Wrong forum, B) Google is your friend, along with php.net and pretty much any of the first million results …

Member Avatar for crazy4fun
0
308
Member Avatar for Lukezzz
Member Avatar for Lukezzz
0
98
Member Avatar for Raymond_Seger

mysql and php with xampp is exactly the same as mysql and php on their own. All XAMPP does is put it in an easy-to-install package

Member Avatar for Raymond_Seger
0
109
Member Avatar for crazy4fun

[QUOTE=crazy4fun;953704]I'm new to this technology. I'd be glad if somebody help me in starting this and guiding me where to start? and how to start? to learn this new technology.[/QUOTE] I already answered this in the other forum where you posted.

Member Avatar for crazy4fun
0
153
Member Avatar for cali_dotcom

The problem is that get_browser returns an array, not an object. use [icode]$b['parent'][/icode], not [icode]$b->parent[/icode]

Member Avatar for cali_dotcom
0
133
Member Avatar for Ana D.
Member Avatar for Ana D.
0
350
Member Avatar for mundetas
Member Avatar for mundetas
0
79
Member Avatar for jojogirl
Member Avatar for almostbob
0
132
Member Avatar for DaveyMoyes
Member Avatar for revatijadhav

[QUOTE=revatijadhav;952761]i want source code for chat in php and mysql[/QUOTE] Cool, how's that working out for you?

Member Avatar for tiger86
0
95
Member Avatar for jeffc418

Strange, I tested it and it works fine for me. O'Reilly matches, Smith matches, Smith-Jacobs matches. The only thing that doesn't match is stuff like @#$%@#

Member Avatar for BzzBee
0
160
Member Avatar for scias23

Your example should work the way you want it. There is no dimensioning of arrays in PHP, space is allocated as necessary.

Member Avatar for scias23
0
319
Member Avatar for digital-ether

The easiest way is method 2. Frankly, there would be very little overhead in comparison to the first method, they're both function calls except one (the magic method... method) doesn't have to do a check to see if __get/set exist since it knows you're calling a function. Now, given that …

Member Avatar for digital-ether
0
454
Member Avatar for khr2003
Member Avatar for khr2003
0
74
Member Avatar for nihinladejoe

A) we can tell you're new, you didn't read that you should use code tags. B) You're missing all of your closing tags. [code=php] } } } }[/code] should go right before the end tag

Member Avatar for ShawnCplus
0
74
Member Avatar for mortalex

Well for both files you aren't ending your option tag when you generate them, it may not be what's causing the problem but it's incorrect nonetheless

Member Avatar for leadinnasirawan
0
137
Member Avatar for garyfrost

Yeah, don't use both mootools and jquery. If you want a lightbox use Thickbox which uses jQuery, I'm not sure what mootabs is so I can't suggest a replacement for that.

Member Avatar for ShawnCplus
0
91
Member Avatar for zupca

[QUOTE=cwarn23;948795]Although I'm not sure how you want the surrounding data split, the data mentioned in post #1 would be matched like the following: [CODE=php]<? $string = '"yZoomedDataMax":82060000,"time":"1980","sizeOption":"_UNISIZE","xLambda":1,"xZoomedDataMin":20273,"yZoomedDataMin":1353355,"stateVersion":3,"xAxisOption":"3","playDuration":15,"iconKeySettings":[{"trailStart":"1980","key":{"dim0":"Netherlands"}},{"trailStart":"1980","key":{"dim0":"Switzerland"}},{"trailStart":"1980","key":{"dim0":"Austria"}}],"yAxisOption":"4","yZoomedIn":false,"xZoomedIn":false,"orderedByY":false,"colorOption":"2"}'; //echo $string; preg_match_all('/\{"([^"]+)":"([^"]+)","([^"]+)":\{"([^"]+)":"([^"]+)"\}\}/',$string,$array); echo '<xmp>'; print_r($array); echo '</xmp>'; ?>[/CODE][/QUOTE] This is marked as solved but it wasn't solved correctly. This just just JSON …

Member Avatar for ShawnCplus
0
98
Member Avatar for Tekkno

You use . to concatenate so [icode]echo ucwords($_SESSION['fname'] . ' ' . $_SESSION['lname']);[/icode]

Member Avatar for Tekkno
0
90
Member Avatar for skipbales

You can't, the form fields must have separate names. If you have a bunch of Select1=blah in the URL only the last one will actually assign the value.

Member Avatar for skipbales
0
102
Member Avatar for esesili

The same exact way you did with Person except replace Person with Patient [code=c++]class Patient : public Person {}; class StudentPatient : public Patient {};[/code] [url]http://www.cprogramming.com/tutorial/lesson20.html[/url]

Member Avatar for mrnutty
0
165
Member Avatar for PatMcC

[QUOTE=BestJewSinceJC;934811]php is not a programming language it is a scripting language.[/QUOTE] Scripting languages are programming languages.

Member Avatar for xeolabs
0
236
Member Avatar for brizhou

> Can someone please conver the following code into a sequence diagram for me? the 4 instances and classes with the life lines are: `theUI:UserInterface`, `theCashPoint:CashPoint`, `theActiveAccount:BankAccount` and `transactions:TransactionList` void CashPoint::m4_produceStatementForBankAccount() const { string statement( p_theActiveAccount_->prepareFormattedStatement()); theUI_.showStatementOnScreen( statement); } string BankAccount::prepareFormattedStatement() const { ostringstream os; //account details os << prepareFormattedAccountDetails(); …

Member Avatar for ShawnCplus
0
106
Member Avatar for brizhou

[QUOTE=brizhou;947127]Please can you help me with the following question? An iterative version of the C++ function TransactionList::getTransactionsForDate is given below. It can be applied to any list of transactions and returns the list of all the transactions for the given date. It only works when the date given is valid. …

Member Avatar for ShawnCplus
0
133

The End.