expansion

Brace expansion from a variable in Bash

旧巷老猫 提交于 2019-12-02 00:59:48
I would like to expand a variable in Bash. Here's my example: variable="{1,2,3}" echo $variable Expected output: 1 2 3 Actual output: {1,2,3} The expansion doesn't work because of the order in which bash performs command-line expansion. If you read the man page you'll see the order is: Brace expansion Tilde expansion Parameter expansion Command substitution Arithmetic expansion Process substitution Word splitting Pathname expansion Quote removal Parameter expansion happens after brace expansion, which means you can't put brace expansions inside variables like you're trying. But never fear,

Is there a way to control macro expansion order

雨燕双飞 提交于 2019-12-01 21:23:33
I am hoping that someone may have an idea on how to control/specify the order of macro expansion. Here is the context: // 32 bit increments, processor has registers for set, clear and invert #define CLR_OFF 1 #define SET_OFF 2 #define INV_OFF 3 #define SET(reg,bits) *((volatile unsigned long*)(& reg+SET_OFF)) = bits //Now if I use this I can do it quite nicely with #define STATUS_LED 0x0040; SET(LATB, STATUS_LED); // LATB is port of the LED. I've actually had to move hardware around quite a bit as of late so I decided to group the LATB info with the STATUS_LED like so... #define STATUS_LED

how to avoid glob expansion when running Java app in eclipse

你离开我真会死。 提交于 2019-12-01 16:33:45
I am running into a peculiar behavior of the Eclipse run configuration, and it appears to be a Windows-only problem. Suppose I have a Java app that prints out the command line arguments, like the following: public class WildCard { public static void main(String[] args) { for (String arg: args) { System.out.println(arg); } } } If I provide argument with a wild card that can be expanded by the shell, the shell will expand it and give it to the Java program. That's no surprise. So, if I do on the command prompt java WildCard test/* the program will print test/foo.txt test/bar.txt where foo.txt

Qt: Expand ~ to home-directory

牧云@^-^@ 提交于 2019-12-01 16:33:41
Does Qt have any platform-independent functionality to accept paths like "~/myfile"? I know about wordexp , but it would be nice with a platform-independent wrapper. Edit: Thank you all for the responses. "~/myfile" was just an example. What I am looking for is functionality to handle file-paths as you would be able to write on the command-line. So on Linux, it should accept "~/myfile", "~otheruser/hisfile", "$VAR/file" etc. On Windows, it should accept "%HOMEDIR%\myfile" etc. ChristopheD You could probably just replace the tilde with the result of QDir::homePath() ? Reference here . Klathzazt

Qt: Expand ~ to home-directory

心已入冬 提交于 2019-12-01 15:17:54
问题 Does Qt have any platform-independent functionality to accept paths like "~/myfile"? I know about wordexp, but it would be nice with a platform-independent wrapper. Edit: Thank you all for the responses. "~/myfile" was just an example. What I am looking for is functionality to handle file-paths as you would be able to write on the command-line. So on Linux, it should accept "~/myfile", "~otheruser/hisfile", "$VAR/file" etc. On Windows, it should accept "%HOMEDIR%\myfile" etc. 回答1: You could

How we can use images from APK main expansion file?

百般思念 提交于 2019-12-01 14:43:47
m facing a problem from last 2 days that how we can upload a .apk file on Google play having size more than 50Mb then i find a way to upload a .apk with APK Expansion File from link http://developer.android.com/guide/market/expansion-files.html now m succeed at end but now m having problem how can i read file from that main Expansion file in my object like it is in .obb format But now able to use .mp3 files from main expansion file like: AssetFileDescripto assetFileDescriptor = zipResourceFile.getAssetFileDescriptor( "assets/all_types_of_people1.mp3"); mediaPlayer = new MediaPlayer();

How we can use images from APK main expansion file?

允我心安 提交于 2019-12-01 14:03:37
问题 m facing a problem from last 2 days that how we can upload a .apk file on Google play having size more than 50Mb then i find a way to upload a .apk with APK Expansion File from link http://developer.android.com/guide/market/expansion-files.html now m succeed at end but now m having problem how can i read file from that main Expansion file in my object like it is in .obb format But now able to use .mp3 files from main expansion file like: AssetFileDescripto assetFileDescriptor =

Android Expansion Files - resource not found when testing

浪尽此生 提交于 2019-12-01 12:58:00
问题 This is my package name: com.abc.ss Now i have manually created a folder with package name com.abc.s in mnt/sdcard/Android/obb/com.abc.ss/main.2.com.abc.ss.obb But when i run the sample app it says Downloading failed: Here is my screen shot: Here my code; public class SampleDownloaderActivity extends Activity implements IDownloaderClient { private static final String LOG_TAG = "LVLDownloader"; private ProgressBar mPB; private TextView mStatusText; private TextView mProgressFraction; private

Expansion files in the new Google Play developer console

别来无恙 提交于 2019-11-30 11:48:06
问题 I am trying to upload my app to Google Play using the developer console. As of a week or so ago they have made it so that each app has a unique key string. You have to use the new developer console to get the key for your app. The problem is that there is apparently no way to upload an expansion file, which my app needs, in the new developer console. How then do I get my key, and get my apk with expansion file uploaded to Google Play? Uploading an expansion file was simple with the old

Bash globbing - autoexpand for a few specific cases?

你。 提交于 2019-11-30 07:04:16
I understand that the wildcard * (by itself) will expand in such a way that it means "all non-hidden files in the current folder" with hidden files being those prefixed by a period. There are two use cases that I would think are useful, but I don't know how to properly do: How can you glob for... "All files in the current folder, including hidden files, but not including . or .. "? How can you glob for... "All hidden files (and only hidden files) in the current folder, but not including . or .. "? sth To expand on paviums answer and answer the second part of your question, all files except .