Hi, it's me, Lumzuee Pharm!
Today I'm going to show you how to use C# dll file in Java project (I used Visual Studio & NetBean) with JNI4NET. Actually there are 2 common methods for this problem: JNI4NET & JAVONET. But Javonet is a paid solution & I don't like this :3
Requirement:
- Java JDK, .NET SDK,
- add csc.exe & javac.exe to the PATH
- Visual Studio
- Java IDE (netbean, eclipse,...)
- lib files: jni4net.j-0.8.8.0.jar, jni4net.j-0.8.8.0.dll, jni4net.n.w64.v40-0.8.8.0.dll, yourLib.dll
- build tool: proxygen.exe, proxygen.exe.config & cmd file to run proxygen.
Creating proxies:
- put necessary files to a folder "create lib"
- run "create proxies.cmd", it will run proxygen.exe
- run "build.cmd" in folder "output"
- copy 2files: "yourLib.j4n.dll" & "yourLib.j4n.jar" to folder "lib"
- copy lib files into folder "lib"
LumZuee Pharm
Dream is not the thing you see in sleep but is that thing that doesn't let you sleep ― A.P.J. Abdul Kalam
Monday, July 23, 2018
Friday, September 22, 2017
Basic - Mảng trong C#
Cái này hay bị quên 😆😆😆😆
int[,] is a rectangular array - one object which has two dimensions. Each element of the array is an integer; all elements are stored contiguously in memory.int[][] is a jagged array - an array where each element is in turn an int[]. (So it's an array of arrays.) Although each element of the "top level" array is stored contiguously, those elements are just references to other arrays, which could be anywhere in memory.
Whereas rectangular arrays always have the same number of columns per row, in a jagged array each element could have a different length (or indeed may be null).
Each has its own advantages and disadvantages; rectangular arrays are more compact in terms of memory, but don't allow sparse population. Jagged arrays are faster in the CLR, but don't have as good cache coherence. The extra space taken up by the "row arrays" in jagged arrays can be significant in some cases - if you have an
int[10000, 2] that will only take up 80000 bytes plus the overhead of one array object, whereas in a jagged array it would be the 80000 bytes for the data and the overhead of 10001 array objects.Friday, December 16, 2016
SQL - database diagram support objects cannot be installed...
Error:
You should consider SQL authentication account for database ownership; then you don't have to worry about accounts coming and going, databases or instances moving to different servers, and your next PC name change. I have several systems where we use:
ALTER AUTHORIZATION ON DATABASE::LumZueeDB TO [sa];
Or if you want to change the owner to that local Administrator account, then it should be:
ALTER AUTHORIZATION ON DATABASE::LumZueeDB TO [ThinkPad-PC\Administrator];
Note:
LumZueeDB : name of database
ThinkPad-PC\Administrator: account
Friday, July 10, 2015
EBook - Pro C# 5.0 and the .NET Framework
Dạo này không lập trình, kỹ năng kém hẳn đi. Tìm tòi lên mạng lục được cuốn này. Chia sẻ cho mọi người. ^_^
Down load ở đây.
Down load ở đây.
Thursday, July 9, 2015
Một số lưu ý khi nâng cấp lên Windows 10 từ Windows 7, 8.1 - Windows 10 FAQ

Mình có bản quyền Win7Pro mà chưa biết nâng cấp xong đuọc bản nào nên tìm hiểu trên www.microsoft.com. Tiện thể dịch lại (theo ý hiểu của mình) cho mấy bạn luôn:
Thursday, December 4, 2014
[Java Script] Tool cộng ngày (Add day program)
Đôi khi, người yêu nó hỏi "mềnh yêu nhao được mấy ngày rồi anh?". Không biết trả lời sao. Đành viết cái tool cộng ngày làm bằng HTML + JavaScript để trả lời nó. hihihi.
Trông nó sẽ như thế lày:
Sau đây là code chương trình:
Trông nó sẽ như thế lày:
Sau đây là code chương trình:
<!DOCTYPE html><html><head></head><body onload="onLoad()"><h1>Add day program by LumZuee</h1><table><tr><td><label>Start Date:</label> </td><td><input type="text" name="startdate" value="2014-09-26"></td></tr><tr><td><label>Add day:</label></td><td><input type="text" name="add" value="0"></td></tr></table><button id="dateBtn">Click me!</button><script>function onLoad() { document.getElementById('dateBtn').onclick = function () { var xdate = document.getElementsByName('startdate')[0].value; var date = xdate.split('/'); var add = document.getElementsByName('add')[0].value; var dt = new Date(xdate); dt.setDate( +dt.getDate()+ +add); //dt.setMonth(date[1]-1); //dt.setYear(date[2]); //dt.setTime(1111111111111) alert(dt); };}</script></body></html>
Thursday, June 12, 2014
Sử dụng CSS Templates vào ASP.NET MVC3 App
Lên mạng mò mẫm, kiếm được cái video này, rất hay và rất đơn giản cho những ai mới bắt đầu
[youtube http://www.youtube.com/watch?v=0O0gi2m_p_o&w=640&h=480]
Subscribe to:
Comments (Atom)

