I'm going to optimize the hyperparameters of a Random Forest Regressor using scikit-learn and GridSearchCV, with the following code: from sklearn.model_selection import GridSearchCV param_grid = {     'bootstrap': [True],     'max_depth': [30,40,50,60,79],     'min_samples_leaf': [5,10,15,20],     'min_samples_split': [10,12,14,16,20],     'n_estimators': [80,100,110,120] }  rf = RandomForestRegressor()  grid_search = GridSearchCV(estimator = rf, param_grid = param_grid,                            cv = 10, n_jobs = -1, verbose = 2) grid_search.fit(X_train, y_train) def evaluate(model, test_features, test_labels):     predictions = model.predict(test_features)     errors = abs(predictions - test_labels)     mape = 100 * np.mean(errors / test_labels)     accuracy = 100 - mape     print('Model Performance')     print('Average Error: {:0.4f} degrees.'.format(np.mean(errors)))     print('Accuracy = {:0.2f}%.'.format(accuracy))          return accuracy      print (grid_search.best_params_)  best_grid = grid_search.best_estimator_ grid_accuracy = evaluate(best_grid, X_test, y_test) print (grid_accuracy)  The performances after the optimization decrease in terms of RMSE. Basically, just using the standard library call the RMSE is lower than the RMSE with hyperparameters optimization. is it possible?

I am trying recently to optimize models but for some reason, whenever I try to run the optimization the model score in the end is worse than before, so I believe I do something wrong. in order to optimize my model I define param grid and than fit with the train data and then according to the results run again with nre parameters, e.g- #ROUND 1 param_grid={     'max_depth': [3,4,5],     'learning_rate':[0.1,0.01,0.05],     'gamma': [0,0.25,1.0],     'reg_lambda':[0,1.0,10.0],     'scale_pos_weight':[1,3,5] }  grid_search = GridSearchCV(estimator = clf_xgb, param_grid = param_grid,                            cv = 3, n_jobs = -1, verbose = 2) grid_search.fit(X_train,y_train) grid_search.best_params_  >>>.....   (and now based on the result changing the params...) after this step I choose the best hyperparameters and run the model; clf_xgb=xgb.XGBClassifier(seed=42,                          objective='binary:logistic',                          gamma=0,                          learn_rate=0.7,                          max_depth=6,                          reg_lambda=0.8,                          scale_pos_weight=1,                          subsample=0.9,                          cilsample_bytree=0.5)  clf_xgb.fit(X_train,            y_train,            verbose=True,            early_stopping_rounds=10,            eval_metric='aucpr',            eval_set=[(X_test,y_test)])  The problem is that when I check the model score clf_xgb.score(X_test,y_test)  I always get lower score than what I got before the optimization which makes me suspect that I'm missing something in the way doing it/basic principle in this process. Is it possible that after running the optimization my score won't get better (and even worse?) ? Where is my mistake? Are there other parameters that could influence or improve my model?


Let $K$ be a field and $A$ an affine $K$-algebra. Show that $A$ has (Krull) dimension zero (is artinian) if and only if it is finite dimensional over $K$.

Atiyah Macdonald, Exercise 8.3. Let $k$ be a field and $A$ a finitely generated $k$-algebra. Prove that the following are equivalent:   (1) $A$ is Artinian.   (2) $A$ is a finite $k$-algebra.   I have a question in the proof of (1$\Rightarrow$2): By using the structure theorem, we may assume that $(A,m)$ is an Artin local ring. Then $A/m$ is a finite algebraic extension of $k$ by . Since $A$ is Artinian, $m$ is the nilradical of $A$ and thus $m^n=0$ for some $n$. Thus we have a chain $A \supseteq m \supseteq m^2 \supseteq \cdots \supseteq m^n=0$. Since $A$ is Noetherian, $m$ is finitely generated and hence each $m^i/m^{i+1}$ is a finite dimensional $A/m$-vector space, hence a finite dimensional $k$-vector space.  But now how can I deduce that $A$ is a finite dimensional $k$-vector space?


I have recently gotten an "Adobe Creative Cloud" account. I am wanting to experiment with some of the apps, so I was thinking of downloading the entire set of apps for Creative Cloud and just start learning some, see what might, and might not benefit me as an IT guy.  I have a Windows 7 - 64 bit - Alienware MX17 that is about 2-3 years old. No issues with it ever, besides two times overheating/shutting down, where I had to send it to someone and have it cleaned, and thermal paste applied (twice in it's lifetime). Overall I get great performance, and no drag. I work and game on it "a lot".  I have 176 free out of 500, but a good bit of that are Comics.  Anyway, I installed Dreamweaver, Photoshop and a few others with no difference on performance. If I just go through and download them all, will it affect my overall performance when gaming or anything else, or does it not matter how much you have installed on it..as long as it's limited on what is running at a given time?  Thanks!

I have always heard that it's a bad idea to install lots of software on a Windows machine, and new software should always be tested in a virtual machine so as to not permanently affect the operating system. But does the actual act of installing a piece of software really slow down the Windows OS? Or is it more due to the programs themselves running a bunch of background services?  To rephrase my question, if I were to continuously install software but then remove it later, would Windows still slow down?


I have a very simple question, I see advance level programmers do not store values in any variable before returning.  They simply use the return statement.  public static decimal GetChargesF(int selectedUnitType, int insuranceTypeId) {         return GetMoveIn(selectedUnitType, insuranceTypeId); }   Now my question is, how does it help during debugging. If I had one variable to store the return value before actually returning then I would have debugged much faster. As of now the only way for me is to go to the calling function and see the values returned. Is this expected or there is some way to know the values without storing in any variable. Is there any way to put the breakpoint on the return statement and see the values.

Take the following function:  DataTable go() {     return someTableAdapter.getSomeData(); }   When I set a breakpoint in this function, is there a possibility to inspect the returned value? go() is directly coupled to a datagrid in an .aspx page.  The only way to inspect the returned datatable is to use a temporary variable. However, that's a bit inconvenient. Isn't there another way?


I am looking for what type of switch is only only for a split second (1 second max) even when held.   Basically: Press and hold button-->LED only on for a split second and back off even though I am still holding it. If It is not a 'Switch' then what would I need to do to accomplish this.  EDIT: The Reason I Posted this one is because I'm a beginner, I have No Idea what a Logic Gate is. Is the a component I can just buy?

I'm trying to make a circuit (with no programmable circuits, only logic gates, flip flops and latches) that outputs a short impulsion each time it's input toggles from 0 to 1. Do you have any idea of how to do so?


I need to add ArcGis 10.1 rest services to openlayers. Can any one share the ideas, it would be great.

I'm new in OpenLayers. I'd like to use mapservice of ArcGIS server 10 in open layers.I search and found examples of  using an ArcGIS Server 9.3 Rest API layer for OpenLayers. I found OpenLayers.Layer.ArcGIS93Rest instance but not ArcGIS 10 . How can I use ArcGIS server 10 services in Openlayers? I wrote the below code . I use ArcGIS server 10 and The REST is working right .  <!DOCTYPE html>  <html lang='en'> <head>      <title>My OpenLayers Map</title>        <script type='text/javascript' src='OpenLayers.js'></script>     <script type='text/javascript'>          var map;          function init() {            map = new OpenLayers.Map('map_element',{}); var arcgis = new OpenLayers.Layer.ArcGIS93Rest("MyName","http://xxxxxxx/ArcGIS/rest/services/test/MapServer",            {layers: "show:0,1,2,3,4"});                      map.addLayers([arcgis]);                      }      </script> </head>  <body onload='init();'> <div id='map_element' style='width:1000px; height:500px;'> </div> </body> </html>


By truly random I mean that IF we knew the position and velocity of every particle in radioactive isotope, could we predict when the decay would happen?

I'm not sure if this is the right place to ask this question. I realise that this maybe a borderline philosophical question at this point in time, therefore feel free to close this question if you think that this is a duplicate or inappropriate for this forum. Anyway, I'm an electrical engineer and I have some basic knowledge of quantum mechanics. I know that Schrödinger's equation is deterministic. However, quantum mechanics is much deeper than that and I would like to learn more. If this question is not clearly answerable at this point than can anyone point out some recognized sources that try to answer this question. I would appreciate it if the source is scientific and more specifically, is related to quantum theory.


I have a site with 3 category levels in some areas, 2 category levels on another areas and only one category level in other areas prior to the content. I am trying to settle in on the most consistent URL patterns. From what i have read shorter is better, so i am hesitant to show all three categories as my content titles are multi-word as well as my categories.   So if I were to shorten this:  domain.com/clothes/pants/jeans/Levi-skinny-jeans  Is it better to keep the functional URL from the parent category, and go to content skipping the 2 sub categories?  domain.com/clothes/Levi-skinny-jeans  Or would it be better to keep the immediate context though the URL doesn't represent the path properly?:  domain.com/jeans/Levi-skinny-jeans  Any help would be appreciated.

Let’s take an example of a movie site. So a well structured set of URLs for this site can be:     Movie page - example.com/movies/the-matrix Review for movie - example.com/movies/the-matrix/reviews Trailers for movie - example.com/movies/the-matrix/trailers Specific trailer for movie - example.com/movies/the-matrix/trailers/trailer1   where it’s possible to navigate the resource even by directly deleting/appending resource name seamlessly.  For SEO purpose I read somewhere that for two given pages, Google will prefer the page which have search query up in the URL hierarchy among other things. So for the given 2 URLs and the query "the matrix trailer"    example.com/movies/the-matrix/trailers example.org/trailers/the-matrix/    `     Google might prefer the second URL as it has the keyword "trailer" at first level comparing to first URL which has "trailer" at 3rd level (a resource deeper in URL hierarchy may be less important).    If it is correct, one may be tempted to create URL hierarchy somewhat like      Movie page - example.com/movies/the-matrix Review for movie - example.com/reviews/the-matrix/ Trailers for movie - example.com/trailers/the-matrix/ Specific trailer for movie - example.com/trailers/the-matrix/trailer1     which will break the seamless hierarchy.    My questions are:   Is it true that resource deeper in URL hierarchy is tend to be less important when comparing to URLs of other site?   Is sacrificing meaningful, seamless hierarchy worth for this SEO optimization?


In any metric space X, the sets ∅ and X are always closed.   Hello, I need help in proving this statement. I'm not exactly sure where to start. I have tried to teach myself the definitions, however it hasn't been successful. In class, we have only learned about closed sets.   Can you please walk me through this proof/ how to approach this problem? I'd really like to know how to use the definitions and understand the logic.

I'm not sure how to approach the proof for this. I know this statement is vacuously true, because the empty set does not contain any accumulation points. But I'm having a hard time writing a proof for this. I have looked at other answers on here, however we have not learned what a "ball" is in lecture.


I want that admins can update rights for users, because admins can also add more rights I need to  get the row from a $_GET and put it in the query;          if(isset($_GET['flip'], $_GET['userid'],$_GET['newval'])) {             switch($_GET['newval']) {                case 1:                     $upd = $db->prepare("                         UPDATE premissions                         SET ? = '1'                         WHERE userId = ?                     ");                     break;                case 0:                default:                      $upd = $db->prepare("                         UPDATE premissions                         SET ? = '0'                         WHERE userId = ?                     ");                     break;                                    }               $upd->execute(array($_GET['flip'], $_GET['userid']));         }   But now I get this error message:     Fatal error: Uncaught exception 'PDOException' with message   'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an   error in your SQL syntax; check the manual that corresponds to your   MySQL server version for the right syntax to use near '? = '1' WHERE   userId = ?' at line 2'   I understand that something is wrong with the syntax but I don`t know how to fix it.

Why can't I pass the table name to a prepared PDO statement?  $stmt = $dbh->prepare('SELECT * FROM :table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) {     var_dump($stmt->fetchAll()); }   Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do  $sql = "SELECT * FROM $table WHERE 1"


I have some count data I am trying to model. The variance is very close to the mean, so the Poisson distribution for the entire data set seems like a good starting point. I have done and it seems to work reasonably well. But I would like to go further and model the data set over time with time-dependent parameters, and allow the model to go through periods of over and under dispersion. The negative binomial and binomial distributions seem like reasonable choices for each case, respectively. But modeling the data in this way is awkward - I am forced to have switch-points in the model where to goes from binomial to negative binomial as the variance changes between over and under dispersion.   Is there a single model that handles over AND under dispersion? Something that would likely reduce in some limit to a binomial in one limit, and a negative binomial in another limit?  One though I had is that since a negative binomial distribution is just a Gamma-Poisson mixture, simply create a XXX-Poisson mixture, where I need to find a suitable XXX distribution. This will likely result in an integral that cannot be represented in closed form, so I was trying to avoid this if there is already an off-the-shelf distribution to use for such cases.   Thanks in advance!

I have a mean $\mu$ and a variance $\sigma^2$ with underdispersion, i.e., $\sigma^2<\mu$. Is there a standard discrete distribution with these moments and unbounded-on-the-right support, i.e., support on $\{0, 1, \dots\}$?   Bonus points if it is implemented in R.     I looked at the , but that is only defined if the size parameter $\frac{\mu}{1-\frac{\sigma^2}{\mu}}$ is an integer. The binomial and binomial compounds like the  have bounded support. So does the Generalized Poisson distribution () in the case of underdispersion, plus it can only handle underdispersion to a certain degree (note that Consul & Jain require $|\lambda_2|<1$ in formula (3.1)). The Generalized Poisson is Joseph Hilbe's main recommendation in . His other recommendations might be useful, but he gives no details on them, and searching for the names is not very successful.  is related but does not have a helpful answer. Quasi-Poisson models sound like they may be useful (e.g., ), but I haven't been able to find anything helpful outside the context of a regression.


Is there a decent file manager with ?  I found marlin and dolphin so far. I like marlin, but it's seems quite buggy. Dolphin I like not so much. It lets me choose between single and double click to open files, but if i choose double click, this also applies to folders in columns view. Are there alternatives?  EDIT: Columns view was removed from Dolphin altogether.

How can I navigate folders and subfolders at the same time?  Like "column view" in Mac OS X.    Edit 2: I use Ubuntu 14.04 and I couldn't install Marlin, so I installed "Pantheon File Manager" instead.


I use a laptop running Windows 7 with a docking station and a pair of monitors (one large).  Naturally, when working this way I size my windows to take advantage of the available real-estate.  When I undock the laptop it resizes (and moves) everything to fit on the smaller laptop screen, which makes sense for applications that currently have open, on-screen windows.  However, it also does this to my minimized windows, so if I minimize something, undock, dock, and then bring it back up, it's been adjusted for laptop display.  I find this pretty annoying; some of my greedier applications (IDEs and browsers) are laid out pretty carefully and this messes that up, every single time.  My current work-around is to exit applications I want to "defend" from this before undocking, but is there a less-disruptive way to preserve this state?  I've looked around in the control panel but haven't found anything there.  This is my first experience with laptop+dock, so I don't know if this issue arises on other operating systems.

I'm  on a windows 8 laptop and I have two external monitors I hook up to it. Whenever I take the laptop somewhere (and have to disconnect my monitors), the windows all go to my small laptop screen, naturally.  Its super annoying to reposition every single window every time i reconnect. When I reconnect my monitors, I'd like the windows to appear back where they were before I disconnected. How can I do this?


Lindsay and Simon have discovered a new pub that has n different beers B1, B2, . . . , Bn, where n ≥ 1 is an integer. They want to try all different beers in this pub and agree on the following approach: During a period of n days, they visit the pub every day. On each day, they drink one of the beers. Lindsay drinks the beers in order, i.e., on the i-th day, she drinks beer Bi . Simon takes a uniformly random permutation a1, a2, . . . , an of the set {1, 2, . . . , n} and drinks beer Bai on the i-th day. Let X be the random variable whose value is the number of days during which Lindsay and Simon drink the same beer. Determine the expected value E(X) of X. (Hint: Use indicator random variables.)  Not too sure on how to go about this question? All help is greatly appreciated!

During a period of $n$ days, two persons drink beers, one each. There are $n$ different beers $B_1, B_2, B_3,\ldots, B_n$, where $n\geqslant 1$ is an integer. t Person1 drinks the beers in order, i.e., on the $i$-th day, she drinks beer $B_i$. Person2 takes a uniformly random permutation $a_1, a_2, \ldots, a_n$ of the set $\{1, 2,\ldots, n\}$ and drinks beer $B_{a_i}$ on the $i$-th day. Let $X$ be the random variable whose value is the number of days during which person 1 and person 2 drink the same beer. Determine the expected value $\mathbb E(X)$ of $X$.  I know that I should let $X$ be the number of days during which both persons drink the same beer. And  $$ X_i = \left\{\begin{array}{rc} 1,&\text{if they drink the same beer on the }i\text{-th day} \\ 0,&\text{if they drink different beers on the }i\text{-th day}\end{array}\right. $$  Then  $$\begin{align} \mathbb E[X_i] &= 1\cdot P(X=1) = P(\text{Person 1 and Person 2 drink beer }i) \\&= P(\text{Person1 drinks beer }i)P(\text{Person 2 drinks beer }i) \\ &= 1\cdot P(\text{Person 2 drinks beer }i) = \frac{1}{(n-i)!} \end{align}$$   So, is my approach right? If it's will the next step be: $\mathbb E(X) = n\cdot\frac{1}{(n-i)!}$?


I need to wrote the follwing task that will be part in my bash script  we want to match all lines with UUID words in fstab file according to the following rules:  UUID is in begging of file or beginning after space or spaces or tab  example  UUID="61e9e16f-eb49-4c97-aaf0-0ed2dc3f3007"       UUID="61e9e16f-eb49-4c97-aaf0-0ed2dc3f3007"     UUID="61e9e16f-eb49-4c97-aaf0-0ed2dc3f3007"   second it will not match on the following cases  if UUID is begin after comment "#" or UUID isnt in the beging of file  example  #UUID="61e9e16f-eb49-4c97-aaf0-0ed2dc3f3007"  "61e9e16f-eb49-4c97-aaf0-0ed2dc3f3007" UUID #      UUID="61e9e16f-eb49-4c97-aaf0-0ed2dc3f3007"

we need to add disks on more then 100 redhat machines,  therefore we need to update also the /etc/fstab on each machine  the problem is that some machines configured with UUID and other with ordinary dev in fstab  so I want to make a bash script that will identify the fstab configuration as the following   in case fstab configured with UUID add new UUID lines for each additional disk in case fstab configured with ordinary dev then add new dev lines for each additional disk   so my question is - what is the best approach to identify what configured in fstab  UUID or ordinary dev ?  remark - not include the OS , we talk here only on additional disks in HW machines   here is example of linux machine with UUID conf in fstab  /dev/mapper/vg00-loov_root /                    xfs     defaults      00  UUID=7de1dc5c-b605-4a6f-bdf1-f1e869f6ffb9 /boot                   xfs      defaults        0 0 /dev/mapper/vg00-loov_var /var                    xfs     defaults       00  /dev/mapper/vg00-loov_swap swap                    swap    defaults      00  UUID="fcb73644-4ad3-4b19-85f8-dbb9ed53a871"   /data/sdb                        ext4 defaults,noatime 0 0 UUID="5f56c1d6-266f-4ea2-a8f7-df06f08e01c0"   /data/sdc                        ext4 defaults,noatime 0 0 UUID="4c908671-4045-41e8-a396-a5198978e3ac"   /data/sdd                        ext4 defaults,noatime 0 0 UUID="d44fe62a-72dc-4674-91ac-5a1962797e22"   /data/sde                        ext4 defaults,noatime 0 0 UUID="ee3d8fa8-e000-4abb-a26c-da99499e630c"   /data/sdf                        ext4 defaults,noatime 0 0 UUID="61e9e16f-eb49-4c97-aaf0-0ed2dc3f3007"   /data/sdg                        ext4 defaults,noatime 0 0 UUID="ada12394-0e0b-4657-a148-d85548d7bc75"   /data/sdh                        ext4 defaults,noatime 0 0


Here's a simple code, where I create nested ArrayList that contains ArrayList of String. I found a weird thing: when I clear the inner ArrayList, sizes of inner and outer ArrayLists decrease to 0.  public static void  main(String[] a) {     ArrayList<ArrayList<String>> arrayLists = new ArrayList<>();     ArrayList<String> element = new ArrayList<>();     element.add("1");     element.add("2");     arrayLists.add(element);     System.out.println(arrayLists);      element.clear();     element.add("3");     element.add("4");     arrayLists.add(element);     System.out.println(arrayLists);      element.clear();     element.add("5");     element.add("6");     arrayLists.add(element);     System.out.println(arrayLists); }   The output of that code is:  [[1, 2]] [[3, 4], [3, 4]] [[5, 6], [5, 6], [5, 6]]   I found out how to solve the problem and make output like:  [[1, 2]] [[1, 2], [3, 4]] [[1, 2], [3, 4], [5, 6]]   Instead of clearing inner ArrayList, I initialize it again. Here's the code:  public static void  main(String[] a)     {         ArrayList<ArrayList<String>> arrayLists = new ArrayList<>();         ArrayList<String> element = new ArrayList<>();         element.add("1");         element.add("2");         arrayLists.add(element);         System.out.println(arrayLists);          element = new ArrayList<>();         element.add("3");         element.add("4");         arrayLists.add(element);         System.out.println(arrayLists);          element = new ArrayList<>();         element.add("5");         element.add("6");         arrayLists.add(element);         System.out.println(arrayLists);     }   So the question is: is this intended to be like that (and what's the mechanism behind that) or is it a bug that needs to be reported? I've checked this code step by step using debugger, and I checked that outer ArrayList gets size 0 after element gets cleared.

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


I am trying to determine if a value is set not empty and can include a 0 so... true    | false ---------------- 'value' | not set 0       | '' 1       | NULL 2       | 'test'  |   if (isset($num) && !empty($num)) {      echo '\'' . $num . '\' THIS ONE';   }  I had assumed that checking isset and !empty would do it but it still fails on the 0 Where am I going wrong?

PHP has the habit of evaluating (int)0 and (string)"0" as empty when using the empty() function. This can have unintended results if you expect numerical or string values of 0. How can I "fix" it to only return true to empty objects, arrays, strings, etc?


I came across these sentences and cannot tell the difference. What is the difference between these two sentences?     I wish you bought me a car.      I wish you would buy me a car.

What's the difference between the following sentences?      (a) I wish they wouldn't make so much noise.   (b) I wish they were not making so much noise.    (c) I wish they did not make so much noise.   I'd appreciate your help.


How sort HashMap entries by multiple properties.  Suppose I have a map with key String and value as Object.  Map<String, UserMetrics> map = new HashMap<> map.put("user10",new UserMetrics(1,100,111)); map.put("user3",new UserMetrics(10,330,444)); map.put("user11",new UserMetrics(333,100,555)); map.put("user1",new UserMetrics(1,111,433));   public static class UsageMetrics implements Serializable {         private long param1;         private long param2;         private long param3;....  }   I want to sort users first by "param1" and then after by "param2"  result expected:<>  user10, UserMetrics(1,100,111) user1,  UserMetrics(1,111,433)) user3,  UserMetrics(10,330,444)); user11, UserMetrics(333,100,555))

I am relatively new to Java, and often find that I need to sort a Map<Key, Value> on the values.  Since the values are not unique, I find myself converting the keySet into an array, and sorting that array through array sort with a custom comparator that sorts on the value associated with the key.  Is there an easier way?


I came across this piece of code while revising. I need to explain why it returns j=6 and not 7?    var j = 6; function test() {   var j;   j = 7;   return; } test(); window.alert(j);

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


I recently got a second monitor set up, and I now have a "main" bigger monitor and a second small one. I found that I often work on the main monitor while having things on the second monitor for reference, but I often have to switch between the two. The CompizConfig plugin has a shortcut for "put to next output" which does exactly what I want; it moves the active window to the other monitor. However I often need to swap the windows between monitors, so I was wondering:  Is there a way to move all windows to the other monitor with a single keyboard shortcut?  EDIT: I checked  question, but the script provided by point 1 of the accepted answer fails with this terminal output:  Traceback (most recent call last):   File "./.bin/swap_windows", line 32, in <module>     swap_windows()   File "./.bin/swap_windows", line 18, in swap_windows     shift_r = get_shiftright(xr_output)   File "./.bin/swap_windows", line 9, in get_shiftright     lines = [l for l in xr_output.splitlines() if "+0+0" in l][0].split() IndexError: list index out of range

I have a laptop and a 27 inch monitor. I have Qt running on one monitor and Pycharm on the other. Is there a way to make a key combination to swap all the windows between both screens. The reason is that I want to program on the big screen only. I have already 4 workspaces and all of them are already used.  The output of xrandr:  Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 32767 x 32767 eDP1 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 344mm x 193mm    1920x1080      60.2*+   59.9      1680x1050      60.0     59.9      1600x1024      60.2      1400x1050      60.0      1280x1024      60.0      1440x900       59.9      1280x960       60.0      1360x768       59.8     60.0      1152x864       60.0      1024x768       60.0      800x600        60.3     56.2      640x480        59.9   HDMI1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 597mm x 336mm    1920x1080      60.0*+   50.0     59.9      1920x1080i     60.1     50.0     60.0      1600x1200      60.0      1680x1050      59.9      1280x1024      75.0     60.0      1440x900       59.9      1280x960       60.0      1366x768       59.8      1152x864       75.0      1280x720       60.0     50.0     59.9      1024x768       75.1     70.1     60.0      832x624        74.6      800x600        72.2     75.0     60.3     56.2      720x576        50.0      720x480        60.0     59.9      640x480        75.0     72.8     66.7     60.0     59.9      720x400        70.1   DP1 disconnected (normal left inverted right x axis y axis) HDMI2 disconnected (normal left inverted right x axis y axis) VIRTUAL1 disconnected (normal left inverted right x axis y axis)


How to play Multiplayer game in Age of Empires II: Age of King? With an application or from the game?

Can I still play Age of Empires 1 or 2 online? The GameSpy room for AOE 1 is always empty.


As the picture shows, at the top there is too much spacing:   I think it has to do with the following code, I already tried to change all the numbers given (.5ex etc.) but it is just the space in between Chapter I and Introduction.   Here is the preamble and part of the code I am using which I assume should be responsible for the problem:  %%%%Definition Partitioning%%%% %Profondeur de la numérotation: %Chapitre: \renewcommand{\thechapter}{\Roman{chapter}} \titleformat{\chapter}[display] {\bfseries\Large\color{MyBlueChapter}} {\filright\MakeUppercase{\chaptertitlename} \huge{\color{MyBlueChapter}\thechapter}} {.5ex} {%\titlerule \vspace{.5ex}% \filright} [\vspace{1.5ex}% \titlerule]   \usepackage[english]{babel} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[left=2cm,right=2cm,top=3cm,bottom=3cm]{geometry} \usepackage{lmodern} \usepackage{graphicx} \usepackage{microtype} \usepackage{geometry} \newcommand{\latin}[1]{\textit{#1}} \usepackage{hyperref} \usepackage{wrapfig} \usepackage{color} \usepackage{lscape} \usepackage{pdfpages} \usepackage{fancyhdr} \usepackage{lastpage} \usepackage{titlesec} %\usepackage{xcolor} \usepackage{sectsty} \usepackage{multicol} \usepackage{titlesec} \usepackage[]{nomencl} \usepackage{gensymb} \usepackage{amsmath} \usepackage{cancel} \usepackage{booktabs} \usepackage{subfigure} \usepackage{multirow} \usepackage{rotating} \usepackage[thinlines]{easytable} \usepackage{adjustbox} \usepackage{titletoc} \usepackage{afterpage} \usepackage{changepage} \usepackage{makecell} \usepackage{float}   Thanks for the help!

I want to decrease the vertical space between the top of the page and the chapter heading. I have tried to follow the instructions for titlesec but I am not successful. I have tried the following two setups without any changes occuring.  First:  \documentclass[12pt]{report}   \usepackage[compact]{titlesec}   \begin{document}   \chapter{Characters}  The origin of the group determinant begins with Richard Dedekind in the late 1800's. He began to explore the idea after studying the discriminant in a normal field [A]. He made several observations about the group determinant, but was only able to prove some of them.   \end{document}   Second:  \documentclass[12pt]{report}   \usepackage{titlesec}   \titleformat{\chapter}[display]   {\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}   \titlespacing{\chapter}{0pt}{0pt}{0pt}   \begin{document}   \chapter{Characters}    The origin of the group determinant begins with Richard Dedekind in the late 1800's. He began to explore the idea after studying the discriminant in a normal field [A]. He made several observations about the group determinant, but was only able to prove some of them.   \end{document}


For example, do you say "hot soup"? I ask this because the word "hot" is ambiguous. It could mean "spicy." If "hot soup" is ambiguous, what do you call it? The shorter, the better.

The question In my native language we have two ways of saying the food is hot. One meaning spicy and one meaning too/very warm.  I am now looking for a way to use this sentence:     The food is ...{single word here}...   I want the meaning to be clear (the food is warm to the point where caution is recommended). If there is not a single word for this that is also fine, I could then at least start looking for better workarounds.  Thoughts so far I always used 'hot' but that can easily be confused with spicy so I am currently using workarounds.  'Warm' can mean 'nice and warm' or 'too warm', so I am not satisfied by that either.


I am trying to read the RGB values at certain locations on my map which is a .tif-file I brought into QGIS. Goal: match species presence points on my map to certain RGB values on the .tif-file. from PIL import Image img = PIL.Image.open(iface.layerTreeView().selectedLayers()) col = img.convert("RGB") val = col.getpixel((0,0)) #tried to read value at center print (val)  And getting the error: AttributeError: 'list' object has no attribute 'read'

I'm trying to white a Python plugin in QGIS (2.2) to get, for each pixel of a raster image, its X Y coordinates, as well as, its RGB (3 bands) values.  At first I opened the raster file using: rlayer = QgsRasterLayer(rfileName, rbaseName)  Now I don't know how to get, for example, for pixel (1,1) its coordinates (X,Y) and its RGB color values.  Anybody could help me?  I know that I'll need to implement a DO WHILE, but I don't know the commands to extract this information of each pixel.  Thanks in advance, Mateus


There are two TextView, I want to check the equality of data in these textbox. I wrote one IF function, but the code is running incorrectly. Date time data, date and Time written in the test data I want to check the equality between textler.  TextView textView1 = (TextView) findViewById(R.id.current_time_view);                 String tarihsaatdata = textView1.getText().toString();                  String tarihvesaatText = (tarihTextView.getText().toString()) + " " + (saatTextView.getText().toString());                  if (tarihsaatdata == tarihvesaatText){                     if(aSwitch.isChecked()){                     Map<String, Object> newStatus = new HashMap<>();                     newStatus.put("001", true);                      ref.setValue(newStatus);                 }else{                         Map<String, Object> newStatus = new HashMap<>();                         newStatus.put("001", false);                          ref.setValue(newStatus);                     } }else{                  }              }         });

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


I have an iPhone 7plus. How can I simultaneously connect music to my headphone jack and my phone to a Bluetooth device? I am trying to play my music on my motorcycle through the stereo using the headphone jack while using my Sena Bluetooth headset to talk on the phone.

Me and my friends want to listen to music together. Two of us have Bluetooth Headphones (Beats Solo2 Wireless, Beats Studio Wireless) and one has a wired headset. Is there any way to use all three of these together?


I have the following code:  \documentclass[tikz]{standalone} \usepackage{pgfplots}  \pgfplotsset{compat=newest}  \begin{document}     \begin{tikzpicture}         \begin{axis}[ymode = {log}]             \addplot+ [ybar interval, mark=none, fill=blue, draw=white] coordinates {             (0.0, 2.1940887816983409e-7)             (0.1, 0.0002414449312833731)             (0.2, 2.1755844184791984e-5)             (0.3, 8.69705071299704e-6)             (0.4, 3.0320720874795145e-6)             (0.5, 6.87304919568155e-8)             };         \end{axis}     \end{tikzpicture} \end{document}   which produces:    The probabilities are positive values, but because the axis is in log mode I assume it interprets them as negative values and draws the bars to log(x) = 0.  How do I get PGFPlots to plot the bars such that they rise up from the bottom of the axis?  Thank you.

The following MWE  \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ybar,ymode = log] \addplot coordinates{ (1,1e-15) (2,1e-14) (3,1e-13) }; \end{axis} \end{tikzpicture} \end{document}   compiles to this bar chart:    I'd like the bars to start from the bottom of the screen instead of the top, since it makes more sense to visualize my data like that (they are computational errors).  Is there a pgfplots option to achieve that? The manual only says that the bars always start from 0 (and there is no way to change that); clearly, when ymode=log this is interpreted as starting from log(1)=0, which is not what I want here.


I've heard it said that passing by reference or pointer can be more efficient because it avoids a copy. I'm assuming this obviously doesn't apply for small arguments, for example doubles. Sometimes I deal with vec3 and vec4s which might be about 32 bytes big. I have a habit of passing by reference because I have this idea in mind, but I'm wondering if it's actually worth doing. IT makes sense that if copies are avoided it's faster, but how big would the argument generally need to be to gain anything? Are we talking about 8 bytes, 32 bytes? Or much bigger? I'm not sure how passing by reference or pointer actually works under the hood anyway. For example is it possible it's actually slower with a reference because the memory address is used to retrieve the information when a simple copy would mean the object is available immediately.

What is the difference between    a parameter passed by reference a parameter passed by value?   Could you give me some examples, please?


I saw a sign in an elevator that stated the capacity as "15 persons". What is the rule for when to use "persons" vs. "people"?

Can you please clarify the relation and differences between these nouns?   For example, is it proper to use "persons" instead of "people"? Are they the same? As I believe that "people" is plural, how come there exists the plural of the plural (=peoples)? Does it have any usage?


Trying this question for a while.  $f,g: \mathbb{N} \rightarrow \mathbb{N} $  $\forall n \in \mathbb{N}: f(n)=g(2n)$  I need to prove that if $f$ is surjective $g$ is not injective.  Now I see that $g$ is all the even numbers, and $f$ includes both odd and even, but I cant seem to find a way to use that $f$ is surjective to prove $g$ is not injective.

I need help solving the next question, I think that it's actually a refutation:     let $f,g: \mathbb{N} \rightarrow \mathbb{N}$  so that $\forall n ∈ \mathbb{N} : f(n) = g(2n)$   Prove that if $f$ is surjective $g$ is not injective


I want the object falling start from frame 250 until 350. But, I can't find where to set it. It always starts at 1.

I'd like to have a group of debris fall from a ceiling onto the floor, but not have them drop all at the same time. Is there a way to set a keyframe that dictates when the object enters the simulation? For example, object 1 starts falling on frame 0, object 2 on frame 5, object 3 on frame 24, etc.


The following is the unexpected hanging paradox:  A judge tells a condemned prisoner that he will be hanged at noon on one weekday in the following week but that the execution will be a surprise to the prisoner. He will not know the day of the hanging until the executioner knocks on his cell door at noon that day.  Having reflected on his sentence, the prisoner draws the conclusion that he will escape from the hanging. His reasoning is in several parts. He begins by concluding that the "surprise hanging" can't be on Friday, as if he hasn't been hanged by Thursday, there is only one day left - and so it won't be a surprise if he's hanged on Friday. Since the judge's sentence stipulated that the hanging would be a surprise to him, he concludes it cannot occur on Friday.  He then reasons that the surprise hanging cannot be on Thursday either, because Friday has already been eliminated and if he hasn't been hanged by Wednesday night, the hanging must occur on Thursday, making a Thursday hanging not a surprise either. By similar reasoning he concludes that the hanging can also not occur on Wednesday, Tuesday or Monday. Joyfully he retires to his cell confident that the hanging will not occur at all.  The next week, the executioner knocks on the prisoner's door at noon on Wednesday — which, despite all the above, was an utter surprise to him. Everything the judge said came true.  Observations  In my opinion the above reasoning is a case of a "proof by assumption" with extra steps. Here's why:    prisoner assumes hanging didn't occur on Monday, ..., Thursday to conclude that it can't happen on Friday he works backwards from Thursday to Monday using the same argument as for Friday   The second step is redundant since we already established in step 1, that hanging did  not occur on Mon, ..., Thu.  In this way, the "paradox" is reduced to a single implication: (no hanging Mon, ..., Thu) -> (no hanging on Fri). It's easy to agree with and not a paradox.  Is my thinking correct here?

My intuitive solution to the paradox would simply be that although the prisoner can "deduce" that he won't be hanged on Friday, he can only make that statement if it gets past Thursday. In other words, the paradox relies on the statement (statement A), "If I am not hanged by Thursday, then I can conclude that I will be hanged on Friday".  We can decompose this statement to two statements 1) and 2):  1) I am not hanged on Thursday, and 2) I am hanged on Friday  Then statement A is of the form 1 $\rightarrow$ 2. From elementary logic, this statement is true if 1 & 2 are both true, 1 is false + 2 is true, and 1 is false + 2 is false. However as of the time the prisoner makes the statement, 1 hasn't happened yet, so the prisoner doesn't know if 1 is true or false. Therefore, 2 can also be true or false, and so the prisoner can't make conclusions at all. The prisoner can deduce that he will be hanged on Friday only if the hangman doesn't knock on his door by Thursday noon, but right until Thursday 11:59:59am, he can't make conclusions.  The problem with my solution is, of course, if it were correct I'd have expected someone else to have thought of it and resolved the paradox (since the solution is so elementary). But that hasn't happened, and the logicians working on the paradox focus on the word 'surprise' instead. What's the error in my solution?


Does anyone understand what is going on here.  I have the following LaTeX document:  \documentclass[fontsize=8pt,a5paper,twoside,DIV=14,BCOR=10mm,chapterprefix=off]{scrreprt}  %\usepackage[utf8]{inputenc}  \usepackage[default,regular,black]{sourceserifpro} %\usepackage[T1]{fontenc}  \title{Strange non-embedded fonts}  \begin{document}  \maketitle Test  \end{document}     When compiling on overleaf I get the following:    What is wrong with my Tex Installation?

I am generating a pdf using pdflatex from the same latex file on three different computers. The pdf is generated without any warnings on all three computers and it looks almost identical. The one difference is that on my work computer, vector fonts are used while on the other two computers, the pdf has bitmap fonts.  All three machines are running a 13.04 Kubuntu and I'm using the latex packages from the distribution. On all three I simply use the default setting of Kile to generate the pdf.  Clearly there must be some difference in how latex is setup on these machines. It's possible that I installed some additional packages on my work computer, but I am not sure where to look.  So my question is, why does the same source result in two different PDFs? How do I make the other two computers also use vector fonts, and avoid the bitmap fonts, without modifying the latex source?


The title of my paper contains a math mode expression. Usually this renders correctly, but with the style file I am using for the proceedings in which it will appear, the math mode part appears in normal-size font while the rest of the title is title-size, making the math part look very small. This also happens in section headings.  The style file is here: www.sheridanprinting.com/typedept/sig-alternate-2013.cls  Minimal working example:  \documentclass{sig-alternate-2013} \begin{document} \title{Proving that $1 > 0$} \maketitle \section{Proving that $1 > 0$} \end{document}   Any advice as to how to to fix this would be great, thank you.

I wrote Latex as \LaTeX to properly make the right output on the title part using acm_proc_article-sp document class. But as I wrote that way, it prints a very small letter 'A' of the LATEX word.     I think it wasn't right for the 'A' gets anussual result. Are there any solutions for this?


I have written school reports for several years and recently, a colleague has said a verb like recommend or suggest must be followed by that and the second verb conjugated to the pronoun it refers to. For example, I wrote, 'I recommend he run for at least 2 hours a day'. However, I have now been told it must be, ' I recommend that he runs for at least 2 hours a day'. Another one is below.  Which is correct? I suggest he practise for the upcoming test OR I suggest that he practises for the upcoming test? Can someone please shed some light on this for me. Thank you in anticipation that both forms are correct.

Why is this sentence correct?     She suggested that he go to the cinema.   I would definitely use goes instead of go.


(GIMP 2.8.22)  I have several text objects labeling parts of the human body and I want to increase the font size of all of them to 20 pts. Each text object was automatically put into its own layer, and I want to leave it like that, if possible. How do I SELECT ALL of the individual text objects in the entire drawing (all layers) and change them all at once?  Thank you in advance!

In Adobe Photoshop I am able to select multiple layers at once with Shift+Click.  How can I do that in GIMP?


I use a bunch of Adobe products like InDesign and Lightroom, but they are trigger happy when you use a Magic Mouse and a slight touch will send the current pages/images sideways or jump multiple images. There is a Terminal script to stop sideways scrolling which I've set and confirmed that the option is set to false in the prefs, but this makes no difference. Any other ideas on how to do this so it stops sideways scrolling? Otherwise, a good replacement mouse for graphics/photography work.

On a MacBook Pro with OS X 10.9.1 (13B42) with both the trackpad and a Bluetooth "magic mouse" I observe an excessive amount of (especially) horizontal scrolling.  A trivial touch to the mouse (or touching the trackpad with two fingers) may result in dozens of (especially horizontal) scroll events. This is especially pronounced in Excel, Firefox, and Emacs (which notice horizontal scrolls) but not in Terminal and Outlook (which mostly ignore them).  Mouse tracking in system settings is set to the 3rd notch (out of 10).  It is possible to disable or reduce horizontal scroll events?


So I'm fairly new to Java and I am trying to run a program that will display a certain number of letters from a name and ask the user for a response. The user's response should determine one of two answers ("Correct" or "I'm sorry, that's incorrect"). The problem I'm encountering is that when I run the program and put in the answer that should lead to "Correct," which is 'Billy Joel,' I get the response of "I'm sorry, that's incorrect." I'm not actually sure what's going on, but here's a link to a picture of the CMD when I input what should lead the system to say "Correct" and instead it says "I'm sorry, that's incorrect":    And here is a copy of the relevant code:  System.out.println("\nLet's play Guess the Celebrity Name.");  String s6 = "Billy Joel";  System.out.println("\n" + s6.substring(2, 7));  Scanner kbReader3 = new Scanner(System.in); System.out         .print("\nPlease enter a guess for the name of the above celebrity: "); String response = kbReader3.nextLine();  System.out.println("\nYou entered: \n" + response + "\n");  if ((response == "Billy Joel")) {     // Execute the code here if Billy Joel is entered     System.out.println("\nCorrect!"); } else {     // Execute the code here if Billy Joel is not entered     System.out.println("\nI'm sorry, that's incorrect. The right answer was Billy Joel."); }  System.out.println("\nThank you for playing!");   There's more before this that the program also does, but I'm not having a problem with any of that and it's all correct. I took out the Billy Joel part and everything else ran exactly as it was supposed to. It's just the above code in relation to what it should put out and what it is putting out that's the problem. I'm wondering if maybe I'm missing something in my code or I put something in wrong, but whatever I did, help would be much appreciated.

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


Somehow i'm not being able to pull this off.    I've tried searching on google for solutions but couldn't find it.   I thought the setup was quite simple, but it don't seem to work properly.  If you take a look at the image below you'll see what i mean.  I've tried changing the Blend Mode on the Settings TAB, i've enabled screen space refraction...        It seems that i'm missing out on something.     Any thoughts ?   Thank you

I added two planes in Cycles with Image Texture in png with some transparency. I covered one by the other but transparency doesn't work, I mean it is impossible to see the one which is under despite transparency in the one which is above. What could be the problem?


I have a file consisted of two columns with bunch of numbers, and I'd like to search and find lines in which second column starts with 1.008 or 1.009 or 1.01 but I'd like to have printed both, 1st and 2nd column.  I tried:  grep -Ev '^1.008|^1.009|^1.01'   but it doesn't work.

I want to apply grep on particular column in column command.  myfile.txt  3,ST,ST01,3,3,856 3,ST,ST02,4,9,0234 6,N1,N101,2,3,ST 6,N1,N102,1,60,Comcast 6,N1,N103,1,2,92   My Command:  column -s, -t < myfile.txt | grep -w "ST"   Here I want to only grep the pattern ST in 2nd column. How to do this ?  Expected Result:  3       ST            ST01              3            3            856 3       ST            ST02              4            9            0234


I am trying to sort the output of a dictionary by the third column, or more specifically the count of values that appear in the example results. For context, the original answer provide was here: . I was unable to derive an answer from  or  therefore am asking here.  The original out put is produced from:  for k in ret.keys():     print '%s %d' % (k,ret[k])   Which results in:  google com 1132 akamaiedge net 378 bing com 381 microsoft com 197   And tried:  x = ret.keys() sorted(x,key=operator.itemgetter(3)) for k in x:     print '%s %d' % (k,ret[k])   which results in:  google com 1132 akamaiedge net 378 bing com 381 microsoft com 197   And lastly tried:  for k in sorted(ret.keys(),key=operator.itemgetter(3),reverse=True):     print '%s %d' % (k,ret[k])   Which resulted in a similar output to the first:  microsoft com 197 akamaiedge net 378 google com 1132 bing com 381   Additionally, the value of ret.keys() is:  ['google com', 'akamaiedge net', 'bing com', 'microsoft com']   Solution for my specific scenario is:  for k in sorted(ret.keys(), key=lambda k:ret[k], reverse=True):     print "{:15} - {}".format(k, ret[k])

I have a dictionary of values read from two fields in a database: a string field and a numeric field. The string field is unique, so that is the key of the dictionary.  I can sort on the keys, but how can I sort based on the values?  Note: I have read Stack Overflow question here  and probably could change my code to have a list of dictionaries, but since I do not really need a list of dictionaries I wanted to know if there is a simpler solution to sort either in ascending or descending order.


If I reset my last commit using git reset --hard HEAD^, how do I undo the reset?  I don't have anything more to ask, but apparently there are length requirements for this message. I'm just writing more here to pass the quality standards.

Is it possible to undo the changes caused by the following command? If so, how?  git reset --hard HEAD~1


Is there a limit as to how tall a building can theoretically* be? Why/Why not?   *By theoretically, I mean ignoring factors involving human discomfort (transportation, reduced air density affecting respiration, coldth etc), cost, material issues (Availability of substances etc).  I'm looking for purely physical answers with proper explanations.

When I was a boy I used to daydream about building a tower so tall that the top of it would project into near space.  There would perhaps be a zero gravity area in the penthouse where my friends and I could bounce around and play space versions of various earth-based games and sports in most excellent zero-g conditions.  Much to my continued disappointment and despite all the technological advances of the last thirty or so years, no one has built such a structure.  Can anyone explain the physical limitations/constraints that are preventing someone from realising my fantasy of a 'Space Tower'?  UPDATE: This  seems to be pretty confident ...


I sometimes bump into questions which have an (1) next to the edit link. If I click on it I am presented with the review screen.  I can either click accept or reject but whatever I do the suggested edit still needs some more accepts to pass.  If there is no suggested edit however I can edit a question without the need of reviewing.  So my question is that this behavior is a bug or a feature?  Sometimes I read questions and they have formatting issues, bad grammar etc... and I click on edit and correct the problem(s). But in case of a suggested edit this feature does not work.  Note: I have sufficient privileges to edit a post.

When clicking "edit" I see:  Your edit will be placed in a queue until it is peer reviewed. We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.  Like:     Likewise, when I am not logged in, clicking "improve this question" or "improve this answer" shows:  You are not . Your edit will be placed in a queue until it is .  And when I click 'Save', I get:  Thanks for submitting an edit. It is only visible to you until it's been approved by trusted community members  Like:     Who can suggest an edit? Where do suggested edits go? Who can vote on a suggested edit? How do suggested edits get reviewed? Can I earn reputation? What about abuse or bad edits? Sometimes the Community user approves or rejects my edit. Why is that? When can I not suggest an edit? Is there a minimum change requirement for a suggested edit? How do I check my suggested edit history? I disagree with the reasons why my suggested edit was rejected. What can I do? How do I know whether there are edits waiting for review? Someone suggested an edit to my own post, and the reviewers took the wrong action. What can I do? Are tag wikis included in this scheme? What do the "Improve Edit" and "Reject and Edit" buttons do? Why are apparently valid links to rejected edits resulting in 404 errors?   For more information about editing, see "" in the .


I have 2 lists which are interlinked as example  name=['pablo','rob','rahul','roni']   and  age=[21,23,20,24]   I have to create a tuple using these 2 lists.  Final output should be     data={'pablo':21,'rob':23,'rahul':20,'roni':24}.  And let the output of the above problem is given. How can I get back the original lists i.e. 'name' and 'age'.  How can I do it using python commands?

Is there a more concise way of doing this in Python?:  def toDict(keys, values):   d = dict()   for k,v in zip(keys, values):     d[k] = v    return d


I'm trying to link my google console with google analytics after I have verified my website as a domain. But according to GA there are no sites verified and there is a site but this is not linked to any web property in google analytics account. See attachment.  Now I have read that I should verify the property as a prefix instead. I'm not sure whether this is the solution. The problem is that I don't how to test it since the property is already been verified as a domain I don't know how to verify it again as a URL prefix.

I'm trying to connect a domain property to a google analytics domain. But when the property I added is not in the list of properties where I can choose from.  All the other properties are. The big difference is that the newly added property is a domain property. All the others are regular properties. Is there a new way to connect this domain properties to google analytics?


This phenomenon happens to me several times a week and I've actually just recently started pondering if this situation has a defined term for it?  When two people walk towards each other in opposite directions, and they need to quickly decide whether to walk on the right or left side of each other, oftentimes failing to do so when both decide on the same direction, and then switching and causing an awkward situation to occur between you and the stranger. It probably has happened to anyone of you. What is this called?

While walking on a path, sometimes two person try to dodge each other. Like one guy steps left, and at the same time, other guy steps left and then switches direction and so does the other guy. Is there a word to describe this?


Let $(f_n)$ be a sequence in $L_p[0,1]$ ($1<p<\infty$) such that $f_n\to f\in L_p[0,1]$ pointwise almost everywhere. If there exists $M>0$ such that $\|f_n\|_p\le M$ for all $n$, and $g\in L^q[0,1]$, where $\dfrac{1}{p}+\dfrac{1}{q}=1$, then: $$\int fg=\lim_{n\to\infty}\int f_ng.$$  I tried this with the Hölder's inequality: $$\left|\int fg-\int f_ng\right|\le \|f_n-f\|_p\|g\|_q.$$ I'm not sure we can say directly that $\|f_n-f\|_p\to 0$. Perhaps with uniformly convergence/Egorov's theorem? By Egorov's theorem, if $\epsilon>0$ there exists $A\subseteq[0,1]$ such that $\lambda(A^c)<\epsilon$ and $f_n\to f$ uniformly on $A$. It is clear then $$\int _Afg=\lim_{n\to\infty}\int_A f_ng,$$ since uniformly convergence implies $L_p$-convergence. But I don't know how to do it on $A^c$. Also, why is $\|f_n\|_p\le M$ required? Thank you. Edited wrong title. Sorry.

I found  the following exercise and I'd like to know if my answer is correct.      Let $(X, \mathscr A, \mu)$ a finite measure space. Let $\{f_n\}$ a sequence of measurable functions such that $\|f_n\|_p\le M$ for a real constant $M$ $(1<p<\infty)$ and suppose that $f_n \xrightarrow{\text{a.e.}} f$. Then $$\int_X f_n g \,d\mu \to \int_X fg \,d\mu$$ for all $g$ in $\mathscr{L}^q (X)$, where $q^{-1}=1- p^{-1}$.   Since $\int |f_n|^p \,d\mu\le M^p $ by Fatou's lemma it follows that $\int |f|^p \,d\mu\le M^p<\infty$, so $f$ belongs to $\mathscr{L}^p (X)$. Let $g$ in $\mathscr{L}^q$ arbitrary but fixed.   Then by Hölder inequality it follows that $$\|f_n g\|_1 \le \|f_n\|_p\|g\|_q\le M \|g\|_q<\infty$$ and $$\|f g\|_1 \le \|f\|_p\|g\|_q \le M \|g\|_q<\infty$$ thus $f_n g$ and $fg$ belongs to $\mathscr L ^1(X)$. Now since $g$ is in $\mathscr L ^q (X)$, then $g$ is finite a.e.,without loss of generality we may assume that $g$ is real-valued so $f_n g \xrightarrow{ a.e} fg$.   Let $\nu (A) =  \int_A |g|^q \,d\mu $, so $\nu $ is absolutely continuous with respect to $\mu$, also $\nu$ is a finite measure on $(X, \mathscr A )$. We can use the $\epsilon-\delta$ definition of absolutely continuous, so given $\epsilon>0$ there is a $\delta>0$ such that for $\mu(A)<\delta$ then $\nu (A) <\epsilon^q$ for any $A$ in $\mathscr A$.   Now by Egoroff's thm exists a $B$ in $\mathscr A$ such that $(f_ng) (x)\xrightarrow{\text{uniformly}} (fg) (x)$ for $x$ in $B$ and $\mu(X\setminus B) <\delta$. Let $N$ such that for all $n\ge N$, $|(f_ng)(x)-(fg)(x)|<\epsilon$ for all $x\in B$. Thus   \begin{align*}\left |\int_X (f_n-f) g \, d\mu \right|&\le \int_B |f_ng-fg| \, d\mu +\int_{X-B}|f_n g|\, d\mu +\int_{X-B}|fg|\,d\mu \\[6pt] &\le \int_B |f_ng-fg| d\mu + 2M \left( \int_{X-B}|g|^qd\mu \right)^{1/q}\\[6pt] &\le\epsilon \mu(X)+2M  (\nu(X\setminus B))^{1/q}\\[6pt] &\le \epsilon (\mu(X)+2M)\end{align*}  Since $\mu(x)<\infty$ and $M<\infty$ the result follows.


I'm attempting to use a variable inside of a LINQ select statement.   Here is an example of what I'm doing now.   using System; using System.Collections.Generic; using System.Linq; using Faker;  namespace ConsoleTesting { internal class Program {     private static void Main(string[] args)     {         List<Person> listOfPersons = new List<Person>         {             new Person(),             new Person(),             new Person(),             new Person(),             new Person(),             new Person(),             new Person(),             new Person(),             new Person(),             new Person(),             new Person()         };          var firstNames = Person.GetListOfAFirstNames(listOfPersons);          foreach (var item in listOfPersons)         {             Console.WriteLine(item);         }          Console.WriteLine();         Console.ReadKey();     }       public class Person     {         public string City { get; set; }         public string CountryName { get; set; }         public string FirstName { get; set; }         public string LastName { get; set; }          public Person()         {             FirstName = NameFaker.Name();             LastName = NameFaker.LastName();             City = LocationFaker.City();             CountryName = LocationFaker.Country();         }          public static List<string> GetListOfAFirstNames(IEnumerable<Person> listOfPersons)         {             return listOfPersons.Select(x => x.FirstName).Distinct().OrderBy(x => x).ToList();         }          public static List<string> GetListOfCities(IEnumerable<Person> listOfPersons)         {             return listOfPersons.Select(x => x.FirstName).Distinct().OrderBy(x => x).ToList();         }          public static List<string> GetListOfCountries(IEnumerable<Person> listOfPersons)         {             return listOfPersons.Select(x => x.FirstName).Distinct().OrderBy(x => x).ToList();         }          public static List<string> GetListOfLastNames(IEnumerable<Person> listOfPersons)         {             return listOfPersons.Select(x => x.FirstName).Distinct().OrderBy(x => x).ToList();         }     } } }   I have a Some very not DRY code with the GetListOf...   Methods   i feel like i should be able to do something like this   public static List<string> GetListOfProperty( IEnumerable<Person> listOfPersons, string property)         {             return listOfPersons.Select(x =>x.property).Distinct().OrderBy(x=> x).ToList();         }   but that is not vaild code.   I think the key Might Relate to Creating a Func   if That is the answer how do I do that?  Here is a second attempt using refelection But this is also a no go.           public static List<string> GetListOfProperty(IEnumerable<Person>  listOfPersons, string property)         {             Person person = new Person();             Type t = person.GetType();             PropertyInfo prop = t.GetProperty(property);             return listOfPersons.Select(prop).Distinct().OrderBy(x =>  x).ToList(); }   I think the refection might be a DeadEnd/red herring but i thought i would show my work anyway.             Note Sample Code is simplified in reality this is used to populate a  via AJAX to Create an autocomplete experience. That object has 20+ properties and I can complete by writing 20+ methods but I feel there should be a DRY way to complete this. Also making this one method also would clean up my controller action a bunch also.   Question:   Given the first section of code is there a way to abstract those similar methods into a single method buy passing some object into the select Statement???  Thank you for your time.

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


I would like to solve for $x$ in $a = x^b\ (mod\ n)$ given $a$, $b$, $n$. How might I go about doing this?

Okay so I am in college and in the notes it shows this example:  // Example: Compute the square root of 3 modulo 143  3 modulo 143 = 3 mod (11*13)  Then he jumps to this:   √3 (mod 11) = ± 5  √3 (mod 13) = ± 4  Using the Chinese Remainder Theorem, we can calculate the four square roots as 82, 126, 17 and 61.  //  The lecturer never makes anything clear even though it is our first encounter with module arithmetic. I don't know were the 4 or the 5 come from or the √3 . Can anyone explain to be how he got  √3 (mod 11) = ± 5  √3 (mod 13) = ± 4   And also how does he use this information in conjunction with the Chinese Remainder Theorem arrive at the square roots. I would really appreciate if anyone could help me out here


Internal hard disk drive not found. To resolve this issue, try to reseat the drive. No bootable devices--strike F1 to retry boot, F2 enter Setup Menu, F5 enter PSA.   How do I fix this problem?

My computer no longer boots Windows or the installed operating system. Instead, I may get this error:  PXE-E61: Media test failure, check cable -or- Check cable connection!  PXE-M0F: Exiting PXE ROM.   and/or one of the following messages or similar:  Operating System not found  No boot device available- No bootable devices--strike F1 to retry boot, F2 for setup utility  No bootable device -- insert boot disk and press any key  No Boot Device Found. Press any key to reboot the machine  Default Boot Device Missing or Boot Failed  Reboot and Select proper Boot device or Insert Boot Media in selected Boot device   What does this mean and what can I do?     This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details.


I would like to replace special characters from the user input with other characters.  Currently, I have the following which does not work. Any help would be appreciated.  $(document).ready(function(){          $("#text_box_id").change(function () {             /*var name = $(this).val();             var dname_without_space = $("#text_box_id").val().replace(/ /g, "");*/              var specialCharList = ["Á","É","Í","Ó","Ú","á","é","í","ó","ú","ñ","Ñ"];             var replaceChar = ["A","E","I","O","U","a","e","i","o","u","n","N"];              var inputUser = $("#text_box_id").val();             var splitInput = inputUser.split(" ");             console.log(splitInput);              for(var i = 0; i < inputUser.length; i++){                 for(var x = 0; x < specialCharList.length; x++){                     if(splitInput[i] == specialCharList[x]){                         splitInput[i] = replaceChar[x];                     }                 }             }              var modInputUser = splitInput.join(" ");             console.log(modInputUser);              /*var name_without_special_char = $("#text_box_id").val().replace(/[^a-zA-Z 0-9]+/g, "");              $(this).val(name_without_special_char);             console.log(name_without_special_char)*/         });     });

For a poor man's implementation of near-collation-correct sorting on the client side I need a JavaScript function that does efficient single character replacement in a string. Here is what I mean (note that this applies to German text, other languages sort differently):  native sorting gets it wrong: a b c o u z ä ö ü collation-correct would be:   a ä b c o ö u ü z  Basically, I need all occurrences of "ä" of a given string replaced with "a" (and so on). This way the result of native sorting would be very close to what a user would expect (or what a database would return). Other languages have facilities to do just that: , in , , . But what about JavaScript? Here is what I have right now. // s would be a rather short string (something like  // 200 characters at max, most of the time much less) function makeSortString(s) {   var translate = {     "ä": "a", "ö": "o", "ü": "u",     "Ä": "A", "Ö": "O", "Ü": "U"   // probably more to come   };   var translate_re = /[öäüÖÄÜ]/g;   return ( s.replace(translate_re, function(match) {      return translate[match];    }) ); }  For starters, I don't like the fact that the regex is rebuilt every time I call the function. I guess a closure can help in this regard, but I don't seem to get the hang of it for some reason. Can someone think of something more efficient?  Answers below fall in two categories:  String replacement functions of varying degrees of completeness and efficiency (what I was originally asking about) A  of  , which is now  among JS engines (not so much at the time of the question) and could solve this category of problem much more elegantly.


Need to compile some add'l libs on Ubuntu w/ same switches as gcc.  Q: How can I determine on Ubuntu what siwtches were used with libc?  One earlier suggestion was using "apt-src", but nothing in the man pages for apt-src seems to show what switches were used with a binary package. "apt show" has some information, but not the actual compiler switches.   This matters because I'm trying to compile other packages that need consistent library switches between mutiple lib's.

I need to install asterisk 1.6.2.18 on Ubuntu 10.10  I would like to know what the configure options were that were used to generate the ubuntu package of asterisk 1.6.2.7.  My favorite server distro is Slackware and on that I just reference the Slackbuild file to find out how a package was made and possibly customised in order to remake it with a newer source, but I cannot figure this out on Ubuntu. I am under time pressure now, so I would appreciate some pointers.  Thank you!


What is the number  of  abelian groups of  order 108 upto isomorphism ?  To answer  this I wrote explicitly the possible abelian groups of order 108 as follows :   $$\Bbb Z_{108}$$  $$\Bbb Z_{4}\times\Bbb Z_{3}\times\Bbb Z_{9}$$  $$\Bbb Z_{2}\times\Bbb Z_{2}\times\Bbb Z_{27}$$  $$\Bbb Z_{4}\times\Bbb Z_{3}\times\Bbb Z_{3}\times\Bbb Z_{3}$$   $$\Bbb Z_{2}\times\Bbb Z_{2}\times\Bbb Z_{3}\times\Bbb Z_{9}$$  $$\Bbb Z_{2}\times\Bbb Z_{2}\times\Bbb Z_{3}\times\Bbb Z_{3}\times\Bbb Z_{3}$$  And I  found  the  answer  to be 6. But  my problem  is  that  what  if  I  was  given  a much bigger  number? Is this  the  only  way  to  find  abelian  groups  of  a  certain  order? If there  are  better  ways  to find  the  exact  answer  to  such  question please  let  me  know.

Let's say I'm given a number $n = p^{3}q^{4}r^{2}s$ and I want to find the number of (non-isomorphic) abelian groups of order $n$. How I'm computing the number is basically partitioning, that is, I'm just looking at it and saying that I have $\mathbb{Z}/p^{3}q^{4}r^{2}s\mathbb{Z}$, $\mathbb{Z}/p^{2}q^{4}r^{2}s\mathbb{Z} \times \mathbb{Z}/p\mathbb{Z}$, and so on. Then I count the number of groups I've written down. However, I've found that I'm quite prone to error when I do this. Is there a faster way of doing this? If not, is there a systematic trick/way I could use to make this easier?


I want to show rigorously that this is 2. I'm sure there's a faster way than by trying to see if $\sqrt{5} = a + b \sqrt{2} + c \sqrt{3} + d \sqrt{6}$ (linear combination of the basis elements for $\mathbb{Q}(\sqrt{3}, \sqrt{2})$). I'm just not sure what.

I'm having trouble finding a basis for $\mathbb{Q}(\sqrt{2},\sqrt{3},\sqrt{5})$. So far I know that $[K=\mathbb{Q}(\sqrt{2}):\mathbb{Q}] = 2$ and $[L=\mathbb{Q}(\sqrt{2}, \sqrt{3}):K] = 2$, but it's harder to extend $L$ to $L(\sqrt{5})$. Namely I'm trying to prove that $x^2-5$ is irreducible over $L$ by showing that $\sqrt{5} \notin L$ as follows:  Assume by contradiction that $\sqrt{5} \in L$. Then we have   $$\sqrt{5} = a + b\sqrt{2} + c\sqrt{3} + d\sqrt{6}$$ with $a,b,c \in \mathbb{Q}$. Squaring both sides and using independence of basis gives the following nasty system of equations:  $$-5+a^2+2b^2+3c^2+6d^2 = 0$$ $$ab + 3cd = 0$$ $$ac + 2bd = 0$$ $$ad + bc = 0$$  I can't see how these equations contradict the assumption that $\sqrt{5} \in L$.


I run install git and get the following error:     Please insert 'Kubuntu 19.10 Eoan Ermine - Release amd64 (20191017)'   in the drive '/cdrom/' and press [Enter]   I cannot do anything after this, it just locks up and I have to exit.   What's the problem and how can I fix it?

Every time I try update (using sudo apt-get update) my Ubuntu I get this problem:  W: The repository 'cdrom://Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1) xenial Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. W: The repository 'ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/ubuntu xenial Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. E: Failed to fetch cdrom://Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)/dists/xenial/main/binary-amd64/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs E: Failed to fetch cdrom://Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)/dists/xenial/main/binary-i386/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs E: Failed to fetch ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/ubuntu/dists/xenial/main/binary-amd64/Packages  404  Not Found E: Failed to fetch ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/ubuntu/dists/xenial/main/binary-i386/Packages  404  Not Found E: Some index files failed to download. They have been ignored, or old ones used instead.   How can I fix it? I use Ubuntu 16.04 LTS


When I fit a regression tree model in R, I can somehow look at the plotted tree to figure out the interactions of the predictors. However, when I fit a random forest model, I cannot plot a tree because there are too many of them. I can somehow find the importance order of the predictors (using varImpPlot function), but I do not know how to detect the interactions from the model. By the way, the importance plot only gives the importance order of the predictors, how can I figure out exactly how many of them should be included for further investigation. Thank you.

Random forests are considered to be black boxes, but recently I was thinking what knowledge can be obtained from a random forest?  The most obvious thing is the importance of the variables, in the simplest variant it can be done just by calculating the number of occurrences of a variable. The second thing I was thinking about are interactions. I think that if the number of trees is sufficiently large then the number of occurrences of pairs of variables can be tested (something like chi square independence).  The third thing are nonlinearities of variables. My first idea was just to look at a chart of a variable  Vs score, but I'm not sure yet whether it makes any sense.    Added 23.01.2012 Motivation    I want to use this knowledge to improve a logit model. I think (or at least I hope) that it is possible to find interactions and nonlinearities that were overlooked.


gnome-sushi doesn't work after upgrade to 19.04. I tried to reinstall it, but no effect. After pressing space bar I catch this errors in dmesg  [116847.106625] sushi-start[5011]: segfault at 0 ip 00007f5364b2505f sp 00007ffd5aca7a90 error 6 in libgjs.so.0.0.0[7f5364aec000+66000] [116847.106632] Code: 00 e8 55 f7 00 00 4c 8b 04 24 48 8d 0d 4d 47 03 00 48 8b 7c 24 18 89 c6 31 d2 31 c0 e8 1a a0 fc ff 48 8b 7b 18 e8 a1 8d 00 00 <41> c7 07 01 00 00 00 e9 82 00 00 00 0f 1f 44 00 00 48 8b bb 78 01

I try to use sushi (which offer similar feature like Quick Look on MacOS ) on Ubuntu 19.04. Got this error:  (sushi-start:8478): Gjs-WARNING **: 15:07:50.705: JS ERROR: Error: Requiring Sushi, version none: Requiring namespace 'GtkSource' version '3.0', but '4' is already loaded @/usr/share/sushi/js/viewers/text.js:33:7


I want to see if there is any command or a way to add Aline at the end of the GZipped file in Unix without unzipping the file. If yes help would be appreciated.

mknod /tmp/oracle.pipe p  sqlplus / as sysdba << _EOF set escape on  host nohup gzip -c < /tmp/oracle.pipe > /tmp/out1.gz \& spool /tmp/oracle.pipe select * from employee; spool off  _EOF  rm /tmp/oracle.pip   I need to insert a trailer at the end of the zipped file out1.gz , I can count the lines using  count=zcat out1.gz |wc -l   How do i insert the trailer  T5 (assuming count=5)   At the end of out1.gz without unzipping it.


i tried to install drupal on centos, i have configure my server (install httpd, mysql, php, etc) everything looks good until the last part: hit the url to install drupal  the problem here is once i hit the url/ip addr it return me 403 forbidden.  but it is weird because i put phpinfo.php at the same folder with the same group,owner and permission and i can see the page...  any idea what possibly went wrong?  Edit: httpd error log:     [Thu Nov 12 01:43:38.757390 2015] [core:error] [pid 2600]   (13)Permission denied: [client 192.168.yy.xx:53408] AH00035: access to   /index.php denied (filesystem path '/var/www/html/index.php') because   search permissions are missing on a component of the path   okay, i found the issue here, it is because the selinux enabled. i did setenforce 0 and it works... but however any idea how to make this work with selinux enabled (setenforce 1) ?  thanks!

I've got this one file, favicon.ico. It's actually a large group of nested files, but purely for example, just this one.  If I do cp favicon.ico favicon2.ico, Apache can read the second one just fine.  If I do mv favicon.ico favicon3.ico, Apache throws a 403 on favicon3.ico.  If I su apache, I can read the file as apache.  stat says both files are identical, except for the inode number.  Is there some hidden flag somewhere or something that I'm missing? I've never seen anything like this.  error_log says (13)Permission denied: access to /favicon3.ico denied


I have a Logitech M705 mouse and I'd like to configure the extra buttons on Ubuntu. I downloaded the xkeybinds, but I can't make it work. When only 1 key is binded, its fine, but I'd like to make a Ctrl+Page Up & Ctrl+Page Down key too, now that is what not working whatever I trying.  I'd like to bind these buttons: Button 10: F5 Button 9: Ctrl+Page Down Button 8: Ctrl+Page Up  Thanks for the help!

Can anyone tell me how to configure all the buttons on a  under Ubuntu 12.04?  Specifically, I like to make one of them just the Ctrl key (for control clicking webpages) and another one Ctrl+W to close tabs.  I also normally make the scroll wheel page down for each click (otherwise it hurts my arms to be scrolling so much).  I make pushing the wheel to the left = pageback and pushing to the right = page forward.  I've searched for other answers to this and found something related   But when I posted a followup post to solve the issue, no one responded --perhaps I made the mistake of posting to a question that had been "solved."  I'm not sure how I'm supposed to reopen a question that is pertinent to my question but doesn't quite solve mine.


This is what I see when I try to submit a question to the mathematica.stackexchange.com site:    I am unable to find any captcha boxes.  I should add that I'm using Google Chrome on Windows 8.1.

I'm not able to answer a question on Stack Overflow because the Human Verification page is showing up but without any CAPTCHA. I found many questions relating this but without a solution that worked for me. I guess this has something to do with my No-Script settings (Firefox plug-in). I selected "Temporarily allow all this page" several times but without success. I don't know of any proxy related restrictions on my internet connection but anyhow I there were some, I couldn't change them. Does this mean I can't pass the "Human verification"?


A family member just emailed me to inform me that he did some genealogical research and that we are distant cousins of William Shakespeare (1st cousin 14x removed).  I don't know anything about genealogy at all, but my suspicion is that (even if this is true) given that he was born 500 years ago the chance of being a distant cousin of him is nowhere near as remote as my family member thinks it is or might even be rather likely.  Can any experts confirm this with me?  So what I'm contending is it's not 100% probability to be a cousin of Shakespare fourteen times removed, but the probability is not extremely small either.  Apologies if this is a naive question as I don't know anything about this.

I was thinking about something the other day (that is probably stupid), and thought this would be a good place to talk about it.  If someone wanted to draw its family tree over the last 1000 years, he'd write a binary tree with a depth of about 40 (counting 25 years on average between each generations). This tree would have 240 leaves, or about 1012 ancestors on the deeper level. That is obviously much more than the total world population and a stupid figure when you think about it.  The only explanation that I can think of is that a real genealogy tree must have "linked" branches at several levels that change the actual number of ancestors. Anyway, for an average person, how many ancestors would that make? Could one assume that all or nearly all of the persons that lived in its country or world region a 1000 years ago would be part of its ancestors?


If I understand correctly, gravitational waves are ripples in the fabric of space-time itself created by the movement of mass. Moreover, space and time are just dimensions of the same space-time system.  I wonder if there are waves of space, are there waves of time too?

Two questions.  It is said that time can only go slower in gravity fields and if you move faster.  I have heard that when a gravitational wave pass earth then the space/time vibrate and time change for an instance.  But a wave is often with a top and a valley.  They have now atomic clocks that might be able to detect time variations, placed in satellites around the sun and "quantum entangled". "Using Atomic Clocks to Detect Gravitational Waves"   So what if we could compare time ticks between clocks in space at "absolute frame of reference" where time has its maximum universal speed as time in deep space between Galaxy Filaments.  Will we only detect that time ticks slower for an instance when the gravational wave pass?  1. Or will we detect that time tick slower AND faster than normal time also, as compared to zero gravity time and no movement time in "absolute frame of reference"?  2. Can time go let's say 10 times faster by theory/mathematics, by a extreme theoretical gravitational wave, than time in "absolute frame of reference time"?


My wifi device Realtek Semiconductor RTL8723DE Device d723 is not recognized by Ubuntu. The solution  seems to fit perfectly to my issue, but  did not work for me and I do not understand why.  Executing the fourth step,  sudo dkms build rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414, I get the output  Building module: cleaning build area... 'make' all KVER=4.15.0-22-generic...(bad exit status: 2) ERROR (dkms apport): binary package for rtl8723de: 5.1.1.8_21285.20171026_COEX20170111-1414 not found Error! Bad return status for module build on kernel: 4.15.0-22-generic (x86_64) Consult /var/lib/dkms/rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414/build/make.log for more information.   It seems to me that there is possibly some part of the package missing(?), and this did not get fixed by deleting the files and downloading again (in case the downloaded file was damaged).  I do not know what to do about that issue, as all the solutions I found seem to be some kind of the same, and lead to similar problems for me.   I am an inexperienced user, please tell me if there might be some important information missing.

How do I install Wi-Fi drivers for Realtek RTL8723DE device in Ubuntu 16.04?  lspci -v | grep -i network 02:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device d723


Let $f_n:[0,1]\to [0,1]$ continuous functions and let $f:[0,1]\to [0,1]$ such that $f_n$ converges uniformly to $f$. Show that $\frac{1}{n} \sum_{k=1}^n f_k$ also converges uniformly to $f$.  Now, I've seen a proof which starts with:  $$\frac{1}{n} \sum_{k=1}^n (f_k - f) = \frac{1}{n} \left[ f-f_1 + f-f_2 + \ldots + f_n -f \right] \le \ldots \le \varepsilon$$  BUT, why is it showing uniform converges? I mean, shouldn't it start with:  $$ \left( \frac{1}{n} \sum_{k=1}^n f_k \right) -f $$

I was able to prove, hopefully correctly, that the sum converges uniformly. But, I'm not sure how to show it converges uniformly specifically to $f$.  The way I proved it converges uniformly was by using the Dirichlet convergence test, by taking $a_k(x) = \frac1n$ and $b_k(x) = f_k(x)$. $\sum_{k=1}^n{b_k(x)}$ is uniformly bounded on $[0,1]$ by $n+2$ for instance, and $a_n$ is monotone and uniformly convergent to 0 because it does not depend on the value of $x$.  I got rather stuck after this. I guess I have to use the continuity of the functions and the uniform convergence of both, but I can't figure out how to show that they converge to the same thing. Any help will be greatly appreciated.


I downloaded a simple java app and I want to know which file I need to run to start. There are several classes in the project and I do not know which one is the main one. Thank you.

So far I've been using public void run() {} methods to execute my code in Java. When/why might one want to use main() or init() instead of run()?


I have a 1 TB hard drive when I run:   # fdisk -l    among other details I get:   Model: ATA HGST HTS721010A9 (scsi) Disk /dev/sda: 1000GB Sector size (logical/physical): 512B/4096B Partition Table: gpt   I view the logical sector size to be the operating system's sector size for I/O. However, it shows that the physical sector is 4096B. I'm not sure what's the difference between the two. Why the kernel would use a 512B sector for I/O versus 4096B sector, maybe for compatibility reasons? Wouldn't this slow I/O operations?

With many new hard drive disks the physical sector size is 4096. Would it be possible to make the system use a logical sector size of the same size, rather than the default logical sector size of 512?  Will it speed up bulk reads and writes? Where can it be configured?


Two $n × n$ matrices $A$ and $B$ are said to be simultaneously diagonalizable if there exists an invertible $n × n$ matrix $S$ such that $S^{−1}AS$ and $S^{−1}BS$ are both diagonal.  How do I prove that if $A$ and $B$ are $n × n$ matrices such that $A$ has $n$ distinct eigenvalues and $AB = BA$, then $A$ and $B$ are simultaneously diagonalizable.  I am totally lost on this problem.

Two $n\times n$ matrices $A, B$ are said to be simultaneously diagonalizable if there is a nonsingular matrix $S$ such that both $S^{-1}AS$ and $S^{-1}BS$ are diagonal matrices.      a) Show that simultaneously diagonalizable matrices commute: $AB = BA$.      b) Prove that the converse is valid, provided that one of the matrices has no multiple eigenvalues. Is every pair of commuting matrices simultaneously diagonalizable?   My attempt:  a) Let $M=S^{-1}AS$ and $P=S^{-1}BS$, then it follows that $A= S^{-1}MS$ and $B=S^{-1}PS$. Thus $AB =S^{-1}MSS^{-1}PS = S^{-1}MPS = S^{-1}PMS$ (is it wrong that I switched MP to PM?) $=S^{-1}PSS^{-1}MS=BA$.   b) How can I do this?


I need to show the numbering of my tables and figures up to subsection which makes the numbering have four digits (e.g. Table 1.2.3.4). When I create the List of tables or the List of figures the title of the caption overlaps with the last digit of numbering. See image:  I only find ways to add vertical space between entries, but not to add horizontal space within the entry. Any idea would be appreciated, especially if it doesn't change the spacing of the ToC. MWE \documentclass[11pt, a4paper, oneside]{report}  \usepackage{chngcntr} % to be able to change the numbering "depth"     \counterwithin{figure}{subsection} % make figures show subsection number     \counterwithin{table}{subsection} % make tables show subsection number  \begin{document}  \listoftables \newpage   \chapter{chap1} \section{sec1.1} \subsection{subsec1.1.1}  \begin{table}[!htb] \centering \caption{caption.} \begin{tabular}{lll} \hline Hola & Hello & Hallo \\  Adéu & Bye   & Tchüs \\ \hline \end{tabular} \end{table}  \begin{table}[!htb] \centering \caption{caption.} \begin{tabular}{lll} \hline Hola & Hello & Hallo \\  Adéu & Bye   & Tchüs \\ \hline \end{tabular} \end{table}  \begin{table}[!htb] \centering \caption{caption.} \begin{tabular}{lll} \hline Hola & Hello & Hallo \\  Adéu & Bye   & Tchüs \\ \hline \end{tabular} \end{table}   \end{document}

I use Lyx 2.1, document class : Report. My problem is that the titles of figures are written on the numbers at List of Figures.


The following one is working for restricting maximum number of authors for both citations and bibliography but how do we restrict to only citations.  \documentclass{article} \usepackage[T1]{fontenc} \usepackage[american]{babel} \usepackage{csquotes} \usepackage[style=authoryear,maxnames=2]{biblatex}  \renewcommand*{\finalnamedelim}{\addspace\&\space}  \addbibresource{biblatex-examples.bib}  \begin{document} Filler text \parencite{bertram,companion,jaffe,moraux}. \printbibliography \end{document}

I'm using the  package to add citations and a bibliography to my LaTeX document. I've noticed that only the first author plus "et al." is displayed for works with more than three authors. That's fine with me for in-text-citations, but I'd rather have the complete author information in the bibliography. How can I do that?


I tried to solve this problem, but check this out: $$\sqrt{x} = -1$$ $$x^\frac{1}{2}=-1$$ $$\frac{1}{2}\ln x = \ln (-1) = \pi i$$ $$\ln x = 2 \pi i$$ $$x = e^{2\pi i}$$ And if we plug this into the first equation: $$\sqrt{e^{2\pi i}} = \sqrt{(-1)^2} = \sqrt{1} = 1$$ This makes a paradox and there is actually no solution to the equation $\sqrt{x} = -1$ ! What is the value of the $x$ which satisfies the first equation? If there isn't, why can't we make an another imaginary number like $i$, where $i = \sqrt{-1}$?

I know there must be something unmathematical in the following but I don't know where it is: \begin{align} \sqrt{-1} &= i \\\\\ \frac1{\sqrt{-1}} &= \frac1i \\\\  \frac{\sqrt1}{\sqrt{-1}} &= \frac1i \\\\  \sqrt{\frac1{-1}} &= \frac1i \\\\  \sqrt{\frac{-1}1} &= \frac1i \\\\  \sqrt{-1} &= \frac1i \\\\  i &= \frac1i \\\\  i^2 &= 1 \\\\  -1 &= 1 \quad !!? \end{align}


I am dynamically adding a "lobby" to my table like so:  _rooms.forEach(room => {     const tr = document.createElement('tr')      tr.innerHTML = `         ${room.RoomName}	         ${room.UsersInRoom.length}	                      <form>                 <input class="btn btn-primary btn-sm btn-block" type="button" id="join" value="${room.RoomName}" />             </form>         	`      document.getElementById('room-list').appendChild(tr) })   But I want to be able to add an onclick event to the input type button. How can I achieve that?

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


I have a simple function to display genman texts from database. I get bad output on HTML : That's the output in HTML (you can see wei� instead of weiß)   My HTML head :  <!DOCTYPE html> <html lang="de"> <head>     <meta charset="latin1">   I tried UTF-8, ISO-8859-1 didn't work as well, same bad character  The data in my PHPMyQdmin table looks fine:   This is the structure of my table (field cName):    UPDATE 1 I tried to force the encoding in the SELECT query but didn't get the right result too :  SELECT column1, CONVERT(column2 USING utf8) FROM my_table  WHERE my_condition;   UPDATE 2 this is my PDO connection :   $conn = new PDO("mysql:host=$servername;dbname=cmondo;charset=utf8", $username, $password);

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.


When I start my system I get the GRUB menu.  By default, UBUNTU is selected. But the menu disappears only after 30 seconds or when I press enter.  Can I have Ubuntu boot by default and prevent this window from appearing?

In Ubuntu 12.04 (or above), how do I set the GRUB time and the default OS (that I see at boot time) as I'm dual-booting Windows (7/8) and Ubuntu (12.04 or above)?


I believe what I need is reflection, but after looking into it I'm not sure how I'm supposed to make it work.  I'm trying to run a second instance of the application that should tell the main instance to execute a procedure, and this code must run from the first instance. I've been able to identify if an instance is already running by using a mutex.  if (Mutex.WaitOne(TimeSpan.Zero, true) == false) {      //program already has an instance running      //How do I call a method on the first (already running) instance }   What I'd like it to do is execute a procedure from the first (already running) instance.

Should I use Named Pipes, or .NET Remoting to communicate with a running process on my machine?


I have the latest, Ubuntu 16.04, with the latest Firefox and Adobe Flashplayer version 11. Videos from YouTube, Vimeo, etc. are working fine. But no video from  will play. Why is this and how can I fix it?

As Adobe no longer supports Flash on Linux (see "NOTICE" below), is there a way to use Chrome's Pepper Flash plugin with Firefox?    NOTICE!  Flash no longer is supported for Linux EXCEPT as part of Chrome (with the exception of the extremely out of date Firefox 11.2 version, even though it gets security updates, it is still ancient and not updated that frequently).  This is detailed in the .  The relevant section is Platform support, sub section Personal Computers, section Linux, quoted here (January 14, 2015 was when this was pulled, and the most important lines in this have been bolded for important reasons because people won't want to read the whole thing here):     Linux      Adobe has been working closely with Google to develop a single, modern API for hosting plug-ins within the browser. The PPAPI, code-named "Pepper", aims to provide a layer between the plug-in and browser that abstracts away differences between browser and operating system implementations. You can find more information on the Pepper API at .      Because of this work, Adobe has been able to partner with Google in providing a "Pepper" implementation of Flash Player for all x86/64 platforms supported by the Google Chrome browser. Google now distributes this new Pepper-based Flash Player as part of Chrome on all platforms, including Linux.      For Flash Player releases after 11.2, the Flash Player browser plug-in for Linux will only be available via the "Pepper" API as part of the Google Chrome browser distribution and will no longer be available as a direct download from Adobe. Adobe will continue to provide security updates to non-Pepper distributions of Flash Player 11.2 on Linux for five years from its release.      Flash Player will continue to support browsers using non-"Pepper" plug-in APIs on platforms other than Linux.      Adobe will not be providing a Pepper-based debug player implementation of the Flash Player browser plug-in on Linux.      As of Adobe AIR 3, Adobe has discontinued support for Adobe AIR for Linux operating systems.