wootscootinboogie

1

votes
0

answer
15

views

Razor Pages .NET Core 2.1 Child Routes

I'm working on a .NET Core 2.1 Razor Pages application, and can't figure out why the router isn't matching my expectations. In my application an Orchestration object has a collection of Rules objects. An Orchestration is defined queried at the DB with a Guid. My Index.cshtml in the Orchestration f...
wootscootinboogie
1

votes
1

answer
257

views

Node google api body of email

I'm using the node googleapi gmail client to send an email with the following code: var email_lines = ["Content-Type: text/plain; charset=\"UTF-8\"\n", "MIME-Version: 1.0\n", "Content-Transfer-Encoding: 7bit\n", "to: ", "[email protected]", "\n", "from: ", "[email protected]", "\n", "subject: ", "the s...
1

votes
2

answer
636

views

Find unique combination of identifiers in a comma-delimited list

I've got a complicated query whose results I have stored in a temporary table for the time being for simplicity's sake. I've got a comma=delimited list of certain combinations of three character unique identifiers such as the screen cap below: You can see in rows 2 and 3 that the 3 character identi...
wootscootinboogie
1

votes
4

answer
11.2k

views

Like operator on input parameters in stored procedure

I've just begun to add writing stored procedures to my SQL repertoire and I'm sure this is a noob question. Can someone point me in the right direction about how to use the like operator instead of the = operator in this scenario? The object of this is to find the first 3 common numbers out of a p...
wootscootinboogie
1

votes
3

answer
110

views

Use the ID attribute of a clicked element as a paramter

I have a list of anchor tags that when clicked I would like the value of their ID attribute to be send to the parameter of a stored procedure. Everything works fine except I don't know how to make the second argument of the AddWithValue method of the Parameters property of the SqlCommand accept wha...
wootscootinboogie
1

votes
2

answer
11.3k

views

Initialize an array of a class in a constructor

I have a class Garage that has a property which is an array of type Car, which is another class in the program. I've tried several iterations and get run-time errors on most of them. I get a NullRefernceException whenever I try to run it. This happens in the Program class where I try to access the l...
wootscootinboogie
1

votes
3

answer
1.8k

views

Changing localhost server files are served from using Node (Webstorm /maybe IntelliJ)

I'm not sure what I'm missing here, so hopefully someone can help me out. I'm working on a project where we're using Node and in the Run/Edit configurations I've down the following: Node interpreter: This is the path to the node.exe file which I checked out from Subversion Working directory: this...
1

votes
1

answer
156

views

How to do class implementation?

