CrazyPensil
Members-
Content Count
43 -
Joined
-
Last visited
Everything posted by CrazyPensil
-
Variable From Line Further Then Current Line?
CrazyPensil replied to bakr_2k5's topic in Programming
<html><head><?php switch($_GET['page']) { case "foo": include("foo.php"); #- - - - from foo.php - - - - $var1 = "what ever you want"; #- - - - end from foo.php - - - - break; } echo "<title>$var1</title>;?> -
I'm quite keen on nuclear physic and chemistry, but due to my teenager being, I'm not able to get all the knowledges I wanna gain=( Now, I wanna ask: In a Hydrogen bomb, We get a lot of H atoms under a big pressure; when the bomb collapses, they come too close, join together and form a He atom... My chemistry teacher told that that action frees a freat energy... But where is that energy taken from?! That's the question I ask you, dear ladies and Jeantlemen.... Hope you're good enough at Those subjects=)
-
Huh... I think the best site to expand your knowledge about PHP is php.net....Really, all of them sux in comparision to this) At least the function refference... forums, open-sources.... etc..The best one.
-
Teach Me English=) Lets just talk here...
CrazyPensil replied to CrazyPensil's topic in General Discussion
Thanks for mantioning(correctly spelled?) all my mistakes.... I'mma remember those...Thanks for a good mark, but i don't think the one of mine is above 3.5) I know, but when i was creating my nickname, i did not... Later I learned the real spelling, but decided to keep that variant. Also, it reminded me the 'pensive' word)Some questions have emerged(came out, gone off, shown up, appeared, rised up, ......?) about your post: goo=? aid=? Ummmm... isn't it spelled as 'decade'? -
Teach Me English=) Lets just talk here...
CrazyPensil replied to CrazyPensil's topic in General Discussion
It's from old turkish... I't smth that is like... "Hey"... No turkish men use it at the moment. -
First of all, thank u 4 that u entered this topic;)I've created it just to get some practice of English(mostly slang).Let me tell my story first...I'm a russian guy of 15 years old. I was born in St.Petersburg in a poor family and my life was desaturated with all those stuff that most of others had, such as cool toys etc.Years passed, and i attended to a local school. By that time my dad has died, but also, strangely, we got rid of the money problem....After 7 years, i passed the exams to an international lycee, funded by a famous turkish firm called 'Tolerance'. There i've learned english, made a plenty of friends etc. I'm studying here for 3rd year already. Through the uneasy years, i got over a lot of promlems etc... Now i'm quite good at programming, turkish and in english(4 russia it's good enough). I started out this topic 'cause i wanna improve my english as much as it's possible... wanna learn all those daily-speech expressions, slang, a lot of phrasal verbs etc.What i want from you all is:1) read my messages and point me my mistakes(of course, the correct way of writing should be told too)2) write here too, trying to use high english, of course=). So now, i ask all the people read this, to write their own story... if you do, wait for questions;]With the best wishes, from russia)
-
Wow=)Nice, i didn't know the mechanisms all those ready databases store info) I was always using my own mechanism, that was including my method of encrypting and all those splitters etc... I developed my own engine. And now i found that the algorithms of those brands are not so far from mine) Actually, they're almost the same, but i don't have the 'date'&'time' datatype.... Eventually, i don't accept these to be so implortant and use to store these as floats) Anyway, it seems that the problem our friend haitamlong raised up is already over and he got his answers(right, man? ). With the best wishes..... Me, just a russian lad;)
-
Huh.... First of all, u're intending to make a runescape-like online-game, right? Then, your work would consist of 2 parts: 1)Static part, can be Java or Flash. It would be on each user's computer ant it will be only sending data(variables, etc) to the server. And will also get data from the server and convert it to suitable for user view. 2)Dynamic part, would be placed on server(PHP,c,c++,Perl,ASP etc...) would be getting data from users, proceeding it, storing, and giving respond to the ser. So, you gotta know all these;) I't not that easy, man)
-
Mostly, I agree with yordan, but... just why don't you create a PHP-file that declares a variable($pass, for example), and assignes it md5() value of the pass. then, while checking password, you md5() input of user, include the file with password, then compare $pass&$input, and if they match, let the user in. 2yordan:
-
Php :: Image Pixel Per Inch And Conversion Please Guide
CrazyPensil replied to Zeeshan Hashmi's topic in Programming
GD Library: As your script uploads it, you make following: resource imagecreatefromjpeg ( string filename ); //if it's not jpeg - there may be gif/png/etc bool imagecopyresampled ( resource dst_image, resource src_image, int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h ); bool imagejpeg ( resource image [, string filename [, int quality]] ); Don't have time now, gonna write others a bit later. -
Hello there!Don't wanna read previous posts and your question might be already answered... anyway;)I prefer the NullStudio phpEd. Don't remember the link to download, but I think you may easily find a lot of.Also a good one is PHP Expert Editor(developer - Ankor). The linkage situation is same as with previos one.All these are most for editting. (1st one can proceed some scripts, but more dificult are not to be runned).Advanced scripts can be runned using Server emulation applications such as Apache, Sokkit, ColdFusion etc...Again, I'm givin' no links...You may assume that I'm lazy to go for searching all these on the Internet...And you'll be completely right=]OK, my opinion&advice is here... Good luck in your searches)
-
A Good Logical Question.... Yep, its me.... Again ;)
CrazyPensil replied to CrazyPensil's topic in Programming
OK, I re-word in a simpler way.Formula gets the data: - Number of AP bot has - Set of actions with cost of each oneAnd gives out the amount of combinations where some of actions ore chosen, but total cost of actions in each combination doesn't exceed total number of AP bot has. -
Again I've faced up with a problem... I'm writing a simple AI for a bot, but it still works in a slow way :*( So, the thing I'mma ask you, dear programmers, is that one: We've got a set of actions that can be done(n). Each action requires a certain amount of ActionPoints(AP) Bot has an unknown amount of ap(m) So, we must find Number of possible combinations, given total number of AP, array of actions and their costs. As you might understand, I need the formula. Don't suggest any ways to find the combinations themselves - this is already done by me, that formula would a great deal accelerate the process.
-
Running C Applications By Php (C - daemon)
CrazyPensil replied to CrazyPensil's topic in Programming
Thanks for your help... But.... Humm... I've a little bit exaggerated with "a little of Unix knowledge".... Coul you tell the correct chmod? -
I've faced up with a promlem. I've written a C-daemon(NOT C++ || C#) which needs to be run by a php-script on a UNIX-server. Can anybody explain me how to do this one using php's exec() or passthru() functions(I don't know unix)
-
look. I' ve got such a script to add news: if($mess&&$subj) { $fp=fopen("news.txt", "a"); $d=date("d").".".date("m").".".date("Y"); $c=0; if(file_exists("news.txt")&&filesize("news.txt")>0) { if($c==0) { $news="<nnn>|$subj|$d|$login|$mess\n"; } else { $news="<nnn>|$subj|$d|$login|$mess"; } } else { if($c==0) { $news="|$subj|$d|$login|$mess\n"; } else { $news="|$subj|$d|$login|$mess"; } } fwrite($fp,$news); fclose($fp); $m="ĂÎâÎùòß óùïüøĂĂŽ äÎåà âÍüĂĂ !"; } elseif(!$mess&&$subj) { $m="How about subject?"; } elseif(!$subj&&$mess) { $m="How abot message?"; } else { $m="Complete the following forms:"; } such a one for viewing it: <?php if(file_exists("news.txt")&&filesize("news.txt")!=0) { $fp=fopen("news.txt", "r"); $newss=""; while (!feof($fp)) { $line = fgets($fp, 4096); $newss.=$line; } fclose($fp); $news=explode("<nnn>", $newss); $i=0; $br=""; foreach ($news as $n) { $p=explode("|", $n); if($i>0) { $br="<br>"; } print "$br<div class=\"news\">\n<div class=\"newtitle\"> $p[1]($p[2]), <font class=\"part\">By $p[3]</div></font>\n<div class=\"newbody\"><pre>$p[4]</pre></div></div>"; $c+=4; $i++; } } else { print "<center><div class=\"nonews\">ĂÎâÎùòüÊ Ăüò!</div></center>"; $c++; }?> how should I upgrade it in such a way that my newbody doesn't resize.I mean I wana let there be only n chars on each page. Please, help me with this one!!! P.S. my style file: A:link { COLOR: #222222; FONT-FAMILY: Verdana; TEXT-DECORATION: none;}A:active { COLOR: #222222; FONT-FAMILY: Verdana; TEXT-DECORATION: none;}A:visited { COLOR: #222222; FONT-FAMILY: Verdana; TEXT-DECORATION: none;}A:hover { color: #ffee00; FONT-FAMILY: Verdana; TEXT-DECORATION: none;}hr { height: 1px;}body { scrollbar-face-color : #4444ff; scrollbar-shadow-color : #4444ff; scrollbar-highlight-color : #4444ff; scrollbar-3dlight-color : #4444ff; scrollbar-darkshadow-color : #4444ff; scrollbar-track-color : #4444ff; scrollbar-arrow-color : #ffee00; font-family: verdana; color: #ffffff; margin-left: 30px; margin-right: 30px; margin-top: 1px; background-color: #808080;}.gb { margin-left: 100px; margin-right: 10px;}div.refuse { color: red; font-weight: bold;}div.nonews { font-family: verdana; margin-left: 3px; margin-right: 3px; background-color: #256E87; border: solid white 1px;}div.mess { margin-top: 3px; margin-bottom: 3px; border: solid white 1px;}div.news { margin-left: 3px; margin-top: 3px; margin-right: 3px; margin-bottom: 3px; border: solid white 1px;}div.newtitle { font-family: verdana; background-color: #256E87; border-bottom: solid white 1px; padding: 2px 3px 1px 4px;}div.newbody { font-family: verdana; font-size: 10pt; top: 27px; margin-left: 15px; padding: 2px; overflow: auto; background-color #000000;}.part { color: #faa664; font-weight: bold;}Table { border: solid white 0px;}tr { border: solid #B9E6F6 1px;}td { border: solid #B9E6F6 1px;}td.h { border: solid #B9E6F6 1px; color: #1D3A46;}input { border: solid #B9E6F6 1px; background-color: white;}
-
Some things are changed. We'd better to communicate here, since most of us need to earn credits somehow. And, come on!!! almost everybody will be accepted. Don't be that much shy, people
-
Decrementing Number Of Digits Ofter Point In C#
CrazyPensil replied to CrazyPensil's topic in Programming
Thank you very much too, dear admin I havent't thought about this one a good method. anyway, the problem is already solved;) -
Well, First of all, There will be sections of organisation(PHP section, Per; section, C# section etc). Communicating will be performed on our official website that would be done by the time enough members join us. As for that it's only in PHP topic, you're completely right and it should be placed in each programming subtopic. or if the moders would be that much kind and wouldcreate a general topic for that one (yeah, It's a gentle hint )
-
Decrementing Number Of Digits Ofter Point In C#
CrazyPensil replied to CrazyPensil's topic in Programming
Thanks, You've helped a lot -
Hi! I've been solving a problem on C# and a one problem had gone off. I need to decrease number of digits of a float variable.for example:If I have 14.3413543485I wanna make it just 14.34.My Informatic teacher says there is a way, but he'd forgot it. Could you, please, help me?
-
Hi, Ev'ryone. I've got a suggestion for the ones that are quite capable af web-programming. Let us make an organisation, an association of programmers. The aim of that association will be to help eachother while programming. If you're in that organisation, and a problem you couldn't solve yourself turns up, you may suddenly leave it on our forum and it will be solved together. To join it, Leave here your suggestion.
-
Display Text If Line Not Empty In Config File
CrazyPensil replied to nightfox1405241487's topic in Programming
simply, <?phpinclude("config.cfg");if($announcementOn) { if($announcement) { print $announcement; } else { print "No announcement!"; }}?> -
How Do You Create A Secure Loging? with PHP and mySQL
CrazyPensil replied to Kushika's topic in Programming
I won't repeat everything once more) just see my answer a bit below your topic.