Given a string $A$.  Definition: Two strings are said to be equal if after applying following operation, they become equal(equivalent).  Operation: Given two strings, you can swap any characters in the string at most one time in any string. eg - $abc$, $bac$ are equal(equivalent) since in $bac$, we can swap $b$ with $a$.  Now we need to calculate the number of "ordered pairs" after permuting the $A$ string such that they are two strings that are not equal.  Note: Characters in string can be repeated.  Example: Let string A is $abc$. No of permutation of string $A$ is 6 which are $abc$,$acb$,$bca$,$bac$,$cab$,$cba$. There is no $ordered$ $pair$ of strings such that both string are not equal(equivalent). Like in pair ($acb$,$bac$) both can be made equal(equivalent) because we can $c$ with $b$ in $abc$ and $a$ with $b$ in $bac$. So answer is $0$.   Thanks
We are provided with a string A (may contain repeated characters as well ). One needs to make all possible permutations of A , and find out how many pairs of strings chosen from these permutations are not similar.  Two strings are similar if we can make both of them exactly same by carrying out at most 1 swap in each of them .  Example :- if we are provided with string abcd  , then for permutation abcd , the permutations which are not similar to it are bcda , bdac , cadb , cdba , dabc , dcab . Similar is the case for other permuations as well. So overall number of desired pairs are 24*6=144 .  I tried solving it for each possible pair by approach mentioned here     But as the permutations can be large enough , I need a better approach of solving this.
How to change the shadow color in Blender Cycles? How to send and receive data from Salesforce to a FTP server My question is how I can intergrate Salesforce with different FTP servers in real time. I have read some articles about it, but to be absolutely sure I thought it would be a good idea to post a question here.  I want to be able to send and receive data from Salesforce as a csv file to a ftp server. How I'm thinking about doing this is listed below.  Send the data:  Create a apex class which query the necessary data in Salesforce and create a csv file. I guess this is trivial? Then send the file to a web service created in Salesforce, just by calling it in the apex code. Create a web service in Salesforce which receives the data from the apex code. This web service should in some way send the data to the appropriate ftp server. I guess I can simply modify some of the code provided by Salesforce to make this work? The file is sent. Receive the data  This one is a bit trickier. I guess I have to pull the data from the FTP server by using my web service, which then send the file collected to the appropriate apex class. Or, the FTP server could send the data to the SFDC web service, I don't know if this is possible? The web services on the other side that sends the data to the ftp server, could send it directly to the SFDC web service, which then again forward it to the apex class. I guess the web service will use the remote site url to connect to the SFDC web service? What do I know, when deciding whether to cast Counterspell? I'm not entirely clear on how Counterspell works, when trying to counter higher-level spells: the CS description only talks about disrupting a creature you can see, within 60 feet, casting a spell.   However, when trying to counter a higher level spell:   Do I know what spell is being cast?  Do I at least know (somehow intuit, based on VSM components) the level of the spell? Or can I tell the spell/level of the spell by sensing a disturbance in The Weave? (I.e., if the spell is being cast using Subtle Spell, can I still tell what's going on?)   The point of the question is to determine how fruitful CS can be in combat--if I know what the other guy/gal is casting (or at least the level), I can decide whether I want to spend my L8 slot to counter his/her L8 slot. But if I have no idea, and I end up using a L8 slot to counter a L3 spell... seems a bit painful.  Hope this made sense! Completeness and Incompleteness java.lang.NumberFormatException: Invalid int: "" Compiler Errors in atlwin.h May I summarize all answers on StackOverflow, I asked a . There are many good answers but I can not accept just one of it. I would prefer to create my own answer where I summarize all answers. Is that allowed? How to play DVDs in Ubuntu 16.04? How to install driver for TP-Link TL-WN722N(EU)V2 on Ubuntu 17.04 Kylin I can not install the TP-LINK WN722N V2, which includes a 8188 EUS chip. Then I tried to install the backports v4.4.2,but   do not want to recognize either.  The TP-Link driver installation errors thrown out:  man@kman-livve:~$ cd '/home/kman/Documents/Tplink 722 N V2/rtl8188EUS_linux_v4.3.0.8_13968.20150417' kman@kman-livve:~/Documents/Tplink ...$ sudo make  "******************************************" "NO SKRC,we will use default KSRC" "******************************************" make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.10.0-15-generic/build M=/home/kman/Documents/Tplink 722 N V2/rtl8188EUS_linux_v4.3.0.8_13968.20150417  modules make[1]: Entering directory '/usr/src/linux-headers-4.10.0-15-generic' arch/x86/Makefile:140: CONFIG_X86_X32 enabled but no binutils support make[1]: *** No rule to make target '722'.  Stop. make[1]: Leaving directory '/usr/src/linux-headers-4.10.0-15-generic' Makefile:1367: recipe for target 'modules' failed   A method to know him, I do not know about. Thanks  Model:TL-WN722N(EU)_V2_161112_Linux.zip Chipset:rtl8188EUS_linux_v4.3.0.8_13 In 1D why are vectors, such as, e.g., velocity $v$ and acceleration $a$, not written with a vector arrow? In my textbook instantaneous velocity and acceleration are wrote only as $v$ and $a$ in the chapter of One dimensional motion. Instead, in two dimensional motion chapter they are written with the "arrow" symbol upon them, $\vec{v}$ and $\vec{a}$.  Why if they are both vectors they don't have an arrow in that particular chapter? I just can't get it. Hi is it possible to get images from go daddy  to visual force pages.if it possible can you explain clearly how the process is. Could humans choose to establish fibre digesting colonies in our guts? I originally read this book in the mid- to late '70s.   The premise was a bureaucracy whose job it was to manipulate events in human history by making the smallest possible change that would effect the desired outcome. Not time cops in the sense of going after law breakers.  The intent was to maintain a policy of non-interference as much as possible but when interference was warranted then to make the least possible change and to do so invisibly.  For example, they might take someone's keys off the dresser and put them just out of sight underneath the dresser where they plausibly might have fallen.  The subject would never know of the manipulation but would then be delayed getting out of the house and the ripples grew from there to avert a war or otherwise affect events on a large scale.  After reading that, whenever I would lose something - especially in an improbable way such as dropping a screw at my feet and then finding it on the other side of the room half an hour later - I would take some consolation in the thought that I had just averted some global catastrophe.  I was pretty scatterbrained as a kid (we call that ADHD nowadays) so I experienced this a lot.  Given that I've spent so much time pondering the ideas from the book, I'd love to re-read it. Nick Fury told Captain America that he has been "asleep" for nearly 70 years. If Dominic Cooper was playing Howard Stark Senior (grandfather of Tony Stark) then it is fine, but if he was playing Howard Stark (father of Tony Stark) then after 70 years he should be around 90 or above.  Tony Stark, his son, should be 60 to 70 years.  Is that possible?  Tony doesn't look 70 years in The Avengers. Why did the quality of terminators increase from movies 1 to 3? I have seen only the first three movies, so I don't know whether the other movies/TV series deal with this question or not. My main point is that in the movies, the terminator that travels back furthest in time is of the worst quality, and the quality increases with the time travel (meaning they travelled from a later time). What is a good explanation for this?  Note: I am not interested in the obvious not-in-universe explanation that they wanted something better and bigger for each new movie. I have a raster height model and would like to calculate the horizontal geographic direction (north, east, etc. - orientation) of each cell, then calculate then the mean value of all these cells in one region (polygon). This is to get information about to what direction a vineyard is exposed to. How do I do this? Does untapping an attacker stop its attack? How do I restore an accidentally deleted initrd image? Why cant I navigate to lightning component in communities? Im on a lightning community, i have a lightning component and i want to open another component with this code:  navigateToMyComponent : function(component, event, helper) {     console.log('1');     var evt = $A.get("e.force:navigateToComponent");     console.log('2');     evt.setParams({         componentDef : "c:CompetenciaComponent"     });     console.log('3');     evt.fire();     console.log('4'); }   this its the console log:   NOTHINGS HAPPEND AND I DONT KNOW WHY Python 3 with QGIS on Mac? I need to start learning Python, and I want to learn with version 3.x. I understand that QGIS--at least some plug-ins--relies on Python and Tcl/Tk, and probably on specific versions. Assuming that QGIS is dependent on Python 2, can anyone tell me how to set up parallel installations of Python 3 and Tcl/Tk such that QGIS will have what it needs and I can use Python 3 for other purposes?