windows

Batch renaming files after certain character

限于喜欢 提交于 2021-02-11 04:52:13
问题 I have a bunch of video files with names like so: 6592110904-Ivory-2.mp4 6592280588-Cornflower.mp4 6592321696-Ballet Pink.mp4 I want to rename them to get rid of everything after the first hyphen so they end up like: 6592110904.mp4 6592280588.mp4 6592321696.mp4 How do I go about doing this? 回答1: Please put the code below in a bat file, place it in directory with mp4 files. Before running real renaming, please remove "echo" before "move". please be carefull with renaming bacause (theoretically

Logback and Windows Event System integration

会有一股神秘感。 提交于 2021-02-11 03:46:50
问题 Has anyone integrated with success logback and the MS Windows built-in event logger? How can it be done? It seems to me this is an important topic but I couldn't find any useful information regarding it... 回答1: I've blogged about my implementation of logback-ntlogger: http://ykchee.blogspot.com/2012/09/logback-nt-event-log-appender.html 回答2: It doesn't seem to exist: switch from log4j to logback However, as is noted in that link, you can just port Log4J's NTEventLogAppender and reuse the dll

Logback and Windows Event System integration

[亡魂溺海] 提交于 2021-02-11 03:40:14
问题 Has anyone integrated with success logback and the MS Windows built-in event logger? How can it be done? It seems to me this is an important topic but I couldn't find any useful information regarding it... 回答1: I've blogged about my implementation of logback-ntlogger: http://ykchee.blogspot.com/2012/09/logback-nt-event-log-appender.html 回答2: It doesn't seem to exist: switch from log4j to logback However, as is noted in that link, you can just port Log4J's NTEventLogAppender and reuse the dll

Logback and Windows Event System integration

天大地大妈咪最大 提交于 2021-02-11 03:40:08
问题 Has anyone integrated with success logback and the MS Windows built-in event logger? How can it be done? It seems to me this is an important topic but I couldn't find any useful information regarding it... 回答1: I've blogged about my implementation of logback-ntlogger: http://ykchee.blogspot.com/2012/09/logback-nt-event-log-appender.html 回答2: It doesn't seem to exist: switch from log4j to logback However, as is noted in that link, you can just port Log4J's NTEventLogAppender and reuse the dll

Logback and Windows Event System integration

ⅰ亾dé卋堺 提交于 2021-02-11 03:37:13
问题 Has anyone integrated with success logback and the MS Windows built-in event logger? How can it be done? It seems to me this is an important topic but I couldn't find any useful information regarding it... 回答1: I've blogged about my implementation of logback-ntlogger: http://ykchee.blogspot.com/2012/09/logback-nt-event-log-appender.html 回答2: It doesn't seem to exist: switch from log4j to logback However, as is noted in that link, you can just port Log4J's NTEventLogAppender and reuse the dll

Named Pipes Matlab

只谈情不闲聊 提交于 2021-02-11 01:45:39
问题 I am having trouble locating an example for creating a windows named pipe in matlab. Any suggestions on how to program or where to look? 回答1: Using .NET's System.IO.Pipes is probably the easiest way out of the box, easier than writing a MEX file to call the Win32 API. Matlab lets you call .NET directly from M-code, and the objects are managed so resource cleanup will be easier. .NET 3.5 and newer support named pipes. The resulting M-code would look something like this. (Sorry; I don't have

Named Pipes Matlab

我怕爱的太早我们不能终老 提交于 2021-02-11 01:44:31
问题 I am having trouble locating an example for creating a windows named pipe in matlab. Any suggestions on how to program or where to look? 回答1: Using .NET's System.IO.Pipes is probably the easiest way out of the box, easier than writing a MEX file to call the Win32 API. Matlab lets you call .NET directly from M-code, and the objects are managed so resource cleanup will be easier. .NET 3.5 and newer support named pipes. The resulting M-code would look something like this. (Sorry; I don't have

Batch script multiple choice menu

我只是一个虾纸丫 提交于 2021-02-11 00:20:07
问题 I have multimedia file viewing software that I call in a batch script to load files using an /LOADFILES argument. This argument accepts multiple files separated by semicolons ";". What I would like is a menu from which I can select the files I want to open. For example : Sample_01 Sample_02 Sample_03 Sample_04 Sample_05 All What is your choice ? And what we have selected ends up stored in a variable which is interpreted by the /LOADFILES argument. For now, my script is able to open all the

Tool Help API returns invalid HMODULE?

别说谁变了你拦得住时间么 提交于 2021-02-10 23:22:44
问题 In my app, I hook some Windows API calls by patching PE Import Access table. I enumerate all modules in a process using this Tool Help API (Module32First,Module32Next). One of the functions I hook is LoadLibrary. In it, I load module by calling the original LoadLibrary and then I enumerate again all the loaded modules to detect new loaded modules I have not hooked yet (because LoadLibrary can load the specified module plus all the modules it depends on). It works fine most of the time. But

Tool Help API returns invalid HMODULE?

北城以北 提交于 2021-02-10 23:19:56
问题 In my app, I hook some Windows API calls by patching PE Import Access table. I enumerate all modules in a process using this Tool Help API (Module32First,Module32Next). One of the functions I hook is LoadLibrary. In it, I load module by calling the original LoadLibrary and then I enumerate again all the loaded modules to detect new loaded modules I have not hooked yet (because LoadLibrary can load the specified module plus all the modules it depends on). It works fine most of the time. But