legacy

Parsing CArchive (MFC classes) files in Ruby

余生颓废 提交于 2019-12-24 23:12:10
问题 I have a legacy app that seems to be exporting/saving files with CArchive (legacy MFC application). We're currently refactoring the tool for the web. Is there a library I can look at in Ruby for parsing and loading these legacy files? What possible libraries could I look into? Problems with the file format according to XML serialization for MFC include: Non-robustness —your program will probably crash if you read an archive produced by another version of your program. This can be avoided by

How do I implement a legacy TCP/IP service in WCF and C#?

我们两清 提交于 2019-12-24 11:54:15
问题 I have a legacy TCP/IP service which listens for a message in a proprietary format on a socket. When the service receives the message, it processes it and replies with a message in a similar format, (classic request/reply situation). We cannot change the client calling the legacy service and we want to replace the legacy service with a new one hosted in IIS using WCF and C#. How do I implement this in WCF? Is it even possible to make WCF understand the proprietary message format? If not then

HttpServletRequest logout on old servlet-api-2.3.jar

非 Y 不嫁゛ 提交于 2019-12-24 11:44:25
问题 For legacy reasons we're using servlet-api-2.3.jar, in which HttpServletRequest not yet had the logout method. What do I do instead? We're also using an old version of Oracle's ATG, which contains a class called DynamoHttpServletRequest as well, but I don't know what to do with that either. What to try/read? 回答1: It depends on what the semantics of logging in are in your application. Typically, this should do it unless you're doing something exotic: request.getSession().invalidate(); I'm not

Fortran IV, compiling error named constant

六眼飞鱼酱① 提交于 2019-12-24 09:17:46
问题 I am trying to compile an old Fortran IV code using the gcc fortran compiler (gfortran 4.8.1 -4). I run the compiler as: gfortran nrlxrf_a.for -std=legacy. These are the error messages: C:\MinGW\bin>gfortran nrlxrf_a.for -std=legacy NRLXRF_a.for:5525.72: IF ( NFILL.EQ. 0) 1 Error: Cannot assign to a named constant at (1) I have checked the line, and there are no spaces after the end of the statement. NRLXRF_a.for:5531.7: 1 ( HFILL( I), I= 1, NFILL), ( H( IU, I), I= I1, I2) 1 Error: Cannot

Rails 3 model mapping certain columns to different model attributes

久未见 提交于 2019-12-23 21:38:47
问题 I have the old legacy table called "DXFTACCTS", and I created Rails model "Account". class Account < ActiveRecord::Base set_table_name "DXFTACCTS" end The problem is that DXFTACCTS has fields like "XORFNAME" which I want to be "first_name" in the model, and so on. How do I "map" specific table columns to model attributes? Thanks! 回答1: You can use the method alias_attribute like this: class Account < ActiveRecord::Base set_table_name "DXFTACCTS" alias_attribute :first_name, :XORFNAME end alias

戴尔台式机安装win 7系统

♀尐吖头ヾ 提交于 2019-12-23 12:36:05
使用相应品牌电脑进入BIOS的快捷键,进入BIOS设置 1、BIOS引导】: 传统的电脑通常都是使用BIOS引导,开机BIOS初始化,然后BIOS自检,再引导操作系统→进入系统,显示桌面。 (选择Setup是进入BIOS) 2、光盘启动: 在BIOS引导的情况下,通常使用安装光盘维护、安装操作性系统,只要找到CD-ROM(或者DVD,主板菜单不一样)使用上下键,选中此项,按回车键(Enter)予以确认,再按F10键,重启电脑,就能认光驱里面的安装光盘了。 3、u盘启动: 在BIOS引导下,u盘PE系统的操作和光驱引导设置方法类似,只要找到USB选项(有的主板是显示u盘的型号),设置为第一启动项即可,重启电脑就会读u盘PE系统了。 4、【UEFI引导】: UEFI引导的流程是开机初始化UEFI,然后,直接引导操作系统,进入系统。和传统的BIOS引导相比,UEFI引导少了一道BIOS自检的过程,所以开机就会更快一些,这也成为了电脑的新宠。 5、进入设置主界面,继续点击Boot(引导)菜单,Boot mode(引导模式)右边的就是当前的引导模式,这里默认的是UEFI引导。 6、选中该项回车,打开设置项之后,这里有两个选项:UEFI 和 Legacy(使用上下键选中),引导模式选择Legacy。 7、点击OK,确认修改为Legacy引导模式。 8、提示询问是否现在重启电脑?点击 yes

Can I throw C++ exceptions from legacy C callbacks?

橙三吉。 提交于 2019-12-23 07:39:03
问题 I have C++ code that uses some C libraries. The C libraries take C language callbacks. I wrote a callback in my C++ code and now I somehow need to report error from it (but it returns void). I wonder if I can throw an exception from a C callback that is used from C++ code? This is very difficult for me to understand. Thanks, Boda Cydo. 回答1: Yes, you should be able to do so. However, keep in mind it's entirely likely that the C library was not written to be exception safe, and as a result you

Why doesn't VFP .NET OLEdb provider work in 64 bit Windows?

戏子无情 提交于 2019-12-23 06:47:09
问题 I wrote a windows service using VB that read some legacy data from Visual Foxpro Databases to be inserted in SQL 2005. The problem is this use to run fine in Windows server 2003 32-Bits, but the client recently moved to Windows 2003 64-Bits and now the service won't work. I'm getting a message the the VFP .NET OLEdb provider is not found. I researched and everything seems to point out that there is no solution. Any Help, please... 回答1: Have you tried changing the target CPU to x86 instead of

Breaking a local dependency to unit test a void method

让人想犯罪 __ 提交于 2019-12-21 20:55:46
问题 I am practicing with mockito, but I am a bit stuck on how to test a method that depends on a call to method in a local object. See the following example: public class Worker { public void work() { Vodka vodka = new Vodka(); vodka.drink(); } } This worker, instead of doing his job, he likes drinking. But I want to add a test to prove that he drinks while he works. But there is no way of doing so, because I must verify that the method drink() is called when the method work is called. I think

Is the .NET Framework usable on Win98?

岁酱吖の 提交于 2019-12-21 12:11:02
问题 I need to write a little tool for a customer to be run on Windows 98. Since this is a very small project I'd hope that I could avoid having to go native C++ and use C#. The .net Framework 2.0 download claims to support Windows 98. Are there any caveats or hitches to be aware of when installing or coding? 回答1: There are a few features that Win98 won't support such as form opacity and balloon tooltips. If you use any P/Invoke, you'll have to make sure to support ANSI versions of functions (use