Debugging is a hard thing. Here records some of my experiences.
- A same program instance is running on many machines for years without problem. But today one single machine reports an error. A stored procedure that takes multiple parameters, is now getting those parameters in reverse order.
Reason: A query that returns the list of parameters is now returning the entries in reverse. MSSQL returns data set in undeterministic order if "order by" is not used. It has worked consistently for years on all the machines, now for unknown reason is functioning differently on one single machine.
Solution: Add "order by" clause to the query.
- The Database server in production was accidentally uninstalled ... This happened because the admin logged into the wrong server. As the solution, the desktop background is changed to reflect the server name.
Wednesday, April 18, 2012
"Same Domain Policy" limitation of jQuery
The same domain policy prevents javascripts hosted on one domain from accessing data from a remote domain. This is for security purpose. So when use jQuery, you can not directly access a web service from a remote server.
The solution is to create a serverside script (for example, in php, as shown below) on your domain, which will serve as a proxy, get the data from the remote domain, and then output it. For example:
<?php
readfile('http://remote_server.com/service?param=' . urlencode($_GET['param']);
?>
[1] Getting data from remote URL using jquery
[2] Cross-domain requests with jQuery
The solution is to create a serverside script (for example, in php, as shown below) on your domain, which will serve as a proxy, get the data from the remote domain, and then output it. For example:
<?php
readfile('http://remote_server.com/service?param=' . urlencode($_GET['param']);
?>
[1] Getting data from remote URL using jquery
[2] Cross-domain requests with jQuery
Thursday, March 15, 2012
Wednesday, March 14, 2012
Drop Schema
DROP SCHEMA (Transact-SQL)
DROP SCHEMA schema_name
To drop a schema, any objects (e.g.: tables) associated with the schema must be dropped first.
DROP SCHEMA schema_name
To drop a schema, any objects (e.g.: tables) associated with the schema must be dropped first.
Sunday, March 11, 2012
Some articles from CACM
On software engineering: The Risks Of Stopping Too Soon - By David Lorge Parnas
On publication system: Stop the Numbers Game - By David Lorge Parnas
On publication system: Stop the Numbers Game - By David Lorge Parnas
Saturday, March 10, 2012
CSE 231 - Advanced Compiler Design and Implementation
CSE 231 - Advanced Compiler Design and Implementation.
Pay attention to the link "List of Papers for Presentations". These are papers from the most prestigeous conferences on compiler up to 2002.
Pay attention to the link "List of Papers for Presentations". These are papers from the most prestigeous conferences on compiler up to 2002.
Subscribe to:
Posts (Atom)
Blog Archive
-
▼
2026
(36)
-
▼
June
(19)
- C10K to C10M: from thread-per-connection model to ...
- Benchmark server performance
- Application server for php, python, java, node.js,...
- Application server for C++, Go and Rust
- Nginx as reverse proxy and load balancer
- Infrastructure running: nginx, apache, php, python...
- Flow chart of nginx+apache+uvcorn infrastructure
- Flow chart of apache+uvcorn infrastructure
- Uvicorn and Gunicorn
- What's deadsnakes PPA
- What's the optional lsb-core package
- Codex known logging bug
- Daemonsize a service
- Train text to image model, to generate images of c...
- Train a model based on OpenAI API
- Open port 8080 for WebSocket
- Add websocket support on Bluehost Ubuntu VPS for D...
- Install Claude Code on ubuntu VPS of Bluehost
- Install PostgreSQL on Mac
-
▼
June
(19)