command-line-interface

How to set icon on file or directory using CLI on OS X?

有些话、适合烂在心里 提交于 2019-12-30 06:44:51
问题 To set an icon on a file or directory is straight forward using the "Get Info" dialog in Finder. copy image from e.g. Preview open "Get Info" on file or directory press TAB to select the icon paste Cmd-V But how do you do this using the command line? 回答1: Here is a bash script "setIcon.sh" for it #!/bin/sh # Sets an icon on file or directory # Usage setIcon.sh iconimage.jpg /path/to/[file|folder] iconSource=$1 iconDestination=$2 icon=/tmp/`basename $iconSource` rsrc=/tmp/icon.rsrc # Create

Adding command line arguments to VB.Net application

妖精的绣舞 提交于 2019-12-30 06:20:09
问题 I have a windows forms based application made by another programmer and I need to add a few command line switches to it's primary output exe so that I can pass arguments like: program.exe -reinitialise or program.exe -sync I have found some docs online but all seem to be in C# and are for command line only programs. This program installs via an .msi and the .exe is only constructed at the end. So my questions are: How do I add command line switches to a VB.Net application? Where/What form do

How to retrieve the timestamp from cassandra?

左心房为你撑大大i 提交于 2019-12-30 05:59:49
问题 In the below cassandra, "get result"..we can able to retrieve the column name and values. But how to retrieve the timestamp..Is there any better idea to get the values by using timestamp [default@sample]get user[bob]; => (column=name, value=bobdroid, timestamp=1335361733545850) => (column=email, value=bob@gmail.com, timestamp=1335361733545850) => (column=age, value=23, timestamp=1335361733545850) => (column=password, value=MTIz, timestamp=1335361733545850) Returned 4 results. Elapsed time: 4

macOS Command Line Tool with Swift Cocoa Framework: Library not loaded

一曲冷凌霜 提交于 2019-12-30 00:14:09
问题 The following error is thrown when trying to run my target: dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from: x/Xcode/DerivedData/x/Build/Products/Debug/PriorityQueue.framework/Versions/A/PriorityQueue Reason: image not found My target is a Command Line Tool (macOS) written in Swift. I'm using a Cocoa Framework (PriorityQueue) written in Swift. When I set EMBEDDED_CONTENT_CONTAINS_SWIFT to YES on the Framework , the target runs with the following warnings: objc[99144]:

“source” command in shell script not working [duplicate]

感情迁移 提交于 2019-12-29 07:17:09
问题 This question already has answers here : Difference between sh and bash (11 answers) Closed last year . I have a file to be sourced in Centos 7. It just works fine if I do : $ source set_puregev_env however, if I put this in a shell script, it doesn't work.. $ sh xRUN xRUN: line 3: source: set_puregev_env: file not found this is my shell script : xRUN #!/bin/bash source set_puregev_env can anyone tell me what I might be doing wrong, or missing? 回答1: source is a command implemented in bash,

How can I edit PYTHONPATH on a Mac?

两盒软妹~` 提交于 2019-12-29 06:16:23
问题 How can I permanently change the PYTHONPATH on a mac? I've tried editing .bash_profile, but when I use print sys.path in a file it gives a huge list of different URLs than the .bash_profile. In Terminal when I type echo $PYTHONPATH it shows a blank line. I don't want to use sys.path.append('...') because then I have to put that in every file. 回答1: You can append the path to $PATH and not to $PYTHONPATH. if you insist to change the PYTHONPATH , in some context that is prefferable: do this:

How can I edit PYTHONPATH on a Mac?

亡梦爱人 提交于 2019-12-29 06:16:09
问题 How can I permanently change the PYTHONPATH on a mac? I've tried editing .bash_profile, but when I use print sys.path in a file it gives a huge list of different URLs than the .bash_profile. In Terminal when I type echo $PYTHONPATH it shows a blank line. I don't want to use sys.path.append('...') because then I have to put that in every file. 回答1: You can append the path to $PATH and not to $PYTHONPATH. if you insist to change the PYTHONPATH , in some context that is prefferable: do this:

Mac Terminal - How to start Android Virtual Device Manager on CLI?

蹲街弑〆低调 提交于 2019-12-29 04:36:27
问题 I am currently developing a mobile web application and I don't have a test device yet so I'm using the android-emulator to check the site. On my mac, I have installed the stand-alone Android SDK. Every time I want to use the AVD Manager, I have to execute the following on my terminal: monitor This command (being executed on the installed android sdk path) will open the Android Device Monitor and from here, I go to its menu bar and select Window Virtual Device Manager just to open the AVD

What is the maximum length of a C#/CLI identifier?

删除回忆录丶 提交于 2019-12-28 04:22:05
问题 Which other restrictions are there on names (beside the obvious uniqueness within a scope)? Where are those defined? 回答1: From the PDF of ECMA-335, Partition II, section 22, "Metadata preserves name strings, as created by a compiler or code generator, unchanged. Essentially, it treats each string as an opaque blob. In particular, it preserves case. The CLI imposes no limit on the length of names stored in metadata and subsequently processed by the CLI". If I've read this correctly and the

How to change the path to php.ini in PHP CLI version

試著忘記壹切 提交于 2019-12-28 03:48:12
问题 The php that run on the webserver and the CLI version is not using the same php.ini file. If I do a command php --ini , it show this Configuration File (php.ini) Path: C:\Windows Loaded Configuration File: C:\wamp\bin\php\php5.3.8\php.ini Scan for additional .ini files in: (none) Additional .ini files parsed: (none) while my web version uses the php.ini in C:\wamp\bin\apache\Apache2.2.21\bin\php.ini . This is probably very common for people using wamp. How do I change the Loaded Configuration