Category: Programming

SharePoint Online get all items with fields specified by view

I am not sure i am correct or not. There is no /_api/web/lists/GetByTitle(‘your list’)/View/getbytitle(‘your view’)/items restful api for SharePoint online. So to get the items with fields that specificed by a view, you need these steps: Call “/_api/web/lists/GetByTitle(‘your list’)/fields” to read all fields and save all “InternalName” and “FieldTypeKind” Call “/_api/web/lists/GetByTitle(‘your list’)/View/getbytitle(‘your view’)/ViewFields” to read…
Read more

2017/12/23 0

Grid in Office UI fabric js

Office UI fabric js library embedded a very old Fabric Core 5.0.1, so the grid example from Fabric Core will not work. All you have to do is change the class from “ms-lg2” to “ms-u-lg2”. Just go to , download the source and check all the class names you need. read count : 2

2017/12/17 0

Greate tutorial : SharePoint Framework Tutorial 6 – Using Office UI Fabric Components read count : 1

2017/12/14 0

WordPress SharePoint tag to read document library

I want to display files in SharePoint’s document library in my wordpress. There is one big technical problem, javascript still can’t do external authentication to SharePoint, by default your browser blocked corss site script. Even you enabled it in command line, your javascript still can’t set the custom “Cookie” in the header that need to…
Read more

2017/12/12 0

Calling SharePoint authentication.asmx

Calling SharePoint authentication.asmx need to set the “Content-Type” in header. For SOAP 1.1 (namespaces “soap”) it’s needed to use “text/xml” content type, while for SOAP 1.2 (namespaces “soap12”) – “application/soap+xml”. “application.xml” is not working. Beware of this. read count : 0

2017/12/07 0

For Java developer, login to microsoft api is a problem

I have developed a SharePoint library to read/write SharePoint Online restful api. As you can see the below image from Microsoft, we need to sign-in to Microsoft before we can get the access token. Access token is a value that you need to pass to every restful calls as a parameter, otherwise the restful call…
Read more

2017/12/07 0

PowerBI may not be a very good option to build stock chart

PowerBI may not be a very good option to build stock chart if your data set is over 10,000,000 records, it take too long to load in from MySQL. read count : 2

2017/12/03 0

Azure functions first try

Azure functions first try, sending around 60,000 to a very simple function on Azure functions, just returning a random number. Speed seems good and the charges is very very low, my account only raised $0.01 HKD for those 60,000 requests. The dashboard is not very real time, the “number of requests” has some delay. Java…
Read more

2017/12/03 0

FPGA meeting with Cityu Professor Ray and students

FPGA meeting with Cityu Professor Ray and students in a fresh morning. They are young and passions, we listen to professor introduce Xilinx and FPGA principles. read count : 0

2017/11/27 0

Learning the advance skills to build new webpart

Since the classic webpart will be nuked, i am learning the advance skills to build new webpart read count : 1

2017/11/24 0

The simplest guide to setup dev environment for stm32l476rg

The simplest guide to setup dev environment for stm32l476rg: Step 1: Install eclipse Step 2: Download STM32 workbench from Step 3: Create a “c project” in eclipse and choose the board stm32l476rg, all other settings remain defaults, there is a dialog popup and you can download the cube4l in there, which is stm32 library Step…
Read more

2017/11/21 0

FPGA talk in HKIE meetup

FPGA talk in HKIE meetup in 2017 Nov 17, invited by Daniel Ng, he is actively engage in FGPA technologies. read count : 4

2017/11/18 0

Pentaho community can’t run in mac

When you run “Data” in mac by double click it, you will have this error: /Users/peter/Downloads/data-integration>open Data\ LSOpenURLsWithRole() failed with error -10810 for the file /Users/peter/Downloads/data-integration/Data fixed by: read count : 1

2017/11/09 0

Pentaho maven development

Need to change your setting.xml because able to compile the pentaho sdk read count : 2

2017/10/21 0

A working tutorial to support jsp in spring-boot read count : 4

2016/05/10 0

Having a exe in a java project is trouble when you have AVG anti-virus

I have 3 exe files in my java project, those exe are develop by me but AVG think one of them is virus and block my file. So my eclipse is not able to compile it by maven and my project that depend on it got fail compile too. You can’t white list that files,…
Read more

2016/04/26 0

spring-boot with restful api get 406

spring-boot with restful api get 406, follow these steps to fix it: Add this to pom.xml Create in your project read count : 8

2016/04/24 0

Hibernate is trying to fetch table meta from different database

Hibernate is trying to fetch table meta from different database, why? It is very trouble because the tables in my databases have the same name, but why can’t? read count : 54

2016/04/24 1

My netbeans plugin finally appears on official plugin portal

My netbeans plugin finally appears on official plugin portal , thanks to Mr Markiewb for helping out . This plugins show a tree view of all maven goals of all projects, you can double click the goal name on tree to execute it, helping people to save time. read count : 23

2016/04/02 0

Nodejs is very fast, at least faster than java and c#

Nodejs is very fast, at least faster than java and c#, here is my test case: JMeter send rest api request from Tai Wai to Mong Kok, below is the trace route /Users/peter>traceroute traceroute to (, 64 hops max, 52 byte packets 1 ( 2.463 ms 3.169 ms 0.995 ms 2…
Read more

