2015年6月12日 星期五
2015年6月10日 星期三
How to: Upload a File in Visual Basic
How to: Upload a File in Visual Basic
Visual Studio 2013
The UploadFile method can be used to upload a file and store it to a remote location. If the ShowUI parameter is set to True, a dialog box is displayed that shows the progress of the download and allows users to cancel the operation.
To upload a file
- Use the UploadFile method to upload a file, specifying the source file's location and the target directory location as a string or URI (Uniform Resource Identifier).This example uploads the file Order.txt tohttp://www.cohowinery.com/uploads.aspx.
My.Computer.Network.UploadFile( "C:\My Documents\Order.txt", "http://www.cohowinery.com/upload.aspx")
To upload a file and show the progress of the operation
- Use the UploadFile method to upload a file, specifying the source file's location and the target directory location as a string or URI. This example uploads the file Order.txt tohttp://www.cohowinery.com/uploads.aspx without supplying a user name or password, shows the progress of the upload, and has a time-out interval of 500 milliseconds.
My.Computer.Network.UploadFile( "C:\My Documents\Order.txt", "http://www.cohowinery.com/upload.aspx", "", "", True, 500)
To upload a file, supplying a user name and password
- Use the UploadFile method to upload a file, specifying the source file's location and the target directory location as a string or URI, and specifying the user name and the password. This example uploads the fileOrder.txt to http://www.cohowinery.com/uploads.aspx, supplying the user name anonymous and a blank password.
My.Computer.Network.UploadFile( "C:\My Documents\Order.txt", "http://www.cohowinery.com/upload.aspx", "anonymous", "")
The following conditions may throw an exception:
- The local file path is not valid (ArgumentException).
- Authentication failed (SecurityException).
- The connection timed out (TimeoutException).
2015年4月28日 星期二
IPCAM 範例 佔存
http://www.camera-sdk.com/p_37-how-to-connect-to-an-onvif-camera-and-display-the-image-in-c-onvif.html
2015年4月23日 星期四
載入氣象資料
http://www.todroid.com/creating-a-weather-app-in-android-studio/
http://www.survivingwithandroid.com/2014/05/how-to-develop-android-weather-app.html
功能概述
可以抓取當地氣象
目前沒有測試
先放這 晚點再來
用YAHOO 氣象API
http://www.survivingwithandroid.com/2014/02/android-weather-app-using-yahoo-provider.html
http://www.survivingwithandroid.com/2014/05/how-to-develop-android-weather-app.html
功能概述
可以抓取當地氣象
目前沒有測試
先放這 晚點再來
用YAHOO 氣象API
http://www.survivingwithandroid.com/2014/02/android-weather-app-using-yahoo-provider.html
限制應用程式只能直立,禁止橫向
限制應用程式只能直立,禁止橫向
setRequestedOrientation( ActivityInfo.SCREEN_ORIENTATION_PORTRAIT );
or
AndroidManifest.xml:
在 <activity 裡面加上
android:screenOrientation="portrait" (指定為直向)
<!--參數為 landscape為橫向 portrait為縱向 nosensor為關閉重力感應器-->
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.ack.test2" >
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<!--限制螢幕為直向 str-->
android:screenOrientation="portrait"
<!--參數為 landscape為橫向 portrait為縱向 nosensor為關閉重力感應器-->
<!--限制螢幕為直向 end-->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
android:configChanges="keyboard|keyboardHidden|orientation"
(告訴系統,我要自己處理轉向問題) 需要在 Manifest.xml 中加上底下的敘述。
setRequestedOrientation( ActivityInfo.SCREEN_ORIENTATION_PORTRAIT );
or
AndroidManifest.xml:
在 <activity 裡面加上
android:screenOrientation="portrait" (指定為直向)
<!--參數為 landscape為橫向 portrait為縱向 nosensor為關閉重力感應器-->
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.ack.test2" >
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<!--限制螢幕為直向 str-->
android:screenOrientation="portrait"
<!--參數為 landscape為橫向 portrait為縱向 nosensor為關閉重力感應器-->
<!--限制螢幕為直向 end-->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
android:configChanges="keyboard|keyboardHidden|orientation"
(告訴系統,我要自己處理轉向問題) 需要在 Manifest.xml 中加上底下的敘述。
android 一些教學 資料
Android
http://www.raywenderlich.com/78576/android-tutorial-for-beginners-part-2
http://blog.csdn.net/ryantang03/article/details/9237643
Global Caché
http://www.automatedhome.co.uk/reviews/review-ip-control-of-your-ir-gear-with-global-cache-itach-ip2ir.html
訂閱:
文章 (Atom)