|
Not a technical question, rather a fairly nebulous question about a UI design.
In summary, I have an application that may or may not perform a task every minute. I need to create a visual representation of when this task will be performed over a day/week. Something like a time line where a user can view a single day/week that displays when the task will execute.
As an example, the task is configured to execute at 12,34,45,50,56 past the hour in the hours 1,4,8,15,18,20,21,22
The problem is that there are 2440 minutes in a day, so creating a visual UI is somewhat complicated. Unless of course the user has a 500 inch wide screen monitor
Just incase anybody has heard of it, I am trying to create this for Crontab jobs.
|
|
|
|
|
Why don't you 'steal' MS Outlook's calendar view... I think it's a neat way to present events over time.
|
|
|
|
|
MrEyes wrote: The problem is that there are 2440 minutes in a day
Wow, you are either cursed or lucky with an extra 1000 minutes a day
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
leppie wrote:
Wow, you are either cursed or lucky with an extra 1000 minutes a day
I don't know. There have been days when I've felt like there's an extra 1000 minutes in there.
|
|
|
|
|
Vogon Guard Well, the hours are good.
Ford They'd have to be.
Vogon guard But now you mention it, I suppose most of the actual minutes are pretty lousy.
|
|
|
|
|
Cursed with fat fingers and the lack of a typing wand
|
|
|
|
|
There are several third party calendar controls available (free and licensed). I would pick up a nice looking and use that.
Some of those have even Gantt-like view just in case that you want to visualize the length and other information for the tasks some point in future.
I wouldn't believe that it has any effect on visualization if the task scheduling system is crontab. Only when getting the data into the calendar (or similar), you must implement your own 'parser' for crontab syntax (how to separate minutes, hours, days, what * means etc).
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Hii
Can anyone tell me what's the exact difference between validating and validated events. What I know is validated occurs after successful execution of validating. But what's the need of 2 events I cant understand. plz help
if possible give code for illustration
thanx
|
|
|
|
|
One is an event you hook into when your object is validating, and the other is the event you hook into when your object has finished validation. You hook into the validating event if you want to perform some work when the validation is started off.
|
|
|
|
|
hello everyone..
please help me about this.
I have an application that requires cv loader... For example, I have a resume (in any format, txt or doc file), then when I upload it using c# or in any language and i need to get the name, address and contact number of the person that will be saved in an oracle database...
Is there someone who can give me some hint in creating this functionality
thanks in advance.
jyn
|
|
|
|
|
There's no foolproof way to accomplish this, but I'd suggest that you take a look at using IFilter . There are a couple of decent articles here on CP that will help.
|
|
|
|
|
thanks for your reply...
i'll try it.
jyn
|
|
|
|
|
Please don't cross post. If your question isn't language specific, you should not post it in the language specific forums.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I have four select statement in 1 stored procedure, I will use it for 4 different dropdownlist.
SqlDataAdapter sqlda = new SqlDataAdapter("populatelist_sp", osql);
sqlda.Fill(DS);
<code>Cache.Add("listTables", DS, null, DateTime.Now.AddMinutes(60), TimeSpan.Zero, System.Web.Caching.CacheItemPriority.Normal, null);</code>
DropDownList1.DataSource = DS;
DropDownList1.DataBind();
The PROBLEM: When I used the cache object to populate another dropdownlist it gives me error "Object reference" meaning the value in the cache object is NULL. Out of 10 run I encounter 8 times.
if (DropDownList2.Items.Count == 0)
{
DataSet localDS = new DataSet();
localDS = (DataSet)Cache["listTables"];
DataView dv = new DataView(localDS.Tables[1]); --- Failed on this part
DropDownList2.DataSource = dv;
DropDownList2.DataBind();
}
Is there any settings that I need to do to retain the value inside the cache object?
GAIN: Instead of 4 roundtrip to the database in getting the value of the dropdownlist I only used 1 connection and the rest is Caching dependent.
Regards
Dabsukol
|
|
|
|
|
dabuskol wrote: localDS = (DataSet)Cache["listTables"];
You have not checked if the cache is still valid.
dabuskol wrote: DataView dv = new DataView(localDS.Tables[1]); --- Failed on this part
Are you sure the dataset have at least 2 tables, on every call?
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Definitely yes, before assigning it to cache the Dataset (DS) has four tables, after assigning to cache object I can still see the 4 tables. But only after pressing the 2nd dropdownlist with postback where data should come from cache object instead of database the value of cache is null.
Dabsukol
|
|
|
|
|
That is quite interesting. You not running out of memory for caching perhaps?
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Nop. I just change the CACHE to ViewState Object and it work.
Though I believe Viewstate is not the solution since I have 10 dropdownlist in every page. Viewstate will make my page heavy becuase of the encrypted data.
I tried to search the Net and I can't find any solution to this problem
Dabsukol
|
|
|
|
|
It's normal for contents to get removed from the cache. When you get the value from the cache you have to check if you get a null reference back.
If the cache grows too much, it will naturally remove large objects first. Perhaps your objects will stay longer in the cache if you store the tables as four separate cache objects.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Thanks for all the help.
After so many trials and isolation, the only problem I believe that is missing why the data on the CACHE object is missing si the declaration of the namespace of CACHE.
using System.Web.Caching --- After including it in my code. it works perfect.
Dabsukol
|
|
|
|
|
Hello,
I'm looking for a way to solve follwing type of problem (this is a simplified example) in a C# environment
Lets say I have a booking tool for multiple medias.
I have one method:
- addBooking()
Two media types:
- Radio
- Web
I would like to have additional logic in my addBooking method depending the media type; that means:
addBooking() does the same functionality,but , if I have radio I want to add special discount and if I have web I want to edit some other booking.
I read about "software extension" which is, I think, what I need. How can I implement that? I thought of some kind of listener after my addBooking() which checks the media type and calls the right method depending the type.
Thanks for any ideas!
|
|
|
|
|
I would use an abstract class which implemented the base method, e.g.
public abstract MediaBase
{
public virtual void AddBooking()
{
}
} Then, inherit from this class, e.g.
public Radio : MediaBase
{
}
public Web : MediaBase
{
public overrides void AddBooking()
{
base.AddBooking();
}
}
|
|
|
|
|
That's a good and simple idea.
The only thing is that I need to instanciate either a Radio or Web object in the application.
I would like to call mediaBase.AddBooking() and that's it. Then, from an external controler, acting like a listener, run the custom code depending of the media type (media type is a static configuration at application launch).
|
|
|
|
|
OK - this sounds like a case for using the Inversion of Control and Dependency Injection patterns. This sounds like an ideal candidate.
|
|
|
|
|
Took a look at it, that's a good solution, thanks for help!
|
|
|
|