2016/03/28 0

Maven Runner update – now it reads nbactions.xml

now it reads nbactions.xml added a button (with star icon) to hide default maven goals.   read count : 11

2016/02/12 0

Flashing bin file to nucleo-L476RG

This command works!!! /root/Desktop>st-flash –reset write Nucleo_blink_led_NUCLEO_L476RG.bin 0x8000000 2016-01-17T15:53:54 INFO src/stlink-common.c: Loading device parameters…. 2016-01-17T15:53:54 INFO src/stlink-common.c: Device connected is: L4 device, id 0x10076415 2016-01-17T15:53:54 INFO src/stlink-common.c: SRAM size: 0x18000 bytes (96 KiB), Flash: 0x100000 bytes (1024 KiB) in pages of 2048 bytes 2016-01-17T15:53:54 INFO src/stlink-common.c: Attempting to write 16544 (0x40a0) bytes to stm32 address:…
Read more

2016/01/17 0

Nucleo STM32F103 dev board with built in STlinkV2-1 programmer   1. GNU ARM Tool Chain 2. IDE Eclipse 3. STmicro libraries 4. GDB Server 1. GNU ARM Tool Chain $ sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded (if using 14.04 follow extras steps when adding PPA) $ sudo apt-get update $ sudo apt-get install gcc-arm-none-eabi if 64bit, we need 32-bit libs $ sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 2. Eclipse…
Read more

2016/01/17 0

I use this script to check all projects for outdated maven dependency

I use this script to check all projects for outdated maven dependency read count : 3

2016/01/12 0

Tutorial : import svn with all history into github

Tutorial : import svn with all history into github Step 1) Create a project on github Step 2) Init the github project by : Step 3) git clone <— replace your project url Step 4) cd to that directory Step 5)  user and run: Step 6) svn2git –rebase Step 7) git pull Step…
Read more

2015/09/22 0

Netbeans – Maven Runner

Eclipse has a great plugin call “Eclipse runner” , i found out netbeans doesn’t have any similar one. So i develop one for netbeans. You can add maven goals under the tree node of any project. Double click the goal name will run maven in netbeans. You can download it from, or search “Maven…
Read more

2015/09/16 5

This battery save my apple magic mouse

When you change your mouse from logitech mouse to magic mouse, the first feeling is that magic mouse is much much heavier. This battery save my apple magic mouse, although it has lesser mah, but it is 5 times lighter than normal battery, so i much my magic mouse much lighter weight. And it is only…
Read more

2015/09/08 0

hard to theme netbeans perfectly

It is hard to theme netbeans using traditional swing look & feel. The reason is netbean’s tab container is not traditional swing JTabbedPane. See the post Netbeans use a AbstractViewTabDisplayerUI to support only few “default look & feel”, such as Metal, Nimbus, Aqua. see below: The problem is : This default look & feel tab container…
Read more

2015/08/06 0

Peter-swing java look & feel read count : 92

2015/08/03 0

grub is slow on bochs

if grub is running slowly on bochs, try to add “–no-rs-codes” to your grub-bios-setup command. It will be 0.5 sec versus 5 seconds different. read count : 107

2015/08/02 0

binutils compile error

If you compiling binutils and have these error, just remove d-exp.c and try again. d-exp.c should be generated by d-exp.y but binutils makefile won’t delete it during “make distclean” read count : 160

2015/05/03 0

compile dwarfdump in mac

CFLAGS=’-I /opt/local/include -L /opt/local/lib’ CXXFLAGS=’-I /opt/local/include -L /opt/local/lib’ ./configure –prefix=/peter-dwarfdump make make install Because mac gcc doesn’t search for the /opt/local, so need to specific the path manually. read count : 243

2015/03/07 0

Thinkaholic open source event 2015/2/10

Thinkaholic open source event 2015/2/10 read count : 174

2015/02/15 0

Empty bochs instrument crash in linux, but not in mac

Empty bochs instrument crash in linux, but not in mac. My instrument code is nearly empty. core dump: configure: run by: bochsrcSDL.bxrc: instrument.h: read count : 256

2014/12/25 0

Java has bug again

Java has bug again. After you installed idk 1.8u25 in your mac, open, you will see: -vm /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home But actually this line has no effect, when you run eclipse with -console -debug, you still see it is running use idk 1.6 “-vm /System/Library/Frameworks/JavaVM.framework”. To fix it, change that line to -vm /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java Peter. read…
Read more

2014/12/22 0

volatile keyword is not everything to prevent compiler optimization

When you add the keyword “volatile” in front of variable declaration, it prevents compiler to optimize the line that are using that variable. But if the line is completely useless, compiler will still optimized it out, prevent to generate any byte code for it. read count : 262

2014/12/10 0

${new} will cause error in old tomcat 7

Below code has error, because the ${new} will crash old tomcat 7. JSTL has bug. read count : 284

2014/11/14 0

Sharepoint online bug

Sharepoint online bug – If you place an html-email-address to it and click “check” button, it crash. Even you delete all text and the check button can’t resume normal. read count : 223

2014/11/11 0