原创 C# MVC4環境下Uploadify 3.2.1上傳文件
1.新建一個空的MVC4項目 2.添加一個Home控制器,並在Home控制器下添加一個Index視圖 3.下載Flash版的uploadify,鏈接:Uploadify下載地址 4.解壓壓縮包,得到下列文件 5.單擊項目Upl
原创 Linq
1. using (DbAppDataContext db = new DbAppDataContext()) { db.Log = Console.Out; //取出student
原创 A project with that name already exists in the workspace
在工作空間下,已經有一個同名的項目已經存在。 解決辦法:刪除現有工程,重新新建 刪除辦法:Window->Show View->Project Explorer OK !
原创 Linux安裝VSCode
1.下載Linux版本的VSCode,鏈接:http://go.microsoft.com/fwlink/?LinkID=534108 2.解壓 3.進入解壓後的文件夾,雙擊“Code”文件便可直接運行Visual Studio Cod
原创 This text field does not specify an `inputType` or a `hint`
安卓界面加入EditText後出現的警告信息 警告位置: 意思是說:EditText控件需要指定一種輸入類型用於幫助輸入法顯示合適的輸入鍵盤,或者當EditText爲空時顯示的提示信息方便用戶輸入 而EditText對應的輸入類型有:
原创 什麼是依賴注入?
原文鏈接:http://www.cnblogs.com/linjiancun/archive/2010/10/13/1849908.html 依賴注入產生的背景: 隨着面向對象分析與設計的發展,一個良好的設計,核心原則之一就是將變化隔離
原创 C++ 多態(一)
Bird.h #pragma once #include<iostream> using namespace std; class Bird { public: Bird(); ~Bird(); virtual void Eat
原创 內存映射+矩陣
接口: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;
原创 C# SQL操作數據庫
C# SQL操作數據庫 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Thread
原创 內存映射文件 C#
using System; using System.IO.MemoryMappedFiles; using System.Text; namespace MappedMemoryFiles { class Program
原创 Installation failed with message Failed to establish session(小米手機)
AndroidStudio開發,調試安裝到小米手機的時候無法繼續安裝,報錯:Installation failed with message Failed to establish session 解決辦法:關閉【開發者選項】下的【啓
原创 C#的裝箱拆箱
1.裝箱在值類型向引用類型轉換時發生 2.拆箱在引用類型向值類型轉換時發生 執行裝箱操作時,不可避免的要在堆上申請內存空間,並將棧上的值類型數據複製到申請的堆內存空間上,無可避免的要消耗內存和CPU資源。 拆箱操作過程反之
原创 Ubuntu安裝VIM
在Ubuntu終端輸入:vi再連續兩次按Tab鍵 可以看到,系統中安裝了vi,vim.tiny。並沒有安裝VIM 普通用戶下輸入: sudo apt-get install vim-gtk,回車 輸入密碼,遇到[Y/n]時輸入:y,繼續
原创 C#委託 Delegate
class Program { static void Main(string[] args) { DelegateFather[] handers =
原创 計算最大鏈路塊
頭文件: Block.h #pragma once #include "stdafx.h" #include <iostream> using namespace std; class Block { public: Block(ch