Search Results

Search found 223 results on 9 pages for 'cal s'.

Page 7/9 | < Previous Page | 3 4 5 6 7 8 9  | Next Page >

  • Silverlight Recruiting Application Part 4 - Navigation and Modules

    After our brief intermission (and the craziness of Q1 2010 release week), we're back on track here and today we get to dive into how we are going to navigate through our applications as well as how to set up our modules. That way, as I start adding the functionality- adding Jobs and Applicants, Interview Scheduling, and finally a handy Dashboard- you'll see how everything is communicating back and forth. This is all leading up to an eventual webinar, in which I'll dive into this process and give a honest look at the current story for MVVM vs. Code-Behind applications. (For a look at the future with SL4 and a little thing called MEF, check out what Ross is doing over at his blog!) Preamble... Before getting into really talking about this app, I've done a little bit of work ahead of time to create a ton of files that I'll need. Since the webinar is going to cover the Dashboard, it's not here, but otherwise this is a look at what the project layout looks like (and remember, this is both projects since they share the .Web): So as you can see, from an architecture perspective, the code-behind app is much smaller and more streamlined- aka a better fit for the one man shop that is me. Each module in the MVVM app has the same setup, which is the Module class and corresponding Views and ViewModels. Since the code-behind app doesn't need a go-between project like Infrastructure, each MVVM module is instead replaced by a single Silverlight UserControl which will contain all the logic for each respective bit of functionality. My Very First Module Navigation is going to be key to my application, so I figured the first thing I would setup is my MenuModule. First step here is creating a Silverlight Class Library named MenuModule, creatingthe View and ViewModel folders, and adding the MenuModule.cs class to handle module loading. The most important thing here is that my MenuModule inherits from IModule, which runs an Initialize on each module as it is created that, in my case, adds the views to the correct regions. Here's the MenuModule.cs code: public class MenuModule : IModule { private readonly IRegionManager regionManager; private readonly IUnityContainer container; public MenuModule(IUnityContainer container, IRegionManager regionmanager) { this.container = container; this.regionManager = regionmanager; } public void Initialize() { var addMenuView = container.Resolve<MenuView>(); regionManager.Regions["MenuRegion"].Add(addMenuView); } } Pretty straightforward here... We inject a container and region manager from Prism/Unity, then upon initialization we grab the view (out of our Views folder) and add it to the region it needs to live in. Simple, right? When the MenuView is created, the only thing in the code-behind is a reference to the set the MenuViewModel as the DataContext. I'd like to achieve MVVM nirvana and have zero code-behind by placing the viewmodel in the XAML, but for the reasons listed further below I can't. Navigation - MVVM Since navigation isn't the biggest concern in putting this whole thing together, I'm using the Button control to handle different options for loading up views/modules. There is another reason for this- out of the box, Prism has command support for buttons, which is one less custom command I had to work up for the functionality I would need. This comes from the Microsoft.Practices.Composite.Presentation assembly and looks as follows when put in code: <Button x:Name="xGoToJobs" Style="{StaticResource menuStyle}" Content="Jobs" cal:Click.Command="{Binding GoModule}" cal:Click.CommandParameter="JobPostingsView" /> For quick reference, 'menuStyle' is just taking care of margins and spacing, otherwise it looks, feels, and functions like everyone's favorite Button. What MVVM's this up is that the Click.Command is tying to a DelegateCommand (also coming fromPrism) on the backend. This setup allows you to tie user interaction to a command you setup in your viewmodel, which replaces the standard event-based setup you'd see in the code-behind app. Due to databinding magic, it all just works. When we get looking at the DelegateCommand in code, it ends up like this: public class MenuViewModel : ViewModelBase { private readonly IRegionManager regionManager; public DelegateCommand<object> GoModule { get; set; } public MenuViewModel(IRegionManager regionmanager) { this.regionManager = regionmanager; this.GoModule = new DelegateCommand<object>(this.goToView); } public void goToView(object obj) { MakeMeActive(this.regionManager, "MainRegion", obj.ToString()); } } Another for reference, ViewModelBase takes care of iNotifyPropertyChanged and MakeMeActive, which switches views in the MainRegion based on the parameters. So our public DelegateCommand GoModule ties to our command on the view, that in turn calls goToView, and the parameter on the button is the name of the view (which we pass with obj.ToString()) to activate. And how do the views get the names I can pass as a string? When I called regionManager.Regions[regionname].Add(view), there is an overload that allows for .Add(view, "viewname"), with viewname being what I use to activate views. You'll see that in action next installment, just wanted to clarify how that works. With this setup, I create two more buttons in my MenuView and the MenuModule is good to go. Last step is to make sure my MenuModule loads in my Bootstrapper: protected override IModuleCatalog GetModuleCatalog() { ModuleCatalog catalog = new ModuleCatalog(); // add modules here catalog.AddModule(typeof(MenuModule.MenuModule)); return catalog; } Clean, simple, MVVM-delicious. Navigation - Code-Behind Keeping with the history of significantly shorter code-behind sections of this series, Navigation will be no different. I promise. As I explained in a prior post, due to the one-project setup I don't have to worry about the same concerns so my menu is part of MainPage.xaml. So I can cheese-it a bit, though, since I've already got three buttons all set I'm just copying that code and adding three click-events instead of the command/commandparameter setup: <!-- Menu Region --> <StackPanel Grid.Row="1" Orientation="Vertical"> <Button x:Name="xJobsButton" Content="Jobs" Style="{StaticResource menuStyleCB}" Click="xJobsButton_Click" /> <Button x:Name="xApplicantsButton" Content="Applicants" Style="{StaticResource menuStyleCB}" Click="xApplicantsButton_Click" /> <Button x:Name="xSchedulingModule" Content="Scheduling" Style="{StaticResource menuStyleCB}" Click="xSchedulingModule_Click" /> </StackPanel> Simple, easy to use events, and no extra assemblies required! Since the code for loading each view will be similar, we'll focus on JobsView for now.The code-behind with this setup looks something like... private JobsView _jobsView; public MainPage() { InitializeComponent(); } private void xJobsButton_Click(object sender, RoutedEventArgs e) { if (MainRegion.Content.GetType() != typeof(JobsView)) { if (_jobsView == null) _jobsView = new JobsView(); MainRegion.Content = _jobsView; } } What am I doing here? First, for each 'view' I create a private reference which MainPage will hold on to. This allows for a little bit of state-maintenance when switching views. When a button is clicked, first we make sure the 'view' typeisn't active (why load it again if it is already at center stage?), then we check if the view has been created and create if necessary, then load it up. Three steps to switching views and is easy as pie. Part 4 Results The end result of all this is that I now have a menu module (MVVM) and a menu section (code-behind) that load their respective views. Since I'm using the same exact XAML (except with commands/events depending on the project), the end result for both is again exactly the same and I'll show a slightly larger image to show it off: Next time, we add the Jobs Module and wire up RadGridView and a separate edit page to handle adding and editing new jobs. That's when things get fun. And somewhere down the line, I'll make the menu look slicker. :) Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Windows Server 2003 Licensing

    - by Phil
    Hi all, I'm looking to get a Windows Server 2003 box in the middle of my linux network. :( I'm just concerned about CAL licensing for it. No devices will access any network server function of Windows Server 2003. I don't need Windows for DHCP or DNS or file and print sharing. I have linux boxes to do that! xD I just need a box running Windows (of some variety) to host those few apps that have to run on Windows like my AV management console. In short do I need any CALs for my server if its not acting as server itself. I think Windows Server 2003 comes with 5 CALs which can be per user for the admins to use RDP? Thanks, Phil

    Read the article

  • Difference between BES SBE and Express?

    - by DaveJohnston
    Can anyone tell me what the difference is between the BES epxress and small business edition is? From what I have read they are both identical in capabilities and also both have a 15 user limit. But the BES express edition is free and comes with 1 user license and SBE costs about £800 but comes with 5 user licenses. Buying a 5 user CAL pack costs about £350 (from what I have seen). So if there is no difference why would anyone buy the SBE when they could get the Express edition free and just add 5 more licenses for about £350? Is there any fundamental difference between express and SBE?

    Read the article

  • Getting started with terminal services (remote desktop services) and thin clients

    - by therulebookman
    I've got a Windows Server 2008 R2 box and I want to make it a RDS server and connect with thin clients. I don't want to do VDI with hyper-v, as this box is already virtualized. RDS is installed and I've installed an RDS CAL. I've browsed the Technet articles, but navigating technet is worthless. Can anyone point me to a concise get-me-started guide to terminal services/remote desktop services? If I can just get aimed in the right direction I can probably figure it out myself. Thanks.

    Read the article

  • Options to optimize lotus notes 8.5.X

    - by Jakub
    Has anyone found actually useful optimization methods for the bulky, fat, eclipse giant, nuissance that is Lotus Notes 8.5? I want it to be fast, and not eat up system resources like crazy while I run it ALL day (as it is my company's corporate mail / cal / scheduling solution). I've tried various hacks for the JVM heap size (if I recall correctly). None really bring a performance improvement. I have a dual core cpu, if that helps (I tried going the route of optimizing JAVA for 2 cores in hopes it would work, but seen no speed improvement). Notes is just sooo bloated, anyone have any suggestions to optimize/mod this thing so it is more responsive and less of a resource hog. Note: I don't want to switch to the web version, or the standard stripped down versions, I am aware of those, I just cannot since we don't run those internally for the company.

    Read the article

  • Windows Server 2003- RDP functionality after removing Terminal Server temporary CALs

    - by Jack T
    I recently configured Windows Server 2003 Terminal Services for a client. The 90 day trial CAL period is about to expire, and my client has decided that he's too cheap to purchase CALs. He wants to use the 2 administrative RDP logons for remote access. Can I just uninstall Terminal Server to revert the RDP functionality back to that of the 2 administrative RDP logons, or is there something else that needs to be done? What's the best way to uninstall Terminal Services? Through Add/Remove Programs - Windows Components - uncheck Terminal Server or through the "Configure Your Server Wizard" by removing the Terminal Server role?

    Read the article

  • Upgrading existing Windows 7 Pro licenses to Ent?

    - by Alex
    From our license info page from MS: Agreement Info: MOLP-Z Std ... License Date: 2011-03-02 Microsoft Invoice No: 91.... Reorder/Upgrade End Date: 2013-03-31 MS Win Pro 7 Sngl Open 1 License Part no: FQC-02872 Qty: 120 MS Win Server CAL 2008 Sng Open 1 Part no: R18-02709 Qty: 120 Now we want to upgrade to Enteprise but the reseller says "Sorry, you need to buy new licenses, 120x Win7Pro (FQC-02872) and 120x SoftwareAssurance (FQC-02368). Are they trying to rip us off?? "Upgrade End Date" still not here and why do we need to re-order exactly same part number (FQC-02872) only 1 year later?

    Read the article

  • SQL Server 2005 / 2008 Licensing question

    - by Jose
    I have read up online, and through some threads here like this one. But I'm still confused and need to see if anyone can shed some light. My company is deploying a clickonce application that will be on multiple computers (about 50). It will be accessing an SQL Server database and I was wondering what kind of SQL Server licensing should I/need to have? The application currently logs in via SQL Server authentication using one SQL Server user. It seems logical that I would just need one user CAL and even through there will be up to 50 connections it should all still work. Am I right?

    Read the article

  • SQL Server 2008 lincensing question relating to web servers

    - by Matty Brown
    We purchased SQL Server 2008 Standard licences last year under the server + device CAL licencing model. Since our server has 2 physical CPUs and only 46 clients, this option was by far the cheapest. Now we'd like to be able to query a small number of stored procedures from our Windows Server 2003 Web Edition server, which is in a seperate zone on our firewall. I think SQL Server 2008 Web Edition could be an option to us, but is it possible to replicate/mirror stored procedures and tables to such a server and would we be breaking any rules by doing so? Is this a form of multiplexing? Also, would replication/mirroring work both ways, if we were to want to write back data from the web server?

    Read the article

  • Checking whether product key will work with SBS 2003

    - by Rob Nicholson
    We've recently absorbed a small company who had a Dell PowerEdge server running SBS 2003. For some reason, the hard disks have been wiped. We have the product key though from the sticker on the side of the case but not the installation media: Win SBS Std 2003 1-2 CPU 5-CAL OEM software We do have a Dell labelled set of four CDs labelled SBS 2003 in our store and I've built a VM from this media but it doesn't prompt for the product key during install. Is there any way to ascertain whether this media will work with this product key without going through activation? I know one can activate several times but would prefer to check we've got the right media before doing this. Thanks, Rob.

    Read the article

  • Do I need to transfer Server license CALs to new Domain Controller during AD transition?

    - by drpcken
    I have an old Server 2003 domain controller I'm ready to decommission. I notice in Server 2003 there is a Licensing module under Administrative Tools that seems to manage and track user CAL's for the domain controller. I don't see this on my newly promoted Server 2008 domain controller, nor do I see any roles to add it. Does this need to be transferred to my new Server 2008 domain controller or will it all happen when the old server is decommissioned? I've already transferred all my Terminal Server licenses to the new server. Thank you!

    Read the article

  • SQL Server 2005/2008 Licensing Decision

    - by Hakim
    Hello, I have purchased a dedicated server from a reputable Hosting company. They only have Windows Server 2008 OS installed on it and NO Sql server. Server Configuration is Intel Dual core Processor with 2GB of RAM and 100GB HDD. I wanted to host my web services on that server which will be using the MS SQL Server 2005 at the backend.There are multiple web services and each using a different Database. Microsoft has CAL basis Licensing , Which I understand is based on number of users accessing the database directly ( I may be wrong ) . But my users will be accessing the webservice and no direct connection to the database as such. Yes but the number of users accessing the web server cannot be known and is not under my control. Which Licensing is best suited for this kind of setup ? I don't need analysing and BI services right now ,but i may want to upgrade that in future may be. Any help will be appreciated. Thanks

    Read the article

  • Any Microsoft SQL Server 2008 licensing restrictions on usage?

    - by ryrobes
    Does Microsoft have any problems with HOW I USE SQL Server Standard Edition 2008? I plan on using it to aggregate my clients various data sources and report on them (using the whole stack - SSIS, DB, Analysis Services and Reporting Services) via the web. I don't want to run into any issues with being accused of "re-selling" services / features when I'm not allowed to, etc. In essence, I'm charging people to build them solutions based on / using MY licensed copy and then giving them access to the final products. (reports, etc) It seems straightforward enough - but who knows with MS... (BTW, Licensed by processor / not CAL)

    Read the article

  • The Next RAC, ASM and Linux Forum. May 4, 2010 Beit HP Raanana

    - by alejandro.vargas
    The next RAC, ASM and Linux forum will take place next week, you are still on time to register : Israel Oracle Users Group RAC,ASM and Linux Forum This time we will have a panel formed by Principal Oracle Advanced Customer Services Engineers and RAC experts Galit Elad and Nickita Chernovski and Senior Oracle Advanced Customer Services Engineers and RAC experts Roy Burstein and Dorit Noga. They will address the subject: 5 years of experience with RAC at Israeli Customers, lessons learned. It is a wonderful opportunity to meet with the people that is present at most major implementations and helped to solve all major issues along the last years. In addition we will have 2 most interesting Customer Presentations: Visa Cal DBA Team Leader Harel Safra will tell about their experience with scalability using standard Linux Servers for their mission critical data warehouse. Bank Discount Infrastructure DBA Uril Levin, who is in charge of the Bank Backup and Recovery Project, will speak about their Corporate Backup Solution using RMAN; that includes an end to end solution for VLDBS and mission critical databases. One of the most interesting RMAN implementations in Israel. This time I will not be able to attend myself as I'm abroad on business, Galit Elad will greet you and will lead the meeting. I'm sure you will enjoy a very, very interesting meeting. Best Regards Alejandro

    Read the article

  • Vaadin Calendar events not shown if overnight [migrated]

    - by B_B
    In my vaadin project there is the possibility to create events that are shown by the calendar. It does works, except when the event is overnight, let's say the night from 23th to 24th, and the calendar shows as only day the 24th. In this case the part of the event that belongs to the 24th is supposed to be shown, but it is not. When I switch to weekly view, the event is shown properly. Here is the function where I get the data and use a container for the calendar: /* Fill Calendar from database */ void updateData() { final BeanItemContainer<TypeReservationEvent> container = new BeanItemContainer<TypeReservationEvent>(TypeReservationEvent.class); Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("roomParent",chosenRoom); String query = "SELECT DISTINCT res FROM EntityReservation res, EntityRoom r, EntityTable rt WHERE res.tableId = rt.id " + "AND rt.roomParent =:roomParent"; reservationList = facade.list(query, parameters); for(EntityReservation rt : reservationList) { container.addBean(new TypeReservationEvent(rt)); } container.sort(new Object[]{"start"}, new boolean[]{true}); cal.setContainerDataSource(container, "caption", "description", "start", "end", "styleName"); // Force calendar to refresh if(selectCalViewType.getValue() == chooseWeeklyView) { setViewType(calViewType.DAILY); setViewType(calViewType.WEEKLY); } else if (selectCalViewType.getValue() == chooseDailyView) { setViewType(calViewType.WEEKLY); setViewType(calViewType.DAILY); } } TIA

    Read the article

  • Can't obtain reference to EKReminder array retrieved from fetchRemindersMatchingPredicate

    - by Scionwest
    When I create an NSPredicate via EKEventStore predicateForRemindersInCalendars; and pass it to EKEventStore fetchRemindersMatchingPredicate:completion:^ I can loop through the reminders array provided by the completion code block, but when I try to store a reference to the reminders array, or create a copy of the array into a local variable or instance variable, both array's remain empty. The reminders array is never copied to them. This is the method I am using, in the method, I create a predicate, pass it to the event store and then loop through all of the reminders logging their title via NSLog. I can see the reminder titles during runtime thanks to NSLog, but the local arrayOfReminders object is empty. I also try to add each reminder into an instance variable of NSMutableArray, but once I leave the completion code block, the instance variable remains empty. Am I missing something here? Can someone please tell me why I can't grab a reference to all of the reminders for use through-out the app? I am not having any issues at all accessing and storing EKEvents, but for some reason I can't do it with EKReminders. - (void)findAllReminders { NSPredicate *predicate = [self.eventStore predicateForRemindersInCalendars:nil]; __block NSArray *arrayOfReminders = [[NSArray alloc] init]; [self.eventStore fetchRemindersMatchingPredicate:predicate completion:^(NSArray *reminders) { arrayOfReminders = [reminders copy]; //Does not work. for (EKReminder *reminder in reminders) { [self.remindersForTheDay addObject:reminder]; NSLog(@"%@", reminder.title); } }]; //Always = 0; if ([self.remindersForTheDay count]) { NSLog(@"Instance Variable has reminders!"); } //Always = 0; if ([arrayOfReminders count]) { NSLog(@"Local Variable has reminders!"); } } The eventStore getter is where I perform my instantiation and get access to the event store. - (EKEventStore *)eventStore { if (!_eventStore) { _eventStore = [[EKEventStore alloc] init]; //respondsToSelector indicates iOS 6 support. if ([_eventStore respondsToSelector:@selector(requestAccessToEntityType:completion:)]) { //Request access to user calendar [_eventStore requestAccessToEntityType:EKEntityTypeEvent completion:^(BOOL granted, NSError *error) { if (granted) { NSLog(@"iOS 6+ Access to EventStore calendar granted."); } else { NSLog(@"Access to EventStore calendar denied."); } }]; //Request access to user Reminders [_eventStore requestAccessToEntityType:EKEntityTypeReminder completion:^(BOOL granted, NSError *error) { if (granted) { NSLog(@"iOS 6+ Access to EventStore Reminders granted."); } else { NSLog(@"Access to EventStore Reminders denied."); } }]; } else { //iOS 5.x and lower support if Selector is not supported NSLog(@"iOS 5.x < Access to EventStore calendar granted."); } for (EKCalendar *cal in self.calendars) { NSLog(@"Calendar found: %@", cal.title); } [_eventStore reset]; } return _eventStore; } Lastly, just to show that I am initializing my remindersForTheDay instance variable using lazy instantiation. - (NSMutableArray *)remindersForTheDay { if (!_remindersForTheDay) _remindersForTheDay = [[NSMutableArray alloc] init]; return _remindersForTheDay; } I've read through the Apple documentation and it doesn't provide any explanation that I can find to answer this. I read through the Blocks Programming docs and it states that you can access local and instance variables without issues from within a block, but for some reason, the above code does not work. Any help would be greatly appreciated, I've scoured Google for answers but have yet to get this figured out. Thanks everyone! Johnathon.

    Read the article

  • Problem with a blocking network task

    - by user326967
    Hello everyone. I'm new in Java so please forgive any obscene errors that I may make :) I'm developing a program in Java that among other things it should also handle clients that will connect to a server. The server has 3 threads running, and I have created them in the following way : DaemonForUI du; DaemonForPort da; DaemonForCheck dc; da = new DaemonForPort(3); dc = new DaemonForCheck(5); du = new DaemonForUI(7); Thread t_port = new Thread(da); Thread t_check = new Thread(dc); Thread t_ui = new Thread(du); t_port.setName("v1.9--PORTd"); t_check.setName("v1.9-CHECKd"); t_ui.setName("v1.9----UId"); t_port.start(); t_check.start(); t_ui.start(); Each thread handles a different aspect of the complete program. The thread t_ui is responsible to accept asynchronous incoming connections from clients, process the sent data and send other data back to the client. When I remove all the commands from the previous piece of code that has to with the t_ui thread, everything runs ok which in my case means that the other threads are printing their debug messages. If I set the t_ui thread to run too, then the whole program blocks at the "accept" of the t_ui thread. After reading at online manuals I saw that the accepted connections should be non-blocking, therefore use something like that : public ServerSocketChannel ssc = null; ssc = ServerSocketChannel.open(); ssc.socket().bind(new InetSocketAddress(port)); ssc.configureBlocking(false); SocketChannel sc = ssc.accept(); if (sc == null) { ; } else { System.out.println("The server and client are connected!"); System.out.println("Incoming connection from: " + sc.socket().getRemoteSocketAddress()); in = new DataInputStream(new BufferedInputStream(sc.socket().getInputStream())); out = new DataOutputStream(new BufferedOutputStream(sc.socket().getOutputStream())); //other magic things take place after that point... The thread for t_ui is created as follows : class DaemonForUI implements Runnable{ private int cnt; private int rr; public ListenerForUI serverListener; public DaemonForUI(int rr){ cnt = 0; this.rr = rr; serverListener = new ListenerForUI(); } public static String getCurrentTime() { final String DATE_FORMAT_NOW = "yyyy-MM-dd HH:mm:ss"; Calendar cal = Calendar.getInstance(); SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW); return (sdf.format(cal.getTime())); } public void run() { while(true) { System.out.println(Thread.currentThread().getName() + "\t (" + cnt + ")\t (every " + rr + " sec) @ " + getCurrentTime()); try{ Thread.sleep(rr * 1000); cnt++; } catch (InterruptedException e){ e.printStackTrace(); } } } } Obviously, I'm doing something wrong at the creation of the socket or at the use of the thread. Do you know what is causing the problem? Every help would be greatly appreciated.

    Read the article

  • WCF ValidationFault

    - by RandomNoob
    I'm using Validation Application Block - Enterprise Library to validate parameters sent to my WCF Service operations. For instance, a certain operation requires the parameter to either be a 1 or 6, like so: [OperationContract(Name="GetEmployeesByRegion")] [FaultContract(typeof(ValidationFault))] List<Employees> GetEmployeesByRegion([DomainValidator(1,6)]int regionId); This works just fine i.e the validation fault occurs however, when the service is invoked by the client, a generic System.ServiceModel.FaultException is thrown. An the message indicates: "The creator of this fault did not specify a reason." Now, I could check the parameters myself before the service cal and throw a custom fault but that seems to defeat the purpose of attribute based validation of parameters using the Validation Application Block. Is there anyway to customize the error returned by the validation Fault? It is also possible I'm doing something completely wrong. I just want the caller to know that he/she should have passed in a 1 or 6 in the exception message. Is this possible?

    Read the article

  • Changing minDate option in JQuery DatePicker does nothing

    - by futureelite7
    I have this jQuery datepicker code that initially set the minDate of the datepicker. After a user selects a starting date, I used the option attribute to change the minDate of the datepicker, but nothing happens. What did I do wrong and how should I make it work? Datepicker init code: $(function () { $('#starttime,#endtime,#validity').datepicker({ numberOfMonths: [1, 2], buttonImageOnly: true, showAnim: 'slideDown', buttonImage: '../images/cal.gif', beforeShow: customRange, dateFormat: "dd-mm-yy", firstDay: 1, changeFirstDay: false }); }); Datepicker change minimum date code: var startdate = new Date(2010,4-1, 4-1,0,0,0); $("#endtime").datepicker('option','minDate',startdate);

    Read the article

  • Proper implementation of NLog and Prism

    - by WiT8litZ
    What would be the best way to implement NLog in my Prism / CAL WPF application. This might be an amateur question, I am a bit new to the whole Prism framework :) I thought about putting the reference to the NLog dll in the Infrastructure module and make a wrapper singleton class e.g. MyLogger. My thinking was to be able to have the reference to 1 logger implementation somewhere in a central place that everything has reference to, and the only thing that I know of in Prism would be your Infrastructure module. The obvious other way is to add a reference to NLog to each module but I think that would defeat the purpose of decoupling and all of that. Any ideas would be most helpful Regards

    Read the article

  • How to insert random characters in a text file at random positions using C

    - by Shantanu Gupta
    I m writing a program to insert random characters in a text file in between the text so that no one can understand this text. eg. suppose this is my text file a.txt with content as "Hi my name is abc. I like to play XYZ" Now i will cal a random function in C and get the 26 modulus random no to get the character to be inserted at random position. eg. "Him mayn mae lkd". etc How can i insert this random character in between the file.

    Read the article

  • General ODBC Error in VBA

    - by raam
    Hi am populating the data from MS Access By Using VBA i am using below mentioned code.if i am run the same code in MS 2007 then It run properly but if i am run the same code in MS 2003 it gives the "General ODBC Error" how to solve this problem Any help would be appreciated!! Thanks in advance Sub Button2_Click() Dim varConnection As String Dim varSQL As String Dim cal, cal1, x varConnection = "ODBC; DSN=MS Access Database;DBQ=D:\Box\Generate.mdb;Driver={Driver do Microsoft Access (*.mdb)}" ' varSQL = "SELECT * FROM Empdata" With ActiveSheet.QueryTables.Add(Connection:=varConnection, Destination:=ActiveSheet.Range("C7")) .CommandText = varSQL .Name = "Query-39008" .Refresh BackgroundQuery = False End With End Sub

    Read the article

  • groovy variable function

    - by bsreekanth
    I'm not even sure about how to title this qn. But, hope there is an easy way to do it in dynamic language like groovy. say I have a class Service, where I delegate the business logic. the methods in it are funA(), funB()... funX(). Now I have a controller class, where I call the service closure, which can be invoked like service.funA() . Now based on a variable (which can have values A, B ... X), I need to cal the correct service closure. Basically to avoid writing lot of if conditional statements. Something like service."fun+var"() would do. I'm not sure whether it is possible to substitute variable in closure (function)name. or any way by passing function (name) as a parameter...not sure I think PHP has a similar feature http://php.net/manual/en/functions.variable-functions.php thanks for any pointer..

    Read the article

  • .NET application per-machine/per-user licensing

    - by MainMa
    I am about to implement a very basic licensing feature for my application. A serial number may be granted per-machine (or per-operating-system) or per-user (as for CAL in Windows Server: if my application is used by several users on one machine or if it is used by one user on several machines). For per-operating-system licensing, I use SerialNumber of Win32_OperatingSystem. For per-user licensing, I use: WindowsIdentity currentIdentity = WindowsIdentity.GetCurrent(); if (currentIdentity != null) { SecurityIdentifier userSid = currentIdentity.User.AccountDomainSid; Console.WriteLine(userSid); } A hash of an obtained OS serial number or SID is then stored in the database, associated with application serial; each time the program starts, it queries the server, sending hash of OS SN/SID and application serial. Is it a right thing to do it or is it completely wrong? Will it work on every Windows machine? (For example, using motherboard serial is wrong)

    Read the article

  • Java textfile I/O problem

    - by KáGé
    Hello, I have to make a torpedo game for school with a toplist for it. I want to store it in a folder structure near the JAR: /Torpedo/local/toplist/top_i.dat, where the i is the place of that score. The files will be created at the first start of the program with this call: File f; f = new File(Toplist.toplistPath+"/top_1.dat"); if(!f.exists()){ Toplist.makeToplist(); } Here is the toplist class: package main; import java.awt.Color; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.prefs.Preferences; import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.JTextArea; public class Toplist { static String toplistPath = "./Torpedo/local/toplist"; //I know it won't work this easily, it's only to get you the idea public static JFrame toplistWindow = new JFrame("Torpedó - [TOPLISTA]"); public static JTextArea toplist = new JTextArea(""); static StringBuffer toplistData = new StringBuffer(3000); public Toplist() { toplistWindow.setSize(500, 400); toplistWindow.setLocationRelativeTo(null); toplistWindow.setResizable(false); getToplist(); toplist.setSize(400, 400); toplist.setLocation(0, 100); toplist.setColumns(5); toplist.setText(toplistData.toString()); toplist.setEditable(false); toplist.setBackground(Color.WHITE); toplistWindow.setLayout(null); toplistWindow.setVisible(true); } public Toplist(Player winner) { //this is to be done yet, this will set the toplist at first and then display it toplistWindow.setLayout(null); toplistWindow.setVisible(true); } /** * Creates a new toplist */ public static void makeToplist(){ new File(toplistPath).mkdir(); for(int i = 1; i <= 10; i++){ File f = new File(toplistPath+"/top_"+i+".dat"); try { f.createNewFile(); } catch (IOException e) { JOptionPane.showMessageDialog(new JFrame(), "Fájl hiba: toplista létrehozása", "Error", JOptionPane.ERROR_MESSAGE); } } } /** * If the score is a top score it inserts it into the list * * @param score - the score to be checked */ public static void setToplist(int score, Player winner){ BufferedReader input = null; PrintWriter output = null; int topscore; for(int i = 1; i <= 10; i++){ try { input = new BufferedReader(new FileReader(toplistPath+"/top_"+i+",dat")); String s; topscore = Integer.parseInt(input.readLine()); if(score > topscore){ for(int j = 9; j >= i; j--){ input = new BufferedReader(new FileReader(toplistPath+"/top_"+j+".dat")); output = new PrintWriter(new FileWriter(toplistPath+"/top_"+(j+1)+".dat")); while ((s = input.readLine()) != null) { output.println(s); } } output = new PrintWriter(new FileWriter(toplistPath+"/top_"+i+".dat")); output.println(score); output.println(winner.name); if(winner.isLocal){ output.println(Torpedo.session.remote.name); }else{ output.println(Torpedo.session.remote.name); } output.println(Torpedo.session.mapName); output.println(DateUtils.now()); break; } } catch (FileNotFoundException e) { JOptionPane.showMessageDialog(new JFrame(), "Fájl hiba: toplista frissítése", "Error", JOptionPane.ERROR_MESSAGE); } catch (IOException e) { JOptionPane.showMessageDialog(new JFrame(), "Fájl hiba: toplista frissítése", "Error", JOptionPane.ERROR_MESSAGE); } finally { if (input != null) { try { input.close(); } catch (IOException e) { JOptionPane.showMessageDialog(new JFrame(), "Fájl hiba: toplista frissítése", "Error", JOptionPane.ERROR_MESSAGE); } } if (output != null) { output.close(); } } } } /** * This loads the toplist into the buffer */ public static void getToplist(){ BufferedReader input = null; toplistData = null; String s; for(int i = 1; i <= 10; i++){ try { input = new BufferedReader(new FileReader(toplistPath+"/top_"+i+".dat")); while((s = input.readLine()) != null){ toplistData.append(s); toplistData.append('\t'); } toplistData.append('\n'); } catch (FileNotFoundException e) { JOptionPane.showMessageDialog(new JFrame(), "Fájl hiba: toplista betöltése", "Error", JOptionPane.ERROR_MESSAGE); } catch (IOException e) { JOptionPane.showMessageDialog(new JFrame(), "Fájl hiba: toplista betöltése", "Error", JOptionPane.ERROR_MESSAGE); } } } /** * * @author http://www.rgagnon.com/javadetails/java-0106.html * */ public static class DateUtils { public static final String DATE_FORMAT_NOW = "yyyy-MM-dd HH:mm:ss"; public static String now() { Calendar cal = Calendar.getInstance(); SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW); return sdf.format(cal.getTime()); } } } The problem is, that it can't access any of the files. I've tried adding them to the classpath and at least six different variations of file/path handling I found online but nothing worked. Could anyone tell me what do I do wrong? Thank you.

    Read the article

< Previous Page | 3 4 5 6 7 8 9  | Next Page >