executable

How to encode data of XSLT stylesheet

久未见 提交于 2019-12-11 10:57:29
问题 I have generated an XSLT stylesheet which converts an XML file to an ePub . I use saxon9.jar to convert the XML using XSLT . Now I need to know whether I can make the XSLT code binary. Is it possible using java , so that I can generate a jar file which converts the XML to ePub using saxon , provided that the content of XSLT file is not readable. 回答1: The problem got resolved after I read this page: http://saxon.sourceforge.net/saxon7.6/using-xsl.html#Compiling 回答2: One possibility would be to

Relative paths from binary file

穿精又带淫゛_ 提交于 2019-12-11 09:39:37
问题 I have the following folder structure: bin/ <-binary-file is in here include/ src/ data/ Makefile In my code, I use relative paths to my data. So "../data/xml/xmlFile.xml". This is fine if I were executing the binary file from the bin/ folder: brandonto@computer:~/PATH-TO-PROJECT/bin$ ./binary-file argv[0] = ./binary-file dirname(argv[0]) = . But if I were executing the binary from the main folder (or any other folder that is not the bin/ folder): brandonto@computer:~/PATH-TO-PROJECT$ bin

Recursive Pattern match in .tpattributes file [TFS 2010]

一世执手 提交于 2019-12-11 09:19:31
问题 I'm trying to use a .tpattributes file to retain Execute permissions on all files under a directory in my project. However, it appears the attribute is only applied to the top level folder, and I can't find a way to make it recursive. Attempt 1: #Trying to prevent TFS from screwing up files like it loves to do .**\/*:x Attempt 2: #Trying to prevent TFS from screwing up files like it loves to do .*/*:x The documentation here isn't very helpful, and I haven't been able to find any other

directly execute binary resource

时光毁灭记忆、已成空白 提交于 2019-12-11 08:55:03
问题 lpBuffer is a pointer to the first byte of a (binary)resource. How can I execute it straight away without dumping it to a temporary file? HMODULE hLibrary; HRSRC hResource; HGLOBAL hResourceLoaded; LPBYTE lpBuffer; hLibrary = LoadLibrary("C:\\xyz.exe"); if (NULL != hLibrary) { hResource = FindResource(hLibrary, MAKEINTRESOURCE(104), RT_RCDATA); if (NULL != hResource) { hResourceLoaded = LoadResource(hLibrary, hResource); if (NULL != hResourceLoaded) { lpBuffer = (LPBYTE) LockResource

Object match error when running a Python script from command line Maya

无人久伴 提交于 2019-12-11 08:53:01
问题 I have this script in Python which I'm running into a maya file from a command line: import maya.standalone maya.standalone.initialize("Python") import maya.cmds as cmds from maya import cmds import maya.mel as mel import glob def importFile(i): cmds.file(i, i=True, groupReference=True, groupName="myobj") def materialFile(): if cmds.objExists('Panel*'): cmds.select("Panel*", replace=True) myMaterial = "BlueGlass" cmds.sets( e=True, forceElement= myMaterial + 'SG' ) if cmds.objExists('Body*'):

Executable Object Files and Virtual Memory

跟風遠走 提交于 2019-12-11 07:58:27
问题 I'm a beginner in Linux and Virtual Memory, still struggling in understanding the relationship between Virtual Memory and Executable Object Files. let's say we have a executable object file a.out stored on hard drive disk, and lets say originally the a.out has a .data section with a global variable with a value of 2018. When the loader run, it allocates a contiguous chunk of virtual pages marks them as invalid (i.e., not cached) and points their page table entries to the appropriate locations

-bash no such file or directory, but it exists

℡╲_俬逩灬. 提交于 2019-12-11 07:39:42
问题 I've recompiled vim with the ruby flag for command-T awesomeness, and I wrote a script that will automatically do this for me on any machine I ssh into (and run the script), but an issue that I'm running into is that when I alias the newly compiled vim, bash throws a no such file or directory at me. Here's what I have: This works fine: $ alias v="~/Code/vim" But when I put this same line in my .bashrc, I get: -bash: =~/Code/vim: No such file or directory Even funnier, I put this in my .bashrc

How to make an executable to use in a shell - Python

眉间皱痕 提交于 2019-12-11 07:34:57
问题 I have a Python script and I was wondering how I can make it executable; in other words how can I run it by using a shell like bash. I know the first thing is to stick on the first line #! /usr/bin/env python but then do I need for example the functions to be in a specific order (i.e., the main one at the top or the bottom). What's more do I need to keep the extension .py for my python file (can I just call the function Dosomething ?). To be short, could you provide a simple guide, the

Creating a selfextracting executable which will copy itself to temp directory on Windows and launch itself

折月煮酒 提交于 2019-12-11 07:07:08
问题 I want to distribute a setup in a self extracting executable form. I want to pack versions for 32 bit and 64 windows. So I have a program which first checks the version of Windows OS running and then launches the correct program. SO I have a directory structure like this DetermineOS.exe Win32\Win32Setup.exe Win32\supporting win32 files Win64\Win64Setup.exe Win64\Supporting win64 files I want to pack them in a bundle called something like install.exe. When the user clicks install.exe it will

How can I find the mapped file when it's not shown in proc maps?

戏子无情 提交于 2019-12-11 06:43:08
问题 I was trying to gdb a function, with it's callstack, the calling one falls into address a4734000-a4e93000, so I check the /proc//maps file and found there are: a4734000-a4e93000 r-xp 00000000 00:00 0 a4ee0000-a527c000 r-xp 00000000 00:00 0 This doesn't make sense to me, because normally it would show the target binary file that is mapped for the executable addresses. Does anyone know is this some sort of trick? Thanks a lot. 回答1: Permission field r-xp contains p , so these mappings are