Search Results

Search found 466 results on 19 pages for 'jamie cook'.

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

  • jQuery validate - how do I ignore letter case?

    - by Jamie
    Probably a goofy question, but I can't seem to find anything in google land. I simply need one of my methods to ignore the case of the entered field. I am doing a city name match, but need both "Atlanta" and "atlanta" to be valid. How should I edit this to get the validation love that I need? jQuery.validator.addMethod("atlanta", function(value) { return value == "Atlanta"; //Need 'atlanta' to work too }, '**Recipient must reside in Chicago City Limits**'); Pre thanks to any and all :)

    Read the article

  • Clearing ColorConvertedBitmap in C#

    - by Jamie
    Hi guys, the problem is: I want to use the same ColorConvertedBitmap object for two purposes, firstly I set everyting: ColorConvertedBitmap conv = new ColorConvertedBitmap(); conv.BeginInit(); conv.SourceColorContext = new ColorContext(PixelFormats.Bgra32); conv.Source = myImage; conv.DestinationFormat = PixelFormats.Pbgra32; conv.DestinationColorContext = new ColorContext(PixelFormats.Pbgra32); conv.EndInit(); and then I would like to use the same object for another transformation. How to reset the values of ColorConvertedBitmap? Thank you for the reply! Cheers

    Read the article

  • Application built using VS2010 does not work in VS-Express2008 - C

    - by Jamie Keeling
    Hello, I have wrote an application that consists of two projects in a solution, each project contains only 1 .c source file. I was using Visual Studio 2010 Ultimate but due to the University only supporting 2008 I decided to create a blank solution and copy the source files into the new one. After creating a new solution in VS2008 express, creating two projects and re-creating and adding the source files to the projects I ran the application. For some reason only one part of the application does not work, I use CreateProcess() to execute "Project1.exe" from Project 2. This works fine under vs2010 but for some reason it's not working under VS2008 express, GetLastError() is showing an Error 2: File Not Found. This is an image showing the same code in both IDE's: I'm not using anything special and I've made sure that both solutions/projects are using .Net 3.5. I can't work out why it would work for one IDE and not the other. Any suggestions? Thanks!

    Read the article

  • Parsing XML with jQuery

    - by Jamie
    I've used this: $(document).ready(function () { $.ajax({ type: "GET", url: "http://domain.com/languages.php", dataType: "xml", success: xmlParser }); }); function xmlParser(xml) { $('#load').fadeOut(); $(xml).find("result").each(function () { $(".main").append('' + $(this).find("language").text() + ''); $(".lang").fadeIn(1000); }); } I used a local XML file on my computer, it works fine, but when I change the URL to an website, it just keeps loading all the time... How do I get this to work?

    Read the article

  • Using events in threads between processes - 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 occurred and I have started to implement this already. 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; Create thread: 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'm trying to find out how I would integrate an event with the threaded code to signify to the other process that something has happened, I've seen an MSDN article on using events but it's just confused me if anything, I'm coming up on empty whilst searching on the internet too. Thanks for any help Edit: I can only use the Create/Set/Open methods for events, sorry for not mentioning it earlier.

    Read the article

  • How to check if a DateTime range is within another 3 month DateTime range .NET 3.5 C#

    - by Jamie
    Hi I have a Start Date and End Date per record in a db. I need to check to see where the time period falls in a 2 year period broken into two lots of quarters then display what quarters each record falls into. Quarter 1 includes June 09, Jul 09, Aug 09 Quarter 2 includes Sept 09, Oct 09, Nov 09 Quarter 3 includes Dec 09, Jan 10, Feb 10 Quarter 4 includes Mar 10, Apr 10, May 10 Quaretr 5 includes Jun 10, Jul 10... e.g. 01/10/09 - 01/06/10 would fall into quarters 2, 3, 4 & 5 I am very new to .NET so any examples would be much appreciated.

    Read the article

  • Implementing events to communicate between two processes - 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 occurred and I have started to implement this already. 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; Create thread: 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'm trying to find out how I would integrate an event with the threaded code to signify to the other process that something has happened, I've seen an MSDN article on using events but it's just confused me if anything, I'm coming up on empty whilst searching on the internet too. Thanks for any help Edit: I can only use the Create/Set/Open methods for events, sorry for not mentioning it earlier.

    Read the article

  • Design question for windows application, best approach?

    - by Jamie Keeling
    Hello, I am in the process of designing an application that will allow you to find pictures (screen shots) made from certain programs. I will provide the locations of a few of the program in the application itself to get the user started. I was wondering how I should go about adding new locations as the time goes on, my first thought was simply hard coding it into the application but this will mean the user has to reinstall it to make the changes take affect. My second idea was to use an XML file to contain all the locations as well as other data, such as the name of the application. This also means the user can add their own locations if they wish as well as sharing them over the internet. The second option seemed the best approach but then I had to think how would it be managed on the users computer. Ideally I'd like just a single .exe without the reliance on any external files such as the XML but this would bring me back to point one. Would it be best to simply use the ClickOnce deployment to create an entry in the start menu and create a folder containing the .exe and the file names? Thanks for the feedback, I don't want to start implementing the application until the design is nailed.

    Read the article

  • How do I configure integration tests using rspec 2?

    - by Jamie Monserrate
    I need to have different settings for my unit tests and different settings for my integration tests. Example For unit tests, I would like to do WebMock.disable_net_connect!(:allow_localhost => true) And for integration tests, I would like to do WebMock.allow_net_connect! Also, before the start of an integration test, I would like to make sure that solr is started. Hence I want to be able to call config.before(:suite) do SunspotStarter.start end BUT, only for integration tests. I do not want to start my solr if its a unit test. How do I keep their configurations separate? Right now, I have solved this by keeping my integration tests in a folder outside the spec folder, which has its own spec_helper. Is there any better way?

    Read the article

  • Rejigging a floating point equation ...

    - by Jamie
    I'd like to know if there is a way to improve the accuracy of calculating a slope. (This came up a few months back here). It seems by changing: float get_slope(float dXa, float dXb, float dYa, float dYb) { return (dXa - dXb)/(dYa - dYb); } to float get_slope(float dXa, float dXb, float dYa, float dYb) { return dXa/(dYa - dYb) - dXb/(dYa - dYb); } might be an improvement. Suggestions? Edit: It's precision I'm after, not efficiency.

    Read the article

  • Declaring a prototype of type "struct" - C

    - by Jamie Keeling
    I've been racking my brains on this for a while, I'm simply trying to create a method that returns a struct as I wish to return two int's. My prototype for the method is as follows: typedef struct RollDice(); Also the method itself: typedef struct RollDice() { diceData diceRoll; diceRoll.dice1 = 0; diceRoll.dice2 = 0; return diceRoll; } The compiler shows the error: "Syntax error: ')'" for both the prototype and actual method. The struct itself: typedef struct { int dice1; int dice2; }diceData; Is it obvious where I'm going wrong? I've tried everything I can think of. Thanks

    Read the article

  • How to make a Scala Applet whose Applet class is a singleton?

    - by Jamie
    Hi, I don't know if a solution exists but it would be highly desirable. I'm making a Scala Applet, and I want the main Applet class to be a singleton so it can be accessed elsewhere in the applet, sort of like: object App extends Applet { def init { // do init here } } Instead I have to make the App class a normal instantiatable class otherwise it complains because the contructor is private. So the ugly hack I have is to go: object A { var pp: App = null } class App extends Applet { A.pp = this def init { // do init here } } I really hate this, and is one of the reasons I don't like making applets in Scala right now. Any better solution? It would be nice...

    Read the article

  • 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

  • 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

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