The following are the command line to startup kafka after installed.
In here, I have kafka unzip into d:\app.
Start kafka
cd D:\apps\kafka_2.12-2.2.0
bin\windows\zookeeper-server-start.bat "config\zookeeper.properties"
bin\windows\kafka-server-start.bat "config\server.properties"
Topic :
Create topic
bin\windows\kafka-topics.bat --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic test
List topic
bin\windows\kafka-topics.bat --list --bootstrap-server localhost:9092
bin\windows\kafka-topics.bat --describe --bootstrap-server localhost:9092
bin\windows\kafka-topics.bat --describe --bootstrap-server localhost:9092 --topic test
Producer:
console
bin\windows\kafka-console-producer.bat --broker-list localhost:9092 --topic test
Power shell to pipe apache web server access log
gc access.log | D:\dvp\kafka\kafka_2.12-2.2.0\bin\windows\kafka-console-producer.bat --broker-list localhost:9092 --topic test
gc access.log -wait -tail 1 | ... (Like linux tail -f access.log. Not working)
Configure apache httpd.conf
TransferLog "| d:/dvp/kafka/kafka_2.12-2.2.0/bin/windows/kafka-console-producer.bat --topic test --broker-list localhost:9092"
For both pipe and TransferLog, I really doubt the reliabliability.
Consumer:
Console
bin\windows\kafka-console-consumer.bat --bootstrap-server localhost:9092 --topic test --from-beginning
Saturday, June 15, 2019
Friday, June 14, 2019
Starting hadoop in windows
If you run start-dfs.cmd and see the error like the following
Try to run winutils.exe in the command line.
If you see the following message :

See how to fix in
https://www.lifewire.com/how-to-fix-msvcr100-dll-not-found-or-missing-errors-2623799
Or google your solution.
... FATAL datanode.DataNode: Exception in secureMain
java.lang.RuntimeException: Error while running command to get file permissions : ExitCodeException exitCode=-1073741515Or like the message in the stackoverflow : https://stackoverflow.com/questions/53341528/java-lang-runtimeexception-error-while-running-command-to-get-file-permissions#new-answer
Try to run winutils.exe in the command line.
If you see the following message :
The code execution cannot proceed because MSVCR100.dll was not found. ....
See how to fix in
https://www.lifewire.com/how-to-fix-msvcr100-dll-not-found-or-missing-errors-2623799
Or google your solution.
Friday, February 22, 2019
My first github publish
Start to put my first angular app to the github.
https://ccapeng.github.io/uicomponent/
Thursday, September 30, 2010
‘Do you want to view only the webpage content that was delivered securely?
I installed HttpWatch to inspect all my media. They were all in the same domain.
Took me a while to narrow the cause.
Javascript like this
wass trouble. Image url need need to be full path.
Took me a while to narrow the cause.
Javascript like this
obj.style.backgroundImage:url(myimage.gif);wass trouble. Image url need need to be full path.
Tuesday, January 05, 2010
HTML P and FIELDSET
I have FIELDSET inside of P. If I set P style to hidden, FIELDSET is still shown.
The only solution I have is to use DIV instead of P.
<P style="display:none; visibility:hidden;">
This is a paragraph.
<FIELDSET>
<LEGEND>Group</LEGEND>
ONE<BR>TWO
</FIELDSET>
</P>
The only solution I have is to use DIV instead of P.
Wednesday, May 20, 2009
ARIA resource
This is a good resource to learn ARIA. It lists all test case. From some sample test case pages, you can always see how to code it.
Monday, May 11, 2009
ARIA tab sample
Google around some tab samples :
University of Illinois and YUI, as I said before they were very complicated.
I believe my tab page design is very generic for web designers.
So this is my address book sample of Work and Home tab. I don't provide those complicated key navigation. All user need is just "tab" key.
My question is do I present "tab" role properly in my above design?
University of Illinois and YUI, as I said before they were very complicated.
I believe my tab page design is very generic for web designers.
So this is my address book sample of Work and Home tab. I don't provide those complicated key navigation. All user need is just "tab" key.
My question is do I present "tab" role properly in my above design?
Friday, April 24, 2009
ARIA tablist and tab.
I though to make page AREA aware is just role attribute. When, I try to put together tablist and tab, then things are getting complicated. In IE8 with JAWS10, it read out all tabs are visited, so I guess there should be another attribute to tell which tab is on.
When I look at example. It's so complicated. A long long of javascript to create widget. This is really not simple and create burden to developer.
When I look at example. It's so complicated. A long long of javascript to create widget. This is really not simple and create burden to developer.
Tuesday, March 17, 2009
Alex Blog: Use text-algin:right for table
Alex Blog: Use text-algin:right for table
So what is the solution?
Below is sample of center table alignment.
People also were talking about the solution in
here.
So what is the solution?
Below is sample of center table alignment.
<STYLE>
#container {text-align:center;}
#area {
width:600px; border:solid 1px black; text-align:left;
margin-left:auto; margin-right:auto;
}
</STYLE>
<DIV id="container">
<TABLE cellpadding="0" cellspacing="0" border="1" id="area">
<TR>
<TD>
This is a table.
</TD>
</TR>
</TABLE>
</DIV>
People also were talking about the solution in
here.
Thursday, February 26, 2009
CSS Comparison Chart
A nice comparison of CSS features in the latest/future browsers.
Summary
At this point, IE is very behind and lock down all proprietary, like buggy "filter".
Summary
Calculation of support of currently displayed feature lists
| Internet Explorer | Firefox | Safari | Chrome | Opera | |
|---|---|---|---|---|---|
| Past | 6.0: 4% | 2.0: 35% | 3.1: 47% | 0.2: 55% | 9.0: 38% |
| Present | 7.0: 12% | 3.0: 53% | 3.2: 69% | 1.0: 55% | 9.6: 62% |
| Near Future (2009) | 8.0: 31% | 3.1: 82% | 4.0: 85% | 1.*: 55% | 10.0: 68% |
| Future (2010 or later) | 9.0: 31% | 3.2: 92% | 4.*: 87% | 2.0: 79% | 10.*: 73% |
At this point, IE is very behind and lock down all proprietary, like buggy "filter".
Tuesday, February 24, 2009
acid3 test
Today, Apple just release Safari 4 beta. The interface is much similar its sister Chrome. The top site view is impressed.
The only interface issue is "New tab (+)" is too close the minimized icon.
Try Acid test 3, score 100. Firefox 3.1 beta 2 is 93. IE 8 rc1 is 20. Looks like Apple put a lot of resource on it.
In the javascript canvas line chart test, Safari 4 beta is much smooth.
Got to try grammar test later.
The only interface issue is "New tab (+)" is too close the minimized icon.
Try Acid test 3, score 100. Firefox 3.1 beta 2 is 93. IE 8 rc1 is 20. Looks like Apple put a lot of resource on it.
In the javascript canvas line chart test, Safari 4 beta is much smooth.
Got to try grammar test later.
Thursday, February 12, 2009
Vertical Text
Firefox 3.1 comes with css transform. I learn IE also has matrix equally.
Previously, I use writing-mode: tb-rl; filter: flipv fliph; for IE vertical text. Unfortunately, the text is very jagged after rotated. I decide to give matrix a try.
Still, the text is very jagged. The matrix filter is quite mathematical. Not sure any other attribute can smooth the font.
Previously, I use writing-mode: tb-rl; filter: flipv fliph; for IE vertical text. Unfortunately, the text is very jagged after rotated. I decide to give matrix a try.
For IE, method 1
<style>
.vt {
writing-mode: tb-rl; filter: flipv fliph;
white-space:nowrap; font-size:12px; font-family:arial; letter-spacing:2px
}
</style>
<div class="vt">Vertical Text</div>
For IE, method 2
<style>
.displayretainer {
width:160px;text-align:right; z-index:25;
font-family:arial; font-size:12px; letter-spacing:2px
}
</style>
<div id="vt" class="displayretainer"
style="filter:progid:DXImageTransform.Microsoft.Matrix(M11='1.0', sizingmethod='auto expand');">
Vertical Text
</div>
<SCRIPT>
var deg2rad = Math.PI * 2 / 360;
function setRotation(obj, deg) {
var rad = deg * deg2rad;
var costheta = Math.cos(rad);
var sintheta = Math.sin(rad);
obj.filters.item(0).M11 = costheta;
obj.filters.item(0).M12 = -sintheta;
obj.filters.item(0).M21 = sintheta;
obj.filters.item(0).M22 = costheta;
}
setRotation(document.getElementById("vt"), 270)
</SCRIPT>
Still, the text is very jagged. The matrix filter is quite mathematical. Not sure any other attribute can smooth the font.
Monday, February 09, 2009
style vertical text
Previously, I have a vertical text sample.
Today, I replace the line chart y-axis label with it.
Unfortunately, IE does not come out good render.
I think the issue is in the filter (filter:flipv fliph;).
Today, I replace the line chart y-axis label with it.
Unfortunately, IE does not come out good render.
I think the issue is in the filter (filter:flipv fliph;).
Monday, December 15, 2008
Insurance Scam
Another number I got was (304) 369 0968.
Many people complaint to it :
http://whocallsme.com/Phone-Number.aspx/3043690968
When I do phone number reversed look up. 3 records found :
My guess this is cell phone number and those 3 people were prior owned this number.
Many people complaint to it :
http://whocallsme.com/Phone-Number.aspx/3043690968
When I do phone number reversed look up. 3 records found :
My guess this is cell phone number and those 3 people were prior owned this number.
Thursday, October 16, 2008
WinMerge - copy particular line
WinMerge is a great tool to compare.
There is still one feature I am still looking for.
In a block (multiple lines) of difference, I only want to merge a particular line.
Right now, I need to do three clicks
a. Select Line Difference
b. "Copy" it.
b. Go the other side, then "Paste".
I wish it can be done in one click.
I have latest WinMerge (2.10.0.0). I don't find this kind of feature. Not sure any kind of plugins can do that.
There is still one feature I am still looking for.
In a block (multiple lines) of difference, I only want to merge a particular line.
Right now, I need to do three clicks
a. Select Line Difference
b. "Copy" it.
b. Go the other side, then "Paste".
I wish it can be done in one click.
I have latest WinMerge (2.10.0.0). I don't find this kind of feature. Not sure any kind of plugins can do that.
Wednesday, October 08, 2008
Photo Scam
When I picked up my phone, I heard "This is the second warning .....".
I really hate the phone scam. A lot of people get that, too.
Does people really need to do business like that? Got to stop that.
I really hate the phone scam. A lot of people get that, too.
Does people really need to do business like that? Got to stop that.
Monday, October 06, 2008
Use style sheet to control SELECT box height
I try to make a SELECT and DIV side by side with outline (style by border) in the same height; unfortunately, IE6 has always few pixels short.
I play it more. This situation only happens on heavy styling -- font is problem.
So, I try to set my SELECT with fixed size font (font-family:monospace,Courier,Courier New;), then both SELECT and DIV are in the same height.
<html>
<head>
<title>Control SELECT height</title>
<STYLE>
BODY, TABLE, TD, TH, P, OL, LI, INPUT, SELECT, BUTTON {font-family: Verdana, sans-serif; color:#343434}
</STYLE>
</head>
<body>
<TABLE width="100%" border="0" cellpading="0" cellspacing="0">
<TR valign="top">
<TD width="50%">
Avialable List <BR>
<SELECT SIZE="7" NAME="available" id="available" STYLE="width:100%; height:96px;">
</SELECT>
</TD>
<TD style="padding-left:1em">
Description<BR>
<DIV NAME="detailPanel" id="detailPanel" STYLE="width:100%; height:96px; border:1px solid blue">
</DIV>
</TD>
</TR>
</TABLE>
<BR><BR>
<TABLE width="100%" border="0" cellpading="0" cellspacing="0">
<TR valign="top">
<TD width="50%">
Avialable List <BR>
<SELECT SIZE="7" NAME="available" id="available" STYLE="width:100%; height:96px; font-size:12px; font-family: monospace,Courier,Courier New;">
</SELECT>
</TD>
<TD style="padding-left:1em">
Description<BR>
<DIV NAME="detailPanel" id="detailPanel" STYLE="width:100%; height:96px; border:1px solid blue">
</DIV>
</TD>
</TR>
</TABLE>
<BR><BR>
</body>
</html>
You can only see the result correctly in web, not open from file system.
I play it more. This situation only happens on heavy styling -- font is problem.
So, I try to set my SELECT with fixed size font (font-family:monospace,Courier,Courier New;), then both SELECT and DIV are in the same height.
<html>
<head>
<title>Control SELECT height</title>
<STYLE>
BODY, TABLE, TD, TH, P, OL, LI, INPUT, SELECT, BUTTON {font-family: Verdana, sans-serif; color:#343434}
</STYLE>
</head>
<body>
<TABLE width="100%" border="0" cellpading="0" cellspacing="0">
<TR valign="top">
<TD width="50%">
Avialable List <BR>
<SELECT SIZE="7" NAME="available" id="available" STYLE="width:100%; height:96px;">
</SELECT>
</TD>
<TD style="padding-left:1em">
Description<BR>
<DIV NAME="detailPanel" id="detailPanel" STYLE="width:100%; height:96px; border:1px solid blue">
</DIV>
</TD>
</TR>
</TABLE>
<BR><BR>
<TABLE width="100%" border="0" cellpading="0" cellspacing="0">
<TR valign="top">
<TD width="50%">
Avialable List <BR>
<SELECT SIZE="7" NAME="available" id="available" STYLE="width:100%; height:96px; font-size:12px; font-family: monospace,Courier,Courier New;">
</SELECT>
</TD>
<TD style="padding-left:1em">
Description<BR>
<DIV NAME="detailPanel" id="detailPanel" STYLE="width:100%; height:96px; border:1px solid blue">
</DIV>
</TD>
</TR>
</TABLE>
<BR><BR>
</body>
</html>
You can only see the result correctly in web, not open from file system.
Monday, September 29, 2008
Use text-algin:right for table
Try the following code to align inner table (print) to right.
In IE, that is straight forward -- I got "Print" to the right side. But, not Firefox.
According to http://bytes.com/forum/thread100308.html "The text-align property affects, by CSS specifications, the alignment of text lines inside the element. The inner table is a block element, so it is not affected.", that is make sense to me. However, it just give my style sheet more complication.
<TABLE width="100%" cellpadding="0" cellspacing="0" border="1">
<TR>
<TD><H1>Header</H1></TD>
<TD style="text-align:right">
<TABLE><TR><TD>Print</TD></TR></TABLE>
</TD>
</TR>
</TABLE>
In IE, that is straight forward -- I got "Print" to the right side. But, not Firefox.
According to http://bytes.com/forum/thread100308.html "The text-align property affects, by CSS specifications, the alignment of text lines inside the element. The inner table is a block element, so it is not affected.", that is make sense to me. However, it just give my style sheet more complication.
Friday, September 26, 2008
IE 8 beta 2
Just installed IE 8 beta 2. Before I installed it, I need to go through a whole bunches of windows update -- they were incredible huge.
The most obvious change I noticed is tabs. Better interface is always plus.
The long time most inconvenience feature in IE is open new URL by hitting "Ctrl+l".
In Firefox and Safari, the window focus move to address bar once "Ctrl+l" hit.
However, IE 8 still comes out a small pop up.
The problems are :
1) It covers up some page content.
2) This pop up can be fake by malicious site.
3) It has very short text field.
4) Unfortunately, when new page open, the url don't show in the address bar. Well, it's beta.
UPDATE :
IE 8 is going to have another beta and not going to release this year.
The most obvious change I noticed is tabs. Better interface is always plus.
The long time most inconvenience feature in IE is open new URL by hitting "Ctrl+l".
In Firefox and Safari, the window focus move to address bar once "Ctrl+l" hit.
However, IE 8 still comes out a small pop up.
The problems are :
1) It covers up some page content.
2) This pop up can be fake by malicious site.
3) It has very short text field.
4) Unfortunately, when new page open, the url don't show in the address bar. Well, it's beta.
UPDATE :
IE 8 is going to have another beta and not going to release this year.
Tuesday, September 16, 2008
Headache on IE settings
I put a log in to the front page (http), but I put log in to a iframe (https) to make sure user always use https to log in and has less chance to be hacked.
But, I got "allow sub-frames to navigation across different domains".
I have main window and iframe all in the same domain, but just http and https difference. Why IE send up this warning by the default? It's getting annoying.
But, I got "allow sub-frames to navigation across different domains".
I have main window and iframe all in the same domain, but just http and https difference. Why IE send up this warning by the default? It's getting annoying.
Subscribe to:
Posts (Atom)