Search Results

Search found 949 results on 38 pages for 'patrick mann'.

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

  • WCF, ASMX Basic HTTP binding and IIS

    - by Brennan Mann
    Hello, I have been doing a lot of work with WCF "self" hosted applications. I recently was requested to write a web service where the calling client was a Linux based program named "WGET". I would like to use WCF instead of a traditional ASMX web service. The web service is returning a standard XML response. I am not sure of the underlining details between the two technologies but I know WCF is the proper route. I created a WCF service to be hosted in IIS ( using basicHttpBinding). 1.) Did classic ASMX web services ( standard HTTP POST/GET) use SOAP to return responses? I created an class from XSD for the web service response. What is really going on behind the scenes? Is there just special XML HTTP headers that know how to handle to response? Is the response not wrapped in SOAP? The traditional ASMX web service worked perfectly with the class I generated using the .Net "XSD" program. 2.) I want to use WCF for this service. Will using basicHttpBinding work? As I have read, that is the correct binding to use for ASMX clients. Does this use SOAP, standard HTTP headers, or something else? 3.) This is a dumb question because I have not done a lot of web service programming. I noticed on the ASMX default landing page there were examples for responses and code to invoke the functionality. When I create the same service using WCF, I had to create a client application to perform these tasks. Is there a way to expose the WCF endpoint like a classic ASMX service or is the WSDL the only route? As always, I really appreciate the feedback. Thanks, Brennan

    Read the article

  • Query design in SQL - ORDER BY SUM() of field in rows which meet a certain condition

    - by Christian Mann
    OK, so I have two tables I'm working with - project and service, simplified thus: project ------- id PK name str service ------- project_id FK for project time_start int (timestamp) time_stop int (timestamp) One-to-Many relationship. Now, I want to return (preferably with one query) a list of an arbitrary number of projects, sorted by the total amount of time spent at them, which is found by SUM(time_stop) - SUM(time_start) WHERE project_id = something. So far, I have SELECT project.name FROM service LEFT JOIN project ON project.id = service.project_id LIMIT 100 but I cannot figure out how what to ORDER BY.

    Read the article

  • How to render partial.js in rails 3

    - by julian-mann
    Using rails3 - I have a project with many tasks. I want to use javascript to build the UI for each task. I figured I could display those tasks on the projects show page by rendering a javascript partial for each. I can't get 'tasks/show' to see tasks/show.js.erb Any ideas? In projects/show.html.erb <div id="tasks"> <%= render(:partial => "tasks/show", :collection => @project.tasks) %> </div> tasks/show.js.erb $("tasks").append(new TaskWidget(task.id)) I get the errors ActionView::MissingTemplate in Projects#show Missing partial tasks/show with {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml], :formats=>[:html], :locale=>[:en, :en]} in view paths .... around line #13 Thanks

    Read the article

  • LINQ Normalizing data

    - by Brennan Mann
    I am using an OMS that stores up to three line items per record in the database. Below is an example of an order containing five line items. Order Header Order Detail Prod 1 Prod 2 Prod 3 Order Detail Prod 4 Prod 5 One order header record and two detail records. My goal is have a one to one relation for details records(i.e., one detail record per line item). In the past, I used an UNION ALL SQL statement to extract the data. Is there a better approcach to this problem using LINQ? Below is my first attempt at using LINQ. Any feedback, suggestions or recommendations would greatly be appreciated. For what I have read, an UNION statement can tax the process? var orderdetail = (from o in context.ORDERSUBHEADs select new { edpNo = o.EDPNOS_001, price = o.EXTPRICES_001, qty = o.ITEMQTYS_001 } ).Union(from o in context.ORDERSUBHEADs select new { edpNo = o.EDPNOS_002, price = o.EXTPRICES_002, qty = o.ITEMQTYS_002 } ).Union(from o in context.ORDERSUBHEADs select new { edpNo = o.EDPNOS_003, price = o.EXTPRICES_003, qty = o.ITEMQTYS_003 });

    Read the article

  • Can a script called by XHR reference $_COOKIE?

    - by Christian Mann
    Quick yes/no - I'm building an AJAX application and some scripts require authentication. Can I read $_COOKIE['username'] and $_COOKIE['password'] on the server if the PHP script was called via XHR, whether that be $.get() or $.post()? Side question: Can it also set cookies? Is that considered "good practice"?

    Read the article

  • continuous music on website

    - by Patrick
    Hi all, I'm against it as I'm sure ALL of you are, but my client wants background music on their website. I'm very new to this, so was wondering how should I do that? I know I should use iframes, but what's the actual way of using them? eg: do I just create the home page with 2 frames (one for the music, one for the rest of the website), and then every time the user clicks on a link I can load the usual destination page - or should I update all pages in some way to make sure they are 'frames enabled'? Also, I do I style the frame to make sure it's hidden? thanks, Patrick ps please don't reopen the discussion about why background music is not good - I do know that and personally hate it. But the client is adamant and paying for it so... ;)

    Read the article

  • SQL Stored Queries - use result of query as boolean based on existence of records

    - by Christian Mann
    Just getting into SQL stored queries right now... anyway, here's my database schema (simplified for YOUR convenience): member ------ id INT PK board ------ id INT PK officer ------ id INT PK If you're into OOP, Officer Inherits Board Inherits Member. In other words, if someone is listed on the officer table, s/he is listed on the board table and the member table. I want to find out the highest privilege level someone has. So far my SP looks like this: DELIMITER // CREATE PROCEDURE GetAuthLevel(IN targetID MEDIUMINT) BEGIN IF SELECT `id` FROM `member` WHERE `id` = targetID; THEN IF SELECT `id` FROM `board` WHERE `id` = targetID; THEN IF SELECT `id` FROM `officer` WHERE `id` = targetID; THEN RETURN 3; /*officer*/ ELSE RETURN 2; /*board member*/ ELSE RETURN 1; /*general member*/ ELSE RETURN 0; /*not a member*/ END // DELIMITER ; The exact text of the error is #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT id FROM member WHERE id = targetID; THEN IF SEL' at line 4 I suspect the issue is in the arguments for the IF blocks. What I want to do is return true if the result-set is at least one -- i.e. the id was found in the table. Do any of you guys see anything to do here, or should I reconsider my database design into this:? person ------ id INT PK level SMALLINT

    Read the article

  • JUnit: 4.8.1 "Could not find class"

    - by Patrick
    Ok, I am like other and new to jUnit and having a difficult time trying to get it working. I have searched the forum but the answers provided; I am just not getting. If anyone out there could lend me a hand I would greatly appreciate it. Let me provide the basics: OS: mac OS X.6 export JUNIT_HOME="/Developer/junit/junit4.8.1" export CVSROOT="/opt/cvsroot" export PATH="/usr/local/bin:/usr/local/sbin:/usr/localmysql/bin:/opt/PalmSDK/Current/bin/:/usr/local/mysql/bin:$PATH:$JUNIT_HOME:$CVSROOT" export CLASSPATH="$CLASSPATH:$JUNIT_HOME/junit-4.8.1.jar:$JUNIT_HOME" I can compile a test class from a java file, however when I try to then run the test java org.junit.runner.JUnitCore MyTest.class I get the following: JUnit version 4.8.1 Could not find class: MyTest.class Time: 0.001 OK (0 tests) Now I have been in the directory with the MyTest.class which is just somewhere in my file system, I tried moving the source folder to the "junit" folder and the "junit/junit4.8.1" folder and the same result. I cannot even run the tests that came with junit. Thanks patrick

    Read the article

  • Capture and display console output at the same time

    - by Patrick
    Hi, MSDN states that it is possible in .NET to capture the output of a process and display it in the console window at the same time. Normally when you set StartInfo.RedirectStandardOutput = true; the console window stays blank. As the MSDN site doesn't provide a sample for this I was wondering if anyone would have a sample or could point me to a sample? When a Process writes text to its standard stream, that text is normally displayed on the console. By redirecting the StandardOutput stream, you can manipulate or suppress the output of a process. For example, you can filter the text, format it differently, or write the output to both the console and a designated log file. MSDN This post is similar to http://stackoverflow.com/questions/786726/capture-standard-output-and-still-display-it-in-the-console-window by the way. But that post didn't end up with a working sample. Thanks a lot, Patrick

    Read the article

  • Graphing a line and scatter points using Matplotlib?

    - by Patrick O'Doherty
    Hi guys I'm using matplotlib at the moment to try and visualise some data I am working on. I'm trying to plot around 6500 points and the line y = x on the same graph but am having some trouble in doing so. I can only seem to get the points to render and not the line itself. I know matplotlib doesn't plot equations as such rather just a set of points so I'm trying to use and identical set of points for x and y co-ordinates to produce the line. The following is my code from matplotlib import pyplot import numpy from pymongo import * class Store(object): """docstring for Store""" def __init__(self): super(Store, self).__init__() c = Connection() ucd = c.ucd self.tweets = ucd.tweets def fetch(self): x = [] y = [] for t in self.tweets.find(): x.append(t['positive']) y.append(t['negative']) return [x,y] if __name__ == '__main__': c = Store() array = c.fetch() t = numpy.arange(0., 0.03, 1) pyplot.plot(array[0], array[1], 'ro', t, t, 'b--') pyplot.show() Any suggestions would be appreciated, Patrick

    Read the article

  • C# / Visual Studio: production and test code placement

    - by Patrick Linskey
    Hi, In JavaLand, I'm used to creating projects that contain both production and test code. I like this practice because it simplifies testing of internal code without artificially exposing the internals in a project's published API. So far, in my experiences with C# / Visual Studio / ReSharper / NUnit, I've created separate projects (i.e., separate DLLs) for production and test code. Is this the idiom, or am I off base? If this idiomatically correct, what's the right way to deal with exposing classes and methods for test purposes? Thanks, -Patrick

    Read the article

  • Web service can't open named pipe - access denied

    - by Patrick
    Hi All, I've got a C++ service which provides a named pipe to clients with a NULL SECURITY_ATTRIBUTES as follows: hPipe = CreateNamedPipe( lpszPipename, PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT, PIPE_UNLIMITED_INSTANCES, BUFSIZE, BUFSIZE, 0, NULL); There is a dll which uses this pipe to get services. There is a c# GUI which uses the dll and works fine. There is a .net web site which also uses this dll (the exact same one on the same PC) but always gets permission denied when it tries to open the pipe. Any one know why this might happen and how to fix it? Also does anyone know of a good tutorial on SECURITY_ATTRIBUTES because I haven't understood the msdn info yet. Thanks, Patrick

    Read the article

  • Exceptions and Access Violations in Paint events in Windows

    - by Patrick
    After executing some new code, my C++ application started to behave strange (incorrect or incomplete screen updates, sometimes no screen updates at all). After a while we found out that the new code is causing an Access Violation. Strange enough, the application simply keeps on running (but with the incorrect screen updates). At first we thought the problem was caused by a "try-catch(...)" construction (put there by an overactive ex-colleague), but several hours later (carefully inspecting the call stacks, adding many breakpoints, ...) we found out that if there's an Access Violation in a paint event, Windows catches it, and simply continues running the application. Is this normal behavior? Is it normal that Windows catches exceptions/errors during a paint event? Is there a way to disable this? (if not, it would mean that we have to always run in the debugger with all exceptions enabled while testing our code). Patrick

    Read the article

  • Undefined reference to ...

    - by Patrick LaChance
    I keep getting this error message every time I try to compile, and I cannot find out what the problem is. any help would be greatly appreciated: C:\DOCUME~1\Patrick\LOCALS~1\Temp/ccL92mj9.o:main.cpp:(.txt+0x184): undefined reference to 'List::List()' C:\DOCUME~1\Patrick\LOCALS~1\Temp/ccL92mj9.o:main.cpp:(.txt+0x184): undefined reference to 'List::add(int)' collect2: ld returned 1 exit status code: //List.h #ifndef LIST_H #define LIST_H #include <exception> //brief Definition of linked list class class List { public: /** \brief Exception for operating on empty list */ class Empty : public std::exception { public: virtual const char* what() const throw(); }; /** \brief Exception for invalid operations other than operating on an empty list */ class InvalidOperation : public std::exception { public: virtual const char* what() const throw(); }; /** \brief Node within List */ class Node { public: /** data element stored in this node */ int element; /** next node in list */ Node* next; /** previous node in list */ Node* previous; Node (int element); ~Node(); void print() const; void printDebug() const; }; List(); ~List(); void add(int element); void remove(int element); int first()const; int last()const; int removeFirst(); int removeLast(); bool isEmpty()const; int size()const; void printForward() const; void printReverse() const; void printDebug() const; /** enables extra output for debugging purposes */ static bool traceOn; private: /** head of list */ Node* head; /** tail of list */ Node* tail; /** count of number of nodes */ int count; }; #endif //List.cpp I only included the parts of List.cpp that might be the issue #include "List.h" #include <iostream> #include <iomanip> using namespace std; List::List() { //List::size = NULL; head = NULL; tail = NULL; } List::~List() { Node* current; while(head != NULL) { current = head-> next; delete current->previous; if (current->next!=NULL) { head = current; } else { delete current; } } } void List::add(int element) { Node* newNode; Node* current; newNode->element = element; if(newNode->element > head->element) { current = head->next; } else { head->previous = newNode; newNode->next = head; newNode->previous = NULL; return; } while(newNode->element > current->element) { current = current->next; } if(newNode->element <= current->element) { newNode->previous = current->previous; newNode->next = current; } } //main.cpp #include "List.h" #include <iostream> #include <string> using namespace std; //void add(int element); int main (char** argv, int argc) { List* MyList = new List(); bool quit = false; string value; int element; while(quit==false) { cin>>value; if(value == "add") { cin>>element; MyList->add(element); } if(value=="quit") { quit = true; } } return 0; } I'm doing everything I think I'm suppose to be doing. main.cpp isn't complete yet, just trying to get the add function to work first. Any help will be greatly appreciated.

    Read the article

  • Are there any modern platforms with non-IEEE C/C++ float formats?

    - by Patrick Niedzielski
    Hi all, I am writing a video game, Humm and Strumm, which requires a network component in its game engine. I can deal with differences in endianness easily, but I have hit a wall in attempting to deal with possible float memory formats. I know that modern computers have all a standard integer format, but I have heard that they may not all use the IEEE standard for floating-point integers. Is this true? While certainly I could just output it as a character string into each packet, I would still have to convert to a "well-known format" of each client, regardless of the platform. The standard printf() and atod() would be inadequate. Please note, because this game is a Free/Open Source Software program that will run on GNU/Linux, *BSD, and Microsoft Windows, I cannot use any proprietary solutions, nor any single-platform solutions. Cheers, Patrick

    Read the article

  • "IronPython + .NET" vs "Python + PyQt". Which one is better for Windows App development?

    - by Patrick.L
    Hi, I'm new in using Python. I would like to develop Windows GUI Application using Python. After some research, I found that I have 2 options:- IronPython + .NET Framework Python + PyQt May I know which one is better for Windows Application development? Which option has more features (e.g. database support, etc)? Other than the .NET support, is there any big difference between IronPython and Python? Which one is a better choice for me? Thank you. Patrick.L

    Read the article

  • How to build a Windows Forms email-aware text box?

    - by Patrick Linskey
    Hi, I'm building a C# client app that allows a user to communicate with one or more existing users in a system via an email-like metaphor. I'd like to present the user with a text entry box that auto-completes on known email addresses, and allows multiple delimiter-separated addresses to be entered. Ideally, I'd also like the email addresses to turn into structured controls once they've been entered and recognized. Basically, I'm modeling the UI interaction for adding users after Facebook's model. Are there any Windows Forms controls out there with the ability to do something like this? Is there any well-established terminology for a hybrid textbox / control list box (no, not a ComboBox) or something that I should be searching for? Thanks, -Patrick

    Read the article

  • Floated element not included in parent, causing margin-bottom problems

    - by Christian Mann
    Right, so I've got a section of a page: <div class="article"> <div class="author"> <img src="images/officers/john_q_public_thm.jpg" /> <span class="name">John Q. Public</span> <span class="position">President</span> </div> <abbr class="postdate"> <span class="month m-01">Jan</span> <span class="day d-31">31</span> <span class="year y-2009">2009</span> </abbr> <div class="content"> <h2 class="title">Article Title</h2> <p>Pellentesque habitant morbi...facilisis luctus, metus</p> <p>Pellentesque habitant morbi...facilisis luctus, metus</p> </div> </div> <div class="article">...</div> <div class="article">...</div> The author and abbr divs are floated to the left. Each one of these article divs needs to be separated from its siblings by 5px or so. However, the author div is extending beyond the technical "height" of the div. The margin-bottom is doing nothing, as the space is being taken up by the floated author. This is somewhat difficult to envision, so I've placed it on my web server Is there any way to force the parent to be at least as tall as all of the floated elements within? If anyone figures out what I'm saying, thanks.

    Read the article

  • Stacking a View with the Editor Area?

    - by Patrick
    Hello everybody, :-) Is it possible, when developing an Eclipse RCP Application, to stack a view with the editor area? Like this? http://www.fotos-hochladen.net/stackingaviewwithane9e1fdbvp.png I have multiple lists / tables. I want to create a kind of preview composite. When an Item on a list is selected by single mouse click, i want my preview composite to show the data of the item. If the user double clicks an item, i want to open an editor in the stack behind the preview composite. Is there anyway to achieve this? Thanks Patrick :-)

    Read the article

  • Function for averages of tuples in a dictionary

    - by Billy Mann
    I have a string, dictionary in the form: ('the head', {'exploded': (3.5, 1.0), 'the': (5.0, 1.0), "puppy's": (9.0, 1.0), 'head': (6.0, 1.0)}) Each parentheses is a tuple which corresponds to (score, standard deviation). I'm taking the average of just the first integer in each tuple. I've tried this: def score(string, d): for word in d: (score, std) = d[word] d[word]=float(score),float(std) if word in string: word = string.lower() number = len(string) return sum([v[0] for v in d.values()]) / float(len(d)) if len(string) == 0: return 0 When I run: print score('the head', {'exploded': (3.5, 1.0), 'the': (5.0, 1.0), "puppy's": (9.0, 1.0), 'head': (6.0, 1.0)}) I should get 5.5 but instead I'm getting 5.875. Can't figure out what in my function is not allowing me to get the correct answer.

    Read the article

  • Is it possible to establish default values for inherited fields in subclasses?

    - by Christian Mann
    I'm trying to establish a default value for inherited fields from superclasses. So, my class hierarchy is thus: Character - Enemy - Boss                 \                   - Hero Each Character has a public static char avatar to represent him on an ASCII playing field. How do I set a default value for the avatar of each class inherited from Character? Thank you!

    Read the article

  • Cocoa button won't display image

    - by A Mann
    Just started exploring Cocoa so pretty much a total noob. I've written a very simple game. Set it up in Interface Builder and got it working fine. It contains a number of buttons and I'm now trying to get the buttons to display images. To start with I'm trying to get an image displayed on just one of the buttons which is called tile0 . The image file (it's nothing but a green square at the moment, but I'm just trying to get that working before I attempt anything more exotic) is sitting in the same directory as the class file which controls the game. I have the following code sitting in my wakeFromNib method: NSString *myImageFileName = [[NSString alloc] init]; myImageFileName = @"greenImage.jpg"; NSImage *myImage = [[NSImage alloc] initByReferencingFile:myImageFileName]; [tile0 setImage: myImage]; Trouble is, the game runs fine, but the image isn't appearing on my button. Is there someone who could kindly tell me if I'm doing something obviously wrong? Many Thanks.

    Read the article

  • Android string formatiing from xml

    - by mann
    I am parsing xml from server. One of its node contains data like <distance>16.3432434324354324km</distance> I am putting it into hashmap like for (int i = 0; i < nl.getLength(); i++) { map.put(KEY_DISTANCE, parser.getValue(e, KEY_DISTANCE)); // adding HashList to ArrayList menuItems.add(map); } Everything is nice. But i want it two decimal places for example i want its value should be 16.34km rather then 16.343234324342342km I tried with DecimalFormat twoDForm=new DecimalFormat("##.00"); try{ Double StartVTwo=Double.valueOf(KEY_DISTANCE); Double resultDouble1 = Double.valueOf(twoDForm.format(StartVTwo)); Log.e("check", String.valueOf(resultDouble1)); }catch (NumberFormatException e){ Log.e("error"," This is error "); } But it shows exception and prints this message. Any help would be appreciated!!

    Read the article

  • windows server 2008 r2 remote desktop issue with roaming clients

    - by Patrick D'Haese
    I have the following situation : a Dell windows server 2008 R2 computer, with remote desktop services installed. I have installed a java application making use of a PostgreSql database, and made this application available for clients using RDP. Clients are standard Win XP pc's and Psion Neo handheld devices running Windows CE 5 Pro. The application works fine for clients on standard XP pc's connected directly via cat 5E Ethernet cable to a Dell Powerconnect 2816 switch. The Psion Neo clients connect wireless to the network via Motorola AP6532 access points. These access points are connected via a POE adapter to the same switch as the XP pc's. The Psion devices can connect without any problem and very quickly to the server and to the application using RDP. So far, so good. When the Psion devices move around in the warehouse, and they roam from one access point to the other, the RDP session on the client freezes for approx 1 minute, and then it automatically resumes the session. This freezing is very annoying for the users. Can anyone help in solving this issue? Update (August 9) : After re-installing the access points we have a working situation, but only when connecting to the RDP host : * via a Win Xp SP3 laptop * via a Symbol MC9190 Win CE 6 mobile device When roaming we notice a small hick-up less then 1 second, what is very acceptable. With the Psion NEO it's still not working, when roaming the screen freezes from 2 to 30 seconds. The RDP client on the win xp sp3 laptop and the symbol mc9190 is version 6.0. The RDP client on the neo is version 5.2. I have changed the security layer on the RDP host to RDP security layer (based on forums on the internet), because older RDP clients seem to have issues with the RDP 7.1 protocol on the Win server 2088 R2. Psion adviced us to do some network logging activity on the different devices. We made this logging via wireshark, and based on this the conclusion of Psion is that the server fails in handling tcp-requests. Can anyone give me a second opinion by analysing the wireshark loggings. Thanks in advance. Regards Patrick

    Read the article

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