Warning: session_start(): open(/var/cpanel/php/sessions/ea3/sess_e54rur0jdn2a9h8ftng1c04v87, O_RDWR) failed: No such file or directory (2) in /home/dfu/public_html/studio/wp-content/plugins/counterize/counterize.php on line 16

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/dfu/public_html/studio/wp-content/plugins/counterize/counterize.php:16) in /home/dfu/public_html/studio/wp-content/plugins/counterize/counterize.php on line 16

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/dfu/public_html/studio/wp-content/plugins/counterize/counterize.php:16) in /home/dfu/public_html/studio/wp-content/plugins/counterize/counterize.php on line 16

Warning: Cannot modify header information - headers already sent by (output started at /home/dfu/public_html/studio/wp-content/plugins/counterize/counterize.php:16) in /home/dfu/public_html/studio/wp-includes/feed-rss2.php on line 8
綠葉工作室 http://studio.5dfu.com 分享、樂活、存在 Mon, 29 Oct 2018 09:22:37 +0000 zh-TW hourly 1 https://wordpress.org/?v=5.1.18 Google Play APP 隱私權政策 http://studio.5dfu.com/uncategorized/google-play-app-pp/ http://studio.5dfu.com/uncategorized/google-play-app-pp/#respond Mon, 29 Oct 2018 08:34:49 +0000 http://studio.5dfu.com/?p=265 Google Play APP 隱私權政策
本開發者Wu ChunHung於Google Play上提供之所有應用程式,均符合以下隱私權政策規範:當您使用APP功能時,我們將視該服務功能性質,請您提供必要的APP系統權限,並在該特定目的範圍內處理及利用您的個人資料; 本APP不會將個人資料用於其他用途。本人不會於任何伺服器會自行記錄相關行徑,包括您使用連線設備的IP位址、使用時間、使用的瀏覽器、瀏覽及點選資料記錄等。本APP其他第三方APP的網路連結或廣告SDK行為,不適用本網站的隱私權保護政策,您必須參考該連結網站中或該廣告公司的隱私權保護政策。

本APP絕不會提供、交換、出租或出售任何您的個人資料給其他個人、團體、私人企業或公務機關。

本網站隱私權保護政策將因應需求隨時進行修正,修正後的條款將刊登於網站上。

All apps provided by this developer, Wu ChunHung, on Google Play are subject to the following privacy policy: When you use the APP function, we will regard the nature of the service function, you provide the necessary APP system permissions, and within the scope of the specific purpose of handling and use of your personal information; this APP will not use personal data for other purposes .

I will not automatically record any action on any server, including the IP address of the device you are using, the time of use, the browser you are using, browsing, and clicking on data records. This APP’s other third party APP’s web link or advertisement SDK’s behaviour does not apply to the privacy policy of this site, you must refer to the privacy policy in the link site or of the advertisement company.

The APP will never provide, exchange, rent or sell any of your personal information to other individuals, groups, private enterprises or public authorities. The privacy policy of this site will be amended at any time in accordance with the needs, the revised terms will be published on the website.

]]>
http://studio.5dfu.com/uncategorized/google-play-app-pp/feed/ 0
ready vs load http://studio.5dfu.com/jquery/ready-vs-load/ http://studio.5dfu.com/jquery/ready-vs-load/#respond Fri, 10 Mar 2017 05:39:35 +0000 http://studio.5dfu.com/?p=258 ready vs load

 

$(document).ready(fn)→發生在”網頁本身的HTML”載入後就觸發。

$(window).load(fn)→會等到”網頁HTML標籤中引用的圖檔、內嵌物件……”等等一些東西全都載入後才會觸發。

 

 

]]>
http://studio.5dfu.com/jquery/ready-vs-load/feed/ 0
移除預設程式設定(ex: .lnk) http://studio.5dfu.com/%e9%9b%bb%e8%85%a6%e6%87%89%e7%94%a8/%e7%a7%bb%e9%99%a4%e9%a0%90%e8%a8%ad%e7%a8%8b%e5%bc%8f%e8%a8%ad%e5%ae%9aex-lnk/ http://studio.5dfu.com/%e9%9b%bb%e8%85%a6%e6%87%89%e7%94%a8/%e7%a7%bb%e9%99%a4%e9%a0%90%e8%a8%ad%e7%a8%8b%e5%bc%8f%e8%a8%ad%e5%ae%9aex-lnk/#respond Mon, 05 Sep 2016 02:28:51 +0000 http://studio.5dfu.com/?p=232 早上一來上班,就接到user的電腦問題,桌面上.lnk檔全部變成某一個程式預設開啟了,原來是user不小心按到的~”~,

