transfer

Allow user to download external image using PHP

徘徊边缘 提交于 2019-12-24 09:58:33
问题 I set it up so a user can download an image with the click of a button if it's hosted on my site, but it doesn't work for external images. Is it possible to do this with external images (using the URL) without first copying it to a folder on my servers? This is what I use for images on my own site. $str = $_GET['image']; $img_name = substr(strrchr($str, '/'), 1); $image = "../u/i/".$img_name; if (file_exists($image)) { header('Content-Description: File Transfer'); header('Content-Type:

Matlab: Linearizing Simulink model and getting linearized transfer function?

谁都会走 提交于 2019-12-24 03:43:36
问题 I want to determine the linearized transfer function from a non-linear system made in Simulink. I can see that it should be possible to use the linmod function in Matlab but when I try this [num,den]=linmod('sys') I'm not getting the numerator and denominator but instead the state space matrix etc. Can anyone help? 回答1: Try the function balred instead: documentation rsys = balred(sys,ORDERS) computes a reduced-order approximation rsys of the LTI model sys . The desired order (number of states

Measure data transfer rate over tcp using c#

寵の児 提交于 2019-12-22 18:45:19
问题 i want to measure current download speed. im sending huge file over tcp. how can i capture the transfer rate every second? if i use IPv4InterfaceStatistics or similar method, instead of capturing the file transfer rate, i capture the device transfer rate. the problem with capturing device transfer rate is that it captures all ongoing data through the network device instead of the single file that i transfer. how can i capture the file transfer rate? im using c#. 回答1: Since you doesn't have

CPU->GPU transfer vs GPU->CPU transfer

帅比萌擦擦* 提交于 2019-12-22 14:02:53
问题 I have been doing some experiments regarding measuring the latency of data transfer from CPU->GPU and GPU->CPU. I found that CPU->GPU data transfer rate is almost twice as much compared to GPU->CPU transfer rate for a particular message size. Can anybody explain me why this is so? 回答1: Since don't know the detail about your experiment, like what's CPU/GPU used, how to measure transfer rate, I just guess that, data transfer from CPU->GPU, normally is through DMA. each time it can transfer a

macOS, Swift 3: How to get data back after segue?

南笙酒味 提交于 2019-12-22 10:24:37
问题 For example: I have two UIViewController s. The first has a button and a NSTextField , and the second has a NSTextField only. When I click the button on the first controller — the second controller shows as popover window. Making a transfer of some data from first controller to second is not big deal — I use a segue. But what I should to do to transfer data back — from the popover window to main window? For example: we open the popover window, type some text in NSTextField , and I want to get

Transfer Items between Views with Drag-and-Drop in Eclipse RCP?

心已入冬 提交于 2019-12-21 17:47:00
问题 I have 2 views in my application. In one of the views I can see a TreeStructure containing custom defined elements (such as MDocument, MVersion...). I would like to be able to drag items of type MVersion from my view to the other one but I don't know how to declare the transfer types or to check if the item selected is a supported type. Any ideas? 回答1: The easiest way is to use LocalSelectionTransfer. Once you have added drag/drop support to your viewers... You set the ISelection that is

Android File Transfer cannot see a folder created by app

我们两清 提交于 2019-12-21 12:27:07
问题 I've installed "android file transfer" on mac. My app creates a folder and creates a file in it (the permissions exist in AndroidManifest.xml), writes some data into this file. File exists, I can access it using standard file manager in my android device. It shows many folders, including my folder and I can even see the contents of my file on the device. But the problem is that "android file transfer" shows me all other folders, but not my folder and my file. I even tried create just a single

MVC Transfer Data Between Views

回眸只為那壹抹淺笑 提交于 2019-12-19 10:32:41
问题 I just started to learn MVC and am trying to understand how it works. I don't want to send users to different views for all edit, insert and list operations. In my sample application a View contains a list of items and below the list there is a form (for inserting new items) with action "{Controller}/Create" but there is no Create View. When a user inserts a new item it posts to the Create action with httpverb post and creates the item and returns back to the List action with RedirectToAction

MVC Transfer Data Between Views

孤人 提交于 2019-12-19 10:32:16
问题 I just started to learn MVC and am trying to understand how it works. I don't want to send users to different views for all edit, insert and list operations. In my sample application a View contains a list of items and below the list there is a form (for inserting new items) with action "{Controller}/Create" but there is no Create View. When a user inserts a new item it posts to the Create action with httpverb post and creates the item and returns back to the List action with RedirectToAction

Android Bluetooth file sending

为君一笑 提交于 2019-12-18 14:06:49
问题 I am trying to send a file over bluetooth in an android device. I have done discovery, connection and have made a bluetooth socket. Problem is when i am writing the byte array in the output stream of the bluetooth socket, the recieving side does not receive anything although it accept that something is being sent. Here's what Iam doing (bad is the bluetooth adaptor) Please advise. try { BluetoothDevice dev = bad.getRemoteDevice(a); bad.cancelDiscovery(); dev.createRfcommSocketToServiceRecord