Search Results

Search found 99 results on 4 pages for 'niall collins'.

Page 2/4 | < Previous Page | 1 2 3 4  | Next Page >

  • MySql Check if NOW() falls within a weekday/time range

    - by Niall
    I have a table as follows: CREATE TABLE `zonetimes` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `zone_id` int(10) unsigned NOT NULL, `active_from_day` tinyint(1) unsigned NOT NULL DEFAULT '2', `active_to_day` tinyint(1) unsigned NOT NULL DEFAULT '2', `active_from` time NOT NULL, `active_to` time NOT NULL PRIMARY KEY (`id`) ) ENGINE=MyISAM ; So, a user could add a time entry starting on a particular day and time and ending on a particular day and time, eg: Between Monday 08:00 and Friday 18:00 or Between Thursday 15:00 and Tuesday 15:00 (Note the crossover at the end of the week). I need to query this data and determine if a zone is currently active (NOW(), DAYOFWEEK() etc)... This is turning out to be quite tricky. If I didn't have overlaps, eg: from 'Wednesday 8pm to Tuesday 4am' or from 'Thursday 4pm to Tuesday 4pm' this would be easy with BETWEEN. Also, need to allow a user to add for the entire week, eg: Monday 8am - Monday 8am (This should be easy enough, eg: where (active_from_day=active_to_day AND active_from=active_to) OR .. Any ideas? Note: I found a similar question here Timespan - Check for weekday and time of day in mysql but it didn't get an answer. One of the suggestions was to store each day as a separate row. I would much rather store one time span for multiple days though.

    Read the article

  • Can't add client machine to windows server 2008 domain controller

    - by Patrick J Collins
    A bit of background before I dive into the gritty details: I have a single server running Windows 2003 Server where I host my ASP.net website and SQL Server + Reports. I've been creating ordinary windows user accounts to authenticate my users, and I enabled integrated windows authentication with impersonation. I've set up a bunch of user groups which correspond to certain roles (admin, power user, normal user, etc) and I test membership to enable or disable certain features. Overall, I'm pretty happy with the solution, it was quick to setup and I don't have to worry about messing around storing passwords and whatnot. Well, what I'm trying to do now is set up a new environment with 3 servers (Web, SQL, Reports) and I'd like these three servers to share common user accounts. I understand that I could add these three machines to a domain, which means installing Active Directory on one of the machines. I am barking up the wrong tree here? Would you suggest an alternative configuration? Assuming that I stick with AD, I have a couple of questions regarding DNS. To be honest, I'd rather not fiddle around with the DNS settings because my ISP already has their own DNS server which works just fine. It would appear however that DNS and AD are intertwined. Firstly, if I am to create a new domain in called mycompany.net, do I actually need to be the registered owner of that domain name and ensure the DNS entry points to the IP address of the machine hosting AD? Secondly, for the two other machines that I am trying to add to the domain, do I need to fiddle with their DNS settings? I've tried setting the preferred DNS Server IP address to that of my newly installed AD, but no luck. At this point, I can't add the two other machines to the domain. Here are some diagnostics that I have run based on a few suggestions I read on forums (sorry they're in French, although I could translate if needed). I ran nltest, which seems to indicate that the client can discover the domain controller. When I run dcdiag, the call to DsGetDcName fails with error 1722, not really sure what that means. Any suggestions? Thanks! C:\Users\Administrator>nltest /dsgetdc:mycompany.net Contrôleur de domaine : \\REPORTS.mycompany.net Adresse : \\111.111.111.111 GUID dom : 3333a4ec-ca56-4f02-bb9e-76c29c6c3832 Nom dom : mycompany.net Nom de la forêt : mycompany.net Nom de site du contrôleur de domaine : Default-First-Site-Name Nom de notre site : Default-First-Site-Name Indicateurs : PDC GC DS LDAP KDC TIMESERV WRITABLE DNS_DC DNS_DOMAIN DNS _FOREST CLOSE_SITE FULL_SECRET La commande a été correctement exécutée C:\Users\Administrator>dcdiag /s:mycompany.net /u: mycompany.net \pcollins /p:somepass Diagnostic du serveur d'annuaire Exécution de l'installation initiale : * Forêt AD identifiée. Collecte des informations initiales terminée. Exécution des tests initiaux nécessaires Test du serveur : Default-First-Site-Name\REPORTS Démarrage du test : Connectivity ......................... Le test Connectivity de REPORTS a réussi Exécution des tests principaux Test du serveur : Default-First-Site-Name\REPORTS Démarrage du test : Advertising Erreur irrécupérable : l'appel DsGetDcName (REPORTS) a échoué ; erreur 1722 Le localisateur n'a pas pu trouver le serveur. ......................... Le test Advertising de REPORTS a échoué Démarrage du test : FrsEvent Impossible d'interroger le journal des événements File Replication Service sur le serveur REPORTS.mycompany.net. Erreur 0x6ba « Le serveur RPC n'est pas disponible. » ......................... Le test FrsEvent de REPORTS a échoué Démarrage du test : DFSREvent Impossible d'interroger le journal des événements DFS Replication sur le serveur REPORTS.mycompany.net. Erreur 0x6ba « Le serveur RPC n'est pas disponible. » ......................... Le test DFSREvent de REPORTS a échoué Démarrage du test : SysVolCheck [REPORTS] Une opération net use ou LsaPolicy a échoué avec l'erreur 53, Le chemin réseau n'a pas été trouvé.. ......................... Le test SysVolCheck de REPORTS a échoué Démarrage du test : KccEvent Impossible d'interroger le journal des événements Directory Service sur le serveur REPORTS.mycompany.net. Erreur 0x6ba « Le serveur RPC n'est pas disponible. » ......................... Le test KccEvent de REPORTS a échoué Démarrage du test : KnowsOfRoleHolders ......................... Le test KnowsOfRoleHolders de REPORTS a réussi Démarrage du test : MachineAccount Impossible d'ouvrir le canal avec [REPORTS] : échec avec l'erreur 53 : Le chemin réseau n'a pas été trouvé. Impossible d'obtenir le nom de domaine NetBIOS Échec : impossible de tester le nom principal de service (SPN) HOST Échec : impossible de tester le nom principal de service (SPN) HOST ......................... Le test MachineAccount de REPORTS a réussi Démarrage du test : NCSecDesc ......................... Le test NCSecDesc de REPORTS a réussi Démarrage du test : NetLogons [REPORTS] Une opération net use ou LsaPolicy a échoué avec l'erreur 53, Le chemin réseau n'a pas été trouvé.. ......................... Le test NetLogons de REPORTS a échoué Démarrage du test : ObjectsReplicated ......................... Le test ObjectsReplicated de REPORTS a réussi Démarrage du test : Replications ......................... Le test Replications de REPORTS a réussi Démarrage du test : RidManager ......................... Le test RidManager de REPORTS a réussi Démarrage du test : Services Impossible d'ouvrir IPC distant à [REPORTS.mycompany.net] : erreur 0x35 « Le chemin réseau n'a pas été trouvé. » ......................... Le test Services de REPORTS a échoué Démarrage du test : SystemLog Impossible d'interroger le journal des événements System sur le serveur REPORTS.mycompany.net. Erreur 0x6ba « Le serveur RPC n'est pas disponible. » ......................... Le test SystemLog de REPORTS a échoué Démarrage du test : VerifyReferences ......................... Le test VerifyReferences de REPORTS a réussi Exécution de tests de partitions sur ForestDnsZones Démarrage du test : CheckSDRefDom ......................... Le test CheckSDRefDom de ForestDnsZones a réussi Démarrage du test : CrossRefValidation ......................... Le test CrossRefValidation de ForestDnsZones a réussi Exécution de tests de partitions sur DomainDnsZones Démarrage du test : CheckSDRefDom ......................... Le test CheckSDRefDom de DomainDnsZones a réussi Démarrage du test : CrossRefValidation ......................... Le test CrossRefValidation de DomainDnsZones a réussi Exécution de tests de partitions sur Schema Démarrage du test : CheckSDRefDom ......................... Le test CheckSDRefDom de Schema a réussi Démarrage du test : CrossRefValidation ......................... Le test CrossRefValidation de Schema a réussi Exécution de tests de partitions sur Configuration Démarrage du test : CheckSDRefDom ......................... Le test CheckSDRefDom de Configuration a réussi Démarrage du test : CrossRefValidation ......................... Le test CrossRefValidation de Configuration a réussi Exécution de tests de partitions sur mycompany Démarrage du test : CheckSDRefDom ......................... Le test CheckSDRefDom de mycompany a réussi Démarrage du test : CrossRefValidation ......................... Le test CrossRefValidation de mycompany a réussi Exécution de tests d'entreprise sur mycompany.net Démarrage du test : LocatorCheck Avertissement : l'appel DcGetDcName(GC_SERVER_REQUIRED) a échoué ; erreur 1722 Serveur de catalogue global introuvable - Les catalogues globaux ne fonctionnent pas. Avertissement : l'appel DcGetDcName(PDC_REQUIRED) a échoué ; erreur 1722 Contrôleur principal de domaine introuvable. Le serveur contenant le rôle PDC ne fonctionne pas. Avertissement : l'appel DcGetDcName(TIME_SERVER) a échoué ; erreur 1722 Serveur de temps introuvable. Le serveur contenant le rôle PDC ne fonctionne pas. Avertissement : l'appel DcGetDcName(GOOD_TIME_SERVER_PREFERRED) a échoué ; erreur 1722 Serveur de temps introuvable. Avertissement : l'appel DcGetDcName(KDC_REQUIRED) a échoué ; erreur 1722 Centre de distribution de clés introuvable : les centres de distribution de clés ne fonctionnent pas. ......................... Le test LocatorCheck de mycompany.net a échoué Démarrage du test : Intersite ......................... Le test Intersite de mycompany.net a réussi Update 1 : I am under the distinct impression that the problem is caused by some security settings. I have read elsewhere that the client needs to be able to access the fileshare sysvol. I had to enable Client for Microsoft Windows and File and Printer Sharing which were previously disabled. When I now run dcdiag the Advertising test works, which I suppose is forward progress. It currently chokes on the Services step (unable to open remote IPC). Démarrage du test : Services Impossible d'ouvrir IPC distant à [REPORTS.locbus.net] : erreur 0x35 « Le chemin réseau n'a pas été trouvé. » ......................... Le test Services de REPORTS a échoué The original English version of that error message : Could not open Remote ipc to [server] Update 2 : I attach some more diagnostics : Netsetup.log (client): 09/24/2009 13:27:09:773 ----------------------------------------------------------------- 09/24/2009 13:27:09:773 NetpValidateName: checking to see if 'WEB' is valid as type 1 name 09/24/2009 13:27:12:773 NetpCheckNetBiosNameNotInUse for 'WEB' [MACHINE] returned 0x0 09/24/2009 13:27:12:773 NetpValidateName: name 'WEB' is valid for type 1 09/24/2009 13:27:12:805 ----------------------------------------------------------------- 09/24/2009 13:27:12:805 NetpValidateName: checking to see if 'WEB' is valid as type 5 name 09/24/2009 13:27:12:805 NetpValidateName: name 'WEB' is valid for type 5 09/24/2009 13:27:12:852 ----------------------------------------------------------------- 09/24/2009 13:27:12:852 NetpValidateName: checking to see if 'MYCOMPANY.NET' is valid as type 3 name 09/24/2009 13:27:12:992 NetpCheckDomainNameIsValid [ Exists ] for 'MYCOMPANY.NET' returned 0x0 09/24/2009 13:27:12:992 NetpValidateName: name 'MYCOMPANY.NET' is valid for type 3 09/24/2009 13:27:21:320 ----------------------------------------------------------------- 09/24/2009 13:27:21:320 NetpDoDomainJoin 09/24/2009 13:27:21:320 NetpMachineValidToJoin: 'WEB' 09/24/2009 13:27:21:320 OS Version: 6.0 09/24/2009 13:27:21:320 Build number: 6002 09/24/2009 13:27:21:320 ServicePack: Service Pack 2 09/24/2009 13:27:21:414 SKU: Windows Server® 2008 Standard 09/24/2009 13:27:21:414 NetpDomainJoinLicensingCheck: ulLicenseValue=1, Status: 0x0 09/24/2009 13:27:21:414 NetpGetLsaPrimaryDomain: status: 0x0 09/24/2009 13:27:21:414 NetpMachineValidToJoin: status: 0x0 09/24/2009 13:27:21:414 NetpJoinDomain 09/24/2009 13:27:21:414 Machine: WEB 09/24/2009 13:27:21:414 Domain: MYCOMPANY.NET 09/24/2009 13:27:21:414 MachineAccountOU: (NULL) 09/24/2009 13:27:21:414 Account: MYCOMPANY.NET\pcollins 09/24/2009 13:27:21:414 Options: 0x25 09/24/2009 13:27:21:414 NetpLoadParameters: loading registry parameters... 09/24/2009 13:27:21:414 NetpLoadParameters: DNSNameResolutionRequired not found, defaulting to '1' 0x2 09/24/2009 13:27:21:414 NetpLoadParameters: status: 0x2 09/24/2009 13:27:21:414 NetpValidateName: checking to see if 'MYCOMPANY.NET' is valid as type 3 name 09/24/2009 13:27:21:523 NetpCheckDomainNameIsValid [ Exists ] for 'MYCOMPANY.NET' returned 0x0 09/24/2009 13:27:21:523 NetpValidateName: name 'MYCOMPANY.NET' is valid for type 3 09/24/2009 13:27:21:523 NetpDsGetDcName: trying to find DC in domain 'MYCOMPANY.NET', flags: 0x40001010 09/24/2009 13:27:22:039 NetpDsGetDcName: failed to find a DC having account 'WEB$': 0x525, last error is 0x79 09/24/2009 13:27:22:039 NetpDsGetDcName: status of verifying DNS A record name resolution for 'KING.MYCOMPANY.NET': 0x0 09/24/2009 13:27:22:039 NetpDsGetDcName: found DC '\\KING.MYCOMPANY.NET' in the specified domain 09/24/2009 13:27:30:039 NetUseAdd to \\KING.MYCOMPANY.NET\IPC$ returned 53 09/24/2009 13:27:30:039 NetpJoinDomain: status of connecting to dc '\\KING.MYCOMPANY.NET': 0x35 09/24/2009 13:27:30:039 NetpDoDomainJoin: status: 0x35 09/24/2009 13:27:30:148 ----------------------------------------------------------------- ipconfig /all (on client): Configuration IP de Windows Nom de l'hôte . . . . . . . . . . : WEB Suffixe DNS principal . . . . . . : Type de noeud. . . . . . . . . . : Hybride Routage IP activé . . . . . . . . : Non Proxy WINS activé . . . . . . . . : Non Carte Ethernet Connexion au réseau local : Suffixe DNS propre à la connexion. . . : Description. . . . . . . . . . . . . . : Intel 21140-Based PCI Fast Ethernet Adapter (Emulated) Adresse physique . . . . . . . . . . . : **-15-5D-A1-17-** DHCP activé. . . . . . . . . . . . . . : Non Configuration automatique activée. . . : Oui Adresse IPv4. . . . . . . . . . . : **.***.163.122(préféré) Masque de sous-réseau. . . . . . . . . : 255.255.255.0 Passerelle par défaut. . . . . . . . . : **.***.163.2 Serveurs DNS. . . . . . . . . . . . . : **.***.163.123 NetBIOS sur Tcpip. . . . . . . . . . . : Activé ipconfig /all (on server): Configuration IP de Windows Nom de l'hôte . . . . . . . . . . : KING Suffixe DNS principal . . . . . . : mycompany.net Type de noeud. . . . . . . . . . : Hybride Routage IP activé . . . . . . . . : Non Proxy WINS activé . . . . . . . . : Non Liste de recherche du suffixe DNS.: locbus.net Carte Ethernet Connexion au réseau local : Suffixe DNS propre à la connexion. . . : Description. . . . . . . . . . . . . . : Intel 21140-Based PCI Fast Ethernet Adapter (Emulated) Adresse physique . . . . . . . . . . . : **-15-5D-A1-1E-** DHCP activé. . . . . . . . . . . . . . : Non Configuration automatique activée. . . : Oui Adresse IPv4. . . . . . . . . . . : **.***.163.123(préféré) Masque de sous-réseau. . . . . . . . . : 255.255.255.0 Passerelle par défaut. . . . . . . . . : **.***.163.2 Serveurs DNS. . . . . . . . . . . . . : 127.0.0.1 NetBIOS sur Tcpip. . . . . . . . . . . : Activé nslookup (on client): Serveur : *******.***.com Address: **.***.163.123 Nom : mycompany.net Addresses: ****:****:a37b::****:a37b **.****.163.123

    Read the article

  • Windows somehow got convinced that a file is a folder. How do I change it back?

    - by Ben Collins
    I recently moved an external drive from my usb-enabled router to my desktop machine, and ran into some permissions-related issues. A number of files were giving me errors when I tried to take ownership or set permissions, and in all my fiddling on a particular file, it somehow got switched to a folder. Anyone have any idea how this might have happened, and how to flip it back? Here's a screenshot:

    Read the article

  • SQL log shipping for reporting

    - by Patrick J Collins
    I would like to create a read-only copy of my SQL Server 2008 database on a secondary server for reporting and analysis. I've been testing log shipping, configured to run every 5 minutes or so. Alas, there appears to be a stumbling block, for exclusive access is required on the target database during the restore, which in turn requires killing all active connections. This is far from ideal, especially if a user is in the middle of running a report. Any better suggestions? Edit : I'm doing this on the Express edition.

    Read the article

  • Need help diagnosing my machine

    - by Tom Collins
    I have something that just slows my computer to a crawl sometimes. Not running anything big. Yesterday all I had running (besides background apps) were Firefox & Windows Explorer and could barely even switch screens. Nothing showing up in the task manager as hogging CPUs. I have all non-essential services stopped (MySQl & MSSQL) unless I need them. I made some restore points not long ago, but they disappeared. This is a development mach with a LOT of apps installed, so I really, really do not want to re-install Windows. So, what I'm looking for are ideas or tools I can use to help diagnose this problem. The only clues I have is this started right after I installed Office 2013 (with Office 2010 still installed as well) installed Visual Studio 2012 (also keeping 2010 as a co-install) and installed MSSQL 2012 (upgrade from 2008, no co-install) Also, computer runs fine in Safe Mode. I've just ran out of ideas of what to check. Any help / suggestions would much appreciated. Thanks P.S. I'm running Win 7 Pro (x64). Office is also 64 bit. Visual Studio & MSSQL are 64 bit if that option was available (not sure).

    Read the article

  • OpenDNS servers initial response is very slow

    - by Ben Collins
    I've got a Time Warner cable ISP package (RoadRunner), and the modem they gave me doesn't allow me to specify which DNS servers to use; it always uses whatever the upstream dhcp server gives it. I prefer to use OpenDNS on my home network, so i've configured a couple of my PCs manually in the Windows adapter settings for IPv4 such that their IP addresses are obtained via DHCP, but the DNS server settings are fixed to the OpenDNS server IPs. Now, when I startup Windows on these PCs, it always takes 2-3 minutes to start receiving responses from the DNS servers; any request before that times out. While not debilitating, this is quite annoying. Any ideas why this might be happening?

    Read the article

  • editing automated SharePoint emails

    - by Richard Collins
    Sharepoint sends out an automated email when a site collection has reached its quota warning level. The email says: You are receiving this e-mail message because you are an administrator of the following SharePoint Web site, which has exceeded the warning level for storage: https://mysite.xxx.ac.uk/personal/xxx/. To see how much storage is being taken up by this site, go to the View site collection usage summary: https://mysite.xxx.ac.uk/personal/xxx/_layouts/Usage.aspx. The problem is that the usage summary link needs to point somewhere else instead. How can I edit the body of the email to change the link? Thanks.

    Read the article

  • SQL Server Management Studio unable to connect to local instance.

    - by Ben Collins
    I'm not a DBA, I'm a developer - and I'm having trouble with SQL Server Management studio. I installed SQL Server 2008 Standard on Windows 2008 Server R2, and according to Sql Server Configuration Manager, I've got two instances: OFFICESERVERS (for sharepoint) and MSSQLSERVER. When I open SQL Server Management Studio I can only discover OFFICESERVERS. I've checked the protocol configuration for both instances and didn't see anything that indicates to me why this would be. Any hints?

    Read the article

  • MATLAB cannot find its own libraries

    - by J Collins
    I am having a problem with a new installation of MATLAB (2012b) that is cannot find the base enumberation type Simulink.IntEnumType. The specific error text is: specified superclass 'Simulink.IntEnumType' contains a parse error or cannot be found on MATLAB's search path, possibly shadowed by another file with the same name I am quite sure there is no shadowing, so I suspect there is a problem with the installation. Any ideas what could have gone wrong?

    Read the article

  • How can one convert a Word form to a PDF form while preserving fields?

    - by Ben Collins
    I have a Word source document which I'm using to create a PDF form. The first go-round, everything is fine because I can let Acrobat Pro auto-create all the fields. That feature is actually pretty awesome. However, after spending a bunch of time adjusting field sizes and alignments and formats and so on, I want to edit the source document, and now I'm faced with the prospect of doing all that over again. Isn't there some way to add the fields in the source document using the Developer ribbon and have those fields be preserved in the conversion to PDF? If not, what other ways are there to avoid this kind of redundant effort?

    Read the article

  • iOS calendar sync with Exchange 365

    - by Patrick J Collins
    I signed up for an Exchange 365 account with Microsoft Online. I followed the instructions to set up my iPhone to access my mail. However, I can't access the calendar function. When I go into the account settings screen on my iPhone, the options to turn on the calendar, contacts and reminders are missing! (See step 9 on this site to get an idea of what the dialog should look like). Anyone have an idea why those options are missing and how I could activate them? Thanks, Patrick

    Read the article

  • Advanced command line editing for Windows?

    - by Ben Collins
    I'm developer who was "born and bred" on Linux and BSD systems, and I've become accustomed to having advanced tools for the console (posix shells like bash, for example). My career has taken a twist that means I'm working in a Windows environment most of the time, and the console capabilities are really poor by comparison. The traditional windows console environment is a complete joke, and even most of the third party attempts at improving things aren't a lot better. PowerShell is a huge step in the right direction, but the console applications themselves are still way behind where unix has been for 20 years. Does anyone know of a PowerShell console application that supports advanced command line editing like posix shells do? I'm particularly interested in emacs-mode editing, and I'd also like to be able to resize my window to an arbirary size, unlike the native console app that comes with Windows.

    Read the article

  • Practical way to set up an email inbox for testing?

    - by Ben Collins
    I need to test a high-volume email application. Up to now, I've just been using gmail ad-hoc aliases ([email protected]) to receive emails and see that the content is right. However, I now need to verify a recipient list, which means I need to get every single email that goes out on a particular test run. The problem with Google isn't clear, but there's some throttling somewhere (perhaps from SendGrid, who is my delivery provider), and only a very small number of those emails ever make it to my acount. So: what's a practical way to get where I want to be? Is there a way to get gmail to just accept everything? Is there a web app / service somewhere that will let me throw up a fake email address that can receive for a large number of recipients? Is there something else?

    Read the article

  • Ok, i know i messed things up pretty bad..... virtualmin sub domain user taken over root login

    - by Collins Areba
    ok, here is the scenario, i was playing around the import wizard and imported a subdomain i had created on a linode and now im having trouble cause the user i assigned to the subdomain is root. Now when i log into webmin / usermin / virtualmin with my root credentials, i end up administering a sub domain instead of working on the webmin root console. Is there a way of a) deleting the virtualhost completely from usermin using ssh? b) rectifying this ..

    Read the article

  • SQL Search- The Search and the Sequel

    It started out as an experiment to try to explore different ways of creating a software tool that people would want. It ended up as a tool that Red Gate is giving away to the SQL Server community in return for the contribution to the project of so many of Red Gate's friends within the community. But was it easy to do? Bob Cramblitt and Richard Collins went to find out by talking to Tanya Joseph, who managed the project that turned the concept into a product.

    Read the article

  • ASP.NET TextBox TextChanged event not firing in custom EditorPart

    - by Ben Collins
    This is a classic sort of question, I suppose, but it seems that most people are interested in having the textbox cause a postback. I'm not. I just want the event to fire when a postback occurs. I have created a webpart with a custom editorpart. The editorpart renders with a textbox and a button. Clicking the button causes a dialog to open. When the dialog is closed, it sets the value of the textbox via javascript and then does __doPostBack using the ClientID of the editorpart. The postback happens, but the TextChanged event never fires, and I'm not sure if it's a problem with the way __doPostBack is invoked, or if it's because of the way I'm setting up the event handler, or something else. Here's what I think is the relevant portion of the code from the editorpart: protected override void CreateChildControls() { _txtListUrl = new TextBox(); _txtListUrl.ID = "targetSPList"; _txtListUrl.Style.Add(HtmlTextWriterStyle.Width, "60%"); _txtListUrl.ToolTip = "Select List"; _txtListUrl.CssClass = "ms-input"; _txtListUrl.Attributes.Add("readOnly", "true"); _txtListUrl.Attributes.Add("onChange", "__doPostBack('" + this.ClientID + "', '');"); _txtListUrl.Text = this.ListString; _btnListPicker = new HtmlInputButton(); _btnListPicker.Style.Add(HtmlTextWriterStyle.Width, "60%"); _btnListPicker.Attributes.Add("Title", "Select List"); _btnListPicker.ID = "browseListsSmtButton"; _btnListPicker.Attributes.Add("onClick", "mso_launchListSmtPicker()"); _btnListPicker.Value = "Select List"; this.AddConfigurationOption("News List", "Choose the list that serves as the data source.", new Control[] { _txtListUrl, _btnListPicker }); if (this.ShowViewSelection) { _txtListUrl.TextChanged += new EventHandler(_txtListUrl_TextChanged); _ddlViews = new DropDownList(); _ddlViews.ID = "_ddlViews"; this.AddConfigurationOption("View", _ddlViews); } } protected override void OnPreRender(EventArgs e) { ScriptLink.Register(this.Page, "PickerTreeDialog.js", true); string lastSelectedListId = string.Empty; if (!this.WebId.Equals(Guid.Empty) && !this.ListId.Equals(Guid.Empty)) { lastSelectedListId = SPHttpUtility.EcmaScriptStringLiteralEncode( string.Format("SPList:{0}?SPWeb:{1}:", this.ListId.ToString(), this.WebId.ToString())); } string script = "\r\n var lastSelectedListSmtPickerId = '" + lastSelectedListId + "';" + "\r\n function mso_launchListSmtPicker(){" + "\r\n if (!document.getElementById) return;" + "\r\n" + "\r\n var listTextBox = document.getElementById('" + SPHttpUtility.EcmaScriptStringLiteralEncode(_txtListUrl.ClientID) + "');" + "\r\n if (listTextBox == null) return;" + "\r\n" + "\r\n var serverUrl = '" + SPHttpUtility.EcmaScriptStringLiteralEncode(SPContext.Current.Web.ServerRelativeUrl) + "';" + "\r\n" + "\r\n var callback = function(results) {" + "\r\n if (results == null || results[1] == null || results[2] == null) return;" + "\r\n" + "\r\n lastSelectedListSmtPickerId = results[0];" + "\r\n var listUrl = '';" + "\r\n if (listUrl.substring(listUrl.length-1) != '/') listUrl = listUrl + '/';" + "\r\n if (results[1].charAt(0) == '/') results[1] = results[1].substring(1);" + "\r\n listUrl = listUrl + results[1];" + "\r\n if (listUrl.substring(listUrl.length-1) != '/') listUrl = listUrl + '/';" + "\r\n if (results[2].charAt(0) == '/') results[2] = results[2].substring(1);" + "\r\n listUrl = listUrl + results[2];" + "\r\n listTextBox.value = listUrl;" + "\r\n __doPostBack('" + this.ClientID + "','');" + "\r\n }" + "\r\n LaunchPickerTreeDialog('CbqPickerSelectListTitle','CbqPickerSelectListText','websLists','', serverUrl, lastSelectedListSmtPickerId,'','','/_layouts/images/smt_icon.gif','', callback);" + "\r\n }"; this.Page.ClientScript.RegisterClientScriptBlock(typeof(ListPickerEditorPart), "mso_launchListSmtPicker", script, true); if ((!string.IsNullOrEmpty(_txtListUrl.Text) && _ddlViews.Items.Count == 0) || _listSelectionChanged) { _ddlViews.Items.Clear(); if (!string.IsNullOrEmpty(_txtListUrl.Text)) { using (SPWeb web = SPContext.Current.Site.OpenWeb(this.WebId)) { foreach (SPView view in web.Lists[this.ListId].Views) { _ddlViews.Items.Add(new ListItem(view.Title, view.ID.ToString())); } } _ddlViews.Enabled = _ddlViews.Items.Count > 0; } else { _ddlViews.Enabled = false; } } base.OnPreRender(e); } void _txtListUrl_TextChanged(object sender, EventArgs e) { this.SetPropertiesFromChosenListString(_txtListUrl.Text); _listSelectionChanged = true; } Any ideas? Update: I forgot to mention these methods, which are called above: protected virtual void AddConfigurationOption(string title, Control inputControl) { this.AddConfigurationOption(title, null, inputControl); } protected virtual void AddConfigurationOption(string title, string description, Control inputControl) { this.AddConfigurationOption(title, description, new List<Control>(new Control[] { inputControl })); } protected virtual void AddConfigurationOption(string title, string description, IEnumerable<Control> inputControls) { HtmlGenericControl divSectionHead = new HtmlGenericControl("div"); divSectionHead.Attributes.Add("class", "UserSectionHead"); this.Controls.Add(divSectionHead); HtmlGenericControl labTitle = new HtmlGenericControl("label"); labTitle.InnerHtml = HttpUtility.HtmlEncode(title); divSectionHead.Controls.Add(labTitle); HtmlGenericControl divUserSectionBody = new HtmlGenericControl("div"); divUserSectionBody.Attributes.Add("class", "UserSectionBody"); this.Controls.Add(divUserSectionBody); HtmlGenericControl divUserControlGroup = new HtmlGenericControl("div"); divUserControlGroup.Attributes.Add("class", "UserControlGroup"); divUserSectionBody.Controls.Add(divUserControlGroup); if (!string.IsNullOrEmpty(description)) { HtmlGenericControl spnDescription = new HtmlGenericControl("div"); spnDescription.InnerHtml = HttpUtility.HtmlEncode(description); divUserControlGroup.Controls.Add(spnDescription); } foreach (Control inputControl in inputControls) { divUserControlGroup.Controls.Add(inputControl); } this.Controls.Add(divUserControlGroup); HtmlGenericControl divUserDottedLine = new HtmlGenericControl("div"); divUserDottedLine.Attributes.Add("class", "UserDottedLine"); divUserDottedLine.Style.Add(HtmlTextWriterStyle.Width, "100%"); this.Controls.Add(divUserDottedLine); }

    Read the article

  • How do I use PerformanceCounterType AverageTimer32?

    - by Patrick J Collins
    I'm trying to measure the time it takes to execute a piece of code on my production server. I'd like to monitor this information in real time, so I decided to give Performance Analyser a whizz. I understand from MSDN that I need to create both an AverageTimer32 and an AverageBase performance counter, which I duly have. I increment the counter in my program, and I can see the CallCount go up and down, but the AverageTime is always zero. What am I doing wrong? Thanks! Here's a snippit of code : long init_call_time = Environment.TickCount; // *** // Lots and lots of code... // *** // Count number of calls PerformanceCounter perf = new PerformanceCounter("Cat", "CallCount", "Instance", false); perf.Increment(); perf.Close(); // Count execution time PerformanceCounter perf2 = new PerformanceCounter("Cat", "CallTime", "Instance", false); perf2.NextValue(); perf2.IncrementBy(Environment.TickCount - init_call_time); perf2.Close(); // Average base for execution time PerformanceCounter perf3 = new PerformanceCounter("Cat", "CallTimeBase", "Instance", false); perf3.Increment(); perf3.Close(); perf2.NextValue();

    Read the article

  • drawRect not being called in my subclass of UIImageView

    - by Ben Collins
    I have subclassed UIImageView and tried to override drawRect so I could draw on top of the image using Quartz 2D. I know this is a dumb newbie question, but I'm not seeing what I did wrong. Here's the interface: #import <UIKit/UIKit.h> @interface UIImageViewCustom : UIImageView { } - (void)drawRect:(CGRect)rect; And the implementation: #import "UIImageViewCustom.h" @implementation UIImageViewCustom - (id)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { } return self; } - (void)drawRect:(CGRect)rect { // do stuff } I set a breakpoint on drawRect and it never hits, leading me to think it never gets called at all. Isn't it supposed to be called when the view first loads? Have I incorrectly overridden it?

    Read the article

  • DBMS debugger causes TOAD to hang

    - by James Collins
    I can start the dbms debugger in Toad and use it normally but if I hit the 'halt execution' button or just hit the 'Run' button to reach the end of the function it causes TOAD to hang. Windows reports it as not responding and I have to kill it through the task manager. I have had this problem in Toad 9.7.2.5 and Toad 10 on two different laptops. Has anyone else experienced this problem? If you have did you find a solution to this?

    Read the article

  • dojo.io.iframe erroring when uploading a file

    - by Grant Collins
    Hi, Hit an interesting problem today when trying to upload an image file < 2MB using dojo.io.iframe. My function to process the form is called, but before the form is posted to the server I am getting the following error: TypeError: ifd.getElementsByTagName("textarea")[0] is undefined My function that is used to action the post of the form is : function uploadnewlogo(){ var logoDiv = dojo.byId('userlogo'); var logoMsg = dojo.byId('uploadmesg'); //prep the io frame to send logo data. dojo.io.iframe.send({ url: "/users/profile/changelogo/", method: "post", handleAs: "text", form: dojo.byId('logoUploadFrm'), handle: function(data,ioArgs){ var response = dojo.fromJson(data); if(response.status == 'success'){ //first clear the image //dojo.style(logoDiv, "display", "none"); logoDiv.innerHTML = ""; //then we update the image logoDiv.innerHTML = response.image; }else if(response.status == 'error'){ logoMsg.innerHTML = data.mesg; }else{ logoMsg.innerHTML = '<div class="error">Whoops! We can not process your image.</div>'; } }, error: function(data, ioArgs){ logoMsg.innerHTML = '<div class="error">' + data + '</div>'; } }); } The form is very basic with just a File input component and a simple button that calls this bit of javascript and dojo. I've got very similar code in my application that uploads word/pdf documents and that doesn't error, but for some reason this does. Any ideas or pointers on what I should try to get this to work without errors? Oh I'm using php and Zend framework for the backend if that has anything to do with it, but I doubt it as it's not even hitting the server before it fails. Many thanks, Grant

    Read the article

  • Add Zend_Navigation to the View with old legacy bootstrap

    - by Grant Collins
    Hi, I've been struggling with Zend_Navigation all weekend, and now I have another problem, which I believe has been the cause of a lot of my issues. I am trying to add Zend_Navigation to a legacy 1.7.6 Zend Framework application, i've updated the Zend Library to 1.9.0 and updated the bootstrap to allow this library update. The problem is that I don't know how, and the examples show the new bootstrap method of how to add the Navigation object to the view, I've tried this: //initialise the application layouts with the MVC helpers $layout = Zend_Layout::startMvc(array('layoutPath' => '../application/layouts')); $view = $layout->getView(); $configNav = new Zend_Config_Xml('../application/config/navigation.xml', 'navigation'); $navigation = new Zend_Navigation($configNav); $view->navigation($navigation); $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer(); $viewRenderer->setView($view); This seems to run through fine, but when I go to use the breadcrumb view helper in my layout, it errors with: Strict Standards: Creating default object from empty value in C:\www\moobia\development\website\application\modules\employers\controllers\IndexController.php on line 27 This is caused by the following code in the init() function of my controller. $uri = $this->_request->getPathInfo(); $activeNav = $this->view->navigation()->findByUri($uri); <- this is null when called $activeNav->active = true; I believe it's because the Zend_Navigation object is not in the view. I would look at migrating the bootstrap to the current method, but at present I am running out of time for a release. Thanks, Grant

    Read the article

  • Custom view with nib as subview doesn't seem to be loading

    - by Ben Collins
    I've created a custom view that loads its content from a nib, like this: /* PricingDataView.h */ #import <UIKit/UIKIt.h> @interface PricingDataView : UIView { UIView *contentView; } @property (nonatomic, retain) IBOutlet UIView *contentView; @end /* PricingDataView.m */ #import "PricingDataView.h" @implementation PricingDataView @synthesize contentView; - (id)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { [[NSBundle mainBundle] loadNibNamed:@"PricingDataView" owner:self options:nil]; [contentView setFrame:frame]; [self addSubview:contentView]; } return self; } /* ... */ In the nib file I set PricingDataView as the type of the File's Owner, and connected the contentView outlet in IB. I placed a regular UIView from the Interface Library onto the full-sized view shown to the user, and then changed it's class name to PricingDataView. It all builds, but at runtime, nothing is rendered where my custom view is supposed to be. I put breakpoints in PricingDataView.initWithFrame, but they don't hit, so I know I'm missing something that would cause the view to be initialized. What I'm curious about is that int the process of loading my other views from nibs, all the initialization happens for me, but not with this one. Why?

    Read the article

  • NSUserDefaults not present on first run on simulator

    - by Ben Collins
    I've got some settings saved in my Settings.bundle, and I try to use them in application:didFinishLaunchingWithOptions, but on a first run on the simulator accessing objects by key always returns nil (or 0 in the case of ints). Once I go to the settings screen and then exit, they work fine for every run thereafter. What's going on? Isn't the point of using default values in the Settings.bundle to be able to use them without requiring the user to enter them first?

    Read the article

  • trying to draw scaled UIImage in custom view, but nothing's rendering

    - by Ben Collins
    I've created a custom view class and right now just want to draw an image scaled to fit the view, given a UIImage. I tried just drawing the UIImage.CGImage, but as others have attested to on this site (and in the docs), that renders the image upside down. So, at the suggestion of an answer I found to another question, I'm trying to draw it directly, but nothing is rendering in the view and I'm not sure why. Here's my drawing code: - (void)drawRect:(CGRect)rect { // Drawing code [super drawRect:rect]; if (self.originalImage) { [self drawImage]; } } - (void) drawImage { if (CGSizeEqualToSize(originalImage.size, self.frame.size) == NO) { CGFloat scaleFactor = 1.0; CGFloat scaledWidth = 0.0; CGFloat scaledHeight = 0.0; CGPoint thumbPoint = CGPointMake(0.0, 0.0); CGFloat widthFactor = self.frame.size.width / originalImage.size.width; CGFloat heightFactor = self.frame.size.height / originalImage.size.height; if (widthFactor < heightFactor) { scaleFactor = widthFactor; } else { scaleFactor = heightFactor; } scaledWidth = originalImage.size.width * scaleFactor; scaledHeight = originalImage.size.height * scaleFactor; if (widthFactor < heightFactor) { thumbPoint.y = (self.frame.size.height - scaledHeight) * 0.5; } else if (widthFactor > heightFactor) { thumbPoint.x = (self.frame.size.width - scaledWidth) * 0.5; } UIGraphicsBeginImageContext(self.frame.size); CGRect thumbRect = CGRectZero; thumbRect.origin = thumbPoint; thumbRect.size.width = scaledWidth; thumbRect.size.height = scaledHeight; [originalImage drawInRect:thumbRect]; self.scaledImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); } else { self.scaledImage = originalImage; } } My understanding (after studying this a bit) is that the UIGraphicsBeginImageContext function creates an offscreen for me to draw into, so now how do I render that context on top of the original one?

    Read the article

< Previous Page | 1 2 3 4  | Next Page >