Jump to content
xisto Community

Quatrux

Members
  • Content Count

    2,285
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Quatrux

  1. Oracle seems to be one of the best databases, it's very powerful and is usually used for big organizations, big projects.. I work with oracle and pl/sql quite a lot, and it offers a lot. Also sometimes I need to create a report or a form with oracle report/form builder.MySQL is good for smaller databases, it very well suited for creating websites and storing data into it, but it's also quite powerful for bigger projects too.SQLite is also good for smaller sites, for which MySQL is to big and when you don't want to use regular files as your database, due to permissions and backup things, sometimes it can be a headache with those permisions on a Linux server, due to different users.. You upload files through PHP or somekind of File manager online, the user is different than creating it with PHP.. you always need to CHMOD files..Also, yes, Oracle can be used with PHP, PHP can be used with all the Databases I know.
  2. Oh, just start several output buffers, I do it all the time, I personally have a template system working with output buffering, it's a callback function, and an ob_gzhandler, so this is the way I do it, I made the code to look much simpler. Besides, you also need another ob_start(); without any callback, to return the right content length of the page, due to gzip one is different. so this is how you start using ob_start somewhere in the constructor/start of your script: <?phpob_start();if ( !ob_start("ob_gzhandler") ){ ob_start();}ob_start("ob_templater");?> And somewhere in the destructor/end of the script, where you're sending you page/data to the user, use this method: <?phpob_end_flush();ob_end_flush();header("Content-Length: ". ob_get_length() );header("Content-Type: text/html; charset=UTF-8");ob_end_flush();?> When you're only using ob_start("ob_gzhandler"); then you send the page having 4000 bytes, but the header is sent from apache having 10000 bytes, so the browser might think something is bad, so I suggest/recommend to use the method I'm using and everything will be alright.. Also, when starting output buffering, it's recommended to check different things, I don't do it on my CMS, due to I know how my server works, so I always save several checks, but you can always do this: // Start output bufferingob_start();// Start GZipped output bufferingif (DB_SETTING_IS_SET_TO_USE_GZIP && !headers_sent() && ( ob_get_length() == 0 ) && extension_loaded('zlib') && ( ini_get('zlib.output_compression') != 1 || ini_get('output_handler') != 'ob_gzhandler') ) { # We need to send the right Content-Length header! ob_start("ob_gzhandler"); // Define that we're using gZIP define('GZIP_IS_ON', 1);} and to end this script just use this: // Turn off GZip output bufferingif (defined('GZIP_IS_ON') ) ob_end_flush();// Send the right header for length of the output bufferheader("Content-Length: " . ob_get_length() );// Send the output buffer and turn off output bufferingob_end_flush(); So this is how I'm using it.. As much as I tested, it's as fast as only using one output buffering, you can use even 5 ob_start() if you're needing it, but usually 3 is enough for everything, one for gzip, other for content length and the third one for your custom callback function. You can't use the custom callback for content length, as usually it's used to change content, like replacing {title} to title value from DB or like you do to remove whitespaces, so the content length is changing.
  3. Well, I just tried it on localhost and it works, but I needed to turn those apache modules on through httpd.conf as by default they were not included.. also, I tried another way by using mod_deflate, it seems to work too: # compress text, html, javascript, css, xml:#AddOutputFilterByType DEFLATE text/plain#AddOutputFilterByType DEFLATE text/html#AddOutputFilterByType DEFLATE text/xml#AddOutputFilterByType DEFLATE text/css#AddOutputFilterByType DEFLATE application/xml#AddOutputFilterByType DEFLATE application/xhtml+xml#AddOutputFilterByType DEFLATE application/rss+xml#AddOutputFilterByType DEFLATE application/javascript#AddOutputFilterByType DEFLATE application/x-javascript But when I tried both those methods online on Xisto server, it did not work, so I made a conclusion, that apache doesn't have those modules turned on on the server? mod_deflate and mod_gzip for some kind of reason.. But I surely know it works with PHP on the server using ob_gzhandler, also you can parse css or js files using PHP as I do with gzip turned on. For example, you can make a directory /css/ in that directory put file index.php and parse the css file.. in the HTML I just put a link to the css output by doing /css/?style.css and I send style.css name to PHP and do some checks and parse the right response headers and do the gzip stuff and output it Of coruse, it would be much better to do it with the htaccess method.
  4. Well, from one perspective you're right, but it also depends on people for whom you're doing the website, they might try to use IE6 and will say to you, why those borders aren't round?So I guess, for browsers supporting radius, you can use radius, for other browsers you can use images.. But older Opera or Firefox versions will also not support it.
  5. My way should have worked.. Anyway, at the start of your script, use ob_start(); this will definitely need to work. This is an example, of php file: <?phpob_start();?><html><head><title>Cookies</title></head><body>This sets a cookie<?php // Setting a cookie// setcookie(name, value, expiration);setcookie('test', 45, time()+(60*60*24*7));?></body></html><?phpob_end_flush();?> Besides, removing the <head> is just HTML and it has nothing to do with PHP setting cookies, you need to set cookies or send headers before any output.. If it doesn't work, it means you have send somekind of an output, just look at the source, maybe there's a new line or space or a tab?
  6. Well, Active state Python is more for Windows users, it includes an installer and installs everything on Windows with windows extensions, it's much easier for you to use it. As I know, there doesn't seem to be more serious differences from the python.org which is good for using it with Linux, maybe just expect SSL integration..The programming is still the same
  7. All headers should be written before PHP parses any data, so you should set a cookie before any output.. Or you can use output buffering ob_start() and in that way no data will be send until the script executed and you're able to put cookies and send other headers in any place of your script you want. But it's still recommended to write your scripts that all headers would be send BEFORE any OUTPUT In your case, output is HTML. Sometimes those errors appear and it takes a long time to find there the hell is the output coming from, sometimes you can make mistake and in a class or a function file you put php end tag and push enter, example: <?php...?> Sp PHP sends it as a newline.. so personally I in class or function php files never put the ?> php end tag, it's a good practice. <?php.. So for your example to work, you need to do: The same is with header(); just be sure you don't have any output before this example.. I also recommend to start using output buffering, as you can use ob_gzhandler and gzip your output and that way you can save bandwidth
  8. I still think, that the best way to do round corners is to use CSS and images created with GIMP or any other graphics application, as it will work everywhere.. The problem could be using PNG transparent images, but seems that there are quite good hacks for IE6 to avoid this.The CSS3 radius feature I think will be for the near future, besides I think using images with round corners for a layout is much faster for the browser than using the new features of CSS. :)Of course, using only CSS radius and etc. you will use less connections to the server..
  9. The only really serious algorithm for me was to play with path finding, I used A* Pathfinding algorithm for studies in to find the best path from point a to point b through roads for a car by also measuring different roads speed limits, road signs and etc. It was really interesting to write it.. So as I know those kind of algorithms also work in such applications as GPS in a car or Google maps :)Other algorithms for me was also to write some games.. and of course, sorting and search.. Even though in the studying days we needed to write a lot of mathematical algorithms, but usually a lot of them were written in books, so you just needed to implement them the way the home work and etc. required.
  10. To add my two cents, it would be bad if only google would be left as the only search engine, even though it seems that a lot of people are using it, making it fully monopolized would mean it could control information. Today we can compare the search results and it seems that google search engine doesn't work as it used to, you won't find small sites with much more relevant information for you, due to page ranking.Competition is the only thing which make search engine algorithms better. If there wouldn't be any competition, who would worry about how it works as long as you get income and don't have to worry about others taking your market share.
  11. Of course it's best to do it with PHP somewhere in your script, to control it much easier, but sometimes some websites are just plain html files.. For PHP files, you can turn on these features through .htaccess by using php_value with attributes; But for plain HTML files, I just found this code to use in .htacces, so maybe it will work for you? as I currently have no way to test it; <ifModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*</ifModule> Source: http://forums.xisto.com/no_longer_exists/
  12. Well, by watching different movies, different conspiracies, by reading and hearing "logical" explanations that only aliens could help them, you start to believe, even though I don't see anything so special about it, triangles are one of the simplest forms and everyone starts from learning a dot, a line, then a triangle :)To believe, sometimes is quite good.. I also believe in aliens and have several theories about life on earth, but I still am a realist, it can be a hobby to believe in aliens, people should more seriously learn history
  13. Objective-C is quite a good language, besides it got much much popular when apple started using it, even the tiobe ratings got it in Top 10 most popular languages this year as I remember, before it was a quite unpopular language. I also like the fact, that apple does not support flash ;]By TIOBE ratings:In June 2009 it was in the 45 position, but Today in June 2010 it in the 9 position So it's really getting popular ;]
  14. As I know, human brain is much more powerful than any machine we humans have ever created, even our body is much more powerful and has bigger capacity than any computers at all at this kind of sizes.. Yet!But I guess human brain can evolve too, as we don't use it at full power? In theory, robots can be made as humans, they just can't have a soul, but can have everything else..It's a matter of time I guess, we will see more in the future of how computers will continue to work
  15. I also noticed that they don't list every number from 0 to 9999, but it's quite a nice page, I wonder who were so borred to create it, even though maybe it's from some kind of a book? :DI guess it's not so hard to tell something about other numbers too, which are missing, just you need to get somekind of s result with it. and tell how you got it
  16. I believe in aliens as living somewhere far in some kind of a form, due to the universe as we see it is very large, but I doubt they came here to Earth, they might be less intelligent than we or they can be more intelligent, but still to travel these kind of distances.. it is quite hard, even to get some kind of a signal traveling the speed of light is hard, there could be millions of planets like Earth, but I also am afraid, that humans can destroy themselves some time in the future or maybe not?All those UFO sighting in my opinion are photoshoped, or a mistake, or some light, or something made by human..
  17. Sounds funny, but it's quite good I could tell you, maybe next time he won't yell on the parrot and won't threat it? :DI doubt something like that would ever happen in my country, the police would just come, calm down the teenager
  18. I read and saw Asus slate, but I don't really know which one is the new one? could you give a link or be more informative about it?Is the new one, which is fully with touchscreen? I mean has a dual touchscreen? or what?
  19. Well, the java script: in an url is used if you want to call a javascript function or something, it can be not only alert() but any function you defined.. I still prefer to use events using simple onclick="" or even better would be to use a javascript framework like jQuery and use .click and so on. But an example with javascript in an url would be defining you own javascript function.. <html><head><script type="text/javascript">function displaymessage(){alert("Hello World!");}</script></head><body><a href="java script:displaymessage()">Click me</a><p>By pressing the link above, a function will be called. The function will alert a message.</p></body></html> So you'll get an HTML page, and when clicking the link, it will call the javascript function displaymessage() but in fact it's the same as setting a onclick event.. I think this method shouldn't be used, instead use events and leave the links as they should be, hyperlinks, due to some browsers may have javascript turned off and the link won't do anything. Seems like the forum splits the word javascript to java script if you use it together with : so it should be "javascript+:" without the +
  20. I didn't bought an iPad and won't ever buy it :)I don't see any reason or point to use it, so it's out of a question for me. I also doubt it will be as popular as iPod or iPhone? or maybe? :DI don't even have an iPhone as it's not a comfortable phone for me, it has to many options, all I want my cell phone is to call and get sms, even though I have sony ericsson which is able to play mp3, has a camera and all that stuff, but I don't really need those features, but they exist
  21. I also am using Pidgin for MSN, Yahoo, Jabber, but I don't use it for IRC, as it much more comfortable to use IRC using XChat for me, but also I use Skype separately. But as everyone moved to Skype, well most of people I usually chat, I just have Pidgin on and stay online for several people to talk to :)And I guess Google Buzz didn't made it, as I usually don't see a lot of talk about it and a lot of interest to get it.
  22. I used to read uncyclopedia for a while, it's quite fun, usually I got to such links posted on a forum or in a chat. I also like to look around encyclopedia dramatica as you can find very funny articles But you need to understand that those kind of sites are for fun :)I stopped trying to write in topics about religion, politics and etc. too and just sometimes read the news or some articles which usually or longer or even watch some documentary movie from the "New World Order" series which sometimes are scary and sometimes funny ;)Usually there is no point to be involved in discussions about religion and politics in some kind of a forum as it goes nowhere, of course it depends on members who are posting there, I usually for several years now try to avoid them :PI don't even read about religion or politics in wikipedia, unless I search for something specific, about history of something or for some facts I need for something. It's good that wikipedia has references.
  23. Well, it's a fact, in my country before Skype, IRC was very popular, everyone used it, but now on the same my countries most popular server, only some people are using it, everyone moved to Skype, due to it is better? In some way it has more features, but I stil prefer IRC, even though I use Skype.
  24. Maybe it depends how it's promoted, the reason that no one is using MSN in my country is that they won't find any friends there, due to most of them use Skype, so more and more people continue to install Skype and use it. I guess in America it was something like that with MSN or Yahoo.I only use MSN to connect to my friends living in New Zealand or USA or Australia, due to I know they use it.
  25. Well, I think you could read this article, it's quite a good review on 25 HTML editors which include WYSIWYG http://forums.xisto.com/no_longer_exists/
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.