Search Results

Search found 4174 results on 167 pages for 'tasks'.

Page 43/167 | < Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >

  • Java + Eclipse + Pulpcore

    - by cable729
    I've never programmed in java or eclipse before, although I have used c# and visual studio. I'm trying to get started with java development, and develop 2d games, but I can't get the project to run. I've followed the tutorial here: http://cloningtheclassics.com/getting-started-with-pulpcore/ I've retried the tutorial at least 5 times, and I still can't get it to work. The error it displays is: Buildfile: C:\workspace\javapulp\project\build.xml [taskdef] Could not load definitions from resource tasks.properties. It could not be found. [taskdef] Could not load definitions from resource tasks.properties. It could not be found. -init: BUILD FAILED C:\workspace\javapulp\project\build.xml:127: Required file not found: ../../build/pulpcore-applet-debug-0.11.jar Total time: 1 second Thanks in advance!

    Read the article

  • Need help writing a recurring task scheduler.

    - by Sisiutl
    I need to write a tool that will run a recurring task on a user configurable schedule. I'll write it in C# 3.5 and it will run on XP, Windows 7, or Windows Server 2008. The tasks take about 20 minutes to complete. The users will probably want to set up several configurations: e.g, daily, weekly, and monthly cycles. Using Task Scheduler is not an option. The user will schedule recurrences through an interface similar to Outlook's recurring appointment dialog. Once they set up the schedule they will start it up and it should sit in the system tray and kick off its tasks at the appointed times, then send mail to indicate it has finished. What is the best way to write this so that it doesn't eat up resources, lock up the host, or otherwise misbehave?

    Read the article

  • Threaded Django task doesn't automatically handle transactions or db connections?

    - by Gabriel Hurley
    I've got Django set up to run some recurring tasks in their own threads, and I noticed that they were always leaving behind unfinished database connection processes (pgsql "Idle In Transaction"). I looked through the Postgres logs and found that the transactions weren't being completed (no ROLLBACK). I tried using the various transaction decorators on my functions, no luck. I switched to manual transaction management and did the rollback manually, that worked, but still left the processes as "Idle". So then I called connection.close(), and all is well. But I'm left wondering, why doesn't Django's typical transaction and connection management work for these threaded tasks that are being spawned from the main Django thread?

    Read the article

  • Need help understanding .net ThreadPool

    - by Meredith
    I am trying to understand what ThreadPool does, I have this .NET example: class Program { static void Main() { int c = 2; // Use AutoResetEvent for thread management AutoResetEvent[] arr = new AutoResetEvent[50]; for (int i = 0; i < arr.Length; ++i) { arr[i] = new AutoResetEvent(false); } // Set the number of minimum threads ThreadPool.SetMinThreads(c, 4); // Enqueue 50 work items that run the code in this delegate function for (int i = 0; i < arr.Length; i++) { ThreadPool.QueueUserWorkItem(delegate(object o) { Thread.Sleep(100); arr[(int)o].Set(); // Signals completion }, i); } // Wait for all tasks to complete WaitHandle.WaitAll(arr); } } Does this run 50 "tasks", in groups of 2 (int c) until they all finish? Or I am not understanding what it really does.

    Read the article

  • How can the last command's wall time be put in the Bash prompt?

    - by Mr Fooz
    Is there a way to embed the last command's elapsed wall time in a Bash prompt? I'm hoping for something that would look like this: [last: 0s][/my/dir]$ sleep 10 [last: 10s][/my/dir]$ Background I often run long data-crunching jobs and it's useful to know how long they've taken so I can estimate how long it will take for future jobs. For very regular tasks, I go ahead and record this information rigorously using appropriate logging techniques. For less-formal tasks, I'll just prepend the command with time. It would be nice to automatically "time" every single interactive command and have the timing information printed in a few characters rather than 3 lines.

    Read the article

  • Elegant way to reverse order Formtastic nested objects?

    - by stephan.com
    I'm presenting a list of items to the user with a field for a new item, like this: - current_user.tasks.build - semantic_form_for current_user do |f| - f.semantic_fields_for :tasks do |t| - t.inputs do = t.input :_destroy, :as => :boolean, :label => '' - if t.object.new_record? = t.input :name, :label => false - else = t.object.name Which looks lovely and works like a charm. My only problem is I want the new record at the TOP of the list, not the bottom. Is there an elegant and easy way to do this, or am I going to have to do the new element separately, or loop through the list manually?

    Read the article

  • Using condionals in Linq Programatically

    - by Mike B
    I was just reading a recent question on using conditionals in Linq and it reminded me of an issue I have not been able to resolve. When building Linq to SQL queries programatically how can this be done when the number of conditionals is not known until runtime? For instance in the code below the first clause creates an IQueryable that, if executed, would select all the tasks (called issues) in the database, the 2nd clause will refine that to just issues assigned to one department if one has been selected in a combobox (Which has it's selected item bound to the departmentToShow property). How could I do this using the selectedItems collection instead? IQueryable<Issue> issuesQuery; // Will select all tasks issuesQuery = from i in db.Issues orderby i.IssDueDate, i.IssUrgency select i; // Filters out all other Departments if one is selected if (departmentToShow != "All") { issuesQuery = from i in issuesQuery where i.IssDepartment == departmentToShow select i; }

    Read the article

  • Facebook login on headless browser

    - by dmni
    My Facebook app has a function of automating tasks on server side headless browser (like visiting app links). Now, I use the Facebook SDKs to log user in and access user's news stream to search for links and other information. Once the app has found all the links, it is supposed to pass this information in to the headless browser which will then proceed to visit in them for example. The problem is that these headless browser windows' are not logged in. I would like the headless browser to be temporary logged in as the user launching the tasks from the app. Is this possible?

    Read the article

  • Repository Design Pattern Guidance

    - by thefactor
    Let's say you have an MVVM CRM application. You have a number of customer objects in memory, through a repository. What would be the appropriate place to handle tasks that aren't associated with traditional MVVM tasks from a GUI? For example, let's say every few minutes you want to check to see if their address is valid and pop up a notification if it is not. Or you want to send out an hourly e-mail update. Or you want a window to pop up to remind you to call a customer at a specific time. Where does this logic go? It's not GUI/action-oriented, and it's not logic that would be appropriate for a repository, I think.

    Read the article

  • Running applictions via ruby and multi-core support? (OSX)

    - by Nick Faraday
    Hi All, I'm looking for some tutorials/resources/tips that will show me how to run applications via a ruby script. I have several small tools that we use in our day to day operations that I want to manage their tasks in one ruby script. Basically what I'm trying to do is: run app via ruby script. (wait for result) get result code (success, or error msg) if ok, start the app on its next task. Also each of the tasks are independent so I'd like to take advantage of the 8 cores on my MacPro and run 8 instances at a time. Any resources you could point me towards would be greatly appreciated!

    Read the article

  • codeIgniter: pass parameter to a select query from previous query

    - by krike
    I'm creating a little management tool for the browser game travian. So I select all the villages from the database and I want to display some content that's unique to each of the villages. But in order to query for those unique details I need to pass the id of the village. How should I do this? this is my code (controller): function members_area() { global $site_title; $this->load->model('membership_model'); if($this->membership_model->get_villages()) { $data['rows'] = $this->membership_model->get_villages(); $id = 1;//this should be dynamic, but how? if($this->membership_model->get_tasks($id)): $data['tasks'] = $this->membership_model->get_tasks($id); endif; } $data['title'] = $site_title." | Your account"; $data['main_content'] = 'account'; $this->load->view('template', $data); } and this is the 2 functions I'm using in the model: function get_villages() { $q = $this->db->get('villages'); if($q->num_rows() > 0) { foreach ($q->result() as $row) { $data[] = $row; } return $data; } } function get_tasks($id) { $this->db->select('name'); $this->db->from('tasks'); $this->db->where('villageid', $id); $q = $this->db->get(); if($q->num_rows() > 0) { foreach ($q->result() as $task) { $data[] = $task; } return $data; } } and of course the view: <?php foreach($rows as $r) : ?> <div class="village"> <h3><?php echo $r->name; ?></h3> <ul> <?php foreach($tasks as $task): ?> <li><?php echo $task->name; ?></li> <?php endforeach; ?> </ul> <?php echo anchor('site/add_village/'.$r->id.'', '+ add new task'); ?> </div> <?php endforeach; ?> ps: please do not remove the comment in the first block of code!

    Read the article

  • What can you do in the ant Task.init() method?

    - by skiphoppy
    I'm developing a few custom ant tasks that all need to initialize the same objects. I wanted to initialize those object's in a common superclass that extends from Task, in the init() method. But I see from the lifecycle of an ant task that init() gets called before the tasks child elements and attributes are set. So all of the data I need for initializing those objects is unavailable during init(), if I am reading right. So, why is init() called at this point? What do you even know that you could use in init()? What could it be used for? (And is there some other method that I can rely on to be called before execute(), but after my data is available?)

    Read the article

  • Can I use meteor for this?

    - by nitelord
    I'm looking for a way to create an app which has a realtime web interface as well as an API which can be called by a node.js client while sharing most of its code. I'd like to be able to manage data, monitor and execute tasks inside of my app via browser, but also have an automation/scheduling program which connects to my web app and tells it to run various tasks and get results of each task. Unfortunately it doesn't look like I can connect to Meteor from the server, so I'm wondering if there's another approach? Is what I described even possible using Meteor? I have done some testing using socket.io and I think I may be able to do it this way, but Meteor seems like it'd be really great for the realtime user interface.

    Read the article

  • Avoiding Nested Blocks

    - by Helium3
    If there is a view controller that wants to execute a number of block based tasks one at a time, how can the control be given back to the view controller after a completion block has executed. Lets say ViewControllerOne wants to execute a number of tasks, each relying on the result of the previous one, how would this control be given back to the viewcontroller after each completion block has been executed? I started thinking about this and I was heading towards a deeply nested block pattern that will surely only cause confusion to whoever else reads or tests it. A task executes and the completion block returns the result or error which is needed by the next task, which has its own completion task, that the next task relies on and so forth. How can the control be managed in one place, the viewcontroller? Would the completion block just call the next function that handles the next task, using a pointer to the view controller?

    Read the article

  • How to access Sharepoint List Items using an ID

    - by GEShafer
    I am currently working on a nice table that displays the items in a list of "Tasks" on a dispForm page. Each Task is created and initially given a ProjectID depending on which project the task is for. The ProjectID is the actual ID given to the "project" when it is added to the list, therefore it is not actually a parameter in the list of projects while it is a parameter in the list of tasks. I would like to know how to use the ProjectID parameter in the task list to link to the Project list and grab the ProjectName parameter so that I can display the Project Name in the table. Currently I can not get it to work. All help is appreciated, Gale

    Read the article

  • Understanding Clojure concurrency example

    - by dusha
    Hello, I just go through various documentation on Clojure concurrency and came accross the example on the website (http://clojure.org/concurrent_programming). (import '(java.util.concurrent Executors)) (defn test-stm [nitems nthreads niters] (let [refs (map ref (replicate nitems 0)) pool (Executors/newFixedThreadPool nthreads) tasks (map (fn [t] (fn [] (dotimes [n niters] (dosync (doseq [r refs] (alter r + 1 t)))))) (range nthreads))] (doseq [future (.invokeAll pool tasks)] (.get future)) (.shutdown pool) (map deref refs))) I understand what it does and how it works, but I don't get why the second anonymous function fn[] is needed? Many thanks, dusha. P.S. Without this second fn [] I get NullPointerException.

    Read the article

  • How to provide global functionality in multi-user database app

    - by Mike B
    I have been building a multi-user database application (in C#/WPF 4.0) that manages tasks for all employees of a company. I now need to add some functionality such as sending an email reminder to someone when a critical task is due. How should this be done? Obviously I don’t want every instance of the program to be performing this function (Heh each user would get 10+ emails). Should I add the capability to the application as a "Mode" and then run a copy on the database server in this mode or would it be better to create a new app altogether to perform "Global" type tasks? Is there a better way?

    Read the article

  • Azure Blobs - ArgumentNullException when calling UploadFile()

    - by Ariel
    I’m getting the following exception when trying to upload a file with the following code: string encodedUrl = "videos/Sample.mp4" CloudBlockBlob encodedVideoBlob = blobClient.GetBlockBlobReference(encodedUrl); Log(string.Format("Got blob reference for {0}", encodedUrl), EventLogEntryType.Information); encodedVideoBlob.Properties.ContentType = contentType; encodedVideoBlob.Metadata[BlobProperty.Description] = description; encodedVideoBlob.UploadFile(localEncodedBlobPath); I see the "Got blob reference" message, so I assume the reference resolves correctly. Void Run() C:\Inter\Projects\PoC\WorkerRole\WorkerRole.cs (40) System.ArgumentNullException: Value cannot be null. Parameter name: value at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.get_Result() at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.ExecuteAndWait() at Microsoft.WindowsAzure.StorageClient.CloudBlob.UploadFromStream(Stream source, BlobRequestOptions options) at Microsoft.WindowsAzure.StorageClient.CloudBlob.UploadFile(String fileName, BlobRequestOptions options) at EncoderWorkerRole.WorkerRole.ProcessJobOutput(IJob job, String videoBlobToEncodeUrl) in C:\Inter\Projects\PoC\WorkerRole\WorkerRole.cs:line 144 at EncoderWorkerRole.WorkerRole.Run() in C:\Inter\Projects\PoC\WorkerRole\WorkerRole.cs:line 40 Interestingly, I'm running that same snippet from an on-premises server i.e., outside of Azure and it works correctly. Ideas welcome, thanks!

    Read the article

  • ant support for dynamic target

    - by Li He
    I previous saw some similar questions on stackoverflow but didn't see any solution. I guess the answer could be impossible and I am trying to see who can provide me this confirmation. AFAIK, an ant project contains several targets and each target may have several tasks. There is an task MacroDef that defines a sequential of `things' (tasks I suppose?). I tried to put target inside this block but ant complains the name of the target is missing (I am using the attribute of the macrodef to generate the name of the target). So it could be a dead end. Then I found that by using a task `script', we have access to the Project and can even call addTarget/AddOrReplaceTarget from there. But it seems that the targets I create there have no impact on the running targets. Does that mean ant doesn't support manipulating dependencies at target runtime? Is there any way to generate these targets before ant start building the dependency graph?

    Read the article

  • Sharing a fabfile across multiple projects

    - by Matthew Rankin
    Fabric has become my deployment tool of choice both for deploying Django projects and for initially configuring Ubuntu slices. However, my current workflow with Fabric isn't very DRY, as I find myself: copying the fabfile.py from one Django project to another and modifying the fabfile.py as needed for each project (e.g., changing the webserver_restart task from Apache to Nginx, configuring the host and SSH port, etc.). One advantage of this workflow is that the fabfile.py becomes part of my Git repository, so between the fabfile.py and the pip requirements.txt, I have a recreateable virtualenv and deployment process. I want to keep this advantage, while becoming more DRY. It seems that I could improve my workflow by: being able to pip install the common tasks defined in the fabfile.py and having a fab_config file containing the host configuration information for each project and overriding any tasks as needed Any recommendations on how to increase the DRYness of my Fabric workflow?

    Read the article

  • Serialized task distribution: use thread or epoll?

    - by hpsmouse
    Now I'm in such a situation that there is a group of predefined tasks for multiple clients to do(any client can take any task). When a client connects to the server, server choose a task from the uncompleted tasks and send it to the client. It takes a while for the client to finish the task and send the result back to the server. Since a task should be sent to only one client, server should process requests in a serialized way. Now I have two plans to do it: create a thread for each client connection and all the threads take turns accessing the task pool, or use epoll listening on all the connection and process for each event of clients. Which one is better for the job? Or is there any other ideas? The server will be run on a multi-core machine.

    Read the article

  • Can I safely bind to data on multi-threaded applications?

    - by Paul
    Hi everyone, I'm trying to solve a classic problem - I have a multi-threaded application which runs some processor-intensive calculations, with a GUI interface. Every time one of the threads has completed a task, I'd like to update a status on a table taskID | status I use DataGridView and BindingList in the following way: BindingList<Task> tasks; dataGridView.DataSource = tasks public class Task : INotifyPropertyChanged { ID{get;} Status{get;set;} } Can a background thread safely update a task's status? and changes will be seen in the correct order in the GUI? Second Question: When do I need to call to PropertyChanged? I tried running with and without the call, didn't seem to bother.. Third Question: I've seen on MSDN that dataGridView uses BindingSource as a mediator between DataGridView.DataSource and BindingList Is this really necessary?

    Read the article

  • Communicate between service and winform

    - by Richard Tivey
    I could do with a bit of help with a windows service im writing in c#. The service basically just runs various tasks on a schedule. It has 3 main sections: a class which contains everything for the task (config, code to be executed when it runs, etc), the service which contains instances of the tasks, running them on a timer and a windows form which is used to configure the settings for the task. The question I have is would it be possible to reference the service from the Winform whilst the service is running? Ultimately I want to be able to open the Winform and see a live status of what the service is currently doing. I've considered writing something network related to get around it but it didn't seem correct considering that both processes would be on the same machine.

    Read the article

  • Storing task state between multiple django processes

    - by user366148
    I am building a logging-bridge between rabbitmq messages and Django application to store background task state in the database for further investigation/review, also to make it possible to re-publish tasks via the Django admin interface. I guess it's nothing fancy, just a standard Producer-Consumer pattern. Web application publishes to message queue and inserts initial task state into the database Consumer, which is a separate python process, handles the message and updates the task state depending on task output The problem is, some tasks are missing in the db and therefore never executed. I suspect it's because Consumer receives the message earlier than db commit is performed. So basically, returning from Model.save() doesn't mean the transaction has ended and the whole communication breaks. Is there any way I could fix this? Maybe some kind of post_transaction signal I could use? Thank you in advance.

    Read the article

  • Leaving SQL Management open on the internet

    - by Tim Fraud
    I am a developer, but every so often need access to our production database -- yeah, poor practice, but anyway... My boss doesn't want me directly on the box using RDP, and so we decided to just permit MS SQL Management Console access so that I can do my tasks. So right now we have the SQL box somewhat accessible on the internet (on port 1433 if I am not mistaken), which opens a security hole. But I am wondering, how much of an uncommon practice is this, and what defaults should I be concerned about? We use MSSQL2008 and I created an account that has Read-Only access, because my production tasks only need that. I didn't see any unusual default accounts with default passwords on the system, so I would be interested to hear your take. (And of-course, is there a better way?)

    Read the article

< Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >