How can I get a NSString between two strings in Objective-C on iOS?

I have this NSString:  <title>My Friends Website</title>   How do I pull out My Friends Website into it's own NSString on iOS with Objective-C?


How cooktop buttons works? In this picture can see circles (marks) from control board.   Here are control board with buttons. If i touch that black "buttons", it is like dish wash sponge.   How that buttons works ? Because in glass have no holes or some wires. Those black "buttons" are some special material?


I watched her become a mother vs I watched her becoming a mother

Which one has more correct way to put, and what are the differences found on those two sentences?


Why is every Noetherian zero-dimensional scheme finite discrete?

In the book , at page 27 we find the exercise asserting that       Exercise I.XXXVI.   The underlying space of a zero-dimensional scheme is discrete; if the scheme is Noetherian, it is finite.     Thoughts I thought that a zero-dimensional scheme is one such that, in every local ring $\mathscr O_{X,p}$, the only prime ideal is its unique maximal ideal $\mathfrak m_{X,p}.$ Hence, supposing that $X=\operatorname{Spec} R$ is affine, we deduce that every prime ideal is maximal, so each ponit in $X$ is closed. But how does this imply the discreteness? It only implies the Hausdorff-ness of $X$, right? Furthermore, I cannot perceive what the "Noetherianity" has to do with the finiteness claimed here. In the affine case, it seems to be claiming that there are only a finite number of prime ideals in a Noetherian ring, if its scheme is zero-dimensional? For example, $\mathbb Z$ is a Dedekind domain, hence its scheme is zero-dimensional, but it has infinitely many primes: does this contradict the statement?    Thanks in advance for any reference or hint, and point out any inappropriate point if any is presented. Edit I see why my example cannot work now: it is one-dimensinoal: don't forget the pirme $(0)$. But I am still wondering why the statement is true...


I need a word that is used for literature, movies, and books

I need a word that you would use that encompasses all tree of literature, movies, and books. I'm doing an art project and the theme is “words I like”, and I want a word that you can say and it includes all three. I've already thought of Fine Arts or the Arts, but I don't think that works.


Do you guys know where the AOT location is? I tried using the map from a thread and my best possible solution was Australia or eastern Europe but I can say for sure. note the climate of Australia real doesn't suit the inside of the walls.


How can you prove that a function has no closed form integral?

In the past, I've come across statements  along the lines of "function $f(x)$ has no closed form integral", which I assume means that there is no combination of the operations:  addition/subtraction multiplication/division raising to powers and roots trigonometric functions exponential functions logarithmic functions  which when differentiated gives the function $f(x)$. I've heard this said about the function $f(x) = x^x$, for example. What sort of techniques are used to prove statements like this? What is this branch of mathematics called?  Merged with "" by : Sometimes we are told that some functions like $\dfrac{\sin(x)}{x}$ don't have an indefinite integral, or that it can't be expressed in term of other simple functions. I wonder how we can prove that kind of assertion?


Limit of sequence $a_n = \sqrt{r + a_{n-1}}$

Problem says to let $r>0$ and $a_0=\sqrt{r}$ and $a_n = \sqrt{r + a_{n-1}}$ for $n\ge1$  I know that $a_n$ is such that $a_0 < a_n < \sqrt{r} +1$ by showing   $a_1 = \sqrt{r+a_0} = \sqrt{r+\sqrt{r}} < \sqrt{r} +1$ and then using induction. But I'm not sure where to go from there.


Is it possible for Superman to have sex in a red sun chamber?

It is quite obvious that if Superman had sex with a normal human, he would kill them. Therefore, I think the only way possible for him to have sex is in a red sun room. Has it ever been shown or mentioned in the comics?


Mathematical Induction proof that $\sum\limits_{i=1}^n \frac{1}{i^2} < 2 - \frac1n$

I am to use mathematical induction to prove:     $$\sum_{i=1}^n\frac{1}{i^2}<2 - \frac{1}{n}$$   my base case is n = 3:  LHS: $\frac{1}{1}+\frac{1}{4}+\frac{1}{9}= \frac{49}{36}$  RHS: $2-\frac{1}{3}=\frac{5}{3}$  base case holds true.  assume $n = k$  $$2-\frac{1}{k}$$  now show $k+1$  $$2-\frac{1}{k+1}$$  Inductive Step:  $$2-\frac{1}{k}+ \frac{1}{{k+1}^2}$$  Now I am stuck I have no clue what math I should be doing from here. I thought about trying to FOIL the $\frac{1}{{k+1}^2}$ but that didn't really give me anything I could work with. Any tips? Or general pointers when doing this stuff? Thanks guys!


double perpendicular symbol (for independence)

I found from  that I could use the independence symbol:     \newcommand\independent{\protect\mathpalette{\protect\independenT}{\perp}} \def\independenT#1#2{\mathrel{\rlap{$#1#2$}\mkern2mu{#1#2}}}    I was wondering how this works. Can anybody explain? I don't know the commands mathpalette, rlap, and mkern2mu.


How I can list all packages a apt repository serves? Specifically before adding the repository to my system would be preferred.


I understand that the Briefcase is just a Mcguffin, but I read a long time ago a theory which involved the briefcase containing the stolen soul of Marsellus Wallace. I know this supposedly played into the number "666" and the Band-aid on the back of his head, and the repetition at the end of the film as well as the repeated bible quotation. could anyone expand of this?  Also Are there any other theories that I am not aware of in relation to the briefcase, or the film in general?


Did Hubble consider gravitational redshift?

When Hubble first looked at redshifts of light from distant galaxies, and calculated the speed at which they were 'retreating from us' (or, the speed at which the space between them and us is increasing), did he consider gravitational redshift of light escaping from the gravity well of stars?  If not did that throw his calculations out, and by how much?  How much is light from a Sun-sized star redshifted as it escapes the Sun's gravity well? For example, from 589nm** to ... what, exactly? (I think very small for our Sun?)  How much is light from a galaxy in the middle of Hubble's * redshifted? (*say, one of the 46 galaxies approx $10^6$ parsecs away, so, moving at 500 km/sec?). Again, from 589nm to what, exactly?   I'd love to know the two (sets of) equations to use here, or a link to them.  Apologies if this is answered elsewhere. I couldn't find one that compared the two effects quantitatively.   I'm also interested in this from a historical point of view - ie, whether this is something Hubble factored in. I know General Relativity was published more than a decade before Hubble's redshift-expansion work, but was gravitational redshift published/known/accepted by 1927?  Is it an effect that's now taken into account? Can we measure it in light from objects distant enough to be subject to cosmological redshift? Eg, if there are lots of white dwarfs in a galaxy, would we have to tweak estimate of distance to that galaxy?)  ** I chose 589nm as one of the . I think that Hubble used these to quantify redshift.


My parents have just given my their old laptop; it has a jawdropping 500MB of RAM and a 1.4 ghz processor.  Is there a version of ubuntu that would function well on it?  Cheers


Why do shadows from the sun join each other when near enough?

I was laying on my bed, reading a book when the sun shone through the windows on my left. I happened to look at the wall on my right and noticed this very strange effect. The shadow of my elbow, when near the pages of the book, joined up with the shadow of the book even though I wasn't physically touching it.   I have posted :The video seems to be the wrong way up, but you still get the idea of what is happening.  What is causing this? Some sort of optical illusion where the light gets bent?  Coincidentally, I have been wondering about a similar effect recently where if you focus your eye on a nearby object, say, your finger, objects behind it in the distance seem to get curved/distorted around the edge of your finger. It seems awfully related...  EDIT: I could see the bulge with my bare eyes to the same extent as in the video! The room was well light and the wall was indeed quite bright.


I'm new to OO. I've just started programming in Java for my university course.  I have a problem: I have a method within the Club class to search for a member's name (or part of a name, according to my worksheet. I have a class that tests this without me having to manually create objects from the Club class (I'm using BlueJ).  Here's the search method:  public void searchMember(String name){     i=0;     found = false;      while( i < members.size() && !found ){         if(members.contains( name )){             found = true;         }else{             i++;         }     }      if(found == true){         System.out.println(members.get(i));     }else{         System.out.println("Och Naw ... Member not found.");     } }   And here is the testing class code:  public void demo() {     club = new Club();     club.join(new Membership("Gordy Broon", 1, 1972));     club.join(new Membership("Eck Salmon", 9, 1965));     club.join(new Membership("Davie Caramel", 5, 1960));     System.out.println("Now doing some searching: ");    club.searchMember( "mon" );    System.out.println(" ");     System.out.println("And some more searching: ");    club.searchMember("moon");    System.out.println(" "); }   Can someone explain to me why when searching for "mon" the result is not found?  To my understanding this should work.  I am new so ANY help and explanation would be amazing ^_^ Thanks!


Today, the human population of Madagascar has surpassed 20 million.  Today, human population of Madagascar has surpassed 20 million.  What is correct 'the human' or 'humam'


For my community login, I have a custom vf page to which the user is redirected if his password has expired for him to reset his password. Also, when the user's password is reset manually from the back-end the link in the password reset mail redirects the user to the same vf page. I need an identifier in the custom vf page for whether the redirection is from the mail link or due to password expiry. Is there any way to do this? Thanks in advance.


map $A \otimes B \to A \otimes C$ induced by inclusion an injection even if $A$ not free?

I was reading something in Munkres' book on algebraic topology and at some point I got confused.  He sais that if $B$ is a subgroup of $C$ and if $A$ is free, then the map :  \begin{equation} A \otimes B \to A \otimes C \end{equation} Induced by the inclusion is injective. But isn't this map always injective? Even if $A$ is not free?


How does increasing the tension on a string affect the density?

Consider a string under tension, for example, a string on a guitar. When a guitar string is plucked, it vibrates at a certain frequency. When the tension on the string is increased by twisting the tuning peg at the end of the neck, the frequency of the string increases. According to , increasing the tension on a string also increases the speed of the wave moving through it. According to  the speed of a wave is higher in a more dense medium.  Does this mean that increasing the tension also increases the density?  This does not seem very logical to me, since density is the "compactness" of a substance, or how close together the individual molecules are. By twisting the tuning peg on a guitar, you rotate the cylinder that the string is fixed to, wrapping it around more tightly. This pulls more of the string around that cylinder, similarly to when you reel in a fishing rod. Since more of the string's molecules are now wrapped around the peg, there should be fewer molecules over the same distance between the bridge and the nut (the two ends of the vibrating portion of the string), therefore bringing the density down.


Which language should I use while editing questions?

TLDR     While editing questions, is there any problem if I change the spelling of words in American English to British English unknowingly (as suggested by my computer)?   The long version  I am an Indian and my system language is set to Indian English.  There are lots of differences in spelling between American English and Indian English (Indians use British English).  Well, some examples are here from           centre <=> center   fibre <=> fiber   litre <=> liter   theatre <=> theater   colour <=> color   flavour <=> flavor   humour <=> humor   labour <=> labor   neighbour <=> neighbor   analyse <=> analyze   breathalyse <=> breathalyze   paralyse <=> paralyze        While editing questions, The American English words are highlighted by a red color indicating there is a typo.    But actually it is not a typo and for some words, I know it is American English. But some words, I don't know whether it is a typo or an American English word.  If the highlight is inside a code block, I leave it as it is.  But in other places, sometimes I correct it by doing    Is there a problem in doing so? If I doubt a word whether it is a typo or is a local version of English, what should I do? Correct it or leave as it is? What is the official statement of SE about this?


I added my username to the root group. Now when I try to log into the gui the screen flashes and goes back to the login. Any ideas?


Java RoundingMode HALF_UP doesn't round up as expected

So I have this code   public String getRounded(double amount) {     DecimalFormat df = new DecimalFormat("0.00");     df.setRoundingMode(RoundingMode.HALF_UP);     System.out.println(df.format(amount));     System.out.println(amount);     return df.format(amount); }   I've added those two lines to see the difference and this is an example of what they display.  The output is this for example:  1.25  1.255  Why does this happen? Isn't the point of HALF_UP to round up? I've tried with CEILING and it does round up, although that's not what I want in this case.  Thank you


Is there a reason behind the "wrong" German localizations of English movies/TV shows

I live in a German speaking country but prefer watching movies/TV shows in English. The biggest reason is, in my opinion, the wrong translation of the word "you". In German there are two possible translations:   "Sie": formal, usually used when talking to an adult in a business relation or a child talking to an adult or talking to elderly people. In addition this is mostly combined with the family name: "Sie, Herr Schmied" = "You, Mr. Smith" "Du": informal, between children and friends, though in many companies nowadays also between coworkers. In addition this is mostly combined with the given name. "Du, Michael" = "You, Michael"   In German localizations "Sie" is used most of the time. And this just doesn't make sense to me. Like, I would never use "Sie" on a date or rarely someone at my age (mid 30s) I meet on the street. This was maybe common 50 years ago, but not today. With business customers it somehow is still expected, even if I don't like it. In my experience with communicating with US residents, the family name is rarely used and in emails the given name is used. Maybe I make a wrong link here and using he given name is considered formal in the US.  Is "Sie" the right translation for "you" in informal conversation (in movies/TV shows)?


Is spin 1 described by $SO(3)$ or $SU(2)$

What spin is described by which rotation group? I always only find information about spin-1/2


16.04 Switching between workspaces with the keyboard shortcuts do not work

I rebooted today to apply the last security patch and now I can't switch between my workspaces. Usually, the keyboard shortcuts CTLR + ALT + (Arrow up/down/left/right) was working fine.  I checked system's settings and the feature is still active and shortcuts too. Any idea why?  Thank you.


I'm a bit confused with the correct answer in this phrase:     In Florida, you can explore the Everglades or the beaches, _______   are relaxing places.   Is it "which are relaxing places" or "that are relaxing places"? Thanks for the help!


I know that mass can bend fabric of space-time, which causes gravity by making an object curve around a planet or star but is there anything else that can bend it?  Other energy sources, forces anything?


Between Infinity War and Endgame did victims of the snap age?

Half the population is erased and then ultimately resurrected 5 years later. After the 'reverse snap' is the resurrected population now 5 years older or were they restored to the same age they were at the time of the snap, essentially jumping forward 5 years in time?


Mesh with Triangulate Modifier mesh causes new faces and vertices to form with the Subsurface Modifier and Bevel Modifier

OLD TITLE: Smooth mesh to hide the low poly subdivisions  Title of the question changed, as the main issue seems to be that with the triangulate modifier and the subdivision modifier, there are new faces and vertices being created.  New question:  Using the Bevel Modifier, Triangulate Modifier, and the Subdivision Modifier, new vertices are being formed as you can see in the second image. I would like it to look like the first image, except with the Subdivision Surface modifier working, so the cutout loos smooth.  Beveling with no Limit only shows these two problems:    New Blend File:      Old question:  I created a cutout of a cylinder in my mesh. I beveled it, and it gives me this:    I would like to 'smooth' the edges to look like a nice curve, and not blocky.   I used a Subdivision Surface modifier, but:   I already tried going around using Ctrl + T, but I could not get rid of them all, and it made my mesh look messy.  Is there a better way for me to subdivide it without the vertices going nuts?    EDIT:  R.M's method below works up to an extent. It curves the cutout, but the face deforms appear still. Is this more of an issue with my mesh?    With no Bevel Limit, the corners are sharp at the front of the mesh, but the bottom still has the corners warping in. With the Angle, it makes the mesh more round/smoother, how I want it, but the bottom still has the mesh warps. As well as the front corners.


Visiting UK for short trip during post-student visa year in Spain

I'm an American citizen who has been living in Spain since last September on a type D student visa.  My visa expires this Thursday, September 12.  As I understand it, I have an additional 90 days in the Schengen zone.  I plan on moving back to the US after these 90 days are done.    What I'm wondering is if I can make a short trip to the UK during these 90 days, and then re-enter into Spain?  I know UK is not Schengen.  I've read that as an American passport holder, you are allowed 90 days within a 180 day period.  But does this 180 period exclude the whole year I've been living in Spain on the student visa?  I don't think I will have a problem entering the UK, but I'm scared about not being allowed back into Spain.  Thanks for any insight.


How to use BibTeX in thebibliography in LaTeX

Assuming that I have the below posted bibtex, how can I use it in LaTeX in the bibliography section \begin{thebibliography}{1}  Please provide an example for that.   @article{ungar1997strategies,  title={Strategies for knowledge acquisition from cartographic maps by blind   and visually impaired adults},  author={Ungar, Simon and Blades, Mark and Spencer, Christopher},  journal={The Cartographic Journal},  volume={34},  number={2},  pages={93--110},  year={1997},  publisher={Maney Publishing} }


Texlive 2019 offline installation from iso image on Linux

I have put a downloaded iso image of Texlive 2019 on Linux (Mint 19.3, 32 bit) desktop. I open the terminal in the desktop and perform the following commands  $ mkdir mountpoint $ sudo mount -o loop texlive2019-20190410.iso mountpoint $ Password: $ cd mountpoint/ $ ./install-tl   Everything works and the following prompt appears   Actions:  <I> start installation to hard disk  <P> save installation profile to 'texlive.profile' and exit  <H> help  <Q> quit   I press I, but I get the following error:  Installing to: /usr/local/texlive/2019  install-tl: No binary platform specified/available, quitting.   How can one solve this problem?  P.S. I can install Texlive without problem on Windows with the same iso image.


Well I'm a beginner and I would like to know how to display the array I made(It's an Integer array). I'm just trying to create a simple calculation program that accepts user input on which fighter they would like to pick, and how much money they would like to bet. Again, I'm just a beginner so no hate please.   public class Fighter { private int health; private int attack; private int money;  int[] fighter={health,attack,money};  public Fighter(int h, int a, int m){      health=h;     attack=a;     money=m;  }  public int[] getFighter(){          return fighter; }   }  *******END OF FIGHTER CLASS*****  import java.util.*; public class FighterCreator {  public static void main(String[] args){      Fighter newFighter=new Fighter((int)(Math.random() * 701),                                    (int)(Math.random() * 39), 7000);     System.out.print(newFighter.getFighter()); } }   When I run the code it just displays hexadecimal, can you guys please explain it in a way a beginner would understand, thanks.


Can I solder more memory into my MacBook Air?

I love everything about my Macook Air except its very low maximum memory (and yes I bought it with the maximum available at the time).  So I'm thinking "I know how to solder... how hard can it be?".  It's not that unusual for the theoretic limit at the time a computer is manufactured to be surpassable later when modules with more memory become available.  Is  based solely on the assumption that no one knows how to solder?  Or is it massively more difficult to solder new memory into a laptop than it is to solder some simple electronics project?  Are there any big difficulties other than just the need to solder the memory in place (and unsolder the old memory)?


How to implement critical sections on ARM Cortex A9

I am porting some legacy code from an ARM926 core to CortexA9.  This code is baremetal and does not include an OS or standard libraries, all custom.  I am having a failure that appears to be related to a race condition that should be prevented by critical sectioning of the code.    I want some feedback on my approach to see if my critical sections may not be correctly implemented for this CPU. I am using GCC. I suspect there is some subtle error.  Also, is there an opensource library that has these types of primitives for ARM (or even a good lightweight spinlock/semephore library)?   #define ARM_INT_KEY_TYPE            unsigned int #define ARM_INT_LOCK(key_)   \ asm volatile(\     "mrs %[key], cpsr\n\t"\     "orr r1, %[key], #0xC0\n\t"\     "msr cpsr_c, r1\n\t" : [key]"=r"(key_) :: "r1", "cc" );  #define ARM_INT_UNLOCK(key_) asm volatile ("MSR cpsr_c,%0" : : "r" (key_))   The code is used as follows:  /* lock interrupts */ ARM_INT_KEY_TYPE key; ARM_INT_LOCK(key);  <access registers, shared globals, etc...>  ARM_INT_UNLOCK(key);   The idea of the "key" is to allow nested critical sections, and these are used at the beginning and end of functions to create reentrant functions.  Thanks!


need to solve this Attempt to invoke virtual method on a null object reference im used firebase realtime

im set marker onclick to another activity  public class CoffeeShopDetail  extends AppCompatActivity {  TextView DetailText;  TextView DetailTipe;  TextView DetailAsal;  ImageView DetailImage;  private CustomGauge gauge1;  TextView DetailPersen;   int i;  private TextView text1;    String LokasiId="";  FirebaseDatabase database;  DatabaseReference lokasi;   @Override  protected void onCreate(@Nullable Bundle savedInstanceState) {      super.onCreate(savedInstanceState);      setContentView(R.layout.detail_loc);        database = FirebaseDatabase.getInstance();      lokasi = database.getReference().child("Lokasi");       DetailText = findViewById(R.id.detail_shop);      DetailImage = findViewById(R.id.detail_image1);      DetailTipe = findViewById(R.id.descCS);      DetailAsal = findViewById(R.id.tandatanya);      Intent intent = getIntent();      Bundle bd = intent.getExtras();        if (getIntent() != null)          LokasiId = getIntent().getStringExtra("LokasiId");      if ("LokasiId".equals(true)) {           return;       }      getDetailLokasi(LokasiId);     }   //-----1-----  private void getDetailLokasi(final String LokasiId) {       lokasi.child(String.valueOf(LokasiId)).addValueEventListener(new ValueEventListener() {               @Override              public void onDataChange(@NonNull DataSnapshot dataSnapshot) {                   final LocationDB LocationDB = dataSnapshot.getValue(LocationDB.class);                       Picasso.get().load(LocationDB.getImage()).into(DetailImage);                       DetailText.setText(LocationDB.getNama_tempat());                      // DetailTipe.setText(Jenis.getTipe_kopi());                      //  DetailAsal.setText(Jenis.getAsal());                      // DetailPersen.setText(Jenis.percent);               }               @Override              public void onCancelled(@NonNull DatabaseError databaseError) {               }          }      );   } }   ERROR  E/AndroidRuntime: FATAL EXCEPTION: main     Process: com.example.myapplication, PID: 491     java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.example.myapplication.Lokasi.LocationDB.getImage()' on a null object reference         at com.example.myapplication.CoffeeShopDetail$1.onDataChange(CoffeeShopDetail.java:87)         at com.google.firebase.database.core.ValueEventRegistration.fireEvent(com.google.firebase:firebase-database@@18.0.1:75)         at com.google.firebase.database.core.view.DataEvent.fire(com.google.firebase:firebase-database@@18.0.1:63)         at com.google.firebase.database.core.view.EventRaiser$1.run(com.google.firebase:firebase-database@@18.0.1:55)         at android.os.Handler.handleCallback(Handler.java:883)         at android.os.Handler.dispatchMessage(Handler.java:100)         at android.os.Looper.loop(Looper.java:214)         at android.app.ActivityThread.main(ActivityThread.java:7319)         at java.lang.reflect.Method.invoke(Native Method)         at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:934)


The Hot Network Questions tab exists on many sites. It is (almost) always dark-ish text on a white background. Usually, links that I've clicked on before change color, which helps me keep track of what I've seen before.  The problem is that that's not the case on all sites. On some sites, the links are blue by default, and turn dark when clicked. On others there's barely any difference at all.  Please make the links have the same colors on all sites.  Some examples: Visible just fine:  Hard to see:  Impossible:


He must have called the police.   OR     He must have called police.   I think we use the first one when we know about a specific group of police officers which we have called and the second one, when, we talk about any police group which we don't specifically know.  Am I correct?


Using ArcPy to convert .txt to shapefile with coordinate system?

I tried to define my coordinate system on creating the shapefile but when I zoom to layer I don't see my features and ArcGIS crashes. I know it's not in the coordinate system I defined for it but it shows the coordinate under properties but doesn't reflect when I zoom to layer. Here is my python code:  import arcpy  newfcName ="newfc.shp"   outpath = r"C:/FLOOD/IKEJA AND KOSOFE"  # Declaration arcpy.env.overwriteOutput=True  arcpy.env.workspace= outpath  # Create new Shapefile and add FIELDS newfc = arcpy.CreateFeatureclass_management(outpath, newfcName, "Point") # get the coordinate system by describing a feature class dsc = arcpy.Describe("newfc.shp" )  coord_sys = dsc.spatialReference  try:        # run the tool    arcpy.DefineProjection_management(newfcName , coord_sys)     # print messages when the tool runs successfully    print(arcpy.GetMessages(0))  except arcpy.ExecuteError:    print(arcpy.GetMessages(2))  except Exception as ex:    print(ex.args[0])  arcpy.AddField_management(newfc, "X", "STRING", field_length = 50) arcpy.AddField_management(newfc, "Y", "STRING", field_length = 50) arcpy.AddField_management(newfc, "Z", "STRING", field_length = 50) arcpy.AddField_management(newfc, "I", "FLOAT", field_length = 50)  # Reference Cursors cursor=arcpy.da.InsertCursor(newfc, ["X", "Y", "Z", "I"])  # Read File  a = open("C:/FLOOD/IKEJA AND KOSOFE/DEM/532722.txt","r")  inputF = a.readlines()  for line in inputF:     xCoordinate, yCoordinate, zValue, iValue = line.split(" ")      newRow = (str(xCoordinate), str(yCoordinate), str(zValue), float(iValue))      cursor.insertRow(newRow)  a.close()


center align ul inside div with display:table

I am trying to centrally align the ul li text inside the main div. Exactly text align center the text. I don't want to do it with the margin. What is an elegant way?     I need to keep the display table setup for vertical alignment.   MY HTML:

      Anchor

       Center this

   CSS:  .main-div {   width: 100%;   display: table; } ul {   display: table-cell;   vertical-align: middle; } li {   list-style: none; }   CodePen is


Is it always necessary to repeat the pronoun before each verb?  For example, do I need always to say:     She called me and she said X   or can I use a shorter one     She called me and said X   ?


Yoghurt making : effects of temperature and duration

As I am fairly new to making yoghurt at home I would like to understand the effects that temperatures and time have on the end product in both the initial heating/cooling step and the fermentation step.  So far I have made half a dozen 1.5 litre batches with three different cultures (currently using ABY-1 from CHR Hansen that I was able to buy from the Westcombe dairy in Somerset). I have a Luvelle machine that can ferment at 36C, 38C and 40C from 1 hour to 24 hours.   I want to understand what changes if I experiment with the following:-   When I heat the milk to 85C and hold the temperature I have made some batches with a 10 minute hold and others with a 20 minute hold period and see/feel/taste no difference - will holding at 30 minutes produce a difference? I am currently fermenting for 24 hours at 38C and getting a strong tang/sourness to the yoghurt but what would I expect to get if I reduced the fermentation to 12 hours at 38C...or less? I choose 38C for the fermentation process because it was recommended by the manual that came with the Luvelle machine but what happens if I use 36C or 40C and what length of time would I use?   So generally speaking I want to know more about the initial heating process and what options there are and what the different fermentation temperatures and durations can have on the end results.  Thanks in advance!


In Minecraft, to avoid villagers getting confused with breeding mechanics, etc., any group of villagers (i.e. Iron Farm, Villager Spawner etc.) need to be placed >64 blocks away.   Does this apply vertically, or is it to do with Chunk mechanics?


Why does FREEPROCCACHE let you shrink tempdb?

Somebody did something stupid and tempdb exploded in size.  Alerts are firing because the drive is full. I tried shrinking it, and it would not shrink (even though shrink queries said they worked).    There is lots of free space in tempdb (SQL2014 SP1); tempdb > Tasks > Shrink > Files > (shows how much available space I can release)  I shrink (SSMS 2016) to leave more space then the 'minimum shrink to size'.  But the files do not actually shrink.  I am working with the business owner, I am watching the server (sp_whoisactive, etc) the server is at rest.  Searching for a solution leads me to   I run the following, and it works tempdb, is back to original size.    DBCC FREEPROCCACHE   USE [tempdb]  GO  DBCC SHRINKFILE (N'tempdev' , 2048)  GO   I understand that  releases all the cache data, and impacts plans.  But if it was taking space in tempdb, it should have showed as used space, and not been available for normal shrinking.     Why did this work?   Based on the comments pointing to  Let me phrase this question from the other way.  Tempdb thinks it has space to shed as evidenced by 'minimum shrink to size', the space that won't go away got created in a temp processes that are no longer running. There is a big chunk of allocated and unused space, why can't I release it without destroying the query plan(s)?    Are the query plans or cache not living on allocated disc space, but still being protected from shrinking?   Analogy: 'minimum shrink to size' shows me the glass is half full/empty but it is not possible to transfer to a smaller glass without breaking the glass and loosing almost all of the contents.    A couple years later, same issue on a SQL 2014 instance, less emergent allows time to try experiment.  If you could somehow identify the query plan, you might be able to delete just that plan releasing the hold on the pages, and then be able to shrink tempdb.  I am looking for ways to accomplish this but have not yet been successful.  Maybe you can use  to see what is on that page so you can address it?   DBCC TRACEON (3604)  -- By default, the output is sent to the errorlog. If you want the output to come back to your current connection, turn on trace flag 3604. GO DBCC PAGE ([tempdb], 1, 1, 3); -- detailed dump of the PFS page GO    I see the last page is 937, so I go look at it.   DBCC PAGE ([tempdb], 1, 937, 3); GO   Nothing clearly an issue there, The last few pages look empty.   I have tried the suggestion by  Multiple attempts did not even free 1MB.     I ran into this problem yesterday, using the SSMS task to shrink files never accomplished anything, then I re-read the documentation on Shrink File and realized I needed to try this:   DBCC SHRINKFILE (N'tempdev' , NOTRUNCATE) -- Move allocated pages from end of file to top of file DBCC SHRINKFILE (N'tempdev' , 0, TRUNCATEONLY) -- Drop unallocated pages from end of file      I did this for all 8 of the tempdev files and slowly, over time, it finally recovered about 80% of the space. I was truly surprised by this as nothing else had worked. I had to run a job every 15 minutes through the day but it eventually recovered the space   On a SQL 2014 instance I have 'naturally' cleared the cache when a large database was rebuilt with a clustered column store indexes (nightly process). The same SHRINKFILE that would not do anything the previous day works as expected in the morning.   USE [tempdb] GO DBCC SHRINKFILE (N'tempdev' , 2000) GO   Maybe if I could recreate the problem on demand on a 2016+ instance with Query Store, it would be easier to track down exactly what is happening?


Crash OutOfMemoryError when attempting to load large image from gallery

I'm attempting to load an image from the Gallery that is big (around 30MB-70MB). The issue I keep facing is:     FATAL EXCEPTION: main   Process: com.parse.starter, PID: 29795   java.lang.OutOfMemoryError: Failed to allocate a 1866240012 byte   allocation with 2323392 free bytes and 380MB until OOM       at dalvik.system.VMRuntime.newNonMovableArray(Native Method)       at android.graphics.BitmapFactory.nativeDecodeStream(Native Method)       at android.graphics.BitmapFactory.decodeStreamInternal(BitmapFactory.java:635)       at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:611)       at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:649)       at android.provider.MediaStore$Images$Media.getBitmap(MediaStore.java:867)       at com.parse.starter.AddPhotosActivity.onActivityResult(AddPhotosActivity.java:151)       at android.app.Activity.dispatchActivityResult(Activity.java:6428)       at android.app.ActivityThread.deliverResults(ActivityThread.java:3695)       at android.app.ActivityThread.handleSendResult(ActivityThread.java:3742)       at android.app.ActivityThread.-wrap16(ActivityThread.java)       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1393)       at android.os.Handler.dispatchMessage(Handler.java:102)       at android.os.Looper.loop(Looper.java:148)       at android.app.ActivityThread.main(ActivityThread.java:5417)       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)   Here is my code (line 151 as stated above in crash log) has a comment right above it. Basically, the end goal is I want to detect right off the bat whether or not the selected image is greater than 10MB. If so, then send a Toast, if not, then proceed with saving out the image to the backend.  if (requestCode == SELECT_PHOTO && resultCode == RESULT_OK) {     Uri uri = data.getData();     File f = new File(uri.getPath());      try     {         // LINE BELOW IS THE LINE 151, ERROR CRASH         Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), uri);         if (bitmap.getByteCount() > 10485760)         {             Toast.makeText(AddPhotosActivity.this, "That file is too large to attach to a Grievance, please try again!", Toast.LENGTH_SHORT).show();         }         else         {             mImageOne.setImageBitmap(bitmap);             SaveImageOne(bitmap);         }      }     catch (IOException e)     {         e.printStackTrace();     } }


Can I make my connection from Heathrow to Kings Cross?

I have a plane ticket arriving at Heathrow (Air Canada, so T2) at 11:05, and a LNER ticket from Kings Cross at 14:00. (I also have a ticket for the 16:00 service, just in case, but that gets in very late so I’d rather not.) How likely am I to make my connection, and what can I do to maximize my chances? Some details:  I’m young, traveling alone, and generally fairly comfortable with public transit. That being said, Air Canada decided to reschedule me onto an 8 hour layover, so I might be fairly tired if I can’t sleep on my flight. I’ll have one suitcase and a small backpack. I’m a USA citizen, so I should be able to use the e-gates at immigration. This is happening in a few weeks, i.e. COVID will be a thing.  Some specific things I’m wondering about:  How long does it typically take from the plane landing to getting off the plane, getting through immigration, and luggage showing up on the baggage claim? (I might be able to have my bag as a carry on—not sure.) Heathrow Express + Circle looks faster than the Piccadilly, but more expensive and more of a hassle. Should I bother?  TfL rail?   How much time do I need to get from Tube platform to mainline platform at Kings Cross? How close to the departure time can I get to the platform and make it onto the train?


Okay so I've done alot of trial and error on the subject of gaming on Ubuntu and Mint, all on fresh installs fully updated. Lately I installed the latest Ubuntu LTS 64 bit on my rig.  I installed all updates, my 32 bit libraries, Steam, and my amd graphics driver first off. Then I installed Team Fortress 2 on steam.  I've heard a lot of peoples controllers work right off the bat on steam but all of mine did not.    My controllers are as follows:     -Blue Rock candy brand 360 controller      -Official Microsoft Hard Wired 360 Controller      -White PowerA brand Micro 360 controller   Okay so first its plugged in and it shows the first player light on like it should be working. All of them do this so that's good i assume as the driver at least detects it in someway as its not just blindly blinking. So I go into TF2 to see if it works. The options wont detect any input and when I bring up valve's console and exec 360controller everything says all joy buttons are not valid keys.  So I do some digging and ran across this  page.   I used the command to see if it would list my pad anywhere but it said just usbcore driver no "led device" or "pad1" just nothing. I have tried both my USB 2.0 & 3.0 Ports Obviously this is a driver problem of sorts Any help would be highly appreciated.   My Computer's Hardware is as follows:         Am3 AMD Phenom X4 965 3.4 CPU  * HIS Radeon HD 7750 PCI ex  * 2013 MSI 970A-G43 Mainboard  * 8GB DDR3 RAM Gskill Ripjaws  * 5.1 Diamond Extreme   sound pci sound card.      I will be digging into this issue as i have been this week in other words   What should I do ?  please :3 I will be quick to respond and will post things as I find them.


Kernel Panic - Random Shutdown - Please Help

Recently (the last three day) my late 2013 iMac has been suffering from kernel panics. After reboot, console shows a 'Previous shutdown cause: -62'. Can someone please tell me what this means. The only thing I have changed is I added a new backup drive (2TB external). It seem to only happen after about ½ hour after wake (from sleep). It only does it when doing multiple processes, like running photoshop, iTunes open in background, youtube vids playing etc. So, any ideas. Any help would be appreciated, Thanks, BR


python: merging dictionaries by identical value of key

I am new to python and have looked at other answers on merging dictionaries but was still a bit confused.  I am looking to merge together two dictionaries in python by a common value within a specific key to output that common key with the other keys from both dictionaries in a new dictionary.   Here is sample data:   add_sal = {'career_medicine': None, 'career_law': None, 'median_salary': None, 'mean_salary': 75000.0, 'career_business': 'operations / logistics', 'number': None}  add_perc = {'percent': 0.07, 'career_business': 'operations / logistics'}   I would like to merge on the key value pair of 'career_business': 'operations / logistics' and output a dictionary that looks like this:   add_all = {'career_medicine': None, 'career_law': None, 'median_salary': None, 'mean_salary': 75000.0, 'career_business': 'operations / logistics', 'number': None, 'percent': 0.07}   An additional problem is that I do not know if the names will match, and I am looping through a list of add_sal and a list of add_perc.   Any advice would be appreciated!  Thank you in advance!


Why didn't Harry die in the dark forest?

I know that this question may sound like it has a very obvious answer, and many of you may just say that Harry didn't die because he was the Master of Death, as he had the possession of the three Deathly Hallows.  Couldn't, though, the "Master of Death" be purely a figure of speech, since the owner of the Hallows would be able to kill, resurrect and dodge death?   I know this is a question that is left open in the book, but couldn't Harry have lived because he carried a piece of Voldemort's soul, and Dumbledore gave Harry the choice to really die or just kill the piece of Voldemort's soul, and then Harry could live?    Is there anything in any of the books to support either theory?


Is Captain America back with Iron Man and the Avengers?

In Spider-Man: Homecoming while Happy (Jon Favreau) is loading the plane at Avengers Tower he mentions a "prototype of Cap's new shield".  Does that mean Captain America is back with the Avengers and whatever was between Tony and Steve is over?


Suggestions for a father daughter activity that explains me omitting my son

I have a set of twins.. A boy and girl who are 5 years old. I love them both equally and want to have some one one time with each of them..   My son and I go for a haircut every month (or so), and we then do a little bit of shopping.   It is a wonderful day out, that my daughter can't come on, because she doesn't get her hair cut with daddy.  But the thing is: I also really want a day with my daughter.  Something that wouldn't make sense for my boy to come to. It has to be something she will buy as "real", and something I'd have to do about once a month (or so).    This is different from the duplicate in that it cannot be games or things that a boy would do.  It has to be something that I could say "this is a daddy - katie (fake name)" thing.  I don't have even the slightest bit of trouble finding something to do with the pair. Or even one on one. But consistently with one and never the other... that one is beyond my imagination.


Is there a measure of association for a nominal DV and an interval IV?

As part of a larger analysis, I'm interested in examining the relationship between an interval level variable and a four category nominal variable. In this case, the interval variable is the independent variable and the four category nominal variable is the dependent variable. I'm interested in whether there is a statistically significant relationship between the two variables, as well as the strength of the relationship if one exists.  Does anyone know whether a measure of association exists for this situation? I'm aware of eta, but my understanding is that eta is appropriate when the IV is nominal and the DV is interval. I'm also aware of the point bi-serial correlation, but my understanding is that the nominal variable must be binary.  Any help is greatly appreciated.


If I have a complex number of the form $z = a+bi$, how would I find the complex roots? I know that each root will be equidistant from each other and will form a circle, but I'm not sure how to solve for the complex roots. I also know that for a complex number with $n$ roots, each root will be rotated $2\pi/n$ radians. It's not an issue of graphing the complex roots, but it is for solving for them.


Got few questions about the input/output pins of a crystal circuit.   As shown above, it's a common clock circuits. My question is: 1. If we want to measure the waveform of the clock, which pin should we probe and why? 2. In the internal circuits inside the IC, which signal (IN or OUT) is used for the clock source of the internal circuits and why?  Thanks!


I am trying to write code with rotates an object.  I implemented it as:  Rotation about X-axis is given by the amount of change in y coordinates of a mouse and  Rotation about Y-axis is given by the amount of change in x coordinates of a mouse.  This method is simple and work fine until on the the axis coincides with Z-axis, in short a gimble lock occurs.  How can I utilize the rotation arount Z-axis to avoid gimbal lock.


Return non-duplicate random values from a very large range

I would like a function that will produce k pseudo-random values from a set of n integers, zero to n-1, without repeating any previous result.  k is less than or equal to n.  O(n) memory is unacceptable because of the large size of n and the frequency with which I'll need to re-shuffle.  These are the methods I've considered so far:  Array: Normally if I wanted duplicate-free random values I'd shuffle an array, but that's O(n) memory.  n is likely to be too large for that to work.  long nextvalue(void) {   static long array[4000000000];   static int s = 0;   if (s == 0) {     for (int i = 0; i < 4000000000; i++) array[i] = i;     shuffle(array, 4000000000);   }   return array[s++]; }   n-state PRNG: There are a variety of random number generators that can be designed so as to have a period of n and to visit n unique states over that period.  The simplest example would be:  long nextvalue(void) { static long s = 0; static const long i = 1009; // assumed co-prime to n   s = (s + i) % n;   return s; }   The problem with this is that it's not necessarily easy to design a good PRNG on the fly for a given n, and it's unlikely that that PRNG will approximate a fair shuffle if it doesn't have a lot of variable parameters (even harder to design).  But maybe there's a good one I don't know about.  m-bit hash: If the size of the set is a power of two, then it's possible to devise a perfect hash function f() which performs a 1:1 mapping from any value in the range to some other value in the range, where every input produces a unique output.  Using this function I could simply maintain a static counter s, and implement a generator as:  long nextvalue(void) {   static long s = 0;   return f(s++); }   This isn't ideal because the order of the results is determined by f(), rather than random values, so it's subject to all the same problems as above.  NPOT hash: In principle I can use the same design principles as above to define a version of f() which works in an arbitrary base, or even a composite, that is compatible with the range needed; but that's potentially difficult, and I'm likely to get it wrong.  Instead a function can be defined for the next power of two greater than or equal to n, and used in this construction:  long nextvalue(void) {   static long s = 0;   long x = s++;   do { x = f(x); } while (x >= n); }   But this still have the same problem (unlikely to give a good approximation of a fair shuffle).  Is there a better way to handle this situation?  Or perhaps I just need a good function for f() that is highly parameterisable and easy to design to visit exactly n discrete states.  One thing I'm thinking of is a hash-like operation where I contrive to have the first j results perfectly random through carefully designed mapping, and then any results between j and k would simply extrapolate on that pattern (albeit in a predictable way).  The value j could then be chosen to find a compromise between a fair shuffle and a tolerable memory footprint.


Multinomial logistic regression assumptions

What are the proper assumptions of Multinomial Logistic Regression? And what are the best tests to satisfy these assumptions using SPSS 18?


Alternative to a columns of checkboxes in a table

Here's the scenario: A Person has a bunch of Accounts. Accounts may (or may not) have Services attached to it depending on the type of Account. Currently there are two types of Service (indicated by Columns 1 & 2 in the pic below) but the types of Services will grow in the future (maybe up to 4-6 sort of range)    Some Account types qualify for some Services but not others, etc.   The big system constraint is that all of the Services and Accounts for the Person must be submitted together.  Here is the design proposed by the client:    To me, the suggested designs weakness seems to be the problem of growing Services.   I'm interested in alternatives.   This question provided some interesting ideas but didn't quite fit my use case:


Knowing whether a discipline is science or philosophy

There are certainly no clear boundaries within science and philosophy. Science is about knowledge of nature, hypothesis, tests and repetition, and philosophy is about knowledge generated purely by reason, not objectively verifiable by the scientific method (hope providing a good approximation, if not, thanks in advance for any correction).  How do we know whether a discipline is science or philosophy?   For example, the systems theory seem to match both descriptions.    A rock can be perfectly described by the systems theory from a scientific approach (e.g. we can test with the scientific method that rocks are systems because they are formed by parts holding persistent relations, for example, we can test that molecules joined by molecular bonds under X conditions form rocks); we can test it several times and prove that the systems theory provides a valid and testable hypothesis regarding a natural entity. Or, a rock can also be described from a philosophical approach by the same theory: we can state that as any other system, rocks tend to keep existence as a whole because their parts keep relations (there is no way to prove otherwise: only rocks formed by relations can exist, and the lack of relations between whatever parts can't be considered a rock).   This question is about a discipline, not about philosophy/science. There are clear differences between them, and the point is to assess whether a discipline can be considered to be mostly one or the other.


I have been happily using the Gnome desktop environment to complete my day-to-day computing. Recently, I learned that Gnome 3.10 was released. I tried to update using the ppa: gnome3-team/gnome3. However, apt-get update is unable to find that ppa. I also discovered that I am actually using Gnome 3.4.1, not 3.8.x. How can I upgrade?\  Notes: I installed using sudo apt-get install gnome and am using Ubuntu 12.04.  Any help is greatly appreciated. Thanks for your time.


What's the "Private" directory in OS X for?

I was running OmniDiskSweeper today, and I came across something called "Private" using 3.9GB. It is listed directly under the root directory along with Users, Library, System, and Applications, so I am assuming it is something included with OS X itself. I'm just curious about what this actually is, because I don't remember seeing this before. Here are some screenshots:        Mid 2012 15 inch MacBook Pro running OS X 10.11.3 El Capitan


Can I control depth of focus (v depth deph of field)

I'm creating some studio-shot style images of products. I'm trying to get the foreground elements in focus while having the background blur slightly.  I've done a lot of real world studio photography and I know that depth of focus and depth of field are two different parameters (though frequently confused). Put simply, depth of field references the precise centre of the plane of focus as parallel to the image plane, while depth of focus reference the sum of the distance on either side of this plane that remains in focus.  But 2.6x only seems to offer control of the depth of field, so that only that exact plane is in focus, and everything either side gradually defocusses. Or am I missing something?  The point is, I want to know if there is a way to control the z-depth of the area in focus, not just it's distance from the camera.


Can someone explain how to mathematically perform linear regression on some data while constraining the fit line to pass through the $(0,0)$ point?


I have problem with file system size mismatch from 2 different linux commands  du -h shows only 250 MB used   df -h shows  9.5 GB used    Why is the different between commands ?


Why is the accountsd process eating so much CPU?

Why are the accountsd and securityd processes using so much CPU on OS X 10.10.3? I am on a Early 2011 Macbook Pro.  What are these processes for? Is it safe to kill them? The machine has only been up 4 hours so has been rebooted recently.


If I write synchronized(this) in two function of the same java class, but these two functions are maybe called by two threads, does this code still work?  Some fake code maybe looks like:  class A {         public funA()             synchronized (this) {                 // do some things here;             }         }          public funB() {             synchronized (this) {                 // do other things here;             }         } }   Or do I need to add a variable to do it?


Are credit card compnies required to send income info to Feds?

I requested a credit line increase with BOFA. I am self-employed, and they asked for my expected income. I got the credit line increase, and the rep said he was required to send the income information to the federal government. How long have they been doing this? This is the first time I have been told this, and I have many cards and excellent credit.


how to get b43 wifi to work reliably on MacBookPro8,2?

I have a MacBookPro8,2 (15-inch, Early 2011) and have installed Ubuntu using wubi on the windows partition. I could never get the b43 wifi chip to work reliably and I ended up buying a belkin usb wifi F9L1001v1 which has a realtek chip with r8712u module. Life is way better but still connecting to wifi hotspot is so random and fail many times. It works at home.  I have no idea why and do not have the skills to debug it. ro  1> Why the dongle work at home by have trouble connecting to some hotspots?  2> Has anybody been able to get the b43 work RELIABLY on this mac? Here is the lspci output   03:00.0 Network controller [0280]: Broadcom Corporation BCM4331 802.11a/b/g/n [14e4:4331] (rev 02) Subsystem: Apple Inc. AirPort Extreme [106b:00d6] Flags: fast devsel, IRQ 17 Memory at b0600000 (64-bit, non-prefetchable) [size=16K] Capabilities: [40] Power Management version 3 Capabilities: [58] Vendor Specific Information: Len=78 <?> Capabilities: [48] MSI: Enable- Count=1/1 Maskable- 64bit+ Capabilities: [d0] Express Endpoint, MSI 00 Capabilities: [100] Advanced Error Reporting Capabilities: [13c] Virtual Channel Capabilities: [160] Device Serial Number 27-b8-8f-ff-ff-08-e4-ce Capabilities: [16c] Power Budgeting <?> Kernel modules: bcma   Here is the kernel info  Linux ubuntu 3.8.0-44-generic #66~precise1-Ubuntu SMP Tue Jul 15 04:01:04 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux   This is the instruction that I have followed.    3> I want to get a new laptop/mac but I hate the fact that I also need a dongle to use my Mac and with this horrible wifi experience makes me wonder if I should ignore apple if I want to use ubuntu only?


If $a_n$ is a strictly increasing unbounded sequence, does $\sum_n \frac{a_{n+1} - a_n}{a_n}$ diverge?

So I've been thinking through some test cases. If $a_n = n$ then $\sum_n \frac{a_{n+1} - a_n}{a_n}$ is the harmonic series which diverges. And if $a_n = \sum_{k=1}^n 1/k$ then $\sum_n \frac{a_{n+1} - a_n}{a_n}$ diverges like $\sum_n 1/(n \log n)$. So that got me thinking, if $a_n$ is a strictly increasing unbounded sequence, does $\sum_n \frac{a_{n+1} - a_n}{a_n}$ necessarily diverge?


राम (hindi language)  I am working on a table where many rows contains value like this &#2352;&#2366;&#2350; it shows in browser like राम  and many rows already contains राम  but I want to replace all encoded value with decode values for this i used find replace query also put data in form and updated but every time db stores encoded  value  Structure of table  hindi   varchar(256)    utf8_unicode_ci   what i did  <?php echo $queryfetch="select hindi from users where id='2'"; $resultfetch=mysqli_query($c,$queryfetch); while($row  =   mysqli_fetch_array($resultfetch)) { echo $queryupdate="update users set hindi='".html_entity_decode($row['hindi'])."' where id='2'"; $resultupdate=mysqli_query($c,$queryupdate); } ?> select hindi from users where id='2'  update users set hindi='राम' where id='2'  ** sql before =&#2352;&#2366;&#2350;  **sql after = à¤°à¤¾à¤®**


"Can't cd to /home/user" when sourcing a script

I have this script:  echo $HOME cd $HOME cd / cd /usr/local/src/   When I run it like this  . script.sh   I get this output:  /home/user : No such file or directory : No such file or directory : No such file or directory   If I run it normally (I added #!/bin/bash before the first line)  sh script.sh   I get this output:  : not found.sh: 2: script.sh /home/user script.sh: 3: Can't cd to /home/user script.sh: 4: Can't cd to / script.sh: 5: Can't cd to /usr/local/src/   The script was run from $HOME directory each time. If I run each command one by one from shell, it executed without problems (invoking cd $HOME from within $HOME simply didn't change directory).  What must I do to make this work?


The alternating group is a normal subgroup of the symmetric group

For an exercise, I need to prove that the alternating group $A_n$ is a normal subgroup of the symmetric group $S_n$.  As clue they say we can use a group homomorphism $\operatorname{sgn} : S_n \to \{-1,1\}$. I really don't see how i can use this.... can somebody help?


I have a basic sphere and with freehand addon i have created and arc and bevel that with the circle. To the arc its been bevel like a tube shape.   Tube shape   Adding shrinkwrap modifier the tube shape became flat  Tube flat   Whats wrong why the tube gone flat after adding shrinkwrap modifier. Any suggestion or help thanks.


I am having a template like this HMTL <template>     <lightning-tabset>         <lightning-tab>             {dynamicComponent}         </lightning-tab>     </lightning-tabset> </template>  JS @track dynamicComponent='<c-load-child></c-load-child>';  but it is just rendering as string only but i need it to render as HTML. I tried many option with innerHTMl,appendchild but nothing is working.


Number of Equivalence relations of $\{1,2,3\}$

Let $M$ be the set $\{1,2,3\}$. How many Equivalence relations $R \subset M \times M$ exists?  My idea is to count the disjoint partitions of M:  $K_1= \{\{1\},\{2\},\{3\}\}\Leftrightarrow\{(1,1),(2,2),(3,3)\}$  $K_2= \{\{1,2\},\{3\}\} \Leftrightarrow\{(1,1),(1,2),(2,1),(2,2),(3,3)\} $  $K_3=  \{\{1,3\},\{2\}\}\Leftrightarrow\{(1,1),(1,3),(3,1),(2,2),(3,3)\}$  $K_4= \{\{1\},\{2,3\}\}\Leftrightarrow\{(1,1),(2,3),(3,2),(2,2),(3,3)\}$  $K_5=\{1,2,3\}\Leftrightarrow K_5=M^2$  So the answer would be $5$. Is this correct? Reflexivity and Symmetry are obvious, but how can i check the right side for Transitivity?


A is immersed in water, buoyancy must act on A; B is at the bottom of the container, there is no water between B and the container, that is to say, the bottom of B is not in contact with water, so will buoyancy act on B? Some people say buoyancy works on B, but I don't think so. B is like a suction hook. Water presses B on the bottom of the container. Buoyancy does not act on B. I'm not sure I'm absolutely right.


Glare Transparency Correct in Render, but lost in save to PNG

I know this is a tired problem, but the solutions  and  aren't working for me so I'm posting here. I'm using blender 2.92.0. In the compositor I have a Render Layers Node going into a Glare node, and the Glare node into the Composite node with "Use Alpha" checked. On the left is the blender render with glare, on the right is the saved .png where the glare is lost in the transparency. I want the image to look like the render. Is this to do with premultiplication or something? I tried the other node configurations from the aforementioned posts, and all of them produce similar results with a functioning render and a malfunctioning png.


Can who you pick as "faculty members of interest" make-or-break your PhD application? Question I:  If one happens to pick only faculty who aren't taking in PhD students will that doom ones application? If-not, will the PhD acceptance board try to pair you with a faculty member you did not list – assuming the applicant is of high-quality?  I applied for a PhD program in Computer Science. I will be funded through a Think-Tank/Research-Institution – to which I am a full-time employee. I put this on my application. I did not think too deeply about the faculty of interest. I considered also applying PhD program in Computer Science & Engineering. However, here's the catch. If I apply using the same "faculty members of interest" as the PhD in Computer Science application, I believe my chances of acceptance do not increase. I believe if those faculty members would not have accepted me into their labs as a PhD in Computer Science, they also would not have accepted me into their labs as a PhD in Computer Science & Engineering. However, filling out two Question II:  Is filling out two PhD applications in similar domains with the same "faculty members of interest" somewhat pointless?  Question III:  Is it worth reaching out to admissions to ask to change your "faculty members of interest" after submission if a better fit is found?


In how many ways can $3$ red, $3$ blue, and $3$ green balls be arranged so that no two balls of the same colour are consecutive (up to symmetry)?

Make sequence of $9$ balls from 3 red, 3 blue, 3 green, in such a way that no two balls of the same colour are next to each other. In how many different ways can you do this? (symmetric arrangements must be counted only once).  To start with, all possible arrangements are $9! = 362880$.


Recovering lost or stolen phone using IMEI

I have lost my android phone please help me find its location. I have tried to recover it but all in vain.   What can I do to recover it back using  IMEI ?


Vacuum-packed unfrozen Polish sausage left out overnight. Safe to eat or not?

I left a new, vacuum-packed Polish sausage (kiełbasa) out accidently overnight.   Should I toss it or cook it and eat it?


A basic question on diagonalizability of a matrix

I am following a book where the "diagonalizability" has been introduced as follows:      Consider a basis formed by a linearly independent set of eigen vectors   $\{v_1,v_2,\dots,v_n\}$. Then it is claimed that with respect to this   basis, the matrix $A$ is diagonal.   I am confused at the word "basis" here. In some other books it is said that a  matrix $A$ is called diagonalizable if there exists matrix $P$ such that $P^{-1}AP$ is a diagonal matrix.   I don't think that diagonalizability has anything to do with basis. It just happened that the set of eigen vectors form a basis of $\Bbb R^n$. Also I don't think having a set of $n$ linearly independent eigen vectors is a necessary condition for a matrix to be diagonalizable.


$4^{2020} - 2020$ mod $48$  My Approach: I basically tried to separate $4^{2020}$ into multiple entities and tried to break them down but at one point it just wasn't computational.


Equivalent of iwlist to see who is around?

What is the equivalent to:  iwlist wlan0 scan   to see who (what computers and smartphones) are around me? Maybe putting the card into monitor mode before doing it.


On which site can I ask a question about the similarities and differences between data science and machine learning?

I have a basic question, mainly about the similarities and differences between  (DS) and  (ML). When I put it up on Stack Overflow, someone want to delete my post because he/she pointed out that my question is a question unrelated to programming. Fine. And then I went to this site and I put forward the question, but some people voted it down again.  After that I entered the  Stack Exchange site, but I found there was not a label for data science on that at all. What's more, when I was about to ask that, I had to wait for 40 minutes since I had asked a question on one of your subsites even though I had deleted it. So I am wondering where can I post it so as to get kind answers?  On top of that, I have a suggestion: Could you Stack Exchange provide suggested sites to those who posted inappropriate questions or move the posts to correct sites automatically so that they do not have to find one from the overall 175 sites and wait for an additional 40 minutes intervals?  This is definitely an inefficient process and a pure waste of time, for me, and for those patient teachers.  Edit: @PolyGeo reminded me that I should ask only one question rather than three in each post. It really makes sense, but the point is, can't this problem be solved by just one edit instead of deleting it and finding somewhere else and waiting for a long time? Besides, different people hold different opinions or doubts on my question. Some may say my question is excursive. What can I do?  Following @PolyGeo's advice, I modified my original question as follows (I am not going to ask here; please do not say I am out of topic). And my question again, where can I post?     Recently I took part in an online project about data science, I   learned some frameworks such as Pandas, NumPy, and Sklearn, some basic   knowledge, like kNN, linear regression, regularization, logistic   regression and classification/regression trees. Although I have   finished the course, I am still having a hard time writing my resume   for an application of MS, describing the relationship between what I   have learned with artificial intelligence (AI), or machine learning. Since   I am going to pursue the field of AI, how can I figure out the   similarities between DS and ML/AI so as to express my previous work?      A couple of days ago, I glanced over Coursera and found the   machine learning course provided by professor Andrew Ng is extremely   similar to my previous course except neural networks. My course did   not cover that.      In a nutshell, my question is, what are the links between what I   have learned with machine learning or artificial intelligence?


What is the difference between a tensor, vector, and a matrix?

I'm currently going through notes on a physics course and I'm having trouble understanding the difference between a tensor, a vector, and a matrix. I know that a vector is a kind of tensor and that a matrix is also a form of tensor, but what I'm having trouble understanding is how they differ, and how a vector is related to a matrix.


Solutions in complex number field, instead of $\mathbb{N}$, to Fermat's Last Theorem

As far as I know, we are searching solutions in set of positive integers for $x^n + y^n = z^n$  for $n > 2$. There are many proofs are stated that Fermat is true and there is no solutions for this equations. Now my question is, can we have solutions in complex numbers field? If yes, how to find them.   Thanks in advance.


How can I get the correct text definition of a generic type using reflection?

I am working on code generation and ran into a snag with generics. Here is a "simplified" version of what is causing me issues.  Dictionary<string, DateTime> dictionary = new Dictionary<string, DateTime>(); string text = dictionary.GetType().FullName;   With the above code snippet the value of text is as follows:   System.Collections.Generic.Dictionary`2[[System.String, mscorlib, Version=2.0.0.0,   Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.DateTime, mscorlib,   Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]   (Line breaks added for better readability.)  Is there a way to get the type name (type) in a different format without parsing the above string? I desire the following result for text:  System.Collections.Generic.Dictionary<System.String, System.DateTime>


What does an unexposed band on your image mean?

I've just received and external flash : YN 560 III and I'm learning to use it.  This is a manual external flash, it was mounted on the hot shoe of my Nikon D3200.  For one picture I set the shutter speed at 1/400s and the EXTERNAL flash speed at 1/128 (is this the speed?). This resulted in an unexposed black bar at the bottom half of my image.   Can someone explain why this is happening? I understand that pop-up flashes have limitations, but I thought external flashes overcame these limitations.  Here's a sample photo:


Differences in string compare methods in C#

Comparing string in C# is pretty simple.  In fact there are several ways to do it.  I have listed some in the block below.  What I am curious about are the differences between them and when one should be used over the others?  Should one be avoided at all costs?  Are there more I haven't listed?    string testString = "Test"; string anotherString = "Another";  if (testString.CompareTo(anotherString) == 0) {} if (testString.Equals(anotherString)) {} if (testString == anotherString) {}   (Note: I am looking for equality in this example, not less than or greater than but feel free to comment on that as well)


How do i remove mineral deposits from a toilet's rim jets?

I have an old toilet, and the mineral scale inside (INSIDE inside) the rim is slowing the flush speed.  I reckon I need to temporarily block up the holes somehow, dump a solution in the flapper, and hopefully let it dissolve the buildup (then unblock the holes).  Is there a good natural solution, an "oh, just put in a bottle of corn syrup and let it sit for 2 hours" type of thing, or what?  Where I live, brand names are hard to come by, so I'll need a generic type of thing... any thoughts?


Stability region of explicit midpoint method

Consider the explicit midpoint method, i.e $$y_{n+1}-y_{n-1} = 2hf(y_n).$$  I'm asked to apply this method to the linear test equation, $f(y_n) = \lambda y_n,$ in order to find the method's stability region.   So I have  $$y_{n+1}-y_{n-1} = 2h\lambda y_n.$$  In the problems I've done before I wouldn't have the $y_{n-1}$ term so I could just easily write $y_{n+1} = R(z)y_n.$ How would I solve this?


Excel File with Null Value with String Issue

I get NullPointerException when I run this code -   File src = new File("C:\\myxl.xlsx"); FileInputStream fis = new FileInputStream(src); XSSFWorkbook wb = new XSSFWorkbook(fis); XSSFSheet sh1 = wb.getSheetAt(0);  String mystr=sh1.getRow(1).getCell(4).getStringCellValue(); WebElement mwe = driver.findElement(By.xpath("//div[@title='" + mystr + "']"));  if (mystr.contains(null)) { System.out.println("there is Nothing"); } else  { act.doubleClick(mwe).perform();   What do I change in the code so that if the value in that column and row is empty it will print "there is Nothing" instead of giving me a NullPointerException or else it will take some action with the element.  P.S. This is part a of a Selenium webdriver script


QGIS 3.4 : Add points to exact locations?

I would like to add several coordinates at specific British National Grid Easting and Northing values. I know this can be done by bringing in a .csv, but I want to know is there a way to manually enter the numbers in QGIS 3.4, and then the point moves to that location ? I've read that in QGIS 2.x there was a plugin called Numerical Vertex Editor that doesn't seem to exist for 3.x ?


Assume that $p$ and $q$ are distinct add primes such that $p-1\mid q-1$. If $\gcd(a,pq)=1$ ,show that: $$a^{q-1} \equiv 1 \pmod{pq}$$   I have tried as follows: $$a^{q-1} \equiv 1 \pmod{q} \quad \text{and} \quad a^{p-1} \equiv 1 \pmod{p}$$ $$\implies a^{(q-1)(p-1)} \equiv 1 \pmod{q} \quad \text{and} \quad a^{(q-1)(p-1)} \equiv 1 \pmod{p}$$ $$\implies a^{(q-1)(p-1)} \equiv 1 \pmod{pq}$$ But then I am stuck - please help.


How can I disable all command line access?

I make computers for a not-for-profit organisation.  I don't want anyone to plug a keyboard / mouse / screen into it and be able to do anything on it.  So there is a locked screen at launch, but you can still access TTY with Ctrl+Alt+F1  How can I disable all TTY command lines, or the Ctrl+Alt+F1 shortcuts? (so F1, F2, F3 ... F6)


how to run applications after start in openbox automatically?

So, i decided to run openbox, but how do i set that after logging in i automatically xfce4-panel and nitrogen starts up?!  I looked here something, but that only speaks about unity.


How do electrons move across depletion region in npn transistor?

Concerning the base-collector barrier, the electrons coming from the emitter move through the barrier using diffusion mainly and drift. Does carrier injection happen as a result of these two mechanisms which leads it to be collected by the collector? I have some confusion here.


I want to get set of mail Ids  but in my Query this is not getting parsed properly as single row.Please hlep me to solve this.      SELECT LISTAGG ( EMAIL) WITHIN GROUP (ORDER BY EMAIL) EMAIL1 FROM USER   WHERE ID IN (107) GROUP BY EMAIL      Current Output :  abdul@eetmx.com joseph@eetmx.com ranjith@eetmx.com   Expected Output :  abdul@eetmx.com,joseph@eetmx.com,ranjith@eetmx.com


Having problem to watch any kind of videos except Youtube videos

I am unable to watch any kind of Facebook Live Videos, or any kind of videos in Facebook. But I am able to watch Youtube Videos. I am a new user of Ubuntu 20.04, and my search engine is - Firefox Web Browser. I have tried video codec. I have also installed Flash Player. But the problem didn't fix.


What does "active" mean in my flagging summary page?

My flagging summary page displays "active" for a particular flag that seems to be not actioned yet. What does that mean?


I have heard Foo a lot, what does it mean?

Call me a noob, 'cause I really am, but what does 'foo' mean? I have seen it a lot. but I don't know what it means. Could someone clarify? All help is appreciated.


I recently recorded a session with my dad. I stopped the recording after the session ended (with the setting set to save to Desktop), clicked the icon that appeared on the lower right corner to open the file, and played back a few minutes to make sure it worked. I then clicked Share to send it via AirDrop to my computer, which did not work; the status remained "cancelled" despite my efforts. I assumed I'd be able to access it through my phone by sending it through a third app, so I pressed cancel on the AirDrop pop-up window. The entire screen recording closed and (apparently) vanished forever after the action. I'm extremely frustrated because I can't seem to locate this video.


Hawking Radiation specific clarification

If virtual particles on the edge of a black hole pop into existence randomly, wouldnt the likelyhood of a antiparticle generating on the inside of the black hole equal to a particle doing the same? So how is hawking radiation possible.


How to parse a month name (string) to an integer for comparison in C#?

I need to be able to compare some month names I have in an array.  It would be nice if there were some direct way like:  Month.toInt("January") > Month.toInt("May")   My Google searching seems to suggest the only way is to write your own method, but this seems like a common enough problem that I would think it would have been already implemented in .Net, anyone done this before?


Refused PLAB visa last year, reapplying now

I visited my sister in UK last year for 6 months sep-mar 2014, for which I got family visitors visa during which I had cleared my PLAB 1 and had vacation with my sister and her family in UK. Immediately after my exit from UK, I applied for a business visitor visa for PLAB 2 exam, which was refused on the grounds of my intention to defacto residence in UK with multiple entries with 1 year my stay would be of more than 6 months, and I didn't show any employment details.   Now after 1 year I am reapplying visa for PLAB exam, I have an employment letter, payslips and a sponsorship letter from my sister with all her supporting documents. But my account has only 20000 rupees I.e £200, my dad has £5000 in his account and my sister(in UK) has 3000£ in her account. Would this be sufficient or should I make any changes now? Kindly guide me how to apply in a better way to avoid refusal this time. Should I show my salary getting deposited in my bank statement or payslips are enough?


Why do I have two Alt+Tab application switchers?

I have two Alt+Tab window switchers. It's super confusing to try to use them. This screenshot shows it pretty well:    How can I get back to the regular switcher (the one in the background)? I'm guessing the one in the front is the older switcher. It seems the current behavior is that both switchers are functioning, but the one on top get's the "last word." So the selected window in the bottom switcher will be second to the top, while the one in the top switcher will be in front.  Background:    I lost Unity and finally got it back, after trying a lot of things. What finally worked was solution #1 from :    sudo rm -fr ~/.cache/compizconfig-1 sudo rm -fr ~/.compiz   Shortly before Unity disappeared (possibly the previous time the computer was on) I ran sudo apt-get dist-upgrade, which I am suspecting may have caused the problem.  What I've tried: sudo apt-get install --reinstall compiz and then log out.


Show that $\langle x,y\rangle_A = \langle Ax,Ay\rangle$ is an inner product on $\mathbb R^n$

Let $A$ be an $n \times n$ matrix with real enteries. Define $\langle x,y\rangle_A = \langle Ax,Ay\rangle, \quad x,y \in \mathbb R^n$ , where $\langle,\rangle$ is a standard inner product on $\mathbb R^n$. Then  $\langle x,y\rangle_A$ is an inner product iff  1)  $\ker A = \{0\}$.  2) $\operatorname{rank} A= n$.  3) all eigenvalues of $A$ are positive.  4) all eigen value of $A$ are non negative.  Clearly if $\ker A \neq \{0\}$, then there exist $x \neq 0$ such that $Ax =0$, then $\langle Ax, Ax\rangle_A = 0$, then $\langle ,\rangle_A$ is not inner product, so $\ker A = \{0\}$, thus rank of $A$ is $n$.  I am unable to check the 3) and 4) option. Please help to check the other option. Thank you


Why am I not receiving the "explainer" badge?

I recently edited  on MA stack exchange, and within 10 minutes posted an answer. My answer received 2 votes.  When I look at my badges, the "explainer" badge has not yet been conquered. Now, this is where it get's strange:   Notice that I have 1/500 for "Illuminator", which means that I should have gotten the "explainer" badge already. Is this a bug? Am I missing something?


Why can't a single photon produce an electron-positron pair?

In reading through old course material, I found the assignment (my translation):     Show that a single photon cannot produce an electron-positron pair, but needs additional matter or light quanta.   My idea was to calculate the wavelength required to contain the required energy ($1.02$ MeV), which turned out to be $1.2\times 10^{-3}$ nm, but I don't know about any minimum wavelength of electromagnetic waves. I can't motivate it with the conservation laws for momentum or energy either.  How to solve this task?


Skewed variables in PCA or factor analysis

I want to do principal component analysis (factor analysis) on SPSS based on 22 variables. However, some of my variables are very skewed (skewness calculated from SPSS ranges from 2–80!).   So here are my questions:   Should I keep the skewed variables like that or could I transform the variables on principal component analysis? If yes, how would I interpret factor scores?  What type of transformation should I do? log10 or ln? Originally, my KMO (Kaiser–Meyer–Olkin) is 0.413. Much literature recommends a minimum of 0.5. Can I still do factor analysis, or do I need to remove variables to raise my KMO to 0.5?


is it possible to add new information field to users in wordpress ? (company name for ex)

i try to add new information to wp users but i find nothing , i'm also use wp_insert_user($args); to create new  users in wordpress . for a project i need to add company names to user profiles . the users access will filtered by user roles and companies name ... . i found this on the internet but didn't help me function custom_user_profile_fields($user){     ?>
Extra profile information

             Company Name	                              <input type="text" class="regular-text" name="company" value="<?php echo esc_attr( get_the_author_meta( 'company', $user->ID ) ); ?>" id="company" />
                 Where are you?

     <?php } add_action( 'show_user_profile', 'custom_user_profile_fields' ); add_action( 'edit_user_profile', 'custom_user_profile_fields' ); add_action( "user_new_form", "custom_user_profile_fields" );  function save_custom_user_profile_fields($user_id){     # again do this only if you can     if(!current_user_can('manage_options'))         return false;      # save my custom field     update_usermeta($user_id, 'company', $_POST['company']); } add_action('user_register', 'save_custom_user_profile_fields'); add_action('profile_update', 'save_custom_user_profile_fields');  is there any solution that do my problem ? anyone can help me please ?


Is there any way to access the OOTB  of salesforce communities from an LWC or Aura component? We have custom Theme and wondering if we can include this as part of our layout rather than dragging it to the page as a separate component.


What is Realms and why does it keep telling me "No available servers"?

How do I visit worlds on the 0.7.1 version of Minecraft PE?  I signed up for Realms and so did my friend and I want her to visit my world there but it says there is no available servers. What is Realms anyway – is it the new way to connect servers? Do we need to be on the same wifi system anymore?


What does "off" mean as in "He chose a three-star hotel off fashionable Orchard Road."  As a foreigner, I was not sure. It seems to me that hotels are always "off the road", it's always "on the side of some road."  Does "off the road" mean it's near the road (off the road but on the side) or far away from the road?


How can someone get his/her question noticed when there are no replies/comments/answers?  I myself have several questions where...  ... (but it did got me the Tumbleweed badge, not sure if I am proud about that :-)  ...  What is the "best practice" to get your post noticed?


Two pane file manager for Mountain Lion?

I recently moved from Linux to Mac, and am missing a two pane file manager. I was thinking about along the lines of midnight commander, krusader (Linux) or total commander (Windows).  I installed midnight commander and am using it, but a GUI file manager would sometimes be handy.  Any suggestions for Open Source alternatives?


If I wanted to say that I am not hungry I could leave out the "no more" so shouldn't the "no more" cancel out the "not hungry" to mean that you are hungry. However other examples, like "I don't love her no more", still make me think that the meaning doesn't change but I don't see how this is grammatically correct and think "anymore" should be used instead. "I am not hungry anymore." So why dont the two negatives in the original sentence cancel each other out?


"print()" is producing undesired output in Visual Studio Code

I have written a Python 3 code, which is:  i = int(input("enter number: ")) print("enter",i)   I'm expecting an output as:  enter number: 5 enter 5   However, I'm getting this:  enter number: 5 ('enter', 5)   What could be the issue? How can I rectify this?


How to stop my Mac from cloning MP3 files on my USB stick?

Whenever I move my MP3 files to my USB and play it in the car, the files get cloned. For example:  Sia - Chandelier   Then the clone looks like   .Sia - Chandelier  The clones don't actually work. They're simply the MP3 file names. Whenever I select them in my car, it skips to another song that doesn't have . before it. So on my Mac OSX, the MP3 look normal, and have no clones, but once I plug in the USB to my car, every song has its own clone.


Remove lines from file up to a pattern, unless the pattern doesn't exist

I am attempting to write a filter using something like sed or awk to do the following:   If a given pattern does not exist in the input, copy the entire input to the output If the pattern exists in the input, copy only the lines after the first occurrence to the output   This happens to be for a "git clean" filter, but that's probably not important. The important aspect is this needs to be implemented as a filter, because the input is provided on stdin.  I know how to use sed to delete lines up to a pattern, eg. 1,/pattern/d but that deletes the entire input if /pattern/ is not matched anywhere.  I can imagine writing a whole shell script that creates a temporary file, does a grep -q or something, and then decides how to process the input. I'd prefer to do this without messing around creating a temporary file, if possible. This needs to be efficient because git might call it frequently.


How do you find a memory leak in Java (using, for example, JHat)? I have tried to load the heap dump up in JHat to take a basic look. However, I do not understand how I am supposed to be able to find the root reference () or whatever it is called. Basically, I can tell that there are several hundred megabytes of hash table entries ([java.util.HashMap$Entry or something like that), but maps are used all over the place... Is there some way to search for large maps, or perhaps find general roots of large object trees?  [Edit] Ok, I've read the answers so far but let's just say I am a cheap bastard (meaning I am more interested in learning how to use JHat than to pay for JProfiler). Also, JHat is always available since it is part of the JDK. Unless of course there is no way with JHat but brute force, but I can't believe that can be the case.  Also, I do not think I will be able to actually modify (adding logging of all map sizes) and run it for long enough for me to notice the leak.


Can't open Samsung T5 SSD on Ubuntu 18.04

I'm not able to open my Samsung T5 500GB disk on Ubuntu 18.04. I was able to open it before without problem. The device is shown on dmesg and lsusb command, but is not recognized by the Device Manager. It is also not accessible in Dolphin file manager. I can see the SSD in GParted.  The device is not encrypted as it is opening on Windows without any problem. Is there any way to make this disk readable again on Linux?


Suppose $S=\frac{15}{16}+\frac{15}{16} \times \frac{21}{24}+\frac{15}{16}  \times \frac{21}{24}  \times \frac{27}{32}+\dots \dots$ Does it converge? If so find the sum.    What I attempted:-  On inspection of the successive terms, it easy to deduce that the $n^{th}$ term of the series is $t_{n}=\left(\frac{3}{4}\right)^n \quad\frac{5.7.9.\dots \dots (2n+3)}{4.6.8. \dots \dots (2n+2)}$    Thus $\frac{t_{n+1}}{t_n}=\frac{3}{4} \times \frac{2n+5}{2n+4}$. As $n \to \infty$ this ratio tends to $\frac{3}{4}<1$. Hence by Ratio test it turns out to be convergent.    A similar type of question has already been asked . One of the commenters has provided a nice method to evaluate the sum of such series using recurrence relation and finally using the asymptotic form of Catalan Number.   To proceed exactly in the similar way, I wrote $t_n$ as follows:- $t_n=\frac{1}{3} \left(\frac{3}{8}\right)^n \quad\frac{1.3.5.7.9.\dots \dots (2n+3)}{(n+1)!}=\frac{1}{3} \left(\frac{3}{8}\right)^n \frac{n+2}{2^{n+2}} \binom{2n+4}{n+2}\approx \left(\frac{3}{4}\right)^{n-1}\frac{\sqrt{n+2}}{\sqrt{\pi}} \quad (\mbox{For large $n$})$.   I have used the  recurrence relation $S_n=S_{n-1}+T_n$, along with the initial condition $S_1=\frac{15}{16}$, in order to get a solution like this $$S_n=7.5+\frac{T_n^2}{T_n-T_{n-1}}$$.     I am getting trouble in evaluating the limit of the second term as $n \to \infty$.    I haven't cross checked all the steps. Hope I would be pointed in case of any mistake.


What is the simplest IDisposable pattern in c#?

If I have a class which makes use of managed resources only, so I don't see any need to fully implement the IDisposable pattern.  Surely this is sufficient:      public class ManagedResourceClient : IDisposable     {         private ITheManagedResource _myManagedResource = new TheManagedResource()          public void Dispose()         {             if ( _myManagedResource != null )             {                 _myManagedResource.Dispose();                 _myManagedResource = null;             }         }      }   I don't see any reason to use:   a finalizer as this is using only managed resources that implement IDisposable a 'disposing' flag as this is handled by a null check a virtual Disposing method as there is no need to differentiate between GC calls and direct calls.   Can the above be confirmed as correct?


What happens when you get items for leveling up but your backpack is already full?

When you level up you get some free goodies, but what happens to those if your backpack happens to be full at that time?   Are the new goodies lost? Are some (random) items in your backpack discarded or can you choose which ones? Or something else?


I have already opened a SSH session on my PC and it worked perfectly with my laptop when connected to the same network. But now, when I'm at a different location, I can't connect.  I've already tried to edit the /etc/hosts.allow by adding  sshd : ALL : allow    But, it didn't work. Is there something that I'm missing?


I have an htc desire 816 that I just recently bought and it was fine at first but it stared giving me the error message that there was "insufficient space on the device" when I tried to download any app. I went and bought myself an SD card but even with the SD card in it, the phone is still giving me this error message. Any ideas why or how to fix it?


I've been studying for an exam and in one of the exams it asks me the parametrise the unit circle in $R^3$ which lines in the plane $$x+y=0$$.  I know how to parametrise a normal circle, but I don't really have any idea how to parametrise it in a plane like that. Any help would be appreciated, thanks 😊


I am trying to display all options in my select tag when the user focus on the field or when my page is loaded:  here's my code  <select id='idSelect' autofocus>      <option value='val1'>1</option>      <option value='val2'>2</option>      <option value='val1'>3</option> </select>   I used the "autofocus" attribute but it does not work and then i tried to do in my javascript code like this    document.getElementById('idSelect').autofocus = true;   any help would be appreciated.


auto margin is not working in top and bottom in css

auto margin in not working in top and bottom..... my goal is to make body float in middle with equal margin in top and bottom side....... my expected result is to same height of top and bottom margin........ but the result is body shifted to top side    html {     width: 100vw;     height: 100vh;     background-color: red;     margin: 0px;     padding: 0px; } body {   background-color: chartreuse;   width: 90%;   height: 90%;   padding: 0px;   margin: auto;   border-color: black;   border-width: 10px;   border-style: solid; } <!DOCTYPE html> <html lang="en"> <head>          <title>Document</title> </head> <body> </body> </html>


I am creating a simulation of planets with the help of newton's law() and everything works fine but I can't find any source how to calculate the perfect start velocity of a planet in order to orbit another planet in a perfect circular motion given following known parameters of both planets: mass, distance from mass center to mass center, G  following code to calculate acceleration:  calcBodyAcceleration(body1, body2) {      var G = Settings.get("G");     var mults = Settings.get("multipliers");      var pos1 = Vec2.add(body1.position, body1.center);     var pos2 = Vec2.add(body2.position, body2.center);      var subtraction = Vec2.subtract(pos1, pos2);     var dist2 = subtraction.magnitudeSq();     var dist = Math.sqrt(dist2);      var mass1 = body1.mass * mults.mass;     var mass2 = body2.mass * mults.mass;      var mass = mass1 * mass2;     var force = G * (mass / dist2);      subtraction.divide(dist).multiply(force).divide(mass1);      body1.acceleration.subtract(subtraction);  }


Ubuntu 18.04.4 on dell XPS - very slow boot

I have a very slow boot. Here is what I did to try to understand where it might be coming from:  >> systemd-analyze time  Startup finished in 7.305s (firmware) + 6.781s (loader) + 6.572s (kernel) + 2min 8.861s (userspace) = 2min 29.521s graphical.target reached after 2min 8.779s in userspace  >> systemd-analyze blame        2min 258ms networking.service       6.017s plymouth-quit-wait.service       5.071s resolvconf-pull-resolved.service       4.168s ath10k-delay-load.service       2.046s postfix@-.service       1.143s dev-nvme0n1p3.device       1.002s snapd.service   I also tried to inspect  >> dmesg   And I see the following jumps in time:  [   25.407277] IPv6: ADDRCONF(NETDEV_CHANGE): wlp58s0: link becomes ready [  129.053090] kauditd_printk_skb: 81 callbacks suppressed   and:  [  167.590890] audit: type=1400 audit(1590617895.162:102): apparmor="DENIED" operation="capable" profile="/snap/core/9066/usr/lib/snapd/snap-confine" pid=3965 comm="snap-confine" capability=4  capname="fsetid" [  216.258537] pci 0000:03:00.0: [8086:1575] type 00 class 0x088000   Here is the full dmesg output:   Not sure if any of that is related to the long waiting times. Does anyone have any ideas where to look more and what could be the issues? Please let me know what kind of additional information you would need.  Many thanks!


Extending JComboBox, errors when building with addItem and String []

I've created my own CategoryComboBox from JComboBox and using an update() method to add the items. I can't understand why it's working from one String [] (see below, commented out,"Bird", "Cat", etc) and not another (transactions.getCategoriesArray() which returns also String [])  Below is my custom JComboBox:  public class CategoryComboBox extends JComboBox<String> {      /**      *       */     private static final long serialVersionUID = 1L;      private Transactions transactions;      public CategoryComboBox(Transactions transactions) {         update();     }      public void update() {         removeAllItems(); //      String[] categories = { "Bird", "Cat", "Dog", "Rabbit", "Pig" }; // works         String[] categories = transactions.getCategoriesArray(); // line 24, errors         for( String c : categories ) {             addItem(c);         }     } }   If it helps, here is my method of the transactions object's class:  public class Transactions {      //...      public String [] getCategoriesArray() {         String[] categories = { "Bird", "Cat", "Dog", "Rabbit", "Pig" };         return categories;     }    }   When I click Run... in Eclipse I get the following errors in the console:  Exception in thread "main" java.lang.NullPointerException     at biz.martyn.budget.CategoryComboBox.update(CategoryComboBox.java:24)     at biz.martyn.budget.CategoryComboBox.<init>(CategoryComboBox.java:17)     at biz.martyn.budget.NewTransactionDialog.<init>(NewTransactionDialog.java:36)     at biz.martyn.budget.TransactionsToolbar.<init>(TransactionsToolbar.java:34)     at biz.martyn.budget.Budget.main(Budget.java:41)   Should there be anything different in either case?


Existence of right inverse surjective continuous linear operator on Banach spaces

Let $X,Y$ be a Banach space and let $T:X\rightarrow Y$ be a surjective continuous linear operator. As mentinoed in this , we know there exists a right inverse linear operator.   But I want to know whether $T$ has a continuous right linear inverse $S$, i.e., there exists a bounded linear operator $S:Y\rightarrow X$ such that $T\circ S=\mathrm{id}_Y$.   In the case of finite dimensional vector spaces, linear operator is bounded linear operator. So there is nothing to prove.   This question is arisen when I study sum space of two Banach spaces.   Thanks in advance.


Is there support for encrypting the whole boot/system drive with Truecrypt in Ubuntu?

Is there (or is there not) support for encrypting the whole boot/system drive with Truecrypt in Ubuntu?


Why does my wifi speed slow dramatically when more than one person uses it?

Whenever both my roommate and I use the wifi in a certain room in our apartment, it slows dramatically for me. It doesn't slow for him. If he uses it in another room, it's fine; if I use it in another room together with him, it's fine; it's just in this particular room. Does anyone know of a reason this could be?


conditioning by independent sigma-algebras

Let $X$ a random variable, $\mathcal{A}$, $\mathcal{B}$, two $\sigma$-algebras such that $\sigma(X,\mathcal{A})$ is independent of $\mathcal{B}$.   Is it always true that $\mathbb{E}[X|\sigma(\mathcal{A}, \mathcal{B})]=\mathbb{E}[X|\mathcal{A}]$?  I can show it for $\mathcal{A}$, $\mathcal{B}$ finite algebras, but I do not know how to extend it to general sigma-algebras.


I put ubuntu live USB to laptop and nothing happened

As the title says, I created it, don't know if right. It doesn't do anything. What should I do? Thanks, (I have some grub problems).