I'm trying to write a program that finds the salvage value of an item after entering the purchase price, annual depreciation, and years of service.   Annual Depreciation= (Purchase Price-Salvage Value)/Years of Service   When inputting 5000, 8, 5.25 I should return 4958.00000
Why is it that scanf() needs the l in "%lf" when reading a double, when printf() can use "%f" regardless of whether its argument is a double or a float?  Example code:  double d; scanf("%lf", &amp;d); printf("%f", d);
Can I use my Schengen visa for a completely different purpose and entry point? I am a non-EU national, permanent UK Resident. Recently, my work issued me with a multiple Schengen visa with Norway as the first (main) point of entry. Now I want to go on holidays to Greece - do I need to apply to Schengen visa again, as Greece is not Norway and I am not going there for work? How can I make calls related to a case display in its Chatter feed? I am using the Service Console in Lightning Experience, and using the Chatter Feed component on the Case layout to display updates to the Case.  If I use the "Log a Call" Quick Action from the Chatter publisher, these calls are displayed in the Chatter feed.  This is the desired behaviour.  However, if I insert a Log a Call record related to the Case any other way - e.g. using the Developer Console, or my CTI system's custom components - the call does not display in the feed.  If I query the record, it looks exactly the same as the record that is created with the Quick Action.  It just seems that the Chatter post is never made in this situation.  I have checked my Feed Tracking settings:   Task has Enable Feed Tracking and Subject checked Case has All Related Objects checked   How can I enable calls created with a custom component (part of a CTI system) to display in the case feed? How to perform Stream functions on an Iterable? ubi-partman failed with exit code 10 - ubuntu 18.04 I'm trying to install Ubuntu 18.04 on my laptop. After choosing the partitionn i have the following error message: grub-efi-amd64-signed package failed to install into / target/.    Then I tried to install via "try ubuntu" and i get:  ubi-partman failed with exit code 10     What should I do? How to handle calendar TimeZones using Java? I have a Timestamp value that comes from my application. The user can be in any given local TimeZone.  Since this date is used for a WebService that assumes the time given is always in GMT, I have a need to convert the user's parameter from say (EST) to (GMT). Here's the kicker: The user is oblivious to his TZ. He enters the creation date that he wants to send to the WS, so what I need is:  User enters: 5/1/2008 6:12 PM (EST)  The parameter to the WS needs to be: 5/1/2008 6:12 PM (GMT)  I know TimeStamps are always supposed to be in GMT by default, but when sending the parameter, even though I created my Calendar from the TS (which is supposed to be in GMT), the hours are always off unless the user is in GMT. What am I missing?  Timestamp issuedDate = (Timestamp) getACPValue(inputs_, "issuedDate"); Calendar issueDate = convertTimestampToJavaCalendar(issuedDate); ... private static java.util.Calendar convertTimestampToJavaCalendar(Timestamp ts_) {   java.util.Calendar cal = java.util.Calendar.getInstance(       GMT_TIMEZONE, EN_US_LOCALE);   cal.setTimeInMillis(ts_.getTime());   return cal; }   With the previous Code, this is what I get as a result (Short Format for easy reading):  [May 1, 2008 11:12 PM] delay JQuery effects I want to fade out an element and all its child elements after a delay of a few seconds. but I haven't found a way to specify that an effect should start after a specified time delay. How to find the roots of $x^4 +1$ I'm trying to find the roots of $x^4+1$. I've already found in this site solutions for polynomials like this $x^n+a$, where $a$ is a negative term. I don't remember how to solve an equation when $a$ is a positive term as the equation above.  Thanks Does measurement, quantum in particular, always increase the total entropy? When a function has a specific-size array parameter, why is it replaced with a pointer? How to add "Refresh" option to right click menu in Lubuntu? I have many users at the place I work, expressing the notion of switching to Ubuntu.  Most of them, for whatever weird reason wanting to know if its possible to have refresh added when you right click on the desktop.   Is that possible? In a tic-tac-toe implementation I guess that the challenging part is to determine the best move to be played by the machine.  What are the algorithms that can pursued? I'm looking into implementations from simple to complex. How would I go about tackling this part of the problem? What and with what was Luthor doing in the ship at the end of the movie? After Doomsday was defeated, a spec-ops team sent to the Kryptionian ship in Metropolis found Luthor submerged in water, in front of a... thing, which "held" three metal cubes. The thing looked up, roars, and dissipates into thin air.    What the hell was that all about? I am really confused. What was that creature and what was Luthor doing with it? cat files with directory Is there a command to show the directory/file name when cat files?  For example: assume two files f1.txt and f2.txt are under ./tmp  ./tmp/f1.txt ./tmp/f2.txt    Then when I do cat ./tmp/*.txt, only the content of files will be shown. But how to firstly show the file name, then the content?, e.g.:   (The needed command):  ./tmp/f1.txt:    This is from f1.txt  and so on  ./tmp/f1.txt:  This is from f2.txt ...   Is there a command to do it? (There seems to be no option for 'cat' to show the file names) Is it possible to install multiple instances of the same delphi service application? Describe the equivalence classes in terms of familiar mathematical objects Is there any difference between "word-for-word translation" and "word-by-word translation" and is the latter actually valid? First off, some data: According to COCA word-for-word has 60 usages, 3 of them are &quot;word-for-word translation&quot;. Word-by-word has 26 usages, none of them are &quot;word-by-word translation&quot; (but some with &quot;transcription&quot;). The definition of word-for-word:  : In exactly the same or, when translated, exactly equivalent words : being in or following the exact words, verbatim : one word at a time, without regard for the sense of the whole  Only the last dictionary contains a definition for word-by-word, too:  : one word at a time  The definitions given by The Free Dictionary are, obviously, identical to each other. Google hits: Word-for-word ~21m Word-for-word translation ~318k Word-by-word ~3.8m Word-by-word translation ~95k According to usages and dictionaries word-by-word is, at least, less popular. And assuming that there may be a lot of usages from non-natives among the Google hits, this could be an indicator for word-by-word being even utterly wrong. In another forum I found the following :  When I translate something &quot;literally,&quot; (wörtlich) it still follows the main rules of the language I'm translating into. What you mean is &quot;word-by-word&quot; (wortwörtlich) to me.  I assume that this was written by a German but I don't know it. However, if this would be true a &quot;word-by-word translation&quot; would be a translation where I keep, for instance, the order of the words, disregarding if it makes sense in the target language. Some examples:  Original: word-by-word Word-by-word translation: Wort bei Wort (That's a terrible translation!) Original: It is critical to know... Word-by-word translation: Es ist kritisch zu wissen... (That's a terrible translation!) Original: Ich glaub, ich spinne. Word-by-word translation: I think I spider. (I guess only Germans understand this.)  A &quot;word-for-word translation&quot;, however, would be an attempt to keep the word-choice as close as possible but following the rules of the target language (e.g. order of words) and also considering if the statement still makes sense in the other language. Here are better translations for the examples above:  Wort für Wort Es ist wichtig zu wissen... I think, I'm going nuts. (Actually, this is not a word-for-word translation but rather a .)  So, my questions again:  As neither Oxford nor Merriam-Webster have any entries for word-by-word in their dictionaries: is word-by-word actually valid? If yes, is there any difference between &quot;word-by-word translation&quot; and &quot;word-for-word translation&quot;? If yes again, what is it specifically? I can't seem to find an answer to this simple question, which I need for some compliance documentation.    On a default install of CentOS 6.5 (OpenSSH 5.3p1-94.el6), after how long of being idle will a user's SSH session be terminated?  I believe the following can be set to increase the idle timeout, but they are commented out by default.  $ grep -i alive /etc/ssh/sshd_config #TCPKeepAlive yes #ClientAliveInterval 0 #ClientAliveCountMax 3   Also, is there a command to dump a list of the current sshd settings?  I don't see anything in man sshd. apache2 mod_rewrite redirect without http body Set the QGIS display to show decimal degrees? Using QGIS 2.6.1 Brighton. I am trying to set the CRS for the project to display Decimal Degrees, where it is defaulting to Feet. I can change it in the Properties Dialog, but it does not change it, it is just staying on Feet. How do I change it?  Edit: this layer was imported from a shapefile where it was internally set to Feet. I was able to get the vendor to supply one with Decimal Degrees so my problem is gone. Still would love to know if there was a way to do it myself from within QGIS. I have two given names and one surname. Is it a problem if I omit the surname from my ticket? I have two names as my given name in the passport and I typically just use this as my first and last name. However, my passport has a surname too which I almost never use. Due to this, I mistakenly provided my given name as first and last name.   As per the passport,  Surname : AAAA Given name(s) : BBBB CCCC   In the ticket, First name : BBBB Last name : CCCC  The credit card I've used to make this booking has my name as BBBB CCCC.  Will this create a problem at the travel time?  Update : the airline says that they can't update the name in the ticket. They are saying that since they have made a remark of the passport details boarding will not be a problem but I might face problems at immigration. Do they check name details in itenerary to exactly match passport at the time of immigration? Is that true in your experience?  Update : Travelled without any problem, neither at boarding gate, immigration nor after arrival at border police control.