• Content count

  • Joined

  • Last visited

  • Days Won


rain13 last won the day on August 20 2014

rain13 had the most liked content!

Community Reputation

7 Neutral

About rain13

  • Rank
  1. Hi! I try to use HSQL database manager to create 2 views. I want to create intermediate view first and then use the intermediate view in new view. Like create view a as .... . And then create view b as select x, ... from a. If I write those 2 statements in HSQL database manager and hit 'Execute' query then it tells me user lacks privilege or object not found. However if I enter first create view statement, click "Execute SQL" and then write 2nd SQL statement ans click "Execute SQL" then it works. The same happens when I migrate date from .sql files. If I put these 2 create view statements in separate .sql files it works but if I put them in same .sql file the 2nd one fails because first view is not created yet (the same error I showed before) However I have these statements separated with semicolon so it should not be issue. Any ideas what it is? And how I could make it so that I could have only one .sql file that has both statements instead of having 2 separate files?
  2. Hi. How do I reliably detect input change? At first I tried on change but it didnt work. Now I try onkeypress but it also doesnt work. You always have to press key twice before button changes state. If the input is empty and button is disabled, you have to type either 2 digit number or work around hack is that you type in 1 digit number and then hit one of the arrow keys. The same is when next button is enabled and you delete the text from input. when delete all digits from the input, it will not disable next button until you have pressed something else. Could anyone explain why I always have to key press at least 2 times before it reacts? And how could I fix it so that it would immediately react when it changes? <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <script> function valueChanged(){ var inputValue = $("#interval_size").val(); if (inputValue == "") { $("#generalization_next").prop("disabled", true); } else { $("#generalization_next").prop("disabled", false); } } </script> </head> <body> <input type="number" id="interval_size" onkeypress="valueChanged()"> <input id="generalization_next" type="button" value="Next" disabled="disabled"> </body> </html>
  3. Hello! I want to create my own window in html/css/js which I managed. Now I want to have status bar at the bottom of that window. I am stuck with this because I dont know how to make it consume all width of window (not talking about browser's window but about window I created myself). As I have understood I need position: absolute; to make it stick to bottom. I tried to play with left and right property and even width 100% but nothing helped me. I also dont quite understand why adding position: absolute made my div not to consume all available space. Basically I want my red div to be as wide as it would be without position: absolute; but stick at bottom. The reason for position: absolute; attribute was that bottom didnt work with out it. How should I solve my issue? <!DOCTYPE html> <html> <head> <title>My cool web app</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <script src="./jquery.js"></script> <script src="./jquery-ui.js"></script> <link rel="stylesheet" type="text/css" href="./jquery-ui.css"> </head> <body> <p>Some content in web page</p> <div id="win" style="border: 1px solid rgb(66, 138, 255); position: fixed; left: 552.25px; top: 233.75px; width: 170px; height: 130px; background: rgb(219, 237, 255) none repeat scroll 0% 0%; right: auto; bottom: auto;" class="ui-draggable"> <div style="background:#9CF" id="titlebar" class="ui-draggable-handle"> Window Title <div style="float:right; text-align: left;" onclick="$('#win').remove();"> <img class="icon24" src="./lib/acp/close.png"> </div> <div style="clear:both;"> </div> </div> <div id="wincontent" style="height: 100%; overflow:auto;"> Window content <div style="bottom: 0px; left: 0px; right:0ox; position: absolute; width 100%; background:red;"> Status bar <div></div> </div> <script> $("#win").draggable({ containment: 'window', scroll: false, handle: '#titlebar' }); </script> </body> </html>
  4. You mean to create 2 divs on top of each other? I dont know how to exactly do that. I have tried different examples, but never figured it out. Could you show me minimalistic example?
  5. Hi Right now I have background image with background color but only image gets displayed. I have to remove image if I want color. How do I draw background color on image so that I could get profir from half transparent bg? color: rgb(187, 187, 187); background-color: rgba(255, 81, 81, 0.46); background-image: url(http://orig01.deviantart.net/293b/f/2013/308/7/e/kali_linux_wallpaper_by_blur212-d6szsz7.png); background-repeat: no-repeat; background-attachment: fixed; background-position: center;
  6. Ok after over hour of googling I decided to post here. I get Forbidden You don't have permission to access /test.php on this server. Apache/2.4.18 (Ubuntu) Server at localhost Port 80 in my apache2.conf is: <Directory /> Options FollowSymLinks AllowOverride None Order allow,deny Require all granted Allow from all </Directory> in my 00-default.conf I have DocumentRoot /home/rain/www/ <Directory /home/rain/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> What do I need to do to get access?
  7. Thanks for hints. I dont have my own company. Just wanting to send it to student project contest...
  8. Hello. I would like to use your help. Over years I have developed a software (as a hobby project) that has a loads of functionality (almost like phpbb3 or gallery 3 or cmsimple). Now it is almost ready to be released. With this software you can create websites, blogs, galleries and forums. But I need some ideas for coming up with good name to it. The problem is that if this name contains "CMS" then those who want to build galleries would dismiss it. If it's name contains "gallery" then those who are looking for "CMS" would dismiss it. I dont speak english natively so it would be interesting to see if some of the native speakers can come up with word that describes software that does all these 4 (cms, gallery, blog, forum) things.
  9. I have question. Is there difference in performance when I compare direct file download to download trough php script? By direct download I mean site.com/photos/file.jpg By download trough PHP I mean site.com/download.php?file=123 Am working on web gallery. If offer downloads trough direct link, then I dont need to run php script but I cant have control over downloads and actual file names in server would be revealed. From the other hand if I use php script such as download.php then I would have more control over access and actual file path would remain hidden. Now I am wondering if there is any difference performance wise whether I use direct link or php script? I mean thumbnails page would generate many requests and thats why I am wondering if there is any difference between these 2 options.
  10. Tnx, got it work. Edited the post above so that who ever finds it can now copy-paste this code.
  11. Hello. I made simple php script to download attachments but I have problem that instead of my_file.txt I get upload.php for file name: <?php header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: public"); header("Content-description: File Transfer"); header("Content-type: application"); header('Content-Disposition: attachment; filename="my_file.txt"'); header("Content-Transfer-Encoding: binary"); header("Content-Length: 5"); echo "Hello"; ?> Any suggestions?
  12. Hi Is there way in PHP to convert Adobe RGB to sRGB?I am currently using GD image functions such as imagecreatefromjpeg, imagecreatetruecolor, imagecopyresampled and imagejpeg. to resize the photos. Since I dont have access to Imagick on my host I am limited to GD image functions. The problem with this is that as soon as I resize Adobe RGB image, I see a little bit different colors on resized image. Left is original image, right is after resize.
  13. Tnx for info. How can I make it be 100px height at lease? if I resize li to be >100px then div doesnt change and I didnt find a way to make dives min-height work.