Search Results

Search found 422 results on 17 pages for 'marco demaio'.

Page 8/17 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Trying to install gnome 3 through ubuntu 11.10

    - by Marco
    I keep getting this error when I try to install gnome 3 from the software center-- The following packages have unmet dependencies: gnome: Depends: gnome-core (= 1:3.0+1ubuntu1) but 1:3.0+1ubuntu1 is to be installed I did install what they needed from this website https://launchpad.net/ubuntu/oneiric/amd64/gnome-core-devel/1:3.0+1ubuntu1 but nothing really changed, I kept getting the same error message.

    Read the article

  • close file with fclose() but file still in use

    - by Marco
    Hi all, I've got a problem with deleting/overwriting a file using my program which is also being used(read) by my program. The problem seems to be that because of the fact my program is reading data from the file (output.txt) it puts the file in a 'in use' state which makes it impossible to delete or overwrite the file. I don't understand why the file stays 'in use' because I close the file after use with fclose(); this is my code: bool bBool = true while(bBool){ //Run myprogram.exe tot generate (a new) output.txt //Create file pointer and open file FILE* pInputFile = NULL; pInputFile = fopen("output.txt", "r"); // //then I do some reading using fscanf() // //And when I'm done reading I close the file using fclose() fclose(pInputFile); //The next step is deleting the output.txt if( remove( "output.txt" ) == -1 ){ //ERROR }else{ //Succesfull } } I use fclose() to close the file but the file remains in use by my program until my program is totally shut down. What is the solution to free the file so it can be deleted/overwrited? In reality my code isn't a loop without an end ; ) Thanks in advance! Marco Update Like ask a part of my code which also generates the file 'in use'. This is not a loop and this function is being called from the main(); Here is a piece of code: int iShapeNr = 0; void firstRun() { //Run program that generates output.txt runProgram(); //Open Shape data file FILE* pInputFile = NULL; int iNumber = 0; pInputFile = fopen("output.txt", "r"); //Put all orientations of al detected shapes in an array int iShapeNr = 0; int iRotationBuffer[1024];//1024 is maximum detectable shapes, can be changed in RoboRealm int iXMinBuffer[1024]; int iXMaxBuffer[1024]; int iYMinBuffer[1024]; int iYMaxBuffer[1024]; while(feof(pInputFile) == 0){ for(int i=0;i<9;i++){ fscanf(pInputFile, "%d", &iNumber); fscanf(pInputFile, ","); if(i == 1) { iRotationBuffer[iShapeNr] = iNumber; } if(i == 3){//xmin iXMinBuffer[iShapeNr] = iNumber; } if(i == 4){//xmax iXMaxBuffer[iShapeNr] = iNumber; } if(i == 5){//ymin iYMinBuffer[iShapeNr] = iNumber; } if(i == 6){//ymax iYMaxBuffer[iShapeNr] = iNumber; } } iShapeNr++; } fflush(pInputFile); fclose(pInputFile); } The while loop parses the file. The output.txt contains sets of 9 variables, the number of sets is unknown but always in sets of 9. output.txt could contain for example: 0,1,2,3,4,5,6,7,8,8,7,6,5,4,1,2,3,0

    Read the article

  • attachEvent inserts events at the begin of the queue while addEventListener appends events to the qu

    - by Marco Demaio
    I use this simple working function to add events: function AppendEvent(html_element, event_name, event_function) { if(html_element) { if(html_element.attachEvent) //IE html_element.attachEvent("on" + event_name, event_function); else if(html_element.addEventListener) //FF html_element.addEventListener(event_name, event_function, false); }; } While doing this simple test: AppendEvent(window, 'load', function(){alert('load 1');}); AppendEvent(window, 'load', function(){alert('load 2');}); I noticed that FF3.6 addEventListener appends each new events at the end of the events' queue, therefor in the above example you would get two alerts saying 'load 1' 'load 2'. On the other side IE7 attachEvent inserts each new events at the begining of the events' queue, therefor in the above example you would get to alerts saying 'load 2' 'load 1'. Is there a way to fix this and make both to work in the same way? Thanks!

    Read the article

  • Deploying a PHP Library project with Maven

    - by Marco
    Hi, I've created a PHP Library project using Maven, and I'm now ready for its deployment. Following the instructions at http://www.php-maven.org/deploy.html, something went wrong. The configuration is set to: <descriptorRef>php-lib</descriptorRef> During the execution of mvn deploy I get a list of errors for unfound dependencies in the repository: [INFO] [jar:jar {execution: default-jar}] [INFO] Building jar: /home/marco/projects/php/my-app/target/my-app-1.0-SNAPSHOT.jar [INFO] [plugin:addPluginArtifactMetadata {execution: default-addPluginArtifactMetadata}] Downloading: http://repo1.php-maven.org/release/org/phpmaven/maven-php-plugin/2.2-beta-2/maven-php-plugin-2.2-beta-2.pom [INFO] Unable to find resource 'org.phpmaven:maven-php-plugin:pom:2.2-beta-2' in repository release-repo1.php-maven.org (http://repo1.php-maven.org/release) Downloading: http://repo1.maven.org/maven2/org/phpmaven/maven-php-plugin/2.2-beta-2/maven-php-plugin-2.2-beta-2.pom [INFO] Unable to find resource 'org.phpmaven:maven-php-plugin:pom:2.2-beta-2' in repository central (http://repo1.maven.org/maven2) Downloading: http://repo1.php-maven.org/release/org/phpmaven/maven-php-plugin/2.2-beta-2/maven-php-plugin-2.2-beta-2.pom [INFO] Unable to find resource 'org.phpmaven:maven-php-plugin:pom:2.2-beta-2' in repository release-repo1.php-maven.org (http://repo1.php-maven.org/release) Downloading: http://repo1.maven.org/maven2/org/phpmaven/maven-php-plugin/2.2-beta-2/maven-php-plugin-2.2-beta-2.pom [INFO] Unable to find resource 'org.phpmaven:maven-php-plugin:pom:2.2-beta-2' in repository central (http://repo1.maven.org/maven2) Downloading: http://repo1.php-maven.org/release/org/apache/maven/wagon/wagon-http-shared/1.0-beta-6/wagon-http-shared-1.0-beta-6.pom [INFO] Unable to find resource 'org.apache.maven.wagon:wagon-http-shared:pom:1.0-beta-6' in repository release-repo1.php-maven.org (http://repo1.php-maven.org/release) Downloading: http://repo1.php-maven.org/release/org/apache/maven/wagon/wagon-http-shared/1.0-beta-6/wagon-http-shared-1.0-beta-6.pom [INFO] Unable to find resource 'org.apache.maven.wagon:wagon-http-shared:pom:1.0-beta-6' in repository release-repo1.php-maven.org (http://repo1.php-maven.org/release) Downloading: http://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-http-shared/1.0-beta-6/wagon-http-shared-1.0-beta-6.pom Downloading: http://repo1.php-maven.org/release/nekohtml/xercesMinimal/1.9.6.2/xercesMinimal-1.9.6.2.pom [INFO] Unable to find resource 'nekohtml:xercesMinimal:pom:1.9.6.2' in repository release-repo1.php-maven.org (http://repo1.php-maven.org/release) Downloading: http://repo1.php-maven.org/release/nekohtml/xercesMinimal/1.9.6.2/xercesMinimal-1.9.6.2.pom [INFO] Unable to find resource 'nekohtml:xercesMinimal:pom:1.9.6.2' in repository release-repo1.php-maven.org (http://repo1.php-maven.org/release) Downloading: http://repo1.maven.org/maven2/nekohtml/xercesMinimal/1.9.6.2/xercesMinimal-1.9.6.2.pom And this is my settings.xml file: <settings> <profiles> <profile> <id>profile-php-maven</id> <pluginRepositories> <pluginRepository> <id>release-repo1.php-maven.org</id> <name>PHP-Maven 2 Release Repository</name> <url>http://repo1.php-maven.org/release</url> <releases> <enabled>true</enabled> </releases> </pluginRepository> <pluginRepository> <id>snapshot-repo1.php-maven.org</id> <name>PHP-Maven 2 Snapshot Repository</name> <url>http://repo1.php-maven.org/snapshot</url> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </pluginRepository> </pluginRepositories> <repositories> <repository> <id>release-repo1.php-maven.org</id> <name>PHP-Maven 2 Release Repository</name> <url>http://repo1.php-maven.org/release</url> <releases> <enabled>true</enabled> </releases> </repository> <repository> <id>snapshot-repo1.php-maven.org</id> <name>PHP-Maven 2 Snapshot Repository</name> <url>http://repo1.php-maven.org/snapshot</url> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> </profile> </profiles> <activeProfiles> <activeProfile>profile-php-maven</activeProfile> </activeProfiles> </settings> For every step I've followed the documentation (which is poor, though). Any tips? Thanks

    Read the article

  • Going to IE8 with DOCTYPE HTML 4.01 Transitional any suggestions appeciated.

    - by Marco Demaio
    Hello, we use in all our pages in the 1st line of our HTML code the: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> We are moving on to the new IE8 and we would like to keep the DOCTYPE unchanged, is there any suggestions/warnings we better be aware of? I mean like: "Be careful that CSS min-width is not working anymore in IE8 transitional, be careful that it will screw up page in this and that, etc." Thanks!

    Read the article

  • Windows batch file to delete .svn files and folders

    - by Marco Demaio
    Hi,in order to delete all ".svn" files/folders/subfolders in "myfolder" I use this simple line in a batch file: FOR /R myfolder %%X IN (.svn) DO (RD /S /Q "%%X") This works, but if there are no ".svn" files/folders the batch file shows a warning saying: "The system cannot find the file specified." This warning is very noisy so I was wondering how to make it understand that if it doesn't find any ".svn" files/folders he must skip the RD command. Usually using wild cards would suffice, but in this case I don't know how to use them, because I don't want to delete files/folders with .svn extension, but I want to delete the files/folders named exactly ".svn", so if I do this: FOR /R myfolder %%X IN (*.svn) DO (RD /S /Q "%%X") it would NOT delete files/folders named extaclty ".svn" anymore. I tried also this: FOR /R myfolder %%X IN (.sv*) DO (RD /S /Q "%%X") but it doesn't work either, he deletes nothing. Thanks for any help!

    Read the article

  • javascript using 'this' in global object

    - by Marco Demaio
    What does 'this' keyword refer to when used in gloabl object? Let's say for instance we have: var SomeGlobalObject = { rendered: true, show: function() { /* I should use 'SomeGlobalObject.rendered' below, otherwise it won't work when called from event scope. But it works when called from timer scope!! How can this be? */ if(this.rendered) alert("hello"); } } Now if we call in an inline script in the HTML page: SomeGlobalObject.show(); window.setTimeout("Msg.show()", 1000); everything work ok. But if we do something like AppendEvent(window, 'load', Msg.show); we get an error because this.rendered is undefined when called from the event scope. Do you know why this happens? Could you explain then if there is another smarter way to do this without having to rewrite every time "SomeGlobalObject.someProperty" into the the SomeGlobalObject code? Thanks! AppendEvent is just a simple cross-browser function to append an event, code below, but it does not matter in order to answer the above questions. function AppendEvent(html_element, event_name, event_function) { if(html_element.attachEvent) //IE return html_element.attachEvent("on" + event_name, event_function); else if(html_element.addEventListener) //FF html_element.addEventListener(event_name, event_function, false); }

    Read the article

  • SVN project folder tree structure vs production folder tree structure

    - by Marco Demaio
    While developing a PHP+JS web application we always try to separate big blocks of code into small modules/components, in order to make these last ones as much reusable as possible in other applications. Let's say we now have: the EcommerceApp (an ecommerce main application) a Server-file-mgr component (a component to view/manage file on server) a Mylib (a library of useful functions) a MailistApp (another main application to handle mail lists) ... EcommerceApp needs both Server-file-mgr component and Mylib to work Server-file-mgr needs Mylib to work MaillistApp needs both Server-file-mgr component and Mylib to work too. My idea is to simply structure the SVN project folder tree putting everything at the same level: trunk/EcommerceApp trunk/Server-file-mgr trunk/Mylib trunk/MaillistApp But in real life to make these apps to work the folder tree structure must be the following: EcommerceApp |_ Mylib |_ Server-file-mgr MaillistApp |_ Mylib |_ Server-file-mgr I mean Mylib and Server-file-mgr needs to be inside the EcommerceApp/MaillistApp folder. How would you then structure the SVN folder, as I did or in a different/better/smarter way???

    Read the article

  • Simple javascript to mimic jQuery behaviour of using this in events handlers

    - by Marco Demaio
    This is not a question about jQuery, but about how jQuery implements such a behaviour. In jQuery you can do this: $('#some_link_id').click(function() { alert(this.tagName); //displays 'A' }) could someone explain in general terms (no need you to write code) how do they obtain to pass the event's caller html elments (a link in this specific example) into the this keyword? I obviously tried to look 1st in jQuery code, but I could not understand one line. Thanks!

    Read the article

  • Make Apache to show different index.html also in browser's address bar

    - by Marco Demaio
    I have the following foloder tree on my shared hosting server: www.somesite.com | |_ public_html (document folder) |_ .htaccess (Apache file) |_ inde.html (page shown by server now when someone looks for www.somesite.com) | |_ site_editor (folder) | |_login.html (site editor control panel) | |_file1.php | |_file2.php | |_ ... | |_ website (folder) |_ index.html (website HOME PAGE) |_ page1.html |_ page2.html |_ etc. Now when someone looks for www.somesite.com the webserver look for index.html in public_html folder. I would like the web server to show website/index.html when someone looks for www.somesite.com and I would like his browser bar to show only www.somesite.com/index.html and not www.somesite.com/website/index.html I would also like the web server to show site_editor/login.html when someone looks for www.somesite.com/site_editor/ Is it possible to accomplish both task by setting .htaccess files in some ways??? Thanks!

    Read the article

  • JS: using 'var me = this' to reference an object instead of using a global array

    - by Marco Demaio
    The example below, is just an example, I know that I don't need an object to show an alert box when user clicks on div blocks, but it's just a simple example to explain a situation that frequently happens when writing JS code. In the example below I use a globally visible array of objects to keep a reference to each new created HelloObject, in this way events called when clicking on a div block can use the reference in the arry to call the HelloObject's public function hello(). 1st have a look at the code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Test </title> <script type="text/javascript"> /***************************************************** Just a cross browser append event function, don't need to understand this one to answer my question *****************************************************/ function AppendEvent(html_element, event_name, event_function) {if(html_element) {if(html_element.attachEvent) html_element.attachEvent("on" + event_name, event_function); else if(html_element.addEventListener) html_element.addEventListener(event_name, event_function, false); }} /****************************************************** Just a test object ******************************************************/ var helloobjs = []; var HelloObject = function HelloObject(div_container) { //Adding this object in helloobjs array var id = helloobjs.length; helloobjs[id] = this; //Appending click event to show the hello window AppendEvent(div_container, 'click', function() { helloobjs[id].hello(); //THIS WORKS! }); /***************************************************/ this.hello = function() { alert('hello'); } } </script> </head><body> <div id="one">click me</div> <div id="two">click me</div> <script type="text/javascript"> var t = new HelloObject(document.getElementById('one')); var t = new HelloObject(document.getElementById('two')); </script> </body></html> In order to achive the same result I could simply replace the code //Appending click event to show the hello window AppendEvent(div_container, 'click', function() { helloobjs[id].hello(); //THIS WORKS! }); with this code: //Appending click event to show the hello window var me = this; AppendEvent(div_container, 'click', function() { me.hello(); //THIS WORKS TOO AND THE GLOBAL helloobjs ARRAY BECOMES SUPEFLOUS! }); thus would make the helloobjs array superflous. My question is: does this 2nd option in your opinion create memoy leaks on IE or strange cicular references that might lead to browsers going slow or to break??? I don't know how to explain, but coming from a background as a C/C++ coder, doing in this 2nd way sounds like a some sort of circular reference that might break memory at some point. I also read on internet about the IE closures memory leak issue http://jibbering.com/faq/faq_notes/closures.html (I don't know if it was fixed in IE7 and if yes, I hope it does not come out again in IE8). Thanks

    Read the article

  • PHP - static DB class vs DB singleton object

    - by Marco Demaio
    I don't want to create a discussion about singleton better than static or better than global, etc. I read dozens of questions about it on SO, but I couldn't come up with an answer to this SPECIFIC question, so I hope someone could now illuminate me buy answering this question with one (or more) real simple EXAMPLES, and not theoretical discussions. In my app I have the typical DB class needed to perform tasks on DB without having to write everywhere in code mysql_connect/mysql_select_db/mysql... (moreover in future I might decide to use another type of DB engine in place of mySQL so obviously I need a class of abstration). I could write the class either as a static class: class DB { private static $connection = FALSE; //connection to be opened //DB connection values private static $server = NULL; private static $usr = NULL; private static $psw = NULL; private static $name = NULL; public static function init($db_server, $db_usr, $db_psw, $db_name) { //simply stores connections values, withour opening connection } public static function query($query_string) { //performs query over alerady opened connection, if not open, it opens connection 1st } ... } or as a Singletonm class: class DBSingleton { private $inst = NULL; private $connection = FALSE; //connection to be opened //DB connection values private $server = NULL; private $usr = NULL; private $psw = NULL; private $name = NULL; public static function getInstance($db_server, $db_usr, $db_psw, $db_name) { //simply stores connections values, withour opening connection if($inst === NULL) $this->inst = new DBSingleton(); return $this->inst; } private __construct()... public function query($query_string) { //performs query over already opened connection, if connection is not open, it opens connection 1st } ... } Then after in my app if I wanto to query the DB i could do //Performing query using static DB object DB:init(HOST, USR, PSW, DB_NAME); DB::query("SELECT..."); //Performing query using DB singleton $temp = DBSingleton::getInstance(HOST, USR, PSW, DB_NAME); $temp->query("SELECT..."); My simple brain sees Singleton has got the only advantage to avoid declaring as 'static' each method of the class. I'm sure some of you could give me an EXAMPLE of real advantage of singleton in this specific case. Thanks in advance.

    Read the article

  • How to get scrollTop of page afer browser scrolled such page?

    - by Marco Demaio
    I know how to get the scrollTop of a page, I use this simple JS function (code copied around): function GetScrolledTop() { //I never work in IE quirkmode, I always use DOCTYPE as 1st line, so I don't need to test for document.body.scrollTop return self['pageYOffset'] || document.documentElement.scrollTop; } This works and my problem is the following: I tried to add it in the page onload event <body onload="alert(GetScrolledTop());"> On page load I get ZERO (which make sense), but the problem is that I get ZERO even if I scroll the page and then reload it without touching the scrollbar. It seems like the browser does: loads page calls my GetScrolledTop() (so obviously shows ZERO) then scrolls the page to where it was before. Do you know how to get the scolledTop after the step 3? I mean how to get the scrolledTop AFTER the browser scrolled the page? (maybe without using a timer) Thanks!

    Read the article

  • Is x a reserved keyword in Javascript FF/Safari not in IE?

    - by Marco Demaio
    A web page of a web application was showing a strange error. I regressively removed all the HTML/CSS/JS code and arrived to the basic and simple code below. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html><head> <title>test</title> <script type="text/javascript"> var TestObj = { foo: function() {} } alert(x); //ok displays "undefined" var x = TestObj.foo; var z = TestObj.foo; </script> </head><body> <p onclick='alert(x);'>Click shows function foo!</p> <img onclick='alert(x);' alt='CRAZY click displays a number in FF/Safari not function foo' src='' style='display: block; width: 100px; height: 100px; border: 1px solid #00ff00;'> <p onclick='alert(x);'>Click shows function foo!</p> </body></html> It's crazy: when clicking on P elements the string "function(){}" is displaied as expected. But when clicking on IMG element it shows a number as if x function got in some way removed from memory or deinstantiated (it does not even show x as "undefined" but as a number). To let you test it quickly I placed the working test above also here. This can be reproduced on both Firefox 3.6 and Safari 4.0.4. Everything works properly only on IE7+. I'm really clueless, I was wondering if x is maybe a reserved keyword in JS Firefox/Safari. Thanks to anyone who could help! FYI: if you repalce x() with z() everything work prefectly in all browsers (this is even more crazy to me) adding a real image in src attribute does not fix the problem removing style in img does not fix the problem (i gave style to image only to help you clicking on image thus you can see the imnage border)

    Read the article

  • PHP: why uniqid returned value is only 13 digits long

    - by Marco Demaio
    uniqid() function returns a 13 digits long hexadecimal number. According to the spec in php.net site, the function uses microtime to generate the unique value. But microtime returns numbers in string format as the following one: "0.70352700 12689396875" which are basically the microseconds and the seconds elapsed since 1970. This is a 9+11 digits decimal number. Converting a 20 decimal number into hex would result in a 16 digits hexadecimal NOT a 13 digits one. I also thought to take out the "0." part that seem to never change, and the last two digits of the microsec part that seem to remain always "00". Doing this the decimal number would be only 9+11-3 digits long, but still a decimal number of 17 digits when converted into hex would result in 14 digits hexadecimal number NOT 13. You probably think I'm crazy in asking such a thing, but I'm concerned about using uniqid, unique values are important to be unique, a duplicated value could screw up an entire application.

    Read the article

  • PHP header redirection does nor reload <iframe> in IE

    - by Marco Demaio
    When displaying data from DB usually I'm in this situation I'm in page A.php that shows data from DB, user performs some action (like edit/delete etc) and page B.php is loaded to perform the action, once page B performed the action, it redirects browser to page A, page A is auto reloaded during step (3) therefor it shows an updated situation of the data In order to make page B to redirect to page A i use a simple PHP header("Location: " . "A.php", TRUE, 302); This works well in all situations, except when pages A.php is displaied into an <iframe>: in such a case it does not reload (step 4 does not get done). This seems to happen only in IE7 (don't know about IE8), it works perfectly on FF/Safari. And only when using an <iframe>, if page A.php is not in <iframe> it gest refreshed also in IE7. In order to solve this I simply added a couple of headers in page A.php to set it to not be cached: header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past But I was curious if you migt have exeperienced the same issue too in the past, and if you good give me some advises about this. Thanks!

    Read the article

  • JS encodeURIComponent result different from the one created by FORM

    - by Marco Demaio
    I thought values entered in forms are properly encoded by browsers. But this simple test shows it's not true: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html><head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title></title> </head><body> <form id="test" action="test_get_vs_encodeuri.html" method="GET" onsubmit="alert(encodeURIComponent(this.one.value));"> <input name="one" type="text" value="Euro-€"> <input type="submit" value="SUBMIT"> </form> </body></html> When hitting submit button: encodeURICompenent encodes input value into "Euro-%E2%82%AC" while browser into the GET query writes only a simple "Euro-%80" Could somone explain? Or is encodeURIComponent doing unnecessary conversions?

    Read the article

  • encodeURIComponent is really useful?

    - by Marco Demaio
    Something I still don't understand when perfoming an http-get request to the server is what the advantage is in using JS fucntion encodeURIcomponent to encode each component of the http-get. Doing some tests I saw the server (using PHP) gets the values of the http-get request properly also if I don't use encodeURIcomponent!!! Obviuosly I still need to encode at client level the special character & ? = / : otherwise an http-get value like this "peace&love=virtue" would be considered as new key value pair of the http-get request instead of a one single value. But why does encodeURIcompenent encodes also many other charcaters like 'è' for example wich is translated into %C3%A8 that must be decoded on a PHP server using the utf8_decode function. By using encodeURIcomponent all values of the http-get request are utf8 encoded, therefor when getting them in PHP I have to call each time the utf8_decode function on each $_GET value which is quite annoying. Why can't we just encode only the & ? = / : charcaters??? see also: http://stackoverflow.com/questions/2607946/js-encodeuricomponent-result-different-from-the-one-created-by-form It shows that encodeURIComponent does not even encode properly because a simple browser FORM GET encodes charactrs like '€', in different way. So I still wonder what does this encodeURIComponent is for?

    Read the article

  • Make browser to go back by reloading page 1st and then scrolling it back again too

    - by Marco Demaio
    EXPLAINING WHAT I'M TRYING TO SOLVE: I have a webpage (file_list.php) showing a list of files, and next to each file there is a button to delete it. When user press the DELETE button close to a certain file name, the browser goes to a script called delete_file.php that deletes the file and then it tells browser to go back to the file_list.php delete_file.php uses a simple header("Location: file_list.php”); to go back to file_list.php When browser goes back to file_list.php it reloads the page, but it DOES NOT scroll it back again to where the user was before. So let's say the user scrolled the files list and deleted the last file, when the browser shows again the page file_list.php it won't be scrolled to the bottom of the page again. THE WORKAROUND I CAME OUT WITH: I found a strange way to work around this, basically instead of using header("Location: file_list.php”); in delete_file.php I simply use a javascript call window.history.go(-1). This workaround works perfectly when user is in session (simply using PHP session_start function): the browser RELOADS the file_list.php page and then scrolls it also bask to where it was before. But if the user is NOT in session the browser scrolls the page but IT DOES NOT RELOAD IT before, so the user would still see the file he deleted in the file list. THE QUESTIONS Do you know how to reproduce the behavior of the browser when goes back being in session even if we are not in session? Do you know a way out of this, even another way of solving this matter? Thanks! *I know I could use AJAX to delete the file so I would not have to go every time to delete_file.php, but this is not the answer*.

    Read the article

  • Migrate SVN repository from Google code to another repository server (keeping history)

    - by Marco Demaio
    I read some question/answers here about how to do it using svnadmin/dump etc. Actually I did not understand properly what I'm supposed to do. http://stackoverflow.com/questions/939963/how-to-migrate-svn-to-another-repository I think I have to do some sort of dump from the Google code repository using svnadmin, but where do I get this svnadmin? I use TortoiseSVN 1.6.3 on WXP and there is no svnadmin.exe command in all my C folder, where am I supposed to download these applications? Thanks!

    Read the article

  • Windows batch file to delete folders/subfolders using wildcards

    - by Marco Demaio
    I need to delete all folders in "tomin" folder, which name contains terminates with the ".delme" string. The deletion need to be done recurively: I mean on all directory and SUB directories. I though to do this: FOR /R tomin %%X IN (*.delme) DO (RD /S /Q "%%X") but it does not work, I think /R ignores wildcards. Before asking this quation I searched also in SO and found this: but the answers did not help me in solving my issue, following the suggestion given there I tried: FOR /F tomin "delims=" %%X IN ('dir /b /ad *.delme') DO RD /S /Q "%%X" But it did not work either. Any help aprreciated, thanks!

    Read the article

  • PHP upload file using PUT instead of POST

    - by Marco Demaio
    I read something about this on PHP docs, but it's not celar to me: Do the most widely used browsers (IE, FF, Chrome, Safari, Opera, ...) support this PUT method to uplaod files? What HTML should I write to make the browser call the server via PUT request. I mean do I need to write a FORM with an INPUT file field and just replace the attribute method="POST" with the method="PUT"? On the PHP docs (link above) they say a PUT request is much simplier than a POST request when uploading file, along with this advantage, what other advantages/disadvanatges do the PUT has comapred to teh POST? Thanks!

    Read the article

  • PHP header redirection does not reload <iframe> in IE

    - by Marco Demaio
    When displaying data from DB usually I'm in this situation I'm in page A.php that shows data from DB, user performs some action (like edit/delete etc) and page B.php is loaded to perform the action, once page B performed the action, it redirects browser to page A, page A is auto reloaded during step (3) therefor it shows an updated situation of the data In order to make page B to redirect to page A i use a simple PHP header("Location: " . "A.php", TRUE, 302); This works well in all situations, except when pages A.php is displaied into an <iframe>: in such a case it does not reload (step 4 does not get done). This seems to happen only in IE7 (don't know about IE8), it works perfectly on FF/Safari. And only when using an <iframe>, if page A.php is not in <iframe> it gest refreshed also in IE7. In order to solve this I simply added a couple of headers in page A.php to set it to not be cached: header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past But I was curious if you might have experienced the same issue too in the past, and if you good give me some advice about this?

    Read the article

  • JSDoc adding real code in documentation

    - by Marco Demaio
    Do you know if there is a some sort of <code> tag in JSDoc? I need to add pieces of code in mt documentation like this: /** * This function does something see example below: * <p> * var x = foo("test"); //it will show "test" message * * @param {string} str: string argumnet that will be shown in message */ function foo(str) { alert(str); } I need that the code in the comments being displaied by JSDoc as code (if not sintax highlighetd, at least as code like in preformatted or something with grey background) Thanks.

    Read the article

  • Websites' color scheme generators - what to do with them in real life?

    - by Marco Demaio
    On the web there are plenty of color scheme/palette generator tools and color palettes galleries. All of these tools/gelleries show many 3 to 5 colors palette as final result. Some of these tools: http://kuler.adobe.com, http://www.colorexplorer.com I know my question might sound ridicolous to someone who is involved in web dedign, but I don't understand what to do with these color palette. I mean, if I have to create a website, how am I supposed to apply this color palette to the website. Which color goes as foreground text, which one as background, which one for the links, which one for the page titles and so on? What are these color palette generators useful for then?! Thanks!

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >