As the title states, whenever I try to install mods (Renaming folder, installing mods, etc.), the newly-created (modded) folder does not appear in the 'Use Version:' list on the launcher.  What might be wrong?

I've recently changed to the new Minecraft launcher, and I have noticed a change in the .minecraft folder layout. I can no longer install mods just by copying it over into the versions/1.6.1 jar file, as this file refreshes every time it is launched.  For those who don't know what I am talking about, here is the new layout:    I am specifically trying to install Optifine, which does work with 1.6.1. Where do I drag in the mod files now? I can't seem to find a jar file that is suited to it, except in the version folder, but as I stated above, this refreshes every time.  After copying a recent version and renaming it in the version folder, I get this error in the development console:   Unexpected exception refreshing version list java.lang.IllegalArgumentException: Version '1.6.1' is already tracked     at net.minecraft.launcher.updater.VersionList.addVersion(VersionList.java:91)     at net.minecraft.launcher.updater.LocalVersionList.refreshVersions(LocalVersionList.java:44)     at net.minecraft.launcher.updater.VersionManager.refreshVersions(VersionManager.java:47)     at net.minecraft.launcher.Launcher$2.run(Launcher.java:164)     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)     at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)     at java.util.concurrent.FutureTask.run(Unknown Source)     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)     at java.lang.Thread.run(Unknown Source)


I see the following in my access log:  access.log.1:66.249.69.81 - - [02/Apr/2015:23:03:13 -0400] "GET /click.php?c%3Ec4C%7B%5BHG%7BbD6kc31%3E'dmjdl(..more such snipped..) HTTP/1.1" 404 19 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" access.log.1:66.249.65.178 - - [04/Apr/2015:12:22:32 -0400] "GET /click.php?c%3Ec4C%7B%5BHG%7BbD6kc31%3E'lfzxps(..more such snipped..) HTTP/1.1" 404 19 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" access.log.1:66.249.65.178 - - [04/Apr/2015:13:07:21 -0400] "GET /click.php?c%3Ec4C%7B%5BHG%7BbD6kc31%3E'lfzx(..more such snipped..) HTTP/1.1" 404 19 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"   The IPs are from Google, UA string claims to be Googlebot -- but why is it trying to fetch such strange URLs? My site does not even use PHP.  I see a previous question , without any conclusive answers.  Some googling reveals this is not specific to my website. For e.g., google for "click.php opqbz" gets 443000 results with similar URLs.  What gives?

Google Webmaster tools is reporting a large increase in 'not found errors' on my site, and I see approximately 1700 'Not Found Errors over the past 2 months. All of them are for a url that is formatted like:  http://mydomain.com/click.php?c%3EdHm7fnGkc3Smdz6kc31%3E'dmjdlgsbve%3E2'lfzxpset%3EQfbs'sbol%3E2'f%3Evt%3Cvt%3C79%3C2%3C2%3C54528243%3Cgmbnjohpspbe%3C2%3C6224'vsm%3Eiuuq%264B%263G%263Gxxx%2Fopdmjdlz%2Fdpn%263G'gffe%3Eopqbz'qsjdf%3E'tbq%3E%3A84%3A9g54e662db639%3A28eeb2cc8bb8e9'zbsht%3Exxx%2Fopdmjdlz%2Fdpn   Google says these are linked from:  http://mydomain.com/index.php?Keywords=Pear&search_type=related2&cat2=Lemon+Cake&r=c%3EdHm7fnGkc3Smdz6kc31%3E'f%3Evt%3Cvt%3C79%3C2%3C2%3C27748763%3Ctuzmf2%60dvtupn/dtt%3C3%3Cjoufsdptnpt%60bggjmjbuf%603%60e3s%60efsq%3Cgmbnjohpspbe%3Cgmbnjohpspbe%3C656178%3C6224%3Cdmfbo%3Cmjtujoht%3Czbipp%3C'jqvb%60je%3E:84:9g54e662db639:28eeb2cc8bb8e9'enybsht%3Eg4dc139e6673d:812b:b::d8e34:9fe9&rd=1   When I browse to the url Google says these are linked from (both using my browser, and the fetch by Google tool), I don't see any links on the page to click.php. These links are supposedly coming from MY domain / server, but click.php does not even exist on my server. When I look through my server logs, I do not see any of the index.php? urls this says they are accessed from.  What am I missing here? Is the link getting encoded in the url or something? How can I fix this? I would REALLY appreciate some help in figuring this out.  Update:  I had purchased a domain (that was previously parked), and moved my site to it a few months ago. Apparently these links existed on the parked domain, and Google has gone through and crawled all ~1700 of the links twice now. Once a few months ago, and once 2 days ago. Is this something that will affect my ranking in Google? Is there any way to notify Google that all of these links are gone / incorrect? Should I use the 'remove urls' tool in webmaster tools?


I'm currently developing a blender plugin, and need to be able to show drop down lists where users can choose a material and object from the project, but I can't work out how to do it.  Does anyone have an idea how this is done?

In my addon panel, how can I have an object selection box?  And what data type would I use to store the the selected object?  It should look like this:


Do you have any things (mathematical statements, statements about mathematics) you've believed for a long time were true, but now with enough mathematical knowledge you realize were wrong? For example, my high school teacher used to tell the class that all there is to discover in math has already been discovered. Obviously, now, thinking about her statement makes me laugh out loud. What stories do you have?

It's one of my real analysis professor's favourite sayings that "being obvious does not imply that it's true".  Now, I know a fair few examples of things that are obviously true and that can be proved to be true (like the Jordan curve theorem).  But what are some theorems (preferably short ones) which, when put into layman's terms, the average person would claim to be true, but, which, actually, are false (i.e. counter-intuitively-false theorems)?  The only ones that spring to my mind are the Monty Hall problem and the divergence of $\sum\limits_{n=1}^{\infty}\frac{1}{n}$ (counter-intuitive for me, at least, since $\frac{1}{n} \to 0$ ).  I suppose, also, that $$\lim\limits_{n \to \infty}\left(1+\frac{1}{n}\right)^n = e=\sum\limits_{n=0}^{\infty}\frac{1}{n!}$$ is not obvious, since one 'expects' that $\left(1+\frac{1}{n}\right)^n \to (1+0)^n=1$.  I'm looking just for theorems and not their (dis)proof -- I'm happy to research that myself.  Thanks!


I am doing Oksendal's book exercises one by one. I got stuck in 3.2.  I need to prove, from the definition that   $$\int_{0}^{t}B_s^2\text{d}B_s=\frac{B_s^3}{3}-\int_{0}^{t}B_s\text{d}s,$$  where $B_s$ is Brownian motion and the integral is Ito's.  Denote $B_{t_i}$ by $B_i$, for a partition $\{t_i\}_{i=2}^n$.   $$B_t^3=\sum_{0}^{n-1}\left(B_{i+1}^3-B_{i}^3\right)=\sum_{0}^{n-1}\left(B_{i+1}^2+B_{i+1}B_i+B_i^2\right)\left(B_{i+1}-B_i\right)$$  From the third terms we get $\int_{0}^{t}B_s^2\text{d}B_s$. I could add and subtract $B_i$ to the $B_{i+1}$ to make appear sums like $\sum(B_{i+1}-B_i)^2$, which tend to the quadratic covariation ($=t$), but there remain still some sums, like $\sum (B_{i+1}-B_i)^3$ that I don't know how to handle.   Nevermind! I got the idea. I will keep the post so you can enjoy. I just looked again to the integral in the right-hand side and the $(t_{i+1}-t_i)$ that appear in the sums. Replaced them conveniently.

I am trying to solve the exercises from the book Stochastic differential equations -An Introduction with applications by Bernt Oksendal and I am stuck on 1 question.  Prove directly from the definition of Ito's integral that   $$\int_0^t B_s^2 dB_s=\frac{1}{3}B_t^3-\int_0^t B_s ds$$  I have tried for a couple of hours but I simply cannot prove it . I would be grateful if somebody could help me out , even a hint would be very helpful


Recently I encountered the phrase "If you know what is QQ then(...)". The writer wasn't a native English speaker(neither me).  First, I thought it should be "If you know what QQ is ...". But then, I thought about the phrase: "If you know what is right..." I think the latter implies that you already know what "true" is and you should find/select an object. Or is it related to the fact that "true" is an adjective? Or is it just wrong?  So, I'm very confused. Can you help me?  I tried to search for it, however searching for "what is" in search engines is really difficult! The nearest questions are  and , but I don't think it's a duplicate.  Thank you in advance.

We always change subject and verb positions in whenever we want to ask a question such as "What is your name?". But when it comes to statements like the following, which form is correct?        I don't understand what are you talking about.   I don't understand what you are talking about.      Another example        Do you know what time is it?   Do you know what time it is?      Another example        Do you care how do I feel about this?   Do you care how I feel about this?


So I have difficulty with the concept of *args and **kwargs.  So far I have learned that:   *args = list of arguments - as positional arguments **kwargs = dictionary - whose keys become separate keyword arguments and the values become values of these arguments.   I don't understand what programming task this would be helpful for.   Maybe:  I think to enter lists and dictionaries as arguments of a function AND at the same time as a wildcard, so I can pass ANY argument?  Is there a simple example to explain how *args and **kwargs are used?  Also the tutorial I found used just the "*" and a variable name.   Are *args and **kwargs just placeholders or do you use exactly *args and **kwargs in the code?

In the following method definitions, what does the * and ** do for param2?  def foo(param1, *param2): def bar(param1, **param2):


This is my general understanding on the affect of Multi-Col linearity on Linear and Logistic regression. However I am still not able to understand whether multi-col linearity is a problem in decision tree (Classification and regression).  Linear Regression - It has a huge impact as the co-efficient might vary drastically if there are 2 variables with high correlation. And regularisation would overcome this issue. Logistic Regression - Same as Linear regression.  Can anybody please give me some insight on how it affects in decision tree classifier and decision tree regressor. And how to overcome this problem if it affects.

Can anybody please explain the affect of multicollinearity on Decision Tree algorithms (Classification and regression). I have done some searching but was not able to find the right answer as some say it affects it and others say it doesn't.


import bpy print ("something")  When I run this script nothing happens, nothing appears. The only answers to where it prints I find are from 6 years ago. With 2.91 It's not in the Python Console output in the Scripting tab, so where does it display its print command? Using Windows.

I'm trying to debug a Python script by placing a print("foo=" + foo) statement in my code.  But where does the output appear?     It doesn't appear on the Python Console, and it doesn't appear on the area that appears when you drag the lower edge of the infobar downwards (what is the name for this area? My script errors show up in red here.)


