Search Results

Search found 1870 results on 75 pages for 'matt mcclellan'.

Page 57/75 | < Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >

  • SQL Grouping with multiple joins combining results incorrectly

    - by Matt
    Hi I'm having trouble with my query combining records when it shouldn't. I have two tables Authors and Publications, they are related by Publication ID in a many to many relationship. As each author can have many publications and each publication has many Authors. I want my query to return every publication for a set of authors and include the ID of each of the other authors that have contributed to the publication grouped into one field. (I am working with mySQL) I have tried to picture it graphically below Table: authors Table:publications AuthorID | PublicationID PublicationID | PublicationName 1 | 123 123 | A 1 | 456 456 | B 2 | 123 789 | C 2 | 789 3 | 123 3 | 456 I want my result set to be the following AuthorID | PublicationID | PublicationName | AllAuthors 1 | 123 | A | 1,2,3 1 | 456 | B | 1,3 2 | 123 | A | 1,2,3 2 | 789 | C | 2 3 | 123 | A | 1,2,3 3 | 456 | B | 1,3 This is my query Select Author1.AuthorID, Publications.PublicationID, Publications.PubName, GROUP_CONCAT(TRIM(Author2.AuthorID)ORDER BY Author2.AuthorID ASC)AS 'AuthorsAll' FROM Authors AS Author1 LEFT JOIN Authors AS Author2 ON Author1.PublicationID = Author2.PublicationID INNER JOIN Publications ON Author1.PublicationID = Publications.PublicationID WHERE Author1.AuthorID ="1" OR Author1.AuthorID ="2" OR Author1.AuthorID ="3" GROUP BY Author2.PublicationID But it returns the following instead AuthorID | PublicationID | PublicationName | AllAuthors 1 | 123 | A | 1,1,1,2,2,2,3,3,3 1 | 456 | B | 1,1,3,3 2 | 789 | C | 2 It does deliver the desired output when there is only one AuhorID in the where statement. I have not been able to figure it out, does anyone know where i'm going wrong?

    Read the article

  • Searching a process' memory on Linux

    - by Matt Joiner
    How can I search the memory state of an process in Linux? Specifically I wish to identify certain regions of interest, and peek at them at regular intervals, possibly occasionally poking new values. I suspect an answer may involve calls to ptrace(), and reading /proc/[pid]/mem, but need more to go on.

    Read the article

  • How do I output an individual character when using char *[] = "something"

    - by Matt
    I've been playing with pointers to better understand them and I came across something I think I should be able to do, but can't sort out how. The code below works fine - I can output "a", "dog", "socks", and "pants" - but what if I wanted to just output the 'o' from "socks"? How would I do that? char *mars[4] = { "a", "dog", "sock", "pants" }; for ( int counter = 0; counter < 4; counter++ ) { cout << mars[ counter ]; } Please forgive me if the question is answered somewhere - there are 30+ pages of C++ pointer related question, and I spent about 90 minutes looking through them, as well as reading various (very informative) articles, before deciding to ask.

    Read the article

  • Enumeration trouble: redeclared as different kind of symbol

    - by Matt
    Hello all. I am writing a program that is supposed to help me learn about enumeration data types in C++. The current trouble is that the compiler doesn't like my enum usage when trying to use the new data type as I would other data types. I am getting the error "redeclared as different kind of symbol" when compiling my trangleShape function. Take a look at the relevant code. Any insight is appreciated! Thanks! (All functions are their own .cpp files.) header file #ifndef HEADER_H_INCLUDED #define HEADER_H_INCLUDED #include <iostream> #include <iomanip> using namespace std; enum triangleType {noTriangle, scalene, isoceles, equilateral}; //prototypes void extern input(float&, float&, float&); triangleType extern triangleShape(float, float, float); /*void extern output (float, float, float);*/ void extern myLabel(const char *, const char *); #endif // HEADER_H_INCLUDED main function //8.1 main // this progam... #include "header.h" int main() { float sideLength1, sideLength2, sideLength3; char response; do //main loop { input (sideLength1, sideLength2, sideLength3); triangleShape (sideLength1, sideLength2, sideLength3); //output (sideLength1, sideLength2, sideLength3); cout << "\nAny more triangles to analyze? (y,n) "; cin >> response; } while (response == 'Y' || response == 'y'); myLabel ("8.1", "2/11/2011"); return 0; } triangleShape shape # include "header.h" triangleType triangleShape(sideLenght1, sideLength2, sideLength3) { triangleType triangle; return triangle; }

    Read the article

  • HTA value update freezes when file copy starts

    - by Matt Hamende
    Creating an HTA that will automate the installation of several applications it starts by checking for the existence of certain files then copies a large folder to local from a flash drive if it doesn't exist, I have a textbox I'm using to update the current status of the script, but it just seems to freeze and never updates, I haven't had any luck with any of the artificial sleep functions either. here's the segment If Not objFSO.FileExists(Office10Dir) Then MsgBox("Excel is missing") BasicTextBox.Value = "Office14 Not Detected, Copying Source Files to Local" Dim objFS, objFolder Dim OfficeTemp OfficeTemp = "C:\OfficeTemp" Set objFS = CreateObject("Scripting.FileSystemObject") Set objFolder = objFS.CreateFolder(OfficeTemp) objFS.CopyFolder "OfficeTemp", "C:\OfficeTemp" BasicTextBox.Value = "Local Temp Directory Created" ELSE MsgBox("Excel is Installed") END IF All i see is the "Local Temp Directory Created" message once file copy is complete

    Read the article

  • Clever Next and Previous Buttons in jQuery

    - by matt
    I have created a webpage which when you press 'down' automatically scrolls down to the next ID (a section which isn't visible due to overflow: hidden) When you press 'up' it scrolls back up. At the moment each arrow simply tells the webpage to go to a specific div e.g. the 'down arrow' says <a class="tab" href="#page2">Down</a> This is ok for just two pages however as I will be having more pages what I would like is to be able to specify the amount of pages and for the arrows to automatically change which link it needs to go to next. For example, on page 1 the 'up arrow' is not visible and when you press the 'down arrow' it scrolls to #page2 whereupon the 'up arrow' is then visible. If you now press the down arrow again it will take you to #page3 whereupon it then becomes hidden as page 3 is the last page. I'm guessing I need to create a 'var' which specifies the amount of pages and that to make the arrows invisible it will change the css property 'display' to none yet I don't know how to do this nor to make the links work out which number to go to next! edit: Just botched together some code which hides the arrows based on the page number however still need to work out how to update the variables and change the links the arrows go to. (please exclude the coding, it's my first time trying to write script as opposed to just editing plugins!) var PageNumber = 1; var PageAmount = 2; function getPageNumber() { } function hideUpArrow() { if(PageNumber==1) { $("#up_arrow").css({ "display": "none" }); } } function hideDownArrow() { if(PageNumber==PageAmount) { $("#down_arrow").css({ "display": "none" }); } } $(document).ready(function(){ hideUpArrow(); });

    Read the article

  • Designing a Chart that expands as more data is entered in Excel

    - by Matt Ridge
    I have a worksheet that pulls data from another, it is designed to only show late jobs, and it works perfectly. I have it where it is broken down into quarters, and it gathers all this data and does everything I want. Except this one last bit... I want to have it where it shows charts, if there is data in said area the chart would self populate, otherwise it would be blank. If more data is entered into the range expand the chart accordingly. Attached is a simplified workbook with what it does, and what I'd like to see it do. I don't even know if this is possible... I thought if I wrote a script to make it so that the data changes with each addition it may fix my problem, but I'm not sure if that is the best way in this situation. https://dl.dropbox.com/u/3327208/Excel/Charts.xlsx

    Read the article

  • In SQL can I return a tables with a varying number of columns

    - by Matt
    I have a somewhat more complicated scenario, but I think it should be possible. I have a large SPROC whose result is a set of characteristics for a set of persons. So the Table would look something like this: Property | Client1 Client 2 Client3 ----------------------------------------------------------- Sex | M F M Age | 67 56 67 Income | Low Mid Low It's built using cursors, iterating over different datasets. The problem I am facing is that there is a varying number of Clients and Properties, so an equally valid result over different input sets might be: Property | Client1 Client 2 ------------------------------------------- Sex | M F Age | 67 56 Weight | 122 122 The different number of properties is easy, those are just extra rows. My problem is that I need to declare a temporary table with a varying number of columns. There could be 2 clients or 100. Every client in guaranteed to have every property ultimately listed. What SQL structure would statisfy this and how can I declare it and insert things into it? I can't just flip the columns and rows either because there is a variable number of each.

    Read the article

  • Can any language potentially be used to create any program?

    - by Matt
    I've heard that given a programmer with enough time and skill in any particular language and enough lines of code, then any program could be created with any given language. I know its certainly not going to be cost-efficient, for instance, to rewrite Adobe Photoshop in BASIC, but could a good enough and patient enough programmer potentially create any program in any language?

    Read the article

  • Why use object.prototype.constructor in OOP javascript?

    - by Matt
    I've recently started reading up on OOP javascript and one thing that authors seem to skip over is when an object A has been declared and suddenly I see "A.prototype.constructor =A; For example, var A = function(){}; // This is the constructor of "A" A.prototype.constructor = A; A.prototype.value = 1; A.prototype.test = function() { alert(this.value); } var a = new A(); // create an instance of A alert(a.value); // => 1 So I run the command in firebug "var A = function(){};" and then "A.Constructor" Which reveals it's a function. I understand this. I run the code "A.prototype.constructor = A;" and I thought this changes the A constructor from Function to A. The constructor property of A has been changed right? Instead when I run "A.constructor" it gives me function () still. What's the point? I also see A.constructor.prototype.constructor.prototype.. what is going on?

    Read the article

  • Retrieving ids from MySQL query

    - by Matt Maclennan
    I am having trouble accessing the "model_id" and "brand_id" from the foreach loop that I am using. They are the right field names, because I have echoed them successfully, and I have also "var_dumped" the array, and the IDs are there. It is just a case of implementing the relevant links on each list section. Below is the code I have. <? $output = mysqli_query("SELECT * FROM bikes, bikeTypes WHERE bikes.model_id = bikeTypes.model_id"); $result = array(); while($row = mysqli_fetch_array($output)) { $result[$row['model']][] = $row; } foreach ($result as $category => $values) { echo "<li><a href='test.php?id=" . $row['model_id'] . "'>".$category.'</a><ul>'; foreach ($values as $value) { echo "<li><a href='details.php?id=" . $row['brand_id'] . "'>" . $value['bikeName'] . "</a></li>"; } echo '</ul>'; echo '</li>'; } ?>

    Read the article

  • Does the java JFC hash table use seperate chaining resolution? Can I traverse each list in the table

    - by Matt
    I have written a program to store a bunch of strings in a JFC hash table. There are defiantly collisions going on, but I don't really know how it is handling them. My ultimate goal is to print the number of occurrences of each string in the table, and traversing the bucket or list would work nicely. Or maybe counting the collisions? Or do you have another idea of how I could get a count of the elements?

    Read the article

  • Format Text Field While User Enters Data

    - by Matt
    Hello, so here is what I am trying to do. I have a birth date text field, while the user in puts text i want the field to automatically put it in the form YYYY-MM-DD. Basically while the user types it replaces the Y's M's and D's but leaves the hyphen. I am not sure how to go about this i may need a mask or something. I know this is where some of the formatting can be done - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{ Any help would be of much help

    Read the article

  • How to make RegexKitLite w/ iPhone SDK produce a list of all matches +/- and also return surrounding

    - by Matt
    I'd like to create a regular expression that will match and return based on the following criteria: 1) I have N search terms entered by a user 2) I have a body of text. 3) I want to return a list of all the occurrences of all the search terms entered by the user plus surrounding context. I think (\w+\W+){,4}(", ")(\W+\w+){,4} might work. 4) I don't know how to use RegexKitLite at all. Do I invoke a RegexKitLite class? or does it interface into NSString somehow?

    Read the article

  • How to create a glib.Source from Python?

    - by Matt Joiner
    I want to integrate some asyncore.dispatcher instances into GLib's default main context. I figure I can create a custom GSource that's able to detect event readiness on the various sockets in asyncore.socket_map. From C I believe this is done by creating the necessary GSourceFuncs which could involve cheap and non-blocking calls to select, and then handling them using asyncore.read, .write and friends. How do I actually create a GSource from Python? The class glib.Source is undocumented, and attempts to use the class interactively have been in vain. Is there some other method that allows me to handled socket events in the asyncore module without resorting to timeouts (or anything that endangers potential throughput and CPU usage)?

    Read the article

  • WinForm-style Invoke() in unmanaged C++

    - by Matt Green
    I've been playing with a DataBus-type design for a hobby project, and I ran into an issue. Back-end components need to notify the UI that something has happened. My implementation of the bus delivers the messages synchronously with respect to the sender. In other words, when you call Send(), the method blocks until all the handlers have called. (This allows callers to use stack memory management for event objects.) However, consider the case where an event handler updates the GUI in response to an event. If the handler is called, and the message sender lives on another thread, then the handler cannot update the GUI due to Win32's GUI elements having thread affinity. More dynamic platforms such as .NET allow you to handle this by calling a special Invoke() method to move the method call (and the arguments) to the UI thread. I'm guessing they use the .NET parking window or the like for these sorts of things. A morbid curiosity was born: can we do this in C++, even if we limit the scope of the problem? Can we make it nicer than existing solutions? I know Qt does something similar with the moveToThread() function. By nicer, I'll mention that I'm specifically trying to avoid code of the following form: if(! this->IsUIThread()) { Invoke(MainWindowPresenter::OnTracksAdded, e); return; } being at the top of every UI method. This dance was common in WinForms when dealing with this issue. I think this sort of concern should be isolated from the domain-specific code and a wrapper object made to deal with it. My implementation consists of: DeferredFunction - functor that stores the target method in a FastDelegate, and deep copies the single event argument. This is the object that is sent across thread boundaries. UIEventHandler - responsible for dispatching a single event from the bus. When the Execute() method is called, it checks the thread ID. If it does not match the UI thread ID (set at construction time), a DeferredFunction is allocated on the heap with the instance, method, and event argument. A pointer to it is sent to the UI thread via PostThreadMessage(). Finally, a hook function for the thread's message pump is used to call the DeferredFunction and de-allocate it. Alternatively, I can use a message loop filter, since my UI framework (WTL) supports them. Ultimately, is this a good idea? The whole message hooking thing makes me leery. The intent is certainly noble, but are there are any pitfalls I should know about? Or is there an easier way to do this?

    Read the article

  • IPhone: different system timers??

    - by matt
    I have been using mach_absolute_time() for all my timing functions so far. calculating how long between frames ect. I now want to get the exact time touch input events happen using event.timestamp in the touch callbacks. the problem is these two seem to use completely different timers. sure, you can get them both in seconds, but their origins are different and seemingly random... is there any way to sync the two different timers? or is there anyway to get access to the same timer that the touch input uses to generate that timestamp property? otherwise its next to useless.

    Read the article

  • JQuery Toggle which disables other links

    - by Matt Jameson
    Is there a way of disabling another link, the re-enabling them with the toggle function. here is my script so far. I would like to disable 'military' when I've clicked on 'Entertainment', but then re enable the link when the toggle returns. $("[href='#Entertainment']").click(function () { $("#Entertainment").toggle("slow"); }); $("[href='#Military']").click(function () { $("#Military").toggle("slow"); }); Is there anyway of doing this?

    Read the article

  • Java Class<T> static method forName() IncompatibleClassChangeError

    - by matt
    Hi, i have this code: private static Importable getRightInstance(String s) throws Exception { Class<? extends Importable> c = Class.forName(s).asSubclass(Importable.class); Importable i = c.newInstance(); return i; } which i can also write private static Importable getRightInstance(String s) throws Exception { Class<? extends Importable> c = (Class<? extends Importable>)Class.forName(s); Importable i = c.newInstance(); return i; } or private static Importable getRightInstance(String s) throws Exception { Class<?> c = Class.forName(s); Importable i = (Importable)c.newInstance(); return i; } where Importable is an interface and s is a string representing an implementing class. Well, in any case it gives the following: Exception in thread "main" java.lang.IncompatibleClassChangeError: class C1 has interface Importable as super class Here is the last snippet of the stack trace: at java.lang.Class.forName(Class.java:169) at Importer.getRightImportable(Importer.java:33) at Importer.importAll(Importer.java:44) at Test.main(Test.java:16) Now, class C1 actually implemens Importable and i totally don't understand why it complaints. Thanks in advance.

    Read the article

< Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >