Skip to main content

Posts

Showing posts from September, 2016

Agile 1 Scrum

Đọc thêm: Hướng dẫn Scrum 2016 có gì mới? Section 4, Lecture 41 Năm 1995, Jeff Sutherland và Ken Schwaber chính thức khai sinh ra Scrum. Hướng dẫn Scrum, được hai ông công bố năm 2010, là tài liệu ngắn gọn mô tả các thành phần của Scrum. Sau đó các bản cập nhật của tài liệu này được hai tác giả công bố lần lượt vào các năm 2011 và 2013. Năm 2016, dựa trên những ý kiến của cộng đồng trên User Voice hai tác giả đã quyết định cung cấp thêm một bản cập nhật nhỏ nữa với nội dung: Giá trị Scrum (Scrum Value). Về mặt văn bản, Hướng dẫn Scrum 2016 chỉ thêm mục Giá trị Scrum. “Khi các giá trị cam kết, dũng cảm, tập trung, cởi mở và tôn trọng được thể hiện và sống trong Nhóm Scrum thì họ sẽ đảm bảo được sự tồn tại của các trụ cột minh bạch, thanh tra trong Scrum và tạo ra sự tin tưởng cho mỗi thành viên. Các thành viên của Nhóm Scrum tìm hiểu, khám phá những giá trị này khi làm việc với các sự kiện, vai trò và tạo tác của Scrum. Việc áp dụng Scrum thành công phụ thuộc

Disable HUD, Unity Dash panel Ubuntu (2)

http://askubuntu.com/questions/122209/how-do-i-modify-or-disable-the-huds-use-of-the-alt-key I guest Ub pannel and hud clone MAC OSX. Everytime we enter Dash, HUD using hot key (Window | Alt) Ub start to update Indexing, etc So with slow HDD PC will hang on If we open many program at a time. OSX indexing when start, then i don't know. May be after install a new app (or similar) OSX will update indexing app ... Ub clone not good.

Joel test

Do you use source control?Can you make a build in one step?Do you make daily builds?Do you have a bug database?Do you fix bugs before writing new code?Do you have an up-to-date schedule?Do you have a spec?Do programmers have quiet working conditions?Do you use the best tools money can buy?Do you have testers?Do new candidates write code during their interview?

Nginx (4) Ubuntu Yii 1 config

