Search Results

Search found 4487 results on 180 pages for 'openid provider'.

Page 46/180 | < Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >

  • Data access pattern

    - by andlju
    I need some advice on what kind of pattern(s) I should use for pushing/pulling data into my application. I'm writing a rule-engine that needs to hold quite a large amount of data in-memory in order to be efficient enough. I have some rather conflicting requirements; It is not acceptable for the engine to always have to wait for a full pre-load of all data before it is functional. Only fetching and caching data on-demand will lead to the engine taking too long before it is running quickly enough. An external event can trigger the need for specific parts of the data to be reloaded. Basically, I think I need a combination of pushing and pulling data into the application. A simplified version of my current "pattern" looks like this (in psuedo-C# written in notepad): // This interface is implemented by all classes that needs the data interface IDataSubscriber { void RegisterData(Entity data); } // This interface is implemented by the data access class interface IDataProvider { void EnsureLoaded(Key dataKey); void RegisterSubscriber(IDataSubscriber subscriber); } class MyClassThatNeedsData : IDataSubscriber { IDataProvider _provider; MyClassThatNeedsData(IDataProvider provider) { _provider = provider; _provider.RegisterSubscriber(this); } public void RegisterData(Entity data) { // Save data for later StoreDataInCache(data); } void UseData(Key key) { // Make sure that the data has been stored in cache _provider.EnsureLoaded(key); Entity data = GetDataFromCache(key); } } class MyDataProvider : IDataProvider { List<IDataSubscriber> _subscribers; // Make sure that the data for key has been loaded to all subscribers public void EnsureLoaded(Key key) { if (HasKeyBeenMarkedAsLoaded(key)) return; PublishDataToSubscribers(key); MarkKeyAsLoaded(key); } // Force all subscribers to get a new version of the data for key public void ForceReload(Key key) { PublishDataToSubscribers(key); MarkKeyAsLoaded(key); } void PublishDataToSubscribers(Key key) { Entity data = FetchDataFromStore(key); foreach(var subscriber in _subscribers) { subscriber.RegisterData(data); } } } // This class will be spun off on startup and should make sure that all data is // preloaded as quickly as possible class MyPreloadingThread { IDataProvider _provider; MyPreloadingThread(IDataProvider provider) { _provider = provider; } void RunInBackground() { IEnumerable<Key> allKeys = GetAllKeys(); foreach(var key in allKeys) { _provider.EnsureLoaded(key); } } } I have a feeling though that this is not necessarily the best way of doing this.. Just the fact that explaining it seems to take two pages feels like an indication.. Any ideas? Any patterns out there I should have a look at?

    Read the article

  • Benefits of implementing OAuth

    - by zfranciscus
    From a webservice provider point of view what is the benefit of asking users to create an account or login using 3rd party web service provider (e.g: Twitter or facebook) to log into your site with? Wouldn't it be easier to ask the user to provide their twitter or facebook login and use that to pull the user's twitter or facebook data? It is safer to use OAuth than giving some one the internet our twitter or facebook login credential. But, I can't figure out the benefit from the web service point of view.

    Read the article

  • LSP packet modify

    - by kellogs
    Hello, anybody care to share some insights on how to use LSP for packet modifying ? I am using the non IFS subtype and I can see how (pseudo?) packets first enter WSPRecv. But how do I modify them ? My inquiry is about one single HTTP response that causes WSPRecv to be called 3 times :((. I need to modify several parts of this response, but since it comes in 3 slices, it is pretty hard to modify it accordingly. And, maybe on other machines or under different conditions (such as high traffic) there would only be one sole WSPRecv call, or maybe 10 calls. What is the best way to work arround this (please no NDIS :D), and how to properly change the buffer (lpBuffers-buf) by increasing it ? int WSPAPI WSPRecv( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, LPDWORD lpNumberOfBytesRecvd, LPDWORD lpFlags, LPWSAOVERLAPPED lpOverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine, LPWSATHREADID lpThreadId, LPINT lpErrno ) { LPWSAOVERLAPPEDPLUS ProviderOverlapped = NULL; SOCK_INFO *SocketContext = NULL; int ret = SOCKET_ERROR; *lpErrno = NO_ERROR; // // Find our provider socket corresponding to this one // SocketContext = FindAndRefSocketContext(s, lpErrno); if ( NULL == SocketContext ) { dbgprint( "WSPRecv: FindAndRefSocketContext failed!" ); goto cleanup; } // // Check for overlapped I/O // if ( NULL != lpOverlapped ) { /*bla bla .. not interesting in my case*/ } else { ASSERT( SocketContext->Provider->NextProcTable.lpWSPRecv ); SetBlockingProvider(SocketContext->Provider); ret = SocketContext->Provider->NextProcTable.lpWSPRecv( SocketContext->ProviderSocket, lpBuffers, dwBufferCount, lpNumberOfBytesRecvd, lpFlags, lpOverlapped, lpCompletionRoutine, lpThreadId, lpErrno); SetBlockingProvider(NULL); //is this the place to modify packet length and contents ? if (strstr(lpBuffers->buf, "var mapObj = null;")) { int nLen = strlen(lpBuffers->buf) + 200; /*CHAR *szNewBuf = new CHAR[]; CHAR *pIndex; pIndex = strstr(lpBuffers->buf, "var mapObj = null;"); nLen = strlen(strncpy(szNewBuf, lpBuffers->buf, (pIndex - lpBuffers->buf) * sizeof (CHAR))); nLen = strlen(strncpy(szNewBuf + nLen * sizeof(CHAR), "var com = null;\r\n", 17 * sizeof(CHAR))); pIndex += 18 * sizeof(CHAR); nLen = strlen(strncpy(szNewBuf + nLen * sizeof(CHAR), pIndex, 1330 * sizeof (CHAR))); nLen = strlen(strncpy(szNewBuf + nLen * sizeof(CHAR), "if (com == null)\r\n" \ "com = new ActiveXObject(\"InterCommJS.Gateway\");\r\n" \ "com.lat = latitude;\r\n" \ "com.lon = longitude;\r\n}", 111 * sizeof (CHAR))); pIndex = strstr(szNewBuf, "Content-Length:"); pIndex += 16 * sizeof(CHAR); strncpy(pIndex, "1465", 4 * sizeof(CHAR)); lpBuffers->buf = szNewBuf; lpBuffers->len += 128;*/ } if ( SOCKET_ERROR != ret ) { SocketContext->BytesRecv += *lpNumberOfBytesRecvd; } } cleanup: if ( NULL != SocketContext ) DerefSocketContext( SocketContext, lpErrno ); return ret; } Thank you

    Read the article

  • How do you handle EF Data Contexts combined with asp.net custom membership/role providers

    - by KallDrexx
    I can't seem to get my head around how to implement a custom membership provider with Entity Framework data contexts into my asp.net MVC application. I understand how to create a custom membership/role provider by itself (using this as a reference). Here's my current setup: As of now I have a repository factory interface that allows different repository factories to be created (right now I only have a factory for EF repositories and and in memory repositories). The repository factory looks like this: public class EFRepositoryFactory : IRepositoryFactory { private EntitiesContainer _entitiesContext; /// <summary> /// Constructor that generates the necessary object contexts /// </summary> public EFRepositoryFactory() { _entitiesContext = new EntitiesContainer(); } /// <summary> /// Generates a new entity framework repository for the specified entity type /// </summary> /// <typeparam name="T">Type of entity to generate a repository for </typeparam> /// <returns>Returns an EFRepository</returns> public IRepository<T> GenerateRepository<T>() where T : class { return new EFRepository<T>(_entitiesContext); } } Controllers are passed an EF repository factory via castle Windsor. The controller then creates all the service/business layer objects it requires and passes in the repository factory into it. This means that all service objects are using the same EF data contexts and I do not have to worry about objects being used in more than one data context (which of course is not allowed and causes an exception). As of right now I am trying to decide how to generate my user and authorization service layers, and have run against a design roadblock. The User/Authization service will be a central class that handles the logic for logging in, changing user details, managing roles and determining what users have access to what. The problem is, using the current methodology the asp.net mvc controllers will initialize it's own EF repository factory via Windsor and the asp.net membership/role provider will have to initialize it's own EF repository factory. This means that each part of the site will then have it's own data context. This seems to mean that if asp.net authenticates a user, that user's object will be in the membership provider's data context and thus if I try to retrieve that user object in the service layer (say to change the user's name) I will get a duplication exception. I thought of making the repository factory class a singleton, but I don't see a way for that to work with castle Windsor. How do other people handle asp.net custom providers in a MVC (or any n-tier) architecture without having object duplication issues?

    Read the article

  • SQL Server backward compatibility in Entity Framework?

    - by shake
    Is there any backward compatibility in the entity framework between SQL Server 2008 and 2005? It seems the framework forces you to use the same provider for all the .edmx files in a solution. If you use the 2008 provider, data types like DateTime2 and functions like SysDateTime that are emitted by the framework to the underlying SQL query make it useless to use them against a SQL 2005 Server. Any way around this?

    Read the article

  • Data access pattern, combining push and pull?

    - by andlju
    I need some advice on what kind of pattern(s) I should use for pushing/pulling data into my application. I'm writing a rule-engine that needs to hold quite a large amount of data in-memory in order to be efficient enough. I have some rather conflicting requirements; It is not acceptable for the engine to always have to wait for a full pre-load of all data before it is functional. Only fetching and caching data on-demand will lead to the engine taking too long before it is running quickly enough. An external event can trigger the need for specific parts of the data to be reloaded. Basically, I think I need a combination of pushing and pulling data into the application. A simplified version of my current "pattern" looks like this (in psuedo-C# written in notepad): // This interface is implemented by all classes that needs the data interface IDataSubscriber { void RegisterData(Entity data); } // This interface is implemented by the data access class interface IDataProvider { void EnsureLoaded(Key dataKey); void RegisterSubscriber(IDataSubscriber subscriber); } class MyClassThatNeedsData : IDataSubscriber { IDataProvider _provider; MyClassThatNeedsData(IDataProvider provider) { _provider = provider; _provider.RegisterSubscriber(this); } public void RegisterData(Entity data) { // Save data for later StoreDataInCache(data); } void UseData(Key key) { // Make sure that the data has been stored in cache _provider.EnsureLoaded(key); Entity data = GetDataFromCache(key); } } class MyDataProvider : IDataProvider { List<IDataSubscriber> _subscribers; // Make sure that the data for key has been loaded to all subscribers public void EnsureLoaded(Key key) { if (HasKeyBeenMarkedAsLoaded(key)) return; PublishDataToSubscribers(key); MarkKeyAsLoaded(key); } // Force all subscribers to get a new version of the data for key public void ForceReload(Key key) { PublishDataToSubscribers(key); MarkKeyAsLoaded(key); } void PublishDataToSubscribers(Key key) { Entity data = FetchDataFromStore(key); foreach(var subscriber in _subscribers) { subscriber.RegisterData(data); } } } // This class will be spun off on startup and should make sure that all data is // preloaded as quickly as possible class MyPreloadingThread { IDataProvider _provider; MyPreloadingThread(IDataProvider provider) { _provider = provider; } void RunInBackground() { IEnumerable<Key> allKeys = GetAllKeys(); foreach(var key in allKeys) { _provider.EnsureLoaded(key); } } } I have a feeling though that this is not necessarily the best way of doing this.. Just the fact that explaining it seems to take two pages feels like an indication.. Any ideas? Any patterns out there I should have a look at?

    Read the article

  • How to use EntityFramework connection string for Elmah?

    - by Andrii Kovalchuk
    In ELMAH for logging errors to the database you can write: <errorLog type="Elmah.SqlErrorLog, Elmah" connectionStringName="EducoparkEntities"/> However, if I use EntityFramework, this doesn't work because the connection string for EF contains metadata as well: <add name="EducoparkEntities" connectionString="metadata=res://*/EducoparkData.csdl|res://*/EducoparkData.ssdl|res://*/EducoparkData.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=(Local);Initial Catalog=...;User Id=...;Password=...;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient"/> So, how can I use the EntityFramework connection string in Elmah?

    Read the article

  • users see my SMS messages as coming from '1010100001'

    - by John Leonard
    In my application, I ask the user to enter their cell and select their provider. I append the provider's email and create the message and fire via php.mail() The problem is that no matter what the header info is, the message comes from '1010100001' on some phones (like AT&T and the iPhone). When testing on my Verizon phone, I get the proper email address as the sender. Any idea how I can send a clearer message?

    Read the article

  • How do I add install my own LocationProvider?

    - by gregm
    I would like to create my own implementation of a LocationProvider, there seems to be a way to add a "mock" provider, but that isn't exactly what I want. http://developer.android.com/reference/android/location/LocationManager.html There also appears to be a permission called: android.permission.INSTALL_LOCATION_PROVIDER But there is no documentation about how to use this permission. How do I register a new location provider?

    Read the article

  • XPath query returning 'false' in SimpleXML

    - by Drew
    Hi all, I have an xml fragment as such: <meta_tree type="root"> <meta_data> <meta_cat>Content Provider</meta_cat> <data>Mammoth</data> </meta_data> <meta_data> <meta_cat>Genre</meta_cat> <data>Games</data> </meta_data> <meta_data> <meta_cat>Channel Name</meta_cat> <data>Games Trailers</data> </meta_data> <meta_data> <meta_cat>Collection</meta_cat> <data>Strategy</data> </meta_data> <meta_data> <meta_cat>Custom 1</meta_cat> <data>PC</data> </meta_data> <meta_data> <meta_cat>DRM Protected</meta_cat> <data>N</data> </meta_data> <meta_data> <meta_cat>Aspect Ratio</meta_cat> <data>16:9</data> </meta_data> <meta_data> <meta_cat>Streaming Type</meta_cat> <data>VOD</data> </meta_data> </meta_tree> which I garnered from the snippet of $meta_tree->asXML(). So given that, I need to have an xpath query for each element, so I'm using: $meta_tree->xpath("/meta_data[meta_cat='Content Provider']"); but this returns false. I have tried: "/meta_tree/meta_data[meta_cat='Content Provider']" "//meta_data[meta_cat='Content Provider']" I've been using AquaPath, which validates my query, so I'm not sure what I'm doing wrong. Anyone got any ideas? DJS.

    Read the article

  • IP address numbers in MySQL subquery

    - by Iain Collins
    I have a problem with a subquery involving IPV4 addresses stored in MySQL (MySQL 5.0). The IP addresses are stored in two tables, both in network number format - e.g. the format output by MySQL's INET_ATON(). The first table ('events') contains lots of rows with IP addresses associated with them, the second table ('network_providers') contains a list of provider information for given netblocks. events table (~4,000,000 rows): event_id (int) event_name (varchar) ip_address (unsigned 4 byte int) network_providers table (~60,000 rows): ip_start (unsigned 4 byte int) ip_end (unsigned 4 byte int) provider_name (varchar) Simplified for the purposes of the problem I'm having, the goal is to create an export along the lines of: event_id,event_name,ip_address,provider_name If do a query along the lines of either of the following, I get the result I expect: SELECT provider_name FROM network_providers WHERE INET_ATON('192.168.0.1') >= network_providers.ip_start ORDER BY network_providers.ip_start DESC LIMIT 1 SELECT provider_name FROM network_providers WHERE 3232235521 >= network_providers.ip_start ORDER BY network_providers.ip_start DESC LIMIT 1 That is to say, it returns the correct provider_name for whatever IP I look up (of course I'm not really using 192.168.0.1 in my queries). However, when performing this same query as a subquery, in the following manner, it doesn't yield the result I would expect: SELECT event.id, event.event_name, (SELECT provider_name FROM network_providers WHERE event.ip_address >= network_providers.ip_start ORDER BY network_providers.ip_start DESC LIMIT 1) as provider FROM events Instead the a different (incorrect) value for network_provider is returned - over 90% (but curiously not all) values returned in the provider column contain the wrong provider information for that IP. Using event.ip_address in a subquery just to echo out the value confirms it contains the value I'd expect and that the subquery can parse it. Replacing event.ip_address with an actual network number also works, just using it dynamically in the subquery in this manner that doesn't work for me. I suspect the problem is there is something fundamental and important about subqueries in MySQL that I don't get. I've worked with IP addresses like this in MySQL quite a bit before, but haven't previously done lookups for them using a subquery. The question: I'd really appreciate an example of how I could get the output I want, and if someone here knows, some enlightenment as to why what I'm doing doesn't work so I can avoid making this mistake again. Notes: The actual real-world usage I'm trying to do is considerably more complicated (involving joining two or three tables). This is a simplified version, to avoid overly complicating the question. Additionally, I know I'm not using a between on ip_start & ip_end - that's intentional (the DB's can be out of date, and such cases the owner in the DB is almost always in the next specified range and 'best guess' is fine in this context) however I'm grateful for any suggestions for improvement that relate to the question. Efficiency is always nice, but in this case absolutely not essential - any help appreciated.

    Read the article

  • Error in ASP.Net program

    - by megala
    Hi i created one project in ASP.Net using SQL Server 2005.In that I got test connection succeed came but i got the following Error in coding .How to solve this Error message is Connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (Provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

    Read the article

  • Why does WebSharingAppDemo-CEProviderEndToEnd sample still need a client db connection after scope c

    - by Don
    I'm researching a way to build an n-tierd sync solution. From the WebSharingAppDemo-CEProviderEndToEnd sample it seems almost feasable however for some reason, the app will only sync if the client has a live SQL db connection. Can some one explain what I'm missing and how to sync without exposing SQL to the internet? The problem I'm experiencing is that when I provide a Relational sync provider that has an open SQL connection from the client, then it works fine but when I provide a Relational sync provider that has a closed but configured connection string, as in the example, I get an error from the WCF stating that the server did not receive the batch file. So what am I doing wrong? SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(); builder.DataSource = hostName; builder.IntegratedSecurity = true; builder.InitialCatalog = "mydbname"; builder.ConnectTimeout = 1; provider.Connection = new SqlConnection(builder.ToString()); // provider.Connection.Open(); **** un-commenting this causes the code to work** //create anew scope description and add the appropriate tables to this scope DbSyncScopeDescription scopeDesc = new DbSyncScopeDescription(SyncUtils.ScopeName); //class to be used to provision the scope defined above SqlSyncScopeProvisioning serverConfig = new SqlSyncScopeProvisioning(); .... The error I get occurs in this part of the WCF code: public SyncSessionStatistics ApplyChanges(ConflictResolutionPolicy resolutionPolicy, ChangeBatch sourceChanges, object changeData) { Log("ProcessChangeBatch: {0}", this.peerProvider.Connection.ConnectionString); DbSyncContext dataRetriever = changeData as DbSyncContext; if (dataRetriever != null && dataRetriever.IsDataBatched) { string remotePeerId = dataRetriever.MadeWithKnowledge.ReplicaId.ToString(); //Data is batched. The client should have uploaded this file to us prior to calling ApplyChanges. //So look for it. //The Id would be the DbSyncContext.BatchFileName which is just the batch file name without the complete path string localBatchFileName = null; if (!this.batchIdToFileMapper.TryGetValue(dataRetriever.BatchFileName, out localBatchFileName)) { //Service has not received this file. Throw exception throw new FaultException<WebSyncFaultException>(new WebSyncFaultException("No batch file uploaded for id " + dataRetriever.BatchFileName, null)); } dataRetriever.BatchFileName = localBatchFileName; } Any ideas?

    Read the article

  • What is the best credit card processing service?

    - by JerSchneid
    We're looking to add credit card payments to our system (and it needs to be fairly custom, handling variable "per use" charges each month). We would like the integration to be simple and secure (i.e. no storing of credit card data on our system). What, in your opinion, is the best credit card processing provider to offer this kind of security and flexibility. List only one provider per answer to let the voting system do it's thing.

    Read the article

  • What does the MVC Controller.UpdateModel<T>(T) actually try to do?

    - by unanswered
    When I submit my MVC Page I get an IvalidOperationException from System.Web.Mvc Controller object in the UpdateModel method. the MSDN documentation states that this method does the following: Updates the specified model instance using values from the controller's current value provider. Is the value provider referencing the current Request object? Or where exactly does it get the values that it is using to update the model? And what specifically does the UpdateModel method check and what does it 'mean' when it says that The model of type 'abcXYZ' was not successfully updated Thanks

    Read the article

  • How to read contacts on Android 2.0

    - by appme up
    Hi. I'm working on Android 2.0 and am trying to receive a list of all contacts. Since android.provider.Contacts.People is deprecated, I have to use android.provider.ContactsContract, But I can't find a proper example of how to use it (ex: retrieve a list of all contacts on the phonebook). Anyone knows how to implement it? Thanks!

    Read the article

  • How To Add Custom ModelValidatorProviders To Web API Project?

    - by Mark S.
    I'm moving some MVC code to Web API and I need to update my custom ModelValidatorProviders. It seems as though my validators can stay much the same only they should inherit the System.Web.Http.Validation namespace. What I can't figure out is how to add the provider to Web API. When using MVC I can just add the following to my global.asax: ModelValidatorProviders.Providers.Add(new CustomModelValidatorProvider()); How do I use the custom provider with Web API?

    Read the article

  • User controls Stopped working after Migration from 3.7 to 5.2

    - by user1400290
    I recently Migrated my 3.7 sp4 project to 5.2, but I had issues while doing so. Currently, my user controls are not working after migration in 5.2 project. Below is the code: User Control Code: <%@ Control Language="C#" AutoEventWireup="true" CodeFile="SiteMenu.ascx.cs" Inherits="UserControls_Nav_SiteMenu" %> <%@ Register TagPrefix="telerik" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %> <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="false" /> <telerik:RadMenu ID="RadMenu1" runat="server" DataSourceID="SitemapDataSource1" OnItemDataBound="RadMenu1_ItemDataBound"> </telerik:RadMenu> User Control's Class code: using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.ComponentModel; using System.Drawing; using Telerik; using Telerik.Cms; using Telerik.Cms.Web; using Telerik.Web.UI; using Telerik.Caching; using Telerik.Cms.Web.UI; [DefaultProperty("StartingNodeOffset")] public partial class UserControls_Nav_SiteMenu : System.Web.UI.UserControl, ICacheableObject { protected void Page_Load(object sender, EventArgs e) { } protected override void Render(HtmlTextWriter writer) { // Checks if this is called by the Search Indexer and does not render anything if so. // Navigation controls are present in every page and should NOT be indexed multiple times. if (!CmsContext.IsRequestCrawler(this.Context)) base.Render(writer); } #region Data Fields private bool hideUrlForGroupPages = false; private string selectedItemCssClass = "selectedItem"; #endregion #region Properties [Browsable(true)] [Category("Behavior")] public int LastExpandLevel { get { if (this.RadMenu1.MaxDataBindDepth < 0) return 0; return this.RadMenu1.MaxDataBindDepth; } set { if (value == 0) this.RadMenu1.MaxDataBindDepth = -1; else this.RadMenu1.MaxDataBindDepth = value; } } [Browsable(true)] [Category("Behavior")] public int ExpandDelay { get { return this.RadMenu1.ExpandDelay; } set { this.RadMenu1.ExpandDelay = value; } } [Browsable(true)] [Category("Behavior")] public bool ClickToOpen { get { return this.RadMenu1.ClickToOpen; } set { this.RadMenu1.ClickToOpen = value; } } [Browsable(true)] [Category("Behavior")] [DefaultValue(false)] public bool HideUrlForGroupPages { get { return this.hideUrlForGroupPages; } set { this.hideUrlForGroupPages = value; } } [Browsable(true)] [Category("Appearance")] public string SelectedItemCssClass { get { return this.selectedItemCssClass; } set { this.selectedItemCssClass = value; } } [Browsable(true)] [Category("Appearance")] public string CssClass { get { return this.RadMenu1.CssClass; } set { this.RadMenu1.CssClass = value; } } [Browsable(true)] public RadMenu Menu { get { return this.RadMenu1; } set { this.RadMenu1 = value; } } [Browsable(true)] [Category("Navigation")] public int StartingNodeOffset { get { return this.SiteMapDataSource1.StartingNodeOffset; } set { this.SiteMapDataSource1.StartingNodeOffset = value; } } [WebEditor("Telerik.Cms.Web.UI.UrlEditorWrapper, Telerik.Cms")] [Browsable(true)] [Category("Navigation")] public string StartingNodeUrl { get { return this.SiteMapDataSource1.StartingNodeUrl; } set { this.SiteMapDataSource1.StartingNodeUrl = value; } } [Browsable(true)] [Category("Navigation")] public bool StartFromCurrentNode { get { return this.SiteMapDataSource1.StartFromCurrentNode; } set { this.SiteMapDataSource1.StartFromCurrentNode = value; } } [Browsable(true)] [Category("Navigation")] public bool ShowStartingNode { get { return this.SiteMapDataSource1.ShowStartingNode; } set { this.SiteMapDataSource1.ShowStartingNode = value; } } /// <summary>(Exposed from contained RadMenu.)</summary> [Browsable(true)] [Category("Appearance")] public string SkinID { get { return this.RadMenu1.SkinID; } set { this.RadMenu1.SkinID = value; } } [Browsable(true)] [Category("Appearance")] public string Skin { get { return this.RadMenu1.Skin; } set { this.RadMenu1.Skin = value; } } #endregion #region Methods public void RadMenu1_ItemDataBound(object sender, RadMenuEventArgs e) { CmsSiteMapNode node = e.Item.DataItem as CmsSiteMapNode; if (this.hideUrlForGroupPages) { if (node != null) { // save the PageID in the attributes of the menu item e.Item.Attributes.Add("PageID", node.Key); if (node.PageType == CmsPageType.Group) { e.Item.NavigateUrl = ""; } } } if (node.CmsPage != null) { if (node.CmsPage.PageType == CmsPageType.External) { e.Item.Target = "_blank"; } } } #endregion #region ICacheableObject Members public System.Web.Caching.CacheDependency[] GetDependencies() { CmsSiteMapProvider provider = null; if (!String.IsNullOrEmpty(this.SiteMapDataSource1.SiteMapProvider)) provider = SiteMap.Providers[this.SiteMapDataSource1.SiteMapProvider] as CmsSiteMapProvider; else provider = SiteMap.Provider as CmsSiteMapProvider; if (provider != null) { return new System.Web.Caching.CacheDependency[]{ provider.CloneCacheDependency()}; } return null; } #endregion } When I edit the Template(in Admin mode), the following error is displayed in control location: Both DataSource and DataSourceID are defined on 'RadMenu1'. Remove one definition. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: Both DataSource and DataSourceID are defined on 'RadMenu1'. Remove one definition. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [InvalidOperationException: Both DataSource and DataSourceID are defined on 'RadMenu1'. Remove one definition.] System.Web.UI.WebControls.DataBoundControl.ConnectToDataSourceView() +3234866 System.Web.UI.WebControls.DataBoundControl.OnLoad(EventArgs e) +28 System.Web.UI.Control.LoadRecursive() +71 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.AddedControl(Control control, Int32 index) +11422584 System.Web.UI.Control.EnsureChildControls() +182 System.Web.UI.Control.PreRenderRecursiveInternal() +60 System.Web.UI.Control.PreRenderRecursiveInternal() +222 System.Web.UI.Control.PreRenderRecursiveInternal() +222 System.Web.UI.Control.PreRenderRecursiveInternal() +222 System.Web.UI.Control.PreRenderRecursiveInternal() +222 System.Web.UI.Control.PreRenderRecursiveInternal() +222 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4201 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272 but I searched in my code as you can see above there's only DataSourceID is defined. What should I do? Thanks

    Read the article

  • Authenticating against a web-service.

    - by Sash
    Did anyone try using a web-service for authentication and at the same time use the web-service as a provider model pattern? Basically, I want to use provider model with authentication against a data-source via a web-service !!! Thanks, Sashidhar Kokku

    Read the article

  • Missing part of the image when taking screenshot while supporting Retina Display

    - by Spaft
    I'm currently working on enabling support for retina display for my game. In the game, we have a feature that the user can take screenshot. We are using these part of code we found online a while ago and it's working fine when we are not supporting retina display: CCDirector* director = [CCDirector sharedDirector]; CGSize size = [director winSizeInPixels]; //Create buffer for pixels GLuint bufferLength = size.width * size.height * 4; GLubyte* buffer = (GLubyte*)malloc(bufferLength); //Read Pixels from OpenGL glReadPixels(0, 100, size.width, size.height, GL_RGBA, GL_UNSIGNED_BYTE, buffer); //Make data provider with data. CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, buffer, bufferLength, NULL); //Configure image int bitsPerComponent = 8; int bitsPerPixel = 32; int bytesPerRow = 4 * size.width; CGColorSpaceRef colorSpaceRef = CGColorSpaceCreateDeviceRGB(); CGBitmapInfo bitmapInfo = kCGBitmapByteOrderDefault; CGColorRenderingIntent renderingIntent = kCGRenderingIntentDefault; CGImageRef iref = CGImageCreate(size.width, size.height, bitsPerComponent, bitsPerPixel, bytesPerRow, colorSpaceRef, bitmapInfo, provider, NULL, NO, renderingIntent); uint32_t* pixels = (uint32_t*)malloc(bufferLength); CGContextRef context = CGBitmapContextCreate(pixels, size.width, size.height, 8, size.width * 4, CGImageGetColorSpace(iref), kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big); CGContextTranslateCTM(context, 0, size.height); CGContextScaleCTM(context, 1.0f, -1.0f); switch (director.deviceOrientation) { case CCDeviceOrientationPortrait: break; case CCDeviceOrientationPortraitUpsideDown: CGContextRotateCTM(context, CC_DEGREES_TO_RADIANS(180)); CGContextTranslateCTM(context, -size.width, -size.height); break; case CCDeviceOrientationLandscapeLeft: CGContextRotateCTM(context, CC_DEGREES_TO_RADIANS(-90)); CGContextTranslateCTM(context, -size.width, 0); break; case CCDeviceOrientationLandscapeRight: CGContextRotateCTM(context, CC_DEGREES_TO_RADIANS(90)); CGContextTranslateCTM(context, size.width * 0.5f, -size.height); break; } CGContextDrawImage(context, CGRectMake(0.0f, 0.0f, size.width, size.height), iref); UIImage *outputImage = [UIImage imageWithCGImage:CGBitmapContextCreateImage(context)]; //Dealloc CGDataProviderRelease(provider); CGImageRelease(iref); CGContextRelease(context); free(buffer); free(pixels); return outputImage; But when we enabled retina display in cocos 0.99.5. This functionality is a little messed up since it will miss a little left part of the image while the high is still correct. So I'm wondering if there is anything wrong with the code or am I doing anything wrong here? Thank you in advance for any reply!

    Read the article

  • Can't create/write to file (Errcode: 22)

    - by magdmartin
    Quite new with SQL I'm looking to export some data from a MySQL database into a csv file. I'm working locally (localhost). Here is my SQL statement: SELECT DISTINCT * INTO OUTFILE 'C:\Users\Martin\Downloads\result.csv' FROM provider, location, provider_has_location WHERE provider.idprovider = provider_has_location.provider_idprovider AND location.idLocation = provider_has_location.location_idLocation LIMIT 20 MySQL return the following error: Can't create/write to file 'C:UsersMartinDownloads esult.csv' (Errcode: 22) Thanks for your help.

    Read the article

  • PC: Quick Freeze, then BSOD, then forced reboot, then freezes again

    - by cr0z3r
    Lately I have been experiencing a weird issue. My PC will hang for a second and then BSOD - it stays there, so I have to reboot. Once Windows starts again and I'm logged in, after 1-10min it freezes again, this time without BSOD. RECAP: 1 second freeze BSOD, hangs there I have to force-reboot Once PC rebooted, I log back into Windows second freeze between a 1-10min range, no BSOD (alternatively, I get a freeze with a constant sound/noise, no BSOD) I contacted my PC provider, who told me my graphics-card might be flawed (Quadro 4000), so I used a Quadro 2000 that they lend me. The issue still occurred. The issue now seemed to belong to a flawed RAM module. Following my provider's steps, I removed all but the first from the left column and kept using my PC for a week or so without any issues. I then added the bottom-right module, and so on, until all modules were back inside - I had no problems. Now it seemed that a simple take-out-put-back-in of the RAM modules had fixed the issue. However, after a few months, the issue was back. I redid all the RAM-swapping I had done before, and concluded that the lower-right module was flawed. My provider changed it for another, and everything was great until now. My PC froze again for barely a second, hanged on a BSOD, I rebooted it, logged-in to Windows to get a freeze (without BSOD or reboot) 40 seconds later. Something worth noting, is that every time I reboot after the BSOD, it is something within Chrome that freezes my PC (e.g. this time I clicked the "restore" button as Chrome mentioned it had exited unexpectedly - from the previous freeze obviously - and it instantly froze). Finally, the Event Viewer lists 2 critical events in the past hour as "ID: 41, Type: Kernel-Power". PC-Specs: http://i.imgur.com/VZpbr.jpg Previous Dump-files: https://dl.dropbox.com/u/716600/DumpFiles_08_2012.zip I would like to thank anybody in advance for your help. You're great. UPDATE 1: I realized that I did not mention an awkward fact about this issue. After I have gotten the 1-sec freeze followed by a BSOD, after I rebooted because the BSOD hanged, and after I logged back in to get another (this time, eternal) freeze and rebooted once again, the PC does not boot back up. The power-light is on, but my monitor says "no signal", as if the PC wouldn't really be turned on. This truly seems a like a power-related issue, doesn't it? UPDATE 2: I just got a freeze, but without BSOD. My screen froze (while on Chrome, which is starting to seem suspicious to me) with an ongoing sound/noise. I had to force-reboot my PC. I would say this is a graphics-card issue, but this issue also happened when I was using the Quadro 2000 from my provider. UPDATE 3: I just got a BSOD while trying to render something (quite heavy, actually) in 3ds Max 2012. I left the BSOD "running", as it said it was writing dump files to disk. However, the percentage number stayed at 0, so after 15 minutes I force-rebooted. I then used the software WhoCrashed (thank you Dave) which reported the following from the C:\Windows\Memory.dmp file: On Thu 22.11.2012 22:13:45 GMT your computer crashed crash dump file: C:\Windows\memory.dmp uptime: 01:05:27 This was probably caused by the following module: Unknown () Bugcheck code: 0x124 (0x0, 0xFFFFFA80275AC028, 0xF200001F, 0x100B2) Error: WHEA_UNCORRECTABLE_ERROR Bug check description: This bug check indicates that a fatal hardware error has occurred. This bug check uses the error data that is provided by the Windows Hardware Error Architecture (WHEA). This is likely to be caused by a hardware problem problem. This problem might be caused by a thermal issue. A third party driver was identified as the probable root cause of this system error. It is suggested you look for an update for the following driver: Unknown . Google query: Unknown WHEA_UNCORRECTABLE_ERROR

    Read the article

  • Troubleshooting unwanted NTP Traffic

    - by Jaxaeon
    A domain controller running Windows Server 2012 is sending NTP and NETBIOS traffic to an address that has never been configured as a time provider. The server logs give no indication that any NTP traffic is failing. The only place I see any evidence of this traffic is in pfSense system logs: (Blocked) Jun 9 08:48:50 DOMAIN 10.0.1.100:123 192.128.127.254:123 UDP (Blocked) Jun 9 08:48:53 DOMAIN 10.0.1.100:137 192.128.127.254:137 UDP As far as I can tell the NTP service is working normally otherwise: DC2.domain.com[10.0.1.101:123]: ICMP: 0ms delay NTP: -0.0131705s offset from DC1.domain.com RefID: DC1.domain.com [10.0.1.100] Stratum: 3 DC1.domain.com *** PDC ***[10.0.1.100:123]: ICMP: 0ms delay NTP: +0.0000000s offset from DC1.domain.com RefID: clock1.albyny.inoc.net [64.246.132.14] Stratum: 2 The time provider NtpClient is currently receiving valid time data from 1.pool.ntp.org,0×1 (ntp.m|0x0|0.0.0.0:123->204.2.134.163:123). The time provider NtpClient is currently receiving valid time data from 0.pool.ntp.org,0×1 (ntp.m|0x0|0.0.0.0:123->64.246.132.14:123). The time service is now synchronizing the system time with the time source 0.pool.ntp.org,0×1 (ntp.m|0x0|0.0.0.0:123->64.246.132.14:123). I've been inside and out of the NTP configuration and cannot find any reason for this traffic. Reverse DNS points the destination address to nothing.attdns.com. pinging nothing.attdns.com from the domain controller in question leads to a response from loopback (127.0.0.2) which makes my head hurt. Any ideas? EDIT1: It should probably be noted that after a dns flush, nslookup 192.128.127.254 returns nothing.attdns.com. 192.128.127.254 is not present in domain.com DNS records. The attdns.com domain is not present in cached lookups. 127.in-addr.arpa is clean of any funkyness. EDIT2: The loopback ping response from nothing.attdns.com is possibly unrelated. Machines on other networks are also displaying this behavior. EDIT3: As mentioned in the comments, I tracked the problem network adapter back to my pfSense VM hosted in esxi 5.5 (I know shame on me for virtualizing a firewall). pfSense was configured to use DC1.domain.com as its primary time provider, but upon changing it back to pool.ntp.org the problem persists. pfSense logs give no indication of NTP misconfiguration. Everywhere I can think to look this VM is identified as 10.0.1.253, so I still have no idea why it’s sending NTP requests as 192.128… Since this firewall was a temporary solution to a problem that no longer exists so I am going to decommission it. EDIT4: The queries were coming from another machine sharing the same virtual adapter as the firewall. The machine has two local adapters: one for LAN, and the other for attached hardware that uses an Ethernet connection. That hardware sits in the the mystery subnet, and the machine is broadcasting NTP requests over both adapters.

    Read the article

< Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >