Daily Archives

Articles indexed Monday April 12 2010

Page 20/116 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • jQuery fullcalendar custom event

    - by raulriera
    Hi, I was wondering how to apply a custom render to a event... I want to be able to preppend the "patient" name of a practice agenda... eventRender: function(event, element) { console.log(element[0]); } This currently shows the HTML output in the console, but I don't know how can I access it (in a pretty jquery manner) in order to manipulate the data within. Thanks

    Read the article

  • how to restrict a web portal to a particular computer?

    - by ZX12R
    I am in the process of creating a Ruby on rails portal This portal requires a lot of data feeding by the site owner's back-office personnel. My client has this problem : the office staff should not be able to access the back office interface from any other than his office computers I have no idea how to achieve this. Is there a method for this? Thanks in advance.

    Read the article

  • Parsing C#, finding methods and putting try/catch to all methods

    - by erdogany
    I know it sounds weird but I am required to put a wrapping try catch block to every method to catch all exceptions. We have thousands of methods and I need to do it in an automated way. What do you suggest? I am planning to parse all cs files and detect methods and insert a try catch block with an application. Can you suggest me any parser that I can easily use? or anything that will help me... every method has its unique number like 5006 public static LogEntry Authenticate(....) { LogEntry logEntry = null; try { .... return logEntry; } catch (CompanyException) { throw; } catch (Exception ex) { logEntry = new LogEntry( "5006", RC.GetString("5006"), EventLogEntryType.Error, LogEntryCategory.Foo); throw new CompanyException(logEntry, ex); } } I created this for this; http://thinkoutofthenet.com/index.php/2009/01/12/batch-code-method-manipulation/

    Read the article

  • Choix technologique : Spring 3.0 ou Java EE 6 pour vos projets Java en 2010 ?

    Fin 2009, ce sont deux solutions très attendues qui ont finalement été livrées : D'un coté Spring 3.0, framework déjà fort utilisé en entreprise, et qui arrive avec quelques nouveautés : Support de Rest, Expression Language, .. Principal atout : Il est déjà utilisable sur des serveurs omniprésents en production (Tomcat, Websphere 6.1,..) De l'autre coté, Java EE 6. Un nouvelle version du standard, beaucoup plus légère et souple que les anciennes versions. Il propose également un profil Web, qui propose des fonctionnalités fort similaire à ce qui est proposé par Spring (EJB Lite, Injection de dépendances, ..). Pour l'heure, la seule implémentation disponible est Glassfish. De votre coté, quelle solution utilise...

    Read the article

  • Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION)) in SharePoint

    - by BeraCim
    Hi all: After googling for many hours for a solution for the above Sharepoint exception, I have come to SO for help on this one... I believe the cause of me getting the above exception is because of the following code: try { using (SPSite site = new SPSite(siteId, spUserToken)) { using (SPWeb web = site.OpenWeb(webId)) { createNewSite(web); } } } createNewSite(web) changes the name and URL of "web" using AllowUnsafeUpdates, so when it comes out of the method it has been changed. My few months worth of Sharepoint developing experience suggest that that is the cause of the exception. "web" is no longer used anymore so I can comfortably null it myself. The problem here is... it didnt work: try { using (SPSite site = new SPSite(siteId, spUserToken)) { SPWeb web = null; using (web = site.OpenWeb(webId)) { createNewSite(web); if (web != null) { web = null; } } } } I believe that the original developer used the using declaration to avoid SPWeb objects from leaking. Asides that I think it is okay for me to break this pattern solely for the purpose of getting rid of that dreaded exception. So the question: what can I do to the above code to potentially fix this exception? Thanks.

    Read the article

  • Setting objects (not users) inactive after period of time in asp.net mvc

    - by bastijn
    This question is mainly to verify my current idea. I have a series of objects which I want to be active for a specified amount of time. For instance objects like ads which are shown in the ad space only for the amount of time bought, objects in search results which should only pop up when active, and frontpage posts which should be set to inactive after a prespecified time. My current idea is to just give those type of objects a StartDate and EndDate and filter the search routines to only show results which fall in the range StartDate < currentDate < EndDate. Is this the normal structure or should there be some sort of auto-routine which routinely checks for objects which are "over-time" and set a property "inactive" to true or something. Seems like this approach is such a hassle since I need a checker which runs say, every 5 minutes, to scan all DB objects. Seems like a bad idea to me. So is the first structure the most commonly used or are there any other options? When searching on google or SO the search queries only return results setting users inactive.

    Read the article

  • Asp.net Google Charts SSL handler for GeoMap

    - by Ian
    Hi All, I am trying to view Google charts in a site using SSL. Google Charts do not support SSL so if we use the standard charts, we get warning messages. My plan is to create a ASHX handler that is co9ntained in the secure site that will retrieve the content from Google and serve this to the page the user is viewing. Using VS 2008 SP1 and the included web server, my idea works perfectly for both Firefox and IE 8 & 9(Preview) and I am able to see my geomap displayed on my page as it should be. But my problem is when I publish to IIS7 the page using my handler to generate the geomap works in Firefox but not IE(every version). There are no errors anywhere or in any log files, but when i right click in IE in the area where the map should be displayed, I see the message in the context menu saying "movie not loaded" Below is the code from my handler and the aspx page. I have disabled compression in my web.config. Even in IE I am hitting all my break points and when I use the IE9 Developer tools, the web page is correctly generated with all the correct code, url's and references. If you have any better ways to accomplish this or how i can fix my problem, I will appreciate it. Thanks Ian Handler(ASHX) public void ProcessRequest(HttpContext context) { String url = "http://charts.apis.google.com/jsapi"; string query = context.Request.QueryString.ToString(); if (!string.IsNullOrEmpty(query)) { url = query; } HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(new Uri(HttpUtility.UrlDecode(url))); request.UserAgent = context.Request.UserAgent; WebResponse response = request.GetResponse(); string PageContent = string.Empty; StreamReader Reader; Stream webStream = response.GetResponseStream(); string contentType = response.ContentType; context.Response.BufferOutput = true; context.Response.ContentType = contentType; context.Response.Cache.SetCacheability(HttpCacheability.NoCache); context.Response.Cache.SetNoServerCaching(); context.Response.Cache.SetMaxAge(System.TimeSpan.Zero); string newUrl = IanLearning.Properties.Settings.Default.HandlerURL; //"https://localhost:444/googlesecurecharts.ashx?"; if (response.ContentType.Contains("javascript")) { Reader = new StreamReader(webStream); PageContent = Reader.ReadToEnd(); PageContent = PageContent.Replace("http://", newUrl + "http://"); PageContent = PageContent.Replace("charts.apis.google.com", newUrl + "charts.apis.google.com"); PageContent = PageContent.Replace(newUrl + "http://maps.google.com/maps/api/", "http://maps.google.com/maps/api/"); context.Response.Write(PageContent); } else { { byte[] bytes = ReadFully(webStream); context.Response.BinaryWrite(bytes); } } context.Response.Flush(); response.Close(); webStream.Close(); context.Response.End(); context.ApplicationInstance.CompleteRequest(); } ASPX Page <%@ Page Title="" Language="C#" MasterPageFile="~/Site2.Master" AutoEventWireup="true" CodeBehind="googlechart.aspx.cs" Inherits="IanLearning.googlechart" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"> <script type='text/javascript' src='~/googlesecurecharts.ashx?'></script> <script type='text/javascript'> google.load('visualization', '1', { 'packages': ['geomap'] }); google.setOnLoadCallback(drawMap); var geomap; function drawMap() { var data = new google.visualization.DataTable(); data.addRows(6); data.addColumn('string', 'City'); data.addColumn('number', 'Sales'); data.setValue(0, 0, 'ZA'); data.setValue(0, 1, 200); data.setValue(1, 0, 'US'); data.setValue(1, 1, 300); data.setValue(2, 0, 'BR'); data.setValue(2, 1, 400); data.setValue(3, 0, 'CN'); data.setValue(3, 1, 500); data.setValue(4, 0, 'IN'); data.setValue(4, 1, 600); data.setValue(5, 0, 'ZW'); data.setValue(5, 1, 700); var options = {}; options['region'] = 'world'; options['dataMode'] = 'regions'; options['showZoomOut'] = false; var container = document.getElementById('map_canvas'); geomap = new google.visualization.GeoMap(container); google.visualization.events.addListener( geomap, 'regionClick', function(e) { drillDown(e['region']); }); geomap.draw(data, options); }; function drillDown(regionData) { alert(regionData); } </script> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <div id='map_canvas'> </div> </asp:Content>

    Read the article

  • How to change ErrorMessage property of the DataAnnotation validation in MVC2.0

    - by Raj Aththanayake
    My task is to change the ErrorMessage property of the DataAnnotation validation attribute in MVC2.0. For example I should be able to pass an ID instead of the actual error message for the Model property and use that ID to retrieve some content(error message) from a another service e.g database, and display that error message in the View instead of the ID. In order to do this I need to set the DataAnnotation validation attribute’s ErrorMessage property. [StringLength(2, ErrorMessage = "EmailContentID.")] [DataType(DataType.EmailAddress)] public string Email { get; set; } It seems like an easy task by just overriding the DataAnnotationsModelValidatorProvider ‘s protected override IEnumerable GetValidators(ModelMetadata metadata, ControllerContext context, IEnumerable attributes) However it seems to be a complicated enough. a. MVC DatannotationsModelValidator’s ErrorMessage property is read only. So I cannot set anything here b. System.ComponentModel.DataAnnotationErrorMessage property(get and set) which is already set in MVC DatannotationsModelValidator so we cannot set again. If you try to set you get “The property cannot set more than once…” error message appears. public class CustomDataAnnotationProvider : DataAnnotationsModelValidatorProvider { protected override IEnumerable GetValidators(ModelMetadata metadata, ControllerContext context, IEnumerable attributes) { IEnumerable validators = base.GetValidators(metadata, context, attributes); foreach (ValidationAttribute validator in validators.OfType<ValidationAttribute>()) { validator.ErrorMessage = "Error string from DB"; } //...... } Can anyone please help me on this?

    Read the article

  • How to traverse the item in the collection in a List or Observable collection?

    - by Ashish Ashu
    I have a collection that is binded to my Listview. I have provided options to user to "move up" "move down" the selected item in the list view. I have binded the selected item of the listview to my viewmodel, hence I get the item in the collection on which user want to do the operation. I have attached "move up" "move down" commands in my viewmodel. I want what is the best way to move up and down in the collection in the collection which is reflected in the list view. Please suggest.

    Read the article

  • To create an inbox like Gmail in jQuery, would something like the Accordion effect work for opening

    - by snoopy
    I've been looking for a pre-built jQuery component that I could use to build an inbox for a messaging application: http://jqueryui.com/demos/accordion/ I was thinking that if I could close all of the elements in the Accordion, that would be equivalent to showing a list of unopened messages when the user first logs into their Inbox. And then, by clicking on the leaves of the Accordion, they can see each message one by one. Is this a good idea or is there some other jQuery plugin that would work better for this type of functionality?

    Read the article

  • Game architecture: modeling different steps/types of UI

    - by Sander
    I have not done any large game development projects, only messed around with little toy projects. However, I never found an intuitive answer to a specific design question. Namely, how are different types/states of UI modeled in games? E.g. how is a menu represented? How is it different from a "game world" state (let's use an FPS as an example). How is an overlaid menu on top of a "game world" modeled? Let's imagine the main loop of a game. Where do the game states come into play? It it a simple case-by-case approach? if (menu.IsEnabled) menu.Process(elapsedTime); if (world.IsEnabled) world.Process(elapsedTime); if (menu.IsVisible) menu.Draw(); if (world.IsVisible) world.Draw(); Or are menu and world represented somewhere in a different logic layer and not represented at this level? (E.g. a menu is just another high-level entity like e.g. player input or enemy manager, equal to all others) foreach (var entity in game.HighLevelEntities) entity.Process(elapsedTime); foreach (var entity in game.HighLevelEntities) entity.Draw(elapsedTime); Are there well-known design patterns for this? Come to think of it, I don't know any game-specific design patterns - I assume there are others, as well? Please tell me about them.

    Read the article

  • idlj Ignoring "#pragma prefix"

    - by Benny
    I have an IDL file that has a "#pragma prefix" directive, but whenever I use idlj to build the Java code, it ignores this and generates an _id without the prefix specified. This is a big problem because when _is_a is used, it always returns false, since my generated code does not contain the expected prefix. Please help! Thanks in advance!

    Read the article

  • Access Denied using TakeOwn.exe

    - by Magnus
    I have got this file that I can't delete. It happened after a system crash, so the CHKDSK kicked in upon next reboot. After that, I can't delete the file. THis is on Windows Home Server, and the file is one of those hidden Thumbs.db, and my WHS reports a "File conflict" on the file, the reason: Access Denied" What I have tried so far, running as an Administrator: Delete: Access Denied TakeOwn.exe : Access Denied Attrib.exe -s -h : Access Denied Icacls.exe : Access Denied Re-boot in to safe mode and tried the above: Access Denied I have used the CHKDSK /f again, rebooted since some suggestions is that the file has been corrupted, but that didn't change anything. Any suggestions ?

    Read the article

  • Architectural decision : QT or Eclipse Platform ?

    - by umanga
    We are in the process of designing a tool to be used with HDEM(High Definition Electron Microscope).We get stacks of 2D images from HDEM and first step is 'detecting borders' on the sections.After detecting edges of 2D slices ,next step is construct the 3D model using these 2D slices. This 'border detecting' algorithm(s) is/are implemented by one of professor and he has used and suggests to use C.(to gain high performance and probably will parallelise in future) We have to develop comprehensive UI ,3D viewer ,2D editor...etc and use this algorithm. Application should support usual features like project save/open.Undo,Redo...etc Our technology decisions are: A) Build entire platform from the scratch using QT. B) Use Eclipse Platform Our concerns are, if we choose A) we can easily integrate the 'border detecting' algorithm(s) because the development environment is C/C++ But we have to implement the basic features from the scratch. If we choose B) we get basic features from the Eclipse platform , but integrating C libraries going to be a tedious task. Any suggestions on this?

    Read the article

  • asp.net : I wanted to know how to insert '\n' on the label

    - by veda
    I am just simply creating a web application. I wanted to insert a line break in a label for example label1.Text = "I AM HERE" + "\n" + "I AM NOW HERE"; I wanted to print it as I AM HERE I AM NOW HERE But, it is not working... I don't know why... I even tried label1.Text = "I AM HERE" + '\n' + "I AM NOW HERE"; its not working.. What should I do....

    Read the article

  • How to add UITabViewController programatically?

    - by chaitanya
    Hi, In my app I need to add tabviewcontroller to my 2nd view, If its a main view directly we can take the TabViewController type while creating the project but my requirement is i have one view controller in my app, from this view i shold call tabviewcontroller, So how can I tab view controller programatically and how to add nibs to that and how to define the no of tabs for this programatically?

    Read the article

  • prevent autodropdown by jquery datepicker

    - by snarebold
    hi when I append jquery datepicker to my asp textbox, by clicking on it, my browser auto shows the history of the dates i typed in a dropdownlist. Can I prevent this? Set textbox to readonly isn't a good idea because asp.net doesn't read the values from read only fields in code behind. any other ideas? thank you and best regards. marc

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >