Search Results

Search found 311 results on 13 pages for 'jamie chapman'.

Page 10/13 | < Previous Page | 6 7 8 9 10 11 12 13  | Next Page >

  • Eliminating static properties - What patterns do I have at my disposal?

    - by Jamie Dixon
    I currently have a type that I inject into my controllers that's used for getting and setting session data. I use this so that I can obtain relevant session information as _sessionData.Username rather than using Session["username"]. I'd like to use this session information across all of my views and would previously have done this by making the SessionData members static instead of injecting the SessionData class into my controller. I want to avoid using static members as well as having to pass the object to the view in each controller. What patterns best suit this type of scenario? What do you do to solve this same problem?

    Read the article

  • How necessary is using PHP filters?

    - by Jamie
    I'm a relatively newbie to PHP and just making my way through the W3Schools tut. The tut makes a big point of saying you must always filter external data (i.e. cookies, form data etc). I'm writing a fairly simple system that talks with a third party Joomla extension. It's at a prototype stage where I'm just wanting to demonstrate the functionality in a minimum viable product. Basically, I'd like to know... what's the worst that could happen in I don't filter content. Are we talking 'I might get a bunch of spam', or 'a good hacker could get root server access'? Have hunted around online, but would love any of your experience / insight on the matter!

    Read the article

  • Problem with assembly loading in .NET

    - by Jamie
    Hi guys, I have got two projects in my solution: Silverlight and standard one. The standard one references System.Xml assembly (version 4.0.0.0), however the Silverlight one references System.Xml assembly (v. 2.0.5.0). I want to make an instance of XmlWriter in my Silverlight project. Here comes the problem - the exception is thrown (file not found for System.Xml assembly). I believe it is a matter of different assembly versions. Do you have any idea how to resolve this issue? Ive read something about the binding redirection - is it the key to the solution? If so, how to do this? Thank you in advance for the reply! Cheers.

    Read the article

  • Developing on a windows machine that interacts with a linux system

    - by Jamie
    Sorry for the bad title (couldn't think of a better way to describe it) I have a windows machine which I do development on. However, I have a new project which needs to interact with a linux system (executing linux commands etc.). So, obviously I can't do development on my windows machine..and I don't wish to code on the dev machine, svn commit and then svn update it on the linux machine. Is there a way where any changes I make on my dev machine will be quickly mirrored to the linux machine? SVN is not a very quick alternative and of course some changes will be very minor. Any ideas? A network share I guess....but that's not very pretty (bit slow too). As fellow developers I would like to know if you've been in a similar situation and how you've resolved it. On a furthernote, I can't just install Ubuntu as my development machine and mirror the commands, applications etc. from the linux machine because it's a cluster 'master' machine and so therefore it has quite a special configuration. Thanks guys! EDIT: I've also thought about having web services on the linux machine and then just calling them from code thus seperating platform development dependency. What do you think about that too? thanks

    Read the article

  • Wrapping unmanaged C++ with C++/CLI - a proper approach.

    - by Jamie
    Hi there, as stated in the title, I want to have my old C++ library working in managed .NET. I think of two possibilities: 1) I might try to compile the library with /clr and try "It Just Works" approach. 2) I might write a managed wrapper to the unmanaged library. First of all, I want to have my library working FAST, as it was in unmanaged environment. Thus, I am not sure if the first approach will not cause a large decrease in performance. However, it seems to be faster to implement (not a right word :-)) (assuming it will work for me). On the other hand, I think of some problems that might appear while writing a wrapper (e.g. how to wrap some STL collection (vector for instance)?) I think of writing a wrapper residing in the same project as the unmanaged C++ resides - is that a reasonable approach (e.g. MyUnmanagedClass and MyManagedClass in the same project, the second wrapping the other)? What would you suggest in that problem? Which solution is going to give me better performance of the resulting code? Thank you in advance for any suggestions and clues! Cheers

    Read the article

  • How do I assign by "reference" to a class field in c#?

    - by Jamie
    I am trying to understand how to assign by "reference" to a class field in c#. I have the follwing example to consider: public class X { public X() { string example = "X"; new Y( ref example ); new Z( ref example ); System.Diagnostics.Debug.WriteLine( example ); } } public class Y { public Y( ref string example ) { example += " (Updated By Y)"; } } public class Z { private string _Example; public Z( ref string example ) { this._Example = example; this._Example += " (Updated By Z)"; } } var x = new X(); When running the above code the output is: X (Updated By Y) And not: X (Updated By Y) (Updated By Z) As I had hoped. It seems that assigning a "ref parameter" to a field loses the reference. Is there any way to keep hold of the reference when assigning to a field? Thanks.

    Read the article

  • customvalidator onServerValidate not firing

    - by Jamie
    I have a Radio button List and Text Box both with validation. <asp:RadioButtonList ID="member" runat="server" RepeatDirection="Horizontal"> <asp:ListItem>Yes</asp:ListItem> <asp:ListItem>No</asp:ListItem> </asp:RadioButtonList> <asp:requiredfieldvalidator id="unionvalidator" runat="server" controltovalidate="member" errormessage="Required" /> Required if member == "yes" <asp:TextBox runat="server" ID="union"></asp:TextBox> <asp:customvalidator ID="Customvalidator1" runat="server" ValidateEmptyText="true" onServerValidate="UnionValidate" errormessage="Your current union is required" /> My ServerValidate which doesn't fire at all. public void UnionValidate(object source, ServerValidateEventArgs args) { if (member.Text == "yes" && union.Text.Trim() == "") args.IsValid = false; }

    Read the article

  • Using CreateFileMapping between two programs - C

    - by Jamie Keeling
    Hello, I have two window form applications written in C, one holds a struct consisting of two integers, another will receive it using the CreateFileMapping. Although not directly related I want to have three events in place so each of the processes can "speak" to each other, one saying that the first program has something to pass to the second, one saying the first one has closed and another saying the second one has closed. What would be the best way about doing this exactly? I've looked at the MSDN entry for the CreateFileMapping operation but I'm still not sure as to how it should be done. I didn't want to start implementing it without having some sort of clear idea as to what I need to do. Thanks for your time.

    Read the article

  • OpenSource Projects - Is there a site which lists projecs that need more developers?

    - by Jamie
    Morning/Afternoon/Evening all, Do any of you know of a website which lists opensource projects which are in need of more help? Let me elaborate, I would like to work on another open source project (I already work on a couple), however, it would be nice to have a site which lists lots of OS projects, their aims, deadlines, workload, how many more developers they are in need of etc. Of course, I could just pick a topic i'm interested in, find an OS project and then work on it, however, it would be nice to see a diversified list of projects. Primarily because some little known awesome projects get little attention and big projects such as jQuery forks, adium, gimp etc. etc. get a lot of attention because they are well known (and of course because they are great)and thus get a lot of developers working on them. It would be nice to see some little known projects getting more attention and thus hopefully drawing some people to work on them. Currently there are many websites hosting os projects, such as github, sourceforge, google code etc. A website to centralise all of this into one place and categorise it would be awesome. Let me know your thoughts please. I'm not looking for an answer per se, so I will mark it is as a community wiki. Your thoughts would be great.

    Read the article

  • Excel Spreadsheet - Best way to perform an Oracle Query on a cell

    - by Jamie
    Hi there, I have an Excel Spreadsheeet. There is a cell containing a concatenated name and surname (don't ask why), for example: Cell A2 BLOGGSJOE On this cell, I would like to run the following SQL and output it to cell A3, A4 and A5 SELECT i.id, i.forename, i.surname FROM individual i WHERE UPPER(REPLACE('" & A2 & "', ' ', '')) = UPPER(REPLACE(i.surname|| i.forename, ' ', '')) AND NVL(i.ind_efface, 'N') = 'N' Any idea how I could perform an oracle query on each cell and return the result? I have enabled an oracle datasource connection in Excel, just not sure what to do now. Is this a stupid approach, and can you recommend a better more proficient way? Thanks muchly! I lack the necessary experience in this type of thing! :-) EDIT: I am aware that I could just write a simple ruby/php/python/whatever script to loop through the excel spreadsheet (or csv file), and then perform the query etc. but i thought there might be a quick way in excel itself.

    Read the article

  • Ideas on implementing threads and cross process communication. - C

    - by Jamie Keeling
    Hello all! I have an application consisting of two windows, one communicates to the other and sends it a struct constaining two integers (In this case two rolls of a dice). I will be using events for the following circumstances: Process a sends data to process b, process b displays data Process a closes, in turn closing process b Process b closes a, in turn closing process a I have noticed that if the second process is constantly waiting for the first process to send data then the program will be just sat waiting, which is where the idea of implementing threads on each process occured. I have already implemented a thread on the first process which currently creates the data to send to the second process and makes it available to the second process. The problem i'm having is that I don't exactly have a lot of experience with threads and events so I'm not sure of the best way to actually implement what I want to do. Following is a small snippet of what I have so far in the producer application; Rolling the dice and sending the data: case IDM_FILE_ROLLDICE: { hDiceRoll = CreateThread( NULL, // lpThreadAttributes (default) 0, // dwStackSize (default) ThreadFunc(hMainWindow), // lpStartAddress NULL, // lpParameter 0, // dwCreationFlags &hDiceID // lpThreadId (returned by function) ); } break; The data being sent to the other process: DWORD WINAPI ThreadFunc(LPVOID passedHandle) { HANDLE hMainHandle = *((HANDLE*)passedHandle); WCHAR buffer[256]; LPCTSTR pBuf; LPVOID lpMsgBuf; LPVOID lpDisplayBuf; struct diceData storage; HANDLE hMapFile; DWORD dw; //Roll dice and store results in variable storage = RollDice(); hMapFile = CreateFileMapping( (HANDLE)0xFFFFFFFF, // use paging file NULL, // default security PAGE_READWRITE, // read/write access 0, // maximum object size (high-order DWORD) BUF_SIZE, // maximum object size (low-order DWORD) szName); // name of mapping object if (hMapFile == NULL) { dw = GetLastError(); MessageBox(hMainHandle,L"Could not create file mapping object",L"Error",MB_OK); return 1; } pBuf = (LPTSTR) MapViewOfFile(hMapFile, // handle to map object FILE_MAP_ALL_ACCESS, // read/write permission 0, 0, BUF_SIZE); if (pBuf == NULL) { MessageBox(hMainHandle,L"Could not map view of file",L"Error",MB_OK); CloseHandle(hMapFile); return 1; } CopyMemory((PVOID)pBuf, &storage, (_tcslen(szMsg) * sizeof(TCHAR))); //_getch(); MessageBox(hMainHandle,L"Completed!",L"Success",MB_OK); UnmapViewOfFile(pBuf); return 0; } I'd like to think I am at least on the right lines, although for some reason when the application finishes creating the thread it hits the return DefWindowProc(hMainWindow, message, wParam, lParam); it crashes saying there's no more source code for the current location. I know there are certain ways to implement things but as I've mentioned I'm not sure if i'm doing this the right way, has anybody else tried to do the same thing? Thanks!

    Read the article

  • .NET TCP Client/Server communication issue

    - by Jamie
    What I'm currently trying to do is make a very basic webchat for irc using silverlight. Basically how I'm trying to do it is have a tcp server listening for connections from silverlight. When a client connects it creates a new connection to irc and data is passed to/from the client/irc via the server application. I've gotten it to work fine for one client connection, but as soon as two (or more) clients connect multiple connections are made to irc but all data passed from the clients just goes through the latest irc connection (if that makes sense). For example Client1, Client2 and Client3 are all connected to irc, but no matter who sends data it all comes through Client3. Between the client and server app it recognizes the data coming in from different clients so i believe the problems lies within the way I've connected to the irc. When the TCP server accepts a new client a new thread is made to listen to incoming data, and from there a new thread is made to connect to irc. I'm sure thats where the problem exists, but I've confused myself a lot now and am wondering if anyone can help me figure out a solution. EDIT: What I think is the problem, is that it can't distinguish which thread the specific client is using, so it just sends it via the latest one. Can this even be done?

    Read the article

  • jQuery Looking for a function to equalize heights of divs based on tallest image in a table.

    - by Jamie
    I am doing a site that will have a table with a bunch of images in them. They are user added images so I have no control over aspect ratio, what I do have control over is I can the force a max height/width and the image will not exceed this in either direction, but the height can (and will) fluctuate. <table class="pl_upload"> <tr class="row1"> <td class="col1"> <div> <div class="img-container"> <a href="#"><img src="img.jpg" width="182" alt="X" /></a> </div> </div> </td> ....... What I need ideally is to get the height of the tallest image and then make the all of the children divs the same height based on the height of the tallest one. I hope that makes sense, been a long day. I made a jsfiddle page for it here: http://jsfiddle.net/Evolution/27EJB/

    Read the article

  • Casting to global variable from LPVOID - C

    - by Jamie Keeling
    I am trying to cast data to a struct from a parameter passed into my method, I need the data to be passed to a global variable as it is needed elsewhere in my application. I have tried the following but I get errors saying that diceResult is an undeclared identifier Here is the code itself: //Structure to hold dice data typedef struct diceData { int dice1; int dice2; }; struct diceResult; DWORD WINAPI UnpackDiceData(LPVOID sentData) { //Unpack data struct diceData unpackedData = *((struct diceData*)sentData); diceResult.dice1 = unpackedData.dice1; diceResult.dice2 = unpackedData.dice2; } I don't understand why it won't recognise it being there when it's clearly global.

    Read the article

  • Creating additional Window by a thread - C

    - by Jamie Keeling
    Hello, I have a windows form that has a simple menu and performs a simple operation, I want to be able to create another windows form with all the functionality of a menu bar, message pump etc.. as a separate thread so I can then share the results of the operation to the second window. I.E. 1) Form A opens Form B opens as a separate thread 2)Form A performs operation 3)Form A passes results via memory to Form B 4)Form B display results I'm confused as to how to go about it, the main app runs fine but i'm not sure how to add a second window if the first one already exists. I hope it makes sense. Thanks!

    Read the article

  • Creating two Windows by running one as a process from another - C

    - by Jamie Keeling
    Hello, I have a windows form that has a simple menu and performs a simple operation, I want to be able to create another windows form with all the functionality of a menu bar, message pump etc.. as a seperate process so I can then share the results of the operation to the second window. I.E. 1) Form A opens Form B opens as a separate process 2)Form A performs operation 3)Form A passes results via memory to Form B 4)Form B display results I'm confused as to how to go about it, the main app runs fine but i'm not sure how to add a second window if the first one already exists. I hope it makes sense. Thanks!

    Read the article

  • Floating point numbers in XML

    - by Jamie
    what is the best way to handle floating point numbers in XML? If I have, for instance: double a = 123.456; and I would like to keep it as <A> 123.456 </A> simply using ... myDoc.createTextNode(a.ToString()); is fine? Or should it be done with some Globalization stuff to make it region-independent?

    Read the article

  • Injecting a dependancy into a base class

    - by Jamie Dixon
    Hey everyone, I'm on a roll today with questions. I'm starting out with Dependency Injection and am having some trouble injecting a dependency into a base class. I have a BaseController controller which my other controllers inherit from. Inside of this base controller I do a number of checks such as determining if the user has the right privileges to view the current page, checking for the existence of some session variables etc. I have a dependency inside of this base controller that I'd like to inject using Ninject however when I set this up as I would for my other dependencies I'm told by the compiler that: Error 1 'MyProject.Controllers.BaseController' does not contain a constructor that takes 0 argument This makes sense but I'm just not sure how to inject this dependency. Should I be using this pattern of using a base controller at all or should I be doing this in a more efficient/correct way?

    Read the article

  • Running processes at different times stops events from working - C

    - by Jamie Keeling
    Hello, This is a question which follows on from my previously answered question here At first I assumed I had a problem with the way I was creating my events due to the handles for OpenEvent returning NULL, I have managed to find the real cause however I am not sure how to go about it. Basically I use Visual Studio to launch both Process A and B at the same time, in the past my OpenEvent handle wouldn't work due to Process A looking for the address of the event a fraction of a second before Process B had time to make it. My solution was to simply allow Process B to run before Process A, fixing the error. The problem I have now is that Process B now reads events from Process A and as you expect it too returns a null handle when trying to open the events from Process A. I am creating the events in WM_CREATE message of both processes, furthermore I also create a thread at the same time to open/read/act upon the events. It seems if I run them at the same time they don't get chance to see each other, alternatively if I run one before the other one of them misses out and can't open a Handle. Can anyone suggest a solution? Thanks.

    Read the article

  • Error debugging - Conversion from String to Double

    - by Jamie Taylor
    I'm doing some error debugging trying to get the errors on our website down to a minimum and there seems to be an error that is popping up quite a lot Conversion from string "" to type 'Double' is not valid. I'm unable to replicate this problem but I can see that it is happening. I've been looking through the code in one of the pages and strolled across this Dim varWeek As String If varWeek < 10 Then 'Do something' End If Could this be causing the problem as it is trying to see if a String is less than 10 which is an Integer? As I said before as I am unable to see this error in the first place so changing this to an Integer doesn't change anything on my system. Thanks.

    Read the article

  • Can I copy a cross compiler tool chain between systems (I did before)?

    - by Jamie
    I tested fairly extensively with Ubuntu 10.04 Beta 2 Server in a VM, and was able to simply copy (read tar x) a cross compiled tool chain from an Ubuntu 8.10 VM. I created the tar myself, which is essentially a lot of stuff in \usr\local. Now that I've got a bare metal installation of Ubuntu 10.04 proper, the copy isn't working. In particularly, I'm getting the error: $ arm-linux-gcc -bash: /usr/local/bin/arm-linux-gcc: No such file or directory I've got the systems side by side in SSH windows ... any suggestions?

    Read the article

  • Updating database row from model

    - by Jamie Dixon
    Hey everyone, I'm haing a few problems updating a row in my database using Linq2Sql. Inside of my model I have two methods for updating and saving from my controller, which in turn receives an updated model from my view. My model methods like like: public void Update(Activity activity) { _db.Activities.InsertOnSubmit(activity); } public void Save() { _db.SubmitChanges(); } and the code in my Controller likes like: [HttpPost] public ActionResult Edit(Activity activity) { if (ModelState.IsValid) { UpdateModel<Activity>(activity); _activitiesModel.Update(activity); _activitiesModel.Save(); } return View(activity); } The problem I'm having is that this code inserts a new entry into the database, even though the model item i'm inserting-on-submit contains a primary key field. I've also tried re-attaching the model object back to the data source but this throws an error because the item already exists. Any pointers in the right direction will be greatly appreciated. UPDATE: I'm using dependancy injection to instantiate my datacontext object as follows: IMyDataContext _db; public ActivitiesModel(IMyDataContext db) { _db = db; }

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13  | Next Page >