How to play audio faster but keep pitch?

Is there an application for Ubuntu that can play audio faster but maintain its pitch?  This is possible in Windows using an application like PowerDVD.


Why we follow DMAS rule? Why its not SAMD or MSAD? Are there any derivations for it?

I've problems with that BODMAS rule. I lost my 5 marks in the test for that. Why we should follow that DMAS rule? Why it is not any other combination? Are there any derivations for it? PS:-Sorry I'm confused with the tags with this question. I don't need any easy way to remember it.


Dual of l_inf space of bounded sequences in R

So, I was searching for ways of finding the dual of $l_\infty(\mathbb{R})$, (the space of bounded sequences of real numbers, under the infinity norm, i.e., $$||x|| = sup_{n\in\mathbb{N}} |x_n|.$$  I tried to approach the same way I did for $l_1, l_p, c_0$ and other similar spaces, however, I was not able to find any Schauder Basis for $l_\infty$. So I started searching, but I didn't find anything concrete about it. Does anybody knows an explicit "calculation" of $(l_\infty)^*$, or a book or paper that shows a way to obtain it?


I want to use a table in my answer. e.g  |-------------|----------------| | ShortCut    | Description    | |-------------|----------------|  I have posted an answer , which requires this kind of formatting.   Is it possible to have such formatting in stackoverflow Questions & answers ?    If yes, How ? If no, why ?   Edit : I tried to use following code directly in editor of SO. But it didn't work for me.

 hello	 hello2

 hello3	 hello4


Escape special character ^ in a regular expression in Java

I want to split a string in Java with the following format: "value^1" so that I get the initial part, "value" in a string.  I wanted to use split instead of substring, so I tried this:  string.split("^")[0]   but unfortunately ^ is a special character and I guess it has to be escaped. I tried split("\^") but no luck.  Anybody knows how to achieve this using split?  Thanks!


System.LimitException: Maximum stack depth reached: 1001 Error

I'm not sure Why I'm getting this Error Message without any indication of what line is the error from.  I remove the parameter from the Constructor because I'm planning on shifting this code to the scheduler and the scheduler won't allow me to add a class that have a constructor with parameter.  Can someone help me fix it?    Error Message  System.LimitException: Maximum stack depth reached: 1001     Code  global class testFBInt {   String username = 'username'; String password = 'password'; String clientId = 'consumer_id'; String clientSecret = 'consumer_secret'; String tokenEndpoint = 'https://test.salesforce.com/services/oauth2/token';  public testFBInt () {     this.username = username;     this.password = password;     this.clientId = clientId;     this.clientSecret = clientSecret; }    global void Execute(){  String sessionId = requestAccessToken(); exInt(sessionId); }  public String requestAccessToken() {     HttpRequest req = new HttpRequest();     req.setEndpoint(tokenEndpoint);     req.setMethod('POST');     req.setBody(buildHttpQuery(new Map<String, String> {         'grant_type' => 'password',         'username' => username,         'password' => password,         'client_id' => clientId,         'client_secret' => clientSecret     }));      Http http = new Http();     HttpResponse resp = http.send(req);      Map<String, Object> m =         (Map<String, Object>) JSON.deserializeUntyped(resp.getBody());      return (String) m.get('access_token'); }  static String buildHttpQuery(Map<String, String> queryParams) {     if (queryParams.isEmpty()) {         return '';     }      String[] params = new String[] {};     for (String k : queryParams.keySet()) {         String v = EncodingUtil.urlEncode(queryParams.get(k), 'UTF-8');          params.add(String.format('{0}={1}', new String[] { k, v }));     }      return String.join(params, '&'); }    @future(callout=true)  public static void exInt(string sessionId) {     String dashboardImageURL = 'https://ap4.salesforce.com/servlet/servlet.ChartServer?rsid=.....';  String base64Data; httprequest req = new httprequest(); req.setEndpoint(dashboardImageURL); req.setmethod('GET'); req.setHeader('Authorization', 'OAuth ' + sessionId); http http = new http(); httpresponse res = http.send(req); Blob image = res.getBodyAsBlob(); base64Data =  EncodingUtil.base64Encode(image);   Document docatt = new Document(); docatt.Name = 'Chart 1.jpg'; docatt.Body = EncodingUtil.base64Decode(base64Data); docatt.FOLDERID = '00l6F005101pqGi'; //Your folder id docatt.IsPublic = true;  insert docatt;  System.Debug('@@ doc ' + docatt); } }     Error When Debugging from Developer Console      Developer Console Code  testFBInt s = new testFBInt();  s.Execute();


How can you have two auto-incremental columns in one table?

I have a MySQL table that contains information on invoices of a company. However, this company has two branches, and each of them has a unique invoicing sequence; a "Serie A" and "Serie B", so to speak. However, this is one single company and I do not want to create two invoice tables. Rather, I somehow want to have two different auto-increments for one table. I know this is technically not possible, but I guess this is a problem others have tackled before, so I'd like to know if there is a well-known 'solution' for this issue?   What I am doing right now is not using the primary key as invoice number (which would be ideal), but rather using a secondary column with the invoice id, which is incremented manually (well, using a PHP script, but it's still not automatic), by checking the latest invoice for that particular series.   This is my current setup:  CREATE TABLE `invoices` (   `id` mediumint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,   `invoicenumber` mediumint unsigned NOT NULL,   `branch` enum('A','B') NOT NULL,   `date` date NOT NULL,   `client` varchar(100) NOT NULL ) COMMENT='' ENGINE='InnoDB';   To check the lateset invoice, I run:  SELECT MAX(invoicenumber+1) AS new_invoice_number FROM invoices WHERE branch = 'A'


What is the best time to open and close a connection to database?

Every connection needs to be opened and closed. But what time is the best or it depends on the situation?   Open connection when initiate a windows(WPF), form(Windows form), webpage(ASP.NET) and close when the user close window/form/webpage. Open connection only when user calls the database. For example the user click "Add" button and we run the SQL "INSERT..." then close the connection ASAP. Then if the user click Add/Edit again we have to reconnect to the database, run the SQL and close it ASAP again?   Both solutions have their advantages. By keeping the connection, we will make the program more performance. By keep connecting and disconnecting, the performance will drop.


Use text font in siunitx instead of math font

How can the font used to set the value and unit with the siunitx package be changed to the main text font used in the document?    Intuitively, the main font should be the standard font setting.  However, the math font seems to be used instead, see code below.    % !TeX program = lualatex  \documentclass[a4paper]{article}  \usepackage{fontspec} \setmainfont{TeX Gyre Heros}  \usepackage{unicode-math} \setmathfont{XITS Math}  \usepackage{siunitx}  \begin{document} The gain $G=\SI{2}{dB}$, which is \SI{1}{dB} higher than before. \end{document}


What composes the E Field of the Electromagnetic Wave where "disturbances" for propagation occurs?

If electromagnetic waves cause disturbances in the Electric Field… what “is” in this E Field which photons Interact with?  I ask because in Vacuum, there are no electrons to excite. So what is “it” that's adding up in the E Field as a disturbance in wave propagation?


find all the values of a and b so that the system has a) no solution b) 1 solution c) exactly 3 solutions and 4) infinitely many solutions

$$\begin{cases} &x  &- &y &+ &2z &= 4 \\ &3x &- &2y &+ &9z &= 14 \\ &2x &- &4y &+ &az &= b \end{cases} $$ I know that $a$ and $b$ has to either equal to something or not in order to satisfy the $4$ conditions stated above.   my matrices looked like $$         \begin{bmatrix}         1 & -1 & 2 \\         0 & 1 & 3 \\         0 & 0 & a+12 \\         \end{bmatrix} \begin{bmatrix}         x & \\         y &\\         z &  \\         \end{bmatrix}= \begin{bmatrix}         6 &  \\         2 & \\         b+8 & \\         \end{bmatrix} $$


Can I enter Pakistan on my Pakistani passport which expires in less than 1 month?

My Pakistani passport expires less than a month from now. I understand that some countries only let people in if their passport is valid for six months or more. Will I be able to enter Pakistan on a passport that is about to expire?  Also, travelling back to Pakistan is likely to involve transiting through some other country.  Does the six-month rule still apply to people returning to their country of citizenship?


The converse of continuous image of a connected set is connected

I have recently proven that given $f:X\rightarrow Y, f$ continuous, X connected, then Y is connected. I wonder if the converse is true if we consider open mapping. In other words, Given X and Y connected set, if $\exists f:X\rightarrow Y$ s.t.  $f(U)$ is open in Y $\forall$ open set $U\subset X$, then can we prove that f is continuous?


Show that $\prod _{i<j}(x_i-x_j)$ can be divided wihout remainder in $\prod_{i<j}(i-j)$

Let $x_1,...,x_n$ be a natural numbers,      show that $\prod _{i<j}(x_i-x_j)$ can be divided wihout remainder in $\prod_{i<j}(i-j)$   I know $\prod \left(x_i-x_j\right)$ is the result of Vandermonde Determinant, so is related with Det?


Proof that $\mathbb{Z}\left[\frac{1 + \sqrt{-19}}{2}\right]$ is a PID

How would one prove that $\mathbb{Z}\left[\frac{1 + \sqrt{-19}}{2}\right]$ is a principal ideal domain (PID)? It isn't a Euclidean domain according to .


Mirror Modifier not working with subdivision surface

I created a chair, and added a mirror modifier as well as a subdivision surface modifier. I made sure that the subsurf mod is below the mirror mod, as you can see in the picture below. However, there is still a visible shrink in the mesh at the point where the right and left side of the mirror meet.    I also made sure that the mirror line is at the origin of the object, that all the vertices on the mirror line are indeed merged together, and that the points beside the mirror points are in  line (the meeting point is not a v-shape).    This causes there to be a visible line when rendering the image.  How can I fix this problem?


Difference between Convert.ToByte(val) and (byte)val

As said in the title I don't understand the difference between this two type of conversion. Not only for the byte but also the other variable type.  So what is the difference and when I have to use one instead of the other?


Is it OK to answer a question that you also vote to close?

seems to suggest that it's common knowledge that it's not to be encouraged. However, if there is a simple (and usually really short) answer, should I not vote to close it and answer instead?


What should happen to questions asked by non-existent users with answers that score higher than the accepted answer?

Here's the scenario:  Bob asks a question on Stack Overflow. Bob gets a few answers and selects the one that helps him the most. Bob's account gets deleted. Another (considerably better) answer is posted to Bob's question. The new answer soon scores higher than the accepted answer.  There is no way for Bob (or anyone) to change the accepted answer on the question. However, it's still the first thing everybody sees when they visit the question (despite the fact that there is a better answer further down). Now I can almost hear somebody asking the question, "but how often does this really happen?" I'm glad you asked. I just spent the last hour or so constructing a Data.SE query to answer exactly that:    The results? 3,177 rows. Naturally, I am wondering if there is anything that can be done about this. The following options immediately come to my mind:  Change the accepted answer. This option is here for completeness. I doubt anyone here (including me) actually would consider it. The accepted answer was selected by the user and changing it does not make sense.  Change the sorting order. This makes much more sense. Note that I am not advocating that we always change the sorting order whenever an answer outscores the accepted answer. I am only advocating that this happen when the OP's account has been deleted.  Remove the checkmark from the accepted answer. This option was suggested by Robert Harvey and I actually think it's a viable option as well. After all, the OP is no longer around, so I don't see much value in indicating which answer helped him the most.   Any thoughts? (Also, I'm not an SQL expert, so if you have suggestions for improving the query, feel free to point them out.)


Why are my questions closed by these users?

I get blocked because my questions have been closed several times without a clear reason for closing them. Why were my questions closed?     (now closed and deleted)   (now closed and deleted)   (now deleted)


How to assign the volume key for clicking pic in Samsung Galaxy Tab 3

Please help, i have a samsung galaxy tab 3 and i want to assign my volume keys for clicking pics when the camera is switched on and thank you in advance


jQuery AJAX inserts everything into DB... BUT the image?

So, everything works fine if I insert my form info with pure PHP, everything inserts into my DB including the –input "type/file"– (meaning, the image too).   But when it comes to insert it via AJAX, it inserts everything BUT the image. For some reason the image is the only thing I can't get to insert when it comes to doing it via AJAX. Here's my code.  AJAX CALL  $('#insert_form').click(function(e){         $.ajax({             type: 'POST',             url: 'insert_form_backend.php',             data: $('#__form__').serialize(),             success: function() {                 alert("Insert Successful");             }         });         e.preventDefault();     });   insert_form_backend.php  <?php  require_once "mysql/db.php";   $name = $_POST['name']; $surname = $_POST['surname'];  $photo = $_FILES['photo']['name']; $photo_temp = $_FILES['photo']['tmp_name']; $photo_path = "folder_temp_images/$photo"; move_uploaded_file($photo_temp, $photo_path);    $query = "INSERT INTO my_table(column1, column2) "; $query .= "VALUES ('$column1', '$column2')";  $result = mysqli_query($connection, $query);  ?>   As I said above, it ONLY inserts everything (including image) if I submit the form with pure PHP, meaning, it refreshes the whole page.  Thanks, I don't want to throw in the towel on this, I really want to make this with ajax. I hope we could fix this!  FOR FILE IN AJAX try this method:  $("#photo").change(function(){     var file_datta = $('#photo').prop('files')[0];        var form_datta = new FormData();                       form_datta.append('file', file_datta);                              $.ajax({                     url: 'insert_form_backend.php', // point to server-side PHP script                      dataType: 'text',  // what to expect back from the PHP script, if anything                     cache: false,                     contentType: false,                     processData: false,                     data: form_datta,                                              type: 'post',                     success: function(php_script_response){                     }          });     });


Oracle SQL: Get the max record for each duplicate ID in self join table

It's been marked as a duplicate and seems to be explained a bit in the linked questions, but I'm still trying to get the separate DEBIT and CREDIT columns on the same row.   I've created a View and I am currently self joining it. I'm trying to get the max Header_ID for each date.   My SQL is currently:  SELECT DISTINCT TAB1.id,  TAB1.glperiods_id,  MAX(TAB2.HEADER_ID), TAB1.batch_date,  TAB1.debit,  TAB2.credit,  TAB1.descrip  FROM IQMS.V_TEST_GLBATCH_GJ TAB1  LEFT OUTER JOIN IQMS.V_TEST_GLBATCH_GJ TAB2 ON TAB1.ID = TAB2.ID AND TAB1.BATCH_DATE = TAB2.BATCH_DATE AND TAB1.GLPERIODS_ID = TAB2.GLPERIODS_ID AND TAB1.DESCRIP = TAB2.DESCRIP AND TAB1.DEBIT <> TAB2.CREDIT  WHERE TAB1.ACCT = '3648-00-0' AND TAB1.DESCRIP NOT LIKE '%INV%' AND TAB1.DEBIT IS NOT NULL  GROUP BY TAB1.id,  TAB1.glperiods_id,  TAB1.batch_date,  TAB1.debit,  TAB2.credit,  TAB1.descrip  ORDER BY TAB1.batch_date   And the output for this is (37 rows in total):    I'm joining the table onto itself to get DEBIT and CREDIT on the same line. How do I select only the rows with the max HEADER_ID per BATCH_DATE ?     Update   For @sagi  Those highlighted with the red box are the rows I want and the ones in blue would be the ones I'm filtering out.       Fixed mistake   I recently noticed I had joined my table onto itself without making sure TAB2 ACCT='3648-00-0'.  The corrected SQL is here:  SELECT DISTINCT TAB1.id,  TAB1.glperiods_id,  Tab1.HEADER_ID, TAB1.batch_date,  TAB1.debit,  TAB2.credit,  TAB1.descrip  FROM IQMS.V_TEST_GLBATCH_GJ TAB1  LEFT OUTER JOIN IQMS.V_TEST_GLBATCH_GJ TAB2 ON TAB1.ID = TAB2.ID AND TAB1.BATCH_DATE = TAB2.BATCH_DATE AND TAB2.ACCT ='3648-00-0'AND TAB1.GLPERIODS_ID = TAB2.GLPERIODS_ID AND TAB1.DESCRIP = TAB2.DESCRIP AND TAB1.DEBIT <> TAB2.CREDIT  WHERE TAB1.ACCT = '3648-00-0' AND TAB1.DESCRIP NOT LIKE '%INV%' AND TAB1.DEBIT IS NOT NULL  ORDER BY TAB1.BATCH_DATE


I test all the suggested answers but still I canon't reset or remove password or even reinstall the mysql db on Ubuntu 16.04, Is there any ohter idea?   #1045 - Access denied for user 'root'@'localhost' (using password: YES)


Mac OS 10.10 Yosemite: Where do I get the patch to fix the Meltdown exploit?

All I found were articles on patch availability for El Capitan, Sierra, and High Sierra. Where do I get a patch to fix the Meltdown exploit? (type that into Google if you don't know what that is, it's been all the buzz in tech news last week)  Bonus points if there's also a patch to minimize the risk of the Spectre exploit.


Python operating on big numbers causes margin errors

Greeting fellas.  I was performing the algorithm intended to obtain the number of partitions of a integer. When I tested my program, margin errors started to occur when n > 257. I actually had the same problem on another matter while working with factorials, but my thoughts were on the algorithm itself having some flaws. I know that python 3.5.x doesn't really have limits on number size.   I even tried to do the sum the old fashioned way with every sum being from:  from decimal import Decimal   but it didn't change the result (only added a longer computational time).  #! /usr/bin/python3.5  from unittest import TestCase as Test  def number_partition(n):     """      Building the 'Euler' triangle such as                 n     p(n,j) =    sum p(n-j,i)                 i=j     """     if n <  0: return 0     if n is 0: return 1     p = []     for i in range(n):         p.append([])         for j in range(i+1):             if j is i: p[i].append(1) ; break             p[i].append(sum(p[i-j-1][j:]))      return sum(p[n-1])   if __name__ == '__main__': #    number_partition(257) Test.assertEqual(Test(), number_partition(257), 394723676655357) # Pass Test.assertEqual(Test(), number_partition(258), 425933084409356) # returns 425933084409355 Test.assertEqual(Test(), number_partition(259), 459545750448675) # returns 459545750448673   So is the algorithm flawed, or is there a Python functionnality I didn't get ?  Thank you in advance for your time.


Convert GeoJSON form EPSG 3857 to 4326 with JavaScript

Given a GeoJSON in EPSG3857:  {   "type": "Feature",   "properties": {},   "geometry": {     "type": "LineString",     "coordinates": [       [         -13720479.997764934,         5688254.733325758       ],       [         -13720479.47473932,         5688241.794717406       ]     ]   } }   I am trying to convert the GeoJSON to EPSG 4326 for a Leaflet map. The user input in the map comes in EPSG 3857. I want to do the conversion with JavaScript after the user enters the GeoJSON. So I am looking for a JavaScript library that I can use. I am not looking for tools with whom I can convert the GeoJSON outside of my script (like GDAL/OGR)  .  I tried Proj4 but didn't get it to work. Is it possible to use Proj4 to convert line strings? If not, what other options should I consider?  var epsg4326 = new Proj4js.Proj('EPSG:4326'); var epsg3857 = new Proj4js.Proj('EPSG:3857');  var geoJSONOBJ4 = new Proj4js.Point(geoJSONOBJ3); Proj4js.transform(epsg4326,epsg3857,geoJSONOBJ4);


What is a mathematical solution to this problem? (Project Euler #106)

I've already asked this  before, but then I realized that wording was, unfortunately, quite confusing. The statement of the problem is following:  Let $S(A)$ represent the sum of elements in set A of size n. We shall call it a special sum set if for any two non-empty disjoint subsets, $B$ and $C$, the following properties are true: $1.$ $S(B) ≠ S(C$); that is, sums of subsets cannot be equal. $2.$ If B contains more elements than $C$ then $S(B) > S(C)$. For this problem we shall assume that a given set contains n strictly increasing elements and it already satisfies the second rule. Surprisingly, out of the 25 possible subset pairs that can be obtained from a set for which $n = 4$, only 1 of these pairs need to be tested for equality (first rule). Similarly, when $n = 7$, only 70 out of the $966$ subset pairs need to be tested. For $n = 12$, how many of the $261625$ subset pairs that can be obtained need to be tested for equality?  Problem statement specifies that, if size of subset $B$ doesn't equal to the size of the subset $C$, then theirs sums will not be equal by default. So when testing set $A$ for the equality, we only consider subsets with the same size. The main question is, for arbitrary set $A$ with size $n$ which satisfies conditions specified in the problem, how many pairs of subsets with the same size are needed to be tested? I couldn't have come up with purely mathematical solution myself, so I checked answers provided by the users in the discussion thread. A lot of them mentioned so called "grid method", for example, one of the posts:  First, some observations. If elements of the set are assigned in ascending order to subset $B$, subset $C$, or discarded, and every element of $B$ can be paired with an element of $C$ that was selected later, then B's sum will be smaller than $C$'s, and the comparison will not be necessary. If you imagine a walk on a grid from upper left to lower right, where selecting an element for subset $B$ is like walking East, and selecting an element for subset $C$ is like walking South, and selecting an element for neither subset is effectively the same as selecting it for both (East, then South), then a walk that crosses the diagonal from north to south (with this direction being the first diagonal crossing) corresponds exactly to a subset pair that must be compared.  And one more  Clearly we only need to test equal size groups $(k)$. If we select $2k$ elements, we only need to test some partition of that into $2k$-size groups if there is an $m$-smallest number in the group with the smallest element that is bigger than the $m$-smallest number in the other group. This can be modeled as a path across a $k×k$ grid that crosses the diagonal, so we can use Catalan numbers $C_k$ (which count paths that don't cross the diagonal) and half the total number of paths across the grid to get the number of diagonal-crossing paths (half = given start direction).Then the selection of the initial $2k$ set is a binomial coefficient, and sum across values of $k$.  Can some explain what is this "grid" they are referring to? And how do you solve the problem using this method?


Why is USB extension distance so limited?

The known acceptable range for (for example) an ethernet networking cable before any kind of noticable drop in speed or latency appears is a whole 100 meters for standard class cat5e, cat6 and cat6e cables, and there are variants that can extend this range up to 500 meters and this is for 100mbps, 1gbps and 10gbps speeds depending on what cable you're using...  And I don't know the specs for HDMI, but I'm having absolutely no noticable problems with a 10 meter hdmi cable, and judging by what I saw on the market this should go on for quite some distance beyond this (at least 20m).  Meanwhile over in USB land the maximum distance extension cable I've seen was 3 meters, any longer and it's generally deemed unreliable unless you have a repeater on your cable, and I've actually tested this and if I am extending a USB cable beyond the recommended parameters I start seeing problems (even over 5m with a repeater I have problems) hell, I have a 5 meter cable with no repeater, and it worked for a while shortly after I got it, but then when I tried to connect devices to it after only short use it simply stopped working (windows said unknown/unrecognized device or something like that) and this is only for up to a maximum of 5gbit transfer rates, much lower than what you could acheive with ethernet.  And somehow despite all these problems, it seems like it has no issue with USB Hubs for connecting multiple devices to the same port (as long as they all get powered independently...) but admittedly this too starts degrading if you are using extension cables...  Why does USB have these problems with cable lengths; and only these VERY SHORT lengths when everything else seems to be able to extend pretty much across an entire building without any noticable issues?  And is there anything that can be done to bypass these limitations?


Identical Servers but different query execution plans

We have two server with identical hardware configuration and SQL server configuration. The only difference in the server's being:  Server SQL1 - 256 GB RAM  Server SQL2 - 128 GB RAM  The same database has been restored on both servers. The query execution plan for a query on both servers is different.The MAXDOP on both servers is 4. But the query runs in 10 mins on SQL1 but takes 1 min on SQL2.   What would cause the query execution plans to be different? SQL1 where the query is slower, does have more load on it when compared to SQL2. Does load matter when SQL server decides on a query execution plan?  We set MAXDOP = 1 on SQL1 and we saw the query complete in 1 minute.  What would explain this?  Thanks


How to save a Redshift SELECT atribute into a script variable

I want to create a script to automate some processes with Redshift. Specifically, I want find an attribute of one of my tables with a SELECT and then use it in a INSERT. My script looks like this:  psql -h ... -c "SELECT id_process FROM process WHERE de_process = 'EMR'" psql -h ... -c "INSERT INTO execution (id_process) values (X);"   In the first sentence I get a unique value, the ID I'm looking for, in a format like this:  id_proceso ------------       2 (1 row)   Then I would like to use it as the value to insert in the second sentence, substituting the "X, but I don't know how to save into a variable and then reuse the output of the first sentence.  Any suggestion?  P.D. In other  it shows how to do it in a unique sentence, but I need to save the value for a future use.


I am worried that some people just want to misuse the site, just like a lot of other sites. It is possible that some people might be interested in making people lose massive amounts of reputation for their entertainment. If six or more banded up, each patrolling through questions and each casting one spam/offensive flag on each question/answer, it could cause some users to lose hundreds of reputation relatively quickly. Could this mean an end or something on a similar scale to the stack exchange where it takes place? If not, then about how much trouble could such troll armies cause? Have moderators or other such people considered this possibility and accounted for it?


Is it safe to travel in Greece during the riots about government spending cuts?

I am travelling to Athens, Greece, shortly, and have seen . Should I be worried? Should I cancel my trip?  Update  It's fine, taxis are currently on strike, but Syntagma Sqaure is fine:


Simplify -270y^2/189x^3 Not too sure how to go about simplifying this. I googled it, and google showed me the steps but no explanation. Step 1: Cancel terms that are in both numerator and denominator      -270y^2/189 * x^3  Reduced: -10y^2/7 * x^3 Step 2: combine multiplied terms into a single fraction      -10y^2/7 * x^3       -10y^2 * x^3 / 7  Solution: -10y^2 * x^3 / 7 Why did 7x^3 get separated into 7 and x^3? Why did the equation get multiplied or looks multiplied by x^3? Why do we combine x^3 with 10y^2 in the numerator? I.E. 10y^2*x^3 / 7? Can someone go over simplifying this in a more detailed manner? TIA


symbol for the set of integers from 1 to N

Is there a special symbol for the set: $$ \{1, 2, 3, \dots, n\}$$,  or $$\{x| 1\leq x\leq n, n \in \mathbb{Z} \} $$?


What can be done about repetitive questions?

Some questions tend to get asked in thousands and thousands of permutations. One such type of question is questions on Apache's mod_rewrite. This   catches most (not all) of them. There are three "please write my rewrite rule for me" type questions today alone. My feeling is that one such question ("I want this and that kind of URL to be redirected to this and that file") comes up every day at least once. Other examples are:  "Headers already sent" (PHP)  How do I let a container wrap around floated child elements? (HTML)  I get garbled special characters on my web page (HTML / (my)SQL / Unicode)  And hundreds, if not thousands more.   They are always very, very specific, so they can't really be closed as duplicates of anything else. Still, essentially, one quick run-down with a few examples would do for many of these. Instead, they usually get answered after some time. Because of their specificity, and their vast numbers, it is my opinion that many of these questions have little value for future generations. What do you think? Is this being perceived as a problem? Does this warrant a whole new kind of close reason with a link to a FAQ page or reference question or something? That's what floats in my mind as the right solution. Do we need a master question for these to close the other questions as a duplicate of? Bounty starting a bounty to incite some more discussion.


When I want to globally modify a command in my document, I will often use a duplicated version of the original in the stencil, with the help of the \let macro.  For example, if I wanted to do something every time I created a section, I might say:  \let\svsection\section \renewcommand\section[1]{\mychanges\svsection{#1}}   It just dawned on me that I don't know how or if something similar can be done for environments.  What I would hope for is something like (I'm omitting arguments for the sake of simplicity, don't focus on that):  \let\svfigure\figure \renewenvironment{figure}{\blahblah\begin{svfigure}}                          {\end{svfigure}\moreblah}   Of course, this syntax won't work because \figure isn't a command.  But, I was hoping that the creation of environment abc would always be accompanied by the creation of associated constructed commands, for example, \start@abc and \end@abc, such that these associated commands could be \let to duplicate the original environment.  I also realize that one approach may be to "patch" the original environment, but I don't think that is really what I'm asking, since I'm not sure a patch can be easily undone, whereas redoing a \let in the opposite direction (e.g., \let\section\svsection) will totally undo the effects of redefinition.  It would be a handy feature to know how to duplicate an environment, so that the original copy can be \renewed in the fashion I describe.


What happens if the ball is bounced into the basket?

What happens when I bounce-pass the ball into the basket, like in a circus shot? Does this count as a successful basket?


I am traveling from Doha to Faro in Portugal via Heathrow.   I have a Schengen visa but no UK visa. I will need to transit from Terminal 4 ain Heathrow to Terminal 5. Will I be able to do this airside?


We have an error log object where we store the errors and I have a simple try catch like below... My issue is that the insert in the finally does not appear to be happening. Any advice? or is that a limitation in the try-catch error handling? list<Error_Log__c> error_logs = new list<Error_Log__c> () try {    if(status__c == '100') {       \\do something    } else {        throw new AuraHandledException('System Error');    }   } Catch (Exception e) {    Error_Log__c rec = new Error_Log__c(Name="Error Message: ");    error_logs.add(rec);    throw new AuraHandledException('System Error'); } finally {   insert error_logs; }


Can you backup/transfer iOS individual game saves without jalibreaking your device?

I have both an iPod touch and an iPhone (yes, redundant, I have my reasons), none of them are jailbroken. Some apps I own are installed on both devices, I would like to copy an app's save from one device onto the other. I know that there are apps for jailbroken devices to backup saves but I was wondering if there's a method that doesn't involve jalbreaking (by a third party PC/Mac tool, for example).  (Side note: I know that restoring one device's backup on the other device will transfer all the apps states but that will mean wiping the device completely)


I want to send intent from onReceive() method to onResume() method.  In my opinion, It was OK to send from onReceive() to onResume().  However, In onResume() method.   Intent intent_Main = getIntent(); String getmsg = intent_Main.getExtras().getString("states"); textView.setText("Broadcast message received:"+getmsg);   If i use intent_Main.getExtras().getString("states"); statement, the application was stopped.   What is the problem?   I think that there is no problem in BroadcastReceiver or transmit intent.  Logcat,  11-11 02:13:39.268 2666-2666/com.example.wonheelee.simplereceiver E/AndroidRuntime: FATAL EXCEPTION: main                 Process: com.example.wonheelee.simplereceiver, PID: 2666                 java.lang.RuntimeException: Unable to resume activity {com.example.wonheelee.simplereceiver/com.example.wonheelee.simplereceiver.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.os.Bundle.getString(java.lang.String)' on a null object reference                     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3103)                     at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3134)                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2481)                     at android.app.ActivityThread.-wrap11(ActivityThread.java)                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)                     at android.os.Handler.dispatchMessage(Handler.java:102)                     at android.os.Looper.loop(Looper.java:148)                     at android.app.ActivityThread.main(ActivityThread.java:5417)                     at java.lang.reflect.Method.invoke(Native Method)                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)                  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.os.Bundle.getString(java.lang.String)' on a null object reference                     at com.example.wonheelee.simplereceiver.MainActivity.onResume(MainActivity.java:45)                     at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1258)                     at android.app.Activity.performResume(Activity.java:6312)                     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3092)                     at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3134)                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2481)                      at android.app.ActivityThread.-wrap11(ActivityThread.java)                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)                      at android.os.Handler.dispatchMessage(Handler.java:102)                      at android.os.Looper.loop(Looper.java:148)                      at android.app.ActivityThread.main(ActivityThread.java:5417)                      at java.lang.reflect.Method.invoke(Native Method)                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)


Get source code of calling function in python

For debugging purposes I would like to get the source code of the function that has called my function.  So in the following situation:  def calling_func():     x = 123     y = x + 1     myfunc()  def myfunc():     calling_source = f()   I would like a function f, such that calling_source becomes the string  """ x = 123 y = x + 1 myfunc() """   Does such a function exist?  I'm guessing that this might be possible with something like sys._current_frames and the inspect module.


Segfault when creating an array larger than 100000

How can I fix this code?  I can't input a value for n more than 100000 but I have declared it as long long int.   I tried to solve it but couldn't. Please tell me what is wrong.  #include<stdio.h>  void main() {     long int n;     scanf("%ld",&n);     unsigned long long int a[n];     unsigned long long int max[n];     for(unsigned long long int i=0;i<n;i++) {         scanf("%lld",&a[i]);     }     for(unsigned long long int i=0;i<n;i++) {         unsigned long long int count=0;         for(unsigned long long int j=0;j<n;j++) {             if(a[i]==a[j]) {                 count++;             }         }         max[i]=count;     }      for(unsigned long long int i=1;i<n;i++) {         if(max[0]<max[i]) {             max[0]=max[i];             a[0]=a[i];         }         else if(max[0]==max[i]) {             if(a[0]>a[i]) {                 a[0]=a[i];             }         }     }     printf("%lld",a[0]); }


Combination and Permutation How many words can be formed?

A contest consists of finding all code words that can be formed from the letters in the word "alpha".Assume that the letter "a" can be used twice but the others at most once:  a)How many five-letter words can be formed?  5*4*3=60 words  b)How many two-letter words can be formed?  with two letter words can be formed is 13  c)How many  words can be formed?  5 letter words=60 4 letter words=60 3 letter words=33 2 letter words=13 1 letter words=4 so,60+60+33+13+4=170  Could you please check t for me?


When I try to zoom in/out or move the view, nothing happens. All I can do is spin in one stationary spot. I've tried using a mouse, I've tried restarting my computer, and updating Blender to the newest version. I don't even know why it happened in the first place. It was working fine all day then it just wouldn't let me move all of a sudden.


install cisco VPN client on linux in place on WIN XP

I have win XP with VPN client version - Cisco 5.0.01.0600  Now we want to replace the WIN XP with linux machine , red-hat version 5.x or 6.x ,  My question is , what the equivalent VPN version that I need to install on the new Linux machine , ( in order to get full compatibility as it was on the WIN xp machine )  Please advice also where I can download the cisco VPN version for linux


how to prove the existence and uniqueness of the prime factorization of any natural number.

Use the Well-Ordering Principle to prove the Fundamental Theorem of Arithmetic, i.e. the existence and uniqueness of the prime factorization of any natural number.  hi dear all, I checked two videos of the theorems on Youtube, but I don't know how to combine them together to solve the question. well-ordering principle: every non-empty subset of positive integers has at least an element.  Fundamental Theorem of Arithmetic: According to the video that I watched on Youtube, the factorization of n into product of primes is unique except for the order the factors.  ok, now I understand the meaning of well-ordering principle, but I am not sure about the Fundamental Theorem of Arithmetic, and how can we combine the two theorems to solve this problem?  thanks.


Setting Google results to stay in a language, regardless of location

How do I keep the Google search results in English regardless of where I am searching from? Google is a genius at knowing what ads to show me and what particular language to show me the ads.    If I travel to Germany, I start getting Google results in German, which is OK because I can somewhat manage. However, when I go to Brazil I don't speak Portuguese and would like the results in English. Or is Google only allowing me to read the ads in a language I know?  I'm constantly having to click and reclick the bottom link "Google in English". I have tried every setting I can think of set to English in my Google preferences/settings, is there one I'm overlooking?


Short Prove or Disprove: $R_1 \cap R_2$ is an equivalence relation

Suppose $R_1, R_2$ are both equivalence relations defined on nonempty set $A$. Prove or disprove: $R_1 \cap R_2$ is an equivalence relation.   What method (if any) would you take to prove this in as few sentences as possible?


Suggestion: forbid overzealous grammatical "improvements" (at least for articles)

I've recently run into someone who managed to make an answer harder to read by adding too many "the/a" articles, which can sometimes be omitted in English under certain circumstances.  The and a pretty much are shorthand for this or any. And when a generic statement that applies to a wide category of objects is sprinkled with too many unnecessary occurrences of the or a, it simply makes it harder to read because it adds noise.  This is not the first occurrence of useless grammar beautification.  I propose that we:   Forbid adding extra words to someone else's text unless it is marked as Community Wiki. Or at least make it so only the original author alone can accept suggested edits. Forbid useless reformatting (inserting of whitespaces, retabbing, moving brackets around, and such).   Exceptions:   When a word is clearly misspelled. So replacing somethings with something’s does not qualify. However, use th iz complir to fixit would qualify for editing. When the author failed to start a code formatting block properly (because she forgot four spaces, etc)   Reasoning:   The answer belongs to whoever wrote it, so you should not change it unless granted permission or unless there’s an “emergency” (like missing code formatting space or a major case of misspelling).  By that logic, marking an answer as Community Wiki grants permission to everyone to modify that answer. Grammatical beautification is a waste of time that gives only the illusion of doing something useful. Time spent there should be spent on answering/voting on questions instead. Whoever can benefit from the answer will benefit from it even if an article is missing here and there. Overzealous proofreading text takes time and generally has a  negligible effect on an answer’s usability. You pretty much waste ten minutes to save someone one second. Not worth it.   Alternative approach: Instead of site-wide rules, it would be reasonable to have a profile checkbox that forbids any changes to your posts unless you personally approve them or unless those posts were marked as community wiki. By default the checkbox would be disabled.   The main reason why this change is suggested is that, with the current behavior I have to babysit every single answer I ever made when someone suggests an edit and check if their suggestion properly reflects the answer's original meaning.   Such behavior wastes a lot of time, and makes posting answers undesirable.   Therefore it would be reasonable to get rid of this "friendly samaritan" editing and restrict the available tools to "upvote", "downvote", "flag for deletion", and "write comment".  When information is frozen in place and you have a warranty that nobody is going to change the intended meaning to something you didn't have in mind, you can concentrate on problem at hand.  SO works the best as an information database, not when it tries to be Wikipedia or a newspaper.


While editing a post in mobile web I'm not seeing the Cancel button:        Full web has it:


Trouble understanding internal and external forces

systems can be defined and redefined and so the meaning of what an internal or an external force is also changes:  I think im wrong here: if then we consider planet earth a system, all the things ( cars moving etc ) that happen in this system, are they internal forces,?  if there is a change in momenta inside the system, then it is caused by a force. no doubt. internal forces. why then is it said that an internal force cant cause a change in momentum?  what i think: the system's momentum as a whole doesnt change .. but i cant go anywhere from that fact for some reason. im stuck


Negative values for AICc (corrected Akaike Information Criterion)

I have calculated AIC and AICc to compare two general linear mixed models; The AICs are positive with model 1 having a lower AIC than model 2.  However, the values for AICc are both negative (model 1 is still < model 2).  Is it valid to use and compare negative AICc values?


I am getting the following error message...  "The application “Blender” can’t be opened."  No follow up information, no "...because we can't identify the developer, etc.," just that.  Please help!


Hi, how do I hide the highlighted tollbars without hiding the ones at the bottom? I tried space+shift but it hides both of them.


What determines a creature's native plane for the Banishment spell?

I can't find in the books the definition of “native”, only that a creature type can define its native plane:     Elementals are creatures native to the elemental planes (MM, p. 6)   Celestials ands fiends have a similar line.  By RAW its seems like your native plane isn't determined by what plane you were born on, since a succubus/incubus born on the material plane is native to the lower planes, just as a cambion is.  So I was wondering: If you banish a druid in fire elemental form, does he travel to the plane of fire? If a Slaad* is born from an humanoid body on the material plane, is it native to the material plane?  * Note that slaads are listed as aberrations.


Bug in HTML entities for badge notifications

Here’s a screenshot from my achievements inbox:    The rep gain on the Meta question has the &ldquo; and &rdquo; rendered correctly, but I see plain HTML entities on the badge notification.  I found a couple of similar questions about rendering in badges being different to rep changes, but I couldn’t find one that specifically mentioned special characters.  I can see the problem in Safari 8.0 (10600.1.25) and Chrome 38.0.2125.101, both on OS X 10.10 (14A388a), but the quotes are displayed correctly in the latest public version of the iOS app.


How else can we say "what number are you in the line"?

Is there any way to rephrase "what number are you in the line"?


'In the Sangrur District of Punjab'.- is correct or 'In Sangrur District of Punjab'.-is correct?

I have a doubt regarding the usage of article in the sentence given in the title.


How to typeset this symbol with \mathcal?

I want to typeset the symbol $(C_m)$ by using \mathcal, I tried  \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{calrsfs} \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry} \usepackage[mathscr]{euscript} \begin{document} $\mathcal{(C}_m)$  \end{document}   The results are not beautiful.  I can not use $\mathcal{(C_m)})$ How can I typeset this symbol?


Should VHDL and other hardware description languages go on Stack Overflow or Electrical Engineering?

Today I ran into a question on the "new questions page" about handling some VHDL code, after answering it, I decided to look at other, similar, questions and noticed a large propensity of them getting little to no traffic/answers/votes etc.  Many of these low traffic questions that I saw were good questions; where as, and maybe I'm stretching too far, but if the question was language agnostic or more high level or even in another language it would have higher visibility.  Now this is where I want to find out what the policy should be (or maybe already is), should there be some line in the sand that is drawn; where in, the questions should be moved to the electrical engineering site, where it is more likely to get a better response and more visibility within a community that more routinely uses these languages and paradigms that are attributed to hardware based programming.  I know, from my experience with lurking on both sites routinely, that I see faster responses with more visibility from the EE.SE site (with my responses routinely being "sniped" because someone has more experience than I on the topic and can get the same response I would give out faster and more eloquently) on these topics than on the main SO site.  My main concern with this is that if questions about things like VHDL and Verilog stay at this low end visibility on SO, and they're new to the SE family of sites, they probably won't know and won't get redirected correctly if there isn't a decent policy on this.  And as such will be discouraged from asking questions of that nature on here in the future.  Furthermore, with low visibility there's the likelihood that someone answering won't necessarily be incentivised to put in the effort to answer the questions either since there's no guarantee that their answer will reward them based on the quality, because again, I saw many quality answers to these same types of question with only a single vote, or maybe two, and little to no traffic.  I understand that these languages and the design therein isn't a mainstream language topic or process, and maybe that's where I'm getting hung up, but if that's the case they should be diverted to a community that already handles questions in this arena, and a migration of question from SO to EE.SE should be considered.  , the first comment shows a redirect towards EE.SE, but, the problem with this is, if he re-asks the question over there, it's duplicating information across multiple SE sites which is a no-no, so instead it sits, with a moderately good answer (accepted but only partially accurate in its statements) and a near zero likelihood of someone giving something better with a more thorough explanation, since there's really no incentive to do so (near no traffic == near no votes/publicity == near no impetus to make a "better" answer known).


Probability of dummy variable of randomly chosen observation is equal to 1 in R

I have a column in my dataset that contains a dummy-variable educ_pers if the educational level of the respondant is the same as his/her parents'. Each row in this dataset is one respondant. The data looks somewhat like this: set.seed(1) Data <- data.frame(   idno = sample(1:10),    educ_pers = sample(c("1", "0"), 10, replace = TRUE) )  where idno is the id number of the respondant and educ_pers indicates whether the indivdual has the same educational level compared to his/her parents educ_pers==1 and educ_pers==0 if educational levels differ. To obtain the educational persistance, I would like to calculate the probability of a randomly chosen individual from the cohort to have educ_pers == 1. If possible, a 95% confidence interval around the probability would be ideal! Thanks a lot in advance!


Shouldn't the usernames on a historically locked question update as well?

I came across a historically locked question about an earlier Winter Bash and saw this:    However, Abby T. Miller and abby hairboat are the same person! Why didn't the user name update? I think it is because it was a historically locked question, but not allowing the usernames to change, seems like a thing that goes to far – what if an owner of a historically locked answer wants to have its account deleted? Will that answer show his username and avatar visible?


How do I make everything appear on one screen in Mavericks

When I open illustrator and move it to my secondary monitor in Mavericks and try and open anything... for example a new document, it will appear in my laptop screen as opposed to my second monitor. Is there any way for me to make windows open in the screen that is actively running the program or do I just have to drag one by one?  I appreciate the help!


Why does proof by contradiction not work on Rational numbers but only on Irrational numbers?

The most common way to prove the irrationality of a number is to do it by  contradiction. However, in this proof the contradiction arises from having two numbers, say p\q that are assumed to not have any common factors but are later proved to share the number under the radical as a factor. But for instance if the question so arises:  Is √4 rational or not? Answer with a proof.  At first glance, it is obviously rational, but assuming I do not know that √4 can be simplified to 2, what would stop me from arriving at irrationality as my conclusion?   This question seems quite trivial and probably stupid. Is this meant to be by definition or am I missing something fundamental to the aforementioned fallacy?


After an AJAX call, the next AJAX call doesn't work

I have a webpage with 2 tabs and a
 area which is updated. When you click a tab, jquery performs an AJAX call which retrieves the relevant data from the database and inserts it into the
. The content is generated with jquery, mostly using $("#content").append('whatever...'). This works fine.  The problem is when I try to click a button which was created from the original jquery call. It doesn't work. I'm assuming that this is because my jquery script was loaded before this html code was generated, right?  So, my question is, how do I get my generated content to work with my jquery script?  I'm guessing it would be possible for me to create 2 divs:   and then use jquery to hide/show the relevant div. Is this a possible solution or is there a more standard way?  Extra info:   Wordpress site $wpdb used for database interaction use wp_enqueue_script() to enqueue my jquery script   Thanks:)


I'm trying to send a 36 MB .mp4 video via Messages, but I'm not exactly sure if it's working.  After sending the file, the CPU usage of the processes VTDecoderXPCService and IMTranscoderAgent goes up very high (~300%) and then only about 11 MB of data are send.  I doubt that Messages is performing some magical compression that results in <30% of the original video file size for the transfer, instead I assume that the whole file is not send. But I'm not receiving a warning such as: "Could not transfer file. Attachment too large..."  Is there a limit for the attachment size in Messages?


Find the coefficient of $z$ in the Laureant Series expansion of $\frac{e^z}{z-1}$ in $\{|z|>1\}$.    Ok, so for $|z|>1 \iff |\frac{1}{z}|<1$ I can write  $\frac{1}{z-1}=\frac{1}{z}\cdot \frac{1}{1-\frac{1}{z}}=\frac{1}{z}\sum_{n=0}^{\infty}(\frac{1}{z})^n=\frac{1}{z}\sum_{n<0}z^n$  Which is the Laureant Series for $\frac{1}{z-1}$.  But I don't know what to do with the $e^z$ multiplying. How should I proceed?


New to using CLI OS.  So I tried changing the owner of a particular folder from root to my user so I can avoid errors of access denied whenever I would publish my dotnet app.  Basically, this is the folder structure.  myAppFolder  |  ->myApp    |    ->All forders that make the app(folders, .cs, .sln and the likes)    ->publish    ->README.md   When I use ls -lart on myAppFolder it says that the owner is the root. Though when I go inside and ls -lart in it some files/folders' owner is my user already. I figured that if I use 'sudo chown -R user myAppFolder' it should also change the owner of all it's subfolders because of the recursive flag. (Correct me if I'm wrong.) But when I did execute the command the ownership did not change to my user. Is there something I'm missing here? Is my understanding of the used command wrong?  EDIT: The referenced  is where I actually got the command I used, I just edited it to 'sudo chown -R user myAppFolder' because I was already in the folder that contained myAppfolder which is /apps.


I got stuck at the following physics question :     A particle has initial velocity,$\mathbf v = v_x \hat i +  v_y \hat j $ m/s and a constant force $\mathbf F = F_x \hat i +  F_y \hat j$$ acts on the particle. The path of particle will be?   My approach is that $$ \mathbf x = v_x t+ \frac{F_x}{2m} t^2$$ and $$ \mathbf y = v_y t+ \frac{F_y}{2m} t^2$$. But I don't know how to substitute $t$ from those equations. So what should I do now?   Thanks in advance.


Let $f$ be a function such that $f(ab)=f(a)+f(b) $ with $f(1)=0$ and derivative of $ f$ at $1 $ is $1$.

Let $f$  be a function such that $f(ab)=f(a)+f(b)$ with $f(1)=0$ and derivative of $f$ at $1$ is $1$   How can I show that $f$ is continuous on every positive number and   derivative of $f$ is $\frac{1}{x}$?


Should I have multiple small textures or a single big one?

I'm using SDL 2 to create a small 2D game. Based on the docs, this is what I would do:   SDL_Surface *surface = SDL_LoadBMP("image.bmp");  SDL_Texture *texture = SDL_CreateTextureFromSurface(renderer, surface);  SDL_FreeSurface(surface);  ...  SDL_RenderCopy(renderer, texture, NULL, &dest);   Since I have every single sprite in a different bmp, this would cause hundreds of texture objects to be created.  Another solution would be to create a single SDL_Surface based on all the bmp files, create a single texture object from it and then blit it with something like this:  SDL_RenderCopy(renderer, texture, &src, &dest);   I use  src to select the sprite I'm interested into blitting.  I know SDL 2 takes advantage of 3D acceleration and I'm not an expert of 3D graphics programming, but I do know that selecting the current texture is an operation that is very expensive. However, I'm not sure that a SDL texture is translated into a real Texture.  So my question is: are these 2 approaches the same in terms of performance, when using SDL 2?


Duplicate dialog breaks when the identified duplicate is deleted

The story:   Question posted on Programmers (let's call it ), Same question posted on Code Review (let's call it ), I migrate Q1 to Code Review, Someone notices that Q1 is a duplicate of Q2 and votes to close, I notice the duplicate notice and the auto-generated comment and also try to vote to close, but can't. No error message, nothing, it just doesn't work.   And then I notice that Q2 no longer exists ("voluntarily removed by its author"). My guess is the OP also noticed the duplicate vote, realized how messy cross posts are and decided to be a good citizen and delete one of the two questions. He picked the wrong one though, and now we're left with a duplicate notice pointing to a non existent question and an unresponsive dialog.  It's a mess ;) A weird and rare mess, but still a mess. What can we do about it?


Will adding CPU cores or RAM to my cloud server improve speed in my situation?