We know light can't escape a black hole but...  Could light find itself in orbit around an object?  Say the light is on the cusp of an event horizon.  Could it end up in an orbit around the black hole if it was coming in from the perfect angle?

The photon sphere is a spherical region in space where photons are forced to travel in an orbit at $r = \frac{3GM}{c^{2}}$.   Is it possible to detect these spheres?  What happens if I fall through it? What happens to a photon that tangentially hits the event horizon, wouldn't this also lead to a photon orbiting the black hole? EDIT Since neutron stars also might have a , do we know neutron stars that should have such a sphere?


i was wondering what version of ubuntu should i install on my old netbook? should it be 12.04 LTS, 14.04 LTS, or 14.10?

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


I was going to install Ubuntu 14.04, so I tried creating two partitions from Windows 7. (I'm new to this partitioning thing.) Initially I had(rounded) C: 150 GB, D: 150 GB, E: 175 GB, 25 GB unallocated  I did this: Right click on unallocated storage (25 GB) -> New Simple Volume... -> Simple volume size in MB (2048 for swap and rest for root) -> Do not assign a drive letter -> Do not format this volume -> Finish  Now I cannot boot into Windows, It only shows a black screen and a cursor.  I booted up Ubuntu installer through pen drive  It shows(rounded)  Device          Type        Size        Used        System /dev/sda     /dev/sda1               1 MB        unknown     Windows7(loader)        (must be the MBR, I guess)     /dev/sda2   ntfs        104 MB      0 MB     /dev/sda3   ntfs        150 GB      94 MB     /dev/sda4   ntfs        340 GB      2517 MB                             (as if two drives are joined together.)   What do I do? I need to recover the Windows, its settings and all the programs installed.  My computer doesn't have CD drive, I can only use USB flash drive.

I have a computer that dual boots Windows 7 and Ubuntu through GRUB. Recently Windows failed to boot, and after trying various things to fix it, now when I choose Windows 7 in the GRUB menu, I get the message  error: no such device: 9A7AC1417AC11B41 error: hd2 cannot get C/H/S values Press any key to continue...   and when I press a key it brings me back to the GRUB menu. The message appears in the same style (colors and font) as the GRUB loader.  I have noticed that windows uses two partitions, one called RECOVERY (16 GB) and one called OS (517 GB) and that the GRUB loader points to RECOVERY but Windows is on the OS partition. I can mount both partitions in Linux and the OS disk seems to have the right files. I used the Windows 7 recovery disk and the automated repair thing no longer finds any errors.  How can I fix this an make Windows boot up again?  fdisk -l outputs  Disk /dev/mapper/isw_bdhfaghdfb_dell: 640.1 GB, 640141230080 bytes 255 heads, 63 sectors/track, 77826 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 131072 bytes / 262144 bytes Disk identifier: 0x2dbec2f5                            Device Boot      Start         End      Blocks   Id  System /dev/mapper/isw_bdhfaghdfb_dell1               1           5       40131   de  Dell Utility Partition 1 does not start on physical sector boundary. /dev/mapper/isw_bdhfaghdfb_dell2   *           6        1918    15360000    7  HPFS/NTFS Partition 2 does not start on physical sector boundary. /dev/mapper/isw_bdhfaghdfb_dell3            1918       64772   504878877+   7  HPFS/NTFS Partition 3 does not start on physical sector boundary. /dev/mapper/isw_bdhfaghdfb_dell4           64772       77827   104858625    5  Extended Partition 4 does not start on physical sector boundary. /dev/mapper/isw_bdhfaghdfb_dell5           77578       77827     2000128   82  Linux swap / Solaris /dev/mapper/isw_bdhfaghdfb_dell6           64772       67204    19531008   83  Linux /dev/mapper/isw_bdhfaghdfb_dell7           67204       74498    58593536   83  Linux /dev/mapper/isw_bdhfaghdfb_dell8           74498       77577    24731648   83  Linux


Hi I want to run windows 10 apps on my taskbar.But when I run the script that appraisal my computer, I get nothing from the command prompt script.  The script is   C:\Temp>REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFl ags\UpgradeExperienceIndicators" /v UpgEx   | findstr UpgEx  if "0" == "0" GOTO RunGWX  reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlag s\Appraiser" /v UtcOnetimeSend /t REG_DWORD /d 1 /f  schtasks /run /TN "\Microso ft\Windows\Application Experience\Microsoft Compatibility Appraiser"  :CompatChe ckRunning  schtasks /query /TN "\Microsoft\Windows\Application Experience\Micros oft Compatibility Appraiser"  schtasks /query /TN "\Microsoft\Windows\Applicatio n Experience\Microsoft Compatibility Appraiser"   | findstr Ready  if NOT "0" ==  "0" ping localhost   1>nul  & goto :CompatCheckRunning  :RunGWX  schtasks /run /TN "\Microsoft\Windows\Setup\gwx\refreshgwxconfig"   My Result is    FINDSTR: Cannot open if FINDSTR: Cannot open NOT FINDSTR: Cannot open 0 FINDSTR: Cannot open == FINDSTR: Cannot open if FINDSTR: Cannot open 0 FINDSTR: Cannot open 0 FINDSTR: Cannot open ping FINDSTR: Cannot open == FINDSTR: Cannot open localhost FINDSTR: Cannot open 0 FINDSTR: Cannot open GOTO FINDSTR: Cannot open RunGWX FINDSTR: Cannot open reg FINDSTR: Cannot open add FINDSTR: Cannot open HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompat Flags\Appraiser FINDSTR: Cannot open /v FINDSTR: Cannot open UtcOnetimeSend FINDSTR: Cannot open /t FINDSTR: Cannot open REG_DWORD FINDSTR: Cannot open /d FINDSTR: Cannot open 1 FINDSTR: Cannot open /f FINDSTR: Cannot open schtasks FINDSTR: Cannot open /run FINDSTR: Cannot open /TN FINDSTR: Cannot open \Microsoft\Windows\Application Experience\Microsoft Compati bility Appraiser FINDSTR: Cannot open :CompatCheckRunning FINDSTR: Cannot open schtasks FINDSTR: Cannot open /query FINDSTR: Cannot open /TN FINDSTR: Cannot open \Microsoft\Windows\Application Experience\Microsoft Compati bility Appraiser FINDSTR: Cannot open schtasks FINDSTR: Cannot open /query FINDSTR: Cannot open /TN FINDSTR: Cannot open \Microsoft\Windows\Application Experience\Microsoft Compati bility Appraiser The system cannot find the batch label specified - CompatCheckRunning   Can Someone explain it to me?

I want to get Windows 10, but I do not see this icon in the notification area (tray):    How do I get the icon to get Windows 10?


Following Setup:    (As soon as you earn 10 reputation on the site, you'll be able to embed images)  I'd like to add up all the same numbers in the second column, but i don't get it how to do so. Output should look like the following:  +------------+------------+ | 00000030   | 106        | | 00000001   | 106,107,125| | 00000002   | 103        | | 00000002   | 103        |  and so on .... +------------+------------+   Is that even possible with simple SQL or do i have to use an sql cursor?

Consider a database table holding names, with three rows:  Peter Paul Mary   Is there an easy way to turn this into a single string of Peter, Paul, Mary?


Is there an easy way to get the BBOX of the currently selected vector features in QGIS?  I've seen  but it does not solve the problem if multiple features are selected.  I'm asking if QGIS has an out-of-the-box feature to do this. I don't want to use the Python console, and I don't want to create a new layer just to get this information.  If it is not possible I'll just open a feature request.

I just manually (and somewhat inaccurately I'm sure) retrieved the bounding box coordinates for a county polygon, which is a selection from a larger layer of county shapes. I'd like to be able to use a QGIS plugin or other function to calculate this quickly and not-by-hand. This is almost certainly possible but I couldn't find anything with a Google search


I've got this message from my friend: "I'll be pretty busy basically up until the 8th November." In this case, which is correct, he will be pretty busy including 8th or he will not be pretty busy from 8th anymore?

What does until mean in the following?     You need to deliver this product within 2 days (until August 18, 2011)   to meet your deadline and get paid.   Does this mean that I have to deliver the product by 23:59 on 17 August 2011 or 23:59 on 18 August 2011? The order time is 21:04 on August 16 2011.


Below is the code tried,  @wire(getObjectDetails)     wiredResult(data,error) {          if(data){             console.log('DateOfRun-->',data);             this.lstRecs=data;             console.log('values len-->',this.lstRecs);             console.log('values -->',this.lstRecs.values);         } else if(error){             console.log('error -->'+error);            }     }    I am getting data as [object Object],But would like to fetch the values of a record.  i tried below:   @wire(getObjectDetails)     wiredResult(data,error) {          if(data){             console.log('DateOfRun-->',data);//[object object]             this.lstRecs=data;             console.log('values len-->',JSON.stringify(data));//Getting json value             this.strtest=JSON.stringify(data);             console.log('data=='+this.strtest.data);//undefined          } else if(error){             console.log('error -->'+error);            }     }

I did not find much info on the "response.getReturnValue" function and what it exactly returns. I understand that this is the function that must be used when a Client Side JS controller calls a Server Side action. The returned value must therefore be whatever the server returned.  My question: Is it a JSON? How can I inspect what is there inside, from the Web console?  So far I have been unsuccessful in doing so.  This is my Apex Controller:  public class CurrencyController { @AuraEnabled public static List<CurrencyType> getCurrencies() {     return [SELECT Id, IsoCode, LastModifiedDate FROM CurrencyType ORDER BY createdDate ASC]; } }   This is my JS Controller  ({   doInit: function(component, event, helper) {         var action = component.get('c.getCurrencies');  // Set up the callback var self = this; action.setCallback(this, function(actionResult) {  component.set('v.currencies', actionResult.getReturnValue());     console.log('currency data is:' + actionResult.getReturnValue()); }); $A.enqueueAction(action); } })   But what is logged is this:  currency data is:[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]  There are 34 Currency items in DB and there are understandably 34 items in this array. But what is there inside these objects? Why is there just two [object Object] when I am picking up 3 fields? I tried changing the number of fields and the log never changes.  I understand this is an extremely foolish question but I just am not able to get it. Please excuse my lack of lightning and Javascript knowledge.  Any insight is much appreciated.


I did sudo. What else needs to happen? $ sudo convert 386-x.png 386-x.pdf [sudo] password:  convert-im6.q16: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/408.

I have multiple *.jpeg pictures I like to merge into a single *.pdf file like so:  convert Blatt1.jpg Blatt2.jpg Blatt3.jpg Blatt4.jpg out.pdf   I am prompted with the following exception:  convert: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/408   What causes this problem and how can I fix it? I did some research but couldn't find anything about this particular problem.


What I want to do: I have a list now and want to add it to the bottom of the existing text file. However, when the new line is added, the commas doesn't appear  What I have done so far: Current txt file:  food,bought oranges,yes strawberry,no   my code  choice=input("What fruit?") item=[] item.append(choice) item.append("No")  with open('groceries.txt', 'a+') as file:     file.writelines(item)   result of my code  food,bought oranges,yes strawberry,no applesno   I want it to appear like this:  food,bought oranges,yes strawberry,no apples,no   I tried to add the comma eg. item.append(choice+",") but it will change the result when i use index later on Any way to solve this?

What would be your preferred way to concatenate strings from a sequence such that between every two consecutive pairs a comma is added. That is, how do you map, for instance, ['a', 'b', 'c'] to 'a,b,c'? (The cases ['s'] and [] should be mapped to 's' and '', respectively.)  I usually end up using something like ''.join(map(lambda x: x+',',l))[:-1], but also feeling somewhat unsatisfied.


I am passing some arguments to a PHP file from bash. Current code is working fine: foreach($argv as $value) { $a= $a . "\n" . $value; }  However I am looking for a way to start the foreach from the 3rd item of the array (which is variable so I don't know how many arguments the script will receive). Any ideas on how I can skip the first 3 elements? Thanks!

I have the following code:  if ($_POST['submit'] == "Next") {     foreach($_POST['info'] as $key => $value) {         echo $value;     } }   How do I get the foreach function to start from the 2nd key in the array?


I am trying to show a .csv file (2 columns, 291 rows) in ArcMap 10.2 using Catalog window to drag the .csv file into ArcMap.  The second column of the .csv is a floating point number (range is [0-1]), however ArcGIS is treating that column as an int.  That is: I can view the column as numeric with decimal places in Excel, text editor, etc., but when I open the table in ArcMap the column is reduced to 0, 1 or null.  All non integers are replaced to null.    How to I ensure that ArcMap 10.2 reads the column as a float?  I have tried the following, but none have worked:   Re-ordering the observations so that observations with decimals are in the first eight rows (since I believe Arc looks at the first eight rows to determine data type). Editing the scheme.ini file to indicate column 2 has the datatype float.  (But I may not be doing this correctly.) Saving the .csv file with an alternative delimiter.  Changing the column in Excel from numeric to text.     It's not possible to change the field from int to float as implied by this question/answer thread:  question/answer  Adding a text "dummy" in the first 8 lines (also suggested by  question/answer) that is text (to try to force the field into text so that I can convert to float in Arc) also did not work.

How do I prepare CSV files for use in ArcGIS Desktop.   I ask because I have some troubles using CSV files because ArcGIS attributes wrong field types to my columns and also misinterprets special characters such as á or ê.   I have read in the Esri forum that there is a so-called schema.ini file that defines somehow the field types e.g "Col22=V002 Text" see here   That's kind of funny because I have often seen these .ini files on my disc but never actually wondered what they are good for. It is kind of weird that Excel stores such metadata in an extra file since other programs like R don't do so.   I already tried to manipulate this .ini file with little success since I didn't find out how to apply for example "string" type. There are some information on MS sites, see here:  but I couldn't find a solution.  Also I didn't really like the idea to work with this .ini file because it is quite a bunch of work to define and type all the fieldnames when I have let's say 50 columns. And these .ini files might get lost, etc.


I am trying to create a program to find the distance between two user inputted cities in java.  I've looked at a few other posts, and I've seen the Geocoder API recommended, to get the lat and lang values for the cities. However, I've only just started learning Java, and all those solutions were slightly complicated. Is there an easier method, or will I have to go about understanding API's?

How do I calculate the distance between two points specified by latitude and longitude?  For clarification, I'd like the distance in kilometers; the points use the WGS84 system and I'd like to understand the relative accuracies of the approaches available.


I just saw someone prove the equivalence for a commutative ring $R$:  (1) $R$ is Noetherian;  (2) Every ideal of $R$ is finitely generated;  (3) Every non-empty set of ideals of $R$ has a maximal element.  For $(2) \Rightarrow (3)$, he used the axiom of choice (although Zorn's Lemma would have been more direct). Suppose I would only want to prove $(1) \iff (2)$, could there exists a proof without AC, or is that impossible since (1), (2), (3) are in fact equivalent?  (I have already proven $(2) \Rightarrow (1)$, so in fact my question pertains to $(1) \Rightarrow (2)$.)

More specifically, I just want to prove that in a Noetherian (even Dedekind) ring, every ideal in contained in a maximal ideal. Is the axiom oh choice needed here? The usual proofs (for general rings use Zorn's lemma; for Noetherian rings one can build an infinite ascending chain if there is no maximal element) seem to rely on it.  If the axiom of dependent choice can be avoided as well, even better.


How can I make programs open in the foreground? Nautilus will open in the background, Remmina (the remote desktop program) also opens in the background. I have to click on the icon in the Launcher for it to come to the foreground. I would think any program that is invoked by any means would come to front, as it opens. It seems if one program invokes another, it will be in the background. If I click on any icons in the Launcher though, it will actually open in the foreground.

Let's say I have Gthumb open, and then launch Nautilus from the Unity launcher (in 12.04). Why does it sometimes not focus the mouse on Nautilus, which I just launched? Instead, the focus remains on Gthumb while Nautilus opens in front of Gthumb (and not being focused on).  Is this correct behaviour?


I have been struggling with shared preferences and looked at posts and tutorials and can't get it to work.  I finally copied this code from android.dev and it won't work for me either. The only change I made was 1. extends AppCompatActivity rather than Activity. 2. add the printlns and 3. the parms to getSharedPreferences.  It fails with NPE in onPause() on the SharedPreferences.Editor. I don't find any exceptions in onStart().  Can someone please tell me what I am missing? Thank you in advance!  public class MainActivity extends AppCompatActivity {     static final int DAY_VIEW_MODE = 0;     static final int WEEK_VIEW_MODE = 1;      private SharedPreferences mPrefs;     private int mCurViewMode;      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);          System.out.println("onCreate() ");         SharedPreferences mPrefs = getSharedPreferences("MyPrefFile", 0);         mCurViewMode = mPrefs.getInt("view_mode", DAY_VIEW_MODE);     }      protected void onPause() {         super.onPause();          System.out.println("onPause() ");         SharedPreferences.Editor ed = mPrefs.edit();         ed.putInt("view_mode", mCurViewMode);         ed.commit();     } }   Here is the logcat, is that the error log you requested? Sorry, I am pretty new to this. (ug...  is there a better way to share this?)   java.lang.RuntimeException: Unable to pause activity {temperatureconverter.android.vogella.com.prefsfromandroiddev/temperatureconverter.android.vogella.com.prefsfromandroiddev.MainActivity}: java.lang.NullPointerException   at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2902)   at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2858)   at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:2836)   at android.app.ActivityThread.access$900(ActivityThread.java:140)   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1254)   at android.os.Handler.dispatchMessage(Handler.java:99)   at android.os.Looper.loop(Looper.java:137)   at android.app.ActivityThread.main(ActivityThread.java:4921)   at java.lang.reflect.Method.invokeNative(Native Method)   at java.lang.reflect.Method.invoke(Method.java:511)   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)   at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException   at temperatureconverter.android.vogella.com.prefsfromandroiddev.MainActivity.onPause(MainActivity.java:38)   at android.app.Activity.performPause(Activity.java:5286)   at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1240)   at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2889)   at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2858)    at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:2836)    at android.app.ActivityThread.access$900(ActivityThread.java:140)    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1254)    at android.os.Handler.dispatchMessage(Handler.java:99)    at android.os.Looper.loop(Looper.java:137)    at android.app.ActivityThread.main(ActivityThread.java:4921)    at java.lang.reflect.Method.invokeNative(Native Method)    at java.lang.reflect.Method.invoke(Method.java:511)    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)    at dalvik.system.NativeStart.main(Native Method)

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


What is a good (preferably free) source(s) for learning photoshop? I would prefer a source you actually used to learn Photoshop basics from ground zero.  I want to use Photoshop mainly for web design, logo design, and other software design purposes.

I'm very interested in learning web development and have learned some basics regarding HTML and CSS a few years back from W3Schools, but I never learned how to develop websites that are up to today's standards, i.e. free-flowing sites without the use of tables to govern the design of the site.  What are some good resources that I can start with?


A→B is equivalent to ¬B→¬A This comes from a member called 6005 as an answer to my question:  Any proof or reference for this rule ?

I have a mathematical proposition of the form "If $A$, then $B$". I'm thinking about this problem from several different perspectives, so I will segment these different perspectives into separate paragraphs as follows.   If I have a statement $A \implies B$ that is true by definition (no proof provided), is it then correct to say that the contrapositive statement $\neg B \implies \neg A$ (NOT $B \implies$ NOT $A$) must also be true, without providing any proof?  In other words, if $A \implies B$ that is true by definition, then does this imply that the contrapositive statement $\neg B \implies \neg A$ is also true by definition? Trying to think of this from the perspective of logic notation and truth tables, would it be correct to write that $(A \implies B) \implies (\neg B \implies \neg A)$? This way, since we know that $A \implies B$ is true, we must logically have (according to truth tables) that $\neg B \implies \neg A$ is also true, right?   I would greatly appreciate it if people would please take the time to clarify this.


In Fantastic Beasts And Where To Find Them, we see Newt traveling across the Atlantic by muggle steamship. Isn't there some way for wizards to teleport that distance, or for some entrepreneurial wizard to set up an airline?  Edit:  If so, why wouldn't Newt have used it? Why would he still go by muggle steamer?

Is Apparation limited at all by distance?  It seems to me that in the books no one Apparates further than length (or width) of the United Kingdom. Are there any instances where they travel further than that? If you knew the place could you Apparate to the other side of the planet, or to the moon?


Someone at my company created a regex string that is working as intended but I want to do similar things in the future and don't understand the mechanics of it.   import re  config = """ interface Ethernet1/2  description Management  ip address 192.168.1.190 255.255.255.0  ip pim sparse-dense-mode ! interface Ethernet1/3  description to-IntDMVPN  ip address 10.0.0.93 255.255.255.252  ip pim sparse-dense-mode ! router eigrp 1  network 172.16.0.0 0.0.0.255  redistribute ospf 1 metric 1 1 1 1 1 ! """  intf_obj_list = re.compile(r'^interface\s*(\S+)(.+?)(?:^\S+|\Z)', re.S|re.M).findall(config)  print(str(intf_obj_list))   I understand up to ^interface\s*(\S+) which matches the router interfaces but adding the (.+?) also matches the /n on the first line of each interface config even though the dot is supposed to match any character but the newline.  Now (?:^\S+|\Z) adds matching of the body of the configuration under the interface and I don't understand that section at all.  From what I could find ?: is another way to configure backreferencing which after a fair amount of googling, I'm still not clear on and I'm not sure what the ^\S+|\Z within it are accomplishing.  Finally, the re.S I think allows it to continue to run through the body while encountering newlines and re.M allows it to run through multiple lines. If anyone can help me to break down what's happening here I would greatly appreciate it.  Thanks

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


I've learned about the getter and setter topic and i couldn't understand the new type of this topic :  Let's say someone is declaring a new get&set method :  public int Id { get; set; };   What i want to know is what is the differences between doing what i wrote below and a regular public variable (public int id).  Comments are welcome.

I see a lot of example code for C# classes that does this:  public class Point {     public int x { get; set; }     public int y { get; set; } }   Or, in older code, the same with an explicit private backing value and without the new auto-implemented properties:  public class Point {     private int _x;     private int _y;      public int x {         get { return _x; }         set { _x = value; }     }      public int y {         get { return _y; }         set { _y = value; }     } }   My question is why. Is there any functional difference between doing the above and just making these members public fields, like below?  public class Point {     public int x;     public int y; }   To be clear, I understand the value of getters and setters when you need to do some translation of the underlying data. But in cases where you're just passing the values through, it seems needlessly verbose.


I have one library, one txt file for import some things with it and one output file to show the result. Only have one java file without any interface. With eclipse all is running well - I am writing into the input file and then it shows the result into the output file. Now I want to make this all independent program (without need to run with eclipse).  How to make it?

If I have a Java source file (*.java) or a class file (*.class), how can I convert it to a .exe file?  I also need an installer for my program.


I trying to understand working of LSTM So I'm doing simple code to simulate its action. x=[[i for i in range(j,j+5)] for j in range(1000)] x=np.array(x) x=x.reshape((1000,5,1)) y=[i+5 for i in range(1000)] y=np.array(y) y=y.reshape((1000,1,1))  Where x is timeseries like [0,1,2,3,4],[1,2,3,4,5]... so on. Where y is like 5,6... so on. My Model is model=keras.Sequential() model.add(keras.layers.LSTM(1)) model.compile(loss="mean_absolute_error",optimizer="adam") model.fit(x,y,epochs=500)  Now starting error very large like in 500s and it decreases very slow. Is it normal?

I am trying to predict the outcome of a complex system using neural networks (ANN's). The outcome (dependent) values range between 0 and 10,000. The different input variables have different ranges. All the variables have roughly normal distributions.   I consider different options to scale the data before training. One option is to scale the input (independent) and output (dependent) variables to [0, 1] by  using the mean and standard deviation values of each variable, independently. The problem with this method is that if I use the sigmoid activation function at the output, I will very likely miss extreme data, especially those not seen in the training set  Another option is to use a z-score. In that case I don't have the extreme data problem; however, I'm limited to a linear activation function at the output.   What are other accepted normalization techniques that are in use with ANN's? I tried to look for reviews on this topic, but failed to find anything useful.


When i use the XY pack for LaTeX by adding the following line to my source:  \usepackage[all]{xy}   i get this error:  ! No room for a new \dimen . \ch@ck ...\else \errmessage {No room for a new #3} \fi l.192 \xynew@{dimen}\Y@min This error message was generated by an \errmessage command, so I can't give any explicit help. Pretend that you're Hercule Poirot: Examine all clues, and deduce the truth by order and method. \Y@min=\dimen234   I have still missing packages?

I have this error message:  ! No room for a new \dimen . \ch@ck ...\else \errmessage {No room for a new #3}                                                 \fi   which I can not find a cure for.


I have a double (call it x), meant to be 55 but in actuality stored as 54.999999999999943157 which I just realised.  So when I do   double x = 54.999999999999943157; int y = (int) x;   y = 54 instead of 55!  This puzzled me for a long time. How do I get it to correctly round?

I need a simple floating point rounding function, thus:   double round(double);  round(0.1) = 0 round(-0.1) = 0 round(-0.9) = -1   I can find ceil() and floor() in the math.h - but not round().  Is it present in the standard C++ library under another name, or is it missing??


I have a html code

I'm working Child 1

I'm working Child 2

I'm working Child 3

I'm working Child 111

    now I want to show Child111 before Child2 but after Child1 via CSS

Given a template where the HTML cannot be modified because of other requirements, how is it possible to display (rearrange) a div above another div when they are not in that order in the HTML? Both divs contain data that varies in height and width.

         Content to be below in this situation

         Content to be above in this situation

 Other elements   Hopefully it is obvious that the desired result is:  Content to be above in this situation Content to be below in this situation Other elements   When the dimensions are fixed it easy to position them where needed, but I need some ideas for when the content is variable. For the sake of this scenario, please just consider the width to be 100% on both.  I am specifically looking for a CSS-only solution (and it will probably have to be met with other solutions if that doesn't pan out).   There are other elements following this. A good suggestion was mentioned given the limited scenario I demonstrated—given that it might be the best answer, but I am looking to also make sure elements following this aren't impacted.


I have been self-learning Java. I understand the scope of defining a class, but still didn't get the concept of an empty constructor usage. Usually we should pass parameters for constructor to build instance object. But, I often see empty parameter for constructor. For example:    class Person {    String name;        int age;    public Person();   public Person(String name, int age){      this.name = name;      this.age = age;      }   }   I researched and read an example that using a class "fish" to explain. So, this is what I understood so far: when defining a class, we first define properties for an object, then we create a constructor that will build the object with methods. Empty constructor build GENERIC object, and constructor with parameters build objects with more specific information. Let’s say the example above, if I create an instance object using the empty constructor:   Person p1 = new Person();     -- it will still create an object but without any properties in it?  So, what exactly the empty constructor is used for? I saw it in a lot of example codes. Is it very useful/common?  Thanks for looking and answering!

I was reading some Java recently and came across something (an idiom?) new to me: in the program, classes with multiple constructors would also always include a blank constructor. For example:   public class Genotype {   private boolean bits[];   private int rating;   private int length;   private Random random;    public Genotype() {              //  <= THIS is the bandit, this one right here     random = new Random();   }    /* creates a Random genetoype */   public Genotype(int length, Random r) {     random = r;     this.length = length;     bits = new boolean[length];      for(int i=0;i<length;i++) {         bits[i] =random.nextBoolean();     }   }    /* copy constructor */   public Genotype(Genotype g,Random r) {     random = r;     bits = new boolean[g.length];     rating = g.rating;     length = g.length;      for(int i=0;i<length;i++) {         bits[i] = g.bits[i];     }    } }   The first constructor doesn't seem to be a "real" constructor, it seems as though in every case one of the other constructors will be used. So why is that constructor defined at all?


I'm unable to create an account named 'con' in Windows 7. I can create the account but each time I login, I see a notification that I'm working under a temporary profile and my files are wiped off after logging off. Any Advice/Suggestions on How to Fix?   post gave me a hint but is not focused on user accounts but files and folders.

In all versions of Windows, we are unable to rename a file or a folder name as CON without third-party file renaming software. Trying to do this in Windows 7 results in an error:     The specified device name is invalid.   Trying to save a file as con.txt in Notepad leads to a similar error:     This file name is reserved for use by Windows.   Choose another name and try again.   Why can't we name a file or folder CON in Windows?


Slides are not breaking on beamer references.  \documentclass{beamer} \usetheme[compress]{Berlin}  \usepackage{filecontents} \begin{filecontents}{\jobname.bib}  @article{Author1, author = {Authorr1}, journal = {Journall - 1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}, pages = {1--2}, publisher = {Publisherr - 1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}, title = {{titlee - 1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}}, volume = {1}, year = {2017} }  @article{Author2, author = {Authorr2}, journal = {Journall - 2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}, pages = {1--2}, publisher = {Publisherr - 2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}, title = {{titlee - 2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}}, volume = {1}, year = {2017} }  @article{Author3, author = {Authorr3}, journal = {Journall - 3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}, pages = {1--2}, publisher = {Publisherr - 3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}, title = {{titlee - 3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}}, volume = {1}, year = {2017} }  @article{Author4, author = {Authorr4}, journal = {Journall - 4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}, pages = {1--2}, publisher = {Publisherr - 4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}, title = {{titlee - 4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}}, volume = {1}, year = {2017} }  @article{Author5, author = {Authorr5}, journal = {Journall - 5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}, pages = {1--2}, publisher = {Publisherr - 5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}, title = {{titlee - 5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}}, volume = {1}, year = {2017} }  \end{filecontents}  \usepackage[backend=bibtex,style=authoryear]{biblatex} \addbibresource{\jobname.bib}  \begin{document}  \section{References} \begin{frame} \cite{Author1}  \cite{Author2}  \cite{Author3}  \cite{Author4}  \cite{Author5} \end{frame}  \section{References}  \begin{frame}[label=ncurrent,allowframebreaks]{\secname}%WORKAROUND REMOVES HERE \printbibliography[heading=none] \end{frame}%WORKAROUND ALSO REMOVES HERE  \end{document}     The workaround I got is to remove \begin{frame} \end{frame} that surrounds \printbibliography, but then I lose the section title.

When compiling with the parameter label as in the MWE, allowframebreaks doesn't work. Why not?  Is there any difference between setting a frame title as a frame argument and by using \frametitle?  \documentclass{beamer} \usetheme{Warsaw} \usepackage{blindtext} \begin{document}  \begin{frame}[allowframebreaks,label=frame1]{Title} %\frametitle{Title} \framesubtitle{Sub-title} \blindtext Text........ Text........ Text........ Text........ Text........ Text........ Text........ Text........ Text........ Text........ Text........ Text........ Text........ Text........ Text........  Text........ Text........ Text........ Text........ Text........  \end{frame}  \end{document}


I'm probably just an idiot, but I'm trying to create a new profile for 1.6.2 to use with single player commmands/worldedit, and I can't get the new modded version to show up in the launcher.  What the other threads about this similar issue all said was to make sure everything (the folder, the .jar, the .json, and the id in the .json) had the same name, but mine all do, so I'm not sure what I'm doing wrong.

I've recently changed to the new Minecraft launcher, and I have noticed a change in the .minecraft folder layout. I can no longer install mods just by copying it over into the versions/1.6.1 jar file, as this file refreshes every time it is launched.  For those who don't know what I am talking about, here is the new layout:    I am specifically trying to install Optifine, which does work with 1.6.1. Where do I drag in the mod files now? I can't seem to find a jar file that is suited to it, except in the version folder, but as I stated above, this refreshes every time.  After copying a recent version and renaming it in the version folder, I get this error in the development console:   Unexpected exception refreshing version list java.lang.IllegalArgumentException: Version '1.6.1' is already tracked     at net.minecraft.launcher.updater.VersionList.addVersion(VersionList.java:91)     at net.minecraft.launcher.updater.LocalVersionList.refreshVersions(LocalVersionList.java:44)     at net.minecraft.launcher.updater.VersionManager.refreshVersions(VersionManager.java:47)     at net.minecraft.launcher.Launcher$2.run(Launcher.java:164)     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)     at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)     at java.util.concurrent.FutureTask.run(Unknown Source)     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)     at java.lang.Thread.run(Unknown Source)


Given a shell script file that begins as  #!/bin/bash  # (bash script here),   and has been chmod +xed, is there any difference in running ./script and bash script from the command-line?

There are several ways to execute a script. The ones I know are: /path/to/script # using the path (absolute or relative) . script        # using the . (dot) source script   # using the `source` command  Are there any other way? What are the differences between them? Are there situations that I must use one and not another?


I have the following piece of code that acts as a dictionary:  #Dictionary of expressions plot colors: def ExpressionColor(x):     return {         0:'white',         1:'green',         2:'yellow',         3:'blue',         4:'magenta',         5:'cyan',     }[x]   Calling  ExpressionColor(3) will return 'blue'... Is this a known dictionary definition method?

I want to write a function in Python that returns different fixed values based on the value of an input index.    In other languages I would use a switch or case statement, but Python does not appear to have a switch statement.  What are the recommended Python solutions in this scenario?


Is the function $f(x)=x^{\gamma+1}$, where  $x>0 $ and $\gamma<0$ Lipschitz continuous ? I am a bit confused !

Is the function $f(x)=|x|^{1/2}$ Lipschitz continuous near $0$? If yes, find a constant for some interval containing $0$.   I think the answer is yes since I can find $L=1$ that satisfies Lipschitz continuity criteria in a interval close to $0$, am I right?


How does photoelectric experiment prove the particle aspect of light in opposed to be solely wave-like?

I am able to understand how light can be modeled to have wave characteristics from Young's double slit experiment.  But I am unable to comprehend how we can understand light to have particle characteristics from the photoelectric experiment. How is it wave character not able to explain the phenomena observed in this experiment? And how is it that particle nature defeats the wave theory?


This is embarrassing, but after many years of using POSIX systems full time, I still have a hard time figuring out if a shell customization should go in .bashrc, .profile, or somewhere else. Not to mention some of the OS-specific config files like .pam_environment.  Yes, I know how to puzzle through the documentation and learn when each file is or isn't loaded. What I'm wondering is if anyone has every put together comprehensive guidelines for how to decide which file to put a given type of customization in.

What's the difference between .bashrc and .bash_profile and which one should I use?


I am trying to find an explanation for behavior with - what I expected to be - a reference type but actually loses reference once supplied as an argument. Any changed made on the property are not reflected on the original object. When I provide the full object, and make changes it gets noticed by the proxy. When I provide the property and make changes it doesn't get noticed. I've done my fair share of javascript code but this one is pretty confusing. Normally I have to really do a JSON.parse((JSON.stringify(foo)) to make a deep copy and really get rid of any reference but this time I really only wanted to provide the property to the object as an argument and avoid sharing the entire object as an argument. I have build a test case that shows exactly what is happening. <html> <head><title></title></head> <body>  <script> var state = {}; state.Foo = 'default value for Foo';  function TwoWayBinding(state) {     this.state = this.WrapWithProxy(state); } TwoWayBinding.prototype.WrapWithProxy = function (state) {     const handler = {         get: function(target, prop) {             return target[prop];         },         set: function(target, prop, value) {                  console.log(prop,value);                     target[prop] = value;              return true;         }     };     return new Proxy(state, handler); }; var twoWayBinding = new TwoWayBinding(state); state = twoWayBinding.state;   function Test(fooProperty,fullState){     fooProperty = "changed value A, check console"; // fails     fullState.Foo = "changed value B, check console"; // works          // additional tests     this.state = fullState;     this.test = this.state.Foo; // breaks reference     this.state.Foo = 'changed value C, check console'; // works     this.test.Foo = 'changed value D, check console'; // fails }  new Test(state.Foo,state);  </script> </body>

The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?


There is a cow and two sheep.   The sentence above has caused me some problems. I’ve studied all Murphy’s Grammar books, but couldn’t find a particular rule or exception for this case. My teacher corrected «is» to «are» saying that after a singular noun (a cow) there is a plural “two sheep”. Is there a rule for such a situation? Thanks in advance.

It seems I put a   Bounty assigned by outside party, two lengthy, reference-citing answers, one "-1" (awarded the bounty), one "-2", two others scored "0" and "-2" respectively, the answers suggesting one or the other is correct, 73 comments and no consensus so far - and me, as the asker, lost without a clue what to think of the answers anymore -  this is no longer "Learners' Level" question, so I thought I'd bring it here and hear what the experts have to say.    Original question:  Plurality of verb depending on plurality of list elements  An edit was suggested to my sentence.     There was were an orange, some grapes, two apples and a small pile of cherries on the plate.   In my native language plurality of the verb always follows plurality of the first element on the list. There were an orange,... sounds awkward to me, no matter what follows up. My simple solution was reordering:     There were some grapes, an orange, two apples and a small pile of cherries on the plate.   But that's not the first time I faced this situation and I'd like to know what the rules of grammar say about that - was my editor overzealous or am I trying to copy rules of my language that don't apply in English?    Someone linked a  for negatives, where the situation is more clear-cut ("There is no..."). Same applies to connection with "or" apparently, per accepted answer there. Still, nothing for "and".  It seems there is a consensus that in that if the verb goes after the list, it will be plural.     an orange, some grapes, two apples and a small pile of cherries were on the plate.   There doesn't seem to be clear consensus for:     On the plate { was | were } an orange, some grapes, two apples and a small pile of cherries   Adding more to the confusion is the abbreviated form: "There's"     One last note. In North America, at least, there is a widespread use of using a singular form like "there is" and "there was", without regard for the subject item or items, and this "there is" is often shortened to "there's":           There's three apples on the table!      Could you please clarify this mess?


This is view file script code function  function getState(val) {    $.ajax({     url: "{{ URL::to('admin/state_change') }}" + "/" + val, //url route      controller in route.php     type: "GET",     dataType: "json",     success: function (data) {       var lid = data.lawid;             //getting value from controller       var scn = data.sortname;          //getting value from controller       var finlawid = 'L'+scn+'C'+lid;   //concatinating       $("#lm_id").val(finlawid);        // Lm_id is textbox id     }   }); }   I want to access the lid an scn variable in below function which present in same file  function getStatename(val) {   if (val >= 0) {     // access lid and scn to concatinat more characters and assigned it to lm_id textbox   } }

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


proof that if a repunit number is prime n has to be prime So a repunit number is a number that it's all digits are 1. For example $R_{2} = 11$ $R_{7} = 1111111$ and so on. Repunit numbers can be represented as $\frac{10^{n} -1}{9}$ in general. Problem is asking if $\frac{10^{n} -1}{9}$ is prime then $n$ has to be prime. İts easy to see for $n=3k \:\:(k \in \mathbb{Z})$ it is divisible by $3$ and for $n=2m \:\:(m \in \mathbb{Z})$ it is divisible by $11$ But ı stumbled upon how to prove that $n$ is prime

Repunit primes are primes of the form $\frac{10^n - 1}{9} = 1111\dots11 \space (n-1 \space ones)$. Each repunit prime is denoted by $R_i$, where $i$ is the number of consecutive $1$s it has.   So far, very few of these have been found: $R_2, R_{19}, R_{23}, R_{317}, R_{1031}, R_{49081}, R_{86453}, R_{109297}, R_{270343}$.  One thing to observe in all of these is that all of these have a prime subscript. Is this a prerequisite for all repunit primes. Does each repunit prime written as $R_p$ have to have $p$ as prime?   I tried my hand at this: A repunit prime $R_i$, can be written as $10^{i-1} + 10^{i-2} \dots + 10^{2} + 10 + 1$. We are required to prove that if $i$ is composite then $R_i$ is composite. Clearly, if $i$ is even, then $R_i$ is divisible by $11$. $3|i$, then $3|R_i$.   So, $i$ has to be of the form $6n \pm 1$. I could not put any more constraints of this. Is there an elementary proof for this?


I'm building a computer mainly for gaming and developing games.  It's going to be a three screen system with two GeForce GTX 460's and a quad-core i7.  The newegg wattage calculator says I need around 900W.  The case I intend to get is .  Full specs if you need 'em are at the end of this post.  I have no intentions to overclock the system at the moment, but this may change in the future.  I've done a lot of research on the subject, and the answers I've found indicate that it takes a heck of a lot of power to require liquid cooling, and most non-overclocked systems don't need it.  But I haven't seen a question about a system with two GPU's, so I ask you the following two questions:  Assuming that the system is used for gaming for very extended periods of time (say 4-6 hours at a time, nonstop) with all three screens running at full 1080p, would the fans installed in the system suffice?  Or would I need more fans and/or liquid cooling?  If the system is used under the same circumstances as above, and is overclocked to a reasonable level, would the fans installed in the system suffice?  Or would I need more fans and/or liquid cooling?  Specs:     Intel Core i7 16GB DDR3 Two nVIDIA GeForce GTX 460 3TB HDD Two DVD-RW writers Thermaltake 1050W power supply Case is linked above

I'm planning on building a system for high CPU and memory performance.  Graphics performance is not a major concern, as I do not plan to use it for gaming.  I noticed that liquid cooling seems to have become common since my last build, and I am wondering if it is needed in my case.  I do not plan to overclock any of the components.  The intended use for the system is primarily development and occasional compute-intensive tasks that will run on all cores continuously for several days to a week.  The system will not normally be in continuous usage like this, but it needs to be capable of occasional extended periods of continuous use at full capacity.  I have included the main components below.  CPU: i7-5960X  Memory: 64GB DDR4  Graphics card: Nvidia GeForce GT 730 2GB  Drive 1: 1TB SSD  Drive 2: 4TB 7200RPM HDD  Power supply: 700W  Is liquid cooling needed for the above build?  If not, is there any advantage in using it?  I have read reviews that mentioned liquid cooling unit failures that resulted in leaks, so I would rather not use it if it is not necessary.  Thanks!


I just made pushed a commit, then realized I needed to change the commit message.   So on my local repo I did:  git commit --amend -m "New commit message"   But when I then tried to push this, I got loads of error messages saying  Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Merge the remote changes (e.g. 'git pull') and try again   Was this the wrong way to amend my message? In the end I ended up having to reset all my repos and then do the commits again with a fresh message.  So my question is, what is the proper way to amend the commit message of something that has already been pushed?

When I've worked a bit with my source code, I did my usual thing commit and then I pushed to a remote repository. But then I noticed I forgot to organize my imports in the source code. So I do the amend command to replace the previous commit:  > git commit --amend   Unfortunately the commit can't be pushed back to the repository. It is rejected like this:  > git push origin To //my.remote.repo.com/stuff.git/  ! [rejected]        master -> master (non-fast forward) error: failed to push some refs to '//my.remote.repo.com/stuff.git/'   What should I do? (I can access the remote repository.)


I've seen a number of requested question edits and votes which were obviously bad, so I turned them down. I'll occasionally see, "This was only a test. You passed!"  My question is: Does StackOverflow show when you fail?

I recently received this rather amusing message while reviewing a user's first post:  Congratulations! This was only a test, designed to make sure you were paying attention. This post has already been removed, but thanks for taking time to leave feedback for the author.   What is the purpose of this test? How does the audit work? What happens if I fail? Why was the system expecting me to negatively review a good post, or positively review a bad post? A review is obviously an audit. Should I report it? Do review audits count toward the Reviewer badge? Do robo-reviewers dream of electric sheep?


I wanted to know, for my intuition, why the name 'kernel' is used for kernel density estimation. I am also curious for the 'kernels' in support vector machine if they are referring to the same name.   I always believe that understanding the name can aid in understanding the concept it is trying to give.   Any insights welcome.

There are several distinct usages:   kernel density estimation   kernel trick   kernel smoothing   Please explain what the "kernel" in them means, in plain English, in your own words.


Throughout fantasy literature there exists enmity between dwarfs and elves, depending on the author it can range from distrust, through to outright racial hatred and war.   Where have these historic issues originated? Has it been taken from the fables and stories that Elves and Dwarfs first appeared in or is there a story or book that first perpetuated this view and writers following on have been inspired by this?

In nearly every single medieval story Elves and Dwarves hate each other, or at least are very unfriendly towards each other. As I have read, watched and played many a lore of the medieval genre it just seems natural that Elves and Dwarves have a mistrust, at least, between them. (LOTR, Eragon, ect..)  I was just curious if there was a first lore that had created this or if there was some reason that it is? Or is it truly that Tolkien made it so for his lore in Lord of the Rings and due to it being one of the first and greatest, everyone else just followed suit?  (I do recognize that there is a question out there about this, but in it it is asking specifically about LOTR, I'm asking about outside of it and as the medieval genre in general.  ()


EDIT: @Holo has kindly pointed out that my concept of ln rules used in this question is wrong. However, the intuition behind using the tangent of a curve to find the sum to infinity of a series still stands. Therefore, I won't be editing the post.  I tried expanding out the equation from the question and got $${a_{n}} = \frac{1}{2} .\frac{3}{4} . \frac{5}{6} ...\frac{2n -1}{2n}$$  I then tried taking the ln of the equation which works out to $$\ln(1 - \frac{1}{2}) + \ln(1 - \frac{1}{4}) + ...$$  Here is my question. I used the rules of ln functions and took $ln(\frac{1}{1/2}) + ln(\frac{1}{\frac{1}{4}})$ + ...  Since ln(1) is 0, shouldn't the limit work out to 0 as n tends to infinity? Then $$ln(L) = 0, where L = limit$$ $$L = e^0$$ $$L = 1$$   However, the limit is actually 0, and my tutor used a method which I couldn't understand as he tried approximating the function $y = ln(x)$ to $y = x - 1$, as he says that the linear equation is actually a tangent to the ln curve. Could someone please explain this intuition behind it? He differentiated the equation, and since the curve cuts the x-axis at x = 1, he got the linear curve $y = x - 1$.  He did mention that the linear equation is just an approximation, but said such an approximation would be more than sufficient.

I came across to this: evaluate $$\prod_{k = 1}^{n} \frac {2k - 1} {2k}.$$  I brought it to a closed-form expression in asymptotics but I suspect my asymptotics is bad and I also want to see different solutions, hence the question.  My original solution: Write   $$\begin {eqnarray} \prod_{k = 1}^{n} \frac {2k - 1} {2k} & = & \exp \left (\sum_{k = 1}^{n} \log \left (1 - \frac {1} {2k}\right) \right) \nonumber \\ & = & \exp \left (- \sum_{k = 1}^{n} \sum_{m = 1}^{\infty} \frac {1} {(2k)^m m}\right). \end {eqnarray}$$  Let $$S = \sum_{m = 1}^{\infty} \frac {1} {(2k)^m m} \tag {1}.$$ Multiply both sides of $(1)$ by $2k$ to get $2k S < S + 1$, and by $4k$ to get $4kS > S + 2$. Hence, $$\frac {2} {4k - 1} < S < \frac {1} {2k - 1}.$$ Then, $$\frac {1} {2} \left( \log (4n - 1) - \log 3 \right) - 2 + O \left(\frac {1} {n^2}\right) < \sum_{k = 1}^{n} \sum_{m = 1}^{\infty} \frac {1} {(2k)^m m} < \frac {1} {2} \log (2n - 1) - 1 + O \left(\frac {1} {n^2}\right).$$ Hence, $$\sqrt {\frac {c} {2n - 1}} < \prod_{k = 1}^{n} \frac {2k - 1} {2k} < \sqrt {\frac {3 c^2} {4n - 1}},$$ where $c$ is a constant. Any better approach?


I've set up a script that basically does a large-scale find-and-replace on a plain text document.   At the moment it works fine with ASCII, UTF-8, and UTF-16 (and possibly others, but I've only tested these three) encoded documents so long as the encoding is specified inside the script (the example code below specifies UTF-16).  Is there a way to make the script automatically detect which of these character encodings is being used in the input file and automatically set the character encoding of the output file the same as the encoding used on the input file?  findreplace = [ ('term1', 'term2'), ]      inF = open(infile,'rb')     s=unicode(inF.read(),'utf-16')     inF.close()      for couple in findreplace:         outtext=s.replace(couple[0],couple[1])         s=outtext      outF = open(outFile,'wb')     outF.write(outtext.encode('utf-16'))     outF.close()   Thanks!

I received some text that is encoded, but I don't know what charset was used. Is there a way to determine the encoding of a text file using Python?  deals with C#.


How can I iterate through a string in Java?  I'm trying to use a foreach style for loop  for (char x : examplestring) {     //action }

StringTokenizer? Convert the String to a char[] and iterate over that? Something else?


Did Singapore Airlines flight SQ 217 from Singapore to Melbourne on 15 April fly or was it cancelled.

The question  only deals with flights in the US sourced from the  . Is there some similar source for EU, Asia etc?


How can I show whether two modules $ A=\mathbb Z^3/ \langle (2,1,0), (0,-1,0)\rangle$ and $B=\mathbb Z^3/ \langle (1,0,0), (0,1,0)\rangle$ are isomorphic to each other and if they are also free?

Are the following modules $M=\mathbb{Z^3}/\langle(2,1,0),(0,-1,0)\rangle$ and $N=\mathbb{Z^3}/\langle(1,0,0),(0,1,0)\rangle$ isomorphic? Are they free? Which rank do they have?  My attempt: I would say that they are isomorphic since when i reduce the matrix made of (2,1,0), (0,-1,0) in RREF i get (1,0,0), (0,1,0), so they would span the same space? But what are elements of these two modules? And which can be a isomorphism between them? And what about their rank and fact that they're free? They are free if they have a base, but i am not sure how can I write the base in this case. I am thankful for any sort of help or reference to literature or anything


I've always understood that splitting infinitives should be avoided; e.g., instead of     To boldly go where no man has gone before.   use     To go boldly where no man has gone before.   With that in mind, I recently saw someone post the following comment on Facebook:     This is horribly written.   It struck me that a phrasing that sounds more natural to my ear is     This is written horribly.   In trying to determine why I prefer the latter, I realized that the adverb horribly splits the conjugated verb is written. Is this just personal preference, or is this "split conjugation" basically the equivalent of a split infinitive?

For example:     Ever wish you could share information broadly   Could it be rewritten to:     Ever wish you could broadly share information   Are there any rules for the position of the adverbs.


I know there are very many threads about this question already and I have perused them to make sure this is unique.    The quantity $0^\infty$ perfectly well defined.  Therefore, when we have the expression $0\times\infty$, what error is invoked when I do the manipulation  $$ 0\times\infty= 0^\infty\times 2^\infty=(0\times2)^\infty=0^\infty=0~~?$$  The above is one case where I have conjured $2$ from "the ether," so let me give another example where I don't have to "deconstruct" infinity as I have with $\infty=2^\infty$.  Let's say I have an infinite product function of an extended real number (reals including infinity) so that the domain is $x\in[-\infty,\infty]$:  $$ f(x) = \prod_{k=1}^\infty \dfrac{(1+k)^x}{x}  $$  It follows that  $$ f(\infty) = \prod_{k=1}^\infty \dfrac{(1+k)^\infty}{\infty}=  \prod_{k=1}^\infty \bigg[0\times (1+k)^\infty  \bigg] $$  Since the least value of $k$ is $1$, every term $(1+k)^\infty$ is going to be equal to infinity and, if I evaluate it, I will get $f(\infty) = \Pi (0\times\infty)=$ undefined.  However, before I evaluate the $k$ term, I can use $0=0^\infty$, and then write   $$ f(\infty)  =  \prod_{k=1}^\infty \bigg[0^\infty\times (1+k)^\infty  \bigg] =  \prod_{k=1}^\infty \bigg[  [0\times (1+k)]^\infty  \bigg]=0 $$  Since there is a way for me to do the operations which does not lead to an undefined expression, is this order of operations preferred.  Any insight much appreciated.  EDIT: This question differs from the one it is alleged to duplicated because it asks questions about exponent operations that do not appear in the alleged duplicate question.  Furthermore, the question about the structure of the infinite product is completely disconnected from the alleged duplicate question, other than it does it relate to the same parent issue $0\times\infty$.

I did a bit of math at school and it seems like an easy one - what am I missing?  $$n\times m = \underbrace{n+n+\cdots +n}_{m\text{ times}}$$  $$\quad n\times 0 = \underbrace{0 + 0 + \cdots+ 0}_{n\text{ times}} = 0$$  (i.e add $0$ to $0$ as many times as you like, result is $0$)  So I thought an infinite number of $0$'s cannot be anything but $0$? But someone claims different but couldn't offer a reasonable explanation why. Google results seemed a bit iffy on the subject - hopefully this question will change that.


Suppose that $f $ is differentiable on $(0,\infty) $ and $f'(t) \rightarrow b $ as $t\rightarrow + \infty$ . Show that $f (t)/t\rightarrow b $.   I want to use mean value theorem here, but I can't figure out where. When $ f (0) \ne 0$, I can't make $f'(c)=\frac {f (t)-f (a)}{t-a} $ become $f (t)/t $. So now I am just not really sure what to do.

I'm trying to solve this question:     Let $f:[0,+\infty) \to \mathbb{R}$ be derivable and $\lim_{x \to +\infty} f'(x) = L$, then $\lim_{x\to \infty}\frac {f(x)}{x}=L$.   I'm trying to solve this question using l'Hôpital rule, but I couldn't use it, because I don't know if $\lim_{x\to +\infty} f(x)=+\infty$.  I need help.  Thanks a lot.


Help! Going a little mad trying to track down a film I saw when I was young.  A few things in the film stand out for me:  The male protagonist is some sort of ships pilot, who lands on a planet and drives around for a bit in a vehicle that is on stilts and has wheels on the end. It crashes into a boulder and he's reduced to carrying on on foot.  He encounters a man (or robot) in a crater, whose job it is is to push metal scrap boulders into holes. I think the pilot jumps into one of these holes and follows the tunnel. The tunnel ends at the top of a mountain where the boulder that has been pushed down rolls down into the crater, for the cycle of pushing to start again.  I watched it on the television twice - late 70s and again in the early 80s.

I have vague memories of a cartoon which would have been made in the 80s or early 90s - I would say that the animation looked like it was from the 80s but I would have seen it on UK television around 1990-94. I get the impression it was European in origin, possibly originally produced in a non-English language (German? French?) and later re-dubbed. I think it was shown in the UK on channel 4 in an early morning slot (like 6:30am or something).  It was set in space or had some space elements and I believe the main character or another very prominent character had a full beard and he (and the show?) may have been named after a character from greek (or other ancient) mythology? I want to say Hercules but I know that's not right. Any ideas?


My first involvement in SE was to join math.SE, and I wrote a profile sentence about mathematics in my life. I've since joined numerous other SE communities, and in each one my profile is automatically copied from math.SE, rather than from my (obviously more generic) Network Profile. Is this the result of a preference setting somewhere, or am I doomed to erase my mathematical profile every time I join a SE community forevermore?  As this has been asked before, I am invited to click “That solved my problem!” — but the problem is still there. As suggested in answer to the old question, I'll change the “bug” tag to “feature-request”; and also ask why, by design, the oldest profile outranks the network profile.

Could there be a list of checkboxes to single out which information to update when copying profile info to linked accounts?  For example, if you had moved and only wanted to update your location information, you wouldn't want to destroy custom display names and custom profiles on various sites.  It could be hidden behind some "advanced copying" button, or the default is to tick every checkbox, so the basic functionality is still there.  I've just accepted that more detailed site-specific profiles are just too much work, but I do keep an extra blurb about code on SO (my most active SE site).  Today I decided to sync my other profiles (without that irrelevant blurb copied when they were created).  I forgot it copied display names, so I lost my Meta name for a month (I love that feature delay).  Regardless of display name, since you can change the other information manually without delay, if this was easier, wouldn't it encourage more detailed and site-relevant bios?    I am mostly focusing on the bio part of the profile page here (rather than the display names, even though I like that too), because I think site-specific bios can be very useful if you can use them easily.  I've not even considered it, except for SO and Meta, because it would be so much manual work too easily wiped out (as I've done now for Meta); surely others would start to use them if it was easier?  Instead of the above solution, could there be a "locked" checkbox when editing a profile (and hence seen when changing a bio to be site specific), so that particular bio isn't updated when copying profile information?


I have heard that .  So, as I understand it, the following example would be accurate:  There are two twins- TwinA and TwinB. Both have very accurate clocks, that are exactly synchronised. TwinA leaves earth on a rocket, which travels at approaching the speed of light. After he has counted 24 hours, he comes back to Earth, only to find that more time has passed there, and his clock is now behind TwinB's.  However what confuses me is that speed is relative. So who is to say that TwinA was the one who was moving fast?

I read a lot about the classical twin paradox recently. What confuses me is that some authors claim that it can be resolved within , others say that you need . Now, what is true (and why)?


I am using a pattern in my program that calls for the calling of different kinds of functors depending on what the object type is. In the code below, the b1 object is explicitly instantiated with derived functor type FunctorX. But when I make the call in the code, the base functor gets called instead of the derived functor. Why is that?  struct Functor {   Functor() {}   ~Functor() {}    virtual int operator()() { return 33; } };  struct FunctorX : public Functor {   FunctorX() : Functor() {}   ~FunctorX() {}    int operator()() { return 44; } };  template< typename FunctorT > struct B {   B( FunctorT FunctorArg ) : Functor { FunctorArg } {}   ~B() {}    FunctorT Functor; };  int main() {   B< Functor > b1 { FunctorX() }; // initialize with derived functor. Derived functor gets instantiated.   int num = b1.Functor(); // error: calls base functor, not derived functor    return 0; }

Someone mentioned it in the IRC as the slicing problem.


I'm trying to achieve a basic clear glass material, but it always renders as "black" glass. I'm new to Blender, so I'm probably making a fairly simple mistake here.    Thanks for looking...

So I'm trying to make some very refractive glass in Blender Cycles. I've tried using the mix shader with Glass, Trasparency, by a factor of Is Shadow Ray + Is Reflection/Trasparency Ray etc, and I've also messed with every setting in the Light Paths section of the Render Properties.. but nothing will get rid of these black corners (see picture below), even though there is nothing black or unlit in my scene.   In the past I've used Cinema 4D, and I would just turn off every channel in a new material except for Trasparency, and then just mess with the Refraction value, and I would get a very clean, realistic-looking glass material (see picture below). You can still see a few black spots I think, but, it just looks so much more refractive and clean. What I'm wondering, is what Cinema 4D does by default in this scenario, that Blender doesn't, and what settings I need to adjust in Blender to get the same result as Cinema 4D's default Transparency/Refraction settings. Any help would be so much appreciated!! Thank you!! (I've searched through YouTube, and Google Search, and this website a ton looking for every related keyword I could think of, but haven't found the answer to this issue yet :o the closest thing I found was this  and at the end of the answer the guy even says he doesn't know what causes the black bits)


Okay so I went to my friends house the other day and he wanted me to bring my PS4 controller as he only had 1. So when I got to his I connected my controller to his PS4 with no problem. But when I got back to my house I wanted to play ps; so I did the usual thing which is to use the leed but my controller didn't connect.  These are the things that I have tried:   The share and PS button  reset button the leed  turning off PS4  unplugged the PS4

I was playing my PS4 two days ago and then packed it up with two controllers that were both connected to this PS4.   I got to where I was going, set everything up and now the controllers won't connect. They show pulsing orange when they plug in, but when I hit the PS Button to connect, it blinks white 1-2 times and goes back to orange.   I have tried resetting them both.  Can anyone help?


So I'm trying my hand at creating some packages (on , because my Surface can't run TeX1), and have run into a rather fascinating problem. My packages just won't load; they complain about \ifnum instead. Here's a minimal test case:  test.sty  \NeedsTeXFormat{LaTeX2e}[1994-06-01] \ProvidesPackage{test}[2014-08-04 Hello, World!] \endinput   main.tex  \documentclass{article} \title{LaTeX Testing} \usepackage{test}  \begin{document} Hello, World! \end{document}   Compile error  Missing = inserted for \ifnum. <to be read again>                     - l.4    And I'm thinking, when did \ifnum come into this?! (The error occurs on the 'token' after \usepackage, whether that's a newline or a \show or whatever else.) There's plenty on the internet about \ifnum errors, but nothing on just after \usepackage. I have no idea where to even start debugging this, and my options are rather limited due to being stuck with an online service... Some help?    1 Surface RT is a pain sometimes. I do have a proper machine, with LaTeX on it; however, it's not quite as portable, and therefore isn't on hand at the moment.

There is some conflict or error I don't understand. I can skip it and nothing visible happens. The output is okay and everything seems to be fine. Still I would like to get rid of the error message. If I run the following minimal example:   \documentclass[]{scrbook}  \usepackage[applemac, grafiken]{tahbiblatex} \usepackage[ngerman]{babel}   \begin{document}  Testing äüöaüä.  \end{document}   I get the error message:      ! Missing = inserted for \ifnum. <to be read again>                     , l.4 \usepackage                [ngerman]{babel} ?  ! Missing number, treated as zero. <to be read again>                     , l.4 \usepackage                [ngerman]{babel}   Here is my .sty file:  \NeedsTeXFormat{LaTeX2e}\relax \ProvidesPackage{tahbiblatex}[2012, by tah modified by sm]  \RequirePackage{ifthen}  \DeclareOption{latin1}{\PassOptionsToPackage{\CurrentOption}{inputenc}} \DeclareOption{applemac}{\PassOptionsToPackage{\CurrentOption}{inputenc}} \DeclareOption{cp850}{\PassOptionsToPackage{\CurrentOption}{inputenc}} \DeclareOption{utf8}{\PassOptionsToPackage{\CurrentOption}{inputenc}}  \DeclareOption{dvi}{% \newif\ifpdf \ifx\pdfoutput\undefined     \pdffalse \else     \pdfoutput=0     \pdftrue \fi}  \newcounter{Grafiken}\setcounter{Grafiken}{0} \DeclareOption{grafiken}{\setcounter{Grafiken}{1}}  \newcounter{Randausgleich}\setcounter{Randausgleich}{0} \DeclareOption{randausgleich}{\setcounter{Randausgleich}{1}}  \newcounter{Tabellen}\setcounter{Tabellen}{0} \DeclareOption{tabellen}{\setcounter{Tabellen}{1}}  \newcounter{Sync}\setcounter{Sync}{0} \DeclareOption{sync}{\setcounter{Sync}{1}}  \ProcessOptions  \RequirePackage{fixltx2e} \RequirePackage{inputenc} \RequirePackage[T1]{fontenc} \RequirePackage[T1]{url} \RequirePackage{setspace} %\RequirePackage[german]{varioref} \RequirePackage{textcomp}  \newcommand{\urlangabe}[2]{% $\langle$\url{#1}$\rangle$ -- Zugriff am #2}  \def\hierlockern {\begingroup \def\par{\endgraf\endgroup}%   \tolerance 1414%   \hbadness 1414%   \emergencystretch 1.5em%   \hfuzz 0.3pt%   \vfuzz \hfuzz%   \raggedbottom% }  \newcommand{\alleslockern}{%   \tolerance 1414%   \hbadness 1414%   \emergencystretch 1.5em%   \hfuzz 0.3pt%   \vfuzz \hfuzz%   \raggedbottom% } \ifthenelse{\value{Grafiken}=1}   {   \ifx\pdfoutput\undefined \newcount\pdfoutput \fi   \ifcase\pdfoutput       \RequirePackage[dvips]{graphicx}       \DeclareGraphicsExtensions{.eps}       \typeout{Paket tah Meldung: Die Option `grafiken' fuer DVI wurde gewaehlt.}% \else     \RequirePackage[pdftex]{graphicx}     \DeclareGraphicsExtensions{.jpg,.tif,.png,.pdf}     \typeout{Paket tah Meldung: Die Option `grafiken' fuer PDF wurde gewaehlt.}%   \fi}   {}  \ifthenelse{\value{Sync}=1}   {     \ifx\pdfoutput\undefined \newcount\pdfoutput \fi     \ifcase\pdfoutput     \RequirePackage{srcltx}     \typeout{Paket tah Meldung: Die Option `sync' fuer DVI wurde gewaehlt.}%     \else     \RequirePackage{pdfsync}     \typeout{Paket tah Meldung: Die Option `sync' fuer PDF wurde gewaehlt.}%     \fi }   {}   \ifthenelse{\value{Randausgleich}=1}   {\typeout{Paket tah Meldung: Die Option `randausgleich' wurde gewaehlt.}%   \RequirePackage[activate]{pdfcprot}}   {}  \ifthenelse{\value{Tabellen}=1}   {\typeout{Paket tah Meldung: Die Option `tabellen' wurde gewaehlt.}%   \RequirePackage{tabularx}   \RequirePackage{ragged2e}   \RequirePackage{dcolumn}   \RequirePackage{booktabs}   \newcolumntype{L}{>{\RaggedRight\hspace{0pt}\arraybackslash}l}   \newcolumntype{Y}{>{\RaggedRight\hspace{0pt}\arraybackslash}X}   \newcolumntype{d}[1]{>{\DC@{.}{,}{#1}}l<{\DC@end}}   }   {}    \endinput   I also don't really need all the features. So it would be nice to reduce it to minimal features, which are needed..


I am using a regular expressionvalidator in my application to validate emails. It's using ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"  This has worked great for a long time but recently there was a report from a customer that could not create a client with the email adress marie-@domain.com, its a little bit weird address but never the less it works in gmail.  I dont quite understand the expression, so could anybody help me adjust the expression so it also accepts emails in that format?

Over the years I have slowly developed a  that validates MOST email addresses correctly, assuming they don't use an IP address as the server part.  I use it in several PHP programs, and it works most of the time.  However, from time to time I get contacted by someone that is having trouble with a site that uses it, and I end up having to make some adjustment (most recently I realized that I wasn't allowing 4-character TLDs).  What is the best regular expression you have or have seen for validating emails?  I've seen several solutions that use functions that use several shorter expressions, but I'd rather have one long complex expression in a simple function instead of several short expression in a more complex function.


m,n=input().split( ) a=[[0]*int(n)]*int(m)  for i in range(0,int(m)):   s=input().split()   for j in range(0,int(n)):     a[i][j]=int(s[j])  print(a)   I wanted to input this info for creating a 2D list:  3 4 11 12 13 14 21 22 23 24 31 32 33 34   however, the result is:  31 32 33 34 31 32 33 34 31 32 33 34

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


Ok guys...  I have following class  #include <functional>  template <typename TValue, typename TPred = std::less<TValue>> class BinarySearchTree {     struct TNode {         TValue value;         TNode *pLeft;         TNode *pRight;     }; public:     BinarySearchTree();     ~BinarySearchTree();      . . . private:     TNode *pRoot;       . . . };   then in my .cpp file i defined the ctor/dtor like this:  template <typename TValue, typename TPred> BinarySearchTree<TValue, TPred>::BinarySearchTree() : pRoot(0) {}  template <typename TValue, typename TPred> BinarySearchTree<TValue, TPred>::~BinarySearchTree() {     Flush(pRoot); }   my main function:  int main() {         BinarySearchTree<int> obj1;     return 0; }   and i get following linkage error:  public: __thiscall BinarySearchTree<int,struct std::less<int>>::BinarySearchTree<int,struct std::less<int> >(void)   i tried to put the constructor definition into the header file and i get no error. only if i try to define it in the cpp file.

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


Alex, Bret, and Chloe repeatedly take turns tossing a fair die. Alex begins; Bret always follows Alex; Chloe always follows Bret; Alex always follows Chloe, and so on. Find the probability that Chloe will be the first one to toss a six.

Original Question:  Paul, Dave and Sarah are rolling a fair six sided die. Paul will go first, always followed by Dave, who is always followed by Sarah, who is always followed by Paul, and so on... What is the probability that Sarah will be the first one to roll a six?  Here's my work, I found the following formula in s, the number of sequences Sarah did not roll a six, terms  (5/6 * 5/6 * 5/6)^s * (5/6 * 5/6 *1/6)  (5^3/6^3)^s * (5^2/6^3)  (5^3s/6^3s) * (5^2/6^3)  $\dfrac{5^{(3s+2)}}{6^{(3s+3)}}$ = $\dfrac{5^{(3s+2)}}{6^{(3)(s+1)}}$  $\dfrac{5^{(3s+2)}}{216^{(s+1)}}$  And then we would use the summation formula for  $\displaystyle \sum_{s=0}^{\infty} \frac{5^{3s+2}}{216^{s+1}}$.  Would this be an acceptable answer or do I need to find an exact value


I know that my parents' siblings' child is my cousin. But what about the grandchild of my parents' siblings?

How should I call the grandson of my aunt? Should I call him cousin or something else? What is the generally accepted term?


A couple days ago I asked this  concerning posting religious text in posts and refusing to edit them. Now because of the publicity of this user, I believe they are being  for no other reason than people disagreeing with their posts (or being frustrated, or whatever; basically they are being downvoted for an abnormal reason). The questions and answers that are being downvoted aren't bad by standards at all; as a matter of fact, several had  (+3) before being downvoted (4 times). So my question is, is this alright that the user is being "attacked" like this? I'm sure many other users have religious text and/or refuse to edit posts, and aren't downvoted.  Please note, I am asking this as a specific question because, for one thing, I feel a little responsible for the downvotes.  EDIT: I just noticed now the user's getting a recieving a flurry of upvotes...I understand why, but should votes be used just to cancel downvotes? Couldn't the downvotes be removed by a moderator or something?

I just noticed that I lost a bunch of points from my reputation score, and I used the "reputation" tab on my user profile page to try and track down the cause.  During my investigation, I noticed there was an unusual event of type "reversal". In the normal place of a question title, it says "voting corrected".     What does this mean, and what caused it?  Did I do something wrong? Why did I lose all of that reputation? Is the system punishing me for leaving too many good answers?  Is there any way to earn it back?


Having read , none of the answers list any advantages for using a static method over a singleton, which leads me to wonder why anyone would ever want to use static methods.

What real (i.e. practical) difference exists between a static class and a singleton pattern?  Both can be invoked without instantiation, both provide only one "Instance" and neither of them is thread-safe. Is there any other difference?


The code I am using is supposed to make an image, square.png, move to the cursor. However, the code cannot run.  I've tried to look for typos and errors in my code.  var canvas = document.createElement('canvas'); canvas.width = 800; canvas.height = 600; document.body.appendChild(canvas);  document.addEventListener('mousemove',function(event){      var similarX = event.clientX;     var similarY = event.clientY;     document.getElementById('body').innerHTML = "x:" + similarX + ", y:" + similarY; }) var square = new Image(); square.src = 'square.png';  window.addEventListener('load' , start);  var c = canvas.getContext('2d'); function start() {     c.fillStyle = 'green';     c.fillRect = 10, 10, 30, 30;     c.drawImage(square,similarX , similarY);      window.requestAnimationFrame(start) } document.body.appendChild(canvas);   this is from between the script tags in an html document.  The square is supposed to be drawn at where the mouse pointer is, but according to Chrome dev tools, the variables similarX and similarY are not recognized in the function "load".

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


Blockquote   Sense of agency From Wikipedia, the free encyclopedia The "sense of agency" (SA) refers to the subjective awareness that one is initiating, executing, and controlling one's own volitional actions in the world.[1] It is the pre-reflective awareness or implicit sense that it is I who is executing bodily movement(s) or thinking thoughts. In normal, non-pathological experience, the SA is tightly integrated with one's "sense of ownership" (SO), which is the pre-reflective awareness or implicit sense that one is the owner of an action, movement or thought. If someone else were to move your arm (while you remained passive) you would certainly have sensed that it were your arm that moved and thus a sense of ownership (SO) for that movement. However, you would not have felt that you were the author of the movement; you would not have a sense of agency (SA).[2]  Normally SA and SO are tightly integrated, such that while typing one has an enduring, embodied, and tacit sense that "my own fingers are doing the moving" (SO) and that "the typing movements are controlled (or volitionally directed) by me" (SA). In patients suffering from certain forms of pathological experience (i.e., schizophrenia) the integration of SA and SO may become disrupted in some manner. In this case, movements may be executed or thoughts made manifest, for which the schizophrenic patient has a sense of ownership, but not a sense of agency.  Regarding SA for both motor movements and thoughts, further distinctions may be found in both first-order (immediate, pre-reflective) experience[3] and higher-order (reflective or introspective) consciousness.[4] For example, while typing I have a sense of control and thus SA for the on-going action of typing; this is an example of SA in first-order experience which is immediate and prior to any explicit intellectual reflection upon the typing actions themselves. In this case, I am not focusing on the typing movements per se but rather, I am involved with the task at hand. If I'm subsequently asked if I just performed the action of typing, I can correctly attribute agency to myself. This is an example of a higher-order, reflective, conscious "attribution" of agency, which is a derivative notion stemming from the immediate, pre-reflective "sense" of agency.

I've heard it postulated by some people that "we can't truly know anything".  While that does seem to apply to the vast majority of things, I can't see how 'cogito ergo sum' can possibly be false.   No matter what I am, no matter in what way I'm being tricked, no matter how I may be deluded, I must exist in order to - in some way - be considering this right now (or be being tricked right now).  Is 'cogito ergo sum' necessarily correct, or have I missed something?