When code is run in the context of a platform event, which time zone is chosen as the context time zone, and can that time zone be configured?    Unlike site guest users, the "Process Automated" entity doesn't seem to have related user record where a time zone can be set.

What does Salesforce use as the system time when running those jobs? The current system time (UTC)?  My context is that I have a job that is run every 30 minutes and it executes a task for some of my users. The User object has 4 numeric fields to represent start hour, end hour, start minute and end minute. With those fields I calculate the second in the day the job should start, and the second it should end. With those two values I can compare with the system's current second, and check if the job should run for the user or not.  Some days ago this was a scheduled class that was rescheduling itself using my user credentials ('Scheduled by Renato' and records would be marked as 'Last modified by Renato' too). Then I decided to change to platform events so they would be marked as "Last modified by Automated Process" instead (which is what I want).  Now everytime the class is run, it publishes a event, and the event trigger fires the class' code that was inside the execute block. However, the timing seems off, and users are not receiving the tasks in the correct time anymore.  To get the current second correctly, I've used this code:  Integer offset = TimeZone.getTimeZone('America/Sao_Paulo').getOffSet(DateTime.now()); Integer current_second = Util.getCurrentSecond() + (offset/1000);   Util class' method:  public static Integer getCurrentSecond() {     return Integer.valueOf((DateTime.now().hour() * 60 * 60) + (DateTime.now().minute() * 60)); }   Have I not considered something when using the Platform Events?  Edit:  I just edited my code to include a call to a service that sends a message to me through Telegram. The code ran in the platform event context, and the timing is correct. System time is UTC and São Paulo is UTC-2 (originally -3, but -2 because of Daylight Saving Time):  System second: 21960 Current second: 14760


I have multiple buttons in my app and I want to set the same text for every button using a loop. So I declared an array and filled it with the buttons in this manner:  public class MainActivity extends AppCompatActivity {     Button b1,b2,b3;      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);         b1=(Button)findViewById(R.id.button);         b2=(Button)findViewById(R.id.button2);         b3=(Button)findViewById(R.id.button3);     }      Button[] buArray ={b1,b2,b3};      void b1clicked(View view) {         for (int i =0;i<3;i++) {             buArray[i].setText("it works");         }     } }   But when i try to set text for a button from the array like this   buArray[0].setText("some text");   This causes my app to crash and force closes  And gives me an error like this in the the log  "NullPointerException

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 am having trouble proving that it is equal to zero analytically. I have tried plotting and know that for $0<x<1$ the integrand is negative and positive otherwise. I have tried substitution $u\to \sqrt{x}$ but I cannot proceed further.

The integral is from P. Nahin's "Inside Interesting Integrals...", problem C2.1. His proposed solution includes trigonometric substitution and the use of log-sine integral.  However, I think the problem should have an easier solution (without appealing to another complicated integral at least).  I have the following trick in mind. Let's introduce the substitution $x=4-z$  $$I=\int_0^4 \frac{\ln x}{\sqrt{4x-x^2}}~dx=\int_0^4 \frac{\ln (4-z)}{\sqrt{4z-z^2}}~d(4-z)=\int_0^4 \frac{\ln (4-z)}{\sqrt{4z-z^2}}~dz$$  $$2I=\int_0^4 \frac{\ln (4x-x^2)}{\sqrt{4x-x^2}}~dx$$  $$I=\int_0^4 \frac{\ln \sqrt{4x-x^2}}{\sqrt{4x-x^2}}~dx$$    And here I'm stuck. I'm not sure if this can go somewhere. Maybe partial integration can help, but I don't know how to choose the functions. What do you think?    Here is .  Only  does not use trig substitution, it used gamma function instead. If there are no other ways, I'm prepared to give up on my question. But I would be grateful if it's left open at least for several days    Edit  After many attempts, I conclude that there is no trick to this integral. The reason is: the general form of this integral in not zero, but has the same symmetry properties, as the above case:  $$I(a)=\int_0^a \frac{\ln x}{\sqrt{ax-x^2}}~dx=\int_0^a \frac{\ln (a-x)}{\sqrt{ax-x^2}}~dx=\int_0^a \frac{\ln \sqrt{ax-x^2}}{\sqrt{ax-x^2}}~dx \neq 0$$  $$I(4)=0$$  So we will get nothing from symmetry considerations alone. There are two possible ways to solve this - either trigonometric substitution or gamma function.  Edit 2  I was wrong it seems, see the accepted answer.


Please tell me a good reference book of complex analysis. I am a postgraduate student. I really need this. I want to strong my basic concepts from starting. So please  help me .....  Now I am reading complex analysis by 'kasana'

I'm out of college, and trying to self-learn complex analysis. I'm finding  text difficult. Any recommendations? I'm probably at an intermediate sophistication level for an undergrad. (Bonus points if the text has a section on the Riemann Zeta function and the Prime Number Theorem.)


I am using Ubuntu in Windows through VMware software. In windows we have *.exe file to install any software, for Ubuntu how to install google chrome or any software manually, without using Terminal?

How do you install Google Chrome on Ubuntu?


I'm currently a foreign student holding my resident permit in a Schengen country, and I will go for student exchange next January to another Schengen country. As the exchange duration lasts longer than 90 days, do I need to apply for visa for my stay there?

I’m going to Germany for a semester exchange and I have a long-stay visa from Germany. Can I travel to the other Schengen states during this period with this visa or do I have to apply for a separate short stay Schengen visa?  My visa is German national visa type D. It is for a duration of 4 months, i.e., longer than 90 days. It says on the visa that the long stay visa is valid in Deutschland, which is different from my earlier visa, which I had when I visited Germany earlier; that one was a short stay visa and said it was valid in Schengen Staten.  Perhaps my current visa means that I can stay in Germany for a period of longer that 90 days can visit the other Schengen states if I don’t exceed the 90 day period.


I use aliases a lot but right now only for use cases like alias i='sudo apt-get install -y'. I often would like to add an alias in the following form:  alias cmd='echo [something] >> /path/to/file' where I would like to substitute [something] with what I enter after the cmd.  I can obviously create a one-line script,save it somewhere and make an alias to that command but since I only want to substitute only 1 word in a pipe, is there a simpler way to do this?

For bash script, I can use "$@" to access arguments. What's the equivalent when I use an alias?


Suppose we have observer $A$ and observer $B$ that meet at a point $p$ when both of their clocks are zero. Why  after  that, the  measure of their clocks would be  different, since clocks depend on the laws of physics and the laws of physics are the same for all inertial observers? Shouldn't their clocks click at the same rate?

Please will someone explain what time dilation really is and how it occurs? There are lots of questions and answers going into how to calculate time dilation, but none that give an intuitive feel for how it happens.


Perhaps I have misunderstood  so I ask another question.  In Bash desire to expand variables inside read without envsubst, arguments or heredocuments (and without any non shell-builtins) because I work in a shared hosting environment in which I don't have many common non shell-builtin utilities. The variable I want to expand is the environment variable HOME but I make this question variable-agnostic, i.e. I seek a way in which the user can expand inside read:  An environment variable A non environment variable Both types of variables   I have tried this which failed: IFS= read -r domain_dir     ${HOME}/example echo ${domain_dir}   Current output: ${HOME}/example Desired output: MY_HOME_DIRECTORY/example   How to expand variables inside read without envsubst, arguments or heredocuments (and without any non shell-builtins)? Edit to explain why I find marking this a duplicate is wrong According to the user terdon which marked this question duplicate, in this question I ask for something which is impossible. If terdon is correct in that regard than this question is not a duplicate and can be answered separately with an answer that explains if and why it is indeed impossible.

In a remote CentOS with Bash 5.0.17(1) where I am the only user via SSH I have executed read web_application_root with: $HOME/www  or with: ${HOME}/www  or with: "${HOME}"/www  or with: "${HOME}/www"  Aiming to get an output with an expanded (environment) variable such as MY_USER_HOME_DIRECTORY/www. While ls -la $HOME/www works fine, ls -la $web_application_root fails with all examples; an error example is: ls: cannot access '$HOME/www': No such file or directory  I understand that read treats all the above $HOME variants as a string (due to the single quote marks in the error) and hence doesn't expand it. How to expand variables inside read?


when I google my own domain name, I don't even rank for it. Instead, my terms of service page gets indexed and shows up on the second page! My blog shows up here as well (it's hosted by another service) but my main home page and any of it's pages doesn't even appear on the search results.  I see the same thing on bing, and yahoo. Main page doesn't show up.  the domain name is not too generic but unique enough, it uses .la domain  Have I been banned from google? What the hell is going on?  The domain is 4 years old and I've done a redesign 4 months ago.

This is a general, community wiki  question and answer pair intended to address any questions   concerning the reasons a site or specific site contents do not appear   in search engine results.      If your question was closed as a duplicate of this question and you   feel that the information provided here does not provide a sufficient   answer, please open a discussion on .   My site (or specific pages on my site) is not appearing in search engine results.  Why isn't my content indexed and what can I do about it?


I am going to Berlin and I have a 10 hours layover in Hongkong.I am having an Indian passport. Can I get a visiting visa and go around Hongkong? How much or what all procedure should I go through to get a visiting visa? Is it possible or advisable to visit the city and come back within 10 hours?

We are (2) Indian nation and travelling from India to USA via Hong Kong airport and about 15 hours layover in Hong Kong airport. Do we need a transit visa even if only changing planes? And can we apply in Hong Kong Airport?


How do I get the modified date/time of a file in Python?

I have a script that needs to do some stuff based on file creation & modification dates but has to run on Linux & Windows.  What's the best cross-platform way to get file creation & modification date/times in Python?


I have two domains : my-domain.com and my-domain.fr  I want to redirect traffic as followed :   my-domain.com:80 -> my-domain.com:443 my-domain.fr:80 -> my-domain.com:443 my-domain.fr:443 -> my-domain.com:443   I've chosen to only use .com, am I right ? I guess yes. Because I only have to manage one certificate : the .COM one.  My /etc/apache2/sites-available/default :  NameVirtualHost *:80  <VirtualHost *:80>    ServerName www.my-domain.com    ServerAlias my-domain.com    Redirect permanent / https://www.my-domain.com </VirtualHost>  <VirtualHost *:80>    ServerName www.my-domain.fr    ServerAlias my-domain.fr    Redirect permanent / https://www.my-domain.com </VirtualHost>   My /etc/apache2/sites-available/default-ssl :  NameVirtualHost *:443  <VirtualHost *:443>    ServerName www.my-domain.com    ServerAlias my-domain.com    DocumentRoot /var/www/my-domain/    ErrorLog /var/log/my-domain/my-domain.com.error.log    CustomLog /var/log/my-domain/my-domain.com.access.log combined     GnuTLSEnable on    GnuTLSPriorities NORMAL    GnuTLSExportCertificates on    GnuTLSCertificateFile /etc/apache2/ssl/certs/my-domain.com.crt    GnuTLSKeyFile /etc/apache2/ssl/private/my-domain.com.key </VirtualHost>  <VirtualHost *:443>    ServerName www.my-domain.fr    ServerAlias my-domain.fr    DocumentRoot /var/www/my-domain/    ErrorLog /var/log/my-domain/my-domain.fr.error.log    CustomLog /var/log/my-domain/my-domain.fr.access.log combined     GnuTLSEnable on    GnuTLSPriorities NORMAL    GnuTLSExportCertificates on    GnuTLSCertificateFile /etc/apache2/ssl/certs/my-domain.fr.crt    GnuTLSKeyFile /etc/apache2/ssl/private/my-domain.fr.key </VirtualHost>   But I'm getting a SSL certificate error when I'm going to my-domain.fr because it tells me that I wanted to go on my-domain.fr and I'm not.

This is a  about Hosting multiple SSL websites on the same IP.   I was under the impression that each SSL Certificate required it's own unique IP Address/Port combination. But the  is at odds with this claim.  Using information from that Question, I was able to get multiple SSL certificates to work on the same IP address and on port 443. I am very confused as to why this works given the assumption above and reinforced by others that each SSL domain website on the same server requires its own IP/Port.  I am suspicious that I did something wrong.  Can multiple SSL Certificates be used this way?


I need again your precious help. In particular, I was wondering how to make a first page header.  The result that I would like to obtain is something like this:    In the picture, I used a word processor, but the title/author layout should be the standard one.  Thank you in advance!

I have been racking my brains over how in bloody hell can you have a different header for the title (or first) page of a document.   I am not asking here how I can not have a header by clearing the page style for this page using \thispagestyle{plain} or something of the sort but how can I have a different header just for the very first page.   Please help as I have a deadline to meet.   So far, I have not been able to find anything useful on TeX.SE.   Here is some of my code to give you some idea of what I want to achieve:  \documentclass[12pt]{article} \usepackage{amsmath} \usepackage[margin=2.5cm]{geometry} \usepackage[utf8]{inputenc} \usepackage{amsfonts} \usepackage{fancyhdr} \usepackage{hyperref} \usepackage{graphicx} \usepackage{csc} \pagestyle{fancy} \fancyhead[L]{**Left Header for all pages**}\fancyhead[R]{**Right Header for all pages**} \lhead{**Left Header for just the first page**} \rhead{**Right Header for just the first page**} \title{Problem Set 1}         \author{MyBloodyName} \date{January 31, 2017} \begin{document}     \maketitle     \newpage     Easier? \end{document}


I'm working with QGIS, v. 2.0.1.  I opened a csv-table (from an Excel-file) and now the precision is very high but I don't need this. At the moment the values are for example 15.00000000000000, how can I change this to 2 decimals? And is it possible to set the precision before I open the table in QGIS?  The methods suggested by simo just worked partially... I opened the table and it looked good but as I wanted to create a shapefile of the layer the precision switched back to many decimals. What can I do?  There are only two decimal places in the csv file and there are also only two decimal places when I load the csv file into QGIS. But as soon as I create a shapefile, there are 14 decimal places.

I have a database in txt format made of several columns of real numbers. Two column are integer, 17 are real (rounded to the first decimal) and 17 are real rounded to the second decimal.   If I import it through a txt format QGIS identified the integer columns properly, but also assign a width of 24 and a field precision of 15.   How can I limit it?


How would one calculate the probability of rolling a six (at least once) on seven dice? Would I be correct in proposing $1 - P(\text{no sixes})$ which is $1 - (5/6) ^ 7$?

Could someone help me with how the following is calculated:  What is the probability of rolling a die seven times and getting at least one six?  My instinct told me it would be $1/6+\cdots + 1/6$ but this ends up being $7/6$.


I found an example of template's Lyx and I work fine with it, so lets explain what I'm doing: I'm writing a book's intership this later start by 3 chapter wich aren't numerated for example here:  if I place my cursor upon the title of chapter the dropdown menu (where we found the section, chapter, section ...) show me chapter not chapter* so the output is:   you noticed here we haven't an enumerated chapter for example Chapter 1 Dédicas. in this case is very well. I show ather example but with enumerated chapter in the same document :   you look here Chapter 4 but its output will be Chapter1:  and if I place again my cursor the dropdown menu show me chapter too. very well too :). but I have a latter chapter that's a general conclusion:  I want its output is not enumerated chapter like the above one chapter "Dedecase", its output like this:  my problem is I want the later chapter without enumeration, I tried with chapter* but this is not indicated in the Table of Content.  for my dropdown menu is:   how I can resolve it and thanks.

I use Lyx 2.1, class document : report. I created a general introduction as unnumbered chapter, but at the table of Contents, the introduction does not exist.


I am a Lebanese citizen and have been issued a multiple entry Schengen visa by the French Embassy. I have not used my visa yet, it is still valid.  Is it possible to enter Germany as my first destination?

In case, if I get a multiple-entry Schengen visa in one of the embassies in Ukraine, Kyiv - should my first trip be to the country which issued the visa?  Any there any requirements of this sort? Does this condition vary depending on embassy which issued the visa?  What are the possible consequences on not visiting that country first? Does it somehow depend on country where the embassy is (i.e. non-Schengen and not EU members)?


In so-called memes and vines, I've seen sentences such as "People be like", "Boys be like", and so on. Every time, I wondered how be was in those particular sentences. Grammatically, how can be be in such sentences in that way?  My assumption, is it like subjunctive [should] be? Are is and are not used because using them would make the sentence determinative, whereas [should] be would make the sentence suggest possibility?  Thanks.

Of late, I have been noticing a lot of casual memes floating around, particularly on Facebook, that involve this phrase. Typical constructs could be like the following examples:     B*&^%$# be like...I need a break.      Niner fans be like...but we won five times!      Liberals be like...I hate guns.   I understand these are strictly informal constructs. But I'd need a native speaker's (American English because most such memes seem to originate in the US) take on:   how casual these phrases are, i.e. if they can be used in semi-formal fiction writing? how this usage originate and if it has any affiliation to a particular dialect group, e.g. Midwest, African-American, Southern American, etc.


Rendered with 1000 samples in cycles. What can i try to get rid of it without losing the quality of the image?

I know that this question is a bit old or maybe overdone, but I'm running the latest edition of Blender and when I use the Cycles engine I get really fuzzy results and I can't find a simple, non-compromising solution to the quality.  I don't know exactly what I'm doing wrong here, but I'm sure others share my frustration.  Leaving everything in default settings, I started a new project and switched to the Cycles render.  I duplicated the cube and set colors for two Diffuse BSDF shaders, then went ahead and made walls and a floor all sharing the same diffuse shader.  I made two windows to emit blue light.  The screenshot has gaps between the walls because of the setup:  I'm aware that it's considered very incomplete and many have come to terms with some amount of noise, but is this normal?  Furthermore, with default settings or not, I can't change the amount of noise produced.  Supposedly, using "progressively refine" in the rendering tab should make it refine itself indefinitely, however Cycles only counts to 10 refines and then stops, creating a render which is a pixel-perfect match of the ordinary rendering method when it's completed.  I understand that there are tricks that can be used to reduce noise, but at the cost of extra processing time and usually small quality conflicts, like blurring.  My question essentially boils down to is this Cycles' current limit?


So I have a bespoke CMS that allows dynamic creation of forms and lists etc. I have noticed an issue where it grabs the data for the list, which is conflicting with an approval table in the database.  The problem is, if the table with the data has fields names the same as field names in the approvals table, then when i mysql_fetch_array and it returns the values in an array, it will only return one field name  So an example of what is being returned  Array (     [id] => 1 )   And ideally I would want it returned as  Array (     [approvals.id] => 1     [affiliates.id] => 2 )   So how can I make it prefix the table name to the results array to counteract field names called the same thing? I dont want to go through changing the field names as its pretty  embedded.

I have two tables in my database:  NEWS table with columns:   id - the news id  user - the user id of the author)   USERS table with columns:   id - the user id   I want to execute this SQL:   SELECT * FROM news JOIN users ON news.user = user.id    When I get the results in PHP I would like to get associative array and get column names by $row['column-name']. How do I get the news ID and the user ID, having the same column name?


TL;DR: A privilege should be added to be able to "vouch for" another user's usefulness to a particular question, giving them the ability to comment on that question.  Sometimes, especially in programming teams, someone who is very familiar with a piece of software may discover or be directed to a question that they are very qualified to solve. Of course, this could also apply to a game developer finding a question about their game on Arqade or a researcher finding a question about their area of expertise on Computer Science.SE. In some cases, this person may have trouble answering the question because they have insufficient reputation to ask for clarification.  I propose that we provide a mechanism for another user to vouch for this expert's expertise or ability, which would allow that user to post comments on the question. This should require significantly higher reputation than what is required to comment (I think the "Established user" privilege, at 1000, would be a good spot). Doing this would also not notify the user, to avoid the primary problem with "private message" and "ping" suggestions. Instead, the "vouching" user would have to notify the "expert" user out of band.

I am suggesting a Mentor privilege at 7.5k. It would be on a per-user per-site opt in basis.  At some reputation level (perhaps 7.5k) there could be an opt in "mentor" privilege.  If someone opts in then when a new user signs up, they become their Mentor. The new user is the Mentee.  They will get notified of any posts or suggested edits they make, and can help and support them.  While this would by no means help everyone (I'm sure there are more new people signing up than there are 7.5k people willing to help them), it could help mitigate the "new user's bad posts" and such like.  By no means would being someone's mentor mean you are the only person who can edit and help them, and you aren't obliged to do so - but if you have opted in then you should help.  How would this work?   Any Mentor would have no more than 5 active Mentees at once. Once the Mentee gets to 125 rep, the downvote privilege (or any other level deemed sensible) they are no longer a Mentee. If they aren't active for a month, they are no longer a Mentee. If the Mentor has 5 Mentees (i.e. cannot mentor anyone else) then any Mentee not active for 2 weeks is no longer a Mentee. The Mentee can opt out at any time, the Mentor can opt out, but if they opt out a lot (say 5 people in 2 months) they are blocked from the privilege for 2 weeks. The Mentor gets no extra rep. They can still get rep from answering their Mentee's questions and similar. Once the new user gets 20 rep on the site, a chat room is created for them to talk. No user with the association bonus will become a Mentee. This would (maybe) be opt in for sites. For example, this might not be at all useful for this site, or for , but on  or  I imagine this could be quite good.    appears to be asking the same thing, based on the title, but that is asking about people who know each other offline mentoring each other.    Every single one of these suggestions (especially the numbers) is open to discussion. Maybe 125 is to low to stop being mentored, or maybe it's too high. What do you think?


I'm looking to produce a map from two separate maps in R. My Maps files are as follows:   #Map1  #Map2  These are 6-10 day weather Precip maps from NOAA.   I would like to create a map with the area showing, being only the difference of the two maps. So Map1 - Map2 = Map3.   Also, I would like it to show the relative strength of the change for the above or below normal moisture. Which can be seen in the "Prob,N,13,11" & "Cat,C,254" files of the dbf file.   Without success I have tried:  converting to PolySet and then using joinPolys with the Operation="DIFF".  Also: using readOGR, checking for gIsValid, and then trying to use gDifference.  When I run the second one I get this error:     Error in RGEOSBinTopoFunc(spgeom1, spgeom2, byid, id, drop_not_poly, "rgeos_difference"):    TopologyException: no outgoing dirEdge found at -168.86604844949545 63.300706978948405   I am sorry if it seems like such a simple question of taking the difference between two maps but I have been stuck on this question for a number of days now.

A reverse clip saves only the part of your spatial object that is outside the bounds of another object, as opposed to a regular clip which saves the parts that are inside the other object.    shows how to do it in ArcMap.  How do I do this in R?  Reproducible example (on Linux machines):  system("wget 'https://github.com/Robinlovelace/Creating-maps-in-R/archive/master.zip' -P /tmp/") unzip("/tmp/master.zip", exdir = "/tmp/master") uk <- readOGR("/tmp/master/Creating-maps-in-R-master/data/", "ukbord") lnd <- readOGR("/tmp/master/Creating-maps-in-R-master/data/", "LondonBoroughs") plot(uk) plot(lnd, add = T, col = "black")   What I want here to do is to save all of the UK except for London. Visually, I want the black shape in the resulting image to be a hole.


I'm struggling to understand how the Chinese remainder theorem works on quadratics (though I know how it works in the simpler cases). For example in my number theory book there's an example with $f(x) = x^{2} + x + 7$ and we need to find all the solutions to $f(x) \equiv 0$ (mod $189$) given that the roots mod $27$ are $4, 13, 22$ and the roots mod $7$ are $0$ and $6$.   There's a solution in the book to the example but I can't understand it very well. It says: "...we find that $x \equiv a_{1}$ (mod $27$) and $x \equiv a_{2}$ mod($7$) if and only if  $x \equiv 28 \cdot a_{1} - 27 \cdot a_{2}$ (mod $189$)."  And then the solution (there are six) follows easily by plugging in the solutions provided in the mod $27$ and mod $7$ cases listed above.  But my main struggle is understanding how this equation $x \equiv 28 \cdot a_{1} - 27 \cdot a_{2}$ (mod $189$) was derived, and how to get this equation in general for these problems (I think it involves Chinese remainder theorem and Euclidean algorithm but I can't figure it out).

Given $x^2 - \overline{51}x - \overline{43} = \overline{0}$.  Solve it in $\mathbb{Z}/187\mathbb{Z}$.  First of all, does the $\overline{x}$ mean that $\overline x = \{x + z \ | z\in I\}$?  I am getting really confused, because 187 is composite. I think I should somehow decompose this equation into two equations and solve them in $\mathbb{Z}/11\mathbb{Z}$ and $\mathbb{Z}/17\mathbb{Z}$, but I'm not sure.  And what is the pattern to solve things like that?


I have recently moved into a new home, and for now, I'm stuck with a horrible electric glass top stove.  My old place had a gas stove with a continuous grate across the cooking surface.  All my pans are carbon steel or cast iron.  (I take good care of my pans, so it's not an issue of abuse or putting cold water in a hot pan, or immediately rinsing a hot pan in cold water.  With the exception of my woks, they are bullet proof).   I am finding that most of my carbon steel pans have a slight warp to the bottom, which was never a problem on the gas range.  But is proving to be rather annoying on the new electric one.  So in theory is there a way to unwarp or to lessen the warping on the bottom of the pan?  In a way this will be academic and I am willing to sacrifice one of my cheaper pans to experiment the unwarping theories.  Thanks.

Is there a way to "fix" my stainless steel fry pan that does not sit flush on my cooktop stove?


I have read that floating numbers are stored as per IEEE 754 representation and sometimes approximate value is displayed if its not possible to represent the number.  I have written the following code in which i am extracting fractional part then multiplying it by 10 nine times inside the loop. At the end of the loop the value is 142000000.000000 (variable g). I multiplied it again with 10 outside the loop and got the result as 1419999999.999999.  I stored the value which was calculated inside for loop explicitly in another variable(k) and multiplied it with 10 and got the result as 1420000000.000000  Can you please tell me why the difference how it is able to store the value correctly in the second instance (In variable k).  #include<stdio.h> #include<math.h> int main() {     double f=3.142,g,i;     int j;     g=modf(f,&i);      printf("Inside loop");     for(j=1;j<=9;j++)     {         g = g * 10.0;         printf("\n%lf",g);     }     printf("\nLoop ends");      g = g * 10.0;     printf("\nThe value of g is %lf",g);      double k = 142000000.000000;     k = k * 10.0;     printf("\nThe value of k is %lf",k); }   Output  Inside loop  1.420000  14.200000  142.000000  1420.000000  14200.000000  142000.000000  1420000.000000  14200000.000000  142000000.000000  Loop ends  The value of g is 1419999999.999999  The value of k is 1420000000.000000

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


When creating a new nested list the following way:  test_list = [[""]]*5   unexpected behavior happens, appending to an index the following modifications happens:  test_list[1].append(2) [['', 2], ['', 2], ['', 2], ['', 2], ['', 2]]   when doing the following it works as I would expect:  test_list[1] = test_list[1] + [0] [[''], ['', 0], [''], [''], ['']]   but when using the += operator the same odd thing happens  test_list[1] += [0] [['', 0], ['', 0], ['', 0], ['', 0], ['', 0]]   when the list is defined as following: [[""] for i in range(len(5))] all the examples return the expected output.   What is going on? Is it some reference thing I am not understanding?

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


I want to show that the function   $$ g =  \begin{cases} 0, \quad \text{if } x \le 0, \\ e^{-\frac{1}{x^2}}, \quad \text{if } x > 0, \end{cases} $$ is infinitely differentiable at $0$ and that all derivative vanishes: $g^{(n)}(0) = 0$.   I was having trouble expanding the function into its Taylor expansion. Any help is appeciated!

$f(x) = \begin{cases} e^{-1/x^2} & \text{ if } x \ne 0 \\ 0 & \text{ if } x = 0 \end{cases}$ so $\displaystyle f'(0) = \lim_{x \to 0} \frac{f(x) - f(0)}{x - 0} = \lim_{x \to 0} \frac {e^{-1/x^2}}x = \lim_{x \to 0} \frac {1/x}{e^{1/x^2}} = \lim_{x \to 0} \frac x {2e^{1/x^2}} = 0$ (using l'Hospital's Rule and simplifying in the penultimate step). Similarly, we can use the definition of the derivative and l'Hospital's Rule to show that $f''(0) = 0, f^{(3)}(0) = 0, \ldots, f^{(n)}(0) = 0$, so that the Maclaurin series for $f$ consists entirely of zero terms. But since $f(x) \ne 0$ except for $x = 0$, we can see that $f$ cannot equal its Maclaurin series except at $x = 0$.  This is part of a proof question. I don't think the answer sufficiently proves that any $n$th derivative of $f(x)$ is $0$. Would anyone please expand on the answer? ps: I promise this is not my homework :)


I'm new to MCMC, so this might be obvious.  Let's say we're using MCMC to estimate a posterior distribution. We run MCMC, and it returns a representative sample from that posterior distribution.  The sample is just a collection of data points. To actually use it, we just plot a (normalized) histogram of those data points to draw our estimated posterior.   However, we also know the posterior probability of each data point in the sample! This is even explicitly calculated in the Metropolis MCMC algorithm. Why do we ignore this?     Edit: Here's .

I'm currently estimating parameters of a model defined by several ordinary differential equations (ODEs). I try this with a bayesian approach by approximating the posterior distribution of the parameters given some data using Markov Chain Monte Carlo (MCMC).   A MCMC sampler generates a chain of parameter values where it uses the (unnormalized) posterior probability of a certain parameter value to decide (stochastically) whether it will add that value to the chain or add the previous value again. But, it seems to be the practice that the actual posterior probabilities do not need to be saved, rather is a n-dimensional histogram of the resulting parameter values generated and summary statistics like highest density regions (HDRs) of a parameter posterior ditribution is calculated from this histogram. At least that's what I think i learned from .  My Question: Wouldn't it be more straightforward to save the posterior probabilities of the sampled parameter values along with these and approximate the posterior distribution from these values and not from the frequencies of parameter values in the MCMC chain? The problem of the burn-in phase would not arise as the sampler would initially still sample low probability regions more often than they would "deserve" by their posterior probabilities but it would not be anymore the problem of giving unduly high probability values to these.


I'm customizing my zsh PROMPT and calling a function that may or may not echo a string based on the state of an environment variable:  function my_info {     [[ -n "$ENV_VAR"]] && echo "Some useful information\n" }  local my_info='$(my_info)'  PROMPT="${my_info}My awesome prompt $>"   I would like the info to end on a trailing newline, so that if it is set, it appears on its own line:  Some useful information My awesome prompt $>   However, if it's not set, I want the prompt to be on a single line, avoiding an empty line caused by an unconditional newline in my prompt:  PROMPT="${my_info}  # <= Don't want that :) My awesome prompt $>"   Currently I work around the $(command substitution) removing my newline by suffixing it with a non-printing character, so the newline isn't trailing anymore:  [[ -n "$ENV_VAR"]] && echo "Some useful information\n\r"   This is obviously a hack. Is there a clean way to return a string that ends on a newline?  Edit: I understand  and , but in this question I would specifically like to know how to prevent that behaviour (and I don't think  applies in my case, since I'm looking for a "conditional" newline).  Edit: I stand corrected: the  might actually be a rather nice solution (since prefixing strings in comparisons is a common and somewhat similar pattern), except I can't get it to work properly:  echo "Some useful information\n"x   [...] PROMPT="${my_info%x}My awesome prompt $>"   does not strip the trailing x for me.  Edit: Adjusting the proposed workaround for the weirdness that is prompt expansion, this worked for me:  function my_info {     [[ -n "$ENV_VAR"]] && echo "Some useful information\n"x }  local my_info='${$(my_info)%x}'  PROMPT="$my_info My awesome prompt $>"   You be the judge if this is a better solution than the original one. It's a tad more explicit, I think, but it also feels a bit less readable.

The following code best describes the situation.  Why is the last line not outputting the trailing newline char?  Each line's output is shown in the comment.  I'm using GNU bash, version 4.1.5          echo -n $'a\nb\n'                  | xxd -p  # 610a620a              x=$'a\nb\n'   ; echo -n "$x" | xxd -p  # 610a620a      echo -ne "a\nb\n"                  | xxd -p  # 610a620a x="$(echo -ne "a\nb\n")" ; echo -n "$x" | xxd -p  # 610a62


Edited to fix being marked as duplicate or to be more clear on why it appears to be a duplicate. At the time I did not know that package and default where the same thus reason for this post.    now I going through exam questions in preparation for my Java exam and I have a question asking me to explain access modifiers and its asking me about a Package modifier.  I can find info on private, Protected, public and default but can't find anything on Package.   can someone please give me an answer or link me to an article about it?

In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing with inheritance?


I live in London and would like to sell a 200 kr. Faroe Islands banknote. This should be worth about £20 by the way.  I learn the currency is equivalent to Danish crowns, but none of the UK banks will buy it (hence, I am told by a money changer, that they will not buy it because they cannot sell it onward to a UK bank).  There ought to be an easy solution here that doesn't involve me flying to Copenhagen...

I've just returned from several unusual countries in Asia, and annoyingly despite being told I'd have no problem, I'm unable to find anyone in London to change back to pounds.  I've tried Travelex in Heathrow, a currency exchange place, and the post office.  The currencies include cash from: Mongolia, Kyrgyzstan, Kazakhstan and Uzbekistan.  Most of the responses when shown the money is to the tone of "What the hell currency is this?" which doesn't fill me with confidence.  Any suggestions welcomed for places that may change this. Otherwise I may need to go back next year ;)


Let $C\subset \mathbb{R}^m$ be a convex set, let $A$ be an $m \times n$ matrix and $b \in \mathbb{R}^m$. Show that $S=\{x \in \mathbb{R}^n | Ax+b \in C\}$ is a convex set.   I can't understand why this set is convex. Take $x,y \in S$ such that $Ax+b \in C$ and $Ay+b \in C$, then it follows that $A((1-λ)+λy)=(1-λ)Ax+λAy$. It would be easy if I can use that $Ax=-b$, because in that case I'd say that $A(1-λ)Ax+λAy=(1-\lambda)(-b)+\lambda(-b)=-b$ and hence convex. Then from the assumption it follows that this set is convex. I am, however, not sure whether I can use that or not. Could anyone give me a hint on this proof?

If $C\subset\mathbb{R}^m$ is a convex set, $A$ is an $m\times n$-matrix and $b\in\mathbb{R}^m$, how do I prove that the set $S=\{x\in\mathbb{R}^m|Ax+b\in C\}$ is convex?  I know that the definition of convexity is that all combinations $\lambda x+(1-\lambda)y$ (with $\lambda\in[0,1]$) is in $S$ for pairs $x,y\in S$, but I don't see how to prove this for my $S$.


This is my code:
click

test_div_1

test_div_2

          basically what I'm trying to do is: when you click