上網找了一下解法。如下:


1. 開始→執行→輸入「regedit」,開啟登錄檔編輯程式。

2.利用左邊的樹狀結構,找出HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts,展開 FileExts 資料夾後,其下各個子資料夾即是存放各種副檔名設定值的地方。

3. 以今天這種蠢況看來,就是把 .lnk 的資料夾刪掉就對了。重開以後就可以收工了。

4.重新開機


 

]]>
http://studio.5dfu.com/%e9%9b%bb%e8%85%a6%e6%87%89%e7%94%a8/%e7%a7%bb%e9%99%a4%e9%a0%90%e8%a8%ad%e7%a8%8b%e5%bc%8f%e8%a8%ad%e5%ae%9aex-lnk/feed/ 0
JQUERY AJAX 跨網域 callback c# http://studio.5dfu.com/jquery/jquery-ajax-%e8%b7%a8%e7%b6%b2%e5%9f%9f-callback-c/ http://studio.5dfu.com/jquery/jquery-ajax-%e8%b7%a8%e7%b6%b2%e5%9f%9f-callback-c/#comments Tue, 22 Dec 2015 01:54:21 +0000 http://studio.5dfu.com/?p=219 JQUERY AJAX 跨網域 callback

範例說明: 轉入姓名至後台,後台傳回你所輸入的姓名。 

後台

<%@ WebHandler Language="C#" Class="getAjaxData" %>

using System;
using System.Web;

public class getAjaxData : IHttpHandler {
    
    public void ProcessRequest (HttpContext context) {
        string strcallback = context.Request["callback"];
        string strName = context.Request["Name"];

        string strJsonp = "{\"NAME\": \"" + strName + "\"}";
        string strReturn = strcallback + "(" + strJsonp + ")";
        
        context.Response.ContentType = "application/json";
        context.Response.ContentEncoding = System.Text.Encoding.UTF8;
        context.Response.Write(strReturn);
        context.Response.End();
    }
    
    public bool IsReusable {
        get {
            return false;
        }
    }
}

 前台

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>

<script>
    $(window).load(function () {
        var fbURL = "http://pad.uwood.com.tw/oapi/getAjaxData.ashx?callback=?";
        var options = {
            NAME: "Brent"       //參數
        };
        var data = $.getJSON(fbURL, options);

        //成功得到資料
        data.success(function (msg) {
            alert("您的姓名為:" + msg.NAME);
        });

        //取得資料失敗  
        data.error(function (msg) {
            alertify.success("取得資料失敗!!");
        });
    });
</script>

 

 

SourceCode 

下載點:JqueryAjax1.zip

解壓縮密碼:  5dfu.com

]]>
http://studio.5dfu.com/jquery/jquery-ajax-%e8%b7%a8%e7%b6%b2%e5%9f%9f-callback-c/feed/ 1
C# 用 ZXing 產生 QR Code ,NuGet ZXing教學 QR Code 產生 API http://studio.5dfu.com/asp-net/c-%e7%94%a8-zxing-%e7%94%a2%e7%94%9f-qr-code-%ef%bc%8cnuget-zxing%e6%95%99%e5%ad%b8-qr-code-%e7%94%a2%e7%94%9f-api/ http://studio.5dfu.com/asp-net/c-%e7%94%a8-zxing-%e7%94%a2%e7%94%9f-qr-code-%ef%bc%8cnuget-zxing%e6%95%99%e5%ad%b8-qr-code-%e7%94%a2%e7%94%9f-api/#comments Thu, 10 Dec 2015 06:58:21 +0000 http://studio.5dfu.com/?p=203 原本使用Google Chart API,無法指定圖檔色彩,只好自已寫一個類似的API來使用。

 

一.新增一個空白的網站,如下:

1

 

二.新增NuGet套件→輸入ZXing查詢,安裝 ZXing.Net插件。

