A simple brick game written in C++
Download code here.
(Note/Disclaimer : Last successful compilation of most of the programs in this category were done from 2000 to 2002.)
A simple brick game written in C++
Download code here.
(Note/Disclaimer : Last successful compilation of most of the programs in this category were done from 2000 to 2002.)
A simple Chess program written in C. Serves as an introduction to basics of programming the game.
Download code here.
(Note/Disclaimer :Given on as is basis (written by author during high school – 1999 to 2001))
Bug: A above exception thrown when using hibernate.
Reason: This error occurs usually because of a misplaced “order by” clause.
If in a many to many mapping, the serial order is defined in the cross reference table, the order-by attribute should be provided in the “collection” node as below –
On other hand, if the collection is to be sorted by a column defined in the collection member, the order-by should be provided in the many-to-many or one-to-many node, as shown below.
Solution: Move the order-by attribute to appropriate node depending on which table holds the sorted field.
Bug: The above exception thrown when using hibernate.
Reason: This usually occurs when column name is not mentioned in many-to-many node.
The correct mapping for a many to many relation is –
Solution: The mapped columns should be provided in the key and many-to-many nodes as above.
Heres how we display different error messages for the different cases of authentication failures like bad credentials, credentials expired etc.
Step 1. Configure an authentication failure handler in the application context.
Step 2. Refer this handler in the form-login node of http namespace configuration.
Step3. Capture the different URL extensions configured in step 1 in the login controller. (The example below uses Spring MVC)
Step 4. Check the attribute error in the JSP and print appropriate message for each case.
Done !
Bug: The exception thrown when migrating to spring 3.
Reason: This exception thrown when migrating to spring-security 3 occurs due to spring 3 (authentication tag) using the attribute “properties” in place of “operation” used by previous versions.
Solution : Use <sec:authentication property=”principal.role”/> instead of <sec:authentication operation=”role”/>
Bug: Above error occurs when rebuilding a database from the SQL script.
Reason: This error usually occurs when the table being created cannot fulfill a foreign key constraint. This often happens when importing from a previously exported database script as database export tools like SQL Yog export tables in alphabetical order of their names, irrespective of their inter-dependencies.
Solution: Recreate the DB script in “Turn off foreign key” mode. If this is not possible, in the current script, run the create query for independent tables first, followed by ones dependent on them, and so on.
This is a tiny tutorial on steps required to enable CAS (Jasig, v3.4x ) single-sign-out without SSL. These are the steps involved to remove dependency on SSL –
The CAS authentication and SSO should work without problems on plain HTTP now.
A small note on order of execution of a RewriteRule directive and a folder Alias on Apache HTTPD – RewriteRule is always executed before the Alias, thus making a rewrite shown in the listing below possible –
[sourcecode language=”php”]
Alias /assets/ "//contenthost/assets/"
<Directory "//contenthost/assets">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
RewriteCond %{HTTP_REFERER} !^http://mydomain.com.*$ [NC]
RewriteRule (.*)/assets/* – [F]
[/sourcecode]
This will make sure that if calls to /assets/ are not coming from our domain, they are rejected; else they will be picked from the aliased folder “//contenthost/assets”