Search Results

Search found 2455 results on 99 pages for 'blueraja the green unicorn'.

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

  • Thank you Geeks With Blogs for letting me join your community!

    - by GreeNTUG
    First, a link to the blog I can no longer edit because Office Live blew away my digital identity and so I can no longer log into it (the source of a loooong blog about protecting your digital identity sometime when I have more time and after it has played out to the end) http://greentug.spaces.live.com/ The following are the communities I participate in: Green & Sustainability.  I run a virtual user group on Green and Sustainability as it relates to developers and software architects.  It was located at greentug.groups.live.com, and we will need to find a new digital location for it, because I am locked out of that site as well. BizSpark Tampa Bay:  I run a BizSpark group for Microsoft technologists (meetup.com, search for BizSpark Tampa Bay) and speak at Code Camps about "No Better Time to Start Your Own Tech Business".  The meetup group facilitates a balanced presentation that is respectful to anyone wanting to start their own business, whether part-time or full-time, whether micro (just you), sustainable (grow to 2-25-ish, self-funded), high growth (get venture capital or other funding, grow it, sell it within 5 years, do it again), or hybrid (the new model going forward).  It is an "action" group, with assignments and homework if you want to get the most out of it.   At the end of a year you will either have your business on the path to where you want it to be, or you will know the steps you need to do to get it there. Women in Technology Have been participating in the Women in Technology community since 2008, my main interests in this area are mentoring women in the workplace to have them believe they can become geeks and double their income, and to mentor them with respect to starting and running their own business. Access 2010/SharePoint 2010.  This is a game-changer with respect to the Access community (the ap both devs and IT Pros love to hate, the other a-word that's not a fruit).  I conducted Lunch n Learns and Brunch n Learns around this topic before the Office 2010/SharePoint 2010 launch, and spoke on the topic at SharePoint Saturday Tampa in Nov 2009. Interested in learning more about: Using Silverlight HD Streaming out in the non-technical world (horses and equestrian sport).  Migrating to Access Web Services and VB .Net from VBA (see the Access 2010/SharePoint 2010 interest above) Windows Phone 7!  Exciting opportunities both for Green and Sustainability and for my "day job" of Environmental, Health & Safety (EHS). My day job is Environmental, Health & Safetey (EHS) consulting and software solutions, where that interfaces with the developer world is with respect to opportunities around Green and Sustainability, The SmartGrid and Juval Lowy's EnergyNet, both of which will require a lot of technology and software to make them work, The new Microsoft Partner competency for "Digital Home", and The Y2K kind of deadline around how managing chemicals in ERP systems is changing because of Global Harmonization, which hits the EU with a hard deadline on 11/30/10 (yes, this year), and hits the USA about 15 months later. Hope you enjoy my contributions to the digital geek community, and feel free to email me, [email protected] (the email leftover after my digital identity was blown away), and [email protected] (this one could go away at some future point) Best, Kathy Malone

    Read the article

  • Who could ask for more with LESS CSS? (Part 3 of 3&ndash;Clrizr)

    - by ToString(theory);
    Welcome back!  In the first two posts in this series, I covered some of the awesome features in CSS precompilers such as SASS and LESS, as well as how to get an initial project setup up and running in ASP.Net MVC 4. In this post, I will cover an actual advanced example of using LESS in a project, and show some of the great productivity features we gain from its usage. Introduction In the first post, I mentioned two subjects that I will be using in this example – constants, and color functions.  I’ve always enjoyed using online color scheme utilities such as Adobe Kuler or Color Scheme Designer to come up with a scheme based off of one primary color.  Using these tools, and requesting a complementary scheme you can get a couple of shades of your primary color, and a couple of shades of a complementary/accent color to display. Because there is no way in regular css to do color operations or store variables, there was no way to accomplish something like defining a primary color, and have a site theme cascade off of that.  However with tools such as LESS, that impossibility becomes a reality!  So, if you haven’t guessed it by now, this post is on the creation of a plugin/module/less file to drop into your project, plugin one color, and have your primary theme cascade from it.  I only went through the trouble of creating a module for getting Complementary colors.  However, it wouldn’t be too much trouble to go through other options such as Triad or Monochromatic to get a module that you could use off of that. Step 1 – Analysis I decided to mimic Adobe Kuler’s Complementary theme algorithm as I liked its simplicity and aesthetics.  Color Scheme Designer is great, but I do believe it can give you too many color options, which can lead to chaos and overload.  The first thing I had to check was if the complementary values for the color schemes were actually hues rotated by 180 degrees at all times – they aren’t.  Apparently Adobe applies some variance to the complementary colors to get colors that are actually more aesthetically appealing to users.  So, I opened up Excel and began to plot complementary hues based on rotation in increments of 10: Long story short, I completed the same calculations for Hue, Saturation, and Lightness.  For Hue, I only had to record the Complementary hue values, however for saturation and lightness, I had to record the values for ALL of the shades.  Since the functions were too complicated to put into LESS since they aren’t constant/linear, but rather interval functions, I instead opted to extrapolate the HSL values using the trendline function for each major interval, onto intervals of spacing 1. For example, using the hue extraction, I got the following values: Interval Function 0-60 60-140 140-270 270-360 Saturation and Lightness were much worse, but in the end, I finally had functions for all of the intervals, and then went the route of just grabbing each shades value in intervals of 1.  Step 2 – Mapping I declared variable names for each of these sections as something that shouldn’t ever conflict with a variable someone would define in their own file.  After I had each of the values, I extracted the values and put them into files of their own for hue variables, saturation variables, and lightness variables…  Example: /*HUE CONVERSIONS*/@clrizr-hue-source-0deg: 133.43;@clrizr-hue-source-1deg: 135.601;@clrizr-hue-source-2deg: 137.772;@clrizr-hue-source-3deg: 139.943;@clrizr-hue-source-4deg: 142.114;.../*SATURATION CONVERSIONS*/@clrizr-saturation-s2SV0px: 0;@clrizr-saturation-s2SV1px: 0;@clrizr-saturation-s2SV2px: 0;@clrizr-saturation-s2SV3px: 0;@clrizr-saturation-s2SV4px: 0;.../*LIGHTNESS CONVERSIONS*/@clrizr-lightness-s2LV0px: 30;@clrizr-lightness-s2LV1px: 31;@clrizr-lightness-s2LV2px: 32;@clrizr-lightness-s2LV3px: 33;@clrizr-lightness-s2LV4px: 34;...   In the end, I have 973 lines of mapping/conversion from source HSL to shade HSL for two extra primary shades, and two complementary shades. The last bit of the work was the file to compose each of the shades from these mappings. Step 3 – Clrizr Mapper The final step was the hardest to overcome as I was still trying to understand LESS to its fullest extent.  Imports As mentioned previously, I had separated the HSL mappings into different files, so the first necessary step is to import those for use into the Clrizr plugin: @import url("hue.less");@import url("saturation.less");@import url("lightness.less"); Extract Component Values For Each Shade Next, I extracted the necessary information for each shade HSL before shade composition: @clrizr-input-saturation: 1px+floor(saturation(@clrizr-input))-1;@clrizr-input-lightness: 1px+floor(lightness(@clrizr-input))-1; @clrizr-complementary-hue: formatstring("clrizr-hue-source-{0}", ceil(hue(@clrizr-input))); @clrizr-primary-2-saturation: formatstring("clrizr-saturation-s2SV{0}",@clrizr-input-saturation);@clrizr-primary-1-saturation: formatstring("clrizr-saturation-s1SV{0}",@clrizr-input-saturation);@clrizr-complementary-1-saturation: formatstring("clrizr-saturation-c1SV{0}",@clrizr-input-saturation); @clrizr-primary-2-lightness: formatstring("clrizr-lightness-s2LV{0}",@clrizr-input-lightness);@clrizr-primary-1-lightness: formatstring("clrizr-lightness-s1LV{0}",@clrizr-input-lightness);@clrizr-complementary-1-lightness: formatstring("clrizr-lightness-c1LV{0}",@clrizr-input-lightness); Here, you can see a couple of odd things…  On the first line, I am using operations to add units to the saturation and lightness.  This is due to some limitations in the operations that would give me saturation or lightness in %, which can’t be in a variable name.  So, I use first add 1px to it, which casts the result of the following functions as px instead of %, and then at the end, I remove that pixel.  You can also see here the formatstring method which is exactly what it sounds like – something like String.Format(string str, params object[] obj). Get Primary & Complementary Shades Now that I have components for each of the different shades, I can now compose them into each of their pieces.  For this, I use the @@ operator which will look for a variable with the name specified in a string, and then call that variable: @clrizr-primary-2: hsl(hue(@clrizr-input), @@clrizr-primary-2-saturation, @@clrizr-primary-2-lightness);@clrizr-primary-1: hsl(hue(@clrizr-input), @@clrizr-primary-1-saturation, @@clrizr-primary-1-lightness);@clrizr-primary: @clrizr-input;@clrizr-complementary-1: hsl(@@clrizr-complementary-hue, @@clrizr-complementary-1-saturation, @@clrizr-complementary-1-lightness);@clrizr-complementary-2: hsl(@@clrizr-complementary-hue, saturation(@clrizr-input), lightness(@clrizr-input)); That’s is it, for the most part.  These variables now hold the theme for the one input color – @clrizr-input.  However, I have one last addition… Perceptive Luminance Well, after I got the colors, I decided I wanted to also get the best font color that would go on top of it.  Black or white depending on light or dark color.  Now I couldn’t just go with checking the lightness, as that is half the story.  You see, the human eye doesn’t see ALL colors equally well but rather has more cells for interpreting green light compared to blue or red.  So, using the ratio, we can calculate the perceptive luminance of each of the shades, and get the font color that best matches it! @clrizr-perceptive-luminance-ps2: round(1 - ( (0.299 * red(@clrizr-primary-2) ) + ( 0.587 * green(@clrizr-primary-2) ) + (0.114 * blue(@clrizr-primary-2)))/255)*255;@clrizr-perceptive-luminance-ps1: round(1 - ( (0.299 * red(@clrizr-primary-1) ) + ( 0.587 * green(@clrizr-primary-1) ) + (0.114 * blue(@clrizr-primary-1)))/255)*255;@clrizr-perceptive-luminance-ps: round(1 - ( (0.299 * red(@clrizr-primary) ) + ( 0.587 * green(@clrizr-primary) ) + (0.114 * blue(@clrizr-primary)))/255)*255;@clrizr-perceptive-luminance-pc1: round(1 - ( (0.299 * red(@clrizr-complementary-1)) + ( 0.587 * green(@clrizr-complementary-1)) + (0.114 * blue(@clrizr-complementary-1)))/255)*255;@clrizr-perceptive-luminance-pc2: round(1 - ( (0.299 * red(@clrizr-complementary-2)) + ( 0.587 * green(@clrizr-complementary-2)) + (0.114 * blue(@clrizr-complementary-2)))/255)*255; @clrizr-col-font-on-primary-2: rgb(@clrizr-perceptive-luminance-ps2, @clrizr-perceptive-luminance-ps2, @clrizr-perceptive-luminance-ps2);@clrizr-col-font-on-primary-1: rgb(@clrizr-perceptive-luminance-ps1, @clrizr-perceptive-luminance-ps1, @clrizr-perceptive-luminance-ps1);@clrizr-col-font-on-primary: rgb(@clrizr-perceptive-luminance-ps, @clrizr-perceptive-luminance-ps, @clrizr-perceptive-luminance-ps);@clrizr-col-font-on-complementary-1: rgb(@clrizr-perceptive-luminance-pc1, @clrizr-perceptive-luminance-pc1, @clrizr-perceptive-luminance-pc1);@clrizr-col-font-on-complementary-2: rgb(@clrizr-perceptive-luminance-pc2, @clrizr-perceptive-luminance-pc2, @clrizr-perceptive-luminance-pc2); Conclusion That’s it!  I have posted a project on clrizr.codePlex.com for this, and included a testing page for you to test out how it works.  Feel free to use it in your own project, and if you have any questions, comments or suggestions, please feel free to leave them here as a comment, or on the contact page!

    Read the article

  • How do I calculate opposite of a vector, add some slack

    - by Jason94
    How can i calulate a valid range (RED) for my object's (BLACK) traveling direction (GREEN). The green is a Vector2 where x and y range is -1 to 1. What I'm trying to do here is to create rocket fuel burn effekt. So what i got is rocket speed (float) rocket direction (Vector2 x = [-1, 1], y = [-1, 1]) I may think that rocket speed does not matter as fuel burn effect (particle) is created on position with its own speed.

    Read the article

  • CSS alignment differs per page, cant find reason [migrated]

    - by Floran
    I list products on my homepage and on a company details page. I use the exact same HTML, but for some reason the product appears different: The productname is "Artikel 1". Here the product is displayed correctly: http://www.zorgbeurs.nl/ Notice how the green price area is right below the product. But here: http://www.zorgbeurs.nl/bedrijven/76/mymedical the green price area is all the way at the bottom of the page. Why?

    Read the article

  • Registration Open for 2015 Oracle Value Chain Summit

    - by Terri Hiskey
    Registration has opened for the Oracle Value Chain Summit, taking place January 26-28 in San Jose, California. Register now and take advantage of the Super Saver rate of only $495 (a $400 savings from the regular registration rate), good through September 26. Click here to register today, or to check out further information about the Summit. Keynote speakers to the 2015 event include former 49ers quarterback Steve Young and leading green business expert and author of the best-selling Green to Gold, Andrew Winston.

    Read the article

  • argv Memory Allocation

    - by Joshua Green
    I was wondering if someone could tell me what I am doing wrong that I get this Unhandled Exception error message: 0xC0000005: Access violation reading location 0x0000000c. with a green pointer pointing at my first Prolog code (fid_t): Here is my header file: class UserTaskProlog { public: UserTaskProlog( ArRobot* r ); ~UserTaskProlog( ); protected: int cycles; char* argv[ 1 ]; term_t tf; term_t tx; term_t goal_term; functor_t goal_functor; ArRobot* robot; void logTask( ); }; And here is my main code: UserTaskProlog::UserTaskProlog( ArRobot* r ) : robot( r ), robotTaskFunc( this, &UserTaskProlog::logTask ) { cycles = 0; argv[ 0 ] = "libpl.dll"; argv[ 1 ] = NULL; PL_initialise( 1, argv ); PlCall( "consult( 'myPrologFile.pl' )" ); robot->addSensorInterpTask( "UserTaskProlog", 50, &robotTaskFunc ); } UserTaskProlog::~UserTaskProlog( ) { robot->remSensorInterpTask( &robotTaskFunc ); } void UserTaskProlog::logTask( ) { cycles++; fid_t fid = PL_open_foreign_frame( ); tf = PL_new_term_ref( ); PL_put_integer( tf, 5 ); tx = PL_new_term_ref( ); goal_term = PL_new_term_ref( ); goal_functor = PL_new_functor( PL_new_atom( "factorial" ), 2 ); PL_cons_functor( goal_term, goal_functor, tf, tx ); int fact; if ( PL_call( goal_term, NULL ) ) { PL_get_integer( tx, &fact ); cout << fact << endl; } PL_discard_foreign_frame( fid ); } int main( int argc, char** argv ) { ArRobot robot; ArArgumentParser argParser( &argc, argv ); UserTaskProlog talk( &robot ); } Thank you,

    Read the article

  • OrderBy and Distinct using LINQ-to-Entities

    - by BlueRaja
    Here is my LINQ query: (from o in entities.MyTable orderby o.MyColumn select o.MyColumn).Distinct(); Here is the result: {"a", "c", "b", "d"} Here is the generated SQL: SELECT [Distinct1].[MyColumn] AS [MyColumn] FROM ( SELECT DISTINCT [Extent1].[MyColumn] AS [MyColumn] FROM [dbo].[MyTable] AS [Extent1] ) AS [Distinct1] Is this a bug? Where's my ordering, damnit?

    Read the article

  • Using mem_fun_ref with boost::shared_ptr

    - by BlueRaja
    Following the advice of this page, I'm trying to get shared_ptr to call IUnknown::Release() instead of delete: IDirectDrawSurface* dds; ... //Allocate dds return shared_ptr<IDirectDrawSurface>(dds, mem_fun_ref(&IUnknown::Release)); error C2784: 'std::const_mem_fun1_ref_t<_Result,_Ty,_Arg std::mem_fun_ref(Result (_thiscall _Ty::* )(_Arg) const)' : could not deduce template argument for 'Result (_thiscall _Ty::* )(Arg) const' from 'ULONG (_cdecl IUnknown::* )(void)' error C2784: 'std::const_mem_fun_ref_t<_Result,_Ty std::mem_fun_ref(Result (_thiscall _Ty::* )(void) const)' : could not deduce template argument for 'Result (_thiscall _Ty::* )(void) const' from 'ULONG (__cdecl IUnknown::* )(void)' error C2784: 'std::mem_fun1_ref_t<_Result,_Ty,_Arg std::mem_fun_ref(Result (_thiscall _Ty::* )(_Arg))' : could not deduce template argument for 'Result (_thiscall _Ty::* )(Arg)' from 'ULONG (_cdecl IUnknown::* )(void)' error C2784: 'std::mem_fun_ref_t<_Result,_Ty std::mem_fun_ref(Result (_thiscall _Ty::* )(void))' : could not deduce template argument for 'Result (_thiscall _Ty::* )(void)' from 'ULONG (__cdecl IUnknown::* )(void)' error C2661: 'boost::shared_ptr::shared_ptr' : no overloaded function takes 2 arguments I have no idea what to make of this. My limited template/functor knowledge led me to try typedef ULONG (IUnknown::*releaseSignature)(void); shared_ptr<IDirectDrawSurface>(dds, mem_fun_ref(static_cast<releaseSignature>(&IUnknown::Release))); But to no avail. Any ideas?

    Read the article

  • Simple way to return anonymous types (to make MVC using LINQ possible)

    - by BlueRaja The Green Unicorn
    I'd like to implement MVC while using LINQ (specifically, LINQ-to-entities). The way I would do this is have the Controller generate (or call something which generates) the result-set using LINQ, then return that to the View to display the data. The problem is, if I do: return (from o in myTable select o); All the columns are read from the database, even the ones (potentially dozens) I don't want. And - more importantly - I can't do something like this: return (from o in myTable select new { o.column }); because there is no way to make anonymous types type-safe! I know for sure there is no nice, clean way of doing this in 3.5 (this is not clean...), but what about 4.0? Is there anything planned, or even proposed? Without something like duck-typing-for-LINQ, or type-safe anonymous return values (it seems to me the compiler should certainly be capable of that), it appears to be nearly impossible to cleanly separate the Controller from the View.

    Read the article

  • How to make tooltip move with mouse (winforms)

    - by BlueRaja The Green Unicorn
    I want it to move when the mouse moves, and disappear when the pointer isn't over the label. This doesn't work: private void lblRevisionQuestion_MouseMove(object sender, MouseEventArgs e) { toolTip1.Show("test", this, PointToClient(MousePosition), Int32.MaxValue); } private void lblRevisionQuestion_MouseLeave(object sender, EventArgs e) { toolTip1.Hide(this); } As soon as the tooltip appears, it steals focus away from the form, evoking MouseLeave. Then the tooltip hides, and the pointer is once again over the label, invoking MouseMove. This results in a choppy, flashing tooltip. Is there any way to do this?

    Read the article

  • MVC using LINQ? - Can't return anonymous types

    - by BlueRaja
    I'd like to implement MVC while using LINQ (specifically, LINQ-to-entities). The way I would do this is have the Controller generate (or call something which generates) the result-set using LINQ, then return that to the View to display the data. The problem is, if I do: return (from o in myTable select o); All the columns are read from the database, even the ones (potentially dozens) I don't want. And - more importantly - I can't do something like this: return (from o in myTable select new { o.column }); because there is no way to make anonymous types type-safe! I know for sure there is no nice, clean way of doing this in 3.5 (this is not clean...), but what about 4.0? Is there anything planned, or even proposed? Without something like duck-typing-for-LINQ, or type-safe anonymous return values (it seems to me the compiler should certainly be capable of that), it appears to be nearly impossible to cleanly separate the Controller from the View.

    Read the article

  • Crazy VS Designer Errors

    - by BlueRaja
    Here's a strange one. After renaming a class, one of my forms began giving me errors in the designer, refusing to open. Funny thing is, the form worked just fine when I ran the program. I began reverting my changes to deduce the problem. I have now reverted completely back to the last commit - in which I know the form was working in the designer - cleaned the solution, and deleted the bin/ and obj/ folders, as well as the *.suo file for good measure. The form still does not display in designer. Here are the errors it gives: Could not find 'MyNamespace.MyControl'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built. The variable 'myControl1' is either undeclared or was never assigned. The variable is both declared and assigned, and MyControl builds fine (again, the form works fine when the program is actually run). Stranger still, if I try to create a new form and drag a MyControl onto it, I get this Entity-Framework error: Failed to create component 'MyControl'. The error message follows: 'System.ArgumentException: The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid. at System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString) at System.Data.EntityClient.EntityConnection..ctor(String connectionString) at System.Data.Objects.ObjectContect.CreateEntityConnection(String connectionString) etc. etc. There is nothing wrong with my connection string: it worked before, and, again, it works when I actually run the program (the control already exists on the old form from the previous commit). Any ideas whatsoever? I am completely at a loss. [Edit] The only significant code: MyControl.cs public MyControl() { _entities = new MyEFEntities(); //Entity-framework generated class } MyForm.Designer.cs private void InitializeComponent() { this.myControl1 = new MyNamespace.MyControl(); ... this.Controls.Add(this.myControl1); } MyEFDatabase.Designer.cs public MyEFEntities() : base("name=MyEFEntities", "MyEFEntities") { ... } App.Config <connectionStrings> <add name="MyEFEntities" connectionString="metadata=res://*/MyEFDatabase.csdl|res://*/MyEFDatabase.ssdl|res://*/MyEFDatabase.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=MyDatabaseServer;Initial Catalog=MyDatabase;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" /> </connectionStrings> I've tried the "replace &quot; with '" trick - didn't help. [Edit2] It is happening to new projects also, but not immediately. Only after fiddling around a bit (it has something to do with adding a many-to-one relationship that EF did not figure out on its own), but I can't figure out the exact steps to reproduce.

    Read the article

  • Why does null need to be casted?

    - by BlueRaja The Green Unicorn
    The following code does not compile: //int a = ... int? b = (int?) (a != 0 ? a : null); In order to compile, it needs to be changed to int? b = (a != 0 ? a : (int?) null); Since both b = null and b = a are legal, this doesn't make sense to me. Why does null need to be casted, and why can't we simply cast the whole expression (which I know is legal in other cases)?

    Read the article

  • Most unintuitive behaviour in the .Net framework?

    - by BlueRaja
    Intended behavior is often another phrase for bug-which-we-knew-about-when-we-wrote-it, but-we-wrote-it-anyways. Because it was "intended" (or perhaps it is now too late or too difficult), many of these extremely-unintuitive bugs never get fixed. For instance, consider the following code (C#): TextInfo textInfo = Thread.CurrentThread.CurrentCulture.TextInfo; textInfo.ToTitleCase("hello world!"); //Returns "Hello World!" textInfo.ToTitleCase("hElLo WoRld!"); //Returns "Hello World!" textInfo.ToTitleCase("Hello World!"); //Returns "Hello World!" What would you expect textInfo.ToTitleCase("HELLO WORLD!"); to return? In fact, it returns "HELLO WORLD!". This was well-documented "intended behavior," but, in my eyes, is extremely unintuitive, and therefore a bug. What is some other unintuitive behavior like this in this in the .Net framework? Bonus points if you can provide a fix that does not break backwards-compatibility. Remember! Always keep these two simple rules in mind when designing an API (or anything else): Make the common case the default, and Keep It Simple, Stupid!

    Read the article

  • How to spot undefined behavior

    - by BlueRaja - Danny Pflughoeft
    Is there any way to know if you program has undefined behavior in C++ (or even C), short of memorizing the entire spec? The reason I ask is that I've noticed a lot of cases of programs working in debug but not release being due to undefined behavior. It would be nice if there were a tool to at least help spot UB, so we know there's the potential for problems.

    Read the article

  • LINQ-to-entities - Null reference

    - by BlueRaja
    I could swear this was working the other day: var resultSet = (from o in _entities.Table1 where o.Table2.Table3.SomeColumn == SomeProperty select o ).First(); SelectedItem = resultSet.Table2.SomeOtherColumn; I am getting a null reference exception on the last line: resultSet.Table2 is null. Not only am I sure that all the foreign keys and whatnot have the correct values, but I don't see how Table2 could be null, since o.Table2.Table3.SomeColumn == SomeProperty. resultSet is being returned with all its properties set to the correct values, with the exception that Table2 is null.

    Read the article

  • Optimizing ROW_NUMBER() in SQL Server

    - by BlueRaja
    We have a number of machines which record data into a database at sporadic intervals. For each record, I'd like to obtain the time period between this recording and the previous recording. I can do this using ROW_NUMBER as follows: WITH TempTable AS ( SELECT *, ROW_NUMBER() OVER (PARTITION BY Machine_ID ORDER BY Date_Time) AS Ordering FROM dbo.DataTable ) SELECT [Current].*, Previous.Date_Time AS PreviousDateTime FROM TempTable AS [Current] INNER JOIN TempTable AS Previous ON [Current].Machine_ID = Previous.Machine_ID AND Previous.Ordering = [Current].Ordering + 1 The problem is, it goes really slow (several minutes on a table with about 10k entries) - I tried creating separate indicies on Machine_ID and Date_Time, and a single joined-index, but nothing helps. Is there anyway to rewrite this query to go faster?

    Read the article

  • SQL - How to join on similar (not exact) columns

    - by BlueRaja
    I have two tables which get updated at almost the exact same time - I need to join on the datetime column. I've tried this: SELECT * FROM A, B WHERE ABS(DATEDIFF(second, A.Date_Time, B.Date_Time) = ( SELECT MIN(ABS(DATEDIFF(second, A.Date_Time, B2.Date_Time))) FROM B AS B2 ) But it tells me: Multiple columns are specified in an aggregated expression containing an outer reference. If an expression being aggregated contains an outer reference, then that outer reference must be the only column referenced in the expression. How can I join these tables?

    Read the article

  • The CLR has been unable to transition from COM context [...] for 60 seconds

    - by BlueRaja The Green Unicorn
    I am getting this error on code that used to work. I have not changed the code. Here is the full error: The CLR has been unable to transition from COM context 0x3322d98 to COM context 0x3322f08 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations. And here is the code that caused it: var openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); openFileDialog1.DefaultExt = "mdb"; openFileDialog1.Filter = "Management Database (manage.mdb)|manage.mdb"; //Stalls indefinitely on the following line, then gives the CLR error //one minute later. The dialog never opens. if(openFileDialog1.ShowDialog() == DialogResult.OK) { .... } Yes, I am sure the dialog is not open in the background, and no, I don't have any explicit COM code or unmanaged marshalling or multithreading. I have no idea why the OpenFileDialog won't open - any ideas?

    Read the article

  • Why does LINQ-to-Entites recognize my custom method?

    - by BlueRaja The Green Unicorn
    This works: (from o in Entities.WorkOrderSet select o) .Where(MyCustomMethod); This does not: (from o in Entities.WorkOrderSet select new { WorkOrder = o }) .Where(o => MyCustomMethod(o.WorkOrder); I understand why the second doesn't work - but why in the world does the first work!? Shouldn't I get a "custom method not recognized?" For reference, here is MyCustomMethod public bool MyCustomMethod(WorkOrder workOrder) { return !workOrder.WorkOrderNum.StartsWith("A", StringComparison.CurrentCultureIgnoreCase); }

    Read the article

  • What are some programming questions (or mistakes) you get wrong only as you get better?

    - by BlueRaja
    In programming, as many professions, there are mistakes you'll make now that you may not have made as a beginner. For instance, consider pointers: In C++, is there any difference between arrays and pointers? The beginner will say yes, they are two completely different concepts, and treat them as such. The intermediate programmer (having learned that arrays are pointers internally) will tell you no, they are the same thing, and may miss some crucial bugs by interchanging them all willy-nilly. The expert, however, will again say they are different things (ex. see here or here). What other questions/mistakes are like this?

    Read the article

  • Is it possible to hide the doc icon programmatically

    - by Unicorn
    Is it possible to hide doc icon programmatically on demand. I know one way by which defining property "Application is agent (UIElement)" in plist we make the cocoa app as user agent. But this result in hiding the doc icon permanently. I am looking for a way where i can control visibility of doc icon. Any idea ?

    Read the article

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