Posts

Cross Domain Webix Post

Recently, we were working with Spring Boot and Webix framework using Ajax. We had quite some trouble to POST data back to the Server with Spring Boot.  Error: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:7100' is therefore not allowed access. We realized the problem was because of our AJAX cross-domain requests that are forbidden by default by the same-origin security policy. Since browsers need to “preflight” any asynchronous or rather HTTP request methods that modify data and also fetch an “approval” the problem had to be addressed both way i.e. Server side and Browser i)                     We had to enable the CORS assertion in Spring Boot i.e. @CrossOrigin(*) ii)                    Enable Cross-origin resource sharing (CORS) from the Chrome browser. You need to add an extension or CORS enabler from the Chrome Web Store for this. Thereafter using the following code the JSON data wa

Plastic Solution

যেখানে দেখিবে চাই উড়াইয়া দেখো তাই The first plastic eating bacteria ( Ideonella Sakaiensis 201-F6 ) was discovered in a Japanese waste dump. Some Statistics: Global Plastic Production : 8-10 Billion Tonnes per Year with only 8-10 % possible Recycling. PET (polyethylene terephthalate): Natural degradation 450 years 6% of global oil production is devoted to the production of plastics. Solution to the problem: 1)       Ideonella Sakaiensis 201-F6 (Bacterium): Produces enzymes to breakdown PET (PolyEthylene Terephthalate) . Scientists have already enhanced this natural enzyme and produced mutant enzymes that is far superior in the job. 2)       Waxworm Caterpillars (Galleria Mellonella): Each Waxworm can create an average of 2.2 holes per hour and break down plastic in a matter of hours—about a hundred waxworms could eat 96 milligrams of plastic in 12 hours, to be precise. 3)       Mealworms : P ossess gut microbes that helps them to safely

Happiness Index

Are you and your nation happy? What is your GNH ( Gross National Happiness ) Index? Keep an eye on the factors that governs happiness…i.e. Freedom of Choice, Trust, Generosity, GDP etc.… https://en.wikipedia.org/wiki/Gross_National_Happiness https://en.wikipedia.org/wiki/World_Happiness_Report Denmark is the happiest nation with Israel at 13 th , USA at 14 th , UK at 23 rd and China at 83rd position (as in 2016). India , at 118 th on GNH . For some more information….. There is also another statistical dispersion parameter called GINI : GINI Coefficient governs the “the inequality among values of a frequency distribution (for example, levels of income)” or in other words i.e. “ opportunity in-equality ”, “ income in-equality ” etc. The lower the GINI the better. Australia leads with Israel at 16 th , China at 32 nd , UK at 33 rd and USA at 34 th (as per 2009 report). India at 79 th on GINI .

Disabling Data Execution Prevention (DEP) for Windows 7 - Part I

This is a general research notes on the new way Date Execution Prevention (DEP) in Windows 7 systems prevents many of the old applications getting executed on the system (mostly memory address areas). There are various details that can be looked into for in-depth knowledge on this issue. Truly speaking this is tight and there is no such workaround except ROP gadgets (Return - Oriented Programming) that is more of ethical hacking than a workaround and is a subject in itself. The problem which usually comes up with is more technical and is related to diverse factors. Actual Exception from Visual Studio: This actual exception comes up while instantiating the new Java Axbridge ActiveX object. System.AccessViolationException was caught Message="Attempted to read or write protected memory. This is often an indication that other memory is corrupt. This followed up by NullReference exception as it failed to create the object. Standalone Executable may come up with the fo

Unix: List Files Which Do Not Have A Particular Pattern In Filename

Many a times we want to list files which do not have a particular pattern in its file name. Here are a few things you can do (Remember not to use ls -l here): ls |grep -v bz2 -- file name has bz2 anywhere in the file name ls |grep -v bz2$ -- file name ends with bz2 ls |grep -v ^bz2 -- file name starts with bz2 ls |grep -v .bz2. -- file name has bz2 in the middle ls |grep ..bz2 -- file name has atleast 2 chars before bz2 ls |grep '\.bz2$' -- file name ends with .bz2 (\ to escape) ls |grep "\.bz2$" -- file name ends with .bz2 ("or ' might matter with the shell being used) ls |grep b.2 -- file name can have bz2 or bx2 ls |grep '\.b.2' -- file name can have .bz2 or .bx2 ls |grep "\.b.2" -- file name can have .bz2 or .bx2

Debug Methods Oracle (Coarse Grained Auditing)

Scenario There are many times, where there was an issue in production and you did not have any idea how it happened. The following article will give you some direction. Please note there are many other ways too. Currently, I will just focus on a method I had used during a similar situation. This error information is from the latest logs from Production said: ORA-00001: unique constraint (TABLE_ABCD.SYS_C006189415) violated       Now the constraints to troubleshoot the above scenario are: You have limited access/privilege in production environment. The above was due to a duplicate record that came in and your process tried to insert that duplicate data. But what was that data that caused disruption? The answer could have been found out by using FlashBack Query feature from Oracle. This however is version specific. Let’s look into some other aspects of debugging. Observation There is no clue to the data that was being inserted at the time this exce