click  it'll show
 and append another paragraph which is what I did here:  $("#id_2").click(function(){     $(".test_1").show()     $("body").append("
test
")  });   and afterwards when you click on the newly appended paragraph
test
 it should show another div which should be:     $("#test_p").click(function(){         $(".test_2").show() });   but it doesn't. how do we get around this?  I'm still trying to wrap my head around web development. I do know that the appended it's temporary because a page refresh would erase it unless the appended data was saved on the server. I wonder if that has anything to do with that?.  because facebook's and twitters posting feature is intriguing  I know it uses ajax to post the info to the server without a page refresh but how is it able to interact with a div or element that's just been newly appended?

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I have a doubt regarding the cross validation approach and train-validation-test approach.  I was told that I can split a dataset into 3 parts:    Train: we train the model. Validation: we validate and adjust model parameters. Test: never seen before data. We get an unbiased final estimate.   So far, we have split into three subsets.  Until here everything is okay. Attached is a picture:    Then I came across the K-fold cross validation approach and what I don’t understand is how I can relate the Test subset from the above approach. Meaning, in 5-fold cross validation we split the data into 5 and in each iteration the non-validation subset is used as the train subset and the validation is used as test set. But, in terms of the above mentioned example, where is the validation part in k-fold cross validation? We either have validation or test subset.   I would like to cite this information from https://towardsdatascience.com/train-validation-and-test-sets-72cb40cba9e7  Training Dataset Training Dataset: The sample of data used to fit the model. The actual dataset that we use to train the model (weights and biases in the case of Neural Network). The model sees and learns from this data. Validation Dataset Validation Dataset: The sample of data used to provide an unbiased evaluation of a model fit on the training dataset while tuning model hyperparameters. The evaluation becomes more biased as skill on the validation dataset is incorporated into the model configuration. The validation set is used to evaluate a given model, but this is for frequent evaluation. We as machine learning engineers use this data to fine-tune the model hyperparameters. Hence the model occasionally sees this data, but never does it “Learn” from this. We(mostly humans, at-least as of 2017 😛 ) use the validation set results and update higher level hyperparameters. So the validation set in a way affects a model, but indirectly.  Test Dataset Test Dataset: The sample of data used to provide an unbiased evaluation of a final model fit on the training dataset.  The Test dataset provides the gold standard used to evaluate the model. It is only used once a model is completely trained(using the train and validation sets). The test set is generally what is used to evaluate competing models (For example on many Kaggle competitions, the validation set is released initially along with the training set and the actual test set is only released when the competition is about to close, and it is the result of the the model on the Test set that decides the winner). Many a times the validation set is used as the test set, but it is not good practice. The test set is generally well curated. It contains carefully sampled data that spans the various classes that the model would face, when used in the real world.  I Would like to say this: Taking this into account, we still need the TEST split in order to have a good assement of our model. Otherwise we’re only training and adjusting parameters but never take the model to the battle field  Thank you!  Check this splitting:

I have a doubt regarding the cross validation approach and train-validation-test approach.  I was told that I can split a dataset into 3 parts:    Train: we train the model. Validation: we validate and adjust model parameters. Test: never seen before data. We get an unbiased final estimate.   So far, we have split into three subsets.  Until here everything is okay. Attached is a picture:    Then I came across the K-fold cross validation approach and what I don’t understand is how I can relate the Test subset from the above approach. Meaning, in 5-fold cross validation we split the data into 5 and in each iteration the non-validation subset is used as the train subset and the validation is used as test set. But, in terms of the above mentioned example, where is the validation part in k-fold cross validation? We either have validation or test subset.   When I refer myself to train/validation/test, that “test” is the scoring:   Model development is generally a two-stage process. The first stage is training and validation, during which you apply algorithms to data for which you know the outcomes to uncover patterns between its features and the target variable. The second stage is scoring, in which you apply the trained model to a new dataset. Then, it returns outcomes in the form of probability scores for classification problems and estimated averages for regression problems. Finally, you deploy the trained model into a production application or use the insights it uncovers to improve business processes.  Thank you!  I would like to cite this information from https://towardsdatascience.com/train-validation-and-test-sets-72cb40cba9e7  Training Dataset Training Dataset: The sample of data used to fit the model. The actual dataset that we use to train the model (weights and biases in the case of Neural Network). The model sees and learns from this data. Validation Dataset Validation Dataset: The sample of data used to provide an unbiased evaluation of a model fit on the training dataset while tuning model hyperparameters. The evaluation becomes more biased as skill on the validation dataset is incorporated into the model configuration. The validation set is used to evaluate a given model, but this is for frequent evaluation. We as machine learning engineers use this data to fine-tune the model hyperparameters. Hence the model occasionally sees this data, but never does it “Learn” from this. We(mostly humans, at-least as of 2017 😛 ) use the validation set results and update higher level hyperparameters. So the validation set in a way affects a model, but indirectly.  Test Dataset Test Dataset: The sample of data used to provide an unbiased evaluation of a final model fit on the training dataset.  The Test dataset provides the gold standard used to evaluate the model. It is only used once a model is completely trained(using the train and validation sets). The test set is generally what is used to evaluate competing models (For example on many Kaggle competitions, the validation set is released initially along with the training set and the actual test set is only released when the competition is about to close, and it is the result of the the model on the Test set that decides the winner). Many a times the validation set is used as the test set, but it is not good practice. The test set is generally well curated. It contains carefully sampled data that spans the various classes that the model would face, when used in the real world.  I Would like to say this: **Taking this into account, we still need the TEST split in order to have a good assement of our model. Otherwise we’re only training and adjusting parameters but never take the model to the battle field **


I know that this question has posted few times before but I have a different problem than those one and those answers seem not to work on me. I have installed PyCharm Community 4 few weeks ago, and now I bought a student license (which is free of charge). I now want to install PyCharm Professional by deleting the Community version.  Problem is I don't have a separate directory in which I extracted the PyCharm community. I somehow have managed to install it. When I wrote PyCharm in dash home, I am able to execute the program. But for the professional version, case is different.  When I run the sudo ./pycharm.sh it doesn't install like it installed Community version. Every time I run pycharm.sh it asks me my license information, which is not permanent. And Professional PyCharm doesn't appear in dash home.  How can I permanently remove Community version and can install professional like I wanted?

I have installed Pycharm on Ubuntu 14.04 using  useful guide. However the installation is the Community one and I'd like to get the Pro version for which I have a licence.   Is there any way to upgrade or is it a case of uninstall and then follow  guide which is much more hassle, but compatible with the download available at the Jetbrains site.


I'm parsing timestamp of event in a log record – 2020-08-09T03:37:33.358874554Z. It looks strange to me and I don't know how correct is it. I don'think that 358874554 describe. I'm trying to parse this example from Python 3.7 like this: dt.datetime.strptime('2020-08-09T03:37:33.358874554Z', "%Y-%m-%dT%H:%M:%S.%fZ")  It generates an error: ValueError: time data '2020-08-09T03:37:33.358874554Z' does not match format '%Y-%m-%dT%H:%M:%S.%fZ'  How to parse such a datetime correctly? Is this datetime example in log is correct (in terms of ISO or anything)?

I need to parse  strings like "2008-09-03T20:56:35.450686Z" into Python's datetime type.  I have found  in the Python standard library, but it is not very convenient.  What is the best way to do this?


Could not install Java 8 on my ubuntu server 18.04 :  sudo add-apt-repository ppa:webupd8team/java sudo apt update sudo apt install oracle-java8-installer  Reading package lists... Done Building dependency tree        Reading state information... Done Package oracle-java8-installer is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'oracle-java8-installer' has no installation candidate   How to install Java ?

I have been trying to install the latest version of java-8. However, I found out that the  due to changes in the java licence.  How should I update my java to 8.0_201 or 8.0_211 now?  Thanks!


I noticed that new posted questions get attention very quickly. If I take some time to read the replies and try myself, new questions often arise. When I edit my original post to add my new questions, I find the updated post is very hard to get attention again, like in .  How should I deal with it? The best way I can think of is to open a new post with my new questions, and if necessary there will be a link to my old post.

I asked a question almost as soon as I got my account. I got a few decent answers, but none of them helped solve my problem. The question has long since become buried by newer questions, and there's still no accepted answer. Unfortunately, because there are quite a few answers with votes, to a casual observer it probably looks like the question was answered and I just neglected to mark an answer as accepted, and the system does not consider it "unanswered".  Or, I asked a question that was a bit more difficult to answer. After waiting for some time, I received no answers, little or no comments, and only a few views. The question does show up in the "unanswered" list, but no one has answered my question.  In either case, what's the protocol for me to try to get this question answered?  I see several options:   Post the question a second time, possibly linking to the original, to get attention for the original question. This is encouraged on sites like Reddit.  However, it's probably not appropriate here, since we're encouraged to check for duplicates and not submit a question that's already been asked by someone else, so this probably falls under that heading. Wait for some kind of wiki-like talk page to be implemented, then post a plea on the talk page for input and hope that activity on the talk page bumps up the question. Edit the question, but do nothing further on the Stack Exchange site. If I edit my post to say that I haven't accepted any of the current answers but am looking for more, then the question might get answered eventually by people browsing through old questions to find something they can answer. Post the question on other sites, but link to my original question on Stack Exchange. People will either answer here, or they'll answer on the other site and I can post the accepted answer here myself.  This might be considered spamming, so it might be better to do this without the link.      For more information, see the "" page in the .


My current machine is a Aftershock 65xHP [Intel Core i7-7700HQ] Running on Intel(R) HD Graphics 630 on a Clevo motherboard. I also have an NVIDIA Geforce GTX 1060 graphics card.  I tried a few versions of Intel(R) HD Graphics 630 drivers and all of them prevent my Laptop LCD screen from working. (I had to connect to an external monitor via HDMI to view my screen)  only 1 version of this graphics driver worked for me.  that is - 25.20.100.6519 - dated 1/9/2019 by Intel [See image - ]  every now and then, windows update will update this driver and my LCD screen will stop working. All other solutions such as rolling back a driver will not work if I'm away from an external monitor; isn't the point of owning a laptop being able to work without an external monitor?  Can someone offer a solution to stop this update?

Is there a way we can disable automatic driver update for a specific device in Windows 10? The updated driver for that device (Intel Management Engine Interface 11.x in particular) causes problems on some laptops during. The version 9.x works perfect.  I don't want to disable automatic driver installation for all devices.


I made a silly typo , but beside that the code works and might be helpful. Better delete the question, auto answer or vote to close it?

Should questions where a problem arose from a typo be closed?  Here is a recent example:    The problem was a misspelled _gaq (written as _gat).   Should these be closed? Surely they're of no use to anyone once the OP recognizes the mistake. If so, what justification should be given? Not a real question? Too localized?     Just to be clear, the question linked above actually was not broken due to a typo. This was my mistake, and raises some other interesting questions. See the discussion below.  If anyone feels like editing this question with examples of actual typo questions, go for it.


Do I have to buy minecraft to get a new account on a PC that already has minecraft installed? I am teetering on and off on this question. Searched the web probably 1,000,000,000 times but can't find this specific question's answers.

My son got MineCraft PC for his birthday.  The account is under my e-mail and he has a name in the game (my terminology may be off as i do not play the game).  My other son would also like to play MineCraft, but have his own name (character???).  Can that be done?  It doesn't seem logical that I'd have to download 2 Minecraft games.  Please let me know how this works.


I have installed Ubuntu using Crouton and this is the only way I have found. But I would like to have a 100% Ubuntu computer so I can upgrade it with no problems. Has anybody have a link or something where I can find this information?

I have installed Ubuntu 13.04 on my desktop (runs like a charm). Then I used Crouton to install Ubuntu 12. 04 on my chromebook samsung (ARM). It also works quite well.  Here comes my question. Can we have a true Ubuntu (preferably 13.04) on my ARM chromebook?  It seems that the Crouton/Ubuntu is not 100% the real thing.  The best option would be to have the full Ubuntu 13.04 and remove the Chrome OS.


My friend lives in a different country but I want to send them a Google Play voucher or send the redeem code via Facebook.  Would the redeem code work if she lives in a different country and our currency differs?

I recently found out that there are now Google Play gift cards. Something I've been looking forward to. The downer? It's not available for sale at my country (Philippines). So I want to know, if I get a friend from the US buy a card for me and send me the card code, will I be able to use it on my account that is based in the Philippines? I'm asking this because when I tried going to the , it said it's unavailable for my country and thus, didn't provide me with any way to enter a redeem code.  What I have in mind is I would TeamView my friend's PC on the US and log-in my account there then I will top-up my Google Play account that way. The question is, will it work? I mean, won't it detect that I was logging in from the Philippines just awhile ago? I wouldn't want to waste money with buying a gift card if it won't be usable anyway. My friend is an iOS user so I can't just sell it to him either.


So, I just deleted the XP partition on my hard-drive, and now have 30 Gb of extra space. But that space isnt being used by my Ubuntu file-system, and I'm getting warnings that there is only about 200 Mb of space left, even though I have the empty 300 gb partition  So, my question is how do I connect the two partitions and allow Ubuntu to use the 30gb?

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


I entered the USA on a three month visa waiver program from Australia. I am about to return to  Australia and would like to come back again to the USA. How long do I have to wait until I can re-enter the USA for another 3 months?

I am currently visiting the USA from the UK (I am a UK citizen) and am intending on staying here for the full 90 days under the Visa Waiver Program.     How long would I have to stay out of the US at the end of this period before returning again?    Would I have to return to the UK, or could I stay with friends in another country (such as Canada) for a while?


I was told there is an SQL injection vulnerability in the PHP script that matches 'login' and 'pass' from a backend DB.      Edit: Removed code for confidentiality.

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


Here is the question   I'm not sure how to proceed with this question. An idea that I have is that I assume that geodisic from l to m is perpendicular to one of the geodisics, then I have to show that the other geodisic is parallel but not sure if that's the right way to proceed and the steps involved. I'd appreciate a hint or any help in proceeding with this.

Let $p < q < r < s$ be real numbers. Let $l$ be the geodesic with endpoints at $p$ and $q$ and let $m$ be the geodesic with endpoints at $r$ and $s$. (a) Prove that there is a unique geodesic segment from $l$ to $m$ that is perpendicular to both. (We sometimes say $l$ and $m$ are ultraparallel since they are not only parallel but they do not share endpoints also.)  (b) Now suppose $p < q < r$ are real numbers and $l$ is a geodesic whose endpoints are $p$ and $q$ and $m$ is a geodesic whose endpoints are $q$ and $r$. Then $l$ and $m$ are parallel, but prove that there is not geodesic segment from $m$ to $l$ that is perpendicular to both. That is, unlike the ultraparallel case, there are no points on $l$ and $m$ that realize the shortest distance from $l$ to $m$.


I have a following wrapper class: public  with sharing class HistoryRecordWrapper { Id CreatedById; Datetime CreatedDate; Object Field; Object NewValue; Object OldValue;  public HistoryRecordWrapper(AccountHistory accHistory) {     CreatedById = accHistory.CreatedById;     CreatedDate = accHistory.CreatedDate;     Field = accHistory.Field;     if(accHistory.NewValue != null || accHistory.NewValue != '') {         NewValue = accHistory.NewValue;     }     if(accHistory.OldValue != null || accHistory.OldValue != '') {         OldValue =  accHistory.OldValue;     } }  public HistoryRecordWrapper(ContactHistory conHistory) {     CreatedById = conHistory.CreatedById;     CreatedDate = conHistory.CreatedDate;     Field = conHistory.Field;     if(conHistory.NewValue != null || conHistory.NewValue != '') {         NewValue =  conHistory.NewValue;     }     if(conHistory.OldValue != null || conHistory.OldValue != '') {         OldValue = conHistory.OldValue;     } }  } Also, I have another class that can combine contact and account history records and that returns list of combined history records. public with sharing class HistoryRecordsHandler {  public static List<HistoryRecordWrapper> getAccountAndContactHistoryRecords(Id accId) {     List<HistoryRecordWrapper> hrws = new List<HistoryRecordWrapper>();      List<AccountHistory> accHis = [SELECT AccountId, CreatedById, CreatedDate, Field, DataType, IsDeleted, NewValue, OldValue FROM AccountHistory WHERE AccountId = :accId];     List<ContactHistory> conHis = [         SELECT ContactId, CreatedById, CreatedDate, Field, DataType, IsDeleted, NewValue, OldValue         FROM ContactHistory         WHERE Contact.AccountId = :accId     ];          if (!conHis.isEmpty()) {         for (ContactHistory conHi : conHis) {             HistoryRecordWrapper crs = new HistoryRecordWrapper(conHi);             hrws.add(crs);         }     }      if (!accHis.isEmpty()) {         for (AccountHistory accHi : accHis) {             HistoryRecordWrapper hrs = new HistoryRecordWrapper(accHi);             hrws.add(hrs);         }     }      return hrws; }  } How can I sort hrws list based on CreatedDate (record that got edited last should be first in the list)?

I have a wrapper class which contains a list of sobjects, i want to have th sorting on the fields of these objects in the wrapper list: The apex code is as follows:  Class jobsWrapper {     public JobSuite__Job__c job { get; set; }     public JobSuite__Job_Task__c jobTasks { get; set; }      public JobsWrapper(JobSuite__Job__c objjobs, JobSuite__Job_Task__c objjobTasks) {         // if(jobTasks== NULL){jobTasks = new List<Job_Task__c>();}         job = objjobs;         jobTasks = objjobTasks;      }      public JobsWrapper() {         if(jobTasks== NULL) {             jobTasks = new JobSuite__Job_Task__c();         }          if(job == NULL) {             job = new JobSuite__Job__c();         }             } }   I want to allow sorting the wrapper list by the fields in the job - like client, jobname, jobnumber etc and fields from the task object as taskname, reviseddue dateetc.  How can I do this? Please help, thanks in advance.


This is a first for me. I've been having trouble upgrading Ubuntu 12.04. How do I fix this?  sudo apt-get upgrade:  Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 3 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? y Setting up linux-image-3.8.0-42-generic (3.8.0-42.62~precise1) ... Running depmod. update-initramfs: deferring update (hook will be called later) The link /initrd.img is a dangling linkto /boot/initrd.img-3.8.0-42-generic Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.8.0-42-generic /boot/vmlinuz-3.8.0-42-generic run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.8.0-42-generic /boot/vmlinuz-3.8.0-42-generic update-initramfs: Generating /boot/initrd.img-3.8.0-42-generic  gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-3.8.0-42-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.8.0-42-generic.postinst line 1010. dpkg: error processing linux-image-3.8.0-42-generic (--configure):  subprocess installed post-installation script returned error exit status 2 No apport report written because MaxReports is reached already                                                               dpkg: dependency problems prevent configuration of linux-image-generic-lts-raring:  linux-image-generic-lts-raring depends on linux-image-3.8.0-42-generic; however:   Package linux-image-3.8.0-42-generic is not configured yet. dpkg: error processing linux-image-generic-lts-raring (--configure):  dependency problems - leaving unconfigured No apport report written because MaxReports is reached already                                                               dpkg: dependency problems prevent configuration of linux-generic-lts-raring:  linux-generic-lts-raring depends on linux-image-generic-lts-raring; however:   Package linux-image-generic-lts-raring is not configured yet. dpkg: error processing linux-generic-lts-raring (--configure):  dependency problems - leaving unconfigured No apport report written because MaxReports is reached already                                                               Errors were encountered while processing:  linux-image-3.8.0-42-generic  linux-image-generic-lts-raring  linux-generic-lts-raring E: Sub-process /usr/bin/dpkg returned an error code (1)   I have over 2TB of space remaining on the hard drive. I don't understand:   gzip: stdout: No space left on device  MaxReports is reached already

My /boot partition is nearly full and I get a warning every time I reboot my system. I already deleted old kernel packages (linux-headers...), actually I did that to install a newer kernel version that came with the automatic updates.  After installing that new version, the partition is nearly full again. So what else can I delete? Are there some other files associated to the old kernel images?  Here is a list of files that are on my /boot partition:  :~$ ls /boot/ abi-2.6.31-21-generic         lost+found abi-2.6.32-25-generic         memtest86+.bin abi-2.6.38-10-generic         memtest86+_multiboot.bin abi-2.6.38-11-generic         System.map-2.6.31-21-generic abi-2.6.38-12-generic         System.map-2.6.32-25-generic abi-2.6.38-8-generic          System.map-2.6.38-10-generic abi-3.0.0-12-generic          System.map-2.6.38-11-generic abi-3.0.0-13-generic          System.map-2.6.38-12-generic abi-3.0.0-14-generic          System.map-2.6.38-8-generic boot                          System.map-3.0.0-12-generic config-2.6.31-21-generic      System.map-3.0.0-13-generic config-2.6.32-25-generic      System.map-3.0.0-14-generic config-2.6.38-10-generic      vmcoreinfo-2.6.31-21-generic config-2.6.38-11-generic      vmcoreinfo-2.6.32-25-generic config-2.6.38-12-generic      vmcoreinfo-2.6.38-10-generic config-2.6.38-8-generic       vmcoreinfo-2.6.38-11-generic config-3.0.0-12-generic       vmcoreinfo-2.6.38-12-generic config-3.0.0-13-generic       vmcoreinfo-2.6.38-8-generic config-3.0.0-14-generic       vmcoreinfo-3.0.0-12-generic extlinux                      vmcoreinfo-3.0.0-13-generic grub                          vmcoreinfo-3.0.0-14-generic initrd.img-2.6.31-21-generic  vmlinuz-2.6.31-21-generic initrd.img-2.6.32-25-generic  vmlinuz-2.6.32-25-generic initrd.img-2.6.38-10-generic  vmlinuz-2.6.38-10-generic initrd.img-2.6.38-11-generic  vmlinuz-2.6.38-11-generic initrd.img-2.6.38-12-generic  vmlinuz-2.6.38-12-generic initrd.img-2.6.38-8-generic   vmlinuz-2.6.38-8-generic initrd.img-3.0.0-12-generic   vmlinuz-3.0.0-12-generic initrd.img-3.0.0-13-generic   vmlinuz-3.0.0-13-generic initrd.img-3.0.0-14-generic   vmlinuz-3.0.0-14-generic   Currently, I'm using the 3.0.0-14-generic kernel.


is it currently possible to enter sweden for a non EU / EEA citizen with a UK work permit visa? this is for a short holiday. edit: the type of visa is a work permit / residence visa, not a temporary visa as referenced in other questions. i.e. the person is living and working in the uk, and has a visa sponsored by their employer in the UK

I'm a UK passport holder; my wife isn't. We don't live in UK. If she gets a UK visit visa, does this entitle her to travel to the Schengen area or do I need to get her a separate Schengen visa?


Is it only necessary a human consciousness? A measurement device? Can it be said that any of them cause the wave function collapse?

My question is not about (pseudo) philosophical debate; it concerns mathematical operations and experimental facts.  What is an observer? What are the conditions required to be qualified of observer, both mathematically and experimentally?


Hi I have written a GSP and Javascript code to perform on click remove file functionality.  JavaScript code   function remove(attachmentId) {     $(document).ready(function(){             $('.glyphicon-remove').click ( function(e){                 e.preventDefault();                 $(this).parent().parent().remove();                  $.ajax({                            url: "${g.createLink(controller: "landing", action: "deleteSelectedFile")}",                             data: {                                     attachmentId: attachmentId                             },                             success: function(data){                                     alert("Success");                             }                         });                   });             });          }   GSP Code                  <g:each in="${fileList}" var="file">
                                                                             ${file.name}

                 </g:each>   Groovy Code   def deleteSelectedFile() {         String attachmentId= params.attachmentId         activitiService.deleteAttachemnt(attachmentId)     }   I am not getting why exactly it is taking double click for deleting the first record.   Please help me.  Note: Application is running in Internet Explorer.

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I have been working on some code for a while. And I had a question: What's the difference among casting, parsing and converting? And when we can use them?

In Jesse Liberty's Learning C# book, he says "Objects of one type can be converted into objects of another type. This is called casting."  If you investigate the IL generated from the code below, you can clearly see that the casted assignment isn't doing the same thing as the converted assignment. In the former, you can see the boxing/unboxing occurring; in the latter you can see a call to a convert method.   I know in the end it may be just a silly  semantic difference--but is casting just another word for converting. I don't mean to be snarky, but I'm not interested in anyone's gut feeling on this--opinions don't count here! Can anyone point to a definitive reference that confirms or denies if casting and converting are the same thing?      object x;     int y;      x = 4;      y = ( int )x;      y = Convert.ToInt32( x );   Thank you  rp  Note added after Matt's comment about explicit/implicit:  I don't think implicit/explicit is the difference. In the code I posted, the change is explicit in both cases. An implicit conversion is what occurs when you assign a short to an int.  Note to Sklivvz:  I wanted confirmation that my suspicion of the looseness of Jesse Liberty's (otherwise usually lucid and clear) language was correct. I thought that Jesse Liberty was being a little loose with his language. I understand that casting is routed in object hierarchy--i.e., you can't cast from an integer to a string but you could cast from custom exception derived from System.Exception to a System.Exception.   It's interesting, though, that when you do try to cast from an int to a string the compiler tells you that it couldn't "convert" the value. Maybe Jesse is more correct than I thought!


While I intend to change the font of only a line in the document using one of the fonts presented in the LaTeX Font Catalogue () (for example, concmath: ), but the font of the whole of document will be changed.  I do as follows:  \usepackage{concmath} \usepackage[T1]{fontenc} \newenvironment{concmath}{\fontfamily{concmath}\selectfont}{\par}  \begin{document}      The font of this text must be remained as it is by default.     \begin{concmath}             I want to change only the font of this line using one of the fonts in The LaTeX Font Catalogue.     \end{concmath}     The font of this text must be remained as it is by default.  \end{document}   P.S. I am using LNCS as template and TeXstudio as editor.

The standard font packages make global changes to the fonts in my document. What if I want to use a particular font for just a portion of my text?   How do I find the right name of the font? How do I select the font? How do I restrict the scope of the font change?     There are separate answers for different flavors of TeX (quick links):


Whenever I go to the applications view I now see two separate taskbars. My Dash to Dock and some other one. Idk if it is Ubuntu dock, but when I went to GNOME Tweaks, that extension appeared to be off.    Is there a terminal command I could do to fix this. Ubuntu 18.04.2 LTS.

What's going on here? I've installed the  on Ubuntu 17.10. Everything was cool, and as I was trying to hone and tweak the look of my desktop, at some point the shortcuts bar (dock?) on the left is duplicated.  (Click image to enlarge) The default, which normally disappears with Dash to Dock, is there underneath the one that usually shows up when I install Dash to Dock. Why? I've tried to go through the options for Dash to Dock, the GNOME Tweak Tool, and the regular Ubuntu settings, but I can't figure it out.


I'd like to find all xml files containing 'foo', but not containing 'bar'. The command I've put together looks like this:  find -iname "*.xml" -print0 |   xargs -0 grep -FlisZ "foo" |   xargs -0 grep -Flisv "bar"   However the final grep command doesn't seem to exclude files that contain 'bar'. Have I chained the commands correctly?  p.s. I know this can be written in many different ways (and probably a single grep command). However I'm interested in why my chaining is broken.  p.p.s The filenames contains spaces (hence the -print0 in find, the -0 in xargs and the -Z in grep)

What concise command can I use to find all files that do NOT contain a text string?  I tried this (using -v to invert grep's parameters) with no luck:  find . -exec grep -v -l shared.php {} \;   Someone said this would work:  find . ! -exec grep -l shared.php {} \;   But it does not seem to work for me.   has this example:  find ./logs -size +1c  > t._tmp while read filename do      grep -q "Process Complete" $filename      if [ $? -ne 0 ] ; then              echo $filename      fi done < t._tmp rm -f t_tmp   But that's cumbersome and not at all concise.  ps: I know that grep -L * will do this, but how can I use the find command in combination with grep to excluded files is what I really want to know.  pss: Also I'm not sure how to have grep include subdirectories with the grep -L * syntax, but I still want to know how to use it with find :)


The or statement in the first line of my if statement is not working as i would expect it to, any suggestions?  if(answer == "deposit" || "Deposit"){         System.out.println("How much would you like to deposit?");         final int deposit = console.readInt();         account.deposit(deposit);         System.out.println( "This leaves you with $" + formatter.format(account.getBalance()) + " in your account");     }else if(answer == "Check Balance"){         System.out.println( "You have $" + formatter.format(account.getBalance()) + " in your account");     }else if(answer == "Withdraw"){         System.out.println("How much would you like to take out?");         final int with = console.readInt();         account.withdraw(with);         System.out.println( "This leaves you with $" + formatter.format(account.getBalance()) + " in your account");     }else{         System.out.println("You didn't enter a correct term, please try again.");     }

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 make an animation of a blob of ink flowing down and then shaping into text. What js libraries can I use. On my research the only way i could find to do this was SVG with GSAP js library. Is there any other  way to do it. Thanks

I have a couple of illustrations done in Illustrator and I am planing to animate it for a website that I am working on, I've heard of  toolkit with flash, but is it the best way to go or is there another "better" way of doing it?  Here's an example of the kind of animations I am aiming for:


What is the back-propagation algorithm and how does it work?

I got a slight confusion on the  algorithm used in  (MLP).  The error is adjusted by the cost function. In backpropagation, we are trying to adjust the weight of the hidden layers. The output error I can understand, that is, e = d - y [Without the subscripts].  The questions are:   How does one get the error of hidden layer? How does one calculate it? If I backpropagate it, should I use it as a cost function of an adaptive filter or should I use a pointer (in C/C++) programming sense, to update the weight?


I need to include animate package in my text. When I tried that, I got an error:     LaTeX Error: File `l3backend-pdfmode.def' not found.   So after that I also inserted package l3backend into my preamble, which is:  \documentclass{beamer} \usepackage{l3backend} \usepackage{amsmath}% \usepackage{amsfonts}% \usepackage{amssymb}% \usepackage{yfonts} \usepackage{mathtools} \usepackage{mdwlist} \usepackage{stackengine} \usepackage{pdfpages} \usepackage{graphicx} \usepackage{bibentry} \usepackage{booktabs} \usepackage{animate}   but it still does not work, I have the same error:     ! LaTeX Error: File `l3backend.sty' not found.   Please can anybody help me? I am working in Texmaker, using the most recent version 5.0.4.

I updated my TeXlive distribution a couple times in the past week, and now I get this error when I include package expl3 (or any other package that includes it, such as fontspec). Before the updates it was working fine. Am I missing any package that should be installed? I tried searching for l3backend-pdfmode.def, but I found no results.  \documentclass{article} \usepackage{expl3} \begin{document} Hi \end{document}   λ lualatex a This is LuaTeX, Version 1.10.0 (TeX Live 2019)   restricted system commands enabled. (./a.tex LaTeX2e <2018-12-01>  luaotfload | main : initialization completed in 0.042 seconds (/opt/texlive/2019/texmf-dist/tex/latex/base/article.cls Document Class: article 2018/09/03 v1.4i Standard LaTeX document class (/opt/texlive/2019/texmf-dist/tex/latex/base/size10.clo)) (/opt/texlive/2019/texmf-dist/tex/latex/l3kernel/expl3.sty (/opt/texlive/2019/texmf-dist/tex/latex/l3kernel/expl3-code.tex)  ! LaTeX Error: File `l3backend-pdfmode.def' not found.  Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: def)  Enter file name:  ! Emergency stop. <read *>   l.282   }   379 words of node memory still in use:    2 hlist, 1 rule, 1 dir, 3 kern, 1 glyph, 4 attribute, 48 glue_spec, 4 attrib ute_list, 1 write nodes    avail lists: 2:9,3:3,4:1,5:2,7:2,9:2 !  ==> Fatal error occurred, no output PDF file produced! Transcript written on a.log.


I am running into below error at line tblSoftwareImageTestPlan.SoftwareImageTestPlanID = SoftwareImageTestPlanData.SoftwareImageTestPlanID,how can I fix this error?  public List<SoftwareImageTestPlan>  AddSoftwareImageRecord(IEnumerable<SoftwareImageTestPlan> SoftwareImageTestPlans_WithParticularSoftwareImageID) {     tblSoftwareImageTestPlan SoftwareImageTestPlan = new tblSoftwareImageTestPlan();      foreach (var SoftwareImageTestPlanData in SoftwareImageTestPlans_WithParticularSoftwareImageID)     {         tblSoftwareImageTestPlan.SoftwareImageTestPlanID = SoftwareImageTestPlanData.SoftwareImageTestPlanID;//error at line     }      return null; }   Error:     An object reference is required for the non-static field,method,or property 'tblSoftwareImageTestPlan.SoftwareImageTestPlanID'

Consider:  namespace WindowsApplication1 {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }          private void button1_Click(object sender, EventArgs e)         {             //int[] val = { 0, 0};             int val;             if (textBox1.Text == "")             {                 MessageBox.Show("Input any no");             }             else             {                 val = Convert.ToInt32(textBox1.Text);                 Thread ot1 = new Thread(new ParameterizedThreadStart(SumData));                 ot1.Start(val);             }         }          private static void ReadData(object state)         {             System.Windows.Forms.Application.Run();         }          void setTextboxText(int result)         {             if (this.InvokeRequired)             {                 this.Invoke(new IntDelegate(SetTextboxTextSafe), new object[] { result });             }             else             {                 SetTextboxTextSafe(result);             }         }          void SetTextboxTextSafe(int result)         {             label1.Text = result.ToString();         }          private static void SumData(object state)         {             int result;             //int[] icount = (int[])state;             int icount = (int)state;              for (int i = icount; i > 0; i--)             {                 result += i;                 System.Threading.Thread.Sleep(1000);             }             setTextboxText(result);         }          delegate void IntDelegate(int result);          private void button2_Click(object sender, EventArgs e)         {             Application.Exit();         }     } }   Why is this error occurring?     An object reference is required for the nonstatic field, method, or property 'WindowsApplication1.Form1.setTextboxText(int)


I'm working with LeapMotion. I have this code in my main class:  public void onFrame(Controller controller) {     Frame frame = controller.frame();     GestoPistola gesto;      if (!frame.hands().isEmpty())      {         System.out.println("ENTER");         gesto.reconocer(frame);     } … }   And then, this is the class GestoPistola, which is the one that has to make all the job.      public class GestoPistola {        public enum ESTADO{            DESCARGADA, CARGADA        }         ESTADO _estado;         public void GestoPistola(){            _estado = ESTADO.DESCARGADA;        }         public void reconocer(Frame f)        {            System.out.println("LET'S START");             if (!f.hands().isEmpty()) {                System.out.println("Hay mano");                Hand hand = f.hands().get(0);                FingerList fingers = hand.fingers();                 switch(_estado)                {                      …                }            }         }    }   So, the consol shows "ENTER", but never "LET'START".  I know it's a really simple question, but I'm not such an expert with JAVA.  Hope someone can help me!

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?


w command displays useful information about where users come from and what are they doing.  A example of its output is:   ~ $ w -V  procps version 3.2.8  ~ $ w  13:53:14 up 164 days,  3:12,  5 users,  load average: 0.00, 0.01, 0.00 USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT root     tty1     -                06Aug13 56:38   0.11s  0.11s -bash amp      pts/0    a89-153-189-213. 11:30   17.00s  0.13s  0.13s -bash rafael   pts/4    gwec.di.uminho.p 11:59    0.00s  0.80s  0.00s w   But this output truncates the hostname in the "FROM" field, is there a way yo discover the entire hostname/IP address?

Sorry my knowledge of Linux bash commands is pretty basic, I've been searching for a while but I'm not 100% sure what I need to search for.  I was wondering if there's a way to grab the current logged in users remote host name in a Linux bash script? I have a script in which I need to log each time a user runs it. I'm obtaining the date like so:  cdat=`/bin/date +%a' '%d' '%h' '%Y', '%H':'%M`;   I now need to add the users remote host (not the username they logged in with). I'm not 100% sure I'm using the right terminology here either, just to clarify; by 'remote host name' I mean the same output that prints on the screen on most servers I've logged into over ssh, for example:  Last login: Mon Jul 22 16:35:09 2013 from win7-i7-stuart.my.domain.com   I'm looking for the win7-i7-stuart.my.domain.com bit.


Is this sentence formal?      If I was given more time, I would have less pressure   Why do we use "I was" rather than "I were"?

If I was... If I were...   When is it correct to use "If I was" vs. "If I were" in standard English?


I read that Alan Guth used phase transition model of early universe to dilute the monopole so that nowadays we don't get to see any of them? I know there is no monopole in nature but I am interested to know how the inflation upset the grand symmetry?

Cosmological Inflation was proposed by Alan Guth to explain the flatness problem, the horizon problem and the magnetic monopole problem. I think I pretty much understand the first two, however I don't quite understand how a period of exponential expansion fully explains monopole problem.   From Weinburg's Cosmology, the issue is essentially that various grand unified theories predict that the standard models $SU(3)\times SU(2)\times U(1)$ arose from the breaking of an original simple symmetry group. For many of these theories, a crazy particle known as a "magnetic monopole" is created at a certain energy (sometimes quoted at around $M = 10^{16} GeV$). So my question is why does a period of rapid expansion somehow or other result in a low density of magnetic monopoles (assuming they exist/existed at all)?   I would think, like in nucleosynthesis, that the primary factor in monopole creation is energy density, and since inflation is still a "smooth" process, at some point the universe would hit the proper energy density to create magnetic monopoles. How does the rate of expansion at the time they were created effect overall present density?


Need help to understand the output of ls -l command. I created one file testa in my home directory. When I run the ls -l command it shows up with two similar names. What does the symbol (~) mean with the file "testa". Below is the sample output:  testa testa~

In Windows, I believe that files with a tilde in the file name represent files that are currently open in an application. For example, Microsoft Word creates a file with almost the same name as the file you currently have open, but with a tilde in the name. It's icon is also partially faded. As far as I'm aware, this signifies a temporary file that exists   in case the application crashes and you didn't get a chance to save your file, or to allow the original file to remain unlocked by the file system and accessible to other applications.   In Linux, I ran into a *.log file with a tilde at the end of the file name (scan.log~). Does that mean the log file is currently open in another application that is potentially writing to it?


I have a project which aggregates public information on companies, startups, founders etc. for a total of >2 million tracked entities worldwide. Yes, every single page is high quality, manually curated and vetted as much as possible to provide the best value to the customer. Trouble is, google is only crawling my website at the rate of 300 pages/day. That's 109.5K pages per year. At this rate, Google will never index my entire website. To reiterate, I have over 2 million pages I'd like to get indexed. Here's what I've done so far:  Squeezed out every bit of performance, so that Googlebot has more 'compute quota' to spend on my site Ensured high quality SEO to signal that yes this is a good website google, come and crawl please. Ensured high user value, again, I've made sure it is a good website that provides a valuable service and I'm seeing high CTRs/low bounce rates even at positions of 15+.  My website is two months, and only about 15k pages are indexed till now. I know this problem can be solved. If you google any of these: site:crunchbase.com site:owler.com site:zoominfo.com (which are my competitors), they have literally tens of millions of pages indexed. Forget competing, right now I'm just fighting for a seat at the table. How to increase my indexing rate? I need something far higher than 300 pages/day, as much as possible really. (For reference, 100k pages/day would still take 20 days to scan my whole website) (P.S: If anyone wants, I can link to the website here)

We are currently developing a site that currently has 8 million unique pages that will grow to about 20 million right away, and eventually to about 50 million or more.  Before you criticize... Yes, it provides unique, useful content. We continually process raw data from public records and by doing some data scrubbing, entity rollups, and relationship mapping, we've been able to generate quality content, developing a site that's quite useful and also unique, in part due to the breadth of the data.  It's PR is 0 (new domain, no links), and we're getting spidered at a rate of about 500 pages per day, putting us at about 30,000 pages indexed thus far. At this rate, it would take over 400 years to index all of our data.  I have two questions:   Is the rate of the indexing directly correlated to PR, and by that I mean is it correlated enough that by purchasing an old domain with good PR will get us to a workable indexing rate (in the neighborhood of 100,000 pages per day). Are there any SEO consultants who specialize in aiding the indexing process itself. We're otherwise doing very well with SEO, on-page especially, besides, the competition for our "long-tail" keyword phrases is pretty low, so our success hinges mostly on the number of pages indexed.   Our main competitor has achieved approx 20MM pages indexed in just over one year's time, along with an Alexa 2000-ish ranking.  Noteworthy qualities we have in place:   page download speed is pretty good (250-500 ms) no errors (no 404 or 500 errors when getting spidered) we use Google webmaster tools and login daily friendly URLs in place I'm afraid to submit sitemaps. Some SEO community postings suggest a new site with millions of pages and no PR is suspicious. There is a , too, in order to avoid increased scrutiny (at approx 2:30 in the video).      Clickable site links deliver all pages, no more than four pages deep and typically no more than 250(-ish) internal links on a page. Anchor text for internal links is logical and adds relevance hierarchically to the data on the detail pages. We had previously set the crawl rate to the highest on webmaster tools (only about a page every two seconds, max). I recently turned it back to "let Google decide" which is what is advised.


I am trying to install gcc (in order to install postGIS later), but i have the folowing problem (you can see in the picture). Can anyone help?

After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


I am learning a bit of .NET and handlebars, need some help figuring out how to deal with JSON date parsing in this case:  Method in my controller      public JsonResult stats()     {         IQueryable<EnrollmentDateGroup> data = from student in db.Students              group student by student.EnrollmentDate into dateGroup              select new EnrollmentDateGroup()                {                   EnrollmentDate = dateGroup.Key,                   StudentCount = dateGroup.Count()                };          return Json(data.ToList());     }   Template using handlebars             JavaScript             and my result coming from DB into data is a list of /Date(1125547200000)/  How can I parse this date to real date?

I'm taking my first crack at  with jQuery. I'm getting my data onto my page, but I'm having some trouble with the JSON data that is returned for Date data types. Basically, I'm getting a string back that looks like this:  /Date(1224043200000)/   From someone totally new to JSON - How do I format this to a short date format? Should this be handled somewhere in the jQuery code? I've tried the jQuery.UI.datepicker plugin using $.datepicker.formatDate() without any success.  FYI: Here's the solution I came up with using a combination of the answers here:  function getMismatch(id) {   $.getJSON("Main.aspx?Callback=GetMismatch",     { MismatchId: id },      function (result) {       $("#AuthMerchId").text(result.AuthorizationMerchantId);       $("#SttlMerchId").text(result.SettlementMerchantId);       $("#CreateDate").text(formatJSONDate(Date(result.AppendDts)));       $("#ExpireDate").text(formatJSONDate(Date(result.ExpiresDts)));       $("#LastUpdate").text(formatJSONDate(Date(result.LastUpdateDts)));       $("#LastUpdatedBy").text(result.LastUpdateNt);       $("#ProcessIn").text(result.ProcessIn);     }   );    return false; }  function formatJSONDate(jsonDate) {   var newDate = dateFormat(jsonDate, "mm/dd/yyyy");   return newDate; }   This solution got my object from the callback method and displayed the dates on the page properly using the date format library.


1GB memory, 90% free 70GB HDD 7200rpm, Intel Celeron (P) 330 2.66 GHz 533 FSB  installed Ubuntu 14.04.1 LTS 32 bit. It is slower than prior Windows XP 32bit OS.  what is wrong? may I improve performance?

What are your tips for improving overall system performance on ubuntu? Inspired by this  I realized that some default settings may be rather conservative on Ubuntu and that it's possible to tweak it with little or no risk if you wish to make it faster.  This is not meant to be application specific (e.g. make firefox load pages faster), but system wide.  Preferably 1 tip per answer, with enough detail for people to implement it.  A couple of mine would be:   Install  (via Software Center or sudo apt-get install preload); Change  value - "which controls the degree to which the kernel prefers to swap when it tries to free memory";   What are yours?  PS: Since this is not intended to have a unique answer but rather, several useful tips, I'm making this community wiki out-of-the-box.


I have a directory structure like this  file 1.ext1 file 1.ext2 file 1.ext3 file 2.temp.ext1 file 2.ext2 file 3.ext1   I want to create each subfolder and move each file name no matter what extension there  file 1\file 1.ext1 file 1\file 1.ext2 file 1\file 1.ext3 file 2\file 2.temp.ext1 file 2\file 2.ext2 file 3\file 3.ext1   any easy way to do it? thanks

I have some files with different extensions such as *.pdf, *.mp3, *.jpg and a few others. All of them are stored in a parent directory.  How can I get a list of all extensions, create some folders based on these  extensions and then move all files into their relevant folders?