I have a Siteground cloud server, and I know nothing about servers. It hosts 8 websites, although 3 of them have their own dedicated IP addresses and cPanels.  It's on a Linux server, but there's something w/ NGinx mixed in there.  For instance, sometimes they have to restart NGinx for me ... some type of combo or something.  The basic details on the server are:   2 CPU cores 3 GB RAM 40 GB SSD storage space I'm paying about $90/month for this   If I go into my WHM, Service Status, it says this:   Server Load: 0.69 (2 CPUs) 31.4% (987,744 of 3,145,728) Swap Used: 0.01% (268 of 2,097,152) Disk Information: 74% usage   They're all WordPress installations, and recently -- despite no major changes -- my administrative areas in all Siteground websites began lagging extremely slowly and eventually timing out.  The techs are usually good, but this guy just told me to purchase 2 additional cores; he said I didn't need to purchase additional storage space or an extra GB RAM.  The Sites:  They're basically low maintenance sites and not too heavy w/ traffic.  ,  (SSLd), and then my nonprofit organization,  (SSLd, and is the largest and most visited of any of the 8 websites.  As server experts, is it possible for anybody here to tell if this tech is correct?  Will adding 2 CPUs help, so I don't get locked out of my FTP, cPanel, and back-end of my websites? Is it possible to tell with the little amount of information I'm knowledgeable enough to provide?  Or am I way off here and should I be doing something else, leery of the tech's advice?  Thank you for any guidance anybody can offer!


expected value and variance of getting a head or a tail right after each other when flipping a fair coin

[this is a classic problem appeared on a mathematical journal. i see someone already asked it here but i still don't get it. i think it's interesting to get through it with some thoughtful ideas] we flip a fair coin N times. the probability getting a head or a tail is of course 0.5. after N tossings, we record a sequence of heads and tails. let A be the total number of times that we get a head right after we get a tail. let B be the total number of times that we get a tail right after we get a head. for example, if we flip the coin 7 times and record a result as HHTTHTH, then A=2 and B=2.  find E(A) and E(B).


Determine all sets of non-negative integers x,y and z which satisfy the equation $2^x + 3^y = z^2$  This came in the 1992 INMO and curiously enough also seems to have been included on the 1996 BMO Round 2? I have never heard of a question being directly copied from another Olympiad so this was a first for me. Anyways, first, I looked at the case $y=0$. This quickly gave me one solution, viz $(x,y,z)=(3,0,3)$ Next, I considered $x,y,z>0$ We know $2^x + 3^y \equiv (-1)^x+0 \bmod 3$ and that perfect squares are $\equiv 0,1 \bmod 3$. It is easy to see that the only combination that works is $x$ be even and $z=3m+1$ type $\Rightarrow z$ is odd Also, we know that odd perfect squares are $\equiv 1 \bmod 4$. Further, $3^y\equiv (-1)^y \bmod 4$ and since $x$ is even it implies that $x≥2$ thus $2^x$ is divisible by $4$. This further implies that $(-1)^y \equiv 1 \bmod 4 \Rightarrow y$ is also even. Let $x=2k$. Then our original expression becomes $$3^y=(z+2^k)(z-2^k)$$ We have two possibilities: first is that $(z-2^k)=1$ and $(z+2^k)=3^y$ and second is $(z-2^k)=3^{y-a}$ and $(z+2^k)=3^a$. But since we previously established that $z=3k±1$ and as $2^k \equiv (-1)^y \bmod 3$, we can quickly discard the second possibility. So we finally have, $$(z-2^k)=1$$ $$(z+2^k)=3^y$$ Here I got woefully stuck. Another thing I got was that $k$ is also even (which means $x$ is itself a multiple of $4$). One more thing is that since $y$ is even $3^y$ is divisible by $9$. I don't know how we can use this fact right now but I thought it could be worth mentioning. Any help to proceed would be appreciated, thanks.


Having a hard time figuring out where questions should be posted

I have 2 questions on Programmers:       I'm fairly certain I have the 2nd question in the right place. However, as you can see from the comment on the first question, there is concern that it should be on SO.    Well, I was pretty certain that, because I am not including any code, nor expect code in an answer, the question is on the right site.    It makes no difference to me which site the question is on. I am trying to read through FAQs and other questions to get a clear understanding of how I can consistently post to the correct site. Is there a specific link that gives me guidelines comparing what should be on SO vs. Programmers?


Storing output of command in shell variable

I have an operation using cut that I would like to assign result to a variable  var4=echo ztemp.xml |cut -f1 -d '.'   I get the error:     ztemp.xml is not a command   The value of var4 never gets assigned; I'm trying to assign it the output of:  echo ztemp.xml | cut -f1 -d '.'   How can I do that?


How do I qualify for Stack Overflow Careers?

I tried "qualifying" through stack overflow and got this:     We had a look at your Stack Overflow activity but it didn’t quite meet our threshold just yet.   No surprise, I guess. I know my SO rep is low, but is there more to it than that? What is the criteria to qualify for the careers site?


Applying for a Schengen in Dubai as a tourist

I'm on a residence visa in Dubai while my wife is on a long-term visit visa for now. We've saved up for our honeymoon and want to take a trip to somewhere in Europe. But is there any way she can apply for a visa to Spain (or Germany, France or anywhere really) while on a tourist visa here? Or does she have to apply in the home country (Pakistan). The problem with the latter is that it takes much longer to do than getting it done in Dubai. We have bank statements, and can get itineraries, tickets etc.  If not, does anyone know if she can get a visa to say Turkey or the UK or anywhere else while applying from the UAE on a tourist/visit visa?


reference to figures in the appendix is not correct in REVTEX

I would appreciate any help with a problem that I have with reference to figures in my appendix. For example, instead of (Fig. A.1 ), I only get (Fig. A). I read all the previous posts but they did not help me. According to a previous post, I even added   \renewcommand\thesection{\Alph{section}} \renewcommand{\thefigure}{\thesection.\arabic{figure}}   after the \appendix command, but that did not help either. Here is the minimal code I use:  \documentclass[reprint, superscriptaddress,  amsmath,amssymb,  aps, ]{revtex4-1}   \section{AAA}\label{AAA} Blah blah Fig. \ref{xyz}  blah blah.  \appendix \section{ BBB}\label{BBB}  \begin{figure} \begin{center} \includegraphics[scale=0.5]{xyz.png} \caption{blah blah} \end{center}\label{xyz} \end{figure}


Should equals() and hashCode() return same result?

By same result I mean, if two elements are equal(), am I obliged to make them have same hashCode() as well? What can go wrong if I don't do that? First thing that came up to my mind is that 2 elements could be 'equal' in ArrayList, but not in HashSet. Is it bad practice to allow such behavior? And what problems could it make other than using contains() in them?


Mirror Modifier Texturing Painting Problem

I was Modeling a Low Poly Car using mirror Modifier. Sides of the car shares the same UV's. After texturing, a line appears to be in the middle of the model.    Question: How to remove that line ?


How to run an executable without prepending ./

I'm fairly new to Ubuntu and I do believe in jumping in head first into issues to learn. I know that I can run some GUI applications with Putty+Xming on headless Ubuntu Server. But I can't run Visual Studio Code My issue is not installing Visual Studio Code. I've installed through zip and through umake. Both with the same result.   user@server:~/tools/web/visual-studio-code$ ls Code                       libgcrypt.so.11  natives_blob.bin content_shell.pak          libnode.so       resources    Credits_43.0.2357.65.html  libnotify.so.4   snapshot_blob.bin icudtl.dat                 license.txt      ThirdPartyNotices.txt libffmpegsumo.so           locales  user@server:~/tools/web/visual-studio-code$ Code No command 'Code' found, did you mean: Command 'ode' from package 'plotutils' (universe) Command 'node' from package 'node' (universe) Command 'node' from package 'nodejs-legacy' (universe) Code: command not found user@server:~/tools/web/visual-studio-code$   Anyone know if VS-Code can be opened this way?


Debian Repo being used on Ubuntu and cannot be removed

My Issue:  GPG error: http://cdn-fastly.deb.debian.org/debian stretch-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010 W: The repository 'http://http.debian.net/debian stretch-backports InRelease' is not signed.   I am at a loss here. Not sure how I managed this but for some reason my Ubuntu box is trying to use a debian source and is failing. The problem is this is not listed in /etc/apt/sources.list so I cannot remove it.  Can anyone point me in the right direction as my google searches have yielded no results?  Thank you in advance for your time.


How can I recover a game center account where I forgot ID and password?

A long time ago, I made a game center account to which I attached my CoC village. This account hasn't been used anymore, and I have forgotten the ID and the password.  Now I want to transfer that game to my new phone which has a new game center ID, but need a transfer code from the old account to do so. Is there a way to recover my old game center account details?


Non-negative, continuous function with integral

Let there be an integrable, non-negative function $f$ in a range $[a,b]$. If the integral $\int_a^b f(x) \, dx$ equals $0$, prove that $f(x)=0$ for every $x$ for which $f$ is continuous.  I have already tried to solve this problem, but i'd like some usefull input.  My solution: Let there be a number $c$ in the range $[a,b]$, for which $f(c)>0$. $f$ is continuous, so there should be a positive $d>0$ near $c$, so that $f(x)>0$ for every $x$ within $(c-d,c+d)$. Now let there be a partition $P=\{x_{0},x_{1},....,x_{n}\}$ of the interval $[c-d/2 , c+d/2]$ with $x_{0}=c-d/2$ and $x_{n}=c+d/2$.   Let be $m_{i}=\inf \{ f(x): x_{i-1}\leq x\leq x_{i}\}$ for $i=1,2,...,n$.  Therefore, $$L_{f,P}=\sum_{i=1}^{n} m_{i}(x_{i}-x_{i-1})>0\text{.}$$  However, we know that $\int_a^b f(x) \, dx=L_{f,P}=U_{f,P}=0$ and we have a contradiction.  As such, there is no $c$ in $[a,b]$ so that $f(c)>0$, and so $f(x)=0$ for every $x \in [a,b]$.  Was my assumption of using the interval $(c-d,c+d)$ correct?


Tensor product of finitely generated modules.

Let $R$ be a commutative and local ring, and $M$ is a right $R$-module and $N$ is a left $R$-module. If $M$ and $N$ are finitely generated, then $M\otimes_{R} N=0$ if and only if $M=0$ or $N=0$.   If $R$ is not local, then this proposition is true? Why?  I want to prove this proposition. But I don't know how to start. Please help me.   Thank you.


I plan to travel to Jamaica after my contract I work on the ship. Can I use my C1/D to transit through the USA in New York to go to Jamaica?


how can be prove that $\max(f(n),g(n)) = \Theta(f(n)+g(n))$  though the big O case is simple since $\max(f(n),g(n)) \leq f(n)+g(n)$  edit : where $f(n)$ and $g(n)$ are asymptotically nonnegative functions.


Is there a keyboard shortcut to select the entire current line in Notepad++?

Microsoft OneNote has a handy shortcut (Ctrl+A) that I use all the time to select an entire line.  And if you click it a second time it selects the entire document.  I really would like to use Ctrl+A as shortcut in Notepad++ to select the current line, but its default is to select the entire document.  Is there a way to make it select only the entire current line?


Digitizing polygons against georeferenced map using ArcMap

I am drawing polygons of counties over a 17th Century map that I have georeferenced. I have an issue with this version of ArcMap which I haven't experienced with past versions. The shape keeps closing after 3 vertexes have been applied.  The only way I have found to get round this is to draw a square of vertexes over the whole county and then keep adding vertexes to draw in the polygon which is very time consuming. How can I avoid this happening?


A few times I saw regex experts say that using (.|\n)*? is a really, really bad idea.   Well, I do understand that it's better to replace it with the .* and use the /s flag. But sometimes the flags are not available, for example, when using regex within a text editor or other software with limited regex functionality. Thus, using something like (.|\n)*? might be the only option for multi-line matching.  So, what are the reasons to always avoid (.|\n)*??


I am completely new to GIS and therefore have questions regarding how the GIS Web development should be made, because the entire concept still confuses me.  So, imagine I have a map. And by this, i mean the shape files for the layers and so on.   How i should i use this in my web application?   I have read about MapServer, OpenLayers, PostGIS, but can't quite understand how and why this all enters the question.   If i have my map, my files, shouldn't the problem be just on to represent it in the web page?


Why did installation of MySQL 5.6 on Ubuntu 14.04 fail?

I wanted to get a look at MySQL 5.6 on Ubuntu 14.04 just out of curiosity. And based on  it certainly looked like installation should be simple and straightforward. So I fired up an AWS EC2 micro server running Ubuntu 14.04 (64-bit), logged into my pristine instance (via PuTTY), and issued the following commands:  $ sudo apt-get update $ sudo apt-get build-dep mysql-server-5.6 $ sudo apt-get install mysql-server-5.6   (The first two commands were desperation moves, since simply running apt-get install alone had previously not worked. But even with all three commands, the install step still did not work.)  At the point where I expected, based on the article referenced above, to see this output from the final command:  mysql start/running, process 2355   Setting up libhtml-template-perl (2.95-1) ...   Setting up mysql-common-5.6 (5.6.16-1~exp1) ...   Processing triggers for libc-bin (2.19-0ubuntu6) ...   Processing triggers for ureadahead (0.100.0-16) ...     I got this instead:  start: Job failed to start   invoke-rc.d: initscript mysql, action "start" failed.   dpkg: error processing package mysql-server-5.6 (--configure):    subprocess installed post-installation script returned error exit status 1   Setting up libhtml-template-perl (2.95-1) ...   Setting up mysql-common-5.6 (5.6.16-1~exp1) ...   Processing triggers for libc-bin (2.19-0ubuntu6) ...   Processing triggers for ureadahead (0.100.0-16) ...   Errors were encountered while processing:    mysql-server-5.6   E: Sub-process /usr/bin/dpkg returned an error code (1)   Can anyone see what went wrong?


Probability of guests in theater getting their reserved seats

Exercise: Consider a theater with $n$ seats that is fully booked for this evening.   Each of the $n$ people entering the theater (one by one) has a seat reservation. However, the first person is absent-minded and takes a seat at random. Any subsequent   person takes his or her reserved seat if it is free and otherwise picks a free seat at   random.      (i) What is the probability that the last person gets his or her reserved seat?      (ii) What is the probability that the $k$th person gets his or her reserved seat?   I get $p = 0.5$ for (i), but I have no idea if it's right.  Can somebody help me with (i) and especially (ii)?  Thank you!


Python p run code at the top or start of a new minute

In python, I have code that needs to be triggered and the top of every minute.  I have a while loop.  What is the best why to watch the time and when a new minute start then execute?  Thanks    while True:    if TOP_OF_MIN:         run_code()


I want to use comma (,) as decimal separator. The problem is that it is typeset with wrong font (Computer Modern, I suppose), not with the normal font defined using mathspec package. I have tried icomma package and siunitx package but they don't affect the font.  Here is a minimal code to try. The last two "1,5" examples have wrong comma font.  \documentclass{article} \usepackage{mathspec} \usepackage{icomma} \usepackage[locale=DE]{siunitx}  \setmainfont{DejaVu Serif} \setmathsfont(Digits,Latin,Greek){DejaVu Serif}  \begin{document}  1,5  \( 1,5 \)  \( \num{1,5} \)  \end{document}


Indentation not working only for some paragraphs

My indentation has stopped working after one section of my document. Here is the beginning code:   \documentclass[11pt]{article}   \usepackage{amsfonts}   \usepackage{amsmath}   \usepackage{amssymb}   \usepackage{lastpage}   \usepackage[margin=0.85in]{geometry}   \usepackage{graphicx}   \usepackage{tabu}   \usepackage{textcomp,gensymb}   \usepackage{caption}   \usepackage{float}   \usepackage{indentfirst}   \usepackage{multirow}   \usepackage{array}   \usepackage{subcaption}   \setlength{\parindent}{6.5ex}   \setlength{\parskip}{1.5em}    \begin{document} This is the part when it does work anymore.  \section{blah blah}   Blah blah blah, $math$, blah blah, like blah:   \begin{gather*} more math \\ more math \\ more math \end{gather*}   Blah blah...   \end{document}   When I start including math environments within the paragraphs and outside, it does not seem to work anymore, what ever I try. I have tried using the \indent, using \setlength{...}, specifying all paragraphs using \par at the end, ending with \\, nothing works.   This is the part when it does work anymore.  \section{blah blah}   Blah blah blah, $math$, blah blah, like blah:   \begin{gather*} more math \\ more math \\ more math \end{gather*}   Blah blah...    After this section, no indentation works.


I have a database with a memory optimized table and table partitions. The log file is over 300GB in one .ldf file, and another 40GB in another. I have tried shrinking the db, files, log   DBCC SHRINKFILE ('dblog' , 0) DBCC SHRINKFILE ('dblog' , 0, TRUNCATEONLY)   Nothing seems to shrink the log and it's very large. Each day it gets bigger and bigger. Nothing seems to shrink it. Any advice?   I have all the service packs already installed. The database is in SIMPLE recovery mode. I use the maintenance wizard to backup differential nightly and full on Sundays. log_reuse_wait_desc for the database is XTP_CHECKPOINT. It is definitely using the SIMPLE recovery model A manual CHECKPOINT did not change anything.


First name and middle name printed the wrong way around on ticket!

I am travelling to Vietnam and Australia through Vietnam Airlines.  My passport name is: Mrs A B C  The ticket has been printed as: Mrs B A C  (To be clear; A to represent first name, B to represent middle name and C to represent last name)  There are no discrepancies in the spelling of any of the names. After reading an overwhelming amount of information and posts on forums, it seems as though it isn't an issue in general. It's just worrying to know I could be denied at the airport or even worse denied on flights abroad. My tickets cannot be reprinted by the travel agency. I can either cancel and rebook (at a VERY large price, £1200+) or take a chance... any further advice?


R glm() does not converge / huge standard errors: collinearity?

I am trying to run a fixed effects logit-regression in R using glm() as follows glm(binary_outcome ~ as.factor(region)*as.factor(birth_cohort) + as.factor(region)*as.factor(gender)+as.factor(birth_cohort)*as.factor(gender)+treated:as.factor(gender)-1, data, family = "binomial") This gives the following error "Warning message: glm.fit: algorithm did not converge" Also, in other contexts, if I get something similar to run, the estimates don't make sense and the standard errors are huge (in the order of 10+e8). I suspect the problem is multicollinearity, so I am wondering, if glm() knows, how to normalize the fixed effects regression, since this obviously needs normalizations. If not, is there a simple way to specify it?


MVC SPRING - org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException

I got HttpStatus 500 with nested exception and java.lang.NullPointerException im making a multicurrency converter i used to debug when it get here the error starts currencypojo.setAmount(BigDecimal.valueOf(Integer.parseInt((request.getParameter("txtAmount")))));  MultiCurrencyController.java  package com.multicurrency;  import java.math.BigDecimal;  import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;  import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.AbstractController;  public class MultiCurrencyController extends AbstractController{      private MultiCurrencyPOJO currencypojo;     @Override     protected ModelAndView handleRequestInternal(HttpServletRequest request,             HttpServletResponse response) throws Exception {         currencypojo.setAmount(BigDecimal.valueOf(Integer.parseInt((request.getParameter("txtAmount")))));         currencypojo.setCurrency(request.getParameter("currency"));         return new ModelAndView ("home","CurrencyInfo",currencypojo);     }      public void multiCurrencyPOJO(MultiCurrencyPOJO currencypojo){         this.currencypojo=currencypojo;     } }   MultiCurrencyPOJO.java  package com.multicurrency;  import java.math.BigDecimal;    public class MultiCurrencyPOJO {     private String currency;     private BigDecimal amount;      public String getCurrency() {         return currency;     }     public void setCurrency(String currency) {         this.currency = currency;     }     public BigDecimal getAmount() {         return amount;     }     public void setAmount(BigDecimal amount) {         this.amount = amount;     }      public static BigDecimal getExchangeRate(String currency) {         return null;      } }


I'm sure it's easy to google, but I have no idea how to phrase it to find it. I'm super new to blender and trying to model a spoon, and this is where I'm stuck:     How do I get rid of this? I tried doing a loop cut, I tried removing every other edge inside, so I get 4 corners instead of 3 - it only seems to make it worse. Any tips for a beginner?


I have sucessfully installed AniMove by activating experimental plugins (yay! thanks gis.stackexchange). But I can't find it in Qgis! Yes I have activated it. Where is it? Is this a common bug? I searched for it the toolbox, I looked up the names of the several single tools based on this  and only found "Kernel Density", which is filed under SAGA. But I don't have SAGA installed (and don't know if I need to?)


How do I only render what I see, excluding what I have hidden?

It will be a stupid question but I really don't know how to render the current scene with only the objects displayed in the viewport, as although you normally hide them with H, in the render they are the same. I thought about creating another scene by deleting those objects, but is it convenient? or does the project weigh me down? moreover, from one scene to another it makes me copy only the single objects and not the collections, is there a way to bring the groups? So how can I render only some of the objects in the scene without having to go crazy?


90s movie about time travelers to middle ages where dinosaurs are considered dragons

I saw this movie in the early 2000s where a teenager and an older man (probably his dad) travel back in time to the middle ages. Their time machine gets broken, it is rather big and looks more like a spaceship. Like a NASA space shuttle but smaller/shorter.  They meet a group of peasants who are rebelling against the local nobles, much like Robin Hood's merry men. A guy who seems in charge of the rebels ask them who they are and what they do. The "dad" says they are inventors and the time machine is used to keep food fresh for weeks, but it's broken. Talk about a big fridge! The rebel leader laughs, "Why keep food when you can eat it?". They help camouflage the time machine until it can be fixed.   Suddenly they are attacked by a "dragon" but the teenager calms them down by telling them that it's called a Triceratops and it doesn't eat meat. He makes friends with a young guy who was impressed with his knowledge of "dragons". Somehow there is also a real dinosaur they must fend off, not quite a T-Rex but a bigger raptor maybe. He also helps them out with a battle against the nobleman's soldiers by creating some sort of electroshock device(s). When the medieval friend asks him what's that electricity he's talking about he says "it's not magic, but a form of energy, like lightning" to which he is told "So it's magic then, you really are a magician!" and he and his friends are totally in awe.  I think in the end they fix the time machine after also helping the rebels battle the oppressing feudal lord. The entire movie was rather lighthearted. This is a live action 90s English movie, nothing too fancy about it.


How to get specifiy String in ArrayList for comparion if-else

I have a list like this :  now, i want to use it, if the text1 = "A12345", then do something.   if the text1 = "B54321", do otherwise but i've tried like below, but it did not work,  how should i do that  private void buildRecyclerView(){         // Create recycler view.         mRecyclerView = findViewById(R.id.recyclerView);         mRecyclerView.setHasFixedSize(true);          mLayoutManager = new LinearLayoutManager(this);          // Create an adapter and supply the data to be displayed.         mAdapter = new ExampleAdapter(mExampleList);          // Give the recycler view a default layout manager.         mRecyclerView.setLayoutManager(mLayoutManager);          // Connect the adapter with the recycler view.         mRecyclerView.setAdapter(mAdapter);         //buat hilang dulu diawal         mRecyclerView.setVisibility(View.GONE);          mRecyclerView.addOnItemTouchListener(                 new RecyclerItemClickListener(this, mRecyclerView ,new RecyclerItemClickListener.OnItemClickListener() {                     @Override                     public void onItemClick(View view, int position) {                         Toast.makeText(menu_utama.this, "Clicked at pos " + position, Toast.LENGTH_SHORT).show();                         if (getText(0) == "A12345"){                             // do here                         }                     }                     @Override                     public void onLongItemClick(View view, int position) {                         // do whatever                     }                 })         );     }


Well, Newton's three laws talks about forces, but no definition is given. In truth, Newton's second law gives an idea of what total force is: the time change rate of momentum. But, if we have a force amongst others, this force alone isn't the time rate change of momentum, so that we cannot use Newton's second law to define force, but just to try defining total force.  Knowing all of this, is there a definition of force or we take force as a primitive concept like that of time?  Thanks very much in advance!


how to connect more than two databases i.e (3 Databases) in php

$con1=mysql_pconnect("localhost","root","") or die("not connected to server");  mysql_select_db("wheels",$con1) or die("not connected to database");  $con2=mysql_pconnect("localhost","root","",true) or die("not connected to server");  mysql_select_db("pakbikes",$con2) or die("not connected to database");  $con3=mysql_pconnect("localhost","root","", true) or die("not connected to server");  mysql_select_db("olx",$con3) or die("not connected to database");   but its not working it only connect 2 databases...


I'm new to Blender and 3D modeling in general. I've been working on a model for about 5 hours. Just as I was preparing to render and save a picture of it, parts of the model started disappearing. They're not deleted, and there's a light source, they just don't show up. At first it was only like this when I looked through the camera using Ctrl-0, but now nothing it working like it used to when I started. Oh and I'm using Cycles Render.  What could be the problem?


Is there a way to install the MS Windows version of msn?

I am using Ubuntu 14.04 (Trusty)  I need to install Msn - the Windows version of MSN, but can only find Amsn which is not what I need.  Is there a way to install Windows's Msn?


Which badminton speak is better in US `ba~d~min` or `ba~men~ton`

Badminton in google transalation speak like ba~d~mon but I asked philippines friends they always speak like ba~men~ton which one the US use in normal life?


So I have a wordlist that I'm creating suited for a particular domain and I'm trying to get rid of the forward slashes

Basically I want to get rid of the forward slashes but I'm not as familiar with sed/awk as I should. Can someone help me out here. Edit: I'd also like to mention that the worlist is over 1000 lines and not all of them have the forward slashes appended to them. So I need to basically loop through it, and when it hits a forward slash, remove it. -agile/ -agility -agnosticism -ahead -akeneo -alerts/ -all -all/


How do I open the Settings application from my application?

In an iPhone app I'm working on, the user needs to enter some configuration via the settings application before my app will be able to connect to a server and run. Right now when the user first launches my app, I display an alert explaining that the user should go to settings, enter the config details and then relaunch, but this isn't ideal.  Unfortunately there's no way for me to provide sensible defaults for this app, the server host names, user accounts etc. will vary for each user. I think the best I can hope for is to show an alert explaining that some configuration needs to be entered via settings, and provide a "Take me there..." button that will open settings and then open the section in settings for my app. If that's not possible, opening settings is better than nothing.  I vaguely remember that the iPhone jailbreaking people had figured out a way to launch settings or other apps via a funny URL or phone number in the Addressbook, but I'm not finding any info about it in Google.  :(


Is there any disadvantages of paying off mortgage?

Usually when we think about paying off mortgage it always seems a good idea as this is one of the biggest debt for most people. I was curious if there are any disadvantages of paying off mortgage excluding reasons:   You should pay off high interest debt first such as Credit Card debt, other debt. You should invest first if your investment rate of return is higher than your mortgage interest.   I'm looking for more information on item listed below and other disadvantages:   Tax treatment / capital gain when you sell your house. Anything else...


Should I create a sitemap for an invite only website?

I'm creating an invite only website, so my question is if I need to create a sitemap xml and upload to Google and others search engines with all pages? With only the main page (that'll be open for everyone)?   And what others SEO tips I could use in a scenario like this?   I'm new to SEO, sorry for the newbie questions.  Thanks!


Is an inexpensive used Pentax lens worth buying for mounting on a Canon Rebel T5i?

I have found an smc Pentax-A 25-135mm f/4 at a local thrift, for $60. Everything seems to be working great, and it's without scratches. Is this a great deal, or not so much? Is this a good lens?  I have a Canon Rebel T5i. I'm an amateur photographer, but I'm hoping to make something of myself with photography. Can I adapt this lens to my camera, and if so, what adapter is needed?


How can I stop "clipboard hijacking" globally?

this is getting to be a real bugbear of mine, and from what i understand it's becoming more common.  a few of you might have heard of tynt, a site that offers clipboard-hijacking services. with their API on your site, users that copy your content will either have the content they copy altered or a link to the website they sourced the information from will be placed at the end.  i object on a fundamental level to allowing anyone but myself access over my clipboard. it's a personal aspect of the computer and not one i plan on letting marketers into.  previously, blocking clipboard hijacking was easy because tynt were the only ones trying it, so setting up a hosts redirect for tcr.tynt.com killed it all without issue. now, however, i see that other sites are hosting their own imitations, which do much the same thing.  here's a javascript applet from one such site:   you can test it out yourself by looking at any page of theirs:  and copying any of the lyrics from there. they will add a link to their own site and a spam link beneath it.  is it possible to instruct chrome to block all scripts of this specific type? is there a way to blanket deny pamphleteers access to my clipboard? i'd love to hear what anyone thinks. i could use noscript, but unless i'm mistaken it doesn't contain any intelligent code to recognise javascript that's trying to hijack my clipboard, so it's not particularly useful here.


Azimuth and Distance, NumericalDigitize, Numerical Vertex Edit, XY tools and other plugins are not on QGIS Plugin Manager version 2.0.1

Will these plugins no longer be available in QGIS 2.0.1?


I was just tying to understand what is happening when I write a=c; when I checked type of "a" it is showing up as class "C". Now my question here is if "a" is pointing to "c" then why it is not behaving like pointer "c".  class Program     {         static void Main(string[] args)         {             C c = new C();             A a = new A();             Console.WriteLine(a.GetType());             a = c;             Console.WriteLine(a.GetType());             a.Show();             c.Show();             Console.ReadLine();         }     } class A {     public virtual void Show()     {         Console.WriteLine("A.Show()");     } }  class B : A {     public override void Show()     {         Console.WriteLine("B.Show()");     } }  class C : B {     public new void Show()     {         Console.WriteLine("C.Show()");     } }  Output:


How to prove that $\lim\limits_{n\to\infty}\int\limits _{a}^{b}\sin\left(nt\right)f\left(t\right)dt=0\text { ? }$

Let $f:\left[a,b\right]\to\mathbb{R}$ be a function that is derivative so that $f'$ is continuous then $$ \lim_{n\to\infty}\int\limits _{a}^{b}\sin\left(nt\right)f\left(t\right)dt=0 $$   My attempt: I want to show that $\forall\epsilon>0 \ \exists \ n_0 \in  \mathbb{N}$ so that $\forall n>n_0 \ \ \ \left|\int\limits _{a}^{b}\sin\left(nt\right)f\left(t\right)dt\right|<\epsilon$. Let there be $\epsilon>0$  because $f$ and $\sin$ are derivative and $f'$ is continuous we can use integration by parts so that $$ \left|\int\limits _{a}^{b}f'\left(t\right)\sin\left(nt\right)dt\right|=\left|\left[f\left(t\right)\sin\left(nt\right)\right]_{a}^{b}-n\int\limits _{a}^{b}f\left(t\right)\cos\left(nt\right)\right|\leq\left|\left[f\left(t\right)\sin\left(nt\right)\right]_{a}^{b}\right|+\left|n\int\limits _{a}^{b}f\left(t\right)\cos\left(nt\right)\right| $$  That is my main idea. any suggestions?


So I understand that Euclidean distance is valid for all of properties for a metric. But why doesn't the square hold the same way?


How much damage should be caused by falling into water?

I have tried to find the answer to this question by searching the books and was unable to find anything in the regular rules.  Attempting to search here only threw up similar questions relating to older versions of the game (1e) or pathfinder, so how does it work for 5e?  Is the damage negated by falling into water, if you were to fall from a great height, for example 800 ft? Or, is it reduced like resistance?


How can I add "page # of ##" on my document?

I want to add a footer to my document displaying the current number out of total number of pages. How do I do that?


Convex combination of cumulative distribution functions

Let $F,G$ be cumulative distributions functions. I need to find a necessary and sufficient condition for $\alpha$ such that $(1-\alpha)F+\alpha G$ is also a cumulative distribution function.   I have found that a sufficient condition is $0 \leq \alpha \leq 1 $, but I'm not sure wether it is a necessity. I'm struggling with proving that given $\alpha >1$ or $\alpha<0$ ,  $(1-\alpha) F+\alpha G$ is not monotonic.  Any ideas?


Let us consider this small problem: $$ \int0\;dx = 0\cdot\int1\;dx = 0\cdot(x+c) = 0 \tag1 $$ $$ \frac{dc}{dx} = 0 \qquad\iff\qquad \int 0\;dx = c, \qquad\forall c\in\mathbb{R} \tag2 $$  These are two conflicting results. Based on  question, Sam Dehority's answer seems to indicate: $$ \int\alpha f(x)\;dx\neq\alpha\int f(x)\;dx,\qquad\forall\alpha\in\mathbb{R} \tag3 $$  However, this clearly implies that indefinite integration is nonlinear, since a linear operator $P$ must satisfy $P(\alpha f) = \alpha Pf, \forall\alpha\in\mathbb{R}$, including $\alpha=0$. After all, a linear combination of elements of a vector space $V$ may have zero valued scalars: $f = \alpha g + \beta h, \forall\alpha,\beta\in\mathbb{R}$ and $g, h\in V$. This all seems to corroborate that zero is not excluded when it comes to possible scalars of linear operators.  To take two examples, both matrix operators in linear algebra and derivative operators are linear, even when the scalar is zero. In a matrix case for instance, let the operator $A$ operate a vector: $A\vec{x} = \vec{y}$. Now: $A(\alpha\vec{x}) = \alpha A\vec{x} = \alpha\vec{y}$. This works even for $\alpha = 0$.  Why is $(3)$ true? Can someone prove it formally? If $(3)$ is false, how do we fix $(1)$ and $(2)$? When exactly does the following equality hold (formal proof)? $$ \int\alpha f(x)\;dx  = \alpha\int f(x)\;dx,\qquad\forall\alpha\in\mathbb{R} $$  I would appreciate formal answers and proofs.


how to spell in English the amount ? 409383 us dollars  i like to know if it is right: four hundred nine thousand, and three eighty three hundred US Dollars


Should I use "I" or "We" in Peer-Review Journal Submissions?

I am the single author for a journal article which focuses on the measurement and validation of two scale instruments. This is a purely quantitative report for submission in a top-tier educational psychology journal. Where appropriate, I have used the plural first-person "we" in the article, as "I" sounds very peculiar to me. I also feel as though it is disadvantageous to write singular first-person when submitting for blind peer-review. At the same time, I don't want readers thinking I have multiple personality disorder as more than one person. ;)  In your opinion, should I be using "I" or "We?"   FYI I'd rather not use passive voice. It's madness for this article.  Thanks for your thoughts in advance.


Why was I downvoted -10 - system shows: "USER REMOVED"?

I can understand being downvoted because an answer is not relevant or helpful to a topic..  But, I logged in this afternoon, and see that I downvoted -10 and see in the list of actions, it was because USER REMOVED.  And I do see the post:   Which is because the user has been removed because of their choice, kicked out, etc.  However, I also see the user in the reference URL was downvoted -5 and I was downvoted -10..  Thanks for listening.