Visual Studio doesn’t see my new .CS files [on hold]

I have a directory structure like this:

Plugin.cs
--Sync (folder)
  |  CreateDateCrawler.cs
  |  ModDateCrawler.cs
--Helpers (folder) 
  |  MyHelper.cs

All of these files are in the same namespace.
Plugin.cs gives an error when I try to use any of these other c# files.
However, and this is where it gets weird, CreateDateCrawler.cs can see MyHelper.cs.

Why can only some of my files see this? Thanks

All topic

tar -C with certain files in the direcory

I have let us say 2 directories that I want to tar without retaining the directory structure
/root/dir1
/root/dir2

I do not want to retain the directory hierarchy

  • I also want to backup only files that beging with say f1 in /root/dir1 and a file called log.txt in /root/dir1
  • In /root/dir2 I only want files that begin with f2

I am familiar with tar -C but I am not sure how i can achieve still what I am trying to

All topic

How to rename multiple files in a sub directory in a single command or script in Unix [on hold]

I’m looking to rename multiple files in a directory with the extension “.jpg”, renaming them into ICON and PIC respectively. The images have been registered in different names. how am i to go about with it. please need some help.thanks.

All topic

Why i cant upload .jsp files in glassfish server? [on hold]

I have an issue with uploading files to Servlet/3.0 JSP/2.2 (GlassFish Java/Oracle Corporation/1.7)

When I try to upload files in .jsp with this contents : with this content

its tell me to download it , not to open it in server .

but when I upload an empty .jsp file its opened in a server, what is the problem ? is there any another alternative extensions for .jsp files ?

All topic

Automatically symlink directory files into another directory

Anytime I add something to ~/config/, I would like it to be symlinked into ~. I don’t want to run ln -s every time.

All topic

Force Excel to save files with .TSV file extension

I am using Microsoft Excel to work with tab delimited files. Although I can import tsv files without an issue, I can’t save them with the TSV extension. Instead, I have to

1. Import the TSV file into Excel
2. Make my changes
3. Save the changed file as .txt
4. Delete the original .tsv file
5. Rename the .txt file as .tsv

Is there a way to force Excel to save as .tsv file directly?

I am using Excel 16.16 running on Mac OS El Capitan 10.11.6

All topic

.smbdelete files accumulating on server share

I manage a very modest macOS server (Late 2014 Mac Mini, Mac OS 10.12.4, Server 5.3) that supports several sharepoints for about 20 clients – a mix of macOS and Windows. I typically have my work machine set to ‘AppleShowAllFiles TRUE’ so I notice that the shares are accumulating ‘.smbdelete…’ files. These are hidden for most users, but they are getting a little annoying for me because the file listing of one share in particular is getting long. From web searches, it looks like this has to do with macOS’ handling of SMB connections to shares.

So two questions:

  1. Can these be safely deleted?
  2. Can the accumulation of these be halted.

All topic

touch & gzip all HTML, CSS, JS files in a directory recursively

I’m trying to optimize Nginx server. I’ve enabled Gzip_Static_Module to serve pre-compressed gzip static files like CSS, JS, HTML.

Nginx Wiki says that the timestamps of the compressed and uncompressed files match. So, I’m trying to touch the files before Gzipping.

I’m trying to touch and generate *.gz for these static files using the commands below:

$ su -c "find . -type f -name "*.css" -size +1024b -exec sh -c "touch {} 
    && gzip -9v < {} > {}.gz" ;"

$ su -c "find . -type f -name "*.js" -size +1024b -exec sh -c "touch {} 
    && gzip -9v < {} > {}.gz" ;"

$ su -c "find . -type f -name "*.html" -size +1024b -exec sh -c "touch {} 
    && gzip -9v < {} > {}.gz" ;"

but I receive “User {} not found” error.

Can anyone please help me what’s wrong in the above command? And is there any better approach for generating *.gz automatically, whenever the timestamp of any uncompressed file changes (Cronjob may be)?

All topic

404 Crawl Error to almost all pdf files

The website is built in wordpress.

I do not have than much experience, so I need your help. Once I entered at “Search Console” at “Crawl Errors” tab I saw that all “404 errors” are in “wp-content/uploads” and most of them are .pdf
I noticed than it adds text after the suffix of .pdf.

1st example:

At “Crawl error” it appears “Error 404” on this link :

https://example.com/wp-content/uploads/2016/10/salon-du-livre-octobre-2016_2-2.pdf;salon-livre-octobre-2016_2-2

When I try to get in, it says “File not found”. If I delete the suffix ;salon-livre-octobre-2016_2-2 from the link then I have access to .pdf. The link will be:

https://example.com/wp-content/uploads/2016/10/salon-du-livre-octobre-2016_2-2.pdf

2nd example:

https://example.com/wp-content/uploads/2017/10/marmara.pdf;

If I delete the ; symbol suffix then the link works.

I tried to redirect with Yoast.

1st attempt:

Old URL: https://example.com/wp-content/uploads/2016/10/salon-du-livre-octobre-2016_2-2.pdf;salon-livre-octobre-2016_2-2
New URL: https://example.com

2nd attempt:

Old URL: https://example.com/wp-content/uploads/2016/10/salon-du-livre-octobre-2016_2-2.pdf;salon-livre-octobre-2016_2-2
New URL: https://example.com/wp-content/uploads/2016/10/salon-du-livre-octobre-2016_2-2.pdf

Neither of these two worked.

Is there any way to redirect these PDFs?

What can I do with the problem of “Crawl Errors”?

I’m using Attachment File Icons (AF Icons) plug in for pdf by Praveen Rajan
And All 404 Redirect to Homepage By Fakhri Alsadi.

List of crawl errors

All topic

Android – Downloading multiple files in Async Task causes excessive GC’s

For my app, I receive a list of URL’s to download and save to local storage with the file size varying from less than 1MB to over 50MB and the number of files between 15-60. I do this by using an Async Task and the following code:

 new AsyncTask() {
        @Override
        protected void onPreExecute() {
            super.onPreExecute();
        }

        @Override
        protected String doInBackground(String... params) {
            String etag = "";
            Log.v(TAG, "Adding " + url + " to download queue.");
            InputStream inputStream;
            try {
                URL fileURL = new URL(url);
                URLConnection urlConnection;
                urlConnection = fileURL.openConnection();
                etag = urlConnection.getHeaderField("ETag");
                inputStream = fileURL.openStream();
                DataInputStream dis = new DataInputStream(inputStream);
                byte[] buffer = new byte[1024];
                int length;
                FileOutputStream fos = new FileOutputStream(Environment.getExternalStorageDirectory() + "" + fileName);
                while ((length = dis.read(buffer)) > 0) {
                    fos.write(buffer, 0, length);
                }
                inputStream.close();
                fos.close();
            } catch (FileNotFoundException e) {
                Log.e(TAG, "File not found.");
                e.printStackTrace();
            } catch (IOException e) {
                Log.e(TAG, "Error Downloading file " + fileName);
                e.printStackTrace();
            }
            return etag;
        }
}.execute();

I am not using the onProgressUpdate for anything and the OnPostExecute Override is used for a few UI updates such as the progress bar. I have omitted both because I do not believe either are relevant to the GCs, but I will include later if needed.

I also have tried the above code with

.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);

instead of just

.execute();

as shown.

Using .executeOnExecutor() results in much faster downloads as files can download many at a time in the pool (5 I believe?), but gives more GC’s. The regular .execute() is slower but gives less (still lots) GC’s.

My questions:

  1. Can someone please explain why one method results in more GC’s than the other?

  2. How can I fix the download code to prevent so many GC’s?

All topic