2

三.安裝後。自已會產生以下檔案。

3

四‧開始寫程式啦,程式碼如下:

新增CreateQRCode.ashx 

<%@ WebHandler Language="C#" Class="CreateQRCode" %>

using System;
using System.Web;

using System.Drawing;
using System.IO;
using System.Net;

using ZXing;
using ZXing.Common;
using ZXing.QrCode;
using ZXing.QrCode.Internal;

public class CreateQRCode : IHttpHandler {
    
    public void ProcessRequest (HttpContext context) {

        string strTxt = context.Request["txt"];
        string strW = context.Request["w"];
        string strH = context.Request["h"];
        string strSTxt = context.Request["stxt"];
        string strCLASS = context.Request["cls"];
        string strBG = context.Request["bg"];
        string strFG = context.Request["fg"];

        if (strTxt == null) strTxt = "";
        if (strSTxt == null) strSTxt = "";
        if (strW == null) strW = "150";
        if (strH == null) strH = "150";
        if (strBG == null) strBG = "FFFFFF";
        if (strFG == null) strFG = "000000";

        strBG = "#" + strBG;
        strFG = "#" + strFG;

        if (!strTxt.Trim().Equals(""))
        {
            var writer = new BarcodeWriter  
            {
                Format = BarcodeFormat.QR_CODE,

                Renderer = new ZXing.Rendering.BitmapRenderer { Background = System.Drawing.ColorTranslator.FromHtml(strBG), Foreground = System.Drawing.ColorTranslator.FromHtml(strFG) },

                Options = new QrCodeEncodingOptions
                {
                    Height = Int32.Parse(strH),
                    Width = Int32.Parse(strW),
                    DisableECI = true,
                    CharacterSet = "UTF-8",
                    ErrorCorrection = ErrorCorrectionLevel.H,
                    Margin = 1,
                }
            };

            Bitmap m_Bitmap = writer.Write(strTxt);
            MemoryStream ms = new MemoryStream();
            m_Bitmap.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);//JPG、GIF、PNG等均可  
            string uploadPath = HttpContext.Current.Server.MapPath(@context.Request["folder"]) + "\\img\\\\CrtQRCode\\";

            byte[] buff = ms.ToArray();

            if (buff == null)
            {
                HttpContext.Current.Response.ContentType = "text/plain";
                HttpContext.Current.Response.Write("Error converting!");
            }

            try
            {
                string FileName = strTxt + ".jpeg";
                //宣告並建立WebClient物件
                WebClient wc = new WebClient();

                HttpContext.Current.Response.Clear();
                HttpContext.Current.Response.ClearHeaders();
                HttpContext.Current.Response.Charset = "utf-8";
                HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.UTF8;
                HttpContext.Current.Response.ContentType = "image/jpeg"; //二進位方式

                //設定標頭檔資訊
                HttpContext.Current.Response.AddHeader("Content-Disposition", "inline;  filename=" + HttpUtility.UrlEncode(FileName));
                HttpContext.Current.Response.AddHeader("Content-Transfer-Encoding", "Binary");
                HttpContext.Current.Response.AddHeader("Content-Length", buff.Length.ToString());
                HttpContext.Current.Response.BinaryWrite(buff);
                HttpContext.Current.Response.End();

            }
            catch (Exception e)
            {
                HttpContext.Current.Response.ContentType = "text/plain";
                HttpContext.Current.Response.Write(e.Message);
            }
        }

    }
    
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}

 

五.驗證是否正常

5

使用方式: (圖檔)

<img src= ‘http://網址/CreateQRCode.ashx?bg=背景色&fg=文字顏色&w=寬&h=高&txt=QRCODE內容’  />

參數說明:

txt:內容(必填)
w:寬(預設:150 可不填)
h:高(預設:150 可不填)
fg:文字顏色(預設:000000 可不填)
bg:背景色(預設:FFFFFF 可不填)

 

六.附上SourceCode 

下載點: CreateQRCode

解壓縮密碼:  5dfu.com

 

 

 

 

]]>
http://studio.5dfu.com/asp-net/c-%e7%94%a8-zxing-%e7%94%a2%e7%94%9f-qr-code-%ef%bc%8cnuget-zxing%e6%95%99%e5%ad%b8-qr-code-%e7%94%a2%e7%94%9f-api/feed/ 2
SQL跨主機連線 http://studio.5dfu.com/mssql/sql%e8%b7%a8%e4%b8%bb%e6%a9%9f%e9%80%a3%e7%b7%9a/ http://studio.5dfu.com/mssql/sql%e8%b7%a8%e4%b8%bb%e6%a9%9f%e9%80%a3%e7%b7%9a/#comments Thu, 10 Dec 2015 02:00:28 +0000 http://studio.5dfu.com/?p=198 SQL跨主機連線

1.如需長期使用到→直接於資訊庫中註冊

–註冊遠端伺服器名稱
EXEC sp_addlinkedserver ‘otherDB’,”,’SQLOLEDB’,’192.168.*.* 
EXEC sp_addlinkedsrvlogin ‘otherDB’,’false’,null,’帳號‘,’密碼

select * from otherDB.資料庫名稱.dbo.表格

–將伺服器DROP掉
EXEC sp_dropserver ‘otherDB’,’droplogins’

2.臨時使用,直接使用語法即可

SELECT *
FROM OPENDATASOURCE (‘SQLOLEDB’,’Data Source=192.168.*.*;User ID=帳號;Password=密碼‘ ).資料庫.dbo.表格

 

]]>
http://studio.5dfu.com/mssql/sql%e8%b7%a8%e4%b8%bb%e6%a9%9f%e9%80%a3%e7%b7%9a/feed/ 1
Google Chart API –快速產生QR CODE http://studio.5dfu.com/android-%e9%96%8b%e7%99%bc/google-chart-api-%e5%bf%ab%e9%80%9f%e7%94%a2%e7%94%9fqr-code/ http://studio.5dfu.com/android-%e9%96%8b%e7%99%bc/google-chart-api-%e5%bf%ab%e9%80%9f%e7%94%a2%e7%94%9fqr-code/#comments Fri, 04 Dec 2015 05:10:56 +0000 http://studio.5dfu.com/?p=195 Google Chart API 是Google提供的線上製作圖表工具,它不僅能畫出圖表,也是能線上製作QR Code二維條碼的,只需要透過網址URL就可以輸出成圖片了,應用於社群網站、部落格網站或是名片等等,都是非常方便取得資訊的一個管道,然而現在智慧型手機也漸漸普遍使用更為廣泛。

格式為:

http://chart.apis.google.com/chart?cht=qr&chl={內容}&chs={寬X高}

假設我要把    http://studio.5dfu.com/   內容變成QR碼圖片的話,就可以設定成:

http://chart.apis.google.com/chart?cht=qr&chl=http://studio.5dfu.com/&chs=150×150

綠葉工作室

]]>
http://studio.5dfu.com/android-%e9%96%8b%e7%99%bc/google-chart-api-%e5%bf%ab%e9%80%9f%e7%94%a2%e7%94%9fqr-code/feed/ 1
優渥實木 1+2+3自由配 買套餐再享95折 http://studio.5dfu.com/%e6%ad%90%e5%be%b7%e5%82%a2%e4%bf%b1/%e5%84%aa%e6%b8%a5%e5%af%a6%e6%9c%a8-123%e8%87%aa%e7%94%b1%e9%85%8d-%e8%b2%b7%e5%a5%97%e9%a4%90%e5%86%8d%e4%ba%ab95%e6%8a%98/ http://studio.5dfu.com/%e6%ad%90%e5%be%b7%e5%82%a2%e4%bf%b1/%e5%84%aa%e6%b8%a5%e5%af%a6%e6%9c%a8-123%e8%87%aa%e7%94%b1%e9%85%8d-%e8%b2%b7%e5%a5%97%e9%a4%90%e5%86%8d%e4%ba%ab95%e6%8a%98/#comments Wed, 09 Sep 2015 10:00:48 +0000 http://studio.5dfu.com/?p=164 優渥實木 1+2+3自由配 買套餐再享95折

優渥實木新推出的優惠活動

有買傢俱需求的人。可以參考哦^^

201509

]]>
http://studio.5dfu.com/%e6%ad%90%e5%be%b7%e5%82%a2%e4%bf%b1/%e5%84%aa%e6%b8%a5%e5%af%a6%e6%9c%a8-123%e8%87%aa%e7%94%b1%e9%85%8d-%e8%b2%b7%e5%a5%97%e9%a4%90%e5%86%8d%e4%ba%ab95%e6%8a%98/feed/ 1
[ASP.NET] 如何於泛型處理常式(ashx)中存取工作階段變數(Session) http://studio.5dfu.com/asp-net/asp-net-%e5%a6%82%e4%bd%95%e6%96%bc%e6%b3%9b%e5%9e%8b%e8%99%95%e7%90%86%e5%b8%b8%e5%bc%8fashx%e4%b8%ad%e5%ad%98%e5%8f%96%e5%b7%a5%e4%bd%9c%e9%9a%8e%e6%ae%b5%e8%ae%8a%e6%95%b8session/ http://studio.5dfu.com/asp-net/asp-net-%e5%a6%82%e4%bd%95%e6%96%bc%e6%b3%9b%e5%9e%8b%e8%99%95%e7%90%86%e5%b8%b8%e5%bc%8fashx%e4%b8%ad%e5%ad%98%e5%8f%96%e5%b7%a5%e4%bd%9c%e9%9a%8e%e6%ae%b5%e8%ae%8a%e6%95%b8session/#comments Fri, 21 Aug 2015 06:44:25 +0000 http://studio.5dfu.com/?p=157 今天在使用 泛型處理常式 (ashx)時,要使用Session變數時,發現不能用,會出現錯誤。

原來ashx並沒有直接內建需手動設定。

原始內容

 1

解決方式:

在本來僅繼承自「IHttpHandler 介面」的類別後(or 前)加上 「System.Web.SessionState.IRequiresSessionState」的程式碼, 我們就可以存取 ProcessRequest HttpContext 參數下的 Session (工作階段變數) 的值!

如下:

3

 

]]>
http://studio.5dfu.com/asp-net/asp-net-%e5%a6%82%e4%bd%95%e6%96%bc%e6%b3%9b%e5%9e%8b%e8%99%95%e7%90%86%e5%b8%b8%e5%bc%8fashx%e4%b8%ad%e5%ad%98%e5%8f%96%e5%b7%a5%e4%bd%9c%e9%9a%8e%e6%ae%b5%e8%ae%8a%e6%95%b8session/feed/ 1
Hello Kitty 公主風兒童傢俱 – 歐德傢俱&三麗鷗 http://studio.5dfu.com/%e6%ad%90%e5%be%b7%e5%82%a2%e4%bf%b1/hello-kitty-%e5%85%ac%e4%b8%bb%e9%a2%a8%e5%85%92%e7%ab%a5%e5%82%a2%e4%bf%b1-%e6%ad%90%e5%be%b7%e5%82%a2%e4%bf%b1%e4%b8%89%e9%ba%97%e9%b7%97/ http://studio.5dfu.com/%e6%ad%90%e5%be%b7%e5%82%a2%e4%bf%b1/hello-kitty-%e5%85%ac%e4%b8%bb%e9%a2%a8%e5%85%92%e7%ab%a5%e5%82%a2%e4%bf%b1-%e6%ad%90%e5%be%b7%e5%82%a2%e4%bf%b1%e4%b8%89%e9%ba%97%e9%b7%97/#respond Fri, 21 Aug 2015 05:43:24 +0000 http://studio.5dfu.com/?p=148 歐德系統傢俱現有推出Hello Kitty系統商品,大家可以參考看看哦^^

kk4 kk5 kk6 kk7 KK KK2 KK3

]]>
http://studio.5dfu.com/%e6%ad%90%e5%be%b7%e5%82%a2%e4%bf%b1/hello-kitty-%e5%85%ac%e4%b8%bb%e9%a2%a8%e5%85%92%e7%ab%a5%e5%82%a2%e4%bf%b1-%e6%ad%90%e5%be%b7%e5%82%a2%e4%bf%b1%e4%b8%89%e9%ba%97%e9%b7%97/feed/ 0

Warning: Unknown: open(/var/cpanel/php/sessions/ea3/sess_e54rur0jdn2a9h8ftng1c04v87, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/cpanel/php/sessions/ea3) in Unknown on line 0