Search Results

Search found 111 results on 5 pages for 'dane larsen'.

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

  • SQLite3's dynamic typing

    - by Bradford Larsen
    SQLite3 uses dynamic typing rather than static typing, in contrast to other flavors of SQL. The SQLite website reads: Most SQL database engines (every SQL database engine other than SQLite, as far as we know) uses static, rigid typing. With static typing, the datatype of a value is determined by its container - the particular column in which the value is stored. SQLite uses a more general dynamic type system. In SQLite, the datatype of a value is associated with the value itself, not with its container. It seems to me that this is exactly what you don't want, as it lets you store, for example, strings in integer columns. The page continues: ...the dynamic typing in SQLite allows it to do things which are not possible in traditional rigidly typed databases. I have two questions: The use case question: What are some examples where sqlite3's dynamic typing is, in fact, beneficial? The historical/design question: What was the motivation for implementing sqlite with dynamic typing?

    Read the article

  • Error compiling Win32 API GUI code with MinGW

    - by Eric Larsen
    Hey guys, this is my first post. I'm just getting started with win32 API programming in C++ and I'm having trouble compiling the winnie tutorial (http://www.relisoft.com/win32/winnie.html) with MinGW. My input and output: C:\Users\Eric\Projects g++ winnie.cpp -o winnie.exe /mingw/lib/libmingw32.a(main.o):main.c:(.text+0xd2): undefined reference to 'WinMain@16' collect2: ld returned 1 exit status Any help would be very much appreciated.

    Read the article

  • Safely remove window subclassing?

    - by Vegard Larsen
    I am trying to subclass the currently focused window on a Windows system using a global CBT hook. This is related to what happens in this question, but the bug is different. What happens when this subclassing is in effect, is that Opera's (version 10.50) main window is prevented from displaying. Opera has a "splash screen" where you are required to click "Start" for the main window to show that appears after Opera has not shut down properly. Whenever this window pops up, Opera's main window won't show. If Opera was shut down properly, and this splash screen does not show, the main window displays as it should. HHOOK hHook; HWND hWndSubclass = 0; void SubclassWindow(HWND hWnd) { Unsubclass(); FARPROC lpfnOldWndProc = (FARPROC)SetWindowLongPtr(hWnd, GWLP_WNDPROC, (LPARAM)SubClassFunc); SetProp(hWnd, L"PROP_OLDWNDPROC", lpfnOldWndProc); hWndSubclass = hWnd; } void Unsubclass() { if (hWndSubclass != 0 && IsWindow(hWndSubclass)) { FARPROC lpfnOldWndProc = (FARPROC)GetProp(hWndSubclass, L"PROP_OLDWNDPROC"); RemoveProp(hWndSubclass, L"PROP_OLDWNDPROC"); SetWindowLongPtr(hWndSubclass, GWLP_WNDPROC, (LPARAM)lpfnOldWndProc); hWndSubclass = 0; } } static LRESULT CALLBACK SubClassFunc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { if (message == WM_MOVING) { // do something irrelevant } else if (message == WM_DESTROY) { Unsubclass(); } FARPROC lpfnOldWndProc = (FARPROC)GetProp(hWndSubclass, L"PROP_OLDWNDPROC"); return CallWindowProc((WNDPROC)lpfnOldWndProc, hWndSubclass, message, wParam, lParam); } static LRESULT CALLBACK CBTProc(int nCode, WPARAM wParam, LPARAM lParam) { if (nCode == HCBT_SETFOCUS && hWndServer != NULL) { SubclassWindow((HWND)wParam); } if (nCode < 0) { return CallNextHookEx(hHook, nCode, wParam, lParam); } return 0; } BOOL APIENTRY DllMain( HINSTANCE hInstance, DWORD Reason, LPVOID Reserved ) { switch(Reason) { case DLL_PROCESS_ATTACH: hInst = hInstance; return TRUE; case DLL_PROCESS_DETACH: Unsubclass(); return TRUE; } return TRUE; } My suspicion is that Opera's main window is somehow already subclassed. I imagine the following is happening: The window is created with it's own basic WndProc, and is given focus My application subclasses the window, storing the original WndProc Opera subclasses its own window When the window loses focus, I restore the original WndProc, thus ignoring the second WndProc Can this really be the case? Are there any other explanations?

    Read the article

  • Why Do Browsers Leak Memory?

    - by Dane Balia
    A colleague and I were speaking about browsers (using browser control in a project), and it appears as plain as day that all browsers (Firefox, Chrome, IE, Opera) display the same characteristic or side-effect from their usage and that being 'Leaking Memory'. Can someone explain why that is the case? Surely as with any form of code, there should be proper garbage collection? PS. I've read about some defensive patterns on why this can happen from a developer's perspective. I am aware of an article Crockford wrote on IE; but why is the problem symptomatic of every browser? Thanks

    Read the article

  • Simple .NET webcam library

    - by Vegard Larsen
    Is there a simple library for .NET that has a simply API that let's you do something like; // pseudo-code List<Webcam> cams = Webcam.GetAll(); Image i = cams[0].GrabImage(); I've looked at DirectShow and WIA, both seem to be much more complicated than this. I've also looked at this CodeProject project, but it really is much more complicated than what I need. The library should support image grabbing and video grabbing, and preferably live streaming of video. Edit: It is preferable if it is free (or at least very cheap), as this is a hobby project.

    Read the article

  • NoSQL DB for .Net document-based database (ECM)

    - by Dane
    I'm halfway through coding a basic multi-tenant SaaS ECM solution. Each client has it's own instance of the database / datastore, but the .Net app is single instance. The documents are pretty much read only (i.e. an image archive of tiffs or PDFs) I've used MSSQL so far, but then started thinking this might be viable in a NoSQL DB (e.g. MongoDB, CouchDB). The basic premise is that it stores documents, each with their own particular indexes. Each tenant can have multiple document types. e.g. One tenant might have an invoice type, which has Customer ID, Invoice Number and Invoice Date. Another tenant might have an application form, which has Member Number, Application Number, Member Name, and Application Date. So far I've used the old method which Sharepoint (used?) to use, and created a document table which has int_field_1, int_field_2, date_field_1, date_field_2, etc. Then, I've got a "mapping" table which stores the customer specific index name, and the database field that will map to. I've avoided the key-value pair model in the DB due to volume of documents. This way, we can support multiple document types in the one table, and get reasonably high performance out of it, and allow for custom document type searches (i.e. user selects a document type, then they're presented with a list of search fields). However, a NoSQL DB might make this a lot simpler, as I don't need to worry about denormalizing the document. However, I've just got concerns about the rest of the data around a document. We store an "action history" against the document. This tracks views, whether someone emails the document from within the system, and other "future" functionality (e.g. faxing). We have control over the document load process, so we can manipulate the data however it needs to be to get it in the document store (e.g. assign unique IDs). Users will not be adding in their own documents, so we shouldn't need to worry about ACID compliance, as the documents are relatively static. So, my questions I guess : Is a NoSQL DB a good fit Is MongoDB the best for Asp.Net (I saw Raven and Velocity, but they're still kinda beta) Can I store a key for each document, and then store the action history in a MSSQL DB with this key? I don't need to do joins, it would be if a person clicks "View History" against a document. How would performance compare between the two (NoSQL DB vs denormalized "document" table) Volumes would be up to 200,000 new documents per month for a single tenant. My current scaling plan with the SQL DB involves moving the SQL DB into a cluster when certain thresholds are reached, and then reviewing partitioning and indexing structures.

    Read the article

  • CLOB WRITE WITH OO4O

    - by Maagne Larsen
    I get the error : OIP-04908: This operation is not permitted on a Null LOB when Set MyClOB_0 = lOraDynaset_0.Fields("FILE_BODY").Value lOraDynaset_0.Edit amount_written = MyClOB_0.Write(buffer, chunksize, ORALOB_FIRST_PIECE)

    Read the article

  • Adhoc Data processing / ETL

    - by Dane
    I've just started at a new company in outsourced communications (e.g. print and mail, email, fax). One of the requirements is to process clients data and get it ready for mailing. For recurring jobs, this is easy using an ETL tool linked in with some addressing software, but for adhoc stuff it's a bit overkill. I've used inhouse developed stuff before (clunky but usable), but I don't want to have to re-develop that here. Any recommendations? Some features : Basic DBMS functionality (preferably with a proper DBMS backend for SQL support) Field concatenation (e.g. combine Firstname + Surname) "Pushing columns" (e.g. with address fields 1 - 8, push them left so if one is blank, the next one gets pushed up) Australia post mail sorting and dpid allocation (or can link into external tools relatively easily)

    Read the article

  • Qwt setAxisScale() locks up application when given numbers less than 2e-07 and greater than 0

    - by Dane Larsen
    I'm using Qwt for some scientific graphing, and I'm working with some fairly small numbers, the smallest being around 1.0e-22. I'm trying to call setAxisScale(xaxis, xmin, xmax) //xmin = 0, xmax = 2.0e-10 But when I do, the application locks up. I haven't found anything in the documentation that refers to a minimum value. Xmin and xmax are both doubles, so that shouldn't be a problem. Is this a bug in Qwt, or am I doing something wrong? Thanks in advance

    Read the article

  • Why differs floating-point precision in C# when separated by parantheses and when separated by state

    - by Andreas Larsen
    I am aware of how floating point precision works in the regular cases, but I stumbled on an odd situation in my C# code. Why aren't result1 and result2 the exact same floating point value here? const float A; // Arbitrary value const float B; // Arbitrary value float result1 = (A*B)*dt; float result2 = (A*B); result2 *= dt; From this page I figured float arithmetic was left-associative and that this means values are evaluated and calculated in a left-to-right manner. The full source code involves XNA's Quaternions. I don't think it's relevant what my constants are and what the VectorHelper.AddPitchRollYaw() does. The test passes just fine if I calculate the delta pitch/roll/yaw angles in the same manner, but as the code is below it does not pass: X Expected: 0.275153548f But was: 0.275153786f [TestFixture] internal class QuaternionPrecisionTest { [Test] public void Test() { JoystickInput input; input.Pitch = 0.312312432f; input.Roll = 0.512312432f; input.Yaw = 0.912312432f; const float dt = 0.017001f; float pitchRate = input.Pitch * PhysicsConstants.MaxPitchRate; float rollRate = input.Roll * PhysicsConstants.MaxRollRate; float yawRate = input.Yaw * PhysicsConstants.MaxYawRate; Quaternion orient1 = Quaternion.Identity; Quaternion orient2 = Quaternion.Identity; for (int i = 0; i < 10000; i++) { float deltaPitch = (input.Pitch * PhysicsConstants.MaxPitchRate) * dt; float deltaRoll = (input.Roll * PhysicsConstants.MaxRollRate) * dt; float deltaYaw = (input.Yaw * PhysicsConstants.MaxYawRate) * dt; // Add deltas of pitch, roll and yaw to the rotation matrix orient1 = VectorHelper.AddPitchRollYaw( orient1, deltaPitch, deltaRoll, deltaYaw); deltaPitch = pitchRate * dt; deltaRoll = rollRate * dt; deltaYaw = yawRate * dt; orient2 = VectorHelper.AddPitchRollYaw( orient2, deltaPitch, deltaRoll, deltaYaw); } Assert.AreEqual(orient1.X, orient2.X, "X"); Assert.AreEqual(orient1.Y, orient2.Y, "Y"); Assert.AreEqual(orient1.Z, orient2.Z, "Z"); Assert.AreEqual(orient1.W, orient2.W, "W"); } } Granted, the error is small and only presents itself after a large number of iterations, but it has caused me some great headackes.

    Read the article

  • Subsonic, child records, and collections

    - by Dane
    Hi, I've been working with subsonic for a few weeks now, and it is working really well. However, I've just run into an issue with child objects with additional partial properties. Some of it is probably me just not understanding the .Net object lifecycle. I have an object - search. This has a few properties like permissions and stuff, and it links to a child table called search_options. In my Asp.Net app, it loops through these search options and creates controls. Then on postback, it grabs the values and assigns it back to a "value" property on the search_option. This value property is a simple string that's defined in a partial class. I then want to create a method on the search object, called PerformSearch. This then loops through the child search_options, and performs a custom query based on the "value" property. However, even though I assign the "value" property to the child search_option, when I access it later via the search.search_options collection, it is null. I'm guessing that maybe because it's accessing it in two different places, it performs another lazy load from the DB and the value is lost? Is there a way to tell the class that it's already loaded or something? or a way to access it so it's not reloaded from the DB? Code is below (shitty pseudocode, not full version) : ASP.Net page, loading back the values from postback : dim obj_search as search = new subsonic.query.select().......' retrieves the search object for each opt as search_option in obj_search.search_options opt.Value = Ctype(FindControl("search_option_" + opt.search_option_id),Textbox).Text debug.print(opt.Value) ' value is correct next for each opt as search_option in obj_search.search_options debug.print(opt.Value) 'this is nothing next Now, the partial class : public partial class search_option private m_value as string public property Value() as string get return m_value end get set( byval value as string) m_value = value end set end property end class

    Read the article

  • Qwt setAxisScale() seems to lock up application when given numbers with greater precision than 2e-07

    - by Dane Larsen
    I'm using Qwt for some scientific graphing, and I'm working with some fairly small numbers, the smallest being around 1.0e-22. I'm trying to call setAxisScale(xaxis, xmin, xmax) //xmin = 0, xmax = 2.0e-10 But when I do, the application locks up. I haven't found anything in the documentation that refers to a minimum value. Xmin and xmax are both doubles, so that shouldn't be a problem. Is this a bug in Qwt, or am I doing something wrong? Thanks in advance

    Read the article

  • Where'd my sounds go?

    - by Dane Man
    In my Row class I have the initWithCoder method and everything restored in that method works fine, but only within the method. After the method is called I loose an array of sounds that is in my Row class. The sounds class also has the initWithCoder method, and the sound plays fine but only in the Row class initWithCoder method. After decoding the Row object, the sound array disappears completely and is unable to be called. Here's my source for the initWithCoder: - (id) initWithCoder:(NSCoder *)coder { ... soundArray = [coder decodeObjectForKey:@"soundArray"]; NSLog(@"%d",[soundArray count]); return self; } the log shows the count as 8 like it should (this is while unarchiving). Then the row object I create gets assigned. And the resulting row object no longer has a soundArray. [NSKeyedArchiver archiveRootObject:row toFile:@"DefaultRow"]; ... row = [NSKeyedUnarchiver unarchiveObjectWithFile:@"DefaultRow"]; So now whenever I call the soundArray it crashes. //ERROR IS HERE NSLog(@"%d",[[row soundArray] count]); Help please (soundArray is an NSMutableArray).

    Read the article

  • What happens with unarchived objects?

    - by Dane Man
    After I've unarchived an object with NSKeyedUnarchiver, I am able to use it like usual, but I am unable to re-archive it. When I try, it crashes. [NSKeyedArchiver archiveRootObject:unarchivedObject toFile:fileName]; I tried looking in the developer resources in apple but I haven't seen a thorough explination of proper usage of NSKeyedArchiver. Please Help.

    Read the article

  • EntityFramework .net 4 Update entity with a simple method

    - by Dennis Larsen
    I was looking at this SO question: http://stackoverflow.com/questions/1168215/ado-net-entity-framework-update-only-certian-properties-on-a-detached-entity. This was a big help for me. I know now that I need to attach an entity before making my changes to it. But how can do I do this: I have an MVC website, a Customer Update Page with fields: ID, Name, Address, etc. My MVC is parsing this into a Customer entity. How do I do the following: Update my entity and Save the changes to it. Catch the exception if my changes have been made since I loaded my entity.

    Read the article

  • Javascript Onclicks not working?

    - by Georges Oates Larsen
    I have a jQuery application which finds a specific div, and edit's its inner HTML. As it does this, it adds several divs with onclicks designed to call a function in my JS. For some strange reason, clicking on these never works if I have a function defined in my code set to activate. However, it works fine when calling "alert("Testing");". I am quite bewildered at this as I have in the past been able to make code-generated onclicks work just fine. The only thing new here is jQuery.

    Read the article

  • Using Fortran to call C++ Functions

    - by Dane Larsen
    I'm trying to get some FORTRAN code to call a couple c++ functions that I wrote (c_tabs_ being one of them). Linking and everything works just fine, as long as I'm calling functions that don't belong to a class. My problem is that the functions I want the FORTRAN code to call belong to a class. I looked at the symbol table using nm and the function name is something ugly like this: 00000000 T _ZN9Interface7c_tabs_Ev FORTRAN won't allow me to call a function by that name, because of the underscore at the beginning, so I'm at a loss. The symbol for c_tabs when it's not in a class is quite simple, and FORTRAN has no problems with it: 00000030 T c_tabs_ Any suggestions? Thanks in advance.

    Read the article

  • Google code: what kind of license should I use?

    - by Dran Dane
    Hello I would like to store my code on a repository such as Google Code. What kind of license should I use? I don't want to block me. My code may be open source and reused by others but I want to be able to reuse it in any open source project or not, and gainful project or not. Thank you.

    Read the article

  • FORTRAN function returning an array causes a segfault (calling from C++)

    - by Dane Larsen
    Basically, here's my problem. I'm calling someone else's FORTRAN functions from my C++ code, and it's giving me headaches. Some code: function c_error_message() character(len = 255) :: c_error_message errmsg(1:9) = 'ERROR MSG' return end That's the FORTRAN function. My first question is: Is there anything in there that would cause a segfault? If not, then second: What does that return? A pointer? I'm trying to call it with the following C statement: char *e = c_error_message_(); That causes a segfault. c_error_message(); That too causes a segfault. I declared c_error_message_() earlier on with the following code: extern"C" { char* c_error_message_(); } Would declaring a function with a different return type than the actual return type cause a segfault? I'm at a loss. Thanks for any replies.

    Read the article

  • Add C pointer to NSMutableArray

    - by Georges Oates Larsen
    I am writing an Objective-C program that deals with low level image memory. I am using ANSI-C structs for my data storage -- Full blown objects seem overkill seeing as the data I am storing is 100% data, with no methods to operate on that data. Specifically, I am writing a customizable posterization algorithm which relies on an array of colors -- This is where things get tricky. I am storing my colors as structs of three floats, and an integer flag (related to the posterization algorithm specifically). Everyhting is going well, except for one thing... [actual question] I can't figure out how to add pointers to an NSMutableArray! I know how to add an object, but adding a pointer to a struct seems to be more difficult -- I do not want NSMutableArray dereferencing my pointer and treating the struct as some sort of strange object. I want NSMutableArray to add the pointer its self to its collection. How do I go about doing this? Thanks in advance, G

    Read the article

  • Django Date Input Parsing?

    - by Dane Larsen
    I'm trying to get a date for an event from a user. The input is just a simple html text input. My main problem is that I don't know how to parse the date. If I try to pass the raw string, I get a TypeError, as expected. Does Django have any date-parsing modules?

    Read the article

  • Why does my program occasionally segfault when out of memory rather than throwing std::bad_alloc?

    - by Bradford Larsen
    I have a program that implements several heuristic search algorithms and several domains, designed to experimentally evaluate the various algorithms. The program is written in C++, built using the GNU toolchain, and run on a 64-bit Ubuntu system. When I run my experiments, I use bash's ulimit command to limit the amount of virtual memory the process can use, so that my test system does not start swapping. Certain algorithm/test instance combinations hit the memory limit I have defined. Most of the time, the program throws an std::bad_alloc exception, which is printed by the default handler, at which point the program terminates. Occasionally, rather than this happening, the program simply segfaults. Why does my program occasionally segfault when out of memory, rather than reporting an unhandled std::bad_alloc and terminating?

    Read the article

  • Document -> Flash viewer, not hosted

    - by Dane
    I've got a content management solution where we present scanned images (TIFF), PDFs, word docs for viewing. While we can simply embed a PDF, sometimes depending on user preferences it's a bit fiddly and sometimes not user-intuitive. I'd like a solution like scribd, embedit, etc, but not hosted. I want to run the application on our own servers and manage it that way (for legal reasons, and our clients won't buy the service if it's hosted somewhere else). SWFtools looks a little basic for my needs, plus doesn't do doc, docx or ppt. Any options? Doesn't have to be free, but would be ideal.

    Read the article

  • How do I create a patch compared to another changeset in Eclipse?

    - by Larsen
    I started working on an open source project that is using CVS where I want to submit patches. After having edited some files, I created a patch from the files that Eclipse showed as changed. Now I need to change a file for the second patch (that file is already in the first changeset), but the changes from the first changeset shouldn´t be in the second changeset. Therefore, I would need to somehow tell Eclipse that it should compare the changes to the result of the first changeset instead of to the CVS head revision. How can I do that?

    Read the article

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