I am trying to use the here maps SDK and I tried every step as mentioned on the provided link:
https://developer.here.com/news/20170208a#.WVn1zNN968p
I need help regarding the issue. Please help me if anyone has ever used the here maps SDK in iOS and Swift 3.
I hope this steps follow to solve error.
In terminal, goto project's root directory and execute one by one command
find . -type f -name '*.jpeg' -exec xattr -c {} \;
find . -type f -name '*.png' -exec xattr -c {} \;
find . -type f -name '*.tif' -exec xattr -c {} \;
Clean Xcode and Re Build. Done.
Related
I have a project where I have to submit all the code comprising my program.
However, I am using xcode and an MVC architecture, so my code is split into different files/folders plus the storyboard itself.
I am wondering if there is anyway for me to see all the lines of code in one document so I can copy and paste my CR easily instead of going through each page and copying its content.
Try to run these commands in the working directory using terminal
find . -name "*.swift" -type f -exec cat {} + > "combined.swift"
If you just wanted to copy all of them
find . -name "*.swift" -type f -exec cat {} + | pbcopy
I have just updated and right away getting this error:
"error: A cryptographic verification failure has occurred."
Any ideas?
Edit: I have iOS 10
Simple solution:-
How I did [Working for me]
Step 1:- Go to this folder - from your finder press option Go - > Go to Folder
then type your project path like this example:- Library/Developer/Xcode/DerivedData/yourprojectname/Build/Products/Debug-iphoneos
Now you can see a window pop with list of available File, There you see yourApp.app file [ Don't do anything just wait for step 2].
Step 2:- Open new Terminal and type just cd then just drag step 1 yourApp.app to terminal, now you will get the path for the app, now press enter button.
Step 3:- Now type this command **
xattr -rc .
Don't miss "."(Dot) press enter button.
That's it, Go to your Xcode project and clean and run again.
Many people are having code signing errors with the first beta of Xcode 8. I would recommend using Xcode 7.3 until the next beta comes out.
From your project's root folder:
find . -type f -name '*.jpeg' -exec xattr -c {} \;
find . -type f -name '*.jpg' -exec xattr -c {} \;
find . -type f -name '*.png' -exec xattr -c {} \;
find . -type f -name '*.json' -exec xattr -c {} \;
I would like to find .plist files recursively in a folder and copy that files into new folder by a single terminal command.
find /Users/admin/Desktop/Norton/StaticAnalysis -iname "*.plist" -exec cp {} /Users/admin/Desktop/Test \;
This is the command which is working fine in terminal.
But i have to use this command in ruby code.
when i use this in ruby code like
CODE 1:
system ("find /Users/admin/Desktop/Norton/StaticAnalysis -iname \"*.plist\" -exec cp {} /Users/admin/Desktop/Test \;")
puts $?.success?
OUTPUT IS:
find: -exec: no terminating ";" or "+"
false
CODE 2:
system ("find /Users/admin/Desktop/Norton/StaticAnalysis -iname \"*.plist\" -exec cp {} /Users/admin/Desktop/Test \;");
end
puts $?.success?
OUTPUT IS:
siva.rb:2: syntax error, unexpected keyword_end, expecting end-of-input
So please help me how to use this in ruby code.
Have you tried with FileUtils module (fileutils.rb)?
It has namespace for several file utility methods for copying, moving, removing, etc.
system ("find ... -exec ... \;")
ruby is interpreting the \; within double quotes as just ;. You need to double the backslash
system ("find ... -iname \"*.plist\" -exec ... \\;")
Or use different outer quotes, which means you don't have to escape the inner quotes
system %q{find ... -iname "*.plist" -exec ... \;}
I haven't used cscope much. I would like to know the instructions to build (database) and use cscope with opencv.
Also, Is it applicable only to C programs? how about C++?
I found this long dead question as I searched for the same topic. Here's what I've found.
According to the cscope home page
The fuzzy parser supports C, but is flexible enough to be useful for C++ and Java, and for use as a generalized 'grep database' (use it to browse large text documents!)
So, I went ahead and generated a cscope database for opencv2, more or less adapting from the cscope large projects tutorial
in order to generate the appropriate cscope.files, if searching the OCV2 directory below, you'd run the find command, pruning out a lot of superfluous directories and files.
#!/bin/bash
OCV2=~/src/opencv/opencv
find $OCV2 -path "$OCV2*/.git" -prune -o -path "$OCV2*/samples" -prune -o -path "$OCV2*/cmake" -prune -o -path "$OCV2*/data" -prune -o -path "$OCV2*/doc" -prune -o -path "$OCV2*/platforms" -prune -o -path "$OCV2*/release" -prune -o -iname "*\.cpp" -print -o -iname "*\.hpp" -print -o -iname "*\.c" -print -o -iname "*\.h" -print > cscope.files
Now, you'll want to generate the cscope database, do so by running the following from within the same directory as cscope.files
cscope -b -q -k
which will create the files:
cscope.in.out cscope.out cscope.po.out
If you have the environment variable $CSCOPE_DB set to point at cscope.out then you'll be ready to go.
Let me know if you have any other questions.
I am searching through a Git repository and would like to include the .git folder.
grep does not include this folder if I run
grep -r search *
What would be a grep command to include this folder?
Please refer to the solution at the end of this post as a better alternative to what you're doing.
You can explicitly include hidden files (a directory is also a file).
grep -r search * .[^.]*
The * will match all files except hidden ones and .[^.]* will match only hidden files without ... However this will fail if there are either no non-hidden files or no hidden files in a given directory. You could of course explicitly add .git instead of .*.
However, if you simply want to search in a given directory, do it like this:
grep -r search .
The . will match the current path, which will include both non-hidden and hidden files.
I just ran into this problem, and based on #bitmask's answer, here is my simple modification to avoid the problem pointed out by #sehe:
grep -r search_string * .[^.]*
Perhaps you will prefer to combine "grep" with the "find" command for a complete solution like:
find . -exec grep -Hn search {} \;
This command will search inside hidden files or directories for string "search" and list any files with a coincidence with this output format:
File path:Line number:line with coincidence
./foo/bar:42:search line
./foo/.bar:42:search line
./.foo/bar:42:search line
./.foo/.bar:42:search line
To prevent matching . and .. which are not hidden files, you can use grep with ls -A like in this example:
ls -A | grep "^\."
^\. states that the first character must be .
The -A or --almost-all option excludes the results . and .. so that only hidden files and directories are matched.
You may want to use this approach, assuming you're searching the current directory (otherwise replace . with the desired directory):
find . -type f | xargs grep search
or if you just want to search at the top level (which is quicker to test if you're trying these out):
find . -type f -maxdepth 1 | xargs grep search
UPDATE: I modified the examples in response to Scott's comments. I also added "-type f".
To search within ONLY all hidden files and directories from your current location:
find . -name ".*" -exec grep -rs search {} \;
ONLY all hidden files:
find . -name ".*" -type f -exec grep -s search {} \;
ONLY all hidden directories:
find . -name ".*" -type d -exec grep -rs search {} \;
All the other answers are better. This one might be easy to remember:
find . -type f | xargs grep search
It finds only files (including hidden) and greps each file.
To find only within a certain folder you can use:
ls -al | grep " \."
It is a very simple command to list and pipe to grep.
In addition to Tyler's suggestion, Here is the command to grep all files and folders recursively including hidden files
find . -name "*.*" -exec grep -li 'search' {} \;
You can also search for specific types of hidden files like so for hidden directory files:
grep -r --include=*.directory "search-string"
This may work better than some of the other options. The other options that worked can be too slow.