Dispel magic on a target creature ends spells that affect that creature. Does casting dispel magic on another caster with an active spiritual weapon dispel the spiritual weapon, or does dispel magic need to be cast directly at the weapon?

If a caster is currently concentrating on a spell whose effects are not on the caster, can you cast Dispel Magic on the caster to end the spell?


We often employ the term row echelon form to describe matrices with a certain pattern, see . My question is, when was the term echelon first used to describe a matrix? In particular, was the term used first in maths or in the military? Some etimology can be found , but it doesn't answer my question.

When you solve a system of linear equations, you write down the augmented matrix and reduce this to reduced row echelon form. What is the meaning of the word echelon?


I'm hoping someone could lead me in the right direction. Today i noticed that my application stoped working when trying to use google maps. My application has worked flawless. I have not updated anything in the code. It simply just stoped working.   here is the debug:  java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object java.util.List.get(int)' on a null object reference                                                                    at se.xflash.tidsboken.CreateNewJob.onMapReady(CreateNewJob.java:725)                                                                    at com.google.android.gms.maps.MapFragment$zza$1.zza(Unknown Source)                                                                    at com.google.android.gms.maps.internal.zzl$zza.onTransact(Unknown Source)                                                                    at android.os.Binder.transact(Binder.java:387)                                                                    at com.google.android.gms.maps.internal.v$a$a.a(:com.google.android.gms.alldynamite:82)                                                                    at maps.ei.bu$6.run(Unknown Source)                                                                    at android.os.Handler.handleCallback(Handler.java:739)                                                                    at android.os.Handler.dispatchMessage(Handler.java:95)                                                                    at android.os.Looper.loop(Looper.java:224)                                                                    at android.app.ActivityThread.main(ActivityThread.java:5514)                                                                    at java.lang.reflect.Method.invoke(Native Method)                                                                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)                                                                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)   I dont understand why i all of the sudden get a NullPointerException, it dosnt make any sence!  here is a snippet of the code where it complains.  public void onMapReady(GoogleMap map) {       DatabaseHandlerSettings db = new DatabaseHandlerSettings(getActivity());     PersonInfoDatabase info = db.getContact(1);     String adressInfo = info.getAdress();     String ortInfo = info.getOrt();       String adress = (adressInfo + ", " + ortInfo);      Geocoder geocoder = new Geocoder(getActivity(), Locale.getDefault());     List<Address> addresses = null;      try {         addresses = geocoder.getFromLocationName(adress, 1);     } catch (IOException e) {         e.printStackTrace();     }     Address address = addresses.get(0);     double longitudeStart = address.getLongitude();     double latitudeStart = address.getLatitude();      LatLng location = new LatLng(latitudeStart, longitudeStart);     map.setMyLocationEnabled(true);     map.getUiSettings().setZoomControlsEnabled(true);      map.moveCamera(CameraUpdateFactory.newLatLngZoom(location, 12));   I mean, how can my applications stop working out of the blue? its on the market. I understand if you don't understand what i mean.

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?


that are primarily about CR Calculation point to playtesting as the final step to homebrewing a creature. That, merely calculating the Challenge Rating isn't enough, the creature shall have to see play for it to be gauged more-or-less accurately. @DaleM puts it nicely in :      Think of the CR calculation as trying to work out how to fly a spacecraft to the moon with calculations on the back of a napkin.   Now that's all well and good, I have gotten to the habit of painstakingly playtesting my creatures recently (and have bugged several stackfolk to do it with me). Though we've been playing, getting feedback and tweaking, I feel there is lack of process and am missing something.   Which brings me to ask: how, exactly, are playtests done- in terms of determining a creature's CR?    Specifically, I'd like to know if creatures were playtested assuming a certain number of them. For example, if I made a CR1 creature, do I pit one against a 1st level party of four? or do I pit two against an 3rd-level party of four? and so on...

I'm reading through the new DM D&D Basic Rules, but I'm confused about the challenge rating of a monster.  Does the challenge rating assume a single PC or a group of PC's? As a CR3 a challenge for 1 PC (like with 4th Edition), or for a group of PC's? If so, for how large a group? How should a DM choose monster with more or less PC's?


What are the exact commands I need to use to remove the kitchen from my house in Falkreath? I can't figure it out.

I currently have Windstad Manor and built it all. Now I regret some choices and I'd like to rethink and rebuild it.  Is there any console way to "nuke" the manor and rebuild it from ground up?


I cooked a couple pork roasts earlier and took them out of the crock pot and then added two more in the still hot water/ juices etc.. Went to bed. Realized I must have unplugged the crockpot the night before when I got up in the morning to check them and take them out. Are these a definite throw aways?

Possible Duplicate:          I cooked about 2lbs of pork loin in the crock pot for 8 hours on low last night.  It was on low from 12:00am to 8:00am.  From 8:00am to 12:00pm, the crock pot was turned off, and at 12:00pm the food was 'warm' but above room temperature.  Is this still safe to eat?  The crock pot was covered, but its anyones guess (guestimating using some math) how long the loin was at the safe high temperature.  I immediately threw it in the refrigerator, but if I do keep it, should it be brought up to 135°F asap?  I'm waning towards throwing it out.  My wife is pregnant, and we have small children in the house too.


I can't make heads or tails of the following behaviour (please see comments in code)  for (int i = 0; i < 1000; i++) {     string debugString = String.Concat("Inside Action ", i);     Action newAction = new Action(() => { System.Console.WriteLine(debugString); });     Task.Run(newAction);        // outputs: 0, 1, 2, 3 (not always exactly in this order, but this is understandable because of async execution)      Action newAction2 = new Action(() => { System.Console.WriteLine("Inside Action2 " + i); });     Task.Run(newAction2);        // outputs: 1000, 1000, 1000, 1000, 1000 (...which is the value of i *after* the iteration, why?? "i" is a primitive int?!) } Console.ReadKey();   I don't understand the second behaviour. The variable i should be assigned to the Action as an Instance as the Action gets created. It looks like a pointer to i is created which has the value 1000 (last value of iteration) at the time the task is run...  Please explain. Thank you.

I met an interesting issue about C#. I have code like below.  List<Func<int>> actions = new List<Func<int>>();  int variable = 0; while (variable < 5) {     actions.Add(() => variable * 2);     ++ variable; }  foreach (var act in actions) {     Console.WriteLine(act.Invoke()); }   I expect it to output 0, 2, 4, 6, 8. However, it actually outputs five 10s.  It seems that it is due to all actions referring to one captured variable. As a result, when they get invoked, they all have same output.  Is there a way to work round this limit to have each action instance have its own captured variable?


Let $f$ be a differentiable function $f\colon [0,1] \to \mathbb R$, and assume $f^\prime$ is continuous. Prove that there exists $c\in(0,1)$ such that $\int^1_0 f(x)\,dx = f(0)+\frac12f^\prime(c)$.  I tried to apply the Mean Value Theorem from which I got \begin{align*} f^\prime(c)& =f(1)-f(0), \\ f(c) & =\int^1_0 f(x)\,dx, \end{align*} both of them for some $c\in(0,1)$.

I need to prove that  $$\int^1_0 f(x)dx=f(0)+\frac{1}{2}f'(a)$$ where $f$ is continuous and differentiable in $[0,1]$ and $a\in(0,1)$.    I know that as $f$ is continuous in $[0,1]$ there exists $c\in (0,1)$ such that $\int^1_0 f(x)dx=f(c)$. Now maybe I should show that $f(c)=f(0)+\frac{1}{2}f'(a)$ ? If I should I don't know how to do it. The other approach that I had, was going by the definition of $\int^1_0 f(x)dx$ to see if I could somehow get a similar result to the right side of the equation above, it didn't seem to lead anywhere. Do you have any idea how to approach it?


I am wondering which style I should use for my "cancel" button. As you can see, on the wizard, the "cancel" button doesn't have border. But in a form which has only two buttons, should I use a "cancel" button with borders or not? What is the best practice? Thank you guys! Peace out!

I understand the idea behind having the more likely to be used action on a page slightly larger or in a different style in order to guide the user to it (for example having a button for save but a small text link for cancel).  When say an administrator hits delete I have a confirmation dialog appearing asking if they are sure they want to do that and presenting them with two options, 'Yes, Delete this' and 'No, Keep this'.  At the moment these are the same size and style and therefore the same weight on the page.  I was wondering if that should be the case or should I assume that the administrator is not an idiot and that if they have hit delete confirming this action is the most important part of his next step and therefore should be given a greater weighting on the page?


Is there any practical difference from using HMAC-SHA1(key, msg) vs SHA1(key + msg) as a way to verify the authenticity/integrity of a certain message? Note that the plus sign means string concatenation in this context  Am I losing out on some esoteric detail that the HMAC-SHA1 offers in terms of mathematical immunity to cryptanalysis? Or do both approaches basically do the same thing?  Ive looked through the basic descriptions of both algorithms. And although HMAC-SHA1 seems to do some fancy things with padding and other stuff, I fail to understand any importance. To me both HMAC-SHA1(key, msg) & SHA1(key + msg) carry essentially the same strength/resistance against attacks aside from superficial details  How am I wrong, What am I missing?

If $H(m)$ is a secure hash function, can't we implement a MAC using $H(k\mathbin\Vert m)$?  However, it seems the more widely used MACs, such as NMAC and  (both originally defined in ) use a much more complicated scheme. Why is this concatenation scheme insecure?


I made myself a low-budget DM screen out of cardboard, but it doesn't have any tables or information. Does anybody know any essential tables for it? If so, can you share the link with me? I already printed out a weather table.

The question is, what elements on a DM screen are essential? I'm new at playing and DMing, altough a lot of experience watching games, just got a group to play with now. Started with the starter set in 5E and the Lost Mine of Phandelver adventure, however I've noticed the game can come to a stop when checking the rules or how to do something, while getting the books and stuff like that. So I thought to make a DM screen with some cheat sheets, of the most usual things new players, and new DM's have doubts on, and how to make the game flow well without long rule-checking breaks. What are the essential things to have on that screen? So far this is what I found  but not sure if it has all I need or so much stuff that'll also make the game stop a lot while cheking it out.


I want to alter the title tag in jquery. tried as $(document).attr("title", "New Title"); but title tag in view source is not altered and changed only in browser title bar.  How to change the title in title tag in jquery   new title

I have a webpage that implements a set of tabs each showing different content. The tab clicks do not refresh the page but hide/unhide contents at the client side.  Now there is a requirement to change the page title according to the tab selected on the page ( for SEO reasons ). Is this possible? Can someone suggest a solution to dynamically alter the page title via javascript without reloading the page?


For calculating net resistance in a combination of parallel resistors we use 1/R=1/r1+1/r2+1/r3....but electricity must travel through least resistance. Then how does this relation come in use? I am definitely unaware of some concept on this. The least 'r' should be the net resistance instead of sum of reciprocals..

Electricity takes the path of least resistance!   Is this statement correct?    If so, why is it the case?  If there are two paths available, and one, for example, has a resistor, why would the current run through the other path only, and not both?


I generate a plot in MATLAB using the code below (MWE):  x = [1:100]; y = x.^0.5; [hLine1]=semilogx(x,y); hleg1 = legend(sprintf('%.4f',0.4334)); set(get(hleg1,'title'),'string','test'); set(hleg1, 'EdgeColor', 'w'); set(hleg1,'Location','NorthWest');     (The legend title seems to not be factored in when using set location Northwest but that is a question for the MATLAB S.E...)  I slide the legend to a different position in the plot and then convert it to a .tikz.  It is compiled in latex with:  \documentclass[11pt,a4paper]{report} \usepackage{tikz} \usepackage{pgfplots}  \begin{document}  \begin{figure} \centering     \input{fig1.tikz}     \caption{...} \end{figure}  \end{document}   This creates the following plot:    the legend's title has disappeared. I can not find it anywhere in the .tikz created file.  So this may be a glitch with matlab2tikz but any workaround? Thanks.  Edit: So this is probably a matlab2tikz issue. Leaving that bit, I managed to get a legend title in tikz using some code I found. But it does not center the title over the line + text, just the text. Full MWE to show the problem:  \documentclass{article} \usepackage{pgfplots} % and optionally (as of Pgfplots 1.3): \pgfplotsset{compat=newest} \pgfplotsset{plot coordinates/math parser=false} \newlength\figureheight \newlength\figurewidth \begin{document}  \begin{tikzpicture}  \begin{axis}[% width=4.52083333333333in, height=3.565625in, scale only axis, xmode=log, xmin=1, xmax=100, xminorticks=true, ymin=1, ymax=10, legend style={at={(0.03,0.97)},anchor=north west,draw=none,legend cell align=left} ] \addlegendimage{legend image code/.code=}   %These two lines add the title to the legend \addlegendentry{example}                    %But I would like it centered over the line and the text \addplot [color=blue,solid]   table[row sep=crcr]{1 1\\ 2   1.4142135623731\\ 3   1.73205080756888\\ 4   2\\ 5   2.23606797749979\\ 6   2.44948974278318\\ 7   2.64575131106459\\ 8   2.82842712474619\\ 9   3\\ 10  3.16227766016838\\ }; \addlegendentry{0.4334}; \end{axis} \end{tikzpicture}% \end{document}     How could I center the legend title? Thanks

I am using  to draw some plots. I usually use \addlegendentry and get a nice default legend box. There are some options for legend box placement and layout (e.g. number of columns).  For some plots I would like to add a title inside the legend box.  Could not find the something about this in . Does anyone know what is the way to customize the legend box?


I have a SSD 120GB and it's running ubuntu 20.04. I want to partition this disk for install windows 10. I tried use GParted to resize but it isn't apply. And i tried to unmount and output is:   could not unmount /deb/nvme0n1p4 unmount/: target is busy   Thank for all!!!

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


A: "Why are you so mad?"   B: "You ...... me you weren't coming to dinner. I waited for you for two hours "   The answer is  " should have told " and I can understand why but there was another option on the test that " must have told "..I was just wondering is there any possibility we can use " "must have told" here on the blank to stress our emotions/feeling in order to make it clear that I detest to have been waited for..  Thanks

What is the difference between "should" and "must"?  e.g. "They should have called the police." Can I use "must" in that sentence or not?  e.g. "You should read his new book." How about this sentence?


i get an error in \begin{equation}, i write long equation and split it using \\.  it shows an error   Package pgfplots Warning: running in backwards compatibility mode (unsuitable  tick labels; missing features). Consider writing \pgfplotsset{compat=1.7} into  your preamble

I am having the following equation:  \begin{equation}   Q(\lambda,\hat{\lambda}) = -\frac{1}{2} P(O \mid \lambda ) \sum_s \sum_m \sum_t \gamma_m^{(s)} (t) \left( n \log(2 \pi ) + \log \left| C_m^{(s)} \right| + \left( \mathbf{o}_t - \hat{\mu}_m^{(s)} \right) ^T C_m^{(s)-1} \left(\mathbf{o}_t - \hat{\mu}_m^{(s)}\right) \right) \end{equation}   which does not very well fit on one line. How can I split this over two lines? What I have in mind is that I specify the splitting place, and that the first line is left aligned and the second line right aligned to make clear that it is still the same equation.  The linebreak \\ does not work.


I'm starting on mono blue mill deck and I saw . I'm not sure about its ability.     {tap}: put a charge counter on Grindclock      {tap}: target player puts the top X cards of his or her library into his or her graveyard, where X is the number of charge counters on Grindclock.   If I just cast  and use its first ability, will the second ability take effect, or do I just put a charge counter on it? If there's already one charge counter on it and I use the first ability again, it will have two charge counters on it? Then the second ability will take effect with two cards being sent to graveyard?  If I use spells or ability to untap it after being used can I use its ability again on the same turn?

Say I have a Zombie token, , and  on the battlefield. Can I sacrifice the Zombie token to activate both the Altar's and Seer's abilities?  Similarly, if I have one card in hand, and  and  on the battlefield can I discard the one card to both of their abilities?  If I have a  with 3 charge counters can I activate both of its abilities by tapping it to add a counter, and tapping it to remove 3 counters and destroy a permanent without untapping it in between?


If I have a stepper motor and driver that require 5V and 240mA and I supply 5V at 3A will my circuitry die? I have heard the expression that a motor "draws" the current that is needs, but I don't really know if that's true, and if it is true, how's does that even work? It does not seem to be the same for voltage. I am very beginner with electricity so simpler is preferred thank you all for taking the time to answer I really do appreciate it Edit: Apparently this is a frequently asked question, view the answer here or go to  on the topic

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


How to extract the value -1,234.23 from the following string using JavaScript regex?     "hello-sdvf-1,234.23 23 everybody 4"   should extract      -1,234.23   This regex returns null:  "hello-sdvf-1,234.23 23 everybody 4".match(/-?\d+\.\d+/);   and that one is OK for  "hello-sdvf-134.23 23 everybody 4".match(/-?\d+\.\d+/);   I need to extract numbers with commas, too.

What is the regular expression for a decimal with a precision of 2?  Valid examples:  123.12 2 56754 92929292929292.12 0.21 3.1   Invalid examples:  12.1232 2.23332 e666.76   The decimal point may be optional, and integers may also be included.


div's width is 100% so there's lot of extra space left at right. I want div to wrap the text inside it i.e. no extra space should be left in the block. How to achieve it? <div style="border: 1px solid black;">   Hello there! </div>

I have a layout similar to:  <div>     <table>     </table> </div>   I would like for the div to only expand to as wide as my table becomes.


Windows offers the option of using either RDP encryption or SSL (TLS 1.0) to secure a remote desktop connection. Which option is more secure?  Given the recent discoveries, is TLS 1.0 still secure in this use case?  This is the description Microsoft provides   RDP: The RDP method uses native RDP encryption to secure communications between the client and RD Session Host server. If you select this setting, the RD Session Host server is not authenticated. SSL (TLS 1.0): The SSL method requires the use of TLS 1.0 to authenticate the RD Session Host server. If TLS is not supported, the connection fails.   UPDATE: I'm referring to the POODLE vulnerability discovered recently that TLS 1.0 is no longer secure

Is windows built-in Remote Desktop secure? I mean, does it use any encryption methods? or someone can hijack the data that have been transferred between two system?


I am trying to convert an Esri shapefile, e.g. wards boundary data, to a Geojson file format.

I'm trying to convert Shapefiles from the  website into a GeoJSON file for use with Google Maps API. I'm using QGIS to facilitate but I can't get the projection/coordinates right. So far I've tried Google Mercator (EPSG:900913) and WGS 84 (EPSG:4326) with no luck. I'm using the OpenLayers to verify results and it keeps placing Texas near the  Gulf of Guinea (0 lat, 0 lng).


So I am having an issue, I put my self to the test of creating a 2D sandbox game kind of for fun, but has turned out evolving into something a bit more after about a week, but, to the point, I am saving chunk data into a few files, these are just .file or, just the most basic file type I assume, and the problem persists even using .txt files. So what's happening is after saving a file containing the object name, x, and y positions, I am creating an object in a linked list using that information, when I enter a new "chunk", but things are not exactly right, somehow, my images load up for the tiles correctly, which is handled in the constructor for that tile, being called after it is added to the list, however, what made me notice is I have a check in the tiles update method, to see if it wants to change to a different grass texture, and it doesn't happen, so I did some checking and printing, and well, I can tell that the name variable certainly contains the desired name, eg. "dirt", however it does not equal "dirt", so I thought it was catching some spaces and I even trimmed the String, and when I run a test like   if(name == "dirt")System.out.print("dirt is actually "+name); else System.out.print("dirt is apparently not "+name);  and the result is always, "dirt is apparently not dirt", with no spaces, and even when looking in the actual file I save it to, it saves the name fine, I have them saving in an order like so;  name x y eg.      dirt 0 560 dirt 28 560  and so on, these all load in position perfectly fine and what stumps me is that the initial image loads in correctly, which is quite explicit, a switch statement to determine what the image, material type and such should be..  I was wondering if anyone has come across something like this and what it could possibly be.  Also any code desired I will add to the desc.  (I didn't know so many people would be so quick to help. Thank you all, I know it was a simple problem, but it had me super confused, now thanks to you all I understand something about comparing variables and objects I should have really known before, and which is really important .)

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I constantly hear the terms "small cap" and "large cap" while watching the financial channels on TV.  What is meant by small/large market cap?    How do they relate to a stock valuation?

When I look at my Google finance page, and I look at a company, lets say Citigroup for example, and I see that the market cap is 83.45 billion, what does that mean?  Does that mean Stock Price X Number of shares outstanding?  Because if so, that doesn't add up.  Also, by issuing more shares of a stock, does a company affect their market cap?


I am a beginner and have been using Ancestry.com but German records seem to come to a halt at the WWI.   What can be used to search further back?

I've been researching my family history, and I hit a roadblock. The oldest records I can find are from German church records in the early eighteenth century. I can find nothing older. Is this a reasonable amount for German ancestry?


I have been tirelessly trying to install Ubuntu-18.04 since the last 2 days, but every attempt turned out to be negative. Apart from other GUI based problems, which I am reporting here.  When mounting the ISO using the inbuilt Disk Image Mounter utility, and attempting the GUI base upgrade method (from within Ubuntu-16.04.1).  I get a pop-up saying      Oops! There was a problem running this software.   Unable to locate the program.   When mounting the ISO and attempting an upgrade through the terminal, the gksu sh /cdrom/cdromupgrade command leads to a blurred screen prompting for the password and then does nothing. Replacing gksu with sudo returns cdromupgrade command not found.  When booting from a live flash drive (created from the same ISO), the installation freezes at the network page after I enter the password for my wifi. When using a wired connection, the network page does not appear. The installation freezes at the page where it asks for Normal or Minimal installation. It even has options for Install Updates and install Third-Party Drivers etc (the 3rd page of the installation). I have tried different combinations of options, but the installation never proceeds further. Sometimes, it even freezes at the keyboard selection page (the 2nd page of the setup).  I have already verified the integrity of the downloaded ISO through a checksum verification. It is perfectly OK.  Current OS: Ubuntu-16.04.1 (latest kernel, as per apt-get) Machine   : MSI GV62 7RD

I'm using Ubuntu 10.04 now and want to Upgrade to Ubuntu 11.04. The problem is my net connection is very slow and I can not do a network upgrade from the "Updates Manager".  So, is there a way that I can download the Ubuntu upgrade as an bootable CD image and upgrade from it?


This shows you all pls help my about my storage .how can i get it

See pic - the numbers don't add up!   Screenshot (click for larger variant)  This is a 16GB Nexus 7 The listed items only add up to a little over 9GB. So 4GB worth of files are missing.  How can I find those missing files?


I can't figure out how to prevent my iPhone SE (iOS 10.2) from vibrating when messages arrive while I'm on a call (that is, it vibrates right into my ear). This happens regularly, and I'm sure it occurs with other models/software versions.  I cannot find any setting regulating this, therefore it looks like a major bug: it doesn't have any function and interferes with the normal phone usage.  Does anybody know if anything has been/is being done with respect to this issue?

When I'm in a phone call, I still get alerts for emails and texts. The noise will play and, if the phone is on Speaker, it will vibrate -- often leading the person I'm talking to wonder what that weird noise was.  Surely there must be a way to silence the phone while you're talking on it. It's very distracting to have beepings going off right next to your ear!


I bought a Nintendo DSI console in 2011 from Australia and I would like to buy a DS game online but it ships from America. Would the game still work on my device?

I have a friend in South Africa who is thinking about buying a Nintendo DS. It's hard to find games in her city, though, so I was thinking I'd buy several in the USA and mail them to her.   Would this work or are Nintendo DS games region locked?


When writing a sentence, can I change from past-tense to present-tense in the middle of it? For example,     Joey realized that the ball is green.   or     Joey realized that the ball was green.   I am talking about a ball which is always green. The second example implies that the ball was green and that it may or may not still be green. However, Joey realizes it in the past. Is the first sentence grammatically correct?

I know the past tense carries the past tense in every dependent clause, but referring specifically to places or to things that are eternal, like the Earth, seems a bit weird and therefore we sometimes (I believe incorrectly) say     He didn't know that New Jersey was actually on the East Coast.   Because it still is. Or     He thought the Earth was round.   So is it square now?  Logically speaking, would you consider the use of past tense here a bit confusing in a day-to-day speech in these examples? Would you instinctively opt for using the present tense?


I am trying to install the lib32asound2 (dpkg -i lib32asound2_1.0.25-4ubuntu4_amd64.deb ) package on Ubuntu 13.1 but instead I get this message:  (Reading database ... 224124 files and directories currently installed.) Preparing to replace lib32asound2 1.0.25-4ubuntu4 (using lib32asound2_1.0.25-4ubuntu4_amd64.deb) ... Unpacking replacement lib32asound2 ... dpkg: dependency problems prevent configuration of lib32asound2:  lib32asound2 depends on libasound2 (= 1.0.25-4ubuntu4); however:   Version of libasound2:amd64 on system is 1.0.27.2-1ubuntu6.  dpkg: error processing lib32asound2 (--install):  dependency problems - leaving unconfigured Errors were encountered while processing:  lib32asound2   Could anyone help me out, please?

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


For some reason, I am not able to completely remove Kubuntu and all of its associated files from my computer.  I have tried many commands, including sudo apt-get purge kubuntu-desktop and the output is this:  Reading package lists... Done Building dependency tree        Reading state information... Done Package 'kubuntu-desktop' is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   Yet on start-up, the screen reads Kubuntu.  What a persistent package smh.  How am I suppose to get Kubuntu completely off of machine?

I have done this in the past in 16.04 and 17.10 but in 18.04 I can not get plymouth manager to work.  Downloaded it from the software center but it doesn't work.  Is there a guide available that will let me do it in terminal?


I asked a question on StackOverflow and after some time I found a duplicate of my own question. I thought it would be fair to mark my own question as a duplicate and I did. However, my question was put on hold as too broad which is something I would never want to do and it looks like I am one of the people who voted for it. If someone finds my question now it is impossible for him/her to reach the real answer. Why aren't they being counted separately? Such as;  Too Broad Votes = 4, Duplicate Votes = 1  Even though I don't think my question was too broad, I've rewritten the whole question from scratch and nominated it to reopen. Are the voters now aware that my question has been edited?  My question:    1st duplicate:    I mentioned about this 1st duplicate in my own question because it had no answer.  2nd duplicate:    I found the 2nd duplicate after I asked my own question. Even though I did a search on stackoverflow before asking mine, I couldn't find the 2nd duplicate because title, description and even the tagging is done poorly. Important keywords are not mentioned. I've come across this one by a coincidence, not by searching stackoverflow. But the real value lies here. The answer exactly solves these three problems above.  To summarize;  1- Why aren't the votes being counted separately as I've mentioned above?  2- Are the voters now aware that I edited the question?  3- What should I do to make my question open again? I have edited my question according to the rules, but how can it be reopened if no one sees my editing?  4- What should I do to reach the other voters and make them mark as a duplicate?

Questions can be closed or marked as duplicates.  What does it mean for a question to be "closed"? What does it mean for a question to be marked as a "duplicate"? Who can close a question? What are the reasons for closing a question ? Is closure the end of the road for a question? When are closed questions eligible for deletion?   Related        For more information, see "" in the .


If a unit can be placed after interface section or implementation, is there a difference in terms of code-performance? which one is preferred?  For example,  unit Example;  interface   uses   UnitA;  // preferred here?  implementation  uses   UnitA;  // or here?  end.

If I have a unit that is filled with constants like...  unit AConsts; interface const    Const1 : WideString = 'Const1';    Const2 : WideString = 'Const2';    Const3 : WideString = 'Const3';    Const4 = 100;    Const5 = 100; implementation end.   and I want to use this unit from another unit, is there any difference between...  unit AUnit; interface uses    AConsts; Implementation end.   and   unit AUnit; interface implementation uses   AConsts; end.   ?  The question is not about scope, avoiding circular references etc. It is about differences in the compiled application.  If UnitA, UnitB and UnitC all use AConsts, would there be a difference in the compiled application (assuming no name clashes between the constants in the AConsts unit and other code) between App1 where these UnitA, UnitB and UnitC all have AConsts in the interface section and App2 where UnitA, UnitB and UnitC all have AConsts in the implementation section.


I am trying to install kvm on Kubuntu 16.04 64-bit. I am following  documentation. When I try to install qemu-kvm with the following command given in the documentation:  sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils   I have the following errors:  http://be.archive.ubuntu.com/ubuntu/pool/main/c/ceph/librados2_10.2.0-0ubuntu0.16.04.1_amd64.deb 404  Not Found [IP: 91.189.88.149 80] http://be.archive.ubuntu.com/ubuntu/pool/main/c/ceph/librbd1_10.2.0-0ubuntu0.16.04.1_amd64.deb 404  Not Found [IP: 91.189.88.149 80]   Did I do something wrong (I just followed the documentation)? Is the documentation obsolete? Is there a workaround?  Thanks in advance!!

the following error is preventing me from installing anything on Xubuntu 11.10. How can I fix it??  $ sudo apt-get install meld Reading package lists... Done Building dependency tree        Reading state information... Done meld is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? Y Setting up flashplugin-downloader (11.0.1.152ubuntu1) ... Downloading... --2012-02-06 21:23:36--  http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin_11.0.1.152.orig.tar.gz Resolving archive.canonical.com... 91.189.88.33 Connecting to archive.canonical.com|91.189.88.33|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2012-02-06 21:23:36 ERROR 404: Not Found.  download failed The Flash plugin is NOT installed. dpkg: error processing flashplugin-downloader (--configure):  subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  flashplugin-downloader E: Sub-process /usr/bin/dpkg returned an error code (1)


Since a few weeks back and probably some Windows Update I have a new partition on my System that is 450mb large. If I look at it it's empty. I wouldn't really mind, but every five minutes I get this popup that there's low storage on the HD.  So I tried to expand this volume, but on this one I don't have the options to expand/decrease the volume.   All other partitins have the options

I upgraded Windows 10 to version 1803 recently, and I discovered that I now have an extra local disk (drive D) which only has about 500 MB space.  After checking in the Disk Management interface, I found that it is a small partition at the front of my drive. I remember this is where Windows stores a copy of the previous version and it should not be visible.  Is there anything wrong with my installation? Should I delete this partition?  Update  Based on discussions on SU and other sources from the Internet, this is a minor issue with the Windows update, and the partition can be hidden easily. Please check the answer section.


Suppose $\Omega$ $=$ $\Bbb N$. Verify that the following set of subsets of $\Omega$ is an algebra: $\mathcal A$ $=$ $\{$ $A$ $\subset$ $\Bbb N$ $:$ $A$ is countable or $A$$^c$ is countable $\}$

I wish to show that $$\mathcal{F} = \{A \subset \Omega: A \text{ countable or }A^c\text{ countable}\}$$ is a $\sigma$-algebra.  We have $\Omega^c = \emptyset$, so obviously $\Omega \in \mathcal{F}$.  Suppose $A \in \mathcal{F}$. Assuming $A$ is countable, $(A^c)^c = A$ is countable, so $A^c \in \mathcal{F}$. If we assume $A^c$ is countable, $A^c \in \mathcal{F}$ follows trivially.  Now let $A, B \in \mathcal{F}$. I wish to show that either $A \cap B$ or $(A \cap B)^c = A^c \cup B^c$ is countable. How would I start this part? I am only looking for hints.


I am currently a Canadian grad student about to publish my first paper. However, I really dislike my real legal name, to the point where very few of my real-life friends know my real first and last name. This is mostly because I come from China, and my legal name is a difficult-to-pronounce transliteration of my original Chinese name, which itself sounds very tacky and funny in Chinese. Even my parents are embarrassed at how they named me and use a totally unrelated nickname to address me even in Chinese. (to use an English analogy, I go by "Jake" when my real name is "Alexander")  Is it possible to publish consistently under a pen name that has no relation to your real name? I am not seeking to use it as a throwaway name for a single publication, but rather to simply be known as a different name. I don't even intend to hide my real name - it'll likely end up being in parentheses on my personal webpage or something. I just don't want to see a name I'm embarrassed of on every single thing I publish.

Is it possible to publish under a nom de plume (pen name, pseudonym)? ... and still take credit for the work?   I may have a chance to publish with the professor I am working with soon and if I am on the list of authors I would like to use a nom de plume, but I would also like to use the publication to apply to graduate schools next time. Is it possible to have my cake and eat it in the case?  EDIT: Sorry for missing this out; The reason for wanting to publish under a nom de plume is that I would merely want my career to be tracked under a different name. Not to hide identity; I am perfectly fine with what EnergyNumbers was suggesting.


This TextView has two functions. Firstly, it can switch the password between two status, HIDE and SHOW. Then it change the TextView text between "SHOW" and "HIDE". The first function can work perfectly. But the second didn't work very well. Whenever I open my app. The first click on the TextView, It only change the password status, but not the TextView text. Unless I click multiple times, both function would be work. After several test, I found only the TextView text can not work when I clicked the widget at the very first time. I am a noob on Android Studio, so I think this might be just a simple question. Are there anyone can tell me why this happened, please! Thank you!     TVtoggle.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {             if (TVtoggle.getText() == "SHOW") {              ETpassword.setInputType(InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);                 ETpassword.setSelection(ETpassword.length());                 TVtoggle.setText("HIDE");             }             else {                 TVtoggle.setText("SHOW");                  ETpassword.setInputType(InputType.TYPE_CLASS_TEXT |                  InputType.TYPE_TEXT_VARIATION_PASSWORD);                 ETpassword.setSelection(ETpassword.length());             }         }     });

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


if ||x + y|| = ||x - y|| then x and y must be orthogonal

Let $(X,\langle\cdot,\cdot\rangle)$ be an inner product space. Prove if $X$ is a real vector space, then  $\lVert x+y\rVert= \lVert x-y \rVert$ implies $x\perp y$.


I want to upgrade my ubuntu server 64bit 11.04 to ubuntu 12.04. I tried to do it with the command:  $ do-release-upgrade  but the output is:  Checking for a new Ubuntu release  No new release found  Does anybody know what the reason might be?

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


Let's assume I have a text talking about Mrs. Jones and I want to start a section talking about her childhood. Which of the following forms, if any, is valid?     Mrs.'s childhood   or     Mrs.' childhood   or     Mrs'. childhood   Is there a rule for the possessive of "Mrs." whose last letter is an s but not the last character? Or should this simply be avoided and     Mrs. Jones's childhood   has to be spelled out?

Many questions already ask about this topic ( , , etc.) and their answers vary, but they always give exceptions to the apostrophe-s rule, for example:      6.24 The general rule for the possessive of nouns covers most proper nouns, including most names ending in sibilants."   Examples they give include Kansas’s, Ross’s land, and Jones’s reputation. Exceptions include Jesus’  and Moses’.  Which names does this apply to?  Is the Aeneas’  form correct, or is it Aeneas’s instead?


I tried to install Skype on my PC, but it did not get installed. My friend ran the sudo apt update command. After the command had run he installed Skype. Then the installation ran easily.  So my question is, why wouldn't the installation run before running the command sudo apt update?

I understand that in apt, the command update, updates the list of available packages, but it does not upgrade software that was already installed from these packages.  I also understand that upgrade upgrades any software that I already installed from a package I updated with update as described above.  What was the reason of the Ubuntu/Debian developers to do this splitting of update and upgrade instead work with one command to do both tasks?  This is more of a question on the architectural philosophy of the Ubuntu developers.


I'm self-learning C from a book and currently studying pointers and arrays.  #include <stdio.h> #include <string.h> #define LINES 5 void main() {     char* str[LINES];     str[0] = "hola";     str[1] = "mundo";     *(*(str + 0) + 1) = 'Z';     printf("%c", *(*(str + 0) + 1)); }   Here I want to replace 'o' of "hola" with 'Z' but it's not working. if i remove:      ((str + 0) + 1) = 'Z'; I get 'o' in the output but how do i replace the character of the string?

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


I've been trying to make a firework launcher that repeats but I can only have it so it can turn on but never off. I've been using repeaters to go in a circle. I'm on Xbox 360 edition.

I want to create a Redstone clock that can be enabled and disabled with a lever permanently placed down.


If a DC motor is moving at 100-200 RPM and if I wanna stop it suddenly.  IS there any way to stop it quickly ?  I'm using H-bridge to provide current to the motor? I tried to reverse it for a while and then ground both the terminals. In this way motor suddenly stops and then moves forward. If I'm increasing reverse time then moves backward?  I tried to use reverse-forward, reverse-forward then grounding both the controlling bits ( of micro-controller) but still prob not solved ...

I know that many electric cars are able to convert the momentum of the car into stored energy in batteries, rather than convert it to useless heat at the brake pads. How does this work? How can I implement it myself?


For no appreciatable reason I've been trying to figure out 2-manifolds. Unfortunately, I've been struggling to find good enough sources on learning the basics, so it's pretty likely that my question will betray my lack of understanding of the basic topological concepts, which I believe to be a good thing.  Imagine we cut a circural hole in a sphere. It will have a single boundary. Let's also take a Möbius strip. It also has a single boundary. let's glue those boundaries together. What will be the resulting shape? What it will be homeomorphic to? It might be a cliché thing to say in the field, but I have hard times imagining the resulting object.  Might be a duplicate with  - I do not understand either the question nor an answer.  Okay, after getting some answers that cleared things up for me, and re-reading & re-analyzing the question above, I can confirm that indeed I posted a duplicate question. I'm sorry. :(

If we take a square and identify opposite sides, we get a torus. If we change the direction of one pair of sides we get the Klein bottle. If we change the direction of both sides, we get first a Möbius strip, then when I tried to glue the opposite sides I got a sphere with a singularity (ie the band is twisted into a point), is this process allowed, ie is it a topological sphere, is it possible to glue this together without a singularity if I had some extra spatial dimensions?  And given an $2n$-gon of sides $a_1$ to $a_{2n}$, which identifications of sides (pairwise and with $4$ possible directions), result in a smooth compact manifold, is there some rule to determine which manifold, and are all identifications allowed? How many diemsnions are needed for a smooth gluing process?


Some websites pop-up a message suggesting Sign in to 'me' with Google:    Examples:   medium.com seems to do this once (the setting is stored in a cookie; when I remove that the pop-up appears again); pinterest.com keeps nagging me everytime I follow a link to it (often from a Google image search).   How can I block these suggestions, from any website from now on? My Google-Fu fails me here because most search results are about Google search suggestions or automatically logging in with Google.  Notes:   I'm always logged into Google and want to keep that; I'm using FireFox; I'm using AdBlock plus, maybe there's something I can configure there?

I've recently begun seeing common pop-ups on sites on which I do not have an account. The pop-ups prompt me with my real name and Google sign-in email, which is being provided either by being signed in to Google/Gmail or being signed in to the desktop Chrome browser.  Sign in to example.com with Google Your Name email@example.com CONTINUE AS NAME To create your account, Google will share your name, email address, and profile picture with example.com. By continuing, you agree to example.com's privacy policy and terms of service.  The functionality providing this seems to be variously called: "Google ", "Google ", "You Only Log-in Once", the GoogleYOLO API for OpenYOLO, "Google One-tap sign-up and automatic sign-in", "Google Account sign-in prompts", "Sign in with Google", "Log in with Google", "Join with Google".  One-tap sign-up and automatic sign-in  You can provide seamless authentication flows to your users with Google's one-tap sign-up and automatic sign-in APIs. With one-tap sign-up, users are prompted to create an account with a dialog that's inline with your page's content, so they're never taken out of context by a sign-up page. With just one tap, they get a secure, token-based, passwordless account with your service, protected by their Google Account. And, of course, since there's such little sign-up friction, users are much more likely to register.  I frequently see the pop-up, obscuring the content, .  It is also being added to :   Large websites using this sign-in method include:   Sign in to medium.com with Google Sign in to nytimes.com with Google Sign in to eBay with Google Sign in to Quora with Google Sign in to trulia.com with Google Sign in to Tripadvisor with Google Use Pinterest with Google Use hipmunk.com with Google Create a wayfair.com account with Google    I don't object in principle to using my Google account to sign up for a service, but I do not want these pop-ups obscuring the site contents on page load. This pop-up feels like a "notification" from Chrome, prompting me to use my signed-in Chrome account. It appears to be something I should be able to disable, like , in my local copy of my web browser software. Or, if not a Chrome browser notification, it also feels like something I should be able to disable from my Google account settings. How do I disable these pop-ups and ensure they are not shown on any website? Settings-type changes preferred over content blockers, if possible.


Using a font with some distressing.  I need to remove the distress holes in the font.  When i try to get rid of the little holes, it's also getting rid of the large holes that make the letters o and f.  Is there an easy way to do this that I'm totally overlooking? Thank you!

I'm looking to make the entire letter solid. I want to complete the grungy white space and fill it out with solid black. Is there a simple way to do this?


The past tense of Bet, Let, and Set are Bet, Let, and Set; but the past tense of Jet, Net, Pet, Vet, and Wet are Jetted, Netted, Petted, Vetted, and Wetted.  Is there a reason for this difference?

This might just be  on my part, but it seems to me that if a verb ends is a "d" sound then it's a lot more likely to have an irregular past tense than an average verb picked out at random.  Examples include "feed/fed", "stand/stood", "rend/rent", "tread/trod", "betide/betid".  So, is this an actual pattern, or am I just imagining it?    And if it is a real pattern, what's the explanation?


Do I lose reputation on deleting my post with score -3? I just lost my reputation by 10.

On Stack Exchange, users may gain a certain level of reputation.  What does reputation do? How can a user gain or lose reputation?   See also   in the Help Center  - Maximum amount of votes a user can use in a day and reputation requirements to vote.  - How to get an exact overview of the actions that got you your reputation.  - A full list of all privileges granted at each reputation level on all sites.


I want to create an ADD gate like this:  in qiskit using elementary gates. Can it be done?

How to make a half adder for N inputs and getting the output on another x+1 output. Where x is numbers of qubit and N=2^x. please take a example of a circuit(x must be greater then 4 or 5 for example purpose ) for more understanding . Here is the  for 2 qubit half adder.


I have a simple function declared in header file and defined cpp file. When I delete the test_vector function in cpp file, I got this error. Undefined symbols for architecture x86_64:   "void chapter3::print_vector<int>(std::__1::vector<int, std::__1::allocator<int> > const&)",  referenced from:       _main in main.o ld: symbol(s) not found for architecture x86_64   What's going on here? //  chapter3.hpp   #ifndef chapter3_hpp #define chapter3_hpp  #include <stdio.h> #include <vector>  namespace chapter3 {  template<typename T> void print_vector(const std::vector<T>&);  }  #endif /* chapter3_hpp */   //  chapter3.cpp  #include "chapter3.hpp" #include <iostream> #include <vector>  using namespace std;  namespace chapter3 {  template<typename T> void print_vector(const vector<T>& vec) {     for(auto& elem: vec) {         cout << elem << ' ';     }     cout << endl; }  void test_vector() {     vector<int> u(10, -1);     print_vector(u); }  }   //  main.cpp  #include <iostream> #include <vector>  #include "chapter3.hpp"  using namespace std;  int main(int argc, const char * argv[]) {     vector<int> vec {1,2,3};     chapter3::print_vector(vec);          return 0; }

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.)


Unable to fetch data from my database all permissions are public and dependencies included. I am trying to print data to logcat, receiving NullPointerException  MainActivity.java   import android.support.annotation.NonNull; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log;  import com.google.firebase.database.DataSnapshot; import com.google.firebase.database.DatabaseError; import com.google.firebase.database.DatabaseReference; import com.google.firebase.database.FirebaseDatabase; import com.google.firebase.database.ValueEventListener;  public class MainActivity extends AppCompatActivity {      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);          FirebaseDatabase database = FirebaseDatabase.getInstance();         DatabaseReference myRef = database.getReference();         myRef.addValueEventListener(new ValueEventListener() {              @Override             public void onDataChange(DataSnapshot dataSnapshot) {                 String co2=dataSnapshot.child("co2").getValue().toString();                 String humi=dataSnapshot.child("humi").getValue().toString();                 String temp=dataSnapshot.child("temp").getValue().toString();                 Log.i("kkk","hhh"+ co2 +" "+humi +" "+temp);                 // ...             }              @Override             public void onCancelled(DatabaseError databaseError) {                 // Getting Post failed, log a message                 Log.w("p", "loadPost:onCancelled", databaseError.toException());                 // ...             }         });      } }

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?


This is the question: Find the sum of $$\frac1 9+\frac2{9^2}+\frac3{9^3}+\ldots +\frac n{9^n}+\ldots$$ What I did was convert the whole equation to $$\frac{1\cdot 9^{n-1}+2\cdot 9^{n-2}+3\cdot 9^{n-3}+\ldots +n}{9^n}$$ I have no clue about what to do next. I would probably think that you would have to identify the sequence but I don't know how to get there from this.

How can I evaluate $$\sum_{n=1}^\infty\frac{2n}{3^{n+1}}$$? I know the answer thanks to , but I'm more concerned with how I can derive that answer. It cites tests to prove that it is convergent, but my class has never learned these before. So I feel that there must be a simpler method.  In general, how can I evaluate $$\sum_{n=0}^\infty (n+1)x^n?$$


My template code is as follows {% for content in contentlist %}

PRICE&nbsp;&#8208;&nbsp;                         {{content.price}}

       </div
            {% endfor %}  and I want to convert my price value into a comma-separated value using the js function. JS function is as follows window.onload=function(){   var price = document.getElementById("reservedPrice").innerText   x = updateTextInput(price)   document.getElementById("reservedPrice").innerText = x }  function updateTextInput(val) {   x = val.toString();   var lastThree = x.substring(x.length-3);   var otherNumbers = x.substring(0,x.length-3);   if(otherNumbers != '')       lastThree = ',' + lastThree;   var res = otherNumbers.replace(/\B(?=(\d{2})+(?!\d))/g, ",") + lastThree;   return res }  but in result looks . JS executing only on first entry. I want all prices to be comma-separated.

I'm trying to format numbers. Examples:  1     => 1 12    => 12 123   => 123 1234  => 1,234 12345 => 12,345   It strikes as a fairly common thing to do but I can't figure out which filter I'm supposed to use.  Edit: If you've a generic Python way to do this, I'm happy adding a formatted field in my model.


I have a small, long-running, embedded, NETMF program that stops for unknown reasons (see ). As a workaround, I would like it to automatically restart on fail. My sense is that a try-catch block could do this. How? Is this even possible? Is there a better approach?   public class Program {     private static Timer timer;           public static void Main()     {         Program p = new Program();          Program.timer =              new Timer(this.TimerCallback_DoSomething, new object(), 0, 1000);          Thread.Sleep(Timeout.Infinite);     }      private void TimerCallback_DoSomething(object stateInfo)     {         // do something     } }

How can I detect that my .NET application has crashed, and then restart it?


I have two websites, say a.com and b.com.  a.com is on a paid hosting service, and b.com is on 000Webhost.  000Webhost crashes sometimes, and my site b.com becomes unreachable.  So is there any way that I can:   create a copy of b.com, in a subfolder of a.com, like a.com/bdotcom If b.com is unreachable, redirect it to a.com/bdotcom If possible, keep the url as b.com

I'm looking for a simple solution to increase my website's uptime. My website consists of simple HTML and PHP pages with no database. Right right I use paid shared hosting and I sometimes find that my website is not loading.  Would it be possible to put my website on two hosts and in case the main host is down the other one would get used? What is the best way to set this up?


Today in class i have learned that an electric field is basically a region around the charged particle which will cause a force to be exerted on a charged object. I was wondering what if an object is neutral, would it still have an electric field?

Even if the atom is neutral (equal numbers of protons and electrons), the electrons and nucleus form an electrical dipole, so there is still an electric field around them, even though the total charge is zero. Is this reasoning correct? So, every atom has an electric field, even if it is too weak? If not, why?


i need make functions dict with for loop stringlist = ["A", "B", "C"] functions = dict()  for stt in stringlist :    functions[stt] = lambda: stt     functions["A"]()  # result-> # "C" functions["B"]()  # result-> # "C" functions["C"]()  # result-> # "C"

I want to create a list of lambda objects from a list of constants in Python; for instance:  listOfNumbers = [1,2,3,4,5] square = lambda x: x * x listOfLambdas = [lambda: square(i) for i in listOfNumbers]   This will create a list of lambda objects, however, when I run them:  for f in listOfLambdas:     print f(),   I would expect that it would print  1 4 9 16 25   Instead, it prints:  25 25 25 25 25   It seems as though the lambdas have all been given the wrong parameter. Have I done something wrong, and is there a way to fix it? I'm in Python 2.4 I think.  EDIT: a bit more of trying things and such came up with this:  listOfLambdas = [] for num in listOfNumbers:     action = lambda: square(num)     listOfLambdas.append(action)     print action()   Prints the expected squares from 1 to 25, but then using the earlier print statement:  for f in listOfLambdas:     print f(),   still gives me all 25s. How did the existing lambda objects change between those two print calls?  Related question:


We transpose a matrix $A$ by replacing $A_{ij}$ with $A_{ji}$, for all $i$ and $j$.  However, in case $A$ has more than two dimensions (that is, it is a tensor), I don't know how to apply the transpose operation.   If A has dimensions $3\times 3 \times 8$, then what will replace $A_{ijk}$?  If $A$ has shape $3\times 3\times 8\times 8$, then what will replace $A_{ijkl}$?


As I study the first part of abstract algebra, I have a question: why $\left\vert{\mathbb R}\right\vert = \left\vert{\mathbb R^2}\right\vert$?  And moreover, I knew the fact that $\left\vert{\mathbb R}\right\vert = \left\vert{\mathbb R^n}\right\vert$.  Does the equality apply to any infinite set? How can I prove them?

Is the cardinality of the Cartesian product of two equinumerous infinite sets the same as the cardinality of any one of the sets? I couldn't find this explicitly stated in any handout or text. This certainly seems to be true from the examples I have seen:  The Cartesian product of two infinitely countable sets is again infinitely countable. The Cartesian product of two sets with cardinality of continuum again has cardinality of continuum.


When coding my formatter, I give user an option to provide alt, title and classes attributes for an image. All render beautifully, except for the alt title, which is output as flag-type, empty "alt" attribute (meaning: no equal sign or quotes), regardless of what I try to insert there.  Could the Media module be the reason - such as overriding the alt value with some hooks? If not, any ideas on what could be causing that?

I've tried both 7.x-1/7.x-2 branches of the Media module and can't find a way to set the alt-attribute on a image field using the media-widget.  When I change to the image widget it's possible to set title/alt.


If as I flip a coin, the times I get heads approach the times I get tails then why isn't there a bigger chance to get tails in two coin flips if I first got heads?

A two-sided coin has just been minted with two different sides (heads and tails). It has never been flipped before. Basic understanding of probability suggests that the probability of flipping heads is .5 and tails is .5. Unexpectedly, you flip the coin a very large number of times and it always lands on heads. Is the probability of flipping heads/tails still .5 each? Or has it changed in favor of tails because the probability should tend to .5 heads and .5 tails as you approach an infinite number of trials?  I understand that flipping coins is generally a stochastic process, but does that change at all if you see a large number of trials bias to one side?


I would like to achieve such a result in Blender cycles My goal is to reach a glass texture with slight touches of irridescence. I figured out how to make something purely irridescent or purely glass but I didnt manage to give the impression of a slight irridescent touch. As if the irridescence was only on some little parts of my texture. So please, if you got any hints it would be of great help. Many thanks, stay safe.

Is it possible to create an  shader in Cycles? Specifically for something like , , , etc..


How can I calculate this finite sum? Can someone help me?       $$\sum_{j=0}^{n-1} j^2$$

Possible Duplicate:                I know that the sum of the squares of the first n natural numbers is $\frac{n(n + 1)(2n + 1)}{6}$. I know how to prove it inductively. But how, presuming I have no idea about this formula, should I determine it? The sequence $a(n)=1^2+2^2+...+n^2$ is neither geometric nor arithmetic. The difference between the consecutive terms is 4, 9, 16 and so on, which doesn't help. Could someone please help me and explain how should I get to the well known formula assuming I didn't know it and was on some desert island?


I dual booted ubuntu on my windows operating pc, then i deleted the ubuntu partition and restarted my pc. GRUB came up and it says ”minimal BASH-like line editing is supported. For the first word , TAB lists possible command completions.Anywhere else TAB lists possible device or file completions.” So first how do i get into my windows OS and second how do i get rid of this GRUB bootloader?

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


Are both of the above phrases correct or only the latter?   For example, if saying, 'Your understanding (of) my sense of humour was the only thing that made the dinner enjoyable'. Is the 'of' necessary?  Similarly: 'Your support of the project was invaluable'. vs 'Your supporting (of) the project was invaluable'.   I know, in this case, use of the gerund 'supporting' would be unlikely since it sounds clumsy in comparison to 'support', but for the sake of argument I was curious whether it sounded correct to use the 'of' in the gerund phrase - to me 'Your supporting the project was invaluable' sounds more natural than 'Your supporting of the project...' but I find this difficult to reconcile with the necessary use of 'of' when using 'support' (you obviously can't say 'Your support the project was invaluable.').   I suppose, 'Your supporting the project was invaluable' could be justified grammatically since 'supporting the project' is a gerund phrase. Referring back to the first part of the question, 'Your understanding my sense humour was...' would also be correct since 'understanding my sense of humour' is again a perfectly good gerund phrase - but here, the inclusion of 'of' sounds more natural.   Curious what others would tend to use/regard as correct in these sentences (or for similar phrases)

While writing a sentence the other day, it struck me that the following phrase has an odd feel to it that I cannot explain:    Everyone will benefit by your being well cared for.   I kept wanting to use you're but I knew that wasn't right yet somehow the word your in this context feels sort-of possessive (as it should) and at the same time sort of verb-like. I can't explain it any better than that and maybe someone with better grammar chops than I have can help me understand how it fits grammatically in this context.     Another way looking at this might be: "Why does this usage of your seem to create a grammatical dissonance?"


A few days ago I apt-get installed vim-gtk, when suddenly the installation stopped and I killed my VM (Without letting it finish the installation). Ever since then, when I try to log in, after entering the password I see the screen loading but suddenly it logs out to the login screen again (after few seconds)...   I'm using Ubuntu desktop 16.04 Same behaviour when I log in with different users or guest Still, can have root terminal when logging through ubuntu recovery mode   Any ideas how to fix it? Thanks...

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M


I have a bibliography entry with a german umlaut in the name. In the .bib file the character is correctly escaped: author={B{\"o}ttcher}  The corresponding entry in the .bbl file no longer contains the escape sequence but the ASCII character ö: \entry{Bott02a}{inproceedings}{}   \name{author}{2}{}{%     {{hash=471f6641bcc35e7859446a7099bd375c}{%        family={Böttcher} ...  In my bibliography then the entry is printed without the umlaut as "Bttcher". Manually replacing the ASCII ö with {\"o} in the .bbl file fixes that. What do I have to do to get the ö in the output? Notes:  I use  and  I use a custom bibliography style based on "standard" I do not use any encoding packages explicitly I have tried configuring  with texencoding and safeinputenc without success  Edit: Here's a minimal working example test.tex: \documentclass{book} \usepackage{biblatex} \addbibresource{test.bib}  \begin{document}   \cite{Bott02a}   \printbibliography \end{document}  test.bib @inproceedings{Bott02a,   title={title},   author={B{\"o}ttcher} }  Run with lualatex test; biber test; lualatex test; open test.pdf Update: If you happen to be unlucky (like me) you'll be using mylatexformat to precompile your preamble. In that case fontspec will give you hell. Here's a trick that makes it possible to use fontspec within the preamble (taken from ): \documentclass{...} ... \RequirePackage{etoolbox} \AtEndPreamble{   \usepackage{fontspec} } ... \endofdump  Note that fontspec will not be compiled into the format and thus loading time for fontspec cannot be improve by precompilation.

Biblatex works fine with pdflatex, but when compiling with Xelatex, suddenly accents disappear.  MWE:  \documentclass{article}  \usepackage[ backend=biber, style=alphabetic, citestyle=authoryear  ]{biblatex}  \usepackage{filecontents} \begin{filecontents*}{temp.bib}     @article{Beck_Johnson_2013,         title               ={The Effect of Temperature on \textit{{Anopheles}} Mosquito Population},         author              ={Bj{\' o}rnstad, Ottar N.},         year                ={2013},         journaltitle        ={PLOS ONE}     } \end{filecontents*}  \addbibresource{temp.bib}  \begin{document}  \cite{Beck_Johnson_2013}  \printbibliography \end{document}   With Xelatex:   With Pdflatex:


Python seems to skip my if statement. is_hot = "" true_or_false = input("True or False? ").lower()  if true_or_false == "true":     is_hot == True elif true_or_false == "false":     is_hot == False else:     print("You didn't type true or false")  #The skipped if statement: if is_hot == True:     print("It's a hot day")     print("Drink water.") elif is_hot == False:     print("It's not hot.")  print("Enjoy your day")  The output is just the last print statement.

My  has failed me.  In Python, are the following two tests for equality equivalent?  n = 5 # Test one. if n == 5:     print 'Yay!'  # Test two. if n is 5:     print 'Yay!'   Does this hold true for objects where you would be comparing instances (a list say)?  Okay, so this kind of answers my question:  L = [] L.append(1) if L == [1]:     print 'Yay!' # Holds true, but...  if L is [1]:     print 'Yay!' # Doesn't.   So == tests value where is tests to see if they are the same object?


Let $f:[a,b] \to [0, \infty)$ be continuous , then is it true that $\lim_{n \to \infty} \Bigg(\int_a^b \big(f(x)\big)^ndx \Bigg)^{1/n}=\sup \{f(x):x \in [a,b]\}$ ?

Could someone help me prove that given a finite measure space $(X, \mathcal{M}, \sigma)$ and a measurable function $f:X\to\mathbb{R}$ in $L^\infty$ and some $L^q$, $\displaystyle\lim_{p\to\infty}\|f\|_p=\|f\|_\infty$?    I don't know where to start.


Do the Borg exist in the Mirror Universe? If so, have they encountered the Empire or Alliance?  Or, have the Prime Borg Ever crossed into the Mirror Universe?  Otherwise, how is it that the Borg could be unaware of Alternate Universes in which they could invade with ease or at the least ally themselves with more Borg?

Is there any canon reference to the Mirror Universe Borg that would explain more about them?   I've tried searching on my own and haven't found anything.


I'm having a dilemma, I am trying to make a Prison Game in vanilla Minecraft, but can't make a part work.  I give the players this command to stop them from breaking blocks /gamemode a @a[r=40]  When they enter onto the logs they are switched to survival /gamemode s @a[r=17]   This is my problem:  From the logs, where they are in survival mode they can still reach the wood planks and destroy them up until the lime green wool     I hoped the gamemode switch would solve this, but unfortunately it didn't quite do it.  So I was thinking there may be a way to stop this and I need them to be unbreakable or something like it.

I am creating a map on Minecraft, and I want the players to break certain blocks like trees, but I don't want them to break other blocks like stone bricks. Is there any command that can help me?


I wanted to delete all my partitions and merge all the space to the Macintosh HD but I made a mistake by taking the Macintosh HD volume out of the physical storage list. I don't know what happened:       I just want to delete all the space that's not in the Macintosh HD and merge all the free space too.

I have encountered a nearly identical issue to the one  (and this too: ), but my hard drive's main partition is formatted in APFS. When I tried correcting the GUID error as shown in the answer, after reaching the step in which the following command: gpt add -i 2 -b 409640 -s 372637568 -t APFS /disk0 had to be entered, it returned an error: usage: gpt add [-b lba] [-i index] [-s lba] [-t uuid] device ....     I cannot boot into macOS, my computer is in internet recovery environment. What's the uuid of the new APFS format? I cannot seem to find it anywhere in the web, and my computer isn't detecting the type of the main macOS partition. My computer's model: MacBook Pro late 2013. My data is not backed up and I would really love to recover it. Update:  gpt -r show disk0:    Update: I created a MacOS High Sierra Installation disk, and rebooted to it. The new disk utility does not recognize the disk0s2 partition at all, and diskutil list included the size of the main osx partition in GUID_partition_scheme part of the disk. Would it be possible (and how) to recover the data of the deleted partition (s2) if I reinstalled macOS on an existing unused partition (the Linux partition disk0s4)?


I want to accept string that begins with s than the next character (whatever it is) must be conatined in script two more times (but not less, not more) and before this char cannot be a backslash. So:  s(.)[now some chars except (.) and not ending with \]\1[some chars but not (.) and not ending with \]\1[some chars but not (.)]   \1 and (.) and s are real part of regex

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?


Excerpt from Introduction to Black hole physics, Valeri P. Frolov and Andrei Zelnikov.  In this textbook, there is comment about spin of gravitons as follows:     For gravitating bodies the gravitational charge i.e. their masses,   always have the same sign and they attract each other. This property   is directly connected with the fact that gravitons have spin 2, while   the photons have spin 1.   Can anybody explain to me the reason, why spin 2 is related with attractive force in more detail?

Why gravity is an attractive force?     One may say that it is because of space time curvature but General Relativity is built on this law: $\displaystyle G \frac{m_1 \times m_2}{r^2}$ (To be more precise, it is  from it's potentiel form known as  that can be written like this: $\nabla \cdot g = - 4\pi Gp  $). So GR can't explain why gravity is attractive. General Relativity only explains how gravity occurs in terms of space time.    Another may stick with the Quantum theory stating that gravitons are responsible for the force of gravity, but why a massless particle with spin 2 will exchange positive momentum?


I have written a game for Facebook. I think the game is fun to play, although the graphic presentation is primitive since I am not a graphic artist/web designer  I am the only Facebook user playing the game at this time. It does not appear to appeal to FB's demographic audience who seem to prefer less complex and less challenging games. Does anyone have any ideas on how I could get the word out about my game to the proper audience while spending very little or no money?

I am a beginning indie developer, and I want to get the word out about my game. What sites can I go to to ask about reviews of my game, and where might I be able to talk about and get feedback on my game from players?


I am trying to use C++ vector instead of C arrays, but I have some problems. This is my code:  size_t i; //Filter save files for (i = 0; i != files.size(); i++){     cout << files.at(i).find(FILE_HEAD) << ' ' << files.at(i) << endl;     if ((files.at(i).find(FILE_HEAD) != 0)){         files.erase(files.begin() + i);     } } cout << "Found files:\n"; for (i = 0; i != files.size(); i++){     cout << i << " - " << files.at(i) << endl; }   files is a std::vector<std::string> and I want to remove all elements which not contain FILE_HEAD. But this doesn't work properly, in my test file.size() is 14 but it goes in for only 7 times. Can anyone help me? Thank you!

I want to clear a element from a vector using the erase method. But the problem here is that the element is not guaranteed to occur only once in the vector. It may be present multiple times and I need to clear all of them. My code is something like this:  void erase(std::vector<int>& myNumbers_in, int number_in) {     std::vector<int>::iterator iter = myNumbers_in.begin();     std::vector<int>::iterator endIter = myNumbers_in.end();     for(; iter != endIter; ++iter)     {         if(*iter == number_in)         {             myNumbers_in.erase(iter);         }     } }  int main(int argc, char* argv[]) {     std::vector<int> myNmbers;     for(int i = 0; i < 2; ++i)     {         myNmbers.push_back(i);         myNmbers.push_back(i);     }      erase(myNmbers, 1);      return 0; }   This code obviously crashes because I am changing the end of the vector while iterating through it. What is the best way to achieve this? I.e. is there any way to do this without iterating through the vector multiple times or creating one more copy of the vector?


I have an object, called Object_Assoc, this object is supposed to store bitmap images into its member variable o_memory. I call the helper function setO_memory, with the bitmap image to set as the parameter. However this is crashing my application. I create the bitmap image, by using the android camera API.  public void takePicture(View view) {     Intent imageTakeIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);      if (imageTakeIntent.resolveActivity(getPackageManager()) != null) {         startActivityForResult(imageTakeIntent, REQUEST_IMAGE_CAPTURE);     }  }  @Override protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {      if (requestCode == REQUEST_IMAGE_CAPTURE && resultCode == RESULT_OK) {         Bundle extras = data.getExtras();         Bitmap imageBitmap = (Bitmap) extras.get("data");          // Need to set image of Object here to object.          newObj.setO_memory(imageBitmap);          setContentView(R.layout.view_existing_obj_pop_up);          final ImageView mImageView = findViewById(R.id.clickedObjImage);          // Write object to Palace File         listOfMyPalaces.writePalacesFile(MyPalaceDetail.this);          // Set image         mImageView.setImageBitmap(imageBitmap);          // Sets the current view back to the palace detail(Unsuccessful though)         setContentView(R.layout.activity_my_palace_detail);          // Resets the Dialog to include the image that has been taken with the camera         init();         initDraggingListening();     } }   java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=101, result=-1, data=Intent { act=inline-data (has extras) }} to activity {memorypalace.palace14/memorypalace.palace14.MyPalaceDetail}: java.lang.NullPointerException: Attempt to invoke virtual method 'void memorypalace.palace14.classes.Object_assoc.setO_memory(android.graphics.Bitmap)' on a null object reference

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?


I must be missing something. I created a service account that will run a script I created as a cron job. The script links files to be processed to a watched folder. The script worked fine running as root, but I thought it was best to use a service account and have the cron job run hourly under that account. Now I'm running into permissions issues when I try to create files/folders as the service account.    [root@analysis ~]# ls -l /watched/robert.sicko/  total 24   drwxrwx--- 20 srvArcherNBS srvArcherNBS 20480 May  8 11:35 XXX   drwxrwx---  2 srvArcherNBS srvArcherNBS  4096 May  4 11:04 test  [root@analysis ~]# su -c "touch /watched/robert.sicko/test/abc.completed" srvArcherNBS  touch: cannot touch `/watched/robert.sicko/test/abc.completed': Permission denied   Other info. The server runs CentOS release 6.10.  watched, robert.sicko and test directories already existed, I changed ownership of /watched/robert.sicko/* to the service account with:   chown -R srvArcherNBS:srvArcherNBS /watched/robert.sicko/*   the /watched dir isn't owned by srvArcherNBS, but changing the group of /watched and /watched/robert.sicko to srvArcherNBS didn't change anything  [root@analysis watched]# ls -l total 4 drwxrwx--- 4 apache archer_daemon_web_access 4096 May  4 11:04 robert.sicko   edit to add result of ls /watched/robert.sicko/test/abc.completed:  [root@analysis /]# ls -l /watched/robert.sicko/test/abc.completed ls: cannot access /watched/robert.sicko/test/acb.completed: No such file or directory   edit2 to add to the weirdness - running ls with su as srvArcherNBS gets permission denied but if I su srvArcherNBS, I can then ls.  [root@analysis robert.sicko]# pwd /var/www/analysis/watched/robert.sicko [root@analysis robert.sicko]# su -c "ls -la /var/www/analysis/watched/robert.sicko" srvArcherNBS ls: cannot access /var/www/analysis/watched/robert.sicko: Permission denied [root@analysis robert.sicko]# su srvArcherNBS [srvArcherNBS@analysis robert.sicko]$ ls -la total 32 drwxrwx---  4 apache       srvArcherNBS  4096 May  4 11:04 . drwxrwx---  3 apache       srvArcherNBS  4096 Mar 27  2019 .. drwxrwx--- 22 srvArcherNBS srvArcherNBS 20480 May  8 15:10 XXX drwxrwx---  2 srvArcherNBS srvArcherNBS  4096 May  4 11:04 test [srvArcherNBS@analysis robert.sicko]$   output of mount  [root@analysis robert.sicko]# mount /dev/mapper/VolGroup-lv_root on / type ext4 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw) /dev/sda1 on /boot type ext4 (rw) /dev/mapper/VolGroup-lv_home on /home type ext4 (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) //prd/agtcnbs on /mnt/agtcnbs type cifs (rw             )

If I have a root folder with some restrictive permission, let's say 600, and if the child folders/files have 777 permission will everybody be able to read/write/execute the child file even though the root folder has 600?


Googling shows me a lot of results for software architecture. But I'm looking for the traditional one :-)

I would like to ask a question not about software architecture, but physical architecture, i.e., the design of buildings and other elements of the "built environment".  I was looking for a Stack Exchange site to ask what the meaning is of the huge stone symbols on the side of the new Scottish Parliament building.


I have this ajax call which its result is in a json format  $.ajax({     url: link,     dataType: "json",     success: function(data){         console.log(data); //C.L-1         console.log(data.length); //C.L-2     } })   And here is the result  $users_arr = array(); //After a successful query from my database While($sql = mysqli_fetch_array($query)){     $user_id = $sql['id'];     $user_age = $sql['age'];     $user_name = $sql['name'];     $users_arr[$user_id] = $user_id.','.$user_name.','.$user_age; } echo json_encode($users_arr);   Now the C.L-1 returns true but the C.L-2 returns undefined. I thought the data returned is an array on it's own so I want to run a for loop for each user like this  for(var i = 0; data.length > i; i++){     eachUser = data[i];     userInfo = eachUser.split(',');     userId = userInfo[0]; // and so on for the other info     $('div#age'+userId).html(userAge); }   But the problem is that the data.length returns undefined which prevents me for running my for loop. Please any better help?  Edit here are some data from C.L-1  Object {8: "8,debbie,23", 3: "3,doggie,20", 7: "7,dini,22"}

I have a JavaScript object like the following:  var p = {     "p1": "value1",     "p2": "value2",     "p3": "value3" };   Now I want to loop through all p elements (p1, p2, p3...) And get their keys and values. How can I do that?  I can modify the JavaScript object if necessary. My ultimate goal is to loop through some key value pairs and if possible I want to avoid using eval.


I am currently trying to animate transitions between four different directions. I have four total animations for walking, and another four for the idle state. I cannot seem to figure out why when I try to transition from a walking state to another walking state in a different direction (not the direction I am idling in) it must wait for the walking animation to finish, and then play the walking animation in the new direction.    You can see my sprite begin to walk forward, and then when I attempt to turn south the animation it continually plays the north animation until the animation is finished. What I am trying to achieve is a smooth transition that switches immediately.   I know very little about animating and much more about programming. My list of attempted solutions is very short, and limited to only changing the length of each animation.

I'm trying to make a simple idle-walk transition in Animator using Unity. I've set a script that changes the Speed value from the Animator, and it works perfectly when I move the character forward when the game is on.  The transitions work well between both animations, except that they don't start automatically after the speed has changed to greater than zero.  I've found out that it waits until the animation loop gets to it's end, which makes the game feel dull and not fluid at all.    I don't think there's an issue with the code, but I'm attaching it anyway:  #pragma strict var anim : Animator;  function Start () {     anim = GetComponent("Animator"); }  function Update () {     var move : float = Input.GetAxis ("Vertical");     anim.SetFloat("Speed",move);     transform.Rotate(0,Input.GetAxis("Horizontal"),0);     transform.Translate(0,0,(Input.GetAxis("Vertical")*Time.deltaTime*move)); }


For which $m$ do all occurrence of 1 lie on the diagonal of the multiplication table of $\mathbb{Z}_m$?  I was think i have got a prove and find all the $m$ is $1,2,3,4,6,8,12$ and $24$. but after a while, there is a bug in my prove.   suppose $m>10$ and $<10$ part is too simple first $m$ cannot be odd, or $(2,m)=1$ and there is x such that $2x\equiv1\mod{m}$, so $x\ne2$ for $m>10$ and this will against the 1 lie on diagonal.  if $(3,m)=1$, then $3^2\equiv1\pmod{m}$, then $m\mid8$ impossible too. so $3\mid m$.  if $(5,m)=1$, using the same strategy, $m|24$, with $m>10$ verify $\mathbb{Z}_{12}$ and $\mathbb{Z}_{24}$ is a solution. so we just consider $5\mid m$.  I also verified $7\mid m$, so $m=210\cdot Q$, $Q\in\mathbb{N}$.  then, if $x\in\mathbb{N}$ and $x<\sqrt{m}$, that is $x^2<m$, so $x^2\not\equiv1\pmod{m}$....  so how to continue...

Find all positive integers $n$ such that $a \equiv a^{-1} \pmod{n}$ for all invertible $a$ modulo $n$.   I found that $n = 1,2,4,6,8,12,24$ satisfy this. How can we prove that these are all of them?


Can anyone recommend any type of tennis shoe that could help me not to slip while on my mountain bike but without having to use clippers. The thing about clippers is that I hate not having enough time to react when I´m close or about to fall.

It's an old argue on forums, still cant get it. What is the (real, that worth the money and time for ordering from abroad, in my case) difference, let's say between  shoes and some kind of old school skate shoes (the fat ones, like )?  P.S as far as I know most dirt BMXers are quite happy with regular skate shoes.


In general how do you decide what trace width to use?  I prepared a PCB layout with the trace width mainly 0.4064 mm and couple of them are 0.3048 mm. power ratings are 5V , 12V at max 0.4A. What would be the smallest trace width that would be fine with that ratings?  I am going to have a trace for a power unit. I will connect the outlet supply (220-240V), what trace width would you recommend for it?

Is there a standard for the sizes of PCB traces?  That is are some 25 mil and others 10 mil or is can you choose your own?  I plan to run 400mA through some thicker traces, but less than 30mA for all other traces. About what size would I need?


If I've an array:  stuff = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]   How can I save it on the following format? 5 values + coma + other 5 values + coma, etc.  12345, 678910, 1112131415   What I've tried and it's not giving me the desired solution:  f = open('file.txt') for item in stuff:   for i in xrange(5):       f.write("%s", item)   f.write(", ") f.close()   Thanks in advance.

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


I am having trouble with my custom made titletoc/titlesec. I read in the documentation (missed it?), googled and searched this forum but could not find what I needed.  First what I want:  I have a long chapter title and I want a short version of it in the TOC. I found so far to use:  \usepackage[toctitles]{titlesec} \chapter[short for TOC]{long for chapter heading}   As I redefined my own TOC this does not work. I guess I would have to enter this in my redefined TOC, but I don’t know how and where. Here what I did in a minimal example:  \documentclass[12pt,twoside,reqno]{amsbook}   %linksbuendige chapter, section, subsection \usepackage{titlesec} \newcommand*{\justifyheading}{\raggedright} \titleformat{\chapter}[display]   {\normalfont\huge\bfseries\scshape\justifyheading}{\chaptertitlename\ \thechapter}  {14pt}{\Large\scshape} \titleformat{\section}   {\normalfont\large\bfseries\justifyheading}{\thesection}{1em}{} \titleformat{\subsection}   {\normalfont\normalsize\bfseries\justifyheading}{\thesubsection}{1em}{} \titleformat{\subsubsection}   {\normalfont\normalsize\justifyheading}{\thesubsubsection}{1em}{} \titleformat{\paragraph}   {\normalfont\normalsize\itshape\justifyheading}{\theparagraph}{1em}{}   %Inhaltsverzeichnis formatieren \usepackage{titletoc} \newcommand\frontmatterchaptoc{% \titlecontents{chapter}   [1.4em]{\addvspace{3pt}}   {\contentslabel{-0.25em}\hspace{2em}}   {\hspace*{-1.3em}\bfseries}% \MakeUppercase removed   {\titlerule*[0.3pc]{.}\contentspage} }  \titlecontents{section}[3.7em]{}{\contentslabel{2.3em}}{\hspace*{-2.3em}} {\titlerule*[0.3pc]{.}\contentspage} \titlecontents{subsection}[5.9em]{}{\contentslabel{2.3em}}{\hspace*{-2.3em}} {\titlerule*[0.3pc]{.}\contentspage} \titlecontents{subsubsection}[8.9em]{}{\contentslabel{3em}}{\hspace*{-3.3em}} {\titlerule*[0.3pc]{.}\contentspage} \titlecontents{paragraph}[12.6em]{}{\contentslabel{3.7em}}{\hspace*{-3.7em}} {\titlerule*[0.3pc]{.}\contentspage}   \begin{document}   \tableofcontents  \chapter[Title I want to see in TOC - short]{Title I am seeing in TOC - long} This is chapter 1  \end{document}   It does not matter if I enter   \usepackage[toctitles]{titlesec}   or just  \usepackage{titlesec}   I hope someone knows how to integrate this into what I have so far!  Cheers  Summer

for my thesis I want to have a section appear differently in the ToC than in the text.  After googling a bit, I found \section[short]{long} as a proposed answer, but this does not seem to work for me.  Here is a MnotWE:  \documentclass[12pt,a4paper,reqno]{amsbook} \usepackage{fontspec} \setmainfont[SlantedFont={Latin Modern Roman Slanted},          SmallCapsFont = {Latin Modern Roman Caps},          ]{Latin Modern Roman}    \usepackage[activate=true,nocompatibility},final,tracking=true,factor=1100,stretch=10,shrink=10]{microtype}  \usepackage[bindingoffset=1cm]{geometry} \usepackage{polyglossia} \setdefaultlanguage{english} \usepackage{csquotes}  \title{\textsc{Some Title}} \author{me}  \begin{document} \maketitle \frontmatter \tableofcontents \mainmatter  \part[toc part]{normal part} \section*[toc section]{normal section} some text  \end{document}   It just takes "toc part" as normal and as ToC heading for the \part command.  For the section I am interested in the starred version. Here the [toc section] part of the command seems to be completely ignored.  I use LuaLaTeX to build my document. Does anyone have a suggestion how to get a \section* appear with a different title in the ToC?


Is there a simple way/function to copy a sentence to the clipboard with JavaScript (no flash or jQuery)?  The function must be supported in Chrome; others browsers don't matter.

What is the best way to copy text to the clipboard (multi-browser)? I have tried: function copyToClipboard(text) {     if (window.clipboardData) { // Internet Explorer         window.clipboardData.setData("Text", text);     } else {         unsafeWindow.netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");         const clipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"].getService(Components.interfaces.nsIClipboardHelper);         clipboardHelper.copyString(text);     } }  But in Internet Explorer it gives a syntax error. In Firefox, it says unsafeWindow is not defined. A nice trick without using :


I am trying to make initials found in old books transparent. E.g.    The paper should be completely transparent and the dark parts of the print fully opaque. But the parts of the print that are not fully saturated and allow seeing the color of the paper should become semitransparent. In the end I should be able to change the background color (on a different layer, or the background color on a webpage) without there being some yellowish artifacts remaining. Or in other words "print" it on a paper of a different color :-)  I did search and find some tutorials which seemed promising, but somehow they all leave out some crucial detail, which I seem unable to fill in.  I believe I understand what I need to do in abstract terms but can't find and/or use the appropriate tools (alpha channel, histogram and gradient tool seem most promising). I would think that I would start with a diagram with black and white as the extrems, substitute transparent for white and then move a slider to fine tune the transparency of the faded print and make sure all of the print-less paper is fully transparent. I might have to first convert the image to black and white.

I have a lots of scanned handwritten lecture notes (PDFormat) and I want to improve their readability (I have uploaded an example). In particular I'd like to remove the "squares" on the back. I would appreciate any advice you may have. Thanks in advance.


When submitting the first release of my app for review on iTunesConnect, I'm getting a validation error that I need to upload a binary, but when I upload using Application Loader 3.0 I get an error ITMS-4238 "Redundant binary upload".  Validation error:    Upload error:   This happened after I uploaded the binary last week, filled in some of the app details, saved the page, came back to it today, completed the rest of the app details, and clicked "Submit for Review."  Any ideas how to fix this?  Unlike post #146330, I don't have another binary I want to submit - I want to use the one that's already uploaded. Unfortunately iTunesConnect doesn't seem to recognize there is one. I also don't have the source code and can't change the version or build number in Xcode because it was coded by a paid vendor.

When attempting to submit an app from Xcode 6 Organizer to iTunes Connect, I receive the following error:     ERROR ITMS-4238 "Redundant binary upload. There already exists a binary upload with build version '1.0' for train '1.0'"   Application Loader also fails with the same error. How can I upload my app?