sudo cat /etc/nginx/sites-available/deb.site.com server { listen 80;         server_name www.deb.site.com deb.site.com; client_body_buffer_size 10K; client_header_buffer_size 1k; client_max_body_size 8m; large_client_header_buffers 4 32k;         root /var/www/FRL/yii_proj;         index index.php;         location / {        try_files $uri $uri/ /index.php?$args; error_page 405 = $uri;         } location ~* \.php$ {     include fastcgi_params;       try_files $uri $uri/ /index.php?$args;             fastcgi_pass 127.0.0.1:9007;     }         location ~ /(protected|framework|nbproject) {             deny all;             access_log off;             log_not_found off;         }         location ~ /themes/\w+/views {             deny all;             access_log off;             log_not_found off;         }         location ~ \.(js|css|swf|ico|pdf|mov|fla|zip|rar)$ {                 try_files $uri =404;         } location ~* \.(?:ico

public function my_log($data)

public function my_log($data) { $log = "log.txt"; $ln = "\r\n"; file_put_contents($log, json_encode($data).$ln, FILE_APPEND); } // Better version with debug info (line number...) function my_log($arr,$file='',$line='') {     if(empty($file) && empty($line) ){         $bt = debug_backtrace();         $caller = array_shift($bt);         $file = $caller['file'];         $line = $caller['line'];     }     $logfile =  'log2.txt';     $ln = "\r\n";     $log =  "\n <b>debug file ".$file." line ".$line." </b>" ;     file_put_contents($logfile, json_encode($log).$ln, FILE_APPEND);     if(is_array($arr) || is_object($arr)){         file_put_contents($logfile, json_encode($arr).$ln, FILE_APPEND);         return;     }     if(is_string($arr) || is_numeric($arr)){         file_put_contents($logfile, ($arr).$ln, FILE_APPEND);         return;     }     if ($arr) {         fil

Query 3

SELECT AssessmentItem.ItemName ,AssessmentItem.OthersSelfClass ,AssessmentItem.FourStageClass ,AssessmentComment.CommentText ,AssessmentComment.ItemID ,ROUND(COALESCE(vProjectRespondentScoreCompany.score ,0), 1) AS score ,(SELECT COUNT(vProjectRespondentScoreCompanyRank.score) FROM vProjectRespondentScoreCompany AS vProjectRespondentScoreCompanyRank WHERE vProjectRespondentScoreCompanyRank.AssessmentID = 9 AND vProjectRespondentScoreCompanyRank.score > vProjectRespondentScoreCompany.score) + 1 AS rank FROM AssessmentItem JOIN AssessmentComment ON (AssessmentComment.ItemID = AssessmentItem.ItemID) LEFT OUTER JOIN vProjectRespondentScoreCompany ON (vProjectRespondentScoreCompany.ItemID = AssessmentItem.ItemID AND vProjectRespondentScoreCompany.AssessmentID = 9) LEFT JOIN SortOrder ON (AssessmentItem.OthersSelfClass = SortOrder.TargetString) WHERE 0 = 0 AND SortOrder.TargetTable = 'AssessmentItem

SSO 2

How is this different from OAuth? With OAuth, you can authenticate a user at an external server and get access to their profile info. However you aren't sharing a session. A user logs in to website foo.com using Google OAuth. Next he visits website bar.org which also uses Google OAuth. Regardless of that, he is still required to press on the 'login' button on bar.org. With Jasny/SSO both websites use the same session. So when the user visits bar.org, he's automatically logged in. When he logs out (on either of the sites), he's logged out for both. https://github.com/jasny/sso http://stackoverflow.com/questions/5062569/how-to-do-single-sign-on-with-php Why SSO account (company gmail) cant use as SSMTP sender ? If you're just interested in reading the emails in a Gmail inbox you should forgo the cURL pseudo-browser path; instead, enable POP or IMAP on the Gmail account and use PHP's excellent IMAP/POP3 functions to access the Gmail inbox. If on

kana, hira full/half size

That is because UTF8 alway use 3 byte to store Japaneses characters, no matter kanji or kana half size or kana full size character. You can see the different if you use Japanese encode Shift_JIS which will use 1 byte for half size and 2 bytes for kanji and full size. ->To see more detail, you can use notepad++ editor, use 3 text file to store Japaneses character - 1 file format with encode utf8 - 1 file format with encode shift-jis - 1 file format with encode ANSI Then look at detail of file size in window explorer, you will see the difference -> other way, i am java programmer, so here is my code to check bytes in difference encode     public static void main(String[] args) {         // TODO Auto-generated method stub         String fullKana = "ナ";         String halfKana = "ナ";         String kanji = "使";         try {             System.out.println("=====fullKana==Shift_JIS===" + fullKana.getBytes("Shift_JIS&qu

DI one

I have written a process which sends bulk emails asynchronously. Each time a handler is invoked, a service method 'processEmailQueue' is called which iterates over a number of available threads, each thread grabbing 10 records from the outstanding queue, building the content of the email for that user and sending it to the SMTP server. I want to be able to generate the content of the email from a view, passing in the data from that user to be rendered. If this was a handler I would do something like var emailContent = renderView( view="/email/emailtemplate", args=userData ); What would be the best way of doing this from within the service? Or should the process which creates the threads and generates the content take place in a handler, calling service methods? Thanks You should be able to ask WireBox for an instance of "renderer@coldbox" which is the core rendering helper.  This is a transient, and you need a new instance of the renderer for ea

Google Single SignOn API

http://www.programmableweb.com/api/google-single-signon Google Single SignOn API Tags [Security] [Authentication] From their site: Security Assertion Markup Language (SAML) is an XML standard that allows secure web domains to exchange user authentication and authorization data. Using SAML, an online service provider can contact a separate online identity provider to authenticate users who are trying to access secure content. Google Apps offers a SAML-based Single Sign-On (SSO) service that provides partner companies with full control over the authorization and authentication of hosted user accounts that can access web-based applications like Gmail or Google Calendar. Using the SAML model, Google acts as the service provider and provides services such as Gmail and Partner Start Pages (PSP). Google partners act as identity providers and control usernames, passwords and other information used to identify, authenticate and authorize users for web applications that Google hosts.

Vagrant VirtualBox rsync suck

Manual rsync still suck More manual: alias synccode='rsync -azr --ignore-existing --recursive  nickfarow@192.168.6.82:/var/www/NTQ/kotora25/src/ /vagrant/src/' alias syncrsp='~/bin/rsync_rsp' [vagrant@localhost bin]$ syncrsp nickfarow@192.168.6.82's password: [vagrant@localhost bin]$ cat rsync_rsp rsync -azr --update --existing  nickfarow@192.168.6.82:/var/www/NTQ/kotora25/src/webapps/respondent/ /vagrant/src/webapps/respondent/ Note that rsync params: update, ignore exists ... Guest PC log will be remove by rsync ? because Host PC do not have (rsync back not work) vagrant rsync-auto snail. Other Host PC generate file like grunt, gulp can be sync manual from Guest but log (generated from Guest) do not need sync back to Host. How to auto fill password ? Or use key.

CF Count line in file

    <cffunction name="countLineInFile">         <cfargument name="filePath" required="yes">         <cfif NOT FileExists(filePath)>             <cfreturn 0>         </cfif>         <cfset totalLine = 0>         <cffile action="read" file="#filePath#" variable="csvInp">         <cfset totalLine = ListLen(csvInp, Chr(10))> <!--- awkwark way --->        <!---  <cfloop file="#filePath#" index="line" charset="shift-jis">             <cfset lineData = ListToArray(#line#) >             <cfif NOT ArrayIsEmpty(lineData) >                 <cfset totalLine = totalLine+1 >             </cfif>         </cfloop> --->         <cfreturn totalLine >     </cffunction> Next Issues: Performance import file (csv) How to reduce query using StringBuffer query, transaction ... Timeout su

Bash Random email generator

#!/bin/bash # bash generate random alphanumeric string # # TODO add params mail_tail="@mailinator.com" # bash generate random 32 character alphanumeric string (upper and lowercase) and NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) # bash generate random 32 character alphanumeric string (lowercase only) rand_email_name=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 10 | head -n 1) rand_mail_full=$rand_email_name$mail_tail; COUNTER=0 while [ $COUNTER -lt 1000 ]; do rand_email_name=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 10 | head -n 1) rand_mail_full=$rand_email_name$mail_tail; echo $rand_mail_full let COUNTER=COUNTER+1 done RUN: rand_email > list_1k_email Need more refine to use params

OO Calc To PDF fit page

https://forum.openoffice.org/en/forum/viewtopic.php?f=9&t=557 Use Right To Left with width sheet (2 to 3 page width) Use Scale Fit page number 1. Many sheet need edit manualy (still do not find way config all sheet). Default config do not affect created sheet. Other setting options tried Demo

Strange FW PHP

7/7/2016 ems.local.dev/index.php?app_controller=search&type=question&run=true&pal=qna_blog http://ems.local.dev/index.php?app_controller=search&type=question&run=true&pal=qna_blog 1/12 ( ! ) Fatal error: Maximum function nesting level of '256' reached, aborting! in /var/www/NTQ/ems/src/include/base/Util.php on line 50 Call Stack # Time Memory Function Location 1 0.0000 232888 {main}( ) .../index.php:0 2 0.0389 4267800 MVC::Call( ) .../index.php:13 3 0.0394 4321944 AppSearchController­>doSearch( ) .../mvc.php:47 4 0.0399 4366016 AppSearchView­>drawSearchResultPage( ) .../controller.php:36 5 0.0399 4382656 questionSystem­>drawSearch( ) .../view.php:52 6 0.0399 4383144 Template::drawTemplate( ) .../questionSystem.php:41 7 0.0399 4383464 Template::getTemplateString( ) .../Template.php:69 8 0.0404 4385176 GUIManager­>getString( ) .../Template.php:82 9 0.0440 4494784 GUIManager­>commandComment( ) .../GUIManager.php:577 10 0.0442 4

CF1

http://blog.adamcameron.me/2014/03/confusion-as-to-why-cfhtmltopdf-is-not.html I hate to be the bring bad news, but request timeout errors are the most difficult to track down because the error reporting on ACF usually just points to a line that doesn't make sense.  This is because ACT only checks of the request timeout is exceeded on certain tags (not all tags).  CFloop is one of them.  The error you are seeing is that it checked the request timeout at the end of the loop.  The loop itself is NOT causing the error.  For example, your request timeout may be something like 30 seconds.  At the beginning of the loop, the request time is 29.99 and therefore hasn't timed out.  At the end of the loop, it has timed out and CF reports the loop as the error. What you need to do is look for things that can cause the request to take too much time: * queries * web services / rest requests * cfdocument * cfimage * cfpdf * file operations * cfmail operations We all &qu