Search Results

Search found 1144 results on 46 pages for 'kevin boyd'.

Page 12/46 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Delphi: How to respond to WM_SettingChange/WM_WinIniChange?

    - by Ian Boyd
    i need to know when my application recieves a WM_SETTINGCHANGE message (formerly known as WM_WININICHANGE). Problem is that the message pump in TApplication sends it down a black hole (default handler) before i can get a chance to see it: procedure TApplication.WndProc(var Message: TMessage); ... begin Message.Result := 0; for I := 0 to FWindowHooks.Count - 1 do if TWindowHook(FWindowHooks[I]^)(Message) then Exit; CheckIniChange(Message); with Message do case Msg of WM_SETTINGCHANGE: begin Mouse.SettingChanged(wParam); Default; <----------------------*poof* down the sink hole end; ... end; ... end; The procedure CheckIniChange() doesn't throw any event i can handle, neither does Mouse.SettingChanged(). And once the code path reaches Default, it is sent down the DefWindowProc drain hole, never to be seen again (since the first thing the WndProc does is set the Message.Result to zero. i was hoping to assign a handler to a TApplicationEvents.OnMessage event: procedure TdmGlobal.ApplicationEvents1Message(var Msg: tagMSG; var Handled: Boolean); begin case Msg.message of WM_SETTINGCHANGE: begin // Code end; end; end; But the OnMessage event is only thrown for messages that come through the message pump. Since the WM_SETTINGCHANGE message is "handled", it never sees the PeekMessage TranslateMessage DispatchMessage system. How can i respond to the windows broadcast WM_SETTINGCHANGE?

    Read the article

  • Win32: Is there a replacement GDI32.dll that uses hardware acceleration?

    - by Ian Boyd
    Has anyone out there created a version of GDI32.dll that takes advantage of hardware acceleration available on the machine? gdiplus.dll? Starting with Windows Vista, GDI is no longer hardware accelerated. (GDI+ was never hardware accelerated). Without Microsoft fixing GDI (and GDI+) to be able to run well on the computer: native applications (C++ MFC, Delphi, etc), and managed WinForms applications, will continue to run poorly forever. While i could use Direct2D for business applications, i cannot control the fact that the development environment still creates controls, with decades of library support code, that assumes the presence of GDI.

    Read the article

  • SQL Server: Database stuck in "Restoring" state

    - by Ian Boyd
    i backed up a data: BACKUP DATABASE MyDatabase TO DISK = 'MyDatabase.bak' WITH INIT --overwrite existing And then tried to restore it: RESTORE DATABASE MyDatabase FROM DISK = 'MyDatabase.bak' WITH REPLACE --force restore over specified database And now the database is stuck in the restoring state. Some people have theorized that it's because there was no log file in the backup, and it needed to be rolled forward using: RESTORE DATABASE MyDatabase WITH RECOVERY Except that, of course, fails: Msg 4333, Level 16, State 1, Line 1 The database cannot be recovered because the log was not restored. Msg 3013, Level 16, State 1, Line 1 RESTORE DATABASE is terminating abnormally. And exactly what you want in a catastrophic situation is a restore that won't work. The backup contains both a data and log file: RESTORE FILELISTONLY FROM DISK = 'MyDatabase.bak' Logical Name PhysicalName ============= =============== MyDatabase C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\MyDatabase.mdf MyDatabase_log C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\MyDatabase_log.LDF

    Read the article

  • Fix common library functions, or abandon then?

    - by Ian Boyd
    Imagine i have a function with a bug in it: Boolean MakeLocation(String City, String State) { //Given "Springfield", "MO" //return "Springfield, MO" return City+", "+State; } So the call: MakeLocation("Springfield", "MO"); would return "Springfield, MO" Now there's a slight problem, what if the user called: MakeLocation("Springfield, MO", "OH"); The called it wrong, obviously. But the function would return "Springfield, MO, OH". The system was functioning like this for many years, until i noticed the function being used wrong, and i corrected it. And i also updated the original function to catch such an obvious mistake - in case it's happening elsewhere: Boolean MakeLocation(String City, String State) { //Given "Springfield", "MO" //return "Springfield, MO" if (City.Contains, ",") throw new EMakeLocationException("City name contains a comma. You probably didn't mean that"); return City+", "+State; } And testing showed the problem fixed. Except we missed an edge case, and the customer found it. So now the moral dillema. Do you ever add new sanity checks, safety checks, assertions to exising code? Or do you call the old function abandoned, and have a new one: Boolean MakeLocation(String City, String State) { //Given "Springfield", "MO" //return "Springfield, MO" return City+", "+State; } Boolean MakeLocation2(String City, String State) { //Given "Springfield", "MO" //return "Springfield, MO" if (City.Contains, ",") throw new EMakeLocationException("City name contains a comma. You probably didn't mean that"); return City+", "+State; } The same can apply for anything: Question FetchQuestion(Int id) { if (id == 0) throw new EFetchQuestionException("No question ID specified"); ... } Do you risk breaking existing code, at the expense of existing code being wrong?

    Read the article

  • SQL Profiler: Read/Write units

    - by Ian Boyd
    i've picked a query out of SQL Server Profiler that says it took 1,497 reads: EventClass: SQL:BatchCompleted TextData: SELECT Transactions.... CPU: 406 Reads: 1497 Writes: 0 Duration: 406 So i've taken this query into Query Analyzer, so i may try to reduce the number of reads. But when i turn on SET STATISTICS IO ON to see the IO activity for the query, i get nowhere close to one thousand reads: Table Scan Count Logical Reads =================== ========== ============= FintracTransactions 4 20 LCDs 2 4 LCTs 2 4 FintracTransacti... 0 0 Users 1 2 MALs 0 0 Patrons 0 0 Shifts 1 2 Cages 1 1 Windows 1 3 Logins 1 3 Sessions 1 6 Transactions 1 7 Which if i do my math right, there is a total of 51 reads; not 1,497. So i assume Reads in SQL Profiler is an arbitrary metric. Does anyone know the conversion of SQL Server Profiler Reads to IO Reads? See also SQL Profiler CPU / duration unit Query Analyzer VS. Query Profiler Reads, Writes, and Duration Discrepencies

    Read the article

  • Color Theory: How to convert Munsell HVC to RGB/HSB/HSL

    - by Ian Boyd
    I'm looking at at document that describes the standard colors used in dentistry to describe the color of a tooth. They quote hue, value, chroma values, and indicate they are from the 1905 Munsell description of color: The system of colour notation developed by A. H. Munsell in 1905 identifies colour in terms of three attributes: HUE, VALUE (Brightness) and CHROMA (saturation) [15] HUE (H): Munsell defined hue as the quality by which we distinguish one colour from another. He selected five principle colours: red, yellow, green, blue, and purple; and five intermediate colours: yellow-red, green-yellow, blue-green, purple-blue, and red-purple. These were placed around a colour circle at equal points and the colours in between these points are a mixture of the two, in favour of the nearer point/colour (see Fig 1.). VALUE (V): This notation indicates the lightness or darkness of a colour in relation to a neutral grey scale, which extends from absolute black (value symbol 0) to absolute white (value symbol 10). This is essentially how ‘bright’ the colour is. CHROMA (C): This indicates the degree of divergence of a given hue from a neutral grey of the same value. The scale of chroma extends from 0 for a neutral grey to 10, 12, 14 or farther, depending upon the strength (saturation) of the sample to be evaluated. There are various systems for categorising colour, the Vita system is most commonly used in Dentistry. This uses the letters A, B, C and D to notate the hue (colour) of the tooth. The chroma and value are both indicated by a value from 1 to 4. A1 being lighter than A4, but A4 being more saturated than A1. If placed in order of value, i.e. brightness, the order from brightest to darkest would be: A1, B1, B2, A2, A3, D2, C1, B3, D3, D4, A3.5, B4, C2, A4, C3, C4 The exact values of Hue, Value and Chroma for each of the shades is shown below (16) So my question is, can anyone convert Munsell HVC into RGB, HSB or HSL? Hue Value (Brightness) Chroma(Saturation) === ================== ================== 4.5 7.80 1.7 2.4 7.45 2.6 1.3 7.40 2.9 1.6 7.05 3.2 1.6 6.70 3.1 5.1 7.75 1.6 4.3 7.50 2.2 2.3 7.25 3.2 2.4 7.00 3.2 4.3 7.30 1.6 2.8 6.90 2.3 2.6 6.70 2.3 1.6 6.30 2.9 3.0 7.35 1.8 1.8 7.10 2.3 3.7 7.05 2.4 They say that Value(Brightness) varies from 0..10, which is fine. So i take 7.05 to mean 70.5%. But what is Hue measured in? i'm used to hue being measured in degrees (0..360). But the values i see would all be red - when they should be more yellow, or brown. Finally, it says that Choma/Saturation can range from 0..10 ...or even higher - which makes it sound like an arbitrary scale. So can anyone convert Munsell HVC to HSB or HSL, or better yet, RGB?

    Read the article

  • WPF: How to specify units in Dialog Units?

    - by Ian Boyd
    i'm trying to figure out how to layout a simple dialog in WPF using the proper dialog units (DLUs). i spent about two hours dimensioning this sample dialog box from Windows Vista with the various dlu measurements. Can someone please give the corresponding XAML markup that generates this dialog box? (Image Link) Now admittedly i know almost nothing about WPF XAML. Every time i start, i get stymied because i cannot figure out how to place any control. It seems that everything in WPF must be contained on a panel of some kind. There's StackPanels, FlowPanels, DockPanel, Grid, etc. If you don't have one of these then it won't compile. The only XAML i've been able to come up with (uing XAMLPad) so far: <DockPanel xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Image Width="23" /> <Label>Are you sure you want to move this file to the Recycle Bin?</Label> <Image Width="60" /> <Label>117__6.jpg</Label> <Label>Type: ACDSee JPG Image</Label> <Label>Rating: Unrated</Label> <Label>Dimensions: 1072 × 712</Label> <Button Content="Yes" Width="50" Height="14"/> <Button Content="Cancel" Width="50" Height="14"/> </DockPanel> Which renders as a gaudy monstrosity. None of the controls are placed or sized right. i cannot figure out how to position controls in a window, nor size them properly. Can someone turn that screenshot into XAML? Note: You're not allowed to measure the screenshot. All the Dialog Unit (dlu) widths and heights are specified. Note: 1 horizontal DLU != 1 vertical DLU. Horizontal and vertical DLUs are different sizes. Links Microsoft User Experience Guidelines: Recommended sizing and spacing Microsoft User Experience Guidelines: Layout Metrics Bump: 2011/05/14 (15 months later)

    Read the article

  • How to show validation messages in MVC?

    - by Ian Boyd
    When a user tries to click:        Save and they have entered in some invalid data, i want to notify them. This can be with methods such as: directing their attention to the thing that needs their attention with a balloon hint automatically dropping down a combo-box triggering an animation showing a modal dialog box etc What is the mechanism where a controller tells the view to show a validation message for some controls, given that different views have different notification methods? p.s. the controller doesn't know the order that controls are physically arranged in the view (e.g. LTR locale wants to notify the user in a top-down-left-to-right visual order, while RTL locale wants to notify the user in a bottom-up-right-to-left order)

    Read the article

  • DUnit: How to run tests?

    - by Ian Boyd
    How do i run TestCase's from the IDE? i created a new project, with a single, simple, form: unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) private public end; var Form1: TForm1; implementation {$R *.DFM} end. Now i'll add a test case to check that pushing Button1 does what it should: unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); private public end; var Form1: TForm1; implementation {$R *.DFM} uses TestFramework; type TForm1Tests = class(TTestCase) private f: TForm1; protected procedure SetUp; override; procedure TearDown; override; published procedure TestButton1Click; end; procedure TForm1.Button1Click(Sender: TObject); begin //todo end; { TForm1Tests } procedure TForm1Tests.SetUp; begin inherited; f := TForm1.Create(nil); end; procedure TForm1Tests.TearDown; begin f.Free; inherited; end; procedure TForm1Tests.TestButton1Click; begin f.Button1Click(nil); Self.CheckEqualsString('Hello, world!', f.Caption); end; end. Given what i've done (test code in the GUI project), how do i now trigger a run of the tests? If i push F9 then the form simply appears: Ideally there would be a button, or menu option, in the IDE saying Run DUnit Tests: Am i living in a dream-world? A fantasy land, living in a gumdrop house on lollipop lane?

    Read the article

  • I18N: Does Time always come after Date?

    - by Ian Boyd
    Does the time always come after the date, with a space in between, in every culture on earth? i see that Microsoft FCL assumes that it does: public string get_FullDateTimePattern() { if (this.fullDateTimePattern == null) { this.fullDateTimePattern = this.LongDatePattern + " " + this.LongTimePattern; } return this.fullDateTimePattern; } Is this an assumption i can make in every development language for every culture?

    Read the article

  • WinQual: Why would WER not accept code-signing certificates?

    - by Ian Boyd
    In 2005 i tried to establish a WinQual account with Microsoft, so i could pick up our (if any) crash dump files submitted automatically through Windows Error Reporting (WER). i was not allowed to have my crash dumps, because i don't have a Verisign certificate. Instead i have a cheaper one, generated by a Verisign subsidiary: Thawte. The method in which you join is: you digitally sign a sample exe they provide. This proves that you are the same signer that signed apps that they got crash dumps from in the wild. Cryptographically, the private key is needed to generate a digital signature on an executable. Only the holder of that private key can create a signature with for the matching public key. It doesn't matter who generated that private key. That includes certificates that are generated from: self-signing Wells Fargo DigiCert SecureTrust Trustware QuoVadis GoDaddy Entrust Cybertrust GeoTrust GlobalSign Comodo Thawte Verisign Yet Microsof's WinQual only accepts digital certificates generated by Verisign. Not even Verisign's subsidiaries are good enough (Thawte). Can anyone think of any technical, legal or ethical reason why Microsoft doesn't want to accept code-signing certificates? The WinQual site says: Why Is a Digital Certificate Required for Winqual Membership? A digital certificate helps protect your company from individuals who seek to impersonate members of your staff or who would otherwise commit acts of fraud against your company. Using a digital certificate enables proof of an identity for a user or an organization. Is somehow a Thawte digital certificate not secure? Two years later, i sent a reminder notice to WinQual that i've been waiting to be able to get at my crash dumps. The response from WinQual team was: Hello, Thanks for the reminder. We have notified the appropriate people that this is still a request. In 2008 i asked this question in a Microsoft support forum, and the response was: We are only setup to accept VeriSign Certificates at this point. We have not had an overwhelming demand to support other types of certificates. What can it possibly mean to not be "setup" to accept other kinds of certificates? If the thumbprint of the key that signed the WinQual.exe test app is the same as the thumbprint that signed the executable who's crash dump you got in the wild: it is proven - they are my crash dumps, give them to me. And it's not like there's a special API to check if a Verisign digital signature is valid, as opposed to all other digital signatures. A valid signature is valid no matter who generated the key. Microsoft is free to not trust the signer, but that's not the same as identity. So that is my question, can anyone think of any practical reason why WinQual isn't setup to support digital signatures? One person theorized that the answer is that they're just lazy: Not that I know but I would assume that the team running the winQual system is a live team and not a dev team - as in, personality and skillset geared towards maintenance of existing systems. I could be wrong though. They don't want to do work to change it. But can anyone think of anything that would need to be changed? It's the same logic no matter what generated the key: "does the thumbprint match". What am i missing?

    Read the article

  • Where to ask practical unit-testing questions?

    - by Ian Boyd
    Before i can understand unit testing, i have to see real world examples. Every book, blog, article, or answer i've seen gives hypothetical examples that don't apply to the/my real world. i really don't want to flood StackOverflow with hundreds of questions all titled "How do i unit-test this?" There must be another place i can go to ask for real solutions. Where can i go to get practical answers to unit-testing questions? Note: i would give an example question, but then people would get grumpy when i asked the 200 follow-up questions.

    Read the article

  • Delphi: Alternative to using Assign/ReadLn for text file reading

    - by Ian Boyd
    i want to process a text file line by line. In the olden days i loaded the file into a StringList: slFile := TStringList.Create(); slFile.LoadFromFile(filename); for i := 0 to slFile.Count-1 do begin oneLine := slFile.Strings[i]; //process the line end; Problem with that is once the file gets to be a few hundred megabytes, i have to allocate a huge chunk of memory; when really i only need enough memory to hold one line at a time. (Plus, you can't really indicate progress when you the system is locked up loading the file in step 1). The i tried using the native, and recommended, file I/O routines provided by Delphi: var f: TextFile; begin Assign(filename, f); while ReadLn(f, oneLine) do begin //process the line end; Problem withAssign is that there is no option to read the file without locking (i.e. fmShareDenyNone). The former stringlist example doesn't support no-lock either, unless you change it to LoadFromStream: slFile := TStringList.Create; stream := TFileStream.Create(filename, fmOpenRead or fmShareDenyNone); slFile.LoadFromStream(stream); stream.Free; for i := 0 to slFile.Count-1 do begin oneLine := slFile.Strings[i]; //process the line end; So now even though i've gained no locks being held, i'm back to loading the entire file into memory. Is there some alternative to Assign/ReadLn, where i can read a file line-by-line, without taking a sharing lock? i'd rather not get directly into Win32 CreateFile/ReadFile, and having to deal with allocating buffers and detecting CR, LF, CRLF's. i thought about memory mapped files, but there's the difficulty if the entire file doesn't fit (map) into virtual memory, and having to maps views (pieces) of the file at a time. Starts to get ugly. i just want Assign with fmShareDenyNone!

    Read the article

  • IIS: How to get the Metabase path?

    - by Ian Boyd
    i'm trying to get the list of mime types known to an IIS server (which you can see was asked and and answered by me 2 years ago). The copy-pasted answer involves: GetObject("IIS://LocalHost/MimeMap") msdn GetObject("IIS://localhost/mimemap") KB246068 GetObject("IIS://localhost/MimeMap") Scott Hanselman's Blog new DirectoryEntry("IIS://Localhost/MimeMap")) Stack Overflow new DirectoryEntry("IIS://Localhost/MimeMap")) Stack Overflow New DirectoryServices.DirectoryEntry("IIS://localhost/MimeMap") Velocity Reviews You get the idea. Everyone agrees that you use a magical path iis://localhost/mimemap. And this works great, except for the times when it doesn't. The only clue i can find as to why it fails, is from an IIS MVP, Chris Crowe's, blog: string ServerName = "LocalHost"; string MetabasePath = "IIS://" + ServerName + "/MimeMap"; // Note: This could also be something like // string MetabasePath = "IIS://" + ServerName + "/w3svc/1/root"; DirectoryEntry MimeMap = new DirectoryEntry(MetabasePath); There are two clues here: He calls iis://localhost/mimemap the Metabase Path. Which sounds to me like it is some sort of "path" to a "metabase". He says that the path to the metabase could be something else; and he gives an example of what it could be like. Right now i, and the entire planet, are hardcoding the "MetabasePath" as iis://localhost/MimeMap What should it really be? What should the code be doing to construct a valid MetabasePath? Note: i'm not getting an access denied error, the error is the same when you have an invalid MetabasePath, e.g. iis://localhost/SoTiredOfThis

    Read the article

  • How do I fix the python installer's 'missing dependencies' error?

    - by Trevor Boyd Smith
    Background: running ubuntu So I downloaded the python "install from source" tarball. I ran make and got this error message: Python build finished, but the necessary bits to build these modules were not found: _aaa _bbb _ccc ... _jjj _kkk I google'd and found one solution is to: MANUALLY map all the string names from the error message to something in the apt-get repo MANUALLY call "sudo apt-get AAA BBB ... JJJ KKK" to get all the libraries I can easily do all of that. But I have no way of knowing what is the right version libraries I need to get! How in the world am I supposed to fix the missing dependencies if I don't know what the exact missing dependency is?

    Read the article

  • COM: How to handle a specific exception?

    - by Ian Boyd
    i'm talking to a COM object (Microsoft ADO Recordset object). In a certain case the recordset will return a failed (i.e. negative) HRESULT, with the message: Item cannot be found in the collection corresponding to the requested name or ordinal i know what this error message means, know why it happened, and i how to fix it. But i know these things because i read the message, which fortunately was in a language i understand. Now i would like to handle this exception specially. The COM object threw an HRESULT of 0x800A0CC1 In an ideal world Microsoft would have documented what errors can be returned when i try to access: records.Fields.Items( index ) with an invalid index. But they do not; they most they say is that an error can occur, i.e.: If Item cannot find an object in the collection corresponding to the Index argument, an error occurs. Given that the returned error code is not documented, is it correct to handle a specific return code of `0x800A0CC1' when i'm trying to trap the exception: Item cannot be found in the collection corresponding to the requested name or ordinal ? Since Microsoft didn't document the error code, they technically change it in the future.

    Read the article

  • Source control products that support linked/shared files?

    - by Ian Boyd
    We're interested in moving from a source control system that supports the concept of shared or linked files. A shared file means: a file modified in one project, is automatically updated changed in every other project that uses that same file. It does this without a developer having to request it, reverse-integrate it, ask for it, or even want it. We're trying to see if any other commonly used source-control systems can meet our needs, and include linked or shared files. My limited research shows that: Team Foundation Server doesn't support sharing files Subversion doesn't support sharing files (including Externals) CVS doesn't support sharing files (including Modules) Anything else? (besides our current source control product, obviously) References Subversion and shared files across repositories/projects? How to share files between CVS projects? Will TFS ever support shared files for projects under source control?

    Read the article

  • Win32: IProgressDialog will not disappear until you mouse over it.

    - by Ian Boyd
    i'm using the Win32 progress dialog. The damnest thing is that when i call: progressDialog.StopProgressDialog(); it doesn't disappear. It stays on screen until the user moves her mouse over it - then it suddenly disappers. The call to StopProgressDialog returns right away (i.e. it's not a synchronous call). i can prove this by doing things after the call has returned: private void button1_Click(object sender, EventArgs e) { //Force red background to prove we've started this.BackColor = Color.Red; this.Refresh(); //Start a progress dialog IProgressDialog pd = (IProgressDialog)new ProgressDialog(); pd.StartProgressDialog(this.Handle, null, PROGDLG.Normal, IntPtr.Zero); //The long running operation System.Threading.Thread.Sleep(10000); //Stop the progress dialog pd.SetLine(1, "Stopping Progress Dialog", false, IntPtr.Zero); pd.StopProgressDialog(); pd = null; //Return form to normal color to prove we've stopped. this.BackColor = SystemColors.Control; this.Refresh(); } The form: starts gray turns red to show we've stared turns back to gray color to show we've called stop So the call to StopProgressDialog has returned, except the progress dialog is still sitting there, mocking me, showing the message: Stopping Progress Dialog Doesn't Appear for 10 seconds Additionally, the progress dialog does not appear on screen until the System.Threading.Thread.Sleep(10000); ten second sleep is over. Not limited to .NET WinForms The same code also fails in Delphi, which is also an object wrapper around Window's windows: procedure TForm1.Button1Click(Sender: TObject); var pd: IProgressDialog; begin Self.Color := clRed; Self.Repaint; pd := CoProgressDialog.Create; pd.StartProgressDialog(Self.Handle, nil, PROGDLG_NORMAL, nil); Sleep(10000); pd.SetLine(1, StringToOleStr('Stopping Progress Dialog'), False, nil); pd.StopProgressDialog; pd := nil; Self.Color := clBtnFace; Self.Repaint; end; PreserveSig An exception would be thrown if StopProgressDialog was failing. Most of the methods in IProgressDialog, when translated into C# (or into Delphi), use the compiler's automatic mechanism of converting failed COM HRESULTS into a native language exception. In other words the following two signatures will throw an exception if the COM call returned an error HRESULT (i.e. a value less than zero): //C# void StopProgressDialog(); //Delphi procedure StopProgressDialog; safecall; Whereas the following lets you see the HRESULT's and react yourself: //C# [PreserveSig] int StopProgressDialog(); //Delphi function StopProgressDialog: HRESULT; stdcall; HRESULT is a 32-bit value. If the high-bit is set (or the value is negative) it is an error. i am using the former syntax. So if StopProgressDialog is returning an error it will be automatically converted to a language exception. Note: Just for SaG i used the [PreserveSig] syntax, the returned HRESULT is zero; MsgWait? The symptom is similar to what Raymond Chen described once, which has to do with the incorrect use of PeekMessage followed by MsgWaitForMultipleObjects: "Sometimes my program gets stuck and reports one fewer record than it should. I have to jiggle the mouse to get the value to update. After a while longer, it falls two behind, then three..." But that would mean that the failure is in IProgressDialog, since it fails equally well on CLR .NET WinForms and native Win32 code.

    Read the article

  • SQL Server: Must numbers all be specified with latin numeral digits?

    - by Ian Boyd
    Does SQL server expect numbers to be specified with digits from the latin alphabet, e.g.: 0123456789 Is it valid to give SQL Server digits in other alphabets? Rosetta Stone: Latin: 01234567890 Arabic: ?????????? Bengali: ?????????? i know that the client (ADO) will convert 8-bit strings to 16-bit unicode strings using the current culture. But the client is also converting numbers to strings using their current culture, e.g.: SELECT * FROM Inventory WHERE Quantity > ???,?? Which throws SQL Server for fits. i know that the server/database has it's defined code page and locale, but that is for strings. Will SQL Server interpret numbers using the active (or per-login specified) locale, or must all numeric values be specifid with latin numeral digits?

    Read the article

  • Problem with grails web app running in production: "No such property: save for class: JsecRole"

    - by Sarah Boyd
    I've got a grails 1.1 web app running great in development but when I try and run it in production with an sqlserver database it crashes in a weird way. The relevant part of my datasource.groovy is as follows: environments { development { dataSource { dbCreate = "create-drop" // one of 'create', 'create-drop','update' url = "jdbc:hsqldb:mem:devDB" } } test { dataSource { dbCreate = "update" url = "jdbc:hsqldb:mem:testDb" } } production { dataSource { dbCreate = "update" driverClassName = "com.microsoft.sqlserver.jdbc.SQLServerDriver" endUsername = "sa" password = "pw4db" url = "jdbc:sqlserver://localhost:1433;databaseName=ReleasePlanner;selectMethod=cursor" The error message I receive is: Message: No such property: save for class: JsecRole Caused by: groovy.lang.MissingPropertyException: No such property: save for class: JsecRole Class: ProjectController At Line: [28] Code Snippet: 27: println "###about to create project roles" 28: userManagerService.createProjectRoles(project) 29: userManagerService.addUserToProject(session.user.id.toString(), project, 'owner') } } } The stacktrace is as follows: org.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingPropertyException: No such property: save for class: JsecRole at org.jsecurity.web.servlet.JSecurityFilter.doFilterInternal(JSecurityFilter.java:382) at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180) Caused by: groovy.lang.MissingPropertyException: No such property: save for class: JsecRole at UserManagerService.createProjectRoles(UserManagerService.groovy:9) at UserManagerService$$FastClassByCGLIB$$6fa73713.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at UserManagerService$$EnhancerByCGLIB$$fcf60984.createProjectRoles(<generated>) at UserManagerService$createProjectRoles.call(Unknown Source) at ProjectController$_closure4.doCall(ProjectController.groovy:28) at ProjectController$_closure4.doCall(ProjectController.groovy) ... 2 more Any help is appreciated. Thanks Sarah

    Read the article

  • Relational database data explorer / visualization?

    - by Ian Boyd
    Is there a tool that can let one browse relational data as a graph of connected nodes? For example, i'm faced with trying to cleanse some anomolous data. i can start with two offending rows. In this particular example, the TransactionID should, by business rules, be unique to the table, but i find a transaction that violates that rule: SELECT * FROM LCTTrans WHERE TransactionID = 1075048 LCTID TransactionID ========= ============= 4358 1075048 4359 1075048 2 row(s) affected But really what i want to begin to hunt down all the related data, to try to see which is right. So this hypothetical software would start by showing me these two rows: Next, i want to see that transaction that is linked into this table: Now that transaction points to an MAL, so show me that: Now lets add those two LCTs, that the transaction is "on". A transaction can be on only one LCT, yet this one is pointing to two: Okay computer, both of those LCTs point to an MAL and the transaction that created them, show me those: Those last two transactions, they also point at an MAL, and they themselves point to an LCT, show me those: Okay, now are there any entries in LCTTrans that point to LCTs 4358 or 4359?... And so on, and so on. Now i did all this manually, running single selects, copying and pasting uniqueidentifier keys and converting them into friendly id numbers so i could easily see the relationships. Is there software that can do this?

    Read the article

  • .NET: What's the difference between HttpMethod and RequestType of HttpRequest?

    - by Ian Boyd
    The HttpRequest class defines two properties: HttpMethod: Gets the HTTP data transfer method (such as GET, POST, or HEAD) used by the client. public string HttpMethod { get; } The HTTP data transfer method used by the client. and RequestType: Gets or sets the HTTP data transfer method (GET or POST) used by the client. public string RequestType { get; set; } A string representing the HTTP invocation type sent by the client. What is the difference between these two properties? When would i want to use one over the other? Which is the proper one to inspect to see what data transfer method was used by the client? The documentation indicates that HttpMethod will return whatever verb was used: such as GET, POST, or HEAD while the documentation on RequestType seems to indicate only one of two possible values: GET or POST i test with a random sampling of verbs, and both properties seem to support all verbs, and both return the same values: Testing: Client Used HttpMethod RequestType GET GET GET POST POST POST HEAD HEAD HEAD CONNECT CONNECT CONNECT MKCOL MKCOL MKCOL PUT PUT PUT FOOTEST FOOTEST FOOTEST What is the difference between: HttpRequest.HttpMethod HttpRequest.RequestType and when should i use one over the other? Keywords: iis asp.net http httprequest httphandler

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >