Suppose $f \in L^1[a,b]$. Assume that $\lim_{h \to 0} \int_a^b \frac{1}{h}|f(x+h)-f(x)|\,dx =0$. I'm trying to show that there exists a constant $c$ such that $f(x) = c$ for a.e. $x \in (a, b)$. Given that only $f$ is integrable, I tried using dominated convergence theorem on this integral to try to pull the limit into the integral but I don't think that approach works. I'd appreciate any help on how to go about proving this.

Assume $f$ is Lebesgue measurable and bounded on $[0,1]$ and that $$\int_{0}^{1}\frac{|f(x+h)-f(x)|}{h}\;dx\to0\;\text{as}\;h\to0.$$ Show that $f$ is constant for almost every $x$ in $[0,1]$.  My question relates to my proposed proof below.  At no point did I rely on the boundedness of $f$ on $[0,1]$, only its measurability and so I suspect my reasoning is faulty and would appreciate somebody that could (in their answer) scrutinize and correct my proof.  (Proposed) Proof. Assume first that $h\to0^{+}$ and suppose that we may interchange the two limits.  Then since the difference quotients are non-negative, we conclude $f'(x)$ exists and is equal to $0$ for almost every $x$ in $[0,1]$, and the claim follows. (As pointed out, we don't necessarily know the limit of the integrands exists even when we assume the interchange is valid, although this is probably not difficult to reason one's way out of -- more damning is below.)  The goal quickly turns to justifying this interchange.  To that end, the presumed existence of the above limit implies that for any $0<M<\infty$ there is some positive real number $h(M)$ such that for any $h<h(M)$ we have $$\left|\int_{0}^{1}\frac{|f(x+h)-f(x)|}{h}\;dx\right|<M.$$ Since $m([0,1])=1$ (in particular, we are integrating over a set of finite measure) and the difference quotients are non-negative, we conclude that $$\frac{|f(x+h)-f(x)|}{h}<M\;\text{a.e.}\;x.$$ Since this bound is independent of $h$ once $h<h(M)$, it follows that at some point along the sequence each of the difference quotients is pointwise a.e. dominated by $M$, which is integrable on any set of finite measure.  Hence the interchange of limits discussed above is valid, and with the case of $h\to0^{-}$ being handled similarly, the claim is proved.   (As the comment points out, we cannot conclude anything about the upper (or lower) bound of a function based off the value of its integral, even if the integration is taken over a set of finite measure and the integrand in question is nonnegative; approximations to the identity serve or otherwise spikey functions on sets of small measure as counter-examples.)    Edit. Fatou's lemma implies $$\int_{0}^{1}\liminf_{h\to0}\frac{|f(x+h)-f(x)|}{h}\;dx\leq\lim_{h\to0}\int_{0}^{1}\frac{|f(x+h)-f(x)|}{h}\;dx=0.$$  Hence $$\liminf_{h\to0}\frac{|f(x+h)-f(x)|}{h}=0\;\text{a.e.}\;x.$$ (The $\liminf$ of course exists without further justification.)  We now need a way to obtain the same for $\limsup_{h\to0}\frac{|f(x+h)-f(x)|}{h}.$  This could be accomplished by showing the limit exists under the assumptions given, in which case the $\liminf$ is equal to the $\limsup$.  Any ideas how to execute this, or otherwise approach the problem?  I'm wondering too if my original argument above could be modified by taking into account the assumed boundedness of $f$ in order to exclude the possibility that its difference quotients form a "spikey" sequence of integrands.    Edit. Here is another approach I am considering by posting this question   Peter Tamaroff mentioned the type-writer sequence being a counter-example to the post linked.


AN external system for some reason sends a node in a JSON as a String instead of an array like below:  "vr_sch": "[{"type":"Record","tableName":"hpd","SId":"868","frequency":"ONCE"}]"   The Apex class which would be used to deserialize look like below( A small logic which would actually parse this node)    } else if (text == 'vr_sch') {          vrsch = arrayOfvrSchema(parser);   }  private static List<vrsch> arrayOfvrSchema(System.JSONParser parseObj) {     List<vrsch> res = new List<vrsch>();     if (parseObj.getCurrentToken() == null){         parseObj.nextToken();     }     while (parseObj.nextToken() != System.JSONToken.END_ARRAY) {         res.add(new vrsch(parseObj));     }     return res; }   The above code can only work if "vr_sch": "[{"type":"Record","tableName":"hpd","SId":"868","frequency":"ONCE"}]" is not a string but an array. How can I work around parsing this node as a an array. Any idea?

am trying to parse the below JSON request to Apex class. The challenge here is that one of the node "match" in the JSON is suppose to be an array but the external system sends it as a String. I would need to convert the string to array and parse it. The approach that I followed was to remove the double quotes for the match node and use JSOn2Apex heroku app -  to generate the response Apex class and use JSON.deserialize(jsonString, apexType) to deserialize the result.  {   "response": [     {       "tmodule": "trans",       "resultList": [         {           "output": [             {                "var1": 8119,               "var2": "Foundational",               "var3": "",               "match": "[{\"type\":\"Record\",\"tableName\":\"model_score\",\"AnId\":\"103708\",\"frequency\":\"Weekly\",\"Type\":\"trigger\",\"country\":\"Argentina,Australia,Austria,Canada,Finland,France,Germany,HongKong,India,Italy,Japan,Mexico,Netherlands,NewZealand,Singapore,Spain,Sweden,Taiwan,Thailand,UK,US\",\"fields\":[{\"name\":\"wwwf\",\"type\":\"sdad\",\"alias\":\"\",\"doc\":\"CM15 represents the 15 digit card number embossed on the plastic card\"},{\"name\":\"Score\",\"type\":\"Double\",\"alias\":\"\",\"doc\":\"Score value generated from the execution of the model\"},{\"name\":\"outp_var1\",\"type\":\"Double\",\"alias\":\"\",\"doc\":\"amount\"},{\"name\":\"outp_var3\",\"type\":\"String\",\"alias\":\"SegmentId\",\"doc\":\"modelId\"}],\"segmentIdColumn\":\"output_var3\",\"segmentIdDetails\":[{\"segmentId\":\"SM1\",\"description\":\"amount>=100000 and amount<115000\"},{\"segmentId\":\"SM2\",\"description\":\"amount>=100000 and amount<150000\"},{\"segmentId\":\"SM3\",\"description\":\"Other\"}]}]",               "table": "stname",               "create_date": 3243252345             }           ],           "SId": 1234,           "Sdescp": "XXXXXX"         }       ]     }   ],   "error": false,   "errorResponse": null }   However I had trouble with parsing the "match" node for which I had to tweak the response apex class a bit like this. I had to add another parser to replace the double quotes. For some reason it worked. However I was not able to use JSON.deserialize(jsonString, apexType) to deserialize the JSON instead I had to call the Parse method directly which is in Response Apex Class.   private static List<Match> arrayOfMatch(System.JSONParser parseObj) {         List<Match> res = new List<Match>();         if (parseObj.getCurrentToken() == null){             parseObj.nextToken();         }         System.JSONParser parser2 = System.JSON.createParser(parseObj.getText().replace('\\',''));         while (parser2.nextToken() != System.JSONToken.END_ARRAY) {             res.add(new Match(parser2));         }         return res;     }   Is there a better way to do this? Given how the JSON attribute match is represent as a String instead of an array. What is the best approach in this case.


why can't it be the other way around that the air flowing below the chamber moves faster than the air moving above the upper chamber?

I understand the common explanation of lift, which describes the airflow over the top of the wing as moving faster than the air below the wing.  However, I don't quite understand why the air moves faster.  I've read some explanations citing a circulation effect among others, but haven't found a good, clear explanation for the exact cause.  Can someone help me out?


Does anyone know how to prove this:  Let $S=(a_1, a_2,...,a_n)$ be a finite set of different integers.  Let $k$ be the least common multiple of $(a_1+1, a_2+1,...,a_n+1)$.   Show that the sequence resulting from taking all the numbers in $S$, $k$ times each is a graphic sequence.

Let $S=\{a_1,a_2,\dots,a_n\}$ be a set of distinct integers. Let $k$ is the least common multiple  of the numbers $\{a_1+1,\dots,a_n+1\}$.  Prove that the sequence that is take all the elements of $S$  $k$ times each is a graphic sequence. Trying to use the Erdos-Gallai  theorem but cant prove the second statement  with the inequality i try to use induction but i cannot do the second inductive step.  Definition :Graphic sequence if obeys at


I guess what I'm really asking is if there is a limit on what the force can be used to do. Curious though, is it possible for a single force sensitive to muster up enough force power to move something extremely large and massive like a planet? Also, what is the most powerful use of the force in canon and legends?

When Luke is undergoing training on Dagobah, he famously tries and fails to lift his X-Wing from the swamp:     LUKE: I can't.  It's too big.      YODA: Size matters not. Look at me. Judge me by my size, do you? Hm? Mmmm.   Yoda then lifts it for him and the story continues.  Now, while Yoda says size matters not, I'm assuming there are limitations. In other words, I'm assuming a Jedi can't stand aboard a spaceship and lift/manipulate an entire planet. Or can they? Or how about something even smaller - could a Jedi lift/manipulate a Coruscant skyscraper?  What was the largest object every manipulated using the force in the Star Wars universe, books, movies or otherwise? I'd be interested in either largest as in size, or largest as in weight.


In my statement of purpose, I want to include a web link to give details on research projects that I've worked on. I was wondering if it's a good idea.  JeffE  the practice, although I'm not sure if his recommendation is limited to the CS area. I also worry that this may be seen as a way to circumvent the length restrictions on the SOP.

I have done some independent research that I wish to mention in my SOP. The full account of what I have done till has been published as an e-print on arxiv.org. Can I give a hyperlink to this e-print in my SOP?


I am running Server 2008 release 2. I am almost out of hard drive space on the c partition. It is a 40 gig partition that is reporting 2.3 gig of free space. When I examine the properties of each folder size on this partition it adds up to about 28 gigs of used space. I can't determine why 10 gigs of capacity is not being recognized.  This system is using a PERC H700 raid adapter.

System drive, OS is Windows 7 x64 SP1 Ultimate.    Windows Explorer shows 100GB of used space.  TreeSizeFree shows 75GB of used space.  Total Commander and FAR confirm TreeSizeFree's measurements (counting hidden files).  Shadow copy is using up to 5GB with the current usage of 1.36GB.  Running FAR from Win7 PE shows the same.  Checkdisk shows no bad sectors. Disk is an OCZ SSD.  SMART monitor suggests SSD condition is perfect.    Where is the rest of space gone?


I just updated a Debian Wheezy server for the first time today, after the heartbleed bug. OpenSSL is not installed on this server, so I thought the server was not affected, and therefore it was put on the low priority list.  In the process of updating the server, I realize that the library 'libssl' with the heartbleed bug is installed on the server, and OpenSSH depends on this vulnerable library. The OpenSSH server was even restarted automatically. The OpenSSH server configured to accept passwords, is the only service facing the Internet on this machine.  Is there any chance that this server has been compromised, in any way as a cause of the heartbleed bug?  Before asking this question I have of course been searching to find an answer, but almost all question regarding OpenSSH and heartbleed is from April 8, and the answers to if OpenSSH is affected are something like: "it could be affected", "it's probably not affected", "I don't think OpenSSH affected" "anything that links with libssl is affected" etc. so no clear answer.

The OpenSSL 'heartbleed' vulnerability () affects webservers serving HTTPS. Other services also use OpenSSL. Are these services also vulnerable to heartbleed-like data leakage?  I'm thinking in particular of   sshd secure SMTP, IMAP etc -- dovecot, exim & postfix VPN servers -- openvpn and friends   all of which, on my systems at least, are linked to the OpenSSL libraries.


I am running a file search command with ag -g foo and I'd like to see the contents of the files I find. If I do ag -g foo | xargs more then the more command makes me press the spacebar to advance between each file, even though they are small enough that I could see more than one at a time in my terminal window. If I do ag -g foo | xargs cat then I see everything at once, but the files are mushed together so it's hard to see where a new file starts. Is there a way to see the files all in one scroll, but with a heading for each one?

Is there a command to show the directory/file name when cat files?  For example: assume two files f1.txt and f2.txt are under ./tmp  ./tmp/f1.txt ./tmp/f2.txt    Then when I do cat ./tmp/*.txt, only the content of files will be shown. But how to firstly show the file name, then the content?, e.g.:   (The needed command):  ./tmp/f1.txt:    This is from f1.txt  and so on  ./tmp/f1.txt:  This is from f2.txt ...   Is there a command to do it? (There seems to be no option for 'cat' to show the file names)


Is it possible to tell if a device is connected to more than one monitor? I looked up everywhere but couldn't find anything useful.

Is it possible to tell if the user of a website is using multiple monitors?  I need to find the position of a popup but it's quite likely the user will have a multiple monitor setup. Whilst window.screenX etc. will give the position of the browser window it's useless for multiple monitors.


I have found very good collada model . It comes with the texture files.   But, when I import it into Blender, it has no textures at all.    So, how to import collada model with textures into Blender?  Thanks a lot!  UPDATE:  I know for the . but I don't need to add textures after, I need to import them properly...

I purchased Fuse Character Creator and made a rigged model that I imported into Blender from Fuse. The model is a Collada File and it comes in fine, the model comes rigged and is fully poseable except that the textures aren't applied. I switch to texture view but still nothing. Here's how fuse works, you upload your model to their site, have it autorigged, and then choose the format that you want the model file in. I chose Collada. It then gives you the zip folder with the model and the textures in their own folder named "textures". I don't know what to do from here. The textures are all PNG's. When I exported to as an obj file the model came with the textures applied, but the obj doesn't come rigged. I included a picture of the textures if it helps.


Let $V$ be a finite-dimensional vector space over $\mathbb{C}$, together with a Hermitian inner product $\langle\cdot\,,\cdot\rangle$. Let $T:V\to V$ be a linear function. Prove that $T$ is self-adjoint if $\langle Tv,v\rangle\in\mathbb{R}$.  I know that since $\langle Tv, v\rangle \in\mathbb{R}$, $\langle Tv,v\rangle=\langle v, Tv\rangle $ ... I'm not sure where to go from here.

I have having trouble with the following question:  Let $V$ be a finite-dimensional complex inner product space, and let $T$ be a linear operator on $V$. Prove that if $\langle T\alpha, \alpha\rangle$ is real for every $\alpha$ in $V$ then $T$ is self-adjoint.   I have been focusing on trying to show that if $\langle T\alpha, \alpha\rangle = \langle T^*\alpha, \alpha\rangle$ for all $\alpha$ then  $T = T^*$, but have been unable to do so. I also feel like I'm missing something really obvious. How should I proceed.


In this code:  word='pardis' print(len(word[1:]))   the output is 5. I also try this code for some other words and I find out that the output is length of word minus 1. My question is what is [1:] meaning and what it does? I am unfamiliar with it. I guess It is the reason that output is length minus 1

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


I am trying to add some specific ParseObject in my List based on the username of the current user. But this code only ended up in NullPointerException on lines:  query.findInBackground(new FindCallback()  mStatus.add(status.get(i));  Somebody please help me solve this. Thank you.  @Nullable @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {     View view = null;     view = inflater.inflate(R.layout.update_status, container, false);      ParseUser currentUser = ParseUser.getCurrentUser();     final String strCurrentUsername = currentUser.getUsername();     if (currentUser != null) {          //try         final ParseQuery<ParseObject> query = new ParseQuery<ParseObject>("Status");         query.orderByDescending("createdAt");          query.findInBackground(new FindCallback<ParseObject>() {             @Override             public void done(final List<ParseObject> status, ParseException e) {                 if(e == null){                     //success                     for(int i = 0; i <status.size();i++){                         String usernow = status.get(i).getString("user");                         if(usernow.equals(strCurrentUsername)){                             Toast.makeText(getActivity(), "num"+i, Toast.LENGTH_SHORT).show();                             mStatus.add(status.get(i));                         }                         else i++;                     }                     //mStatus = status;                     StatusAdapter statusAdapter = new StatusAdapter( getListView().getContext(), mStatus);                     setListAdapter(statusAdapter);                  }else{                     //there was a problem                  }             }         });       } else {         Intent intent = new Intent(getActivity(), FirstActivity.class);         startActivity(intent);     }      return view; }

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 using ubuntu 14.04 . My Motorola Moto G is not detecting when i plug it using usb. Is it because of missing driver? How can i get drver for ubuntu?

How does one connect an  device to Ubuntu via USB? Many popular devices, such as all Android 4.0 phone, have only MTP or PTP as a connection option, no USB mass storage .  Considering the popular Samsung S3: connecting as either MTP or PTP: neither allows one to see pictures saved as default by phone camera to DCIM folder on external SD card. Similar problems with previous models (with Android 2.x) were solvable by 'usb utilities' in wireless & networking settings, but this is no longer present in Android 4.0.


I have a sqlite Database in my project which i use to store the names of persons with phonebook and address. So currently whenever we get the names inserted into DB, we do the sorting in alphabetic order and hence we could see these names as expected on the display. Now recently customer has come up with names which starts with special character like ō(Umlaut),ù etc. The expectation is that we need to display in such a way that names starting with ō should come right after 'o'(English alphabet) but before the letter 'p'(English alphabet). Similarly names starting with ù should come after the letter 'u' but before the letter 'v'. I need help to write a query for this as i have no idea as to how we need to sort the sql query.  The query which we use currently is as shown below:  ****SELECT *FROM MyTable1 ORDER BY lower(Name)****  For eg;If i have names such as Omni,ōuter,Picaso,Zebra  The DB after sorting in alphabetic order should come as    Name       Num0    Num1    Num2   Num3   Num4  Num5   Num6  Num7 Omni       1243 ōuter      1111 Picaso     2222 Zebra      3333   As mentioned above it seems that this would work out with ICU libraries. But can anyone help me out with this please?  Thanks in advance

Sqlite3 by default sorts only by ascii letters. I tried to look in google, but the only thing I found were informations about collations. Sqlite3 has only NOCASE, RTRIM and BIARY collations. How to add support for a specific locale? (I'm using it in Rails application)


I am dealing with a deep reinforcement learning problem and the state I need to feed to my agent is contained in a vector of binary numbers.   The list  looks like that:  [7.0, 1.0, 1.0, 0.0, 1.0, 5.0, 0.0, 1.0, 0.0, 1.0,   7.0, 1.0, 1.0, 0.0, 1.0, 6.0, 1.0, 0.0, 1.0, 0.0]   However, each complete state for my problem is contained every 5th iteration. Examples of complete states from the sample data are:  [[7. 1. 1. 0. 1.]] [[5. 0. 1. 0. 1.]] [[7. 1. 1. 0. 1.]] [[6. 1. 0. 1. 0.]]   I have tried creating a parser function, similar to a sliding window which should capture the 5 values every 5th iteration.  def getState(data, timestep, window):     parser_start = timestep - window + 1     block = data[parser_start:timestep + 5] if parser_start >= 0 else data[0:timestep + 5] # pad with t0     res = []     for i in range(window - 1):         res.append(block[i])      return np.array([res])   to then implement into a for loop of the type:  window_size = 5     for t in range(10):         next_state = getState(data, t + 4, window_size + 1)             print(next_state)   However, when running the loop the result I get is:  [[7. 1. 1. 0. 1.]] [[1. 1. 0. 1. 5.]] [[1. 0. 1. 5. 0.]] [[0. 1. 5. 0. 1.]] [[1. 5. 0. 1. 0.]] [[5. 0. 1. 0. 1.]] [[0. 1. 0. 1. 7.]] [[1. 0. 1. 7. 1.]] [[0. 1. 7. 1. 1.]] [[1. 7. 1. 1. 0.]]   It seems to append a sliding window of 1, rather than 5. I have been trying for weeks now but I can't find where the problem is.  Do you guys have any fresh ideas?

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


It appears that ConTeXt is more structured than LaTeX2e in terms of naming scheme, key-value naming, macros, etc. However I haven't seen any guide or so that explains how this structure works.  Where should I look? How do I start learning?  What does ! used in macros mean? E.g., \v!foo, \v!bar. What does _ used in macros mean? (I suppose this is just to add clarity) And @? And ?? What is the meaning of \unexpanded\def\foo…? Where do all of those \setupfoo come from? I don't see where they are defined. How are all of those key=value defined?    This is just what came to my mind after reading a few lines of a small .mkiv file. I don't need the answer to all of this, I'm just trying to understand conventions rather than explicit problems. That's just an example of what might come to your mind after reading a little bit about the core of ConTeXt… and I'm not sure the answer to that is easily reachable on the web.  Most important, is there a way to learn that? Is it written somewhere?

1st example:  \starttypescript [\s!serif] [paratype]   \definefontsynonym [ParatypeSerif-Regular] [\s!name:PTSerif-Regular] [\s!features=\s!default]   \definefontsynonym [ParatypeSerif-Italic] [\s!name:PTSerif-Italic] [\s!features=\s!default]   \definefontsynonym [ParatypeSerif-Bold] [\s!name:PTSerif-Bold] [\s!features=\s!default]   \definefontsynonym [ParatypeSerif-BoldItalic] [\s!name:PTSerif-BoldItalic] [\s!features=\s!default] \stoptypescript   2nd example:  \definefont[SerifS][\s!file:GenBkBasR at \smallfontsize]   Is \s! only related to fonts? Should I use it in my typescript files?


I have made all my own dried food ie. soups, chilli, tofu jerky. We were supposed to go to Jasper for a 7 day hiking trip but due to fires we are now going to Yellowstone.   Can I bring my dried foods?

We will be driving from Banff to Glacier National Park while on our camping trip and I was told to be careful with taking food across the border. We don't eat meat so that's one less issue and I already know that many fresh fruits/veggies can get complicated so I'm only thinking of taking dry stuff across (mostly grains but possibly also dried veggies).  My plan at first was to stock up at BulkBarn in Calgary since they have tons of stuff and you can just take what you need but I'm afraid that since the packaging is generic and unsealed that it might cause more problems. What are the criteria to be able to take dried food across the border?


Consider two big and equal point masses in spacetime. Let both be so far from each other that the gravitational interaction between both can be neglected. For either of them we have a (local) Schwarzschild solution of the Einstein vacuum equations. However, is there also a continuous vacuum solution which decribes the whole system? In addition, how do we write down the vacuum field equations (respectivly the solutions), if both masses are (strongly) interacting?

Is there a closed form solution in general relativity to the 2-body orbit problem?


What are the best practices for fitting a binomial classification model when the classes are very imbalanced?  For example, 99.9% 1's and 0.1% 0's.

Okay, so I think I have a decent enough sample, taking into account the 20:1 rule of thumb: a fairly large sample (N=374) for a total of 7 candidate predictor variables.   My problem is the following: whatever set of predictor variables I use, the classifications never get better than a specificity of 100% and a sensitivity of 0%. However unsatisfactory, this could actually be the best possible result, given the set of candidate predictor variables (from which I can't deviate).   But, I couldn't help but think I could do better, so I noticed that the categories of the dependent variable were quite unevenly balanced, almost 4:1. Could a more balanced subsample improve classifications?


Let's say I'm using lshw to get my system memory, and I want it printed out so that I only get the system memory option. Can you specify how many lines you want to print before or after a string in grep? A snippet of the lshw command is output below for reference:   description: Computer     width: 64 bits   *-core        description: Motherboard        physical id: 0      *-memory           description: System memory           physical id: 0           size: 23GiB      *-cpu           product: Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz           vendor: Intel Corp.           physical id: 1           bus info: cpu@0           capacity: 1896MHz           width: 64 bits   I could use lshw | grep size | awk -F: '{print $2}' to get the 23 GiB portion, but I want to see if there's a way to get a block of text with grep to get the full memory section.

I would like to grep for a string, but also show the preceding five lines and the following five lines as well as the matched line. How would I be able to do this?


I think it is a fairly well recognized phenomenon that questions in some tags attract more terrible answers at faster speed than others. And the site already does a fairly decent job at taking care of them. I am not sure how many of them get flagged, but they usually end up deleted after a few downvotes.  I don't have any statistics here, so maybe someone how has access to the mod tools would be a bit more informed here than I am.  It seems to me that given a lot of these terrible posts are coming from new users or low rep users well on their way to a question ban, that we should be able to deal with the problem with even less user intervention.  I also think the current situation of being bombarded at the beginning with tons of answers which later disappear might be confusing to the questioner. I think we can do better.  I propose a (short) automatic protect interval of 5-10 minutes on new questions to the site. This should be accompanied by a helpful message different from the normal protected question message indicating that after they have thought about it and still want to post, that they will be able to do so shortly; inviting them to proofread and improve their post in the meantime.  I expect to probably get downvoted for this because the consensus seems to be that this is a solved problem. While I feel that the current system works, I feel it could work better. This proposal might also be counterproductive.  I am probably missing something important, so feel free to criticize brutally.

I noticed today that a request for protection came up due to the the large number of me-too answers on a trending question I answered recently.  This got me thinking, since trending questions get far more attention than the average question, should questions that trend be automatically protected?  On the upside, this does seem to be a common problem and the auto-protection could be put in place only while the question is trending.  On the downside, it would make it more difficult for new people to participate in answering a trending (highly visible) question so it could be a barrier to entry.  Thoughts?


In the anniversary update to Windows 10, Microsoft got rid of regular Skype and only has Skype Preview. Is there a way I can get back regular Skype?

Windows 8 skype is terrible.  They've removed many buttons, most of the preferences, and have in general made it impossibly oversimplified and difficult to use.  Old Skype was fine when I had windows 7.  Is there any way to get it back on Windows 8?


I'm trying to center the container and I don't know why it doesnt work. html, body {   height: 100% }  .container {   min-height: 20em;   width: fit-content;   background-color: #ffffff;   display: flex;   flex-direction: row;   align-items: center;   justify-content: center; }

How can I horizontally center a
 within another
 using CSS?

Foo foo


We know there are multiple types of indexes like market cap weighted and equal weighted indexes, etc., Currently am working on S&P 500 and is there any way to calculated PE ratio for S&P 500 using PE ratios of individual companies.  if we have EPS, no. of shares outstanding and market capital for all the stocks then we can calculate, but is there any way to calculate in the above process.  with the help of below wiki link    Weighted Index P/E= market capitalization/net income Market cap = market price x current number of shares Net income = EPS x weighted average number of shares

For stocks, I can easily look at the price/earnings ratio, and, according to The Intelligent Investor, stand clear of those with a ratio higher than 20.  How can I tell if the current price of an ETF is a good price to buy it? Are there such simple metrics?


I use find / | grep git to find repositories. Sometimes it finds lots of files which contain digital.  It seems quite easy to use find / | grep -vi digital | grep git, but I believe that there's a chance of ignoring /home/auser/.../digital/.../gitrepo. I also would like to skip these directories:  /home/john/C_DRIVE/* /proc/*   Is there a way to perform a search in such a way that a certain match is removed and after that search proceeds?

I have a lot of directories on my system, with a structure looking like this:  \-----data        \------- 001abc        \------- 002abc        \------- 003abc        \------- 004abc        \------- 005abc        \ ....   When I want find a certain directory, I just type find . -iname "002abc*" but how can I find a directory excluding certain name matches?    Something like this in MySQL select * from folder where filename != '0021bc'


As the title says, I want to change the "Show Applications" Icon in Ubuntu dock (on Ubuntu 17.10) with Ubuntu icon like in Unity 10.04.     I have found a similar question but the answer has no result.

I'm using Ubuntu with GNOME desktop.   I was wondering how to change the "Show Applications" button icon on the dash?


Why is assumption of Homogeneity of variance required. What are the problems if they are not satisfied

I do not know why testing homogeneity of variance is so important. What are the examples that require homogeneity of variance?


As a dual citizen, I have an EU passport and a non-EU passport. I have to leave and enter my home country on my non-EU passport. After leaving on my non-EU passport, can I then enter the EU on my EU passport, or will there be a security glitch because of the advance passenger info provided by airlines?

I am a citizen of two different countries, and have two passports.  How should I use my passports when traveling?


I'm reading Elementary Number Theory by Underwood Dudley, in Section 22 "Formulas for Primes" he mentioned a theorem without providing proof: there is an integer A such that if n > A, then there is a prime p such that $$n^3<p<(n+1)^3-1$$ Is there a name for such theorem and how to prove it in an elementary way?

I am looking at Dudley's proof of the existence of Mill's constant. It starts out as follows     The proof depends on the following theorem: there is an integer $A$ such that if $n>A$, then there is a prime $p$ such that   $$ n^3 < p < (n+1)^3 -1.$$   We will not prove this but we will use it to determine a sequence of primes$\ldots$   Where can I find a proof of this theorem?


Does a greeting like, "Welcome, Campers" require a comma after "Welcome"? Or can you write "Welcome Campers"?  This would be for a sign, or an email where the opening sentence is, "Welcome campers!"  I have argued that "Welcome campers" means something different than "Welcome, campers." It could be read as an imperative sentence. But where I work they keep wanting to go without the comma.

I have a follow up question to this question:   My question is: when should you add a comma when starting a letter/email with     Hello John,      It was fun to see ...   I am pretty sure that a comma goes after the name, but lately I have seen several people (academics) write      Hello, John,       It was fun to see ...   with a comma after the Hello.  I am wondering when a comma there is appropriate.    I see this question  but I am wondering about the situation where you have a comma after the name also.


Here are two examples from Murphy grammar textbook:  1)"I didn't see you at Michael's party last week - No, I had to work that night, so I couldn't come."  2)"I think I saw you at Michael's party last week- No, you couldn't have seen me. I didn't go to the party."  My question is:  Why in the first example is there no "couldn't have come" instead of "couldn't come" despite the past context ("...last week", "I HAD to work...")?

Reading Harry Potter 2, I came across the following, and I wonder if the use of couldn't have is the equivalent of couldn't in this context?  "I have got a question, Oliver," said George, who had woken with a start. "Why couldn't you have told us all this yesterday when we were all awake?"  If we change it to the following, how does it change the meaning of it?  "I have got a question, Oliver," said George, who had woken with a start. "Why couldn't you tell us all this yesterday when we were all awake?"  And what is the difference between the following?  If you couldn't do it, you should have told us yesterday. If you couldn't have done it, you should have told us yesterday.


I have installed Ubuntu 16.04 64 bit in my laptop. Now I want to install Windows 10 32 bit parallel. If it's possible then how to do it? My system configuration is 500 GB hard disk and 4 GB RAM.

I have Ubuntu on my laptop. Now I want install Windows 7 in a dual-boot. How can I do this? I can't lose my Ubuntu files, and I'm afraid that I might break . Go  for UEFI only!


I can't post a screenshot right now, but when I look at my Votes Cast list, I can see questions which I have voted to close, with closure (deleted) as the status, like .  However I can view the questions just fine. Could this be a bug?

In the "Votes Cast" section of my profile, my vote to close  is annotated with "(deleted)":    However, the close vote does not appear to have been deleted: it successfully closed the question:    Why was this vote marked as "(deleted)"?    If the vote was deleted my some internal process after the question was closed and the closers were recorded, I call that a . Regardless of what happens internally, it's irrelevant to users if close votes are deleted after they have taken effect.


I am taking an online course on electronic devices. It is poorly done and I already paid for it. Yesterday I asked a question similar to this one however I didn't understand the explanation. This time I took a problem from the course, and I hope somebody is willing to explain me in details what to do.

I just started learning about electronics and decided to quickly sketch a circuit. When it comes to OP and changing the said circuit into an Ac equivalent, I got stuck. Sorry in advance if this is considered a basic question.


Other words, are there infinitely many primes $p$ such that $p-1$ is square-free. This seems likely to be true, but I can't seem to give an easy argument why. This set of primes and all primes 1 more an integer with a square divisor make up the set of primes, so at least one of these is infinite. I looked at this question for enlightenment but to no avail :  as 2 could be included in this product.

How to prove that $p-1$ is squarefree infinitely often, where $p$ is prime?  I had thought of using Dirichlet's theorem on arithmetic progressions.  The number of squareful values of $p-1$ less than or equal to $n$ is bounded by $\sum_{q}{\pi_{q^2,1}(n)}$, each term $\pi_{q^2,1}(n) \approx \frac{\pi(n)}{q \cdot (q-1)}$, and $\sum_{q}{\frac{1}{q \cdot (q-1)}} \lt 1$.  But using for example , the possibility is open that the error in each approximation for $\pi_{q^2,1}(n)$ may continue to increase with $q$, and since the sum runs up to $\sqrt{n}$, this argument is invalid.  Is there a more refined version of Dirichlet's theorem that can be used to circumvent this issue?  Or an entirely different way to prove this statement?


I have created a console app which print the number in a for loop using C# Task.Run() method. If you look at the code, I am initializing the Employee object in the loop and pass the number in the method, though it prints the same number.  Code:  class Program     {         static void Main(string[] args)         {             for (int i = 1; i <= 500; i++)             {                 Task.Run(() => new Employee().ProcessEmployee(i));             }             Console.Read();         }     }      public class Employee     {         public void ProcessEmployee(int employeeId)         {             Console.WriteLine($"The number is: {employeeId} and thread is {Thread.CurrentThread.ManagedThreadId}");         }     }   Output:    The question is- How would I fix this issue? I still want to use Task.Run() method because in my real application scenarios, I want to process the stream (JSON data) in a different thread and do not want to block my main callback method which receive the stream (JSON data).  Thanks in advance.

I've been learning C#, and I'm trying to understand lambdas.  In this sample below, it prints out 10 ten times.  class Program {     delegate void Action();     static void Main(string[] args)     {         List<Action> actions = new List<Action>();          for (int i = 0; i < 10; ++i )             actions.Add(()=>Console.WriteLine(i));          foreach (Action a in actions)             a();     } }   Obviously, the generated class behind the lambda is storing a reference or pointer to the int i variable, and is assigning a new value to the same reference every time the loop iterates.  Is there a way to force the lamda to grab a copy instead, like the C++0x syntax  [&](){ ... } // Capture by reference   vs.  [=](){ ... } // Capture copies


I would like to ask a question about the meaning of the status "Draft" of my submitted article in a Taylor and Francis journal?

What steps does a manuscript typically go through from submission to publication (or rejection) in a typical journal? How are these steps referred to, in particular by editorial systems, and how long do they each typically take?  Note that this question is about the typical situation and hence not about:   Journals with an atypical workflow, e.g. those that allow for an instantaneous reviewer–author interaction. Exceptional steps or rare occurrences such as withdrawal or .   This is a canonical question on this topic as per . Due to its nature, it is rather broad and not exemplary for a regular question on this site. Please feel free to improve this question.


Prove and extend of disprove and salvage this statement.  I posted a similar post a few minutes ago.  I've been stuck on these two problems for a while and I have no idea what to do.  Any help would be greatly appreciated!

Using divisibility theorems, prove that if $\gcd(a,b)=1$ and $a|c$ and $b|c$, then $ab|c$.   This is pretty clear by UPF, but I'm having some trouble proving it using divisibility theorems. I was looking at , and if this could be proven, then the solution would follow immediately.


EDIT: Figured it out. Looks like in the other thread, the updated G&K directions were incorrect (at least for me). I simply followed the original directions and found the Controls.ModsButton:SetHide(true) and fixed it, per original instructions. Sorry for the duplicate! Thanks for all the help!  I looked at this link first:   But I got stuck where it says Front End/Mainmenu.lua. Mine is a .xml file (not sure if that matters). Anyway, I opened it up using Text Editor on Mac, but couldn't find the "Controls.ModsButton:SetHide( true );" to change it. So now I am stuck. This is what it says instead:    <GridButton Anchor="C,T" ID="ModsButton"          Size="320,45"    Style="ZoomButton" String="TXT_KEY_MODS" >     <ShowOnMouseOver>       <AlphaAnim Anchor="L,T" Size="320,48" Pause="0" Cycle="Bounce" Speed="1" AlphaStart="1.5" AlphaEnd="1">         <Grid   Size="320,48" Offset="0,-2" Padding="0,0" Style="Grid9FrameTurnsHL" />       </AlphaAnim>       <AlphaAnim Anchor="L,T" Size="320,48" Pause="0" Cycle="Once" Speed="1" AlphaStart=".2" AlphaEnd="0">         <Image Anchor="R,C" Offset="0,0" AnchorSide="O.I" Texture="Assets/UI/Art/WorldView/WindowGlowRight.dds" Size="42,86" />         <Image Anchor="L,C" Offset="0,0" AnchorSide="O.I" Texture="Assets/UI/Art/WorldView/WindowGlowLeft.dds" Size="42,86" />       </AlphaAnim>      </ShowOnMouseOver>     <Image Anchor="C,T" AnchorSide="I.O" Offset="0,0" Texture="bar300x2.dds" Size="300.1" />   </GridButton>   If you want the whole text, I can post it. But nothing that I saw suggested a "hide mods button" so I'm not sure what to do next. I have Gods & Kings as well. Help!

Officially, the Mac OS X version of Civilization V does not support mods. However, from common sense, some discussions I've found online, and Aspyr's poor track record, I'm guessing it is indeed possible to enable the mod browser and mod playing, at least for some mods.  So, is it possible? And if it is, how?


Is there any difference between which of the following methods you use to mark a question duplicate?   I am flagging to report this question as... ▶ A Duplicate I am flagging to report this question as... ▶ Should be closed ▶ Duplicate of...

We've changed the flagging format from today(AFAIK) as below,        looks good.  But, when I select it should be closed for another reason...  I can see the same reason duplicate on the top.        What is the need of placing that reason over there? It should not be there. Please remove the dupe.


I made a campfire in Blender and I would like to render it with a specific photo in the background, but when I start rendering, the photo is missing.    Edit:  Thanks for your links they explain my problem. But I have a node setup like this:    I don't know where to link the image and alpha node! Is there a possibility to create a new node channel where I can set my complete campfire nodes as one node?

First time I've used cycles rendering engine.  I'm using a movie clip as the background in short animation. Selected RBGA under Property Tab, and Transparent under Film Tab.  It looks good and individual frames in OpenGL active viewport render, and looks fine.  When I try to get it to spit out PNG files of the finished animation the objects render out fine, except no movie clip background as Blender Render engine did when using Paper Sky setting.  Operator error, or am I trying to do something Cycles won't do?  Haven't found an answer in my searches so far.  Can anyone point me in the right direction please.   Addition:  I think I found my problem after a couple more hours of research.  Post should read "operator ignorance" instead of operator error.  Too tired to try the solution tonight, everything looks better in the morning. Thanks anyway.  Sorry, I just saw your posts.  Really tired.  Much appreciation.


The Program I'm trying to make is supposed to draw a Polygon using points stored in an ArrayList. I rechecked the code and I am also using the driver, but when I try to run the program, it gives me a NullPointerException when I try to add coordinates for the program to use when drawing.  import java.awt.geom.*; import java.util.ArrayList; import gpdraw.*; public class IrregularPolygon {     private ArrayList <Point2D.Double> myPolygon;     DrawingTool myPen;     SketchPad myPaper;      double dblPerimeter;     double dblSegment;     double dblArea;      public IrregularPolygon()//Creating the sketchpad and pen     {         myPaper = new SketchPad(500,500);         myPen = new DrawingTool(myPaper);     }      public void add(Point2D.Double aPoint)//Adds to the array     {         myPolygon.add(aPoint);// This is where the problem is I think, I don't know what to do     }      public void draw()//This method draws the polygon     {         for(int x = 0; x < myPolygon.size() - 1 ; x++)         {             myPen.down();             myPen.move(myPolygon.get(x).getX(),myPolygon.get(x).getY());             myPen.up();         }        }       public double perimeter()//This method finds the perimeter     {         for(int x = 0; x < myPolygon.size() - 1; x++)         {             dblPerimeter += myPolygon.get(x).distance(myPolygon.get(x+1));         }         return dblPerimeter;     }      public double area()//This method finds the area     {         for(int x = 0; x < myPolygon.size() - 1; x++)         {             double X1 = (myPolygon.get(x).getX());             double Y1 = (myPolygon.get(x).getY());             double X2 = (myPolygon.get(x + 1).getX());             double Y2 = (myPolygon.get(x + 1).getY());             dblArea += (X1 * Y2 - Y1 * X2);          }         return dblArea;     } }   and the programs runs from this driver:  import java.util.*; import java.awt.geom.Point2D; public class IrregularPolygonDriver {     static boolean blnReadyToDraw = false;     static Scanner in = new Scanner(System.in);     public static void main(String[]args)     {         int num;         IrregularPolygon poly = new IrregularPolygon();         while(blnReadyToDraw == false)         {             System.out.println("Would you like to add a point, find the perimeter, or calculate the area?");             System.out.println("To add a point, enter 1; to find the perimeter, enter 2; to find the area, enter 3");             num = in.nextInt();             if(num == 1)             {                 double dblNum1;                 double dblNum2;                 Point2D.Double dblNumber;                 System.out.println("Enter an x value and a y value: ");                 dblNum1 = in.nextDouble();                 dblNum2 = in.nextDouble();                 dblNumber = new Point2D.Double(dblNum1,dblNum2);                 poly.add(dblNumber);                 System.out.println("Keep adding points until you are done drawing the figure.");             }             else if(num == 2)             {                 poly.perimeter();             }             else if(num == 3)             {                 poly.area();             }             else             {                 blnReadyToDraw = true;                 System.out.println("Preparing to Draw");             }         }         poly.draw();     }   }

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 have a mountain bike with a tyre marked 26x2.00 and I'd like to fit a training tyre so I can use my bike inside.  I know that the 26 refers to the diameter of the wheel and the 2.00 is the width of the tyre but I have my eye on a training tyre which is marked 26x1.25.  Clearly the tyre width is smaller which is not a problem but what I don't understand is how I know whether it will fit my wheel rim.    Firstly, I don't know the correct place to measure the rim (it measures 26mm on the outside) but secondly how do I know which tyres will fit which rims?  Is this listed on the tyre somewhere to say it fits a specific width wheel?  Thanks

We often get questions on bicycles.stackexchange about fitting wider or narrower tires to bicycles. We have a large number of these with answers suiting the specific bike or style of bicycle in question, but I have been unable to find one that provides a generic answer covering off all things that need to be considered. For most bicycles, the answer is the same regardless of the specific style and sizes of tires in question.   This is intended as a canonical question that we can point closed questions to.


How can i prove that  if $\gcd(a,b)=1$ there exist $x>0$ and $y>0$ such that $ax-by=1$?

How you get from $\gcd(a,b)= 1 \Longleftrightarrow ax+by=1 \Longrightarrow a \nmid b$?


Just a though- if I add my internal IP address to A-record to a second level domain.com (assuming that I can't add it internally using AD/DNS)  Will it work in my internal network?  Theoretically, any PC in internal network will send a request to external DNS server when my domain.com is called; external DNS will shoot back an IP(internal); so the IP is reachable internally; should work?  Am not trying to use internal DNS nor Implement it. I am wondering if I can go around it. The main goal is to use mydomain.com internally which would be reachable from any internal computer

We have an SMTP only mail server behind a firewall which will have a public A record of mail..  The only way to access this mail server is from another server behind the same firewall.  We do not run our own private DNS server.  Is it a good idea to use the private IP address as an A record in a public DNS server - or is it best to keep these server records in each servers local hosts file?


One day I installed wine 1.7.8 with mono and any game (also steam games) were working great. Few days ago my Linux broke completely so I had to reinstall it, then I updated nvidia drivers and wine like this:  sudo apt-get install wine1.7   Then I released that the new version (1.7.9) installed automatically but without mono package anymore. Until now all the wine games can't run due to fact it cannot find my graphic card drivers.  What can I do in this case? I'm a ubuntu noob btw.

Wine is saying that Mono package is not installed, but I installed it with Terminal by:  sudo apt-get install mono-complete   What should I do?


I'm trying to use the listings package to typeset some code in a PDF document, in a way that allows me to copy-paste the resulting code. This mostly works well, if basicstyle=\ttfamily,columns=flexible is used as suggested here:   The problem is that the leading whitespace is not copy-pasted correctly. Sure, it visually shows up correctly in the PDF, but selecting it and copy-pasting it omits leading whitespace and blank lines.  \documentclass{article} \usepackage{listings} \lstset{basicstyle=\ttfamily, columns=flexible} \begin{document} Some text.  \begin{lstlisting} def f(x):     return x+1  Previous line intentionally left blank. \end{lstlisting} \end{document}   Is there anything I can do to make it copy-paste correctly? I prefer using listings unless it's absolutely impossible with this package. (The document base I'm working on is pretty large so I'd like to make as few changes as possible to prevent unforeseen bugs.)

I need to include a couple of Python code listings, where the indentation of the lines (using some number of spaces) is significant. I would like for the code listings to be copyable, so the spaces at the beginning of the line need to be be copied along with the text.  This question has been asked in various ways before (e.g. , or ). Those questions focus on making line numbers uncopyable, though.  Making the spaces at the beginning of a line copyable seems to be harder: "I am not sure it is possible to specify in the PDF (at least in a viewer-independent way) that the indentation should be copied too" (). At , Philippe Goutet suggests a solution (turning the spaces into visible spaces, and coloring them in the background color so that they appear invisible) that works using Acrobat Reader, but not all readers. He says "It works under Acrobat Reader and it's extremely pleasant to be able to quickly copy/paste code without problem (perhaps the problem can be circumvented by writing direct PDF code to tell that it's a space, I've never had the time to try)".  Is it possible to produce a PDF with a code listing with copyable real spaces at the beginning of a line?  Minimal example: The line return x should start with four spaces.  \documentclass{article}  \begin{document} \begin{verbatim} def myfunction(x):     return x \end{verbatim} \end{document}   I know that I could attach the code to the PDF as a file, but that's not what I want.


I know it should be "a" but it sounds so awkward? So should it be "an"?

99% of the time, I'm clear on when I should use "a" versus "an." There's one case, though, where people & references I respect disagree.  Which of the following would you precede with "a" or "an," and why?   FAQ FUBAR SCUBA   [Note: I've read the questions  and , but the rules given there don't necessarily apply here.]    [Edited to add]  Here's a shorter (and hopefully clearer) version of the question…  In written English, which is correct (and why): "a FAQ" or "an FAQ"?  Some references with differing opinions:   an: the  and  a: the Microsoft Manual of Style for Tech Publications, 3e either: the  and


I am trying to implement a Maple code which calculates the $n$-th iterate of a differential operator. For example I have the operator  L:= f-> diff(f,t$2) + diff(f,t);   Now e.g. the second iterate of this operator can be calculated by writing L(L(f(t))); However this quickly gets out of hand if I want to calculate higher order iterates of $L$, and sometimes I would even like to have variable order (e.g. in sums).  Is there a command in Maple which would allow me to specify the order of iteration $n$, the operator $L$, and the function $f(t)$, and which would return the expression for $L^n(f)$?  I tried to write a procedure for this using a for loop but this didn't work out for me since it says I have "too many levels of recursion". Here's the code:  Ln := proc (n, f)     local g, i;     g := t -> L(f(t));    for i from 1 to n do:         g := t -> L(g(t))    end do:     g(t); end proc;

I want to calculate $u_1, u_2,\ldots,u_n$.  Can anyone help me to define this recursive series: $u_{n+1}=\sin(u_n)$ with $u_0=1.5$ without proc or loops?


I'm working on a work file and I have to make a numbered list with roman number in html but I don't now how I can do it. Is there someone that can help me?

How can I left-align the numbers in an ordered list?  1.  an item // skip some items for brevity  9.  another item 10. notice the 1 is under the 9, and the item contents also line up   Change the character after the number in an ordered list?  1) an item   Also is there a CSS solution to change from numbers to alphabetic/roman lists instead of using the type attribute on the ol element.  I am mostly interested in answers that work on Firefox 3.


I used to get image pop ups in QGIS using the HTML code:  < img src="[% image %]" width=300 height=300 >   But somehow, I do not manage to use it anymore on QGIS 2.18.  Does anybody have a clue?

How do you display a photo map tip in QGIS 3 on Windows?  As a new user I'm not sure if this is my lack of experience or a bug, so I've tried to simplify it as far as I can:  This is the contents of the Layer Display properties.

test

   and this is how it appears:    C:\Local\aa.jpg is real file I'm using to try to figure out what the problem is. What am I doing wrong?


I have a form that saves a name for product category, and since it's in cyrillic I'm having some issues with it. The problem is that it transfers all my cyrillic to some jiberish.  <?php  $con = mysqli_connect('localhost', 'root', '', 'mydb'); // Check connection  if (!$con) {     echo "Failed to connect to MySQL: " . mysqli_connect_error(); }  mysqli_set_charset($con,"utf8");  $data = json_decode(file_get_contents("php://input"));  $id = '';  if(!empty($data->CategoryId)) {     $id = mysqli_real_escape_string($con, $data->CategoryId); }  $name = mysqli_real_escape_string($con, $data->CategoryName); $link = str_replace(" ", "-", $name); $link_lower = strtolower($link);  if ($id != '') {     $sql = "UPDATE `categories` SET CategoryName='$name', CategoryLink='$link_lower' WHERE `CategoryId`='$id'";      if ($con->query($sql) === TRUE) {         print 'success';     } else {         print 'error';     } } else {      $sql = "INSERT INTO `categories` (`CategoryName`, `CategoryLink`) VALUES ('$name', '$link_lower')";      if ($con->query($sql) === TRUE) {         print 'success';     } else {         print 'error';     } }   ?>  I have set the collation to my entire DB and it's tables to utf8_unicode_ci.  if I set a var_dump($name) before the INSERT INTO query it returns what I've typed in to the field. But when I set a var_dump($sql), both $name and $link_lower are in some jiberish  'INSERT INTO `categories` (`CategoryName`, `CategoryLink`) VALUES ('ÐÐ¾Ð±Ð¸Ð»Ð½Ð¸ ÑÑÑÑÐ¾Ð¹ÑÑÐ²Ð°', 'ðð¾ð±ð¸ð»ð½ð¸-ññññð¾ð¹ññð²ð°')'   like so. One thing I like to point is that I'm using AngularJs in the development of this small project of mine not sure if it's important.

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I am trying to add a "Press Enter to reboot" at the end of the script, this is for combining two cds together and rebooting on user command, I have completed first #!/bin/bash #go into folder echo "Run ./install to start installation" cd /usb/folder ./install_one.sh echo "installing part 2 ./install_two.sh echo "Finished with installation" echo "Press Enter to Reboot" Reb=${Reboot} echo ${Reb}  update: added read -n1 -r -p "Press enter to continue..." enter if [ "$enter" = '' ]; then reboot fi at the end of it would this work or does it need something

How do I stop a bash script until a user has pressed Space?  I would like to have the question in my script     Press space to continue or CTRL+C to exit   and then the script should stop and wait until Space is pressed.


I bought some jewellery during the black friday sale for my family. The total cost of which is around $500 but the actual value is higher. Can I still take all of the items I purchased without paying custom charges or should I return some stuff so that the actual value that I take across borders does not cross more than the allowed threshold? Keeping in mind I'm on an F-1 visa and have been staying in the states for more than a year. P.S. I would appreciate if someone can list a resource to check what is the actual value of the allowed items allowed to be taken from the United states to India without paying the custom duty.

I am planning to travel to India (COK airport, Kerala) from United States. I want to take my laptop as well as my tablet (iPad). Am I allowed to take both in my backpack with my documents related my work. I think I am allowed to take only one computer as per the rule. Will the customs consider my iPad as a computer?  What all I can take?   One of my friends took 2 laptops (1 work and 1 personal) and had trouble at the airport.  Also I am planning to take some wristwatches (7 of them, each avg price is 45 $). I read in a website that I can take stuff up to max 35000 INR. Is that true? In that case, how will I manage my stuff?


Let $\omega$ be a nondegenerate alternating $2$-form on an $2n$-dimesional Vectorspace $V$, meaning that for all nonzero $v \in V$ the map $w \mapsto \omega(v,w)$ is not identically zero.  Why is the nth power $\omega^n = \omega \wedge \dots \wedge \omega \neq 0$?  Every textbook i have looked at says this is very easy, but i do not see it.  Thanks for your help.

I have the following problem: Let $(M, \omega)$ be a symplectic manifold. How can I show $$\omega^n=\underbrace{\omega\wedge \ldots\wedge \omega}_{n-times},$$ satisfies $\omega^n(p)\neq 0$ for all $p\in M$. I believe that is not too dificult but I'm not used with exterior product.. Any help will be valuable...  This is important because the nondegeneracy condition on $ω$ is equivalent to the condition that M has an even dimension $2n$ and the top wedge product $\omega^n$ is nowhere vanishing on M, i.e., $ω^n$ is a volume form. In particular, $M$ must be orientable and is canonically oriented by $\omega^n$.


The actual sentence goes like this:  How easy it is to integrate the two applications? or How easy is it to integrate the two applications?  To my understanding 'How easy it is' wrong if used as a question. So, please clarify.

What it says on the tin, a foreign friend of mine has asked and I can't tell him; apart from it sounding horrible.  For example:  "Why is it raining today?"   Instead of:  "Why it is raining today?"


I installed Ubuntu 12.04 on my laptop and chose the option "Erase disk and install Ubuntu" from liveUSB without any backup. When I realized that this would format my whole HDD, I immediately unplugged the usb and turn off my laptop. However, it seems that my whole HDD had been formatted: I have 4 partitions before but there's only 1 partition formatted in ext4 now with the size equal the HDD's size.  Is there anyway I can get my data back? I believe that my data is still there on the disk. I've searched for a while and tried using Testdisk and parted but no luck: Testdisk cannot find any partition even after trying "Deeper Search"

I have a Toshiba satellite A-200 laptop with a Vista OS on it with 4 NTFS partitions  (C:) Vista  (D:) Entertainment  (E:) Work  (F:) Sources   and I wanted to start using Ubuntu instead. So I tried it first from the live CD and everything was OK and all the partitions were shown and working and so I decided to install Ubuntu to replace Vista on the (C:) drive. After I did that I can no longer find my folders and files on the (D:), (E:), (F:) partitions and the only file system that is shown is one 198 GB although my HDD is 320 GB.  I can't access the lost data on the remaining 120 GB which I hope is still there and not totally lost  I am now working from the live CD but I am unable to install testdisk. Can I recover the Vista partitions by the product recovery CD to get my laptop back to the factory settings? Can I recover the NTFS partitions using a recovery program for Windows or will that make the problem worse?   I need these data badly as I don't have a backup for them.


I am currently trying to create a freehand style as seen in technical drawings:  (see the thin line to the right of the shaded part) This is what I have so far: \documentclass{article} % https://tex.stackexchange.com/questions/586063/reusing-decorated-path  \usepackage{tikz} \usetikzlibrary{decorations, decorations.pathmorphing}  \tikzstyle{freehand}=[decoration = {random steps, amplitude = 10}]  \begin{document} \begin{tikzpicture}     \draw[thick] (0, 0) rectangle (6, 3);     \draw[thin, freehand, decorate] (3, 0) -- (3, 3);     \fill[red, opacity = .5] (0, 0) -- (3, 0) decorate [freehand] { -- (3, 3)} -- (0, 3); \end{tikzpicture} \end{document}  This somewhat does what I want:  However, the line and the background don't match. I think I can fix this through either  setting a random seed to the same value for both parts use filldraw from the beginning name the random path & reuse it for the fill command  I couldn't find any way to do 1. 2 I don't like because there could be situations where I want to fill both sides of the lines. So my question is, how do I save a morphed path to reuse it later? Thanks in advance.

I'm creating a beamer presentation, in which I use TikZ.  I am making a figure, on which I would like to highlight something (using \only<> command). My figure contains an ellipse that is decorated with random steps:  ... \node[ellipse,minimum width=1cm,black!30,decorate,decoration={random steps,segment length=0.2cm,amplitude=.1cm}] {};  \only<1>{ \node (n) at (0,0) {A}; } \only<2>{ \node (n) at (0,0) {B}; }   The ellipse is rendered in differenlty. How can I make it to render the same? or what other decoration can I use to get a similar effect to random steps?


I wish to crop png images using php but yet keep them transparant.  My current code:  <?php // usual header used on my all pages ob_start("ob_gzhandler"); $PHP_SELF=$_SERVER['PHP_SELF']; // actual script begins here $type=false; function open_image ($file) {     //detect type and process accordinally     global $type;     $size=getimagesize($file);     switch($size["mime"]){         case "image/jpeg":             $im = imagecreatefromjpeg($file); //jpeg file         break;         case "image/gif":             $im = imagecreatefromgif($file); //gif file       break;       case "image/png":           $im = imagecreatefrompng($file); //png file       break;     default:          $im=false;     break;     }     return $im; }  $url = $_GET['src'];  if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && (strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == filemtime($url))) {   // send the last mod time of the file back     header('Last-Modified: '.gmdate('D, d M Y H:i:s', filemtime($url)).' GMT', true, 304); //is it cached? } else { $image = open_image($url); if ($image === false) { die ('Unable to open image'); }      $thumb_width = $_GET['w'];     $thumb_height = $_GET['h'];     $width = imagesx($image);     $height = imagesy($image);     $original_aspect = $width / $height;     $thumb_aspect = $thumb_width / $thumb_height;     if ( $original_aspect >= $thumb_aspect )     {        // If image is wider than thumbnail (in aspect ratio sense)        $new_height = $thumb_height;        $new_width = $width / ($height / $thumb_height);     }     else     {        // If the thumbnail is wider than the image        $new_width = $thumb_width;        $new_height = $height / ($width / $thumb_width);     }     $thumb = imagecreatetruecolor( $thumb_width, $thumb_height );     // Resize and crop     imagecopyresampled($thumb,                        $image,                        0 - ($new_width - $thumb_width) / 2, // Center the image horizontally                        0 - ($new_height - $thumb_height) / 2, // Center the image vertically                        0, 0,                        $new_width, $new_height,                        $width, $height);       $im2 = imagejpeg($thumb, NULL, 100);      imagecopyResampled ($im2, $image, 0, 0, 0, 0, $thumb_width, $thumb_height, $width, $height);      header('Content-type: image/jpeg');     $name=explode(".", basename($_GET['url']));     header("Content-Disposition: inline; filename=".$name[0]."_t.jpg");     header('Last-Modified: ' . gmdate('D, d M Y H:i:s', filemtime($url)) . ' GMT');     header("Cache-Control: public");     header("Pragma: public");     imagejpeg($im2, NULL, 100);     imagedestroy($im2);      imagedestroy($image); } ?>   But, if the input is a transparent png images , thumbnails will have a black background, how do I keep the transparent background?

I'm attempting to resize pngs with transparent backgrounds in PHP and the code samples I've found online don't work for me. Here's the code I'm using, advice will be much appreciated!  $this->image = imagecreatefrompng($filename);  imagesavealpha($this->image, true); $newImage = imagecreatetruecolor($width, $height);  // Make a new transparent image and turn off alpha blending to keep the alpha channel $background = imagecolorallocatealpha($newImage, 255, 255, 255, 127); imagecolortransparent($newImage, $background); imagealphablending($newImage, false); imagesavealpha($newImage, true);  imagecopyresampled($newImage, $this->image, 0, 0, 0, 0, $width, $height,  $this->getWidth(), $this->getHeight()); $this->image = $newImage;   imagepng($this->image,$filename);    Update By 'not working' I meant to say the background color changes to black when I resize pngs.


s = "func"   Now suppose there is function called func. How can i call in Python 2.7 call func when the function name is given as a string?

What is the best way to go about calling a function given a string with the function's name in a Python program.  For example, let's say that I have a module foo, and I have a string whose content is "bar". What is the best way to call foo.bar()?  I need to get the return value of the function, which is why I don't just use eval. I figured out how to do it by using eval to define a temp function that returns the result of that function call, but I'm hoping that there is a more elegant way to do this.


I'm doing a ma in economics which isn't very technical. It's focused on macro and international economics. Once I finish this program I'm going to try to apply to another program for an ma in economics that is more technical with a focus in micro and econometrics. I'd be doing this to broaden my knowledge base in the subject and then teach undergrad for a few years. I could maybe pursue a phd if my employer decided to sponsor me for one. Is this something the second university would allow? How would that be viewed? Would it be suitable if my first degree was a ma in Econ but my second degree was something like an ma in quantitative economics? Perhaps a duel degree in Econ and finance/applied math?

Are students with masters degree allowed to enter a masters program in the same area at a good university?  Is second masters a good option for a better research experience and improving your CV before applying to a PhD in top programs? I am specifically interested in US universities and computer science.


I have a use case where a user clicks the SSO link on a case record or account record and it should pass some Case/Account fields based on the current record information to the SAML response. In other words, I want to append SAML parameters with Case.eID__c for example. That way, the remote report would display only information relevant to the current account the user is viewing.  I tried many approaches, read many forum posts with no success.  I tried customAttributes method on the Auth.ConnectedAppPlugin class (extending the class and overrding the method), like described in this documentation: ConnectedAppPlugin Class. It works but I am not able to query those values to customAttributes method as I need to pass the current record's ID to the method. So I want help in figuring out as to how I can pass that ID.  The custom attributes that we can add declaratively to the connected app are not helpful in my case, they only get information about the environment or the current user

We have setup SFDC as the IdP for SAML 2.0 based SSO with a third party web application called, say, ACME.  The use case is thus:   User navigates to a Contact record User clicks on custom button User is redirected to ACME (SAML authentication happens)   What's special:   The ACME web app takes some data in the <saml:Attribute/> attribute The custom data is based on fields from the Contact the user initiated the process   The proposed design:   Setup VFPage1 to be opened on click of the custom button, pass contact Id While setting up the Service Provider settings for ACME, provide the full URL of VFPage2 as the ACS URL From the controller of VFPage1, invoke the IdP URL (provided by SFDC) and pass any additional parameters received (ie. contact Id) [redirect to a PageReference of this URL] (Assumption) VFPage2 will receive the SAMLResponse as well as the parameters passed from VFPage1 (ie. contact Id) Query contact fields as required, populate  <saml:Attribute/> as required and modify SAMLResponse Do a form post of the modified SAMLResponse to ACME   The challenge:   The assumption in the proposed design is not valid. The IdP URL discards any parameters passed to it unless hard coded in the ACL URL setup   Edit: Another problem is that, the signature/digest is no longer valid because the SAML is now modified. Is there a way to sign it post the change? (Maybe I'll post it as a different question)  The solution:  ??


BTW I don't consider this a duplicate as I am strictly speaking not troubleshooting codecs.  I have no problem playing you tube videos, if they are started from within the youtube website.  Ubuntu 12.04 LTS  Linux xxxx 3.8.0-35-generic #52~precise1-Ubuntu SMP Thu Jan 30 17:24:40 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux   Consistently, if I copy a link to a Youtube clip from any source, say Pidgin, and paste&go said link into Chromium, it results in "This video is currently unavailable". If I go to the same video after searching for it from Youtube, still in chromium, video runs just fine.  This would imply it has nothing to do with flash/html5/chromium-codecs-ffmpeg.   Videos work fine if I start them from the Youtube site.  Videos fail if I paste&go copied links.    In fact, if I pick a random video which is playing.  Copy the URL. Open a new tab and paste&go, it results in the "This video is currently unavailable" message.  So far, no explicit question in here, so I guess I should ask one. Where would I even begin troubleshooting this?    Asked to edit my "question" with what I've done to TS from thread   I have tried uninstalling and reinstalling chromium-codecs-ffmpeg, as well as the -extra variant.  claims I am using the default player and presents me the option to try html5.  This would imply I am not using html5. I have cleared cookies.  Once I realized chromium has no problems with playing any video if I start it from a link within the youtube site, I really stopped troubleshooting the actual player.   I can play any video, I just have to start it from within the youtube page. It is when I paste&go from a copied link that it always results in the error message.  I have not tried a proxy. I can do that later and update.  Proxying makes no difference.

Chromium on Ubuntu 12.04. Youtube says:     This video is currently unavailable   I don't know why but this is the case for some videos, but not all. Well, most videos. And I don't know what's wrong.  Anyone help?


I'm learning about regular expressions and trying to make an expression that will match only those strings which are written in double quotes and for that my expression is : "\S*" and target string is <aname="Name4"text="Super"> but the expression is matching whole string after first double quoted string is found. I'm using this  for testing an expression

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


I am getting this while trying to compile literally my first document  This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=latex)  restricted \write18 enabled. entering extended mode (./t1.tex LaTeX2e <2015/01/01> Babel <3.9l> and hyphenation patterns for 79 languages loaded. (/usr/local/texlive/2015/texmf-dist/tex/latex/base/article.cls Document Class: article 2014/09/29 v1.4h Standard LaTeX document class (/usr/local/texlive/2015/texmf-dist/tex/latex/base/size10.clo)) (./t1.aux) ! Undefined control sequence. l.6 \latex  ?

I want to get that fancy LaTeX symbol to put in one of my documents but I cannot find it anywhere.  All searching for things like latex symbol have not resulted in the symbol but other symbols.


Noobie programmer here, just learning class templates for c++.  My current project requires me to make a template class that can take ints, doubles, or strings as parameters.  So far, every time I have created the implementation of the class functions, i have to make 3 of each function (one for each parameter type).  My question is, if the implementation of a particular class function is exactly the same regardless of the parameter type, is there a way to just write one implementation for it?  Thanks in advance to all replies!

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


So start off contradiction proofs by assuming the opposite. So we assume f is a homeomorphism from ℝ to [0, 1]. Since f is a surjection, there exists some 𝑎 ∈ ℝ with $f(𝑎) = 0$. Let $x_1 = 𝑎 – 1$ and $x_2 = 𝑎 + 1$. Since f is an injection, and since $x_1≠ x_2 ≠ 𝑎$,we know that $f(x_1) ≠ f(x_2) ≠ 0$. Let $M = min \{ f(x_1), f(x_2) \}$. I know I have to use the intermediate value theorem at some point but I'm stuck at the next step.

Prove that $[0,1]$ isn't homeomorphic to $\mathbb{R}$  My first thought is that there can not be a continuous bijection, $f$, from $[0,1]$ to $\mathbb{R}$ because a continuous function that maps $[0,1]\rightarrow \mathbb{R}$ must be bounded so there can't be a surjection. So that would then be the proof.   Though I believe I am incorrect in my thinking because a hint for the assignment says to use the intermediate value theorem. That is "Suppose $f:[a,b]\rightarrow\mathbb{R}$ is continuous. If $f(a)<\delta<f(b)$ or $f(b)<\delta<f(a)$ then $\delta=f(c)$ for some $c\in[a,b]$".   Why is my first thought wrong and how is the IVT useful?


I'm new to asp.net mvc. I see nasty little red underlines on my .cshtml page in some razor code with errors in the error list, but the project still builds. Can I fail the project build somehow if these errors are about?  As an aside, if I rename a variable in a c# class referred to in a razor page, why doesn't the refactor tool extend its reach to the cshtml file?

I want an msbuild task to compile the views so I can see if there are compile time errors at well... compile time.  Any ideas?


These answer are no longer valid!  and  and   Can someone post a picture of where the logout button is, I've searched everywhere for it! I really can't find it.  In this post () they mention that it is in the site switch, but I can't find it there either

In the previous version the logout button is under your username, which it can be found by clicking the down arrow. However, in the new version, after a couple minutes of searching, it is under the "site-switcher" button:        This is really illogical since the logout button is usually under your username, including Google and Yahoo! services.  I suggest bringing back the  which will definitely benefit new users and even old users.


I don't know if what I am trying to do is possible in C# and I couldn't find an answer online. I have 4 enemy objects. One of them dies. I want that enemy to be removed from the array. If the enemy is in the middle of the array, I want the next enemy to take its spot so that the array does not have empty spots in the middle. Here is the code (where I wrote "//remove here" is where I want the object to be removed):      public static int numberOfEnemies = random.Next(1, 4);     // create 1-4 enemies     public static Enemy[] enemyNumber = new Enemy[numberOfEnemies];      // initialize enemies    int h = 0;          do          {                enemyNumber[h] = new Enemy(playerLevel);                h++;                System.Threading.Thread.Sleep(25);          } while (h != numberOfEnemies);      // code where the fight happens i did not include     // enemy dies     if (enemyNumber[0].Ehealth <= 0){                 {                     Console.WriteLine("Enemy {0} is dead!", eName);                     // remove here                 }     }

I have an array of Foo objects. How do I remove the second element of the array?  I need something similar to RemoveAt() but for a regular array.


If I have an array that looks like this:  $members = array( array(     'id'=>2,     'name' => 'Bob',     'status' => 1     ), array(     'id'=>4,     'name' => 'Fred',     'status' => 1     ), array(     'id'=>5,     'name' => 'Sally',     'status' => 0     ), array(     'id'=>1,     'name' => 'Fred',     'status' => 1     ), array(     'id'=>3,     'name' => 'Jane',     'status' => 0     ), );   How can I sort the entries so that they show in alphabetical order by name?

I have CSV data loaded into a multidimensional array. In this way each "row" is a record and each "column" contains the same type of data.  I am using the function below to load my CSV file.  function f_parse_csv($file, $longest, $delimiter) {   $mdarray = array();   $file    = fopen($file, "r");   while ($line = fgetcsv($file, $longest, $delimiter))   {     array_push($mdarray, $line);   }   fclose($file);   return $mdarray; }   I need to be able to specify a column to sort so that it rearranges the rows.  One of the columns contains date information in the format of Y-m-d H:i:s and I would like to be able to sort with the most recent date being the first row.


I want to populate 1 column with another column decrypted values, the code works once, but when i press the button again i get the error "Cross-thread operation not valid".      private DataTable LoadData()     {         var dt = new DataTable();         DataSet DS = new DataSet();         mySqlDataAdapter.Fill(DS);         dt = DS.Tables[0];         dataGridView1.DataSource = dt;          dt.Columns.Add("Key");         return dt;     }      //Thread - > How i can use the LoadData().Rows to not get the cross thread error ?     public void LoadKeyColumnValues()     {         try         {   //The error is here -> LoadData().Rows             foreach (DataRow r in LoadData().Rows)             {                r["Key"] = Decrypt(r.Field<string>("EncryptedColumn"));             }         }         catch (Exception _ex)         {             MessageBox.Show(_ex.ToString());         }         finally         {             LoadKeyColumn.Abort();         }      }

I have a scenario. (Windows Forms, C#, .NET)   There is a main form which hosts some user control. The user control does some heavy data operation, such that if I directly call the UserControl_Load method the UI become nonresponsive for the duration for load method execution. To overcome this I load data on different thread (trying to change existing code as little as I can)   I used a background worker thread which will be loading the data and when done will notify the application that it has done its work.   Now came a real problem. All the UI (main form and its child usercontrols) was created on the primary main thread. In the LOAD method of the usercontrol I'm fetching data based on the values of some control (like textbox) on userControl.    The pseudocode would look like this:  CODE 1  UserContrl1_LoadDataMethod() {     if (textbox1.text == "MyName") // This gives exception     {         //Load data corresponding to "MyName".         //Populate a globale variable List<string> which will be binded to grid at some later stage.     } }   The Exception it gave was     Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on.   To know more about this I did some googling and a suggestion came up like using the following code  CODE 2  UserContrl1_LoadDataMethod() {     if (InvokeRequired) // Line #1     {         this.Invoke(new MethodInvoker(UserContrl1_LoadDataMethod));         return;     }      if (textbox1.text == "MyName") // Now it wont give an exception     {     //Load data correspondin to "MyName"         //Populate a globale variable List<string> which will be binded to grid at some later stage     } }   BUT BUT BUT... it seems I'm back to square one. The Application again  become nonresponsive. It seems to be due to the execution of line #1 if condition. The loading task is again done by the parent thread and not the third that I spawned.  I don't know whether I perceived this right or wrong. I'm new to threading.  How do I resolve this and also what is the effect of execution of Line#1 if block?  The situation is this: I want to load data into a global variable based on the value of a control. I don't want to change the value of a control from the child thread. I'm not going to do it ever from a child thread.   So only accessing the value so that the corresponding data can be fetched from the database.


could you please help with the proof?  If a category $K$ has pullbacks.  For composable morphisms $f: A\to B$ and $g: B \to  C,$ if $g$ and $f$ are extremal epimorphisms, prove that $gf$ is an extremal epimorphism.  The definition of extremal epimorphism I have been given is:  A morphism $e: A \to B$ is an extremal epimorphism when for each commutative diagram $e: A \to B,$  $f: A \to C$, $m: C \to B$ ($e= mf$) if $m$ is monic, then $m$ is an isomorphism.  I have let $f = mk$ and $g = nh$,  then I have drawn out the pullbacks of $f$ and $m,$ and of $g$ and $n$.  I don't know where to go from here.

let $K$ be a category with equalizers, show that every extremal epimorphism is epic. for composable morphisms $f: A \rightarrow B $ and $g: B \rightarrow C$ in $K$, show that if $gf$ is an extremal epimorphism, then $g$ is an extremal epimorphism. let $K$ be a category with pullbacks.  For composable morphisms $f$ and $g$ as given in #2, show that if $g$ and $f$ are extremal epimorphisms, then $gf$ is an extremal epimorphism. show that if an extremal epimorphism is monic, then it is an isomorphism.   here is what I know:  In any category $K$, an arrow $f: A \rightarrow B$     is called an isomorphism if there is an arrow $g: B \rightarrow A$ in $K$ such that $ g \circ f = I_{A} $ and $ f \circ g = I_{B}$ is called a monomorphism, if given any $g,h : C \rightarrow A, fg=fh$ implies $g=h$ is called an epimorphism, if given any $i,j: B \rightarrow D, if = jf$ implies $i=j$ is an extremal epimorphism, if for each commutative diagram, $f = mh$ where if $m$ is monic, then $m$ is an isomorphism   I have tried to answer #2:     since $gf$ is an extremal epimorphism, then $gf = mh$ where $m$ is monic and an isomorphism. now let $g = nk$ where $n$ is monic.     I now need to show that $n$ is an isomorphism.  my problem is how do I do this?  I'm trying to visualise things using diagrams, but I'm lost.  Here is what I have so far for #1:  let $f: A \rightarrow B$ be and extremal epimorphism.  consider $ g,h: B \rightarrow C$ such that $gf=hf$ so I need to prove $g=h$  let $e: E \rightarrow B$ be the equaliser of $g, h$  now I don't know where to go from here to prove $g=h$.    I know that $f$ factors through the equaliser.  since $e$ is an equaliser, there is a unique morphism  $\varphi : A \rightarrow E$ therefore I now have $f=e \varphi$   which means that $e$ is now isomorphic since $f$ is an extremal epimorphism.    So can I now conclude $g=h$ ?


I have a file called row_list.xml which holds the style of a CardView. This CardView is the root object of this xml file. I'm using this CardView in a RecyclerView in my activity_main. row_list.xml <?xml version="1.0" encoding="utf-8"?> <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     android:id="@+id/card_view"     android:layout_width="wrap_content"     android:layout_height="wrap_content">      <LinearLayout         //codes>          <TextView             //codes />      </LinearLayout>  </androidx.cardview.widget.CardView>  In my MainActivity.java I want to get the current height of this CardView, and then use this height for something. But when I call the code below, I got Attempt to invoke virtual method 'int androidx.cardview.widget.CardView.getHeight()' on a null object reference. MainActivity.java public class MainActivity extends AppCompatActivity {      CardView cardView;      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);      cardView = findViewById(R.id.card_view);      System.out.println(cardView); //prints null      int height = cardView.getHeight(); //I get "null" object error  Why does cardView = findViewById(R.id.card_view) returns null? How can I get the attributes of a CardView? Couldn't find a related question/solution on the web. Edit after comment     @NonNull     @Override     public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {layoutInflater = LayoutInflater.from(context);          View v = layoutInflater.inflate(R.layout.row_list,parent,false);         ViewHolder vh = new ViewHolder(v);         return vh;     }

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?


If the graph was regular, that would be easy to show it. Choose one vertix from $300$, then there are $300-1-2=300-1\cdot3=297$ vertices that are not chosen and non-adjacent to chosen ones. Choose one from $297$, then there are at least $300-2-2\cdot2=300-2\cdot3$ vertices that are not chosen and non-adjacent to chosen ones, etc. When we have chosen the $99$-th vertices, there are at least $300-99-99\cdot2=300-99\cdot3=3$ vertices that are not chosen and non-adjacent to chosen ones, choose the last one from them. If the graph it's not regular, I think, we should choose the vertix that has the smallest degree in the induced subgraph  whose vertex set is the set of vertices that are not chosen and not adjacent to chosen ones. But it doesn't help me to show that we can always do it (that this set is not empty on any of our 100 steps of choosing.

Let $G$ be a graph with the same number of vertices and edges and maximum degree of 3.  For reasons that I will explain, I believe that a  minimum vertex cover has size at most $\frac{2}{3} |E(G)|$.   I might very well be wrong and if you have a counter example, that will solve it!  Note that G is not necessarly connected, otherwise we have $\tau (G) \leq \frac{1}{2} (|E(G)|+1)$ and this solves the problem.  My intuition comes from the following observations:  If all vertices are of degree $2$, then the worst case is if the graph is just a set of triangles, then we have exactly $\tau (G) = \frac{2}{3} |E(G)|$.   If there is no single edge in the graph, the results holds. (Any connected grah of size at least 4 has $\tau (G) \leq \frac{2}{3} |E(G)|$)   If there is a single edge, then we have two vertices of degree $1$ and also two vertices of degree $3$. Those two vertices of degree $3$ should help in maintaining the minimum vertex cover below a certain bound (this is the intuition part).  I tried to create some bad cases with graphs containing single edges. I believe that one of the worst case is if the graph has 2 single edges and a K4. Then  $|E(G)|=|V(G)|=8$ and $\tau (G)= \frac{5}{8} |E(G)|$, the result still holds.  I never really worked on vertex cover, so I am probably missing some important results that would help solving this problem. Also my intuition on this area is probably kind of weak.  Thanks a lot


I've been making simple bash functions for this with find -exec or parsing ls or using bash globbing etc each time I had a big problem and I had to go to a new method one time it was argument list too long another time files that already had a name like 2 was overwritten when another file was being renamed to 2.  One time it was a problem with unicode, one time with space in the file name, one time with * or & in the filename and so on. So I thought I'd come here and ask you people for the most efficient and robust general purpose way to rename all the files in a directory to have sequential names no matter what!. No matter how long the names of the files are and no matter what their original name is or what extension they have and no matter if they have non-ASCII characters in them.  So my requirements are:   That it works with long filenames. That it works with unicode characters. That it works if the files have space or special characters in them. That it does not overwrite any file on another. That it is as fast as possible:D


Currently i am doing BE in cs. Is it possible to apply for a graduate program in theoretical physics without having a bachelor's degree in physics or mathematics?

Can I be admitted to graduate school in a different field from my degree?  Specific cases include:   If I've taken plenty of advanced courses in field X in the process of completing a degree in another field, can I apply to graduate school in X? What if I haven't taken many courses in X, but I have acquired a good grasp of X through self-study or working in a related field? What if I've never studied X, but I have done very well in an unrelated field?  Could I be admitted to graduate school in X on the basis of general intellectual promise, and then make up the missing background after enrollment?   Note that this question is an attempt to provide a comprehensive answer, to avoid the need for a profusion of field-specific questions on this topic (see the associated ). Please feel free to edit the question or answer to improve them.


I have a requirement to hide custom button when condition is satisfied.On case I have person_role field.If the field is null then I need to hide custom button on vf page.  <apex:commandButton value="Confirm" action="{!Confirm}" />  if(case.Person_Role__c==NULL){           ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO,'order cannot be created'));   Any help

I have an overwritten edit page for my custom object, which have different record types with different fields.  The simplified desktop version of this VF page looks like this:  <apex:page standardController="CustomObject__c" extensions="CustomObjectCtrlExt" >      <apex:form>          <apex:pageBlock>                       <apex:pageBlockButtons >                 <apex:commandButton value="Save" action="{!save}"/>                 <apex:commandButton value="Cancel" action="{!cancel}"/>                             </apex:pageBlockButtons>              <!-- Record Type 1 -->             <apex:pageBlockSection rendered="{!recordtypename == 'RecordTypeName1'}" >                 ...             </apex:pageBlockSection>               <!-- Record Type 2 -->             <apex:pageBlockSection rendered="{!recordtypename == 'RecordTypeName2'}" >                 ...             </apex:pageBlockSection>               <!-- Record Type 3 -->             <apex:pageBlockSection rendered="{!recordtypename == 'RecordTypeName3}" >                 ...             </apex:pageBlockSection>                ...        </apex:form>  </apex:page>   Now I want to create a second VF page for my mobile users with HTML 5.  How do I implement the conditional rendering with HTML 5 ?  Of course, something like <div rendered="{!recordtypename == Name1}"> doesn't work.


If $0 \to L \to M \to N \to 0$ is a short exact sequence of $A$-modules then the following statements are equivalent:   There is an isomorphism $M \cong L \oplus N$ under which $L \to M$ is given by $m \mapsto (m, 0)$ and $M \to N$ by $(m, n) \mapsto n$. There exists a section of $M \to N$.   I understand that the condition "there is an isomorphism $M \cong L \oplus N$" is much weaker than the condition 1. above, so      I wonder if there are some simple $M, L$ and $N$ such that $M \cong L \oplus N$, but there is no section of $M \to N$.

Recently, someone stated that every short exact sequence (of, say, modules) of the form $$0 → M → M \oplus N → N → 0$$ splits. I think this is false in general because the arrow $M → M \oplus N$ might not be the natural inclusion. (The difference pointwise isomorphic/diagramwise isomorphic.)  Maybe one can realize an arrow $M\oplus N → N$ with a kernel isomorphic to $M$, but not being an (internal) direct summand of $M \oplus N$? I tried something along the lines of $ℚ$ and $ℚ/ℤ$, but I have been unsuccessful so far.  Can anyone provide me with a counterexample?


I have a problem printing with google satellite maps in QGIS. In the composer it's all right, but in the pdf file some portions of the image are in a different scale and in a different position.  An image can talk more then 1000 words…    EDIT: My problem isn't misalignment, and the problem occurs independently from size or position. It's something like the bug of which talk about in . How can you watch in the image that I inserted before, the correct image is the portion at the center, while the rest is in a scale smaller (the street above can't be bigger than the houses).

I've been trying to export a few map layers using QGIS print composer. First, I loaded the layers and opened the composer using Project -> New Print Composer:    Gave it a proper name:   Added a new map:   Exported as image:   However, the outcome is shifted a few dozens of kilometers westwards:   This specific west shift is inconsistent; sometimes I experience a smaller shift or a shift in another direction. Moreover, the scale often changes too - which makes map exporting impossble.  I'm using the newest QGIS version:   Any idea how to export the image properly? I'm currently using screenshots, which are a poor solution.