Search Results

Search found 2030 results on 82 pages for 'jason clawson'.

Page 4/82 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • NHibernate HiLo generation and SQL 2005/8 Schemas

    - by Kirk Clawson
    I have an issue on my hands that I've spent several days searching for an answer to no avail... We're using HiLo Id generation, and everything seems to be working fine, as long as the entity table is in the same schema as the hibernate_unique_key table. The table structure is pretty simple. I have my hi value table in the db as dbo.hibernate_unique_key. Several entity table are also in the dbo schema, and they work without issue. Then we have tables under the "Contact" schema (such as Contact.Person and Contact.Address). In the Person Mapping file: <class name="Person" table="Person" schema="Contact"> <id name="Id" unsaved-value="0"> <generator class="hilo"> <param name="max_lo">100</param> </generator> </id> ... When I try to insert a Person entity, I get an error of "Invalid object name 'Contact.hibernate_unique_key'. That error is certainly clear enough. So I add: <param name="schema">dbo</param> to my mapping file/generator element. Now, when the SessionFactory is built, I get a "An item with the same key has already been added." error. So now I'm a bit stuck. I can't leave the HiLo generator without a schema, because it picks up the schema from the Class, and I can't specify the schema because it's already been added (presumably because it's my "default_schema" as identified in my XML cfg file). Am I completely hosed here? Must I either A) Keep all my tables in the dbo schema or B) Create a separate HiLo Key table for each unique schema in the DB? Neither of those scenarios is particularly palatable for my application, so I'm hoping that I can "fix" my mapping files to address this issue.

    Read the article

  • VB.Net Custom Object Master-Detail Data Binding

    - by clawson
    Since beginning to use VB.Net some years ago I have become slowly familiar with using the data binding features of .Net, however I often find my self bewildered by it's behavior and instead of discover the correct way it should work I find some dirty work around to suit my needs and continue on. Needless to say my problems continue to arise. I am using Custom Objects as the Data Sources for by controls and often entire forms. I find it frustrating to separate business logic and the graphical interface. (That could be a new question entirely.) So for a lot of objects I generate a form which has the DataBindingSource for the object. When I create each from using the New Constructor I explicitly pass to it the object to which it should be bound, and then set this passed object as the DataSource of the BindingSource. (That's a mouthful!) Now the Master object (say, bound to each form) often contains a List of objects which I like to have displayed in a DataGridView. I (sometimes) create and modify these child objects in their own form (again creating a databind the same way as the master form) but when I add them to the List in the master object the DataGridView won't update with the new items. So my question really has a few layers: How can I easily/efficiently/correctly update this DataGridView with the list of Detail objects when I add them to the list of the Master object. Is this approach to DataBinding good/viable. What's the best way to separate business logic from graphical interface. Thanks for the help!

    Read the article

  • Combine master-detail databinding

    - by clawson
    I have created data sources from my objects in my project, some of which have other objects as members. When I want to bind a some objects to a data grid I would like to display some of the values from the member objects in the data grid as well but the examples I have come across seem to use an entire other datagrid or controls to display these member object values. How can I combine these values into one data grid? (Preferably without creating a wrapping class) Can I achieve this with LINQ somehow? Your help is greatly appreciated. Thanks P.S. C# or VB examples will do.

    Read the article

  • Updating Database from DataSet

    - by clawson
    I am having trouble updating my Database from my code using a DataSet. I'm using SQL Server 2008 and Visual Studio 2008. Here is what I've done so far. I have created a table in SQL Server called MyTable which has two columns: id nchar(10), and name nchar(50). I have then created a datasource in my VB.net project that consists of this table using the dataset wizard and called this dataset MyDataSet. I run the following code on a button click: Try Dim myDataSet As New MyDataSet Dim newRow As MyDataSet.MyTableRow = myDataSet.MyTable.NewMyTableRow newRow.id = "1" newRow.name = "Alpha" myDataSet.MyTable.AddMyTableRow(newRow) myDataSet.AcceptChanges() Catch ex As Exception MsgBox(ex.Message) End Try when I run this and check the rows in SQL Server it returns 0 rows What have I missed? How can I add these rows / save changes in a dataset to the database? I have seen other examples that use a TableAdapter but I don't think I want to do this, I think I should be able to achieve this just using a DataSet. Am I mistaken? Help is greatly appreciated!

    Read the article

  • ShowDialog won't run

    - by clawson
    I've come across a situation where I try to run a simple line of code in a method Dim res As DialogResult = frmOptions.ShowDialog() but nothing happens. The dialog box will not appear. If I run this method from another location in the code it executes fine (i.e. displays the form in dialog mode and code executes fine thereafter). Hence, it may be the way in which I arrive at this code that is causing my problem, but I cannot see to find what is wrong. When I pause the debugger the line of code is highlighted in green but I can't see to step over it or into it. Any idea what may cause this to happen, or what I should be looking for that might be causing the problem?? Thanks for the help!

    Read the article

  • Catch Exception in Application Startup (VS.Net)

    - by clawson
    I'm getting a System.NullReferenceException when my application starts up (after a small login screen) which doesn't crash the entire app but prevents it from loading correctly. How can I get the VS.Net debugger to stop at the error so I can fix it? The output I'm getting in the Immediate Window is: A first chance exception of type 'System.NullReferenceException' occurred in GrelisCrampApp.exe

    Read the article

  • Does a custom DataGridView Cell have to have a parameterless constructor?

    - by clawson
    I want to slight variation of the custom cell code example from the MS website How to: Customize Cells and Columns in the Windows Forms DataGridView Control by Extending Their Behavior and Appearance by passing an argument to the custom cell constructor. Public Sub New(ByVal a As Object) End Sub but then when I run the code it throws and exception MissingMethodException occured No parameterless constructor defined for this object. Does this mean that custom cells must have a parameterless constructor? Thanks.

    Read the article

  • Databinding a property with a parameter

    - by clawson
    I would like to databind to a property that requires arguments. What is the best way do to this? are there work arounds? I'm open to any suggestions. I thought about defining custom columns and cells because the parameters that the property requires are available from the within the object bound to the row, but I'm having trouble materialising this idea. Thanks in advance for the help.

    Read the article

  • Form.ShowDialog() does not show form.

    - by clawson
    I've come across a situation where I try to run a simple line of code in a method Dim res As DialogResult = frmOptions.ShowDialog() but nothing happens. The dialog box will not appear. If I run this method from another location in the code it executes fine (i.e. displays the form in dialog mode and code executes fine thereafter). Hence, it may be the way in which I arrive at this code that is causing my problem, but I cannot see to find what is wrong. When I pause the debugger the line of code is highlighted in green but I can't see to step over it or into it. Any idea what may cause this to happen, or what I should be looking for that might be causing the problem?? Thanks for the help!

    Read the article

  • Write Null/Nothing value with Databinding

    - by clawson
    I have extended a MaskedTextBox component to add some functionality. The text property of the extended MaskedTextBox is bound to a DateTime? property and the format of binding is set to a time format of "HH:mm:ss" (i.e. 24hr time). So that this masked text box will capture the display a time. The extra functionality I have added is to make the component readonly unless the component is double clicked or the enter button is pressed (the back color of the control helps to inform the users if the component is locked/readonly or not). When the enter button is pressed I also suspend the bindings so that bound data is updated the users input won't be lost. The information is then written back to the value and databindings resumed when the user presses the enter key again. This all works fine up to here, with values written and displayed as would be expected. However, I also want to write the null or nothing value to the DateTime? property if the user hasn't entered any text (or invalid text but let's just stick with no text) when enter key is pressed to submit the new value. Unlike with other valid entries in the MaskedTextBox, with no text entered when i execute: Me.DataBindings("Text").WriteValue() (when 'locking' the MaskedTextBox) it then branches to the bound properties Get method as I step into each line of code in the debugger (as opposed to the Set method with other valid entries) How can I write this null/nothing/"" value to the DateTime? property when no text "" is entered into the MaskedTextBox? Thanks for the help!

    Read the article

  • Why does sorted list have to have a key value pair?

    - by clawson
    If I just want a sorted list of just dates, integers, or doubles is it really necessary to have to define a SortedList(of Integer, Integer)? Seems intriguing to me, but may just be trival. I'd prefer just to use a SortedList(of Integer). (This question is in relation to the .Net generic collections)

    Read the article

  • Synclock a section of code while waiting for ShowDialog to return

    - by clawson
    I'm having trouble working out how to lock my application out of a section of code while it waits for a response from an external program. I've used Synclock on a section of code with the Me object in the expression. In this Synclock I call an overridden ShowDialog method of a dialog box, which has a timeout parameter, but does return the value from the underlying ShowDialog function call ,once the timer is setup. Works like this. SyncLock Me Dim frmDlgWithTimeout As New frmDlgWithTimeout ' dialog box with overridden ShowDialog ' Dim res As DialogResult = frmDlgWithTimeout.ShowDialog(10 * 1000) ' 10 sec timeout ' End SyncLock Now, external programs may raise events that bring my application to this Synclock but it doesn't prevent it from entering it, even though the ShowDialog function hasn't returned a value (and hence what I thought would keep the section of code locked). There is only one instance of the object that is used for lock in the program. Your help is greatly appreciated.

    Read the article

  • Sql order by within a group by with aggregate

    - by NG
    Say I have Team/Name/Some number Cardinals Jason 8 Cardinals Chris 5 Yankees Joba 6 Cubs Carlos 6 Cardinals Chris 6 And I want Cardinals Jason 8 Cardinals Chris 11 Cubs Carlos 6 Yankees Joba 6 So, what I'm doing is grouping by team, grouping by name, summing by some number However, within cardinals I want to make sure the names are in a particular order. If I just do an "order by name desc" for example then the the whole grouping gets ignored. So how can I order within a group.

    Read the article

  • Including email, IMs, configs, etc. in documentation or notes

    - by Jason Antman
    The shop I work in is pretty laid-back. We're on a documentation kick, only because historically we've been very bad with it. We do a lot of our brainstorming in face-to-face meetings, and also do a lot of communication via IM in addition to email. While I'm usually pretty good about documentation and keeping copious lab notes, I just finished a build of a host and spent hours searching through IMs, emails, files on my workstation, etc. to pull out anything I missed in my lab notes, which formed a large amount of the basis for the internal documentation. Does anyone have any thoughts on, aside from manually saving things to a project directory, managing various data sources (especially email and IM) and tracking them on project basis? Ideally, I'd like an easy way to put copies of emails, IM logs, etc. into a project-specific directory on my workstation and then just have a cron job that syncs that up with a shared folder. This isn't really a candidate for anything more advanced, as the bulk of the data will be copies of configs, code, etc. Here are the big restrictions: Email is via a centralized Zimbra install, so nothing can happen server-side. My workstation is Linux. Aside from writing Pidgin and Thunderbird plugins that let me tag chats and emails as belonging to a project, and then copy them to the appropriate place... any thoughts? Suggestions? Thanks, Jason

    Read the article

  • CUDA: cudaMemcpy only works in emulation mode.

    - by Jason
    I am just starting to learn how to use CUDA. I am trying to run some simple example code: float *ah, *bh, *ad, *bd; ah = (float *)malloc(sizeof(float)*4); bh = (float *)malloc(sizeof(float)*4); cudaMalloc((void **) &ad, sizeof(float)*4); cudaMalloc((void **) &bd, sizeof(float)*4); ... initialize ah ... /* copy array on device */ cudaMemcpy(ad,ah,sizeof(float)*N,cudaMemcpyHostToDevice); cudaMemcpy(bd,ad,sizeof(float)*N,cudaMemcpyDeviceToDevice); cudaMemcpy(bh,bd,sizeof(float)*N,cudaMemcpyDeviceToHost); When I run in emulation mode (nvcc -deviceemu) it runs fine (and actually copies the array). But when I run it in regular mode, it runs w/o error, but never copies the data. It's as if the cudaMemcpy lines are just ignored. What am I doing wrong? Thank you very much, Jason

    Read the article

  • Article search engine in php

    - by Jason
    Hello, I am using sphinx as a search engine on my website its working perfect and I have no complain with it. The only thing it lacks is, it does not allow me to search articles whose query length is more than 15 words. I know in reality people don't use more than 3-4 words i want to use it for finding duplicate contents. I was wondering if there is any alternative solution to sphinx. I want to cope with duplicate contents. My main articles table is in innodb but I am also caching articles into MyISAM table as well for full text searching but when I search an article it takes ages to perform one search. Its not the query problem, i think mysql lacks the fulltext searching facility. Thanks Jason

    Read the article

  • MATLAB: dealing with java.lang.String

    - by Jason S
    I seem to be stuck in Kafka-land, with a java.lang.String that I can't seem to use in MATLAB functions: K>> name name = Jason K>> sprintf('%s', name) ??? Error using ==> sprintf Function is not defined for 'java.lang.String' inputs. K>> ['my name is ' name] ??? Error using ==> horzcat The following error occurred converting from char to opaque: Error using ==> horzcat Undefined function or method 'opaque' for input arguments of type 'char'. how can I get a java.lang.String to convert to a regular MATLAB character array?

    Read the article

  • Sharepoint calendar webpart change views

    - by Jason
    Hi there, I created a calendar list, and I added the calendar web part in another web part page. I noticed that i can not change the view without going to edit mode, then go to modify shared web part. But in the home page of the calendar. There is a same calendar web part with a drop down menu to change views. Also, there is a small calendar connected to the main calendar web part in the left navigation area. I don't know how to add it to my web part page. How can i make it look the same on my web part page? Thanks, Jason

    Read the article

  • Setting a cookie before Javascript Redirection

    - by Jason
    Hello, I have a Rails app where I set a set a session variable the moment a user lands on my site with the referer and the page they hit. Additionally, I have Google Optimizer sending traffic from my homepage to various landing pages. The problem is that I think Google Optimizer is sending users away before the cookie is set. Is that even possible? I believe that the cookie is set from the HTTP Header, which must have fully loaded before Google's Javascript has even loaded. Thanks, Jason

    Read the article

  • Named Blueprints with factory_girl

    - by Jason Nerer
    I am using Factory Girl but like the machinist syntax. So I wonder, if there is any way creating a named blueprint for class, so that I can have something like that: User.blueprint(:no_discount_user) do admin false hashed_password "226bc1eca359a09f5f1b96e26efeb4bb1aeae383" is_trader false name "foolish" salt "21746899800.223524289203464" end User.blueprint(:discount_user) do admin false hashed_password "226bc1eca359a09f5f1b96e26efeb4bb1aeae383" is_trader true name "deadbeef" salt "21746899800.223524289203464" discount_rate { DiscountRate.make(:rate => 20.00) } end DiscountRate.blueprint do rate {10} not_before ... not_after ... end Is there a way making factory_girl with machinist syntax acting like that? I did not find one. Help appreciated. Thx in advance Jason

    Read the article

  • Click GEvent.addListener with jquery

    - by Jason
    Created a google map with GMap2 and put pinpoints on there that open up a balloon with the address when the pinpoint is clicked. I would like users to be able to click text on the page itself and use jquery to open up the corresponding balloon. However I can't figure out the ID to use to call a jquery click event. Basically I've got a store listing down the left side and when user clicks store name I want it to open up the corresponding balloon. GEvent.addListener(marker_500, "click", function () { map.openInfoWindowHtml(point, myHtml); } Any idea what element tied to this click event is? Tried $("#marker_500").click(); And that doesn't work. Also tried alerting $(this).attr('id'); inside the click function and that is undefined. thanks jason

    Read the article

  • Javascript array of href's

    - by Jason
    Hi, I am trying to create an array with different href's to then attach to 5 separate elements. This is my code: var link = new Array('link1', 'link2', 'link3', 'link4', 'link5'); $(document.createElement("li")) .attr('class',options.numericId + (i+1)) .html('<a rel='+ i +' href=\"page.php# + 'link'\">'+ '</a>') .appendTo($("."+ options.numericId)) As you can see I am trying to append these items from the array to the end of my page so each link will take the user to a different section of the page. But i have not been able to do this. Is there a way to to create elements with different links? I am new to javascript so I am sorry if this doesn't make a whole lot of sense. If anyone is confused by what i am asking here I can try to clarify if I get some feedback. Any solutions would be greatly appreciated. Thanks, jason

    Read the article

  • glibc backtrace - can't redirect output to file

    - by Jason Antman
    Hi, I'm in the process of debugging a C program (that I didn't write). I have all of the internal debugging tools (a whole bunch of printf's) enabled, and I wrote a small PHP script that uses proc_open() and just grabs both stdout and stderr, and time-coordinates them in one file. At the moment, the binary is dieing with a realloc() error that's caught by glibc, and a glibc backtrace is printed, beginning with: *** glibc detected *** /sbin/rsyslogd: realloc(): invalid next size: 0x00002ace626ac910 *** Here's the thing I don't understand: I've confirmed that the PHP script is catching both stdout and stderr from the binary's process and writing them to the correct files, but this backtrace is still printed to the console. Where is this coming from? Is there some magical output channel other than stdout and stderr? Any ideas on how I go about capturing this backtrace to a file, or sending it out with stderr? Thanks, Jason

    Read the article

  • ASP.NET Web User Control with Javascript used multiple times on a page - How to make javascript func

    - by Jason Summers
    I think I summed up the question in the title. Here is some further elaboration... I have a web user control that is used in multiple places, sometimes more than once on a given page. The web user control has a specific set of JavaScript functions (mostly jQuery code) that are containted within *.js files and automatically inserted into page headers. However, when I want to use the control more than once on a page, the *.js files are included 'n' number of times and, rightly so, the browser gets confused as to which control it's meant to be executing which function on. What do I need to do in order to resolve this problem? I've been staring at this all day and I'm at a loss. All comments greatly appreciated. Jason

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >