问题标签 [portability]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c - 最大化 SDL 窗口
我应该如何告诉 SDL 最大化应用程序窗口?
我正在使用这些标志创建窗口:SDL_OPENGL | SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_RESIZABLE。
c# - C#/Java 可移植性
您会选择哪些主流框架、模式和工具来并行开发两个项目,一个使用 C#,一个使用 Java,以最大限度地减少总工作量。(忽略可互换或等效工具的明显案例,如 SCC、单元测试等。还假设通用广泛的 RDBMS 支持。)
“主流”意味着市场一般不会忽视结果,因为它使用了他们从未听说过的未经测试的东西,或者需要神秘的技能来实施和支持它。
假设一个广泛适用的战术业务应用程序。
c++ - 是否有适用于 Windows (Visual C) 的 unistd.h 的替代品?
我正在将一个为 Unix 编写的相对简单的控制台程序移植到 Windows 平台(Visual C++ 8.0)。所有源文件都包含“unistd.h”,它不存在。删除它后,我收到有关“srandom”、“random”和“getopt”原型缺失的投诉。我知道我可以替换随机函数,而且我很确定我可以找到/破解一个 getopt 实现。
但我相信其他人也遇到了同样的挑战。我的问题是:Windows 是否有“unistd.h”端口?至少一个包含那些确实具有本机 Windows 实现的功能——我不需要管道或分叉。
编辑:
我知道我可以创建自己的“unistd.h”,其中包含我需要的东西的替代品 - 特别是在这种情况下,因为它是一个有限的集合。但由于这似乎是一个常见问题,我想知道是否有人已经为更大的功能子集完成了这项工作。
在工作中无法切换到不同的编译器或环境——我被 Visual Studio 困住了。
windows - 我怎样才能拥有便携式 Emacs?
有没有办法从 USB 驱动器运行 Emacs?我是 Windows 用户,我希望能够在任何没有安装 Emacs 的 PC 上使用它。
emacs - 便携式 Emacs?(Emacs 服务器不工作)
我已经看到了一些关于使 emacs 可移植(在 Windows 上)的建议。我的 site-start.el 中有这个:
我更改了 HOME 变量,这样不仅读取了我的 .emacs 初始化文件(和其他初始化文件),而且 emacs 生成的所有内容都将保留在程序目录中,不需要我一一指定所有内容的路径。
好吧,这很好用,但是 emacs 服务器不工作;我收到错误消息“无法建立连接,因为目标机器主动拒绝了它。” 如果我不更改我的 HOME var,那么 emacs 服务器就可以工作。有没有办法解决这个问题?
c++ - Cygwin vs Linux下g++创建的可执行文件的默认文件扩展名
我在 VisualStudio 上完成了大部分工作,但对 gcc 或 g++ 没有太多经验。今天早上,当我尝试使用 cygwin 在我的电脑上编译(例如 aprogram.cpp)时,当我尝试在我的 Ubuntu 机器上编译相同的东西时,我得到了(aprogram.exe),我得到了(aprogram),没有任何扩展. 我只是想知道是否有人好心告诉我原因。这个问题只是出于好奇。:)
提前致谢!
编辑:(来自 Jimmy 的评论)Cygwin 下的 g++ 默认为 .exe
c - 如何使用 ANSI C 以毫秒为单位测量时间?
仅使用 ANSI C,有没有办法以毫秒或更高的精度测量时间?我正在浏览 time.h 但我只找到了第二个精度函数。
c++ - 如何以相当可移植的方式以编程方式检查内存使用情况?(C/C++)
我正在编写跨平台 C++ 代码(Windows、Mac)。有没有办法检查当前进程正在使用多少内存?一个非常人为的片段来说明:
当然 (m1-m0) 应该等于 random_number,但我试图在更复杂的级别上执行此操作,包括可能分配内存的库调用。
以下是不可取的:
- 使用 Valgrind(或其同类)
- 使用自定义内存分配器来跟踪分配的内存。
survey - What development tools do you carry on your USB drive?
I've just bought a new 4GB USB thumb drive and I'm trying to decide what to put on it. I'm thinking about one of the webserver on a stick packages, a C/C++ IDE (leaning toward Code::Blocks; had Dev-C++ on my old USB drive) and Python.
What development related tools do you carry around with you on yours?
Update
I've added categories.
IDEs
Code::Blocks Open source, cross platform C/C++ IDE
- Supports several compilers (that you must supply) but you can also download a version that includes MingW.
- (There's a FAQ question on their website explaining how to make it portable)
Codelite -- Open-source, cross platform C/C++ IDE
Eclipse -- Open-source, cross platform Java IDE
NetBeans -- Open-source, cross platform Java IDE
JCreator -- Java IDE
MSVC6 -- Microsoft's pre-.NET C/C++ environment
Languages & Compilers
Portable Python -- Interpreter for the Python programming language
- Includes SciTE (editor) and Django (web framework)
Strawberry Perl -- "A 100% Open Source CPAN-capable Perl for Windows® computer that works exactly the same as Perl everywhere else."
Py3k -- Newest version of the Python programming language
Stackless Python
Lua -- Scripting language
MinGW -- Sort of a Windows port of GCC
- "MinGW provides a complete Open Source programming tool set which is suitable for the development of native Windows programs that do not depend on any 3rd-party C runtime DLLs."
Editors
Notepad++ (after so many recommendations, I had to try it)
UltraEdit -- "text, hex, HTML, PHP, Java, Javascript, Perl, and programmer's editor."
VIM -- "highly configurable text editor built to enable efficient text editing"
- Major rival to emacs
HEdit -- Hex editor
XVI32 (Hex Editor)
e text editor -- "The Power of Textmate on Windows"
Intype text editor -- Code editor for Windows
ConTEXT -- Code and text editor
Editpad Pro -- "powerful and versatile text editor or word processor."
Discovery
Dependency Walker -- Allows you to see what DLLs a program or DLL depends on and what functions they export.
Reflector -- Allows you to look into and decompile .Net assemblies
Spy++
DbWin32 -- Lets you see Windows debug and trace messages
- Similar to DebugView
DebugView -- Lets you see Windows debug and trace messages
Web & Network
Firefox Portable (with Firebug)
OperaUSB -- Web browser
XamppLite -- Package that includes Apache, PHP, MySQL, phpMyAdmin, OpenSSL & SQLite
PuTTY -- telnet and SSH client
Wireshark -- network protocol analyzer (packet sniffer)
WinSCP -- SFTP, FTP and SCP client for Windows
Diff/Merge
SourceGear DiffMerge -- Compare two files side by side and merge if needed.
WinDiff -- File comparison tool
Winmerge -- "Open Source differencing and merging tool for Windows."
Unix-like Tools
GNU Utilities for Win32 -- Windows version of several Unix/Linux tools
Cygwin -- Port of a Unix type environment to Windows
PowerGREP -- GREP tool
Visual Studio & .NET
NUnit -- Unit testing for .NET
TestDriven.NET -- Easily run your unit tests from Visual Studio
AnkSVN -- Subversion plugin for Visual Studio
LINQPad -- Tool to interactively develop Linq queries.
- "lets you interactively query SQL databases in a modern query language: LINQ"
Regular Expression Tools
Expresso -- Regular Expression tool
RegexBuddy -- Regular Expression tool
Misc
The Sysinterals Suite (includes DebugView, Process Explorer, & more)
WinZip
DosHere
7-zip -- Open source file archiver
Scrollbar fix for VB6
puretext -- Paste w/ formatting removed
VirtualBox -- Open source virtualization product.
- Similar to VMWare or VirtualPC
c# - ASP.NET 和 C#.NET 之间的组件重用
这似乎是一个荒谬的问题,因为我对 .NET 非常缺乏经验。
是否可以在 C# 中使用 .NET 构建组件,这些组件可以在 ASP.NET 中重用。例如,如果想将应用程序移植到网络上。
如果可能,它们的便携性如何?即可以在一定程度上重用GUI吗?是否有中间格式可用作基础格式,还是需要将 C# 组件用作二进制文件?
谢谢。
编辑:
感谢您的输入!我非常熟悉这个问题的设计方面,即如何为组件建模以供重用。但是,您让我意识到问题实际上是关于 - .NET 在 ASP 和 Windows 之间可重用的程度如何?是否可以说某些 .NET 组件包独立于环境而某些是特定于平台的?