Currently my migration:   $table->string('avatar'); $table->boolean('online')->default(0); $table->boolean('adult')->default(0);   In the schema :

Since MySQL doesn't seem to have any 'boolean' data type, which data type do you 'abuse' for storing true/false information in MySQL?  Especially in the context of writing and reading from/to a PHP script.  Over time I have used and seen several approaches:   tinyint, varchar fields containing the values 0/1, varchar fields containing the strings '0'/'1' or 'true'/'false' and finally enum Fields containing the two options 'true'/'false'.   None of the above seems optimal. I tend to prefer the tinyint 0/1 variant, since automatic type conversion in PHP gives me boolean values rather simply.  So which data type do you use? Is there a type designed for boolean values which I have overlooked? Do you see any advantages/disadvantages by using one type or another?


I have an electric bike moved by a battery. I am at a train station with two friends. A flat train car platform passes by at $1 m/s$. The friend #1 jumps on it while the friend #2 remains at the station. I turn on my bike, accelerate to $1 m/s$ and ride onto the platform to catch up with the friend #1. My total weight is $100 kg$. Thus the energy I have taken from the battery is:  $E_1 = \frac{mv^2}{2} = \frac{100\cdot1^2}{2}=50 j$  Meanwhile my motor is still running and I accelerate again to $1 m/s$ relative to the platform or $2 m/s$ relative to the station. The friend #1 on the platform observes me gaining $1 m/s$ relative to him that corresponds to taking the energy of another $50 j$ from the battery for the total of:  $E_2 = 50 + 50 = 100j$.   However, the friend #2 at the station sees me accelerating to $2 m/s$ relative to him that corresponds to the total energy of:  $E_3 = \frac{100\cdot2^2}{2}=200 j$  I also have a gauge showing the total energy taken from the battery. The reading on the gauge does not depend on the frame of reference. Obviously, the gauge will show $100$ joules, but how can this number be reconciled with the observation of the friend #2? Where does the extra energy he sees come from?

The energy of a moving object is $E = mv^2\;.$ That is it increases with velocity squared.  I walk at say 3 miles per hour, or lets round that down to 1 meter per second for a slow walk. I weigh less than $100~\mathrm{kg}\;,$ but lets just round that up to $100~\mathrm{ kg}$ for convenience (it is just after Christmas).  So when I walk along the pavement, I have $100~\mathrm{kg\; m^2 s^{-2}}$, 100 joules of kinetic energy.  Now I get on a passenger jet, which is cruising at around 500 knots, call that 250 meters per second.  In my seat I have $100\times 250^2 = 6250000$ joules of kinetic energy. But when I walk down the aisle I have $100\times 251^2 = 6300100$ joules of kinetic energy. The difference between these is: 50100 joules.  It feels the same to me, walking down the pavement as walking down the aisle of the plane. I didn't have to make some huge effort to get up to speed on the plane, yet I needed 500 times the energy to do it.  How is this possible, and where did the energy come from?


Alright, so this is a fantasy book (I am eighty-five percent positive). Honestly I wish I remember something from the book, but all I remember is the cover. I read it in 2007.  The cover has a young girl on the cover who is surrounded by green. She has fair skin and brown hair that is in a ridiculously long braid. there may all be a small animal on the cover with her, I'm not entirely sure. She's smiling, but it's a soft smile.   The series is meant for young adults and is part of a series. If anyone at all could help that would be super! Thanks again!    Incorporating comments from OP:     It was a drawn cover, natural book. She was wearing a green top. She was only visible from just below her shoulders and up. There were green vines surrounding her, but all I remember of the background is green. I got it from my Aunt and I have no clue when it was written, but it seemed fairly new. Fantasy. I couldn't see how long the braid was, but I remember that it was described as longer than usual. No, it is not Rapunzel, I am 100% positive I would remember Rapunzel. It's not anything like Rapunzel.           After searching for a while longer, I remember that it is centered around the girl and she had a small animal with her, along with a bird. That's really all I remember. I contacted my Aunt about it, but I'm not sure she'll remember. It was part of a trilogy! The first book is as described and the second all I remember is that she was somewhere near the sea.

I forgot the name of these books, but they are for kids, and perhaps 200 pages apiece.  There is some magical element to them, but I forgot what exactly it was. I seem to remember conscience animals at one point, but all the characters are human.  I distinctly remember in one of the last books, there is an island with several large pillars of earth on it, and at least one or two of them are so high that they stretch into the clouds and are impossible to see or climb. Another is covered in grass at the top. The others have bridges across them, and the island is populated by people. The main characters come in a boat with knowledge of some big sea monster, and at the end of the book, the monster knocks over one of the tall pillars, and it does a domino effect. The final and tallest pillar crashes down on the monster and it is found to have spikes on it, like that was it's intended purpose.  I seem to remember the sea creature was released by a pair of boys accidentally from an underground lake in an earlier book. They were adults on the ship at the time that the group reaches the island.  I also distinctly remember a game of chess between a girl and a prison guard (or a prisoner maybe?) that the book showed move-by-move in an earlier book. In the same book, I remember some kind of underground tunnel used to escape from the city's walls where the girl lives.  Anyone know what series this is?


I want to get an idea of the look and feel of Ubuntu before committing to installing it on my PC. A number of years ago, I created a CD with Ubuntu that could be started on the PC without permanently installing it. Is that still possible?

How do I make an Bootable Ubuntu USB containing the the latest version of Ubuntu?  For completeness, how would I be able to do this on Ubuntu, Windows, OS X or another Linux distro?


I have a javascript function whose number of input arguments is not known ( has variable number of arguments) and it has also an input dictionary argument called "kwargs" argument which can have some other arguments as (key,value) , like this: function plot( data, kwargs={}){ }  I want to get both the "name" and "value" of the arguments in the body of the function when I call the function with a number of arguments. Suppose that I want to have a function call like this: plot(lines, xlabel="Project",          ylabel="Investor",          xfmt="%", xscale=100, yfmt="%.", yscale=100)  I want to gain "xlable", "Project", "ylabel", "Investor", "xfmt","%" and so on(maybe more arguments) in the function definition. How can I write 'plot' function def?

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


I’m super new to number theory and here is a question from a textbook: Prove this : if $1\le m$ and $2\le n$ ,m and n are natural numbers then we have : $$(n-1)^2|(n^m-1) \iff (n-1)|m$$ I even appreciate a hint or guiding me through the answer.

How do you prove this?  $$\left(n-1\right)^2\mid\left(n^k-1\right)\Longleftrightarrow\left(n-1\right)\mid k$$


I've looked around at various questions, but I haven't found a clear place where this is documented.  When posts reach a certain (low) score, a post will stop showing up on the main page of whatever site you are looking at (though you can still see it by going to "Questions" which shows all of them).  What is the threshold for doing this?  And if it is different, what are the thresholds on the main page of main sites, local metas, and MSE specifically?

I just noticed that the question:  doesn't appear in the "active" list.  If this list were based purely on last modified time, it would be there; so I am assuming that a question will no longer appear in the active questions list at a certain number of downvotes.  Just out of curiosity, is the exact number of downvotes that it takes to kick a question off the active list publicly available or are the details of this functionality purposefully undisclosed?  (or is there another reason that invalidates my initial assumption of it being based on downvotes?)


I have a <head> full of .css, .js and metadata. But there is just one script that will not run properly if it is put in the <head> of the html. It will only work if it is at the end of the file.  What I would like to know is, if there are any documentation regarding this or a special type of rules I should follow as a beginner web designer.  <html> <head>  <link href="css/style.css" rel="stylesheet">  <link href="css/style2.css" rel="stylesheet">  <script src="js/script.js"></script>  <script src="js/scipt2.js"></script> </head> <body> <----------HTML----------> </body>  <script src="js/secret.js"></script> </html>

When embedding JavaScript in an HTML document, where is the proper place to put the <script> tags and included JavaScript? I seem to recall that you are not supposed to place these in the <head> section, but placing at the beginning of the <body> section is bad, too, since the JavaScript will have to be parsed before the page is rendered completely (or something like that). This seems to leave the end of the <body> section as a logical place for <script> tags.  So, where is the right place to put the <script> tags?  (This question references , in which it was suggested that JavaScript function calls should be moved from <a> tags to <script> tags. I'm specifically using jQuery, but more general answers are also appropriate.)


I cannot sync contacts from my iPhone to my Gmail account. I have a standard Google account setup in my Mail, Contacts, Calendars settings (Exchange is not available to me). Also, my Gmail is set as my default account.   Note, my contacts are synced from Gmail to my iPhone, but not in reverse; meaning, any contact I add on my phone never makes in into my Gmail contacts. I'd like to not have to do this manually or through iTunes.

I have the old iphone 3GS LATEST IOS  I used to open Itunes to put songs on the phone etc and if I wanted to I would (manually)sync my phone. Syncing the phone enacts whatever your options are set to. In my setup that meant, hitting "sync" would cause:   1  Backup- iphone backed up to the PC,    2  Calendar - iphone calendar synced with Oulook calendar on my computer  3  Contacts, that is the iphone contacts (phone nums, and any other info like street address, email address)  - synced with gmail contacts. NOTE: In 2 & 3 syncing meant that any new contacts put in the iphone since the last sync, would be added to my gmail contacts and any new contacts in my gmail contacts that were not in my iphone were added to the iphone. So the syncing worked both ways. Handy, as if I ever lost my phone (apart from having the backup on the PC) my phone contacts would be in my gmail.   I did not do the above sync for some months and when I went to do it recently I find that Apple has changed things. The dropdown list that had gmail on it for selecting which email application you wanted your iphone contacts to sync to, no longer had gmail on it and it had to defaulted to Outlook. Certainly don't want contacts to go there. So I unselected the contacts sync so now when I sync only my calendar gets done.  Apple apparently wants to be less connectable to non apple entities, so wants people to sync contacts with icloud. Useless for my purposes. :(  My question: HOW TO sync, if possible, my iphone contacts with my gmail contacts even if it is a 2 step process. There are a lot of questions similar to this on the site but none seem to deal with the fact that I want to be sure that I do not cause any iphone contacts to be wiped in favour of what is in my gmail contacts or vice versa  ( Back a few years, I thought I would make a new start with a clean slate on my gmail contacts so wiped them all and then synced, thinking all my iphone contacts would appear in my gmail contacts. Because the syncing process updates the other entity with the latest actions from and to each other, the iphone was updated by the latest actions which were in gmail contacts, so wiped the iphone contacts clean!  Was not happy)  With all this in mind, can anyone tell me how to do a 2 way update (sync) or if this is no longer possible to at least update my gmail contacts with any changes in my iphone contacts?  HELP is appreciated.


I recently autoremoved my old unused kernels. At the end of the process it output this message:  W: Duplicate sources.list entry http://dl.google.com/linux/talkplugin/deb/ stable/main amd64 Packages (/var/lib/apt/lists/dl.google.com_linux_talkplugin_deb_dists_stable_main_binary-amd64_Packages) W: Duplicate sources.list entry http://dl.google.com/linux/talkplugin/deb/ stable/main i386 Packages (/var/lib/apt/lists/dl.google.com_linux_talkplugin_deb_dists_stable_main_binary-i386_Packages) W: You may want to run apt-get update to correct these problems   So I ran sudo apt-get update but got the same message at the end of that. So I ran it again and still got the same message.  What should I do now?    Details  sources.list.d   chris-lea-node_js-trustyy.list daniel_pavel-solaar-trusty.list daniel_pavel-solaar-trusty.list google.list google.chrome.list google-chrome.list.save google-talkplugin.list   source.list (comments removed for brevity)  deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted  deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted  deb http://us.archive.ubuntu.com/ubuntu/ trusty universe deb-src http://us.archive.ubuntu.com/ubuntu/ trusty universe deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe  deb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ trusty multiverse deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse  deb http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse  deb http://security.ubuntu.com/ubuntu trusty-security main restricted deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted deb http://security.ubuntu.com/ubuntu trusty-security universe deb-src http://security.ubuntu.com/ubuntu trusty-security universe deb http://security.ubuntu.com/ubuntu trusty-security multiverse deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse  deb http://extras.ubuntu.com/ubuntu trusty main deb-src http://extras.ubuntu.com/ubuntu trusty main

I keep getting this warning whenever I try to run sudo apt-get update.  W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ precise-updates/main i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_precise-updates_main_binary-i386_Packages) W: You may want to run apt-get update to correct these problems   Below is the output from /etc/apt/sources.list file:  deb http://archive.ubuntu.com/ubuntu precise main restricted deb-src http://archive.ubuntu.com/ubuntu precise main restricted  deb http://archive.ubuntu.com/ubuntu precise-updates main restricted deb-src http://archive.ubuntu.com/ubuntu precise-updates main restricted  deb http://archive.ubuntu.com/ubuntu precise universe deb-src http://archive.ubuntu.com/ubuntu precise universe deb http://archive.ubuntu.com/ubuntu precise-updates universe deb-src http://archive.ubuntu.com/ubuntu precise-updates universe  deb http://archive.ubuntu.com/ubuntu precise multiverse deb-src http://archive.ubuntu.com/ubuntu precise multiverse deb http://archive.ubuntu.com/ubuntu precise-updates multiverse deb-src http://archive.ubuntu.com/ubuntu precise-updates multiverse  deb http://archive.ubuntu.com/ubuntu precise-security main restricted deb-src http://archive.ubuntu.com/ubuntu precise-security main restricted deb http://archive.ubuntu.com/ubuntu precise-security universe deb-src http://archive.ubuntu.com/ubuntu precise-security universe deb http://archive.ubuntu.com/ubuntu precise-security multiverse deb-src http://archive.ubuntu.com/ubuntu precise-security multiverse   How do I fix it?


I have Ubuntu 10.04 LTS (Lucid Lynx).  I've noticed recently every file on my hard drive gets the executable privilege, even every text files, so when I open it a pop-up window asks me what to do (run in terminal-Display-Cancel-Run).  I tried to change permissions in the terminal as sudo chmod a-x -Rv /media/D/*. It shows me that privileges have been changed to 666 which means rw-rw-rw, but actually nothing has been done; it's still as executable privilege given.  I tried to move some files to the desktop. Then did as above, and it was successful.  My hard drive is formatted as "FAT32". What would be the problem?

I am using Microsoft Visual C++ on Windows and Qt Creator on Ubuntu. I can't change permissions on my flash drive (FAT32), even as root.  How can I change permissions on a FAT32 flash-drive?


While frying in the pan, meat gives out the moisture, that causes oil to "shoot".  How do you make cutlets? And is there something, that I can add to the meat, to make water stay inside or go out slower? I've tried to add dry bread to meat, but it doesn't help. Maybe egg?

I was using canola oil and put the stove top setting on "high - 9". I read plenty of guides suggesting there will infact be oil splatter, but it was pretty excessive and burning my arm with one drop getting near my eye before I stopped. I turned the heat setting down to "medium - 4", where the oil splatter seemed to drop substantially. Before I try to make steak again I'd like to get some clarification  So my questions are:   Which heat setting am I supposed to use? Is that type of oil splatter normal or should I try using a different oil, and if so, what oil? Should oiling the meat instead of the pan help the problem?


Can someone please explain in what cases the following syntax can be used and how does this work?  (function($) {     $.fn.hoverIntent = function(f,g) {     }; })(jQuery);   Thanks!

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


Let $E$ be an elliptic curve; $\alpha,\beta$ two points of $E$; and $a$ a private key such that $\beta=a\cdot\alpha$. We choose random integer $k$ and plain text $x\in E$. Encryption and decryption methods are as follows:  $\operatorname{Enc}(x,k)=(k\cdot\alpha,x+k\cdot\beta)$ $\operatorname{Dec}(y_1,y_2)=y_2-a\cdot y_1$  How can we convert a message such as "Hello" to a point of $E$? edit: In  to question "", we are given a general probabilistic method, and methods that are easy for special cases; for example when the curve is super-singular, or for ordinary curves defined over $\mathbb F_q$ with $q=3\bmod 4$ and group order divisible by $4$. I am looking for methods which are not probabilistic and are applicable to general cases. Do such methods exist? I will be so thankful for any helpful comments and answers.

I would like to perform a variant of Elliptic Curve ElGamal in java using the BouncyCastle libraries.  I currently face the difficulty of mapping a message $m$ onto the elliptic curve $E_p$. I have so far multiplied the generator $g$ of $E_p$ by the message $m$. However, this is hardly reversible. Hence I cannot retrieve the original message without storing a lookup table for my whole message space.  The post  quotes that some reversible mapping exists, described in .  After doing some research, I found . However it looks quite cryptic to me, and I believe there must exist some library doing this already.  Is there any widely used mapping available? Also, is there any library implementing this?


I'm looking to write a generic class (like this: template <Class T>) in C++11 but I was told that the implementation could only be written in the .h file, why is that?  I wrote some code (1000 lines) and it's a complete mess, I don't know where some pieces of code went. Is there any way to separate implementation and declaration?

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


I want to have a frame to showing text and then data ( in verbatim ). And I cant compile it.   I made this minimum working example :  \documentclass{beamer}  \begin{document}  \begin{frame}[fragile]  \only<1>{ \begin{verbatim} test slide 1 \end{verbatim} }  \only<2>{ test slide 2 }  \end{frame}  \end{document}   I get this error :  ! File ended while scanning use of \@xverbatim. <inserted text>              \par  l.17 \end{frame}   So is using \only a bad solution ?

I am trying to produce a presentation where code for a pair of arrays appear in the same position of a beamer slide.  I tried something like this (with different combinations and braces) and did not work.  \begin{verbatim}\only<1>       V1 V2 V3 V4 [1,]  0  1  1  0 [2,]  1  0  1  0 [3,]  1  1  0  0 [4,]  0  0  0  0   \only<2>       V1 V2 V3 V4 [1,]  0  1  0  0 [2,]  1  0  1  0 [3,]  0  0  0  0 [4,]  0  0  0  0  \end{verbatim}    Appreciate any suggestions.  Thanks!


I am trying to make a button that goes in the centre of the screen I have tried lots of solutions which havent worked html:       <button align="center" type="button" onclick="location.href='https://discord.gg/AsA7P9B5Mv'" class="button">       <span align="center" class="button__test"> Join Server </span>       </button>  css:   .button {   text-align: center;   align: center;   justify-content: center;     align-items: center;     height: 10vw;   width: 25vw;   margin: 0;   padding: 0;   background: #10e321;   border: none;   outline: none;   border-radius: 1vw;   overflow: hidden;   font-size: 4vw;   cursor: pointer; } .button:hover{   background: #11d120; } .button:active{   background: #0eb31b; }  Help would be greatly appreciated :)

How can I horizontally center a
 within another
 using CSS?

Foo foo


I really don't like that little red box popping up every 10 minutes while trying to make a post on a question or make a question.  Most of the time, the responses aren't really related to me. Some users would like to see the edits, and some don't really care. Some users would like to see the comments on their posts, but some don't want to. Some don't care about their electric bill, some do. It would be helpful if we could block and allow certain notifications on our accounts.   It would further expand the "Edit Profile and Settings" tab and be useful to some people. Default would be allow for all, with like different check boxes for each type of response. For those who don't mind don't need to do anything. Others do and will quickly check off the boxes.  Can we have settings that can allow and block certain notifications?

Related:    Today, we had . This sort of sparked me into coming up with a new feature-request (Can't find a dupe, surprised).  Basically, we should have more control over what does and does not appear in the multicollider. This includes:   Muting comments and/or answers on a specific post. Muting comments from a specific user Ignoring all comments not addressed to you in a post of yours (I don't think this is that good, though--many times comments address both the OP and the other guy). Ignoring certain chat rooms The ability to make answers/comments on posts written by others to ping your multicollider.   Note that "Mute" could mean that it shows up in the inbox, but doesn't trigger the colorful glowing circle on the multicollider.    With the new "notifications" thing, there may be some scope in making certain notifications opt-in or opt-out (not all of these exist, but many would be useful in the notifications tab):   Notification of rejected edit Notification of  posts Notification of change to favorites Notification of certain badges Notification of edits Notification of edits to posts you have upvoted Notification of edits to posts you have downvoted (yes, should be separate)  - Notification of edits to posts you have closevoted


I found this site when trying to find an answer for something:   I noticed it had a very similar theme to StackExchange, complete with user profiles, identical badge names, votes system etc. etc.  I went into the SE dropdown and type Libre and no results were found... is this a related SE or has this site just cloned everything with LibreOffice stylings?

Since the source code for this site isn't available for purchase or external use, I'm looking for software that can run a Q&A environment similar to Stack Exchange. Are there any such pieces of software available?


I would like to use Google Forms to keep track of the progress of an application process (similar to what  does for immigration applications). One key functionality that I need is to be able to allow respondent to edit their responses as their application progresses, without being able to edit other responses, as this might be prone to vandalism (which is what have happened several time in our current solution using editgrid).  Today I found out that Google Forms allows to edit responses, but it seems this is only possible if you save the link that is shown (only once) after submitting your response. If the user leave that page without saving, I can't find a way to allow him/her to later modify their responses (as there is no email confirmations or whatsoever the user can later refer to).  I wonder, is there a way for the form owner to find this URL and send it to the users upon request? (Via scripting maybe?)

I'm trying to make the edit URL for a Google Form automatically populate in the response Google Sheet that it's attached to. I've seen  already and want to use it, but I'm having issues trying to figure out where exactly to put the script.  I've tried putting it in the script editor in the Google Spreadsheet that I would like the URL to appear in, but I'm not sure where to go from there. In the script editor I've tried to test it as an add-on but that didn't end up working.  I have little experience with scripts and the script editor in Google Sheets. As a final note I am using one other add-on called AutoCrat in the same Google Spreadsheet.


I have a button "Cart" that do select *  query and add items(articles) in ArrayList, since i want to avoid to add articles in list every time button is clicked i tried this: for(Article a : articleList){      String checkId = "select * from article";      PreparedStatement ps = conn.prepareStatement(checkId);      ResultSet rs = ps.executeQuery(checkId);      rs.next();      if(a.getId()==rs.getInt("id")){       //Here i'm returning list, just like it is in DataBase.     } else{         //Here i want to add articles in the list     }  }  I assume that i'm getting that exception because i'm adding articles in ArrayList while traversing through the same list. How can i fix this?

I am using a Collection (a HashMap used indirectly by the JPA, it so happens), but apparently randomly the code throws a ConcurrentModificationException. What is causing it and how do I fix this problem? By using some synchronization, perhaps?  Here is the full stack-trace:  Exception in thread "pool-1-thread-1" java.util.ConcurrentModificationException         at java.util.HashMap$HashIterator.nextEntry(Unknown Source)         at java.util.HashMap$ValueIterator.next(Unknown Source)         at org.hibernate.collection.AbstractPersistentCollection$IteratorProxy.next(AbstractPersistentCollection.java:555)         at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:296)         at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:242)         at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:219)         at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)         at org.hibernate.engine.Cascade.cascade(Cascade.java:130)


