Decimal value..

What is the decimal value of this 64-bit two’s complement number? 11111111 11111111 11111111 11111111 11111111 11111111 11111111 111110002Just want to see the methodology thanks!

08/08/20

What is the relationship between man pages and info pages?

05/20/20

question about C++

I have the following class declaration (6 points):class A{public:A();virtual void fun();~A();}; a. Is it a good practice?b. Why?

Write the SQL queries

HAPPY INSURANCE Database... more
R

09/28/19

Find file name from full file path?

Is there a way to extract the file name from the file full path (part of a file path) without the hassle of manipulating string?The equivalent in Java would be: File f = new File... more

grep regex to ignore comment at end of line?

I'm trying to grep through a lot of old PowerBASIC source files in search of a variable, but I'm having trouble getting `grep` to avoid matching references to the variable in the end-of-line... more

07/03/19

How can I use grep to show just filenames on Linux?

How can I use `grep` to show just file-names (no in-line matches) on Linux? I am usually using something like: find . -iname "*php" -exec grep -H myString {} \\; How can I just get the... more

06/30/19

What killed my process and why?

My application runs as a background process on Linux. It is currently started at the command line in a Terminal window. Recently a user was executing the application for a while and it died... more

Chmod 777 to a folder and all contents?

I have a web directory `/www` and a folder in that directory called `store`. Within `store` are several files and folders. I want to give the folder `store` and all files and folders within the... more

How do I add Python to the Windows PATH?

I want to be able to run Python commands from the Windows CMD. However, if I don't specify Python's full path for each command, I get an error saying "*Python is not recognized as an internal or... more

How to recursively find and list the latest modified files in a directory with subdirectories and times?

- Operating system: Linux - Filesystem type: ext3 - Preferred solution: bash (script/oneliner), ruby, python I have several directories with several subdirectories and files in them. I need to... more

06/20/19

How do I download a file over HTTP using Python?

I have a small utility that I use to download a MP3 from a website on a schedule and then builds/updates a podcast XML file which I've obviously added to iTunes.The text processing that... more
C

06/15/19

When is assembly faster than C?

One of the stated reasons for knowing assembler is that, on occasion, it can be employed to write code that will be more performant than writing that code in a higher-level language, C in... more

06/14/19

Python join: why is it string.join(list) instead of list.join(string)?

This has always confused me. It seems like this would be nicer: my_list = ["Hello", "world"] print my_list.join("-") # Produce: "Hello-world"Than this: my_list = ["Hello", "world"] ... more

06/12/19

Recursively counting files in a Linux directory?

How can I recursively count files in a Linux directory? I found this: find DIR_NAME -type f ¦ wc -l But when I run this it returns the following error. > find: paths must precede... more

06/12/19

How to have the cp command create any necessary folders for copying a file to a destination?

When copying a file using `cp` to a folder that may or may not exist, how do I get `cp` to create the folder if necessary? Here is what I have tried: <!-- language:none --> [root@file... more

06/05/19

Bash ignoring error for a particular command?

I am using following options set -o pipefail set -e In bash script to stop execution on error. I have 100 of script executing and I don't want to check return code of the script. But for a... more

06/04/19

Shell command to tar directory excluding certain files/folders?

Is there a simple shell command/script that supports excluding certain files/folders from being archived? I have a directory that need to be archived with a sub directory that has a number of very... more
C++

05/31/19

What's the purpose of using braces (i.e. {}) for a single-line if or loop?

I'm reading some lecture notes of my C++ lecturer and he wrote the following: > 1. Use Indentation // OK > 2. Never rely on operator precedence - Always use parentheses // OK > 3.... more

05/28/19

How to exclude a directory in find . command?

I'm trying to run a `find` command for all JavaScript files, but how do I exclude a specific directory? Here is the `find` code we're using. for file in $(find . -name '*.js') do java -jar... more

Display number with leading zeros?

Given: a = 1 b = 10 c = 100How do I display a leading zero for all numbers with less than two digits?That is, 01 10 100

05/27/19

How to represent multiple conditions in a shell if statement?

I want to represent multiple conditions like this: if [ ( $g -eq 1 -a "$c" = "123" ) -o ( $g -eq 2 -a "$c" = "456" ) ] then echo abc; else echo efg; fi but when I execute the script,... more

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.