progress

How can you track the progress of a SQL update?

与世无争的帅哥 提交于 2019-12-04 05:44:17
Let's say I have an update such as: UPDATE [db1].[sc1].[tb1] SET c1 = LEFT(c1, LEN(c1)-1) WHERE c1 like '%:' This update is basically going to go through millions of rows and trim the colon if there is one in the c1 column. How can I track how far along in the table this has progressed? Thanks This is sql server 2008 Database queries, particularly Data Manipulation Language (DML), are atomic. That means that the INSERT/UPDATE/DELETE either successfully occurs, or it doesn't. There's no means to see what record is being processed -- to the database, they all had been changed once the COMMIT is

Updating progress dialog

北城以北 提交于 2019-12-04 04:33:15
问题 I am trying to make an application that can help me to evaluate the time to download the file from a web resource. I have found 2 samples: Download a file with Android, and showing the progress in a ProgressDialog and http://www.helloandroid.com/tutorials/how-download-fileimage-url-your-device The second example shows a smaller download time, but I cannot understand how to update progress dialog using it. I think something should be done with "while" expression in second case, but I cannot

Observe progress of Data download in Swift?

杀马特。学长 韩版系。学妹 提交于 2019-12-04 04:20:20
问题 I need to cache data that I receive from an remote url to a local URL. I am able to do this successfully with: let dataToCache = try Data(contentsOf: url) try dataToCache.write(to: cacheURL) But I was wondering if there is some type of observer I can use to display a progress view as the data is written? 回答1: Don't use Data(contentsOf: url) to make synchronous request for urls that are not local resources. You should use URLSession .To observe the progress you need to set

How to show progress while upload file to Cloudinary in Android?

怎甘沉沦 提交于 2019-12-03 20:33:16
I implemented the uploading function the file to Cloudinary. Cloudinary cloudinary = new Cloudinary(Constants.CLOUDINARY_URL); try { FileInputStream is = new FileInputStream(new File(filePath)); Uploader uploader = cloudinary.uploader(); Map map = uploader.upload(is, new HashMap()); return map; } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } Now I would like to show the uploading percent in progress bar while upload. But I can't find any callback function to get uploading percent. Please help me. Thanks. cprakashagr answer actually

Unity Editor 基础篇(九):EditorUtility编辑器工具

*爱你&永不变心* 提交于 2019-12-03 15:32:48
EditorUtility 编辑器工具 转自:http://blog.csdn.net/liqiangeastsun/article/details/42174339,请查看原文,尊重楼主原创版权。 这是一个编辑器类,如果想使用它你需要把它放到工程目录下的Assets/Editor文件夹下。 编辑器类在UnityEditor命名空间下。所以当使用C#脚本时,你需要在脚本前面加上 "using UnityEditor"引用。 1.ProgressBar 进度条 在Editor文件夹中添加脚本: using UnityEngine; using System.Collections; using UnityEditor; public class TestEditor : EditorWindow { float secs = 10.0f; double startVal = 0; double progress = 0; bool isShow = false; [MenuItem("Examples/Cancelable Progress Bar Usage")] static void Init() { var window = GetWindow(typeof(TestEditor)); window.Show(); } void OnGUI() { secs =

iPhone Development - restrict user interaction with application and show a progress indicator

岁酱吖の 提交于 2019-12-03 15:05:37
I have a case where i pull information from a server. My application has both a tab bar and navigation buttons. I want the application to show a progress indicator and disable all other controls so that user can't jump around while the data is being pulled from the server. How can i achieve this? One approach i have in mind is to show a transparent view with a progress window (much like the message alert window - which allows the user to interact with the message alert window only). I need help in implementing this approach. Currently, when the information/data is being pulled from the server

Swift Progress Indicator Image Mask

不想你离开。 提交于 2019-12-03 14:41:33
To start, this project has been built using Swift. I want to create a custom progress indicator that "fills up" as the script runs. The script will call a JSON feed that is pulled from the remote server. To better visualize what I'm after, I made this: My guess would be to have two PNG images; one white and one red, and then simply do some masking based on the progress amount. Any thoughts on this? Masking is probably overkill for this. Just redraw the image each time. When you do, you draw the red rectangle to fill the lower half of the drawing, to whatever height you want it; then you draw

Android Countdown Timer Circular Progress Bar doesn't match with timer

▼魔方 西西 提交于 2019-12-03 12:59:47
问题 Hi can anyone help me on my small project please, I have been following this Tutorial and I got to the part where I insert 1 Minute into the EditText the Progress Bar works fine 1 Progress per sec but when I put in more than 1 Minute into the EditText the Progress Bar does not work. It does not goes down please help? main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/LinearLayout1" android:layout

Can I report progress for openmp tasks?

可紊 提交于 2019-12-03 12:25:56
问题 Imagine a classic OMP task: Summing a large vector of doubles in the range [0.0, 1.0) Live On Coliru using namespace std; int main() { vector<double> v; // generate some data generate_n(back_inserter(v), 1ul << 18, bind(uniform_real_distribution<double>(0,1.0), default_random_engine { random_device {}() })); long double sum = 0; { #pragma omp parallel for reduction(+:sum) for(size_t i = 0; i < v.size(); i++) { sum += v[i]; } } std::cout << "Done: sum = " << sum << "\n"; } I have trouble

Android 处理耗时操作之二------AsyncTask

孤街浪徒 提交于 2019-12-03 11:54:22
为了更方便的处理一些耗时操作,android提供了一些好用的工具,比如AsyncTask。借助这个就可以简单的从子线程切换到主线程。 当然这个工具也是基于异步消息处理机制的,只是安卓做了很好的封装。 首先要说明的是AsyncTask是一个抽线类,要使用它,就必须先创建一个子类再去实现实现相关功能 该抽象类的声明如下 public abstract class AsyncTask<Params, Progress, Result> Params: 开始异步任务执行时传入的参数类型; Progress: 异步任务执行过程中,返回下载进度值的类型; Result: 异步任务执行完成后,返回的结果类型; 一个简单的自定义类可以这么写 class MyTask extends AsyncTask<Void, Integer, Boolean> 这里将传入参数设置为空,是因为我们暂时不需要传入参数给后台任务 当然现在的我们自定义的类还只能算是一个空任务,内在并没有什么逻辑。为了能让我们的自定义类担当大任我们还需要重写几个方法 1.onPreExecute() 这个方法会在 后台任务开始执行之间调用,在主线程执行。 用于进行一些界面上的初始化操作,比如显示一个进度条对话框等。 2.doInBackground(Params) 这个方法中的所有代码都会在子线程中运行