Inserting Headers and Footers in Ruby on Rails web application?

In the new_app/views/layouts there will be a file called application.html.erb. Open that file and put your header content above where it is written <%= yield> and footer content below <%=yield>. I usually make a parital in layouts file called _header.html.erb and _footer.html.erb and do something like this :- <%= render “layouts/header” %> <%=yield %> <%= … Read more

Redirect HTTP to HTTPS:PORT in Tomcat

You can do it to every app deployed to tomcat by adding this to the end of tomcat_dir/conf/web.xml: <security-constraint> <web-resource-collection> <web-resource-name>Entire Application</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <!– auth-constraint goes here if you requre authentication –> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint> So you don’t have to change it on the web.xml of your webapp. That should work, assuming you … Read more

How to launch an EXE from Web page (asp.net)

This assumes the exe is somewhere you know on the user’s computer: <a href=”https://stackoverflow.com/questions/916925/javascript:LaunchApp()”>Launch the executable</a> <script> function LaunchApp() { if (!document.all) { alert (“Available only with Internet Explorer.”); return; } var ws = new ActiveXObject(“WScript.Shell”); ws.Exec(“C:\\Windows\\notepad.exe”); } </script> Documentation: ActiveXObject, Exec Method (Windows Script Host).

File Storage for Web Applications: Filesystem vs DB vs NoSQL engines

Not a direct answer but some pointers to very interesting and somehow similar questions (yeah, they are about blobs and images but this is IMO comparable). What are the downsides of storing files as BLOBs in MySQL? Storing Images in DB – Yea or Nay? Images in database vs file system https://stackoverflow.com/search?q=images+database+filesystem Do the same … Read more

What’s the difference between deferred scripts and scripts placed at the end of the page body?

Both async and defer scripts begin to download immediately without pausing the parser and both support an optional onload handler to address the common need to perform initialization which depends on the script. From the WebKit blog, so the behaviour is not necessarily the same across all browsers. So, performance would be better if the … Read more

Unity, Torque3D, Google O3D, WebGl….which to choose? [closed]

WebGL is not a failure in the making. Speaking like it’s a failure shows these peoples ignorance. That said, if you’re just starting out, explore your options. If you’re looking for more eyes than just windows users, stay away from proprietary solutions. Microsoft’s dominance isn’t big as people think, anymore. IE is fading in popularity, … Read more

How to handle JavaScript being disabled in AngularJS

After considering other answers on this question and “How to detect if JavaScript is disabled?” as well as some further research on AngularJS. First off you will want to hide all variables displayed through the databindings. This can be done using ng-cloak which is appended to an HTML tag. <div ng-cloak> <!– page content here … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)