I have a vf Page with Data table where record name is a link like this    <apex:CommandLink value="{!m.what.name}" action="/{!m.what.id}" target="_Blank"/>   This opens in a new tab in web UI  In the similar manner If I want to open a record Detail in Salesforce1 in the Datatable what is the link.  Above link in Salesforce1 doesn't open the Record.   I've already tried the link   sforce.one.navigateToURL();   it doesn't open record detail in Salesforce1...it's a blank white page I am getting.

I've done a bit of tinkering with the Salesforce1 warehouse example (tutorial 6 ).  I've successfully adapted the code to work with my own custom object, and I've got records showing up as pins on a Google map.  Now I'm trying to change the links that show when you click the pushpins so that you go to a Visualforce page instead of the original Salesforce object (or default SF1 version of it in this case).  Here's the code I've tried most recently.  Nothing happens when you click on the link in the pushpin.  I've got this working on the non-salesforce1 side of things, but the methods of navigation are different.  if(sforce.one){     var apexstr =  '/apex/SimpleSiteProgram?id=';      warehouseNavUrl =                            'javascript:sforce.one.navigateToUrl(\''+ apexstr + warehouse.Id + '\')';   Below is the text that appears in the browser lower margin when you hover over the pushpin link in Salesforce1 mode.  Any ideas on what is wrong here? Do I need to spell out the whole Url?    edited to add  When I click on the pushpin the Salesforce1, I get the following error message in the javascript console.  "Uncaught TypeError: undefined is not a function"  which would appear to indicate the code shown wasn't being understood as a javascript function, but the following code works in Salesforce1:  warehouseNavUrl =                          javascript:sforce.one.navigateToSObject(\'' + warehouse.Id + '\')';   I'm not too experienced in javascript.  Any thoughts about where I've gone wrong?


I am a new ubuntu use. please help me out here.  apt-get update   Output:  Reading package lists... Done W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted) E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) E: Unable to lock directory /var/lib/apt/lists/ W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied) W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)

I get this error whenever I try to install programs using the terminal:  home@ubuntu:~$ apt-get install myunity E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?   Also I'm unable to install updates using the terminal.


While I am running my program I am getting this type of error in thread "main" java.lang.NoClassDefFoundError  Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/compress/archivers/zip/ZipFile

I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this?


Say I want to go to the 80th last line of my file celery.log, but I don't know how many lines it has.  The equivalent of the tail command but go to the 80th line from the end instead of the default.  How would I do this?

I have a poem with an unknown number of rows and I want to display only the penultimate one. What command should I use?


My aim is to evaluate the following limit     $\displaystyle\lim _{ x\rightarrow 0 }{ \frac { \sin ^{ -1 }{ x } -\tan ^{ -1 }{ x }  }{ { x }^{ 3 } }  } \quad$    which evaluates to $\frac{1}{2}$ after using L'Hospital rule for rather $5$ steps, which of course is a tedious task. Could anyone suggest some shorter and elegant methods for evaluating this limit?  Thanks.

$$\lim_{x\rightarrow 0} \frac{\arctan(x)-\arcsin(x)}{x^3}$$  I am new in area of limits could you help me about that


I saw on the internet the following Proof of Euclid's lemma, which states that if a prime number divides the product of two numbers, then it must divide at least one of the two numbers.     Since $p \mid bc$, there exists an integer $n$ such that $bc = np$.    Now, assume $p\nmid b$. I.e. there are integers $k, i$ with $0< i < p$, such that $b = kp + i$      And therefore, $$np = bc = c(kp +i ) = kpc + ci \implies ci = p(n - kc)$$    So, $p$ is a factor of $ci$ and since $0 < i < k$ , $p$ must be a factor of $c$.   I am particularly confused by the last statement:      ... since $0 < i < k$, $p$ must be a factor of $c$   This does not make sense to me... $i$ needs not be less than $k$.  This proof was selected as the best answer   I would be grateful if someone could explain me what is going on at the end of the proof or if it is wrong.  UPDATE: I need a proof that does not use the gcd algorithm.

The proof is already given in the textbook but I tried other way around.   Proof by contradiction: Let's assume that $p$ doesn't divide $a$ and $p$ doesn't divide $b$, but $p$ divides $ab$. So $\gcd(p,a)=1$ and $\gcd(p,b)=1$. Given that we can construct linear combinations   $sp+ta=1$ together with $up+wb=1$. Multiplying the left and the right sides of the equations we get  $spup+spwb+taup+tawb=1$ or $p(sup+swb+tau)+ab(tw)=1 \implies \gcd(p,ab)=1$. This is a contradiction.   Is it rigorous and sound proof?


I live in a city known for extremely high rates of bike theft (Prague, Czech Republic). I'm therefore looking to make my bicycle appear as cheap and ugly as possible to deter possible thefts.  What are the best ways to do so, which won't affect the quality of the cycling?

"Uglify your bike" was mentioned  as a theft deterrent.  I have a 20102009 Canondale F3 and I'm thinking about locking it up in Manhattan from time to time. I think that Uglifying will help.    How should one best uglify a bike? How would you do this without disassembling the bike? Would spray paint stick to the current paintjob, or would I need to use paint remover or to sand the current paint off? What about the components? I don't want to ruin the bike in the process of trying to keep it, but I would prefer not to remove all components and cables, etc.  Note: I know that having another beater bike  are great, but I'm trying to figure out how to ride my bike and keep it from being stolen (or even looked at).  Edit: I've removed a part on "Does anyone have any evidence that uglyfying does or does not work..."  It's now .


Hi I tried to create a List Class. But in order to have a variation of list class, I am using template to store value in item variable.  Below is in "List.h"  template <class ListItemType>     class List     {         public:             .........             .........          private:             struct ListNode             {                 ListItemType item;                 ListNode    *next;              };          int size;          ListNode *head;         ListNode *find(int index) const;     };   Then how do I create the implementation of "ListNode *find(int index) const" function in List.cpp?  I tried to use  template <class ListItemType>     List<ListItemType>::ListNode *List<ListItemType>::find(int index) const     {         ........     }   But there is an error saying "error: need 'typename' before 'List::ListNode' because 'List' is a dependent scope"  Do you know how do I implement "ListNode *find(int index) const" in List.cpp?  This is my first time using template, I am a bit confuse. Thanks

In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway?    I have the following code:  template <typename T, typename Tail> // Tail will be a UnionNode too. struct UnionNode : public Tail {     // ...     template<typename U> struct inUnion {         // Q: where to add typename/template here?         typedef Tail::inUnion<U> dummy;      };     template< > struct inUnion<T> {     }; }; template <typename T> // For the last node Tn. struct UnionNode<T, void> {     // ...     template<typename U> struct inUnion {         char fail[ -2 + (sizeof(U)%2) ]; // Cannot be instantiated for any U     };     template< > struct inUnion<T> {     }; };   The problem I have is in the typedef Tail::inUnion<U> dummy line. I'm fairly certain that inUnion is a dependent name, and VC++ is quite right in choking on it. I also know that I should be able to add template somewhere to tell the compiler that inUnion is a template-id. But where exactly? And should it then assume that inUnion is a class template, i.e. inUnion<U> names a type and not a function?


Given the matrix $A∈M_3(Z_9)$  $$     \begin{matrix}     1 & 2 & 3 \\     2 & 3 & 0 \\     0 & 3 & 6 \\     \end{matrix} $$  The determinant is:  $\det(A)=18+18-24=3$  So the matrix is invertible because the determinant is different from zero.  The transposed matrix is:  $$     \begin{matrix}     1 & 2 & 0 \\     2 & 3 & 3 \\     3 & 0 & 6 \\     \end{matrix} $$  The matrix $A'$ is:  $$     \begin{matrix}     0 & 6 & 0 \\     6 & 6 & 6 \\     6 & 6 & 8 \\     \end{matrix} $$  So the inverse matrix is:  $$     \begin{matrix}     0 & 2 & 0 \\     2 & 2 & 2 \\     2 & 2 & 8/3 \\     \end{matrix} $$  Please tell me if my attempt is correct.

Establish if the matrix $A\in M_3 (\Bbb{Z}_9)$  $$     \begin{bmatrix}     1 & 2 & 3 \\     2 & 3 & 0 \\     0 & 3 & 6     \end{bmatrix} $$  is invertible, and if so, find the inverse matrix.


Let me know if I picked up the right file Let me know whether I picked up the right file  Could anyone tell me the differences between them? Can we use ‘if’ and ‘whether’ in present, past, and future tenses as well?

Are if and whether equivalent in sentences like the ones below?     How to determine if my saddle is too high?   How to determine whether my saddle is too high?         We should check if everything is okay now.   We should check whether everything is okay now.


When xcolor is loaded with the monochrome option, colour is disable for only some, but not all tikz operations.   Why is this? Is it possible to disable colour for all operations? is it possible not to disable colour for any operations?   MWE  (Without the monochrome option, everything is drawn in red.)  \documentclass{article} \usepackage[monochrome]{xcolor} \usepackage{tikz} \usetikzlibrary{positioning}  \begin{document} \textcolor{red}{Red}% black  \begin{tikzpicture}[node distance=1pt]   \node (a) [text=red] {Red};% red   \node (b) [fill=red,below=of a] {};% red   \node (c) [draw=red,below=of b] {};% red   \node (d) [above=of a] {\textcolor{red}{Red}};% black   \draw [red] circle (1);% black   \path [draw=red] circle (1.2);% red \end{tikzpicture}  \end{document}

\selectcolormodel{gray} doesn't work for the duck hair, but it works for the other parts of the ducks, why?  \documentclass{ltugboat}  \usepackage{microtype}  \usepackage{graphicx}  \usepackage{ifthen} \newboolean{grayscale}    \setboolean{grayscale}{true}% for the black & white version    %\setboolean{grayscale}{false}% for the colored version     \usepackage{tikzducks} \usetikzlibrary{positioning}  \newenvironment{mytikz}{%     \begin{tikzpicture}     \ifthenelse{\boolean{grayscale}}{\selectcolormodel{gray}}{}      }     {\end{tikzpicture}}  \usepackage{ifpdf}  \ifpdf  \usepackage[breaklinks,hidelinks]{hyperref}  \else \usepackage{url} \fi   \begin{document}      Why \textbackslash\texttt{selectcolormodel\string{gray\string}} does not work for the duck hair?      Black and white version:          \begin{mytikz}         \begin{scope}[xscale=-1]             \duck[longhair=pink]         \end{scope}         \begin{scope}[xshift=10pt]             \duck[crazyhair=orange]         \end{scope}     \end{mytikz}      Colored version:     \setboolean{grayscale}{false}      \begin{mytikz}         \begin{scope}[xscale=-1]             \duck[longhair=pink]         \end{scope}         \begin{scope}[xshift=10pt]             \duck[crazyhair=orange]         \end{scope}     \end{mytikz} \end{document}


It seems, that the problem happens not the first time ()  Just now the state of uml tag on my profile is about 7 days old.   A year ago it was told: "We changed the way we were calling the job that was timing out, so this issue shouldn't recur. " - I am afraid, something broke the process again.  And the problem exists for about a month already: look at the comment below the .

From my , I learned that all tag related info on profile will be updated daily at UTC 03:00.  However, something is wrong here. It's now UTC 05:00+, but my tag number, say 93 (c++) is not updated against yesterday. I am pretty sure about this and I did earn some more points throughout the day. Sorry for not be able to capture the screenshot yesterday, but I did check this number 10 hours ago (which belongs to yesterday, also 93).  Is there a bug happening here? Or updating time different?    UPDATE: As of 24 Jan, the tags are still not updated with the proper values.  UPDATE2: Fixed around 25 Jan, UTC 03:00, at least for me.


I just recently got a new phone, so my old one has been sitting in a drawer for the last month. However, a friend recently suggested the Sleep Cycle alarm to me, and I'd like to try it out, but I'm not willing to put my nice new phone under my bed every night and run the risk of it overheating or breaking.  However, my old phone, a ZTE Valet (Incredibly cheap, all-around low quality phone), I couldn't care less about. So my plan is to plug that in next to the wall, and use it exclusively for the alarm. I go to bed, I set the alarm, I wake up, I turn it off. It never leaves the wall.  However, I'm concerned about safety. It'll be in airplane mode and I'll disable other background apps that I can (probably just factory reset it before doing this), but is it dangerous to keep my phone constantly plugged into a wall on top of bedsheets? I know this might be bad for the batter (don't really care, I'm not doing anything else with the phone anyway), but I'm much more worried about any potential overheating problems that could burn me or start a fire. Should I be?  EDIT: I don't think this is a duplicate. I really couldn't care less if the phone is harmed by the constant charging, I just want to know if it's dangerous.

I usually disconnect my cellphone from the charger some time after it's fully charged because I'm afraid the battery could lose capacity over time if I don't. However, I believe modern electronics should be able to handle this kind of scenario and automatically stop charging the battery once it's full. Does this apply to modern Android phones? Or do I need to continue disconnecting it all the time?


I want to zip file.txt and file with spaces.txt. I need to keep them in one variable. I can concat these string like this:  files="$files \"$newfilename\""   Then I have all the file names in one variable, separated by space and each one covered with quotation marks. "file.txt" "file with spaces.txt"  so I need to zip them now. However If I do:  tar czf output $files   then bash will produce:  tar czf output '"file.txt."' '"file' with 'spaces.txt"'   If I do  tar czf output "$files"   then bash will do:  tar czf output '"file.txt." "file with spaces.txt"'   In first case, bash insert a apostrophe after and before each word, in the second case, tar takes both files as one name. What should I do to produce tar czf "file.txt" "file with spaces.txt" if I have exactly this string in $files variable?

In bash one can escape arguments that contain whitespace.  foo "a string"   This also works for arguments to a command or function:  bar() {     foo "$@" }  bar "a string"   So far so good, but what if I want to manipulate the arguments before calling foo?  This does not work:  bar() {     for arg in "$@"     do         args="$args \"prefix $arg\""     done      # Everything looks good ...     echo $args      # ... but it isn't.     foo $args      # foo "$args" would just be silly }  bar a b c   So how do you build argument lists when the arguments contain whitespace?


I have access to a relatively slow, but hugely (12) multi-cored machine. My 200+ page document has compile times in the 400 second range. Are there any flags or hints that I can give to the mtx-context engine (or better engine flag?) to improve performance of some steps?  The output it currently gives is:  mtx-context     | warning: no (local) file './trapBookProduct', proceeding mtx-context     | redirect texlua -> luajittex: luajittex --luaonly "/opt/context/tex/texmf-linux-64/bin/mtxrun" --script context --arrange --batchmode --noconsole --path=/home/ubuntu/ConTeXt/img trapBookProduct --redirected mtx-context     | warning: no (local) file './trapBookProduct', proceeding mtx-context     | run 1: luajittex --fmt="/opt/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luajittex/cont-en" --interaction="batchmode" --jobname="trapBookProduct" --lua="/opt/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luajittex/cont-en.lui" --no-parse-first-line --c:arrange --c:batchmode --c:currentrun=1 --c:directives="logs.target=file" --c:engine="luajittex" --c:fulljobname="./trapBookProduct" --c:input="./trapBookProduct" --c:kindofrun=1 --c:maxnofruns=9 --c:noarrange --c:noconsole --c:path="/home/ubuntu/ConTeXt/img" --c:redirected "cont-yes.mkiv" This is LuajitTeX, Version beta-0.85.0 (TeX Live 2016/dev) (rev 5550)   system commands enabled.  mtx-context     | arrange run: luajittex --fmt="/opt/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luajittex/cont-en" --interaction="batchmode" --jobname="trapBookProduct" --lua="/opt/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luajittex/cont-en.lui" --no-parse-first-line --c:arrange --c:batchmode --c:currentrun=2 --c:directives="logs.target=file" --c:engine="luajittex" --c:final --c:fulljobname="./trapBookProduct" --c:input="./trapBookProduct" --c:kindofrun=3 --c:maxnofruns=9 --c:noconsole --c:path="/home/ubuntu/ConTeXt/img" --c:redirected "cont-yes.mkiv"This is LuajitTeX, Version beta-0.85.0 (TeX Live 2016/dev) (rev 5550)   system commands enabled.  system          | total runtime: 180.058 seconds   Including the flag:     % engine=luajittex   Did improve compile times by about 200 seconds, but are there any other mechanisms to use?

Which things should one have in mind when one wants to buy new hardware optimized for best (pdf)latex performance?  For example one might think the more cores on your cpu the better. But since latex is a linear thing there is no much space for parallelizing. So the number of cores seems not to be so important.   What features of your new system especially the cpu are crucial for best latex performance?  Which features that are usually important for good performance for general use are not crucial for latex performance?  Edit:   Clearly you could simply choose the most expensive high end system you can get. However usually one has a budget and the question is really about which parts of the system and features in detail are crucial for latex compile performance and which are not so important because latex cannot use it for example...


In one of the answers to this question I read that it was becsuse for an object experiencing circular motion at the equator, part of the gravitational force would have to provide for the centripetal force and thus there is less of the force to 'provide' for acceleration of free fall.  I'd under stand if the question was asking for apparent weight on a weighing scale where N=mg-mv^2/r. It would then seem that apparent weight was lower. However in the case of free fall I dont understand how this could be a reason for lower free fall acceleration. Drawing a free body diagram would only show the weight of the object as the only force acting on it, thus I would expect free fall acceleration to be the same.  I'm aware of the equatorial bulge causing acceleration to be less, but I'm only analysing the aforementioned reason alone right now.

Many sources state that the Earth's gravity is stronger at the poles than the equator for two reasons:   The centrifugal "force" cancels out the gravitational force minimally, more so at the equator than at the poles. The poles are closer to the center due to the equatorial bulge, and thus have a stronger gravitational field.   I understood the first point, but not the second one. Shouldn't the gravitational force at the equator be greater as there is more mass pulling the body perpendicular to the tangent (since there is more mass aligned along this axis)?


Why can't we just keep heating matter past Planck's temperature? Planck's temperate or 10 to the power of 32 Kelvin is the hottest temperature possible. If you're shooting an atom with heat radiation and it reaches Planck's temperate why can't you keep heating it.  I do have a theory though - Lets say you're shooting an electron with a laser and heating it up. Every time an electron goes into a higher quantum state it requires more energy to bring it into the next one. At first the difference of energy required is not noticeable but eventually it requires more and more energy to further excite the electrons of the atom(s) being heated. After a long time some of the electrons are at such high energy levels that they require infinite energy to go into a higher quantum state.

If temperature makes particles vibrate faster, and movement is limited by the speed of light, then I would assume that temperature must be limited as well. Why is there no limit?


I'm a little bit confused on paying my lease amount early.  As far as I understand, I loaded the total amount of the car. Let's say the total amount of car is 50k and the total lease amount is 25k.  If I pay 25k early, how does that work with my credit?   Let's say I can't lease a new car because I already one a car loan in my credit. If pay the lease early, am I going to be able to lease a new car even if I haven't returned the car yet (leased one)?  Update: Not sure why this is marked as duplicate. The first question is not related. I'm trying see how it affect my credit when I pay off early.

If I pay off lease amount early for a car, is there any impact on my credit?  Let's say I'm paying $400/month for 36 months, which is 14,400 total. If I pay 14,400 within 6 months, are there any disadvantages on my credit?


I'm trying to create a method that validates that the user did not leave the JTextField empty. No error handling is needed, I just need to make sure it is not empty and the user entered the number of meals. I wrote the following: private void validateMeals() {     if(mealsField.getText() == "")     {         JOptionPane.showMessageDialog(null,"You must enter number of meals",         "Rocky Jonhs Management System", JOptionPane.ERROR_MESSAGE);         mealsField.setText("");     }     nameField.requestFocus(); } //end validateMeals() method

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


I want to know about usage of "start + action" and "stop + action". Which one of followin are correct or preferred? For ex.  When shall I start working? When shall I stop working?  Or  When shall I start to work? When shall I stop to work?  Does it depend on a context or on the action itself? Are there any rules that I can apply to phrases contain "start" and "stop"? Or maybe there are some differences in meaning?

What is the difference between the following:  Things started to work again. Things started working again.


On UN*X systems, I can rename or delete whatever files I want, even they are in use. However, on Windows, when a process is using a file, it cannot be renamed or deleted. If offline files are used, it cannot even be syncked to the server.  Why ain't me allowed to delete/rename opened files on Windows, just like what I usually do on UN*X?

On Windows XP, when I try and delete a specific file it says:     Cannot delete blah.blah: Make sure the   disk is not full or write-protected   and that the file is not currently in   use.   How can I go around this warning and delete it anyway?


In Avner Friendman's Mondern Analysis book, he makes a statement that has stumped me when proving that for $\{f_n\}$ a sequence of measurable functions, $\sup_n f_n$ And $\inf f_n$ Are measurable.     The assertion for $\inf_n f_n $ follows from $\inf (f_n )=- \sup (-f_n)$ .   I really struggle with the concept of inf and sup of a sequence of functions, so I do not see why this statement is true. Why does $\inf (f_n )=- \sup (-f_n)$? Thank you!

Let $\emptyset\neq A\subseteq\mathbb{R}$ a bounded set. Consider $-A=\{-a:a\in A\}$. I want to prove that $-\sup(-A)=\inf(A)$.  It is easy to see that $-\inf(A)$ is an upper bound of $-A$, so $\sup(-A)\le -\inf(A)$, then $-\sup(-A)\ge \inf(A)$.  How can we prove that $-\sup(-A)\le \inf(A)$?  Thanks.


Suppose that $p$ is prime and $p=n^2 +5$ for some natural number $n$, prove that the final digit of $p$ is equal to $1$ or $9$ which is $p=1(mod10)$ or $p=9(mod10)$  What I have to tried so far: in order to get last digit of $p$ be $1$ or $9$, the last digit of $n^2$ must be 4 which gives us $4^2=16$,$6^2=36$ then $16+5=21, 36+5=41$. Similarly last digit of $n^2$ must be $4$ to obtain a p has $9$ as the last digit which is exactly $1(mod10)$ and $9(mod10)$. But those are like listing the special cases, can anyone tell me if I am on the right track or what should I do?

I tried to prove this question by first considering the possible last digit of $p$ when $p=n^2+5$, but that reasoning got me nowhere. Then I tried to prove it by contrapositive, and however I just couldn't really find where to start. Hence I'm here asking for some hints (only hints, no solution please).  Many thanks, D.


Suppose that $X$ and $Y$ are path connected and locally path connected spaces and that $\tilde{X}$ and $\tilde{Y}$ are simply connected coverings of $X$ and $Y$, repsectively. Prove that if $X$ and $Y$ are homotopy equivalent then $\tilde{X}$ and $\tilde{Y}$ are also homotopy equivalent.   Here is my proof, wanted to see if there are some major flaws in it or places that need more detail. Thanks  We know that $X \simeq Y$, so there are functions $f$ and $g$ such that $f: X \to Y$ and $g : Y \to X$, so that      $$ f\circ g \simeq Id_X \text{ and } g\circ f\simeq Id_Y. $$     Now, choose a point $x \in X$ and let $f(x)\in Y$. Let $p_1: \tilde{X}\to X$ and $p_2 \tilde{Y}\to Y$ be covering maps. Then we know that $|p_1^{-1}(x)| = |\pi_1(X)|$ and $|p_2^{-1}(f(x))| = |\pi_1(Y)|$. Now, since $X\simeq Y$, we know that $|\pi_1(X)| = |\pi_1(Y)|$, and thus the cardinality of the fibers of $x$ and $f(x)$ must be equal. Thus, we define     $$ p_1^{-1}(x) = \{a_n\}_{n\in A} \text{ and } p_2^{-1}(f(x)) = \{b_n\}_{n\in A} $$     for distinct $a_n \in \tilde{X}$ and $b_n \in \tilde{Y},$ where $A$ is the same size of $\pi_1(X)$, $\pi_1(Y)$. Likewise, $y\in Y$ and $g(y) \in X$, we get      $$ p_1^{-1}(g(y)) = \{a_n\}_{n\in A} \text{ and } p_2^{-1}(y) = \{b_n\}_{n\in A} $$     for distinct points in $y\in \tilde{Y}$ and $g(y) \in \tilde{X}.$  Now, let $U_x$ be an evenly covered neighborhood of $x$ contained in $X$ and $V_{f(x)}$ be an evenly covered neighborhood of $f(x)$ contained in $Y$. Denote the lift  $$ \tilde{f}: \tilde{X} \to \tilde{Y} $$ be given by $\tilde{f}(a_n) = ((p_2^{-1})_n \circ f \circ p_1)(a_n)$, where $(p_2)_n$ is $p_2$ restricted to the component of $p_2^{-1}(V_{f(x)})$ containing $b_n$. In a similar way, $U_{g(y)}$ be an evenly covered neighborhood of $g(y)$ contained in $X$ and let $V_y$ be an evenly covered neighborhood of $y$ contained in $Y$. Let  $$\tilde{g}:\tilde{Y}\to \tilde{X}$$ be given by $\tilde{g}(b_n) = ((p_1^{-1})_n \circ g \circ p_2)(b_n)$, where $(p_1)_n$ is $p_1$ restricted to the component of $p_1^{-1}(U_{g(y)})$ containing $a_n$. Since $\tilde{f}$ and $\tilde{g}$ are compositions of continuous functions, thus they are continuous, and we have \begin{align*}     \tilde{f}\circ \tilde{g} &= ((p_2^{-1})_n \circ f \circ p_1) \circ ((p_1^{-1})_n \circ g \circ p_2) \\     &= (p_2^{-1})_n \circ g \circ f \circ p_2 \\     &\simeq (p_2)_n^{-1} \circ Id_Y \circ p_2 \\     &= Id_Y     \end{align*} likewise \begin{align*}     \tilde{g}\circ \tilde{f} &= ((p_1^{-1})_n \circ g \circ p_2) \circ ((p_2^{-1})_n \circ \phi \circ p_1) \\     &= (p_1^{-1})_n \circ g \circ f \circ p_1 \\     &\simeq (p_1)_n^{-1} \circ Id_Y \circ p_1 \\     &= Id_Y     \end{align*} This tells us that $\tilde{f}$ and $\tilde{g}$ are homotopy inverses of each other, and that $\tilde{f}$ is a homotopy equivalence from $\tilde{X}$ to $\tilde{Y}$. Thus, $\tilde{X}\simeq \tilde{Y}.$

As part of am exam question (Q21F ), I'm trying to prove that if $X$ and $Y$ are path-connected, locally path-connected spaces with universal covers $\widetilde{X}$ and $\widetilde{Y}$, respectively, then if $X \simeq Y$ then $\widetilde{X} \simeq \widetilde{Y}$.  My attempt might be correct, but it seems too complicated and amongst the jumble I may have made some incorrect assumptions. So what I'm looking for is (a) verification or correction; and (b) ideas as to how I could simplify my argument.    My argument:  Let $p:\widetilde{X} \to X$ and $q:\widetilde{Y} \to Y$ be the covering maps, and let $X \overset{f}{\underset{g}{\leftrightarrows}} Y$ be a homotopy equivalence.  Fix a point $\widetilde{x} \in \widetilde{X}$, let $x=p(x) \in X$ and $y=f(x) \in Y$, and fix $\widetilde{y} \in q^{-1}(\{y\}) \subseteq \widetilde{Y}$. Also let $x' = g(y) \in X$ and fix $\widetilde{x'} \in p^{-1}(\{x'\}) \subseteq \widetilde{X}$.  Define a map $\widetilde{f} : \widetilde{X} \to \widetilde{Y}$ as follows. For $\widetilde{z} \in \widetilde{X}$ let $\widetilde{u}:[0,1] \to \widetilde{X}$ be a path from $\widetilde{x}$ to $\widetilde{z}$. Let $z=p(z)$ so that $u=p\widetilde{u}$ is a path in $X$ from $x$ to $z$. Let $v=fu$, so that $v$ is a path in $Y$ from $y$ to $f(z)$. Lift $v$ to a path $\widetilde{v}$ in $\widetilde{Y}$ with $\widetilde{v}(0) = \widetilde{y}$. Define $\widetilde{f}(\widetilde{z}) = \widetilde{v}(1)$.  Notice that $q\widetilde{v}=v$ so that $q\widetilde{f} = fp$.  Define $\widetilde{g}:Y \to X$ analogously: For $\widetilde{z} \in \widetilde{Y}$ let $\widetilde{a}:[0,1] \to \widetilde{Y}$ be a path from $\widetilde{y}$ to $\widetilde{z}$. Let $z=q(z)$ so that $a=q\widetilde{a}$ is a path in $Y$ from $y$ to $z$. Let $b=fa$, so that $b$ is a path in $X$ from $x'$ to $g(z)$. Lift $b$ to a path $\widetilde{b}$ in $\widetilde{X}$ with $\widetilde{b}(0) = \widetilde{x'}$. Define $\widetilde{g}(\widetilde{z}) = \widetilde{b}(1)$.  Likewise, notice that $p\widetilde{g}=gq$.  Claim: $\widetilde{X} \overset{\widetilde{f}}{\underset{\widetilde{g}}{\leftrightarrows}} \widetilde{Y}$ is a homotopy equivalence.  We have $p\widetilde{g}\widetilde{f} = gq\widetilde{f}=gfp \simeq p$ and $q\widetilde{f}\widetilde{g} = fp\widetilde{g} = fgq \simeq q$.  This shows that $\widetilde{g}\widetilde{f}$ and $\widetilde{f}\widetilde{g}$ are covering translations (deck transformations) and are therefore homotopic to the respective identity maps. So we have a homotopy equivalence.    Any comments would be appreciated.


I have a higher resolution card but Ubuntu will only use the lower res imbedded on the MB. The higher res one is a Nvidia GeForce windows ver 340.52

I downloaded the Nvidia driver for Linux from the official Nvidia website to install in my laptop. It is a file named NVIDIA-Linux-x86_64-390.67.run. How to install this file?


Let $G$ be the multiplicative group of all complex $2^n$-th roots of unity, where $n = 0 , 1, 2 , \ldots$. Then assess the following claims:  Every proper subgroup of $G$ is finite.  $G$ has a finite set of generators.  $G$ is cyclic.  Every finite subgroup  of $G$ is cyclic.  $G \cong \dfrac{\mathbb Z[1/2] }{\mathbb Z}$.    $G = \bigcup_{n=1}^{\infty} G_{2^n}$ , where $G_{2^n} = \{ e^{\frac{2\pi ik}{2^n}} \mid k = 0,1,2, \dots , n-1 \}$. Suppose $G$ is generated by finitely many elements. Suppose  $$ S = \left\lbrace\exp\left({2\pi i k_j\over 2^{n_j}}\right)\right\rbrace_{j=1}^m $$ and $G = \langle S \rangle $ Choose $N = \max \{ n_j\}_{j-1}^m$, then $ e^{\frac{2\pi i}{N+1}}$ is not generated by $S$. So $G$ is not a cyclic. Thus (2) and (3) are false. Please tell me about (1) and (4) and (5) any help would be appreciated. Thank you

$A=\{z\in\mathbb{C}: z^{p^n}=1\;\mathrm{for\;some\;integer}\;n\geq1\}$. I have to prove:  1) Every proper subgroup of $A$ is cyclic,  2) if $B,C$ are subgroups of $A$ then $B\subseteq C$ or $C\subseteq B$,  3) for every $n\geq0$ there exists an unique subgroup of $A$ with $p^n$ elements.  Could you help me please?


I'm asking out of curiosity / because I think the answer may be of general interest:  A bit of context: When I applied to PhD programs, I had degrees from two institutions. One (let's call it "A") is more selective and trains students a little more in depth than the other (which we'll call "B"), but doesn't really have a great international reputation (being very teaching-focused).   During interviews abroad, it felt like I was considered as a "serious" applicant because I studied in the other institution, B, which is much more famous because of its research programs, but actually didn't contribute as much to my training. Clearly, nobody had ever heard of institution A. During one of my interviews, an interviewer even saw my grades from university A, where grading is very strict, and asked me: "do you think your grades are good enough to go to [our prestigious university]?". In a live interview, I had the opportunity to explain these grades, but what about the other programs that did not invite me for interviews? I can't help but think that this kind of misunderstanding may have played a bigger role than it should have.   Fortunately I joined the program that I wanted the most. But I started wondering: what if I had only studied in institution A?  So here's the question: Those of you who, at some point, were part of selection commitees (for college, grad school etc.), how did you evaluate candidates who studied in small, foreign and/or unknown universities/high schools, as opposed to big, local, well-known universities/high schools?   In particular, how did you take into account :   Different grading standards - in institution A, the equivalent of a 70% was considered an unusually good grade, whereas in some prestigious universities, an A or a B is quite normal; that difference does not always appear on transcripts. Different curriculum structures - some universities may require that students in their first/second years take classes  that do not seem very relevant for certain grad school applications Different opportunities to perform research - this time in university B, a students would only perform research once at the end of their masters, so significant undergrad research experience is unusual and would require a lot of extra commitment Different prestige - the "best university of the country" may not be as famous as MIT or Harvard, depending on the country. For example are you familiar with the best university in, say, Kazakhstan (no offense meant, Kazakhstani friends)? Would you "trust" a degree more if it came from a more famous institution? Different academic culture - Europeans, for example, do not typically have a long list of "dean's list", "undergaduate award for (XXX)" etc.; it's simply not a thing there, so even exceptional students just don't have these. Writing SOPs is also not common in certain countries, so students are not trained to "modestly praise themselves" and might seem a little clumsy when they try to do so. Anything else?    Have you ever faced this kind of issues when evaluating candidates? Did you at any point take extra steps to make sure this kind of differences would not penalize international applicants?  Edit: this question is not entirely similar to other questions like "?". Indeed, this question focuses on applications within a single country, with a priori homogeneous definitions of what a "good" university is, with known grading standards... Answers to this question clearly assume that it is possible to define "good" and "bad" grades by looking at a transcript, for example. My questions challenges the notion that the application documents (SOP, GPA etc) are meaningful, because unless a commitee member knows the high school / university of origin of an applicant, they really have no way to tell whether grades are good or not, because standards are not uniform.

Due to a combination of factors, I ended up going for my undergraduate studies to a relatively unknown university that was close to me geographically.  Let's say that I have a relatively standard background for someone trying to apply to top tier schools for graduate studies (some research experience, some low to medium quality publications, very strong grades, good recommendation letters). Then how much does the alma mater have an impact for someone like me? I obviously know that it is still possible to be accepted, but how much of a disadvantage am I looking at exactly?


I have an Alienware 14 that I plan to dual boot Windows 8.1 and Ubuntu 14.04 on. I'm wondering what the best procedure to get Bumblebee working is.  Would I be okay to install bumblebee (if someone could give me the exact package names I need to install I'd appreciate it) and then go get the latest NVIDIA drivers from NVIDIA's website? The "Additional Drivers" section only has version 331 which is outdated.  From what I understand, NVIDIA has their own solution but it drains battery life. Ideally, I'd like to be able to just select which GPU I want to use to run a program just like in Windows.

I have a Samsung NP-QX411. It has two graphics cards, Intel and nVidia. The Intel drivers were quickly found and is fully functional. But nVidia, I have tried installing several drivers in different ways. But I can not run it without success. I do not understand how Ubuntu has by default the switch Hybrid Graphics option. What should I do?


I purchased a 15 inch Unibody Macbook Pro today. I was wondering if I can do a harddrive upgrade up to 1TB or 2TB on it. I need that space because I want to store all my junk on it.  What is the maximum capacity I can upgrade the hard drive to? If so, where can I find those hard drives?

Is there any way to determine what the maximum capacity hard drive is that I can use in my laptop?


I'd like to find some thoughts and opinions related to this question. First of all, I noticed that there are two forms used in Web browsers' menus: MS Internet Explorer uses "Find on page" meanwhile Chrome uses "Find in page".  What is the difference between these forms and why can they both be used?  Normally, I'd say "find in the page" meaning "find in this text".

Which is the correct usage:     Something on a page   OR     Something in a page   By page, I mean a web page, not a physical book page.


I am trying to get following code working , This was working fine for MSSQL , but since i changed to use mySql it is not working    records.Content = db.areas                          .Where(x =>   x.Name.Contains(filter)))                          .OrderBy("dated desc")                           .ToList();   I get the error " Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."   string colName = "datedD" ;    how to order by depneding on colName variable ? `

I found an example in the  for Dynamic LINQ that allows you to use a sql-like string (e.g. OrderBy("Name, Age DESC")) for ordering. Unfortunately, the method included only works on IQueryable<T>. Is there any way to get this functionality on IEnumerable<T>?


I have a HP PSC 1410 printer with a built-in scanner. I've been scanning documents and images with it for the last couple of years. Recently my scanner has stopped performing as expected and I can't scan or copy images\documents.  My problem is that every images\document I'm trying to scan - the result from the printer is a black page. I've been googling about this issue and couldn't find any helpful stuff beside replacing the whole printer - which is something i'm trying to avoid.  Any ideas ? I've read something about the shipping lock of the scanner but couldn't find any information about how to check it. Is this something that can be repaired, or do I need to get a new scanner?

I have a HP PSC 1410 printer with scanner inside.  I've been scanning documents and images with it for the last couple of years.  Recently my scanner has stopped performing as excepted and i can't scan or copy images\documents.  My problem is that every images\document i'm trying to scan - the result from the printer is a black page.  I've been googling about this issue and couldn't find any helpful stuff beside replacing the whole printer - which is something i'm trying to avoid.  Any ideas ? I've read something about the shipping lock of the scanner but couldn't find any information about how to check it..


Very long story short. In essence this is the problem. I had some of my project files (new.cc) which I was working on for quite sometime. I created one backup of these files two months ago (old.cc), and basically what I did was > cp old.cc new.cc. And I have lost all the changes made in last two months. Is there any way to recover these files? Any help is appretiated.

Are there any tools, methods, incantations to recover recently deleted files on Ubuntu?  If it makes any difference, I want to recover a  2.x database file. But would be better to have a method/tool that works on any kind of file.


$$ \lim _{x \rightarrow 1}\left(\frac{1}{1-x}-\frac{3}{1-x^{3}}\right) $$ I am trying to evaluate this and so far this is what i have done - $$ \lim _{x \rightarrow 1}\left(\frac{1}{1-x}-\frac{3}{1-x^{3}}\right) =  \lim _{x\to 1}\left(\frac{\left({1-x}\right)\left(1+x^2+x-3\right)}{\left(1-x\right)\left(1-x^3\right)}\right) $$ From above, I cancel out (1-x) from denominator and numerator. $$= \lim _{x\to 1}\left(\frac{\left(x-1\right)\left(x+2\right)}{\left(1-x\right)\left(1+x+x^2\right)}\right)$$ Now I am stuck how to proceed further as x $\rightarrow 1$ .

How does one evaluate the following limit? $$\lim_{x \to 1} \left(\frac{23}{1-x^{23}}-\frac{11}{1-x^{11}} \right)$$ The answer is $6$.  How does one justify this answer?  Edit: So it really was just combine the fraction and use L'hopital's rule twice (because function and its first derivative are of indeterminate form at $x=1$). This problem is more straightforward than it seems at first.


I have a string called myStr="file://test"; I want to get text after file:// test out of it; I could do it with   myStr ="file://test" myStr.substr(myStr.lastIndexOf('/') + 1);   but thats not the right way; could you please help me with regular expression: My attempt with regualr expression is the following, but it just checks (if exists it returns 0) whether it exists or not(if it does not exist -1 to return)      myStr.search(new RegExp("file://"))

Given the URL (single line):   How can I extract the following parts using regular expressions:   The Subdomain (test) The Domain (example.com) The path without the file (/dir/subdir/) The file (file.html) The path with the file (/dir/subdir/file.html) The URL without the path () (add any other that you think would be useful)   The regex should work correctly even if I enter the following URL:    http://example.example.com/example/example/example.html


my program counts and prints out the number of files of folder and the total size in bytes of all files but i have error ("Exception in thread "main" java.lang.NullPointerException")  import java.io.*; public class Ex5 {     public static void a(String s) throws IOException{          long size=0;         File f=new File(s);         File [] a=f.listFiles();         System.out.println("the number of files in this folder :"+a.length);         for(int i=0;i<a.length;i++){         if(a[i].isFile()){             size=size+a[i].length();          }else             a(a[i].getName());          }     System.out.println("the folder size is :"+size);     }     public static void main(String[] args) throws IOException {         // TODO Auto-generated method stub       a("C:\\Users\\hackour\\Documents\\javablue\\applet");     }  }

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


I run a binary logistic regression, with a binary dependent variable and a continuous independent one. Now I want to evaluate the out-of-sample performance of the classification algorithm so obtained. For instance, given a probability threshold, I want to compute out-of-sample accuracy or sensitivity. One solution would be resampling-based estimators: for instance, the method of validation set. I would split the dataset into a training set and a test set, train the model on the training set, and evaluate the performance (e.g. accuracy or sensitivity) on the test set. This is a generic approach, which can be used with any estimator. For example, I can use this approach also with SVM or neural networks. But logistic regression is different in many ways from a (deep) neural network: in particular, we know a lot about the properties of the estimator. For instance, we know the confidence interval for the estimated coefficients, and we know an estimate for the irreducible error in the data. My question is: are there any analytical solutions (not re-sampling based like validation set or cross-validation) to compute out-of-sample performance metrics like accuracy or sensitivity? For instance, with least squares linear or polynomial regression, I could train the model on the entire dataset (without splitting train/test) and then get the Leave-One-Out Cross-Validation MSE with the following formula: $$ \text{CV} = \dfrac{1}{n} \sum\limits_{i=1}^n \left( \dfrac{y_i - \hat{y}_i}{1-h_i} \right)^2 $$ (see James, Introduction to Statistical Learning, pag. 180) Is there a similar formula for the accuracy of logistic regression?

I was naively validating my binomial logit models by testing on a test dataset. I had randomly divided the available data (~2000 rows) into training (~1500) and validation (~500) datasets.   I now read a post in another thread ( Frank Harrell) that causes me to question my approach:     Data splitting is not very reliable unless you have more than 15,000   observations. In other words, if you split the data again, accuracy   indexes will vary too much from what you obtained with the first   split.   How serious is this worry and what are ways around it? The OP speaks of "resampling" but not sure how that works here for validation.   Edit: Adding context as per @Bernhard's comment below:


The title explains it all.  You could then have an integrated interface, custom branding, in-page demos, etc. and I don't understand why it hasn't been done yet.  I know that similar questions have been asked before but I would like t know the reason that nothing has happened yet.

So, I'm a JavaScript developer (mainly), and I've been using Stack Overflow for a bit now. I keep finding myself needing to use  (or similar) in order provide demos in my answers. jsFiddle is great; however, I was wondering if Stack Overflow has any plans to create its own (slightly-more-permanent) code playground for its users?  jsFiddle seems incredibly simple to make, and more often than not the code I find posted in my answers is demo-ready (that is, it’s real code that doesn't contain placeholders). One way I can imagine implementing this is with a "run this" button which takes the code blocks from within a post, tries to execute them, and then opens the results in an overlay (or a new window).


After  on a  from a new user,  was:     thanks for the corrective feedback, as this is my first question ever   on Stackoverflow. Didn't even know I could edit the question again,   which I will based on your advices. If you can, please tell me if my   new question is more appropriate. Thanks. – Filipe Santos 9 mins ago   By this comment, the new user didn't know about editing their question.  Hence, this might be use for future modifications of the help page and related material first shown to new users.  Is there plan(s) to handle the correct or more direct tutorial/information/guide to new users?     doesn't answer this question - it only saw comment and say the OP about edit their own answer instead using comments - which is not what my question is about. My point was some like the question-wizard and there it's explained that they can edit ther question anytime.

There are several questions here on meta about "How to guide new users" and in particular "How to educate new users about accepting answers" (see , , , ). A common approach seems to be to comment on the post, pointing to the FAQ or proposing a certain action.  While these , they do not directly contribute to the post itself and therefore could also be considered . An alternative to comments is to have the system itself guide new users (see for example  and ).  Before engaging into the comments-vs-system-reminders discussion, we first need to get a canonical answer on this question:    How does the system currently guide (or prod) new users to participate in using the features of the system?


I have ubuntu 12.04 and I need to clear some space for my updates. I did a procedure that a tech showed me where I purchased my computer where you go to fur and copy-paste a line beginning with dpkg and it pretty much did the rest.This time though it wont work. I think it was a one time thing. So can someone show me a procedure to fix this in basic non computer nerd language cause I'm not very computer savy? Thanx

I see the following error while trying run the command shown below. I read somewhere that my /boot partition is low on disk space. How can I increase the size of the /boot partition so I can install more software? I have a 500GB hard disk, so there is enough space to play with.  sudo apt-get install libdvdread4  gzip: stdout: No space left on device                                                                                E: mkinitramfs failure cpio 141 gzip 1                                                                                update-initramfs: failed for /boot/initrd.img-3.2.0-33-generic with 1.                                                                                run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1                                                                                Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.2.0-33-generic.postinst line 1010.                                                                                dpkg: error processing linux-image-3.2.0-33-generic (--configure):                                                                                subprocess installed post-installation script returned error exit status 2                                                                                dpkg: dependency problems prevent configuration of linux-image-server:                                                                                linux-image-server depends on linux-image-3.2.0-33-generic; however:                                                                                Package linux-image-3.2.0-33-generic is not configured yet.    dpkg: error processing linux-image-server (--configure):     dependency problems - leaving unconfigured    dpkg: dependency problems prevent configuration of linux-server:     linux-server depends on linux-image-server (= 3.2.0.33.36); however:      Package linux-image-server is not configured yet.    dpkg: error processing linux-server (--configure):     dependency problems - leaving unconfigured    No apport report written because the error message indicates its a followup error from a   previous failure.                                                                                No apport report written because the error message indicates its a followup error from a previous failure.  Errors were encountered while processing:  linux-image-3.2.0-33-generic  linux-image-server  linux-server N: Ignoring file 'michael-gruz-canon-precise.list.1' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension N: Ignoring file 'michael-gruz-canon-precise.list.1' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension   Listed below is the output of du  Filesystem              1K-blocks      Used Available Use% Mounted on /dev/mapper/ubuntu-root 712660664 104095912 572363692  16% / udev                      3964792         4   3964788   1% /dev tmpfs                     1591012      1064   1589948   1% /run none                         5120         0      5120   0% /run/lock none                      3977528       684   3976844   1% /run/shm /dev/sda1                  233191    219821       929 100% /boot


It may seem, compact & specific but specifying each essential subclass is time consuming, more over it needs to be remembered.  To be specific, what exactly is the difference between import java.applet.*; & import java.*;

It is much more convenient and cleaner to use a single statement like  import java.awt.*;   than to import a bunch of individual classes  import java.awt.Panel; import java.awt.Graphics; import java.awt.Canvas; ...   What is wrong with using a wildcard in the import statement?


I need to do this on a mac/linux:   Given: some directory such as /usr/local/lib/node_modules Find: all links that are symbolic links to any files within the given directory   I would like to remove those links since the directory does not exist anymore and provide a cleaner working environment.

I have a folder on my server to which I had a number of symbolic links pointing. I've since created a new folder and I want to change all those symbolic links to point to the new folder. I'd considered replacing the original folder with a symlink to the new folder, but it seems that if I continued with that practice it could get very messy very fast.  What I've been doing is manually changing the symlinks to point to the new folder, but I may have missed a couple.   Is there a way to check if there are any symlinks pointing to a particular folder?


If freely-falling frames are the local inertial frames according to GR, then is the surface of earth "really" expanding outward at a every point on the surface, locally? What does this mean?

I know this question has been asked in other forms, generally regarding the balance of forces.  This time I want to focus on motion.  I've got a laser accelerometer on my desk.  It tells me that I'm accelerating at $9.8~\rm m/s^2$.  For the first experiment I'm travelling in space.  I pick a nearby star and discover that I move about $490$ meters in $10$ seconds from that star.  For the next experiment I'm on the surface of Earth.  I measure the same acceleration with my laser accelerometer.  I pick a spot (the center of the Earth) and discover I don't move at all in $10$ seconds.  How is acceleration without motion possible?


In the output from a cox regression I get several p values from one variate - one for each level of the variate bar one level. I want to know the effect of the variate on the outcome (adjusted by other variates) and therefore one p value would suffice. (I can't seem to use anova because I'm using the R survival function survSplit - although that would be good). I am therefore stuck with trying to interpret the p values for individual levels of the variate. My question is - what exactly do they mean ? - and when do I know that the variate has a significant effect on the outcome ? Do all the p values for each level of the variate have to be significant to conclude that the variate has a significant effect ? The p values seem to be calculated with reference to one of the levels of the variate (presumably treated as a reference level) - but is that useful ? As an example the outcome could be death with genetic-time groups given by survSplit and the variate of interest could be an ordinal variable e.g. the nodal status of a patient. In regression I normally think of whole variates, not different levels, as having a regression coefficient. Does that mean that here each level of a variate has its own regression coefficient which is independent of all levels apart from the reference level ? and if it is significant it can be interpreted as having an association with the outcome/time (=hazard) that is relative to the reference level's association with the outcome/time ? (note that this doesn't seem very useful if I don't know what the reference level's association with outcome/time actually is !?) Unfortunately anova.rms and base anova will not work directly (at least with my data) on one R survival coxph(survSplit) object, presumably because the groups:strata(time_group) parameter which has two levels always gives one of these levels (for each time) with a line of NAs and se(coef) of zero: as in the following results from model coxph(Surv(tstart, time, BCSSsplit) ~ groupsplit:strata(time_group) + Nodal_status_CATEGOR_CATEGOR, data = BCSSsplitdata)                                                                                se(coef)      z        p Nodal_status_CATEGOR_CATEGORa                   2.959e-01  2.071   0.0384 Nodal_status_CATEGOR_CATEGORb                   2.698e-01  5.643 1.67e-08 Nodal_status_CATEGOR_CATEGORc                   2.964e+03 -0.005   0.9959 groupsplitHer2+:strata(time_group)time_group=1  2.774e-01 -4.112 3.92e-05 groupsplitTNBC:strata(time_group)time_group=1   0.000e+00     NA       NA groupsplitHer2+:strata(time_group)time_group=2  3.930e-01  2.563   0.0104 groupsplitTNBC:strata(time_group)time_group=2   0.000e+00     NA       NA  The error given is Error in .rowNamesDF<-(x, value = value) : invalid 'row.names' length anova will however compare two such objects - so I'll have to settle for that unless someone knows a method whereby anova will handle such a coxph object. (The time split (or other adjustment) is necessary following Schoenfeld testing for proportional hazards.)

If in a linear regression I have categorical variable... how do I know the stastical signifance of the categorical variable?  Let's say the factor $X_1$ has 10 levels... there will be 10 different resultant t-values, under the umbrella of one factor variable $X_1$...  It seems to me that the statistical signifiance is tested for each level of the factor variable? No?  @Macro: Following your suggestion, I've built the following example:  It seems that x3 is useful and must be included in the model, from the below model comparison.  But actually that's wrong...  n=100     x1=1:n x2=(1:n)^2  x3=rnorm(n) ee=rnorm(n) y=3*x1-2*x2+x3+3+ee lm1=lm(y~x1+x2+x3) summary(lm1)  lm2=lm(y~x1+x2)  summary(lm2)  anova(lm1, lm2)  > anova(lm1, lm2) Analysis of Variance Table  Model 1: y ~ x1 + x2 + x3 Model 2: y ~ x1 + x2   Res.Df     RSS Df Sum of Sq      F    Pr(>F)     1     96  82.782                                   2     97 146.773 -1    -63.99 74.207 1.401e-13 *** --- Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1


I have a requirement where I need to search for list of items in a lwc and make a selection when clicked on a row.  Below is the thing that I've achieved so far.  Apex Class:  public with sharing class LwcMapIterationController {     @AuraEnabled(cacheable=true)     public static map<string, string> getAllObjects(){         map<string, string> objectList = new map<string, string>();         for ( Schema.SObjectType o : Schema.getGlobalDescribe().values() )         {             Schema.DescribeSObjectResult objResult = o.getDescribe();             objectList.put(objResult.getName(), objResult.getLabel());         }         return objectList;     }  }   LWC HTML:  <template>

Operation
             <lightning-radio-group name="Operation"                                     options={options}                                    value={value}                                    type="radio"></lightning-radio-group>

Objects

Object Name (Key)

                     <template for:each={mapData} for:item="mapKey">

{mapKey.key}

                     </template>

 </template>   LWC .js:  import { LightningElement, wire, track } from 'lwc'; import fetchMapData from '@salesforce/apex/LwcMapIterationController.getAllObjects';   export default class LwcMapIteration extends LightningElement {     value = '';      get options() {         return [             { label: 'Insert', value: 'option1' },             { label: 'Update', value: 'option2' },         ];     }     @track mapData= [];      @wire(fetchMapData)     wiredResult(result) {         if (result.data) {             //mapData = [];             var conts = result.data;             for(var key in conts){                 this.mapData.push({value:conts[key], key:key}); //Here we are creating the array to show on UI.             }         }     } }   Below is the screenshot of my output:    Now in my objects section, i need to wrap the list in a small list along with a search box. When any object name is searched in the search area/box, the related object needs to be displayed below and onclick,  a selection has to be made.  Can anyone please suggest me the possible solution here.

I have a requirement where I need to display list of salesforce objects as a picklist when a radio button is clicked.  Being new to LWC development, I could not figure out what is the right approach to do so. I have come across  from Salesforce articles where we can display radio buttons but as per my scenario, i need to display list of all salesforce objects as picklist when a radio button option is selected.  Can anyone please suggest the right approach to do so.


I am trying to query sharepoint list which is having Lookup columns.  So to do so I am using below JavaScript function  function getDataWithCaml(oDataUrl, caml) {     var requestData = {         "query":                {                     "__metadata": { "type": "SP.CamlQuery" },                     "ViewXml": caml                }     };     jQuery.ajax({         url: oDataUrl,         method: "POST",         data: JSON.stringify(requestData),         headers: {             "X-RequestDigest": $("#__REQUESTDIGEST").val(),             "Accept": "application/json; odata=verbose",             "Content-Type": "application/json; odata=verbose"         },         success: function (data, object) {             getDataWithCaml_Success(data, object);         },         error: getDataWithCaml_error     }); }   And after doing some google I found out that I have to use $expand parameter to do so.  So this is how I am calling this function.  var oDataUrl = "http://URL/_api/Web/Lists(guid'LISTGUID')/GetItems?$select=LOOKUPLIST/LOOKUPLISTFIELDNAME&$expand=LOOKUPLISTFIELDNAME" var caml = "CAMLQUERY"   When I run this i am getting below error.  The $expand query is not valid for field 'LookupListFieldName'.

I have a Sharepoint app and I use a caml query to filter the data I get back:      var caml = "<View><Query><Where><And><Contains><FieldRef Name='PublishingPageLayout' /><Value Type='URL'>" + pageLayoutName + "</Value></Contains><Neq><FieldRef Name='NewsCategory' /><Value Type='Lookup'>Memo mailer</Value></Neq></And></Where><OrderBy><FieldRef Name='Created' Ascending='False' /></OrderBy></Query></View>";     var url = appWebUrl + "/_api/SP.AppContextSite(@target)/web/lists/getbytitle('pages')/GetItems@target='" + hostWebUrl + "'";     var requestData = '{"query": { "__metadata": { "type": "SP.CamlQuery" }, "ViewXml": "' + caml + '"}}';     return $.ajax({         url: url,         type: "POST",         data: requestData,         headers: {             "Accept": "application/json; odata=verbose",             "X-RequestDigest": formDigest,             "Content-Type": "application/json; odata=verbose"         },         dataType: "json"     });   This works and I get data back. Now the issue I have is that I'm not getting any lookup data back, I only get the ID's of the lookups I want. To accomplish this I have tried using oData combined with my caml query:  var url = appWebUrl + "/_api/SP.AppContextSite(@target)/web/lists/getbytitle('pages')/GetItems\?$select=*,Author/Title\&$expand=Author\&@target='" + hostWebUrl + "'";  var url = appWebUrl + "/_api/SP.AppContextSite(@target)/web/lists/getbytitle('pages')/GetItems?$select=*,Author/Title&$expand=Author&@target='" + hostWebUrl + "'";   This results in a bad request error:  {"error":{"code":"-1, Microsoft.SharePoint.SPException","message":{"lang":"en-US","value":"The $expand query is not valid for field 'Author'."}}}   To overcome this error I removed my caml query and tried using a get request using odata $filter (I need to filter by the PublishingPageLayout field) $filter=substringof(PublishingPageLayout, "NewsLayout.aspx") But again I keep getting an error:  The field 'PublishingPageLayout' of type 'URL' cannot be used in the query filter expression.   I've had a look at oData and I think it only lets you filter on specific fields?  My question is how can I use caml and odata together to get back all of my data including my lookup fields in one call?  If I can't combine them both, is there another way using the rest api to get back all my data and all my lookup data?  I don't want to make other ajax calls to get the lookup data back as I have at least 5-6 lookup fields on each item I'm querying against and I don't want to make 6 more ajax calls just to get all my data back!  Thanks for any input.


Here is my controller  public with sharing class Search  {      public String strTag {get;set;}     public String strlocation {get;set;}     public String result {get;set;}     public ResultSet data {get;set;}      public PageReference find() {               HttpRequest req = new HttpRequest();     HttpResponse res = new HttpResponse();     Http http = new Http();      req.setEndpoint('http://test.3spire.net/index.php?ins='+strTag+'&loc='+strlocation);     req.setMethod('GET');      //these parts of the POST you may want to customize     req.setCompressed(false);     req.setBody('key1=value1&key2=value2');     req.setHeader('Content-Type', 'application/x-www-form-urlencoded');        try {         res = http.send(req);            } catch(System.CalloutException e) {         system.debug('Callout error: '+ e);         result = ''+e;     }      data= JSON.deserialize(res.getBody(),ResultSet.class);  //    result = res.getBody();             return null;     }      public class ResultSet{                public Map<String, Result> resultSet;     }      public class Result     {         public String ins;         public String loc;     } }   And this is my visulforce page   <apex:pageBlock >     <apex:pageBlockTable value="" var="var" id="table">      <apex:column value="" />      <apex:column value="" />     </apex:pageBlockTable>  </apex:pageBlock>   Now how can i bind the data with the interface  Thanks in advance

Can anyone please help me to understand the below code. I am not able to understand how we are  extracting value from map on visualforce page.  Actually i am trying to get the size of value list which is associated with respective key in map.              <apex:outputPanel >                 <apex:repeat value="{!attributeWrapper.mapAllAttributesLabel}" var="M">                     <div>                         <div>{!attributeWrapper.mapLabels[M].Name} </div>                         <div>                             <ul>                                 <apex:repeat value="{!attributeWrapper.mapAllAttributesLabel[M]}" var="attribute">                                     <li>                                     <p>                                         <apex:outputLink onclick="selectAttribute('{!attribute.attributeLabel.Label__c}','{!attribute.attributeLabel.Attribute__c}');return false;">                                            <apex:outputLabel value="{!attribute.attributeLabel.Attribute__r.Name}"/>                                         </apex:outputLink>                                     </p>                                     </li>                                 </apex:repeat>                             </ul>                         </div>                     </div>                 </apex:repeat>             </apex:outputPanel>    public with sharing class AttributeWrapper {      public Map<String, List<AttributesLabelWrapper>> mapAllAttributesLabel{       // some code to populate this map     } }   If i do:  {!attributeWrapper.mapAllAttributesLabel[M].size}   I get an error so how do i get the size of value list on VF page?