TypeScript compiles a class something like: var UrlProvider = (function(){ //tons of logic in here that only needs to be performed once for each UrlProvider instance function UrlProvider(baseUrl){ var baseRequest = { get: function(){return baseUrl;}, update: function(){return baseUrl;}, delete: fun...
1

votes
3

answer
455

views

void pointer vs object in function parameters

How closely does passing a void pointer in C++ imitate defining a method parameter as object if you don't rightly now what that type will be at compile time?
wootscootinboogie
1

votes
1

answer
562

views

Doctype line height issue

I've got two HTML pages EDIT: fiddle if you click on fiddle options and switch between the doc types you can see the difference in how they're rendered. this is a big string this is a big string this is a big string this is a big string this is a big string this is a big string and this is a big s...
wootscootinboogie
1

votes
2

answer
65

views

System function to find the expression of a computed column?

I'm looking for something along the lines of exec sp_helptext 'dbo.StoredProcName' (which will return the SQL code that composes a stored procedure) but for computed columns. Does such a function exist, outside of using SSMS to find it? I'm looking for the text of the expression used to calculate...
wootscootinboogie
1

votes
2

answer
63

views

Do CSS 3 animations/the HTML5 <details> tag use JavaScript behind the scenes?

In Chrome the following HTML5 will give you a collapsible content area: Other resources first thing second thing third thing Previously, we would use some JavaScript to get this done. Are little tricks like this and some of the CSS3 animations using JavaSCript behind the scenes?
wootscootinboogie
2

votes
1

answer
3.8k

views

Visual Studio Can't See Nuget

I installed NuGet package manager, but I can no longer seem to access it and I have no idea what the problem is - This is screen cap from VS showing that it has been installed. When I go to Tools/Extension Manager I see that I have nuget installed, but it looks like this: with the uninstall and d...
wootscootinboogie
1

votes
3

answer
256

views

Method parameters with exception handling

I'm obviously a newbie when it comes to C# and the following program is from a Charles Petzold book that I don't fully understand. The parameter in the GetDouble method is a string named prompt. Nowhere is this declared and I think that's what's messing me up. I see that the Main method is callin...
wootscootinboogie
1

votes
3

answer
168

views

Writing to the console from a method .NET 4.0

The following is a short clock program from the book "programming in the key of c#". I'm not familiar with the Timers library at all so some of this syntax I don't really get. What I want to understand and I don't is the line Console.Write(str) in the method in this little program. How does Main...
wootscootinboogie
1

votes
1

answer
224

views

Virtual Method logic not working C# .NET 4.0

I'm working through an example in the bookPro C# and the .NET Platform and I'm making a mistake somewhere that I can't see. The program compiles and runs, but the Manager object in this example isn't having the right value of 'StockOptions' returned. In an effort of concision, I'm going to try to...
wootscootinboogie
17

votes
3

answer
52.2k

views

How to change only the year of a date datatype

I have a list of birthdays and the year is the only part that is incorrect. I have a list of ID #s for these individuals. Is there a way to change only the year for all of these people? I was thinking something like making a table of the query results and then using an UPDATE SET query, but I don...
wootscootinboogie
1

votes
1

answer
3k

views

Derived Tables vs. Correlated subquery in HAVING clause SQL Server 2008

In this example I've only got two tables with which I'm working. I was checking to see which might run faster and the execution plans were identical. The purpose of these queries is to find the minimum date associated with one record that's larger than the maximum date of another. The first query...
wootscootinboogie
3

votes
3

answer
26k

views

Joining two subqueries or a query with a subquery SQL Server 2008

monster edit: The query will now run but returns incorrect answers. Added a rough schema. PatientID is not the primary key in the tblPatientVisits table because the same patientID can be present more than once. Every county name is listed, but each count(s.countyName) and count(t.countyname) as 1...
5

votes
1

answer
403

views

Query extensibility with WHERE EXISTS with a large table

The following query is designed to find the number of people who went to a hospital, the total number of people who went to a hospital and the divide those two to find a percentage. The table Claims is two million plus rows and does have the correct non-clustered index of patientid, admissiondate,...
wootscootinboogie
5

votes
1

answer
2.6k

views

Returning Promises for use in click handlers

I'm playing around with returning promises from an AJAX method and seeing how I can use them to make my code more easier to read/functional. My current scenario is to have a function getBookIds which issues an AJAX call to a database to return the title of a book based on its ID. There are five bo...
wootscootinboogie
2

votes
1

answer
1.1k

views

Use one list to order another Excel

I need to sort column C in the same order as column A. Best method to go about it? The list on column A is sorted by the number of fields that aren't empty in those accompanying columns. I realize in that small snippet the numbers aren't shared among both lists, but the entire list is >30,000 r...
wootscootinboogie
1

votes
2

answer
4.9k

views

Copy two columns to another table, one is a primary key

I have a large table (Visits) with primary key kha_ID. There are a dozen or so columns in this table and I only want to replace one of them, ADM_SRC. The problem is that ADM_SRC contains nulls. I imported another table with the kha_id and that record's corresponding ADM_SRC. I'm hoping my query...
wootscootinboogie
3

votes
4

answer
4.2k

views

Find the average of an array with the size specified by the user C#

Here's my try at some basic C# programming. The program is meant to ask the user for a size of an array, then to fill the array, print out the array and finally find the average of the numbers they used to fill the array. The program currently doesn't compile. This is my first time doing this wit...
wootscootinboogie
3

votes
1

answer
1.7k

views

Nesting window functions in SQL Server

From time to time I'm fiddling around with SQL Server and I get an error akin to Can't use a window function on an aggregate. Which is frustrating because I have SQL Server 2008 and I know that 2012 affords better window function functionality and I use them a lot. However, from time to time I do...
2

votes
3

answer
3.7k

views

Static vs. public C#

I know that it's been answered multiple times here on SO, but I still don't get the nuts of bolts of what exactly it means to instantiate a class. I read this and it did help my understanding. I know that static classes like Console cannot be used with the new expression like Console c = new Consol...
wootscootinboogie
12

votes
4

answer
5.1k

views

Visual Studio Jump to Beginning of Function

I know that ctrl+} will take you to the corresponding brace in Visual Studio, but say I'm in the middle of a gigantic function and I don't know where the top or the bottom is, is there a shortcut to get directly to the function declaration? void function() { //so many lines of code //can't see the t...
wootscootinboogie
3

votes
1

answer
269

views

Custom aggregation functions in SQL Server vs Aggregate in Linq

I'm topically aware, but not well versed, in the ways that one can write a custom aggregation function for SQL Server in the CLR. I am also just getting into learning LINQ and I am intrigued by the Aggregate function. It seems to me that if one had access to LINQ then writing their own custom aggr...
1

votes
2

answer
573

views

ASP.net controls not obeying CSS?

Why is is that Block 1 doesn't render the expected styling and Block 2 does? CSS .test { height:3.85in; width: 2.625in; border: 10px solid blue; padding-right:.25in; padding-left:.25in; padding-top:.25in; text-align:center; overflow:hidden; } .test label { font-size:xx-large; color:Red; } Block 1 T...
4

votes
2

answer
826

views

Find all strings that share at least X characters, order by likeness

I'm working on a project that has the names of various drugs. Often, I will find something like Proscratinol and Proscratinol XR (extended release). I would like to find a query to pick up on all the names of this nature so I can put the 'parent' drug in a table and have these 'child' drugs refere...
wootscootinboogie
4

votes
2

answer
6.7k

views

Bootstrap modal closing immediately, should delay

In this example clicking on the contact tab on the nav menu will open up a bootstrap modal. If the user enters in a string into the modal's text box of less than 10, there's a warning and the modal doesn't close. If the string is greater than ten then a message will be appended to the modal saying...
wootscootinboogie
3

votes
2

answer
1k

views

Switching on type with a generic return type

I'm working on making EF easier to unit test by writing some helpers that will make properties for me. I have a couple of backing fields private Mock mockedWorkFlows; private Mock mockedWorkFlowErrors; And I want a generic function to be able to return me the correct backing field with the followin...
wootscootinboogie
23

votes
2

answer
2.9k

views

Angular JS and Unobtrusive JavaScript

I'm just getting into learning MVC and Angular and I'm curious about code such as the following (taken from angularjs.org) Todo {{remaining()}} of {{todos.length}} remaining [ archive ] {{todo.text}} Todo.js function TodoCtrl($scope) { $scope.todos = [ { text: 'learn angular', done: true }, { text...
wootscootinboogie
2

votes
4

answer
183

views

Passing Enums as parameter from abstract class

I have an abstract base class, TestFactory which looks like: public abstract class TestFactory { //static method that can create concrete factories public static TestFactory CreateTestFactory(FactoryType factoryType) { TestFactory factory = null; switch (factoryType) { case FactoryType.Blood: facto...
wootscootinboogie
2

votes
1

answer
216

views

Using recursive properties ASP.NET / C#

I'm looking for a way to take a generic result set and turn it into a tree structure with ASP.NET MVC using jQuery Dyantree. I've got a test class like: public class GenericResults { public string ClaimId { get; set; } public string DrugName { get; set; } public int PatientId { get; set; } //simulat...
wootscootinboogie
2

votes
5

answer
224

views

Average jagged array by index

I have an array of arrays that looks like: var data = [[2, 2,3], [3, 9], [5, 6,7,8]]; (fiddle here) I need to be able to create a new array based on each inner array's index. So from the above output I'm looking for 1 - [2,3,5] 2 - [2,9,6] 3 - [3,7] 4 - [8] helper average method: Array.prototype.av...
wootscootinboogie
3

votes
1

answer
228

views

Angular directive regain focus

I've got a simple TODO application (from Apress book, Pro Angular). Currently I've got a little application where the user types some information into a box, clicks a button and a TODO task pops up onto the screen. What I would like to have happen is after the user clicks on the button to add the...
5

votes
1

answer
9.6k

views

Set bootstrap tooltip to AJAX call results

I have a bootstrap tooltip that I want to load data from an AJAX requestion, with the text from the request being the titleproperty of the tooltip. My AJAX request works fine, but I have two problems: Why isn't the data from the AJAX call making its way into the tooltip? How can I use my ttManager...
wootscootinboogie
2

votes
3

answer
136

views

Specifying concrete types instead of var

I've got the following piece of code which gives the error cannot apply indexing with [] to an expression of type object protected void btnMakeCards_Click(object sender, EventArgs e) { string cs = ConfigurationManager.ConnectionStrings["dbcs"].ConnectionString; using (var con = new SqlConnection(cs)...
wootscootinboogie
4

votes
1

answer
609

views

ngGrid sort entire result set

I would like on the ngGridSorted event to sort the entire result set (not just the page) by the sort function that was clicked on. Is there an easy way to do this? I haven't seen a good example of how to sort anything but the page that the user is currently on.
wootscootinboogie

View additional