Search Results

Search found 1059 results on 43 pages for 'jon hopkins'.

Page 23/43 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • Tool to convert inline C# into a code behind file

    - by Jon Jones
    Hi I have a number of legacy web controls (ascx) that contains huge amounts of inline C#. The forms contain a number of repeated and duplicate code. Our first plan is to move the code into code behinds per file, then refactor etc... were doing this to upgrade the client to the latest version of their cms At the moment we are going to have to manually copy and paste from hundreds of files, create a code behind, copy the code, add the namespaces based on the client-side imports and then do any tidying up does anybody PLEASE know of a tool that can do the majority of this work for us ? Thanks

    Read the article

  • Using ret with FASM on Win32

    - by Jon Purdy
    I'm using SDL with FASM, and have code that's minimally like the following: format ELF extrn _SDL_Init extrn _SDL_SetVideoMode extrn _SDL_Quit extrn _exit SDL_INIT_VIDEO equ 0x00000020 section '.text' public _SDL_main _SDL_main: ccall _SDL_Init, SDL_INIT_VIDEO ccall _SDL_SetVideoMode, 640, 480, 32, 0 ccall _SDL_Quit ccall _exit, 0 ; Success, or ret ; failure. With the following quick-and-dirty makefile: SOURCES = main.asm OBJECTS = main.o TARGET = SDLASM.exe FASM = C:\fasm\fasm.exe release : $(OBJECTS) ld $(OBJECTS) -LC:/SDL/lib/ -lSDLmain -lSDL -LC:/MinGW/lib/ -lmingw32 -lcrtdll -o $(TARGET) --subsystem windows cleanrelease : del $(OBJECTS) %.o : %.asm $(FASM) $< $@ Using exit() (or Windows' ExitProcess()) seems to be the only way to get this program to exit cleanly, even though I feel like I should be able to use retn/retf. When I just ret without calling exit(), the application does not terminate and needs to be killed. Could anyone shed some light on this? It only happens when I make the call to SDL_SetVideoMode().

    Read the article

  • C# console applications all 16bit?

    - by Jon
    Hi all, I was reading up about NTVDM.exe as I build a quick test console app and it crashed on a friends machine complaining about this EXE. As I understand it all DOS cmd windows (C# console apps included) run as 16bit not 32bit. Is this true? Does this mean all my works console app back office apps are running as 16bit rather than making the most of the 32bit available? What about Windows services? As I believe we wrote it as a console app then made it run as a windows service? Thanks

    Read the article

  • What's your most controversial programming opinion?

    - by Jon Skeet
    This is definitely subjective, but I'd like to try to avoid it becoming argumentative. I think it could be an interesting question if people treat it appropriately. The idea for this question came from the comment thread from my answer to the "What are five things you hate about your favorite language?" question. I contended that classes in C# should be sealed by default - I won't put my reasoning in the question, but I might write a fuller explanation as an answer to this question. I was surprised at the heat of the discussion in the comments (25 comments currently). So, what contentious opinions do you hold? I'd rather avoid the kind of thing which ends up being pretty religious with relatively little basis (e.g. brace placing) but examples might include things like "unit testing isn't actually terribly helpful" or "public fields are okay really". The important thing (to me, anyway) is that you've got reasons behind your opinions. Please present your opinion and reasoning - I would encourage people to vote for opinions which are well-argued and interesting, whether or not you happen to agree with them.

    Read the article

  • Problem with multiple forms on one page

    - by Jon
    I have two forms on a web page. The first is not an actual form since this is a .NET based site. So instead I have the standard input fields, along with asp:Button PostBackURL="http:/www...". One of the fields is "email". That works fine. Then I have an XSLT file with another form, and am using Javascript (via this.form.action, .method, etc) to post that form. Besides that it has the same fields as the form above. The problem is that when someone submits the second form, the script at the PostBackURL returns an error because the "email" field appears empty. So it seems as though the form is submitting the "email" field form the top form instead of the current one. I thought maybe the wrong form is being submitted, but if I remove the "email" field from the top form, and then submit the bottom one, it works fine. Any ideas on how to fix this? Thanks.

    Read the article

  • TooManyRowsAffectedException with encrypted triggers

    - by Jon Masters
    I'm using nHibernate to update 2 columns in a table that has 3 encrypted triggers on it. The triggers are not owned by me and I can not make changes to them, so unfortunately I can't SET NOCOUNT ON inside of them. Is there another way to get around the TooManyRowsAffectedException that is thrown on commit? Update 1 So far only way I've gotten around the issue is to step around the .Save routine with var query = session.CreateSQLQuery("update Orders set Notes = :Notes, Status = :Status where OrderId = :Order"); query.SetString("Notes", orderHeader.Notes); query.SetString("Status", orderHeader.OrderStatus); query.SetInt32("Order", orderHeader.OrderHeaderId); query.ExecuteUpdate(); It feels dirty and is not easily to extend, but it doesn't crater.

    Read the article

  • How do I use NTLM authentication with Active Directory

    - by Jon Works
    I am trying to implement NTLM authentication on one of our internal sites and everything is working. The one piece of the puzzle I do not have is how to take the information from NTLM and authenticate with Active Directory. There is a good description of NTLM and the encryption used for the passwords, which I used to implement this, but I am not sure of how to verify if the user's password is valid. I am using Coldfusion but a solution to this problem can be in any language (Java, Python, PHP, etc). Edit: I am using Coldfusion on Redhat Enterprise Linux. Unfortunately we cannot use IIS to manage this and instead have to write or use a 3rd party tool for this.

    Read the article

  • Encryption puzzle / How to create a ProxyStub for a Remote Assistance ticket

    - by Jon Clegg
    I am trying to create a ticket for Remote Assistance. Part of that requires creating a PassStub parameter. As of the documenation: http://msdn.microsoft.com/en-us/library/cc240115(PROT.10).aspx PassStub: The encrypted novice computer's password string. When the Remote Assistance Connection String is sent as a file over e-mail, to provide additional security, a password is used.<16 In part 16 they detail how to create as PassStub. In Windows XP and Windows Server 2003, when a password is used, it is encrypted using PROV_RSA_FULL predefined Cryptographic provider with MD5 hashing and CALG_RC4, the RC4 stream encryption algorithm. As PassStub looks like this in the file: PassStub="LK#6Lh*gCmNDpj" If you want to generate one yourself run msra.exe in Vista or run the Remote Assistance tool in WinXP. The documentation says this stub is the result of the function CryptEncrypt with the key derived from the password and encrypted with the session id (Those are also in the ticket file). The problem is that CryptEncrypt produces a binary output way larger then the 15 byte PassStub. Also the PassStub isn't encoding in any way I've seen before. Some interesting things about the PassStub encoding. After doing statistical analysis the 3rd char is always a one of: !#$&()+-=@^. Only symbols seen everywhere are: *_ . Otherwise the valid characters are 0-9 a-z A-Z. There are a total of 75 valid characters and they are always 15 bytes. Running msra.exe with the same password always generates a different PassStub, indicating that it is not a direct hash but includes the rasessionid as they say. Some other ideas I've had is that it is not the direct result of CryptEncrypt, but a result of the rasessionid in the MD5 hash. In MS-RA (http://msdn.microsoft.com/en-us/library/cc240013(PROT.10).aspx). The "PassStub Novice" is simply hex encoded, and looks to be the right length. The problem is I have no idea how to go from any hash to way the ProxyStub looks like.

    Read the article

  • How do I use unsafe values in an enum?

    - by Jon Tackabury
    I need to use this enum in my C# application, but it won't let me use these values. When I specify the type as uint I can use the -1 value, and when I specify int I can't use the last 2 values. Is there a way to use the unchecked keyword here to allow me to define all of these values? These values are coming from an external source, so I can't change them. internal enum MyValues : int { value1 = -1, value2 = 0, value3 = 0x80000000, value4 = 0xFFFFFFFF }

    Read the article

  • Reuse, Rewrite, or Refactor?

    - by Jon Purdy
    At work I inherited development of a PHP-based Web site after the consultant who originally produced it bailed out and left without a trace. Literally half of the code is ripped from online tutorials, and there are thousands of lines of cruft that, being incomplete, do precious little. Hardly any of it actually works. I've been trying to pull out the usable components, such as the layout (cleverly intermixed with code), session management (delicately seasoned with unescaped, unvalidated SQL queries), and a few other things, but it's very difficult to force all of this junk into place. Further, I don't speak idiomatic PHP, being more of a Perl user, and I'm supposed to be on this project principally for maintenance, so rewriting everything seems like it would take just as long as wrestling the existing monster back into place. As an aside, I have literally never seen anything as badly written as this. Welcome me to the world of working with other people's code, I guess, but I do hope it's not this common in the real world to have such gems as these: // WHY IS THIS NOT WORKING // I know this is bad but were going for working stuff right now... // This is a PHP code outputing Javascript code outputting HTML...do not go further // Not userful I'm looking for the best advice I can get here. What would you do if you were in my position?

    Read the article

  • firefox lead dot in cookie issue

    - by Jon
    Hi all, We are having an annoying issue with Firefox and cookies. We have the following domains: sub1.mydomain.com sub2.mydomain.com sub3.mydomain.com otherdomain.com We have converting our framework to be multilingual and providing a drop down to change the language at any point during site. The code base is shared across all the domains above. We can not set a cookie across all "mydomain.com" sites, they have to be on each of the sub domains. To get this to work we set a JavaScript cookie when the users chooses a new language. When the page posts back to the server the code picks this up and sets the users preferences to that new language code, (this is all C# and ASP.NET). We have to set the host to be "subX.mydomain.com" and the path to be "/" in the cookie so that it is just for the subdomain and all parts of that domain. This works great on all browsers apart from FireFox. It seems that firefox will pre append a DOT to the beginning of domain so ".subX.mydomain.com". When the code posts back with FireFox the cookie is always null. Has anyone had this situation, (I imagine it is not al that uncommon). I have read a lot of people saying, remove the domain from the cookie, but that can not work for us as we have multiple subdomains that need their own cookie values. Thanks

    Read the article

  • Access Violation Exception only appearing when running C# app without debugger attached

    - by Jon
    I have an application that works fine in Visual Studios 2008, and I am trying to get it into VS 2010 in order to use .NET 4, and I have a really weird problem. When I run the code from either Release mode or Debug mode with the debugger attached (F5), I have no problems running the program. However, when I run the program from either Release or Debug without the debugger attached (Shift+F5), I get an Access Violation Exception when I attempt to run some code in a dll from GDCM. I've created the dlls by using CMake and Swig and following the instructions here adjusting the instructions where necessary to build for VS 2010 and .NET 4. Does any one have any ideas why this is happening and how I can fix it?

    Read the article

  • Safari ignores input type="file" on server post

    - by Jon
    I have a real problem with a classic ASP page. The page allows the user to upload a document and save it to the database. The intial page posts to another asp page which saves down to the db. This works on IE and Firefox. However on Safari it fails. I've debugged the problem and it boils down to the fact that of all the controls that the server page has access to, only 1 control is missing. This happens to be this: <input type="file" size="40" id="myfile" name="myfile" /> So I'm wondering why safari would decide to not give me access to this control (using asp's Request("") ) and why it works in FF and IE. I have some debug code which writes out all controls and it doesn't see this control. p.s. I hate Web development

    Read the article

  • How to get a list of installed android applications and pick one to run

    - by Jon
    I asked a similar question to this earlier this week but I'm still not understanding how to get a list of all installed applications and then pick one to run. I've tried: Intent intent = new Intent(ACTION_MAIN); intent.addCategory(CATEGORY_LAUNCHER); and this only shows application that are preinstalled or can run the ACTION_MAIN Intent type. I also know I can use PackageManager to get all the installed applications, but how do I use this to run a specific application? Thanks

    Read the article

  • ORDER BY letters and not numbers of a field

    - by Jon
    Is there a way to order mysql results by the first letter and ignore numbers? For example, I have a list of addresses: 123 Main Street 456 Second Street 234 Third Street and I want to order by the street name and ignore the street number. Is there an easy way to do this?

    Read the article

  • Unexpected space between DIV elements, no - not padding and not margins

    - by jon
    my code for the php page displaying the divs <?php session_start(); require_once("classlib/mainspace.php"); if (isset($_SESSION['username'])==FALSE) { header("location:login.php"); } $user = new User($_SESSION['username']); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="style/style.css" /> <title>SimpleTask - Home</title> </head> <body> <div id="main"> <div id="menu"> <div id="items"> <ul> <li><a href="home.php">home</a></li> <li>&bull;</li> <li><a href="projects.php">my projects</a></li> <li>&bull;</li> <li><a href="comments.php">my comments</a></li> </ul> </div> <div id="user"> <p>Welcome, <?php echo $user->GetRealName(); ?><br/><a href="editprofile.php">edit profile</a> &bull; <a href="logout.php">logout</a></p> </div> </div> <div id="content"> <h1>HOME</h1> </div> <div id="footer"> <p>footer text goes here here here here</p> </div> </div> </body> </html> and you can find my CSS here http://tasker.efficaxdevelopment.com/style/style.css and to view the live page go here http://tasker.efficaxdevelopment.com/login.php username:admin password:password

    Read the article

  • GIT clone repo across local file system

    - by Jon
    Hi all, I am a complete Noob when it comes to GIT. I have been just taking my first steps over the last few days. I setup a repo on my laptop, pulled down the Trunk from an SVN project (had some issues with branches, not got them working), but all seems ok there. I now want to be able to pull or push from the laptop to my main desktop. The reason being the laptop is handy on the train as I spend 2 hours a day travelling and can get some good work done. But my main machine at home is great for development. So I want to be able to push / pull from the laptop to the main computer when I get home. I thought the most simple way of doing this would be to just have the code folder shared out across the LAN and do: git clone file://192.168.10.51/code unfortunately this doesn't seem to be working for me: so I open a git bash cmd and type the above command, I am in C:\code (the shared folder for both machines) this is what I get back: Initialized empty Git repository in C:/code/code/.git/ fatal: 'C:/Program Files (x86)/Git/code' does not appear to be a git repository fatal: The remote end hung up unexpectedly How can I share the repository between the two machines in the most simple of ways. There will be other locations that will be official storage points and places where the other devs and CI server etc will pull from, this is just so that I can work on the same repo across two machines. Thanks

    Read the article

  • Getting Recognition for Open-Source Computer Language Projects

    - by Jon Purdy
    I like language a lot, so I write a lot of language-based solutions for programming, automation, and data definition. I'm very much a believer in open-source software, so lately I've started to push these projects to Sourceforge when I start them. I feel that these tools could be quite valuable in the right hands, and that they fill niches that otherwise go unfilled. The trouble, for me, is gaining recognition. No matter how useful the software I write, after a certain point I can no longer come up with anything to add or improve. Basically no one but me uses it, so it's not being attacked from enough angles to discover any new weaknesses. I cannot work on a project that doesn't have anything to do, but I won't have anything to do unless I gain recognition by working on it! This is greatly discouraging. It's like giving what you think is a really thoughtful gift to someone who just isn't paying attention. So I'm looking for advice on how to network and disseminate information about my projects so that they don't fizzle out like this. Are there any sites, newsgroups, or mailing lists that I've been completely missing?

    Read the article

  • How do you read a file line by line in your language of choice?

    - by Jon Ericson
    I got inspired to try out Haskell again based on a recent answer. My big block is that reading a file line by line (a task made simple in languages such as Perl) seems complicated in a functional language. How do you read a file line by line in your favorite language? So that we are comparing apples to other types of apples, please write a program that numbers the lines of the input file. So if your input is: Line the first. Next line. End of communication. The output would look like: 1 Line the first. 2 Next line. 3 End of communication. I will post my Haskell program as an example. Ken commented that this question does not specify how errors should be handled. I'm not overly concerned about it because: Most answers did the obvious thing and read from stdin and wrote to stdout. The nice thing is that it puts the onus on the user to redirect those streams the way they want. So if stdin is redirected from a non-existent file, the shell will take care of reporting the error, for instance. The question is more aimed at how a language does IO than how it handles exceptions. But if necessary error handling is missing in an answer, feel free to either edit the code to fix it or make a note in the comments.

    Read the article

  • Anybody using Qi4J

    - by Jon
    I was reading an InfoQ article on Composite Oriented Programming earlier on: http://www.infoq.com/articles/Composite-Programming-Qi4j I was interested in finding out whether anybody is currently using (or has used) the Qi4j framework at all? How does it compares to using a traditional dependency injection framework such as Spring for wiring classes together. Is the resulting object graph (based on mixins rather than classes) easier to deal with from a maintenance point of view?

    Read the article

  • XDocument holding onto Memory?

    - by Jon
    I have an appplication that does a XDocument.Load from a 20mb file and then gets passed to a form to view its contents: openFileDialog1.FileName = ""; if (openFileDialog1.ShowDialog() == DialogResult.OK) { AuditFile = XDocument.Load(openFileDialog1.FileName); fmAuditLogViewer AuditViewer = new fmAuditLogViewer(); AuditViewer.ReportDocument = AuditFile; AuditViewer.Init(); AuditViewer.ShowDialog(); AuditViewer.Dispose(); AuditFile.RemoveNodes(); AuditFile = null; } In Task Manager I can see the memory being used by my application shoot up when I open this file. When I have finished viewing this file in my application I call : myXDocument.RemoveNodes(); myXDocument = null; However the memory use in Task Manager is still pretty high against my app. Is the XDocument still being held in memory and can I decrease the memory usage by my app?

    Read the article

  • What's the difference between reflow and repaint?

    - by Jon Raasch
    I'm a little unclear on the difference between reflow + repaint (if there's any difference at all) Seems like reflow might be shifting the position of various DOM elements, where repaint is just rendering a new object. E.g. reflow would occur when removing an element and repaint would occur when changing its color. Is this true?

    Read the article

  • Change the precision of all decimal columns in every table in the database

    - by Jon
    Hi all, I have a rather large database that has alot of decimal columns in alot of tables, the customer has now changed their mind and wants all the numbers (decimals) to have a precision of 3 d.p. instead of the original two. Is there any quick way of going through all the tables in a database and changing any decimal column in that table to have 3.d.p instead of 2 d.p? The db is on sql 2005. Any help would be great.

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >